trybeacon 0.1.45 → 0.1.46
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.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +19 -19
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +11 -11
- package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/docs.html +1 -1
- package/.next/server/app/docs.rsc +11 -11
- package/.next/server/app/docs.segments/_full.segment.rsc +11 -11
- package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/docs.segments/_index.segment.rsc +11 -11
- package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
- package/.next/server/app/feedback/page_client-reference-manifest.js +1 -1
- package/.next/server/app/feedback.html +1 -1
- package/.next/server/app/feedback.rsc +11 -11
- package/.next/server/app/feedback.segments/_full.segment.rsc +11 -11
- package/.next/server/app/feedback.segments/_head.segment.rsc +1 -1
- package/.next/server/app/feedback.segments/_index.segment.rsc +11 -11
- package/.next/server/app/feedback.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/feedback.segments/feedback/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/feedback.segments/feedback.segment.rsc +1 -1
- package/.next/server/app/help/page_client-reference-manifest.js +1 -1
- package/.next/server/app/help.html +1 -1
- package/.next/server/app/help.rsc +11 -11
- package/.next/server/app/help.segments/_full.segment.rsc +11 -11
- package/.next/server/app/help.segments/_head.segment.rsc +1 -1
- package/.next/server/app/help.segments/_index.segment.rsc +11 -11
- package/.next/server/app/help.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/help.segments/help.segment.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +14 -12
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -2
- package/.next/server/app/index.segments/_full.segment.rsc +14 -12
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +11 -11
- package/.next/server/app/index.segments/_tree.segment.rsc +4 -2
- package/.next/server/app/map/page.js +2 -2
- package/.next/server/app/map/page.js.nft.json +1 -1
- package/.next/server/app/map/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/plan/page.js +1 -1
- package/.next/server/app/plan/page.js.nft.json +1 -1
- package/.next/server/app/plan/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +19 -19
- package/.next/server/chunks/5354.js +1 -0
- package/.next/server/chunks/7208.js +93 -0
- package/.next/server/chunks/8846.js +2 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/1a258343-6baccd9e573fdfaf.js +2 -0
- package/.next/static/chunks/2500-15c373070714563d.js +1 -0
- package/.next/static/chunks/4888-911c0da3c2d785d2.js +1 -0
- package/.next/static/chunks/6229-35add8ccbfd89026.js +1 -0
- package/.next/static/chunks/8074-a6b2725786399e2c.js +1 -0
- package/.next/static/chunks/8997-78a359d0d238622e.js +1 -0
- package/.next/static/chunks/app/{layout-1c0e0a0b09f3bede.js → layout-1bc5f9fd4ce6bff9.js} +1 -1
- package/.next/static/chunks/app/map/{page-d370a9e22639ac8f.js → page-e39e42ea48e335c5.js} +1 -1
- package/.next/static/chunks/app/page-968dd5a6f667bff9.js +1 -0
- package/.next/static/chunks/app/plan/page-6fe2020187a86e45.js +1 -0
- package/.next/static/chunks/app/settings/{page-4d4879990a4f14fc.js → page-67cab634be8bfef2.js} +1 -1
- package/.next/static/chunks/{webpack-3dc11ff04fc155e6.js → webpack-de4a0d9611ec2cad.js} +1 -1
- package/.next/static/css/2d019ca6e0582481.css +1 -0
- package/.next/static/css/83755b1f39ccf91d.css +1 -0
- package/.next/trace +39 -38
- package/.next/trace-build +1 -1
- package/package.json +1 -1
- package/.next/server/chunks/2733.js +0 -1
- package/.next/server/chunks/3269.js +0 -94
- package/.next/static/chunks/1a258343-7b029f38cf13f847.js +0 -2
- package/.next/static/chunks/4294-0e5034f9c5643c3f.js +0 -1
- package/.next/static/chunks/4591-24e8611c8e639bdd.js +0 -1
- package/.next/static/chunks/6955-c21412b6dcd86d80.js +0 -1
- package/.next/static/chunks/app/page-cdddef7fb0346b0f.js +0 -1
- package/.next/static/chunks/app/plan/page-a27c9249f4358260.js +0 -1
- package/.next/static/css/e4303a873016af65.css +0 -1
- /package/.next/static/{sVPfJz1Zw2u3w7VTE46C2 → 5zLktwn2nHj-40t2fVml_}/_buildManifest.js +0 -0
- /package/.next/static/{sVPfJz1Zw2u3w7VTE46C2 → 5zLktwn2nHj-40t2fVml_}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6955],{2125:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},5736:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},6266:(t,e,n)=>{"use strict";n.d(e,{Do:()=>p,WZ:()=>h,TG:()=>y,ny:()=>f,yX:()=>g,xN:()=>m,Qc:()=>d,I$:()=>n6,aQ:()=>rr,di:()=>ri,kO:()=>rf,rN:()=>nP,bi:()=>nQ,_s:()=>ny,_7:()=>e4,aE:()=>eQ,kr:()=>ni,Hm:()=>nF,tM:()=>ej,tn:()=>eC,xc:()=>eH,us:()=>np,IO:()=>eZ,e_:()=>nE,Fp:()=>nz,Mi:()=>nt,HF:()=>eV,Eo:()=>nx,b5:()=>nD,Tq:()=>eJ,qX:()=>nS,q1:()=>nM,M_:()=>nV,oj:()=>nw,aZ:()=>eW,aW:()=>nU,uD:()=>nf,Jo:()=>eG,U$:()=>eK,X6:()=>ne,oN:()=>nC,ah:()=>nL,R4:()=>nl,r8:()=>n1,ZO:()=>eR,bK:()=>eD,b$:()=>eX,uj:()=>nI,v5:()=>n_,Ue:()=>nc,Er:()=>nk,oB:()=>eU,kf:()=>nr,mW:()=>nn,Q6:()=>nm,QE:()=>nd,kM:()=>e6,No:()=>n5,Ff:()=>na,zj:()=>ns,s_:()=>no,vS:()=>nK,qn:()=>n3,uL:()=>n2,YN:()=>ng});var r,i,o,a,s,u,l,c,h,f,d,p,y,g,m,v=n(32521);function x(){}function w(t){return null==t?x:function(){return this.querySelector(t)}}function b(){return[]}function _(t){return null==t?b:function(){return this.querySelectorAll(t)}}function k(t){return function(){return this.matches(t)}}function M(t){return function(e){return e.matches(t)}}var A=Array.prototype.find;function E(){return this.firstElementChild}var N=Array.prototype.filter;function $(){return Array.from(this.children)}function z(t){return Array(t.length)}function O(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function S(t,e,n,r,i,o){for(var a,s=0,u=e.length,l=o.length;s<l;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new O(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function I(t,e,n,r,i,o,a){var s,u,l,c=new Map,h=e.length,f=o.length,d=Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=l=a.call(u,u.__data__,s,e)+"",c.has(l)?i[s]=u:c.set(l,u));for(s=0;s<f;++s)l=a.call(t,o[s],s,o)+"",(u=c.get(l))?(r[s]=u,u.__data__=o[s],c.delete(l)):n[s]=new O(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c.get(d[s])===u&&(i[s]=u)}function T(t){return t.__data__}function P(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}O.prototype={constructor:O,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var L="http://www.w3.org/1999/xhtml";let B={svg:"http://www.w3.org/2000/svg",xhtml:L,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function H(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),B.hasOwnProperty(e)?{space:B[e],local:t}:t}function R(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function C(t,e){return t.style.getPropertyValue(e)||R(t).getComputedStyle(t,null).getPropertyValue(e)}function j(t){return t.trim().split(/^|\s+/)}function D(t){return t.classList||new q(t)}function q(t){this._node=t,this._names=j(t.getAttribute("class")||"")}function V(t,e){for(var n=D(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function X(t,e){for(var n=D(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function U(){this.textContent=""}function F(){this.innerHTML=""}function Y(){this.nextSibling&&this.parentNode.appendChild(this)}function G(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function W(t){var e=H(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===L&&e.documentElement.namespaceURI===L?e.createElement(t):e.createElementNS(n,t)}})(e)}function K(){return null}function Z(){var t=this.parentNode;t&&t.removeChild(this)}function Q(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function J(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)(n=e[r],t.type&&n.type!==t.type||n.name!==t.name)?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function te(t,e,n){return function(){var r,i=this.__on,o=function(t){e.call(this,t,this.__data__)};if(i){for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),r.value=e;return}}this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function tn(t,e,n){var r=R(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}q.prototype={add:function(t){0>this._names.indexOf(t)&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var tr=[null];function ti(t,e){this._groups=t,this._parents=e}function to(){return new ti([[document.documentElement]],tr)}function ta(t){return"string"==typeof t?new ti([[document.querySelector(t)]],[document.documentElement]):new ti([[t]],tr)}function ts(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}ti.prototype=to.prototype={constructor:ti,select:function(t){"function"!=typeof t&&(t=w(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,l=r[i]=Array(u),c=0;c<u;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),l[c]=a);return new ti(r,this._parents)},selectAll:function(t){if("function"==typeof t){var e;e=t,t=function(){var t;return t=e.apply(this,arguments),null==t?[]:Array.isArray(t)?t:Array.from(t)}}else t=_(t);for(var n=this._groups,r=n.length,i=[],o=[],a=0;a<r;++a)for(var s,u=n[a],l=u.length,c=0;c<l;++c)(s=u[c])&&(i.push(t.call(s,s.__data__,c,u)),o.push(s));return new ti(i,o)},selectChild:function(t){var e;return this.select(null==t?E:(e="function"==typeof t?t:M(t),function(){return A.call(this.children,e)}))},selectChildren:function(t){var e;return this.selectAll(null==t?$:(e="function"==typeof t?t:M(t),function(){return N.call(this.children,e)}))},filter:function(t){"function"!=typeof t&&(t=k(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new ti(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,T);var n=e?I:S,r=this._parents,i=this._groups;"function"!=typeof t&&(v=t,t=function(){return v});for(var o=i.length,a=Array(o),s=Array(o),u=Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,d="object"==typeof(m=t.call(c,c&&c.__data__,l,r))&&"length"in m?m:Array.from(m),p=d.length,y=s[l]=Array(p),g=a[l]=Array(p);n(c,h,y,g,u[l]=Array(f),d,e);for(var m,v,x,w,b=0,_=0;b<p;++b)if(x=y[b]){for(b>=_&&(_=b+1);!(w=g[_])&&++_<p;);x._next=w||null}}return(a=new ti(a,r))._enter=s,a._exit=u,a},enter:function(){return new ti(this._enter||this._groups.map(z),this._parents)},exit:function(){return new ti(this._exit||this._groups.map(z),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=Array(i),u=0;u<a;++u)for(var l,c=n[u],h=r[u],f=c.length,d=s[u]=Array(f),p=0;p<f;++p)(l=c[p]||h[p])&&(d[p]=l);for(;u<i;++u)s[u]=n[u];return new ti(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=P);for(var n=this._groups,r=n.length,i=Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,l=i[o]=Array(u),c=0;c<u;++c)(a=s[c])&&(l[c]=a);l.sort(e)}return new ti(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(let e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=H(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?n.local?function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}:function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}:n.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}:function(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):C(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var n=j(t+"");if(arguments.length<2){for(var r=D(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?V:X)(this,t)}}:e?function(t){return function(){V(this,t)}}:function(t){return function(){X(this,t)}})(n,e))},text:function(t){return arguments.length?this.each(null==t?U:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?F:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(Y)},lower:function(){return this.each(G)},append:function(t){var e="function"==typeof t?t:W(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:W(t),r=null==e?K:"function"==typeof e?e:w(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(Z)},clone:function(t){return this.select(t?J:Q)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}),a=o.length;if(arguments.length<2){var s=this.node().__on;if(s){for(var u,l=0,c=s.length;l<c;++l)for(r=0,u=s[l];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value}return}for(r=0,s=e?te:tt;r<a;++r)this.each(s(o[r],e,n));return this},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return tn(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return tn(this,t,e)}})(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};let tu={passive:!1},tl={capture:!0,passive:!1};function tc(t){t.stopImmediatePropagation()}function th(t){t.preventDefault(),t.stopImmediatePropagation()}function tf(t){var e=t.document.documentElement,n=ta(t).on("dragstart.drag",th,tl);"onselectstart"in e?n.on("selectstart.drag",th,tl):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function td(t,e){var n=t.document.documentElement,r=ta(t).on("dragstart.drag",null);e&&(r.on("click.drag",th,tl),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}let tp=t=>()=>t;function ty(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}function tg(t){return!t.ctrlKey&&!t.button}function tm(){return this.parentNode}function tv(t,e){return null==e?{x:t.x,y:t.y}:e}function tx(){return navigator.maxTouchPoints||"ontouchstart"in this}function tw(t){return((t=Math.exp(t))+1/t)/2}ty.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};let tb=function t(e,n,r){function i(t,i){var o,a,s=t[0],u=t[1],l=t[2],c=i[0],h=i[1],f=i[2],d=c-s,p=h-u,y=d*d+p*p;if(y<1e-12)a=Math.log(f/l)/e,o=function(t){return[s+t*d,u+t*p,l*Math.exp(e*t*a)]};else{var g=Math.sqrt(y),m=(f*f-l*l+r*y)/(2*l*n*g),v=(f*f-l*l-r*y)/(2*f*n*g),x=Math.log(Math.sqrt(m*m+1)-m);a=(Math.log(Math.sqrt(v*v+1)-v)-x)/e,o=function(t){var r,i,o=t*a,c=tw(x),h=l/(n*g)*(c*(((r=Math.exp(2*(r=e*o+x)))-1)/(r+1))-((i=Math.exp(i=x))-1/i)/2);return[s+h*d,u+h*p,l*c/tw(e*o+x)]}}return o.duration=1e3*a*e/Math.SQRT2,o}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);var t_=n(87977);function tk(t,e,n){var r=new t_.M4;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}var tM=(0,v.A)("start","end","cancel","interrupt"),tA=[];function tE(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var l,c,h,f;if(1!==n.state)return s();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return tk(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(tk(function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(l=0,n.state=3,r=Array(h=n.tween.length),c=-1;l<h;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=f);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=(0,t_.O1)(function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)},0,n.time)}(t,n,{name:e,index:r,group:i,on:tM,tween:tA,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function tN(t,e){var n=tz(t,e);if(n.state>0)throw Error("too late; already scheduled");return n}function t$(t,e){var n=tz(t,e);if(n.state>3)throw Error("too late; already running");return n}function tz(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw Error("transition not found");return n}function tO(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o){if((n=o[i]).name!==e){a=!1;continue}r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]}a&&delete t.__transition}}function tS(t,e){return t*=1,e*=1,function(n){return t*(1-n)+e*n}}var tI=180/Math.PI,tT={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tP(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*tI,skewX:Math.atan(u)*tI,scaleX:a,scaleY:s}}function tL(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s,u,l,c,h=[],f=[];return o=t(o),a=t(a),!function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:tS(t,i)},{i:u-2,x:tS(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,h,f),s=o.rotate,u=a.rotate,s!==u?(s-u>180?u+=360:u-s>180&&(s+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:tS(s,u)})):u&&h.push(i(h)+"rotate("+u+r),l=o.skewX,c=a.skewX,l!==c?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:tS(l,c)}):c&&h.push(i(h)+"skewX("+c+r),!function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:tS(t,n)},{i:s-2,x:tS(e,r)})}else(1!==n||1!==r)&&o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,h,f),o=a=null,function(t){for(var e,n=-1,r=f.length;++n<r;)h[(e=f[n]).i]=e.x(t);return h.join("")}}}var tB=tL(function(t){let e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?tT:tP(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),tH=tL(function(t){return null==t?tT:(c||(c=document.createElementNS("http://www.w3.org/2000/svg","g")),c.setAttribute("transform",t),t=c.transform.baseVal.consolidate())?tP((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):tT},", ",")",")");function tR(t,e,n){var r=t._id;return t.each(function(){var t=t$(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return tz(t,r).value[e]}}function tC(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function tj(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function tD(){}var tq="\\s*([+-]?\\d+)\\s*",tV="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tX="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tU=/^#([0-9a-f]{3,8})$/,tF=RegExp(`^rgb\\(${tq},${tq},${tq}\\)$`),tY=RegExp(`^rgb\\(${tX},${tX},${tX}\\)$`),tG=RegExp(`^rgba\\(${tq},${tq},${tq},${tV}\\)$`),tW=RegExp(`^rgba\\(${tX},${tX},${tX},${tV}\\)$`),tK=RegExp(`^hsl\\(${tV},${tX},${tX}\\)$`),tZ=RegExp(`^hsla\\(${tV},${tX},${tX},${tV}\\)$`),tQ={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function tJ(){return this.rgb().formatHex()}function t0(){return this.rgb().formatRgb()}function t1(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=tU.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?t2(e):3===n?new t3(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?t5(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?t5(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=tF.exec(t))?new t3(e[1],e[2],e[3],1):(e=tY.exec(t))?new t3(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=tG.exec(t))?t5(e[1],e[2],e[3],e[4]):(e=tW.exec(t))?t5(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=tK.exec(t))?ee(e[1],e[2]/100,e[3]/100,1):(e=tZ.exec(t))?ee(e[1],e[2]/100,e[3]/100,e[4]):tQ.hasOwnProperty(t)?t2(tQ[t]):"transparent"===t?new t3(NaN,NaN,NaN,0):null}function t2(t){return new t3(t>>16&255,t>>8&255,255&t,1)}function t5(t,e,n,r){return r<=0&&(t=e=n=NaN),new t3(t,e,n,r)}function t4(t,e,n,r){var i;return 1==arguments.length?((i=t)instanceof tD||(i=t1(i)),i)?new t3((i=i.rgb()).r,i.g,i.b,i.opacity):new t3:new t3(t,e,n,null==r?1:r)}function t3(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function t8(){return`#${et(this.r)}${et(this.g)}${et(this.b)}`}function t7(){let t=t6(this.opacity);return`${1===t?"rgb(":"rgba("}${t9(this.r)}, ${t9(this.g)}, ${t9(this.b)}${1===t?")":`, ${t})`}`}function t6(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function t9(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function et(t){return((t=t9(t))<16?"0":"")+t.toString(16)}function ee(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new er(t,e,n,r)}function en(t){if(t instanceof er)return new er(t.h,t.s,t.l,t.opacity);if(t instanceof tD||(t=t1(t)),!t)return new er;if(t instanceof er)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+(n<r)*6:n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new er(a,s,u,t.opacity)}function er(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ei(t){return(t=(t||0)%360)<0?t+360:t}function eo(t){return Math.max(0,Math.min(1,t||0))}function ea(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function es(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}tC(tD,t1,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:tJ,formatHex:tJ,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return en(this).formatHsl()},formatRgb:t0,toString:t0}),tC(t3,t4,tj(tD,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new t3(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new t3(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new t3(t9(this.r),t9(this.g),t9(this.b),t6(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:t8,formatHex:t8,formatHex8:function(){return`#${et(this.r)}${et(this.g)}${et(this.b)}${et((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:t7,toString:t7})),tC(er,function(t,e,n,r){return 1==arguments.length?en(t):new er(t,e,n,null==r?1:r)},tj(tD,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new er(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new er(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new t3(ea(t>=240?t-240:t+120,i,r),ea(t,i,r),ea(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new er(ei(this.h),eo(this.s),eo(this.l),t6(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=t6(this.opacity);return`${1===t?"hsl(":"hsla("}${ei(this.h)}, ${100*eo(this.s)}%, ${100*eo(this.l)}%${1===t?")":`, ${t})`}`}}));let eu=t=>()=>t;function el(t,e){var n=e-t;return n?function(e){return t+e*n}:eu(isNaN(t)?e:t)}let ec=function t(e){var n,r=1==(n=+e)?el:function(t,e){var r,i,o;return e-t?(r=t,i=e,r=Math.pow(r,o=n),i=Math.pow(i,o)-r,o=1/o,function(t){return Math.pow(r+t*i,o)}):eu(isNaN(t)?e:t)};function i(t,e){var n=r((t=t4(t)).r,(e=t4(e)).r),i=r(t.g,e.g),o=r(t.b,e.b),a=el(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function eh(t){return function(e){var n,r,i=e.length,o=Array(i),a=Array(i),s=Array(i);for(n=0;n<i;++n)r=t4(e[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=t(o),a=t(a),s=t(s),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=s(t),r+""}}}eh(function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return es((n-r/e)*e,a,i,o,s)}}),eh(function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return es((n-r/e)*e,i,o,a,s)}});var ef=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ed=RegExp(ef.source,"g");function ep(t,e){var n,r,i,o,a,s=ef.lastIndex=ed.lastIndex=0,u=-1,l=[],c=[];for(t+="",e+="";(i=ef.exec(t))&&(o=ed.exec(e));)(a=o.index)>s&&(a=e.slice(s,a),l[u]?l[u]+=a:l[++u]=a),(i=i[0])===(o=o[0])?l[u]?l[u]+=o:l[++u]=o:(l[++u]=null,c.push({i:u,x:tS(i,o)})),s=ed.lastIndex;return s<e.length&&(a=e.slice(s),l[u]?l[u]+=a:l[++u]=a),l.length<2?c[0]?(n=c[0].x,function(t){return n(t)+""}):(r=e,function(){return r}):(e=c.length,function(t){for(var n,r=0;r<e;++r)l[(n=c[r]).i]=n.x(t);return l.join("")})}function ey(t,e){var n;return("number"==typeof e?tS:e instanceof t1?ec:(n=t1(e))?(e=n,ec):ep)(t,e)}var eg=to.prototype.constructor;function em(t){return function(){this.style.removeProperty(t)}}var ev=0;function ex(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}var ew=to.prototype;ex.prototype=(function(t){return to().transition(t)}).prototype={constructor:ex,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=w(t));for(var r=this._groups,i=r.length,o=Array(i),a=0;a<i;++a)for(var s,u,l=r[a],c=l.length,h=o[a]=Array(c),f=0;f<c;++f)(s=l[f])&&(u=t.call(s,s.__data__,f,l))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,tE(h[f],e,n,f,h,tz(s,n)));return new ex(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=_(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,l=r[s],c=l.length,h=0;h<c;++h)if(u=l[h]){for(var f,d=t.call(u,u.__data__,h,l),p=tz(u,n),y=0,g=d.length;y<g;++y)(f=d[y])&&tE(f,e,n,y,d,p);o.push(d),a.push(u)}return new ex(o,a,e,n)},selectChild:ew.selectChild,selectChildren:ew.selectChildren,filter:function(t){"function"!=typeof t&&(t=k(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new ex(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw Error();for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=Array(h),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new ex(a,this._parents,this._name,this._id)},selection:function(){return new eg(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=++ev,r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=tz(a,e);tE(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new ex(r,this._parents,t,n)},call:ew.call,nodes:ew.nodes,node:ew.node,size:ew.size,empty:ew.empty,each:ew.each,on:function(t,e){var n,r,i,o,a,s,u=this._id;return arguments.length<2?tz(this.node(),u).on.on(t):this.each((n=u,r=t,i=e,s=(r+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})?tN:t$,function(){var t=s(this,n),e=t.on;e!==o&&(a=(o=e).copy()).on(r,i),t.on=a}))},attr:function(t,e){var n=H(t),r="transform"===n?tH:ey;return this.attrTween(t,"function"==typeof e?(n.local?function(t,e,n){var r,i,o;return function(){var a,s,u=n(this);return null==u?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u))}}:function(t,e,n){var r,i,o;return function(){var a,s,u=n(this);return null==u?void this.removeAttribute(t):(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u))}})(n,r,tR(this,"attr."+t,e)):null==e?(n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(n):(n.local?function(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}:function(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}})(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw Error();var r=H(t);return this.tween(n,(r.local?function(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e){this.setAttributeNS(t.space,t.local,i.call(this,e))}),n}return i._value=e,i}:function(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e){this.setAttribute(t,i.call(this,e))}),n}return i._value=e,i})(r,e))},style:function(t,e,n){var r,i,o,a,s,u,l,c,h,f,d,p,y,g,m,v,x,w,b,_,k,M="transform"==(t+="")?tB:ey;return null==e?this.styleTween(t,(r=t,function(){var t=C(this,r),e=(this.style.removeProperty(r),C(this,r));return t===e?null:t===i&&e===o?a:a=M(i=t,o=e)})).on("end.style."+t,em(t)):"function"==typeof e?this.styleTween(t,(s=t,u=tR(this,"style."+t,e),function(){var t=C(this,s),e=u(this),n=e+"";return null==e&&(this.style.removeProperty(s),n=e=C(this,s)),t===n?null:t===l&&n===c?h:(c=n,h=M(l=t,e))})).each((f=this._id,x="end."+(v="style."+(d=t)),function(){var t=t$(this,f),e=t.on,n=null==t.value[v]?m||(m=em(d)):void 0;(e!==p||g!==n)&&(y=(p=e).copy()).on(x,g=n),t.on=y})):this.styleTween(t,(w=t,k=e+"",function(){var t=C(this,w);return t===k?null:t===b?_:_=M(b=t,e)}),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw Error();return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e){this.style.setProperty(t,o.call(this,e),n)}),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){var e,n;return this.tween("text","function"==typeof t?(e=tR(this,"text",t),function(){var t=e(this);this.textContent=null==t?"":t}):(n=null==t?"":t+"",function(){this.textContent=n}))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw Error();return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){this.textContent=r.call(this,t)}),e}return r._value=t,r}(t))},remove:function(){var t;return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=tz(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?function(t,e){var n,r;return function(){var i=t$(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}}i.tween=r}}:function(t,e,n){var r,i;if("function"!=typeof n)throw Error();return function(){var o=t$(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}})(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){tN(this,t).delay=+e.apply(this,arguments)}}:function(t,e){return e*=1,function(){tN(this,t).delay=e}})(e,t)):tz(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){t$(this,t).duration=+e.apply(this,arguments)}}:function(t,e){return e*=1,function(){t$(this,t).duration=e}})(e,t)):tz(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw Error();return function(){t$(this,t).ease=e}}(e,t)):tz(this.node(),e).ease},easeVarying:function(t){var e;if("function"!=typeof t)throw Error();return this.each((e=this._id,function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw Error();t$(this,e).ease=n}))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each(function(){var n=t$(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e}),0===i&&o()})},[Symbol.iterator]:ew[Symbol.iterator]};var eb={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};to.prototype.interrupt=function(t){return this.each(function(){tO(this,t)})},to.prototype.transition=function(t){var e,n;t instanceof ex?(e=t._id,t=t._name):(e=++ev,(n=eb).time=(0,t_.tB)(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&tE(a,t,e,l,s,n||function(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw Error(`transition ${e} not found`);return n}(a,e));return new ex(r,this._parents,t,e)};let e_=t=>()=>t;function ek(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function eM(t,e,n){this.k=t,this.x=e,this.y=n}eM.prototype={constructor:eM,scale:function(t){return 1===t?this:new eM(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new eM(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var eA=new eM(1,0,0);function eE(t){for(;!t.__zoom;)if(!(t=t.parentNode))return eA;return t.__zoom}function eN(t){t.stopImmediatePropagation()}function e$(t){t.preventDefault(),t.stopImmediatePropagation()}function ez(t){return(!t.ctrlKey||"wheel"===t.type)&&!t.button}function eO(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function eS(){return this.__zoom||eA}function eI(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function eT(){return navigator.maxTouchPoints||"ontouchstart"in this}function eP(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function eL(){var t,e,n,r=ez,i=eO,o=eP,a=eI,s=eT,u=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,h=tb,f=(0,v.A)("start","zoom","end"),d=0,p=10;function y(t){t.property("__zoom",eS).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",A).filter(s).on("touchstart.zoom",E).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",$).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(u[0],Math.min(u[1],e)))===t.k?t:new eM(e,t.x,t.y)}function m(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new eM(t.k,r,i)}function x(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function w(t,e,n,r){t.on("start.zoom",function(){b(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){b(this,arguments).event(r).end()}).tween("zoom",function(){var t=arguments,o=b(this,t).event(r),a=i.apply(this,t),s=null==n?x(a):"function"==typeof n?n.apply(this,t):n,u=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),l=this.__zoom,c="function"==typeof e?e.apply(this,t):e,f=h(l.invert(s).concat(u/l.k),c.invert(s).concat(u/c.k));return function(t){if(1===t)t=c;else{var e=f(t),n=u/e[2];t=new eM(n,s[0]-e[0]*n,s[1]-e[1]*n)}o.zoom(null,t)}})}function b(t,e,n){return!n&&t.__zooming||new _(t,e)}function _(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function k(t,...e){if(r.apply(this,arguments)){var n=b(this,e).event(t),i=this.__zoom,s=Math.max(u[0],Math.min(u[1],i.k*Math.pow(2,a.apply(this,arguments)))),c=ts(t);if(n.wheel)(n.mouse[0][0]!==c[0]||n.mouse[0][1]!==c[1])&&(n.mouse[1]=i.invert(n.mouse[0]=c)),clearTimeout(n.wheel);else{if(i.k===s)return;n.mouse=[c,i.invert(c)],tO(this),n.start()}e$(t),n.wheel=setTimeout(function(){n.wheel=null,n.end()},150),n.zoom("mouse",o(m(g(i,s),n.mouse[0],n.mouse[1]),n.extent,l))}}function M(t,...e){if(!n&&r.apply(this,arguments)){var i=t.currentTarget,a=b(this,e,!0).event(t),s=ta(t.view).on("mousemove.zoom",function(t){if(e$(t),!a.moved){var e=t.clientX-c,n=t.clientY-h;a.moved=e*e+n*n>d}a.event(t).zoom("mouse",o(m(a.that.__zoom,a.mouse[0]=ts(t,i),a.mouse[1]),a.extent,l))},!0).on("mouseup.zoom",function(t){s.on("mousemove.zoom mouseup.zoom",null),td(t.view,a.moved),e$(t),a.event(t).end()},!0),u=ts(t,i),c=t.clientX,h=t.clientY;tf(t.view),eN(t),a.mouse=[u,this.__zoom.invert(u)],tO(this),a.start()}}function A(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,a=ts(t.changedTouches?t.changedTouches[0]:t,this),s=n.invert(a),u=n.k*(t.shiftKey?.5:2),h=o(m(g(n,u),a,s),i.apply(this,e),l);e$(t),c>0?ta(this).transition().duration(c).call(w,h,a,t):ta(this).call(y.transform,h,a,t)}}function E(n,...i){if(r.apply(this,arguments)){var o,a,s,u,l=n.touches,c=l.length,h=b(this,i,n.changedTouches.length===c).event(n);for(eN(n),a=0;a<c;++a)u=[u=ts(s=l[a],this),this.__zoom.invert(u),s.identifier],h.touch0?h.touch1||h.touch0[2]===u[2]||(h.touch1=u,h.taps=0):(h.touch0=u,o=!0,h.taps=1+!!t);t&&(t=clearTimeout(t)),o&&(h.taps<2&&(e=u[0],t=setTimeout(function(){t=null},500)),tO(this),h.start())}}function N(t,...e){if(this.__zooming){var n,r,i,a,s=b(this,e).event(t),u=t.changedTouches,c=u.length;for(e$(t),n=0;n<c;++n)i=ts(r=u[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=i);if(r=s.that.__zoom,s.touch1){var h=s.touch0[0],f=s.touch0[1],d=s.touch1[0],p=s.touch1[1],y=(y=d[0]-h[0])*y+(y=d[1]-h[1])*y,v=(v=p[0]-f[0])*v+(v=p[1]-f[1])*v;r=g(r,Math.sqrt(y/v)),i=[(h[0]+d[0])/2,(h[1]+d[1])/2],a=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!s.touch0)return;i=s.touch0[0],a=s.touch0[1]}s.zoom("touch",o(m(r,i,a),s.extent,l))}}function $(t,...r){if(this.__zooming){var i,o,a=b(this,r).event(t),s=t.changedTouches,u=s.length;for(eN(t),n&&clearTimeout(n),n=setTimeout(function(){n=null},500),i=0;i<u;++i)o=s[i],a.touch0&&a.touch0[2]===o.identifier?delete a.touch0:a.touch1&&a.touch1[2]===o.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(o=ts(o,this),Math.hypot(e[0]-o[0],e[1]-o[1])<p)){var l=ta(this).on("dblclick.zoom");l&&l.apply(this,arguments)}}}return y.transform=function(t,e,n,r){var i=t.selection?t.selection():t;i.property("__zoom",eS),t!==i?w(t,e,n,r):i.interrupt().each(function(){b(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},y.scaleBy=function(t,e,n,r){y.scaleTo(t,function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n},n,r)},y.scaleTo=function(t,e,n,r){y.transform(t,function(){var t=i.apply(this,arguments),r=this.__zoom,a=null==n?x(t):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(a),u="function"==typeof e?e.apply(this,arguments):e;return o(m(g(r,u),a,s),t,l)},n,r)},y.translateBy=function(t,e,n,r){y.transform(t,function(){return o(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),i.apply(this,arguments),l)},null,r)},y.translateTo=function(t,e,n,r,a){y.transform(t,function(){var t=i.apply(this,arguments),a=this.__zoom,s=null==r?x(t):"function"==typeof r?r.apply(this,arguments):r;return o(eA.translate(s[0],s[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,l)},r,a)},_.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=ta(this.that).datum();f.call(t,this.that,new ek(t,{sourceEvent:this.sourceEvent,target:y,type:t,transform:this.that.__zoom,dispatch:f}),e)}},y.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:e_(+t),y):a},y.filter=function(t){return arguments.length?(r="function"==typeof t?t:e_(!!t),y):r},y.touchable=function(t){return arguments.length?(s="function"==typeof t?t:e_(!!t),y):s},y.extent=function(t){return arguments.length?(i="function"==typeof t?t:e_([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),y):i},y.scaleExtent=function(t){return arguments.length?(u[0]=+t[0],u[1]=+t[1],y):[u[0],u[1]]},y.translateExtent=function(t){return arguments.length?(l[0][0]=+t[0][0],l[1][0]=+t[1][0],l[0][1]=+t[0][1],l[1][1]=+t[1][1],y):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},y.constrain=function(t){return arguments.length?(o=t,y):o},y.duration=function(t){return arguments.length?(c=+t,y):c},y.interpolate=function(t){return arguments.length?(h=t,y):h},y.on=function(){var t=f.on.apply(f,arguments);return t===f?y:t},y.clickDistance=function(t){return arguments.length?(d=(t*=1)*t,y):Math.sqrt(d)},y.tapDistance=function(t){return arguments.length?(p=+t,y):p},y}function eB(t,e){var n,r,i=typeof e;return null==e||"boolean"===i?eu(e):("number"===i?tS:"string"===i?(r=t1(e))?(e=r,ec):ep:e instanceof t1?ec:e instanceof Date?function(t,e){var n=new Date;return t*=1,e*=1,function(r){return n.setTime(t*(1-r)+e*r),n}}:!ArrayBuffer.isView(n=e)||n instanceof DataView?Array.isArray(e)?function(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=Array(i),a=Array(r);for(n=0;n<i;++n)o[n]=eB(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?function(t,e){var n,r={},i={};for(n in(null===t||"object"!=typeof t)&&(t={}),(null===e||"object"!=typeof e)&&(e={}),e)n in t?r[n]=eB(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}:tS:function(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}})(t,e)}eE.prototype=eM.prototype;let eH={error001:(t="react")=>`Seems like you have not used zustand provider as an ancestor. Help: https://${t}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:e,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${t} handle id: "${"source"===t?n:r}", edge id: ${e}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:t=>`Edge with id "${t}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},eR=[[-1/0,-1/0],[1/0,1/0]],eC=["Enter"," ","Escape"],ej={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:t,x:e,y:n})=>`Moved selected node ${t}. New position, x: ${e}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};(r=h||(h={})).Strict="strict",r.Loose="loose",(i=f||(f={})).Free="free",i.Vertical="vertical",i.Horizontal="horizontal",(o=d||(d={})).Partial="partial",o.Full="full";let eD={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};(a=p||(p={})).Bezier="default",a.Straight="straight",a.Step="step",a.SmoothStep="smoothstep",a.SimpleBezier="simplebezier",(s=y||(y={})).Arrow="arrow",s.ArrowClosed="arrowclosed",(u=g||(g={})).Left="left",u.Top="top",u.Right="right",u.Bottom="bottom";let eq={[g.Left]:g.Right,[g.Right]:g.Left,[g.Top]:g.Bottom,[g.Bottom]:g.Top};function eV(t){return null===t?null:t?"valid":"invalid"}let eX=t=>"id"in t&&"source"in t&&"target"in t,eU=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),eF=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),eY=(t,e=[0,0])=>{let{width:n,height:r}=nf(t),i=t.origin??e,o=n*i[0],a=r*i[1];return{x:t.position.x-o,y:t.position.y-a}},eG=(t,e={nodeOrigin:[0,0]})=>0===t.length?{x:0,y:0,width:0,height:0}:e7(t.reduce((t,n)=>{let r="string"==typeof n,i=e.nodeLookup||r?void 0:n;return e.nodeLookup&&(i=r?e.nodeLookup.get(n):eF(n)?n:e.nodeLookup.get(n.id)),e3(t,i?e9(i,e.nodeOrigin):{x:0,y:0,x2:0,y2:0})},{x:1/0,y:1/0,x2:-1/0,y2:-1/0})),eW=(t,e={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return t.forEach(t=>{(void 0===e.filter||e.filter(t))&&(n=e3(n,e9(t)),r=!0)}),r?e7(n):{x:0,y:0,width:0,height:0}},eK=(t,e,[n,r,i]=[0,0,1],o=!1,a=!1)=>{let s={...na(e,[n,r,i]),width:e.width/i,height:e.height/i},u=[];for(let e of t.values()){let{measured:t,selectable:n=!0,hidden:r=!1}=e;if(a&&!n||r)continue;let i=t.width??e.width??e.initialWidth??null,l=t.height??e.height??e.initialHeight??null,c=ne(s,e6(e)),h=(i??0)*(l??0),f=o&&c>0;(!e.internals.handleBounds||f||c>=h||e.dragging)&&u.push(e)}return u};async function eZ({nodes:t,width:e,height:n,panZoom:r,minZoom:i,maxZoom:o},a){let s,u;if(0===t.size)return!0;let l=nl(eW((s=new Map,u=a?.nodes?new Set(a.nodes.map(t=>t.id)):null,t.forEach(t=>{t.measured.width&&t.measured.height&&(a?.includeHiddenNodes||!t.hidden)&&(!u||u.has(t.id))&&s.set(t.id,t)}),s)),e,n,a?.minZoom??i,a?.maxZoom??o,a?.padding??.1);return await r.setViewport(l,{duration:a?.duration,ease:a?.ease,interpolate:a?.interpolate}),!0}function eQ({nodeId:t,nextPosition:e,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:o}){let a=n.get(t),s=a.parentId?n.get(a.parentId):void 0,{x:u,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},c=a.origin??r,h=a.extent||i;if("parent"!==a.extent||a.expandParent)s&&nh(a.extent)&&(h=[[a.extent[0][0]+u,a.extent[0][1]+l],[a.extent[1][0]+u,a.extent[1][1]+l]]);else if(s){let t=s.measured.width,e=s.measured.height;t&&e&&(h=[[u,l],[u+t,l+e]])}else o?.("005",eH.error005());let f=nh(h)?e1(e,h,a.measured):e;return(void 0===a.measured.width||void 0===a.measured.height)&&o?.("015",eH.error015()),{position:{x:f.x-u+(a.measured.width??0)*c[0],y:f.y-l+(a.measured.height??0)*c[1]},positionAbsolute:f}}async function eJ({nodesToRemove:t=[],edgesToRemove:e=[],nodes:n,edges:r,onBeforeDelete:i}){let o,a=new Set(t.map(t=>t.id)),s=[];for(let t of n){if(!1===t.deletable)continue;let e=a.has(t.id),n=!e&&t.parentId&&s.find(e=>e.id===t.parentId);(e||n)&&s.push(t)}let u=new Set(e.map(t=>t.id)),l=r.filter(t=>!1!==t.deletable),c=(o=new Set,s.forEach(t=>{o.add(t.id)}),l.filter(t=>o.has(t.source)||o.has(t.target)));for(let t of l)u.has(t.id)&&!c.find(e=>e.id===t.id)&&c.push(t);if(!i)return{edges:c,nodes:s};let h=await i({nodes:s,edges:c});return"boolean"==typeof h?h?{edges:c,nodes:s}:{edges:[],nodes:[]}:h}let e0=(t,e=0,n=1)=>Math.min(Math.max(t,e),n),e1=(t={x:0,y:0},e,n)=>({x:e0(t.x,e[0][0],e[1][0]-(n?.width??0)),y:e0(t.y,e[0][1],e[1][1]-(n?.height??0))});function e2(t,e,n){let{width:r,height:i}=nf(n),{x:o,y:a}=n.internals.positionAbsolute;return e1(t,[[o,a],[o+r,a+i]],e)}let e5=(t,e,n)=>t<e?e0(Math.abs(t-e),1,e)/e:t>n?-e0(Math.abs(t-n),1,e)/e:0,e4=(t,e,n=15,r=40)=>[e5(t.x,r,e.width-r)*n,e5(t.y,r,e.height-r)*n],e3=(t,e)=>({x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x2,e.x2),y2:Math.max(t.y2,e.y2)}),e8=({x:t,y:e,width:n,height:r})=>({x:t,y:e,x2:t+n,y2:e+r}),e7=({x:t,y:e,x2:n,y2:r})=>({x:t,y:e,width:n-t,height:r-e}),e6=(t,e=[0,0])=>{let{x:n,y:r}=eF(t)?t.internals.positionAbsolute:eY(t,e);return{x:n,y:r,width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}},e9=(t,e=[0,0])=>{let{x:n,y:r}=eF(t)?t.internals.positionAbsolute:eY(t,e);return{x:n,y:r,x2:n+(t.measured?.width??t.width??t.initialWidth??0),y2:r+(t.measured?.height??t.height??t.initialHeight??0)}},nt=(t,e)=>e7(e3(e8(t),e8(e))),ne=(t,e)=>Math.ceil(Math.max(0,Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x))*Math.max(0,Math.min(t.y+t.height,e.y+e.height)-Math.max(t.y,e.y))),nn=t=>nr(t.width)&&nr(t.height)&&nr(t.x)&&nr(t.y),nr=t=>!isNaN(t)&&isFinite(t),ni=(t,e)=>(t,e)=>{},no=(t,e=[1,1])=>({x:e[0]*Math.round(t.x/e[0]),y:e[1]*Math.round(t.y/e[1])}),na=({x:t,y:e},[n,r,i],o=!1,a=[1,1])=>{let s={x:(t-n)/i,y:(e-r)/i};return o?no(s,a):s},ns=({x:t,y:e},[n,r,i])=>({x:t*i+n,y:e*i+r});function nu(t,e){if("number"==typeof t)return Math.floor((e-e/(1+t))*.5);if("string"==typeof t&&t.endsWith("px")){let e=parseFloat(t);if(!Number.isNaN(e))return Math.floor(e)}if("string"==typeof t&&t.endsWith("%")){let n=parseFloat(t);if(!Number.isNaN(n))return Math.floor(e*n*.01)}return console.error(`The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}let nl=(t,e,n,r,i,o)=>{let a=function(t,e,n){if("string"==typeof t||"number"==typeof t){let r=nu(t,n),i=nu(t,e);return{top:r,right:i,bottom:r,left:i,x:2*i,y:2*r}}if("object"==typeof t){let r=nu(t.top??t.y??0,n),i=nu(t.bottom??t.y??0,n),o=nu(t.left??t.x??0,e),a=nu(t.right??t.x??0,e);return{top:r,right:a,bottom:i,left:o,x:o+a,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}(o,e,n),s=e0(Math.min((e-a.x)/t.width,(n-a.y)/t.height),r,i),u=t.x+t.width/2,l=t.y+t.height/2,c=e/2-u*s,h=n/2-l*s,f=function(t,e,n,r,i,o){let{x:a,y:s}=ns(t,[e,n,r]),{x:u,y:l}=ns({x:t.x+t.width,y:t.y+t.height},[e,n,r]);return{left:Math.floor(a),top:Math.floor(s),right:Math.floor(i-u),bottom:Math.floor(o-l)}}(t,c,h,s,e,n),d={left:Math.min(f.left-a.left,0),top:Math.min(f.top-a.top,0),right:Math.min(f.right-a.right,0),bottom:Math.min(f.bottom-a.bottom,0)};return{x:c-d.left+d.right,y:h-d.top+d.bottom,zoom:s}},nc=()=>"u">typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0;function nh(t){return null!=t&&"parent"!==t}function nf(t){return{width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}}function nd(t){return(t.measured?.width??t.width??t.initialWidth)!==void 0&&(t.measured?.height??t.height??t.initialHeight)!==void 0}function np(t,e={width:0,height:0},n,r,i){let o={...t},a=r.get(n);if(a){let t=a.origin||i;o.x+=a.internals.positionAbsolute.x-(e.width??0)*t[0],o.y+=a.internals.positionAbsolute.y-(e.height??0)*t[1]}return o}function ny(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function ng(){let t,e;return{promise:new Promise((n,r)=>{t=n,e=r}),resolve:t,reject:e}}function nm(t){return{...ej,...t||{}}}function nv(t,{snapGrid:e=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:o,y:a}=nM(t),s=na({x:o-(i?.left??0),y:a-(i?.top??0)},r),{x:u,y:l}=n?no(s,e):s;return{xSnapped:u,ySnapped:l,...s}}let nx=t=>({width:t.offsetWidth,height:t.offsetHeight}),nw=t=>t?.getRootNode?.()||window?.document,nb=["INPUT","SELECT","TEXTAREA"];function n_(t){let e=t.composedPath?.()?.[0]||t.target;return e?.nodeType===1&&(nb.includes(e.nodeName)||e.hasAttribute("contenteditable")||!!e.closest(".nokey"))}let nk=t=>"clientX"in t,nM=(t,e)=>{let n=nk(t),r=n?t.clientX:t.touches?.[0].clientX,i=n?t.clientY:t.touches?.[0].clientY;return{x:r-(e?.left??0),y:i-(e?.top??0)}},nA=(t,e,n,r,i)=>{let o=e.querySelectorAll(`.${t}`);return o&&o.length?Array.from(o).map(e=>{let o=e.getBoundingClientRect();return{id:e.getAttribute("data-handleid"),type:t,nodeId:i,position:e.getAttribute("data-handlepos"),x:(o.left-n.left)/r,y:(o.top-n.top)/r,...nx(e)}}):null};function nE({sourceX:t,sourceY:e,targetX:n,targetY:r,sourceControlX:i,sourceControlY:o,targetControlX:a,targetControlY:s}){let u=.125*t+.375*i+.375*a+.125*n,l=.125*e+.375*o+.375*s+.125*r,c=Math.abs(u-t),h=Math.abs(l-e);return[u,l,c,h]}function nN(t,e){return t>=0?.5*t:25*e*Math.sqrt(-t)}function n$({pos:t,x1:e,y1:n,x2:r,y2:i,c:o}){switch(t){case g.Left:return[e-nN(e-r,o),n];case g.Right:return[e+nN(r-e,o),n];case g.Top:return[e,n-nN(n-i,o)];case g.Bottom:return[e,n+nN(i-n,o)]}}function nz({sourceX:t,sourceY:e,sourcePosition:n=g.Bottom,targetX:r,targetY:i,targetPosition:o=g.Top,curvature:a=.25}){let[s,u]=n$({pos:n,x1:t,y1:e,x2:r,y2:i,c:a}),[l,c]=n$({pos:o,x1:r,y1:i,x2:t,y2:e,c:a}),[h,f,d,p]=nE({sourceX:t,sourceY:e,targetX:r,targetY:i,sourceControlX:s,sourceControlY:u,targetControlX:l,targetControlY:c});return[`M${t},${e} C${s},${u} ${l},${c} ${r},${i}`,h,f,d,p]}function nO({sourceX:t,sourceY:e,targetX:n,targetY:r}){let i=Math.abs(n-t)/2,o=Math.abs(r-e)/2;return[n<t?n+i:n-i,r<e?r+o:r-o,i,o]}function nS({sourceNode:t,targetNode:e,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:o="basic"}){if("manual"===o)return r;let a=Math.max(t.parentId||i&&t.selected?t.internals.z:0,e.parentId||i&&e.selected?e.internals.z:0);return(i&&n?r+1e3:r)+a}function nI({sourceNode:t,targetNode:e,width:n,height:r,transform:i}){let o=e3(e9(t),e9(e));return o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1),ne({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},e7(o))>0}let nT=({source:t,sourceHandle:e,target:n,targetHandle:r})=>`xy-edge__${t}${e||""}-${n}${r||""}`,nP=(t,e,n={})=>{let r,i;if(!t.source||!t.target)return n.onError?.("006",eH.error006()),e;let o=n.getEdgeId||nT;return(i=r=eX(t)?{...t}:{...t,id:o(t)},e.some(t=>t.source===i.source&&t.target===i.target&&(t.sourceHandle===i.sourceHandle||!t.sourceHandle&&!i.sourceHandle)&&(t.targetHandle===i.targetHandle||!t.targetHandle&&!i.targetHandle)))?e:(null===r.sourceHandle&&delete r.sourceHandle,null===r.targetHandle&&delete r.targetHandle,e.concat(r))};function nL({sourceX:t,sourceY:e,targetX:n,targetY:r}){let[i,o,a,s]=nO({sourceX:t,sourceY:e,targetX:n,targetY:r});return[`M ${t},${e}L ${n},${r}`,i,o,a,s]}let nB={[g.Left]:{x:-1,y:0},[g.Right]:{x:1,y:0},[g.Top]:{x:0,y:-1},[g.Bottom]:{x:0,y:1}},nH=({source:t,sourcePosition:e=g.Bottom,target:n})=>e===g.Left||e===g.Right?t.x<n.x?{x:1,y:0}:{x:-1,y:0}:t.y<n.y?{x:0,y:1}:{x:0,y:-1},nR=(t,e)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2));function nC({sourceX:t,sourceY:e,sourcePosition:n=g.Bottom,targetX:r,targetY:i,targetPosition:o=g.Top,borderRadius:a=5,centerX:s,centerY:u,offset:l=20,stepPosition:c=.5}){let[h,f,d,p,y]=function({source:t,sourcePosition:e=g.Bottom,target:n,targetPosition:r=g.Top,center:i,offset:o,stepPosition:a}){let s,u,l=nB[e],c=nB[r],h={x:t.x+l.x*o,y:t.y+l.y*o},f={x:n.x+c.x*o,y:n.y+c.y*o},d=nH({source:h,sourcePosition:e,target:f}),p=0!==d.x?"x":"y",y=d[p],m=[],v={x:0,y:0},x={x:0,y:0},[,,w,b]=nO({sourceX:t.x,sourceY:t.y,targetX:n.x,targetY:n.y});if(l[p]*c[p]==-1){"x"===p?(s=i.x??h.x+(f.x-h.x)*a,u=i.y??(h.y+f.y)/2):(s=i.x??(h.x+f.x)/2,u=i.y??h.y+(f.y-h.y)*a);let t=[{x:s,y:h.y},{x:s,y:f.y}],e=[{x:h.x,y:u},{x:f.x,y:u}];m=l[p]===y?"x"===p?t:e:"x"===p?e:t}else{let i=[{x:h.x,y:f.y}],a=[{x:f.x,y:h.y}];if(m="x"===p?l.x===y?a:i:l.y===y?i:a,e===r){let e=Math.abs(t[p]-n[p]);if(e<=o){let r=Math.min(o-1,o-e);l[p]===y?v[p]=(h[p]>t[p]?-1:1)*r:x[p]=(f[p]>n[p]?-1:1)*r}}if(e!==r){let t="x"===p?"y":"x",e=l[p]===c[t],n=h[t]>f[t],r=h[t]<f[t];(1===l[p]&&(!e&&n||e&&r)||1!==l[p]&&(!e&&r||e&&n))&&(m="x"===p?i:a)}let d={x:h.x+v.x,y:h.y+v.y},g={x:f.x+x.x,y:f.y+x.y};Math.max(Math.abs(d.x-m[0].x),Math.abs(g.x-m[0].x))>=Math.max(Math.abs(d.y-m[0].y),Math.abs(g.y-m[0].y))?(s=(d.x+g.x)/2,u=m[0].y):(s=m[0].x,u=(d.y+g.y)/2)}let _={x:h.x+v.x,y:h.y+v.y},k={x:f.x+x.x,y:f.y+x.y};return[[t,..._.x!==m[0].x||_.y!==m[0].y?[_]:[],...m,...k.x!==m[m.length-1].x||k.y!==m[m.length-1].y?[k]:[],n],s,u,w,b]}({source:{x:t,y:e},sourcePosition:n,target:{x:r,y:i},targetPosition:o,center:{x:s,y:u},offset:l,stepPosition:c}),m=`M${h[0].x} ${h[0].y}`;for(let t=1;t<h.length-1;t++)m+=function(t,e,n,r){let i=Math.min(nR(t,e)/2,nR(e,n)/2,r),{x:o,y:a}=e;if(t.x===o&&o===n.x||t.y===a&&a===n.y)return`L${o} ${a}`;if(t.y===a){let e=t.x<n.x?-1:1,r=t.y<n.y?1:-1;return`L ${o+i*e},${a}Q ${o},${a} ${o},${a+i*r}`}let s=t.x<n.x?1:-1,u=t.y<n.y?-1:1;return`L ${o},${a+i*u}Q ${o},${a} ${o+i*s},${a}`}(h[t-1],h[t],h[t+1],a);return[m+=`L${h[h.length-1].x} ${h[h.length-1].y}`,f,d,p,y]}function nj(t){return t&&!!(t.internals.handleBounds||t.handles?.length)&&!!(t.measured.width||t.width||t.initialWidth)}function nD(t){let{sourceNode:e,targetNode:n}=t;if(!nj(e)||!nj(n))return null;let r=e.internals.handleBounds||nq(e.handles),i=n.internals.handleBounds||nq(n.handles),o=nX(r?.source??[],t.sourceHandle),a=nX(t.connectionMode===h.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),t.targetHandle);if(!o||!a)return t.onError?.("008",eH.error008(!o?"source":"target",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;let s=o?.position||g.Bottom,u=a?.position||g.Top,l=nV(e,o,s),c=nV(n,a,u);return{sourceX:l.x,sourceY:l.y,targetX:c.x,targetY:c.y,sourcePosition:s,targetPosition:u}}function nq(t){if(!t)return null;let e=[],n=[];for(let r of t)r.width=r.width??1,r.height=r.height??1,"source"===r.type?e.push(r):"target"===r.type&&n.push(r);return{source:e,target:n}}function nV(t,e,n=g.Left,r=!1){let i=(e?.x??0)+t.internals.positionAbsolute.x,o=(e?.y??0)+t.internals.positionAbsolute.y,{width:a,height:s}=e??nf(t);if(r)return{x:i+a/2,y:o+s/2};switch(e?.position??n){case g.Top:return{x:i+a/2,y:o};case g.Right:return{x:i+a,y:o+s/2};case g.Bottom:return{x:i+a/2,y:o+s};case g.Left:return{x:i,y:o+s/2}}}function nX(t,e){return t&&(e?t.find(t=>t.id===e):t[0])||null}function nU(t,e){if(!t)return"";if("string"==typeof t)return t;let n=e?`${e}__`:"";return`${n}${Object.keys(t).sort().map(e=>`${e}=${t[e]}`).join("&")}`}function nF(t,{id:e,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let o=new Set;return t.reduce((t,a)=>([a.markerStart||r,a.markerEnd||i].forEach(r=>{if(r&&"object"==typeof r){let i=nU(r,e);o.has(i)||(t.push({id:i,color:r.color||n,...r}),o.add(i))}}),t),[]).sort((t,e)=>t.id.localeCompare(e.id))}let nY={nodeOrigin:[0,0],nodeExtent:eR,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},nG={...nY,checkEquality:!0};function nW(t,e){let n={...t};for(let t in e)void 0!==e[t]&&(n[t]=e[t]);return n}function nK(t,e,n){let r=nW(nY,n);for(let n of t.values())if(n.parentId)nJ(n,t,e,r);else{let t=e1(eY(n,r.nodeOrigin),nh(n.extent)?n.extent:r.nodeExtent,nf(n));n.internals.positionAbsolute=t}}function nZ(t){return"manual"===t}function nQ(t,e,n,r={}){let i=nW(nG,r),o={i:0},a=new Map(e),s=i?.elevateNodesOnSelect&&!nZ(i.zIndexMode)?1e3:0,u=t.length>0,l=!1;for(let c of(e.clear(),n.clear(),t)){let t=a.get(c.id);if(i.checkEquality&&c===t?.internals.userNode)e.set(c.id,t);else{let n=e1(eY(c,i.nodeOrigin),nh(c.extent)?c.extent:i.nodeExtent,nf(c));t={...i.defaults,...c,measured:{width:c.measured?.width,height:c.measured?.height},internals:{positionAbsolute:n,handleBounds:function(t,e){if(!t.handles)return t.measured?e?.internals.handleBounds:void 0;let n=[],r=[];for(let e of t.handles){let i={id:e.id,width:e.width??1,height:e.height??1,nodeId:t.id,x:e.x,y:e.y,position:e.position,type:e.type};"source"===e.type?n.push(i):"target"===e.type&&r.push(i)}return{source:n,target:r}}(c,t),z:n0(c,s,i.zIndexMode),userNode:c}},e.set(c.id,t)}void 0!==t.measured&&void 0!==t.measured.width&&void 0!==t.measured.height||t.hidden||(u=!1),c.parentId&&nJ(t,e,n,r,o),l||=c.selected??!1}return{nodesInitialized:u,hasSelectedNodes:l}}function nJ(t,e,n,r,i){let{elevateNodesOnSelect:o,nodeOrigin:a,nodeExtent:s,zIndexMode:u}=nW(nY,r),l=t.parentId,c=e.get(l);if(!c)return void console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);!function(t,e){if(!t.parentId)return;let n=e.get(t.parentId);n?n.set(t.id,t):e.set(t.parentId,new Map([[t.id,t]]))}(t,n),i&&!c.parentId&&void 0===c.internals.rootParentIndex&&"auto"===u&&(c.internals.rootParentIndex=++i.i,c.internals.z=c.internals.z+10*i.i),i&&void 0!==c.internals.rootParentIndex&&(i.i=c.internals.rootParentIndex);let{x:h,y:f,z:d}=function(t,e,n,r,i,o){let{x:a,y:s}=e.internals.positionAbsolute,u=nf(t),l=eY(t,n),c=nh(t.extent)?e1(l,t.extent,u):l,h=e1({x:a+c.x,y:s+c.y},r,u);"parent"===t.extent&&(h=e2(h,u,e));let f=n0(t,i,o),d=e.internals.z??0;return{x:h.x,y:h.y,z:d>=f?d+1:f}}(t,c,a,s,o&&!nZ(u)?1e3:0,u),{positionAbsolute:p}=t.internals,y=h!==p.x||f!==p.y;(y||d!==t.internals.z)&&e.set(t.id,{...t,internals:{...t.internals,positionAbsolute:y?{x:h,y:f}:p,z:d}})}function n0(t,e,n){let r=nr(t.zIndex)?t.zIndex:0;return nZ(n)?r:r+(t.selected?e:0)}function n1(t,e,n,r=[0,0]){let i=[],o=new Map;for(let n of t){let t=e.get(n.parentId);if(!t)continue;let r=nt(o.get(n.parentId)?.expandedRect??e6(t),n.rect);o.set(n.parentId,{expandedRect:r,parent:t})}return o.size>0&&o.forEach(({expandedRect:e,parent:o},a)=>{let s=o.internals.positionAbsolute,u=nf(o),l=o.origin??r,c=e.x<s.x?Math.round(Math.abs(s.x-e.x)):0,h=e.y<s.y?Math.round(Math.abs(s.y-e.y)):0,f=Math.max(u.width,Math.round(e.width)),d=Math.max(u.height,Math.round(e.height)),p=(f-u.width)*l[0],y=(d-u.height)*l[1];(c>0||h>0||p||y)&&(i.push({id:a,type:"position",position:{x:o.position.x-c+p,y:o.position.y-h+y}}),n.get(a)?.forEach(e=>{t.some(t=>t.id===e.id)||i.push({id:e.id,type:"position",position:{x:e.position.x+c,y:e.position.y+h}})})),(u.width<e.width||u.height<e.height||c||h)&&i.push({id:a,type:"dimensions",setAttributes:!0,dimensions:{width:f+(c?l[0]*c-p:0),height:d+(h?l[1]*h-y:0)}})}),i}function n2(t,e,n,r,i,o,a){let s=r?.querySelector(".xyflow__viewport"),u=!1;if(!s)return{changes:[],updatedInternals:u};let l=[],c=window.getComputedStyle(s),{m22:h}=new window.DOMMatrixReadOnly(c.transform),f=[];for(let r of t.values()){let t=e.get(r.id);if(!t)continue;if(t.hidden){e.set(t.id,{...t,internals:{...t.internals,handleBounds:void 0}}),u=!0;continue}let s=nx(r.nodeElement),c=t.measured.width!==s.width||t.measured.height!==s.height;if(s.width&&s.height&&(c||!t.internals.handleBounds||r.force)){let d=r.nodeElement.getBoundingClientRect(),p=nh(t.extent)?t.extent:o,{positionAbsolute:y}=t.internals;t.parentId&&"parent"===t.extent?y=e2(y,s,e.get(t.parentId)):p&&(y=e1(y,p,s));let g={...t,measured:s,internals:{...t.internals,positionAbsolute:y,handleBounds:{source:nA("source",r.nodeElement,d,h,t.id),target:nA("target",r.nodeElement,d,h,t.id)}}};e.set(t.id,g),t.parentId&&nJ(g,e,n,{nodeOrigin:i,zIndexMode:a}),u=!0,c&&(l.push({id:t.id,type:"dimensions",dimensions:s}),t.expandParent&&t.parentId&&f.push({id:t.id,parentId:t.parentId,rect:e6(g,i)}))}}if(f.length>0){let t=n1(f,e,n,i);l.push(...t)}return{changes:l,updatedInternals:u}}async function n5({delta:t,panZoom:e,transform:n,translateExtent:r,width:i,height:o}){if(!e||!t.x&&!t.y)return!1;let a=await e.setViewportConstrained({x:n[0]+t.x,y:n[1]+t.y,zoom:n[2]},[[0,0],[i,o]],r);return!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2])}function n4(t,e,n,r,i,o){let a=i,s=r.get(a)||new Map;r.set(a,s.set(n,e)),a=`${i}-${t}`;let u=r.get(a)||new Map;if(r.set(a,u.set(n,e)),o){a=`${i}-${t}-${o}`;let s=r.get(a)||new Map;r.set(a,s.set(n,e))}}function n3(t,e,n){for(let r of(t.clear(),e.clear(),n)){let{source:n,target:i,sourceHandle:o=null,targetHandle:a=null}=r,s={edgeId:r.id,source:n,target:i,sourceHandle:o,targetHandle:a},u=`${n}-${o}--${i}-${a}`;n4("source",s,`${i}-${a}--${n}-${o}`,t,n,o),n4("target",s,u,t,i,a),e.set(r.id,r)}}function n8(t,e,n){let r=t;do{if(r?.matches?.(e))return!0;if(r===n)break;r=r?.parentElement}while(r);return!1}function n7({nodeId:t,dragItems:e,nodeLookup:n,dragging:r=!0}){let i=[];for(let[t,o]of e){let e=n.get(t)?.internals.userNode;e&&i.push({...e,position:o.position,dragging:r})}if(!t)return[i[0],i];let o=n.get(t)?.internals.userNode;return[o?{...o,position:e.get(t)?.position||o.position,dragging:r}:i[0],i]}function n6({onNodeMouseDown:t,getStoreItems:e,onDragStart:n,onDrag:r,onDragStop:i}){let o={x:null,y:null},a=0,s=new Map,u=!1,l={x:0,y:0},c=null,h=!1,f=null,d=!1,p=!1,y=null;return{update:function({noDragClassName:g,handleSelector:m,domNode:x,isSelectable:w,nodeId:b,nodeClickDistance:_=0}){function k({x:t,y:n}){let{nodeLookup:i,nodeExtent:a,snapGrid:u,snapToGrid:l,nodeOrigin:c,onNodeDrag:h,onSelectionDrag:f,onError:d,updateNodePositions:g}=e();o={x:t,y:n};let m=!1,v=s.size>1,x=v&&a?e8(eW(s)):null,w=v&&l?function({dragItems:t,snapGrid:e,x:n,y:r}){let i=t.values().next().value;if(!i)return null;let o={x:n-i.distance.x,y:r-i.distance.y},a=no(o,e);return{x:a.x-o.x,y:a.y-o.y}}({dragItems:s,snapGrid:u,x:t,y:n}):null;for(let[e,r]of s){if(!i.has(e))continue;let o={x:t-r.distance.x,y:n-r.distance.y};l&&(o=w?{x:Math.round(o.x+w.x),y:Math.round(o.y+w.y)}:no(o,u));let s=null;if(v&&a&&!r.extent&&x){let{positionAbsolute:t}=r.internals,e=t.x-x.x+a[0][0],n=t.x+r.measured.width-x.x2+a[1][0];s=[[e,t.y-x.y+a[0][1]],[n,t.y+r.measured.height-x.y2+a[1][1]]]}let{position:h,positionAbsolute:f}=eQ({nodeId:e,nextPosition:o,nodeLookup:i,nodeExtent:s||a,nodeOrigin:c,onError:d});m=m||r.position.x!==h.x||r.position.y!==h.y,r.position=h,r.internals.positionAbsolute=f}if(p=p||m,m&&(g(s,!0),y&&(r||h||!b&&f))){let[t,e]=n7({nodeId:b,dragItems:s,nodeLookup:i});r?.(y,s,t,e),h?.(y,t,e),b||f?.(y,e)}}async function M(){if(!c)return;let{transform:t,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:i}=e();if(!i){u=!1,cancelAnimationFrame(a);return}let[s,h]=e4(l,c,r);(0!==s||0!==h)&&(o.x=(o.x??0)-s/t[2],o.y=(o.y??0)-h/t[2],await n({x:s,y:h})&&k(o)),a=requestAnimationFrame(M)}function A(r){let{nodeLookup:i,multiSelectionActive:a,nodesDraggable:u,transform:l,snapGrid:f,snapToGrid:d,selectNodesOnDrag:p,onNodeDragStart:y,onSelectionDragStart:g,unselectNodesAndEdges:m}=e();h=!0,p&&w||a||!b||i.get(b)?.selected||m(),w&&p&&b&&t?.(b);let v=nv(r.sourceEvent,{transform:l,snapGrid:f,snapToGrid:d,containerBounds:c});if(o=v,(s=function(t,e,n,r){let i=new Map;for(let[o,a]of t)if((a.selected||a.id===r)&&(!a.parentId||!function t(e,n){if(!e.parentId)return!1;let r=n.get(e.parentId);return!!r&&(!!r.selected||t(r,n))}(a,t))&&(a.draggable||e&&void 0===a.draggable)){let e=t.get(o);e&&i.set(o,{id:o,position:e.position||{x:0,y:0},distance:{x:n.x-e.internals.positionAbsolute.x,y:n.y-e.internals.positionAbsolute.y},extent:e.extent,parentId:e.parentId,origin:e.origin,expandParent:e.expandParent,internals:{positionAbsolute:e.internals.positionAbsolute||{x:0,y:0}},measured:{width:e.measured.width??0,height:e.measured.height??0}})}return i}(i,u,v,b)).size>0&&(n||y||!b&&g)){let[t,e]=n7({nodeId:b,dragItems:s,nodeLookup:i});n?.(r.sourceEvent,s,t,e),y?.(r.sourceEvent,t,e),b||g?.(r.sourceEvent,e)}}f=ta(x);let E=(function(){var t,e,n,r,i=tg,o=tm,a=tv,s=tx,u={},l=(0,v.A)("start","drag","end"),c=0,h=0;function f(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",g).on("touchmove.drag",m,tu).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(a,s){if(!r&&i.call(this,a,s)){var u=w(this,o.call(this,a,s),a,s,"mouse");u&&(ta(a.view).on("mousemove.drag",p,tl).on("mouseup.drag",y,tl),tf(a.view),tc(a),n=!1,t=a.clientX,e=a.clientY,u("start",a))}}function p(r){if(th(r),!n){var i=r.clientX-t,o=r.clientY-e;n=i*i+o*o>h}u.mouse("drag",r)}function y(t){ta(t.view).on("mousemove.drag mouseup.drag",null),td(t.view,n),th(t),u.mouse("end",t)}function g(t,e){if(i.call(this,t,e)){var n,r,a=t.changedTouches,s=o.call(this,t,e),u=a.length;for(n=0;n<u;++n)(r=w(this,s,t,e,a[n].identifier,a[n]))&&(tc(t),r("start",t,a[n]))}}function m(t){var e,n,r=t.changedTouches,i=r.length;for(e=0;e<i;++e)(n=u[r[e].identifier])&&(th(t),n("drag",t,r[e]))}function x(t){var e,n,i=t.changedTouches,o=i.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),e=0;e<o;++e)(n=u[i[e].identifier])&&(tc(t),n("end",t,i[e]))}function w(t,e,n,r,i,o){var s,h,d,p=l.copy(),y=ts(o||n,e);if(null!=(d=a.call(t,new ty("beforestart",{sourceEvent:n,target:f,identifier:i,active:c,x:y[0],y:y[1],dx:0,dy:0,dispatch:p}),r)))return s=d.x-y[0]||0,h=d.y-y[1]||0,function n(o,a,l){var g,m=y;switch(o){case"start":u[i]=n,g=c++;break;case"end":delete u[i],--c;case"drag":y=ts(l||a,e),g=c}p.call(o,t,new ty(o,{sourceEvent:a,subject:d,target:f,identifier:i,active:g,x:y[0]+s,y:y[1]+h,dx:y[0]-m[0],dy:y[1]-m[1],dispatch:p}),r)}}return f.filter=function(t){return arguments.length?(i="function"==typeof t?t:tp(!!t),f):i},f.container=function(t){return arguments.length?(o="function"==typeof t?t:tp(t),f):o},f.subject=function(t){return arguments.length?(a="function"==typeof t?t:tp(t),f):a},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:tp(!!t),f):s},f.on=function(){var t=l.on.apply(l,arguments);return t===l?f:t},f.clickDistance=function(t){return arguments.length?(h=(t*=1)*t,f):Math.sqrt(h)},f})().clickDistance(_).on("start",t=>{let{domNode:n,nodeDragThreshold:r,transform:i,snapGrid:a,snapToGrid:s}=e();c=n?.getBoundingClientRect()||null,d=!1,p=!1,y=t.sourceEvent,0===r&&A(t),o=nv(t.sourceEvent,{transform:i,snapGrid:a,snapToGrid:s,containerBounds:c}),l=nM(t.sourceEvent,c)}).on("drag",t=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:a,nodeDragThreshold:f,nodeLookup:p}=e(),g=nv(t.sourceEvent,{transform:r,snapGrid:i,snapToGrid:a,containerBounds:c});if(y=t.sourceEvent,("touchmove"===t.sourceEvent.type&&t.sourceEvent.touches.length>1||b&&!p.has(b))&&(d=!0),!d){if(!u&&n&&h&&(u=!0,M()),!h){let e=nM(t.sourceEvent,c),n=e.x-l.x,r=e.y-l.y;Math.sqrt(n*n+r*r)>f&&A(t)}(o.x!==g.xSnapped||o.y!==g.ySnapped)&&s&&h&&(l=nM(t.sourceEvent,c),k(g))}}).on("end",t=>{if(!h||d){d&&s.size>0&&e().updateNodePositions(s,!1);return}if(u=!1,h=!1,cancelAnimationFrame(a),s.size>0){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:o,onSelectionDragStop:a}=e();if(p&&(r(s,!1),p=!1),i||o||!b&&a){let[e,r]=n7({nodeId:b,dragItems:s,nodeLookup:n,dragging:!1});i?.(t.sourceEvent,s,e,r),o?.(t.sourceEvent,e,r),b||a?.(t.sourceEvent,r)}}}).filter(t=>{let e=t.target;return!t.button&&(!g||!n8(e,`.${g}`,x))&&(!m||n8(e,m,x))});f.call(E)},destroy:function(){f?.on(".drag",null)}}}function n9(t,e,n,r,i,o=!1){let a=r.get(t);if(!a)return null;let s="strict"===i?a.internals.handleBounds?.[e]:[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]],u=(n?s?.find(t=>t.id===n):s?.[0])??null;return u&&o?{...u,...nV(a,u,u.position,!0)}:u}function rt(t,e){return t?t:e?.classList.contains("target")?"target":e?.classList.contains("source")?"source":null}let re=()=>!0;function rn(t,{handle:e,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:o,doc:a,lib:s,flowId:u,isValidConnection:l=re,nodeLookup:c}){let f="target"===o,d=e?a.querySelector(`.${s}-flow__handle[data-id="${u}-${e?.nodeId}-${e?.id}-${e?.type}"]`):null,{x:p,y}=nM(t),g=a.elementFromPoint(p,y),m=g?.classList.contains(`${s}-flow__handle`)?g:d,v={handleDomNode:m,isValid:!1,connection:null,toHandle:null};if(m){let t=rt(void 0,m),e=m.getAttribute("data-nodeid"),o=m.getAttribute("data-handleid"),a=m.classList.contains("connectable"),s=m.classList.contains("connectableend");if(!e||!t)return v;let u={source:f?e:r,sourceHandle:f?o:i,target:f?r:e,targetHandle:f?i:o};v.connection=u,v.isValid=a&&s&&(n===h.Strict?f&&"source"===t||!f&&"target"===t:e!==r||o!==i)&&l(u),v.toHandle=n9(e,t,o,c,n,!0)}return v}let rr={onPointerDown:function(t,{connectionMode:e,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:o,isTarget:a,domNode:s,nodeLookup:u,lib:l,autoPanOnConnect:c,flowId:h,panBy:f,cancelConnection:d,onConnectStart:p,onConnect:y,onConnectEnd:m,isValidConnection:v=re,onReconnectEnd:x,updateConnection:w,getTransform:b,getFromHandle:_,autoPanSpeed:k,dragThreshold:M=1,handleDomNode:A}){let E,N=nw(t.target),$=0,{x:z,y:O}=nM(t),S=rt(o,A),I=s?.getBoundingClientRect(),T=!1;if(!I||!S)return;let P=n9(i,S,r,u,e);if(!P)return;let L=nM(t,I),B=!1,H=null,R=!1,C=null,j={...P,nodeId:i,type:S,position:P.position},D=u.get(i),q={inProgress:!0,isValid:null,from:nV(D,j,g.Left,!0),fromHandle:j,fromPosition:j.position,fromNode:D,to:L,toHandle:null,toPosition:eq[j.position],toNode:null,pointer:L};function V(){T=!0,w(q),p?.(t,{nodeId:i,handleId:r,handleType:S})}function X(t){var o,s;let d;if(!T){let{x:e,y:n}=nM(t),r=e-z,i=n-O;if(!(r*r+i*i>M*M))return;V()}if(!_()||!j)return void U(t);let p=b();E=function(t,e,n,r){let i=[],o=1/0;for(let a of function(t,e,n){let r=[],i={x:t.x-n,y:t.y-n,width:2*n,height:2*n};for(let t of e.values())ne(i,e6(t))>0&&r.push(t);return r}(t,n,e+250))for(let n of[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]]){if(r.nodeId===n.nodeId&&r.type===n.type&&r.id===n.id)continue;let{x:s,y:u}=nV(a,n,n.position,!0),l=Math.sqrt(Math.pow(s-t.x,2)+Math.pow(u-t.y,2));l>e||(l<o?(i=[{...n,x:s,y:u}],o=l):l===o&&i.push({...n,x:s,y:u}))}if(!i.length)return null;if(i.length>1){let t="source"===r.type?"target":"source";return i.find(e=>e.type===t)??i[0]}return i[0]}(na(L=nM(t,I),p,!1,[1,1]),n,u,j),B||(!function t(){if(!c||!I)return;let[e,n]=e4(L,I,k);f({x:e,y:n}),$=requestAnimationFrame(t)}(),B=!0);let y=rn(t,{handle:E,connectionMode:e,fromNodeId:i,fromHandleId:r,fromType:a?"target":"source",isValidConnection:v,doc:N,lib:l,flowId:h,nodeLookup:u});C=y.handleDomNode,H=y.connection,o=!!E,s=y.isValid,d=null,s?d=!0:o&&!s&&(d=!1),R=d;let m=u.get(i),x=m?nV(m,j,g.Left,!0):q.from,A={...q,from:x,isValid:R,to:y.toHandle&&R?ns({x:y.toHandle.x,y:y.toHandle.y},p):L,toHandle:y.toHandle,toPosition:R&&y.toHandle?y.toHandle.position:eq[j.position],toNode:y.toHandle?u.get(y.toHandle.nodeId):null,pointer:L};w(A),q=A}function U(t){if(!("touches"in t)||!(t.touches.length>0)){if(T){(E||C)&&H&&R&&y?.(H);let{inProgress:e,...n}=q,r={...n,toPosition:q.toHandle?q.toPosition:null};m?.(t,r),o&&x?.(t,r)}d(),cancelAnimationFrame($),B=!1,R=!1,H=null,C=null,N.removeEventListener("mousemove",X),N.removeEventListener("mouseup",U),N.removeEventListener("touchmove",X),N.removeEventListener("touchend",U)}}0===M&&V(),N.addEventListener("mousemove",X),N.addEventListener("mouseup",U),N.addEventListener("touchmove",X),N.addEventListener("touchend",U)},isValid:rn};function ri({domNode:t,panZoom:e,getTransform:n,getViewScale:r}){let i=ta(t);return{update:function({translateExtent:t,width:o,height:a,zoomStep:s=1,pannable:u=!0,zoomable:l=!0,inversePan:c=!1}){let h=[0,0],f=eL().on("start",t=>{("mousedown"===t.sourceEvent.type||"touchstart"===t.sourceEvent.type)&&(h=[t.sourceEvent.clientX??t.sourceEvent.touches[0].clientX,t.sourceEvent.clientY??t.sourceEvent.touches[0].clientY])}).on("zoom",u?i=>{let s=n();if("mousemove"!==i.sourceEvent.type&&"touchmove"!==i.sourceEvent.type||!e)return;let u=[i.sourceEvent.clientX??i.sourceEvent.touches[0].clientX,i.sourceEvent.clientY??i.sourceEvent.touches[0].clientY],l=[u[0]-h[0],u[1]-h[1]];h=u;let f=r()*Math.max(s[2],Math.log(s[2]))*(c?-1:1),d={x:s[0]-l[0]*f,y:s[1]-l[1]*f};e.setViewportConstrained({x:d.x,y:d.y,zoom:s[2]},[[0,0],[o,a]],t)}:null).on("zoom.wheel",l?t=>{if("wheel"!==t.sourceEvent.type||!e)return;let r=n(),i=t.sourceEvent.ctrlKey&&nc()?10:1,o=-t.sourceEvent.deltaY*(1===t.sourceEvent.deltaMode?.05:t.sourceEvent.deltaMode?1:.002)*s,a=r[2]*Math.pow(2,o*i);e.scaleTo(a)}:null);i.call(f,{})},destroy:function(){i.on("zoom",null)},pointer:ts}}let ro=t=>({x:t.x,y:t.y,zoom:t.k}),ra=({x:t,y:e,zoom:n})=>eA.translate(t,e).scale(n),rs=(t,e)=>t.target.closest(`.${e}`),ru=(t,e)=>2===e&&Array.isArray(t)&&t.includes(2),rl=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,rc=(t,e=0,n=rl,r=()=>{})=>{let i="number"==typeof e&&e>0;return i||r(),i?t.transition().duration(e).ease(n).on("end",r):t},rh=t=>{let e=t.ctrlKey&&nc()?10:1;return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*e};function rf({domNode:t,minZoom:e,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:o,onPanZoomStart:a,onPanZoomEnd:s,onDraggingChange:u}){let l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=t.getBoundingClientRect(),h=eL().scaleExtent([e,n]).translateExtent(r),d=ta(t).call(h);v({x:i.x,y:i.y,zoom:e0(i.zoom,e,n)},[[0,0],[c.width,c.height]],r);let p=d.on("wheel.zoom"),y=d.on("dblclick.zoom");async function g(t,e){return!!d&&new Promise(n=>{h?.interpolate(e?.interpolate==="linear"?eB:tb).transform(rc(d,e?.duration,e?.ease,()=>n(!0)),t)})}function m(){h.on("zoom",null)}async function v(t,e,n){let r=ra(t),i=h?.constrain()(r,e,n);return i&&await g(i),i}return h.wheelDelta(rh),{update:function({noWheelClassName:t,noPanClassName:e,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:c,panOnScrollMode:g,panOnScrollSpeed:v,preventScrolling:x,zoomOnPinch:w,zoomOnScroll:b,zoomOnDoubleClick:_,zoomActivationKeyPressed:k,lib:M,onTransformChange:A,connectionInProgress:E,paneClickDistance:N,selectionOnDrag:$}){r&&!l.isZoomingOrPanning&&m();let z=i&&!k&&!r;h.clickDistance($?1/0:!nr(N)||N<0?0:N);let O=z?function({zoomPanValues:t,noWheelClassName:e,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:o,zoomOnPinch:a,onPanZoomStart:s,onPanZoom:u,onPanZoomEnd:l}){return c=>{if(rs(c,e))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();let h=n.property("__zoom").k||1;if(c.ctrlKey&&a){let t=ts(c),e=h*Math.pow(2,rh(c));r.scaleTo(n,e,t,c);return}let d=1===c.deltaMode?20:1,p=i===f.Vertical?0:c.deltaX*d,y=i===f.Horizontal?0:c.deltaY*d;!nc()&&c.shiftKey&&i!==f.Vertical&&(p=c.deltaY*d,y=0),r.translateBy(n,-(p/h)*o,-(y/h)*o,{internal:!0});let g=ro(n.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(u?.(c,g),t.panScrollTimeout=setTimeout(()=>{l?.(c,g),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,s?.(c,g))}}({zoomPanValues:l,noWheelClassName:t,d3Selection:d,d3Zoom:h,panOnScrollMode:g,panOnScrollSpeed:v,zoomOnPinch:w,onPanZoomStart:a,onPanZoom:o,onPanZoomEnd:s}):function({noWheelClassName:t,preventScrolling:e,d3ZoomHandler:n}){return function(r,i){let o="wheel"===r.type,a=!e&&o&&!r.ctrlKey,s=rs(r,t);if(r.ctrlKey&&o&&s&&r.preventDefault(),a||s)return null;r.preventDefault(),n.call(this,r,i)}}({noWheelClassName:t,preventScrolling:x,d3ZoomHandler:p});d.on("wheel.zoom",O,{passive:!1});let S=function({zoomPanValues:t,onDraggingChange:e,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=ro(r.transform);t.mouseButton=r.sourceEvent?.button||0,t.isZoomingOrPanning=!0,t.prevViewport=i,r.sourceEvent?.type==="mousedown"&&e(!0),n&&n?.(r.sourceEvent,i)}}({zoomPanValues:l,onDraggingChange:u,onPanZoomStart:a});h.on("start",S);let I=function({zoomPanValues:t,panOnDrag:e,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return o=>{t.usedRightMouseButton=!!(n&&ru(e,t.mouseButton??0)),o.sourceEvent?.sync||r([o.transform.x,o.transform.y,o.transform.k]),i&&!o.sourceEvent?.internal&&i?.(o.sourceEvent,ro(o.transform))}}({zoomPanValues:l,panOnDrag:c,onPaneContextMenu:!!n,onPanZoom:o,onTransformChange:A});h.on("zoom",I);let T=function({zoomPanValues:t,panOnDrag:e,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:o}){return a=>{if(!a.sourceEvent?.internal&&(t.isZoomingOrPanning=!1,o&&ru(e,t.mouseButton??0)&&!t.usedRightMouseButton&&a.sourceEvent&&o(a.sourceEvent),t.usedRightMouseButton=!1,r(!1),i)){let e=ro(a.transform);t.prevViewport=e,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{i?.(a.sourceEvent,e)},150*!!n)}}}({zoomPanValues:l,panOnDrag:c,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:u});h.on("end",T);let P=function({zoomActivationKeyPressed:t,zoomOnScroll:e,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:o,userSelectionActive:a,noWheelClassName:s,noPanClassName:u,lib:l,connectionInProgress:c}){return h=>{let f=t||e,d=n&&h.ctrlKey,p="wheel"===h.type;if(1===h.button&&"mousedown"===h.type&&(rs(h,`${l}-flow__node`)||rs(h,`${l}-flow__edge`)))return!0;if(!r&&!f&&!i&&!o&&!n||a||c&&!p||rs(h,s)&&p||rs(h,u)&&(!p||i&&p&&!t)||!n&&h.ctrlKey&&p)return!1;if(!n&&"touchstart"===h.type&&h.touches?.length>1)return h.preventDefault(),!1;if(!f&&!i&&!d&&p||!r&&("mousedown"===h.type||"touchstart"===h.type)||Array.isArray(r)&&!r.includes(h.button)&&"mousedown"===h.type)return!1;let y=Array.isArray(r)&&r.includes(h.button)||!h.button||h.button<=1;return(!h.ctrlKey||p)&&y}}({zoomActivationKeyPressed:k,panOnDrag:c,zoomOnScroll:b,panOnScroll:i,zoomOnDoubleClick:_,zoomOnPinch:w,userSelectionActive:r,noPanClassName:e,noWheelClassName:t,lib:M,connectionInProgress:E});h.filter(P),_?d.on("dblclick.zoom",y):d.on("dblclick.zoom",null)},destroy:m,setViewport:async function t(t,e){let n=ra(t);return await g(n,e),n},setViewportConstrained:v,getViewport:function(){let t=d?eE(d.node()):{x:0,y:0,k:1};return{x:t.x,y:t.y,zoom:t.k}},scaleTo:async function t(t,e){return!!d&&new Promise(n=>{h?.interpolate(e?.interpolate==="linear"?eB:tb).scaleTo(rc(d,e?.duration,e?.ease,()=>n(!0)),t)})},scaleBy:async function t(t,e){return!!d&&new Promise(n=>{h?.interpolate(e?.interpolate==="linear"?eB:tb).scaleBy(rc(d,e?.duration,e?.ease,()=>n(!0)),t)})},setScaleExtent:function(t){h?.scaleExtent(t)},setTranslateExtent:function(t){h?.translateExtent(t)},syncViewport:function(t){if(d){let e=ra(t),n=d.property("__zoom");(n.k!==t.zoom||n.x!==t.x||n.y!==t.y)&&h?.transform(d,e,null,{sync:!0})}},setClickDistance:function(t){let e=!nr(t)||t<0?0:t;h?.clickDistance(e)}}}(l=m||(m={})).Line="line",l.Handle="handle"},8962:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]])},9005:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9339:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={callServer:function(){return o.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var i in r)Object.defineProperty(e,i,{enumerable:!0,get:r[i]});let o=n(77304),a=n(4060),s=n(77197)},15330:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]])},15480:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]])},17112:(t,e,n)=>{"use strict";n.d(e,{D:()=>a});var r=n(12115),i=n(63699),o=n(94257);function a(t){let e=r.useContext(i.Ts)?"drawer":"dialog";return(0,o.G)(t,e)}},17356:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},17494:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]])},22200:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},25640:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("map-pinned",[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]])},32133:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("message-square-plus",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]])},32521:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r={value:()=>{}};function i(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw Error("illegal type: "+t);r[t]=[]}return new o(r)}function o(t){this._=t}function a(t,e,n){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=r,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}o.prototype=i.prototype={constructor:o,on:function(t,e){var n,r=this._,i=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:e}}),o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((n=(t=i[o]).type)&&(n=function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(r[n],t.name)))return n;return}if(null!=e&&"function"!=typeof e)throw Error("invalid callback: "+e);for(;++o<s;)if(n=(t=i[o]).type)r[n]=a(r[n],t.name,e);else if(null==e)for(n in r)r[n]=a(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new o(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(r=this._[t],o=0,n=r.length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};let s=i},34306:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},40638:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("message-circle-question-mark",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},45486:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("panel-right",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]])},50916:(t,e,n)=>{"use strict";n.d(e,{h:()=>h,n:()=>l});var r=n(12115),i=n(94577);let o=t=>{let e,n=new Set,r=(t,r)=>{let i="function"==typeof t?t(e):t;if(!Object.is(i,e)){let t=e;e=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},e,i),n.forEach(n=>n(e,t))}},i=()=>e,o={setState:r,getState:i,getInitialState:()=>a,subscribe:t=>(n.add(t),()=>n.delete(t)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=e=t(r,i,o);return o},{useDebugValue:a}=r,{useSyncExternalStoreWithSelector:s}=i,u=t=>t;function l(t,e=u,n){let r=s(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return a(r),r}let c=(t,e)=>{let n=t?o(t):o,r=(t,r=e)=>l(n,t,r);return Object.assign(r,n),r},h=(t,e)=>t?c(t,e):c},51128:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},53255:()=>{},60976:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("redo-2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]])},61388:(t,e,n)=>{"use strict";n.d(e,{b:()=>p});var r=n(12115),i=n.t(r,2);function o(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}n(47650);var a=n(95155),s=Symbol.for("react.lazy"),u=i[" use ".trim().toString()];function l(t){var e;return null!=t&&"object"==typeof t&&"$$typeof"in t&&t.$$typeof===s&&"_payload"in t&&"object"==typeof(e=t._payload)&&null!==e&&"then"in e}var c=Symbol("radix.slottable");function h(t){return r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===c}var f=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,e)=>{var n,i;let s,c,f,d=(i=n=`Primitive.${e}`,(s=r.forwardRef((t,e)=>{let{children:n,...i}=t;if(l(n)&&"function"==typeof u&&(n=u(n._payload)),r.isValidElement(n)){var a;let t,s,u=(a=n,(s=(t=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?a.ref:(s=(t=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?a.props.ref:a.props.ref||a.ref),l=function(t,e){let n={...e};for(let r in e){let i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...t)=>{let e=o(...t);return i(...t),e}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}(i,n.props);return n.type!==r.Fragment&&(l.ref=e?function(...t){return e=>{let n=!1,r=t.map(t=>{let r=o(t,e);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let e=0;e<r.length;e++){let n=r[e];"function"==typeof n?n():o(t[e],null)}}}}(e,u):u),r.cloneElement(n,l)}return r.Children.count(n)>1?r.Children.only(null):null})).displayName=`${i}.SlotClone`,c=s,(f=r.forwardRef((t,e)=>{let{children:n,...i}=t;l(n)&&"function"==typeof u&&(n=u(n._payload));let o=r.Children.toArray(n),s=o.find(h);if(s){let t=s.props.children,n=o.map(e=>e!==s?e:r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null);return(0,a.jsx)(c,{...i,ref:e,children:r.isValidElement(t)?r.cloneElement(t,void 0,n):null})}return(0,a.jsx)(c,{...i,ref:e,children:n})})).displayName=`${n}.Slot`,f),p=r.forwardRef((t,n)=>{let{asChild:r,...i}=t;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.jsx)(r?d:e,{...i,ref:n})});return p.displayName=`Primitive.${e}`,{...t,[e]:p}},{}),d=r.forwardRef((t,e)=>(0,a.jsx)(f.label,{...t,ref:e,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));d.displayName="Label";var p=d},65377:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},65408:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]])},68319:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]])},69684:(t,e,n)=>{"use strict";n.d(e,{A:()=>function t(e){if("string"==typeof e||"number"==typeof e)return""+e;let n="";if(Array.isArray(e))for(let r=0,i;r<e.length;r++)""!==(i=t(e[r]))&&(n+=(n&&" ")+i);else for(let t in e)e[t]&&(n+=(n&&" ")+t);return n}})},70299:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]])},80846:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]])},81499:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]])},83599:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]])},84824:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("flask-conical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]])},85618:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]])},86272:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},87977:(t,e,n)=>{"use strict";n.d(e,{M4:()=>y,O1:()=>g,tB:()=>d});var r,i,o=0,a=0,s=0,u=0,l=0,c=0,h="object"==typeof performance&&performance.now?performance:Date,f="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function d(){return l||(f(p),l=h.now()+c)}function p(){l=0}function y(){this._call=this._time=this._next=null}function g(t,e,n){var r=new y;return r.restart(t,e,n),r}function m(){l=(u=h.now())+c,o=a=0;try{d(),++o;for(var t,e=r;e;)(t=l-e._time)>=0&&e._call.call(void 0,t),e=e._next;--o}finally{o=0,function(){for(var t,e,n=r,o=1/0;n;)n._call?(o>n._time&&(o=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:r=e);i=t,x(o)}(),l=0}}function v(){var t=h.now(),e=t-u;e>1e3&&(c-=e,u=t)}function x(t){!o&&(a&&(a=clearTimeout(a)),t-l>24?(t<1/0&&(a=setTimeout(m,t-h.now()-c)),s&&(s=clearInterval(s))):(s||(u=h.now(),s=setInterval(v,1e3)),o=1,f(m)))}y.prototype=g.prototype={constructor:y,restart:function(t,e,n){if("function"!=typeof t)throw TypeError("callback is not a function");n=(null==n?d():+n)+(null==e?0:+e),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=n,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}}},94192:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});let r=(0,n(30772).A)("folder-tree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]])},98112:(t,e,n)=>{"use strict";let r;n.d(e,{sX:()=>K});let i=BigInt(0x100000000-1),o=BigInt(32);function a(t,e=""){if("number"!=typeof t){let n=e&&`"${e}" `;throw TypeError(`${n}expected number, got ${typeof t}`)}if(!Number.isSafeInteger(t)||t<0){let n=e&&`"${e}" `;throw RangeError(`${n}expected integer >= 0, got ${t}`)}}function s(t,e,n=""){let r=t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name&&"BYTES_PER_ELEMENT"in t&&1===t.BYTES_PER_ELEMENT,i=t?.length,o=void 0!==e;if(!r||o&&i!==e){let a=(n&&`"${n}" `)+"expected Uint8Array"+(o?` of length ${e}`:"")+", got "+(r?`length=${i}`:`type=${typeof t}`);if(!r)throw TypeError(a);throw RangeError(a)}return t}function u(t,e=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(e&&t.finished)throw Error("Hash#digest() has already been called")}function l(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}let c=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0]?t=>t:function(t){for(let n=0;n<t.length;n++){var e;t[n]=(e=t[n])<<24&0xff000000|e<<8&0xff0000|e>>>8&65280|e>>>24&255}return t},h=BigInt(0),f=BigInt(1),d=BigInt(2),p=BigInt(7),y=BigInt(256),g=BigInt(113),m=[],v=[],x=[];for(let t=0,e=f,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],m.push(2*(5*r+n)),v.push((t+1)*(t+2)/2%64);let i=h;for(let t=0;t<7;t++)(e=(e<<f^(e>>p)*g)%y)&d&&(i^=f<<(f<<BigInt(t))-f);x.push(i)}let w=function(t,e=!1){let n=t.length,r=new Uint32Array(n),a=new Uint32Array(n);for(let s=0;s<n;s++){let{h:n,l:u}=function(t,e=!1){return e?{h:Number(t&i),l:Number(t>>o&i)}:{h:0|Number(t>>o&i),l:0|Number(t&i)}}(t[s],e);[r[s],a[s]]=[n,u]}return[r,a]}(x,!0),b=w[0],_=w[1],k=(t,e,n)=>n>32?e<<n-32|t>>>64-n:t<<n|e>>>32-n,M=(t,e,n)=>n>32?t<<n-32|e>>>64-n:e<<n|t>>>32-n;class A{state;pos=0;posOut=0;finished=!1;state32;destroyed=!1;blockLen;suffix;outputLen;canXOF;enableXOF=!1;rounds;constructor(t,e,n,r=!1,i=24){if(this.blockLen=t,this.suffix=e,this.outputLen=n,this.enableXOF=r,this.canXOF=r,this.rounds=i,a(n,"outputLen"),!(0<t&&t<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=function(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}(this.state)}clone(){return this._cloneInto()}keccak(){c(this.state32),function(t,e=24){if(a(e,"rounds"),e<1||e>24)throw Error('"rounds" expected integer 1..24');let n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let e=0;e<10;e++)n[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){let r=(e+8)%10,i=(e+2)%10,o=n[i],a=n[i+1],s=k(o,a,1)^n[r],u=M(o,a,1)^n[r+1];for(let n=0;n<50;n+=10)t[e+n]^=s,t[e+n+1]^=u}let e=t[2],i=t[3];for(let n=0;n<24;n++){let r=v[n],o=k(e,i,r),a=M(e,i,r),s=m[n];e=t[s],i=t[s+1],t[s]=o,t[s+1]=a}for(let e=0;e<50;e+=10){let n=t[e],r=t[e+1],i=t[e+2],o=t[e+3];t[e]^=~t[e+2]&t[e+4],t[e+1]^=~t[e+3]&t[e+5],t[e+2]^=~t[e+4]&t[e+6],t[e+3]^=~t[e+5]&t[e+7],t[e+4]^=~t[e+6]&t[e+8],t[e+5]^=~t[e+7]&t[e+9],t[e+6]^=~t[e+8]&n,t[e+7]^=~t[e+9]&r,t[e+8]^=~n&i,t[e+9]^=~r&o}t[0]^=b[r],t[1]^=_[r]}l(n)}(this.state32,this.rounds),c(this.state32),this.posOut=0,this.pos=0}update(t){u(this),s(t);let{blockLen:e,state:n}=this,r=t.length;for(let i=0;i<r;){let o=Math.min(e-this.pos,r-i);for(let e=0;e<o;e++)n[this.pos++]^=t[i++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:e,pos:n,blockLen:r}=this;t[n]^=e,(128&e)!=0&&n===r-1&&this.keccak(),t[r-1]^=128,this.keccak()}writeInto(t){u(this,!1),s(t),this.finish();let e=this.state,{blockLen:n}=this;for(let r=0,i=t.length;r<i;){this.posOut>=n&&this.keccak();let o=Math.min(n-this.posOut,i-r);t.set(e.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return t}xofInto(t){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return a(t),this.xofInto(new Uint8Array(t))}digestInto(t){s(t,void 0,"digestInto() output");let e=this.outputLen;if(t.length<e)throw RangeError('"digestInto() output" expected to be of length >='+e);if(this.finished)throw Error("digest() was already called");this.writeInto(t.subarray(0,this.outputLen)),this.destroy()}digest(){let t=new Uint8Array(this.outputLen);return this.digestInto(t),t}destroy(){this.destroyed=!0,l(this.state)}_cloneInto(t){let{blockLen:e,suffix:n,outputLen:r,rounds:i,enableXOF:o}=this;return(t||=new A(e,n,r,o,i)).blockLen=e,t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=n,t.outputLen=r,t.enableXOF=o,t.canXOF=this.canXOF,t.destroyed=this.destroyed,t}}let E=((t,e,n,r={})=>(function(t,e={}){let n=(e,n)=>t(n).update(e).digest(),r=t(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=e=>t(e),Object.assign(n,e),Object.freeze(n)})(()=>new A(e,t,n),r))(6,72,64,{oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,10])});var N,$=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,z=Math.ceil,O=Math.floor,S="[BigNumber Error] ",I=S+"Number primitive has more than 15 significant digits: ",T=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function P(t){var e=0|t;return t>0||t===e?e:e-1}function L(t){for(var e,n,r=1,i=t.length,o=t[0]+"";r<i;){for(n=14-(e=t[r++]+"").length;n--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function B(t,e){var n,r,i=t.c,o=e.c,a=t.s,s=e.s,u=t.e,l=e.e;if(!a||!s)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-s:a;if(a!=s)return a;if(n=a<0,r=u==l,!i||!o)return r?0:!i^n?1:-1;if(!r)return u>l^n?1:-1;for(a=0,s=(u=i.length)<(l=o.length)?u:l;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^n?1:-1;return u==l?0:u>l^n?1:-1}function H(t,e,n,r){if(t<e||t>n||t!==O(t))throw Error(S+(r||"Argument")+("number"==typeof t?t<e||t>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function R(t){var e=t.c.length-1;return P(t.e/14)==e&&t.c[e]%2!=0}function C(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function j(t,e,n){var r,i;if(e<0){for(i=n+".";++e;i+=n);t=i+t}else if(r=t.length,++e>r){for(i=n,e-=r;--e;i+=n);t+=i}else e<r&&(t=t.slice(0,e)+"."+t.slice(e));return t}var D=function t(e){var n,r,i,o,a,s,u,l,c,h=A.prototype={constructor:A,toString:null,valueOf:null},f=new A(1),d=20,p=4,y=-7,g=21,m=-1e7,v=1e7,x=!1,w=1,b=0,_={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},k="0123456789abcdefghijklmnopqrstuvwxyz",M=!0;function A(t,e){var n,r,i,o,a,s,u,h,f=this;if(!(f instanceof A))return new A(t,e);if(null==e){if(t&&!0===t._isBigNumber){f.s=t.s,!t.c||t.e>v?f.c=f.e=null:t.e<m?f.c=[f.e=0]:(f.e=t.e,f.c=t.c.slice());return}if((s="number"==typeof t)&&0*t==0){if(f.s=1/t<0?(t=-t,-1):1,t===~~t){for(o=0,a=t;a>=10;a/=10,o++);o>v?f.c=f.e=null:(f.e=o,f.c=[t]);return}h=String(t)}else{if(!$.test(h=String(t)))return c(f,h,s);f.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(o=h.indexOf("."))>-1&&(h=h.replace(".","")),(a=h.search(/e/i))>0?(o<0&&(o=a),o+=+h.slice(a+1),h=h.substring(0,a)):o<0&&(o=h.length)}else{if(H(e,2,k.length,"Base"),10==e&&M)return q(f=new A(t),d+f.e+1,p);if(h=String(t),s="number"==typeof t){if(0*t!=0)return c(f,h,s,e);if(f.s=1/t<0?(h=h.slice(1),-1):1,A.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throw Error(I+t)}else f.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(n=k.slice(0,e),o=a=0,u=h.length;a<u;a++)if(0>n.indexOf(r=h.charAt(a))){if("."==r){if(a>o){o=u;continue}}else if(!i&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){i=!0,a=-1,o=0;continue}return c(f,String(t),s,e)}s=!1,(o=(h=l(h,e,10,f.s)).indexOf("."))>-1?h=h.replace(".",""):o=h.length}for(a=0;48===h.charCodeAt(a);a++);for(u=h.length;48===h.charCodeAt(--u););if(h=h.slice(a,++u)){if(u-=a,s&&A.DEBUG&&u>15&&(t>0x1fffffffffffff||t!==O(t)))throw Error(I+f.s*t);if((o=o-a-1)>v)f.c=f.e=null;else if(o<m)f.c=[f.e=0];else{if(f.e=o,f.c=[],a=(o+1)%14,o<0&&(a+=14),a<u){for(a&&f.c.push(+h.slice(0,a)),u-=14;a<u;)f.c.push(+h.slice(a,a+=14));a=14-(h=h.slice(a)).length}else a-=u;for(;a--;h+="0");f.c.push(+h)}}else f.c=[f.e=0]}function E(t,e,n,r){var i,o,a,s,u;if(null==n?n=p:H(n,0,8),!t.c)return t.toString();if(i=t.c[0],a=t.e,null==e)u=L(t.c),u=1==r||2==r&&(a<=y||a>=g)?C(u,a):j(u,a,"0");else if(o=(t=q(new A(t),e,n)).e,s=(u=L(t.c)).length,1==r||2==r&&(e<=o||o<=y)){for(;s<e;u+="0",s++);u=C(u,o)}else if(e-=a+(2===r&&o>a),u=j(u,o,"0"),o+1>s){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-s)>0)for(o+1==s&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function N(t,e){for(var n,r,i=1,o=new A(t[0]);i<t.length;i++)(r=new A(t[i])).s&&(n=B(o,r))!==e&&(0!==n||o.s!==e)||(o=r);return o}function D(t,e,n){for(var r=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,r++);return(n=r+14*n-1)>v?t.c=t.e=null:n<m?t.c=[t.e=0]:(t.e=n,t.c=e),t}function q(t,e,n,r){var i,o,a,s,u,l,c,h=t.c;if(h){t:{for(i=1,s=h[0];s>=10;s/=10,i++);if((o=e-i)<0)o+=14,a=e,c=O((u=h[l=0])/T[i-a-1]%10);else if((l=z((o+1)/14))>=h.length)if(r){for(;h.length<=l;h.push(0));u=c=0,i=1,o%=14,a=o-14+1}else break t;else{for(i=1,u=s=h[l];s>=10;s/=10,i++);o%=14,c=(a=o-14+i)<0?0:O(u/T[i-a-1]%10)}if(r=r||e<0||null!=h[l+1]||(a<0?u:u%T[i-a-1]),r=n<4?(c||r)&&(0==n||n==(t.s<0?3:2)):c>5||5==c&&(4==n||r||6==n&&(o>0?a>0?u/T[i-a]:0:h[l-1])%10&1||n==(t.s<0?8:7)),e<1||!h[0])return h.length=0,r?(e-=t.e+1,h[0]=T[(14-e%14)%14],t.e=-e||0):h[0]=t.e=0,t;if(0==o?(h.length=l,s=1,l--):(h.length=l+1,s=T[14-o],h[l]=a>0?O(u/T[i-a]%T[a])*s:0),r)for(;;)if(0==l){for(o=1,a=h[0];a>=10;a/=10,o++);for(a=h[0]+=s,s=1;a>=10;a/=10,s++);o!=s&&(t.e++,1e14==h[0]&&(h[0]=1));break}else{if(h[l]+=s,1e14!=h[l])break;h[l--]=0,s=1}for(o=h.length;0===h[--o];h.pop());}t.e>v?t.c=t.e=null:t.e<m&&(t.c=[t.e=0])}return t}function V(t){var e,n=t.e;return null===n?t.toString():(e=L(t.c),e=n<=y||n>=g?C(e,n):j(e,n,"0"),t.s<0?"-"+e:e)}return A.clone=t,A.ROUND_UP=0,A.ROUND_DOWN=1,A.ROUND_CEIL=2,A.ROUND_FLOOR=3,A.ROUND_HALF_UP=4,A.ROUND_HALF_DOWN=5,A.ROUND_HALF_EVEN=6,A.ROUND_HALF_CEIL=7,A.ROUND_HALF_FLOOR=8,A.EUCLID=9,A.config=A.set=function(t){var e,n;if(null!=t)if("object"==typeof t){if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(H(n=t[e],0,1e9,e),d=n),t.hasOwnProperty(e="ROUNDING_MODE")&&(H(n=t[e],0,8,e),p=n),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((n=t[e])&&n.pop?(H(n[0],-1e9,0,e),H(n[1],0,1e9,e),y=n[0],g=n[1]):(H(n,-1e9,1e9,e),y=-(g=n<0?-n:n))),t.hasOwnProperty(e="RANGE"))if((n=t[e])&&n.pop)H(n[0],-1e9,-1,e),H(n[1],1,1e9,e),m=n[0],v=n[1];else if(H(n,-1e9,1e9,e),n)m=-(v=n<0?-n:n);else throw Error(S+e+" cannot be zero: "+n);if(t.hasOwnProperty(e="CRYPTO"))if(!!(n=t[e])===n)if(n)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))x=n;else throw x=!n,Error(S+"crypto unavailable");else x=n;else throw Error(S+e+" not true or false: "+n);if(t.hasOwnProperty(e="MODULO_MODE")&&(H(n=t[e],0,9,e),w=n),t.hasOwnProperty(e="POW_PRECISION")&&(H(n=t[e],0,1e9,e),b=n),t.hasOwnProperty(e="FORMAT"))if("object"==typeof(n=t[e]))_=n;else throw Error(S+e+" not an object: "+n);if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(n=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(S+e+" invalid: "+n);M="0123456789"==n.slice(0,10),k=n}}else throw Error(S+"Object expected: "+t);return{DECIMAL_PLACES:d,ROUNDING_MODE:p,EXPONENTIAL_AT:[y,g],RANGE:[m,v],CRYPTO:x,MODULO_MODE:w,POW_PRECISION:b,FORMAT:_,ALPHABET:k}},A.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!A.DEBUG)return!0;var e,n,r=t.c,i=t.e,o=t.s;t:if("[object Array]"==({}).toString.call(r)){if((1===o||-1===o)&&i>=-1e9&&i<=1e9&&i===O(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break t}if((e=(i+1)%14)<1&&(e+=14),String(r[0]).length==e){for(e=0;e<r.length;e++)if((n=r[e])<0||n>=1e14||n!==O(n))break t;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(S+"Invalid BigNumber: "+t)},A.maximum=A.max=function(){return N(arguments,-1)},A.minimum=A.min=function(){return N(arguments,1)},n=0x20000000000000*Math.random()&2097151?function(){return O(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},A.random=function(t){var e,r,i,o,a,s=0,u=[],l=new A(f);if(null==t?t=d:H(t,0,1e9),o=z(t/14),x)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(a=131072*e[s]+(e[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[s]=r[0],e[s+1]=r[1]):(u.push(a%1e14),s+=2);s=o/2}else if(crypto.randomBytes){for(e=crypto.randomBytes(o*=7);s<o;)(a=(31&e[s])*0x1000000000000+0x10000000000*e[s+1]+0x100000000*e[s+2]+0x1000000*e[s+3]+(e[s+4]<<16)+(e[s+5]<<8)+e[s+6])>=9e15?crypto.randomBytes(7).copy(e,s):(u.push(a%1e14),s+=7);s=o/7}else throw x=!1,Error(S+"crypto unavailable");if(!x)for(;s<o;)(a=n())<9e15&&(u[s++]=a%1e14);for(o=u[--s],t%=14,o&&t&&(a=T[14-t],u[s]=O(o/a)*a);0===u[s];u.pop(),s--);if(s<0)u=[i=0];else{for(i=-1;0===u[0];u.splice(0,1),i-=14);for(s=1,a=u[0];a>=10;a/=10,s++);s<14&&(i-=14-s)}return l.e=i,l.c=u,l},A.sum=function(){for(var t=1,e=arguments,n=new A(e[0]);t<e.length;)n=n.plus(e[t++]);return n},l=function(){var t="0123456789";function e(t,e,n,r){for(var i,o,a=[0],s=0,u=t.length;s<u;){for(o=a.length;o--;a[o]*=e);for(a[0]+=r.indexOf(t.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(n,r,i,o,a){var s,l,c,h,f,y,g,m,v=n.indexOf("."),x=d,w=p;for(v>=0&&(h=b,b=0,n=n.replace(".",""),y=(m=new A(r)).pow(n.length-v),b=h,m.c=e(j(L(y.c),y.e,"0"),10,i,t),m.e=m.c.length),c=h=(g=e(n,r,i,a?(s=k,t):(s=t,k))).length;0==g[--h];g.pop());if(!g[0])return s.charAt(0);if(v<0?--c:(y.c=g,y.e=c,y.s=o,g=(y=u(y,m,x,w,i)).c,f=y.r,c=y.e),v=g[l=c+x+1],h=i/2,f=f||l<0||null!=g[l+1],f=w<4?(null!=v||f)&&(0==w||w==(y.s<0?3:2)):v>h||v==h&&(4==w||f||6==w&&1&g[l-1]||w==(y.s<0?8:7)),l<1||!g[0])n=f?j(s.charAt(1),-x,s.charAt(0)):s.charAt(0);else{if(g.length=l,f)for(--i;++g[--l]>i;)g[l]=0,l||(++c,g=[1].concat(g));for(h=g.length;!g[--h];);for(v=0,n="";v<=h;n+=s.charAt(g[v++]));n=j(n,c,s.charAt(0))}return n}}(),u=function(){function t(t,e,n){var r,i,o,a,s=0,u=t.length,l=e%1e7,c=e/1e7|0;for(t=t.slice();u--;)r=c*(o=t[u]%1e7)+(a=t[u]/1e7|0)*l,s=((i=l*o+r%1e7*1e7+s)/n|0)+(r/1e7|0)+c*a,t[u]=i%n;return s&&(t=[s].concat(t)),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=+(t[n]<e[n]),t[n]=i*r+t[n]-e[n];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(r,i,o,a,s){var u,l,c,h,f,d,p,y,g,m,v,x,w,b,_,k,M,E=r.s==i.s?1:-1,N=r.c,$=i.c;if(!N||!N[0]||!$||!$[0])return new A(!r.s||!i.s||(N?$&&N[0]==$[0]:!$)?NaN:N&&0==N[0]||!$?0*E:E/0);for(g=(y=new A(E)).c=[],E=o+(l=r.e-i.e)+1,s||(s=1e14,l=P(r.e/14)-P(i.e/14),E=E/14|0),c=0;$[c]==(N[c]||0);c++);if($[c]>(N[c]||0)&&l--,E<0)g.push(1),h=!0;else{for(b=N.length,k=$.length,c=0,E+=2,(f=O(s/($[0]+1)))>1&&($=t($,f,s),N=t(N,f,s),k=$.length,b=N.length),w=k,v=(m=N.slice(0,k)).length;v<k;m[v++]=0);M=[0].concat(M=$.slice()),_=$[0],$[1]>=s/2&&_++;do{if(f=0,(u=e($,m,k,v))<0){if(x=m[0],k!=v&&(x=x*s+(m[1]||0)),(f=O(x/_))>1)for(f>=s&&(f=s-1),p=(d=t($,f,s)).length,v=m.length;1==e(d,m,p,v);)f--,n(d,k<p?M:$,p,s),p=d.length,u=1;else 0==f&&(u=f=1),p=(d=$.slice()).length;if(p<v&&(d=[0].concat(d)),n(m,d,v,s),v=m.length,-1==u)for(;1>e($,m,k,v);)f++,n(m,k<v?M:$,v,s),v=m.length}else 0===u&&(f++,m=[0]);g[c++]=f,m[0]?m[v++]=N[w]||0:(m=[N[w]],v=1)}while((w++<b||null!=m[0])&&E--);h=null!=m[0],g[0]||g.splice(0,1)}if(1e14==s){for(c=1,E=g[0];E>=10;E/=10,c++);q(y,o+(y.e=c+14*l-1)+1,a,h)}else y.e=l,y.r=+h;return y}}(),r=/^(-?)0([xbo])(?=\w[\w.]*$)/i,i=/^([^.]+)\.$/,o=/^\.([^.]+)$/,a=/^-?(Infinity|NaN)$/,s=/^\s*\+(?=[\w.])|^\s+|\s+$/g,c=function(t,e,n,u){var l,c=n?e:e.replace(s,"");if(a.test(c))t.s=isNaN(c)?null:c<0?-1:1;else{if(!n&&(c=c.replace(r,function(t,e,n){return l="x"==(n=n.toLowerCase())?16:"b"==n?2:8,u&&u!=l?t:e}),u&&(l=u,c=c.replace(i,"$1").replace(o,"0.$1")),e!=c))return new A(c,l);if(A.DEBUG)throw Error(S+"Not a"+(u?" base "+u:"")+" number: "+e);t.s=null}t.c=t.e=null},h.absoluteValue=h.abs=function(){var t=new A(this);return t.s<0&&(t.s=1),t},h.comparedTo=function(t,e){return B(this,new A(t,e))},h.decimalPlaces=h.dp=function(t,e){var n,r,i;if(null!=t)return H(t,0,1e9),null==e?e=p:H(e,0,8),q(new A(this),t+this.e+1,e);if(!(n=this.c))return null;if(r=((i=n.length-1)-P(this.e/14))*14,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},h.dividedBy=h.div=function(t,e){return u(this,new A(t,e),d,p)},h.dividedToIntegerBy=h.idiv=function(t,e){return u(this,new A(t,e),0,1)},h.exponentiatedBy=h.pow=function(t,e){var n,r,i,o,a,s,u,l,c,h=this;if((t=new A(t)).c&&!t.isInteger())throw Error(S+"Exponent not an integer: "+V(t));if(null!=e&&(e=new A(e)),s=t.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!t.c||!t.c[0])return c=new A(Math.pow(+V(h),s?t.s*(2-R(t)):+V(t))),e?c.mod(e):c;if(u=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new A(NaN);(r=!u&&h.isInteger()&&e.isInteger())&&(h=h.mod(e))}else{if(t.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||s&&h.c[1]>=24e7:h.c[0]<8e13||s&&h.c[0]<=9999975e7)))return o=h.s<0&&R(t)?-0:0,h.e>-1&&(o=1/o),new A(u?1/o:o);b&&(o=z(b/14+2))}for(s?(n=new A(.5),u&&(t.s=1),l=R(t)):l=(i=Math.abs(+V(t)))%2,c=new A(f);;){if(l){if(!(c=c.times(h)).c)break;o?c.c.length>o&&(c.c.length=o):r&&(c=c.mod(e))}if(i){if(0===(i=O(i/2)))break;l=i%2}else if(q(t=t.times(n),t.e+1,1),t.e>14)l=R(t);else{if(0==(i=+V(t)))break;l=i%2}h=h.times(h),o?h.c&&h.c.length>o&&(h.c.length=o):r&&(h=h.mod(e))}return r?c:(u&&(c=f.div(c)),e?c.mod(e):o?q(c,b,p,a):c)},h.integerValue=function(t){var e=new A(this);return null==t?t=p:H(t,0,8),q(e,e.e+1,t)},h.isEqualTo=h.eq=function(t,e){return 0===B(this,new A(t,e))},h.isFinite=function(){return!!this.c},h.isGreaterThan=h.gt=function(t,e){return B(this,new A(t,e))>0},h.isGreaterThanOrEqualTo=h.gte=function(t,e){return 1===(e=B(this,new A(t,e)))||0===e},h.isInteger=function(){return!!this.c&&P(this.e/14)>this.c.length-2},h.isLessThan=h.lt=function(t,e){return 0>B(this,new A(t,e))},h.isLessThanOrEqualTo=h.lte=function(t,e){return -1===(e=B(this,new A(t,e)))||0===e},h.isNaN=function(){return!this.s},h.isNegative=function(){return this.s<0},h.isPositive=function(){return this.s>0},h.isZero=function(){return!!this.c&&0==this.c[0]},h.minus=function(t,e){var n,r,i,o,a=this.s;if(e=(t=new A(t,e)).s,!a||!e)return new A(NaN);if(a!=e)return t.s=-e,this.plus(t);var s=this.e/14,u=t.e/14,l=this.c,c=t.c;if(!s||!u){if(!l||!c)return l?(t.s=-e,t):new A(c?this:NaN);if(!l[0]||!c[0])return c[0]?(t.s=-e,t):new A(l[0]?this:3==p?-0:0)}if(s=P(s),u=P(u),l=l.slice(),a=s-u){for((o=a<0)?(a=-a,i=l):(u=s,i=c),i.reverse(),e=a;e--;i.push(0));i.reverse()}else for(r=(o=(a=l.length)<(e=c.length))?a:e,a=e=0;e<r;e++)if(l[e]!=c[e]){o=l[e]<c[e];break}if(o&&(i=l,l=c,c=i,t.s=-t.s),(e=(r=c.length)-(n=l.length))>0)for(;e--;l[n++]=0);for(e=1e14-1;r>a;){if(l[--r]<c[r]){for(n=r;n&&!l[--n];l[n]=e);--l[n],l[r]+=1e14}l[r]-=c[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?D(t,l,u):(t.s=3==p?-1:1,t.c=[t.e=0],t)},h.modulo=h.mod=function(t,e){var n,r;return(t=new A(t,e),this.c&&t.s&&(!t.c||t.c[0]))?t.c&&(!this.c||this.c[0])?(9==w?(r=t.s,t.s=1,n=u(this,t,0,3),t.s=r,n.s*=r):n=u(this,t,0,w),(t=this.minus(n.times(t))).c[0]||1!=w||(t.s=this.s),t):new A(this):new A(NaN)},h.multipliedBy=h.times=function(t,e){var n,r,i,o,a,s,u,l,c,h,f,d,p,y=this.c,g=(t=new A(t,e)).c;if(!y||!g||!y[0]||!g[0])return this.s&&t.s&&(!y||y[0]||g)&&(!g||g[0]||y)?(t.s*=this.s,y&&g?(t.c=[0],t.e=0):t.c=t.e=null):t.c=t.e=t.s=null,t;for(r=P(this.e/14)+P(t.e/14),t.s*=this.s,(u=y.length)<(h=g.length)&&(p=y,y=g,g=p,i=u,u=h,h=i),i=u+h,p=[];i--;p.push(0));for(i=h;--i>=0;){for(n=0,f=g[i]%1e7,d=g[i]/1e7|0,o=i+(a=u);o>i;)s=d*(l=y[--a]%1e7)+(c=y[a]/1e7|0)*f,n=((l=f*l+s%1e7*1e7+p[o]+n)/1e14|0)+(s/1e7|0)+d*c,p[o--]=l%1e14;p[o]=n}return n?++r:p.splice(0,1),D(t,p,r)},h.negated=function(){var t=new A(this);return t.s=-t.s||null,t},h.plus=function(t,e){var n,r=this.s;if(e=(t=new A(t,e)).s,!r||!e)return new A(NaN);if(r!=e)return t.s=-e,this.minus(t);var i=this.e/14,o=t.e/14,a=this.c,s=t.c;if(!i||!o){if(!a||!s)return new A(r/0);if(!a[0]||!s[0])return s[0]?t:new A(a[0]?this:0*r)}if(i=P(i),o=P(o),a=a.slice(),r=i-o){for(r>0?(o=i,n=s):(r=-r,n=a),n.reverse();r--;n.push(0));n.reverse()}for((r=a.length)-(e=s.length)<0&&(n=s,s=a,a=n,e=r),r=0;e;)r=(a[--e]=a[e]+s[e]+r)/1e14|0,a[e]=1e14===a[e]?0:a[e]%1e14;return r&&(a=[r].concat(a),++o),D(t,a,o)},h.precision=h.sd=function(t,e){var n,r,i;if(null!=t&&!!t!==t)return H(t,1,1e9),null==e?e=p:H(e,0,8),q(new A(this),t,e);if(!(n=this.c))return null;if(r=14*(i=n.length-1)+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return t&&this.e+1>r&&(r=this.e+1),r},h.shiftedBy=function(t){return H(t,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+t)},h.squareRoot=h.sqrt=function(){var t,e,n,r,i,o=this.c,a=this.s,s=this.e,l=d+4,c=new A("0.5");if(1!==a||!o||!o[0])return new A(!a||a<0&&(!o||o[0])?NaN:o?this:1/0);if(0==(a=Math.sqrt(+V(this)))||a==1/0?(((e=L(o)).length+s)%2==0&&(e+="0"),a=Math.sqrt(+e),s=P((s+1)/2)-(s<0||s%2),n=new A(e=a==1/0?"5e"+s:(e=a.toExponential()).slice(0,e.indexOf("e")+1)+s)):n=new A(a+""),n.c[0]){for((a=(s=n.e)+l)<3&&(a=0);;)if(i=n,n=c.times(i.plus(u(this,i,l,1))),L(i.c).slice(0,a)===(e=L(n.c)).slice(0,a)){if(n.e<s&&--a,"9999"!=(e=e.slice(a-3,a+1))&&(r||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(q(n,n.e+d+2,1),t=!n.times(n).eq(this));break}if(!r&&(q(i,i.e+d+2,0),i.times(i).eq(this))){n=i;break}l+=4,a+=4,r=1}}return q(n,n.e+d+1,p,t)},h.toExponential=function(t,e){return null!=t&&(H(t,0,1e9),t++),E(this,t,e,1)},h.toFixed=function(t,e){return null!=t&&(H(t,0,1e9),t=t+this.e+1),E(this,t,e)},h.toFormat=function(t,e,n){var r;if(null==n)null!=t&&e&&"object"==typeof e?(n=e,e=null):t&&"object"==typeof t?(n=t,t=e=null):n=_;else if("object"!=typeof n)throw Error(S+"Argument not an object: "+n);if(r=this.toFixed(t,e),this.c){var i,o=r.split("."),a=+n.groupSize,s=+n.secondaryGroupSize,u=n.groupSeparator||"",l=o[0],c=o[1],h=this.s<0,f=h?l.slice(1):l,d=f.length;if(s&&(i=a,a=s,s=i,d-=i),a>0&&d>0){for(i=d%a||a,l=f.substr(0,i);i<d;i+=a)l+=u+f.substr(i,a);s>0&&(l+=u+f.slice(i)),h&&(l="-"+l)}r=c?l+(n.decimalSeparator||"")+((s=+n.fractionGroupSize)?c.replace(RegExp("\\d{"+s+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):c):l}return(n.prefix||"")+r+(n.suffix||"")},h.toFraction=function(t){var e,n,r,i,o,a,s,l,c,h,d,y,g=this.c;if(null!=t&&(!(s=new A(t)).isInteger()&&(s.c||1!==s.s)||s.lt(f)))throw Error(S+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+V(s));if(!g)return new A(this);for(e=new A(f),c=n=new A(f),r=l=new A(f),y=L(g),o=e.e=y.length-this.e-1,e.c[0]=T[(a=o%14)<0?14+a:a],t=!t||s.comparedTo(e)>0?o>0?e:c:s,a=v,v=1/0,s=new A(y),l.c[0]=0;h=u(s,e,0,1),1!=(i=n.plus(h.times(r))).comparedTo(t);)n=r,r=i,c=l.plus(h.times(i=c)),l=i,e=s.minus(h.times(i=e)),s=i;return i=u(t.minus(n),r,0,1),l=l.plus(i.times(c)),n=n.plus(i.times(r)),l.s=c.s=this.s,o*=2,d=1>u(c,r,o,p).minus(this).abs().comparedTo(u(l,n,o,p).minus(this).abs())?[c,r]:[l,n],v=a,d},h.toNumber=function(){return+V(this)},h.toPrecision=function(t,e){return null!=t&&H(t,1,1e9),E(this,t,e,2)},h.toString=function(t){var e,n=this,r=n.s,i=n.e;return null===i?r?(e="Infinity",r<0&&(e="-"+e)):e="NaN":(null==t?e=i<=y||i>=g?C(L(n.c),i):j(L(n.c),i,"0"):10===t&&M?e=j(L((n=q(new A(n),d+i+1,p)).c),n.e,"0"):(H(t,2,k.length,"Base"),e=l(j(L(n.c),i,"0"),10,t,r,!0)),r<0&&n.c[0]&&(e="-"+e)),e},h.valueOf=h.toJSON=function(){return V(this)},h._isBigNumber=!0,h[Symbol.toStringTag]="BigNumber",h[Symbol.for("nodejs.util.inspect.custom")]=h.valueOf,null!=e&&A.set(e),A}();let q=24,V="u">typeof globalThis&&globalThis.crypto&&"function"==typeof globalThis.crypto.getRandomValues?()=>{let t=new Uint32Array(1);return globalThis.crypto.getRandomValues(t),t[0]/0x100000000}:Math.random,X=(t=4,e=V)=>{let n="";for(;n.length<t;)n+=Math.floor(36*e()).toString(36);return n},U=(t="")=>(function(t){let e=new D(0);for(let n of t.values())e=e.multipliedBy(256).plus(n);return e})(E(new TextEncoder().encode(t))).toString(36).slice(1),F=Array.from({length:26},(t,e)=>String.fromCharCode(e+97)),Y=({globalObj:t="u">typeof global?global:"u">typeof window?window:{},random:e=V}={})=>{let n=Object.keys(t).toString();return U(n.length?n+X(32,e):X(32,e)).substring(0,32)},G=t=>()=>t++,W=0x1c6b1f1f,K=(N=({random:t=V,counter:e=G(Math.floor(t()*W)),length:n=q,fingerprint:r=Y({random:t})}={})=>{if(n>32)throw Error(`Length must be between 2 and 32. Received: ${n}`);return function(){let i=F[Math.floor(t()*F.length)],o=Date.now().toString(36),a=e().toString(36),s=X(n,t),u=`${o+s+a+r}`;return`${i+U(u).substring(1,n)}`}},()=>(r||(r=N()),r()))},99026:(t,e,n)=>{"use strict";function r(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(let[n,r]of t)if(!Object.is(r,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}let n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(e,r)||!Object.is(t[r],e[r]))return!1;return!0}n.d(e,{x:()=>r})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{30772:(e,s,a)=>{"use strict";a.d(s,{A:()=>i});var l=a(12115),t=a(30907);let n=e=>{let s=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,s,a)=>a?a.toUpperCase():s.toLowerCase());return s.charAt(0).toUpperCase()+s.slice(1)};var r=a(71265);let i=(e,s)=>{let a=(0,l.forwardRef)(({className:a,...i},c)=>(0,l.createElement)(r.default,{ref:c,iconNode:s,className:(0,t.z)(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,a),...i}));return a.displayName=n(e),a}},30907:(e,s,a)=>{"use strict";a.d(s,{z:()=>l});let l=(...e)=>e.filter((e,s,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===s).join(" ").trim()},31698:(e,s,a)=>{"use strict";a.d(s,{Landing:()=>N});var l=a(95155),t=a(12115),n=a(98500),r=a.n(n),i=a(81499),c=a(51128),d=a(86272),o=a(64577),m=a(32133),h=a(65738),x=a(99314),p=a(52965),u=a(39593);a(93340);let j=u.EO;function w({d:e,color:s}){return(0,l.jsx)("svg",{width:15,height:15,viewBox:"0 0 24 24",fill:s??"currentColor","aria-hidden":!0,children:(0,l.jsx)("path",{d:e})})}let b=[{n:"01",title:"Propose",body:(0,l.jsxs)(l.Fragment,{children:["Ask the session in your terminal to plan a feature. It calls"," ",(0,l.jsx)("span",{className:"w-mono text-foreground",children:"beacon_propose_plan"})," and blocks until you decide. No fire-and-forget."]}),code:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"w-signal",children:"›"})," plan: magic-link sign-in"]})},{n:"02",title:"Review",body:"The plan renders as feature nodes, tables, and endpoints. Select any passage to annotate it, mark it for deletion, or edit the boards directly.",code:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"text-foreground",children:"/plan"})," \xb7 2 features \xb7 1 table"]})},{n:"03",title:"Verdict",body:"Approve persists the drafts. Feedback sends your notes back and the agent re-plans. Discard throws it away. Every plan is archived either way.",code:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{style:{color:"#6ee7b7"},children:"✓ approved"})," \xb7 drafts persisted"]})}],y=[{route:"/plan",title:"Review",body:"Split screen: the proposal on the left, live canvases on the right. Every plan archived with your decision and a snapshot of the moment."},{route:"/map",title:"Roadmap",body:"Features, sub-tasks, and dependencies as a graph. Duplicate features get blocked before they exist."},{route:"/db",title:"Database",body:"Proposed tables and endpoints land as drafts, diffed against your live schema: new, changed, or untouched."}],g=[{label:"Reuse first",body:"Beacon blocks duplicate features. Check the map before you create."},{label:"Design data first",body:(0,l.jsxs)(l.Fragment,{children:["Tables and endpoints before code. Review the schema as a draft on"," ",(0,l.jsx)("span",{className:"text-foreground",children:"/db"}),"."]})},{label:"Close every loop",body:"Register finished work so the map stays accurate next session."}];function f(){let e=(0,t.useRef)(null),[s,a]=(0,t.useState)(1);return(0,t.useEffect)(()=>{let s=e.current;if(!s)return;let l=new ResizeObserver(()=>a(Math.min(1,s.clientWidth/620)));return l.observe(s),()=>l.disconnect()},[]),(0,l.jsxs)("div",{className:"bm-window glass",children:[(0,l.jsxs)("div",{className:"bm-tabs",children:[(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"#ff7a45",boxShadow:"0 0 7px rgba(255,122,69,.7)"}}),(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"oklch(1 0 0 / .16)"}}),(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"oklch(1 0 0 / .16)"}}),(0,l.jsx)("span",{className:"bm-tab active ml-2",children:"Roadmap"}),(0,l.jsx)("span",{className:"bm-tab",children:"Database"}),(0,l.jsx)("span",{className:"w-mono ml-auto hidden text-[0.66rem] w-muted min-[400px]:block",children:"/plan \xb7 review"})]}),(0,l.jsx)("div",{className:"bm-canvas",ref:e,style:{aspectRatio:"620 / 392"},children:(0,l.jsxs)("div",{className:"bm-stage",style:{width:620,height:392,transform:`scale(${s})`},children:[(0,l.jsxs)("svg",{className:"bm-edges",width:620,height:392,viewBox:"0 0 620 392","aria-hidden":!0,children:[(0,l.jsx)("path",{className:"bm-edge",style:{animationDelay:"1s"},pathLength:1,d:"M 135 111 C 135 148 165 168 165 210"}),(0,l.jsx)("path",{className:"bm-edge",style:{animationDelay:"1.15s"},pathLength:1,d:"M 244 78 C 300 78 320 150 374 150"}),(0,l.jsx)("path",{className:"bm-edge bm-edge-tail",style:{animationDelay:"1.7s"},pathLength:1,d:"M 596 205 C 596 230 576 242 558 252"})]}),(0,l.jsxs)("div",{className:"bm-node bm-node-draft",style:{left:26,top:38,width:218,animationDelay:".45s"},children:[(0,l.jsx)("div",{className:"bm-title",children:"Magic-link sign-in"}),(0,l.jsx)("div",{className:"bm-role",children:"Email a one-time link, no passwords"}),(0,l.jsxs)("div",{className:"bm-chiprow",children:[(0,l.jsx)("span",{className:"chip chip-sky",children:"feature"}),(0,l.jsx)("span",{className:"chip chip-violet",children:"auth"}),(0,l.jsx)("span",{className:"chip chip-amber",style:{marginLeft:"auto"},children:"Pending"})]})]}),(0,l.jsxs)("div",{className:"bm-node bm-node-draft",style:{left:70,top:210,width:190,animationDelay:".75s"},children:[(0,l.jsx)("div",{className:"bm-title",children:"Issue + verify token"}),(0,l.jsxs)("div",{className:"bm-chiprow",children:[(0,l.jsx)("span",{className:"chip chip-zinc",children:"sub-task"}),(0,l.jsx)("span",{className:"chip chip-amber",style:{marginLeft:"auto"},children:"Pending"})]})]}),(0,l.jsxs)("div",{className:"bm-table",style:{left:374,top:96,width:222,animationDelay:".6s"},children:[(0,l.jsxs)("div",{className:"bm-table-head",children:[(0,l.jsx)("span",{children:"auth_tokens"}),(0,l.jsx)("span",{className:"chip chip-green",children:"new"})]}),(0,l.jsxs)("div",{className:"bm-trow",children:[(0,l.jsx)(i.A,{size:9,style:{color:"#fde68a"}}),(0,l.jsx)("span",{children:"id"}),(0,l.jsx)("span",{className:"t",children:"uuid"})]}),(0,l.jsxs)("div",{className:"bm-trow",children:[(0,l.jsx)("span",{style:{width:9}}),(0,l.jsx)("span",{children:"token_hash"}),(0,l.jsx)("span",{className:"t",children:"text"})]}),(0,l.jsxs)("div",{className:"bm-trow",children:[(0,l.jsx)(c.A,{size:9,style:{color:"#7dd3fc"}}),(0,l.jsx)("span",{children:"user_id"}),(0,l.jsx)("span",{className:"t",children:"→ users"})]}),(0,l.jsxs)("div",{className:"bm-trow",children:[(0,l.jsx)("span",{style:{width:9}}),(0,l.jsx)("span",{children:"expires_at"}),(0,l.jsx)("span",{className:"t",children:"timestamp"})]})]}),(0,l.jsx)("span",{className:"bm-dot",style:{left:135,top:111,animationDelay:"1s"}}),(0,l.jsx)("span",{className:"bm-dot",style:{left:165,top:210,animationDelay:"1.3s"}}),(0,l.jsx)("span",{className:"bm-dot",style:{left:244,top:78,animationDelay:"1.15s"}}),(0,l.jsx)("span",{className:"bm-dot",style:{left:374,top:150,animationDelay:"1.45s"}}),(0,l.jsx)("span",{className:"bm-pin",style:{left:596,top:201,animationDelay:"1.55s"},children:"1"}),(0,l.jsxs)("div",{className:"bm-bubble",style:{left:356,top:252,width:226,animationDelay:"1.85s"},children:[(0,l.jsx)("div",{className:"lab",children:"annotation \xb7 you"}),(0,l.jsx)("div",{className:"txt",children:"Expire links after 15 min, not 24 h."})]}),(0,l.jsxs)("div",{className:"bm-bar",style:{animationDelay:"2.15s"},children:[(0,l.jsx)(d.A,{size:11,style:{color:"#6ee7b7"}}),(0,l.jsx)("span",{className:"ready",children:"plan ready \xb7 waiting for your verdict"}),(0,l.jsxs)("span",{className:"bm-btn bm-btn-approve",children:[(0,l.jsx)(o.A,{size:10})," Approve"]}),(0,l.jsxs)("span",{className:"bm-btn bm-btn-ghost",children:[(0,l.jsx)(m.A,{size:10})," Feedback"]}),(0,l.jsxs)("span",{className:"bm-btn bm-btn-ghost",children:[(0,l.jsx)(h.A,{size:10})," Discard"]})]})]})})]})}function N(){let e=(0,t.useRef)(null),[s,a]=(0,t.useState)(null);(0,t.useEffect)(()=>{let s=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add("in"),s.unobserve(e.target))})},{threshold:.12});return e.current?.querySelectorAll(".w-reveal").forEach(e=>s.observe(e)),()=>s.disconnect()},[]);let n=e=>(0,l.jsx)("button",{onClick:()=>{navigator.clipboard?.writeText(j),a(e),setTimeout(()=>a(null),1600)},className:"glass-soft w-hover grid h-8 w-8 shrink-0 place-items-center rounded-md","aria-label":"Copy install command",children:s===e?(0,l.jsx)(o.A,{size:13,style:{color:"#ff7a45"}}):(0,l.jsx)(x.A,{size:13,className:"w-muted"})});return(0,l.jsxs)("div",{className:"welcome",ref:e,children:[(0,l.jsx)("div",{className:"welcome-bg","aria-hidden":!0}),(0,l.jsx)("header",{className:"fixed inset-x-0 top-0 z-50",children:(0,l.jsx)("div",{className:"mx-auto max-w-6xl px-6",children:(0,l.jsxs)("div",{className:"w-load mt-4 glass flex items-center justify-between rounded-full py-2.5 pl-5 pr-3",style:{animationDelay:".05s"},children:[(0,l.jsxs)(r(),{href:"#top",className:"flex items-center gap-2.5",children:[(0,l.jsx)(p._,{size:20,className:"text-foreground"}),(0,l.jsx)("span",{className:"font-semibold tracking-tight",children:"Beacon"})]}),(0,l.jsxs)("nav",{className:"flex items-center gap-6 text-sm w-muted",children:[(0,l.jsx)("a",{href:"#how",className:"transition-colors hover:text-foreground",children:"The loop"}),(0,l.jsx)("a",{href:"#quickstart",className:"hidden transition-colors hover:text-foreground sm:block",children:"Quickstart"}),(0,l.jsx)("a",{href:"/docs",className:"transition-colors hover:text-foreground",children:"Docs"})]})]})})}),(0,l.jsx)("span",{id:"top"}),(0,l.jsxs)("section",{className:"px-6 pb-16 pt-20 md:pt-24",children:[(0,l.jsxs)("div",{className:"mx-auto grid max-w-6xl items-center gap-12 lg:grid-cols-[1fr_1.1fr]",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"w-load glass-soft mb-6 inline-flex items-center gap-2 rounded-full px-3.5 py-1.5",style:{animationDelay:".12s"},children:[(0,l.jsx)("span",{className:"w-live h-1.5 w-1.5 rounded-full",style:{background:"#ff7a45",boxShadow:"0 0 8px #ff7a45"}}),(0,l.jsx)("span",{className:"w-mono w-eyebrow w-muted",children:"See your codebase \xb7 steer your agent"})]}),(0,l.jsxs)("h1",{className:"w-load font-semibold text-[clamp(2.2rem,4.6vw,3.4rem)]",style:{letterSpacing:"-0.025em",lineHeight:1.06,animationDelay:".18s"},children:["Give your coding agent ",(0,l.jsx)("span",{className:"w-signal",children:"eyes"})," and hands."]}),(0,l.jsx)("p",{className:"w-load w-muted mt-5 max-w-md text-[1.02rem] leading-relaxed",style:{animationDelay:".26s"},children:"The session in your terminal is the brain. Beacon is where its plans become visible: features, tables, and endpoints on a canvas you annotate, edit, and approve with one click."}),(0,l.jsxs)("div",{className:"w-load mt-8",style:{animationDelay:".34s"},children:[(0,l.jsxs)("div",{className:"glass flex max-w-lg items-center gap-3 rounded-lg py-2.5 pl-4 pr-2",children:[(0,l.jsxs)("code",{className:"w-mono w-scrollbar-none min-w-0 flex-1 overflow-x-auto whitespace-nowrap text-[0.85rem]",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"$"}),(0,l.jsx)("span",{className:"ml-2",children:j}),(0,l.jsx)("span",{className:"w-caret ml-1 inline-block h-3.5 w-1.5 align-middle",style:{background:"#ff7a45"}})]}),n("hero")]}),(0,l.jsxs)("p",{className:"w-mono w-muted mt-3 text-[0.78rem]",children:["then run ",(0,l.jsx)("span",{className:"text-foreground",children:"beacon"})," inside any repo"]})]}),(0,l.jsxs)("div",{className:"w-load mt-9 flex flex-wrap items-center gap-x-5 gap-y-2",style:{animationDelay:".42s"},children:[(0,l.jsx)("span",{className:"w-mono w-eyebrow w-muted",children:"Works with"}),(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm text-foreground/90",children:[(0,l.jsx)(w,{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z",color:"#D97757"})," Claude Code"]}),(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm text-foreground/90",children:[(0,l.jsx)(w,{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})," Codex"]})]})]}),(0,l.jsx)("div",{className:"w-load min-w-0",style:{animationDelay:".3s"},children:(0,l.jsx)(f,{})})]}),(0,l.jsxs)("a",{href:"#how",className:"w-load mx-auto mt-12 flex w-fit flex-col items-center gap-2 w-muted transition-colors hover:text-foreground md:mt-20",style:{animationDelay:".6s"},children:[(0,l.jsx)("span",{className:"w-mono w-eyebrow",children:"The loop"}),(0,l.jsx)("svg",{className:"w-cue",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"m6 9 6 6 6-6"})})]})]}),(0,l.jsx)("section",{id:"how",className:"px-6 py-16 md:py-24",children:(0,l.jsxs)("div",{className:"mx-auto max-w-5xl",children:[(0,l.jsxs)("div",{className:"w-reveal mb-14 text-center",children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-4",children:"The loop"}),(0,l.jsx)("h2",{className:"text-[clamp(1.9rem,4vw,2.75rem)] font-semibold tracking-tight",children:"Propose. Review. Verdict. Repeat."}),(0,l.jsx)("div",{className:"w-accent-line mx-auto mt-6 h-px w-40"})]}),(0,l.jsx)("div",{className:"grid gap-10 md:grid-cols-3",children:b.map(e=>(0,l.jsxs)("div",{className:"loop-card w-reveal glass w-hover rounded-lg p-6",children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-3",children:e.n}),(0,l.jsx)("h3",{className:"mb-2 font-semibold",children:e.title}),(0,l.jsx)("p",{className:"w-muted mb-4 text-[0.92rem] leading-relaxed",children:e.body}),(0,l.jsx)("code",{className:"w-mono glass-soft inline-block rounded-md px-3 py-1.5 text-[0.74rem]",children:e.code})]},e.n))}),(0,l.jsxs)("p",{className:"w-reveal w-mono w-muted mt-10 text-center text-[0.78rem]",children:["feedback sends the agent back to ",(0,l.jsx)("span",{className:"w-signal",children:"01"})," \xb7 approval persists the drafts"]})]})}),(0,l.jsx)("section",{className:"px-6 py-12",children:(0,l.jsxs)("div",{className:"mx-auto max-w-5xl",children:[(0,l.jsxs)("div",{className:"w-reveal mb-12 text-center",children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-4",children:"The surfaces"}),(0,l.jsx)("h2",{className:"text-[clamp(1.6rem,3.4vw,2.25rem)] font-semibold tracking-tight",children:"Everything the agent plans, drawn"})]}),(0,l.jsx)("div",{className:"grid gap-5 md:grid-cols-3",children:y.map(e=>(0,l.jsxs)("div",{className:"w-reveal glass w-hover rounded-lg p-6",children:[(0,l.jsx)("p",{className:"w-mono mb-1 text-[0.82rem] font-semibold w-signal",children:e.route}),(0,l.jsx)("h3",{className:"mb-2 font-semibold",children:e.title}),(0,l.jsx)("p",{className:"w-muted text-[0.92rem] leading-relaxed",children:e.body})]},e.route))})]})}),(0,l.jsxs)("section",{id:"quickstart",className:"px-6 py-16 md:py-24",children:[(0,l.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,l.jsxs)("div",{className:"w-reveal mb-12 text-center",children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-4",children:"Quickstart"}),(0,l.jsx)("h2",{className:"text-[clamp(1.6rem,3.4vw,2.25rem)] font-semibold tracking-tight",children:"Five lines to your first approved plan"})]}),(0,l.jsxs)("div",{className:"w-reveal glass overflow-hidden rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 border-b px-4 py-3",style:{borderColor:"var(--border)"},children:[(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"#ff7a45",boxShadow:"0 0 7px rgba(255,122,69,.7)"}}),(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"oklch(1 0 0 / .16)"}}),(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"oklch(1 0 0 / .16)"}}),(0,l.jsx)("span",{className:"w-mono ml-2 text-[0.72rem] w-muted",children:"your-repo — terminal"})]}),(0,l.jsxs)("div",{className:"px-5 py-4",children:[(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd w-scrollbar-none",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"$ "}),j]}),(0,l.jsx)("span",{className:"note",children:"01 \xb7 one binary, nothing to configure"}),n("qs")]}),(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"$ "}),"cd your-repo && beacon"]}),(0,l.jsx)("span",{className:"note",children:"02 \xb7 registers the repo, opens the panel"})]}),(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"› "}),"/beacon-init"]}),(0,l.jsx)("span",{className:"note",children:"03 \xb7 maps architecture, schema, roadmap"})]}),(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"› "}),"plan: magic-link sign-in"]}),(0,l.jsx)("span",{className:"note",children:"04 \xb7 the plan streams onto /plan"})]}),(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd",children:[(0,l.jsxs)("span",{className:"select-none",style:{color:"#6ee7b7"},children:["✓"," "]}),"approve \xb7 feedback \xb7 discard"]}),(0,l.jsx)("span",{className:"note",children:"05 \xb7 the verdict returns to your session"})]})]})]})]}),(0,l.jsx)("div",{className:"mx-auto mt-16 max-w-5xl",children:(0,l.jsx)("div",{className:"w-reveal glass grid overflow-hidden rounded-lg md:grid-cols-3 md:divide-x md:divide-y-0 divide-y",style:{borderColor:"var(--border)"},children:g.map(e=>(0,l.jsxs)("div",{className:"p-6",style:{borderColor:"oklch(1 0 0 / 0.07)"},children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-2.5",children:e.label}),(0,l.jsx)("p",{className:"w-muted text-[0.9rem] leading-relaxed",children:e.body})]},e.label))})})]}),(0,l.jsx)("footer",{className:"px-6 pb-12 pt-8",children:(0,l.jsxs)("div",{className:"mx-auto max-w-5xl",children:[(0,l.jsx)("div",{className:"w-accent-line mb-8 h-px w-full opacity-60"}),(0,l.jsxs)("div",{className:"flex flex-col items-center justify-between gap-5 md:flex-row",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,l.jsx)(p._,{size:26,className:"text-foreground"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-semibold leading-tight",children:"Beacon"}),(0,l.jsx)("p",{className:"w-mono w-muted text-[0.72rem]",children:"the visual planning surface for your terminal"})]})]}),(0,l.jsxs)("nav",{className:"flex items-center gap-6 text-sm w-muted",children:[(0,l.jsx)("a",{href:"/docs",className:"transition-colors hover:text-foreground",children:"Docs"}),(0,l.jsx)("a",{href:"#",className:"transition-colors hover:text-foreground",children:"Changelog"})]}),(0,l.jsxs)("p",{className:"w-mono w-muted text-[0.72rem]",children:["Created by"," ",(0,l.jsxs)("a",{href:"https://www.instagram.com/wenzorithelly/",target:"_blank",rel:"noreferrer",className:"w-signal inline-flex items-center gap-1 underline decoration-dotted underline-offset-2 transition-opacity hover:opacity-80",children:[(0,l.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[(0,l.jsx)("rect",{x:"2",y:"2",width:"20",height:"20",rx:"5",ry:"5"}),(0,l.jsx)("path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"}),(0,l.jsx)("line",{x1:"17.5",y1:"6.5",x2:"17.51",y2:"6.5"})]}),"Wenzo"]}),(0,l.jsx)("span",{className:"mx-2 opacity-40",children:"\xb7"}),"\xa9 2026 Beacon"]})]})]})})]})}},32133:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("message-square-plus",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]])},39593:(e,s,a)=>{"use strict";a.d(s,{EO:()=>r,W6:()=>n,kw:()=>t});var l=a(41463);let t="https://registry.npmjs.org/trybeacon/latest",n=(l.env.NEXT_PUBLIC_BEACON_SITE_URL??"https://www.trybeacon.sh").replace(/\/$/,""),r=`curl -fsSL ${n}/install.sh | sh`},50814:(e,s,a)=>{Promise.resolve().then(a.bind(a,31698))},51128:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},52965:(e,s,a)=>{"use strict";a.d(s,{_:()=>t});var l=a(95155);function t({size:e=18,className:s}){return(0,l.jsxs)("svg",{width:e,height:e,viewBox:"20 22 56 56",fill:"none",className:s,"aria-hidden":"true",children:[(0,l.jsx)("path",{d:"M48 33 L72.5 73 L23.5 73 Z",fill:"none",stroke:"var(--accent-2, #ff7a45)",strokeWidth:7,strokeLinejoin:"round",strokeLinecap:"round"}),(0,l.jsx)("circle",{cx:"48",cy:"29.5",r:"7",fill:"var(--accent-2, #ff7a45)"})]})}},64577:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},65738:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},71265:(e,s,a)=>{"use strict";a.d(s,{default:()=>i});var l=a(12115),t={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},n=a(30907);let r=(0,l.createContext)({}),i=(0,l.forwardRef)(({color:e,size:s,strokeWidth:a,absoluteStrokeWidth:i,className:c="",children:d,iconNode:o,...m},h)=>{let{size:x=24,strokeWidth:p=2,absoluteStrokeWidth:u=!1,color:j="currentColor",className:w=""}=(0,l.useContext)(r)??{},b=i??u?24*Number(a??p)/Number(s??x):a??p;return(0,l.createElement)("svg",{ref:h,...t,width:s??x??t.width,height:s??x??t.height,stroke:e??j,strokeWidth:b,className:(0,n.z)("lucide",w,c),...!d&&!(e=>{for(let s in e)if(s.startsWith("aria-")||"role"===s||"title"===s)return!0;return!1})(m)&&{"aria-hidden":"true"},...m},[...o.map(([e,s])=>(0,l.createElement)(e,s)),...Array.isArray(d)?d:[d]])})},81499:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]])},86272:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},93340:()=>{},99314:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])}},e=>{e.O(0,[1477,8500,8441,3794,7358],()=>e(e.s=50814)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6624],{8143:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]])},9383:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},10396:(e,t,n)=>{"use strict";n.d(t,{PlanWorkspace:()=>en});var s=n(95155),r=n(12115),a=n(64577),o=n(25640),l=n(34306),i=n(92571),d=n(65408),c=n(30772);let u=(0,c.A)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);var m=n(8143);let x=(0,c.A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);var p=n(82879),h=n(17356),f=n(9383),g=n(9005),b=n(65738),v=n(8962),j=n(73321),y=n(48484),w=n(60292),k=n(99979),N=n(32133),C=n(38332),A=n(91337),E=n(60874);let S="u">typeof CSS&&"highlights"in CSS&&"u">typeof Highlight,z="beacon-pending",R="beacon-annotation",P="beacon-deletion";function T(){return S?CSS.highlights:null}function M(...e){return new globalThis.Highlight(...e)}function O({markdown:e,round:t,onApi:n,hideSubmit:o=!1,getExtraSubmitPayload:l}){let[i,d]=(0,r.useState)([]),[c,u]=(0,r.useState)(""),[m,x]=(0,r.useState)(!1),[p,h]=(0,r.useState)(null),[b,v]=(0,r.useState)(null),[j,y]=(0,r.useState)(null),[E,L]=(0,r.useState)(!1),[I,$]=(0,r.useState)(!1),B=(0,r.useRef)(null),X=(0,r.useRef)(null),U=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await fetch("/api/plan/annotations",{cache:"no-store",headers:(0,w.dh)((0,k.X0)())});if(!t.ok)return;let n=await t.json();if(!e)return;d(n.annotations??[]),u(n.globalComment??""),$(!!n.submitted)}catch{}})(),()=>{e=!1}},[e,t]),(0,r.useEffect)(()=>{if(I)return;let e=setTimeout(()=>{fetch("/api/plan/annotations",{method:"PUT",headers:{"content-type":"application/json",...(0,w.dh)((0,k.X0)())},body:JSON.stringify({annotations:i,globalComment:c,round:t})}).catch(()=>{})},400);return()=>clearTimeout(e)},[i,c,I,t]);let H=(0,r.useCallback)(()=>{let e=window.getSelection();if(!e||e.isCollapsed)return void h(null);let t=e.toString().trim();if(!t)return void h(null);if(!B.current?.contains(e.anchorNode))return;let n=e.getRangeAt(0).getBoundingClientRect();h({x:n.right+window.scrollX,y:n.top+window.scrollY,excerpt:t})},[]);(0,r.useEffect)(()=>{let e=()=>setTimeout(H,0);return document.addEventListener("mouseup",e),document.addEventListener("selectionchange",e),()=>{document.removeEventListener("mouseup",e),document.removeEventListener("selectionchange",e)}},[H]);let K=(0,r.useCallback)((e,t="comment",n="")=>{let s=`a-${Date.now()}-${Math.floor(1e6*Math.random())}`;d(r=>[...r,{id:s,excerpt:e,comment:n,kind:t}]),"comment"===t&&y(s),h(null),window.getSelection()?.removeAllRanges()},[]);(0,r.useEffect)(()=>{let e=e=>{let t=window.getSelection();if(!t||t.isCollapsed)return;let n=t.toString().trim();if(!n||!B.current?.contains(t.anchorNode))return;let s=document.activeElement;if(s&&/^(TEXTAREA|INPUT)$/.test(s.tagName)||!(1===e.key.length&&!e.metaKey&&!e.ctrlKey&&!e.altKey))return;e.preventDefault();let r=t.getRangeAt(0);U.current=r.cloneRange();let a=r.getBoundingClientRect();v({x:a.right+window.scrollX,y:a.top+window.scrollY,excerpt:n,seed:e.key}),h(null),window.getSelection()?.removeAllRanges()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]),(0,r.useEffect)(()=>{let e=T();if(!b||!e)return;let t=U.current;if(t)return e.set(z,M(t)),()=>{e.delete(z)}},[b]),(0,r.useEffect)(()=>{let e=T();if(!e||!B.current)return;let t=[],n=[];for(let e of i){let s=function(e,t){if(!t)return null;let n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>e.parentElement?.closest("pre, table")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),s=[],r="";for(let e=n.nextNode();e;e=n.nextNode())s.push({node:e,start:r.length}),r+=e.nodeValue??"";let a=r.indexOf(t);if(a<0)return null;let o=e=>{for(let t=s.length-1;t>=0;t--)if(s[t].start<=e)return{node:s[t].node,offset:e-s[t].start};return null},l=o(a),i=o(a+t.length);if(!l||!i)return null;let d=document.createRange();return d.setStart(l.node,l.offset),d.setEnd(i.node,i.offset),d}(B.current,e.excerpt);s&&((e.kind??"comment")==="deletion"?n:t).push(s)}let s=(t,n)=>n.length?e.set(t,M(...n)):e.delete(t);return s(R,t),s(P,n),()=>{e.delete(R),e.delete(P)}},[i,e]),(0,r.useEffect)(()=>{if(!m)return;let e=e=>{let t=e.target;!t||X.current?.contains(t)||t.closest("[data-overall-toggle]")||x(!1)},t=e=>{"Escape"===e.key&&x(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[m]);let q=(e,t)=>d(n=>n.map(n=>n.id===e?{...n,comment:t}:n)),G=e=>d(t=>t.filter(t=>t.id!==e)),_=()=>{d([]),u(""),x(!1),fetch("/api/plan/annotations",{method:"DELETE",headers:(0,w.dh)((0,k.X0)())}).catch(()=>{})},V=async()=>{if(!E){L(!0);try{let e=l?.()??{},n=await fetch("/api/plan/annotations",{method:"POST",headers:{"content-type":"application/json",...(0,w.dh)((0,k.X0)())},body:JSON.stringify({annotations:i,globalComment:c,round:t,...e})});n.ok?$(!0):409===n.status&&window.location.reload()}finally{L(!1)}}},J=(0,r.useMemo)(()=>i.filter(e=>"deletion"===e.kind||e.comment.trim()).length+ +!!c.trim(),[i,c]);return(0,r.useEffect)(()=>{n?.({liveCount:J,submitting:E,submitted:I,submit:()=>void V(),clearAll:_,annotationCount:i.length,hasGlobalComment:!!c.trim(),globalOpen:m,toggleOverall:()=>x(e=>!e),annotations:i,updateComment:q,removeAnnotation:G,focusOnAnnotation:e=>y(e),addComment:e=>K(e,"comment")})},[J,E,I,i,c,m]),(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsx)("div",{className:"relative shrink-0",children:(0,s.jsxs)("div",{className:"absolute right-3 top-2 z-30 flex items-center gap-1",children:[!o&&(0,s.jsxs)("button",{onClick:()=>void V(),disabled:E||0===J,className:(0,A.cn)("flex items-center gap-1 rounded-md border px-2 py-1 text-[11px] font-semibold transition-colors",I?"border-emerald-500/40 bg-emerald-500/15 text-emerald-300":0===J?"border-white/10 text-muted-foreground opacity-50":"border-sky-500/40 bg-sky-500/15 text-sky-300 hover:bg-sky-500/25"),title:I?"Submitted — your terminal session is reading the feedback":"Submit all feedback so the agent can revise the plan",children:[I?(0,s.jsx)(a.A,{className:"size-3"}):(0,s.jsx)(f.A,{className:"size-3"}),I?"Submitted":"Submit feedback"]}),m&&(0,s.jsxs)("div",{ref:X,className:"absolute right-0 top-[calc(100%+6px)] z-50 w-[320px] rounded-md border border-white/10 bg-card p-2 shadow-xl",children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,s.jsx)("button",{onClick:()=>x(!1),title:"Close (Esc)",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,s.jsx)(g.A,{className:"size-3"})})]}),(0,s.jsx)("textarea",{autoFocus:!0,value:c,onChange:e=>u(e.target.value),onKeyDown:e=>{e.stopPropagation(),"Enter"===e.key&&e.shiftKey?(e.preventDefault(),!E&&J>0&&(V(),x(!1))):"Escape"===e.key&&(e.preventDefault(),x(!1))},placeholder:"Plan-level notes — e.g. 'split this into two phases' or 'wrong abstraction'…",rows:4,className:"w-full resize-y rounded border border-white/5 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,s.jsx)("div",{className:"mt-1 text-right text-[9px] text-muted-foreground/70",children:"Shift+Enter to submit \xb7 Esc to close"})]})]})}),(0,s.jsx)("div",{ref:B,className:"min-h-0 flex-1 overflow-y-auto px-5 pb-5 pt-16 text-[15px] leading-[1.6] selection:bg-[var(--accent-2,#ff7a45)]/30",children:(0,s.jsx)(F,{markdown:e,annotations:b&&!S?[...i,{id:"__pending",excerpt:b.excerpt,comment:"",kind:"comment"}]:i,focusOnId:j,onClearFocus:()=>y(null),onUpdate:q,onRemove:G})}),p&&(0,s.jsxs)("div",{style:{position:"fixed",left:p.x+4,top:p.y-30,zIndex:60},className:"flex items-center gap-0.5 rounded-md border border-white/15 bg-card/95 p-0.5 shadow-lg backdrop-blur",children:[(0,s.jsx)("button",{onClick:()=>{let e=window.getSelection();U.current=e&&e.rangeCount?e.getRangeAt(0).cloneRange():null,v({...p,seed:""}),h(null),e?.removeAllRanges()},title:"Comment on this text",className:"rounded p-1 text-sky-300 hover:bg-sky-500/15",children:(0,s.jsx)(N.A,{className:"size-3.5"})}),(0,s.jsx)("button",{onClick:()=>K(p.excerpt,"deletion"),title:"Mark this for deletion",className:"rounded p-1 text-red-300 hover:bg-red-500/15",children:(0,s.jsx)(C.A,{className:"size-3.5"})})]}),b&&(0,s.jsx)(D,{excerpt:b.excerpt,x:b.x,y:b.y,seed:b.seed,onConfirm:e=>{K(b.excerpt,"comment",e),v(null)},onCancel:()=>v(null)})]})}function D({excerpt:e,x:t,y:n,seed:o,onConfirm:l,onCancel:i}){let[d,c]=(0,r.useState)(o),u=(0,r.useRef)(null),m=()=>d.trim()?l(d.trim()):i();return(0,s.jsxs)("div",{ref:u,style:{position:"fixed",left:t+4,top:n-6,zIndex:60},className:"w-64 rounded-md border border-white/15 bg-card/95 p-1.5 shadow-xl backdrop-blur",onBlur:e=>{u.current?.contains(e.relatedTarget)||m()},children:[(0,s.jsxs)("div",{className:"mb-1 line-clamp-1 text-[10px] text-muted-foreground",children:["“",e,"”"]}),(0,s.jsx)("textarea",{autoFocus:!0,value:d,onChange:e=>c(e.target.value),onFocus:e=>e.currentTarget.setSelectionRange(d.length,d.length),placeholder:"Comment… (Enter to add \xb7 Esc to discard)",onKeyDown:e=>{e.stopPropagation(),"Enter"!==e.key||e.shiftKey?"Escape"===e.key&&(e.preventDefault(),i()):(e.preventDefault(),m())},className:"h-16 w-full resize-none rounded bg-white/[0.05] px-1.5 py-1 text-xs outline-none placeholder:text-muted-foreground/50 focus:bg-white/[0.08]"}),(0,s.jsxs)("div",{className:"mt-1 flex items-center justify-end gap-1",children:[(0,s.jsxs)("button",{type:"button",onClick:i,title:"Discard this comment (Esc)",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",children:[(0,s.jsx)(g.A,{className:"size-3"}),"Discard"]}),(0,s.jsxs)("button",{type:"button",onClick:m,disabled:!d.trim(),title:"Add this comment (Enter)",className:"flex items-center gap-1 rounded bg-sky-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/25 disabled:opacity-40",children:[(0,s.jsx)(a.A,{className:"size-3"}),"Add"]})]})]})}function L({annotations:e,updateComment:t,removeAnnotation:n,focusOnAnnotation:r,onClose:a}){return 0===e.length?(0,s.jsx)("div",{className:"rounded-lg border border-dashed border-white/10 px-3 py-6 text-center text-[11px] text-muted-foreground",children:"Highlight any text in the plan to leave an inline comment."}):(0,s.jsx)("ul",{className:"space-y-1.5",children:e.map(e=>(0,s.jsx)("li",{className:(0,A.cn)("group rounded-md border bg-background/30 px-2 py-1.5 transition-colors hover:bg-background/50","deletion"===e.kind?"border-red-500/25":"border-sky-500/15"),children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>{r(e.id),a?.()},title:"Jump to this excerpt in the plan",className:(0,A.cn)("block w-full truncate text-left text-[10.5px] font-mono","deletion"===e.kind?"text-red-300/90 line-through":"text-foreground/80 hover:text-foreground"),children:["“",e.excerpt,"”"]}),"deletion"!==e.kind&&(0,s.jsx)("textarea",{value:e.comment,onChange:n=>t(e.id,n.target.value),placeholder:"Write your comment…",rows:1,className:"field-sizing-content mt-1 w-full resize-none bg-transparent text-[11px] leading-snug text-foreground/90 outline-none placeholder:text-muted-foreground/60 focus:text-foreground"})]}),(0,s.jsx)("button",{onClick:()=>n(e.id),title:"Remove this annotation",className:"shrink-0 rounded p-1 text-muted-foreground/70 opacity-0 transition-opacity hover:bg-red-500/15 hover:text-red-300 group-hover:opacity-100",children:(0,s.jsx)(b.A,{className:"size-3"})})]})},e.id))})}function F({markdown:e,annotations:t,focusOnId:n,onClearFocus:a,onUpdate:o,onRemove:l}){let i=(0,r.useMemo)(()=>(0,E.n$)(e),[e]);return(0,s.jsx)("div",{className:"mx-auto w-full max-w-[66ch] space-y-4",children:i.map((e,r)=>(0,s.jsx)(I,{block:e,index:r,annotations:t,focusOnId:n,onClearFocus:a,onUpdate:o,onRemove:l},r))})}function I({block:e,index:t,annotations:n,focusOnId:r,onClearFocus:a,onUpdate:o,onRemove:l}){if("code"===e.kind)return(0,s.jsx)(E.NG,{text:e.text});if("table"===e.kind)return(0,s.jsx)(E.QH,{block:e});let i=(0,s.jsx)($,{text:e.text,annotations:n,focusOnId:r,onClearFocus:a,onUpdate:o,onRemove:l}),d=(0,E.Vq)(e.kind)?(0,E.vB)(t):void 0;return(0,s.jsx)(s.Fragment,{children:(0,E.aM)(e,i,"reading",d)})}function $({text:e,annotations:t,focusOnId:n,onClearFocus:r,onUpdate:a,onRemove:o}){let l=(S?[]:t).map(t=>({a:t,idx:e.indexOf(t.excerpt)})).filter(e=>e.idx>=0).sort((e,t)=>e.idx-t.idx);if(!l.length)return(0,s.jsx)(X,{text:e});let i=[],d=0;for(let{a:t,idx:c}of l)c<d||(c>d&&i.push((0,s.jsx)(X,{text:e.slice(d,c)},`p-${d}`)),i.push((0,s.jsx)(B,{annotation:t,autoFocus:n===t.id,onClearFocus:r,onUpdate:a,onRemove:o},t.id)),d=c+t.excerpt.length);return d<e.length&&i.push((0,s.jsx)(X,{text:e.slice(d)},"p-tail")),(0,s.jsx)(s.Fragment,{children:i})}function B({annotation:e,autoFocus:t,onClearFocus:n,onUpdate:a,onRemove:o}){let l=(0,r.useRef)(null);return((0,r.useEffect)(()=>{if(t&&l.current){l.current.focus();let e=l.current.value;l.current.setSelectionRange(e.length,e.length),n()}},[t,n]),"deletion"===(e.kind??"comment"))?(0,s.jsxs)("span",{className:"relative inline",children:[(0,s.jsx)("span",{className:"rounded bg-red-500/15 px-0.5 text-red-200/90 line-through decoration-red-300/70 decoration-2",children:(0,s.jsx)(X,{text:e.excerpt})}),(0,s.jsx)("button",{type:"button",onClick:()=>o(e.id),title:"Unmark",className:"ml-0.5 inline-flex translate-y-[-1px] items-center text-red-300/70 hover:text-red-300",children:(0,s.jsx)(b.A,{className:"size-3"})})]}):(0,s.jsx)("span",{className:"rounded bg-[var(--accent-2,#ff7a45)]/15 px-0.5","data-annotation-id":e.id,children:(0,s.jsx)(X,{text:e.excerpt})})}function X({text:e}){return(0,s.jsx)(E.cV,{text:e})}let U=(0,c.A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);function H({pendingPlan:e=!1}={}){let t=(0,j.useRouter)(),[n,i]=(0,r.useState)([]),[d,c]=(0,r.useState)(null),[m,x]=(0,r.useState)(null),[p,h]=(0,r.useState)("markdown");(0,r.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/plan/history");if(!e.ok)return;let t=await e.json();i(t.items),t.items.length&&!d&&c(t.items[0].id)}catch{}})()},[]),(0,r.useEffect)(()=>{d&&(async()=>{let e=await fetch(`/api/plan/history?id=${encodeURIComponent(d)}`);e.ok&&x(await e.json())})()},[d]);let f=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let n of e){let e=new Date(n.archivedAt).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"});t.has(e)||t.set(e,[]),t.get(e).push(n)}return Array.from(t.entries())})(n),[n]),b=e?(0,s.jsxs)("button",{onClick:()=>t.push((0,k.rc)()),className:"glass pointer-events-auto fixed left-3 top-3 z-30 flex h-10 items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/15",title:"Return to the plan that's still pending review",children:[(0,s.jsx)(U,{className:"size-3.5"})," Back to current plan"]}):null;return 0===n.length?(0,s.jsxs)(s.Fragment,{children:[b,(0,s.jsx)("div",{className:"flex h-screen items-center justify-center px-6 pt-14 text-center",children:(0,s.jsxs)("div",{className:"max-w-md text-sm text-muted-foreground",children:[(0,s.jsx)(u,{className:"mx-auto mb-3 size-7 text-muted-foreground/40"}),(0,s.jsx)("div",{className:"mb-2 text-base font-semibold text-foreground",children:"No plans yet."}),"Ask the agent to propose a feature in your terminal session — it lands here via MCP and you can review + annotate on both sides. Past plans get archived to this page for browsing."]})})]}):(0,s.jsxs)("div",{className:"flex h-screen min-h-0 pt-14",children:[b,m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"glass pointer-events-auto fixed left-1/2 top-3 z-30 flex -translate-x-1/2 items-center gap-0.5 rounded-full p-1",children:[(0,s.jsx)(K,{active:"markdown"===p,onClick:()=>h("markdown"),children:"Plan"}),(0,s.jsx)(K,{active:"map"===p,onClick:()=>h("map"),icon:(0,s.jsx)(o.A,{className:"size-3"}),children:"Features"}),(0,s.jsx)(K,{active:"db"===p,onClick:()=>h("db"),icon:(0,s.jsx)(l.A,{className:"size-3"}),children:"Schema"})]}),(0,s.jsxs)("div",{className:"glass pointer-events-auto fixed right-3 top-3 z-30 flex h-9 items-center gap-2 rounded-full px-3",children:[(0,s.jsx)("span",{className:(0,A.cn)("rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide","approved"===m.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),children:m.verdict}),(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:new Date(m.archivedAt).toLocaleString()})]})]}),(0,s.jsxs)("aside",{className:"flex w-64 min-w-0 shrink-0 flex-col border-r border-white/5 bg-card/30",children:[(0,s.jsxs)("div",{className:"border-b border-white/5 px-3 py-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Plan history \xb7 ",n.length]}),(0,s.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto",children:f.map(([e,t])=>(0,s.jsxs)("li",{children:[(0,s.jsx)("div",{className:"px-3 pb-1 pt-3 text-[9px] font-semibold uppercase tracking-widest text-muted-foreground/60",children:e}),(0,s.jsx)("ul",{children:t.map(e=>(0,s.jsx)("li",{children:(0,s.jsxs)("button",{onClick:()=>c(e.id),className:(0,A.cn)("flex w-full items-start gap-1.5 px-3 py-1.5 text-left text-[12px] transition-colors",d===e.id?"bg-white/[0.06] text-foreground":"text-muted-foreground hover:bg-white/[0.03] hover:text-foreground"),children:[(0,s.jsx)("span",{className:(0,A.cn)("mt-0.5 inline-flex size-3.5 shrink-0 items-center justify-center rounded-full","approved"===e.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),title:e.verdict,children:"approved"===e.verdict?(0,s.jsx)(a.A,{className:"size-2.5"}):(0,s.jsx)(g.A,{className:"size-2.5"})}),(0,s.jsx)("span",{className:"line-clamp-2",children:e.description})]})},e.id))})]},e))})]}),m?(0,s.jsx)("section",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:["markdown"===p&&(0,s.jsxs)("div",{className:"px-5 py-4",children:[(0,s.jsx)(E.pO,{markdown:m.markdown}),""===m.markdown.replace(/^#[^\n]*\n?/,"").trim()&&(0,s.jsx)("p",{className:"mt-2 text-[13px] text-muted-foreground",children:(m.featureGraph?.features?.length??0)===0&&(m.draftDoc?.tables?.length??0)===0&&(m.draftDoc?.endpoints?.length??0)===0?"This plan was approved without a detailed write-up — no features or schema were attached either.":"This plan has no written body. See the Features and Schema tabs for what it proposed."}),m.globalComment&&(0,s.jsxs)("div",{className:"mt-4 rounded-lg border border-white/5 bg-card/40 p-3",children:[(0,s.jsx)("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,s.jsx)("div",{className:"text-[12px] whitespace-pre-wrap",children:m.globalComment})]})]}),"map"===p&&(0,s.jsx)(q,{featureGraph:m.featureGraph}),"db"===p&&(0,s.jsx)(G,{draftDoc:m.draftDoc})]})}):(0,s.jsx)("section",{className:"flex min-h-0 min-w-0 flex-1 items-center justify-center text-sm text-muted-foreground",children:"Select a plan on the left to view it."})]})}function K({active:e,onClick:t,icon:n,children:r}){return(0,s.jsxs)("button",{onClick:t,className:(0,A.cn)("flex items-center gap-1 rounded-md px-2 py-1 text-[11px] font-medium transition-colors",e?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:[n,r]})}function q({featureGraph:e}){let t=e?.features??[];return 0===t.length?(0,s.jsx)("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:"No features were proposed in this plan."}):(0,s.jsx)("div",{className:"grid gap-3 px-5 py-4 sm:grid-cols-2 lg:grid-cols-3",children:t.map((e,t)=>(0,s.jsxs)("div",{className:"rounded-lg border border-sky-500/20 bg-card/50 p-3",children:[(0,s.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"rounded bg-sky-500/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-sky-300",children:"feature"}),e.cluster&&(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.cluster})]}),(0,s.jsx)("div",{className:"text-sm font-semibold leading-tight",children:e.title}),e.role&&(0,s.jsx)("div",{className:"mt-1 text-[11px] text-muted-foreground",children:e.role}),e.plain&&(0,s.jsx)("div",{className:"mt-2 text-[12px] text-foreground/80",children:e.plain})]},t))})}function G({draftDoc:e}){let t=e?.tables??[],n=e?.endpoints??[];return 0===t.length&&0===n.length?(0,s.jsx)("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:"No schema was proposed in this plan."}):(0,s.jsxs)("div",{className:"space-y-5 px-5 py-4",children:[t.length>0&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Tables \xb7 ",t.length]}),(0,s.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:t.map(e=>(0,s.jsxs)("div",{className:"rounded-lg border border-white/5 bg-card/40 p-3",children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"font-mono text-[13px] font-semibold",children:e.name}),e.domain&&(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.domain})]}),e.description&&(0,s.jsx)("div",{className:"mb-1.5 text-[11px] text-muted-foreground",children:e.description}),(0,s.jsx)("ul",{className:"space-y-0.5 text-[11px]",children:e.columns.map((e,t)=>(0,s.jsxs)("li",{className:"flex items-baseline gap-1.5",children:[(0,s.jsx)("code",{className:"rounded bg-white/5 px-1 font-mono text-[11px]",children:e.name}),(0,s.jsx)("span",{className:"text-muted-foreground",children:e.type}),e.isPk&&(0,s.jsx)("span",{className:"text-amber-300/80 text-[9px]",children:"PK"}),e.isFk&&(0,s.jsx)("span",{className:"text-sky-300/80 text-[9px]",children:"FK"}),!e.nullable&&(0,s.jsx)("span",{className:"text-muted-foreground/60 text-[9px]",children:"NOT NULL"})]},t))})]},e.id))})]}),n.length>0&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Endpoints \xb7 ",n.length]}),(0,s.jsx)("ul",{className:"space-y-1.5",children:n.map(e=>{let t;return(0,s.jsxs)("li",{className:"flex items-center gap-2 rounded-md border border-white/5 bg-card/40 px-2.5 py-1.5 text-[12px]",children:[(0,s.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-bold",style:(t=_[e.method.toUpperCase()]??"#8a8a8a",{background:`${t}22`,color:t}),children:e.method}),(0,s.jsx)("span",{className:"font-mono",children:e.path}),e.description&&(0,s.jsx)("span",{className:"ml-2 text-[11px] text-muted-foreground",children:e.description})]},e.id)})})]})]})}let _={GET:"#7bd389",POST:"#4ea1ff",PUT:"#ffb86b",PATCH:"#ffb86b",DELETE:"#ff3860"};function V({markdown:e}){let t=(0,r.useMemo)(()=>(0,E.n$)(e).map((e,t)=>({b:e,i:t})).filter(({b:e})=>(0,E.Vq)(e.kind)).map(({b:e,i:t})=>({id:(0,E.vB)(t),level:(0,E.F8)(e.kind),label:(0,E.kz)(e.text)})).filter(e=>e.label.length>0),[e]),[n,a]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if("u"<typeof IntersectionObserver||0===t.length)return;let e=t.map(e=>document.getElementById(e.id)).filter(e=>null!==e);if(0===e.length)return;let n=new IntersectionObserver(e=>{let t=e.filter(e=>e.isIntersecting).sort((e,t)=>e.boundingClientRect.top-t.boundingClientRect.top);t[0]&&a(t[0].target.id)},{rootMargin:"-12% 0px -70% 0px",threshold:0});return e.forEach(e=>n.observe(e)),()=>n.disconnect()},[t]),(0,s.jsxs)("aside",{className:"flex w-60 shrink-0 flex-col overflow-y-auto border-r border-white/5 bg-background pt-16",children:[(0,s.jsx)("div",{className:"px-4 pb-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Sections"}),0===t.length?(0,s.jsx)("p",{className:"px-4 text-[12px] text-muted-foreground/70",children:"No headings in this plan."}):(0,s.jsx)("nav",{className:"space-y-0.5 px-2 pb-6",children:t.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;let n;return t=e.id,void((n=document.getElementById(t))&&(n.scrollIntoView({behavior:"smooth",block:"start"}),a(t)))},title:e.label,style:{paddingLeft:`${.5+.75*e.level}rem`},className:(0,A.cn)("block w-full truncate rounded py-1 pr-2 text-left text-[12px] leading-snug transition-colors",n===e.id?"bg-white/10 font-medium text-foreground":"text-muted-foreground hover:bg-white/[0.05] hover:text-foreground"),children:e.label},e.id))})]})}var J=n(50981),W=n(74350),Y=n(4474),Q=n(97358);function Z({open:e,onOpenChange:t,onConfirmed:n}){let[o,l]=(0,r.useState)("bypassPermissions"),[i,d]=(0,r.useState)(!1);async function c(){d(!0);try{await fetch("/api/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({planApprovalMode:o})}).catch(()=>{}),t(!1),n()}finally{d(!1)}}return(0,s.jsx)(W.lG,{open:e,onOpenChange:t,children:(0,s.jsxs)(W.Cf,{className:"max-w-lg",children:[(0,s.jsxs)(W.c7,{children:[(0,s.jsxs)(W.L3,{className:"flex items-center gap-2",children:[(0,s.jsx)(J.A,{className:"size-4 text-emerald-400"}),"After approving, the agent should…"]}),(0,s.jsx)(W.rr,{children:"Pick the permission mode your terminal session enters when you approve a plan. We ask once and remember it for every project — change it anytime in Settings."})]}),(0,s.jsx)("div",{className:"space-y-2 py-1",children:Q.pC.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>l(e.value),className:(0,A.cn)("flex w-full items-start gap-3 rounded-lg border p-3 text-left transition-colors",o===e.value?"border-emerald-500/50 bg-emerald-500/10":"border-white/10 bg-white/[0.03] hover:bg-white/[0.06]"),children:[(0,s.jsx)("span",{className:(0,A.cn)("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border",o===e.value?"border-emerald-400 bg-emerald-400/20":"border-white/30"),children:o===e.value&&(0,s.jsx)(a.A,{className:"size-3 text-emerald-300"})}),(0,s.jsxs)("span",{className:"min-w-0",children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e.label}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e.description})]})]},e.value))}),(0,s.jsxs)(W.Es,{className:"items-center justify-between gap-2 sm:justify-between",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"You can change this later in Settings."}),(0,s.jsx)(Y.$,{onClick:c,disabled:i,size:"sm",children:i?"Saving…":"Save & approve"})]})]})})}var ee=n(32066),et=n(91588);function en({dbProps:e,mapProps:t,planMarkdown:n,forceHistory:c=!1}){let N=(0,j.useRouter)(),{status:C,discard:E}=(0,y.j)(),S=t.nodes.length>0,z=e.tables.length>0||e.endpoints.length>0||(e.draft?.tables.length??0)>0||(e.draft?.endpoints.length??0)>0,[R,P]=(0,r.useState)(S?"map":"db"),T="map"!==R||S?"db"!==R||z?R:"map":"db",[M,D]=(0,r.useState)(!1),[F,I]=(0,r.useState)(!1),[$,B]=(0,r.useState)(null),X=(0,r.useRef)(!1),U=(0,r.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,w.dh)((0,k.X0)())}).catch(()=>{}),B({features:C.features,tables:C.tables,endpoints:C.endpoints})},[C.features,C.tables,C.endpoints]);(0,r.useEffect)(()=>{if(!$)return;X.current=!1;let e=$.features>0?"/map?view=ROADMAP":$.tables>0||$.endpoints>0?"/map?view=DATABASE":"/map?view=ROADMAP",t=setTimeout(()=>{X.current||(X.current=!0,N.push(e))},3e3);return()=>clearTimeout(t)},[$,N]);let K=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/preferences",{cache:"no-store"});if((await e.json()).planApprovalModeConfigured)return void U()}catch{U();return}I(!0)},[U]),[q,G]=(0,r.useState)(null),_=(0,r.useCallback)(e=>G(e),[]),J=(0,r.useRef)(null),W=(0,r.useRef)(null),Y=(0,r.useRef)(e.draft),[Q,ea]=(0,r.useState)(!1),eo=(0,r.useCallback)(()=>ea(!0),[]),[el,ei]=(0,r.useState)([]),[ed,ec]=(0,r.useState)(!1),[eu,em]=(0,r.useState)(""),ex=(0,r.useCallback)(e=>{em(e),ec(!0)},[]),ep=(0,r.useRef)(el);(0,r.useEffect)(()=>{ep.current=el},[el]),(0,r.useEffect)(()=>{ei([]),ec(!1),ea(!1)},[C.proposedAt]),(0,r.useEffect)(()=>{let e=()=>void fetch("/api/plan/presence",{method:"POST",cache:"no-store",headers:(0,w.dh)((0,k.X0)())}).catch(()=>{});e();let t=setInterval(e,5e3);return()=>clearInterval(t)},[]);let eh=(0,r.useCallback)(()=>({draft:Y.current,questions:ep.current}),[]),ef=(0,r.useMemo)(()=>{let n=[];for(let e of t.nodes)n.push(`feature: ${e.title}`);for(let t of e.draft?.tables??[])n.push(`table: ${t.name}`);for(let t of e.tables)n.push(`table: ${t.name}`);for(let t of e.draft?.endpoints??[])n.push(`endpoint: ${t.method} ${t.path}`);for(let t of e.endpoints)n.push(`endpoint: ${t.method} ${t.path}`);return Array.from(new Set(n))},[t.nodes,e]),eg=q?(0,s.jsx)(L,{annotations:q.annotations,updateComment:q.updateComment,removeAnnotation:q.removeAnnotation,focusOnAnnotation:q.focusOnAnnotation,onClose:()=>J.current?.close()}):null,eb=(0,r.useCallback)(()=>{J.current?.open()},[]),ev=(0,r.useCallback)(()=>{"db"===T?W.current?.openComments():J.current?.openComments()},[T]),ej=(0,r.useCallback)(e=>{q?.addComment(e)},[q]),ey=(0,r.useCallback)(e=>{q?.focusOnAnnotation(e),"db"===T?W.current?.openComments():J.current?.openComments()},[q,T]),[ew,ek]=(0,r.useState)(()=>{try{let e=window.localStorage.getItem("beacon:plan-left-pct");return e?Math.max(20,Math.min(80,Number(e))):50}catch{return 50}}),eN=(0,r.useRef)(null),eC=(0,r.useRef)(!1),eA=(0,r.useCallback)(e=>{e.preventDefault(),eC.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]);(0,r.useEffect)(()=>{let e=e=>{if(!eC.current||!eN.current)return;let t=eN.current.getBoundingClientRect();ek(Math.max(20,Math.min(80,(e.clientX-t.left)/t.width*100)))},t=()=>{if(eC.current){eC.current=!1,document.body.style.cursor="",document.body.style.userSelect="";try{localStorage.setItem("beacon:plan-left-pct",String(ew))}catch{}}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[ew]);let eE=async()=>{await fetch("/api/plan/annotations",{method:"DELETE",headers:(0,w.dh)((0,k.X0)())}).catch(()=>{}),await E(),N.refresh()};if((!C.pending||c)&&!$)return(0,s.jsx)(H,{pendingPlan:C.pending});let eS=S||z,ez=eS&&!M,eR=!eS||M,eP=((q?.liveCount??0)>0||Q||el.length>0)&&!q?.submitted;return(0,s.jsxs)("div",{className:"relative flex h-screen flex-col",children:[$&&(0,s.jsxs)("div",{className:"absolute inset-0 z-50 flex flex-col items-center justify-center gap-5 bg-background/97 px-6 text-center backdrop-blur-sm",children:[(0,s.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-emerald-500/15",children:(0,s.jsx)(a.A,{className:"size-6 text-emerald-300"})}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Plan approved"}),(0,s.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:$.features>0||$.tables>0||$.endpoints>0?"It's committed. Here's where to find it:":"It's archived to your plan history."}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground/70",children:"Taking you to the map in 3 seconds…"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[$.features>0&&(0,s.jsxs)("button",{onClick:()=>{X.current=!0,N.push("/map?view=ROADMAP")},className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,s.jsx)(o.A,{className:"size-4 text-sky-300"})," ",$.features," feature",1===$.features?"":"s"," → Map"]}),($.tables>0||$.endpoints>0)&&(0,s.jsxs)("button",{onClick:()=>{X.current=!0,N.push("/map?view=DATABASE")},className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,s.jsx)(l.A,{className:"size-4 text-violet-300"})," ",$.tables," table",1===$.tables?"":"s"," \xb7 ",$.endpoints," endpoint",1===$.endpoints?"":"s"," → Database"]})]}),(0,s.jsx)("button",{onClick:()=>{X.current=!0,B(null),N.push((0,k.rc)({view:"history"}))},className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Done — browse plan history"})]}),q?.submitted&&(0,s.jsxs)("div",{className:"absolute inset-0 z-40 flex flex-col items-center justify-center gap-4 bg-background/95 px-6 text-center backdrop-blur-sm",children:[(0,s.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-sky-500/15",children:(0,s.jsx)(i.A,{className:"size-6 animate-spin text-sky-300"})}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Feedback sent"}),(0,s.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:"Your terminal session is revising the plan based on your comments. The updated plan will appear here automatically — no need to refresh."})]}),(0,s.jsx)("button",{onClick:()=>N.push((0,k.rc)({view:"history"})),className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Browse past plans"})]}),(0,s.jsxs)("div",{className:"pointer-events-none fixed right-3 top-3 z-30 flex items-center gap-2",children:[eS&&M&&(0,s.jsx)("button",{onClick:()=>D(!1),title:"Collapse — show the board again",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(d.A,{className:"size-3.5"})}),(0,s.jsxs)("div",{className:"glass pointer-events-auto flex h-10 items-center gap-0.5 rounded-full px-1",children:[(0,s.jsx)("button",{onClick:()=>N.push((0,k.rc)({view:"history"})),title:"Browse past plans (you can come back to this one)",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(u,{className:"size-3.5"})}),(0,s.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,s.jsx)("button",{onClick:eb,disabled:!q,title:"Open the side panel (details)",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(m.A,{className:"size-3.5"})}),(0,s.jsxs)("button",{onClick:ev,disabled:!q,title:q?.annotationCount?`Open comments \xb7 ${q.annotationCount} comment${1===q.annotationCount?"":"s"} so far`:"Open comments — select a card/table and 'Comment on this', or highlight text",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:[(0,s.jsx)(x,{className:"size-3.5"}),q&&(q.annotationCount??0)>0&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:q.annotationCount})]}),(0,s.jsxs)("button",{"data-overall-toggle":!0,onClick:()=>q?.toggleOverall?.(),disabled:!q?.toggleOverall,title:q?.hasGlobalComment?"Edit your overall feedback":"Add overall plan-level feedback",className:(0,A.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",q?.globalOpen?"bg-white/10 text-foreground":q?.hasGlobalComment?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,s.jsx)(p.A,{className:"size-3.5"}),q?.hasGlobalComment&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 size-2 rounded-full bg-sky-400"})]}),(0,s.jsxs)("button",{onClick:()=>ec(e=>!e),title:"Ask the agent a question about a node (answered in its next round)",className:(0,A.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",ed?"bg-white/10 text-foreground":el.length?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,s.jsx)(h.A,{className:"size-3.5"}),el.length>0&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:el.length})]}),(0,s.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,s.jsxs)("button",{onClick:()=>q?.submit(),disabled:!q||q.submitting||0===q.liveCount&&!Q&&0===el.length,title:q&&(0!==q.liveCount||Q||0!==el.length)?q.submitted?"Submitted — your terminal session is reading the feedback":"Submit feedback (comments + canvas edits) so the agent can revise the plan":"Highlight text or edit the canvas, then submit",className:(0,A.cn)("flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-semibold transition-colors",q?.submitted?"text-sky-300":q&&(0!==q.liveCount||Q||0!==el.length)?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground opacity-50"),children:[q?.submitted?(0,s.jsx)(a.A,{className:"size-3"}):(0,s.jsx)(f.A,{className:"size-3"}),q?.submitted?"Submitted":"Feedback"]}),eP&&(0,s.jsxs)("button",{onClick:()=>{q?.clearAll?.(),ea(!1),ei([])},title:"Discard your unsubmitted comments / canvas edits so you can approve the plan as-is",className:"flex shrink-0 items-center gap-1 rounded-full px-2 py-1 text-[11px] font-medium text-amber-300/90 transition-colors hover:bg-amber-500/15",children:[(0,s.jsx)(g.A,{className:"size-3"})," Clear to approve"]}),(0,s.jsxs)("button",{onClick:()=>void K(),disabled:eP,title:eP?"You have unsubmitted feedback — submit it, or click ‘Clear to approve’ to drop it":"Approve the plan",className:(0,A.cn)("flex shrink-0 items-center gap-1 rounded-full border border-emerald-500/40 bg-emerald-500/15 px-2.5 py-1 text-[11px] font-semibold text-emerald-300 transition-colors hover:bg-emerald-500/25",eP&&"opacity-40 hover:bg-emerald-500/15"),children:[(0,s.jsx)(a.A,{className:"size-3"})," Approve"]}),(0,s.jsxs)("button",{onClick:eE,className:"flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",title:"Discard the plan",children:[(0,s.jsx)(b.A,{className:"size-3"})," Discard"]}),(0,s.jsx)(Z,{open:F,onOpenChange:I,onConfirmed:()=>void U()})]})]}),ed&&(0,s.jsxs)("div",{className:"fixed right-3 top-16 z-30 w-80 rounded-xl border border-white/10 bg-card p-3 shadow-xl",children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Ask the agent"}),(0,s.jsx)("button",{onClick:()=>ec(!1),title:"Close",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,s.jsx)(g.A,{className:"size-3.5"})})]}),(0,s.jsx)(es,{targets:ef,initialTarget:eu,onAdd:e=>ei(t=>[...t,e])}),el.length>0&&(0,s.jsx)("ul",{className:"mt-2 space-y-1",children:el.map((e,t)=>(0,s.jsxs)("li",{className:"group flex items-start justify-between gap-2 rounded-md border border-white/5 bg-background/40 px-2 py-1",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"truncate font-mono text-[10px] text-sky-300/90",children:e.target}),(0,s.jsx)("div",{className:"text-[11px] text-foreground/90",children:e.question})]}),(0,s.jsx)("button",{onClick:()=>ei(e=>e.filter((e,n)=>n!==t)),title:"Remove",className:"shrink-0 rounded p-0.5 text-muted-foreground/70 opacity-0 transition-opacity hover:text-red-300 group-hover:opacity-100",children:(0,s.jsx)(g.A,{className:"size-3"})})]},t))}),(0,s.jsx)("p",{className:"mt-2 text-[10px] text-muted-foreground",children:"Questions are sent with your feedback on Submit — the agent answers them in its next round."})]}),(0,s.jsxs)("div",{ref:eN,className:"flex min-h-0 flex-1",children:[eR&&(0,s.jsx)(V,{markdown:n}),(0,s.jsxs)("div",{className:(0,A.cn)("relative flex min-w-0 flex-col",!ez&&"flex-1"),style:ez?{width:`${ew}%`}:void 0,children:[ez&&(0,s.jsx)("div",{className:"pointer-events-none absolute right-3 top-3 z-20",children:(0,s.jsx)("button",{onClick:()=>D(!0),title:"Expand the plan to full width",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(v.A,{className:"size-3.5"})})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:(0,s.jsx)(O,{markdown:n,round:C.proposedAt,onApi:_,hideSubmit:!0,getExtraSubmitPayload:eh})})]}),ez&&(0,s.jsx)("div",{onPointerDown:eA,className:"group relative w-px shrink-0 cursor-col-resize bg-white/5 hover:bg-white/15",title:"Drag to resize",children:(0,s.jsx)("div",{className:"absolute inset-y-0 -left-1.5 right-[-6px] z-10"})}),ez&&(0,s.jsxs)("div",{className:"relative flex min-w-0 flex-col",style:{width:`${100-ew}%`},children:[S&&z&&(0,s.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 z-20",children:(0,s.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-1 rounded-full p-0.5",children:[(0,s.jsx)(er,{active:"map"===T,onClick:()=>P("map"),icon:(0,s.jsx)(o.A,{className:"size-3"}),children:"Map"}),(0,s.jsx)(er,{active:"db"===T,onClick:()=>P("db"),icon:(0,s.jsx)(l.A,{className:"size-3"}),children:"Database"})]})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:"map"===T?(0,s.jsx)(ee.MapClient,{view:t.view,nodes:t.nodes,edges:t.edges,hasFrontend:t.hasFrontend,embedded:!0,commentsContent:eg,commentsCount:q?.annotationCount??0,controlRef:J,onAskAgent:ex,onAddComment:ej,annotations:q?.annotations,onPinClick:ey,onUpdateComment:q?.updateComment,onRemoveComment:q?.removeAnnotation}):(0,s.jsx)(et.DbMapClient,{tables:e.tables,relations:e.relations,endpoints:e.endpoints,draft:e.draft,workspaceId:e.workspaceId,diffBase:e.diffBase,embedded:!0,draftRef:Y,onEdit:eo,controlRef:W,commentsContent:eg,commentsCount:q?.annotationCount??0,onAddComment:ej,annotations:q?.annotations,onPinClick:ey,onUpdateComment:q?.updateComment,onRemoveComment:q?.removeAnnotation})})]})]})]})}function es({targets:e,onAdd:t,initialTarget:n}){let[a,o]=(0,r.useState)(n||e[0]||""),[l,i]=(0,r.useState)("");(0,r.useEffect)(()=>{n&&o(n)},[n]),(0,r.useEffect)(()=>{!a&&e[0]&&o(e[0])},[e,a]);let d=()=>{let e=l.trim();e&&(t({target:a||"(plan)",question:e}),i(""))};return(0,s.jsxs)("div",{className:"space-y-1.5",children:[e.length>0&&(0,s.jsx)("select",{value:a,onChange:e=>o(e.target.value),className:"w-full rounded border border-white/10 bg-background px-2 py-1 text-[11px] outline-none focus:border-sky-400/40",children:e.map(e=>(0,s.jsx)("option",{value:e,className:"bg-card",children:e},e))}),(0,s.jsx)("textarea",{value:l,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())},rows:2,placeholder:"e.g. why a new table instead of reusing users? (⌘/Ctrl+Enter to add)",className:"w-full resize-y rounded border border-white/10 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,s.jsx)("button",{onClick:d,disabled:!l.trim(),className:(0,A.cn)("w-full rounded-md px-2 py-1 text-[11px] font-semibold transition-colors",l.trim()?"bg-sky-500/15 text-sky-300 hover:bg-sky-500/25":"text-muted-foreground opacity-50"),children:"Add question"})]})}function er({active:e,onClick:t,icon:n,children:r}){return(0,s.jsxs)("button",{onClick:t,className:(0,A.cn)("flex items-center gap-1 rounded-md px-2.5 py-1 text-[11px] font-medium transition-colors",e?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:[n,r]})}},22137:(e,t,n)=>{Promise.resolve().then(n.bind(n,10396))},38332:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]])},48484:(e,t,n)=>{"use strict";n.d(t,{PlanProvider:()=>c,j:()=>u});var s=n(95155),r=n(12115),a=n(73321),o=n(60292),l=n(99979);let i={pending:!1,proposedAt:0,tables:0,endpoints:0,features:0},d=(0,r.createContext)(null);function c({children:e}){let t=(0,a.useRouter)(),[n,u]=(0,r.useState)(i),m=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/plan",{method:"GET",cache:"no-store",headers:(0,o.dh)((0,l.X0)())});if(!e.ok)return;let t=await e.json();u(t)}catch{}},[]);(0,r.useEffect)(()=>{m();let e=setInterval(()=>void m(),4e3);return()=>clearInterval(e)},[m]);let x=(0,r.useCallback)(async()=>{await fetch("/api/plan",{method:"DELETE",headers:(0,o.dh)((0,l.X0)())}).catch(()=>{}),u(i),t.refresh()},[t]),p=(0,r.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,o.dh)((0,l.X0)())}).catch(()=>{}),u(i),t.refresh()},[t]);return(0,s.jsx)(d.Provider,{value:{status:n,discard:x,approvePlan:p,refresh:m},children:e})}function u(){let e=(0,r.useContext)(d);if(!e)throw Error("usePlan must be used inside PlanProvider");return e}},50981:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},82879:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]])},92571:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},97358:(e,t,n)=>{"use strict";n.d(t,{pC:()=>s});let s=[{value:"default",label:"Manual approval",description:"Approve each tool call yourself — Claude Code's default."},{value:"acceptEdits",label:"Auto-accept edits",description:"Auto-approve file edits; still ask before running other tools."},{value:"bypassPermissions",label:"Bypass permissions",description:"Auto-approve every tool call (like --dangerously-skip-permissions)."},{value:"auto",label:"Auto",description:"Autonomous, gated by a safety classifier (needs a recent Claude Code + Sonnet 4.6+)."}]},99979:(e,t,n)=>{"use strict";function s(){return new URLSearchParams(window.location.search).get("ws")}function r(e){let t=new URLSearchParams,n=s();for(let[s,r]of(n&&t.set("ws",n),Object.entries(e??{})))t.set(s,r);let r=t.toString();return r?`/plan?${r}`:"/plan"}n.d(t,{X0:()=>s,rc:()=>r})}},e=>{e.O(0,[2574,3862,8500,4294,766,6955,4591,8441,3794,7358],()=>e(e.s=22137)),_N_E=e.O()}]);
|