journey-flow-editor 0.0.19 → 0.0.21
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/dist/flow/FlowEditorInner.d.ts.map +1 -1
- package/dist/index.cjs +30 -30
- package/dist/index.js +1419 -1411
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react/jsx-runtime"),F=require("react"),Wn=require("react-dom");function Ad(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const D=Ad(F),ag=Ad(Wn);function Qe(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=Qe(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var lg={value:()=>{}};function Ri(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Yr(n)}function Yr(e){this._=e}function cg(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Yr.prototype=Ri.prototype={constructor:Yr,on:function(e,t){var n=this._,o=cg(e+"",n),r,i=-1,a=o.length;if(arguments.length<2){for(;++i<a;)if((r=(e=o[i]).type)&&(r=ug(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<a;)if(r=(e=o[i]).type)n[r]=ql(n[r],e.name,t);else if(t==null)for(r in n)n[r]=ql(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Yr(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,i;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)}};function ug(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function ql(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=lg,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var ea="http://www.w3.org/1999/xhtml";const Yl={svg:"http://www.w3.org/2000/svg",xhtml:ea,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _i(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Yl.hasOwnProperty(t)?{space:Yl[t],local:e}:e}function dg(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ea&&t.documentElement.namespaceURI===ea?t.createElement(e):t.createElementNS(n,e)}}function fg(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Dd(e){var t=_i(e);return(t.local?fg:dg)(t)}function pg(){}function ja(e){return e==null?pg:function(){return this.querySelector(e)}}function hg(e){typeof e!="function"&&(e=ja(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,l=o[r]=new Array(a),c,u,d=0;d<a;++d)(c=i[d])&&(u=e.call(c,c.__data__,d,i))&&("__data__"in c&&(u.__data__=c.__data__),l[d]=u);return new bt(o,this._parents)}function mg(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function gg(){return[]}function jd(e){return e==null?gg:function(){return this.querySelectorAll(e)}}function yg(e){return function(){return mg(e.apply(this,arguments))}}function bg(e){typeof e=="function"?e=yg(e):e=jd(e);for(var t=this._groups,n=t.length,o=[],r=[],i=0;i<n;++i)for(var a=t[i],l=a.length,c,u=0;u<l;++u)(c=a[u])&&(o.push(e.call(c,c.__data__,u,a)),r.push(c));return new bt(o,r)}function Ld(e){return function(){return this.matches(e)}}function Fd(e){return function(t){return t.matches(e)}}var vg=Array.prototype.find;function xg(e){return function(){return vg.call(this.children,e)}}function wg(){return this.firstElementChild}function Sg(e){return this.select(e==null?wg:xg(typeof e=="function"?e:Fd(e)))}var Eg=Array.prototype.filter;function Cg(){return Array.from(this.children)}function Tg(e){return function(){return Eg.call(this.children,e)}}function Ng(e){return this.selectAll(e==null?Cg:Tg(typeof e=="function"?e:Fd(e)))}function kg(e){typeof e!="function"&&(e=Ld(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,l=o[r]=[],c,u=0;u<a;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new bt(o,this._parents)}function Bd(e){return new Array(e.length)}function Og(){return new bt(this._enter||this._groups.map(Bd),this._parents)}function ri(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ri.prototype={constructor:ri,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Pg(e){return function(){return e}}function Rg(e,t,n,o,r,i){for(var a=0,l,c=t.length,u=i.length;a<u;++a)(l=t[a])?(l.__data__=i[a],o[a]=l):n[a]=new ri(e,i[a]);for(;a<c;++a)(l=t[a])&&(r[a]=l)}function _g(e,t,n,o,r,i,a){var l,c,u=new Map,d=t.length,f=i.length,p=new Array(d),h;for(l=0;l<d;++l)(c=t[l])&&(p[l]=h=a.call(c,c.__data__,l,t)+"",u.has(h)?r[l]=c:u.set(h,c));for(l=0;l<f;++l)h=a.call(e,i[l],l,i)+"",(c=u.get(h))?(o[l]=c,c.__data__=i[l],u.delete(h)):n[l]=new ri(e,i[l]);for(l=0;l<d;++l)(c=t[l])&&u.get(p[l])===c&&(r[l]=c)}function Ig(e){return e.__data__}function Mg(e,t){if(!arguments.length)return Array.from(this,Ig);var n=t?_g:Rg,o=this._parents,r=this._groups;typeof e!="function"&&(e=Pg(e));for(var i=r.length,a=new Array(i),l=new Array(i),c=new Array(i),u=0;u<i;++u){var d=o[u],f=r[u],p=f.length,h=$g(e.call(d,d&&d.__data__,u,o)),g=h.length,m=l[u]=new Array(g),v=a[u]=new Array(g),b=c[u]=new Array(p);n(d,f,m,v,b,h,t);for(var C=0,y=0,x,w;C<g;++C)if(x=m[C]){for(C>=y&&(y=C+1);!(w=v[y])&&++y<g;);x._next=w||null}}return a=new bt(a,o),a._enter=l,a._exit=c,a}function $g(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ag(){return new bt(this._exit||this._groups.map(Bd),this._parents)}function Dg(e,t,n){var o=this.enter(),r=this,i=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),o&&r?o.merge(r).order():r}function jg(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,i=o.length,a=Math.min(r,i),l=new Array(r),c=0;c<a;++c)for(var u=n[c],d=o[c],f=u.length,p=l[c]=new Array(f),h,g=0;g<f;++g)(h=u[g]||d[g])&&(p[g]=h);for(;c<r;++c)l[c]=n[c];return new bt(l,this._parents)}function Lg(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,i=o[r],a;--r>=0;)(a=o[r])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function Fg(e){e||(e=Bg);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var a=n[i],l=a.length,c=r[i]=new Array(l),u,d=0;d<l;++d)(u=a[d])&&(c[d]=u);c.sort(t)}return new bt(r,this._parents).order()}function Bg(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function zg(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Vg(){return Array.from(this)}function Hg(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length;r<i;++r){var a=o[r];if(a)return a}return null}function Wg(){let e=0;for(const t of this)++e;return e}function Ug(){return!this.node()}function qg(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],i=0,a=r.length,l;i<a;++i)(l=r[i])&&e.call(l,l.__data__,i,r);return this}function Yg(e){return function(){this.removeAttribute(e)}}function Gg(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Kg(e,t){return function(){this.setAttribute(e,t)}}function Xg(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Zg(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Qg(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Jg(e,t){var n=_i(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Gg:Yg:typeof t=="function"?n.local?Qg:Zg:n.local?Xg:Kg)(n,t))}function zd(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ey(e){return function(){this.style.removeProperty(e)}}function ty(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ny(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function oy(e,t,n){return arguments.length>1?this.each((t==null?ey:typeof t=="function"?ny:ty)(e,t,n??"")):Jn(this.node(),e)}function Jn(e,t){return e.style.getPropertyValue(t)||zd(e).getComputedStyle(e,null).getPropertyValue(t)}function ry(e){return function(){delete this[e]}}function iy(e,t){return function(){this[e]=t}}function sy(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function ay(e,t){return arguments.length>1?this.each((t==null?ry:typeof t=="function"?sy:iy)(e,t)):this.node()[e]}function Vd(e){return e.trim().split(/^|\s+/)}function La(e){return e.classList||new Hd(e)}function Hd(e){this._node=e,this._names=Vd(e.getAttribute("class")||"")}Hd.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Wd(e,t){for(var n=La(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function Ud(e,t){for(var n=La(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function ly(e){return function(){Wd(this,e)}}function cy(e){return function(){Ud(this,e)}}function uy(e,t){return function(){(t.apply(this,arguments)?Wd:Ud)(this,e)}}function dy(e,t){var n=Vd(e+"");if(arguments.length<2){for(var o=La(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?uy:t?ly:cy)(n,t))}function fy(){this.textContent=""}function py(e){return function(){this.textContent=e}}function hy(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function my(e){return arguments.length?this.each(e==null?fy:(typeof e=="function"?hy:py)(e)):this.node().textContent}function gy(){this.innerHTML=""}function yy(e){return function(){this.innerHTML=e}}function by(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function vy(e){return arguments.length?this.each(e==null?gy:(typeof e=="function"?by:yy)(e)):this.node().innerHTML}function xy(){this.nextSibling&&this.parentNode.appendChild(this)}function wy(){return this.each(xy)}function Sy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ey(){return this.each(Sy)}function Cy(e){var t=typeof e=="function"?e:Dd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Ty(){return null}function Ny(e,t){var n=typeof e=="function"?e:Dd(e),o=t==null?Ty:typeof t=="function"?t:ja(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function ky(){var e=this.parentNode;e&&e.removeChild(this)}function Oy(){return this.each(ky)}function Py(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ry(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _y(e){return this.select(e?Ry:Py)}function Iy(e){return arguments.length?this.property("__data__",e):this.node().__data__}function My(e){return function(t){e.call(this,t,this.__data__)}}function $y(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Ay(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++o]=i;++o?t.length=o:delete this.__on}}}function Dy(e,t,n){return function(){var o=this.__on,r,i=My(t);if(o){for(var a=0,l=o.length;a<l;++a)if((r=o[a]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function jy(e,t,n){var o=$y(e+""),r,i=o.length,a;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,d;c<u;++c)for(r=0,d=l[c];r<i;++r)if((a=o[r]).type===d.type&&a.name===d.name)return d.value}return}for(l=t?Dy:Ay,r=0;r<i;++r)this.each(l(o[r],t,n));return this}function qd(e,t,n){var o=zd(e),r=o.CustomEvent;typeof r=="function"?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function Ly(e,t){return function(){return qd(this,e,t)}}function Fy(e,t){return function(){return qd(this,e,t.apply(this,arguments))}}function By(e,t){return this.each((typeof t=="function"?Fy:Ly)(e,t))}function*zy(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length,a;r<i;++r)(a=o[r])&&(yield a)}var Yd=[null];function bt(e,t){this._groups=e,this._parents=t}function ur(){return new bt([[document.documentElement]],Yd)}function Vy(){return this}bt.prototype=ur.prototype={constructor:bt,select:hg,selectAll:bg,selectChild:Sg,selectChildren:Ng,filter:kg,data:Mg,enter:Og,exit:Ag,join:Dg,merge:jg,selection:Vy,order:Lg,sort:Fg,call:zg,nodes:Vg,node:Hg,size:Wg,empty:Ug,each:qg,attr:Jg,style:oy,property:ay,classed:dy,text:my,html:vy,raise:wy,lower:Ey,append:Cy,insert:Ny,remove:Oy,clone:_y,datum:Iy,on:jy,dispatch:By,[Symbol.iterator]:zy};function pt(e){return typeof e=="string"?new bt([[document.querySelector(e)]],[document.documentElement]):new bt([[e]],Yd)}function Hy(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Tt(e,t){if(e=Hy(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const Wy={passive:!1},Yo={capture:!0,passive:!1};function ws(e){e.stopImmediatePropagation()}function Gn(e){e.preventDefault(),e.stopImmediatePropagation()}function Gd(e){var t=e.document.documentElement,n=pt(e).on("dragstart.drag",Gn,Yo);"onselectstart"in t?n.on("selectstart.drag",Gn,Yo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Kd(e,t){var n=e.document.documentElement,o=pt(e).on("dragstart.drag",null);t&&(o.on("click.drag",Gn,Yo),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const kr=e=>()=>e;function ta(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:i,x:a,y:l,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}ta.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Uy(e){return!e.ctrlKey&&!e.button}function qy(){return this.parentNode}function Yy(e,t){return t??{x:e.x,y:e.y}}function Gy(){return navigator.maxTouchPoints||"ontouchstart"in this}function Xd(){var e=Uy,t=qy,n=Yy,o=Gy,r={},i=Ri("start","drag","end"),a=0,l,c,u,d,f=0;function p(x){x.on("mousedown.drag",h).filter(o).on("touchstart.drag",v).on("touchmove.drag",b,Wy).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(x,w){if(!(d||!e.call(this,x,w))){var E=y(this,t.call(this,x,w),x,w,"mouse");E&&(pt(x.view).on("mousemove.drag",g,Yo).on("mouseup.drag",m,Yo),Gd(x.view),ws(x),u=!1,l=x.clientX,c=x.clientY,E("start",x))}}function g(x){if(Gn(x),!u){var w=x.clientX-l,E=x.clientY-c;u=w*w+E*E>f}r.mouse("drag",x)}function m(x){pt(x.view).on("mousemove.drag mouseup.drag",null),Kd(x.view,u),Gn(x),r.mouse("end",x)}function v(x,w){if(e.call(this,x,w)){var E=x.changedTouches,k=t.call(this,x,w),R=E.length,_,V;for(_=0;_<R;++_)(V=y(this,k,x,w,E[_].identifier,E[_]))&&(ws(x),V("start",x,E[_]))}}function b(x){var w=x.changedTouches,E=w.length,k,R;for(k=0;k<E;++k)(R=r[w[k].identifier])&&(Gn(x),R("drag",x,w[k]))}function C(x){var w=x.changedTouches,E=w.length,k,R;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),k=0;k<E;++k)(R=r[w[k].identifier])&&(ws(x),R("end",x,w[k]))}function y(x,w,E,k,R,_){var V=i.copy(),I=Tt(_||E,w),S,A,N;if((N=n.call(x,new ta("beforestart",{sourceEvent:E,target:p,identifier:R,active:a,x:I[0],y:I[1],dx:0,dy:0,dispatch:V}),k))!=null)return S=N.x-I[0]||0,A=N.y-I[1]||0,function O(P,L,M){var j=I,$;switch(P){case"start":r[R]=O,$=a++;break;case"end":delete r[R],--a;case"drag":I=Tt(M||L,w),$=a;break}V.call(P,x,new ta(P,{sourceEvent:L,subject:N,target:p,identifier:R,active:$,x:I[0]+S,y:I[1]+A,dx:I[0]-j[0],dy:I[1]-j[1],dispatch:V}),k)}}return p.filter=function(x){return arguments.length?(e=typeof x=="function"?x:kr(!!x),p):e},p.container=function(x){return arguments.length?(t=typeof x=="function"?x:kr(x),p):t},p.subject=function(x){return arguments.length?(n=typeof x=="function"?x:kr(x),p):n},p.touchable=function(x){return arguments.length?(o=typeof x=="function"?x:kr(!!x),p):o},p.on=function(){var x=i.on.apply(i,arguments);return x===i?p:x},p.clickDistance=function(x){return arguments.length?(f=(x=+x)*x,p):Math.sqrt(f)},p}function Fa(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Zd(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function dr(){}var Go=.7,ii=1/Go,Kn="\\s*([+-]?\\d+)\\s*",Ko="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ky=/^#([0-9a-f]{3,8})$/,Xy=new RegExp(`^rgb\\(${Kn},${Kn},${Kn}\\)$`),Zy=new RegExp(`^rgb\\(${Ht},${Ht},${Ht}\\)$`),Qy=new RegExp(`^rgba\\(${Kn},${Kn},${Kn},${Ko}\\)$`),Jy=new RegExp(`^rgba\\(${Ht},${Ht},${Ht},${Ko}\\)$`),eb=new RegExp(`^hsl\\(${Ko},${Ht},${Ht}\\)$`),tb=new RegExp(`^hsla\\(${Ko},${Ht},${Ht},${Ko}\\)$`),Gl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Fa(dr,Nn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Kl,formatHex:Kl,formatHex8:nb,formatHsl:ob,formatRgb:Xl,toString:Xl});function Kl(){return this.rgb().formatHex()}function nb(){return this.rgb().formatHex8()}function ob(){return Qd(this).formatHsl()}function Xl(){return this.rgb().formatRgb()}function Nn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ky.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Zl(t):n===3?new ct(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Or(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Or(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Xy.exec(e))?new ct(t[1],t[2],t[3],1):(t=Zy.exec(e))?new ct(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Qy.exec(e))?Or(t[1],t[2],t[3],t[4]):(t=Jy.exec(e))?Or(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=eb.exec(e))?ec(t[1],t[2]/100,t[3]/100,1):(t=tb.exec(e))?ec(t[1],t[2]/100,t[3]/100,t[4]):Gl.hasOwnProperty(e)?Zl(Gl[e]):e==="transparent"?new ct(NaN,NaN,NaN,0):null}function Zl(e){return new ct(e>>16&255,e>>8&255,e&255,1)}function Or(e,t,n,o){return o<=0&&(e=t=n=NaN),new ct(e,t,n,o)}function rb(e){return e instanceof dr||(e=Nn(e)),e?(e=e.rgb(),new ct(e.r,e.g,e.b,e.opacity)):new ct}function na(e,t,n,o){return arguments.length===1?rb(e):new ct(e,t,n,o??1)}function ct(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Fa(ct,na,Zd(dr,{brighter(e){return e=e==null?ii:Math.pow(ii,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Go:Math.pow(Go,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ct(En(this.r),En(this.g),En(this.b),si(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:Ql,formatHex:Ql,formatHex8:ib,formatRgb:Jl,toString:Jl}));function Ql(){return`#${xn(this.r)}${xn(this.g)}${xn(this.b)}`}function ib(){return`#${xn(this.r)}${xn(this.g)}${xn(this.b)}${xn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Jl(){const e=si(this.opacity);return`${e===1?"rgb(":"rgba("}${En(this.r)}, ${En(this.g)}, ${En(this.b)}${e===1?")":`, ${e})`}`}function si(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function En(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xn(e){return e=En(e),(e<16?"0":"")+e.toString(16)}function ec(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new kt(e,t,n,o)}function Qd(e){if(e instanceof kt)return new kt(e.h,e.s,e.l,e.opacity);if(e instanceof dr||(e=Nn(e)),!e)return new kt;if(e instanceof kt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),i=Math.max(t,n,o),a=NaN,l=i-r,c=(i+r)/2;return l?(t===i?a=(n-o)/l+(n<o)*6:n===i?a=(o-t)/l+2:a=(t-n)/l+4,l/=c<.5?i+r:2-i-r,a*=60):l=c>0&&c<1?0:a,new kt(a,l,c,e.opacity)}function sb(e,t,n,o){return arguments.length===1?Qd(e):new kt(e,t,n,o??1)}function kt(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Fa(kt,sb,Zd(dr,{brighter(e){return e=e==null?ii:Math.pow(ii,e),new kt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Go:Math.pow(Go,e),new kt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new ct(Ss(e>=240?e-240:e+120,r,o),Ss(e,r,o),Ss(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new kt(tc(this.h),Pr(this.s),Pr(this.l),si(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(){const e=si(this.opacity);return`${e===1?"hsl(":"hsla("}${tc(this.h)}, ${Pr(this.s)*100}%, ${Pr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function tc(e){return e=(e||0)%360,e<0?e+360:e}function Pr(e){return Math.max(0,Math.min(1,e||0))}function Ss(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Ba=e=>()=>e;function ab(e,t){return function(n){return e+n*t}}function lb(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function cb(e){return(e=+e)==1?Jd:function(t,n){return n-t?lb(t,n,e):Ba(isNaN(t)?n:t)}}function Jd(e,t){var n=t-e;return n?ab(e,n):Ba(isNaN(e)?t:e)}const ai=(function e(t){var n=cb(t);function o(r,i){var a=n((r=na(r)).r,(i=na(i)).r),l=n(r.g,i.g),c=n(r.b,i.b),u=Jd(r.opacity,i.opacity);return function(d){return r.r=a(d),r.g=l(d),r.b=c(d),r.opacity=u(d),r+""}}return o.gamma=e,o})(1);function ub(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(i){for(r=0;r<n;++r)o[r]=e[r]*(1-i)+t[r]*i;return o}}function db(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function fb(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),i=new Array(n),a;for(a=0;a<o;++a)r[a]=zo(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(l){for(a=0;a<o;++a)i[a]=r[a](l);return i}}function pb(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Lt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function hb(e,t){var n={},o={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=zo(e[r],t[r]):o[r]=t[r];return function(i){for(r in n)o[r]=n[r](i);return o}}var oa=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Es=new RegExp(oa.source,"g");function mb(e){return function(){return e}}function gb(e){return function(t){return e(t)+""}}function ef(e,t){var n=oa.lastIndex=Es.lastIndex=0,o,r,i,a=-1,l=[],c=[];for(e=e+"",t=t+"";(o=oa.exec(e))&&(r=Es.exec(t));)(i=r.index)>n&&(i=t.slice(n,i),l[a]?l[a]+=i:l[++a]=i),(o=o[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,c.push({i:a,x:Lt(o,r)})),n=Es.lastIndex;return n<t.length&&(i=t.slice(n),l[a]?l[a]+=i:l[++a]=i),l.length<2?c[0]?gb(c[0].x):mb(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)l[(f=c[d]).i]=f.x(u);return l.join("")})}function zo(e,t){var n=typeof t,o;return t==null||n==="boolean"?Ba(t):(n==="number"?Lt:n==="string"?(o=Nn(t))?(t=o,ai):ef:t instanceof Nn?ai:t instanceof Date?pb:db(t)?ub:Array.isArray(t)?fb:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?hb:Lt)(e,t)}var nc=180/Math.PI,ra={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tf(e,t,n,o,r,i){var a,l,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*n+t*o)&&(n-=e*c,o-=t*c),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,c/=l),e*o<t*n&&(e=-e,t=-t,c=-c,a=-a),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*nc,skewX:Math.atan(c)*nc,scaleX:a,scaleY:l}}var Rr;function yb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ra:tf(t.a,t.b,t.c,t.d,t.e,t.f)}function bb(e){return e==null||(Rr||(Rr=document.createElementNS("http://www.w3.org/2000/svg","g")),Rr.setAttribute("transform",e),!(e=Rr.transform.baseVal.consolidate()))?ra:(e=e.matrix,tf(e.a,e.b,e.c,e.d,e.e,e.f))}function nf(e,t,n,o){function r(u){return u.length?u.pop()+" ":""}function i(u,d,f,p,h,g){if(u!==f||d!==p){var m=h.push("translate(",null,t,null,n);g.push({i:m-4,x:Lt(u,f)},{i:m-2,x:Lt(d,p)})}else(f||p)&&h.push("translate("+f+t+p+n)}function a(u,d,f,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:f.push(r(f)+"rotate(",null,o)-2,x:Lt(u,d)})):d&&f.push(r(f)+"rotate("+d+o)}function l(u,d,f,p){u!==d?p.push({i:f.push(r(f)+"skewX(",null,o)-2,x:Lt(u,d)}):d&&f.push(r(f)+"skewX("+d+o)}function c(u,d,f,p,h,g){if(u!==f||d!==p){var m=h.push(r(h)+"scale(",null,",",null,")");g.push({i:m-4,x:Lt(u,f)},{i:m-2,x:Lt(d,p)})}else(f!==1||p!==1)&&h.push(r(h)+"scale("+f+","+p+")")}return function(u,d){var f=[],p=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,f,p),a(u.rotate,d.rotate,f,p),l(u.skewX,d.skewX,f,p),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,p),u=d=null,function(h){for(var g=-1,m=p.length,v;++g<m;)f[(v=p[g]).i]=v.x(h);return f.join("")}}}var vb=nf(yb,"px, ","px)","deg)"),xb=nf(bb,", ",")",")"),wb=1e-12;function oc(e){return((e=Math.exp(e))+1/e)/2}function Sb(e){return((e=Math.exp(e))-1/e)/2}function Eb(e){return((e=Math.exp(2*e))-1)/(e+1)}const Gr=(function e(t,n,o){function r(i,a){var l=i[0],c=i[1],u=i[2],d=a[0],f=a[1],p=a[2],h=d-l,g=f-c,m=h*h+g*g,v,b;if(m<wb)b=Math.log(p/u)/t,v=function(k){return[l+k*h,c+k*g,u*Math.exp(t*k*b)]};else{var C=Math.sqrt(m),y=(p*p-u*u+o*m)/(2*u*n*C),x=(p*p-u*u-o*m)/(2*p*n*C),w=Math.log(Math.sqrt(y*y+1)-y),E=Math.log(Math.sqrt(x*x+1)-x);b=(E-w)/t,v=function(k){var R=k*b,_=oc(w),V=u/(n*C)*(_*Eb(t*R+w)-Sb(w));return[l+V*h,c+V*g,u*_/oc(t*R+w)]}}return v.duration=b*1e3*t/Math.SQRT2,v}return r.rho=function(i){var a=Math.max(.001,+i),l=a*a,c=l*l;return e(a,l,c)},r})(Math.SQRT2,2,4);var eo=0,Io=0,wo=0,of=1e3,li,Mo,ci=0,kn=0,Ii=0,Xo=typeof performance=="object"&&performance.now?performance:Date,rf=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function za(){return kn||(rf(Cb),kn=Xo.now()+Ii)}function Cb(){kn=0}function ui(){this._call=this._time=this._next=null}ui.prototype=sf.prototype={constructor:ui,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?za():+n)+(t==null?0:+t),!this._next&&Mo!==this&&(Mo?Mo._next=this:li=this,Mo=this),this._call=e,this._time=n,ia()},stop:function(){this._call&&(this._call=null,this._time=1/0,ia())}};function sf(e,t,n){var o=new ui;return o.restart(e,t,n),o}function Tb(){za(),++eo;for(var e=li,t;e;)(t=kn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--eo}function rc(){kn=(ci=Xo.now())+Ii,eo=Io=0;try{Tb()}finally{eo=0,kb(),kn=0}}function Nb(){var e=Xo.now(),t=e-ci;t>of&&(Ii-=t,ci=e)}function kb(){for(var e,t=li,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:li=n);Mo=e,ia(o)}function ia(e){if(!eo){Io&&(Io=clearTimeout(Io));var t=e-kn;t>24?(e<1/0&&(Io=setTimeout(rc,e-Xo.now()-Ii)),wo&&(wo=clearInterval(wo))):(wo||(ci=Xo.now(),wo=setInterval(Nb,of)),eo=1,rf(rc))}}function ic(e,t,n){var o=new ui;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var Ob=Ri("start","end","cancel","interrupt"),Pb=[],af=0,sc=1,sa=2,Kr=3,ac=4,aa=5,Xr=6;function Mi(e,t,n,o,r,i){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Rb(e,n,{name:t,index:o,group:r,on:Ob,tween:Pb,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:af})}function Va(e,t){var n=Mt(e,t);if(n.state>af)throw new Error("too late; already scheduled");return n}function Ut(e,t){var n=Mt(e,t);if(n.state>Kr)throw new Error("too late; already running");return n}function Mt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Rb(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=sf(i,0,n.time);function i(u){n.state=sc,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var d,f,p,h;if(n.state!==sc)return c();for(d in o)if(h=o[d],h.name===n.name){if(h.state===Kr)return ic(a);h.state===ac?(h.state=Xr,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[d]):+d<t&&(h.state=Xr,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[d])}if(ic(function(){n.state===Kr&&(n.state=ac,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=sa,n.on.call("start",e,e.__data__,n.index,n.group),n.state===sa){for(n.state=Kr,r=new Array(p=n.tween.length),d=0,f=-1;d<p;++d)(h=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(r[++f]=h);r.length=f+1}}function l(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=aa,1),f=-1,p=r.length;++f<p;)r[f].call(e,d);n.state===aa&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=Xr,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Zr(e,t){var n=e.__transition,o,r,i=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((o=n[a]).name!==t){i=!1;continue}r=o.state>sa&&o.state<aa,o.state=Xr,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[a]}i&&delete e.__transition}}function _b(e){return this.each(function(){Zr(this,e)})}function Ib(e,t){var n,o;return function(){var r=Ut(this,e),i=r.tween;if(i!==n){o=n=i;for(var a=0,l=o.length;a<l;++a)if(o[a].name===t){o=o.slice(),o.splice(a,1);break}}r.tween=o}}function Mb(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var i=Ut(this,e),a=i.tween;if(a!==o){r=(o=a).slice();for(var l={name:t,value:n},c=0,u=r.length;c<u;++c)if(r[c].name===t){r[c]=l;break}c===u&&r.push(l)}i.tween=r}}function $b(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Mt(this.node(),n).tween,r=0,i=o.length,a;r<i;++r)if((a=o[r]).name===e)return a.value;return null}return this.each((t==null?Ib:Mb)(n,e,t))}function Ha(e,t,n){var o=e._id;return e.each(function(){var r=Ut(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return Mt(r,o).value[t]}}function lf(e,t){var n;return(typeof t=="number"?Lt:t instanceof Nn?ai:(n=Nn(t))?(t=n,ai):ef)(e,t)}function Ab(e){return function(){this.removeAttribute(e)}}function Db(e){return function(){this.removeAttributeNS(e.space,e.local)}}function jb(e,t,n){var o,r=n+"",i;return function(){var a=this.getAttribute(e);return a===r?null:a===o?i:i=t(o=a,n)}}function Lb(e,t,n){var o,r=n+"",i;return function(){var a=this.getAttributeNS(e.space,e.local);return a===r?null:a===o?i:i=t(o=a,n)}}function Fb(e,t,n){var o,r,i;return function(){var a,l=n(this),c;return l==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=l+"",a===c?null:a===o&&c===r?i:(r=c,i=t(o=a,l)))}}function Bb(e,t,n){var o,r,i;return function(){var a,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=l+"",a===c?null:a===o&&c===r?i:(r=c,i=t(o=a,l)))}}function zb(e,t){var n=_i(e),o=n==="transform"?xb:lf;return this.attrTween(e,typeof t=="function"?(n.local?Bb:Fb)(n,o,Ha(this,"attr."+e,t)):t==null?(n.local?Db:Ab)(n):(n.local?Lb:jb)(n,o,t))}function Vb(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Hb(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Wb(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Hb(e,i)),n}return r._value=t,r}function Ub(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Vb(e,i)),n}return r._value=t,r}function qb(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=_i(e);return this.tween(n,(o.local?Wb:Ub)(o,t))}function Yb(e,t){return function(){Va(this,e).delay=+t.apply(this,arguments)}}function Gb(e,t){return t=+t,function(){Va(this,e).delay=t}}function Kb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Yb:Gb)(t,e)):Mt(this.node(),t).delay}function Xb(e,t){return function(){Ut(this,e).duration=+t.apply(this,arguments)}}function Zb(e,t){return t=+t,function(){Ut(this,e).duration=t}}function Qb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Xb:Zb)(t,e)):Mt(this.node(),t).duration}function Jb(e,t){if(typeof t!="function")throw new Error;return function(){Ut(this,e).ease=t}}function e0(e){var t=this._id;return arguments.length?this.each(Jb(t,e)):Mt(this.node(),t).ease}function t0(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ut(this,e).ease=n}}function n0(e){if(typeof e!="function")throw new Error;return this.each(t0(this._id,e))}function o0(e){typeof e!="function"&&(e=Ld(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,l=o[r]=[],c,u=0;u<a;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new Xt(o,this._parents,this._name,this._id)}function r0(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,i=Math.min(o,r),a=new Array(o),l=0;l<i;++l)for(var c=t[l],u=n[l],d=c.length,f=a[l]=new Array(d),p,h=0;h<d;++h)(p=c[h]||u[h])&&(f[h]=p);for(;l<o;++l)a[l]=t[l];return new Xt(a,this._parents,this._name,this._id)}function i0(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function s0(e,t,n){var o,r,i=i0(t)?Va:Ut;return function(){var a=i(this,e),l=a.on;l!==o&&(r=(o=l).copy()).on(t,n),a.on=r}}function a0(e,t){var n=this._id;return arguments.length<2?Mt(this.node(),n).on.on(e):this.each(s0(n,e,t))}function l0(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function c0(){return this.on("end.remove",l0(this._id))}function u0(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ja(e));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a<r;++a)for(var l=o[a],c=l.length,u=i[a]=new Array(c),d,f,p=0;p<c;++p)(d=l[p])&&(f=e.call(d,d.__data__,p,l))&&("__data__"in d&&(f.__data__=d.__data__),u[p]=f,Mi(u[p],t,n,p,u,Mt(d,n)));return new Xt(i,this._parents,t,n)}function d0(e){var t=this._name,n=this._id;typeof e!="function"&&(e=jd(e));for(var o=this._groups,r=o.length,i=[],a=[],l=0;l<r;++l)for(var c=o[l],u=c.length,d,f=0;f<u;++f)if(d=c[f]){for(var p=e.call(d,d.__data__,f,c),h,g=Mt(d,n),m=0,v=p.length;m<v;++m)(h=p[m])&&Mi(h,t,n,m,p,g);i.push(p),a.push(d)}return new Xt(i,a,t,n)}var f0=ur.prototype.constructor;function p0(){return new f0(this._groups,this._parents)}function h0(e,t){var n,o,r;return function(){var i=Jn(this,e),a=(this.style.removeProperty(e),Jn(this,e));return i===a?null:i===n&&a===o?r:r=t(n=i,o=a)}}function cf(e){return function(){this.style.removeProperty(e)}}function m0(e,t,n){var o,r=n+"",i;return function(){var a=Jn(this,e);return a===r?null:a===o?i:i=t(o=a,n)}}function g0(e,t,n){var o,r,i;return function(){var a=Jn(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),Jn(this,e))),a===c?null:a===o&&c===r?i:(r=c,i=t(o=a,l))}}function y0(e,t){var n,o,r,i="style."+t,a="end."+i,l;return function(){var c=Ut(this,e),u=c.on,d=c.value[i]==null?l||(l=cf(t)):void 0;(u!==n||r!==d)&&(o=(n=u).copy()).on(a,r=d),c.on=o}}function b0(e,t,n){var o=(e+="")=="transform"?vb:lf;return t==null?this.styleTween(e,h0(e,o)).on("end.style."+e,cf(e)):typeof t=="function"?this.styleTween(e,g0(e,o,Ha(this,"style."+e,t))).each(y0(this._id,e)):this.styleTween(e,m0(e,o,t),n).on("end.style."+e,null)}function v0(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function x0(e,t,n){var o,r;function i(){var a=t.apply(this,arguments);return a!==r&&(o=(r=a)&&v0(e,a,n)),o}return i._value=t,i}function w0(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,x0(e,t,n??""))}function S0(e){return function(){this.textContent=e}}function E0(e){return function(){var t=e(this);this.textContent=t??""}}function C0(e){return this.tween("text",typeof e=="function"?E0(Ha(this,"text",e)):S0(e==null?"":e+""))}function T0(e){return function(t){this.textContent=e.call(this,t)}}function N0(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&T0(r)),t}return o._value=e,o}function k0(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,N0(e))}function O0(){for(var e=this._name,t=this._id,n=uf(),o=this._groups,r=o.length,i=0;i<r;++i)for(var a=o[i],l=a.length,c,u=0;u<l;++u)if(c=a[u]){var d=Mt(c,t);Mi(c,e,n,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Xt(o,this._parents,e,n)}function P0(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(i,a){var l={value:a},c={value:function(){--r===0&&i()}};n.each(function(){var u=Ut(this,o),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),u.on=t}),r===0&&i()})}var R0=0;function Xt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function uf(){return++R0}var qt=ur.prototype;Xt.prototype={constructor:Xt,select:u0,selectAll:d0,selectChild:qt.selectChild,selectChildren:qt.selectChildren,filter:o0,merge:r0,selection:p0,transition:O0,call:qt.call,nodes:qt.nodes,node:qt.node,size:qt.size,empty:qt.empty,each:qt.each,on:a0,attr:zb,attrTween:qb,style:b0,styleTween:w0,text:C0,textTween:k0,remove:c0,tween:$b,delay:Kb,duration:Qb,ease:e0,easeVarying:n0,end:P0,[Symbol.iterator]:qt[Symbol.iterator]};function _0(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var I0={time:null,delay:0,duration:250,ease:_0};function M0(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function $0(e){var t,n;e instanceof Xt?(t=e._id,e=e._name):(t=uf(),(n=I0).time=za(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var a=o[i],l=a.length,c,u=0;u<l;++u)(c=a[u])&&Mi(c,e,t,u,a,n||M0(c,t));return new Xt(o,this._parents,e,t)}ur.prototype.interrupt=_b;ur.prototype.transition=$0;const _r=e=>()=>e;function A0(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function Kt(e,t,n){this.k=e,this.x=t,this.y=n}Kt.prototype={constructor:Kt,scale:function(e){return e===1?this:new Kt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Kt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var $i=new Kt(1,0,0);df.prototype=Kt.prototype;function df(e){for(;!e.__zoom;)if(!(e=e.parentNode))return $i;return e.__zoom}function Cs(e){e.stopImmediatePropagation()}function So(e){e.preventDefault(),e.stopImmediatePropagation()}function D0(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function j0(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function lc(){return this.__zoom||$i}function L0(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function F0(){return navigator.maxTouchPoints||"ontouchstart"in this}function B0(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function ff(){var e=D0,t=j0,n=B0,o=L0,r=F0,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],l=250,c=Gr,u=Ri("start","zoom","end"),d,f,p,h=500,g=150,m=0,v=10;function b(N){N.property("__zoom",lc).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",_).on("dblclick.zoom",V).filter(r).on("touchstart.zoom",I).on("touchmove.zoom",S).on("touchend.zoom touchcancel.zoom",A).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(N,O,P,L){var M=N.selection?N.selection():N;M.property("__zoom",lc),N!==M?w(N,O,P,L):M.interrupt().each(function(){E(this,arguments).event(L).start().zoom(null,typeof O=="function"?O.apply(this,arguments):O).end()})},b.scaleBy=function(N,O,P,L){b.scaleTo(N,function(){var M=this.__zoom.k,j=typeof O=="function"?O.apply(this,arguments):O;return M*j},P,L)},b.scaleTo=function(N,O,P,L){b.transform(N,function(){var M=t.apply(this,arguments),j=this.__zoom,$=P==null?x(M):typeof P=="function"?P.apply(this,arguments):P,B=j.invert($),H=typeof O=="function"?O.apply(this,arguments):O;return n(y(C(j,H),$,B),M,a)},P,L)},b.translateBy=function(N,O,P,L){b.transform(N,function(){return n(this.__zoom.translate(typeof O=="function"?O.apply(this,arguments):O,typeof P=="function"?P.apply(this,arguments):P),t.apply(this,arguments),a)},null,L)},b.translateTo=function(N,O,P,L,M){b.transform(N,function(){var j=t.apply(this,arguments),$=this.__zoom,B=L==null?x(j):typeof L=="function"?L.apply(this,arguments):L;return n($i.translate(B[0],B[1]).scale($.k).translate(typeof O=="function"?-O.apply(this,arguments):-O,typeof P=="function"?-P.apply(this,arguments):-P),j,a)},L,M)};function C(N,O){return O=Math.max(i[0],Math.min(i[1],O)),O===N.k?N:new Kt(O,N.x,N.y)}function y(N,O,P){var L=O[0]-P[0]*N.k,M=O[1]-P[1]*N.k;return L===N.x&&M===N.y?N:new Kt(N.k,L,M)}function x(N){return[(+N[0][0]+ +N[1][0])/2,(+N[0][1]+ +N[1][1])/2]}function w(N,O,P,L){N.on("start.zoom",function(){E(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(L).end()}).tween("zoom",function(){var M=this,j=arguments,$=E(M,j).event(L),B=t.apply(M,j),H=P==null?x(B):typeof P=="function"?P.apply(M,j):P,U=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),W=M.__zoom,K=typeof O=="function"?O.apply(M,j):O,Q=c(W.invert(H).concat(U/W.k),K.invert(H).concat(U/K.k));return function(ee){if(ee===1)ee=K;else{var q=Q(ee),J=U/q[2];ee=new Kt(J,H[0]-q[0]*J,H[1]-q[1]*J)}$.zoom(null,ee)}})}function E(N,O,P){return!P&&N.__zooming||new k(N,O)}function k(N,O){this.that=N,this.args=O,this.active=0,this.sourceEvent=null,this.extent=t.apply(N,O),this.taps=0}k.prototype={event:function(N){return N&&(this.sourceEvent=N),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(N,O){return this.mouse&&N!=="mouse"&&(this.mouse[1]=O.invert(this.mouse[0])),this.touch0&&N!=="touch"&&(this.touch0[1]=O.invert(this.touch0[0])),this.touch1&&N!=="touch"&&(this.touch1[1]=O.invert(this.touch1[0])),this.that.__zoom=O,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(N){var O=pt(this.that).datum();u.call(N,this.that,new A0(N,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),O)}};function R(N,...O){if(!e.apply(this,arguments))return;var P=E(this,O).event(N),L=this.__zoom,M=Math.max(i[0],Math.min(i[1],L.k*Math.pow(2,o.apply(this,arguments)))),j=Tt(N);if(P.wheel)(P.mouse[0][0]!==j[0]||P.mouse[0][1]!==j[1])&&(P.mouse[1]=L.invert(P.mouse[0]=j)),clearTimeout(P.wheel);else{if(L.k===M)return;P.mouse=[j,L.invert(j)],Zr(this),P.start()}So(N),P.wheel=setTimeout($,g),P.zoom("mouse",n(y(C(L,M),P.mouse[0],P.mouse[1]),P.extent,a));function $(){P.wheel=null,P.end()}}function _(N,...O){if(p||!e.apply(this,arguments))return;var P=N.currentTarget,L=E(this,O,!0).event(N),M=pt(N.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",U,!0),j=Tt(N,P),$=N.clientX,B=N.clientY;Gd(N.view),Cs(N),L.mouse=[j,this.__zoom.invert(j)],Zr(this),L.start();function H(W){if(So(W),!L.moved){var K=W.clientX-$,Q=W.clientY-B;L.moved=K*K+Q*Q>m}L.event(W).zoom("mouse",n(y(L.that.__zoom,L.mouse[0]=Tt(W,P),L.mouse[1]),L.extent,a))}function U(W){M.on("mousemove.zoom mouseup.zoom",null),Kd(W.view,L.moved),So(W),L.event(W).end()}}function V(N,...O){if(e.apply(this,arguments)){var P=this.__zoom,L=Tt(N.changedTouches?N.changedTouches[0]:N,this),M=P.invert(L),j=P.k*(N.shiftKey?.5:2),$=n(y(C(P,j),L,M),t.apply(this,O),a);So(N),l>0?pt(this).transition().duration(l).call(w,$,L,N):pt(this).call(b.transform,$,L,N)}}function I(N,...O){if(e.apply(this,arguments)){var P=N.touches,L=P.length,M=E(this,O,N.changedTouches.length===L).event(N),j,$,B,H;for(Cs(N),$=0;$<L;++$)B=P[$],H=Tt(B,this),H=[H,this.__zoom.invert(H),B.identifier],M.touch0?!M.touch1&&M.touch0[2]!==H[2]&&(M.touch1=H,M.taps=0):(M.touch0=H,j=!0,M.taps=1+!!d);d&&(d=clearTimeout(d)),j&&(M.taps<2&&(f=H[0],d=setTimeout(function(){d=null},h)),Zr(this),M.start())}}function S(N,...O){if(this.__zooming){var P=E(this,O).event(N),L=N.changedTouches,M=L.length,j,$,B,H;for(So(N),j=0;j<M;++j)$=L[j],B=Tt($,this),P.touch0&&P.touch0[2]===$.identifier?P.touch0[0]=B:P.touch1&&P.touch1[2]===$.identifier&&(P.touch1[0]=B);if($=P.that.__zoom,P.touch1){var U=P.touch0[0],W=P.touch0[1],K=P.touch1[0],Q=P.touch1[1],ee=(ee=K[0]-U[0])*ee+(ee=K[1]-U[1])*ee,q=(q=Q[0]-W[0])*q+(q=Q[1]-W[1])*q;$=C($,Math.sqrt(ee/q)),B=[(U[0]+K[0])/2,(U[1]+K[1])/2],H=[(W[0]+Q[0])/2,(W[1]+Q[1])/2]}else if(P.touch0)B=P.touch0[0],H=P.touch0[1];else return;P.zoom("touch",n(y($,B,H),P.extent,a))}}function A(N,...O){if(this.__zooming){var P=E(this,O).event(N),L=N.changedTouches,M=L.length,j,$;for(Cs(N),p&&clearTimeout(p),p=setTimeout(function(){p=null},h),j=0;j<M;++j)$=L[j],P.touch0&&P.touch0[2]===$.identifier?delete P.touch0:P.touch1&&P.touch1[2]===$.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&($=Tt($,this),Math.hypot(f[0]-$[0],f[1]-$[1])<v)){var B=pt(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return b.wheelDelta=function(N){return arguments.length?(o=typeof N=="function"?N:_r(+N),b):o},b.filter=function(N){return arguments.length?(e=typeof N=="function"?N:_r(!!N),b):e},b.touchable=function(N){return arguments.length?(r=typeof N=="function"?N:_r(!!N),b):r},b.extent=function(N){return arguments.length?(t=typeof N=="function"?N:_r([[+N[0][0],+N[0][1]],[+N[1][0],+N[1][1]]]),b):t},b.scaleExtent=function(N){return arguments.length?(i[0]=+N[0],i[1]=+N[1],b):[i[0],i[1]]},b.translateExtent=function(N){return arguments.length?(a[0][0]=+N[0][0],a[1][0]=+N[1][0],a[0][1]=+N[0][1],a[1][1]=+N[1][1],b):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},b.constrain=function(N){return arguments.length?(n=N,b):n},b.duration=function(N){return arguments.length?(l=+N,b):l},b.interpolate=function(N){return arguments.length?(c=N,b):c},b.on=function(){var N=u.on.apply(u,arguments);return N===u?b:N},b.clickDistance=function(N){return arguments.length?(m=(N=+N)*N,b):Math.sqrt(m)},b.tapDistance=function(N){return arguments.length?(v=+N,b):v},b}const lt={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.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:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow 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:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/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."},Zo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],pf=["Enter"," ","Escape"],hf={"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:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, 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"};var to;(function(e){e.Strict="strict",e.Loose="loose"})(to||(to={}));var Cn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Cn||(Cn={}));var Qo;(function(e){e.Partial="partial",e.Full="full"})(Qo||(Qo={}));const mf={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var nn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(nn||(nn={}));var Jo;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Jo||(Jo={}));var pe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(pe||(pe={}));const cc={[pe.Left]:pe.Right,[pe.Right]:pe.Left,[pe.Top]:pe.Bottom,[pe.Bottom]:pe.Top};function gf(e){return e===null?null:e?"valid":"invalid"}const yf=e=>"id"in e&&"source"in e&&"target"in e,z0=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Wa=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),fr=(e,t=[0,0])=>{const{width:n,height:o}=Qt(e),r=e.origin??t,i=n*r[0],a=o*r[1];return{x:e.position.x-i,y:e.position.y-a}},V0=(e,t={nodeOrigin:[0,0]})=>{if(process.env.NODE_ENV==="development"&&!t.nodeLookup&&console.warn("Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows."),e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((o,r)=>{const i=typeof r=="string";let a=!t.nodeLookup&&!i?r:void 0;t.nodeLookup&&(a=i?t.nodeLookup.get(r):Wa(r)?r:t.nodeLookup.get(r.id));const l=a?di(a,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ai(o,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Di(n)},pr=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(r=>{(t.filter===void 0||t.filter(r))&&(n=Ai(n,di(r)),o=!0)}),o?Di(n):{x:0,y:0,width:0,height:0}},Ua=(e,t,[n,o,r]=[0,0,1],i=!1,a=!1)=>{const l={...mr(t,[n,o,r]),width:t.width/r,height:t.height/r},c=[];for(const u of e.values()){const{measured:d,selectable:f=!0,hidden:p=!1}=u;if(a&&!f||p)continue;const h=d.width??u.width??u.initialWidth??null,g=d.height??u.height??u.initialHeight??null,m=er(l,oo(u)),v=(h??0)*(g??0),b=i&&m>0;(!u.internals.handleBounds||b||m>=v||u.dragging)&&c.push(u)}return c},H0=(e,t)=>{const n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function W0(e,t){const n=new Map,o=t?.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&(t?.includeHiddenNodes||!r.hidden)&&(!o||o.has(r.id))&&n.set(r.id,r)}),n}async function U0({nodes:e,width:t,height:n,panZoom:o,minZoom:r,maxZoom:i},a){if(e.size===0)return Promise.resolve(!0);const l=W0(e,a),c=pr(l),u=qa(c,t,n,a?.minZoom??r,a?.maxZoom??i,a?.padding??.1);return await o.setViewport(u,{duration:a?.duration,ease:a?.ease,interpolate:a?.interpolate}),Promise.resolve(!0)}function bf({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:i}){const a=n.get(e),l=a.parentId?n.get(a.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},d=a.origin??o;let f=a.extent||r;if(a.extent==="parent"&&!a.expandParent)if(!l)i?.("005",lt.error005());else{const h=l.measured.width,g=l.measured.height;h&&g&&(f=[[c,u],[c+h,u+g]])}else l&&ro(a.extent)&&(f=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const p=ro(f)?On(t,f,a.measured):t;return(a.measured.width===void 0||a.measured.height===void 0)&&i?.("015",lt.error015()),{position:{x:p.x-c+(a.measured.width??0)*d[0],y:p.y-u+(a.measured.height??0)*d[1]},positionAbsolute:p}}async function q0({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){const i=new Set(e.map(p=>p.id)),a=[];for(const p of n){if(p.deletable===!1)continue;const h=i.has(p.id),g=!h&&p.parentId&&a.find(m=>m.id===p.parentId);(h||g)&&a.push(p)}const l=new Set(t.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),d=H0(a,c);for(const p of c)l.has(p.id)&&!d.find(g=>g.id===p.id)&&d.push(p);if(!r)return{edges:d,nodes:a};const f=await r({nodes:a,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:a}:{edges:[],nodes:[]}:f}const no=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),On=(e={x:0,y:0},t,n)=>({x:no(e.x,t[0][0],t[1][0]-(n?.width??0)),y:no(e.y,t[0][1],t[1][1]-(n?.height??0))});function vf(e,t,n){const{width:o,height:r}=Qt(n),{x:i,y:a}=n.internals.positionAbsolute;return On(e,[[i,a],[i+o,a+r]],t)}const uc=(e,t,n)=>e<t?no(Math.abs(e-t),1,t)/t:e>n?-no(Math.abs(e-n),1,t)/t:0,xf=(e,t,n=15,o=40)=>{const r=uc(e.x,o,t.width-o)*n,i=uc(e.y,o,t.height-o)*n;return[r,i]},Ai=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),la=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),Di=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),oo=(e,t=[0,0])=>{const{x:n,y:o}=Wa(e)?e.internals.positionAbsolute:fr(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},di=(e,t=[0,0])=>{const{x:n,y:o}=Wa(e)?e.internals.positionAbsolute:fr(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},wf=(e,t)=>Di(Ai(la(e),la(t))),er=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},dc=e=>Ot(e.width)&&Ot(e.height)&&Ot(e.x)&&Ot(e.y),Ot=e=>!isNaN(e)&&isFinite(e),fi=(e,t)=>{process.env.NODE_ENV==="development"&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)},hr=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),mr=({x:e,y:t},[n,o,r],i=!1,a=[1,1])=>{const l={x:(e-n)/r,y:(t-o)/r};return i?hr(l,a):l},pi=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o});function An(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Y0(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=An(e,n),r=An(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=An(e.top??e.y??0,n),r=An(e.bottom??e.y??0,n),i=An(e.left??e.x??0,t),a=An(e.right??e.x??0,t);return{top:o,right:a,bottom:r,left:i,x:i+a,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function G0(e,t,n,o,r,i){const{x:a,y:l}=pi(e,[t,n,o]),{x:c,y:u}=pi({x:e.x+e.width,y:e.y+e.height},[t,n,o]),d=r-c,f=i-u;return{left:Math.floor(a),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(f)}}const qa=(e,t,n,o,r,i)=>{const a=Y0(i,t,n),l=(t-a.x)/e.width,c=(n-a.y)/e.height,u=Math.min(l,c),d=no(u,o,r),f=e.x+e.width/2,p=e.y+e.height/2,h=t/2-f*d,g=n/2-p*d,m=G0(e,h,g,d,t,n),v={left:Math.min(m.left-a.left,0),top:Math.min(m.top-a.top,0),right:Math.min(m.right-a.right,0),bottom:Math.min(m.bottom-a.bottom,0)};return{x:h-v.left+v.right,y:g-v.top+v.bottom,zoom:d}},tr=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function ro(e){return e!=null&&e!=="parent"}function Qt(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Ya(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function Sf(e,t={width:0,height:0},n,o,r){const i={...e},a=o.get(n);if(a){const l=a.origin||r;i.x+=a.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=a.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function fc(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function K0(){let e,t;return{promise:new Promise((o,r)=>{e=o,t=r}),resolve:e,reject:t}}function X0(e){return{...hf,...e||{}}}function Vo(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){const{x:i,y:a}=Pt(e),l=mr({x:i-(r?.left??0),y:a-(r?.top??0)},o),{x:c,y:u}=n?hr(l,t):l;return{xSnapped:c,ySnapped:u,...l}}const Ga=e=>({width:e.offsetWidth,height:e.offsetHeight}),Ef=e=>e?.getRootNode?.()||window?.document,Z0=["INPUT","SELECT","TEXTAREA"];function Cf(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:Z0.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Tf=e=>"clientX"in e,Pt=(e,t)=>{const n=Tf(e),o=n?e.clientX:e.touches?.[0].clientX,r=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:r-(t?.top??0)}},pc=(e,t,n,o,r)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(a=>{const l=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:r,position:a.getAttribute("data-handlepos"),x:(l.left-n.left)/o,y:(l.top-n.top)/o,...Ga(a)}})};function Nf({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:i,targetControlX:a,targetControlY:l}){const c=e*.125+r*.375+a*.375+n*.125,u=t*.125+i*.375+l*.375+o*.125,d=Math.abs(c-e),f=Math.abs(u-t);return[c,u,d,f]}function Ir(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function hc({pos:e,x1:t,y1:n,x2:o,y2:r,c:i}){switch(e){case pe.Left:return[t-Ir(t-o,i),n];case pe.Right:return[t+Ir(o-t,i),n];case pe.Top:return[t,n-Ir(n-r,i)];case pe.Bottom:return[t,n+Ir(r-n,i)]}}function Ka({sourceX:e,sourceY:t,sourcePosition:n=pe.Bottom,targetX:o,targetY:r,targetPosition:i=pe.Top,curvature:a=.25}){const[l,c]=hc({pos:n,x1:e,y1:t,x2:o,y2:r,c:a}),[u,d]=hc({pos:i,x1:o,y1:r,x2:e,y2:t,c:a}),[f,p,h,g]=Nf({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${t} C${l},${c} ${u},${d} ${o},${r}`,f,p,h,g]}function kf({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,a=Math.abs(o-t)/2,l=o<t?o+a:o-a;return[i,l,r,a]}function Q0({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1,zIndexMode:i="basic"}){if(i==="manual")return o;const a=r&&n?o+1e3:o,l=Math.max(e.parentId||r&&e.selected?e.internals.z:0,t.parentId||r&&t.selected?t.internals.z:0);return a+l}function J0({sourceNode:e,targetNode:t,width:n,height:o,transform:r}){const i=Ai(di(e),di(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const a={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return er(a,Di(i))>0}const Of=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,ev=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),tv=(e,t,n={})=>{if(!e.source||!e.target)return fi("006",lt.error006()),t;const o=n.getEdgeId||Of;let r;return yf(e)?r={...e}:r={...e,id:o(e)},ev(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))},nv=(e,t,n,o={shouldReplaceId:!0})=>{const{id:r,...i}=e;if(!t.source||!t.target)return fi("006",lt.error006()),n;if(!n.find(u=>u.id===e.id))return fi("007",lt.error007(r)),n;const l=o.getEdgeId||Of,c={...i,id:o.shouldReplaceId?l(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(u=>u.id!==r).concat(c)};function Pf({sourceX:e,sourceY:t,targetX:n,targetY:o}){const[r,i,a,l]=kf({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,i,a,l]}const mc={[pe.Left]:{x:-1,y:0},[pe.Right]:{x:1,y:0},[pe.Top]:{x:0,y:-1},[pe.Bottom]:{x:0,y:1}},ov=({source:e,sourcePosition:t=pe.Bottom,target:n})=>t===pe.Left||t===pe.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},gc=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function rv({source:e,sourcePosition:t=pe.Bottom,target:n,targetPosition:o=pe.Top,center:r,offset:i,stepPosition:a}){const l=mc[t],c=mc[o],u={x:e.x+l.x*i,y:e.y+l.y*i},d={x:n.x+c.x*i,y:n.y+c.y*i},f=ov({source:u,sourcePosition:t,target:d}),p=f.x!==0?"x":"y",h=f[p];let g=[],m,v;const b={x:0,y:0},C={x:0,y:0},[,,y,x]=kf({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[p]*c[p]===-1){p==="x"?(m=r.x??u.x+(d.x-u.x)*a,v=r.y??(u.y+d.y)/2):(m=r.x??(u.x+d.x)/2,v=r.y??u.y+(d.y-u.y)*a);const E=[{x:m,y:u.y},{x:m,y:d.y}],k=[{x:u.x,y:v},{x:d.x,y:v}];l[p]===h?g=p==="x"?E:k:g=p==="x"?k:E}else{const E=[{x:u.x,y:d.y}],k=[{x:d.x,y:u.y}];if(p==="x"?g=l.x===h?k:E:g=l.y===h?E:k,t===o){const S=Math.abs(e[p]-n[p]);if(S<=i){const A=Math.min(i-1,i-S);l[p]===h?b[p]=(u[p]>e[p]?-1:1)*A:C[p]=(d[p]>n[p]?-1:1)*A}}if(t!==o){const S=p==="x"?"y":"x",A=l[p]===c[S],N=u[S]>d[S],O=u[S]<d[S];(l[p]===1&&(!A&&N||A&&O)||l[p]!==1&&(!A&&O||A&&N))&&(g=p==="x"?E:k)}const R={x:u.x+b.x,y:u.y+b.y},_={x:d.x+C.x,y:d.y+C.y},V=Math.max(Math.abs(R.x-g[0].x),Math.abs(_.x-g[0].x)),I=Math.max(Math.abs(R.y-g[0].y),Math.abs(_.y-g[0].y));V>=I?(m=(R.x+_.x)/2,v=g[0].y):(m=g[0].x,v=(R.y+_.y)/2)}return[[e,{x:u.x+b.x,y:u.y+b.y},...g,{x:d.x+C.x,y:d.y+C.y},n],m,v,y,x]}function iv(e,t,n,o){const r=Math.min(gc(e,t)/2,gc(t,n)/2,o),{x:i,y:a}=t;if(e.x===i&&i===n.x||e.y===a&&a===n.y)return`L${i} ${a}`;if(e.y===a){const u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${i+r*u},${a}Q ${i},${a} ${i},${a+r*d}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${a+r*c}Q ${i},${a} ${i+r*l},${a}`}function ca({sourceX:e,sourceY:t,sourcePosition:n=pe.Bottom,targetX:o,targetY:r,targetPosition:i=pe.Top,borderRadius:a=5,centerX:l,centerY:c,offset:u=20,stepPosition:d=.5}){const[f,p,h,g,m]=rv({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:r},targetPosition:i,center:{x:l,y:c},offset:u,stepPosition:d});return[f.reduce((b,C,y)=>{let x="";return y>0&&y<f.length-1?x=iv(f[y-1],C,f[y+1],a):x=`${y===0?"M":"L"}${C.x} ${C.y}`,b+=x,b},""),p,h,g,m]}function yc(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function sv(e){const{sourceNode:t,targetNode:n}=e;if(!yc(t)||!yc(n))return null;const o=t.internals.handleBounds||bc(t.handles),r=n.internals.handleBounds||bc(n.handles),i=vc(o?.source??[],e.sourceHandle),a=vc(e.connectionMode===to.Strict?r?.target??[]:(r?.target??[]).concat(r?.source??[]),e.targetHandle);if(!i||!a)return e.onError?.("008",lt.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=i?.position||pe.Bottom,c=a?.position||pe.Top,u=Pn(t,i,l),d=Pn(n,a,c);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:c}}function bc(e){if(!e)return null;const t=[],n=[];for(const o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function Pn(e,t,n=pe.Left,o=!1){const r=(t?.x??0)+e.internals.positionAbsolute.x,i=(t?.y??0)+e.internals.positionAbsolute.y,{width:a,height:l}=t??Qt(e);if(o)return{x:r+a/2,y:i+l/2};switch(t?.position??n){case pe.Top:return{x:r+a/2,y:i};case pe.Right:return{x:r+a,y:i+l/2};case pe.Bottom:return{x:r+a/2,y:i+l};case pe.Left:return{x:r,y:i+l/2}}}function vc(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function ua(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function av(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const i=new Set;return e.reduce((a,l)=>([l.markerStart||o,l.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const u=ua(c,t);i.has(u)||(a.push({id:u,color:c.color||n,...c}),i.add(u))}}),a),[]).sort((a,l)=>a.id.localeCompare(l.id))}const Rf=1e3,lv=10,Xa={nodeOrigin:[0,0],nodeExtent:Zo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},cv={...Xa,checkEquality:!0};function Za(e,t){const n={...e};for(const o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function uv(e,t,n){const o=Za(Xa,n);for(const r of e.values())if(r.parentId)Ja(r,e,t,o);else{const i=fr(r,o.nodeOrigin),a=ro(r.extent)?r.extent:o.nodeExtent,l=On(i,a,Qt(r));r.internals.positionAbsolute=l}}function dv(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;const n=[],o=[];for(const r of e.handles){const i={id:r.id,width:r.width??1,height:r.height??1,nodeId:e.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(i):r.type==="target"&&o.push(i)}return{source:n,target:o}}function Qa(e){return e==="manual"}function da(e,t,n,o={}){const r=Za(cv,o),i={i:0},a=new Map(t),l=r?.elevateNodesOnSelect&&!Qa(r.zIndexMode)?Rf:0;let c=e.length>0;t.clear(),n.clear();for(const u of e){let d=a.get(u.id);if(r.checkEquality&&u===d?.internals.userNode)t.set(u.id,d);else{const f=fr(u,r.nodeOrigin),p=ro(u.extent)?u.extent:r.nodeExtent,h=On(f,p,Qt(u));d={...r.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:h,handleBounds:dv(u,d),z:_f(u,l,r.zIndexMode),userNode:u}},t.set(u.id,d)}(d.measured===void 0||d.measured.width===void 0||d.measured.height===void 0)&&!d.hidden&&(c=!1),u.parentId&&Ja(d,t,n,o,i)}return c}function fv(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Ja(e,t,n,o,r){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:l,zIndexMode:c}=Za(Xa,o),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}fv(e,n),r&&!d.parentId&&d.internals.rootParentIndex===void 0&&c==="auto"&&(d.internals.rootParentIndex=++r.i,d.internals.z=d.internals.z+r.i*lv),r&&d.internals.rootParentIndex!==void 0&&(r.i=d.internals.rootParentIndex);const f=i&&!Qa(c)?Rf:0,{x:p,y:h,z:g}=pv(e,d,a,l,f,c),{positionAbsolute:m}=e.internals,v=p!==m.x||h!==m.y;(v||g!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:p,y:h}:m,z:g}})}function _f(e,t,n){const o=Ot(e.zIndex)?e.zIndex:0;return Qa(n)?o:o+(e.selected?t:0)}function pv(e,t,n,o,r,i){const{x:a,y:l}=t.internals.positionAbsolute,c=Qt(e),u=fr(e,n),d=ro(e.extent)?On(u,e.extent,c):u;let f=On({x:a+d.x,y:l+d.y},o,c);e.extent==="parent"&&(f=vf(f,c,t));const p=_f(e,r,i),h=t.internals.z??0;return{x:f.x,y:f.y,z:h>=p?h+1:p}}function el(e,t,n,o=[0,0]){const r=[],i=new Map;for(const a of e){const l=t.get(a.parentId);if(!l)continue;const c=i.get(a.parentId)?.expandedRect??oo(l),u=wf(c,a.rect);i.set(a.parentId,{expandedRect:u,parent:l})}return i.size>0&&i.forEach(({expandedRect:a,parent:l},c)=>{const u=l.internals.positionAbsolute,d=Qt(l),f=l.origin??o,p=a.x<u.x?Math.round(Math.abs(u.x-a.x)):0,h=a.y<u.y?Math.round(Math.abs(u.y-a.y)):0,g=Math.max(d.width,Math.round(a.width)),m=Math.max(d.height,Math.round(a.height)),v=(g-d.width)*f[0],b=(m-d.height)*f[1];(p>0||h>0||v||b)&&(r.push({id:c,type:"position",position:{x:l.position.x-p+v,y:l.position.y-h+b}}),n.get(c)?.forEach(C=>{e.some(y=>y.id===C.id)||r.push({id:C.id,type:"position",position:{x:C.position.x+p,y:C.position.y+h}})})),(d.width<a.width||d.height<a.height||p||h)&&r.push({id:c,type:"dimensions",setAttributes:!0,dimensions:{width:g+(p?f[0]*p-v:0),height:m+(h?f[1]*h-b:0)}})}),r}function hv(e,t,n,o,r,i,a){const l=o?.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const u=[],d=window.getComputedStyle(l),{m22:f}=new window.DOMMatrixReadOnly(d.transform),p=[];for(const h of e.values()){const g=t.get(h.id);if(!g)continue;if(g.hidden){t.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),c=!0;continue}const m=Ga(h.nodeElement),v=g.measured.width!==m.width||g.measured.height!==m.height;if(!!(m.width&&m.height&&(v||!g.internals.handleBounds||h.force))){const C=h.nodeElement.getBoundingClientRect(),y=ro(g.extent)?g.extent:i;let{positionAbsolute:x}=g.internals;g.parentId&&g.extent==="parent"?x=vf(x,m,t.get(g.parentId)):y&&(x=On(x,y,m));const w={...g,measured:m,internals:{...g.internals,positionAbsolute:x,handleBounds:{source:pc("source",h.nodeElement,C,f,g.id),target:pc("target",h.nodeElement,C,f,g.id)}}};t.set(g.id,w),g.parentId&&Ja(w,t,n,{nodeOrigin:r,zIndexMode:a}),c=!0,v&&(u.push({id:g.id,type:"dimensions",dimensions:m}),g.expandParent&&g.parentId&&p.push({id:g.id,parentId:g.parentId,rect:oo(w,r)}))}}if(p.length>0){const h=el(p,t,n,r);u.push(...h)}return{changes:u,updatedInternals:c}}async function mv({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const a=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,i]],o),l=!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2]);return Promise.resolve(l)}function xc(e,t,n,o,r,i){let a=r;const l=o.get(a)||new Map;o.set(a,l.set(n,t)),a=`${r}-${e}`;const c=o.get(a)||new Map;if(o.set(a,c.set(n,t)),i){a=`${r}-${e}-${i}`;const u=o.get(a)||new Map;o.set(a,u.set(n,t))}}function If(e,t,n){e.clear(),t.clear();for(const o of n){const{source:r,target:i,sourceHandle:a=null,targetHandle:l=null}=o,c={edgeId:o.id,source:r,target:i,sourceHandle:a,targetHandle:l},u=`${r}-${a}--${i}-${l}`,d=`${i}-${l}--${r}-${a}`;xc("source",c,d,e,r,a),xc("target",c,u,e,i,l),t.set(o.id,o)}}function Mf(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Mf(n,t):!1}function wc(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function gv(e,t,n,o){const r=new Map;for(const[i,a]of e)if((a.selected||a.id===o)&&(!a.parentId||!Mf(a,e))&&(a.draggable||t&&typeof a.draggable>"u")){const l=e.get(i);l&&r.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return r}function Ts({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){const r=[];for(const[a,l]of t){const c=n.get(a)?.internals.userNode;c&&r.push({...c,position:l.position,dragging:o})}if(!e)return[r[0],r];const i=n.get(e)?.internals.userNode;return[i?{...i,position:t.get(e)?.position||i.position,dragging:o}:r[0],r]}function yv({dragItems:e,snapGrid:t,x:n,y:o}){const r=e.values().next().value;if(!r)return null;const i={x:n-r.distance.x,y:o-r.distance.y},a=hr(i,t);return{x:a.x-i.x,y:a.y-i.y}}function bv({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:r}){let i={x:null,y:null},a=0,l=new Map,c=!1,u={x:0,y:0},d=null,f=!1,p=null,h=!1,g=!1,m=null;function v({noDragClassName:C,handleSelector:y,domNode:x,isSelectable:w,nodeId:E,nodeClickDistance:k=0}){p=pt(x);function R({x:S,y:A}){const{nodeLookup:N,nodeExtent:O,snapGrid:P,snapToGrid:L,nodeOrigin:M,onNodeDrag:j,onSelectionDrag:$,onError:B,updateNodePositions:H}=t();i={x:S,y:A};let U=!1;const W=l.size>1,K=W&&O?la(pr(l)):null,Q=W&&L?yv({dragItems:l,snapGrid:P,x:S,y:A}):null;for(const[ee,q]of l){if(!N.has(ee))continue;let J={x:S-q.distance.x,y:A-q.distance.y};L&&(J=Q?{x:Math.round(J.x+Q.x),y:Math.round(J.y+Q.y)}:hr(J,P));let Z=null;if(W&&O&&!q.extent&&K){const{positionAbsolute:ae}=q.internals,se=ae.x-K.x+O[0][0],fe=ae.x+q.measured.width-K.x2+O[1][0],xe=ae.y-K.y+O[0][1],Ce=ae.y+q.measured.height-K.y2+O[1][1];Z=[[se,xe],[fe,Ce]]}const{position:ne,positionAbsolute:z}=bf({nodeId:ee,nextPosition:J,nodeLookup:N,nodeExtent:Z||O,nodeOrigin:M,onError:B});U=U||q.position.x!==ne.x||q.position.y!==ne.y,q.position=ne,q.internals.positionAbsolute=z}if(g=g||U,!!U&&(H(l,!0),m&&(o||j||!E&&$))){const[ee,q]=Ts({nodeId:E,dragItems:l,nodeLookup:N});o?.(m,l,ee,q),j?.(m,ee,q),E||$?.(m,q)}}async function _(){if(!d)return;const{transform:S,panBy:A,autoPanSpeed:N,autoPanOnNodeDrag:O}=t();if(!O){c=!1,cancelAnimationFrame(a);return}const[P,L]=xf(u,d,N);(P!==0||L!==0)&&(i.x=(i.x??0)-P/S[2],i.y=(i.y??0)-L/S[2],await A({x:P,y:L})&&R(i)),a=requestAnimationFrame(_)}function V(S){const{nodeLookup:A,multiSelectionActive:N,nodesDraggable:O,transform:P,snapGrid:L,snapToGrid:M,selectNodesOnDrag:j,onNodeDragStart:$,onSelectionDragStart:B,unselectNodesAndEdges:H}=t();f=!0,(!j||!w)&&!N&&E&&(A.get(E)?.selected||H()),w&&j&&E&&e?.(E);const U=Vo(S.sourceEvent,{transform:P,snapGrid:L,snapToGrid:M,containerBounds:d});if(i=U,l=gv(A,O,U,E),l.size>0&&(n||$||!E&&B)){const[W,K]=Ts({nodeId:E,dragItems:l,nodeLookup:A});n?.(S.sourceEvent,l,W,K),$?.(S.sourceEvent,W,K),E||B?.(S.sourceEvent,K)}}const I=Xd().clickDistance(k).on("start",S=>{const{domNode:A,nodeDragThreshold:N,transform:O,snapGrid:P,snapToGrid:L}=t();d=A?.getBoundingClientRect()||null,h=!1,g=!1,m=S.sourceEvent,N===0&&V(S),i=Vo(S.sourceEvent,{transform:O,snapGrid:P,snapToGrid:L,containerBounds:d}),u=Pt(S.sourceEvent,d)}).on("drag",S=>{const{autoPanOnNodeDrag:A,transform:N,snapGrid:O,snapToGrid:P,nodeDragThreshold:L,nodeLookup:M}=t(),j=Vo(S.sourceEvent,{transform:N,snapGrid:O,snapToGrid:P,containerBounds:d});if(m=S.sourceEvent,(S.sourceEvent.type==="touchmove"&&S.sourceEvent.touches.length>1||E&&!M.has(E))&&(h=!0),!h){if(!c&&A&&f&&(c=!0,_()),!f){const $=Pt(S.sourceEvent,d),B=$.x-u.x,H=$.y-u.y;Math.sqrt(B*B+H*H)>L&&V(S)}(i.x!==j.xSnapped||i.y!==j.ySnapped)&&l&&f&&(u=Pt(S.sourceEvent,d),R(j))}}).on("end",S=>{if(!(!f||h)&&(c=!1,f=!1,cancelAnimationFrame(a),l.size>0)){const{nodeLookup:A,updateNodePositions:N,onNodeDragStop:O,onSelectionDragStop:P}=t();if(g&&(N(l,!1),g=!1),r||O||!E&&P){const[L,M]=Ts({nodeId:E,dragItems:l,nodeLookup:A,dragging:!1});r?.(S.sourceEvent,l,L,M),O?.(S.sourceEvent,L,M),E||P?.(S.sourceEvent,M)}}}).filter(S=>{const A=S.target;return!S.button&&(!C||!wc(A,`.${C}`,x))&&(!y||wc(A,y,x))});p.call(I)}function b(){p?.on(".drag",null)}return{update:v,destroy:b}}function vv(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())er(r,oo(i))>0&&o.push(i);return o}const xv=250;function wv(e,t,n,o){let r=[],i=1/0;const a=vv(e,n,t+xv);for(const l of a){const c=[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]];for(const u of c){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;const{x:d,y:f}=Pn(l,u,u.position,!0),p=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(f-e.y,2));p>t||(p<i?(r=[{...u,x:d,y:f}],i=p):p===i&&r.push({...u,x:d,y:f}))}}if(!r.length)return null;if(r.length>1){const l=o.type==="source"?"target":"source";return r.find(c=>c.type===l)??r[0]}return r[0]}function $f(e,t,n,o,r,i=!1){const a=o.get(e);if(!a)return null;const l=r==="strict"?a.internals.handleBounds?.[t]:[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]],c=(n?l?.find(u=>u.id===n):l?.[0])??null;return c&&i?{...c,...Pn(a,c,c.position,!0)}:c}function Af(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Sv(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Df=()=>!0;function Ev(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:i,isTarget:a,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:d,flowId:f,panBy:p,cancelConnection:h,onConnectStart:g,onConnect:m,onConnectEnd:v,isValidConnection:b=Df,onReconnectEnd:C,updateConnection:y,getTransform:x,getFromHandle:w,autoPanSpeed:E,dragThreshold:k=1,handleDomNode:R}){const _=Ef(e.target);let V=0,I;const{x:S,y:A}=Pt(e),N=Af(i,R),O=l?.getBoundingClientRect();let P=!1;if(!O||!N)return;const L=$f(r,N,o,c,t);if(!L)return;let M=Pt(e,O),j=!1,$=null,B=!1,H=null;function U(){if(!d||!O)return;const[ne,z]=xf(M,O,E);p({x:ne,y:z}),V=requestAnimationFrame(U)}const W={...L,nodeId:r,type:N,position:L.position},K=c.get(r);let ee={inProgress:!0,isValid:null,from:Pn(K,W,pe.Left,!0),fromHandle:W,fromPosition:W.position,fromNode:K,to:M,toHandle:null,toPosition:cc[W.position],toNode:null,pointer:M};function q(){P=!0,y(ee),g?.(e,{nodeId:r,handleId:o,handleType:N})}k===0&&q();function J(ne){if(!P){const{x:Ce,y:G}=Pt(ne),X=Ce-S,te=G-A;if(!(X*X+te*te>k*k))return;q()}if(!w()||!W){Z(ne);return}const z=x();M=Pt(ne,O),I=wv(mr(M,z,!1,[1,1]),n,c,W),j||(U(),j=!0);const ae=jf(ne,{handle:I,connectionMode:t,fromNodeId:r,fromHandleId:o,fromType:a?"target":"source",isValidConnection:b,doc:_,lib:u,flowId:f,nodeLookup:c});H=ae.handleDomNode,$=ae.connection,B=Sv(!!I,ae.isValid);const se=c.get(r),fe=se?Pn(se,W,pe.Left,!0):ee.from,xe={...ee,from:fe,isValid:B,to:ae.toHandle&&B?pi({x:ae.toHandle.x,y:ae.toHandle.y},z):M,toHandle:ae.toHandle,toPosition:B&&ae.toHandle?ae.toHandle.position:cc[W.position],toNode:ae.toHandle?c.get(ae.toHandle.nodeId):null,pointer:M};y(xe),ee=xe}function Z(ne){if(!("touches"in ne&&ne.touches.length>0)){if(P){(I||H)&&$&&B&&m?.($);const{inProgress:z,...ae}=ee,se={...ae,toPosition:ee.toHandle?ee.toPosition:null};v?.(ne,se),i&&C?.(ne,se)}h(),cancelAnimationFrame(V),j=!1,B=!1,$=null,H=null,_.removeEventListener("mousemove",J),_.removeEventListener("mouseup",Z),_.removeEventListener("touchmove",J),_.removeEventListener("touchend",Z)}}_.addEventListener("mousemove",J),_.addEventListener("mouseup",Z),_.addEventListener("touchmove",J),_.addEventListener("touchend",Z)}function jf(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:i,doc:a,lib:l,flowId:c,isValidConnection:u=Df,nodeLookup:d}){const f=i==="target",p=t?a.querySelector(`.${l}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:g}=Pt(e),m=a.elementFromPoint(h,g),v=m?.classList.contains(`${l}-flow__handle`)?m:p,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const C=Af(void 0,v),y=v.getAttribute("data-nodeid"),x=v.getAttribute("data-handleid"),w=v.classList.contains("connectable"),E=v.classList.contains("connectableend");if(!y||!C)return b;const k={source:f?y:o,sourceHandle:f?x:r,target:f?o:y,targetHandle:f?r:x};b.connection=k;const _=w&&E&&(n===to.Strict?f&&C==="source"||!f&&C==="target":y!==o||x!==r);b.isValid=_&&u(k),b.toHandle=$f(y,C,x,d,n,!0)}return b}const fa={onPointerDown:Ev,isValid:jf};function Cv({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){const r=pt(e);function i({translateExtent:l,width:c,height:u,zoomStep:d=1,pannable:f=!0,zoomable:p=!0,inversePan:h=!1}){const g=y=>{if(y.sourceEvent.type!=="wheel"||!t)return;const x=n(),w=y.sourceEvent.ctrlKey&&tr()?10:1,E=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*d,k=x[2]*Math.pow(2,E*w);t.scaleTo(k)};let m=[0,0];const v=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(m=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},b=y=>{const x=n();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!t)return;const w=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],E=[w[0]-m[0],w[1]-m[1]];m=w;const k=o()*Math.max(x[2],Math.log(x[2]))*(h?-1:1),R={x:x[0]-E[0]*k,y:x[1]-E[1]*k},_=[[0,0],[c,u]];t.setViewportConstrained({x:R.x,y:R.y,zoom:x[2]},_,l)},C=ff().on("start",v).on("zoom",f?b:null).on("zoom.wheel",p?g:null);r.call(C,{})}function a(){r.on("zoom",null)}return{update:i,destroy:a,pointer:Tt}}const ji=e=>({x:e.x,y:e.y,zoom:e.k}),Ns=({x:e,y:t,zoom:n})=>$i.translate(e,t).scale(n),Un=(e,t)=>e.target.closest(`.${t}`),Lf=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Tv=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,ks=(e,t=0,n=Tv,o=()=>{})=>{const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e},Ff=e=>{const t=e.ctrlKey&&tr()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function Nv({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return d=>{if(Un(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(d.ctrlKey&&a){const v=Tt(d),b=Ff(d),C=f*Math.pow(2,b);o.scaleTo(n,C,v,d);return}const p=d.deltaMode===1?20:1;let h=r===Cn.Vertical?0:d.deltaX*p,g=r===Cn.Horizontal?0:d.deltaY*p;!tr()&&d.shiftKey&&r!==Cn.Vertical&&(h=d.deltaY*p,g=0),o.translateBy(n,-(h/f)*i,-(g/f)*i,{internal:!0});const m=ji(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c?.(d,m),e.panScrollTimeout=setTimeout(()=>{u?.(d,m),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l?.(d,m))}}function kv({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,r){const i=o.type==="wheel",a=!t&&i&&!o.ctrlKey,l=Un(o,e);if(o.ctrlKey&&i&&l&&o.preventDefault(),a||l)return null;o.preventDefault(),n.call(this,o,r)}}function Ov({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;const r=ji(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=r,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,r)}}function Pv({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return i=>{e.usedRightMouseButton=!!(n&&Lf(t,e.mouseButton??0)),i.sourceEvent?.sync||o([i.transform.x,i.transform.y,i.transform.k]),r&&!i.sourceEvent?.internal&&r?.(i.sourceEvent,ji(i.transform))}}function Rv({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:i}){return a=>{if(!a.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&Lf(t,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,o(!1),r)){const l=ji(a.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r?.(a.sourceEvent,l)},n?150:0)}}}function _v({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:d}){return f=>{const p=e||t,h=n&&f.ctrlKey,g=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Un(f,`${u}-flow__node`)||Un(f,`${u}-flow__edge`)))return!0;if(!o&&!p&&!r&&!i&&!n||a||d&&!g||Un(f,l)&&g||Un(f,c)&&(!g||r&&g&&!e)||!n&&f.ctrlKey&&g)return!1;if(!n&&f.type==="touchstart"&&f.touches?.length>1)return f.preventDefault(),!1;if(!p&&!r&&!h&&g||!o&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(o)&&!o.includes(f.button)&&f.type==="mousedown")return!1;const m=Array.isArray(o)&&o.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||g)&&m}}function Iv({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:r,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=ff().scaleExtent([t,n]).translateExtent(o),p=pt(e).call(f);C({x:r.x,y:r.y,zoom:no(r.zoom,t,n)},[[0,0],[d.width,d.height]],o);const h=p.on("wheel.zoom"),g=p.on("dblclick.zoom");f.wheelDelta(Ff);function m(I,S){return p?new Promise(A=>{f?.interpolate(S?.interpolate==="linear"?zo:Gr).transform(ks(p,S?.duration,S?.ease,()=>A(!0)),I)}):Promise.resolve(!1)}function v({noWheelClassName:I,noPanClassName:S,onPaneContextMenu:A,userSelectionActive:N,panOnScroll:O,panOnDrag:P,panOnScrollMode:L,panOnScrollSpeed:M,preventScrolling:j,zoomOnPinch:$,zoomOnScroll:B,zoomOnDoubleClick:H,zoomActivationKeyPressed:U,lib:W,onTransformChange:K,connectionInProgress:Q,paneClickDistance:ee,selectionOnDrag:q}){N&&!u.isZoomingOrPanning&&b();const J=O&&!U&&!N;f.clickDistance(q?1/0:!Ot(ee)||ee<0?0:ee);const Z=J?Nv({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:f,panOnScrollMode:L,panOnScrollSpeed:M,zoomOnPinch:$,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:l}):kv({noWheelClassName:I,preventScrolling:j,d3ZoomHandler:h});if(p.on("wheel.zoom",Z,{passive:!1}),!N){const z=Ov({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});f.on("start",z);const ae=Pv({zoomPanValues:u,panOnDrag:P,onPaneContextMenu:!!A,onPanZoom:i,onTransformChange:K});f.on("zoom",ae);const se=Rv({zoomPanValues:u,panOnDrag:P,panOnScroll:O,onPaneContextMenu:A,onPanZoomEnd:l,onDraggingChange:c});f.on("end",se)}const ne=_v({zoomActivationKeyPressed:U,panOnDrag:P,zoomOnScroll:B,panOnScroll:O,zoomOnDoubleClick:H,zoomOnPinch:$,userSelectionActive:N,noPanClassName:S,noWheelClassName:I,lib:W,connectionInProgress:Q});f.filter(ne),H?p.on("dblclick.zoom",g):p.on("dblclick.zoom",null)}function b(){f.on("zoom",null)}async function C(I,S,A){const N=Ns(I),O=f?.constrain()(N,S,A);return O&&await m(O),new Promise(P=>P(O))}async function y(I,S){const A=Ns(I);return await m(A,S),new Promise(N=>N(A))}function x(I){if(p){const S=Ns(I),A=p.property("__zoom");(A.k!==I.zoom||A.x!==I.x||A.y!==I.y)&&f?.transform(p,S,null,{sync:!0})}}function w(){const I=p?df(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}function E(I,S){return p?new Promise(A=>{f?.interpolate(S?.interpolate==="linear"?zo:Gr).scaleTo(ks(p,S?.duration,S?.ease,()=>A(!0)),I)}):Promise.resolve(!1)}function k(I,S){return p?new Promise(A=>{f?.interpolate(S?.interpolate==="linear"?zo:Gr).scaleBy(ks(p,S?.duration,S?.ease,()=>A(!0)),I)}):Promise.resolve(!1)}function R(I){f?.scaleExtent(I)}function _(I){f?.translateExtent(I)}function V(I){const S=!Ot(I)||I<0?0:I;f?.clickDistance(S)}return{update:v,destroy:b,setViewport:y,setViewportConstrained:C,getViewport:w,scaleTo:E,scaleBy:k,setScaleExtent:R,setTranslateExtent:_,syncViewport:x,setClickDistance:V}}var io;(function(e){e.Line="line",e.Handle="handle"})(io||(io={}));function Mv({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:r,affectsY:i}){const a=e-t,l=n-o,c=[a>0?1:a<0?-1:0,l>0?1:l<0?-1:0];return a&&r&&(c[0]=c[0]*-1),l&&i&&(c[1]=c[1]*-1),c}function Sc(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:r}}function en(e,t){return Math.max(0,t-e)}function tn(e,t){return Math.max(0,e-t)}function Mr(e,t,n){return Math.max(0,t-e,e-n)}function Ec(e,t){return e?!t:t}function $v(e,t,n,o,r,i,a,l){let{affectsX:c,affectsY:u}=t;const{isHorizontal:d,isVertical:f}=t,p=d&&f,{xSnapped:h,ySnapped:g}=n,{minWidth:m,maxWidth:v,minHeight:b,maxHeight:C}=o,{x:y,y:x,width:w,height:E,aspectRatio:k}=e;let R=Math.floor(d?h-e.pointerX:0),_=Math.floor(f?g-e.pointerY:0);const V=w+(c?-R:R),I=E+(u?-_:_),S=-i[0]*w,A=-i[1]*E;let N=Mr(V,m,v),O=Mr(I,b,C);if(a){let M=0,j=0;c&&R<0?M=en(y+R+S,a[0][0]):!c&&R>0&&(M=tn(y+V+S,a[1][0])),u&&_<0?j=en(x+_+A,a[0][1]):!u&&_>0&&(j=tn(x+I+A,a[1][1])),N=Math.max(N,M),O=Math.max(O,j)}if(l){let M=0,j=0;c&&R>0?M=tn(y+R,l[0][0]):!c&&R<0&&(M=en(y+V,l[1][0])),u&&_>0?j=tn(x+_,l[0][1]):!u&&_<0&&(j=en(x+I,l[1][1])),N=Math.max(N,M),O=Math.max(O,j)}if(r){if(d){const M=Mr(V/k,b,C)*k;if(N=Math.max(N,M),a){let j=0;!c&&!u||c&&!u&&p?j=tn(x+A+V/k,a[1][1])*k:j=en(x+A+(c?R:-R)/k,a[0][1])*k,N=Math.max(N,j)}if(l){let j=0;!c&&!u||c&&!u&&p?j=en(x+V/k,l[1][1])*k:j=tn(x+(c?R:-R)/k,l[0][1])*k,N=Math.max(N,j)}}if(f){const M=Mr(I*k,m,v)/k;if(O=Math.max(O,M),a){let j=0;!c&&!u||u&&!c&&p?j=tn(y+I*k+S,a[1][0])/k:j=en(y+(u?_:-_)*k+S,a[0][0])/k,O=Math.max(O,j)}if(l){let j=0;!c&&!u||u&&!c&&p?j=en(y+I*k,l[1][0])/k:j=tn(y+(u?_:-_)*k,l[0][0])/k,O=Math.max(O,j)}}}_=_+(_<0?O:-O),R=R+(R<0?N:-N),r&&(p?V>I*k?_=(Ec(c,u)?-R:R)/k:R=(Ec(c,u)?-_:_)*k:d?(_=R/k,u=c):(R=_*k,c=u));const P=c?y+R:y,L=u?x+_:x;return{width:w+(c?-R:R),height:E+(u?-_:_),x:i[0]*R*(c?-1:1)+P,y:i[1]*_*(u?-1:1)+L}}const Bf={width:0,height:0,x:0,y:0},Av={...Bf,pointerX:0,pointerY:0,aspectRatio:1};function Dv(e){return[[0,0],[e.measured.width,e.measured.height]]}function jv(e,t,n){const o=t.position.x+e.position.x,r=t.position.y+e.position.y,i=e.measured.width??0,a=e.measured.height??0,l=n[0]*i,c=n[1]*a;return[[o-l,r-c],[o+i-l,r+a-c]]}function Lv({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:r}){const i=pt(e);let a={controlDirection:Sc("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:d,keepAspectRatio:f,resizeDirection:p,onResizeStart:h,onResize:g,onResizeEnd:m,shouldResize:v}){let b={...Bf},C={...Av};a={boundaries:d,resizeDirection:p,keepAspectRatio:f,controlDirection:Sc(u)};let y,x=null,w=[],E,k,R,_=!1;const V=Xd().on("start",I=>{const{nodeLookup:S,transform:A,snapGrid:N,snapToGrid:O,nodeOrigin:P,paneDomNode:L}=n();if(y=S.get(t),!y)return;x=L?.getBoundingClientRect()??null;const{xSnapped:M,ySnapped:j}=Vo(I.sourceEvent,{transform:A,snapGrid:N,snapToGrid:O,containerBounds:x});b={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},C={...b,pointerX:M,pointerY:j,aspectRatio:b.width/b.height},E=void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(E=S.get(y.parentId),k=E&&y.extent==="parent"?Dv(E):void 0),w=[],R=void 0;for(const[$,B]of S)if(B.parentId===t&&(w.push({id:$,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){const H=jv(B,y,B.origin??P);R?R=[[Math.min(H[0][0],R[0][0]),Math.min(H[0][1],R[0][1])],[Math.max(H[1][0],R[1][0]),Math.max(H[1][1],R[1][1])]]:R=H}h?.(I,{...b})}).on("drag",I=>{const{transform:S,snapGrid:A,snapToGrid:N,nodeOrigin:O}=n(),P=Vo(I.sourceEvent,{transform:S,snapGrid:A,snapToGrid:N,containerBounds:x}),L=[];if(!y)return;const{x:M,y:j,width:$,height:B}=b,H={},U=y.origin??O,{width:W,height:K,x:Q,y:ee}=$v(C,a.controlDirection,P,a.boundaries,a.keepAspectRatio,U,k,R),q=W!==$,J=K!==B,Z=Q!==M&&q,ne=ee!==j&&J;if(!Z&&!ne&&!q&&!J)return;if((Z||ne||U[0]===1||U[1]===1)&&(H.x=Z?Q:b.x,H.y=ne?ee:b.y,b.x=H.x,b.y=H.y,w.length>0)){const fe=Q-M,xe=ee-j;for(const Ce of w)Ce.position={x:Ce.position.x-fe+U[0]*(W-$),y:Ce.position.y-xe+U[1]*(K-B)},L.push(Ce)}if((q||J)&&(H.width=q&&(!a.resizeDirection||a.resizeDirection==="horizontal")?W:b.width,H.height=J&&(!a.resizeDirection||a.resizeDirection==="vertical")?K:b.height,b.width=H.width,b.height=H.height),E&&y.expandParent){const fe=U[0]*(H.width??0);H.x&&H.x<fe&&(b.x=fe,C.x=C.x-(H.x-fe));const xe=U[1]*(H.height??0);H.y&&H.y<xe&&(b.y=xe,C.y=C.y-(H.y-xe))}const z=Mv({width:b.width,prevWidth:$,height:b.height,prevHeight:B,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),ae={...b,direction:z};v?.(I,ae)!==!1&&(_=!0,g?.(I,ae),o(H,L))}).on("end",I=>{_&&(m?.(I,{...b}),r?.({...b}),_=!1)});i.call(V)}function c(){i.on(".drag",null)}return{update:l,destroy:c}}function zf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $r={exports:{}},Os={},Ar={exports:{}},Ps={};var Cc;function Fv(){if(Cc)return Ps;Cc=1;var e=F;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function l(f,p){var h=p(),g=o({inst:{value:h,getSnapshot:p}}),m=g[0].inst,v=g[1];return i(function(){m.value=h,m.getSnapshot=p,c(m)&&v({inst:m})},[f,h,p]),r(function(){return c(m)&&v({inst:m}),f(function(){c(m)&&v({inst:m})})},[f]),a(h),h}function c(f){var p=f.getSnapshot;f=f.value;try{var h=p();return!n(f,h)}catch{return!0}}function u(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return Ps.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Ps}var Rs={};var Tc;function Bv(){return Tc||(Tc=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}function t(h,g){d||r.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=g();if(!f){var v=g();i(m,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=a({inst:{value:m,getSnapshot:g}});var b=v[0].inst,C=v[1];return c(function(){b.value=m,b.getSnapshot=g,n(b)&&C({inst:b})},[h,m,g]),l(function(){return n(b)&&C({inst:b}),h(function(){n(b)&&C({inst:b})})},[h]),u(m),m}function n(h){var g=h.getSnapshot;h=h.value;try{var m=g();return!i(h,m)}catch{return!0}}function o(h,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=F,i=typeof Object.is=="function"?Object.is:e,a=r.useState,l=r.useEffect,c=r.useLayoutEffect,u=r.useDebugValue,d=!1,f=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:t;Rs.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Rs}var Nc;function Vf(){return Nc||(Nc=1,process.env.NODE_ENV==="production"?Ar.exports=Fv():Ar.exports=Bv()),Ar.exports}var kc;function zv(){if(kc)return Os;kc=1;var e=F,t=Vf();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var o=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,l=e.useMemo,c=e.useDebugValue;return Os.useSyncExternalStoreWithSelector=function(u,d,f,p,h){var g=i(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=l(function(){function b(E){if(!C){if(C=!0,y=E,E=p(E),h!==void 0&&m.hasValue){var k=m.value;if(h(k,E))return x=k}return x=E}if(k=x,o(y,E))return k;var R=p(E);return h!==void 0&&h(k,R)?(y=E,k):(y=E,x=R)}var C=!1,y,x,w=f===void 0?null:f;return[function(){return b(d())},w===null?void 0:function(){return b(w())}]},[d,f,p,h]);var v=r(u,g[0],g[1]);return a(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},Os}var _s={};var Oc;function Vv(){return Oc||(Oc=1,process.env.NODE_ENV!=="production"&&(function(){function e(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=F,n=Vf(),o=typeof Object.is=="function"?Object.is:e,r=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,l=t.useMemo,c=t.useDebugValue;_s.useSyncExternalStoreWithSelector=function(u,d,f,p,h){var g=i(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=l(function(){function b(E){if(!C){if(C=!0,y=E,E=p(E),h!==void 0&&m.hasValue){var k=m.value;if(h(k,E))return x=k}return x=E}if(k=x,o(y,E))return k;var R=p(E);return h!==void 0&&h(k,R)?(y=E,k):(y=E,x=R)}var C=!1,y,x,w=f===void 0?null:f;return[function(){return b(d())},w===null?void 0:function(){return b(w())}]},[d,f,p,h]);var v=r(u,g[0],g[1]);return a(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),_s}var Pc;function Hv(){return Pc||(Pc=1,process.env.NODE_ENV==="production"?$r.exports=zv():$r.exports=Vv()),$r.exports}var Wv=Hv();const Uv=zf(Wv),qv={},Rc=e=>{let t;const n=new Set,o=(d,f)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const h=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(g=>g(t,h))}},r=()=>t,c={setState:o,getState:r,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(qv?"production":void 0)!=="production"&&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()}},u=t=e(o,r,c);return c},Yv=e=>e?Rc(e):Rc,{useDebugValue:Gv}=F,{useSyncExternalStoreWithSelector:Kv}=Uv,Xv=e=>e;function Hf(e,t=Xv,n){const o=Kv(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Gv(o),o}const _c=(e,t)=>{const n=Yv(e),o=(r,i=t)=>Hf(n,r,i);return Object.assign(o,n),o},Zv=(e,t)=>e?_c(e,t):_c;function Ve(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,r]of e)if(!Object.is(r,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}const Li=F.createContext(null),Qv=Li.Provider,Wf=lt.error001();function Ee(e,t){const n=F.useContext(Li);if(n===null)throw new Error(Wf);return Hf(n,e,t)}function He(){const e=F.useContext(Li);if(e===null)throw new Error(Wf);return F.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Ic={display:"none"},Jv={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Uf="react-flow__node-desc",qf="react-flow__edge-desc",ex="react-flow__aria-live",tx=e=>e.ariaLiveMessage,nx=e=>e.ariaLabelConfig;function ox({rfId:e}){const t=Ee(tx);return T.jsx("div",{id:`${ex}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Jv,children:t})}function rx({rfId:e,disableKeyboardA11y:t}){const n=Ee(nx);return T.jsxs(T.Fragment,{children:[T.jsx("div",{id:`${Uf}-${e}`,style:Ic,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),T.jsx("div",{id:`${qf}-${e}`,style:Ic,children:n["edge.a11yDescription.default"]}),!t&&T.jsx(ox,{rfId:e})]})}const Fi=F.forwardRef(({position:e="top-left",children:t,className:n,style:o,...r},i)=>{const a=`${e}`.split("-");return T.jsx("div",{className:Qe(["react-flow__panel",n,...a]),style:o,ref:i,...r,children:t})});Fi.displayName="Panel";function ix({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:T.jsx(Fi,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:T.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const sx=e=>{const t=[],n=[];for(const[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(const[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},Dr=e=>e.id;function ax(e,t){return Ve(e.selectedNodes.map(Dr),t.selectedNodes.map(Dr))&&Ve(e.selectedEdges.map(Dr),t.selectedEdges.map(Dr))}function lx({onSelectionChange:e}){const t=He(),{selectedNodes:n,selectedEdges:o}=Ee(sx,ax);return F.useEffect(()=>{const r={nodes:n,edges:o};e?.(r),t.getState().onSelectionChangeHandlers.forEach(i=>i(r))},[n,o,e]),null}const cx=e=>!!e.onSelectionChangeHandlers;function ux({onSelectionChange:e}){const t=Ee(cx);return e||t?T.jsx(lx,{onSelectionChange:e}):null}const Yf=[0,0],dx={x:0,y:0,zoom:1},fx=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Mc=[...fx,"rfId"],px=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),$c={translateExtent:Zo,nodeOrigin:Yf,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function hx(e){const{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:r,setTranslateExtent:i,setNodeExtent:a,reset:l,setDefaultNodesAndEdges:c}=Ee(px,Ve),u=He();F.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{d.current=$c,l()}),[]);const d=F.useRef($c);return F.useEffect(()=>{for(const f of Mc){const p=e[f],h=d.current[f];p!==h&&(typeof e[f]>"u"||(f==="nodes"?t(p):f==="edges"?n(p):f==="minZoom"?o(p):f==="maxZoom"?r(p):f==="translateExtent"?i(p):f==="nodeExtent"?a(p):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:X0(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}d.current=e},Mc.map(f=>e[f])),null}function Ac(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function mx(e){const[t,n]=F.useState(e==="system"?null:e);return F.useEffect(()=>{if(e!=="system"){n(e);return}const o=Ac(),r=()=>n(o?.matches?"dark":"light");return r(),o?.addEventListener("change",r),()=>{o?.removeEventListener("change",r)}},[e]),t!==null?t:Ac()?.matches?"dark":"light"}const Dc=typeof document<"u"?document:null;function nr(e=null,t={target:Dc,actInsideInputWithModifier:!0}){const[n,o]=F.useState(!1),r=F.useRef(!1),i=F.useRef(new Set([])),[a,l]=F.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react/jsx-runtime"),F=require("react"),Wn=require("react-dom");function Ad(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const D=Ad(F),ag=Ad(Wn);function Je(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=Je(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var lg={value:()=>{}};function Ri(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Yr(n)}function Yr(e){this._=e}function cg(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Yr.prototype=Ri.prototype={constructor:Yr,on:function(e,t){var n=this._,o=cg(e+"",n),r,i=-1,a=o.length;if(arguments.length<2){for(;++i<a;)if((r=(e=o[i]).type)&&(r=ug(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<a;)if(r=(e=o[i]).type)n[r]=ql(n[r],e.name,t);else if(t==null)for(r in n)n[r]=ql(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Yr(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,i;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)}};function ug(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function ql(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=lg,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var ea="http://www.w3.org/1999/xhtml";const Yl={svg:"http://www.w3.org/2000/svg",xhtml:ea,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _i(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Yl.hasOwnProperty(t)?{space:Yl[t],local:e}:e}function dg(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ea&&t.documentElement.namespaceURI===ea?t.createElement(e):t.createElementNS(n,e)}}function fg(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Dd(e){var t=_i(e);return(t.local?fg:dg)(t)}function pg(){}function ja(e){return e==null?pg:function(){return this.querySelector(e)}}function hg(e){typeof e!="function"&&(e=ja(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,l=o[r]=new Array(a),c,u,d=0;d<a;++d)(c=i[d])&&(u=e.call(c,c.__data__,d,i))&&("__data__"in c&&(u.__data__=c.__data__),l[d]=u);return new vt(o,this._parents)}function mg(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function gg(){return[]}function jd(e){return e==null?gg:function(){return this.querySelectorAll(e)}}function yg(e){return function(){return mg(e.apply(this,arguments))}}function bg(e){typeof e=="function"?e=yg(e):e=jd(e);for(var t=this._groups,n=t.length,o=[],r=[],i=0;i<n;++i)for(var a=t[i],l=a.length,c,u=0;u<l;++u)(c=a[u])&&(o.push(e.call(c,c.__data__,u,a)),r.push(c));return new vt(o,r)}function Ld(e){return function(){return this.matches(e)}}function Fd(e){return function(t){return t.matches(e)}}var vg=Array.prototype.find;function xg(e){return function(){return vg.call(this.children,e)}}function wg(){return this.firstElementChild}function Sg(e){return this.select(e==null?wg:xg(typeof e=="function"?e:Fd(e)))}var Eg=Array.prototype.filter;function Cg(){return Array.from(this.children)}function Tg(e){return function(){return Eg.call(this.children,e)}}function Ng(e){return this.selectAll(e==null?Cg:Tg(typeof e=="function"?e:Fd(e)))}function kg(e){typeof e!="function"&&(e=Ld(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,l=o[r]=[],c,u=0;u<a;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new vt(o,this._parents)}function Bd(e){return new Array(e.length)}function Og(){return new vt(this._enter||this._groups.map(Bd),this._parents)}function ri(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ri.prototype={constructor:ri,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Pg(e){return function(){return e}}function Rg(e,t,n,o,r,i){for(var a=0,l,c=t.length,u=i.length;a<u;++a)(l=t[a])?(l.__data__=i[a],o[a]=l):n[a]=new ri(e,i[a]);for(;a<c;++a)(l=t[a])&&(r[a]=l)}function _g(e,t,n,o,r,i,a){var l,c,u=new Map,d=t.length,f=i.length,p=new Array(d),h;for(l=0;l<d;++l)(c=t[l])&&(p[l]=h=a.call(c,c.__data__,l,t)+"",u.has(h)?r[l]=c:u.set(h,c));for(l=0;l<f;++l)h=a.call(e,i[l],l,i)+"",(c=u.get(h))?(o[l]=c,c.__data__=i[l],u.delete(h)):n[l]=new ri(e,i[l]);for(l=0;l<d;++l)(c=t[l])&&u.get(p[l])===c&&(r[l]=c)}function Ig(e){return e.__data__}function Mg(e,t){if(!arguments.length)return Array.from(this,Ig);var n=t?_g:Rg,o=this._parents,r=this._groups;typeof e!="function"&&(e=Pg(e));for(var i=r.length,a=new Array(i),l=new Array(i),c=new Array(i),u=0;u<i;++u){var d=o[u],f=r[u],p=f.length,h=$g(e.call(d,d&&d.__data__,u,o)),g=h.length,m=l[u]=new Array(g),v=a[u]=new Array(g),b=c[u]=new Array(p);n(d,f,m,v,b,h,t);for(var C=0,y=0,x,w;C<g;++C)if(x=m[C]){for(C>=y&&(y=C+1);!(w=v[y])&&++y<g;);x._next=w||null}}return a=new vt(a,o),a._enter=l,a._exit=c,a}function $g(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ag(){return new vt(this._exit||this._groups.map(Bd),this._parents)}function Dg(e,t,n){var o=this.enter(),r=this,i=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),o&&r?o.merge(r).order():r}function jg(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,i=o.length,a=Math.min(r,i),l=new Array(r),c=0;c<a;++c)for(var u=n[c],d=o[c],f=u.length,p=l[c]=new Array(f),h,g=0;g<f;++g)(h=u[g]||d[g])&&(p[g]=h);for(;c<r;++c)l[c]=n[c];return new vt(l,this._parents)}function Lg(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,i=o[r],a;--r>=0;)(a=o[r])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function Fg(e){e||(e=Bg);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var a=n[i],l=a.length,c=r[i]=new Array(l),u,d=0;d<l;++d)(u=a[d])&&(c[d]=u);c.sort(t)}return new vt(r,this._parents).order()}function Bg(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function zg(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Vg(){return Array.from(this)}function Hg(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length;r<i;++r){var a=o[r];if(a)return a}return null}function Wg(){let e=0;for(const t of this)++e;return e}function Ug(){return!this.node()}function qg(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],i=0,a=r.length,l;i<a;++i)(l=r[i])&&e.call(l,l.__data__,i,r);return this}function Yg(e){return function(){this.removeAttribute(e)}}function Gg(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Kg(e,t){return function(){this.setAttribute(e,t)}}function Xg(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Zg(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Qg(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Jg(e,t){var n=_i(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Gg:Yg:typeof t=="function"?n.local?Qg:Zg:n.local?Xg:Kg)(n,t))}function zd(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ey(e){return function(){this.style.removeProperty(e)}}function ty(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ny(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function oy(e,t,n){return arguments.length>1?this.each((t==null?ey:typeof t=="function"?ny:ty)(e,t,n??"")):Jn(this.node(),e)}function Jn(e,t){return e.style.getPropertyValue(t)||zd(e).getComputedStyle(e,null).getPropertyValue(t)}function ry(e){return function(){delete this[e]}}function iy(e,t){return function(){this[e]=t}}function sy(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function ay(e,t){return arguments.length>1?this.each((t==null?ry:typeof t=="function"?sy:iy)(e,t)):this.node()[e]}function Vd(e){return e.trim().split(/^|\s+/)}function La(e){return e.classList||new Hd(e)}function Hd(e){this._node=e,this._names=Vd(e.getAttribute("class")||"")}Hd.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Wd(e,t){for(var n=La(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function Ud(e,t){for(var n=La(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function ly(e){return function(){Wd(this,e)}}function cy(e){return function(){Ud(this,e)}}function uy(e,t){return function(){(t.apply(this,arguments)?Wd:Ud)(this,e)}}function dy(e,t){var n=Vd(e+"");if(arguments.length<2){for(var o=La(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?uy:t?ly:cy)(n,t))}function fy(){this.textContent=""}function py(e){return function(){this.textContent=e}}function hy(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function my(e){return arguments.length?this.each(e==null?fy:(typeof e=="function"?hy:py)(e)):this.node().textContent}function gy(){this.innerHTML=""}function yy(e){return function(){this.innerHTML=e}}function by(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function vy(e){return arguments.length?this.each(e==null?gy:(typeof e=="function"?by:yy)(e)):this.node().innerHTML}function xy(){this.nextSibling&&this.parentNode.appendChild(this)}function wy(){return this.each(xy)}function Sy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ey(){return this.each(Sy)}function Cy(e){var t=typeof e=="function"?e:Dd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Ty(){return null}function Ny(e,t){var n=typeof e=="function"?e:Dd(e),o=t==null?Ty:typeof t=="function"?t:ja(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function ky(){var e=this.parentNode;e&&e.removeChild(this)}function Oy(){return this.each(ky)}function Py(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ry(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _y(e){return this.select(e?Ry:Py)}function Iy(e){return arguments.length?this.property("__data__",e):this.node().__data__}function My(e){return function(t){e.call(this,t,this.__data__)}}function $y(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Ay(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++o]=i;++o?t.length=o:delete this.__on}}}function Dy(e,t,n){return function(){var o=this.__on,r,i=My(t);if(o){for(var a=0,l=o.length;a<l;++a)if((r=o[a]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function jy(e,t,n){var o=$y(e+""),r,i=o.length,a;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,d;c<u;++c)for(r=0,d=l[c];r<i;++r)if((a=o[r]).type===d.type&&a.name===d.name)return d.value}return}for(l=t?Dy:Ay,r=0;r<i;++r)this.each(l(o[r],t,n));return this}function qd(e,t,n){var o=zd(e),r=o.CustomEvent;typeof r=="function"?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function Ly(e,t){return function(){return qd(this,e,t)}}function Fy(e,t){return function(){return qd(this,e,t.apply(this,arguments))}}function By(e,t){return this.each((typeof t=="function"?Fy:Ly)(e,t))}function*zy(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length,a;r<i;++r)(a=o[r])&&(yield a)}var Yd=[null];function vt(e,t){this._groups=e,this._parents=t}function ur(){return new vt([[document.documentElement]],Yd)}function Vy(){return this}vt.prototype=ur.prototype={constructor:vt,select:hg,selectAll:bg,selectChild:Sg,selectChildren:Ng,filter:kg,data:Mg,enter:Og,exit:Ag,join:Dg,merge:jg,selection:Vy,order:Lg,sort:Fg,call:zg,nodes:Vg,node:Hg,size:Wg,empty:Ug,each:qg,attr:Jg,style:oy,property:ay,classed:dy,text:my,html:vy,raise:wy,lower:Ey,append:Cy,insert:Ny,remove:Oy,clone:_y,datum:Iy,on:jy,dispatch:By,[Symbol.iterator]:zy};function ht(e){return typeof e=="string"?new vt([[document.querySelector(e)]],[document.documentElement]):new vt([[e]],Yd)}function Hy(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Tt(e,t){if(e=Hy(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const Wy={passive:!1},Yo={capture:!0,passive:!1};function ws(e){e.stopImmediatePropagation()}function Gn(e){e.preventDefault(),e.stopImmediatePropagation()}function Gd(e){var t=e.document.documentElement,n=ht(e).on("dragstart.drag",Gn,Yo);"onselectstart"in t?n.on("selectstart.drag",Gn,Yo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Kd(e,t){var n=e.document.documentElement,o=ht(e).on("dragstart.drag",null);t&&(o.on("click.drag",Gn,Yo),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const kr=e=>()=>e;function ta(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:i,x:a,y:l,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}ta.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Uy(e){return!e.ctrlKey&&!e.button}function qy(){return this.parentNode}function Yy(e,t){return t??{x:e.x,y:e.y}}function Gy(){return navigator.maxTouchPoints||"ontouchstart"in this}function Xd(){var e=Uy,t=qy,n=Yy,o=Gy,r={},i=Ri("start","drag","end"),a=0,l,c,u,d,f=0;function p(x){x.on("mousedown.drag",h).filter(o).on("touchstart.drag",v).on("touchmove.drag",b,Wy).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(x,w){if(!(d||!e.call(this,x,w))){var E=y(this,t.call(this,x,w),x,w,"mouse");E&&(ht(x.view).on("mousemove.drag",g,Yo).on("mouseup.drag",m,Yo),Gd(x.view),ws(x),u=!1,l=x.clientX,c=x.clientY,E("start",x))}}function g(x){if(Gn(x),!u){var w=x.clientX-l,E=x.clientY-c;u=w*w+E*E>f}r.mouse("drag",x)}function m(x){ht(x.view).on("mousemove.drag mouseup.drag",null),Kd(x.view,u),Gn(x),r.mouse("end",x)}function v(x,w){if(e.call(this,x,w)){var E=x.changedTouches,k=t.call(this,x,w),R=E.length,_,V;for(_=0;_<R;++_)(V=y(this,k,x,w,E[_].identifier,E[_]))&&(ws(x),V("start",x,E[_]))}}function b(x){var w=x.changedTouches,E=w.length,k,R;for(k=0;k<E;++k)(R=r[w[k].identifier])&&(Gn(x),R("drag",x,w[k]))}function C(x){var w=x.changedTouches,E=w.length,k,R;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),k=0;k<E;++k)(R=r[w[k].identifier])&&(ws(x),R("end",x,w[k]))}function y(x,w,E,k,R,_){var V=i.copy(),I=Tt(_||E,w),S,A,N;if((N=n.call(x,new ta("beforestart",{sourceEvent:E,target:p,identifier:R,active:a,x:I[0],y:I[1],dx:0,dy:0,dispatch:V}),k))!=null)return S=N.x-I[0]||0,A=N.y-I[1]||0,function O(P,L,M){var j=I,$;switch(P){case"start":r[R]=O,$=a++;break;case"end":delete r[R],--a;case"drag":I=Tt(M||L,w),$=a;break}V.call(P,x,new ta(P,{sourceEvent:L,subject:N,target:p,identifier:R,active:$,x:I[0]+S,y:I[1]+A,dx:I[0]-j[0],dy:I[1]-j[1],dispatch:V}),k)}}return p.filter=function(x){return arguments.length?(e=typeof x=="function"?x:kr(!!x),p):e},p.container=function(x){return arguments.length?(t=typeof x=="function"?x:kr(x),p):t},p.subject=function(x){return arguments.length?(n=typeof x=="function"?x:kr(x),p):n},p.touchable=function(x){return arguments.length?(o=typeof x=="function"?x:kr(!!x),p):o},p.on=function(){var x=i.on.apply(i,arguments);return x===i?p:x},p.clickDistance=function(x){return arguments.length?(f=(x=+x)*x,p):Math.sqrt(f)},p}function Fa(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Zd(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function dr(){}var Go=.7,ii=1/Go,Kn="\\s*([+-]?\\d+)\\s*",Ko="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ky=/^#([0-9a-f]{3,8})$/,Xy=new RegExp(`^rgb\\(${Kn},${Kn},${Kn}\\)$`),Zy=new RegExp(`^rgb\\(${Ht},${Ht},${Ht}\\)$`),Qy=new RegExp(`^rgba\\(${Kn},${Kn},${Kn},${Ko}\\)$`),Jy=new RegExp(`^rgba\\(${Ht},${Ht},${Ht},${Ko}\\)$`),eb=new RegExp(`^hsl\\(${Ko},${Ht},${Ht}\\)$`),tb=new RegExp(`^hsla\\(${Ko},${Ht},${Ht},${Ko}\\)$`),Gl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Fa(dr,Nn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Kl,formatHex:Kl,formatHex8:nb,formatHsl:ob,formatRgb:Xl,toString:Xl});function Kl(){return this.rgb().formatHex()}function nb(){return this.rgb().formatHex8()}function ob(){return Qd(this).formatHsl()}function Xl(){return this.rgb().formatRgb()}function Nn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ky.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Zl(t):n===3?new ct(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Or(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Or(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Xy.exec(e))?new ct(t[1],t[2],t[3],1):(t=Zy.exec(e))?new ct(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Qy.exec(e))?Or(t[1],t[2],t[3],t[4]):(t=Jy.exec(e))?Or(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=eb.exec(e))?ec(t[1],t[2]/100,t[3]/100,1):(t=tb.exec(e))?ec(t[1],t[2]/100,t[3]/100,t[4]):Gl.hasOwnProperty(e)?Zl(Gl[e]):e==="transparent"?new ct(NaN,NaN,NaN,0):null}function Zl(e){return new ct(e>>16&255,e>>8&255,e&255,1)}function Or(e,t,n,o){return o<=0&&(e=t=n=NaN),new ct(e,t,n,o)}function rb(e){return e instanceof dr||(e=Nn(e)),e?(e=e.rgb(),new ct(e.r,e.g,e.b,e.opacity)):new ct}function na(e,t,n,o){return arguments.length===1?rb(e):new ct(e,t,n,o??1)}function ct(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Fa(ct,na,Zd(dr,{brighter(e){return e=e==null?ii:Math.pow(ii,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Go:Math.pow(Go,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ct(En(this.r),En(this.g),En(this.b),si(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:Ql,formatHex:Ql,formatHex8:ib,formatRgb:Jl,toString:Jl}));function Ql(){return`#${xn(this.r)}${xn(this.g)}${xn(this.b)}`}function ib(){return`#${xn(this.r)}${xn(this.g)}${xn(this.b)}${xn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Jl(){const e=si(this.opacity);return`${e===1?"rgb(":"rgba("}${En(this.r)}, ${En(this.g)}, ${En(this.b)}${e===1?")":`, ${e})`}`}function si(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function En(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xn(e){return e=En(e),(e<16?"0":"")+e.toString(16)}function ec(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new kt(e,t,n,o)}function Qd(e){if(e instanceof kt)return new kt(e.h,e.s,e.l,e.opacity);if(e instanceof dr||(e=Nn(e)),!e)return new kt;if(e instanceof kt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),i=Math.max(t,n,o),a=NaN,l=i-r,c=(i+r)/2;return l?(t===i?a=(n-o)/l+(n<o)*6:n===i?a=(o-t)/l+2:a=(t-n)/l+4,l/=c<.5?i+r:2-i-r,a*=60):l=c>0&&c<1?0:a,new kt(a,l,c,e.opacity)}function sb(e,t,n,o){return arguments.length===1?Qd(e):new kt(e,t,n,o??1)}function kt(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Fa(kt,sb,Zd(dr,{brighter(e){return e=e==null?ii:Math.pow(ii,e),new kt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Go:Math.pow(Go,e),new kt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new ct(Ss(e>=240?e-240:e+120,r,o),Ss(e,r,o),Ss(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new kt(tc(this.h),Pr(this.s),Pr(this.l),si(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(){const e=si(this.opacity);return`${e===1?"hsl(":"hsla("}${tc(this.h)}, ${Pr(this.s)*100}%, ${Pr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function tc(e){return e=(e||0)%360,e<0?e+360:e}function Pr(e){return Math.max(0,Math.min(1,e||0))}function Ss(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Ba=e=>()=>e;function ab(e,t){return function(n){return e+n*t}}function lb(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function cb(e){return(e=+e)==1?Jd:function(t,n){return n-t?lb(t,n,e):Ba(isNaN(t)?n:t)}}function Jd(e,t){var n=t-e;return n?ab(e,n):Ba(isNaN(e)?t:e)}const ai=(function e(t){var n=cb(t);function o(r,i){var a=n((r=na(r)).r,(i=na(i)).r),l=n(r.g,i.g),c=n(r.b,i.b),u=Jd(r.opacity,i.opacity);return function(d){return r.r=a(d),r.g=l(d),r.b=c(d),r.opacity=u(d),r+""}}return o.gamma=e,o})(1);function ub(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(i){for(r=0;r<n;++r)o[r]=e[r]*(1-i)+t[r]*i;return o}}function db(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function fb(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),i=new Array(n),a;for(a=0;a<o;++a)r[a]=zo(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(l){for(a=0;a<o;++a)i[a]=r[a](l);return i}}function pb(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Lt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function hb(e,t){var n={},o={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=zo(e[r],t[r]):o[r]=t[r];return function(i){for(r in n)o[r]=n[r](i);return o}}var oa=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Es=new RegExp(oa.source,"g");function mb(e){return function(){return e}}function gb(e){return function(t){return e(t)+""}}function ef(e,t){var n=oa.lastIndex=Es.lastIndex=0,o,r,i,a=-1,l=[],c=[];for(e=e+"",t=t+"";(o=oa.exec(e))&&(r=Es.exec(t));)(i=r.index)>n&&(i=t.slice(n,i),l[a]?l[a]+=i:l[++a]=i),(o=o[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,c.push({i:a,x:Lt(o,r)})),n=Es.lastIndex;return n<t.length&&(i=t.slice(n),l[a]?l[a]+=i:l[++a]=i),l.length<2?c[0]?gb(c[0].x):mb(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)l[(f=c[d]).i]=f.x(u);return l.join("")})}function zo(e,t){var n=typeof t,o;return t==null||n==="boolean"?Ba(t):(n==="number"?Lt:n==="string"?(o=Nn(t))?(t=o,ai):ef:t instanceof Nn?ai:t instanceof Date?pb:db(t)?ub:Array.isArray(t)?fb:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?hb:Lt)(e,t)}var nc=180/Math.PI,ra={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tf(e,t,n,o,r,i){var a,l,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*n+t*o)&&(n-=e*c,o-=t*c),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,c/=l),e*o<t*n&&(e=-e,t=-t,c=-c,a=-a),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*nc,skewX:Math.atan(c)*nc,scaleX:a,scaleY:l}}var Rr;function yb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ra:tf(t.a,t.b,t.c,t.d,t.e,t.f)}function bb(e){return e==null||(Rr||(Rr=document.createElementNS("http://www.w3.org/2000/svg","g")),Rr.setAttribute("transform",e),!(e=Rr.transform.baseVal.consolidate()))?ra:(e=e.matrix,tf(e.a,e.b,e.c,e.d,e.e,e.f))}function nf(e,t,n,o){function r(u){return u.length?u.pop()+" ":""}function i(u,d,f,p,h,g){if(u!==f||d!==p){var m=h.push("translate(",null,t,null,n);g.push({i:m-4,x:Lt(u,f)},{i:m-2,x:Lt(d,p)})}else(f||p)&&h.push("translate("+f+t+p+n)}function a(u,d,f,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:f.push(r(f)+"rotate(",null,o)-2,x:Lt(u,d)})):d&&f.push(r(f)+"rotate("+d+o)}function l(u,d,f,p){u!==d?p.push({i:f.push(r(f)+"skewX(",null,o)-2,x:Lt(u,d)}):d&&f.push(r(f)+"skewX("+d+o)}function c(u,d,f,p,h,g){if(u!==f||d!==p){var m=h.push(r(h)+"scale(",null,",",null,")");g.push({i:m-4,x:Lt(u,f)},{i:m-2,x:Lt(d,p)})}else(f!==1||p!==1)&&h.push(r(h)+"scale("+f+","+p+")")}return function(u,d){var f=[],p=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,f,p),a(u.rotate,d.rotate,f,p),l(u.skewX,d.skewX,f,p),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,p),u=d=null,function(h){for(var g=-1,m=p.length,v;++g<m;)f[(v=p[g]).i]=v.x(h);return f.join("")}}}var vb=nf(yb,"px, ","px)","deg)"),xb=nf(bb,", ",")",")"),wb=1e-12;function oc(e){return((e=Math.exp(e))+1/e)/2}function Sb(e){return((e=Math.exp(e))-1/e)/2}function Eb(e){return((e=Math.exp(2*e))-1)/(e+1)}const Gr=(function e(t,n,o){function r(i,a){var l=i[0],c=i[1],u=i[2],d=a[0],f=a[1],p=a[2],h=d-l,g=f-c,m=h*h+g*g,v,b;if(m<wb)b=Math.log(p/u)/t,v=function(k){return[l+k*h,c+k*g,u*Math.exp(t*k*b)]};else{var C=Math.sqrt(m),y=(p*p-u*u+o*m)/(2*u*n*C),x=(p*p-u*u-o*m)/(2*p*n*C),w=Math.log(Math.sqrt(y*y+1)-y),E=Math.log(Math.sqrt(x*x+1)-x);b=(E-w)/t,v=function(k){var R=k*b,_=oc(w),V=u/(n*C)*(_*Eb(t*R+w)-Sb(w));return[l+V*h,c+V*g,u*_/oc(t*R+w)]}}return v.duration=b*1e3*t/Math.SQRT2,v}return r.rho=function(i){var a=Math.max(.001,+i),l=a*a,c=l*l;return e(a,l,c)},r})(Math.SQRT2,2,4);var eo=0,Io=0,wo=0,of=1e3,li,Mo,ci=0,kn=0,Ii=0,Xo=typeof performance=="object"&&performance.now?performance:Date,rf=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function za(){return kn||(rf(Cb),kn=Xo.now()+Ii)}function Cb(){kn=0}function ui(){this._call=this._time=this._next=null}ui.prototype=sf.prototype={constructor:ui,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?za():+n)+(t==null?0:+t),!this._next&&Mo!==this&&(Mo?Mo._next=this:li=this,Mo=this),this._call=e,this._time=n,ia()},stop:function(){this._call&&(this._call=null,this._time=1/0,ia())}};function sf(e,t,n){var o=new ui;return o.restart(e,t,n),o}function Tb(){za(),++eo;for(var e=li,t;e;)(t=kn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--eo}function rc(){kn=(ci=Xo.now())+Ii,eo=Io=0;try{Tb()}finally{eo=0,kb(),kn=0}}function Nb(){var e=Xo.now(),t=e-ci;t>of&&(Ii-=t,ci=e)}function kb(){for(var e,t=li,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:li=n);Mo=e,ia(o)}function ia(e){if(!eo){Io&&(Io=clearTimeout(Io));var t=e-kn;t>24?(e<1/0&&(Io=setTimeout(rc,e-Xo.now()-Ii)),wo&&(wo=clearInterval(wo))):(wo||(ci=Xo.now(),wo=setInterval(Nb,of)),eo=1,rf(rc))}}function ic(e,t,n){var o=new ui;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var Ob=Ri("start","end","cancel","interrupt"),Pb=[],af=0,sc=1,sa=2,Kr=3,ac=4,aa=5,Xr=6;function Mi(e,t,n,o,r,i){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Rb(e,n,{name:t,index:o,group:r,on:Ob,tween:Pb,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:af})}function Va(e,t){var n=Mt(e,t);if(n.state>af)throw new Error("too late; already scheduled");return n}function Ut(e,t){var n=Mt(e,t);if(n.state>Kr)throw new Error("too late; already running");return n}function Mt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Rb(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=sf(i,0,n.time);function i(u){n.state=sc,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var d,f,p,h;if(n.state!==sc)return c();for(d in o)if(h=o[d],h.name===n.name){if(h.state===Kr)return ic(a);h.state===ac?(h.state=Xr,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[d]):+d<t&&(h.state=Xr,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[d])}if(ic(function(){n.state===Kr&&(n.state=ac,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=sa,n.on.call("start",e,e.__data__,n.index,n.group),n.state===sa){for(n.state=Kr,r=new Array(p=n.tween.length),d=0,f=-1;d<p;++d)(h=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(r[++f]=h);r.length=f+1}}function l(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=aa,1),f=-1,p=r.length;++f<p;)r[f].call(e,d);n.state===aa&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=Xr,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Zr(e,t){var n=e.__transition,o,r,i=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((o=n[a]).name!==t){i=!1;continue}r=o.state>sa&&o.state<aa,o.state=Xr,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[a]}i&&delete e.__transition}}function _b(e){return this.each(function(){Zr(this,e)})}function Ib(e,t){var n,o;return function(){var r=Ut(this,e),i=r.tween;if(i!==n){o=n=i;for(var a=0,l=o.length;a<l;++a)if(o[a].name===t){o=o.slice(),o.splice(a,1);break}}r.tween=o}}function Mb(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var i=Ut(this,e),a=i.tween;if(a!==o){r=(o=a).slice();for(var l={name:t,value:n},c=0,u=r.length;c<u;++c)if(r[c].name===t){r[c]=l;break}c===u&&r.push(l)}i.tween=r}}function $b(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Mt(this.node(),n).tween,r=0,i=o.length,a;r<i;++r)if((a=o[r]).name===e)return a.value;return null}return this.each((t==null?Ib:Mb)(n,e,t))}function Ha(e,t,n){var o=e._id;return e.each(function(){var r=Ut(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return Mt(r,o).value[t]}}function lf(e,t){var n;return(typeof t=="number"?Lt:t instanceof Nn?ai:(n=Nn(t))?(t=n,ai):ef)(e,t)}function Ab(e){return function(){this.removeAttribute(e)}}function Db(e){return function(){this.removeAttributeNS(e.space,e.local)}}function jb(e,t,n){var o,r=n+"",i;return function(){var a=this.getAttribute(e);return a===r?null:a===o?i:i=t(o=a,n)}}function Lb(e,t,n){var o,r=n+"",i;return function(){var a=this.getAttributeNS(e.space,e.local);return a===r?null:a===o?i:i=t(o=a,n)}}function Fb(e,t,n){var o,r,i;return function(){var a,l=n(this),c;return l==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=l+"",a===c?null:a===o&&c===r?i:(r=c,i=t(o=a,l)))}}function Bb(e,t,n){var o,r,i;return function(){var a,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=l+"",a===c?null:a===o&&c===r?i:(r=c,i=t(o=a,l)))}}function zb(e,t){var n=_i(e),o=n==="transform"?xb:lf;return this.attrTween(e,typeof t=="function"?(n.local?Bb:Fb)(n,o,Ha(this,"attr."+e,t)):t==null?(n.local?Db:Ab)(n):(n.local?Lb:jb)(n,o,t))}function Vb(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Hb(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Wb(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Hb(e,i)),n}return r._value=t,r}function Ub(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Vb(e,i)),n}return r._value=t,r}function qb(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=_i(e);return this.tween(n,(o.local?Wb:Ub)(o,t))}function Yb(e,t){return function(){Va(this,e).delay=+t.apply(this,arguments)}}function Gb(e,t){return t=+t,function(){Va(this,e).delay=t}}function Kb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Yb:Gb)(t,e)):Mt(this.node(),t).delay}function Xb(e,t){return function(){Ut(this,e).duration=+t.apply(this,arguments)}}function Zb(e,t){return t=+t,function(){Ut(this,e).duration=t}}function Qb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Xb:Zb)(t,e)):Mt(this.node(),t).duration}function Jb(e,t){if(typeof t!="function")throw new Error;return function(){Ut(this,e).ease=t}}function e0(e){var t=this._id;return arguments.length?this.each(Jb(t,e)):Mt(this.node(),t).ease}function t0(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ut(this,e).ease=n}}function n0(e){if(typeof e!="function")throw new Error;return this.each(t0(this._id,e))}function o0(e){typeof e!="function"&&(e=Ld(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,l=o[r]=[],c,u=0;u<a;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new Xt(o,this._parents,this._name,this._id)}function r0(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,i=Math.min(o,r),a=new Array(o),l=0;l<i;++l)for(var c=t[l],u=n[l],d=c.length,f=a[l]=new Array(d),p,h=0;h<d;++h)(p=c[h]||u[h])&&(f[h]=p);for(;l<o;++l)a[l]=t[l];return new Xt(a,this._parents,this._name,this._id)}function i0(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function s0(e,t,n){var o,r,i=i0(t)?Va:Ut;return function(){var a=i(this,e),l=a.on;l!==o&&(r=(o=l).copy()).on(t,n),a.on=r}}function a0(e,t){var n=this._id;return arguments.length<2?Mt(this.node(),n).on.on(e):this.each(s0(n,e,t))}function l0(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function c0(){return this.on("end.remove",l0(this._id))}function u0(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ja(e));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a<r;++a)for(var l=o[a],c=l.length,u=i[a]=new Array(c),d,f,p=0;p<c;++p)(d=l[p])&&(f=e.call(d,d.__data__,p,l))&&("__data__"in d&&(f.__data__=d.__data__),u[p]=f,Mi(u[p],t,n,p,u,Mt(d,n)));return new Xt(i,this._parents,t,n)}function d0(e){var t=this._name,n=this._id;typeof e!="function"&&(e=jd(e));for(var o=this._groups,r=o.length,i=[],a=[],l=0;l<r;++l)for(var c=o[l],u=c.length,d,f=0;f<u;++f)if(d=c[f]){for(var p=e.call(d,d.__data__,f,c),h,g=Mt(d,n),m=0,v=p.length;m<v;++m)(h=p[m])&&Mi(h,t,n,m,p,g);i.push(p),a.push(d)}return new Xt(i,a,t,n)}var f0=ur.prototype.constructor;function p0(){return new f0(this._groups,this._parents)}function h0(e,t){var n,o,r;return function(){var i=Jn(this,e),a=(this.style.removeProperty(e),Jn(this,e));return i===a?null:i===n&&a===o?r:r=t(n=i,o=a)}}function cf(e){return function(){this.style.removeProperty(e)}}function m0(e,t,n){var o,r=n+"",i;return function(){var a=Jn(this,e);return a===r?null:a===o?i:i=t(o=a,n)}}function g0(e,t,n){var o,r,i;return function(){var a=Jn(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),Jn(this,e))),a===c?null:a===o&&c===r?i:(r=c,i=t(o=a,l))}}function y0(e,t){var n,o,r,i="style."+t,a="end."+i,l;return function(){var c=Ut(this,e),u=c.on,d=c.value[i]==null?l||(l=cf(t)):void 0;(u!==n||r!==d)&&(o=(n=u).copy()).on(a,r=d),c.on=o}}function b0(e,t,n){var o=(e+="")=="transform"?vb:lf;return t==null?this.styleTween(e,h0(e,o)).on("end.style."+e,cf(e)):typeof t=="function"?this.styleTween(e,g0(e,o,Ha(this,"style."+e,t))).each(y0(this._id,e)):this.styleTween(e,m0(e,o,t),n).on("end.style."+e,null)}function v0(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function x0(e,t,n){var o,r;function i(){var a=t.apply(this,arguments);return a!==r&&(o=(r=a)&&v0(e,a,n)),o}return i._value=t,i}function w0(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,x0(e,t,n??""))}function S0(e){return function(){this.textContent=e}}function E0(e){return function(){var t=e(this);this.textContent=t??""}}function C0(e){return this.tween("text",typeof e=="function"?E0(Ha(this,"text",e)):S0(e==null?"":e+""))}function T0(e){return function(t){this.textContent=e.call(this,t)}}function N0(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&T0(r)),t}return o._value=e,o}function k0(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,N0(e))}function O0(){for(var e=this._name,t=this._id,n=uf(),o=this._groups,r=o.length,i=0;i<r;++i)for(var a=o[i],l=a.length,c,u=0;u<l;++u)if(c=a[u]){var d=Mt(c,t);Mi(c,e,n,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Xt(o,this._parents,e,n)}function P0(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(i,a){var l={value:a},c={value:function(){--r===0&&i()}};n.each(function(){var u=Ut(this,o),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),u.on=t}),r===0&&i()})}var R0=0;function Xt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function uf(){return++R0}var qt=ur.prototype;Xt.prototype={constructor:Xt,select:u0,selectAll:d0,selectChild:qt.selectChild,selectChildren:qt.selectChildren,filter:o0,merge:r0,selection:p0,transition:O0,call:qt.call,nodes:qt.nodes,node:qt.node,size:qt.size,empty:qt.empty,each:qt.each,on:a0,attr:zb,attrTween:qb,style:b0,styleTween:w0,text:C0,textTween:k0,remove:c0,tween:$b,delay:Kb,duration:Qb,ease:e0,easeVarying:n0,end:P0,[Symbol.iterator]:qt[Symbol.iterator]};function _0(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var I0={time:null,delay:0,duration:250,ease:_0};function M0(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function $0(e){var t,n;e instanceof Xt?(t=e._id,e=e._name):(t=uf(),(n=I0).time=za(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var a=o[i],l=a.length,c,u=0;u<l;++u)(c=a[u])&&Mi(c,e,t,u,a,n||M0(c,t));return new Xt(o,this._parents,e,t)}ur.prototype.interrupt=_b;ur.prototype.transition=$0;const _r=e=>()=>e;function A0(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function Kt(e,t,n){this.k=e,this.x=t,this.y=n}Kt.prototype={constructor:Kt,scale:function(e){return e===1?this:new Kt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Kt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var $i=new Kt(1,0,0);df.prototype=Kt.prototype;function df(e){for(;!e.__zoom;)if(!(e=e.parentNode))return $i;return e.__zoom}function Cs(e){e.stopImmediatePropagation()}function So(e){e.preventDefault(),e.stopImmediatePropagation()}function D0(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function j0(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function lc(){return this.__zoom||$i}function L0(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function F0(){return navigator.maxTouchPoints||"ontouchstart"in this}function B0(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function ff(){var e=D0,t=j0,n=B0,o=L0,r=F0,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],l=250,c=Gr,u=Ri("start","zoom","end"),d,f,p,h=500,g=150,m=0,v=10;function b(N){N.property("__zoom",lc).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",_).on("dblclick.zoom",V).filter(r).on("touchstart.zoom",I).on("touchmove.zoom",S).on("touchend.zoom touchcancel.zoom",A).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(N,O,P,L){var M=N.selection?N.selection():N;M.property("__zoom",lc),N!==M?w(N,O,P,L):M.interrupt().each(function(){E(this,arguments).event(L).start().zoom(null,typeof O=="function"?O.apply(this,arguments):O).end()})},b.scaleBy=function(N,O,P,L){b.scaleTo(N,function(){var M=this.__zoom.k,j=typeof O=="function"?O.apply(this,arguments):O;return M*j},P,L)},b.scaleTo=function(N,O,P,L){b.transform(N,function(){var M=t.apply(this,arguments),j=this.__zoom,$=P==null?x(M):typeof P=="function"?P.apply(this,arguments):P,B=j.invert($),H=typeof O=="function"?O.apply(this,arguments):O;return n(y(C(j,H),$,B),M,a)},P,L)},b.translateBy=function(N,O,P,L){b.transform(N,function(){return n(this.__zoom.translate(typeof O=="function"?O.apply(this,arguments):O,typeof P=="function"?P.apply(this,arguments):P),t.apply(this,arguments),a)},null,L)},b.translateTo=function(N,O,P,L,M){b.transform(N,function(){var j=t.apply(this,arguments),$=this.__zoom,B=L==null?x(j):typeof L=="function"?L.apply(this,arguments):L;return n($i.translate(B[0],B[1]).scale($.k).translate(typeof O=="function"?-O.apply(this,arguments):-O,typeof P=="function"?-P.apply(this,arguments):-P),j,a)},L,M)};function C(N,O){return O=Math.max(i[0],Math.min(i[1],O)),O===N.k?N:new Kt(O,N.x,N.y)}function y(N,O,P){var L=O[0]-P[0]*N.k,M=O[1]-P[1]*N.k;return L===N.x&&M===N.y?N:new Kt(N.k,L,M)}function x(N){return[(+N[0][0]+ +N[1][0])/2,(+N[0][1]+ +N[1][1])/2]}function w(N,O,P,L){N.on("start.zoom",function(){E(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(L).end()}).tween("zoom",function(){var M=this,j=arguments,$=E(M,j).event(L),B=t.apply(M,j),H=P==null?x(B):typeof P=="function"?P.apply(M,j):P,U=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),W=M.__zoom,K=typeof O=="function"?O.apply(M,j):O,Q=c(W.invert(H).concat(U/W.k),K.invert(H).concat(U/K.k));return function(ee){if(ee===1)ee=K;else{var q=Q(ee),J=U/q[2];ee=new Kt(J,H[0]-q[0]*J,H[1]-q[1]*J)}$.zoom(null,ee)}})}function E(N,O,P){return!P&&N.__zooming||new k(N,O)}function k(N,O){this.that=N,this.args=O,this.active=0,this.sourceEvent=null,this.extent=t.apply(N,O),this.taps=0}k.prototype={event:function(N){return N&&(this.sourceEvent=N),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(N,O){return this.mouse&&N!=="mouse"&&(this.mouse[1]=O.invert(this.mouse[0])),this.touch0&&N!=="touch"&&(this.touch0[1]=O.invert(this.touch0[0])),this.touch1&&N!=="touch"&&(this.touch1[1]=O.invert(this.touch1[0])),this.that.__zoom=O,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(N){var O=ht(this.that).datum();u.call(N,this.that,new A0(N,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),O)}};function R(N,...O){if(!e.apply(this,arguments))return;var P=E(this,O).event(N),L=this.__zoom,M=Math.max(i[0],Math.min(i[1],L.k*Math.pow(2,o.apply(this,arguments)))),j=Tt(N);if(P.wheel)(P.mouse[0][0]!==j[0]||P.mouse[0][1]!==j[1])&&(P.mouse[1]=L.invert(P.mouse[0]=j)),clearTimeout(P.wheel);else{if(L.k===M)return;P.mouse=[j,L.invert(j)],Zr(this),P.start()}So(N),P.wheel=setTimeout($,g),P.zoom("mouse",n(y(C(L,M),P.mouse[0],P.mouse[1]),P.extent,a));function $(){P.wheel=null,P.end()}}function _(N,...O){if(p||!e.apply(this,arguments))return;var P=N.currentTarget,L=E(this,O,!0).event(N),M=ht(N.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",U,!0),j=Tt(N,P),$=N.clientX,B=N.clientY;Gd(N.view),Cs(N),L.mouse=[j,this.__zoom.invert(j)],Zr(this),L.start();function H(W){if(So(W),!L.moved){var K=W.clientX-$,Q=W.clientY-B;L.moved=K*K+Q*Q>m}L.event(W).zoom("mouse",n(y(L.that.__zoom,L.mouse[0]=Tt(W,P),L.mouse[1]),L.extent,a))}function U(W){M.on("mousemove.zoom mouseup.zoom",null),Kd(W.view,L.moved),So(W),L.event(W).end()}}function V(N,...O){if(e.apply(this,arguments)){var P=this.__zoom,L=Tt(N.changedTouches?N.changedTouches[0]:N,this),M=P.invert(L),j=P.k*(N.shiftKey?.5:2),$=n(y(C(P,j),L,M),t.apply(this,O),a);So(N),l>0?ht(this).transition().duration(l).call(w,$,L,N):ht(this).call(b.transform,$,L,N)}}function I(N,...O){if(e.apply(this,arguments)){var P=N.touches,L=P.length,M=E(this,O,N.changedTouches.length===L).event(N),j,$,B,H;for(Cs(N),$=0;$<L;++$)B=P[$],H=Tt(B,this),H=[H,this.__zoom.invert(H),B.identifier],M.touch0?!M.touch1&&M.touch0[2]!==H[2]&&(M.touch1=H,M.taps=0):(M.touch0=H,j=!0,M.taps=1+!!d);d&&(d=clearTimeout(d)),j&&(M.taps<2&&(f=H[0],d=setTimeout(function(){d=null},h)),Zr(this),M.start())}}function S(N,...O){if(this.__zooming){var P=E(this,O).event(N),L=N.changedTouches,M=L.length,j,$,B,H;for(So(N),j=0;j<M;++j)$=L[j],B=Tt($,this),P.touch0&&P.touch0[2]===$.identifier?P.touch0[0]=B:P.touch1&&P.touch1[2]===$.identifier&&(P.touch1[0]=B);if($=P.that.__zoom,P.touch1){var U=P.touch0[0],W=P.touch0[1],K=P.touch1[0],Q=P.touch1[1],ee=(ee=K[0]-U[0])*ee+(ee=K[1]-U[1])*ee,q=(q=Q[0]-W[0])*q+(q=Q[1]-W[1])*q;$=C($,Math.sqrt(ee/q)),B=[(U[0]+K[0])/2,(U[1]+K[1])/2],H=[(W[0]+Q[0])/2,(W[1]+Q[1])/2]}else if(P.touch0)B=P.touch0[0],H=P.touch0[1];else return;P.zoom("touch",n(y($,B,H),P.extent,a))}}function A(N,...O){if(this.__zooming){var P=E(this,O).event(N),L=N.changedTouches,M=L.length,j,$;for(Cs(N),p&&clearTimeout(p),p=setTimeout(function(){p=null},h),j=0;j<M;++j)$=L[j],P.touch0&&P.touch0[2]===$.identifier?delete P.touch0:P.touch1&&P.touch1[2]===$.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&($=Tt($,this),Math.hypot(f[0]-$[0],f[1]-$[1])<v)){var B=ht(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return b.wheelDelta=function(N){return arguments.length?(o=typeof N=="function"?N:_r(+N),b):o},b.filter=function(N){return arguments.length?(e=typeof N=="function"?N:_r(!!N),b):e},b.touchable=function(N){return arguments.length?(r=typeof N=="function"?N:_r(!!N),b):r},b.extent=function(N){return arguments.length?(t=typeof N=="function"?N:_r([[+N[0][0],+N[0][1]],[+N[1][0],+N[1][1]]]),b):t},b.scaleExtent=function(N){return arguments.length?(i[0]=+N[0],i[1]=+N[1],b):[i[0],i[1]]},b.translateExtent=function(N){return arguments.length?(a[0][0]=+N[0][0],a[1][0]=+N[1][0],a[0][1]=+N[0][1],a[1][1]=+N[1][1],b):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},b.constrain=function(N){return arguments.length?(n=N,b):n},b.duration=function(N){return arguments.length?(l=+N,b):l},b.interpolate=function(N){return arguments.length?(c=N,b):c},b.on=function(){var N=u.on.apply(u,arguments);return N===u?b:N},b.clickDistance=function(N){return arguments.length?(m=(N=+N)*N,b):Math.sqrt(m)},b.tapDistance=function(N){return arguments.length?(v=+N,b):v},b}const lt={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.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:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow 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:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/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."},Zo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],pf=["Enter"," ","Escape"],hf={"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:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, 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"};var to;(function(e){e.Strict="strict",e.Loose="loose"})(to||(to={}));var Cn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Cn||(Cn={}));var Qo;(function(e){e.Partial="partial",e.Full="full"})(Qo||(Qo={}));const mf={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var nn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(nn||(nn={}));var Jo;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Jo||(Jo={}));var fe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(fe||(fe={}));const cc={[fe.Left]:fe.Right,[fe.Right]:fe.Left,[fe.Top]:fe.Bottom,[fe.Bottom]:fe.Top};function gf(e){return e===null?null:e?"valid":"invalid"}const yf=e=>"id"in e&&"source"in e&&"target"in e,z0=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Wa=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),fr=(e,t=[0,0])=>{const{width:n,height:o}=Qt(e),r=e.origin??t,i=n*r[0],a=o*r[1];return{x:e.position.x-i,y:e.position.y-a}},V0=(e,t={nodeOrigin:[0,0]})=>{if(process.env.NODE_ENV==="development"&&!t.nodeLookup&&console.warn("Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows."),e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((o,r)=>{const i=typeof r=="string";let a=!t.nodeLookup&&!i?r:void 0;t.nodeLookup&&(a=i?t.nodeLookup.get(r):Wa(r)?r:t.nodeLookup.get(r.id));const l=a?di(a,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ai(o,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Di(n)},pr=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(r=>{(t.filter===void 0||t.filter(r))&&(n=Ai(n,di(r)),o=!0)}),o?Di(n):{x:0,y:0,width:0,height:0}},Ua=(e,t,[n,o,r]=[0,0,1],i=!1,a=!1)=>{const l={...mr(t,[n,o,r]),width:t.width/r,height:t.height/r},c=[];for(const u of e.values()){const{measured:d,selectable:f=!0,hidden:p=!1}=u;if(a&&!f||p)continue;const h=d.width??u.width??u.initialWidth??null,g=d.height??u.height??u.initialHeight??null,m=er(l,oo(u)),v=(h??0)*(g??0),b=i&&m>0;(!u.internals.handleBounds||b||m>=v||u.dragging)&&c.push(u)}return c},H0=(e,t)=>{const n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function W0(e,t){const n=new Map,o=t?.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&(t?.includeHiddenNodes||!r.hidden)&&(!o||o.has(r.id))&&n.set(r.id,r)}),n}async function U0({nodes:e,width:t,height:n,panZoom:o,minZoom:r,maxZoom:i},a){if(e.size===0)return Promise.resolve(!0);const l=W0(e,a),c=pr(l),u=qa(c,t,n,a?.minZoom??r,a?.maxZoom??i,a?.padding??.1);return await o.setViewport(u,{duration:a?.duration,ease:a?.ease,interpolate:a?.interpolate}),Promise.resolve(!0)}function bf({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:i}){const a=n.get(e),l=a.parentId?n.get(a.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},d=a.origin??o;let f=a.extent||r;if(a.extent==="parent"&&!a.expandParent)if(!l)i?.("005",lt.error005());else{const h=l.measured.width,g=l.measured.height;h&&g&&(f=[[c,u],[c+h,u+g]])}else l&&ro(a.extent)&&(f=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const p=ro(f)?On(t,f,a.measured):t;return(a.measured.width===void 0||a.measured.height===void 0)&&i?.("015",lt.error015()),{position:{x:p.x-c+(a.measured.width??0)*d[0],y:p.y-u+(a.measured.height??0)*d[1]},positionAbsolute:p}}async function q0({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){const i=new Set(e.map(p=>p.id)),a=[];for(const p of n){if(p.deletable===!1)continue;const h=i.has(p.id),g=!h&&p.parentId&&a.find(m=>m.id===p.parentId);(h||g)&&a.push(p)}const l=new Set(t.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),d=H0(a,c);for(const p of c)l.has(p.id)&&!d.find(g=>g.id===p.id)&&d.push(p);if(!r)return{edges:d,nodes:a};const f=await r({nodes:a,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:a}:{edges:[],nodes:[]}:f}const no=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),On=(e={x:0,y:0},t,n)=>({x:no(e.x,t[0][0],t[1][0]-(n?.width??0)),y:no(e.y,t[0][1],t[1][1]-(n?.height??0))});function vf(e,t,n){const{width:o,height:r}=Qt(n),{x:i,y:a}=n.internals.positionAbsolute;return On(e,[[i,a],[i+o,a+r]],t)}const uc=(e,t,n)=>e<t?no(Math.abs(e-t),1,t)/t:e>n?-no(Math.abs(e-n),1,t)/t:0,xf=(e,t,n=15,o=40)=>{const r=uc(e.x,o,t.width-o)*n,i=uc(e.y,o,t.height-o)*n;return[r,i]},Ai=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),la=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),Di=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),oo=(e,t=[0,0])=>{const{x:n,y:o}=Wa(e)?e.internals.positionAbsolute:fr(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},di=(e,t=[0,0])=>{const{x:n,y:o}=Wa(e)?e.internals.positionAbsolute:fr(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},wf=(e,t)=>Di(Ai(la(e),la(t))),er=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},dc=e=>Ot(e.width)&&Ot(e.height)&&Ot(e.x)&&Ot(e.y),Ot=e=>!isNaN(e)&&isFinite(e),fi=(e,t)=>{process.env.NODE_ENV==="development"&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)},hr=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),mr=({x:e,y:t},[n,o,r],i=!1,a=[1,1])=>{const l={x:(e-n)/r,y:(t-o)/r};return i?hr(l,a):l},pi=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o});function An(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Y0(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=An(e,n),r=An(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=An(e.top??e.y??0,n),r=An(e.bottom??e.y??0,n),i=An(e.left??e.x??0,t),a=An(e.right??e.x??0,t);return{top:o,right:a,bottom:r,left:i,x:i+a,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function G0(e,t,n,o,r,i){const{x:a,y:l}=pi(e,[t,n,o]),{x:c,y:u}=pi({x:e.x+e.width,y:e.y+e.height},[t,n,o]),d=r-c,f=i-u;return{left:Math.floor(a),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(f)}}const qa=(e,t,n,o,r,i)=>{const a=Y0(i,t,n),l=(t-a.x)/e.width,c=(n-a.y)/e.height,u=Math.min(l,c),d=no(u,o,r),f=e.x+e.width/2,p=e.y+e.height/2,h=t/2-f*d,g=n/2-p*d,m=G0(e,h,g,d,t,n),v={left:Math.min(m.left-a.left,0),top:Math.min(m.top-a.top,0),right:Math.min(m.right-a.right,0),bottom:Math.min(m.bottom-a.bottom,0)};return{x:h-v.left+v.right,y:g-v.top+v.bottom,zoom:d}},tr=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function ro(e){return e!=null&&e!=="parent"}function Qt(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Ya(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function Sf(e,t={width:0,height:0},n,o,r){const i={...e},a=o.get(n);if(a){const l=a.origin||r;i.x+=a.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=a.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function fc(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function K0(){let e,t;return{promise:new Promise((o,r)=>{e=o,t=r}),resolve:e,reject:t}}function X0(e){return{...hf,...e||{}}}function Vo(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){const{x:i,y:a}=Pt(e),l=mr({x:i-(r?.left??0),y:a-(r?.top??0)},o),{x:c,y:u}=n?hr(l,t):l;return{xSnapped:c,ySnapped:u,...l}}const Ga=e=>({width:e.offsetWidth,height:e.offsetHeight}),Ef=e=>e?.getRootNode?.()||window?.document,Z0=["INPUT","SELECT","TEXTAREA"];function Cf(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:Z0.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Tf=e=>"clientX"in e,Pt=(e,t)=>{const n=Tf(e),o=n?e.clientX:e.touches?.[0].clientX,r=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:r-(t?.top??0)}},pc=(e,t,n,o,r)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(a=>{const l=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:r,position:a.getAttribute("data-handlepos"),x:(l.left-n.left)/o,y:(l.top-n.top)/o,...Ga(a)}})};function Nf({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:i,targetControlX:a,targetControlY:l}){const c=e*.125+r*.375+a*.375+n*.125,u=t*.125+i*.375+l*.375+o*.125,d=Math.abs(c-e),f=Math.abs(u-t);return[c,u,d,f]}function Ir(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function hc({pos:e,x1:t,y1:n,x2:o,y2:r,c:i}){switch(e){case fe.Left:return[t-Ir(t-o,i),n];case fe.Right:return[t+Ir(o-t,i),n];case fe.Top:return[t,n-Ir(n-r,i)];case fe.Bottom:return[t,n+Ir(r-n,i)]}}function Ka({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:i=fe.Top,curvature:a=.25}){const[l,c]=hc({pos:n,x1:e,y1:t,x2:o,y2:r,c:a}),[u,d]=hc({pos:i,x1:o,y1:r,x2:e,y2:t,c:a}),[f,p,h,g]=Nf({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${t} C${l},${c} ${u},${d} ${o},${r}`,f,p,h,g]}function kf({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,a=Math.abs(o-t)/2,l=o<t?o+a:o-a;return[i,l,r,a]}function Q0({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1,zIndexMode:i="basic"}){if(i==="manual")return o;const a=r&&n?o+1e3:o,l=Math.max(e.parentId||r&&e.selected?e.internals.z:0,t.parentId||r&&t.selected?t.internals.z:0);return a+l}function J0({sourceNode:e,targetNode:t,width:n,height:o,transform:r}){const i=Ai(di(e),di(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const a={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return er(a,Di(i))>0}const Of=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,ev=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),tv=(e,t,n={})=>{if(!e.source||!e.target)return fi("006",lt.error006()),t;const o=n.getEdgeId||Of;let r;return yf(e)?r={...e}:r={...e,id:o(e)},ev(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))},nv=(e,t,n,o={shouldReplaceId:!0})=>{const{id:r,...i}=e;if(!t.source||!t.target)return fi("006",lt.error006()),n;if(!n.find(u=>u.id===e.id))return fi("007",lt.error007(r)),n;const l=o.getEdgeId||Of,c={...i,id:o.shouldReplaceId?l(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(u=>u.id!==r).concat(c)};function Pf({sourceX:e,sourceY:t,targetX:n,targetY:o}){const[r,i,a,l]=kf({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,i,a,l]}const mc={[fe.Left]:{x:-1,y:0},[fe.Right]:{x:1,y:0},[fe.Top]:{x:0,y:-1},[fe.Bottom]:{x:0,y:1}},ov=({source:e,sourcePosition:t=fe.Bottom,target:n})=>t===fe.Left||t===fe.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},gc=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function rv({source:e,sourcePosition:t=fe.Bottom,target:n,targetPosition:o=fe.Top,center:r,offset:i,stepPosition:a}){const l=mc[t],c=mc[o],u={x:e.x+l.x*i,y:e.y+l.y*i},d={x:n.x+c.x*i,y:n.y+c.y*i},f=ov({source:u,sourcePosition:t,target:d}),p=f.x!==0?"x":"y",h=f[p];let g=[],m,v;const b={x:0,y:0},C={x:0,y:0},[,,y,x]=kf({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[p]*c[p]===-1){p==="x"?(m=r.x??u.x+(d.x-u.x)*a,v=r.y??(u.y+d.y)/2):(m=r.x??(u.x+d.x)/2,v=r.y??u.y+(d.y-u.y)*a);const E=[{x:m,y:u.y},{x:m,y:d.y}],k=[{x:u.x,y:v},{x:d.x,y:v}];l[p]===h?g=p==="x"?E:k:g=p==="x"?k:E}else{const E=[{x:u.x,y:d.y}],k=[{x:d.x,y:u.y}];if(p==="x"?g=l.x===h?k:E:g=l.y===h?E:k,t===o){const S=Math.abs(e[p]-n[p]);if(S<=i){const A=Math.min(i-1,i-S);l[p]===h?b[p]=(u[p]>e[p]?-1:1)*A:C[p]=(d[p]>n[p]?-1:1)*A}}if(t!==o){const S=p==="x"?"y":"x",A=l[p]===c[S],N=u[S]>d[S],O=u[S]<d[S];(l[p]===1&&(!A&&N||A&&O)||l[p]!==1&&(!A&&O||A&&N))&&(g=p==="x"?E:k)}const R={x:u.x+b.x,y:u.y+b.y},_={x:d.x+C.x,y:d.y+C.y},V=Math.max(Math.abs(R.x-g[0].x),Math.abs(_.x-g[0].x)),I=Math.max(Math.abs(R.y-g[0].y),Math.abs(_.y-g[0].y));V>=I?(m=(R.x+_.x)/2,v=g[0].y):(m=g[0].x,v=(R.y+_.y)/2)}return[[e,{x:u.x+b.x,y:u.y+b.y},...g,{x:d.x+C.x,y:d.y+C.y},n],m,v,y,x]}function iv(e,t,n,o){const r=Math.min(gc(e,t)/2,gc(t,n)/2,o),{x:i,y:a}=t;if(e.x===i&&i===n.x||e.y===a&&a===n.y)return`L${i} ${a}`;if(e.y===a){const u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${i+r*u},${a}Q ${i},${a} ${i},${a+r*d}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${a+r*c}Q ${i},${a} ${i+r*l},${a}`}function ca({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:i=fe.Top,borderRadius:a=5,centerX:l,centerY:c,offset:u=20,stepPosition:d=.5}){const[f,p,h,g,m]=rv({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:r},targetPosition:i,center:{x:l,y:c},offset:u,stepPosition:d});return[f.reduce((b,C,y)=>{let x="";return y>0&&y<f.length-1?x=iv(f[y-1],C,f[y+1],a):x=`${y===0?"M":"L"}${C.x} ${C.y}`,b+=x,b},""),p,h,g,m]}function yc(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function sv(e){const{sourceNode:t,targetNode:n}=e;if(!yc(t)||!yc(n))return null;const o=t.internals.handleBounds||bc(t.handles),r=n.internals.handleBounds||bc(n.handles),i=vc(o?.source??[],e.sourceHandle),a=vc(e.connectionMode===to.Strict?r?.target??[]:(r?.target??[]).concat(r?.source??[]),e.targetHandle);if(!i||!a)return e.onError?.("008",lt.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=i?.position||fe.Bottom,c=a?.position||fe.Top,u=Pn(t,i,l),d=Pn(n,a,c);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:c}}function bc(e){if(!e)return null;const t=[],n=[];for(const o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function Pn(e,t,n=fe.Left,o=!1){const r=(t?.x??0)+e.internals.positionAbsolute.x,i=(t?.y??0)+e.internals.positionAbsolute.y,{width:a,height:l}=t??Qt(e);if(o)return{x:r+a/2,y:i+l/2};switch(t?.position??n){case fe.Top:return{x:r+a/2,y:i};case fe.Right:return{x:r+a,y:i+l/2};case fe.Bottom:return{x:r+a/2,y:i+l};case fe.Left:return{x:r,y:i+l/2}}}function vc(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function ua(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function av(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const i=new Set;return e.reduce((a,l)=>([l.markerStart||o,l.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const u=ua(c,t);i.has(u)||(a.push({id:u,color:c.color||n,...c}),i.add(u))}}),a),[]).sort((a,l)=>a.id.localeCompare(l.id))}const Rf=1e3,lv=10,Xa={nodeOrigin:[0,0],nodeExtent:Zo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},cv={...Xa,checkEquality:!0};function Za(e,t){const n={...e};for(const o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function uv(e,t,n){const o=Za(Xa,n);for(const r of e.values())if(r.parentId)Ja(r,e,t,o);else{const i=fr(r,o.nodeOrigin),a=ro(r.extent)?r.extent:o.nodeExtent,l=On(i,a,Qt(r));r.internals.positionAbsolute=l}}function dv(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;const n=[],o=[];for(const r of e.handles){const i={id:r.id,width:r.width??1,height:r.height??1,nodeId:e.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(i):r.type==="target"&&o.push(i)}return{source:n,target:o}}function Qa(e){return e==="manual"}function da(e,t,n,o={}){const r=Za(cv,o),i={i:0},a=new Map(t),l=r?.elevateNodesOnSelect&&!Qa(r.zIndexMode)?Rf:0;let c=e.length>0;t.clear(),n.clear();for(const u of e){let d=a.get(u.id);if(r.checkEquality&&u===d?.internals.userNode)t.set(u.id,d);else{const f=fr(u,r.nodeOrigin),p=ro(u.extent)?u.extent:r.nodeExtent,h=On(f,p,Qt(u));d={...r.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:h,handleBounds:dv(u,d),z:_f(u,l,r.zIndexMode),userNode:u}},t.set(u.id,d)}(d.measured===void 0||d.measured.width===void 0||d.measured.height===void 0)&&!d.hidden&&(c=!1),u.parentId&&Ja(d,t,n,o,i)}return c}function fv(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Ja(e,t,n,o,r){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:l,zIndexMode:c}=Za(Xa,o),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}fv(e,n),r&&!d.parentId&&d.internals.rootParentIndex===void 0&&c==="auto"&&(d.internals.rootParentIndex=++r.i,d.internals.z=d.internals.z+r.i*lv),r&&d.internals.rootParentIndex!==void 0&&(r.i=d.internals.rootParentIndex);const f=i&&!Qa(c)?Rf:0,{x:p,y:h,z:g}=pv(e,d,a,l,f,c),{positionAbsolute:m}=e.internals,v=p!==m.x||h!==m.y;(v||g!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:p,y:h}:m,z:g}})}function _f(e,t,n){const o=Ot(e.zIndex)?e.zIndex:0;return Qa(n)?o:o+(e.selected?t:0)}function pv(e,t,n,o,r,i){const{x:a,y:l}=t.internals.positionAbsolute,c=Qt(e),u=fr(e,n),d=ro(e.extent)?On(u,e.extent,c):u;let f=On({x:a+d.x,y:l+d.y},o,c);e.extent==="parent"&&(f=vf(f,c,t));const p=_f(e,r,i),h=t.internals.z??0;return{x:f.x,y:f.y,z:h>=p?h+1:p}}function el(e,t,n,o=[0,0]){const r=[],i=new Map;for(const a of e){const l=t.get(a.parentId);if(!l)continue;const c=i.get(a.parentId)?.expandedRect??oo(l),u=wf(c,a.rect);i.set(a.parentId,{expandedRect:u,parent:l})}return i.size>0&&i.forEach(({expandedRect:a,parent:l},c)=>{const u=l.internals.positionAbsolute,d=Qt(l),f=l.origin??o,p=a.x<u.x?Math.round(Math.abs(u.x-a.x)):0,h=a.y<u.y?Math.round(Math.abs(u.y-a.y)):0,g=Math.max(d.width,Math.round(a.width)),m=Math.max(d.height,Math.round(a.height)),v=(g-d.width)*f[0],b=(m-d.height)*f[1];(p>0||h>0||v||b)&&(r.push({id:c,type:"position",position:{x:l.position.x-p+v,y:l.position.y-h+b}}),n.get(c)?.forEach(C=>{e.some(y=>y.id===C.id)||r.push({id:C.id,type:"position",position:{x:C.position.x+p,y:C.position.y+h}})})),(d.width<a.width||d.height<a.height||p||h)&&r.push({id:c,type:"dimensions",setAttributes:!0,dimensions:{width:g+(p?f[0]*p-v:0),height:m+(h?f[1]*h-b:0)}})}),r}function hv(e,t,n,o,r,i,a){const l=o?.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const u=[],d=window.getComputedStyle(l),{m22:f}=new window.DOMMatrixReadOnly(d.transform),p=[];for(const h of e.values()){const g=t.get(h.id);if(!g)continue;if(g.hidden){t.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),c=!0;continue}const m=Ga(h.nodeElement),v=g.measured.width!==m.width||g.measured.height!==m.height;if(!!(m.width&&m.height&&(v||!g.internals.handleBounds||h.force))){const C=h.nodeElement.getBoundingClientRect(),y=ro(g.extent)?g.extent:i;let{positionAbsolute:x}=g.internals;g.parentId&&g.extent==="parent"?x=vf(x,m,t.get(g.parentId)):y&&(x=On(x,y,m));const w={...g,measured:m,internals:{...g.internals,positionAbsolute:x,handleBounds:{source:pc("source",h.nodeElement,C,f,g.id),target:pc("target",h.nodeElement,C,f,g.id)}}};t.set(g.id,w),g.parentId&&Ja(w,t,n,{nodeOrigin:r,zIndexMode:a}),c=!0,v&&(u.push({id:g.id,type:"dimensions",dimensions:m}),g.expandParent&&g.parentId&&p.push({id:g.id,parentId:g.parentId,rect:oo(w,r)}))}}if(p.length>0){const h=el(p,t,n,r);u.push(...h)}return{changes:u,updatedInternals:c}}async function mv({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const a=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,i]],o),l=!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2]);return Promise.resolve(l)}function xc(e,t,n,o,r,i){let a=r;const l=o.get(a)||new Map;o.set(a,l.set(n,t)),a=`${r}-${e}`;const c=o.get(a)||new Map;if(o.set(a,c.set(n,t)),i){a=`${r}-${e}-${i}`;const u=o.get(a)||new Map;o.set(a,u.set(n,t))}}function If(e,t,n){e.clear(),t.clear();for(const o of n){const{source:r,target:i,sourceHandle:a=null,targetHandle:l=null}=o,c={edgeId:o.id,source:r,target:i,sourceHandle:a,targetHandle:l},u=`${r}-${a}--${i}-${l}`,d=`${i}-${l}--${r}-${a}`;xc("source",c,d,e,r,a),xc("target",c,u,e,i,l),t.set(o.id,o)}}function Mf(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Mf(n,t):!1}function wc(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function gv(e,t,n,o){const r=new Map;for(const[i,a]of e)if((a.selected||a.id===o)&&(!a.parentId||!Mf(a,e))&&(a.draggable||t&&typeof a.draggable>"u")){const l=e.get(i);l&&r.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return r}function Ts({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){const r=[];for(const[a,l]of t){const c=n.get(a)?.internals.userNode;c&&r.push({...c,position:l.position,dragging:o})}if(!e)return[r[0],r];const i=n.get(e)?.internals.userNode;return[i?{...i,position:t.get(e)?.position||i.position,dragging:o}:r[0],r]}function yv({dragItems:e,snapGrid:t,x:n,y:o}){const r=e.values().next().value;if(!r)return null;const i={x:n-r.distance.x,y:o-r.distance.y},a=hr(i,t);return{x:a.x-i.x,y:a.y-i.y}}function bv({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:r}){let i={x:null,y:null},a=0,l=new Map,c=!1,u={x:0,y:0},d=null,f=!1,p=null,h=!1,g=!1,m=null;function v({noDragClassName:C,handleSelector:y,domNode:x,isSelectable:w,nodeId:E,nodeClickDistance:k=0}){p=ht(x);function R({x:S,y:A}){const{nodeLookup:N,nodeExtent:O,snapGrid:P,snapToGrid:L,nodeOrigin:M,onNodeDrag:j,onSelectionDrag:$,onError:B,updateNodePositions:H}=t();i={x:S,y:A};let U=!1;const W=l.size>1,K=W&&O?la(pr(l)):null,Q=W&&L?yv({dragItems:l,snapGrid:P,x:S,y:A}):null;for(const[ee,q]of l){if(!N.has(ee))continue;let J={x:S-q.distance.x,y:A-q.distance.y};L&&(J=Q?{x:Math.round(J.x+Q.x),y:Math.round(J.y+Q.y)}:hr(J,P));let Z=null;if(W&&O&&!q.extent&&K){const{positionAbsolute:ae}=q.internals,se=ae.x-K.x+O[0][0],de=ae.x+q.measured.width-K.x2+O[1][0],we=ae.y-K.y+O[0][1],Te=ae.y+q.measured.height-K.y2+O[1][1];Z=[[se,we],[de,Te]]}const{position:ne,positionAbsolute:z}=bf({nodeId:ee,nextPosition:J,nodeLookup:N,nodeExtent:Z||O,nodeOrigin:M,onError:B});U=U||q.position.x!==ne.x||q.position.y!==ne.y,q.position=ne,q.internals.positionAbsolute=z}if(g=g||U,!!U&&(H(l,!0),m&&(o||j||!E&&$))){const[ee,q]=Ts({nodeId:E,dragItems:l,nodeLookup:N});o?.(m,l,ee,q),j?.(m,ee,q),E||$?.(m,q)}}async function _(){if(!d)return;const{transform:S,panBy:A,autoPanSpeed:N,autoPanOnNodeDrag:O}=t();if(!O){c=!1,cancelAnimationFrame(a);return}const[P,L]=xf(u,d,N);(P!==0||L!==0)&&(i.x=(i.x??0)-P/S[2],i.y=(i.y??0)-L/S[2],await A({x:P,y:L})&&R(i)),a=requestAnimationFrame(_)}function V(S){const{nodeLookup:A,multiSelectionActive:N,nodesDraggable:O,transform:P,snapGrid:L,snapToGrid:M,selectNodesOnDrag:j,onNodeDragStart:$,onSelectionDragStart:B,unselectNodesAndEdges:H}=t();f=!0,(!j||!w)&&!N&&E&&(A.get(E)?.selected||H()),w&&j&&E&&e?.(E);const U=Vo(S.sourceEvent,{transform:P,snapGrid:L,snapToGrid:M,containerBounds:d});if(i=U,l=gv(A,O,U,E),l.size>0&&(n||$||!E&&B)){const[W,K]=Ts({nodeId:E,dragItems:l,nodeLookup:A});n?.(S.sourceEvent,l,W,K),$?.(S.sourceEvent,W,K),E||B?.(S.sourceEvent,K)}}const I=Xd().clickDistance(k).on("start",S=>{const{domNode:A,nodeDragThreshold:N,transform:O,snapGrid:P,snapToGrid:L}=t();d=A?.getBoundingClientRect()||null,h=!1,g=!1,m=S.sourceEvent,N===0&&V(S),i=Vo(S.sourceEvent,{transform:O,snapGrid:P,snapToGrid:L,containerBounds:d}),u=Pt(S.sourceEvent,d)}).on("drag",S=>{const{autoPanOnNodeDrag:A,transform:N,snapGrid:O,snapToGrid:P,nodeDragThreshold:L,nodeLookup:M}=t(),j=Vo(S.sourceEvent,{transform:N,snapGrid:O,snapToGrid:P,containerBounds:d});if(m=S.sourceEvent,(S.sourceEvent.type==="touchmove"&&S.sourceEvent.touches.length>1||E&&!M.has(E))&&(h=!0),!h){if(!c&&A&&f&&(c=!0,_()),!f){const $=Pt(S.sourceEvent,d),B=$.x-u.x,H=$.y-u.y;Math.sqrt(B*B+H*H)>L&&V(S)}(i.x!==j.xSnapped||i.y!==j.ySnapped)&&l&&f&&(u=Pt(S.sourceEvent,d),R(j))}}).on("end",S=>{if(!(!f||h)&&(c=!1,f=!1,cancelAnimationFrame(a),l.size>0)){const{nodeLookup:A,updateNodePositions:N,onNodeDragStop:O,onSelectionDragStop:P}=t();if(g&&(N(l,!1),g=!1),r||O||!E&&P){const[L,M]=Ts({nodeId:E,dragItems:l,nodeLookup:A,dragging:!1});r?.(S.sourceEvent,l,L,M),O?.(S.sourceEvent,L,M),E||P?.(S.sourceEvent,M)}}}).filter(S=>{const A=S.target;return!S.button&&(!C||!wc(A,`.${C}`,x))&&(!y||wc(A,y,x))});p.call(I)}function b(){p?.on(".drag",null)}return{update:v,destroy:b}}function vv(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())er(r,oo(i))>0&&o.push(i);return o}const xv=250;function wv(e,t,n,o){let r=[],i=1/0;const a=vv(e,n,t+xv);for(const l of a){const c=[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]];for(const u of c){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;const{x:d,y:f}=Pn(l,u,u.position,!0),p=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(f-e.y,2));p>t||(p<i?(r=[{...u,x:d,y:f}],i=p):p===i&&r.push({...u,x:d,y:f}))}}if(!r.length)return null;if(r.length>1){const l=o.type==="source"?"target":"source";return r.find(c=>c.type===l)??r[0]}return r[0]}function $f(e,t,n,o,r,i=!1){const a=o.get(e);if(!a)return null;const l=r==="strict"?a.internals.handleBounds?.[t]:[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]],c=(n?l?.find(u=>u.id===n):l?.[0])??null;return c&&i?{...c,...Pn(a,c,c.position,!0)}:c}function Af(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Sv(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Df=()=>!0;function Ev(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:i,isTarget:a,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:d,flowId:f,panBy:p,cancelConnection:h,onConnectStart:g,onConnect:m,onConnectEnd:v,isValidConnection:b=Df,onReconnectEnd:C,updateConnection:y,getTransform:x,getFromHandle:w,autoPanSpeed:E,dragThreshold:k=1,handleDomNode:R}){const _=Ef(e.target);let V=0,I;const{x:S,y:A}=Pt(e),N=Af(i,R),O=l?.getBoundingClientRect();let P=!1;if(!O||!N)return;const L=$f(r,N,o,c,t);if(!L)return;let M=Pt(e,O),j=!1,$=null,B=!1,H=null;function U(){if(!d||!O)return;const[ne,z]=xf(M,O,E);p({x:ne,y:z}),V=requestAnimationFrame(U)}const W={...L,nodeId:r,type:N,position:L.position},K=c.get(r);let ee={inProgress:!0,isValid:null,from:Pn(K,W,fe.Left,!0),fromHandle:W,fromPosition:W.position,fromNode:K,to:M,toHandle:null,toPosition:cc[W.position],toNode:null,pointer:M};function q(){P=!0,y(ee),g?.(e,{nodeId:r,handleId:o,handleType:N})}k===0&&q();function J(ne){if(!P){const{x:Te,y:G}=Pt(ne),X=Te-S,te=G-A;if(!(X*X+te*te>k*k))return;q()}if(!w()||!W){Z(ne);return}const z=x();M=Pt(ne,O),I=wv(mr(M,z,!1,[1,1]),n,c,W),j||(U(),j=!0);const ae=jf(ne,{handle:I,connectionMode:t,fromNodeId:r,fromHandleId:o,fromType:a?"target":"source",isValidConnection:b,doc:_,lib:u,flowId:f,nodeLookup:c});H=ae.handleDomNode,$=ae.connection,B=Sv(!!I,ae.isValid);const se=c.get(r),de=se?Pn(se,W,fe.Left,!0):ee.from,we={...ee,from:de,isValid:B,to:ae.toHandle&&B?pi({x:ae.toHandle.x,y:ae.toHandle.y},z):M,toHandle:ae.toHandle,toPosition:B&&ae.toHandle?ae.toHandle.position:cc[W.position],toNode:ae.toHandle?c.get(ae.toHandle.nodeId):null,pointer:M};y(we),ee=we}function Z(ne){if(!("touches"in ne&&ne.touches.length>0)){if(P){(I||H)&&$&&B&&m?.($);const{inProgress:z,...ae}=ee,se={...ae,toPosition:ee.toHandle?ee.toPosition:null};v?.(ne,se),i&&C?.(ne,se)}h(),cancelAnimationFrame(V),j=!1,B=!1,$=null,H=null,_.removeEventListener("mousemove",J),_.removeEventListener("mouseup",Z),_.removeEventListener("touchmove",J),_.removeEventListener("touchend",Z)}}_.addEventListener("mousemove",J),_.addEventListener("mouseup",Z),_.addEventListener("touchmove",J),_.addEventListener("touchend",Z)}function jf(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:i,doc:a,lib:l,flowId:c,isValidConnection:u=Df,nodeLookup:d}){const f=i==="target",p=t?a.querySelector(`.${l}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:g}=Pt(e),m=a.elementFromPoint(h,g),v=m?.classList.contains(`${l}-flow__handle`)?m:p,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const C=Af(void 0,v),y=v.getAttribute("data-nodeid"),x=v.getAttribute("data-handleid"),w=v.classList.contains("connectable"),E=v.classList.contains("connectableend");if(!y||!C)return b;const k={source:f?y:o,sourceHandle:f?x:r,target:f?o:y,targetHandle:f?r:x};b.connection=k;const _=w&&E&&(n===to.Strict?f&&C==="source"||!f&&C==="target":y!==o||x!==r);b.isValid=_&&u(k),b.toHandle=$f(y,C,x,d,n,!0)}return b}const fa={onPointerDown:Ev,isValid:jf};function Cv({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){const r=ht(e);function i({translateExtent:l,width:c,height:u,zoomStep:d=1,pannable:f=!0,zoomable:p=!0,inversePan:h=!1}){const g=y=>{if(y.sourceEvent.type!=="wheel"||!t)return;const x=n(),w=y.sourceEvent.ctrlKey&&tr()?10:1,E=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*d,k=x[2]*Math.pow(2,E*w);t.scaleTo(k)};let m=[0,0];const v=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(m=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},b=y=>{const x=n();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!t)return;const w=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],E=[w[0]-m[0],w[1]-m[1]];m=w;const k=o()*Math.max(x[2],Math.log(x[2]))*(h?-1:1),R={x:x[0]-E[0]*k,y:x[1]-E[1]*k},_=[[0,0],[c,u]];t.setViewportConstrained({x:R.x,y:R.y,zoom:x[2]},_,l)},C=ff().on("start",v).on("zoom",f?b:null).on("zoom.wheel",p?g:null);r.call(C,{})}function a(){r.on("zoom",null)}return{update:i,destroy:a,pointer:Tt}}const ji=e=>({x:e.x,y:e.y,zoom:e.k}),Ns=({x:e,y:t,zoom:n})=>$i.translate(e,t).scale(n),Un=(e,t)=>e.target.closest(`.${t}`),Lf=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Tv=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,ks=(e,t=0,n=Tv,o=()=>{})=>{const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e},Ff=e=>{const t=e.ctrlKey&&tr()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function Nv({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return d=>{if(Un(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(d.ctrlKey&&a){const v=Tt(d),b=Ff(d),C=f*Math.pow(2,b);o.scaleTo(n,C,v,d);return}const p=d.deltaMode===1?20:1;let h=r===Cn.Vertical?0:d.deltaX*p,g=r===Cn.Horizontal?0:d.deltaY*p;!tr()&&d.shiftKey&&r!==Cn.Vertical&&(h=d.deltaY*p,g=0),o.translateBy(n,-(h/f)*i,-(g/f)*i,{internal:!0});const m=ji(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c?.(d,m),e.panScrollTimeout=setTimeout(()=>{u?.(d,m),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l?.(d,m))}}function kv({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,r){const i=o.type==="wheel",a=!t&&i&&!o.ctrlKey,l=Un(o,e);if(o.ctrlKey&&i&&l&&o.preventDefault(),a||l)return null;o.preventDefault(),n.call(this,o,r)}}function Ov({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;const r=ji(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=r,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,r)}}function Pv({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return i=>{e.usedRightMouseButton=!!(n&&Lf(t,e.mouseButton??0)),i.sourceEvent?.sync||o([i.transform.x,i.transform.y,i.transform.k]),r&&!i.sourceEvent?.internal&&r?.(i.sourceEvent,ji(i.transform))}}function Rv({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:i}){return a=>{if(!a.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&Lf(t,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,o(!1),r)){const l=ji(a.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r?.(a.sourceEvent,l)},n?150:0)}}}function _v({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:d}){return f=>{const p=e||t,h=n&&f.ctrlKey,g=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Un(f,`${u}-flow__node`)||Un(f,`${u}-flow__edge`)))return!0;if(!o&&!p&&!r&&!i&&!n||a||d&&!g||Un(f,l)&&g||Un(f,c)&&(!g||r&&g&&!e)||!n&&f.ctrlKey&&g)return!1;if(!n&&f.type==="touchstart"&&f.touches?.length>1)return f.preventDefault(),!1;if(!p&&!r&&!h&&g||!o&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(o)&&!o.includes(f.button)&&f.type==="mousedown")return!1;const m=Array.isArray(o)&&o.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||g)&&m}}function Iv({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:r,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=ff().scaleExtent([t,n]).translateExtent(o),p=ht(e).call(f);C({x:r.x,y:r.y,zoom:no(r.zoom,t,n)},[[0,0],[d.width,d.height]],o);const h=p.on("wheel.zoom"),g=p.on("dblclick.zoom");f.wheelDelta(Ff);function m(I,S){return p?new Promise(A=>{f?.interpolate(S?.interpolate==="linear"?zo:Gr).transform(ks(p,S?.duration,S?.ease,()=>A(!0)),I)}):Promise.resolve(!1)}function v({noWheelClassName:I,noPanClassName:S,onPaneContextMenu:A,userSelectionActive:N,panOnScroll:O,panOnDrag:P,panOnScrollMode:L,panOnScrollSpeed:M,preventScrolling:j,zoomOnPinch:$,zoomOnScroll:B,zoomOnDoubleClick:H,zoomActivationKeyPressed:U,lib:W,onTransformChange:K,connectionInProgress:Q,paneClickDistance:ee,selectionOnDrag:q}){N&&!u.isZoomingOrPanning&&b();const J=O&&!U&&!N;f.clickDistance(q?1/0:!Ot(ee)||ee<0?0:ee);const Z=J?Nv({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:f,panOnScrollMode:L,panOnScrollSpeed:M,zoomOnPinch:$,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:l}):kv({noWheelClassName:I,preventScrolling:j,d3ZoomHandler:h});if(p.on("wheel.zoom",Z,{passive:!1}),!N){const z=Ov({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});f.on("start",z);const ae=Pv({zoomPanValues:u,panOnDrag:P,onPaneContextMenu:!!A,onPanZoom:i,onTransformChange:K});f.on("zoom",ae);const se=Rv({zoomPanValues:u,panOnDrag:P,panOnScroll:O,onPaneContextMenu:A,onPanZoomEnd:l,onDraggingChange:c});f.on("end",se)}const ne=_v({zoomActivationKeyPressed:U,panOnDrag:P,zoomOnScroll:B,panOnScroll:O,zoomOnDoubleClick:H,zoomOnPinch:$,userSelectionActive:N,noPanClassName:S,noWheelClassName:I,lib:W,connectionInProgress:Q});f.filter(ne),H?p.on("dblclick.zoom",g):p.on("dblclick.zoom",null)}function b(){f.on("zoom",null)}async function C(I,S,A){const N=Ns(I),O=f?.constrain()(N,S,A);return O&&await m(O),new Promise(P=>P(O))}async function y(I,S){const A=Ns(I);return await m(A,S),new Promise(N=>N(A))}function x(I){if(p){const S=Ns(I),A=p.property("__zoom");(A.k!==I.zoom||A.x!==I.x||A.y!==I.y)&&f?.transform(p,S,null,{sync:!0})}}function w(){const I=p?df(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}function E(I,S){return p?new Promise(A=>{f?.interpolate(S?.interpolate==="linear"?zo:Gr).scaleTo(ks(p,S?.duration,S?.ease,()=>A(!0)),I)}):Promise.resolve(!1)}function k(I,S){return p?new Promise(A=>{f?.interpolate(S?.interpolate==="linear"?zo:Gr).scaleBy(ks(p,S?.duration,S?.ease,()=>A(!0)),I)}):Promise.resolve(!1)}function R(I){f?.scaleExtent(I)}function _(I){f?.translateExtent(I)}function V(I){const S=!Ot(I)||I<0?0:I;f?.clickDistance(S)}return{update:v,destroy:b,setViewport:y,setViewportConstrained:C,getViewport:w,scaleTo:E,scaleBy:k,setScaleExtent:R,setTranslateExtent:_,syncViewport:x,setClickDistance:V}}var io;(function(e){e.Line="line",e.Handle="handle"})(io||(io={}));function Mv({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:r,affectsY:i}){const a=e-t,l=n-o,c=[a>0?1:a<0?-1:0,l>0?1:l<0?-1:0];return a&&r&&(c[0]=c[0]*-1),l&&i&&(c[1]=c[1]*-1),c}function Sc(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:r}}function en(e,t){return Math.max(0,t-e)}function tn(e,t){return Math.max(0,e-t)}function Mr(e,t,n){return Math.max(0,t-e,e-n)}function Ec(e,t){return e?!t:t}function $v(e,t,n,o,r,i,a,l){let{affectsX:c,affectsY:u}=t;const{isHorizontal:d,isVertical:f}=t,p=d&&f,{xSnapped:h,ySnapped:g}=n,{minWidth:m,maxWidth:v,minHeight:b,maxHeight:C}=o,{x:y,y:x,width:w,height:E,aspectRatio:k}=e;let R=Math.floor(d?h-e.pointerX:0),_=Math.floor(f?g-e.pointerY:0);const V=w+(c?-R:R),I=E+(u?-_:_),S=-i[0]*w,A=-i[1]*E;let N=Mr(V,m,v),O=Mr(I,b,C);if(a){let M=0,j=0;c&&R<0?M=en(y+R+S,a[0][0]):!c&&R>0&&(M=tn(y+V+S,a[1][0])),u&&_<0?j=en(x+_+A,a[0][1]):!u&&_>0&&(j=tn(x+I+A,a[1][1])),N=Math.max(N,M),O=Math.max(O,j)}if(l){let M=0,j=0;c&&R>0?M=tn(y+R,l[0][0]):!c&&R<0&&(M=en(y+V,l[1][0])),u&&_>0?j=tn(x+_,l[0][1]):!u&&_<0&&(j=en(x+I,l[1][1])),N=Math.max(N,M),O=Math.max(O,j)}if(r){if(d){const M=Mr(V/k,b,C)*k;if(N=Math.max(N,M),a){let j=0;!c&&!u||c&&!u&&p?j=tn(x+A+V/k,a[1][1])*k:j=en(x+A+(c?R:-R)/k,a[0][1])*k,N=Math.max(N,j)}if(l){let j=0;!c&&!u||c&&!u&&p?j=en(x+V/k,l[1][1])*k:j=tn(x+(c?R:-R)/k,l[0][1])*k,N=Math.max(N,j)}}if(f){const M=Mr(I*k,m,v)/k;if(O=Math.max(O,M),a){let j=0;!c&&!u||u&&!c&&p?j=tn(y+I*k+S,a[1][0])/k:j=en(y+(u?_:-_)*k+S,a[0][0])/k,O=Math.max(O,j)}if(l){let j=0;!c&&!u||u&&!c&&p?j=en(y+I*k,l[1][0])/k:j=tn(y+(u?_:-_)*k,l[0][0])/k,O=Math.max(O,j)}}}_=_+(_<0?O:-O),R=R+(R<0?N:-N),r&&(p?V>I*k?_=(Ec(c,u)?-R:R)/k:R=(Ec(c,u)?-_:_)*k:d?(_=R/k,u=c):(R=_*k,c=u));const P=c?y+R:y,L=u?x+_:x;return{width:w+(c?-R:R),height:E+(u?-_:_),x:i[0]*R*(c?-1:1)+P,y:i[1]*_*(u?-1:1)+L}}const Bf={width:0,height:0,x:0,y:0},Av={...Bf,pointerX:0,pointerY:0,aspectRatio:1};function Dv(e){return[[0,0],[e.measured.width,e.measured.height]]}function jv(e,t,n){const o=t.position.x+e.position.x,r=t.position.y+e.position.y,i=e.measured.width??0,a=e.measured.height??0,l=n[0]*i,c=n[1]*a;return[[o-l,r-c],[o+i-l,r+a-c]]}function Lv({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:r}){const i=ht(e);let a={controlDirection:Sc("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:d,keepAspectRatio:f,resizeDirection:p,onResizeStart:h,onResize:g,onResizeEnd:m,shouldResize:v}){let b={...Bf},C={...Av};a={boundaries:d,resizeDirection:p,keepAspectRatio:f,controlDirection:Sc(u)};let y,x=null,w=[],E,k,R,_=!1;const V=Xd().on("start",I=>{const{nodeLookup:S,transform:A,snapGrid:N,snapToGrid:O,nodeOrigin:P,paneDomNode:L}=n();if(y=S.get(t),!y)return;x=L?.getBoundingClientRect()??null;const{xSnapped:M,ySnapped:j}=Vo(I.sourceEvent,{transform:A,snapGrid:N,snapToGrid:O,containerBounds:x});b={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},C={...b,pointerX:M,pointerY:j,aspectRatio:b.width/b.height},E=void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(E=S.get(y.parentId),k=E&&y.extent==="parent"?Dv(E):void 0),w=[],R=void 0;for(const[$,B]of S)if(B.parentId===t&&(w.push({id:$,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){const H=jv(B,y,B.origin??P);R?R=[[Math.min(H[0][0],R[0][0]),Math.min(H[0][1],R[0][1])],[Math.max(H[1][0],R[1][0]),Math.max(H[1][1],R[1][1])]]:R=H}h?.(I,{...b})}).on("drag",I=>{const{transform:S,snapGrid:A,snapToGrid:N,nodeOrigin:O}=n(),P=Vo(I.sourceEvent,{transform:S,snapGrid:A,snapToGrid:N,containerBounds:x}),L=[];if(!y)return;const{x:M,y:j,width:$,height:B}=b,H={},U=y.origin??O,{width:W,height:K,x:Q,y:ee}=$v(C,a.controlDirection,P,a.boundaries,a.keepAspectRatio,U,k,R),q=W!==$,J=K!==B,Z=Q!==M&&q,ne=ee!==j&&J;if(!Z&&!ne&&!q&&!J)return;if((Z||ne||U[0]===1||U[1]===1)&&(H.x=Z?Q:b.x,H.y=ne?ee:b.y,b.x=H.x,b.y=H.y,w.length>0)){const de=Q-M,we=ee-j;for(const Te of w)Te.position={x:Te.position.x-de+U[0]*(W-$),y:Te.position.y-we+U[1]*(K-B)},L.push(Te)}if((q||J)&&(H.width=q&&(!a.resizeDirection||a.resizeDirection==="horizontal")?W:b.width,H.height=J&&(!a.resizeDirection||a.resizeDirection==="vertical")?K:b.height,b.width=H.width,b.height=H.height),E&&y.expandParent){const de=U[0]*(H.width??0);H.x&&H.x<de&&(b.x=de,C.x=C.x-(H.x-de));const we=U[1]*(H.height??0);H.y&&H.y<we&&(b.y=we,C.y=C.y-(H.y-we))}const z=Mv({width:b.width,prevWidth:$,height:b.height,prevHeight:B,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),ae={...b,direction:z};v?.(I,ae)!==!1&&(_=!0,g?.(I,ae),o(H,L))}).on("end",I=>{_&&(m?.(I,{...b}),r?.({...b}),_=!1)});i.call(V)}function c(){i.on(".drag",null)}return{update:l,destroy:c}}function zf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $r={exports:{}},Os={},Ar={exports:{}},Ps={};var Cc;function Fv(){if(Cc)return Ps;Cc=1;var e=F;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function l(f,p){var h=p(),g=o({inst:{value:h,getSnapshot:p}}),m=g[0].inst,v=g[1];return i(function(){m.value=h,m.getSnapshot=p,c(m)&&v({inst:m})},[f,h,p]),r(function(){return c(m)&&v({inst:m}),f(function(){c(m)&&v({inst:m})})},[f]),a(h),h}function c(f){var p=f.getSnapshot;f=f.value;try{var h=p();return!n(f,h)}catch{return!0}}function u(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return Ps.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Ps}var Rs={};var Tc;function Bv(){return Tc||(Tc=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}function t(h,g){d||r.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=g();if(!f){var v=g();i(m,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=a({inst:{value:m,getSnapshot:g}});var b=v[0].inst,C=v[1];return c(function(){b.value=m,b.getSnapshot=g,n(b)&&C({inst:b})},[h,m,g]),l(function(){return n(b)&&C({inst:b}),h(function(){n(b)&&C({inst:b})})},[h]),u(m),m}function n(h){var g=h.getSnapshot;h=h.value;try{var m=g();return!i(h,m)}catch{return!0}}function o(h,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=F,i=typeof Object.is=="function"?Object.is:e,a=r.useState,l=r.useEffect,c=r.useLayoutEffect,u=r.useDebugValue,d=!1,f=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:t;Rs.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Rs}var Nc;function Vf(){return Nc||(Nc=1,process.env.NODE_ENV==="production"?Ar.exports=Fv():Ar.exports=Bv()),Ar.exports}var kc;function zv(){if(kc)return Os;kc=1;var e=F,t=Vf();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var o=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,l=e.useMemo,c=e.useDebugValue;return Os.useSyncExternalStoreWithSelector=function(u,d,f,p,h){var g=i(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=l(function(){function b(E){if(!C){if(C=!0,y=E,E=p(E),h!==void 0&&m.hasValue){var k=m.value;if(h(k,E))return x=k}return x=E}if(k=x,o(y,E))return k;var R=p(E);return h!==void 0&&h(k,R)?(y=E,k):(y=E,x=R)}var C=!1,y,x,w=f===void 0?null:f;return[function(){return b(d())},w===null?void 0:function(){return b(w())}]},[d,f,p,h]);var v=r(u,g[0],g[1]);return a(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},Os}var _s={};var Oc;function Vv(){return Oc||(Oc=1,process.env.NODE_ENV!=="production"&&(function(){function e(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=F,n=Vf(),o=typeof Object.is=="function"?Object.is:e,r=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,l=t.useMemo,c=t.useDebugValue;_s.useSyncExternalStoreWithSelector=function(u,d,f,p,h){var g=i(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=l(function(){function b(E){if(!C){if(C=!0,y=E,E=p(E),h!==void 0&&m.hasValue){var k=m.value;if(h(k,E))return x=k}return x=E}if(k=x,o(y,E))return k;var R=p(E);return h!==void 0&&h(k,R)?(y=E,k):(y=E,x=R)}var C=!1,y,x,w=f===void 0?null:f;return[function(){return b(d())},w===null?void 0:function(){return b(w())}]},[d,f,p,h]);var v=r(u,g[0],g[1]);return a(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),_s}var Pc;function Hv(){return Pc||(Pc=1,process.env.NODE_ENV==="production"?$r.exports=zv():$r.exports=Vv()),$r.exports}var Wv=Hv();const Uv=zf(Wv),qv={},Rc=e=>{let t;const n=new Set,o=(d,f)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const h=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(g=>g(t,h))}},r=()=>t,c={setState:o,getState:r,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(qv?"production":void 0)!=="production"&&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()}},u=t=e(o,r,c);return c},Yv=e=>e?Rc(e):Rc,{useDebugValue:Gv}=F,{useSyncExternalStoreWithSelector:Kv}=Uv,Xv=e=>e;function Hf(e,t=Xv,n){const o=Kv(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Gv(o),o}const _c=(e,t)=>{const n=Yv(e),o=(r,i=t)=>Hf(n,r,i);return Object.assign(o,n),o},Zv=(e,t)=>e?_c(e,t):_c;function Ve(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,r]of e)if(!Object.is(r,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}const Li=F.createContext(null),Qv=Li.Provider,Wf=lt.error001();function Ce(e,t){const n=F.useContext(Li);if(n===null)throw new Error(Wf);return Hf(n,e,t)}function He(){const e=F.useContext(Li);if(e===null)throw new Error(Wf);return F.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Ic={display:"none"},Jv={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Uf="react-flow__node-desc",qf="react-flow__edge-desc",ex="react-flow__aria-live",tx=e=>e.ariaLiveMessage,nx=e=>e.ariaLabelConfig;function ox({rfId:e}){const t=Ce(tx);return T.jsx("div",{id:`${ex}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Jv,children:t})}function rx({rfId:e,disableKeyboardA11y:t}){const n=Ce(nx);return T.jsxs(T.Fragment,{children:[T.jsx("div",{id:`${Uf}-${e}`,style:Ic,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),T.jsx("div",{id:`${qf}-${e}`,style:Ic,children:n["edge.a11yDescription.default"]}),!t&&T.jsx(ox,{rfId:e})]})}const Fi=F.forwardRef(({position:e="top-left",children:t,className:n,style:o,...r},i)=>{const a=`${e}`.split("-");return T.jsx("div",{className:Je(["react-flow__panel",n,...a]),style:o,ref:i,...r,children:t})});Fi.displayName="Panel";function ix({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:T.jsx(Fi,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:T.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const sx=e=>{const t=[],n=[];for(const[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(const[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},Dr=e=>e.id;function ax(e,t){return Ve(e.selectedNodes.map(Dr),t.selectedNodes.map(Dr))&&Ve(e.selectedEdges.map(Dr),t.selectedEdges.map(Dr))}function lx({onSelectionChange:e}){const t=He(),{selectedNodes:n,selectedEdges:o}=Ce(sx,ax);return F.useEffect(()=>{const r={nodes:n,edges:o};e?.(r),t.getState().onSelectionChangeHandlers.forEach(i=>i(r))},[n,o,e]),null}const cx=e=>!!e.onSelectionChangeHandlers;function ux({onSelectionChange:e}){const t=Ce(cx);return e||t?T.jsx(lx,{onSelectionChange:e}):null}const Yf=[0,0],dx={x:0,y:0,zoom:1},fx=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Mc=[...fx,"rfId"],px=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),$c={translateExtent:Zo,nodeOrigin:Yf,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function hx(e){const{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:r,setTranslateExtent:i,setNodeExtent:a,reset:l,setDefaultNodesAndEdges:c}=Ce(px,Ve),u=He();F.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{d.current=$c,l()}),[]);const d=F.useRef($c);return F.useEffect(()=>{for(const f of Mc){const p=e[f],h=d.current[f];p!==h&&(typeof e[f]>"u"||(f==="nodes"?t(p):f==="edges"?n(p):f==="minZoom"?o(p):f==="maxZoom"?r(p):f==="translateExtent"?i(p):f==="nodeExtent"?a(p):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:X0(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}d.current=e},Mc.map(f=>e[f])),null}function Ac(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function mx(e){const[t,n]=F.useState(e==="system"?null:e);return F.useEffect(()=>{if(e!=="system"){n(e);return}const o=Ac(),r=()=>n(o?.matches?"dark":"light");return r(),o?.addEventListener("change",r),()=>{o?.removeEventListener("change",r)}},[e]),t!==null?t:Ac()?.matches?"dark":"light"}const Dc=typeof document<"u"?document:null;function nr(e=null,t={target:Dc,actInsideInputWithModifier:!0}){const[n,o]=F.useState(!1),r=F.useRef(!1),i=F.useRef(new Set([])),[a,l]=F.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
|
|
2
2
|
`).replace(`
|
|
3
3
|
|
|
4
4
|
`,`
|
|
5
5
|
+`).split(`
|
|
6
|
-
`)),d=u.reduce((f,p)=>f.concat(...p),[]);return[u,d]}return[[],[]]},[e]);return F.useEffect(()=>{const c=t?.target??Dc,u=t?.actInsideInputWithModifier??!0;if(e!==null){const d=h=>{if(r.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!r.current||r.current&&!u)&&Cf(h))return!1;const m=Lc(h.code,l);if(i.current.add(h[m]),jc(a,i.current,!1)){const v=h.composedPath?.()?.[0]||h.target,b=v?.nodeName==="BUTTON"||v?.nodeName==="A";t.preventDefault!==!1&&(r.current||!b)&&h.preventDefault(),o(!0)}},f=h=>{const g=Lc(h.code,l);jc(a,i.current,!0)?(o(!1),i.current.clear()):i.current.delete(h[g]),h.key==="Meta"&&i.current.clear(),r.current=!1},p=()=>{i.current.clear(),o(!1)};return c?.addEventListener("keydown",d),c?.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c?.removeEventListener("keydown",d),c?.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,o]),n}function jc(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(r=>t.has(r)))}function Lc(e,t){return t.includes(e)?"code":"key"}const gx=()=>{const e=He();return F.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[o,r,i],panZoom:a}=e.getState();return a?(await a.setViewport({x:t.x??o,y:t.y??r,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{const{width:o,height:r,minZoom:i,maxZoom:a,panZoom:l}=e.getState(),c=qa(t,o,r,i,a,n?.padding??.1);return l?(await l.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:o,snapGrid:r,snapToGrid:i,domNode:a}=e.getState();if(!a)return t;const{x:l,y:c}=a.getBoundingClientRect(),u={x:t.x-l,y:t.y-c},d=n.snapGrid??r,f=n.snapToGrid??i;return mr(u,o,f,d)},flowToScreenPosition:t=>{const{transform:n,domNode:o}=e.getState();if(!o)return t;const{x:r,y:i}=o.getBoundingClientRect(),a=pi(t,n);return{x:a.x+r,y:a.y+i}}}),[])};function Gf(e,t){const n=[],o=new Map,r=[];for(const i of e)if(i.type==="add"){r.push(i);continue}else if(i.type==="remove"||i.type==="replace")o.set(i.id,[i]);else{const a=o.get(i.id);a?a.push(i):o.set(i.id,[i])}for(const i of t){const a=o.get(i.id);if(!a){n.push(i);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){n.push({...a[0].item});continue}const l={...i};for(const c of a)yx(c,l);n.push(l)}return r.length&&r.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function yx(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function tl(e,t){return Gf(e,t)}function nl(e,t){return Gf(e,t)}function mn(e,t){return{id:e,type:"select",selected:t}}function qn(e,t=new Set,n=!1){const o=[];for(const[r,i]of e){const a=t.has(r);!(i.selected===void 0&&!a)&&i.selected!==a&&(n&&(i.selected=a),o.push(mn(i.id,a)))}return o}function Fc({items:e=[],lookup:t}){const n=[],o=new Map(e.map(r=>[r.id,r]));for(const[r,i]of e.entries()){const a=t.get(i.id),l=a?.internals?.userNode??a;l!==void 0&&l!==i&&n.push({id:i.id,item:i,type:"replace"}),l===void 0&&n.push({item:i,type:"add",index:r})}for(const[r]of t)o.get(r)===void 0&&n.push({id:r,type:"remove"});return n}function Bc(e){return{id:e.id,type:"remove"}}const zc=e=>z0(e),bx=e=>yf(e);function Kf(e){return F.forwardRef(e)}const vx=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Vc(e){const[t,n]=F.useState(BigInt(0)),[o]=F.useState(()=>xx(()=>n(r=>r+BigInt(1))));return vx(()=>{const r=o.get();r.length&&(e(r),o.reset())},[t]),o}function xx(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Xf=F.createContext(null);function wx({children:e}){const t=He(),n=F.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:d,onNodesChange:f,nodeLookup:p,fitViewQueued:h,onNodesChangeMiddlewareMap:g}=t.getState();let m=c;for(const b of l)m=typeof b=="function"?b(m):b;let v=Fc({items:m,lookup:p});for(const b of g.values())v=b(v);d&&u(m),v.length>0?f?.(v):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:C,setNodes:y}=t.getState();b&&y(C)})},[]),o=Vc(n),r=F.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:f,edgeLookup:p}=t.getState();let h=c;for(const g of l)h=typeof g=="function"?g(h):g;d?u(h):f&&f(Fc({items:h,lookup:p}))},[]),i=Vc(r),a=F.useMemo(()=>({nodeQueue:o,edgeQueue:i}),[]);return T.jsx(Xf.Provider,{value:a,children:e})}function Sx(){const e=F.useContext(Xf);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const Ex=e=>!!e.panZoom;function Bi(){const e=gx(),t=He(),n=Sx(),o=Ee(Ex),r=F.useMemo(()=>{const i=f=>t.getState().nodeLookup.get(f),a=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},c=f=>{const{nodeLookup:p,nodeOrigin:h}=t.getState(),g=zc(f)?f:p.get(f.id),m=g.parentId?Sf(g.position,g.measured,g.parentId,p,h):g.position,v={...g,position:m,width:g.measured?.width??g.width,height:g.measured?.height??g.height};return oo(v)},u=(f,p,h={replace:!1})=>{a(g=>g.map(m=>{if(m.id===f){const v=typeof p=="function"?p(m):p;return h.replace&&zc(v)?v:{...m,...v}}return m}))},d=(f,p,h={replace:!1})=>{l(g=>g.map(m=>{if(m.id===f){const v=typeof p=="function"?p(m):p;return h.replace&&bx(v)?v:{...m,...v}}return m}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>i(f)?.internals.userNode,getInternalNode:i,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(p=>({...p}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:a,setEdges:l,addNodes:f=>{const p=Array.isArray(f)?f:[f];n.nodeQueue.push(h=>[...h,...p])},addEdges:f=>{const p=Array.isArray(f)?f:[f];n.edgeQueue.push(h=>[...h,...p])},toObject:()=>{const{nodes:f=[],edges:p=[],transform:h}=t.getState(),[g,m,v]=h;return{nodes:f.map(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x:g,y:m,zoom:v}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:h,edges:g,onNodesDelete:m,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:C,onDelete:y,onBeforeDelete:x}=t.getState(),{nodes:w,edges:E}=await q0({nodesToRemove:f,edgesToRemove:p,nodes:h,edges:g,onBeforeDelete:x}),k=E.length>0,R=w.length>0;if(k){const _=E.map(Bc);v?.(E),C(_)}if(R){const _=w.map(Bc);m?.(w),b(_)}return(R||k)&&y?.({nodes:w,edges:E}),{deletedNodes:w,deletedEdges:E}},getIntersectingNodes:(f,p=!0,h)=>{const g=dc(f),m=g?f:c(f),v=h!==void 0;return m?(h||t.getState().nodes).filter(b=>{const C=t.getState().nodeLookup.get(b.id);if(C&&!g&&(b.id===f.id||!C.internals.positionAbsolute))return!1;const y=oo(v?b:C),x=er(y,m);return p&&x>0||x>=y.width*y.height||x>=m.width*m.height}):[]},isNodeIntersecting:(f,p,h=!0)=>{const m=dc(f)?f:c(f);if(!m)return!1;const v=er(m,p);return h&&v>0||v>=p.width*p.height||v>=m.width*m.height},updateNode:u,updateNodeData:(f,p,h={replace:!1})=>{u(f,g=>{const m=typeof p=="function"?p(g):p;return h.replace?{...g,data:m}:{...g,data:{...g.data,...m}}},h)},updateEdge:d,updateEdgeData:(f,p,h={replace:!1})=>{d(f,g=>{const m=typeof p=="function"?p(g):p;return h.replace?{...g,data:m}:{...g,data:{...g.data,...m}}},h)},getNodesBounds:f=>{const{nodeLookup:p,nodeOrigin:h}=t.getState();return V0(f,{nodeLookup:p,nodeOrigin:h})},getHandleConnections:({type:f,id:p,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}-${f}${p?`-${p}`:""}`)?.values()??[]),getNodeConnections:({type:f,handleId:p,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}${f?p?`-${f}-${p}`:`-${f}`:""}`)?.values()??[]),fitView:async f=>{const p=t.getState().fitViewResolver??K0();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:p}),n.nodeQueue.push(h=>[...h]),p.promise}}},[]);return F.useMemo(()=>({...r,...e,viewportInitialized:o}),[o])}const Hc=e=>e.selected,Cx=typeof window<"u"?window:void 0;function Tx({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=He(),{deleteElements:o}=Bi(),r=nr(e,{actInsideInputWithModifier:!1}),i=nr(t,{target:Cx});F.useEffect(()=>{if(r){const{edges:a,nodes:l}=n.getState();o({nodes:l.filter(Hc),edges:a.filter(Hc)}),n.setState({nodesSelectionActive:!1})}},[r]),F.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function Nx(e){const t=He();F.useEffect(()=>{const n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;const o=Ga(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",lt.error004()),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);const o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}const zi={position:"absolute",width:"100%",height:"100%",top:0,left:0},kx=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Ox({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:r=.5,panOnScrollMode:i=Cn.Free,zoomOnDoubleClick:a=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:h=!0,children:g,noWheelClassName:m,noPanClassName:v,onViewportChange:b,isControlledViewport:C,paneClickDistance:y,selectionOnDrag:x}){const w=He(),E=F.useRef(null),{userSelectionActive:k,lib:R,connectionInProgress:_}=Ee(kx,Ve),V=nr(p),I=F.useRef();Nx(E);const S=F.useCallback(A=>{b?.({x:A[0],y:A[1],zoom:A[2]}),C||w.setState({transform:A})},[b,C]);return F.useEffect(()=>{if(E.current){I.current=Iv({domNode:E.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:P=>w.setState({paneDragging:P}),onPanZoomStart:(P,L)=>{const{onViewportChangeStart:M,onMoveStart:j}=w.getState();j?.(P,L),M?.(L)},onPanZoom:(P,L)=>{const{onViewportChange:M,onMove:j}=w.getState();j?.(P,L),M?.(L)},onPanZoomEnd:(P,L)=>{const{onViewportChangeEnd:M,onMoveEnd:j}=w.getState();j?.(P,L),M?.(L)}});const{x:A,y:N,zoom:O}=I.current.getViewport();return w.setState({panZoom:I.current,transform:[A,N,O],domNode:E.current.closest(".react-flow")}),()=>{I.current?.destroy()}}},[]),F.useEffect(()=>{I.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:r,panOnScrollMode:i,zoomOnDoubleClick:a,panOnDrag:l,zoomActivationKeyPressed:V,preventScrolling:h,noPanClassName:v,userSelectionActive:k,noWheelClassName:m,lib:R,onTransformChange:S,connectionInProgress:_,selectionOnDrag:x,paneClickDistance:y})},[e,t,n,o,r,i,a,l,V,h,v,k,m,R,S,_,x,y]),T.jsx("div",{className:"react-flow__renderer",ref:E,style:zi,children:g})}const Px=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Rx(){const{userSelectionActive:e,userSelectionRect:t}=Ee(Px,Ve);return e&&t?T.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Is=(e,t)=>n=>{n.target===t.current&&e?.(n)},_x=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Ix({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Qo.Full,panOnDrag:o,paneClickDistance:r,selectionOnDrag:i,onSelectionStart:a,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:h,children:g}){const m=He(),{userSelectionActive:v,elementsSelectable:b,dragging:C,connectionInProgress:y}=Ee(_x,Ve),x=b&&(e||v),w=F.useRef(null),E=F.useRef(),k=F.useRef(new Set),R=F.useRef(new Set),_=F.useRef(!1),V=M=>{if(_.current||y){_.current=!1;return}c?.(M),m.getState().resetSelectedElements(),m.setState({nodesSelectionActive:!1})},I=M=>{if(Array.isArray(o)&&o?.includes(2)){M.preventDefault();return}u?.(M)},S=d?M=>d(M):void 0,A=M=>{_.current&&(M.stopPropagation(),_.current=!1)},N=M=>{const{domNode:j}=m.getState();if(E.current=j?.getBoundingClientRect(),!E.current)return;const $=M.target===w.current;if(!$&&!!M.target.closest(".nokey")||!e||!(i&&$||t)||M.button!==0||!M.isPrimary)return;M.target?.setPointerCapture?.(M.pointerId),_.current=!1;const{x:U,y:W}=Pt(M.nativeEvent,E.current);m.setState({userSelectionRect:{width:0,height:0,startX:U,startY:W,x:U,y:W}}),$||(M.stopPropagation(),M.preventDefault())},O=M=>{const{userSelectionRect:j,transform:$,nodeLookup:B,edgeLookup:H,connectionLookup:U,triggerNodeChanges:W,triggerEdgeChanges:K,defaultEdgeOptions:Q,resetSelectedElements:ee}=m.getState();if(!E.current||!j)return;const{x:q,y:J}=Pt(M.nativeEvent,E.current),{startX:Z,startY:ne}=j;if(!_.current){const xe=t?0:r;if(Math.hypot(q-Z,J-ne)<=xe)return;ee(),a?.(M)}_.current=!0;const z={startX:Z,startY:ne,x:q<Z?q:Z,y:J<ne?J:ne,width:Math.abs(q-Z),height:Math.abs(J-ne)},ae=k.current,se=R.current;k.current=new Set(Ua(B,z,$,n===Qo.Partial,!0).map(xe=>xe.id)),R.current=new Set;const fe=Q?.selectable??!0;for(const xe of k.current){const Ce=U.get(xe);if(Ce)for(const{edgeId:G}of Ce.values()){const X=H.get(G);X&&(X.selectable??fe)&&R.current.add(G)}}if(!fc(ae,k.current)){const xe=qn(B,k.current,!0);W(xe)}if(!fc(se,R.current)){const xe=qn(H,R.current);K(xe)}m.setState({userSelectionRect:z,userSelectionActive:!0,nodesSelectionActive:!1})},P=M=>{M.button===0&&(M.target?.releasePointerCapture?.(M.pointerId),!v&&M.target===w.current&&m.getState().userSelectionRect&&V?.(M),m.setState({userSelectionActive:!1,userSelectionRect:null}),_.current&&(l?.(M),m.setState({nodesSelectionActive:k.current.size>0})))},L=o===!0||Array.isArray(o)&&o.includes(0);return T.jsxs("div",{className:Qe(["react-flow__pane",{draggable:L,dragging:C,selection:e}]),onClick:x?void 0:Is(V,w),onContextMenu:Is(I,w),onWheel:Is(S,w),onPointerEnter:x?void 0:f,onPointerMove:x?O:p,onPointerUp:x?P:void 0,onPointerDownCapture:x?N:void 0,onClickCapture:x?A:void 0,onPointerLeave:h,ref:w,style:zi,children:[g,T.jsx(Rx,{})]})}function pa({id:e,store:t,unselect:n=!1,nodeRef:o}){const{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:a,nodeLookup:l,onError:c}=t.getState(),u=l.get(e);if(!u){c?.("012",lt.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):r([e])}function Zf({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:r,isSelectable:i,nodeClickDistance:a}){const l=He(),[c,u]=F.useState(!1),d=F.useRef();return F.useEffect(()=>{d.current=bv({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{pa({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),F.useEffect(()=>{if(t)d.current?.destroy();else if(e.current)return d.current?.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:i,nodeId:r,nodeClickDistance:a}),()=>{d.current?.destroy()}},[n,o,t,i,e,r]),c}const Mx=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Qf(){const e=He();return F.useCallback(n=>{const{nodeExtent:o,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:d}=e.getState(),f=new Map,p=Mx(a),h=r?i[0]:5,g=r?i[1]:5,m=n.direction.x*h*n.factor,v=n.direction.y*g*n.factor;for(const[,b]of u){if(!p(b))continue;let C={x:b.internals.positionAbsolute.x+m,y:b.internals.positionAbsolute.y+v};r&&(C=hr(C,i));const{position:y,positionAbsolute:x}=bf({nodeId:b.id,nextPosition:C,nodeLookup:u,nodeExtent:o,nodeOrigin:d,onError:l});b.position=y,b.internals.positionAbsolute=x,f.set(b.id,b)}c(f)},[])}const ol=F.createContext(null),$x=ol.Provider;ol.Consumer;const Jf=()=>F.useContext(ol),Ax=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Dx=(e,t,n)=>o=>{const{connectionClickStartHandle:r,connectionMode:i,connection:a}=o,{fromHandle:l,toHandle:c,isValid:u}=a,d=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:l?.nodeId===e&&l?.id===t&&l?.type===n,connectingTo:d,clickConnecting:r?.nodeId===e&&r?.id===t&&r?.type===n,isPossibleEndHandle:i===to.Strict?l?.type!==n:e!==l?.nodeId||t!==l?.id,connectionInProcess:!!l,clickConnectionInProcess:!!r,valid:d&&u}};function jx({type:e="source",position:t=pe.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:r=!0,isConnectableEnd:i=!0,id:a,onConnect:l,children:c,className:u,onMouseDown:d,onTouchStart:f,...p},h){const g=a||null,m=e==="target",v=He(),b=Jf(),{connectOnClick:C,noPanClassName:y,rfId:x}=Ee(Ax,Ve),{connectingFrom:w,connectingTo:E,clickConnecting:k,isPossibleEndHandle:R,connectionInProcess:_,clickConnectionInProcess:V,valid:I}=Ee(Dx(b,g,e),Ve);b||v.getState().onError?.("010",lt.error010());const S=O=>{const{defaultEdgeOptions:P,onConnect:L,hasDefaultEdges:M}=v.getState(),j={...P,...O};if(M){const{edges:$,setEdges:B}=v.getState();B(tv(j,$))}L?.(j),l?.(j)},A=O=>{if(!b)return;const P=Tf(O.nativeEvent);if(r&&(P&&O.button===0||!P)){const L=v.getState();fa.onPointerDown(O.nativeEvent,{handleDomNode:O.currentTarget,autoPanOnConnect:L.autoPanOnConnect,connectionMode:L.connectionMode,connectionRadius:L.connectionRadius,domNode:L.domNode,nodeLookup:L.nodeLookup,lib:L.lib,isTarget:m,handleId:g,nodeId:b,flowId:L.rfId,panBy:L.panBy,cancelConnection:L.cancelConnection,onConnectStart:L.onConnectStart,onConnectEnd:L.onConnectEnd,updateConnection:L.updateConnection,onConnect:S,isValidConnection:n||L.isValidConnection,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:L.autoPanSpeed,dragThreshold:L.connectionDragThreshold})}P?d?.(O):f?.(O)},N=O=>{const{onClickConnectStart:P,onClickConnectEnd:L,connectionClickStartHandle:M,connectionMode:j,isValidConnection:$,lib:B,rfId:H,nodeLookup:U,connection:W}=v.getState();if(!b||!M&&!r)return;if(!M){P?.(O.nativeEvent,{nodeId:b,handleId:g,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:g}});return}const K=Ef(O.target),Q=n||$,{connection:ee,isValid:q}=fa.isValid(O.nativeEvent,{handle:{nodeId:b,id:g,type:e},connectionMode:j,fromNodeId:M.nodeId,fromHandleId:M.id||null,fromType:M.type,isValidConnection:Q,flowId:H,doc:K,lib:B,nodeLookup:U});q&&ee&&S(ee);const J=structuredClone(W);delete J.inProgress,J.toPosition=J.toHandle?J.toHandle.position:null,L?.(O,J),v.setState({connectionClickStartHandle:null})};return T.jsx("div",{"data-handleid":g,"data-nodeid":b,"data-handlepos":t,"data-id":`${x}-${b}-${g}-${e}`,className:Qe(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",y,u,{source:!m,target:m,connectable:o,connectablestart:r,connectableend:i,clickconnecting:k,connectingfrom:w,connectingto:E,valid:I,connectionindicator:o&&(!_||R)&&(_||V?i:r)}]),onMouseDown:A,onTouchStart:A,onClick:C?N:void 0,ref:h,...p,children:c})}const gt=F.memo(Kf(jx));function Lx({data:e,isConnectable:t,sourcePosition:n=pe.Bottom}){return T.jsxs(T.Fragment,{children:[e?.label,T.jsx(gt,{type:"source",position:n,isConnectable:t})]})}function Fx({data:e,isConnectable:t,targetPosition:n=pe.Top,sourcePosition:o=pe.Bottom}){return T.jsxs(T.Fragment,{children:[T.jsx(gt,{type:"target",position:n,isConnectable:t}),e?.label,T.jsx(gt,{type:"source",position:o,isConnectable:t})]})}function Bx(){return null}function zx({data:e,isConnectable:t,targetPosition:n=pe.Top}){return T.jsxs(T.Fragment,{children:[T.jsx(gt,{type:"target",position:n,isConnectable:t}),e?.label]})}const hi={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Wc={input:Lx,default:Fx,output:zx,group:Bx};function Vx(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}const Hx=e=>{const{width:t,height:n,x:o,y:r}=pr(e.nodeLookup,{filter:i=>!!i.selected});return{width:Ot(t)?t:null,height:Ot(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${r}px)`}};function Wx({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const o=He(),{width:r,height:i,transformString:a,userSelectionActive:l}=Ee(Hx,Ve),c=Qf(),u=F.useRef(null);if(F.useEffect(()=>{n||u.current?.focus({preventScroll:!0})},[n]),Zf({nodeRef:u}),l||!r||!i)return null;const d=e?p=>{const h=o.getState().nodes.filter(g=>g.selected);e(p,h)}:void 0,f=p=>{Object.prototype.hasOwnProperty.call(hi,p.key)&&(p.preventDefault(),c({direction:hi[p.key],factor:p.shiftKey?4:1}))};return T.jsx("div",{className:Qe(["react-flow__nodesselection","react-flow__container",t]),style:{transform:a},children:T.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:r,height:i}})})}const Uc=typeof window<"u"?window:void 0,Ux=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function ep({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:a,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:d,selectionMode:f,onSelectionStart:p,onSelectionEnd:h,multiSelectionKeyCode:g,panActivationKeyCode:m,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:C,zoomOnPinch:y,panOnScroll:x,panOnScrollSpeed:w,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:R,defaultViewport:_,translateExtent:V,minZoom:I,maxZoom:S,preventScrolling:A,onSelectionContextMenu:N,noWheelClassName:O,noPanClassName:P,disableKeyboardA11y:L,onViewportChange:M,isControlledViewport:j}){const{nodesSelectionActive:$,userSelectionActive:B}=Ee(Ux,Ve),H=nr(u,{target:Uc}),U=nr(m,{target:Uc}),W=U||R,K=U||x,Q=d&&W!==!0,ee=H||B||Q;return Tx({deleteKeyCode:c,multiSelectionKeyCode:g}),T.jsx(Ox,{onPaneContextMenu:i,elementsSelectable:b,zoomOnScroll:C,zoomOnPinch:y,panOnScroll:K,panOnScrollSpeed:w,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:!H&&W,defaultViewport:_,translateExtent:V,minZoom:I,maxZoom:S,zoomActivationKeyCode:v,preventScrolling:A,noWheelClassName:O,noPanClassName:P,onViewportChange:M,isControlledViewport:j,paneClickDistance:l,selectionOnDrag:Q,children:T.jsxs(Ix,{onSelectionStart:p,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:W,isSelecting:!!ee,selectionMode:f,selectionKeyPressed:H,paneClickDistance:l,selectionOnDrag:Q,children:[e,$&&T.jsx(Wx,{onSelectionContextMenu:N,noPanClassName:P,disableKeyboardA11y:L})]})})}ep.displayName="FlowRenderer";const qx=F.memo(ep),Yx=e=>t=>e?Ua(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function Gx(e){return Ee(F.useCallback(Yx(e),[e]),Ve)}const Kx=e=>e.updateNodeInternals;function Xx(){const e=Ee(Kx),[t]=F.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const o=new Map;n.forEach(r=>{const i=r.target.getAttribute("data-id");o.set(i,{id:i,nodeElement:r.target,force:!0})}),e(o)}));return F.useEffect(()=>()=>{t?.disconnect()},[t]),t}function Zx({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){const r=He(),i=F.useRef(null),a=F.useRef(null),l=F.useRef(e.sourcePosition),c=F.useRef(e.targetPosition),u=F.useRef(t),d=n&&!!e.internals.handleBounds;return F.useEffect(()=>{i.current&&!e.hidden&&(!d||a.current!==i.current)&&(a.current&&o?.unobserve(a.current),o?.observe(i.current),a.current=i.current)},[d,e.hidden]),F.useEffect(()=>()=>{a.current&&(o?.unobserve(a.current),a.current=null)},[]),F.useEffect(()=>{if(i.current){const f=u.current!==t,p=l.current!==e.sourcePosition,h=c.current!==e.targetPosition;(f||p||h)&&(u.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function Qx({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:r,onContextMenu:i,onDoubleClick:a,nodesDraggable:l,elementsSelectable:c,nodesConnectable:u,nodesFocusable:d,resizeObserver:f,noDragClassName:p,noPanClassName:h,disableKeyboardA11y:g,rfId:m,nodeTypes:v,nodeClickDistance:b,onError:C}){const{node:y,internals:x,isParent:w}=Ee(q=>{const J=q.nodeLookup.get(e),Z=q.parentLookup.has(e);return{node:J,internals:J.internals,isParent:Z}},Ve);let E=y.type||"default",k=v?.[E]||Wc[E];k===void 0&&(C?.("003",lt.error003(E)),E="default",k=v?.default||Wc.default);const R=!!(y.draggable||l&&typeof y.draggable>"u"),_=!!(y.selectable||c&&typeof y.selectable>"u"),V=!!(y.connectable||u&&typeof y.connectable>"u"),I=!!(y.focusable||d&&typeof y.focusable>"u"),S=He(),A=Ya(y),N=Zx({node:y,nodeType:E,hasDimensions:A,resizeObserver:f}),O=Zf({nodeRef:N,disabled:y.hidden||!R,noDragClassName:p,handleSelector:y.dragHandle,nodeId:e,isSelectable:_,nodeClickDistance:b}),P=Qf();if(y.hidden)return null;const L=Qt(y),M=Vx(y),j=_||R||t||n||o||r,$=n?q=>n(q,{...x.userNode}):void 0,B=o?q=>o(q,{...x.userNode}):void 0,H=r?q=>r(q,{...x.userNode}):void 0,U=i?q=>i(q,{...x.userNode}):void 0,W=a?q=>a(q,{...x.userNode}):void 0,K=q=>{const{selectNodesOnDrag:J,nodeDragThreshold:Z}=S.getState();_&&(!J||!R||Z>0)&&pa({id:e,store:S,nodeRef:N}),t&&t(q,{...x.userNode})},Q=q=>{if(!(Cf(q.nativeEvent)||g)){if(pf.includes(q.key)&&_){const J=q.key==="Escape";pa({id:e,store:S,unselect:J,nodeRef:N})}else if(R&&y.selected&&Object.prototype.hasOwnProperty.call(hi,q.key)){q.preventDefault();const{ariaLabelConfig:J}=S.getState();S.setState({ariaLiveMessage:J["node.a11yDescription.ariaLiveMessage"]({direction:q.key.replace("Arrow","").toLowerCase(),x:~~x.positionAbsolute.x,y:~~x.positionAbsolute.y})}),P({direction:hi[q.key],factor:q.shiftKey?4:1})}}},ee=()=>{if(g||!N.current?.matches(":focus-visible"))return;const{transform:q,width:J,height:Z,autoPanOnNodeFocus:ne,setCenter:z}=S.getState();if(!ne)return;Ua(new Map([[e,y]]),{x:0,y:0,width:J,height:Z},q,!0).length>0||z(y.position.x+L.width/2,y.position.y+L.height/2,{zoom:q[2]})};return T.jsx("div",{className:Qe(["react-flow__node",`react-flow__node-${E}`,{[h]:R},y.className,{selected:y.selected,selectable:_,parent:w,draggable:R,dragging:O}]),ref:N,style:{zIndex:x.z,transform:`translate(${x.positionAbsolute.x}px,${x.positionAbsolute.y}px)`,pointerEvents:j?"all":"none",visibility:A?"visible":"hidden",...y.style,...M},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:$,onMouseMove:B,onMouseLeave:H,onContextMenu:U,onClick:K,onDoubleClick:W,onKeyDown:I?Q:void 0,tabIndex:I?0:void 0,onFocus:I?ee:void 0,role:y.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${Uf}-${m}`,"aria-label":y.ariaLabel,...y.domAttributes,children:T.jsx($x,{value:e,children:T.jsx(k,{id:e,data:y.data,type:E,positionAbsoluteX:x.positionAbsolute.x,positionAbsoluteY:x.positionAbsolute.y,selected:y.selected??!1,selectable:_,draggable:R,deletable:y.deletable??!0,isConnectable:V,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:O,dragHandle:y.dragHandle,zIndex:x.z,parentId:y.parentId,...L})})})}var Jx=F.memo(Qx);const ew=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function tp(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,onError:i}=Ee(ew,Ve),a=Gx(e.onlyRenderVisibleElements),l=Xx();return T.jsx("div",{className:"react-flow__nodes",style:zi,children:a.map(c=>T.jsx(Jx,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},c))})}tp.displayName="NodeRenderer";const tw=F.memo(tp);function nw(e){return Ee(F.useCallback(n=>{if(!e)return n.edges.map(r=>r.id);const o=[];if(n.width&&n.height)for(const r of n.edges){const i=n.nodeLookup.get(r.source),a=n.nodeLookup.get(r.target);i&&a&&J0({sourceNode:i,targetNode:a,width:n.width,height:n.height,transform:n.transform})&&o.push(r.id)}return o},[e]),Ve)}const ow=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return T.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},rw=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return T.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},qc={[Jo.Arrow]:ow,[Jo.ArrowClosed]:rw};function iw(e){const t=He();return F.useMemo(()=>Object.prototype.hasOwnProperty.call(qc,e)?qc[e]:(t.getState().onError?.("009",lt.error009(e)),null),[e])}const sw=({id:e,type:t,color:n,width:o=12.5,height:r=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:l="auto-start-reverse"})=>{const c=iw(t);return c?T.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0",children:T.jsx(c,{color:n,strokeWidth:a})}):null},np=({defaultColor:e,rfId:t})=>{const n=Ee(i=>i.edges),o=Ee(i=>i.defaultEdgeOptions),r=F.useMemo(()=>av(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return r.length?T.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:T.jsx("defs",{children:r.map(i=>T.jsx(sw,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};np.displayName="MarkerDefinitions";var aw=F.memo(np);function op({x:e,y:t,label:n,labelStyle:o,labelShowBg:r=!0,labelBgStyle:i,labelBgPadding:a=[2,4],labelBgBorderRadius:l=2,children:c,className:u,...d}){const[f,p]=F.useState({x:1,y:0,width:0,height:0}),h=Qe(["react-flow__edge-textwrapper",u]),g=F.useRef(null);return F.useEffect(()=>{if(g.current){const m=g.current.getBBox();p({x:m.x,y:m.y,width:m.width,height:m.height})}},[n]),n?T.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:h,visibility:f.width?"visible":"hidden",...d,children:[r&&T.jsx("rect",{width:f.width+2*a[0],x:-a[0],y:-a[1],height:f.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),T.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:g,style:o,children:n}),c]}):null}op.displayName="EdgeText";const lw=F.memo(op);function gr({path:e,labelX:t,labelY:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...d}){return T.jsxs(T.Fragment,{children:[T.jsx("path",{...d,d:e,fill:"none",className:Qe(["react-flow__edge-path",d.className])}),u?T.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&Ot(t)&&Ot(n)?T.jsx(lw,{x:t,y:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function Yc({pos:e,x1:t,y1:n,x2:o,y2:r}){return e===pe.Left||e===pe.Right?[.5*(t+o),n]:[t,.5*(n+r)]}function rp({sourceX:e,sourceY:t,sourcePosition:n=pe.Bottom,targetX:o,targetY:r,targetPosition:i=pe.Top}){const[a,l]=Yc({pos:n,x1:e,y1:t,x2:o,y2:r}),[c,u]=Yc({pos:i,x1:o,y1:r,x2:e,y2:t}),[d,f,p,h]=Nf({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${a},${l} ${c},${u} ${o},${r}`,d,f,p,h]}function ip(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:a,targetPosition:l,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:v,interactionWidth:b})=>{const[C,y,x]=rp({sourceX:n,sourceY:o,sourcePosition:a,targetX:r,targetY:i,targetPosition:l}),w=e.isInternal?void 0:t;return T.jsx(gr,{id:w,path:C,labelX:y,labelY:x,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:v,interactionWidth:b})})}const cw=ip({isInternal:!1}),sp=ip({isInternal:!0});cw.displayName="SimpleBezierEdge";sp.displayName="SimpleBezierEdgeInternal";function ap(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,sourcePosition:h=pe.Bottom,targetPosition:g=pe.Top,markerEnd:m,markerStart:v,pathOptions:b,interactionWidth:C})=>{const[y,x,w]=ca({sourceX:n,sourceY:o,sourcePosition:h,targetX:r,targetY:i,targetPosition:g,borderRadius:b?.borderRadius,offset:b?.offset,stepPosition:b?.stepPosition}),E=e.isInternal?void 0:t;return T.jsx(gr,{id:E,path:y,labelX:x,labelY:w,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:v,interactionWidth:C})})}const lp=ap({isInternal:!1}),cp=ap({isInternal:!0});lp.displayName="SmoothStepEdge";cp.displayName="SmoothStepEdgeInternal";function up(e){return F.memo(({id:t,...n})=>{const o=e.isInternal?void 0:t;return T.jsx(lp,{...n,id:o,pathOptions:F.useMemo(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}const uw=up({isInternal:!1}),dp=up({isInternal:!0});uw.displayName="StepEdge";dp.displayName="StepEdgeInternal";function fp(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:g,interactionWidth:m})=>{const[v,b,C]=Pf({sourceX:n,sourceY:o,targetX:r,targetY:i}),y=e.isInternal?void 0:t;return T.jsx(gr,{id:y,path:v,labelX:b,labelY:C,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:g,interactionWidth:m})})}const dw=fp({isInternal:!1}),pp=fp({isInternal:!0});dw.displayName="StraightEdge";pp.displayName="StraightEdgeInternal";function hp(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:a=pe.Bottom,targetPosition:l=pe.Top,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:v,pathOptions:b,interactionWidth:C})=>{const[y,x,w]=Ka({sourceX:n,sourceY:o,sourcePosition:a,targetX:r,targetY:i,targetPosition:l,curvature:b?.curvature}),E=e.isInternal?void 0:t;return T.jsx(gr,{id:E,path:y,labelX:x,labelY:w,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:v,interactionWidth:C})})}const fw=hp({isInternal:!1}),mp=hp({isInternal:!0});fw.displayName="BezierEdge";mp.displayName="BezierEdgeInternal";const Gc={default:mp,straight:pp,step:dp,smoothstep:cp,simplebezier:sp},Kc={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},pw=(e,t,n)=>n===pe.Left?e-t:n===pe.Right?e+t:e,hw=(e,t,n)=>n===pe.Top?e-t:n===pe.Bottom?e+t:e,Xc="react-flow__edgeupdater";function Zc({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:r,onMouseEnter:i,onMouseOut:a,type:l}){return T.jsx("circle",{onMouseDown:r,onMouseEnter:i,onMouseOut:a,className:Qe([Xc,`${Xc}-${l}`]),cx:pw(t,o,e),cy:hw(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function mw({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:r,targetX:i,targetY:a,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:f,setReconnecting:p,setUpdateHover:h}){const g=He(),m=(x,w)=>{if(x.button!==0)return;const{autoPanOnConnect:E,domNode:k,isValidConnection:R,connectionMode:_,connectionRadius:V,lib:I,onConnectStart:S,onConnectEnd:A,cancelConnection:N,nodeLookup:O,rfId:P,panBy:L,updateConnection:M}=g.getState(),j=w.type==="target",$=(U,W)=>{p(!1),f?.(U,n,w.type,W)},B=U=>u?.(n,U),H=(U,W)=>{p(!0),d?.(x,n,w.type),S?.(U,W)};fa.onPointerDown(x.nativeEvent,{autoPanOnConnect:E,connectionMode:_,connectionRadius:V,domNode:k,handleId:w.id,nodeId:w.nodeId,nodeLookup:O,isTarget:j,edgeUpdaterType:w.type,lib:I,flowId:P,cancelConnection:N,panBy:L,isValidConnection:R,onConnect:B,onConnectStart:H,onConnectEnd:A,onReconnectEnd:$,updateConnection:M,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNode:x.currentTarget})},v=x=>m(x,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),b=x=>m(x,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),C=()=>h(!0),y=()=>h(!1);return T.jsxs(T.Fragment,{children:[(e===!0||e==="source")&&T.jsx(Zc,{position:l,centerX:o,centerY:r,radius:t,onMouseDown:v,onMouseEnter:C,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&T.jsx(Zc,{position:c,centerX:i,centerY:a,radius:t,onMouseDown:b,onMouseEnter:C,onMouseOut:y,type:"target"})]})}function gw({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:r,onDoubleClick:i,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:h,rfId:g,edgeTypes:m,noPanClassName:v,onError:b,disableKeyboardA11y:C}){let y=Ee(z=>z.edgeLookup.get(e));const x=Ee(z=>z.defaultEdgeOptions);y=x?{...x,...y}:y;let w=y.type||"default",E=m?.[w]||Gc[w];E===void 0&&(b?.("011",lt.error011(w)),w="default",E=m?.default||Gc.default);const k=!!(y.focusable||t&&typeof y.focusable>"u"),R=typeof f<"u"&&(y.reconnectable||n&&typeof y.reconnectable>"u"),_=!!(y.selectable||o&&typeof y.selectable>"u"),V=F.useRef(null),[I,S]=F.useState(!1),[A,N]=F.useState(!1),O=He(),{zIndex:P,sourceX:L,sourceY:M,targetX:j,targetY:$,sourcePosition:B,targetPosition:H}=Ee(F.useCallback(z=>{const ae=z.nodeLookup.get(y.source),se=z.nodeLookup.get(y.target);if(!ae||!se)return{zIndex:y.zIndex,...Kc};const fe=sv({id:e,sourceNode:ae,targetNode:se,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:z.connectionMode,onError:b});return{zIndex:Q0({selected:y.selected,zIndex:y.zIndex,sourceNode:ae,targetNode:se,elevateOnSelect:z.elevateEdgesOnSelect,zIndexMode:z.zIndexMode}),...fe||Kc}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),Ve),U=F.useMemo(()=>y.markerStart?`url('#${ua(y.markerStart,g)}')`:void 0,[y.markerStart,g]),W=F.useMemo(()=>y.markerEnd?`url('#${ua(y.markerEnd,g)}')`:void 0,[y.markerEnd,g]);if(y.hidden||L===null||M===null||j===null||$===null)return null;const K=z=>{const{addSelectedEdges:ae,unselectNodesAndEdges:se,multiSelectionActive:fe}=O.getState();_&&(O.setState({nodesSelectionActive:!1}),y.selected&&fe?(se({nodes:[],edges:[y]}),V.current?.blur()):ae([e])),r&&r(z,y)},Q=i?z=>{i(z,{...y})}:void 0,ee=a?z=>{a(z,{...y})}:void 0,q=l?z=>{l(z,{...y})}:void 0,J=c?z=>{c(z,{...y})}:void 0,Z=u?z=>{u(z,{...y})}:void 0,ne=z=>{if(!C&&pf.includes(z.key)&&_){const{unselectNodesAndEdges:ae,addSelectedEdges:se}=O.getState();z.key==="Escape"?(V.current?.blur(),ae({edges:[y]})):se([e])}};return T.jsx("svg",{style:{zIndex:P},children:T.jsxs("g",{className:Qe(["react-flow__edge",`react-flow__edge-${w}`,y.className,v,{selected:y.selected,animated:y.animated,inactive:!_&&!r,updating:I,selectable:_}]),onClick:K,onDoubleClick:Q,onContextMenu:ee,onMouseEnter:q,onMouseMove:J,onMouseLeave:Z,onKeyDown:k?ne:void 0,tabIndex:k?0:void 0,role:y.ariaRole??(k?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":k?`${qf}-${g}`:void 0,ref:V,...y.domAttributes,children:[!A&&T.jsx(E,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:_,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:L,sourceY:M,targetX:j,targetY:$,sourcePosition:B,targetPosition:H,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:U,markerEnd:W,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),R&&T.jsx(mw,{edge:y,isReconnectable:R,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:h,sourceX:L,sourceY:M,targetX:j,targetY:$,sourcePosition:B,targetPosition:H,setUpdateHover:S,setReconnecting:N})]})})}var yw=F.memo(gw);const bw=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function gp({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:r,onReconnect:i,onEdgeContextMenu:a,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:h,onReconnectEnd:g,disableKeyboardA11y:m}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:C,onError:y}=Ee(bw,Ve),x=nw(t);return T.jsxs("div",{className:"react-flow__edges",children:[T.jsx(aw,{defaultColor:e,rfId:n}),x.map(w=>T.jsx(yw,{id:w,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:C,noPanClassName:r,onReconnect:i,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,reconnectRadius:f,onDoubleClick:p,onReconnectStart:h,onReconnectEnd:g,rfId:n,onError:y,edgeTypes:o,disableKeyboardA11y:m},w))]})}gp.displayName="EdgeRenderer";const vw=F.memo(gp),xw=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function ww({children:e}){const t=Ee(xw);return T.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function Sw(e){const t=Bi(),n=F.useRef(!1);F.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const Ew=e=>e.panZoom?.syncViewport;function Cw(e){const t=Ee(Ew),n=He();return F.useEffect(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Tw(e){return e.connection.inProgress?{...e.connection,to:mr(e.connection.to,e.transform)}:{...e.connection}}function Nw(e){return Tw}function kw(e){const t=Nw();return Ee(t,Ve)}const Ow=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Pw({containerStyle:e,style:t,type:n,component:o}){const{nodesConnectable:r,width:i,height:a,isValid:l,inProgress:c}=Ee(Ow,Ve);return!(i&&r&&c)?null:T.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:T.jsx("g",{className:Qe(["react-flow__connection",gf(l)]),children:T.jsx(yp,{style:t,type:n,CustomComponent:o,isValid:l})})})}const yp=({style:e,type:t=nn.Bezier,CustomComponent:n,isValid:o})=>{const{inProgress:r,from:i,fromNode:a,fromHandle:l,fromPosition:c,to:u,toNode:d,toHandle:f,toPosition:p,pointer:h}=kw();if(!r)return;if(n)return T.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:a,fromHandle:l,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:p,connectionStatus:gf(o),toNode:d,toHandle:f,pointer:h});let g="";const m={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:p};switch(t){case nn.Bezier:[g]=Ka(m);break;case nn.SimpleBezier:[g]=rp(m);break;case nn.Step:[g]=ca({...m,borderRadius:0});break;case nn.SmoothStep:[g]=ca(m);break;default:[g]=Pf(m)}return T.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};yp.displayName="ConnectionLine";const Rw={};function Qc(e=Rw){const t=F.useRef(e),n=He();F.useEffect(()=>{if(process.env.NODE_ENV==="development"){const o=new Set([...Object.keys(t.current),...Object.keys(e)]);for(const r of o)if(t.current[r]!==e[r]){n.getState().onError?.("002",lt.error002());break}t.current=e}},[e])}function _w(){const e=He(),t=F.useRef(!1);F.useEffect(()=>{if(process.env.NODE_ENV==="development"&&!t.current){const n=document.querySelector(".react-flow__pane");n&&window.getComputedStyle(n).zIndex!=="1"&&e.getState().onError?.("013",lt.error013("react")),t.current=!0}},[])}function bp({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:r,onNodeDoubleClick:i,onEdgeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:h,connectionLineType:g,connectionLineStyle:m,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:C,selectionOnDrag:y,selectionMode:x,multiSelectionKeyCode:w,panActivationKeyCode:E,zoomActivationKeyCode:k,deleteKeyCode:R,onlyRenderVisibleElements:_,elementsSelectable:V,defaultViewport:I,translateExtent:S,minZoom:A,maxZoom:N,preventScrolling:O,defaultMarkerColor:P,zoomOnScroll:L,zoomOnPinch:M,panOnScroll:j,panOnScrollSpeed:$,panOnScrollMode:B,zoomOnDoubleClick:H,panOnDrag:U,onPaneClick:W,onPaneMouseEnter:K,onPaneMouseMove:Q,onPaneMouseLeave:ee,onPaneScroll:q,onPaneContextMenu:J,paneClickDistance:Z,nodeClickDistance:ne,onEdgeContextMenu:z,onEdgeMouseEnter:ae,onEdgeMouseMove:se,onEdgeMouseLeave:fe,reconnectRadius:xe,onReconnect:Ce,onReconnectStart:G,onReconnectEnd:X,noDragClassName:te,noWheelClassName:re,noPanClassName:oe,disableKeyboardA11y:ue,nodeExtent:ie,rfId:ye,viewport:de,onViewportChange:ce}){return Qc(e),Qc(t),_w(),Sw(n),Cw(de),T.jsx(qx,{onPaneClick:W,onPaneMouseEnter:K,onPaneMouseMove:Q,onPaneMouseLeave:ee,onPaneContextMenu:J,onPaneScroll:q,paneClickDistance:Z,deleteKeyCode:R,selectionKeyCode:C,selectionOnDrag:y,selectionMode:x,onSelectionStart:p,onSelectionEnd:h,multiSelectionKeyCode:w,panActivationKeyCode:E,zoomActivationKeyCode:k,elementsSelectable:V,zoomOnScroll:L,zoomOnPinch:M,zoomOnDoubleClick:H,panOnScroll:j,panOnScrollSpeed:$,panOnScrollMode:B,panOnDrag:U,defaultViewport:I,translateExtent:S,minZoom:A,maxZoom:N,onSelectionContextMenu:f,preventScrolling:O,noDragClassName:te,noWheelClassName:re,noPanClassName:oe,disableKeyboardA11y:ue,onViewportChange:ce,isControlledViewport:!!de,children:T.jsxs(ww,{children:[T.jsx(vw,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:a,onReconnect:Ce,onReconnectStart:G,onReconnectEnd:X,onlyRenderVisibleElements:_,onEdgeContextMenu:z,onEdgeMouseEnter:ae,onEdgeMouseMove:se,onEdgeMouseLeave:fe,reconnectRadius:xe,defaultMarkerColor:P,noPanClassName:oe,disableKeyboardA11y:ue,rfId:ye}),T.jsx(Pw,{style:m,type:g,component:v,containerStyle:b}),T.jsx("div",{className:"react-flow__edgelabel-renderer"}),T.jsx(tw,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:ne,onlyRenderVisibleElements:_,noPanClassName:oe,noDragClassName:te,disableKeyboardA11y:ue,nodeExtent:ie,rfId:ye}),T.jsx("div",{className:"react-flow__viewport-portal"})]})})}bp.displayName="GraphView";const Iw=F.memo(bp),Jc=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:a,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:f,zIndexMode:p="basic"}={})=>{const h=new Map,g=new Map,m=new Map,v=new Map,b=o??t??[],C=n??e??[],y=d??[0,0],x=f??Zo;If(m,v,b);const w=da(C,h,g,{nodeOrigin:y,nodeExtent:x,zIndexMode:p});let E=[0,0,1];if(a&&r&&i){const k=pr(h,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:R,y:_,zoom:V}=qa(k,r,i,c,u,l?.padding??.1);E=[R,_,V]}return{rfId:"1",width:r??0,height:i??0,transform:E,nodes:C,nodesInitialized:w,nodeLookup:h,parentLookup:g,edges:b,edgeLookup:v,connectionLookup:m,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:Zo,nodeExtent:x,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:to.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:l,fitViewResolver:null,connection:{...mf},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:fi,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:hf,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Mw=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p})=>Zv((h,g)=>{async function m(){const{nodeLookup:v,panZoom:b,fitViewOptions:C,fitViewResolver:y,width:x,height:w,minZoom:E,maxZoom:k}=g();b&&(await U0({nodes:v,width:x,height:w,panZoom:b,minZoom:E,maxZoom:k},C),y?.resolve(!0),h({fitViewResolver:null}))}return{...Jc({nodes:e,edges:t,width:r,height:i,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,defaultNodes:n,defaultEdges:o,zIndexMode:p}),setNodes:v=>{const{nodeLookup:b,parentLookup:C,nodeOrigin:y,elevateNodesOnSelect:x,fitViewQueued:w,zIndexMode:E}=g(),k=da(v,b,C,{nodeOrigin:y,nodeExtent:f,elevateNodesOnSelect:x,checkEquality:!0,zIndexMode:E});w&&k?(m(),h({nodes:v,nodesInitialized:k,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:v,nodesInitialized:k})},setEdges:v=>{const{connectionLookup:b,edgeLookup:C}=g();If(b,C,v),h({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:C}=g();C(v),h({hasDefaultNodes:!0})}if(b){const{setEdges:C}=g();C(b),h({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:C,parentLookup:y,domNode:x,nodeOrigin:w,nodeExtent:E,debug:k,fitViewQueued:R,zIndexMode:_}=g(),{changes:V,updatedInternals:I}=hv(v,C,y,x,w,E,_);I&&(uv(C,y,{nodeOrigin:w,nodeExtent:E,zIndexMode:_}),R?(m(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),V?.length>0&&(k&&console.log("React Flow: trigger node changes",V),b?.(V)))},updateNodePositions:(v,b=!1)=>{const C=[];let y=[];const{nodeLookup:x,triggerNodeChanges:w,connection:E,updateConnection:k,onNodesChangeMiddlewareMap:R}=g();for(const[_,V]of v){const I=x.get(_),S=!!(I?.expandParent&&I?.parentId&&V?.position),A={id:_,type:"position",position:S?{x:Math.max(0,V.position.x),y:Math.max(0,V.position.y)}:V.position,dragging:b};if(I&&E.inProgress&&E.fromNode.id===I.id){const N=Pn(I,E.fromHandle,pe.Left,!0);k({...E,from:N})}S&&I.parentId&&C.push({id:_,parentId:I.parentId,rect:{...V.internals.positionAbsolute,width:V.measured.width??0,height:V.measured.height??0}}),y.push(A)}if(C.length>0){const{parentLookup:_,nodeOrigin:V}=g(),I=el(C,x,_,V);y.push(...I)}for(const _ of R.values())y=_(y);w(y)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:C,nodes:y,hasDefaultNodes:x,debug:w}=g();if(v?.length){if(x){const E=tl(v,y);C(E)}w&&console.log("React Flow: trigger node changes",v),b?.(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:C,edges:y,hasDefaultEdges:x,debug:w}=g();if(v?.length){if(x){const E=nl(v,y);C(E)}w&&console.log("React Flow: trigger edge changes",v),b?.(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:C,nodeLookup:y,triggerNodeChanges:x,triggerEdgeChanges:w}=g();if(b){const E=v.map(k=>mn(k,!0));x(E);return}x(qn(y,new Set([...v]),!0)),w(qn(C))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:C,nodeLookup:y,triggerNodeChanges:x,triggerEdgeChanges:w}=g();if(b){const E=v.map(k=>mn(k,!0));w(E);return}w(qn(C,new Set([...v]))),x(qn(y,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:C,nodes:y,nodeLookup:x,triggerNodeChanges:w,triggerEdgeChanges:E}=g(),k=v||y,R=b||C,_=k.map(I=>{const S=x.get(I.id);return S&&(S.selected=!1),mn(I.id,!1)}),V=R.map(I=>mn(I.id,!1));w(_),E(V)},setMinZoom:v=>{const{panZoom:b,maxZoom:C}=g();b?.setScaleExtent([v,C]),h({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:C}=g();b?.setScaleExtent([C,v]),h({maxZoom:v})},setTranslateExtent:v=>{g().panZoom?.setTranslateExtent(v),h({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:C,triggerEdgeChanges:y,elementsSelectable:x}=g();if(!x)return;const w=b.reduce((k,R)=>R.selected?[...k,mn(R.id,!1)]:k,[]),E=v.reduce((k,R)=>R.selected?[...k,mn(R.id,!1)]:k,[]);C(w),y(E)},setNodeExtent:v=>{const{nodes:b,nodeLookup:C,parentLookup:y,nodeOrigin:x,elevateNodesOnSelect:w,nodeExtent:E,zIndexMode:k}=g();v[0][0]===E[0][0]&&v[0][1]===E[0][1]&&v[1][0]===E[1][0]&&v[1][1]===E[1][1]||(da(b,C,y,{nodeOrigin:x,nodeExtent:v,elevateNodesOnSelect:w,checkEquality:!1,zIndexMode:k}),h({nodeExtent:v}))},panBy:v=>{const{transform:b,width:C,height:y,panZoom:x,translateExtent:w}=g();return mv({delta:v,panZoom:x,transform:b,translateExtent:w,width:C,height:y})},setCenter:async(v,b,C)=>{const{width:y,height:x,maxZoom:w,panZoom:E}=g();if(!E)return Promise.resolve(!1);const k=typeof C?.zoom<"u"?C.zoom:w;return await E.setViewport({x:y/2-v*k,y:x/2-b*k,zoom:k},{duration:C?.duration,ease:C?.ease,interpolate:C?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...mf}})},updateConnection:v=>{h({connection:v})},reset:()=>h({...Jc()})}},Object.is);function vp({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:r,initialHeight:i,initialMinZoom:a,initialMaxZoom:l,initialFitViewOptions:c,fitView:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:h}){const[g]=F.useState(()=>Mw({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:u,minZoom:a,maxZoom:l,fitViewOptions:c,nodeOrigin:d,nodeExtent:f,zIndexMode:p}));return T.jsx(Qv,{value:g,children:T.jsx(wx,{children:h})})}function $w({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:r,width:i,height:a,fitView:l,fitViewOptions:c,minZoom:u,maxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:h}){return F.useContext(Li)?T.jsx(T.Fragment,{children:e}):T.jsx(vp,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:r,initialWidth:i,initialHeight:a,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:h,children:e})}const Aw={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Dw({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:r,nodeTypes:i,edgeTypes:a,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:h,onConnectStart:g,onConnectEnd:m,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:C,onNodeMouseMove:y,onNodeMouseLeave:x,onNodeContextMenu:w,onNodeDoubleClick:E,onNodeDragStart:k,onNodeDrag:R,onNodeDragStop:_,onNodesDelete:V,onEdgesDelete:I,onDelete:S,onSelectionChange:A,onSelectionDragStart:N,onSelectionDrag:O,onSelectionDragStop:P,onSelectionContextMenu:L,onSelectionStart:M,onSelectionEnd:j,onBeforeDelete:$,connectionMode:B,connectionLineType:H=nn.Bezier,connectionLineStyle:U,connectionLineComponent:W,connectionLineContainerStyle:K,deleteKeyCode:Q="Backspace",selectionKeyCode:ee="Shift",selectionOnDrag:q=!1,selectionMode:J=Qo.Full,panActivationKeyCode:Z="Space",multiSelectionKeyCode:ne=tr()?"Meta":"Control",zoomActivationKeyCode:z=tr()?"Meta":"Control",snapToGrid:ae,snapGrid:se,onlyRenderVisibleElements:fe=!1,selectNodesOnDrag:xe,nodesDraggable:Ce,autoPanOnNodeFocus:G,nodesConnectable:X,nodesFocusable:te,nodeOrigin:re=Yf,edgesFocusable:oe,edgesReconnectable:ue,elementsSelectable:ie=!0,defaultViewport:ye=dx,minZoom:de=.5,maxZoom:ce=2,translateExtent:we=Zo,preventScrolling:Je=!0,nodeExtent:Ke,defaultMarkerColor:me="#b1b1b7",zoomOnScroll:ke=!0,zoomOnPinch:ve=!0,panOnScroll:Xe=!1,panOnScrollSpeed:Et=.5,panOnScrollMode:xo=Cn.Free,zoomOnDoubleClick:ft=!0,panOnDrag:he=!0,onPaneClick:Se,onPaneMouseEnter:et,onPaneMouseMove:Jt,onPaneMouseLeave:Nr,onPaneScroll:ym,onPaneContextMenu:bm,paneClickDistance:vm=1,nodeClickDistance:xm=0,children:wm,onReconnect:Sm,onReconnectStart:Em,onReconnectEnd:Cm,onEdgeContextMenu:Tm,onEdgeDoubleClick:Nm,onEdgeMouseEnter:km,onEdgeMouseMove:Om,onEdgeMouseLeave:Pm,reconnectRadius:Rm=10,onNodesChange:_m,onEdgesChange:Im,noDragClassName:Mm="nodrag",noWheelClassName:$m="nowheel",noPanClassName:Ll="nopan",fitView:Fl,fitViewOptions:Bl,connectOnClick:Am,attributionPosition:Dm,proOptions:jm,defaultEdgeOptions:Lm,elevateNodesOnSelect:Fm=!0,elevateEdgesOnSelect:Bm=!1,disableKeyboardA11y:zl=!1,autoPanOnConnect:zm,autoPanOnNodeDrag:Vm,autoPanSpeed:Hm,connectionRadius:Wm,isValidConnection:Um,onError:qm,style:Ym,id:Vl,nodeDragThreshold:Gm,connectionDragThreshold:Km,viewport:Xm,onViewportChange:Zm,width:Qm,height:Jm,colorMode:eg="light",debug:tg,onScroll:Hl,ariaLabelConfig:ng,zIndexMode:Wl="basic",...og},rg){const xs=Vl||"1",ig=mx(eg),sg=F.useCallback(Ul=>{Ul.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Hl?.(Ul)},[Hl]);return T.jsx("div",{"data-testid":"rf__wrapper",...og,onScroll:sg,style:{...Ym,...Aw},ref:rg,className:Qe(["react-flow",r,ig]),id:Vl,role:"application",children:T.jsxs($w,{nodes:e,edges:t,width:Qm,height:Jm,fitView:Fl,fitViewOptions:Bl,minZoom:de,maxZoom:ce,nodeOrigin:re,nodeExtent:Ke,zIndexMode:Wl,children:[T.jsx(Iw,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:C,onNodeMouseMove:y,onNodeMouseLeave:x,onNodeContextMenu:w,onNodeDoubleClick:E,nodeTypes:i,edgeTypes:a,connectionLineType:H,connectionLineStyle:U,connectionLineComponent:W,connectionLineContainerStyle:K,selectionKeyCode:ee,selectionOnDrag:q,selectionMode:J,deleteKeyCode:Q,multiSelectionKeyCode:ne,panActivationKeyCode:Z,zoomActivationKeyCode:z,onlyRenderVisibleElements:fe,defaultViewport:ye,translateExtent:we,minZoom:de,maxZoom:ce,preventScrolling:Je,zoomOnScroll:ke,zoomOnPinch:ve,zoomOnDoubleClick:ft,panOnScroll:Xe,panOnScrollSpeed:Et,panOnScrollMode:xo,panOnDrag:he,onPaneClick:Se,onPaneMouseEnter:et,onPaneMouseMove:Jt,onPaneMouseLeave:Nr,onPaneScroll:ym,onPaneContextMenu:bm,paneClickDistance:vm,nodeClickDistance:xm,onSelectionContextMenu:L,onSelectionStart:M,onSelectionEnd:j,onReconnect:Sm,onReconnectStart:Em,onReconnectEnd:Cm,onEdgeContextMenu:Tm,onEdgeDoubleClick:Nm,onEdgeMouseEnter:km,onEdgeMouseMove:Om,onEdgeMouseLeave:Pm,reconnectRadius:Rm,defaultMarkerColor:me,noDragClassName:Mm,noWheelClassName:$m,noPanClassName:Ll,rfId:xs,disableKeyboardA11y:zl,nodeExtent:Ke,viewport:Xm,onViewportChange:Zm}),T.jsx(hx,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:h,onConnectStart:g,onConnectEnd:m,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:Ce,autoPanOnNodeFocus:G,nodesConnectable:X,nodesFocusable:te,edgesFocusable:oe,edgesReconnectable:ue,elementsSelectable:ie,elevateNodesOnSelect:Fm,elevateEdgesOnSelect:Bm,minZoom:de,maxZoom:ce,nodeExtent:Ke,onNodesChange:_m,onEdgesChange:Im,snapToGrid:ae,snapGrid:se,connectionMode:B,translateExtent:we,connectOnClick:Am,defaultEdgeOptions:Lm,fitView:Fl,fitViewOptions:Bl,onNodesDelete:V,onEdgesDelete:I,onDelete:S,onNodeDragStart:k,onNodeDrag:R,onNodeDragStop:_,onSelectionDrag:O,onSelectionDragStart:N,onSelectionDragStop:P,onMove:d,onMoveStart:f,onMoveEnd:p,noPanClassName:Ll,nodeOrigin:re,rfId:xs,autoPanOnConnect:zm,autoPanOnNodeDrag:Vm,autoPanSpeed:Hm,onError:qm,connectionRadius:Wm,isValidConnection:Um,selectNodesOnDrag:xe,nodeDragThreshold:Gm,connectionDragThreshold:Km,onBeforeDelete:$,debug:tg,ariaLabelConfig:ng,zIndexMode:Wl}),T.jsx(ux,{onSelectionChange:A}),wm,T.jsx(ix,{proOptions:jm,position:Dm}),T.jsx(rx,{rfId:xs,disableKeyboardA11y:zl})]})})}var jw=Kf(Dw);const Lw=e=>e.domNode?.querySelector(".react-flow__edgelabel-renderer");function Fw({children:e}){const t=Ee(Lw);return t?Wn.createPortal(e,t):null}function Bw(){const e=He();return F.useCallback(t=>{const{domNode:n,updateNodeInternals:o}=e.getState(),r=Array.isArray(t)?t:[t],i=new Map;r.forEach(a=>{const l=n?.querySelector(`.react-flow__node[data-id="${a}"]`);l&&i.set(a,{id:a,nodeElement:l,force:!0})}),requestAnimationFrame(()=>o(i,{triggerFitView:!1}))},[])}const zw=e=>e.nodes;function Vw(){return Ee(zw,Ve)}function Hw(e){const[t,n]=F.useState(e),o=F.useCallback(r=>n(i=>tl(r,i)),[]);return[t,n,o]}function Ww(e){const[t,n]=F.useState(e),o=F.useCallback(r=>n(i=>nl(r,i)),[]);return[t,n,o]}const Uw=e=>t=>{if(!e.includeHiddenNodes)return t.nodesInitialized;if(t.nodeLookup.size===0)return!1;for(const[,{internals:n}]of t.nodeLookup)if(n.handleBounds===void 0||!Ya(n.userNode))return!1;return!0};function qw(e={includeHiddenNodes:!1}){return Ee(Uw(e))}function Yw({dimensions:e,lineWidth:t,variant:n,className:o}){return T.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Qe(["react-flow__background-pattern",n,o])})}function Gw({radius:e,className:t}){return T.jsx("circle",{cx:e,cy:e,r:e,className:Qe(["react-flow__background-pattern","dots",t])})}var on;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(on||(on={}));const Kw={[on.Dots]:1,[on.Lines]:1,[on.Cross]:6},Xw=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function xp({id:e,variant:t=on.Dots,gap:n=20,size:o,lineWidth:r=1,offset:i=0,color:a,bgColor:l,style:c,className:u,patternClassName:d}){const f=F.useRef(null),{transform:p,patternId:h}=Ee(Xw,Ve),g=o||Kw[t],m=t===on.Dots,v=t===on.Cross,b=Array.isArray(n)?n:[n,n],C=[b[0]*p[2]||1,b[1]*p[2]||1],y=g*p[2],x=Array.isArray(i)?i:[i,i],w=v?[y,y]:C,E=[x[0]*p[2]||1+w[0]/2,x[1]*p[2]||1+w[1]/2],k=`${h}${e||""}`;return T.jsxs("svg",{className:Qe(["react-flow__background",u]),style:{...c,...zi,"--xy-background-color-props":l,"--xy-background-pattern-color-props":a},ref:f,"data-testid":"rf__background",children:[T.jsx("pattern",{id:k,x:p[0]%C[0],y:p[1]%C[1],width:C[0],height:C[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:m?T.jsx(Gw,{radius:y/2,className:d}):T.jsx(Yw,{dimensions:w,lineWidth:r,variant:t,className:d})}),T.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${k})`})]})}xp.displayName="Background";const Zw=F.memo(xp);function Qw(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:T.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Jw(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:T.jsx("path",{d:"M0 0h32v4.2H0z"})})}function eS(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:T.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function tS(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:T.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function nS(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:T.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function jr({children:e,className:t,...n}){return T.jsx("button",{type:"button",className:Qe(["react-flow__controls-button",t]),...n,children:e})}const oS=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function wp({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:r,onZoomIn:i,onZoomOut:a,onFitView:l,onInteractiveChange:c,className:u,children:d,position:f="bottom-left",orientation:p="vertical","aria-label":h}){const g=He(),{isInteractive:m,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:C}=Ee(oS,Ve),{zoomIn:y,zoomOut:x,fitView:w}=Bi(),E=()=>{y(),i?.()},k=()=>{x(),a?.()},R=()=>{w(r),l?.()},_=()=>{g.setState({nodesDraggable:!m,nodesConnectable:!m,elementsSelectable:!m}),c?.(!m)},V=p==="horizontal"?"horizontal":"vertical";return T.jsxs(Fi,{className:Qe(["react-flow__controls",V,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":h??C["controls.ariaLabel"],children:[t&&T.jsxs(T.Fragment,{children:[T.jsx(jr,{onClick:E,className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:b,children:T.jsx(Qw,{})}),T.jsx(jr,{onClick:k,className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:v,children:T.jsx(Jw,{})})]}),n&&T.jsx(jr,{className:"react-flow__controls-fitview",onClick:R,title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:T.jsx(eS,{})}),o&&T.jsx(jr,{className:"react-flow__controls-interactive",onClick:_,title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:m?T.jsx(nS,{}):T.jsx(tS,{})}),d]})}wp.displayName="Controls";const rS=F.memo(wp);function iS({id:e,x:t,y:n,width:o,height:r,style:i,color:a,strokeColor:l,strokeWidth:c,className:u,borderRadius:d,shapeRendering:f,selected:p,onClick:h}){const{background:g,backgroundColor:m}=i||{},v=a||g||m;return T.jsx("rect",{className:Qe(["react-flow__minimap-node",{selected:p},u]),x:t,y:n,rx:d,ry:d,width:o,height:r,style:{fill:v,stroke:l,strokeWidth:c},shapeRendering:f,onClick:h?b=>h(b,e):void 0})}const sS=F.memo(iS),aS=e=>e.nodes.map(t=>t.id),Ms=e=>e instanceof Function?e:()=>e;function lS({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:r,nodeComponent:i=sS,onClick:a}){const l=Ee(aS,Ve),c=Ms(t),u=Ms(e),d=Ms(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return T.jsx(T.Fragment,{children:l.map(p=>T.jsx(uS,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:o,nodeStrokeWidth:r,NodeComponent:i,onClick:a,shapeRendering:f},p))})}function cS({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:r,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:l,onClick:c}){const{node:u,x:d,y:f,width:p,height:h}=Ee(g=>{const{internals:m}=g.nodeLookup.get(e),v=m.userNode,{x:b,y:C}=m.positionAbsolute,{width:y,height:x}=Qt(v);return{node:v,x:b,y:C,width:y,height:x}},Ve);return!u||u.hidden||!Ya(u)?null:T.jsx(l,{x:d,y:f,width:p,height:h,style:u.style,selected:!!u.selected,className:o(u),color:t(u),borderRadius:r,strokeColor:n(u),strokeWidth:i,shapeRendering:a,onClick:c,id:u.id})}const uS=F.memo(cS);var dS=F.memo(lS);const fS=200,pS=150,hS=e=>!e.hidden,mS=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?wf(pr(e.nodeLookup,{filter:hS}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},gS="react-flow__minimap-desc";function Sp({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:r="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:l,bgColor:c,maskColor:u,maskStrokeColor:d,maskStrokeWidth:f,position:p="bottom-right",onClick:h,onNodeClick:g,pannable:m=!1,zoomable:v=!1,ariaLabel:b,inversePan:C,zoomStep:y=1,offsetScale:x=5}){const w=He(),E=F.useRef(null),{boundingRect:k,viewBB:R,rfId:_,panZoom:V,translateExtent:I,flowWidth:S,flowHeight:A,ariaLabelConfig:N}=Ee(mS,Ve),O=e?.width??fS,P=e?.height??pS,L=k.width/O,M=k.height/P,j=Math.max(L,M),$=j*O,B=j*P,H=x*j,U=k.x-($-k.width)/2-H,W=k.y-(B-k.height)/2-H,K=$+H*2,Q=B+H*2,ee=`${gS}-${_}`,q=F.useRef(0),J=F.useRef();q.current=j,F.useEffect(()=>{if(E.current&&V)return J.current=Cv({domNode:E.current,panZoom:V,getTransform:()=>w.getState().transform,getViewScale:()=>q.current}),()=>{J.current?.destroy()}},[V]),F.useEffect(()=>{J.current?.update({translateExtent:I,width:S,height:A,inversePan:C,pannable:m,zoomStep:y,zoomable:v})},[m,v,C,y,I,S,A]);const Z=h?ae=>{const[se,fe]=J.current?.pointer(ae)||[0,0];h(ae,{x:se,y:fe})}:void 0,ne=g?F.useCallback((ae,se)=>{const fe=w.getState().nodeLookup.get(se).internals.userNode;g(ae,fe)},[]):void 0,z=b??N["minimap.ariaLabel"];return T.jsx(Fi,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*j:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:Qe(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:T.jsxs("svg",{width:O,height:P,viewBox:`${U} ${W} ${K} ${Q}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ee,ref:E,onClick:Z,children:[z&&T.jsx("title",{id:ee,children:z}),T.jsx(dS,{onClick:ne,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:r,nodeStrokeWidth:a,nodeComponent:l}),T.jsx("path",{className:"react-flow__minimap-mask",d:`M${U-H},${W-H}h${K+H*2}v${Q+H*2}h${-K-H*2}z
|
|
7
|
-
M${R.x},${R.y}h${R.width}v${R.height}h${-R.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Sp.displayName="MiniMap";F.memo(Sp);const yS=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,bS={[io.Line]:"right",[io.Handle]:"bottom-right"};function vS({nodeId:e,position:t,variant:n=io.Handle,className:o,style:r=void 0,children:i,color:a,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:h=!0,shouldResize:g,onResizeStart:m,onResize:v,onResizeEnd:b}){const C=Jf(),y=typeof e=="string"?e:C,x=He(),w=F.useRef(null),E=n===io.Handle,k=Ee(F.useCallback(yS(E&&h),[E,h]),Ve),R=F.useRef(null),_=t??bS[n];F.useEffect(()=>{if(!(!w.current||!y))return R.current||(R.current=Lv({domNode:w.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:I,transform:S,snapGrid:A,snapToGrid:N,nodeOrigin:O,domNode:P}=x.getState();return{nodeLookup:I,transform:S,snapGrid:A,snapToGrid:N,nodeOrigin:O,paneDomNode:P}},onChange:(I,S)=>{const{triggerNodeChanges:A,nodeLookup:N,parentLookup:O,nodeOrigin:P}=x.getState(),L=[],M={x:I.x,y:I.y},j=N.get(y);if(j&&j.expandParent&&j.parentId){const $=j.origin??P,B=I.width??j.measured.width??0,H=I.height??j.measured.height??0,U={id:j.id,parentId:j.parentId,rect:{width:B,height:H,...Sf({x:I.x??j.position.x,y:I.y??j.position.y},{width:B,height:H},j.parentId,N,$)}},W=el([U],N,O,P);L.push(...W),M.x=I.x?Math.max($[0]*B,I.x):void 0,M.y=I.y?Math.max($[1]*H,I.y):void 0}if(M.x!==void 0&&M.y!==void 0){const $={id:y,type:"position",position:{...M}};L.push($)}if(I.width!==void 0&&I.height!==void 0){const B={id:y,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};L.push(B)}for(const $ of S){const B={...$,type:"position"};L.push(B)}A(L)},onEnd:({width:I,height:S})=>{const A={id:y,type:"dimensions",resizing:!1,dimensions:{width:I,height:S}};x.getState().triggerNodeChanges([A])}})),R.current.update({controlPosition:_,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:f,resizeDirection:p,onResizeStart:m,onResize:v,onResizeEnd:b,shouldResize:g}),()=>{R.current?.destroy()}},[_,l,c,u,d,f,m,v,b,g]);const V=_.split("-");return T.jsx("div",{className:Qe(["react-flow__resize-control","nodrag",...V,n,o]),ref:w,style:{...r,scale:k,...a&&{[E?"backgroundColor":"borderColor"]:a}},children:i})}F.memo(vS);const or={black:"#000",white:"#fff"},Dn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},jn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Ln={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Fn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Bn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},Eo={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},xS={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Zt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>n.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Vi="$$material";function mi(){return mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},mi.apply(null,arguments)}function wS(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function SS(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var ES=(function(){function e(n){var o=this;this._insertTag=function(r){var i;o.tags.length===0?o.insertionPoint?i=o.insertionPoint.nextSibling:o.prepend?i=o.container.firstChild:i=o.before:i=o.tags[o.tags.length-1].nextSibling,o.container.insertBefore(r,i),o.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(o){o.forEach(this._insertTag)},t.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(SS(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=wS(r);try{i.insertRule(o,i.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(o));this.ctr++},t.flush=function(){this.tags.forEach(function(o){var r;return(r=o.parentNode)==null?void 0:r.removeChild(o)}),this.tags=[],this.ctr=0},e})(),rt="-ms-",gi="-moz-",Re="-webkit-",Ep="comm",rl="rule",il="decl",CS="@import",Cp="@keyframes",TS="@layer",NS=Math.abs,Hi=String.fromCharCode,kS=Object.assign;function OS(e,t){return ot(e,0)^45?(((t<<2^ot(e,0))<<2^ot(e,1))<<2^ot(e,2))<<2^ot(e,3):0}function Tp(e){return e.trim()}function PS(e,t){return(e=t.exec(e))?e[0]:e}function _e(e,t,n){return e.replace(t,n)}function ha(e,t){return e.indexOf(t)}function ot(e,t){return e.charCodeAt(t)|0}function rr(e,t,n){return e.slice(t,n)}function Ft(e){return e.length}function sl(e){return e.length}function Lr(e,t){return t.push(e),e}function RS(e,t){return e.map(t).join("")}var Wi=1,so=1,Np=0,ut=0,Ze=0,po="";function Ui(e,t,n,o,r,i,a){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:Wi,column:so,length:a,return:""}}function Co(e,t){return kS(Ui("",null,null,"",null,null,0),e,{length:-e.length},t)}function _S(){return Ze}function IS(){return Ze=ut>0?ot(po,--ut):0,so--,Ze===10&&(so=1,Wi--),Ze}function yt(){return Ze=ut<Np?ot(po,ut++):0,so++,Ze===10&&(so=1,Wi++),Ze}function Wt(){return ot(po,ut)}function Qr(){return ut}function yr(e,t){return rr(po,e,t)}function ir(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function kp(e){return Wi=so=1,Np=Ft(po=e),ut=0,[]}function Op(e){return po="",e}function Jr(e){return Tp(yr(ut-1,ma(e===91?e+2:e===40?e+1:e)))}function MS(e){for(;(Ze=Wt())&&Ze<33;)yt();return ir(e)>2||ir(Ze)>3?"":" "}function $S(e,t){for(;--t&&yt()&&!(Ze<48||Ze>102||Ze>57&&Ze<65||Ze>70&&Ze<97););return yr(e,Qr()+(t<6&&Wt()==32&&yt()==32))}function ma(e){for(;yt();)switch(Ze){case e:return ut;case 34:case 39:e!==34&&e!==39&&ma(Ze);break;case 40:e===41&&ma(e);break;case 92:yt();break}return ut}function AS(e,t){for(;yt()&&e+Ze!==57;)if(e+Ze===84&&Wt()===47)break;return"/*"+yr(t,ut-1)+"*"+Hi(e===47?e:yt())}function DS(e){for(;!ir(Wt());)yt();return yr(e,ut)}function jS(e){return Op(ei("",null,null,null,[""],e=kp(e),0,[0],e))}function ei(e,t,n,o,r,i,a,l,c){for(var u=0,d=0,f=a,p=0,h=0,g=0,m=1,v=1,b=1,C=0,y="",x=r,w=i,E=o,k=y;v;)switch(g=C,C=yt()){case 40:if(g!=108&&ot(k,f-1)==58){ha(k+=_e(Jr(C),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:k+=Jr(C);break;case 9:case 10:case 13:case 32:k+=MS(g);break;case 92:k+=$S(Qr()-1,7);continue;case 47:switch(Wt()){case 42:case 47:Lr(LS(AS(yt(),Qr()),t,n),c);break;default:k+="/"}break;case 123*m:l[u++]=Ft(k)*b;case 125*m:case 59:case 0:switch(C){case 0:case 125:v=0;case 59+d:b==-1&&(k=_e(k,/\f/g,"")),h>0&&Ft(k)-f&&Lr(h>32?tu(k+";",o,n,f-1):tu(_e(k," ","")+";",o,n,f-2),c);break;case 59:k+=";";default:if(Lr(E=eu(k,t,n,u,d,r,l,y,x=[],w=[],f),i),C===123)if(d===0)ei(k,t,E,E,x,i,f,l,w);else switch(p===99&&ot(k,3)===110?100:p){case 100:case 108:case 109:case 115:ei(e,E,E,o&&Lr(eu(e,E,E,0,0,r,l,y,r,x=[],f),w),r,w,f,l,o?x:w);break;default:ei(k,E,E,E,[""],w,0,l,w)}}u=d=h=0,m=b=1,y=k="",f=a;break;case 58:f=1+Ft(k),h=g;default:if(m<1){if(C==123)--m;else if(C==125&&m++==0&&IS()==125)continue}switch(k+=Hi(C),C*m){case 38:b=d>0?1:(k+="\f",-1);break;case 44:l[u++]=(Ft(k)-1)*b,b=1;break;case 64:Wt()===45&&(k+=Jr(yt())),p=Wt(),d=f=Ft(y=k+=DS(Qr())),C++;break;case 45:g===45&&Ft(k)==2&&(m=0)}}return i}function eu(e,t,n,o,r,i,a,l,c,u,d){for(var f=r-1,p=r===0?i:[""],h=sl(p),g=0,m=0,v=0;g<o;++g)for(var b=0,C=rr(e,f+1,f=NS(m=a[g])),y=e;b<h;++b)(y=Tp(m>0?p[b]+" "+C:_e(C,/&\f/g,p[b])))&&(c[v++]=y);return Ui(e,t,n,r===0?rl:l,c,u,d)}function LS(e,t,n){return Ui(e,t,n,Ep,Hi(_S()),rr(e,2,-2),0)}function tu(e,t,n,o){return Ui(e,t,n,il,rr(e,0,o),rr(e,o+1,-1),o)}function Xn(e,t){for(var n="",o=sl(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function FS(e,t,n,o){switch(e.type){case TS:if(e.children.length)break;case CS:case il:return e.return=e.return||e.value;case Ep:return"";case Cp:return e.return=e.value+"{"+Xn(e.children,o)+"}";case rl:e.value=e.props.join(",")}return Ft(n=Xn(e.children,o))?e.return=e.value+"{"+n+"}":""}function BS(e){var t=sl(e);return function(n,o,r,i){for(var a="",l=0;l<t;l++)a+=e[l](n,o,r,i)||"";return a}}function zS(e){return function(t){t.root||(t=t.return)&&e(t)}}function Pp(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var VS=function(t,n,o){for(var r=0,i=0;r=i,i=Wt(),r===38&&i===12&&(n[o]=1),!ir(i);)yt();return yr(t,ut)},HS=function(t,n){var o=-1,r=44;do switch(ir(r)){case 0:r===38&&Wt()===12&&(n[o]=1),t[o]+=VS(ut-1,n,o);break;case 2:t[o]+=Jr(r);break;case 4:if(r===44){t[++o]=Wt()===58?"&\f":"",n[o]=t[o].length;break}default:t[o]+=Hi(r)}while(r=yt());return t},WS=function(t,n){return Op(HS(kp(t),n))},nu=new WeakMap,US=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,o=t.parent,r=t.column===o.column&&t.line===o.line;o.type!=="rule";)if(o=o.parent,!o)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!nu.get(o))&&!r){nu.set(t,!0);for(var i=[],a=WS(n,i),l=o.props,c=0,u=0;c<a.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=i[c]?a[c].replace(/&\f/g,l[d]):l[d]+" "+a[c]}}},qS=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Rp(e,t){switch(OS(e,t)){case 5103:return Re+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Re+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Re+e+gi+e+rt+e+e;case 6828:case 4268:return Re+e+rt+e+e;case 6165:return Re+e+rt+"flex-"+e+e;case 5187:return Re+e+_e(e,/(\w+).+(:[^]+)/,Re+"box-$1$2"+rt+"flex-$1$2")+e;case 5443:return Re+e+rt+"flex-item-"+_e(e,/flex-|-self/,"")+e;case 4675:return Re+e+rt+"flex-line-pack"+_e(e,/align-content|flex-|-self/,"")+e;case 5548:return Re+e+rt+_e(e,"shrink","negative")+e;case 5292:return Re+e+rt+_e(e,"basis","preferred-size")+e;case 6060:return Re+"box-"+_e(e,"-grow","")+Re+e+rt+_e(e,"grow","positive")+e;case 4554:return Re+_e(e,/([^-])(transform)/g,"$1"+Re+"$2")+e;case 6187:return _e(_e(_e(e,/(zoom-|grab)/,Re+"$1"),/(image-set)/,Re+"$1"),e,"")+e;case 5495:case 3959:return _e(e,/(image-set\([^]*)/,Re+"$1$`$1");case 4968:return _e(_e(e,/(.+:)(flex-)?(.*)/,Re+"box-pack:$3"+rt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Re+e+e;case 4095:case 3583:case 4068:case 2532:return _e(e,/(.+)-inline(.+)/,Re+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ft(e)-1-t>6)switch(ot(e,t+1)){case 109:if(ot(e,t+4)!==45)break;case 102:return _e(e,/(.+:)(.+)-([^]+)/,"$1"+Re+"$2-$3$1"+gi+(ot(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ha(e,"stretch")?Rp(_e(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ot(e,t+1)!==115)break;case 6444:switch(ot(e,Ft(e)-3-(~ha(e,"!important")&&10))){case 107:return _e(e,":",":"+Re)+e;case 101:return _e(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Re+(ot(e,14)===45?"inline-":"")+"box$3$1"+Re+"$2$3$1"+rt+"$2box$3")+e}break;case 5936:switch(ot(e,t+11)){case 114:return Re+e+rt+_e(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Re+e+rt+_e(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Re+e+rt+_e(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Re+e+rt+e+e}return e}var YS=function(t,n,o,r){if(t.length>-1&&!t.return)switch(t.type){case il:t.return=Rp(t.value,t.length);break;case Cp:return Xn([Co(t,{value:_e(t.value,"@","@"+Re)})],r);case rl:if(t.length)return RS(t.props,function(i){switch(PS(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Xn([Co(t,{props:[_e(i,/:(read-\w+)/,":"+gi+"$1")]})],r);case"::placeholder":return Xn([Co(t,{props:[_e(i,/:(plac\w+)/,":"+Re+"input-$1")]}),Co(t,{props:[_e(i,/:(plac\w+)/,":"+gi+"$1")]}),Co(t,{props:[_e(i,/:(plac\w+)/,rt+"input-$1")]})],r)}return""})}},GS=[YS],KS=function(t){var n=t.key;if(n==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(m){var v=m.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var r=t.stylisPlugins||GS,i={},a,l=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var v=m.getAttribute("data-emotion").split(" "),b=1;b<v.length;b++)i[v[b]]=!0;l.push(m)});var c,u=[US,qS];{var d,f=[FS,zS(function(m){d.insert(m)})],p=BS(u.concat(r,f)),h=function(v){return Xn(jS(v),p)};c=function(v,b,C,y){d=C,h(v?v+"{"+b.styles+"}":b.styles),y&&(g.inserted[b.name]=!0)}}var g={key:n,sheet:new ES({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return g.sheet.hydrate(l),g},Fr={exports:{}},Me={};var ou;function XS(){if(ou)return Me;ou=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(w){if(typeof w=="object"&&w!==null){var E=w.$$typeof;switch(E){case t:switch(w=w.type,w){case c:case u:case o:case i:case r:case f:return w;default:switch(w=w&&w.$$typeof,w){case l:case d:case g:case h:case a:return w;default:return E}}case n:return E}}}function x(w){return y(w)===u}return Me.AsyncMode=c,Me.ConcurrentMode=u,Me.ContextConsumer=l,Me.ContextProvider=a,Me.Element=t,Me.ForwardRef=d,Me.Fragment=o,Me.Lazy=g,Me.Memo=h,Me.Portal=n,Me.Profiler=i,Me.StrictMode=r,Me.Suspense=f,Me.isAsyncMode=function(w){return x(w)||y(w)===c},Me.isConcurrentMode=x,Me.isContextConsumer=function(w){return y(w)===l},Me.isContextProvider=function(w){return y(w)===a},Me.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Me.isForwardRef=function(w){return y(w)===d},Me.isFragment=function(w){return y(w)===o},Me.isLazy=function(w){return y(w)===g},Me.isMemo=function(w){return y(w)===h},Me.isPortal=function(w){return y(w)===n},Me.isProfiler=function(w){return y(w)===i},Me.isStrictMode=function(w){return y(w)===r},Me.isSuspense=function(w){return y(w)===f},Me.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===o||w===u||w===i||w===r||w===f||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===h||w.$$typeof===a||w.$$typeof===l||w.$$typeof===d||w.$$typeof===v||w.$$typeof===b||w.$$typeof===C||w.$$typeof===m)},Me.typeOf=y,Me}var $e={};var ru;function ZS(){return ru||(ru=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(z){return typeof z=="string"||typeof z=="function"||z===o||z===u||z===i||z===r||z===f||z===p||typeof z=="object"&&z!==null&&(z.$$typeof===g||z.$$typeof===h||z.$$typeof===a||z.$$typeof===l||z.$$typeof===d||z.$$typeof===v||z.$$typeof===b||z.$$typeof===C||z.$$typeof===m)}function x(z){if(typeof z=="object"&&z!==null){var ae=z.$$typeof;switch(ae){case t:var se=z.type;switch(se){case c:case u:case o:case i:case r:case f:return se;default:var fe=se&&se.$$typeof;switch(fe){case l:case d:case g:case h:case a:return fe;default:return ae}}case n:return ae}}}var w=c,E=u,k=l,R=a,_=t,V=d,I=o,S=g,A=h,N=n,O=i,P=r,L=f,M=!1;function j(z){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(z)||x(z)===c}function $(z){return x(z)===u}function B(z){return x(z)===l}function H(z){return x(z)===a}function U(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function W(z){return x(z)===d}function K(z){return x(z)===o}function Q(z){return x(z)===g}function ee(z){return x(z)===h}function q(z){return x(z)===n}function J(z){return x(z)===i}function Z(z){return x(z)===r}function ne(z){return x(z)===f}$e.AsyncMode=w,$e.ConcurrentMode=E,$e.ContextConsumer=k,$e.ContextProvider=R,$e.Element=_,$e.ForwardRef=V,$e.Fragment=I,$e.Lazy=S,$e.Memo=A,$e.Portal=N,$e.Profiler=O,$e.StrictMode=P,$e.Suspense=L,$e.isAsyncMode=j,$e.isConcurrentMode=$,$e.isContextConsumer=B,$e.isContextProvider=H,$e.isElement=U,$e.isForwardRef=W,$e.isFragment=K,$e.isLazy=Q,$e.isMemo=ee,$e.isPortal=q,$e.isProfiler=J,$e.isStrictMode=Z,$e.isSuspense=ne,$e.isValidElementType=y,$e.typeOf=x})()),$e}var iu;function QS(){return iu||(iu=1,process.env.NODE_ENV==="production"?Fr.exports=XS():Fr.exports=ZS()),Fr.exports}var $s,su;function JS(){if(su)return $s;su=1;var e=QS(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=o,i[e.Memo]=r;function a(g){return e.isMemo(g)?r:i[g.$$typeof]||t}var l=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function h(g,m,v){if(typeof m!="string"){if(p){var b=f(m);b&&b!==p&&h(g,b,v)}var C=c(m);u&&(C=C.concat(u(m)));for(var y=a(g),x=a(m),w=0;w<C.length;++w){var E=C[w];if(!n[E]&&!(v&&v[E])&&!(x&&x[E])&&!(y&&y[E])){var k=d(m,E);try{l(g,E,k)}catch{}}}}return g}return $s=h,$s}JS();var eE=!0;function _p(e,t,n){var o="";return n.split(" ").forEach(function(r){e[r]!==void 0?t.push(e[r]+";"):r&&(o+=r+" ")}),o}var al=function(t,n,o){var r=t.key+"-"+n.name;(o===!1||eE===!1)&&t.registered[r]===void 0&&(t.registered[r]=n.styles)},ll=function(t,n,o){al(t,n,o);var r=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+r:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function tE(e){for(var t=0,n,o=0,r=e.length;r>=4;++o,r-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var nE={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},oE=/[A-Z]|^ms/g,rE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ip=function(t){return t.charCodeAt(1)===45},au=function(t){return t!=null&&typeof t!="boolean"},As=Pp(function(e){return Ip(e)?e:e.replace(oE,"-$&").toLowerCase()}),lu=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(rE,function(o,r,i){return Bt={name:r,styles:i,next:Bt},r})}return nE[t]!==1&&!Ip(t)&&typeof n=="number"&&n!==0?n+"px":n};function sr(e,t,n){if(n==null)return"";var o=n;if(o.__emotion_styles!==void 0)return o;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return Bt={name:r.name,styles:r.styles,next:Bt},r.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Bt={name:a.name,styles:a.styles,next:Bt},a=a.next;var l=i.styles+";";return l}return iE(e,t,n)}case"function":{if(e!==void 0){var c=Bt,u=n(e);return Bt=c,sr(e,t,u)}break}}var d=n;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function iE(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=sr(e,t,n[r])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var l=a;t!=null&&t[l]!==void 0?o+=i+"{"+t[l]+"}":au(l)&&(o+=As(i)+":"+lu(i,l)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var c=0;c<a.length;c++)au(a[c])&&(o+=As(i)+":"+lu(i,a[c])+";");else{var u=sr(e,t,a);switch(i){case"animation":case"animationName":{o+=As(i)+":"+u+";";break}default:o+=i+"{"+u+"}"}}}return o}var cu=/label:\s*([^\s;{]+)\s*(;|$)/g,Bt;function br(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,r="";Bt=void 0;var i=e[0];if(i==null||i.raw===void 0)o=!1,r+=sr(n,t,i);else{var a=i;r+=a[0]}for(var l=1;l<e.length;l++)if(r+=sr(n,t,e[l]),o){var c=i;r+=c[l]}cu.lastIndex=0;for(var u="",d;(d=cu.exec(r))!==null;)u+="-"+d[1];var f=tE(r)+u;return{name:f,styles:r,next:Bt}}var sE=function(t){return t()},Mp=D.useInsertionEffect?D.useInsertionEffect:!1,$p=Mp||sE,uu=Mp||D.useLayoutEffect,Ap=D.createContext(typeof HTMLElement<"u"?KS({key:"css"}):null);Ap.Provider;var cl=function(t){return F.forwardRef(function(n,o){var r=F.useContext(Ap);return t(n,r,o)})},qi=D.createContext({}),ul={}.hasOwnProperty,ga="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",aE=function(t,n){var o={};for(var r in n)ul.call(n,r)&&(o[r]=n[r]);return o[ga]=t,o},lE=function(t){var n=t.cache,o=t.serialized,r=t.isStringTag;return al(n,o,r),$p(function(){return ll(n,o,r)}),null},cE=cl(function(e,t,n){var o=e.css;typeof o=="string"&&t.registered[o]!==void 0&&(o=t.registered[o]);var r=e[ga],i=[o],a="";typeof e.className=="string"?a=_p(t.registered,i,e.className):e.className!=null&&(a=e.className+" ");var l=br(i,void 0,D.useContext(qi));a+=t.key+"-"+l.name;var c={};for(var u in e)ul.call(e,u)&&u!=="css"&&u!==ga&&(c[u]=e[u]);return c.className=a,n&&(c.ref=n),D.createElement(D.Fragment,null,D.createElement(lE,{cache:t,serialized:l,isStringTag:typeof r=="string"}),D.createElement(r,c))}),uE=cE,du=function(t,n){var o=arguments;if(n==null||!ul.call(n,"css"))return D.createElement.apply(void 0,o);var r=o.length,i=new Array(r);i[0]=uE,i[1]=aE(t,n);for(var a=2;a<r;a++)i[a]=o[a];return D.createElement.apply(null,i)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(du||(du={}));var dE=cl(function(e,t){var n=e.styles,o=br([n],void 0,D.useContext(qi)),r=D.useRef();return uu(function(){var i=t.key+"-global",a=new t.sheet.constructor({key:i,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),l=!1,c=document.querySelector('style[data-emotion="'+i+" "+o.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),c!==null&&(l=!0,c.setAttribute("data-emotion",i),a.hydrate([c])),r.current=[a,l],function(){a.flush()}},[t]),uu(function(){var i=r.current,a=i[0],l=i[1];if(l){i[1]=!1;return}if(o.next!==void 0&&ll(t,o.next,!0),a.tags.length){var c=a.tags[a.tags.length-1].nextElementSibling;a.before=c,a.flush()}t.insert("",o,a,!1)},[t,o.name]),null});function dl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return br(t)}function vr(){var e=dl.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var fE=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,pE=Pp(function(e){return fE.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),hE=pE,mE=function(t){return t!=="theme"},fu=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?hE:mE},pu=function(t,n,o){var r;if(n){var i=n.shouldForwardProp;r=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof r!="function"&&o&&(r=t.__emotion_forwardProp),r},gE=function(t){var n=t.cache,o=t.serialized,r=t.isStringTag;return al(n,o,r),$p(function(){return ll(n,o,r)}),null},yE=function e(t,n){var o=t.__emotion_real===t,r=o&&t.__emotion_base||t,i,a;n!==void 0&&(i=n.label,a=n.target);var l=pu(t,n,o),c=l||fu(r),u=!c("as");return function(){var d=arguments,f=o&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&f.push("label:"+i+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var h=d.length,g=1;g<h;g++)f.push(d[g],p[g])}var m=cl(function(v,b,C){var y=u&&v.as||r,x="",w=[],E=v;if(v.theme==null){E={};for(var k in v)E[k]=v[k];E.theme=D.useContext(qi)}typeof v.className=="string"?x=_p(b.registered,w,v.className):v.className!=null&&(x=v.className+" ");var R=br(f.concat(w),b.registered,E);x+=b.key+"-"+R.name,a!==void 0&&(x+=" "+a);var _=u&&l===void 0?fu(y):c,V={};for(var I in v)u&&I==="as"||_(I)&&(V[I]=v[I]);return V.className=x,C&&(V.ref=C),D.createElement(D.Fragment,null,D.createElement(gE,{cache:b,serialized:R,isStringTag:typeof y=="string"}),D.createElement(y,V))});return m.displayName=i!==void 0?i:"Styled("+(typeof r=="string"?r:r.displayName||r.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=r,m.__emotion_styles=f,m.__emotion_forwardProp=l,Object.defineProperty(m,"toString",{value:function(){return"."+a}}),m.withComponent=function(v,b){var C=e(v,mi({},n,b,{shouldForwardProp:pu(m,b,!0)}));return C.apply(void 0,f)},m}},bE=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],ya=yE.bind(null);bE.forEach(function(e){ya[e]=ya(e)});var Br={exports:{}},zr={exports:{}},Ae={};var hu;function vE(){if(hu)return Ae;hu=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(w){if(typeof w=="object"&&w!==null){var E=w.$$typeof;switch(E){case t:switch(w=w.type,w){case c:case u:case o:case i:case r:case f:return w;default:switch(w=w&&w.$$typeof,w){case l:case d:case g:case h:case a:return w;default:return E}}case n:return E}}}function x(w){return y(w)===u}return Ae.AsyncMode=c,Ae.ConcurrentMode=u,Ae.ContextConsumer=l,Ae.ContextProvider=a,Ae.Element=t,Ae.ForwardRef=d,Ae.Fragment=o,Ae.Lazy=g,Ae.Memo=h,Ae.Portal=n,Ae.Profiler=i,Ae.StrictMode=r,Ae.Suspense=f,Ae.isAsyncMode=function(w){return x(w)||y(w)===c},Ae.isConcurrentMode=x,Ae.isContextConsumer=function(w){return y(w)===l},Ae.isContextProvider=function(w){return y(w)===a},Ae.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ae.isForwardRef=function(w){return y(w)===d},Ae.isFragment=function(w){return y(w)===o},Ae.isLazy=function(w){return y(w)===g},Ae.isMemo=function(w){return y(w)===h},Ae.isPortal=function(w){return y(w)===n},Ae.isProfiler=function(w){return y(w)===i},Ae.isStrictMode=function(w){return y(w)===r},Ae.isSuspense=function(w){return y(w)===f},Ae.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===o||w===u||w===i||w===r||w===f||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===h||w.$$typeof===a||w.$$typeof===l||w.$$typeof===d||w.$$typeof===v||w.$$typeof===b||w.$$typeof===C||w.$$typeof===m)},Ae.typeOf=y,Ae}var De={};var mu;function xE(){return mu||(mu=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(z){return typeof z=="string"||typeof z=="function"||z===o||z===u||z===i||z===r||z===f||z===p||typeof z=="object"&&z!==null&&(z.$$typeof===g||z.$$typeof===h||z.$$typeof===a||z.$$typeof===l||z.$$typeof===d||z.$$typeof===v||z.$$typeof===b||z.$$typeof===C||z.$$typeof===m)}function x(z){if(typeof z=="object"&&z!==null){var ae=z.$$typeof;switch(ae){case t:var se=z.type;switch(se){case c:case u:case o:case i:case r:case f:return se;default:var fe=se&&se.$$typeof;switch(fe){case l:case d:case g:case h:case a:return fe;default:return ae}}case n:return ae}}}var w=c,E=u,k=l,R=a,_=t,V=d,I=o,S=g,A=h,N=n,O=i,P=r,L=f,M=!1;function j(z){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(z)||x(z)===c}function $(z){return x(z)===u}function B(z){return x(z)===l}function H(z){return x(z)===a}function U(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function W(z){return x(z)===d}function K(z){return x(z)===o}function Q(z){return x(z)===g}function ee(z){return x(z)===h}function q(z){return x(z)===n}function J(z){return x(z)===i}function Z(z){return x(z)===r}function ne(z){return x(z)===f}De.AsyncMode=w,De.ConcurrentMode=E,De.ContextConsumer=k,De.ContextProvider=R,De.Element=_,De.ForwardRef=V,De.Fragment=I,De.Lazy=S,De.Memo=A,De.Portal=N,De.Profiler=O,De.StrictMode=P,De.Suspense=L,De.isAsyncMode=j,De.isConcurrentMode=$,De.isContextConsumer=B,De.isContextProvider=H,De.isElement=U,De.isForwardRef=W,De.isFragment=K,De.isLazy=Q,De.isMemo=ee,De.isPortal=q,De.isProfiler=J,De.isStrictMode=Z,De.isSuspense=ne,De.isValidElementType=y,De.typeOf=x})()),De}var gu;function Dp(){return gu||(gu=1,process.env.NODE_ENV==="production"?zr.exports=vE():zr.exports=xE()),zr.exports}var Ds,yu;function wE(){if(yu)return Ds;yu=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function r(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ds=r()?Object.assign:function(i,a){for(var l,c=o(i),u,d=1;d<arguments.length;d++){l=Object(arguments[d]);for(var f in l)t.call(l,f)&&(c[f]=l[f]);if(e){u=e(l);for(var p=0;p<u.length;p++)n.call(l,u[p])&&(c[u[p]]=l[u[p]])}}return c},Ds}var js,bu;function fl(){if(bu)return js;bu=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return js=e,js}var Ls,vu;function jp(){return vu||(vu=1,Ls=Function.call.bind(Object.prototype.hasOwnProperty)),Ls}var Fs,xu;function SE(){if(xu)return Fs;xu=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=fl(),n={},o=jp();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function r(i,a,l,c,u){if(process.env.NODE_ENV!=="production"){for(var d in i)if(o(i,d)){var f;try{if(typeof i[d]!="function"){var p=Error((c||"React class")+": "+l+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=i[d](a,d,c,l,null,t)}catch(g){f=g}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+l+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=u?u():"";e("Failed "+l+" type: "+f.message+(h??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Fs=r,Fs}var Bs,wu;function EE(){if(wu)return Bs;wu=1;var e=Dp(),t=wE(),n=fl(),o=jp(),r=SE(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return Bs=function(l,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f($){var B=$&&(u&&$[u]||$[d]);if(typeof B=="function")return B}var p="<<anonymous>>",h={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:C(),arrayOf:y,element:x(),elementType:w(),instanceOf:E,node:V(),objectOf:R,oneOf:k,oneOfType:_,shape:S,exact:A};function g($,B){return $===B?$!==0||1/$===1/B:$!==$&&B!==B}function m($,B){this.message=$,this.data=B&&typeof B=="object"?B:{},this.stack=""}m.prototype=Error.prototype;function v($){if(process.env.NODE_ENV!=="production")var B={},H=0;function U(K,Q,ee,q,J,Z,ne){if(q=q||p,Z=Z||ee,ne!==n){if(c){var z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=q+":"+ee;!B[ae]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[ae]=!0,H++)}}return Q[ee]==null?K?Q[ee]===null?new m("The "+J+" `"+Z+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new m("The "+J+" `"+Z+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:$(Q,ee,q,J,Z)}var W=U.bind(null,!1);return W.isRequired=U.bind(null,!0),W}function b($){function B(H,U,W,K,Q,ee){var q=H[U],J=P(q);if(J!==$){var Z=L(q);return new m("Invalid "+K+" `"+Q+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return v(B)}function C(){return v(a)}function y($){function B(H,U,W,K,Q){if(typeof $!="function")return new m("Property `"+Q+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var ee=H[U];if(!Array.isArray(ee)){var q=P(ee);return new m("Invalid "+K+" `"+Q+"` of type "+("`"+q+"` supplied to `"+W+"`, expected an array."))}for(var J=0;J<ee.length;J++){var Z=$(ee,J,W,K,Q+"["+J+"]",n);if(Z instanceof Error)return Z}return null}return v(B)}function x(){function $(B,H,U,W,K){var Q=B[H];if(!l(Q)){var ee=P(Q);return new m("Invalid "+W+" `"+K+"` of type "+("`"+ee+"` supplied to `"+U+"`, expected a single ReactElement."))}return null}return v($)}function w(){function $(B,H,U,W,K){var Q=B[H];if(!e.isValidElementType(Q)){var ee=P(Q);return new m("Invalid "+W+" `"+K+"` of type "+("`"+ee+"` supplied to `"+U+"`, expected a single ReactElement type."))}return null}return v($)}function E($){function B(H,U,W,K,Q){if(!(H[U]instanceof $)){var ee=$.name||p,q=j(H[U]);return new m("Invalid "+K+" `"+Q+"` of type "+("`"+q+"` supplied to `"+W+"`, expected ")+("instance of `"+ee+"`."))}return null}return v(B)}function k($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(H,U,W,K,Q){for(var ee=H[U],q=0;q<$.length;q++)if(g(ee,$[q]))return null;var J=JSON.stringify($,function(ne,z){var ae=L(z);return ae==="symbol"?String(z):z});return new m("Invalid "+K+" `"+Q+"` of value `"+String(ee)+"` "+("supplied to `"+W+"`, expected one of "+J+"."))}return v(B)}function R($){function B(H,U,W,K,Q){if(typeof $!="function")return new m("Property `"+Q+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var ee=H[U],q=P(ee);if(q!=="object")return new m("Invalid "+K+" `"+Q+"` of type "+("`"+q+"` supplied to `"+W+"`, expected an object."));for(var J in ee)if(o(ee,J)){var Z=$(ee,J,W,K,Q+"."+J,n);if(Z instanceof Error)return Z}return null}return v(B)}function _($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<$.length;B++){var H=$[B];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+M(H)+" at index "+B+"."),a}function U(W,K,Q,ee,q){for(var J=[],Z=0;Z<$.length;Z++){var ne=$[Z],z=ne(W,K,Q,ee,q,n);if(z==null)return null;z.data&&o(z.data,"expectedType")&&J.push(z.data.expectedType)}var ae=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new m("Invalid "+ee+" `"+q+"` supplied to "+("`"+Q+"`"+ae+"."))}return v(U)}function V(){function $(B,H,U,W,K){return N(B[H])?null:new m("Invalid "+W+" `"+K+"` supplied to "+("`"+U+"`, expected a ReactNode."))}return v($)}function I($,B,H,U,W){return new m(($||"React class")+": "+B+" type `"+H+"."+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function S($){function B(H,U,W,K,Q){var ee=H[U],q=P(ee);if(q!=="object")return new m("Invalid "+K+" `"+Q+"` of type `"+q+"` "+("supplied to `"+W+"`, expected `object`."));for(var J in $){var Z=$[J];if(typeof Z!="function")return I(W,K,Q,J,L(Z));var ne=Z(ee,J,W,K,Q+"."+J,n);if(ne)return ne}return null}return v(B)}function A($){function B(H,U,W,K,Q){var ee=H[U],q=P(ee);if(q!=="object")return new m("Invalid "+K+" `"+Q+"` of type `"+q+"` "+("supplied to `"+W+"`, expected `object`."));var J=t({},H[U],$);for(var Z in J){var ne=$[Z];if(o($,Z)&&typeof ne!="function")return I(W,K,Q,Z,L(ne));if(!ne)return new m("Invalid "+K+" `"+Q+"` key `"+Z+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(H[U],null," ")+`
|
|
6
|
+
`)),d=u.reduce((f,p)=>f.concat(...p),[]);return[u,d]}return[[],[]]},[e]);return F.useEffect(()=>{const c=t?.target??Dc,u=t?.actInsideInputWithModifier??!0;if(e!==null){const d=h=>{if(r.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!r.current||r.current&&!u)&&Cf(h))return!1;const m=Lc(h.code,l);if(i.current.add(h[m]),jc(a,i.current,!1)){const v=h.composedPath?.()?.[0]||h.target,b=v?.nodeName==="BUTTON"||v?.nodeName==="A";t.preventDefault!==!1&&(r.current||!b)&&h.preventDefault(),o(!0)}},f=h=>{const g=Lc(h.code,l);jc(a,i.current,!0)?(o(!1),i.current.clear()):i.current.delete(h[g]),h.key==="Meta"&&i.current.clear(),r.current=!1},p=()=>{i.current.clear(),o(!1)};return c?.addEventListener("keydown",d),c?.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c?.removeEventListener("keydown",d),c?.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,o]),n}function jc(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(r=>t.has(r)))}function Lc(e,t){return t.includes(e)?"code":"key"}const gx=()=>{const e=He();return F.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[o,r,i],panZoom:a}=e.getState();return a?(await a.setViewport({x:t.x??o,y:t.y??r,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{const{width:o,height:r,minZoom:i,maxZoom:a,panZoom:l}=e.getState(),c=qa(t,o,r,i,a,n?.padding??.1);return l?(await l.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:o,snapGrid:r,snapToGrid:i,domNode:a}=e.getState();if(!a)return t;const{x:l,y:c}=a.getBoundingClientRect(),u={x:t.x-l,y:t.y-c},d=n.snapGrid??r,f=n.snapToGrid??i;return mr(u,o,f,d)},flowToScreenPosition:t=>{const{transform:n,domNode:o}=e.getState();if(!o)return t;const{x:r,y:i}=o.getBoundingClientRect(),a=pi(t,n);return{x:a.x+r,y:a.y+i}}}),[])};function Gf(e,t){const n=[],o=new Map,r=[];for(const i of e)if(i.type==="add"){r.push(i);continue}else if(i.type==="remove"||i.type==="replace")o.set(i.id,[i]);else{const a=o.get(i.id);a?a.push(i):o.set(i.id,[i])}for(const i of t){const a=o.get(i.id);if(!a){n.push(i);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){n.push({...a[0].item});continue}const l={...i};for(const c of a)yx(c,l);n.push(l)}return r.length&&r.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function yx(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function tl(e,t){return Gf(e,t)}function nl(e,t){return Gf(e,t)}function mn(e,t){return{id:e,type:"select",selected:t}}function qn(e,t=new Set,n=!1){const o=[];for(const[r,i]of e){const a=t.has(r);!(i.selected===void 0&&!a)&&i.selected!==a&&(n&&(i.selected=a),o.push(mn(i.id,a)))}return o}function Fc({items:e=[],lookup:t}){const n=[],o=new Map(e.map(r=>[r.id,r]));for(const[r,i]of e.entries()){const a=t.get(i.id),l=a?.internals?.userNode??a;l!==void 0&&l!==i&&n.push({id:i.id,item:i,type:"replace"}),l===void 0&&n.push({item:i,type:"add",index:r})}for(const[r]of t)o.get(r)===void 0&&n.push({id:r,type:"remove"});return n}function Bc(e){return{id:e.id,type:"remove"}}const zc=e=>z0(e),bx=e=>yf(e);function Kf(e){return F.forwardRef(e)}const vx=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Vc(e){const[t,n]=F.useState(BigInt(0)),[o]=F.useState(()=>xx(()=>n(r=>r+BigInt(1))));return vx(()=>{const r=o.get();r.length&&(e(r),o.reset())},[t]),o}function xx(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Xf=F.createContext(null);function wx({children:e}){const t=He(),n=F.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:d,onNodesChange:f,nodeLookup:p,fitViewQueued:h,onNodesChangeMiddlewareMap:g}=t.getState();let m=c;for(const b of l)m=typeof b=="function"?b(m):b;let v=Fc({items:m,lookup:p});for(const b of g.values())v=b(v);d&&u(m),v.length>0?f?.(v):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:C,setNodes:y}=t.getState();b&&y(C)})},[]),o=Vc(n),r=F.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:f,edgeLookup:p}=t.getState();let h=c;for(const g of l)h=typeof g=="function"?g(h):g;d?u(h):f&&f(Fc({items:h,lookup:p}))},[]),i=Vc(r),a=F.useMemo(()=>({nodeQueue:o,edgeQueue:i}),[]);return T.jsx(Xf.Provider,{value:a,children:e})}function Sx(){const e=F.useContext(Xf);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const Ex=e=>!!e.panZoom;function Bi(){const e=gx(),t=He(),n=Sx(),o=Ce(Ex),r=F.useMemo(()=>{const i=f=>t.getState().nodeLookup.get(f),a=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},c=f=>{const{nodeLookup:p,nodeOrigin:h}=t.getState(),g=zc(f)?f:p.get(f.id),m=g.parentId?Sf(g.position,g.measured,g.parentId,p,h):g.position,v={...g,position:m,width:g.measured?.width??g.width,height:g.measured?.height??g.height};return oo(v)},u=(f,p,h={replace:!1})=>{a(g=>g.map(m=>{if(m.id===f){const v=typeof p=="function"?p(m):p;return h.replace&&zc(v)?v:{...m,...v}}return m}))},d=(f,p,h={replace:!1})=>{l(g=>g.map(m=>{if(m.id===f){const v=typeof p=="function"?p(m):p;return h.replace&&bx(v)?v:{...m,...v}}return m}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>i(f)?.internals.userNode,getInternalNode:i,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(p=>({...p}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:a,setEdges:l,addNodes:f=>{const p=Array.isArray(f)?f:[f];n.nodeQueue.push(h=>[...h,...p])},addEdges:f=>{const p=Array.isArray(f)?f:[f];n.edgeQueue.push(h=>[...h,...p])},toObject:()=>{const{nodes:f=[],edges:p=[],transform:h}=t.getState(),[g,m,v]=h;return{nodes:f.map(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x:g,y:m,zoom:v}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:h,edges:g,onNodesDelete:m,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:C,onDelete:y,onBeforeDelete:x}=t.getState(),{nodes:w,edges:E}=await q0({nodesToRemove:f,edgesToRemove:p,nodes:h,edges:g,onBeforeDelete:x}),k=E.length>0,R=w.length>0;if(k){const _=E.map(Bc);v?.(E),C(_)}if(R){const _=w.map(Bc);m?.(w),b(_)}return(R||k)&&y?.({nodes:w,edges:E}),{deletedNodes:w,deletedEdges:E}},getIntersectingNodes:(f,p=!0,h)=>{const g=dc(f),m=g?f:c(f),v=h!==void 0;return m?(h||t.getState().nodes).filter(b=>{const C=t.getState().nodeLookup.get(b.id);if(C&&!g&&(b.id===f.id||!C.internals.positionAbsolute))return!1;const y=oo(v?b:C),x=er(y,m);return p&&x>0||x>=y.width*y.height||x>=m.width*m.height}):[]},isNodeIntersecting:(f,p,h=!0)=>{const m=dc(f)?f:c(f);if(!m)return!1;const v=er(m,p);return h&&v>0||v>=p.width*p.height||v>=m.width*m.height},updateNode:u,updateNodeData:(f,p,h={replace:!1})=>{u(f,g=>{const m=typeof p=="function"?p(g):p;return h.replace?{...g,data:m}:{...g,data:{...g.data,...m}}},h)},updateEdge:d,updateEdgeData:(f,p,h={replace:!1})=>{d(f,g=>{const m=typeof p=="function"?p(g):p;return h.replace?{...g,data:m}:{...g,data:{...g.data,...m}}},h)},getNodesBounds:f=>{const{nodeLookup:p,nodeOrigin:h}=t.getState();return V0(f,{nodeLookup:p,nodeOrigin:h})},getHandleConnections:({type:f,id:p,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}-${f}${p?`-${p}`:""}`)?.values()??[]),getNodeConnections:({type:f,handleId:p,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}${f?p?`-${f}-${p}`:`-${f}`:""}`)?.values()??[]),fitView:async f=>{const p=t.getState().fitViewResolver??K0();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:p}),n.nodeQueue.push(h=>[...h]),p.promise}}},[]);return F.useMemo(()=>({...r,...e,viewportInitialized:o}),[o])}const Hc=e=>e.selected,Cx=typeof window<"u"?window:void 0;function Tx({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=He(),{deleteElements:o}=Bi(),r=nr(e,{actInsideInputWithModifier:!1}),i=nr(t,{target:Cx});F.useEffect(()=>{if(r){const{edges:a,nodes:l}=n.getState();o({nodes:l.filter(Hc),edges:a.filter(Hc)}),n.setState({nodesSelectionActive:!1})}},[r]),F.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function Nx(e){const t=He();F.useEffect(()=>{const n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;const o=Ga(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",lt.error004()),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);const o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}const zi={position:"absolute",width:"100%",height:"100%",top:0,left:0},kx=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Ox({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:r=.5,panOnScrollMode:i=Cn.Free,zoomOnDoubleClick:a=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:h=!0,children:g,noWheelClassName:m,noPanClassName:v,onViewportChange:b,isControlledViewport:C,paneClickDistance:y,selectionOnDrag:x}){const w=He(),E=F.useRef(null),{userSelectionActive:k,lib:R,connectionInProgress:_}=Ce(kx,Ve),V=nr(p),I=F.useRef();Nx(E);const S=F.useCallback(A=>{b?.({x:A[0],y:A[1],zoom:A[2]}),C||w.setState({transform:A})},[b,C]);return F.useEffect(()=>{if(E.current){I.current=Iv({domNode:E.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:P=>w.setState({paneDragging:P}),onPanZoomStart:(P,L)=>{const{onViewportChangeStart:M,onMoveStart:j}=w.getState();j?.(P,L),M?.(L)},onPanZoom:(P,L)=>{const{onViewportChange:M,onMove:j}=w.getState();j?.(P,L),M?.(L)},onPanZoomEnd:(P,L)=>{const{onViewportChangeEnd:M,onMoveEnd:j}=w.getState();j?.(P,L),M?.(L)}});const{x:A,y:N,zoom:O}=I.current.getViewport();return w.setState({panZoom:I.current,transform:[A,N,O],domNode:E.current.closest(".react-flow")}),()=>{I.current?.destroy()}}},[]),F.useEffect(()=>{I.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:r,panOnScrollMode:i,zoomOnDoubleClick:a,panOnDrag:l,zoomActivationKeyPressed:V,preventScrolling:h,noPanClassName:v,userSelectionActive:k,noWheelClassName:m,lib:R,onTransformChange:S,connectionInProgress:_,selectionOnDrag:x,paneClickDistance:y})},[e,t,n,o,r,i,a,l,V,h,v,k,m,R,S,_,x,y]),T.jsx("div",{className:"react-flow__renderer",ref:E,style:zi,children:g})}const Px=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Rx(){const{userSelectionActive:e,userSelectionRect:t}=Ce(Px,Ve);return e&&t?T.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Is=(e,t)=>n=>{n.target===t.current&&e?.(n)},_x=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Ix({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Qo.Full,panOnDrag:o,paneClickDistance:r,selectionOnDrag:i,onSelectionStart:a,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:h,children:g}){const m=He(),{userSelectionActive:v,elementsSelectable:b,dragging:C,connectionInProgress:y}=Ce(_x,Ve),x=b&&(e||v),w=F.useRef(null),E=F.useRef(),k=F.useRef(new Set),R=F.useRef(new Set),_=F.useRef(!1),V=M=>{if(_.current||y){_.current=!1;return}c?.(M),m.getState().resetSelectedElements(),m.setState({nodesSelectionActive:!1})},I=M=>{if(Array.isArray(o)&&o?.includes(2)){M.preventDefault();return}u?.(M)},S=d?M=>d(M):void 0,A=M=>{_.current&&(M.stopPropagation(),_.current=!1)},N=M=>{const{domNode:j}=m.getState();if(E.current=j?.getBoundingClientRect(),!E.current)return;const $=M.target===w.current;if(!$&&!!M.target.closest(".nokey")||!e||!(i&&$||t)||M.button!==0||!M.isPrimary)return;M.target?.setPointerCapture?.(M.pointerId),_.current=!1;const{x:U,y:W}=Pt(M.nativeEvent,E.current);m.setState({userSelectionRect:{width:0,height:0,startX:U,startY:W,x:U,y:W}}),$||(M.stopPropagation(),M.preventDefault())},O=M=>{const{userSelectionRect:j,transform:$,nodeLookup:B,edgeLookup:H,connectionLookup:U,triggerNodeChanges:W,triggerEdgeChanges:K,defaultEdgeOptions:Q,resetSelectedElements:ee}=m.getState();if(!E.current||!j)return;const{x:q,y:J}=Pt(M.nativeEvent,E.current),{startX:Z,startY:ne}=j;if(!_.current){const we=t?0:r;if(Math.hypot(q-Z,J-ne)<=we)return;ee(),a?.(M)}_.current=!0;const z={startX:Z,startY:ne,x:q<Z?q:Z,y:J<ne?J:ne,width:Math.abs(q-Z),height:Math.abs(J-ne)},ae=k.current,se=R.current;k.current=new Set(Ua(B,z,$,n===Qo.Partial,!0).map(we=>we.id)),R.current=new Set;const de=Q?.selectable??!0;for(const we of k.current){const Te=U.get(we);if(Te)for(const{edgeId:G}of Te.values()){const X=H.get(G);X&&(X.selectable??de)&&R.current.add(G)}}if(!fc(ae,k.current)){const we=qn(B,k.current,!0);W(we)}if(!fc(se,R.current)){const we=qn(H,R.current);K(we)}m.setState({userSelectionRect:z,userSelectionActive:!0,nodesSelectionActive:!1})},P=M=>{M.button===0&&(M.target?.releasePointerCapture?.(M.pointerId),!v&&M.target===w.current&&m.getState().userSelectionRect&&V?.(M),m.setState({userSelectionActive:!1,userSelectionRect:null}),_.current&&(l?.(M),m.setState({nodesSelectionActive:k.current.size>0})))},L=o===!0||Array.isArray(o)&&o.includes(0);return T.jsxs("div",{className:Je(["react-flow__pane",{draggable:L,dragging:C,selection:e}]),onClick:x?void 0:Is(V,w),onContextMenu:Is(I,w),onWheel:Is(S,w),onPointerEnter:x?void 0:f,onPointerMove:x?O:p,onPointerUp:x?P:void 0,onPointerDownCapture:x?N:void 0,onClickCapture:x?A:void 0,onPointerLeave:h,ref:w,style:zi,children:[g,T.jsx(Rx,{})]})}function pa({id:e,store:t,unselect:n=!1,nodeRef:o}){const{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:a,nodeLookup:l,onError:c}=t.getState(),u=l.get(e);if(!u){c?.("012",lt.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):r([e])}function Zf({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:r,isSelectable:i,nodeClickDistance:a}){const l=He(),[c,u]=F.useState(!1),d=F.useRef();return F.useEffect(()=>{d.current=bv({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{pa({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),F.useEffect(()=>{if(t)d.current?.destroy();else if(e.current)return d.current?.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:i,nodeId:r,nodeClickDistance:a}),()=>{d.current?.destroy()}},[n,o,t,i,e,r]),c}const Mx=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Qf(){const e=He();return F.useCallback(n=>{const{nodeExtent:o,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:d}=e.getState(),f=new Map,p=Mx(a),h=r?i[0]:5,g=r?i[1]:5,m=n.direction.x*h*n.factor,v=n.direction.y*g*n.factor;for(const[,b]of u){if(!p(b))continue;let C={x:b.internals.positionAbsolute.x+m,y:b.internals.positionAbsolute.y+v};r&&(C=hr(C,i));const{position:y,positionAbsolute:x}=bf({nodeId:b.id,nextPosition:C,nodeLookup:u,nodeExtent:o,nodeOrigin:d,onError:l});b.position=y,b.internals.positionAbsolute=x,f.set(b.id,b)}c(f)},[])}const ol=F.createContext(null),$x=ol.Provider;ol.Consumer;const Jf=()=>F.useContext(ol),Ax=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Dx=(e,t,n)=>o=>{const{connectionClickStartHandle:r,connectionMode:i,connection:a}=o,{fromHandle:l,toHandle:c,isValid:u}=a,d=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:l?.nodeId===e&&l?.id===t&&l?.type===n,connectingTo:d,clickConnecting:r?.nodeId===e&&r?.id===t&&r?.type===n,isPossibleEndHandle:i===to.Strict?l?.type!==n:e!==l?.nodeId||t!==l?.id,connectionInProcess:!!l,clickConnectionInProcess:!!r,valid:d&&u}};function jx({type:e="source",position:t=fe.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:r=!0,isConnectableEnd:i=!0,id:a,onConnect:l,children:c,className:u,onMouseDown:d,onTouchStart:f,...p},h){const g=a||null,m=e==="target",v=He(),b=Jf(),{connectOnClick:C,noPanClassName:y,rfId:x}=Ce(Ax,Ve),{connectingFrom:w,connectingTo:E,clickConnecting:k,isPossibleEndHandle:R,connectionInProcess:_,clickConnectionInProcess:V,valid:I}=Ce(Dx(b,g,e),Ve);b||v.getState().onError?.("010",lt.error010());const S=O=>{const{defaultEdgeOptions:P,onConnect:L,hasDefaultEdges:M}=v.getState(),j={...P,...O};if(M){const{edges:$,setEdges:B}=v.getState();B(tv(j,$))}L?.(j),l?.(j)},A=O=>{if(!b)return;const P=Tf(O.nativeEvent);if(r&&(P&&O.button===0||!P)){const L=v.getState();fa.onPointerDown(O.nativeEvent,{handleDomNode:O.currentTarget,autoPanOnConnect:L.autoPanOnConnect,connectionMode:L.connectionMode,connectionRadius:L.connectionRadius,domNode:L.domNode,nodeLookup:L.nodeLookup,lib:L.lib,isTarget:m,handleId:g,nodeId:b,flowId:L.rfId,panBy:L.panBy,cancelConnection:L.cancelConnection,onConnectStart:L.onConnectStart,onConnectEnd:L.onConnectEnd,updateConnection:L.updateConnection,onConnect:S,isValidConnection:n||L.isValidConnection,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:L.autoPanSpeed,dragThreshold:L.connectionDragThreshold})}P?d?.(O):f?.(O)},N=O=>{const{onClickConnectStart:P,onClickConnectEnd:L,connectionClickStartHandle:M,connectionMode:j,isValidConnection:$,lib:B,rfId:H,nodeLookup:U,connection:W}=v.getState();if(!b||!M&&!r)return;if(!M){P?.(O.nativeEvent,{nodeId:b,handleId:g,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:g}});return}const K=Ef(O.target),Q=n||$,{connection:ee,isValid:q}=fa.isValid(O.nativeEvent,{handle:{nodeId:b,id:g,type:e},connectionMode:j,fromNodeId:M.nodeId,fromHandleId:M.id||null,fromType:M.type,isValidConnection:Q,flowId:H,doc:K,lib:B,nodeLookup:U});q&&ee&&S(ee);const J=structuredClone(W);delete J.inProgress,J.toPosition=J.toHandle?J.toHandle.position:null,L?.(O,J),v.setState({connectionClickStartHandle:null})};return T.jsx("div",{"data-handleid":g,"data-nodeid":b,"data-handlepos":t,"data-id":`${x}-${b}-${g}-${e}`,className:Je(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",y,u,{source:!m,target:m,connectable:o,connectablestart:r,connectableend:i,clickconnecting:k,connectingfrom:w,connectingto:E,valid:I,connectionindicator:o&&(!_||R)&&(_||V?i:r)}]),onMouseDown:A,onTouchStart:A,onClick:C?N:void 0,ref:h,...p,children:c})}const yt=F.memo(Kf(jx));function Lx({data:e,isConnectable:t,sourcePosition:n=fe.Bottom}){return T.jsxs(T.Fragment,{children:[e?.label,T.jsx(yt,{type:"source",position:n,isConnectable:t})]})}function Fx({data:e,isConnectable:t,targetPosition:n=fe.Top,sourcePosition:o=fe.Bottom}){return T.jsxs(T.Fragment,{children:[T.jsx(yt,{type:"target",position:n,isConnectable:t}),e?.label,T.jsx(yt,{type:"source",position:o,isConnectable:t})]})}function Bx(){return null}function zx({data:e,isConnectable:t,targetPosition:n=fe.Top}){return T.jsxs(T.Fragment,{children:[T.jsx(yt,{type:"target",position:n,isConnectable:t}),e?.label]})}const hi={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Wc={input:Lx,default:Fx,output:zx,group:Bx};function Vx(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}const Hx=e=>{const{width:t,height:n,x:o,y:r}=pr(e.nodeLookup,{filter:i=>!!i.selected});return{width:Ot(t)?t:null,height:Ot(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${r}px)`}};function Wx({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const o=He(),{width:r,height:i,transformString:a,userSelectionActive:l}=Ce(Hx,Ve),c=Qf(),u=F.useRef(null);if(F.useEffect(()=>{n||u.current?.focus({preventScroll:!0})},[n]),Zf({nodeRef:u}),l||!r||!i)return null;const d=e?p=>{const h=o.getState().nodes.filter(g=>g.selected);e(p,h)}:void 0,f=p=>{Object.prototype.hasOwnProperty.call(hi,p.key)&&(p.preventDefault(),c({direction:hi[p.key],factor:p.shiftKey?4:1}))};return T.jsx("div",{className:Je(["react-flow__nodesselection","react-flow__container",t]),style:{transform:a},children:T.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:r,height:i}})})}const Uc=typeof window<"u"?window:void 0,Ux=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function ep({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:a,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:d,selectionMode:f,onSelectionStart:p,onSelectionEnd:h,multiSelectionKeyCode:g,panActivationKeyCode:m,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:C,zoomOnPinch:y,panOnScroll:x,panOnScrollSpeed:w,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:R,defaultViewport:_,translateExtent:V,minZoom:I,maxZoom:S,preventScrolling:A,onSelectionContextMenu:N,noWheelClassName:O,noPanClassName:P,disableKeyboardA11y:L,onViewportChange:M,isControlledViewport:j}){const{nodesSelectionActive:$,userSelectionActive:B}=Ce(Ux,Ve),H=nr(u,{target:Uc}),U=nr(m,{target:Uc}),W=U||R,K=U||x,Q=d&&W!==!0,ee=H||B||Q;return Tx({deleteKeyCode:c,multiSelectionKeyCode:g}),T.jsx(Ox,{onPaneContextMenu:i,elementsSelectable:b,zoomOnScroll:C,zoomOnPinch:y,panOnScroll:K,panOnScrollSpeed:w,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:!H&&W,defaultViewport:_,translateExtent:V,minZoom:I,maxZoom:S,zoomActivationKeyCode:v,preventScrolling:A,noWheelClassName:O,noPanClassName:P,onViewportChange:M,isControlledViewport:j,paneClickDistance:l,selectionOnDrag:Q,children:T.jsxs(Ix,{onSelectionStart:p,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:W,isSelecting:!!ee,selectionMode:f,selectionKeyPressed:H,paneClickDistance:l,selectionOnDrag:Q,children:[e,$&&T.jsx(Wx,{onSelectionContextMenu:N,noPanClassName:P,disableKeyboardA11y:L})]})})}ep.displayName="FlowRenderer";const qx=F.memo(ep),Yx=e=>t=>e?Ua(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function Gx(e){return Ce(F.useCallback(Yx(e),[e]),Ve)}const Kx=e=>e.updateNodeInternals;function Xx(){const e=Ce(Kx),[t]=F.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const o=new Map;n.forEach(r=>{const i=r.target.getAttribute("data-id");o.set(i,{id:i,nodeElement:r.target,force:!0})}),e(o)}));return F.useEffect(()=>()=>{t?.disconnect()},[t]),t}function Zx({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){const r=He(),i=F.useRef(null),a=F.useRef(null),l=F.useRef(e.sourcePosition),c=F.useRef(e.targetPosition),u=F.useRef(t),d=n&&!!e.internals.handleBounds;return F.useEffect(()=>{i.current&&!e.hidden&&(!d||a.current!==i.current)&&(a.current&&o?.unobserve(a.current),o?.observe(i.current),a.current=i.current)},[d,e.hidden]),F.useEffect(()=>()=>{a.current&&(o?.unobserve(a.current),a.current=null)},[]),F.useEffect(()=>{if(i.current){const f=u.current!==t,p=l.current!==e.sourcePosition,h=c.current!==e.targetPosition;(f||p||h)&&(u.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function Qx({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:r,onContextMenu:i,onDoubleClick:a,nodesDraggable:l,elementsSelectable:c,nodesConnectable:u,nodesFocusable:d,resizeObserver:f,noDragClassName:p,noPanClassName:h,disableKeyboardA11y:g,rfId:m,nodeTypes:v,nodeClickDistance:b,onError:C}){const{node:y,internals:x,isParent:w}=Ce(q=>{const J=q.nodeLookup.get(e),Z=q.parentLookup.has(e);return{node:J,internals:J.internals,isParent:Z}},Ve);let E=y.type||"default",k=v?.[E]||Wc[E];k===void 0&&(C?.("003",lt.error003(E)),E="default",k=v?.default||Wc.default);const R=!!(y.draggable||l&&typeof y.draggable>"u"),_=!!(y.selectable||c&&typeof y.selectable>"u"),V=!!(y.connectable||u&&typeof y.connectable>"u"),I=!!(y.focusable||d&&typeof y.focusable>"u"),S=He(),A=Ya(y),N=Zx({node:y,nodeType:E,hasDimensions:A,resizeObserver:f}),O=Zf({nodeRef:N,disabled:y.hidden||!R,noDragClassName:p,handleSelector:y.dragHandle,nodeId:e,isSelectable:_,nodeClickDistance:b}),P=Qf();if(y.hidden)return null;const L=Qt(y),M=Vx(y),j=_||R||t||n||o||r,$=n?q=>n(q,{...x.userNode}):void 0,B=o?q=>o(q,{...x.userNode}):void 0,H=r?q=>r(q,{...x.userNode}):void 0,U=i?q=>i(q,{...x.userNode}):void 0,W=a?q=>a(q,{...x.userNode}):void 0,K=q=>{const{selectNodesOnDrag:J,nodeDragThreshold:Z}=S.getState();_&&(!J||!R||Z>0)&&pa({id:e,store:S,nodeRef:N}),t&&t(q,{...x.userNode})},Q=q=>{if(!(Cf(q.nativeEvent)||g)){if(pf.includes(q.key)&&_){const J=q.key==="Escape";pa({id:e,store:S,unselect:J,nodeRef:N})}else if(R&&y.selected&&Object.prototype.hasOwnProperty.call(hi,q.key)){q.preventDefault();const{ariaLabelConfig:J}=S.getState();S.setState({ariaLiveMessage:J["node.a11yDescription.ariaLiveMessage"]({direction:q.key.replace("Arrow","").toLowerCase(),x:~~x.positionAbsolute.x,y:~~x.positionAbsolute.y})}),P({direction:hi[q.key],factor:q.shiftKey?4:1})}}},ee=()=>{if(g||!N.current?.matches(":focus-visible"))return;const{transform:q,width:J,height:Z,autoPanOnNodeFocus:ne,setCenter:z}=S.getState();if(!ne)return;Ua(new Map([[e,y]]),{x:0,y:0,width:J,height:Z},q,!0).length>0||z(y.position.x+L.width/2,y.position.y+L.height/2,{zoom:q[2]})};return T.jsx("div",{className:Je(["react-flow__node",`react-flow__node-${E}`,{[h]:R},y.className,{selected:y.selected,selectable:_,parent:w,draggable:R,dragging:O}]),ref:N,style:{zIndex:x.z,transform:`translate(${x.positionAbsolute.x}px,${x.positionAbsolute.y}px)`,pointerEvents:j?"all":"none",visibility:A?"visible":"hidden",...y.style,...M},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:$,onMouseMove:B,onMouseLeave:H,onContextMenu:U,onClick:K,onDoubleClick:W,onKeyDown:I?Q:void 0,tabIndex:I?0:void 0,onFocus:I?ee:void 0,role:y.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${Uf}-${m}`,"aria-label":y.ariaLabel,...y.domAttributes,children:T.jsx($x,{value:e,children:T.jsx(k,{id:e,data:y.data,type:E,positionAbsoluteX:x.positionAbsolute.x,positionAbsoluteY:x.positionAbsolute.y,selected:y.selected??!1,selectable:_,draggable:R,deletable:y.deletable??!0,isConnectable:V,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:O,dragHandle:y.dragHandle,zIndex:x.z,parentId:y.parentId,...L})})})}var Jx=F.memo(Qx);const ew=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function tp(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,onError:i}=Ce(ew,Ve),a=Gx(e.onlyRenderVisibleElements),l=Xx();return T.jsx("div",{className:"react-flow__nodes",style:zi,children:a.map(c=>T.jsx(Jx,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},c))})}tp.displayName="NodeRenderer";const tw=F.memo(tp);function nw(e){return Ce(F.useCallback(n=>{if(!e)return n.edges.map(r=>r.id);const o=[];if(n.width&&n.height)for(const r of n.edges){const i=n.nodeLookup.get(r.source),a=n.nodeLookup.get(r.target);i&&a&&J0({sourceNode:i,targetNode:a,width:n.width,height:n.height,transform:n.transform})&&o.push(r.id)}return o},[e]),Ve)}const ow=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return T.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},rw=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return T.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},qc={[Jo.Arrow]:ow,[Jo.ArrowClosed]:rw};function iw(e){const t=He();return F.useMemo(()=>Object.prototype.hasOwnProperty.call(qc,e)?qc[e]:(t.getState().onError?.("009",lt.error009(e)),null),[e])}const sw=({id:e,type:t,color:n,width:o=12.5,height:r=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:l="auto-start-reverse"})=>{const c=iw(t);return c?T.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0",children:T.jsx(c,{color:n,strokeWidth:a})}):null},np=({defaultColor:e,rfId:t})=>{const n=Ce(i=>i.edges),o=Ce(i=>i.defaultEdgeOptions),r=F.useMemo(()=>av(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return r.length?T.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:T.jsx("defs",{children:r.map(i=>T.jsx(sw,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};np.displayName="MarkerDefinitions";var aw=F.memo(np);function op({x:e,y:t,label:n,labelStyle:o,labelShowBg:r=!0,labelBgStyle:i,labelBgPadding:a=[2,4],labelBgBorderRadius:l=2,children:c,className:u,...d}){const[f,p]=F.useState({x:1,y:0,width:0,height:0}),h=Je(["react-flow__edge-textwrapper",u]),g=F.useRef(null);return F.useEffect(()=>{if(g.current){const m=g.current.getBBox();p({x:m.x,y:m.y,width:m.width,height:m.height})}},[n]),n?T.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:h,visibility:f.width?"visible":"hidden",...d,children:[r&&T.jsx("rect",{width:f.width+2*a[0],x:-a[0],y:-a[1],height:f.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),T.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:g,style:o,children:n}),c]}):null}op.displayName="EdgeText";const lw=F.memo(op);function gr({path:e,labelX:t,labelY:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...d}){return T.jsxs(T.Fragment,{children:[T.jsx("path",{...d,d:e,fill:"none",className:Je(["react-flow__edge-path",d.className])}),u?T.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&Ot(t)&&Ot(n)?T.jsx(lw,{x:t,y:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function Yc({pos:e,x1:t,y1:n,x2:o,y2:r}){return e===fe.Left||e===fe.Right?[.5*(t+o),n]:[t,.5*(n+r)]}function rp({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:i=fe.Top}){const[a,l]=Yc({pos:n,x1:e,y1:t,x2:o,y2:r}),[c,u]=Yc({pos:i,x1:o,y1:r,x2:e,y2:t}),[d,f,p,h]=Nf({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${a},${l} ${c},${u} ${o},${r}`,d,f,p,h]}function ip(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:a,targetPosition:l,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:v,interactionWidth:b})=>{const[C,y,x]=rp({sourceX:n,sourceY:o,sourcePosition:a,targetX:r,targetY:i,targetPosition:l}),w=e.isInternal?void 0:t;return T.jsx(gr,{id:w,path:C,labelX:y,labelY:x,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:v,interactionWidth:b})})}const cw=ip({isInternal:!1}),sp=ip({isInternal:!0});cw.displayName="SimpleBezierEdge";sp.displayName="SimpleBezierEdgeInternal";function ap(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,sourcePosition:h=fe.Bottom,targetPosition:g=fe.Top,markerEnd:m,markerStart:v,pathOptions:b,interactionWidth:C})=>{const[y,x,w]=ca({sourceX:n,sourceY:o,sourcePosition:h,targetX:r,targetY:i,targetPosition:g,borderRadius:b?.borderRadius,offset:b?.offset,stepPosition:b?.stepPosition}),E=e.isInternal?void 0:t;return T.jsx(gr,{id:E,path:y,labelX:x,labelY:w,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:v,interactionWidth:C})})}const lp=ap({isInternal:!1}),cp=ap({isInternal:!0});lp.displayName="SmoothStepEdge";cp.displayName="SmoothStepEdgeInternal";function up(e){return F.memo(({id:t,...n})=>{const o=e.isInternal?void 0:t;return T.jsx(lp,{...n,id:o,pathOptions:F.useMemo(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}const uw=up({isInternal:!1}),dp=up({isInternal:!0});uw.displayName="StepEdge";dp.displayName="StepEdgeInternal";function fp(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:g,interactionWidth:m})=>{const[v,b,C]=Pf({sourceX:n,sourceY:o,targetX:r,targetY:i}),y=e.isInternal?void 0:t;return T.jsx(gr,{id:y,path:v,labelX:b,labelY:C,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:g,interactionWidth:m})})}const dw=fp({isInternal:!1}),pp=fp({isInternal:!0});dw.displayName="StraightEdge";pp.displayName="StraightEdgeInternal";function hp(e){return F.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:a=fe.Bottom,targetPosition:l=fe.Top,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:v,pathOptions:b,interactionWidth:C})=>{const[y,x,w]=Ka({sourceX:n,sourceY:o,sourcePosition:a,targetX:r,targetY:i,targetPosition:l,curvature:b?.curvature}),E=e.isInternal?void 0:t;return T.jsx(gr,{id:E,path:y,labelX:x,labelY:w,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:v,interactionWidth:C})})}const fw=hp({isInternal:!1}),mp=hp({isInternal:!0});fw.displayName="BezierEdge";mp.displayName="BezierEdgeInternal";const Gc={default:mp,straight:pp,step:dp,smoothstep:cp,simplebezier:sp},Kc={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},pw=(e,t,n)=>n===fe.Left?e-t:n===fe.Right?e+t:e,hw=(e,t,n)=>n===fe.Top?e-t:n===fe.Bottom?e+t:e,Xc="react-flow__edgeupdater";function Zc({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:r,onMouseEnter:i,onMouseOut:a,type:l}){return T.jsx("circle",{onMouseDown:r,onMouseEnter:i,onMouseOut:a,className:Je([Xc,`${Xc}-${l}`]),cx:pw(t,o,e),cy:hw(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function mw({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:r,targetX:i,targetY:a,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:f,setReconnecting:p,setUpdateHover:h}){const g=He(),m=(x,w)=>{if(x.button!==0)return;const{autoPanOnConnect:E,domNode:k,isValidConnection:R,connectionMode:_,connectionRadius:V,lib:I,onConnectStart:S,onConnectEnd:A,cancelConnection:N,nodeLookup:O,rfId:P,panBy:L,updateConnection:M}=g.getState(),j=w.type==="target",$=(U,W)=>{p(!1),f?.(U,n,w.type,W)},B=U=>u?.(n,U),H=(U,W)=>{p(!0),d?.(x,n,w.type),S?.(U,W)};fa.onPointerDown(x.nativeEvent,{autoPanOnConnect:E,connectionMode:_,connectionRadius:V,domNode:k,handleId:w.id,nodeId:w.nodeId,nodeLookup:O,isTarget:j,edgeUpdaterType:w.type,lib:I,flowId:P,cancelConnection:N,panBy:L,isValidConnection:R,onConnect:B,onConnectStart:H,onConnectEnd:A,onReconnectEnd:$,updateConnection:M,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNode:x.currentTarget})},v=x=>m(x,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),b=x=>m(x,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),C=()=>h(!0),y=()=>h(!1);return T.jsxs(T.Fragment,{children:[(e===!0||e==="source")&&T.jsx(Zc,{position:l,centerX:o,centerY:r,radius:t,onMouseDown:v,onMouseEnter:C,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&T.jsx(Zc,{position:c,centerX:i,centerY:a,radius:t,onMouseDown:b,onMouseEnter:C,onMouseOut:y,type:"target"})]})}function gw({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:r,onDoubleClick:i,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:h,rfId:g,edgeTypes:m,noPanClassName:v,onError:b,disableKeyboardA11y:C}){let y=Ce(z=>z.edgeLookup.get(e));const x=Ce(z=>z.defaultEdgeOptions);y=x?{...x,...y}:y;let w=y.type||"default",E=m?.[w]||Gc[w];E===void 0&&(b?.("011",lt.error011(w)),w="default",E=m?.default||Gc.default);const k=!!(y.focusable||t&&typeof y.focusable>"u"),R=typeof f<"u"&&(y.reconnectable||n&&typeof y.reconnectable>"u"),_=!!(y.selectable||o&&typeof y.selectable>"u"),V=F.useRef(null),[I,S]=F.useState(!1),[A,N]=F.useState(!1),O=He(),{zIndex:P,sourceX:L,sourceY:M,targetX:j,targetY:$,sourcePosition:B,targetPosition:H}=Ce(F.useCallback(z=>{const ae=z.nodeLookup.get(y.source),se=z.nodeLookup.get(y.target);if(!ae||!se)return{zIndex:y.zIndex,...Kc};const de=sv({id:e,sourceNode:ae,targetNode:se,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:z.connectionMode,onError:b});return{zIndex:Q0({selected:y.selected,zIndex:y.zIndex,sourceNode:ae,targetNode:se,elevateOnSelect:z.elevateEdgesOnSelect,zIndexMode:z.zIndexMode}),...de||Kc}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),Ve),U=F.useMemo(()=>y.markerStart?`url('#${ua(y.markerStart,g)}')`:void 0,[y.markerStart,g]),W=F.useMemo(()=>y.markerEnd?`url('#${ua(y.markerEnd,g)}')`:void 0,[y.markerEnd,g]);if(y.hidden||L===null||M===null||j===null||$===null)return null;const K=z=>{const{addSelectedEdges:ae,unselectNodesAndEdges:se,multiSelectionActive:de}=O.getState();_&&(O.setState({nodesSelectionActive:!1}),y.selected&&de?(se({nodes:[],edges:[y]}),V.current?.blur()):ae([e])),r&&r(z,y)},Q=i?z=>{i(z,{...y})}:void 0,ee=a?z=>{a(z,{...y})}:void 0,q=l?z=>{l(z,{...y})}:void 0,J=c?z=>{c(z,{...y})}:void 0,Z=u?z=>{u(z,{...y})}:void 0,ne=z=>{if(!C&&pf.includes(z.key)&&_){const{unselectNodesAndEdges:ae,addSelectedEdges:se}=O.getState();z.key==="Escape"?(V.current?.blur(),ae({edges:[y]})):se([e])}};return T.jsx("svg",{style:{zIndex:P},children:T.jsxs("g",{className:Je(["react-flow__edge",`react-flow__edge-${w}`,y.className,v,{selected:y.selected,animated:y.animated,inactive:!_&&!r,updating:I,selectable:_}]),onClick:K,onDoubleClick:Q,onContextMenu:ee,onMouseEnter:q,onMouseMove:J,onMouseLeave:Z,onKeyDown:k?ne:void 0,tabIndex:k?0:void 0,role:y.ariaRole??(k?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":k?`${qf}-${g}`:void 0,ref:V,...y.domAttributes,children:[!A&&T.jsx(E,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:_,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:L,sourceY:M,targetX:j,targetY:$,sourcePosition:B,targetPosition:H,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:U,markerEnd:W,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),R&&T.jsx(mw,{edge:y,isReconnectable:R,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:h,sourceX:L,sourceY:M,targetX:j,targetY:$,sourcePosition:B,targetPosition:H,setUpdateHover:S,setReconnecting:N})]})})}var yw=F.memo(gw);const bw=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function gp({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:r,onReconnect:i,onEdgeContextMenu:a,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:h,onReconnectEnd:g,disableKeyboardA11y:m}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:C,onError:y}=Ce(bw,Ve),x=nw(t);return T.jsxs("div",{className:"react-flow__edges",children:[T.jsx(aw,{defaultColor:e,rfId:n}),x.map(w=>T.jsx(yw,{id:w,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:C,noPanClassName:r,onReconnect:i,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,reconnectRadius:f,onDoubleClick:p,onReconnectStart:h,onReconnectEnd:g,rfId:n,onError:y,edgeTypes:o,disableKeyboardA11y:m},w))]})}gp.displayName="EdgeRenderer";const vw=F.memo(gp),xw=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function ww({children:e}){const t=Ce(xw);return T.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function Sw(e){const t=Bi(),n=F.useRef(!1);F.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const Ew=e=>e.panZoom?.syncViewport;function Cw(e){const t=Ce(Ew),n=He();return F.useEffect(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Tw(e){return e.connection.inProgress?{...e.connection,to:mr(e.connection.to,e.transform)}:{...e.connection}}function Nw(e){return Tw}function kw(e){const t=Nw();return Ce(t,Ve)}const Ow=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Pw({containerStyle:e,style:t,type:n,component:o}){const{nodesConnectable:r,width:i,height:a,isValid:l,inProgress:c}=Ce(Ow,Ve);return!(i&&r&&c)?null:T.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:T.jsx("g",{className:Je(["react-flow__connection",gf(l)]),children:T.jsx(yp,{style:t,type:n,CustomComponent:o,isValid:l})})})}const yp=({style:e,type:t=nn.Bezier,CustomComponent:n,isValid:o})=>{const{inProgress:r,from:i,fromNode:a,fromHandle:l,fromPosition:c,to:u,toNode:d,toHandle:f,toPosition:p,pointer:h}=kw();if(!r)return;if(n)return T.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:a,fromHandle:l,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:p,connectionStatus:gf(o),toNode:d,toHandle:f,pointer:h});let g="";const m={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:p};switch(t){case nn.Bezier:[g]=Ka(m);break;case nn.SimpleBezier:[g]=rp(m);break;case nn.Step:[g]=ca({...m,borderRadius:0});break;case nn.SmoothStep:[g]=ca(m);break;default:[g]=Pf(m)}return T.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};yp.displayName="ConnectionLine";const Rw={};function Qc(e=Rw){const t=F.useRef(e),n=He();F.useEffect(()=>{if(process.env.NODE_ENV==="development"){const o=new Set([...Object.keys(t.current),...Object.keys(e)]);for(const r of o)if(t.current[r]!==e[r]){n.getState().onError?.("002",lt.error002());break}t.current=e}},[e])}function _w(){const e=He(),t=F.useRef(!1);F.useEffect(()=>{if(process.env.NODE_ENV==="development"&&!t.current){const n=document.querySelector(".react-flow__pane");n&&window.getComputedStyle(n).zIndex!=="1"&&e.getState().onError?.("013",lt.error013("react")),t.current=!0}},[])}function bp({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:r,onNodeDoubleClick:i,onEdgeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:h,connectionLineType:g,connectionLineStyle:m,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:C,selectionOnDrag:y,selectionMode:x,multiSelectionKeyCode:w,panActivationKeyCode:E,zoomActivationKeyCode:k,deleteKeyCode:R,onlyRenderVisibleElements:_,elementsSelectable:V,defaultViewport:I,translateExtent:S,minZoom:A,maxZoom:N,preventScrolling:O,defaultMarkerColor:P,zoomOnScroll:L,zoomOnPinch:M,panOnScroll:j,panOnScrollSpeed:$,panOnScrollMode:B,zoomOnDoubleClick:H,panOnDrag:U,onPaneClick:W,onPaneMouseEnter:K,onPaneMouseMove:Q,onPaneMouseLeave:ee,onPaneScroll:q,onPaneContextMenu:J,paneClickDistance:Z,nodeClickDistance:ne,onEdgeContextMenu:z,onEdgeMouseEnter:ae,onEdgeMouseMove:se,onEdgeMouseLeave:de,reconnectRadius:we,onReconnect:Te,onReconnectStart:G,onReconnectEnd:X,noDragClassName:te,noWheelClassName:re,noPanClassName:oe,disableKeyboardA11y:ce,nodeExtent:ie,rfId:ge,viewport:he,onViewportChange:ue}){return Qc(e),Qc(t),_w(),Sw(n),Cw(he),T.jsx(qx,{onPaneClick:W,onPaneMouseEnter:K,onPaneMouseMove:Q,onPaneMouseLeave:ee,onPaneContextMenu:J,onPaneScroll:q,paneClickDistance:Z,deleteKeyCode:R,selectionKeyCode:C,selectionOnDrag:y,selectionMode:x,onSelectionStart:p,onSelectionEnd:h,multiSelectionKeyCode:w,panActivationKeyCode:E,zoomActivationKeyCode:k,elementsSelectable:V,zoomOnScroll:L,zoomOnPinch:M,zoomOnDoubleClick:H,panOnScroll:j,panOnScrollSpeed:$,panOnScrollMode:B,panOnDrag:U,defaultViewport:I,translateExtent:S,minZoom:A,maxZoom:N,onSelectionContextMenu:f,preventScrolling:O,noDragClassName:te,noWheelClassName:re,noPanClassName:oe,disableKeyboardA11y:ce,onViewportChange:ue,isControlledViewport:!!he,children:T.jsxs(ww,{children:[T.jsx(vw,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:a,onReconnect:Te,onReconnectStart:G,onReconnectEnd:X,onlyRenderVisibleElements:_,onEdgeContextMenu:z,onEdgeMouseEnter:ae,onEdgeMouseMove:se,onEdgeMouseLeave:de,reconnectRadius:we,defaultMarkerColor:P,noPanClassName:oe,disableKeyboardA11y:ce,rfId:ge}),T.jsx(Pw,{style:m,type:g,component:v,containerStyle:b}),T.jsx("div",{className:"react-flow__edgelabel-renderer"}),T.jsx(tw,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:ne,onlyRenderVisibleElements:_,noPanClassName:oe,noDragClassName:te,disableKeyboardA11y:ce,nodeExtent:ie,rfId:ge}),T.jsx("div",{className:"react-flow__viewport-portal"})]})})}bp.displayName="GraphView";const Iw=F.memo(bp),Jc=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:a,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:f,zIndexMode:p="basic"}={})=>{const h=new Map,g=new Map,m=new Map,v=new Map,b=o??t??[],C=n??e??[],y=d??[0,0],x=f??Zo;If(m,v,b);const w=da(C,h,g,{nodeOrigin:y,nodeExtent:x,zIndexMode:p});let E=[0,0,1];if(a&&r&&i){const k=pr(h,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:R,y:_,zoom:V}=qa(k,r,i,c,u,l?.padding??.1);E=[R,_,V]}return{rfId:"1",width:r??0,height:i??0,transform:E,nodes:C,nodesInitialized:w,nodeLookup:h,parentLookup:g,edges:b,edgeLookup:v,connectionLookup:m,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:Zo,nodeExtent:x,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:to.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:l,fitViewResolver:null,connection:{...mf},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:fi,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:hf,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Mw=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p})=>Zv((h,g)=>{async function m(){const{nodeLookup:v,panZoom:b,fitViewOptions:C,fitViewResolver:y,width:x,height:w,minZoom:E,maxZoom:k}=g();b&&(await U0({nodes:v,width:x,height:w,panZoom:b,minZoom:E,maxZoom:k},C),y?.resolve(!0),h({fitViewResolver:null}))}return{...Jc({nodes:e,edges:t,width:r,height:i,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,defaultNodes:n,defaultEdges:o,zIndexMode:p}),setNodes:v=>{const{nodeLookup:b,parentLookup:C,nodeOrigin:y,elevateNodesOnSelect:x,fitViewQueued:w,zIndexMode:E}=g(),k=da(v,b,C,{nodeOrigin:y,nodeExtent:f,elevateNodesOnSelect:x,checkEquality:!0,zIndexMode:E});w&&k?(m(),h({nodes:v,nodesInitialized:k,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:v,nodesInitialized:k})},setEdges:v=>{const{connectionLookup:b,edgeLookup:C}=g();If(b,C,v),h({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:C}=g();C(v),h({hasDefaultNodes:!0})}if(b){const{setEdges:C}=g();C(b),h({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:C,parentLookup:y,domNode:x,nodeOrigin:w,nodeExtent:E,debug:k,fitViewQueued:R,zIndexMode:_}=g(),{changes:V,updatedInternals:I}=hv(v,C,y,x,w,E,_);I&&(uv(C,y,{nodeOrigin:w,nodeExtent:E,zIndexMode:_}),R?(m(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),V?.length>0&&(k&&console.log("React Flow: trigger node changes",V),b?.(V)))},updateNodePositions:(v,b=!1)=>{const C=[];let y=[];const{nodeLookup:x,triggerNodeChanges:w,connection:E,updateConnection:k,onNodesChangeMiddlewareMap:R}=g();for(const[_,V]of v){const I=x.get(_),S=!!(I?.expandParent&&I?.parentId&&V?.position),A={id:_,type:"position",position:S?{x:Math.max(0,V.position.x),y:Math.max(0,V.position.y)}:V.position,dragging:b};if(I&&E.inProgress&&E.fromNode.id===I.id){const N=Pn(I,E.fromHandle,fe.Left,!0);k({...E,from:N})}S&&I.parentId&&C.push({id:_,parentId:I.parentId,rect:{...V.internals.positionAbsolute,width:V.measured.width??0,height:V.measured.height??0}}),y.push(A)}if(C.length>0){const{parentLookup:_,nodeOrigin:V}=g(),I=el(C,x,_,V);y.push(...I)}for(const _ of R.values())y=_(y);w(y)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:C,nodes:y,hasDefaultNodes:x,debug:w}=g();if(v?.length){if(x){const E=tl(v,y);C(E)}w&&console.log("React Flow: trigger node changes",v),b?.(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:C,edges:y,hasDefaultEdges:x,debug:w}=g();if(v?.length){if(x){const E=nl(v,y);C(E)}w&&console.log("React Flow: trigger edge changes",v),b?.(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:C,nodeLookup:y,triggerNodeChanges:x,triggerEdgeChanges:w}=g();if(b){const E=v.map(k=>mn(k,!0));x(E);return}x(qn(y,new Set([...v]),!0)),w(qn(C))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:C,nodeLookup:y,triggerNodeChanges:x,triggerEdgeChanges:w}=g();if(b){const E=v.map(k=>mn(k,!0));w(E);return}w(qn(C,new Set([...v]))),x(qn(y,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:C,nodes:y,nodeLookup:x,triggerNodeChanges:w,triggerEdgeChanges:E}=g(),k=v||y,R=b||C,_=k.map(I=>{const S=x.get(I.id);return S&&(S.selected=!1),mn(I.id,!1)}),V=R.map(I=>mn(I.id,!1));w(_),E(V)},setMinZoom:v=>{const{panZoom:b,maxZoom:C}=g();b?.setScaleExtent([v,C]),h({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:C}=g();b?.setScaleExtent([C,v]),h({maxZoom:v})},setTranslateExtent:v=>{g().panZoom?.setTranslateExtent(v),h({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:C,triggerEdgeChanges:y,elementsSelectable:x}=g();if(!x)return;const w=b.reduce((k,R)=>R.selected?[...k,mn(R.id,!1)]:k,[]),E=v.reduce((k,R)=>R.selected?[...k,mn(R.id,!1)]:k,[]);C(w),y(E)},setNodeExtent:v=>{const{nodes:b,nodeLookup:C,parentLookup:y,nodeOrigin:x,elevateNodesOnSelect:w,nodeExtent:E,zIndexMode:k}=g();v[0][0]===E[0][0]&&v[0][1]===E[0][1]&&v[1][0]===E[1][0]&&v[1][1]===E[1][1]||(da(b,C,y,{nodeOrigin:x,nodeExtent:v,elevateNodesOnSelect:w,checkEquality:!1,zIndexMode:k}),h({nodeExtent:v}))},panBy:v=>{const{transform:b,width:C,height:y,panZoom:x,translateExtent:w}=g();return mv({delta:v,panZoom:x,transform:b,translateExtent:w,width:C,height:y})},setCenter:async(v,b,C)=>{const{width:y,height:x,maxZoom:w,panZoom:E}=g();if(!E)return Promise.resolve(!1);const k=typeof C?.zoom<"u"?C.zoom:w;return await E.setViewport({x:y/2-v*k,y:x/2-b*k,zoom:k},{duration:C?.duration,ease:C?.ease,interpolate:C?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...mf}})},updateConnection:v=>{h({connection:v})},reset:()=>h({...Jc()})}},Object.is);function vp({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:r,initialHeight:i,initialMinZoom:a,initialMaxZoom:l,initialFitViewOptions:c,fitView:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:h}){const[g]=F.useState(()=>Mw({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:u,minZoom:a,maxZoom:l,fitViewOptions:c,nodeOrigin:d,nodeExtent:f,zIndexMode:p}));return T.jsx(Qv,{value:g,children:T.jsx(wx,{children:h})})}function $w({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:r,width:i,height:a,fitView:l,fitViewOptions:c,minZoom:u,maxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:h}){return F.useContext(Li)?T.jsx(T.Fragment,{children:e}):T.jsx(vp,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:r,initialWidth:i,initialHeight:a,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:h,children:e})}const Aw={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Dw({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:r,nodeTypes:i,edgeTypes:a,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:h,onConnectStart:g,onConnectEnd:m,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:C,onNodeMouseMove:y,onNodeMouseLeave:x,onNodeContextMenu:w,onNodeDoubleClick:E,onNodeDragStart:k,onNodeDrag:R,onNodeDragStop:_,onNodesDelete:V,onEdgesDelete:I,onDelete:S,onSelectionChange:A,onSelectionDragStart:N,onSelectionDrag:O,onSelectionDragStop:P,onSelectionContextMenu:L,onSelectionStart:M,onSelectionEnd:j,onBeforeDelete:$,connectionMode:B,connectionLineType:H=nn.Bezier,connectionLineStyle:U,connectionLineComponent:W,connectionLineContainerStyle:K,deleteKeyCode:Q="Backspace",selectionKeyCode:ee="Shift",selectionOnDrag:q=!1,selectionMode:J=Qo.Full,panActivationKeyCode:Z="Space",multiSelectionKeyCode:ne=tr()?"Meta":"Control",zoomActivationKeyCode:z=tr()?"Meta":"Control",snapToGrid:ae,snapGrid:se,onlyRenderVisibleElements:de=!1,selectNodesOnDrag:we,nodesDraggable:Te,autoPanOnNodeFocus:G,nodesConnectable:X,nodesFocusable:te,nodeOrigin:re=Yf,edgesFocusable:oe,edgesReconnectable:ce,elementsSelectable:ie=!0,defaultViewport:ge=dx,minZoom:he=.5,maxZoom:ue=2,translateExtent:ve=Zo,preventScrolling:qe=!0,nodeExtent:Xe,defaultMarkerColor:ye="#b1b1b7",zoomOnScroll:Se=!0,zoomOnPinch:xe=!0,panOnScroll:Ze=!1,panOnScrollSpeed:ft=.5,panOnScrollMode:xo=Cn.Free,zoomOnDoubleClick:pt=!0,panOnDrag:pe=!0,onPaneClick:Ee,onPaneMouseEnter:et,onPaneMouseMove:Jt,onPaneMouseLeave:Nr,onPaneScroll:ym,onPaneContextMenu:bm,paneClickDistance:vm=1,nodeClickDistance:xm=0,children:wm,onReconnect:Sm,onReconnectStart:Em,onReconnectEnd:Cm,onEdgeContextMenu:Tm,onEdgeDoubleClick:Nm,onEdgeMouseEnter:km,onEdgeMouseMove:Om,onEdgeMouseLeave:Pm,reconnectRadius:Rm=10,onNodesChange:_m,onEdgesChange:Im,noDragClassName:Mm="nodrag",noWheelClassName:$m="nowheel",noPanClassName:Ll="nopan",fitView:Fl,fitViewOptions:Bl,connectOnClick:Am,attributionPosition:Dm,proOptions:jm,defaultEdgeOptions:Lm,elevateNodesOnSelect:Fm=!0,elevateEdgesOnSelect:Bm=!1,disableKeyboardA11y:zl=!1,autoPanOnConnect:zm,autoPanOnNodeDrag:Vm,autoPanSpeed:Hm,connectionRadius:Wm,isValidConnection:Um,onError:qm,style:Ym,id:Vl,nodeDragThreshold:Gm,connectionDragThreshold:Km,viewport:Xm,onViewportChange:Zm,width:Qm,height:Jm,colorMode:eg="light",debug:tg,onScroll:Hl,ariaLabelConfig:ng,zIndexMode:Wl="basic",...og},rg){const xs=Vl||"1",ig=mx(eg),sg=F.useCallback(Ul=>{Ul.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Hl?.(Ul)},[Hl]);return T.jsx("div",{"data-testid":"rf__wrapper",...og,onScroll:sg,style:{...Ym,...Aw},ref:rg,className:Je(["react-flow",r,ig]),id:Vl,role:"application",children:T.jsxs($w,{nodes:e,edges:t,width:Qm,height:Jm,fitView:Fl,fitViewOptions:Bl,minZoom:he,maxZoom:ue,nodeOrigin:re,nodeExtent:Xe,zIndexMode:Wl,children:[T.jsx(Iw,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:C,onNodeMouseMove:y,onNodeMouseLeave:x,onNodeContextMenu:w,onNodeDoubleClick:E,nodeTypes:i,edgeTypes:a,connectionLineType:H,connectionLineStyle:U,connectionLineComponent:W,connectionLineContainerStyle:K,selectionKeyCode:ee,selectionOnDrag:q,selectionMode:J,deleteKeyCode:Q,multiSelectionKeyCode:ne,panActivationKeyCode:Z,zoomActivationKeyCode:z,onlyRenderVisibleElements:de,defaultViewport:ge,translateExtent:ve,minZoom:he,maxZoom:ue,preventScrolling:qe,zoomOnScroll:Se,zoomOnPinch:xe,zoomOnDoubleClick:pt,panOnScroll:Ze,panOnScrollSpeed:ft,panOnScrollMode:xo,panOnDrag:pe,onPaneClick:Ee,onPaneMouseEnter:et,onPaneMouseMove:Jt,onPaneMouseLeave:Nr,onPaneScroll:ym,onPaneContextMenu:bm,paneClickDistance:vm,nodeClickDistance:xm,onSelectionContextMenu:L,onSelectionStart:M,onSelectionEnd:j,onReconnect:Sm,onReconnectStart:Em,onReconnectEnd:Cm,onEdgeContextMenu:Tm,onEdgeDoubleClick:Nm,onEdgeMouseEnter:km,onEdgeMouseMove:Om,onEdgeMouseLeave:Pm,reconnectRadius:Rm,defaultMarkerColor:ye,noDragClassName:Mm,noWheelClassName:$m,noPanClassName:Ll,rfId:xs,disableKeyboardA11y:zl,nodeExtent:Xe,viewport:Xm,onViewportChange:Zm}),T.jsx(hx,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:h,onConnectStart:g,onConnectEnd:m,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:Te,autoPanOnNodeFocus:G,nodesConnectable:X,nodesFocusable:te,edgesFocusable:oe,edgesReconnectable:ce,elementsSelectable:ie,elevateNodesOnSelect:Fm,elevateEdgesOnSelect:Bm,minZoom:he,maxZoom:ue,nodeExtent:Xe,onNodesChange:_m,onEdgesChange:Im,snapToGrid:ae,snapGrid:se,connectionMode:B,translateExtent:ve,connectOnClick:Am,defaultEdgeOptions:Lm,fitView:Fl,fitViewOptions:Bl,onNodesDelete:V,onEdgesDelete:I,onDelete:S,onNodeDragStart:k,onNodeDrag:R,onNodeDragStop:_,onSelectionDrag:O,onSelectionDragStart:N,onSelectionDragStop:P,onMove:d,onMoveStart:f,onMoveEnd:p,noPanClassName:Ll,nodeOrigin:re,rfId:xs,autoPanOnConnect:zm,autoPanOnNodeDrag:Vm,autoPanSpeed:Hm,onError:qm,connectionRadius:Wm,isValidConnection:Um,selectNodesOnDrag:we,nodeDragThreshold:Gm,connectionDragThreshold:Km,onBeforeDelete:$,debug:tg,ariaLabelConfig:ng,zIndexMode:Wl}),T.jsx(ux,{onSelectionChange:A}),wm,T.jsx(ix,{proOptions:jm,position:Dm}),T.jsx(rx,{rfId:xs,disableKeyboardA11y:zl})]})})}var jw=Kf(Dw);const Lw=e=>e.domNode?.querySelector(".react-flow__edgelabel-renderer");function Fw({children:e}){const t=Ce(Lw);return t?Wn.createPortal(e,t):null}function Bw(){const e=He();return F.useCallback(t=>{const{domNode:n,updateNodeInternals:o}=e.getState(),r=Array.isArray(t)?t:[t],i=new Map;r.forEach(a=>{const l=n?.querySelector(`.react-flow__node[data-id="${a}"]`);l&&i.set(a,{id:a,nodeElement:l,force:!0})}),requestAnimationFrame(()=>o(i,{triggerFitView:!1}))},[])}const zw=e=>e.nodes;function Vw(){return Ce(zw,Ve)}function Hw(e){const[t,n]=F.useState(e),o=F.useCallback(r=>n(i=>tl(r,i)),[]);return[t,n,o]}function Ww(e){const[t,n]=F.useState(e),o=F.useCallback(r=>n(i=>nl(r,i)),[]);return[t,n,o]}const Uw=e=>t=>{if(!e.includeHiddenNodes)return t.nodesInitialized;if(t.nodeLookup.size===0)return!1;for(const[,{internals:n}]of t.nodeLookup)if(n.handleBounds===void 0||!Ya(n.userNode))return!1;return!0};function qw(e={includeHiddenNodes:!1}){return Ce(Uw(e))}function Yw({dimensions:e,lineWidth:t,variant:n,className:o}){return T.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Je(["react-flow__background-pattern",n,o])})}function Gw({radius:e,className:t}){return T.jsx("circle",{cx:e,cy:e,r:e,className:Je(["react-flow__background-pattern","dots",t])})}var on;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(on||(on={}));const Kw={[on.Dots]:1,[on.Lines]:1,[on.Cross]:6},Xw=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function xp({id:e,variant:t=on.Dots,gap:n=20,size:o,lineWidth:r=1,offset:i=0,color:a,bgColor:l,style:c,className:u,patternClassName:d}){const f=F.useRef(null),{transform:p,patternId:h}=Ce(Xw,Ve),g=o||Kw[t],m=t===on.Dots,v=t===on.Cross,b=Array.isArray(n)?n:[n,n],C=[b[0]*p[2]||1,b[1]*p[2]||1],y=g*p[2],x=Array.isArray(i)?i:[i,i],w=v?[y,y]:C,E=[x[0]*p[2]||1+w[0]/2,x[1]*p[2]||1+w[1]/2],k=`${h}${e||""}`;return T.jsxs("svg",{className:Je(["react-flow__background",u]),style:{...c,...zi,"--xy-background-color-props":l,"--xy-background-pattern-color-props":a},ref:f,"data-testid":"rf__background",children:[T.jsx("pattern",{id:k,x:p[0]%C[0],y:p[1]%C[1],width:C[0],height:C[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:m?T.jsx(Gw,{radius:y/2,className:d}):T.jsx(Yw,{dimensions:w,lineWidth:r,variant:t,className:d})}),T.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${k})`})]})}xp.displayName="Background";const Zw=F.memo(xp);function Qw(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:T.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Jw(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:T.jsx("path",{d:"M0 0h32v4.2H0z"})})}function eS(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:T.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function tS(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:T.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function nS(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:T.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function jr({children:e,className:t,...n}){return T.jsx("button",{type:"button",className:Je(["react-flow__controls-button",t]),...n,children:e})}const oS=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function wp({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:r,onZoomIn:i,onZoomOut:a,onFitView:l,onInteractiveChange:c,className:u,children:d,position:f="bottom-left",orientation:p="vertical","aria-label":h}){const g=He(),{isInteractive:m,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:C}=Ce(oS,Ve),{zoomIn:y,zoomOut:x,fitView:w}=Bi(),E=()=>{y(),i?.()},k=()=>{x(),a?.()},R=()=>{w(r),l?.()},_=()=>{g.setState({nodesDraggable:!m,nodesConnectable:!m,elementsSelectable:!m}),c?.(!m)},V=p==="horizontal"?"horizontal":"vertical";return T.jsxs(Fi,{className:Je(["react-flow__controls",V,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":h??C["controls.ariaLabel"],children:[t&&T.jsxs(T.Fragment,{children:[T.jsx(jr,{onClick:E,className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:b,children:T.jsx(Qw,{})}),T.jsx(jr,{onClick:k,className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:v,children:T.jsx(Jw,{})})]}),n&&T.jsx(jr,{className:"react-flow__controls-fitview",onClick:R,title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:T.jsx(eS,{})}),o&&T.jsx(jr,{className:"react-flow__controls-interactive",onClick:_,title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:m?T.jsx(nS,{}):T.jsx(tS,{})}),d]})}wp.displayName="Controls";const rS=F.memo(wp);function iS({id:e,x:t,y:n,width:o,height:r,style:i,color:a,strokeColor:l,strokeWidth:c,className:u,borderRadius:d,shapeRendering:f,selected:p,onClick:h}){const{background:g,backgroundColor:m}=i||{},v=a||g||m;return T.jsx("rect",{className:Je(["react-flow__minimap-node",{selected:p},u]),x:t,y:n,rx:d,ry:d,width:o,height:r,style:{fill:v,stroke:l,strokeWidth:c},shapeRendering:f,onClick:h?b=>h(b,e):void 0})}const sS=F.memo(iS),aS=e=>e.nodes.map(t=>t.id),Ms=e=>e instanceof Function?e:()=>e;function lS({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:r,nodeComponent:i=sS,onClick:a}){const l=Ce(aS,Ve),c=Ms(t),u=Ms(e),d=Ms(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return T.jsx(T.Fragment,{children:l.map(p=>T.jsx(uS,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:o,nodeStrokeWidth:r,NodeComponent:i,onClick:a,shapeRendering:f},p))})}function cS({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:r,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:l,onClick:c}){const{node:u,x:d,y:f,width:p,height:h}=Ce(g=>{const{internals:m}=g.nodeLookup.get(e),v=m.userNode,{x:b,y:C}=m.positionAbsolute,{width:y,height:x}=Qt(v);return{node:v,x:b,y:C,width:y,height:x}},Ve);return!u||u.hidden||!Ya(u)?null:T.jsx(l,{x:d,y:f,width:p,height:h,style:u.style,selected:!!u.selected,className:o(u),color:t(u),borderRadius:r,strokeColor:n(u),strokeWidth:i,shapeRendering:a,onClick:c,id:u.id})}const uS=F.memo(cS);var dS=F.memo(lS);const fS=200,pS=150,hS=e=>!e.hidden,mS=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?wf(pr(e.nodeLookup,{filter:hS}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},gS="react-flow__minimap-desc";function Sp({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:r="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:l,bgColor:c,maskColor:u,maskStrokeColor:d,maskStrokeWidth:f,position:p="bottom-right",onClick:h,onNodeClick:g,pannable:m=!1,zoomable:v=!1,ariaLabel:b,inversePan:C,zoomStep:y=1,offsetScale:x=5}){const w=He(),E=F.useRef(null),{boundingRect:k,viewBB:R,rfId:_,panZoom:V,translateExtent:I,flowWidth:S,flowHeight:A,ariaLabelConfig:N}=Ce(mS,Ve),O=e?.width??fS,P=e?.height??pS,L=k.width/O,M=k.height/P,j=Math.max(L,M),$=j*O,B=j*P,H=x*j,U=k.x-($-k.width)/2-H,W=k.y-(B-k.height)/2-H,K=$+H*2,Q=B+H*2,ee=`${gS}-${_}`,q=F.useRef(0),J=F.useRef();q.current=j,F.useEffect(()=>{if(E.current&&V)return J.current=Cv({domNode:E.current,panZoom:V,getTransform:()=>w.getState().transform,getViewScale:()=>q.current}),()=>{J.current?.destroy()}},[V]),F.useEffect(()=>{J.current?.update({translateExtent:I,width:S,height:A,inversePan:C,pannable:m,zoomStep:y,zoomable:v})},[m,v,C,y,I,S,A]);const Z=h?ae=>{const[se,de]=J.current?.pointer(ae)||[0,0];h(ae,{x:se,y:de})}:void 0,ne=g?F.useCallback((ae,se)=>{const de=w.getState().nodeLookup.get(se).internals.userNode;g(ae,de)},[]):void 0,z=b??N["minimap.ariaLabel"];return T.jsx(Fi,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*j:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:Je(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:T.jsxs("svg",{width:O,height:P,viewBox:`${U} ${W} ${K} ${Q}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ee,ref:E,onClick:Z,children:[z&&T.jsx("title",{id:ee,children:z}),T.jsx(dS,{onClick:ne,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:r,nodeStrokeWidth:a,nodeComponent:l}),T.jsx("path",{className:"react-flow__minimap-mask",d:`M${U-H},${W-H}h${K+H*2}v${Q+H*2}h${-K-H*2}z
|
|
7
|
+
M${R.x},${R.y}h${R.width}v${R.height}h${-R.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Sp.displayName="MiniMap";F.memo(Sp);const yS=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,bS={[io.Line]:"right",[io.Handle]:"bottom-right"};function vS({nodeId:e,position:t,variant:n=io.Handle,className:o,style:r=void 0,children:i,color:a,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:h=!0,shouldResize:g,onResizeStart:m,onResize:v,onResizeEnd:b}){const C=Jf(),y=typeof e=="string"?e:C,x=He(),w=F.useRef(null),E=n===io.Handle,k=Ce(F.useCallback(yS(E&&h),[E,h]),Ve),R=F.useRef(null),_=t??bS[n];F.useEffect(()=>{if(!(!w.current||!y))return R.current||(R.current=Lv({domNode:w.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:I,transform:S,snapGrid:A,snapToGrid:N,nodeOrigin:O,domNode:P}=x.getState();return{nodeLookup:I,transform:S,snapGrid:A,snapToGrid:N,nodeOrigin:O,paneDomNode:P}},onChange:(I,S)=>{const{triggerNodeChanges:A,nodeLookup:N,parentLookup:O,nodeOrigin:P}=x.getState(),L=[],M={x:I.x,y:I.y},j=N.get(y);if(j&&j.expandParent&&j.parentId){const $=j.origin??P,B=I.width??j.measured.width??0,H=I.height??j.measured.height??0,U={id:j.id,parentId:j.parentId,rect:{width:B,height:H,...Sf({x:I.x??j.position.x,y:I.y??j.position.y},{width:B,height:H},j.parentId,N,$)}},W=el([U],N,O,P);L.push(...W),M.x=I.x?Math.max($[0]*B,I.x):void 0,M.y=I.y?Math.max($[1]*H,I.y):void 0}if(M.x!==void 0&&M.y!==void 0){const $={id:y,type:"position",position:{...M}};L.push($)}if(I.width!==void 0&&I.height!==void 0){const B={id:y,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};L.push(B)}for(const $ of S){const B={...$,type:"position"};L.push(B)}A(L)},onEnd:({width:I,height:S})=>{const A={id:y,type:"dimensions",resizing:!1,dimensions:{width:I,height:S}};x.getState().triggerNodeChanges([A])}})),R.current.update({controlPosition:_,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:f,resizeDirection:p,onResizeStart:m,onResize:v,onResizeEnd:b,shouldResize:g}),()=>{R.current?.destroy()}},[_,l,c,u,d,f,m,v,b,g]);const V=_.split("-");return T.jsx("div",{className:Je(["react-flow__resize-control","nodrag",...V,n,o]),ref:w,style:{...r,scale:k,...a&&{[E?"backgroundColor":"borderColor"]:a}},children:i})}F.memo(vS);const or={black:"#000",white:"#fff"},Dn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},jn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Ln={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Fn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Bn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},Eo={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},xS={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Zt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>n.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Vi="$$material";function mi(){return mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},mi.apply(null,arguments)}function wS(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function SS(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var ES=(function(){function e(n){var o=this;this._insertTag=function(r){var i;o.tags.length===0?o.insertionPoint?i=o.insertionPoint.nextSibling:o.prepend?i=o.container.firstChild:i=o.before:i=o.tags[o.tags.length-1].nextSibling,o.container.insertBefore(r,i),o.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(o){o.forEach(this._insertTag)},t.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(SS(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=wS(r);try{i.insertRule(o,i.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(o));this.ctr++},t.flush=function(){this.tags.forEach(function(o){var r;return(r=o.parentNode)==null?void 0:r.removeChild(o)}),this.tags=[],this.ctr=0},e})(),rt="-ms-",gi="-moz-",Re="-webkit-",Ep="comm",rl="rule",il="decl",CS="@import",Cp="@keyframes",TS="@layer",NS=Math.abs,Hi=String.fromCharCode,kS=Object.assign;function OS(e,t){return ot(e,0)^45?(((t<<2^ot(e,0))<<2^ot(e,1))<<2^ot(e,2))<<2^ot(e,3):0}function Tp(e){return e.trim()}function PS(e,t){return(e=t.exec(e))?e[0]:e}function _e(e,t,n){return e.replace(t,n)}function ha(e,t){return e.indexOf(t)}function ot(e,t){return e.charCodeAt(t)|0}function rr(e,t,n){return e.slice(t,n)}function Ft(e){return e.length}function sl(e){return e.length}function Lr(e,t){return t.push(e),e}function RS(e,t){return e.map(t).join("")}var Wi=1,so=1,Np=0,ut=0,Qe=0,po="";function Ui(e,t,n,o,r,i,a){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:Wi,column:so,length:a,return:""}}function Co(e,t){return kS(Ui("",null,null,"",null,null,0),e,{length:-e.length},t)}function _S(){return Qe}function IS(){return Qe=ut>0?ot(po,--ut):0,so--,Qe===10&&(so=1,Wi--),Qe}function bt(){return Qe=ut<Np?ot(po,ut++):0,so++,Qe===10&&(so=1,Wi++),Qe}function Wt(){return ot(po,ut)}function Qr(){return ut}function yr(e,t){return rr(po,e,t)}function ir(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function kp(e){return Wi=so=1,Np=Ft(po=e),ut=0,[]}function Op(e){return po="",e}function Jr(e){return Tp(yr(ut-1,ma(e===91?e+2:e===40?e+1:e)))}function MS(e){for(;(Qe=Wt())&&Qe<33;)bt();return ir(e)>2||ir(Qe)>3?"":" "}function $S(e,t){for(;--t&&bt()&&!(Qe<48||Qe>102||Qe>57&&Qe<65||Qe>70&&Qe<97););return yr(e,Qr()+(t<6&&Wt()==32&&bt()==32))}function ma(e){for(;bt();)switch(Qe){case e:return ut;case 34:case 39:e!==34&&e!==39&&ma(Qe);break;case 40:e===41&&ma(e);break;case 92:bt();break}return ut}function AS(e,t){for(;bt()&&e+Qe!==57;)if(e+Qe===84&&Wt()===47)break;return"/*"+yr(t,ut-1)+"*"+Hi(e===47?e:bt())}function DS(e){for(;!ir(Wt());)bt();return yr(e,ut)}function jS(e){return Op(ei("",null,null,null,[""],e=kp(e),0,[0],e))}function ei(e,t,n,o,r,i,a,l,c){for(var u=0,d=0,f=a,p=0,h=0,g=0,m=1,v=1,b=1,C=0,y="",x=r,w=i,E=o,k=y;v;)switch(g=C,C=bt()){case 40:if(g!=108&&ot(k,f-1)==58){ha(k+=_e(Jr(C),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:k+=Jr(C);break;case 9:case 10:case 13:case 32:k+=MS(g);break;case 92:k+=$S(Qr()-1,7);continue;case 47:switch(Wt()){case 42:case 47:Lr(LS(AS(bt(),Qr()),t,n),c);break;default:k+="/"}break;case 123*m:l[u++]=Ft(k)*b;case 125*m:case 59:case 0:switch(C){case 0:case 125:v=0;case 59+d:b==-1&&(k=_e(k,/\f/g,"")),h>0&&Ft(k)-f&&Lr(h>32?tu(k+";",o,n,f-1):tu(_e(k," ","")+";",o,n,f-2),c);break;case 59:k+=";";default:if(Lr(E=eu(k,t,n,u,d,r,l,y,x=[],w=[],f),i),C===123)if(d===0)ei(k,t,E,E,x,i,f,l,w);else switch(p===99&&ot(k,3)===110?100:p){case 100:case 108:case 109:case 115:ei(e,E,E,o&&Lr(eu(e,E,E,0,0,r,l,y,r,x=[],f),w),r,w,f,l,o?x:w);break;default:ei(k,E,E,E,[""],w,0,l,w)}}u=d=h=0,m=b=1,y=k="",f=a;break;case 58:f=1+Ft(k),h=g;default:if(m<1){if(C==123)--m;else if(C==125&&m++==0&&IS()==125)continue}switch(k+=Hi(C),C*m){case 38:b=d>0?1:(k+="\f",-1);break;case 44:l[u++]=(Ft(k)-1)*b,b=1;break;case 64:Wt()===45&&(k+=Jr(bt())),p=Wt(),d=f=Ft(y=k+=DS(Qr())),C++;break;case 45:g===45&&Ft(k)==2&&(m=0)}}return i}function eu(e,t,n,o,r,i,a,l,c,u,d){for(var f=r-1,p=r===0?i:[""],h=sl(p),g=0,m=0,v=0;g<o;++g)for(var b=0,C=rr(e,f+1,f=NS(m=a[g])),y=e;b<h;++b)(y=Tp(m>0?p[b]+" "+C:_e(C,/&\f/g,p[b])))&&(c[v++]=y);return Ui(e,t,n,r===0?rl:l,c,u,d)}function LS(e,t,n){return Ui(e,t,n,Ep,Hi(_S()),rr(e,2,-2),0)}function tu(e,t,n,o){return Ui(e,t,n,il,rr(e,0,o),rr(e,o+1,-1),o)}function Xn(e,t){for(var n="",o=sl(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function FS(e,t,n,o){switch(e.type){case TS:if(e.children.length)break;case CS:case il:return e.return=e.return||e.value;case Ep:return"";case Cp:return e.return=e.value+"{"+Xn(e.children,o)+"}";case rl:e.value=e.props.join(",")}return Ft(n=Xn(e.children,o))?e.return=e.value+"{"+n+"}":""}function BS(e){var t=sl(e);return function(n,o,r,i){for(var a="",l=0;l<t;l++)a+=e[l](n,o,r,i)||"";return a}}function zS(e){return function(t){t.root||(t=t.return)&&e(t)}}function Pp(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var VS=function(t,n,o){for(var r=0,i=0;r=i,i=Wt(),r===38&&i===12&&(n[o]=1),!ir(i);)bt();return yr(t,ut)},HS=function(t,n){var o=-1,r=44;do switch(ir(r)){case 0:r===38&&Wt()===12&&(n[o]=1),t[o]+=VS(ut-1,n,o);break;case 2:t[o]+=Jr(r);break;case 4:if(r===44){t[++o]=Wt()===58?"&\f":"",n[o]=t[o].length;break}default:t[o]+=Hi(r)}while(r=bt());return t},WS=function(t,n){return Op(HS(kp(t),n))},nu=new WeakMap,US=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,o=t.parent,r=t.column===o.column&&t.line===o.line;o.type!=="rule";)if(o=o.parent,!o)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!nu.get(o))&&!r){nu.set(t,!0);for(var i=[],a=WS(n,i),l=o.props,c=0,u=0;c<a.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=i[c]?a[c].replace(/&\f/g,l[d]):l[d]+" "+a[c]}}},qS=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Rp(e,t){switch(OS(e,t)){case 5103:return Re+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Re+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Re+e+gi+e+rt+e+e;case 6828:case 4268:return Re+e+rt+e+e;case 6165:return Re+e+rt+"flex-"+e+e;case 5187:return Re+e+_e(e,/(\w+).+(:[^]+)/,Re+"box-$1$2"+rt+"flex-$1$2")+e;case 5443:return Re+e+rt+"flex-item-"+_e(e,/flex-|-self/,"")+e;case 4675:return Re+e+rt+"flex-line-pack"+_e(e,/align-content|flex-|-self/,"")+e;case 5548:return Re+e+rt+_e(e,"shrink","negative")+e;case 5292:return Re+e+rt+_e(e,"basis","preferred-size")+e;case 6060:return Re+"box-"+_e(e,"-grow","")+Re+e+rt+_e(e,"grow","positive")+e;case 4554:return Re+_e(e,/([^-])(transform)/g,"$1"+Re+"$2")+e;case 6187:return _e(_e(_e(e,/(zoom-|grab)/,Re+"$1"),/(image-set)/,Re+"$1"),e,"")+e;case 5495:case 3959:return _e(e,/(image-set\([^]*)/,Re+"$1$`$1");case 4968:return _e(_e(e,/(.+:)(flex-)?(.*)/,Re+"box-pack:$3"+rt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Re+e+e;case 4095:case 3583:case 4068:case 2532:return _e(e,/(.+)-inline(.+)/,Re+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ft(e)-1-t>6)switch(ot(e,t+1)){case 109:if(ot(e,t+4)!==45)break;case 102:return _e(e,/(.+:)(.+)-([^]+)/,"$1"+Re+"$2-$3$1"+gi+(ot(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ha(e,"stretch")?Rp(_e(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ot(e,t+1)!==115)break;case 6444:switch(ot(e,Ft(e)-3-(~ha(e,"!important")&&10))){case 107:return _e(e,":",":"+Re)+e;case 101:return _e(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Re+(ot(e,14)===45?"inline-":"")+"box$3$1"+Re+"$2$3$1"+rt+"$2box$3")+e}break;case 5936:switch(ot(e,t+11)){case 114:return Re+e+rt+_e(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Re+e+rt+_e(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Re+e+rt+_e(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Re+e+rt+e+e}return e}var YS=function(t,n,o,r){if(t.length>-1&&!t.return)switch(t.type){case il:t.return=Rp(t.value,t.length);break;case Cp:return Xn([Co(t,{value:_e(t.value,"@","@"+Re)})],r);case rl:if(t.length)return RS(t.props,function(i){switch(PS(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Xn([Co(t,{props:[_e(i,/:(read-\w+)/,":"+gi+"$1")]})],r);case"::placeholder":return Xn([Co(t,{props:[_e(i,/:(plac\w+)/,":"+Re+"input-$1")]}),Co(t,{props:[_e(i,/:(plac\w+)/,":"+gi+"$1")]}),Co(t,{props:[_e(i,/:(plac\w+)/,rt+"input-$1")]})],r)}return""})}},GS=[YS],KS=function(t){var n=t.key;if(n==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(m){var v=m.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var r=t.stylisPlugins||GS,i={},a,l=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var v=m.getAttribute("data-emotion").split(" "),b=1;b<v.length;b++)i[v[b]]=!0;l.push(m)});var c,u=[US,qS];{var d,f=[FS,zS(function(m){d.insert(m)})],p=BS(u.concat(r,f)),h=function(v){return Xn(jS(v),p)};c=function(v,b,C,y){d=C,h(v?v+"{"+b.styles+"}":b.styles),y&&(g.inserted[b.name]=!0)}}var g={key:n,sheet:new ES({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return g.sheet.hydrate(l),g},Fr={exports:{}},Me={};var ou;function XS(){if(ou)return Me;ou=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(w){if(typeof w=="object"&&w!==null){var E=w.$$typeof;switch(E){case t:switch(w=w.type,w){case c:case u:case o:case i:case r:case f:return w;default:switch(w=w&&w.$$typeof,w){case l:case d:case g:case h:case a:return w;default:return E}}case n:return E}}}function x(w){return y(w)===u}return Me.AsyncMode=c,Me.ConcurrentMode=u,Me.ContextConsumer=l,Me.ContextProvider=a,Me.Element=t,Me.ForwardRef=d,Me.Fragment=o,Me.Lazy=g,Me.Memo=h,Me.Portal=n,Me.Profiler=i,Me.StrictMode=r,Me.Suspense=f,Me.isAsyncMode=function(w){return x(w)||y(w)===c},Me.isConcurrentMode=x,Me.isContextConsumer=function(w){return y(w)===l},Me.isContextProvider=function(w){return y(w)===a},Me.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Me.isForwardRef=function(w){return y(w)===d},Me.isFragment=function(w){return y(w)===o},Me.isLazy=function(w){return y(w)===g},Me.isMemo=function(w){return y(w)===h},Me.isPortal=function(w){return y(w)===n},Me.isProfiler=function(w){return y(w)===i},Me.isStrictMode=function(w){return y(w)===r},Me.isSuspense=function(w){return y(w)===f},Me.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===o||w===u||w===i||w===r||w===f||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===h||w.$$typeof===a||w.$$typeof===l||w.$$typeof===d||w.$$typeof===v||w.$$typeof===b||w.$$typeof===C||w.$$typeof===m)},Me.typeOf=y,Me}var $e={};var ru;function ZS(){return ru||(ru=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(z){return typeof z=="string"||typeof z=="function"||z===o||z===u||z===i||z===r||z===f||z===p||typeof z=="object"&&z!==null&&(z.$$typeof===g||z.$$typeof===h||z.$$typeof===a||z.$$typeof===l||z.$$typeof===d||z.$$typeof===v||z.$$typeof===b||z.$$typeof===C||z.$$typeof===m)}function x(z){if(typeof z=="object"&&z!==null){var ae=z.$$typeof;switch(ae){case t:var se=z.type;switch(se){case c:case u:case o:case i:case r:case f:return se;default:var de=se&&se.$$typeof;switch(de){case l:case d:case g:case h:case a:return de;default:return ae}}case n:return ae}}}var w=c,E=u,k=l,R=a,_=t,V=d,I=o,S=g,A=h,N=n,O=i,P=r,L=f,M=!1;function j(z){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(z)||x(z)===c}function $(z){return x(z)===u}function B(z){return x(z)===l}function H(z){return x(z)===a}function U(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function W(z){return x(z)===d}function K(z){return x(z)===o}function Q(z){return x(z)===g}function ee(z){return x(z)===h}function q(z){return x(z)===n}function J(z){return x(z)===i}function Z(z){return x(z)===r}function ne(z){return x(z)===f}$e.AsyncMode=w,$e.ConcurrentMode=E,$e.ContextConsumer=k,$e.ContextProvider=R,$e.Element=_,$e.ForwardRef=V,$e.Fragment=I,$e.Lazy=S,$e.Memo=A,$e.Portal=N,$e.Profiler=O,$e.StrictMode=P,$e.Suspense=L,$e.isAsyncMode=j,$e.isConcurrentMode=$,$e.isContextConsumer=B,$e.isContextProvider=H,$e.isElement=U,$e.isForwardRef=W,$e.isFragment=K,$e.isLazy=Q,$e.isMemo=ee,$e.isPortal=q,$e.isProfiler=J,$e.isStrictMode=Z,$e.isSuspense=ne,$e.isValidElementType=y,$e.typeOf=x})()),$e}var iu;function QS(){return iu||(iu=1,process.env.NODE_ENV==="production"?Fr.exports=XS():Fr.exports=ZS()),Fr.exports}var $s,su;function JS(){if(su)return $s;su=1;var e=QS(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=o,i[e.Memo]=r;function a(g){return e.isMemo(g)?r:i[g.$$typeof]||t}var l=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function h(g,m,v){if(typeof m!="string"){if(p){var b=f(m);b&&b!==p&&h(g,b,v)}var C=c(m);u&&(C=C.concat(u(m)));for(var y=a(g),x=a(m),w=0;w<C.length;++w){var E=C[w];if(!n[E]&&!(v&&v[E])&&!(x&&x[E])&&!(y&&y[E])){var k=d(m,E);try{l(g,E,k)}catch{}}}}return g}return $s=h,$s}JS();var eE=!0;function _p(e,t,n){var o="";return n.split(" ").forEach(function(r){e[r]!==void 0?t.push(e[r]+";"):r&&(o+=r+" ")}),o}var al=function(t,n,o){var r=t.key+"-"+n.name;(o===!1||eE===!1)&&t.registered[r]===void 0&&(t.registered[r]=n.styles)},ll=function(t,n,o){al(t,n,o);var r=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+r:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function tE(e){for(var t=0,n,o=0,r=e.length;r>=4;++o,r-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var nE={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},oE=/[A-Z]|^ms/g,rE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ip=function(t){return t.charCodeAt(1)===45},au=function(t){return t!=null&&typeof t!="boolean"},As=Pp(function(e){return Ip(e)?e:e.replace(oE,"-$&").toLowerCase()}),lu=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(rE,function(o,r,i){return Bt={name:r,styles:i,next:Bt},r})}return nE[t]!==1&&!Ip(t)&&typeof n=="number"&&n!==0?n+"px":n};function sr(e,t,n){if(n==null)return"";var o=n;if(o.__emotion_styles!==void 0)return o;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return Bt={name:r.name,styles:r.styles,next:Bt},r.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Bt={name:a.name,styles:a.styles,next:Bt},a=a.next;var l=i.styles+";";return l}return iE(e,t,n)}case"function":{if(e!==void 0){var c=Bt,u=n(e);return Bt=c,sr(e,t,u)}break}}var d=n;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function iE(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=sr(e,t,n[r])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var l=a;t!=null&&t[l]!==void 0?o+=i+"{"+t[l]+"}":au(l)&&(o+=As(i)+":"+lu(i,l)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var c=0;c<a.length;c++)au(a[c])&&(o+=As(i)+":"+lu(i,a[c])+";");else{var u=sr(e,t,a);switch(i){case"animation":case"animationName":{o+=As(i)+":"+u+";";break}default:o+=i+"{"+u+"}"}}}return o}var cu=/label:\s*([^\s;{]+)\s*(;|$)/g,Bt;function br(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,r="";Bt=void 0;var i=e[0];if(i==null||i.raw===void 0)o=!1,r+=sr(n,t,i);else{var a=i;r+=a[0]}for(var l=1;l<e.length;l++)if(r+=sr(n,t,e[l]),o){var c=i;r+=c[l]}cu.lastIndex=0;for(var u="",d;(d=cu.exec(r))!==null;)u+="-"+d[1];var f=tE(r)+u;return{name:f,styles:r,next:Bt}}var sE=function(t){return t()},Mp=D.useInsertionEffect?D.useInsertionEffect:!1,$p=Mp||sE,uu=Mp||D.useLayoutEffect,Ap=D.createContext(typeof HTMLElement<"u"?KS({key:"css"}):null);Ap.Provider;var cl=function(t){return F.forwardRef(function(n,o){var r=F.useContext(Ap);return t(n,r,o)})},qi=D.createContext({}),ul={}.hasOwnProperty,ga="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",aE=function(t,n){var o={};for(var r in n)ul.call(n,r)&&(o[r]=n[r]);return o[ga]=t,o},lE=function(t){var n=t.cache,o=t.serialized,r=t.isStringTag;return al(n,o,r),$p(function(){return ll(n,o,r)}),null},cE=cl(function(e,t,n){var o=e.css;typeof o=="string"&&t.registered[o]!==void 0&&(o=t.registered[o]);var r=e[ga],i=[o],a="";typeof e.className=="string"?a=_p(t.registered,i,e.className):e.className!=null&&(a=e.className+" ");var l=br(i,void 0,D.useContext(qi));a+=t.key+"-"+l.name;var c={};for(var u in e)ul.call(e,u)&&u!=="css"&&u!==ga&&(c[u]=e[u]);return c.className=a,n&&(c.ref=n),D.createElement(D.Fragment,null,D.createElement(lE,{cache:t,serialized:l,isStringTag:typeof r=="string"}),D.createElement(r,c))}),uE=cE,du=function(t,n){var o=arguments;if(n==null||!ul.call(n,"css"))return D.createElement.apply(void 0,o);var r=o.length,i=new Array(r);i[0]=uE,i[1]=aE(t,n);for(var a=2;a<r;a++)i[a]=o[a];return D.createElement.apply(null,i)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(du||(du={}));var dE=cl(function(e,t){var n=e.styles,o=br([n],void 0,D.useContext(qi)),r=D.useRef();return uu(function(){var i=t.key+"-global",a=new t.sheet.constructor({key:i,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),l=!1,c=document.querySelector('style[data-emotion="'+i+" "+o.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),c!==null&&(l=!0,c.setAttribute("data-emotion",i),a.hydrate([c])),r.current=[a,l],function(){a.flush()}},[t]),uu(function(){var i=r.current,a=i[0],l=i[1];if(l){i[1]=!1;return}if(o.next!==void 0&&ll(t,o.next,!0),a.tags.length){var c=a.tags[a.tags.length-1].nextElementSibling;a.before=c,a.flush()}t.insert("",o,a,!1)},[t,o.name]),null});function dl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return br(t)}function vr(){var e=dl.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var fE=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,pE=Pp(function(e){return fE.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),hE=pE,mE=function(t){return t!=="theme"},fu=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?hE:mE},pu=function(t,n,o){var r;if(n){var i=n.shouldForwardProp;r=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof r!="function"&&o&&(r=t.__emotion_forwardProp),r},gE=function(t){var n=t.cache,o=t.serialized,r=t.isStringTag;return al(n,o,r),$p(function(){return ll(n,o,r)}),null},yE=function e(t,n){var o=t.__emotion_real===t,r=o&&t.__emotion_base||t,i,a;n!==void 0&&(i=n.label,a=n.target);var l=pu(t,n,o),c=l||fu(r),u=!c("as");return function(){var d=arguments,f=o&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&f.push("label:"+i+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var h=d.length,g=1;g<h;g++)f.push(d[g],p[g])}var m=cl(function(v,b,C){var y=u&&v.as||r,x="",w=[],E=v;if(v.theme==null){E={};for(var k in v)E[k]=v[k];E.theme=D.useContext(qi)}typeof v.className=="string"?x=_p(b.registered,w,v.className):v.className!=null&&(x=v.className+" ");var R=br(f.concat(w),b.registered,E);x+=b.key+"-"+R.name,a!==void 0&&(x+=" "+a);var _=u&&l===void 0?fu(y):c,V={};for(var I in v)u&&I==="as"||_(I)&&(V[I]=v[I]);return V.className=x,C&&(V.ref=C),D.createElement(D.Fragment,null,D.createElement(gE,{cache:b,serialized:R,isStringTag:typeof y=="string"}),D.createElement(y,V))});return m.displayName=i!==void 0?i:"Styled("+(typeof r=="string"?r:r.displayName||r.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=r,m.__emotion_styles=f,m.__emotion_forwardProp=l,Object.defineProperty(m,"toString",{value:function(){return"."+a}}),m.withComponent=function(v,b){var C=e(v,mi({},n,b,{shouldForwardProp:pu(m,b,!0)}));return C.apply(void 0,f)},m}},bE=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],ya=yE.bind(null);bE.forEach(function(e){ya[e]=ya(e)});var Br={exports:{}},zr={exports:{}},Ae={};var hu;function vE(){if(hu)return Ae;hu=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(w){if(typeof w=="object"&&w!==null){var E=w.$$typeof;switch(E){case t:switch(w=w.type,w){case c:case u:case o:case i:case r:case f:return w;default:switch(w=w&&w.$$typeof,w){case l:case d:case g:case h:case a:return w;default:return E}}case n:return E}}}function x(w){return y(w)===u}return Ae.AsyncMode=c,Ae.ConcurrentMode=u,Ae.ContextConsumer=l,Ae.ContextProvider=a,Ae.Element=t,Ae.ForwardRef=d,Ae.Fragment=o,Ae.Lazy=g,Ae.Memo=h,Ae.Portal=n,Ae.Profiler=i,Ae.StrictMode=r,Ae.Suspense=f,Ae.isAsyncMode=function(w){return x(w)||y(w)===c},Ae.isConcurrentMode=x,Ae.isContextConsumer=function(w){return y(w)===l},Ae.isContextProvider=function(w){return y(w)===a},Ae.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ae.isForwardRef=function(w){return y(w)===d},Ae.isFragment=function(w){return y(w)===o},Ae.isLazy=function(w){return y(w)===g},Ae.isMemo=function(w){return y(w)===h},Ae.isPortal=function(w){return y(w)===n},Ae.isProfiler=function(w){return y(w)===i},Ae.isStrictMode=function(w){return y(w)===r},Ae.isSuspense=function(w){return y(w)===f},Ae.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===o||w===u||w===i||w===r||w===f||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===h||w.$$typeof===a||w.$$typeof===l||w.$$typeof===d||w.$$typeof===v||w.$$typeof===b||w.$$typeof===C||w.$$typeof===m)},Ae.typeOf=y,Ae}var De={};var mu;function xE(){return mu||(mu=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function y(z){return typeof z=="string"||typeof z=="function"||z===o||z===u||z===i||z===r||z===f||z===p||typeof z=="object"&&z!==null&&(z.$$typeof===g||z.$$typeof===h||z.$$typeof===a||z.$$typeof===l||z.$$typeof===d||z.$$typeof===v||z.$$typeof===b||z.$$typeof===C||z.$$typeof===m)}function x(z){if(typeof z=="object"&&z!==null){var ae=z.$$typeof;switch(ae){case t:var se=z.type;switch(se){case c:case u:case o:case i:case r:case f:return se;default:var de=se&&se.$$typeof;switch(de){case l:case d:case g:case h:case a:return de;default:return ae}}case n:return ae}}}var w=c,E=u,k=l,R=a,_=t,V=d,I=o,S=g,A=h,N=n,O=i,P=r,L=f,M=!1;function j(z){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(z)||x(z)===c}function $(z){return x(z)===u}function B(z){return x(z)===l}function H(z){return x(z)===a}function U(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function W(z){return x(z)===d}function K(z){return x(z)===o}function Q(z){return x(z)===g}function ee(z){return x(z)===h}function q(z){return x(z)===n}function J(z){return x(z)===i}function Z(z){return x(z)===r}function ne(z){return x(z)===f}De.AsyncMode=w,De.ConcurrentMode=E,De.ContextConsumer=k,De.ContextProvider=R,De.Element=_,De.ForwardRef=V,De.Fragment=I,De.Lazy=S,De.Memo=A,De.Portal=N,De.Profiler=O,De.StrictMode=P,De.Suspense=L,De.isAsyncMode=j,De.isConcurrentMode=$,De.isContextConsumer=B,De.isContextProvider=H,De.isElement=U,De.isForwardRef=W,De.isFragment=K,De.isLazy=Q,De.isMemo=ee,De.isPortal=q,De.isProfiler=J,De.isStrictMode=Z,De.isSuspense=ne,De.isValidElementType=y,De.typeOf=x})()),De}var gu;function Dp(){return gu||(gu=1,process.env.NODE_ENV==="production"?zr.exports=vE():zr.exports=xE()),zr.exports}var Ds,yu;function wE(){if(yu)return Ds;yu=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function r(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ds=r()?Object.assign:function(i,a){for(var l,c=o(i),u,d=1;d<arguments.length;d++){l=Object(arguments[d]);for(var f in l)t.call(l,f)&&(c[f]=l[f]);if(e){u=e(l);for(var p=0;p<u.length;p++)n.call(l,u[p])&&(c[u[p]]=l[u[p]])}}return c},Ds}var js,bu;function fl(){if(bu)return js;bu=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return js=e,js}var Ls,vu;function jp(){return vu||(vu=1,Ls=Function.call.bind(Object.prototype.hasOwnProperty)),Ls}var Fs,xu;function SE(){if(xu)return Fs;xu=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=fl(),n={},o=jp();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function r(i,a,l,c,u){if(process.env.NODE_ENV!=="production"){for(var d in i)if(o(i,d)){var f;try{if(typeof i[d]!="function"){var p=Error((c||"React class")+": "+l+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=i[d](a,d,c,l,null,t)}catch(g){f=g}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+l+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=u?u():"";e("Failed "+l+" type: "+f.message+(h??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Fs=r,Fs}var Bs,wu;function EE(){if(wu)return Bs;wu=1;var e=Dp(),t=wE(),n=fl(),o=jp(),r=SE(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return Bs=function(l,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f($){var B=$&&(u&&$[u]||$[d]);if(typeof B=="function")return B}var p="<<anonymous>>",h={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:C(),arrayOf:y,element:x(),elementType:w(),instanceOf:E,node:V(),objectOf:R,oneOf:k,oneOfType:_,shape:S,exact:A};function g($,B){return $===B?$!==0||1/$===1/B:$!==$&&B!==B}function m($,B){this.message=$,this.data=B&&typeof B=="object"?B:{},this.stack=""}m.prototype=Error.prototype;function v($){if(process.env.NODE_ENV!=="production")var B={},H=0;function U(K,Q,ee,q,J,Z,ne){if(q=q||p,Z=Z||ee,ne!==n){if(c){var z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=q+":"+ee;!B[ae]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[ae]=!0,H++)}}return Q[ee]==null?K?Q[ee]===null?new m("The "+J+" `"+Z+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new m("The "+J+" `"+Z+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:$(Q,ee,q,J,Z)}var W=U.bind(null,!1);return W.isRequired=U.bind(null,!0),W}function b($){function B(H,U,W,K,Q,ee){var q=H[U],J=P(q);if(J!==$){var Z=L(q);return new m("Invalid "+K+" `"+Q+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return v(B)}function C(){return v(a)}function y($){function B(H,U,W,K,Q){if(typeof $!="function")return new m("Property `"+Q+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var ee=H[U];if(!Array.isArray(ee)){var q=P(ee);return new m("Invalid "+K+" `"+Q+"` of type "+("`"+q+"` supplied to `"+W+"`, expected an array."))}for(var J=0;J<ee.length;J++){var Z=$(ee,J,W,K,Q+"["+J+"]",n);if(Z instanceof Error)return Z}return null}return v(B)}function x(){function $(B,H,U,W,K){var Q=B[H];if(!l(Q)){var ee=P(Q);return new m("Invalid "+W+" `"+K+"` of type "+("`"+ee+"` supplied to `"+U+"`, expected a single ReactElement."))}return null}return v($)}function w(){function $(B,H,U,W,K){var Q=B[H];if(!e.isValidElementType(Q)){var ee=P(Q);return new m("Invalid "+W+" `"+K+"` of type "+("`"+ee+"` supplied to `"+U+"`, expected a single ReactElement type."))}return null}return v($)}function E($){function B(H,U,W,K,Q){if(!(H[U]instanceof $)){var ee=$.name||p,q=j(H[U]);return new m("Invalid "+K+" `"+Q+"` of type "+("`"+q+"` supplied to `"+W+"`, expected ")+("instance of `"+ee+"`."))}return null}return v(B)}function k($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(H,U,W,K,Q){for(var ee=H[U],q=0;q<$.length;q++)if(g(ee,$[q]))return null;var J=JSON.stringify($,function(ne,z){var ae=L(z);return ae==="symbol"?String(z):z});return new m("Invalid "+K+" `"+Q+"` of value `"+String(ee)+"` "+("supplied to `"+W+"`, expected one of "+J+"."))}return v(B)}function R($){function B(H,U,W,K,Q){if(typeof $!="function")return new m("Property `"+Q+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var ee=H[U],q=P(ee);if(q!=="object")return new m("Invalid "+K+" `"+Q+"` of type "+("`"+q+"` supplied to `"+W+"`, expected an object."));for(var J in ee)if(o(ee,J)){var Z=$(ee,J,W,K,Q+"."+J,n);if(Z instanceof Error)return Z}return null}return v(B)}function _($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<$.length;B++){var H=$[B];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+M(H)+" at index "+B+"."),a}function U(W,K,Q,ee,q){for(var J=[],Z=0;Z<$.length;Z++){var ne=$[Z],z=ne(W,K,Q,ee,q,n);if(z==null)return null;z.data&&o(z.data,"expectedType")&&J.push(z.data.expectedType)}var ae=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new m("Invalid "+ee+" `"+q+"` supplied to "+("`"+Q+"`"+ae+"."))}return v(U)}function V(){function $(B,H,U,W,K){return N(B[H])?null:new m("Invalid "+W+" `"+K+"` supplied to "+("`"+U+"`, expected a ReactNode."))}return v($)}function I($,B,H,U,W){return new m(($||"React class")+": "+B+" type `"+H+"."+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function S($){function B(H,U,W,K,Q){var ee=H[U],q=P(ee);if(q!=="object")return new m("Invalid "+K+" `"+Q+"` of type `"+q+"` "+("supplied to `"+W+"`, expected `object`."));for(var J in $){var Z=$[J];if(typeof Z!="function")return I(W,K,Q,J,L(Z));var ne=Z(ee,J,W,K,Q+"."+J,n);if(ne)return ne}return null}return v(B)}function A($){function B(H,U,W,K,Q){var ee=H[U],q=P(ee);if(q!=="object")return new m("Invalid "+K+" `"+Q+"` of type `"+q+"` "+("supplied to `"+W+"`, expected `object`."));var J=t({},H[U],$);for(var Z in J){var ne=$[Z];if(o($,Z)&&typeof ne!="function")return I(W,K,Q,Z,L(ne));if(!ne)return new m("Invalid "+K+" `"+Q+"` key `"+Z+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(H[U],null," ")+`
|
|
8
8
|
Valid keys: `+JSON.stringify(Object.keys($),null," "));var z=ne(ee,Z,W,K,Q+"."+Z,n);if(z)return z}return null}return v(B)}function N($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(N);if($===null||l($))return!0;var B=f($);if(B){var H=B.call($),U;if(B!==$.entries){for(;!(U=H.next()).done;)if(!N(U.value))return!1}else for(;!(U=H.next()).done;){var W=U.value;if(W&&!N(W[1]))return!1}}else return!1;return!0;default:return!1}}function O($,B){return $==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function P($){var B=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":O(B,$)?"symbol":B}function L($){if(typeof $>"u"||$===null)return""+$;var B=P($);if(B==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return B}function M($){var B=L($);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function j($){return!$.constructor||!$.constructor.name?p:$.constructor.name}return h.checkPropTypes=r,h.resetWarningCache=r.resetWarningCache,h.PropTypes=h,h},Bs}var zs,Su;function CE(){if(Su)return zs;Su=1;var e=fl();function t(){}function n(){}return n.resetWarningCache=t,zs=function(){function o(a,l,c,u,d,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}o.isRequired=o;function r(){return o}var i={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},zs}var Eu;function TE(){if(Eu)return Br.exports;if(Eu=1,process.env.NODE_ENV!=="production"){var e=Dp(),t=!0;Br.exports=EE()(e.isElement,t)}else Br.exports=CE()();return Br.exports}var NE=TE();const s=zf(NE);function kE(e){return e==null||Object.keys(e).length===0}function Lp(e){const{styles:t,defaultTheme:n={}}=e,o=typeof t=="function"?r=>t(kE(r)?n:r):t;return T.jsx(dE,{styles:o})}process.env.NODE_ENV!=="production"&&(Lp.propTypes={defaultTheme:s.object,styles:s.oneOfType([s.array,s.string,s.object,s.func])});function Fp(e,t){const n=ya(e,t);return process.env.NODE_ENV!=="production"?(...o)=>{const r=typeof e=="string"?`"${e}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
9
9
|
`)):o.some(i=>i===void 0)&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...o)}:n}function OE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Cu=[];function rn(e){return Cu[0]=e,br(Cu)}var Vr={exports:{}},Be={};var Tu;function PE(){if(Tu)return Be;Tu=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function g(m){if(typeof m=="object"&&m!==null){var v=m.$$typeof;switch(v){case e:switch(m=m.type,m){case n:case r:case o:case c:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case a:case l:case f:case d:return m;case i:return m;default:return v}}case t:return v}}}return Be.ContextConsumer=i,Be.ContextProvider=a,Be.Element=e,Be.ForwardRef=l,Be.Fragment=n,Be.Lazy=f,Be.Memo=d,Be.Portal=t,Be.Profiler=r,Be.StrictMode=o,Be.Suspense=c,Be.SuspenseList=u,Be.isContextConsumer=function(m){return g(m)===i},Be.isContextProvider=function(m){return g(m)===a},Be.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Be.isForwardRef=function(m){return g(m)===l},Be.isFragment=function(m){return g(m)===n},Be.isLazy=function(m){return g(m)===f},Be.isMemo=function(m){return g(m)===d},Be.isPortal=function(m){return g(m)===t},Be.isProfiler=function(m){return g(m)===r},Be.isStrictMode=function(m){return g(m)===o},Be.isSuspense=function(m){return g(m)===c},Be.isSuspenseList=function(m){return g(m)===u},Be.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===r||m===o||m===c||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===d||m.$$typeof===a||m.$$typeof===i||m.$$typeof===l||m.$$typeof===h||m.getModuleId!==void 0)},Be.typeOf=g,Be}var ze={};var Nu;function RE(){return Nu||(Nu=1,process.env.NODE_ENV!=="production"&&(function(){function e(m){if(typeof m=="object"&&m!==null){var v=m.$$typeof;switch(v){case t:switch(m=m.type,m){case o:case i:case r:case u:case d:case h:return m;default:switch(m=m&&m.$$typeof,m){case l:case c:case p:case f:return m;case a:return m;default:return v}}case n:return v}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");ze.ContextConsumer=a,ze.ContextProvider=l,ze.Element=t,ze.ForwardRef=c,ze.Fragment=o,ze.Lazy=p,ze.Memo=f,ze.Portal=n,ze.Profiler=i,ze.StrictMode=r,ze.Suspense=u,ze.SuspenseList=d,ze.isContextConsumer=function(m){return e(m)===a},ze.isContextProvider=function(m){return e(m)===l},ze.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},ze.isForwardRef=function(m){return e(m)===c},ze.isFragment=function(m){return e(m)===o},ze.isLazy=function(m){return e(m)===p},ze.isMemo=function(m){return e(m)===f},ze.isPortal=function(m){return e(m)===n},ze.isProfiler=function(m){return e(m)===i},ze.isStrictMode=function(m){return e(m)===r},ze.isSuspense=function(m){return e(m)===u},ze.isSuspenseList=function(m){return e(m)===d},ze.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===o||m===i||m===r||m===u||m===d||typeof m=="object"&&m!==null&&(m.$$typeof===p||m.$$typeof===f||m.$$typeof===l||m.$$typeof===a||m.$$typeof===c||m.$$typeof===g||m.getModuleId!==void 0)},ze.typeOf=e})()),ze}var ku;function _E(){return ku||(ku=1,process.env.NODE_ENV==="production"?Vr.exports=PE():Vr.exports=RE()),Vr.exports}var Rn=_E();function zt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Bp(e){if(D.isValidElement(e)||Rn.isValidElementType(e)||!zt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Bp(e[n])}),t}function nt(e,t,n={clone:!0}){const o=n.clone?{...e}:e;return zt(e)&&zt(t)&&Object.keys(t).forEach(r=>{D.isValidElement(t[r])||Rn.isValidElementType(t[r])?o[r]=t[r]:zt(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&zt(e[r])?o[r]=nt(e[r],t[r],n):n.clone?o[r]=zt(t[r])?Bp(t[r]):t[r]:o[r]=t[r]}),o}const IE=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,o)=>n.val-o.val),t.reduce((n,o)=>({...n,[o.key]:o.val}),{})};function ME(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5,...r}=e,i=IE(t),a=Object.keys(i);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-o/100}${n})`}function u(p,h){const g=a.indexOf(h);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:h)-o/100}${n})`}function d(p){return a.indexOf(p)+1<a.length?u(p,a[a.indexOf(p)+1]):l(p)}function f(p){const h=a.indexOf(p);return h===0?l(a[1]):h===a.length-1?c(a[h]):u(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:a,values:i,up:l,down:c,between:u,only:d,not:f,unit:n,...r}}function Ou(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(o=>o.startsWith("@container")).sort((o,r)=>{const i=/min-width:\s*([0-9.]+)/;return+(o.match(i)?.[1]||0)-+(r.match(i)?.[1]||0)});return n.length?n.reduce((o,r)=>{const i=t[r];return delete o[r],o[r]=i,o},{...t}):t}function $E(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function AE(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
10
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);return null}const[,o,r]=n,i=Number.isNaN(+o)?o||0:+o;return e.containerQueries(r).up(i)}function DE(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...l)=>t(e.breakpoints.up(...l),a),i.down=(...l)=>t(e.breakpoints.down(...l),a),i.between=(...l)=>t(e.breakpoints.between(...l),a),i.only=(...l)=>t(e.breakpoints.only(...l),a),i.not=(...l)=>{const c=t(e.breakpoints.not(...l),a);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const o={},r=i=>(n(o,i),o);return n(r),{...e,containerQueries:r}}const jE={borderRadius:4},cn=process.env.NODE_ENV!=="production"?s.oneOfType([s.number,s.string,s.object,s.array]):{};function Ho(e,t){return t?nt(e,t,{clone:!1}):e}const Yi={xs:0,sm:600,md:900,lg:1200,xl:1536},Pu={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Yi[e]}px)`},LE={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Yi[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Rt(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const i=o.breakpoints||Pu;return t.reduce((a,l,c)=>(a[i.up(i.keys[c])]=n(t[c]),a),{})}if(typeof t=="object"){const i=o.breakpoints||Pu;return Object.keys(t).reduce((a,l)=>{if($E(i.keys,l)){const c=AE(o.containerQueries?o:LE,l);c&&(a[c]=n(t[l],l))}else if(Object.keys(i.values||Yi).includes(l)){const c=i.up(l);a[c]=n(t[l],l)}else{const c=l;a[c]=t[c]}return a},{})}return n(t)}function zp(e={}){return e.keys?.reduce((n,o)=>{const r=e.up(o);return n[r]={},n},{})||{}}function ba(e,t){return e.reduce((n,o)=>{const r=n[o];return(!r||Object.keys(r).length===0)&&delete n[o],n},t)}function FE(e,...t){const n=zp(e),o=[n,...t].reduce((r,i)=>nt(r,i),{});return ba(Object.keys(n),o)}function BE(e,t){if(typeof e!="object")return{};const n={},o=Object.keys(t);return Array.isArray(e)?o.forEach((r,i)=>{i<e.length&&(n[r]=!0)}):o.forEach(r=>{e[r]!=null&&(n[r]=!0)}),n}function Vs({values:e,breakpoints:t,base:n}){const o=n||BE(e,t),r=Object.keys(o);if(r.length===0)return e;let i;return r.reduce((a,l,c)=>(Array.isArray(e)?(a[l]=e[c]!=null?e[c]:e[i],i=c):typeof e=="object"?(a[l]=e[l]!=null?e[l]:e[i],i=l):a[l]=e,a),{})}function
|
|
10
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);return null}const[,o,r]=n,i=Number.isNaN(+o)?o||0:+o;return e.containerQueries(r).up(i)}function DE(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...l)=>t(e.breakpoints.up(...l),a),i.down=(...l)=>t(e.breakpoints.down(...l),a),i.between=(...l)=>t(e.breakpoints.between(...l),a),i.only=(...l)=>t(e.breakpoints.only(...l),a),i.not=(...l)=>{const c=t(e.breakpoints.not(...l),a);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const o={},r=i=>(n(o,i),o);return n(r),{...e,containerQueries:r}}const jE={borderRadius:4},cn=process.env.NODE_ENV!=="production"?s.oneOfType([s.number,s.string,s.object,s.array]):{};function Ho(e,t){return t?nt(e,t,{clone:!1}):e}const Yi={xs:0,sm:600,md:900,lg:1200,xl:1536},Pu={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Yi[e]}px)`},LE={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Yi[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Rt(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const i=o.breakpoints||Pu;return t.reduce((a,l,c)=>(a[i.up(i.keys[c])]=n(t[c]),a),{})}if(typeof t=="object"){const i=o.breakpoints||Pu;return Object.keys(t).reduce((a,l)=>{if($E(i.keys,l)){const c=AE(o.containerQueries?o:LE,l);c&&(a[c]=n(t[l],l))}else if(Object.keys(i.values||Yi).includes(l)){const c=i.up(l);a[c]=n(t[l],l)}else{const c=l;a[c]=t[c]}return a},{})}return n(t)}function zp(e={}){return e.keys?.reduce((n,o)=>{const r=e.up(o);return n[r]={},n},{})||{}}function ba(e,t){return e.reduce((n,o)=>{const r=n[o];return(!r||Object.keys(r).length===0)&&delete n[o],n},t)}function FE(e,...t){const n=zp(e),o=[n,...t].reduce((r,i)=>nt(r,i),{});return ba(Object.keys(n),o)}function BE(e,t){if(typeof e!="object")return{};const n={},o=Object.keys(t);return Array.isArray(e)?o.forEach((r,i)=>{i<e.length&&(n[r]=!0)}):o.forEach(r=>{e[r]!=null&&(n[r]=!0)}),n}function Vs({values:e,breakpoints:t,base:n}){const o=n||BE(e,t),r=Object.keys(o);if(r.length===0)return e;let i;return r.reduce((a,l,c)=>(Array.isArray(e)?(a[l]=e[c]!=null?e[c]:e[i],i=c):typeof e=="object"?(a[l]=e[l]!=null?e[l]:e[i],i=l):a[l]=e,a),{})}function me(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Zt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Gi(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const o=`vars.${t}`.split(".").reduce((r,i)=>r&&r[i]?r[i]:null,e);if(o!=null)return o}return t.split(".").reduce((o,r)=>o&&o[r]!=null?o[r]:null,e)}function yi(e,t,n,o=n){let r;return typeof e=="function"?r=e(n):Array.isArray(e)?r=e[n]||o:r=Gi(e,n)||o,t&&(r=t(r,o,e)),r}function Ke(e){const{prop:t,cssProperty:n=e.prop,themeKey:o,transform:r}=e,i=a=>{if(a[t]==null)return null;const l=a[t],c=a.theme,u=Gi(c,o)||{};return Rt(a,l,f=>{let p=yi(u,r,f);return f===p&&typeof f=="string"&&(p=yi(u,r,`${t}${f==="default"?"":me(f)}`,f)),n===!1?p:{[n]:p}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[t]:cn}:{},i.filterProps=[t],i}function zE(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const VE={m:"margin",p:"padding"},HE={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ru={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},WE=zE(e=>{if(e.length>2)if(Ru[e])e=Ru[e];else return[e];const[t,n]=e.split(""),o=VE[t],r=HE[n]||"";return Array.isArray(r)?r.map(i=>o+i):[o+r]}),Ki=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Xi=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],UE=[...Ki,...Xi];function xr(e,t,n,o){const r=Gi(e,t,!0)??n;return typeof r=="number"||typeof r=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${i}.`),typeof r=="string"?r.startsWith("var(")&&i===0?0:r.startsWith("var(")&&i===1?r:`calc(${i} * ${r})`:r*i):Array.isArray(r)?i=>{if(typeof i=="string")return i;const a=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(a)?a>r.length-1&&console.error([`MUI: The value provided (${a}) overflows.`,`The supported values are: ${JSON.stringify(r)}.`,`${a} > ${r.length-1}, you need to add the missing values.`].join(`
|
|
11
11
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
12
12
|
`)));const l=r[a];return i>=0?l:typeof l=="number"?-l:typeof l=="string"&&l.startsWith("var(")?`calc(-1 * ${l})`:`-${l}`}:typeof r=="function"?r:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${r}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
13
|
-
`)),()=>{})}function Zi(e){return xr(e,"spacing",8,"spacing")}function _n(e,t){return typeof t=="string"||t==null?t:e(t)}function qE(e,t){return n=>e.reduce((o,r)=>(o[r]=_n(t,n),o),{})}function YE(e,t,n,o){if(!t.includes(n))return null;const r=WE(n),i=qE(r,o),a=e[n];return Rt(e,a,i)}function Vp(e,t){const n=Zi(e.theme);return Object.keys(e).map(o=>YE(e,t,o,n)).reduce(Ho,{})}function qe(e){return Vp(e,Ki)}qe.propTypes=process.env.NODE_ENV!=="production"?Ki.reduce((e,t)=>(e[t]=cn,e),{}):{};qe.filterProps=Ki;function Ye(e){return Vp(e,Xi)}Ye.propTypes=process.env.NODE_ENV!=="production"?Xi.reduce((e,t)=>(e[t]=cn,e),{}):{};Ye.filterProps=Xi;process.env.NODE_ENV!=="production"&&UE.reduce((e,t)=>(e[t]=cn,e),{});function Hp(e=8,t=Zi({spacing:e})){if(e.mui)return e;const n=(...o)=>(process.env.NODE_ENV!=="production"&&(o.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${o.length}`)),(o.length===0?[1]:o).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" "));return n.mui=!0,n}function Qi(...e){const t=e.reduce((o,r)=>(r.filterProps.forEach(i=>{o[i]=r}),o),{}),n=o=>Object.keys(o).reduce((r,i)=>t[i]?Ho(r,t[i](o)):r,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((o,r)=>Object.assign(o,r.propTypes),{}):{},n.filterProps=e.reduce((o,r)=>o.concat(r.filterProps),[]),n}function xt(e){return typeof e!="number"?e:`${e}px solid`}function wt(e,t){return Ge({prop:e,themeKey:"borders",transform:t})}const GE=wt("border",xt),KE=wt("borderTop",xt),XE=wt("borderRight",xt),ZE=wt("borderBottom",xt),QE=wt("borderLeft",xt),JE=wt("borderColor"),eC=wt("borderTopColor"),tC=wt("borderRightColor"),nC=wt("borderBottomColor"),oC=wt("borderLeftColor"),rC=wt("outline",xt),iC=wt("outlineColor"),Ji=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=xr(e.theme,"shape.borderRadius",4,"borderRadius"),n=o=>({borderRadius:_n(t,o)});return Rt(e,e.borderRadius,n)}return null};Ji.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:cn}:{};Ji.filterProps=["borderRadius"];Qi(GE,KE,XE,ZE,QE,JE,eC,tC,nC,oC,Ji,rC,iC);const es=e=>{if(e.gap!==void 0&&e.gap!==null){const t=xr(e.theme,"spacing",8,"gap"),n=o=>({gap:_n(t,o)});return Rt(e,e.gap,n)}return null};es.propTypes=process.env.NODE_ENV!=="production"?{gap:cn}:{};es.filterProps=["gap"];const ts=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=xr(e.theme,"spacing",8,"columnGap"),n=o=>({columnGap:_n(t,o)});return Rt(e,e.columnGap,n)}return null};ts.propTypes=process.env.NODE_ENV!=="production"?{columnGap:cn}:{};ts.filterProps=["columnGap"];const ns=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=xr(e.theme,"spacing",8,"rowGap"),n=o=>({rowGap:_n(t,o)});return Rt(e,e.rowGap,n)}return null};ns.propTypes=process.env.NODE_ENV!=="production"?{rowGap:cn}:{};ns.filterProps=["rowGap"];const sC=Ge({prop:"gridColumn"}),aC=Ge({prop:"gridRow"}),lC=Ge({prop:"gridAutoFlow"}),cC=Ge({prop:"gridAutoColumns"}),uC=Ge({prop:"gridAutoRows"}),dC=Ge({prop:"gridTemplateColumns"}),fC=Ge({prop:"gridTemplateRows"}),pC=Ge({prop:"gridTemplateAreas"}),hC=Ge({prop:"gridArea"});Qi(es,ts,ns,sC,aC,lC,cC,uC,dC,fC,pC,hC);function Zn(e,t){return t==="grey"?t:e}const mC=Ge({prop:"color",themeKey:"palette",transform:Zn}),gC=Ge({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Zn}),yC=Ge({prop:"backgroundColor",themeKey:"palette",transform:Zn});Qi(mC,gC,yC);function ht(e){return e<=1&&e!==0?`${e*100}%`:e}const bC=Ge({prop:"width",transform:ht}),pl=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const o=e.theme?.breakpoints?.values?.[n]||Yi[n];return o?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:ht(n)}};return Rt(e,e.maxWidth,t)}return null};pl.filterProps=["maxWidth"];const vC=Ge({prop:"minWidth",transform:ht}),xC=Ge({prop:"height",transform:ht}),wC=Ge({prop:"maxHeight",transform:ht}),SC=Ge({prop:"minHeight",transform:ht});Ge({prop:"size",cssProperty:"width",transform:ht});Ge({prop:"size",cssProperty:"height",transform:ht});const EC=Ge({prop:"boxSizing"});Qi(bC,pl,vC,xC,wC,SC,EC);const wr={border:{themeKey:"borders",transform:xt},borderTop:{themeKey:"borders",transform:xt},borderRight:{themeKey:"borders",transform:xt},borderBottom:{themeKey:"borders",transform:xt},borderLeft:{themeKey:"borders",transform:xt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:xt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ji},color:{themeKey:"palette",transform:Zn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Zn},backgroundColor:{themeKey:"palette",transform:Zn},p:{style:Ye},pt:{style:Ye},pr:{style:Ye},pb:{style:Ye},pl:{style:Ye},px:{style:Ye},py:{style:Ye},padding:{style:Ye},paddingTop:{style:Ye},paddingRight:{style:Ye},paddingBottom:{style:Ye},paddingLeft:{style:Ye},paddingX:{style:Ye},paddingY:{style:Ye},paddingInline:{style:Ye},paddingInlineStart:{style:Ye},paddingInlineEnd:{style:Ye},paddingBlock:{style:Ye},paddingBlockStart:{style:Ye},paddingBlockEnd:{style:Ye},m:{style:qe},mt:{style:qe},mr:{style:qe},mb:{style:qe},ml:{style:qe},mx:{style:qe},my:{style:qe},margin:{style:qe},marginTop:{style:qe},marginRight:{style:qe},marginBottom:{style:qe},marginLeft:{style:qe},marginX:{style:qe},marginY:{style:qe},marginInline:{style:qe},marginInlineStart:{style:qe},marginInlineEnd:{style:qe},marginBlock:{style:qe},marginBlockStart:{style:qe},marginBlockEnd:{style:qe},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:es},rowGap:{style:ns},columnGap:{style:ts},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ht},maxWidth:{style:pl},minWidth:{transform:ht},height:{transform:ht},maxHeight:{transform:ht},minHeight:{transform:ht},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function CC(...e){const t=e.reduce((o,r)=>o.concat(Object.keys(r)),[]),n=new Set(t);return e.every(o=>n.size===Object.keys(o).length)}function TC(e,t){return typeof e=="function"?e(t):e}function NC(){function e(n,o,r,i){const a={[n]:o,theme:r},l=i[n];if(!l)return{[n]:o};const{cssProperty:c=n,themeKey:u,transform:d,style:f}=l;if(o==null)return null;if(u==="typography"&&o==="inherit")return{[n]:o};const p=Gi(r,u)||{};return f?f(a):Rt(a,o,g=>{let m=yi(p,d,g);return g===m&&typeof g=="string"&&(m=yi(p,d,`${n}${g==="default"?"":ge(g)}`,g)),c===!1?m:{[c]:m}})}function t(n){const{sx:o,theme:r={},nested:i}=n||{};if(!o)return null;const a=r.unstable_sxConfig??wr;function l(c){let u=c;if(typeof c=="function")u=c(r);else if(typeof c!="object")return c;if(!u)return null;const d=zp(r.breakpoints),f=Object.keys(d);let p=d;return Object.keys(u).forEach(h=>{const g=TC(u[h],r);if(g!=null)if(typeof g=="object")if(a[h])p=Ho(p,e(h,g,r,a));else{const m=Rt({theme:r},g,v=>({[h]:v}));CC(m,g)?p[h]=t({sx:g,theme:r,nested:!0}):p=Ho(p,m)}else p=Ho(p,e(h,g,r,a))}),!i&&r.modularCssLayers?{"@layer sx":Ou(r,ba(f,p))}:Ou(r,ba(f,p))}return Array.isArray(o)?o.map(l):l(o)}return t}const In=NC();In.filterProps=["sx"];function kC(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function os(e={},...t){const{breakpoints:n={},palette:o={},spacing:r,shape:i={},...a}=e,l=ME(n),c=Hp(r);let u=nt({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:c,shape:{...jE,...i}},a);return u=DE(u),u.applyStyles=kC,u=t.reduce((d,f)=>nt(d,f),u),u.unstable_sxConfig={...wr,...a?.unstable_sxConfig},u.unstable_sx=function(f){return In({sx:f,theme:this})},u}function OC(e){return Object.keys(e).length===0}function PC(e=null){const t=D.useContext(qi);return!t||OC(t)?e:t}const RC=os();function rs(e=RC){return PC(e)}function Hs(e){const t=rn(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Wp({styles:e,themeId:t,defaultTheme:n={}}){const o=rs(n),r=t&&o[t]||o;let i=typeof e=="function"?e(r):e;return r.modularCssLayers&&(Array.isArray(i)?i=i.map(a=>Hs(typeof a=="function"?a(r):a)):i=Hs(i)),T.jsx(Lp,{styles:i})}process.env.NODE_ENV!=="production"&&(Wp.propTypes={defaultTheme:s.object,styles:s.oneOfType([s.array,s.func,s.number,s.object,s.string,s.bool]),themeId:s.string});const _C=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??wr;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function hl(e){const{sx:t,...n}=e,{systemProps:o,otherProps:r}=_C(n);let i;return Array.isArray(t)?i=[o,...t]:typeof t=="function"?i=(...a)=>{const l=t(...a);return zt(l)?{...o,...l}:o}:i={...o,...t},{...r,sx:i}}const _u=e=>e,IC=()=>{let e=_u;return{configure(t){e=t},generate(t){return e(t)},reset(){e=_u}}},Up=IC();function qp(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=qp(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function be(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=qp(e))&&(o&&(o+=" "),o+=t);return o}function MC(e={}){const{themeId:t,defaultTheme:n,defaultClassName:o="MuiBox-root",generateClassName:r}=e,i=Fp("div",{shouldForwardProp:l=>l!=="theme"&&l!=="sx"&&l!=="as"})(In);return D.forwardRef(function(c,u){const d=rs(n),{className:f,component:p="div",...h}=hl(c);return T.jsx(i,{as:p,ref:u,className:be(f,r?r(o):o),theme:t&&d[t]||d,...h})})}const $C={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ne(e,t,n="Mui"){const o=$C[t];return o?`${n}-${o}`:`${Up.generate(e)}-${t}`}function Oe(e,t,n="Mui"){const o={};return t.forEach(r=>{o[r]=Ne(e,r,n)}),o}function Yp(e,t=""){return e.displayName||e.name||t}function Iu(e,t,n){const o=Yp(t);return e.displayName||(o!==""?`${n}(${o})`:n)}function AC(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Yp(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Rn.ForwardRef:return Iu(e,e.render,"ForwardRef");case Rn.Memo:return Iu(e,e.type,"memo");default:return}}}function Gp(e){const{variants:t,...n}=e,o={variants:t,style:rn(n),isProcessed:!0};return o.style===n||t&&t.forEach(r=>{typeof r.style!="function"&&(r.style=rn(r.style))}),o}const DC=os();function Ws(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function wn(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function jC(e){return e?(t,n)=>n[e]:null}function LC(e,t,n){e.theme=zC(e.theme)?n:e.theme[t]||e.theme}function ti(e,t,n){const o=typeof t=="function"?t(e):t;if(Array.isArray(o))return o.flatMap(r=>ti(e,r,n));if(Array.isArray(o?.variants)){let r;if(o.isProcessed)r=n?wn(o.style,n):o.style;else{const{variants:i,...a}=o;r=n?wn(rn(a),n):a}return Kp(e,o.variants,[r],n)}return o?.isProcessed?n?wn(rn(o.style),n):o.style:n?wn(rn(o),n):o}function Kp(e,t,n=[],o=void 0){let r;e:for(let i=0;i<t.length;i+=1){const a=t[i];if(typeof a.props=="function"){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(r))continue}else for(const l in a.props)if(e[l]!==a.props[l]&&e.ownerState?.[l]!==a.props[l])continue e;typeof a.style=="function"?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(o?wn(rn(a.style(r)),o):a.style(r))):n.push(o?wn(rn(a.style),o):a.style)}return n}function Xp(e={}){const{themeId:t,defaultTheme:n=DC,rootShouldForwardProp:o=Ws,slotShouldForwardProp:r=Ws}=e;function i(l){LC(l,t,n)}return(l,c={})=>{OE(l,E=>E.filter(k=>k!==In));const{name:u,slot:d,skipVariantsResolver:f,skipSx:p,overridesResolver:h=jC(Zp(d)),...g}=c,m=u&&u.startsWith("Mui")||d?"components":"custom",v=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,b=p||!1;let C=Ws;d==="Root"||d==="root"?C=o:d?C=r:VC(l)&&(C=void 0);const y=Fp(l,{shouldForwardProp:C,label:BC(u,d),...g}),x=E=>{if(E.__emotion_real===E)return E;if(typeof E=="function")return function(R){return ti(R,E,R.theme.modularCssLayers?m:void 0)};if(zt(E)){const k=Gp(E);return function(_){return k.variants?ti(_,k,_.theme.modularCssLayers?m:void 0):_.theme.modularCssLayers?wn(k.style,m):k.style}}return E},w=(...E)=>{const k=[],R=E.map(x),_=[];if(k.push(i),u&&h&&_.push(function(A){const O=A.theme.components?.[u]?.styleOverrides;if(!O)return null;const P={};for(const L in O)P[L]=ti(A,O[L],A.theme.modularCssLayers?"theme":void 0);return h(A,P)}),u&&!v&&_.push(function(A){const O=A.theme?.components?.[u]?.variants;return O?Kp(A,O,[],A.theme.modularCssLayers?"theme":void 0):null}),b||_.push(In),Array.isArray(R[0])){const S=R.shift(),A=new Array(k.length).fill(""),N=new Array(_.length).fill("");let O;O=[...A,...S,...N],O.raw=[...A,...S.raw,...N],k.unshift(O)}const V=[...k,...R,..._],I=y(...V);return l.muiName&&(I.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(I.displayName=FC(u,d,l)),I};return y.withConfig&&(w.withConfig=y.withConfig),w}}function FC(e,t,n){return e?`${e}${ge(t||"")}`:`Styled(${AC(n)})`}function BC(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Zp(t||"Root")}`),n}function zC(e){for(const t in e)return!1;return!0}function VC(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Zp(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const HC=Xp();function ar(e,t,n=!1){const o={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")o[i]={...e[i],...o[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],l=t[i];if(!l)o[i]=a||{};else if(!a)o[i]=l;else{o[i]={...l};for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const u=c;o[i][u]=ar(a[u],l[u],n)}}}else i==="className"&&n&&t.className?o.className=be(e?.className,t?.className):i==="style"&&n&&t.style?o.style={...e?.style,...t?.style}:o[i]===void 0&&(o[i]=e[i])}return o}function WC(e){const{theme:t,name:n,props:o}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?o:ar(t.components[n].defaultProps,o)}function UC({props:e,name:t,defaultTheme:n,themeId:o}){let r=rs(n);return o&&(r=r[o]||r),WC({theme:r,name:t,props:e})}const an=typeof window<"u"?D.useLayoutEffect:D.useEffect;function qC(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function ml(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),qC(e,t,n)}function YC(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(o=>o+o)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((o,r)=>r<3?parseInt(o,16):Math.round(parseInt(o,16)/255*1e3)/1e3).join(", ")})`:""}function ln(e){if(e.type)return e;if(e.charAt(0)==="#")return ln(YC(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
13
|
+
`)),()=>{})}function Zi(e){return xr(e,"spacing",8,"spacing")}function _n(e,t){return typeof t=="string"||t==null?t:e(t)}function qE(e,t){return n=>e.reduce((o,r)=>(o[r]=_n(t,n),o),{})}function YE(e,t,n,o){if(!t.includes(n))return null;const r=WE(n),i=qE(r,o),a=e[n];return Rt(e,a,i)}function Vp(e,t){const n=Zi(e.theme);return Object.keys(e).map(o=>YE(e,t,o,n)).reduce(Ho,{})}function Ye(e){return Vp(e,Ki)}Ye.propTypes=process.env.NODE_ENV!=="production"?Ki.reduce((e,t)=>(e[t]=cn,e),{}):{};Ye.filterProps=Ki;function Ge(e){return Vp(e,Xi)}Ge.propTypes=process.env.NODE_ENV!=="production"?Xi.reduce((e,t)=>(e[t]=cn,e),{}):{};Ge.filterProps=Xi;process.env.NODE_ENV!=="production"&&UE.reduce((e,t)=>(e[t]=cn,e),{});function Hp(e=8,t=Zi({spacing:e})){if(e.mui)return e;const n=(...o)=>(process.env.NODE_ENV!=="production"&&(o.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${o.length}`)),(o.length===0?[1]:o).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" "));return n.mui=!0,n}function Qi(...e){const t=e.reduce((o,r)=>(r.filterProps.forEach(i=>{o[i]=r}),o),{}),n=o=>Object.keys(o).reduce((r,i)=>t[i]?Ho(r,t[i](o)):r,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((o,r)=>Object.assign(o,r.propTypes),{}):{},n.filterProps=e.reduce((o,r)=>o.concat(r.filterProps),[]),n}function wt(e){return typeof e!="number"?e:`${e}px solid`}function St(e,t){return Ke({prop:e,themeKey:"borders",transform:t})}const GE=St("border",wt),KE=St("borderTop",wt),XE=St("borderRight",wt),ZE=St("borderBottom",wt),QE=St("borderLeft",wt),JE=St("borderColor"),eC=St("borderTopColor"),tC=St("borderRightColor"),nC=St("borderBottomColor"),oC=St("borderLeftColor"),rC=St("outline",wt),iC=St("outlineColor"),Ji=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=xr(e.theme,"shape.borderRadius",4,"borderRadius"),n=o=>({borderRadius:_n(t,o)});return Rt(e,e.borderRadius,n)}return null};Ji.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:cn}:{};Ji.filterProps=["borderRadius"];Qi(GE,KE,XE,ZE,QE,JE,eC,tC,nC,oC,Ji,rC,iC);const es=e=>{if(e.gap!==void 0&&e.gap!==null){const t=xr(e.theme,"spacing",8,"gap"),n=o=>({gap:_n(t,o)});return Rt(e,e.gap,n)}return null};es.propTypes=process.env.NODE_ENV!=="production"?{gap:cn}:{};es.filterProps=["gap"];const ts=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=xr(e.theme,"spacing",8,"columnGap"),n=o=>({columnGap:_n(t,o)});return Rt(e,e.columnGap,n)}return null};ts.propTypes=process.env.NODE_ENV!=="production"?{columnGap:cn}:{};ts.filterProps=["columnGap"];const ns=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=xr(e.theme,"spacing",8,"rowGap"),n=o=>({rowGap:_n(t,o)});return Rt(e,e.rowGap,n)}return null};ns.propTypes=process.env.NODE_ENV!=="production"?{rowGap:cn}:{};ns.filterProps=["rowGap"];const sC=Ke({prop:"gridColumn"}),aC=Ke({prop:"gridRow"}),lC=Ke({prop:"gridAutoFlow"}),cC=Ke({prop:"gridAutoColumns"}),uC=Ke({prop:"gridAutoRows"}),dC=Ke({prop:"gridTemplateColumns"}),fC=Ke({prop:"gridTemplateRows"}),pC=Ke({prop:"gridTemplateAreas"}),hC=Ke({prop:"gridArea"});Qi(es,ts,ns,sC,aC,lC,cC,uC,dC,fC,pC,hC);function Zn(e,t){return t==="grey"?t:e}const mC=Ke({prop:"color",themeKey:"palette",transform:Zn}),gC=Ke({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Zn}),yC=Ke({prop:"backgroundColor",themeKey:"palette",transform:Zn});Qi(mC,gC,yC);function mt(e){return e<=1&&e!==0?`${e*100}%`:e}const bC=Ke({prop:"width",transform:mt}),pl=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const o=e.theme?.breakpoints?.values?.[n]||Yi[n];return o?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:mt(n)}};return Rt(e,e.maxWidth,t)}return null};pl.filterProps=["maxWidth"];const vC=Ke({prop:"minWidth",transform:mt}),xC=Ke({prop:"height",transform:mt}),wC=Ke({prop:"maxHeight",transform:mt}),SC=Ke({prop:"minHeight",transform:mt});Ke({prop:"size",cssProperty:"width",transform:mt});Ke({prop:"size",cssProperty:"height",transform:mt});const EC=Ke({prop:"boxSizing"});Qi(bC,pl,vC,xC,wC,SC,EC);const wr={border:{themeKey:"borders",transform:wt},borderTop:{themeKey:"borders",transform:wt},borderRight:{themeKey:"borders",transform:wt},borderBottom:{themeKey:"borders",transform:wt},borderLeft:{themeKey:"borders",transform:wt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:wt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ji},color:{themeKey:"palette",transform:Zn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Zn},backgroundColor:{themeKey:"palette",transform:Zn},p:{style:Ge},pt:{style:Ge},pr:{style:Ge},pb:{style:Ge},pl:{style:Ge},px:{style:Ge},py:{style:Ge},padding:{style:Ge},paddingTop:{style:Ge},paddingRight:{style:Ge},paddingBottom:{style:Ge},paddingLeft:{style:Ge},paddingX:{style:Ge},paddingY:{style:Ge},paddingInline:{style:Ge},paddingInlineStart:{style:Ge},paddingInlineEnd:{style:Ge},paddingBlock:{style:Ge},paddingBlockStart:{style:Ge},paddingBlockEnd:{style:Ge},m:{style:Ye},mt:{style:Ye},mr:{style:Ye},mb:{style:Ye},ml:{style:Ye},mx:{style:Ye},my:{style:Ye},margin:{style:Ye},marginTop:{style:Ye},marginRight:{style:Ye},marginBottom:{style:Ye},marginLeft:{style:Ye},marginX:{style:Ye},marginY:{style:Ye},marginInline:{style:Ye},marginInlineStart:{style:Ye},marginInlineEnd:{style:Ye},marginBlock:{style:Ye},marginBlockStart:{style:Ye},marginBlockEnd:{style:Ye},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:es},rowGap:{style:ns},columnGap:{style:ts},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:mt},maxWidth:{style:pl},minWidth:{transform:mt},height:{transform:mt},maxHeight:{transform:mt},minHeight:{transform:mt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function CC(...e){const t=e.reduce((o,r)=>o.concat(Object.keys(r)),[]),n=new Set(t);return e.every(o=>n.size===Object.keys(o).length)}function TC(e,t){return typeof e=="function"?e(t):e}function NC(){function e(n,o,r,i){const a={[n]:o,theme:r},l=i[n];if(!l)return{[n]:o};const{cssProperty:c=n,themeKey:u,transform:d,style:f}=l;if(o==null)return null;if(u==="typography"&&o==="inherit")return{[n]:o};const p=Gi(r,u)||{};return f?f(a):Rt(a,o,g=>{let m=yi(p,d,g);return g===m&&typeof g=="string"&&(m=yi(p,d,`${n}${g==="default"?"":me(g)}`,g)),c===!1?m:{[c]:m}})}function t(n){const{sx:o,theme:r={},nested:i}=n||{};if(!o)return null;const a=r.unstable_sxConfig??wr;function l(c){let u=c;if(typeof c=="function")u=c(r);else if(typeof c!="object")return c;if(!u)return null;const d=zp(r.breakpoints),f=Object.keys(d);let p=d;return Object.keys(u).forEach(h=>{const g=TC(u[h],r);if(g!=null)if(typeof g=="object")if(a[h])p=Ho(p,e(h,g,r,a));else{const m=Rt({theme:r},g,v=>({[h]:v}));CC(m,g)?p[h]=t({sx:g,theme:r,nested:!0}):p=Ho(p,m)}else p=Ho(p,e(h,g,r,a))}),!i&&r.modularCssLayers?{"@layer sx":Ou(r,ba(f,p))}:Ou(r,ba(f,p))}return Array.isArray(o)?o.map(l):l(o)}return t}const In=NC();In.filterProps=["sx"];function kC(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function os(e={},...t){const{breakpoints:n={},palette:o={},spacing:r,shape:i={},...a}=e,l=ME(n),c=Hp(r);let u=nt({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:c,shape:{...jE,...i}},a);return u=DE(u),u.applyStyles=kC,u=t.reduce((d,f)=>nt(d,f),u),u.unstable_sxConfig={...wr,...a?.unstable_sxConfig},u.unstable_sx=function(f){return In({sx:f,theme:this})},u}function OC(e){return Object.keys(e).length===0}function PC(e=null){const t=D.useContext(qi);return!t||OC(t)?e:t}const RC=os();function rs(e=RC){return PC(e)}function Hs(e){const t=rn(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Wp({styles:e,themeId:t,defaultTheme:n={}}){const o=rs(n),r=t&&o[t]||o;let i=typeof e=="function"?e(r):e;return r.modularCssLayers&&(Array.isArray(i)?i=i.map(a=>Hs(typeof a=="function"?a(r):a)):i=Hs(i)),T.jsx(Lp,{styles:i})}process.env.NODE_ENV!=="production"&&(Wp.propTypes={defaultTheme:s.object,styles:s.oneOfType([s.array,s.func,s.number,s.object,s.string,s.bool]),themeId:s.string});const _C=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??wr;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function hl(e){const{sx:t,...n}=e,{systemProps:o,otherProps:r}=_C(n);let i;return Array.isArray(t)?i=[o,...t]:typeof t=="function"?i=(...a)=>{const l=t(...a);return zt(l)?{...o,...l}:o}:i={...o,...t},{...r,sx:i}}const _u=e=>e,IC=()=>{let e=_u;return{configure(t){e=t},generate(t){return e(t)},reset(){e=_u}}},Up=IC();function qp(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=qp(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function be(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=qp(e))&&(o&&(o+=" "),o+=t);return o}function MC(e={}){const{themeId:t,defaultTheme:n,defaultClassName:o="MuiBox-root",generateClassName:r}=e,i=Fp("div",{shouldForwardProp:l=>l!=="theme"&&l!=="sx"&&l!=="as"})(In);return D.forwardRef(function(c,u){const d=rs(n),{className:f,component:p="div",...h}=hl(c);return T.jsx(i,{as:p,ref:u,className:be(f,r?r(o):o),theme:t&&d[t]||d,...h})})}const $C={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ke(e,t,n="Mui"){const o=$C[t];return o?`${n}-${o}`:`${Up.generate(e)}-${t}`}function Oe(e,t,n="Mui"){const o={};return t.forEach(r=>{o[r]=ke(e,r,n)}),o}function Yp(e,t=""){return e.displayName||e.name||t}function Iu(e,t,n){const o=Yp(t);return e.displayName||(o!==""?`${n}(${o})`:n)}function AC(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Yp(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Rn.ForwardRef:return Iu(e,e.render,"ForwardRef");case Rn.Memo:return Iu(e,e.type,"memo");default:return}}}function Gp(e){const{variants:t,...n}=e,o={variants:t,style:rn(n),isProcessed:!0};return o.style===n||t&&t.forEach(r=>{typeof r.style!="function"&&(r.style=rn(r.style))}),o}const DC=os();function Ws(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function wn(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function jC(e){return e?(t,n)=>n[e]:null}function LC(e,t,n){e.theme=zC(e.theme)?n:e.theme[t]||e.theme}function ti(e,t,n){const o=typeof t=="function"?t(e):t;if(Array.isArray(o))return o.flatMap(r=>ti(e,r,n));if(Array.isArray(o?.variants)){let r;if(o.isProcessed)r=n?wn(o.style,n):o.style;else{const{variants:i,...a}=o;r=n?wn(rn(a),n):a}return Kp(e,o.variants,[r],n)}return o?.isProcessed?n?wn(rn(o.style),n):o.style:n?wn(rn(o),n):o}function Kp(e,t,n=[],o=void 0){let r;e:for(let i=0;i<t.length;i+=1){const a=t[i];if(typeof a.props=="function"){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(r))continue}else for(const l in a.props)if(e[l]!==a.props[l]&&e.ownerState?.[l]!==a.props[l])continue e;typeof a.style=="function"?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(o?wn(rn(a.style(r)),o):a.style(r))):n.push(o?wn(rn(a.style),o):a.style)}return n}function Xp(e={}){const{themeId:t,defaultTheme:n=DC,rootShouldForwardProp:o=Ws,slotShouldForwardProp:r=Ws}=e;function i(l){LC(l,t,n)}return(l,c={})=>{OE(l,E=>E.filter(k=>k!==In));const{name:u,slot:d,skipVariantsResolver:f,skipSx:p,overridesResolver:h=jC(Zp(d)),...g}=c,m=u&&u.startsWith("Mui")||d?"components":"custom",v=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,b=p||!1;let C=Ws;d==="Root"||d==="root"?C=o:d?C=r:VC(l)&&(C=void 0);const y=Fp(l,{shouldForwardProp:C,label:BC(u,d),...g}),x=E=>{if(E.__emotion_real===E)return E;if(typeof E=="function")return function(R){return ti(R,E,R.theme.modularCssLayers?m:void 0)};if(zt(E)){const k=Gp(E);return function(_){return k.variants?ti(_,k,_.theme.modularCssLayers?m:void 0):_.theme.modularCssLayers?wn(k.style,m):k.style}}return E},w=(...E)=>{const k=[],R=E.map(x),_=[];if(k.push(i),u&&h&&_.push(function(A){const O=A.theme.components?.[u]?.styleOverrides;if(!O)return null;const P={};for(const L in O)P[L]=ti(A,O[L],A.theme.modularCssLayers?"theme":void 0);return h(A,P)}),u&&!v&&_.push(function(A){const O=A.theme?.components?.[u]?.variants;return O?Kp(A,O,[],A.theme.modularCssLayers?"theme":void 0):null}),b||_.push(In),Array.isArray(R[0])){const S=R.shift(),A=new Array(k.length).fill(""),N=new Array(_.length).fill("");let O;O=[...A,...S,...N],O.raw=[...A,...S.raw,...N],k.unshift(O)}const V=[...k,...R,..._],I=y(...V);return l.muiName&&(I.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(I.displayName=FC(u,d,l)),I};return y.withConfig&&(w.withConfig=y.withConfig),w}}function FC(e,t,n){return e?`${e}${me(t||"")}`:`Styled(${AC(n)})`}function BC(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Zp(t||"Root")}`),n}function zC(e){for(const t in e)return!1;return!0}function VC(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Zp(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const HC=Xp();function ar(e,t,n=!1){const o={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")o[i]={...e[i],...o[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],l=t[i];if(!l)o[i]=a||{};else if(!a)o[i]=l;else{o[i]={...l};for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const u=c;o[i][u]=ar(a[u],l[u],n)}}}else i==="className"&&n&&t.className?o.className=be(e?.className,t?.className):i==="style"&&n&&t.style?o.style={...e?.style,...t?.style}:o[i]===void 0&&(o[i]=e[i])}return o}function WC(e){const{theme:t,name:n,props:o}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?o:ar(t.components[n].defaultProps,o)}function UC({props:e,name:t,defaultTheme:n,themeId:o}){let r=rs(n);return o&&(r=r[o]||r),WC({theme:r,name:t,props:e})}const an=typeof window<"u"?D.useLayoutEffect:D.useEffect;function qC(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function ml(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),qC(e,t,n)}function YC(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(o=>o+o)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((o,r)=>r<3?parseInt(o,16):Math.round(parseInt(o,16)/255*1e3)/1e3).join(", ")})`:""}function ln(e){if(e.type)return e;if(e.charAt(0)==="#")return ln(YC(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
14
14
|
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Zt(9,e));let o=e.substring(t+1,e.length-1),r;if(n==="color"){if(o=o.split(" "),r=o.shift(),o.length===4&&o[3].charAt(0)==="/"&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${r}\` color space.
|
|
15
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Zt(10,r))}else o=o.split(",");return o=o.map(i=>parseFloat(i)),{type:n,values:o,colorSpace:r}}const GC=e=>{const t=ln(e);return t.values.slice(0,3).map((n,o)=>t.type.includes("hsl")&&o!==0?`${n}%`:n).join(" ")},$o=(e,t)=>{try{return GC(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function is(e){const{type:t,colorSpace:n}=e;let{values:o}=e;return t.includes("rgb")?o=o.map((r,i)=>i<3?parseInt(r,10):r):t.includes("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),t.includes("color")?o=`${n} ${o.join(" ")}`:o=`${o.join(", ")}`,`${t}(${o})`}function Qp(e){e=ln(e);const{values:t}=e,n=t[0],o=t[1]/100,r=t[2]/100,i=o*Math.min(r,1-r),a=(u,d=(u+n/30)%12)=>r-i*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const c=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),is({type:l,values:c})}function va(e){e=ln(e);let t=e.type==="hsl"||e.type==="hsla"?ln(Qp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Mu(e,t){const n=va(e),o=va(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}function bi(e,t){return e=ln(e),t=ml(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,is(e)}function fn(e,t,n){try{return bi(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function ss(e,t){if(e=ln(e),t=ml(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return is(e)}function je(e,t,n){try{return ss(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function as(e,t){if(e=ln(e),t=ml(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return is(e)}function Le(e,t,n){try{return as(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function KC(e,t=.15){return va(e)>.5?ss(e,t):as(e,t)}function Hr(e,t,n){try{return KC(e,t)}catch{return e}}const XC="exact-prop: ";function Jp(e){return process.env.NODE_ENV==="production"?e:{...e,[XC]:t=>{const n=Object.keys(t).filter(o=>!e.hasOwnProperty(o));return n.length>0?new Error(`The following props are not supported: ${n.map(o=>`\`${o}\``).join(", ")}. Please remove them.`):null}}}const ZC=D.createContext();process.env.NODE_ENV!=="production"&&(s.node,s.bool);const eh=()=>D.useContext(ZC)??!1,QC=D.createContext(void 0);process.env.NODE_ENV!=="production"&&(s.node,s.object);function JC(e){const{theme:t,name:n,props:o}=e;if(!t||!t.components||!t.components[n])return o;const r=t.components[n];return r.defaultProps?ar(r.defaultProps,o,t.components.mergeClassNameAndStyle):!r.styleOverrides&&!r.variants?ar(r,o,t.components.mergeClassNameAndStyle):o}function e1({props:e,name:t}){const n=D.useContext(QC);return JC({props:e,name:t,theme:{components:n}})}let $u=0;function t1(e){const[t,n]=D.useState(e),o=e||t;return D.useEffect(()=>{t==null&&($u+=1,n(`mui-${$u}`))},[t]),o}const n1={...D},Au=n1.useId;function gl(e){if(Au!==void 0){const t=Au();return e??t}return t1(e)}const Du={theme:void 0};function o1(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(Du.theme=r.theme,i=Gp(e(Du)),t=i,n=r.theme),i}}function r1(e=""){function t(...o){if(!o.length)return"";const r=o[0];return typeof r=="string"&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${r}${t(...o.slice(1))})`:`, ${r}`}return(o,...r)=>`var(--${e?`${e}-`:""}${o}${t(...r)})`}const ju=(e,t,n,o=[])=>{let r=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(r)?r[Number(i)]=n:r&&typeof r=="object"&&(r[i]=n):r&&typeof r=="object"&&(r[i]||(r[i]=o.includes(i)?[]:{}),r=r[i])})},i1=(e,t,n)=>{function o(r,i=[],a=[]){Object.entries(r).forEach(([l,c])=>{(!n||n&&!n([...i,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?o(c,[...i,l],Array.isArray(c)?[...a,l]:a):t([...i,l],c,a))})}o(e)},s1=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(o=>e.includes(o))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Us(e,t){const{prefix:n,shouldSkipGeneratingVar:o}=t||{},r={},i={},a={};return i1(e,(l,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!o||!o(l,c))){const d=`--${n?`${n}-`:""}${l.join("-")}`,f=s1(l,c);Object.assign(r,{[d]:f}),ju(i,l,`var(${d})`,u),ju(a,l,`var(${d}, ${f})`,u)}},l=>l[0]==="vars"),{css:r,vars:i,varsWithDefaults:a}}function a1(e,t={}){const{getSelector:n=b,disableCssColorScheme:o,colorSchemeSelector:r,enableContrastVars:i}=t,{colorSchemes:a={},components:l,defaultColorScheme:c="light",...u}=e,{vars:d,css:f,varsWithDefaults:p}=Us(u,t);let h=p;const g={},{[c]:m,...v}=a;if(Object.entries(v||{}).forEach(([x,w])=>{const{vars:E,css:k,varsWithDefaults:R}=Us(w,t);h=nt(h,R),g[x]={css:k,vars:E}}),m){const{css:x,vars:w,varsWithDefaults:E}=Us(m,t);h=nt(h,E),g[c]={css:x,vars:w}}function b(x,w){let E=r;if(r==="class"&&(E=".%s"),r==="data"&&(E="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(E=`[${r}="%s"]`),x){if(E==="media")return e.defaultColorScheme===x?":root":{[`@media (prefers-color-scheme: ${a[x]?.palette?.mode||x})`]:{":root":w}};if(E)return e.defaultColorScheme===x?`:root, ${E.replace("%s",String(x))}`:E.replace("%s",String(x))}return":root"}return{vars:h,generateThemeVars:()=>{let x={...d};return Object.entries(g).forEach(([,{vars:w}])=>{x=nt(x,w)}),x},generateStyleSheets:()=>{const x=[],w=e.defaultColorScheme||"light";function E(_,V){Object.keys(V).length&&x.push(typeof _=="string"?{[_]:{...V}}:_)}E(n(void 0,{...f}),f);const{[w]:k,...R}=g;if(k){const{css:_}=k,V=a[w]?.palette?.mode,I=!o&&V?{colorScheme:V,..._}:{..._};E(n(w,{...I}),I)}return Object.entries(R).forEach(([_,{css:V}])=>{const I=a[_]?.palette?.mode,S=!o&&I?{colorScheme:I,...V}:{...V};E(n(_,{...S}),S)}),i&&x.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),x}}}function l1(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}function Pe(e,t,n=void 0){const o={};for(const r in e){const i=e[r];let a="",l=!0;for(let c=0;c<i.length;c+=1){const u=i[c];u&&(a+=(l===!0?"":" ")+t(u),l=!1,n&&n[u]&&(a+=" "+n[u]))}o[r]=a}return o}function qs(e,t){return D.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const c1=os(),u1=HC("div",{name:"MuiStack",slot:"Root"});function d1(e){return UC({props:e,name:"MuiStack",defaultTheme:c1})}function f1(e,t){const n=D.Children.toArray(e).filter(Boolean);return n.reduce((o,r,i)=>(o.push(r),i<n.length-1&&o.push(D.cloneElement(t,{key:`separator-${i}`})),o),[])}const p1=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],h1=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...Rt({theme:t},Vs({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o}))};if(e.spacing){const o=Zi(t),r=Object.keys(t.breakpoints.values).reduce((c,u)=>((typeof e.spacing=="object"&&e.spacing[u]!=null||typeof e.direction=="object"&&e.direction[u]!=null)&&(c[u]=!0),c),{}),i=Vs({values:e.direction,base:r}),a=Vs({values:e.spacing,base:r});typeof i=="object"&&Object.keys(i).forEach((c,u,d)=>{if(!i[c]){const p=u>0?i[d[u-1]]:"column";i[c]=p}}),n=nt(n,Rt({theme:t},a,(c,u)=>e.useFlexGap?{gap:_n(o,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${p1(u?i[u]:e.direction)}`]:_n(o,c)}}))}return n=FE(t.breakpoints,n),n};function m1(e={}){const{createStyledComponent:t=u1,useThemeProps:n=d1,componentName:o="MuiStack"}=e,r=()=>Pe({root:["root"]},c=>Ne(o,c),{}),i=t(h1),a=D.forwardRef(function(c,u){const d=n(c),f=hl(d),{component:p="div",direction:h="column",spacing:g=0,divider:m,children:v,className:b,useFlexGap:C=!1,...y}=f,x={direction:h,spacing:g,useFlexGap:C},w=r();return T.jsx(i,{as:p,ownerState:x,ref:u,className:be(w.root,b),...y,children:m?f1(v,m):v})});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:s.node,direction:s.oneOfType([s.oneOf(["column-reverse","column","row-reverse","row"]),s.arrayOf(s.oneOf(["column-reverse","column","row-reverse","row"])),s.object]),divider:s.node,spacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])}),a}function th(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:or.white,default:or.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const nh=th();function oh(){return{text:{primary:or.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:or.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const xa=oh();function Lu(e,t,n,o){const r=o.light||o,i=o.dark||o*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=as(e.main,r):t==="dark"&&(e.dark=ss(e.main,i)))}function Fu(e,t,n,o,r){const i=r.light||r,a=r.dark||r*1.5;t[n]||(t.hasOwnProperty(o)?t[n]=t[o]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(i*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(a*100).toFixed(0)}%)`))}function g1(e="light"){return e==="dark"?{main:Ln[200],light:Ln[50],dark:Ln[400]}:{main:Ln[700],light:Ln[400],dark:Ln[800]}}function y1(e="light"){return e==="dark"?{main:jn[200],light:jn[50],dark:jn[400]}:{main:jn[500],light:jn[300],dark:jn[700]}}function b1(e="light"){return e==="dark"?{main:Dn[500],light:Dn[300],dark:Dn[700]}:{main:Dn[700],light:Dn[400],dark:Dn[800]}}function v1(e="light"){return e==="dark"?{main:Fn[400],light:Fn[300],dark:Fn[700]}:{main:Fn[700],light:Fn[500],dark:Fn[900]}}function x1(e="light"){return e==="dark"?{main:Bn[400],light:Bn[300],dark:Bn[700]}:{main:Bn[800],light:Bn[500],dark:Bn[900]}}function w1(e="light"){return e==="dark"?{main:Eo[400],light:Eo[300],dark:Eo[700]}:{main:"#ed6c02",light:Eo[500],dark:Eo[900]}}function S1(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function yl(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2,colorSpace:r,...i}=e,a=e.primary||g1(t),l=e.secondary||y1(t),c=e.error||b1(t),u=e.info||v1(t),d=e.success||x1(t),f=e.warning||w1(t);function p(v){if(r)return S1(v);const b=Mu(v,xa.text.primary)>=n?xa.text.primary:nh.text.primary;if(process.env.NODE_ENV!=="production"){const C=Mu(v,b);C<3&&console.error([`MUI: The contrast ratio of ${C}:1 for ${b} on ${v}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
15
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Zt(10,r))}else o=o.split(",");return o=o.map(i=>parseFloat(i)),{type:n,values:o,colorSpace:r}}const GC=e=>{const t=ln(e);return t.values.slice(0,3).map((n,o)=>t.type.includes("hsl")&&o!==0?`${n}%`:n).join(" ")},$o=(e,t)=>{try{return GC(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function is(e){const{type:t,colorSpace:n}=e;let{values:o}=e;return t.includes("rgb")?o=o.map((r,i)=>i<3?parseInt(r,10):r):t.includes("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),t.includes("color")?o=`${n} ${o.join(" ")}`:o=`${o.join(", ")}`,`${t}(${o})`}function Qp(e){e=ln(e);const{values:t}=e,n=t[0],o=t[1]/100,r=t[2]/100,i=o*Math.min(r,1-r),a=(u,d=(u+n/30)%12)=>r-i*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const c=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),is({type:l,values:c})}function va(e){e=ln(e);let t=e.type==="hsl"||e.type==="hsla"?ln(Qp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Mu(e,t){const n=va(e),o=va(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}function bi(e,t){return e=ln(e),t=ml(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,is(e)}function fn(e,t,n){try{return bi(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function ss(e,t){if(e=ln(e),t=ml(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return is(e)}function je(e,t,n){try{return ss(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function as(e,t){if(e=ln(e),t=ml(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return is(e)}function Le(e,t,n){try{return as(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function KC(e,t=.15){return va(e)>.5?ss(e,t):as(e,t)}function Hr(e,t,n){try{return KC(e,t)}catch{return e}}const XC="exact-prop: ";function Jp(e){return process.env.NODE_ENV==="production"?e:{...e,[XC]:t=>{const n=Object.keys(t).filter(o=>!e.hasOwnProperty(o));return n.length>0?new Error(`The following props are not supported: ${n.map(o=>`\`${o}\``).join(", ")}. Please remove them.`):null}}}const ZC=D.createContext();process.env.NODE_ENV!=="production"&&(s.node,s.bool);const eh=()=>D.useContext(ZC)??!1,QC=D.createContext(void 0);process.env.NODE_ENV!=="production"&&(s.node,s.object);function JC(e){const{theme:t,name:n,props:o}=e;if(!t||!t.components||!t.components[n])return o;const r=t.components[n];return r.defaultProps?ar(r.defaultProps,o,t.components.mergeClassNameAndStyle):!r.styleOverrides&&!r.variants?ar(r,o,t.components.mergeClassNameAndStyle):o}function e1({props:e,name:t}){const n=D.useContext(QC);return JC({props:e,name:t,theme:{components:n}})}let $u=0;function t1(e){const[t,n]=D.useState(e),o=e||t;return D.useEffect(()=>{t==null&&($u+=1,n(`mui-${$u}`))},[t]),o}const n1={...D},Au=n1.useId;function gl(e){if(Au!==void 0){const t=Au();return e??t}return t1(e)}const Du={theme:void 0};function o1(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(Du.theme=r.theme,i=Gp(e(Du)),t=i,n=r.theme),i}}function r1(e=""){function t(...o){if(!o.length)return"";const r=o[0];return typeof r=="string"&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${r}${t(...o.slice(1))})`:`, ${r}`}return(o,...r)=>`var(--${e?`${e}-`:""}${o}${t(...r)})`}const ju=(e,t,n,o=[])=>{let r=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(r)?r[Number(i)]=n:r&&typeof r=="object"&&(r[i]=n):r&&typeof r=="object"&&(r[i]||(r[i]=o.includes(i)?[]:{}),r=r[i])})},i1=(e,t,n)=>{function o(r,i=[],a=[]){Object.entries(r).forEach(([l,c])=>{(!n||n&&!n([...i,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?o(c,[...i,l],Array.isArray(c)?[...a,l]:a):t([...i,l],c,a))})}o(e)},s1=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(o=>e.includes(o))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Us(e,t){const{prefix:n,shouldSkipGeneratingVar:o}=t||{},r={},i={},a={};return i1(e,(l,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!o||!o(l,c))){const d=`--${n?`${n}-`:""}${l.join("-")}`,f=s1(l,c);Object.assign(r,{[d]:f}),ju(i,l,`var(${d})`,u),ju(a,l,`var(${d}, ${f})`,u)}},l=>l[0]==="vars"),{css:r,vars:i,varsWithDefaults:a}}function a1(e,t={}){const{getSelector:n=b,disableCssColorScheme:o,colorSchemeSelector:r,enableContrastVars:i}=t,{colorSchemes:a={},components:l,defaultColorScheme:c="light",...u}=e,{vars:d,css:f,varsWithDefaults:p}=Us(u,t);let h=p;const g={},{[c]:m,...v}=a;if(Object.entries(v||{}).forEach(([x,w])=>{const{vars:E,css:k,varsWithDefaults:R}=Us(w,t);h=nt(h,R),g[x]={css:k,vars:E}}),m){const{css:x,vars:w,varsWithDefaults:E}=Us(m,t);h=nt(h,E),g[c]={css:x,vars:w}}function b(x,w){let E=r;if(r==="class"&&(E=".%s"),r==="data"&&(E="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(E=`[${r}="%s"]`),x){if(E==="media")return e.defaultColorScheme===x?":root":{[`@media (prefers-color-scheme: ${a[x]?.palette?.mode||x})`]:{":root":w}};if(E)return e.defaultColorScheme===x?`:root, ${E.replace("%s",String(x))}`:E.replace("%s",String(x))}return":root"}return{vars:h,generateThemeVars:()=>{let x={...d};return Object.entries(g).forEach(([,{vars:w}])=>{x=nt(x,w)}),x},generateStyleSheets:()=>{const x=[],w=e.defaultColorScheme||"light";function E(_,V){Object.keys(V).length&&x.push(typeof _=="string"?{[_]:{...V}}:_)}E(n(void 0,{...f}),f);const{[w]:k,...R}=g;if(k){const{css:_}=k,V=a[w]?.palette?.mode,I=!o&&V?{colorScheme:V,..._}:{..._};E(n(w,{...I}),I)}return Object.entries(R).forEach(([_,{css:V}])=>{const I=a[_]?.palette?.mode,S=!o&&I?{colorScheme:I,...V}:{...V};E(n(_,{...S}),S)}),i&&x.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),x}}}function l1(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}function Pe(e,t,n=void 0){const o={};for(const r in e){const i=e[r];let a="",l=!0;for(let c=0;c<i.length;c+=1){const u=i[c];u&&(a+=(l===!0?"":" ")+t(u),l=!1,n&&n[u]&&(a+=" "+n[u]))}o[r]=a}return o}function qs(e,t){return D.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const c1=os(),u1=HC("div",{name:"MuiStack",slot:"Root"});function d1(e){return UC({props:e,name:"MuiStack",defaultTheme:c1})}function f1(e,t){const n=D.Children.toArray(e).filter(Boolean);return n.reduce((o,r,i)=>(o.push(r),i<n.length-1&&o.push(D.cloneElement(t,{key:`separator-${i}`})),o),[])}const p1=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],h1=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...Rt({theme:t},Vs({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o}))};if(e.spacing){const o=Zi(t),r=Object.keys(t.breakpoints.values).reduce((c,u)=>((typeof e.spacing=="object"&&e.spacing[u]!=null||typeof e.direction=="object"&&e.direction[u]!=null)&&(c[u]=!0),c),{}),i=Vs({values:e.direction,base:r}),a=Vs({values:e.spacing,base:r});typeof i=="object"&&Object.keys(i).forEach((c,u,d)=>{if(!i[c]){const p=u>0?i[d[u-1]]:"column";i[c]=p}}),n=nt(n,Rt({theme:t},a,(c,u)=>e.useFlexGap?{gap:_n(o,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${p1(u?i[u]:e.direction)}`]:_n(o,c)}}))}return n=FE(t.breakpoints,n),n};function m1(e={}){const{createStyledComponent:t=u1,useThemeProps:n=d1,componentName:o="MuiStack"}=e,r=()=>Pe({root:["root"]},c=>ke(o,c),{}),i=t(h1),a=D.forwardRef(function(c,u){const d=n(c),f=hl(d),{component:p="div",direction:h="column",spacing:g=0,divider:m,children:v,className:b,useFlexGap:C=!1,...y}=f,x={direction:h,spacing:g,useFlexGap:C},w=r();return T.jsx(i,{as:p,ownerState:x,ref:u,className:be(w.root,b),...y,children:m?f1(v,m):v})});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:s.node,direction:s.oneOfType([s.oneOf(["column-reverse","column","row-reverse","row"]),s.arrayOf(s.oneOf(["column-reverse","column","row-reverse","row"])),s.object]),divider:s.node,spacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])}),a}function th(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:or.white,default:or.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const nh=th();function oh(){return{text:{primary:or.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:or.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const xa=oh();function Lu(e,t,n,o){const r=o.light||o,i=o.dark||o*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=as(e.main,r):t==="dark"&&(e.dark=ss(e.main,i)))}function Fu(e,t,n,o,r){const i=r.light||r,a=r.dark||r*1.5;t[n]||(t.hasOwnProperty(o)?t[n]=t[o]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(i*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(a*100).toFixed(0)}%)`))}function g1(e="light"){return e==="dark"?{main:Ln[200],light:Ln[50],dark:Ln[400]}:{main:Ln[700],light:Ln[400],dark:Ln[800]}}function y1(e="light"){return e==="dark"?{main:jn[200],light:jn[50],dark:jn[400]}:{main:jn[500],light:jn[300],dark:jn[700]}}function b1(e="light"){return e==="dark"?{main:Dn[500],light:Dn[300],dark:Dn[700]}:{main:Dn[700],light:Dn[400],dark:Dn[800]}}function v1(e="light"){return e==="dark"?{main:Fn[400],light:Fn[300],dark:Fn[700]}:{main:Fn[700],light:Fn[500],dark:Fn[900]}}function x1(e="light"){return e==="dark"?{main:Bn[400],light:Bn[300],dark:Bn[700]}:{main:Bn[800],light:Bn[500],dark:Bn[900]}}function w1(e="light"){return e==="dark"?{main:Eo[400],light:Eo[300],dark:Eo[700]}:{main:"#ed6c02",light:Eo[500],dark:Eo[900]}}function S1(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function yl(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2,colorSpace:r,...i}=e,a=e.primary||g1(t),l=e.secondary||y1(t),c=e.error||b1(t),u=e.info||v1(t),d=e.success||x1(t),f=e.warning||w1(t);function p(v){if(r)return S1(v);const b=Mu(v,xa.text.primary)>=n?xa.text.primary:nh.text.primary;if(process.env.NODE_ENV!=="production"){const C=Mu(v,b);C<3&&console.error([`MUI: The contrast ratio of ${C}:1 for ${b} on ${v}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
16
16
|
`))}return b}const h=({color:v,name:b,mainShade:C=500,lightShade:y=300,darkShade:x=700})=>{if(v={...v},!v.main&&v[C]&&(v.main=v[C]),!v.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
|
|
17
17
|
The color object needs to have a \`main\` property or a \`${C}\` property.`:Zt(11,b?` (${b})`:"",C));if(typeof v.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
|
|
18
18
|
\`color.main\` should be a string, but \`${JSON.stringify(v.main)}\` was provided instead.
|
|
@@ -35,13 +35,13 @@ const theme = ${JSON.stringify(t,null,2)};
|
|
|
35
35
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
36
36
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
37
37
|
|
|
38
|
-
export default theme;`}function Hu(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const j1=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let o=0;o<t.length;o+=1)n+=+t[o];return n};function L1(e){Object.assign(e,{alpha(t,n){const o=this||e;return o.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:o.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:bi(t,j1(n))},lighten(t,n){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${t}, #fff ${Hu(n)})`:as(t,n)},darken(t,n){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${t}, #000 ${Hu(n)})`:ss(t,n)}})}function wa(e={},...t){const{breakpoints:n,mixins:o={},spacing:r,palette:i={},transitions:a={},typography:l={},shape:c,colorSpace:u,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Zt(20));const f=yl({...i,colorSpace:u}),p=os(e);let h=nt(p,{mixins:C1(p.breakpoints,o),palette:f,shadows:R1.slice(),typography:N1(f,l),transitions:$1(a),zIndex:{...A1}});if(h=nt(h,d),h=t.reduce((g,m)=>nt(g,m),h),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],m=(v,b)=>{let C;for(C in v){const y=v[C];if(g.includes(C)&&Object.keys(y).length>0){if(process.env.NODE_ENV!=="production"){const x=
|
|
38
|
+
export default theme;`}function Hu(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const j1=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let o=0;o<t.length;o+=1)n+=+t[o];return n};function L1(e){Object.assign(e,{alpha(t,n){const o=this||e;return o.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:o.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:bi(t,j1(n))},lighten(t,n){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${t}, #fff ${Hu(n)})`:as(t,n)},darken(t,n){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${t}, #000 ${Hu(n)})`:ss(t,n)}})}function wa(e={},...t){const{breakpoints:n,mixins:o={},spacing:r,palette:i={},transitions:a={},typography:l={},shape:c,colorSpace:u,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Zt(20));const f=yl({...i,colorSpace:u}),p=os(e);let h=nt(p,{mixins:C1(p.breakpoints,o),palette:f,shadows:R1.slice(),typography:N1(f,l),transitions:$1(a),zIndex:{...A1}});if(h=nt(h,d),h=t.reduce((g,m)=>nt(g,m),h),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],m=(v,b)=>{let C;for(C in v){const y=v[C];if(g.includes(C)&&Object.keys(y).length>0){if(process.env.NODE_ENV!=="production"){const x=ke("",C);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${C}\` internal state.`,"You can not override it like this: ",JSON.stringify(v,null,2),"",`Instead, you need to use the '&.${x}' syntax:`,JSON.stringify({root:{[`&.${x}`]:y}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
39
39
|
`))}v[C]={}}}};Object.keys(h.components).forEach(v=>{const b=h.components[v].styleOverrides;b&&v.startsWith("Mui")&&m(b,v)})}return h.unstable_sxConfig={...wr,...d?.unstable_sxConfig},h.unstable_sx=function(m){return In({sx:m,theme:this})},h.toRuntimeSource=rh,L1(h),h}function Sa(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const F1=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Sa(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function ih(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function sh(e){return e==="dark"?F1:[]}function B1(e){const{palette:t={mode:"light"},opacity:n,overlays:o,colorSpace:r,...i}=e,a=yl({...t,colorSpace:r});return{palette:a,opacity:{...ih(a.mode),...n},overlays:o||sh(a.mode),...i}}function z1(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const V1=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],H1=e=>(t,n)=>{const o=e.rootSelector||":root",r=e.colorSchemeSelector;let i=r;if(r==="class"&&(i=".%s"),r==="data"&&(i="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(i=`[${r}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return V1(e.cssVarPrefix).forEach(l=>{a[l]=n[l],delete n[l]}),i==="media"?{[o]:n,"@media (prefers-color-scheme: dark)":{[o]:a}}:i?{[i.replace("%s",t)]:a,[`${o}, ${i.replace("%s",t)}`]:n}:{[o]:{...n,...a}}}if(i&&i!=="media")return`${o}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[o]:n}};if(i)return i.replace("%s",String(t))}return o};function W1(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function Y(e,t,n){!e[t]&&n&&(e[t]=n)}function Ao(e){return typeof e!="string"||!e.startsWith("hsl")?e:Qp(e)}function Yt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=$o(Ao(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
40
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function U1(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const At=e=>{try{return e()}catch{}},q1=(e="mui")=>r1(e);function Ys(e,t,n,o,r){if(!n)return;n=n===!0?{}:n;const i=r==="dark"?"dark":"light";if(!o){t[r]=B1({...n,palette:{mode:i,...n?.palette},colorSpace:e});return}const{palette:a,...l}=wa({...o,palette:{mode:i,...n?.palette},colorSpace:e});return t[r]={...n,palette:a,opacity:{...ih(i),...n?.opacity},overlays:n?.overlays||sh(i)},l}function Y1(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:o,disableCssColorScheme:r=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:l=z1,colorSchemeSelector:c=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...d}=e,f=Object.keys(n)[0],p=o||(n.light&&f!=="light"?"light":f),h=q1(i),{[p]:g,light:m,dark:v,...b}=n,C={...b};let y=g;if((p==="dark"&&!("dark"in n)||p==="light"&&!("light"in n))&&(y=!0),!y)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:Zt(21,p));let x;a&&(x="oklch");const w=Ys(x,C,y,d,p);m&&!C.light&&Ys(x,C,m,void 0,"light"),v&&!C.dark&&Ys(x,C,v,void 0,"dark");let E={defaultColorScheme:p,...w,cssVarPrefix:i,colorSchemeSelector:c,rootSelector:u,getCssVar:h,colorSchemes:C,font:{...E1(w.typography),...w.font},spacing:U1(d.spacing)};Object.keys(E.colorSchemes).forEach(I=>{const S=E.colorSchemes[I].palette,A=O=>{const P=O.split("-"),L=P[1],M=P[2];return h(O,S[L][M])};S.mode==="light"&&(Y(S.common,"background","#fff"),Y(S.common,"onBackground","#000")),S.mode==="dark"&&(Y(S.common,"background","#000"),Y(S.common,"onBackground","#fff"));function N(O,P,L){if(x){let M;return O===fn&&(M=`transparent ${((1-L)*100).toFixed(0)}%`),O===je&&(M=`#000 ${(L*100).toFixed(0)}%`),O===Le&&(M=`#fff ${(L*100).toFixed(0)}%`),`color-mix(in ${x}, ${P}, ${M})`}return O(P,L)}if(W1(S,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),S.mode==="light"){Y(S.Alert,"errorColor",N(je,S.error.light,.6)),Y(S.Alert,"infoColor",N(je,S.info.light,.6)),Y(S.Alert,"successColor",N(je,S.success.light,.6)),Y(S.Alert,"warningColor",N(je,S.warning.light,.6)),Y(S.Alert,"errorFilledBg",A("palette-error-main")),Y(S.Alert,"infoFilledBg",A("palette-info-main")),Y(S.Alert,"successFilledBg",A("palette-success-main")),Y(S.Alert,"warningFilledBg",A("palette-warning-main")),Y(S.Alert,"errorFilledColor",At(()=>S.getContrastText(S.error.main))),Y(S.Alert,"infoFilledColor",At(()=>S.getContrastText(S.info.main))),Y(S.Alert,"successFilledColor",At(()=>S.getContrastText(S.success.main))),Y(S.Alert,"warningFilledColor",At(()=>S.getContrastText(S.warning.main))),Y(S.Alert,"errorStandardBg",N(Le,S.error.light,.9)),Y(S.Alert,"infoStandardBg",N(Le,S.info.light,.9)),Y(S.Alert,"successStandardBg",N(Le,S.success.light,.9)),Y(S.Alert,"warningStandardBg",N(Le,S.warning.light,.9)),Y(S.Alert,"errorIconColor",A("palette-error-main")),Y(S.Alert,"infoIconColor",A("palette-info-main")),Y(S.Alert,"successIconColor",A("palette-success-main")),Y(S.Alert,"warningIconColor",A("palette-warning-main")),Y(S.AppBar,"defaultBg",A("palette-grey-100")),Y(S.Avatar,"defaultBg",A("palette-grey-400")),Y(S.Button,"inheritContainedBg",A("palette-grey-300")),Y(S.Button,"inheritContainedHoverBg",A("palette-grey-A100")),Y(S.Chip,"defaultBorder",A("palette-grey-400")),Y(S.Chip,"defaultAvatarColor",A("palette-grey-700")),Y(S.Chip,"defaultIconColor",A("palette-grey-700")),Y(S.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Y(S.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Y(S.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Y(S.LinearProgress,"primaryBg",N(Le,S.primary.main,.62)),Y(S.LinearProgress,"secondaryBg",N(Le,S.secondary.main,.62)),Y(S.LinearProgress,"errorBg",N(Le,S.error.main,.62)),Y(S.LinearProgress,"infoBg",N(Le,S.info.main,.62)),Y(S.LinearProgress,"successBg",N(Le,S.success.main,.62)),Y(S.LinearProgress,"warningBg",N(Le,S.warning.main,.62)),Y(S.Skeleton,"bg",x?N(fn,S.text.primary,.11):`rgba(${A("palette-text-primaryChannel")} / 0.11)`),Y(S.Slider,"primaryTrack",N(Le,S.primary.main,.62)),Y(S.Slider,"secondaryTrack",N(Le,S.secondary.main,.62)),Y(S.Slider,"errorTrack",N(Le,S.error.main,.62)),Y(S.Slider,"infoTrack",N(Le,S.info.main,.62)),Y(S.Slider,"successTrack",N(Le,S.success.main,.62)),Y(S.Slider,"warningTrack",N(Le,S.warning.main,.62));const O=x?N(je,S.background.default,.6825):Hr(S.background.default,.8);Y(S.SnackbarContent,"bg",O),Y(S.SnackbarContent,"color",At(()=>x?xa.text.primary:S.getContrastText(O))),Y(S.SpeedDialAction,"fabHoverBg",Hr(S.background.paper,.15)),Y(S.StepConnector,"border",A("palette-grey-400")),Y(S.StepContent,"border",A("palette-grey-400")),Y(S.Switch,"defaultColor",A("palette-common-white")),Y(S.Switch,"defaultDisabledColor",A("palette-grey-100")),Y(S.Switch,"primaryDisabledColor",N(Le,S.primary.main,.62)),Y(S.Switch,"secondaryDisabledColor",N(Le,S.secondary.main,.62)),Y(S.Switch,"errorDisabledColor",N(Le,S.error.main,.62)),Y(S.Switch,"infoDisabledColor",N(Le,S.info.main,.62)),Y(S.Switch,"successDisabledColor",N(Le,S.success.main,.62)),Y(S.Switch,"warningDisabledColor",N(Le,S.warning.main,.62)),Y(S.TableCell,"border",N(Le,N(fn,S.divider,1),.88)),Y(S.Tooltip,"bg",N(fn,S.grey[700],.92))}if(S.mode==="dark"){Y(S.Alert,"errorColor",N(Le,S.error.light,.6)),Y(S.Alert,"infoColor",N(Le,S.info.light,.6)),Y(S.Alert,"successColor",N(Le,S.success.light,.6)),Y(S.Alert,"warningColor",N(Le,S.warning.light,.6)),Y(S.Alert,"errorFilledBg",A("palette-error-dark")),Y(S.Alert,"infoFilledBg",A("palette-info-dark")),Y(S.Alert,"successFilledBg",A("palette-success-dark")),Y(S.Alert,"warningFilledBg",A("palette-warning-dark")),Y(S.Alert,"errorFilledColor",At(()=>S.getContrastText(S.error.dark))),Y(S.Alert,"infoFilledColor",At(()=>S.getContrastText(S.info.dark))),Y(S.Alert,"successFilledColor",At(()=>S.getContrastText(S.success.dark))),Y(S.Alert,"warningFilledColor",At(()=>S.getContrastText(S.warning.dark))),Y(S.Alert,"errorStandardBg",N(je,S.error.light,.9)),Y(S.Alert,"infoStandardBg",N(je,S.info.light,.9)),Y(S.Alert,"successStandardBg",N(je,S.success.light,.9)),Y(S.Alert,"warningStandardBg",N(je,S.warning.light,.9)),Y(S.Alert,"errorIconColor",A("palette-error-main")),Y(S.Alert,"infoIconColor",A("palette-info-main")),Y(S.Alert,"successIconColor",A("palette-success-main")),Y(S.Alert,"warningIconColor",A("palette-warning-main")),Y(S.AppBar,"defaultBg",A("palette-grey-900")),Y(S.AppBar,"darkBg",A("palette-background-paper")),Y(S.AppBar,"darkColor",A("palette-text-primary")),Y(S.Avatar,"defaultBg",A("palette-grey-600")),Y(S.Button,"inheritContainedBg",A("palette-grey-800")),Y(S.Button,"inheritContainedHoverBg",A("palette-grey-700")),Y(S.Chip,"defaultBorder",A("palette-grey-700")),Y(S.Chip,"defaultAvatarColor",A("palette-grey-300")),Y(S.Chip,"defaultIconColor",A("palette-grey-300")),Y(S.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Y(S.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Y(S.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Y(S.LinearProgress,"primaryBg",N(je,S.primary.main,.5)),Y(S.LinearProgress,"secondaryBg",N(je,S.secondary.main,.5)),Y(S.LinearProgress,"errorBg",N(je,S.error.main,.5)),Y(S.LinearProgress,"infoBg",N(je,S.info.main,.5)),Y(S.LinearProgress,"successBg",N(je,S.success.main,.5)),Y(S.LinearProgress,"warningBg",N(je,S.warning.main,.5)),Y(S.Skeleton,"bg",x?N(fn,S.text.primary,.13):`rgba(${A("palette-text-primaryChannel")} / 0.13)`),Y(S.Slider,"primaryTrack",N(je,S.primary.main,.5)),Y(S.Slider,"secondaryTrack",N(je,S.secondary.main,.5)),Y(S.Slider,"errorTrack",N(je,S.error.main,.5)),Y(S.Slider,"infoTrack",N(je,S.info.main,.5)),Y(S.Slider,"successTrack",N(je,S.success.main,.5)),Y(S.Slider,"warningTrack",N(je,S.warning.main,.5));const O=x?N(Le,S.background.default,.985):Hr(S.background.default,.98);Y(S.SnackbarContent,"bg",O),Y(S.SnackbarContent,"color",At(()=>x?nh.text.primary:S.getContrastText(O))),Y(S.SpeedDialAction,"fabHoverBg",Hr(S.background.paper,.15)),Y(S.StepConnector,"border",A("palette-grey-600")),Y(S.StepContent,"border",A("palette-grey-600")),Y(S.Switch,"defaultColor",A("palette-grey-300")),Y(S.Switch,"defaultDisabledColor",A("palette-grey-600")),Y(S.Switch,"primaryDisabledColor",N(je,S.primary.main,.55)),Y(S.Switch,"secondaryDisabledColor",N(je,S.secondary.main,.55)),Y(S.Switch,"errorDisabledColor",N(je,S.error.main,.55)),Y(S.Switch,"infoDisabledColor",N(je,S.info.main,.55)),Y(S.Switch,"successDisabledColor",N(je,S.success.main,.55)),Y(S.Switch,"warningDisabledColor",N(je,S.warning.main,.55)),Y(S.TableCell,"border",N(je,N(fn,S.divider,1),.68)),Y(S.Tooltip,"bg",N(fn,S.grey[700],.92))}Yt(S.background,"default"),Yt(S.background,"paper"),Yt(S.common,"background"),Yt(S.common,"onBackground"),Yt(S,"divider"),Object.keys(S).forEach(O=>{const P=S[O];O!=="tonalOffset"&&P&&typeof P=="object"&&(P.main&&Y(S[O],"mainChannel",$o(Ao(P.main))),P.light&&Y(S[O],"lightChannel",$o(Ao(P.light))),P.dark&&Y(S[O],"darkChannel",$o(Ao(P.dark))),P.contrastText&&Y(S[O],"contrastTextChannel",$o(Ao(P.contrastText))),O==="text"&&(Yt(S[O],"primary"),Yt(S[O],"secondary")),O==="action"&&(P.active&&Yt(S[O],"active"),P.selected&&Yt(S[O],"selected")))})}),E=t.reduce((I,S)=>nt(I,S),E);const k={prefix:i,disableCssColorScheme:r,shouldSkipGeneratingVar:l,getSelector:H1(E),enableContrastVars:a},{vars:R,generateThemeVars:_,generateStyleSheets:V}=a1(E,k);return E.vars=R,Object.entries(E.colorSchemes[E.defaultColorScheme]).forEach(([I,S])=>{E[I]=S}),E.generateThemeVars=_,E.generateStyleSheets=V,E.generateSpacing=function(){return Hp(d.spacing,Zi(this))},E.getColorSchemeSelector=l1(c),E.spacing=E.generateSpacing(),E.shouldSkipGeneratingVar=l,E.unstable_sxConfig={...wr,...d?.unstable_sxConfig},E.unstable_sx=function(S){return In({sx:S,theme:this})},E.toRuntimeSource=rh,E}function Wu(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:yl({...n===!0?{}:n.palette,mode:t})})}function ah(e={},...t){const{palette:n,cssVariables:o=!1,colorSchemes:r=n?void 0:{light:!0},defaultColorScheme:i=n?.mode,...a}=e,l=i||"light",c=r?.[l],u={...r,...n?{[l]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(o===!1){if(!("colorSchemes"in e))return wa(e,...t);let d=n;"palette"in e||u[l]&&(u[l]!==!0?d=u[l].palette:l==="dark"&&(d={mode:"dark"}));const f=wa({...e,palette:d},...t);return f.defaultColorScheme=l,f.colorSchemes=u,f.palette.mode==="light"&&(f.colorSchemes.light={...u.light!==!0&&u.light,palette:f.palette},Wu(f,"dark",u.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:f.palette},Wu(f,"light",u.light)),f}return!n&&!("light"in u)&&l==="light"&&(u.light=!0),Y1({...a,colorSchemes:u,defaultColorScheme:l,...typeof o!="boolean"&&o},...t)}const bl=ah();function Sr(){const e=rs(bl);return process.env.NODE_ENV!=="production"&&D.useDebugValue(e),e[Vi]||e}function lh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const dt=e=>lh(e)&&e!=="classes",le=Xp({themeId:Vi,defaultTheme:bl,rootShouldForwardProp:dt});function Uu(...e){return e.reduce((t,n)=>n==null?t:function(...r){t.apply(this,r),n.apply(this,r)},()=>{})}function ch(e){return T.jsx(Wp,{...e,defaultTheme:bl,themeId:Vi})}process.env.NODE_ENV!=="production"&&(ch.propTypes={styles:s.oneOfType([s.array,s.func,s.number,s.object,s.string,s.bool])});function G1(e){return function(n){return T.jsx(ch,{styles:typeof e=="function"?o=>e({theme:o,...n}):e})}}function K1(){return hl}const Te=o1;process.env.NODE_ENV!=="production"&&(s.node,s.object.isRequired);function Ie(e){return e1(e)}function X1(e){return Ne("MuiSvgIcon",e)}Oe("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Z1=e=>{const{color:t,fontSize:n,classes:o}=e,r={root:["root",t!=="inherit"&&`color${ge(t)}`,`fontSize${ge(n)}`]};return Pe(r,X1,o)},Q1=le("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ge(n.color)}`],t[`fontSize${ge(n.fontSize)}`]]}})(Te(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),vi=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiSvgIcon"}),{children:r,className:i,color:a="inherit",component:l="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:p="0 0 24 24",...h}=o,g=D.isValidElement(r)&&r.type==="svg",m={...o,color:a,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:g},v={};d||(v.viewBox=p);const b=Z1(m);return T.jsxs(Q1,{as:l,className:be(b.root,i),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...v,...h,...g&&r.props,ownerState:m,children:[g?r.props.children:r,f?T.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(vi.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),s.string]),component:s.elementType,fontSize:s.oneOfType([s.oneOf(["inherit","large","medium","small"]),s.string]),htmlColor:s.string,inheritViewBox:s.bool,shapeRendering:s.string,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),titleAccess:s.string,viewBox:s.string});vi.muiName="SvgIcon";function J1(e,t){function n(o,r){return T.jsx(vi,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:r,...o,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=vi.muiName,D.memo(D.forwardRef(n))}function vl(e,t=166){let n;function o(...r){const i=()=>{e.apply(this,r)};clearTimeout(n),n=setTimeout(i,t)}return o.clear=()=>{clearTimeout(n)},o}function _t(e){return e&&e.ownerDocument||document}function It(e){return _t(e).defaultView||window}function qu(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Ea(e){const{controlled:t,default:n,name:o,state:r="value"}=e,{current:i}=D.useRef(t!==void 0),[a,l]=D.useState(n),c=i?t:a;if(process.env.NODE_ENV!=="production"){D.useEffect(()=>{i!==(t!==void 0)&&console.error([`MUI: A component is changing the ${i?"":"un"}controlled ${r} state of ${o} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${o} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
40
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function U1(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const At=e=>{try{return e()}catch{}},q1=(e="mui")=>r1(e);function Ys(e,t,n,o,r){if(!n)return;n=n===!0?{}:n;const i=r==="dark"?"dark":"light";if(!o){t[r]=B1({...n,palette:{mode:i,...n?.palette},colorSpace:e});return}const{palette:a,...l}=wa({...o,palette:{mode:i,...n?.palette},colorSpace:e});return t[r]={...n,palette:a,opacity:{...ih(i),...n?.opacity},overlays:n?.overlays||sh(i)},l}function Y1(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:o,disableCssColorScheme:r=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:l=z1,colorSchemeSelector:c=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...d}=e,f=Object.keys(n)[0],p=o||(n.light&&f!=="light"?"light":f),h=q1(i),{[p]:g,light:m,dark:v,...b}=n,C={...b};let y=g;if((p==="dark"&&!("dark"in n)||p==="light"&&!("light"in n))&&(y=!0),!y)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:Zt(21,p));let x;a&&(x="oklch");const w=Ys(x,C,y,d,p);m&&!C.light&&Ys(x,C,m,void 0,"light"),v&&!C.dark&&Ys(x,C,v,void 0,"dark");let E={defaultColorScheme:p,...w,cssVarPrefix:i,colorSchemeSelector:c,rootSelector:u,getCssVar:h,colorSchemes:C,font:{...E1(w.typography),...w.font},spacing:U1(d.spacing)};Object.keys(E.colorSchemes).forEach(I=>{const S=E.colorSchemes[I].palette,A=O=>{const P=O.split("-"),L=P[1],M=P[2];return h(O,S[L][M])};S.mode==="light"&&(Y(S.common,"background","#fff"),Y(S.common,"onBackground","#000")),S.mode==="dark"&&(Y(S.common,"background","#000"),Y(S.common,"onBackground","#fff"));function N(O,P,L){if(x){let M;return O===fn&&(M=`transparent ${((1-L)*100).toFixed(0)}%`),O===je&&(M=`#000 ${(L*100).toFixed(0)}%`),O===Le&&(M=`#fff ${(L*100).toFixed(0)}%`),`color-mix(in ${x}, ${P}, ${M})`}return O(P,L)}if(W1(S,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),S.mode==="light"){Y(S.Alert,"errorColor",N(je,S.error.light,.6)),Y(S.Alert,"infoColor",N(je,S.info.light,.6)),Y(S.Alert,"successColor",N(je,S.success.light,.6)),Y(S.Alert,"warningColor",N(je,S.warning.light,.6)),Y(S.Alert,"errorFilledBg",A("palette-error-main")),Y(S.Alert,"infoFilledBg",A("palette-info-main")),Y(S.Alert,"successFilledBg",A("palette-success-main")),Y(S.Alert,"warningFilledBg",A("palette-warning-main")),Y(S.Alert,"errorFilledColor",At(()=>S.getContrastText(S.error.main))),Y(S.Alert,"infoFilledColor",At(()=>S.getContrastText(S.info.main))),Y(S.Alert,"successFilledColor",At(()=>S.getContrastText(S.success.main))),Y(S.Alert,"warningFilledColor",At(()=>S.getContrastText(S.warning.main))),Y(S.Alert,"errorStandardBg",N(Le,S.error.light,.9)),Y(S.Alert,"infoStandardBg",N(Le,S.info.light,.9)),Y(S.Alert,"successStandardBg",N(Le,S.success.light,.9)),Y(S.Alert,"warningStandardBg",N(Le,S.warning.light,.9)),Y(S.Alert,"errorIconColor",A("palette-error-main")),Y(S.Alert,"infoIconColor",A("palette-info-main")),Y(S.Alert,"successIconColor",A("palette-success-main")),Y(S.Alert,"warningIconColor",A("palette-warning-main")),Y(S.AppBar,"defaultBg",A("palette-grey-100")),Y(S.Avatar,"defaultBg",A("palette-grey-400")),Y(S.Button,"inheritContainedBg",A("palette-grey-300")),Y(S.Button,"inheritContainedHoverBg",A("palette-grey-A100")),Y(S.Chip,"defaultBorder",A("palette-grey-400")),Y(S.Chip,"defaultAvatarColor",A("palette-grey-700")),Y(S.Chip,"defaultIconColor",A("palette-grey-700")),Y(S.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Y(S.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Y(S.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Y(S.LinearProgress,"primaryBg",N(Le,S.primary.main,.62)),Y(S.LinearProgress,"secondaryBg",N(Le,S.secondary.main,.62)),Y(S.LinearProgress,"errorBg",N(Le,S.error.main,.62)),Y(S.LinearProgress,"infoBg",N(Le,S.info.main,.62)),Y(S.LinearProgress,"successBg",N(Le,S.success.main,.62)),Y(S.LinearProgress,"warningBg",N(Le,S.warning.main,.62)),Y(S.Skeleton,"bg",x?N(fn,S.text.primary,.11):`rgba(${A("palette-text-primaryChannel")} / 0.11)`),Y(S.Slider,"primaryTrack",N(Le,S.primary.main,.62)),Y(S.Slider,"secondaryTrack",N(Le,S.secondary.main,.62)),Y(S.Slider,"errorTrack",N(Le,S.error.main,.62)),Y(S.Slider,"infoTrack",N(Le,S.info.main,.62)),Y(S.Slider,"successTrack",N(Le,S.success.main,.62)),Y(S.Slider,"warningTrack",N(Le,S.warning.main,.62));const O=x?N(je,S.background.default,.6825):Hr(S.background.default,.8);Y(S.SnackbarContent,"bg",O),Y(S.SnackbarContent,"color",At(()=>x?xa.text.primary:S.getContrastText(O))),Y(S.SpeedDialAction,"fabHoverBg",Hr(S.background.paper,.15)),Y(S.StepConnector,"border",A("palette-grey-400")),Y(S.StepContent,"border",A("palette-grey-400")),Y(S.Switch,"defaultColor",A("palette-common-white")),Y(S.Switch,"defaultDisabledColor",A("palette-grey-100")),Y(S.Switch,"primaryDisabledColor",N(Le,S.primary.main,.62)),Y(S.Switch,"secondaryDisabledColor",N(Le,S.secondary.main,.62)),Y(S.Switch,"errorDisabledColor",N(Le,S.error.main,.62)),Y(S.Switch,"infoDisabledColor",N(Le,S.info.main,.62)),Y(S.Switch,"successDisabledColor",N(Le,S.success.main,.62)),Y(S.Switch,"warningDisabledColor",N(Le,S.warning.main,.62)),Y(S.TableCell,"border",N(Le,N(fn,S.divider,1),.88)),Y(S.Tooltip,"bg",N(fn,S.grey[700],.92))}if(S.mode==="dark"){Y(S.Alert,"errorColor",N(Le,S.error.light,.6)),Y(S.Alert,"infoColor",N(Le,S.info.light,.6)),Y(S.Alert,"successColor",N(Le,S.success.light,.6)),Y(S.Alert,"warningColor",N(Le,S.warning.light,.6)),Y(S.Alert,"errorFilledBg",A("palette-error-dark")),Y(S.Alert,"infoFilledBg",A("palette-info-dark")),Y(S.Alert,"successFilledBg",A("palette-success-dark")),Y(S.Alert,"warningFilledBg",A("palette-warning-dark")),Y(S.Alert,"errorFilledColor",At(()=>S.getContrastText(S.error.dark))),Y(S.Alert,"infoFilledColor",At(()=>S.getContrastText(S.info.dark))),Y(S.Alert,"successFilledColor",At(()=>S.getContrastText(S.success.dark))),Y(S.Alert,"warningFilledColor",At(()=>S.getContrastText(S.warning.dark))),Y(S.Alert,"errorStandardBg",N(je,S.error.light,.9)),Y(S.Alert,"infoStandardBg",N(je,S.info.light,.9)),Y(S.Alert,"successStandardBg",N(je,S.success.light,.9)),Y(S.Alert,"warningStandardBg",N(je,S.warning.light,.9)),Y(S.Alert,"errorIconColor",A("palette-error-main")),Y(S.Alert,"infoIconColor",A("palette-info-main")),Y(S.Alert,"successIconColor",A("palette-success-main")),Y(S.Alert,"warningIconColor",A("palette-warning-main")),Y(S.AppBar,"defaultBg",A("palette-grey-900")),Y(S.AppBar,"darkBg",A("palette-background-paper")),Y(S.AppBar,"darkColor",A("palette-text-primary")),Y(S.Avatar,"defaultBg",A("palette-grey-600")),Y(S.Button,"inheritContainedBg",A("palette-grey-800")),Y(S.Button,"inheritContainedHoverBg",A("palette-grey-700")),Y(S.Chip,"defaultBorder",A("palette-grey-700")),Y(S.Chip,"defaultAvatarColor",A("palette-grey-300")),Y(S.Chip,"defaultIconColor",A("palette-grey-300")),Y(S.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Y(S.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Y(S.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Y(S.LinearProgress,"primaryBg",N(je,S.primary.main,.5)),Y(S.LinearProgress,"secondaryBg",N(je,S.secondary.main,.5)),Y(S.LinearProgress,"errorBg",N(je,S.error.main,.5)),Y(S.LinearProgress,"infoBg",N(je,S.info.main,.5)),Y(S.LinearProgress,"successBg",N(je,S.success.main,.5)),Y(S.LinearProgress,"warningBg",N(je,S.warning.main,.5)),Y(S.Skeleton,"bg",x?N(fn,S.text.primary,.13):`rgba(${A("palette-text-primaryChannel")} / 0.13)`),Y(S.Slider,"primaryTrack",N(je,S.primary.main,.5)),Y(S.Slider,"secondaryTrack",N(je,S.secondary.main,.5)),Y(S.Slider,"errorTrack",N(je,S.error.main,.5)),Y(S.Slider,"infoTrack",N(je,S.info.main,.5)),Y(S.Slider,"successTrack",N(je,S.success.main,.5)),Y(S.Slider,"warningTrack",N(je,S.warning.main,.5));const O=x?N(Le,S.background.default,.985):Hr(S.background.default,.98);Y(S.SnackbarContent,"bg",O),Y(S.SnackbarContent,"color",At(()=>x?nh.text.primary:S.getContrastText(O))),Y(S.SpeedDialAction,"fabHoverBg",Hr(S.background.paper,.15)),Y(S.StepConnector,"border",A("palette-grey-600")),Y(S.StepContent,"border",A("palette-grey-600")),Y(S.Switch,"defaultColor",A("palette-grey-300")),Y(S.Switch,"defaultDisabledColor",A("palette-grey-600")),Y(S.Switch,"primaryDisabledColor",N(je,S.primary.main,.55)),Y(S.Switch,"secondaryDisabledColor",N(je,S.secondary.main,.55)),Y(S.Switch,"errorDisabledColor",N(je,S.error.main,.55)),Y(S.Switch,"infoDisabledColor",N(je,S.info.main,.55)),Y(S.Switch,"successDisabledColor",N(je,S.success.main,.55)),Y(S.Switch,"warningDisabledColor",N(je,S.warning.main,.55)),Y(S.TableCell,"border",N(je,N(fn,S.divider,1),.68)),Y(S.Tooltip,"bg",N(fn,S.grey[700],.92))}Yt(S.background,"default"),Yt(S.background,"paper"),Yt(S.common,"background"),Yt(S.common,"onBackground"),Yt(S,"divider"),Object.keys(S).forEach(O=>{const P=S[O];O!=="tonalOffset"&&P&&typeof P=="object"&&(P.main&&Y(S[O],"mainChannel",$o(Ao(P.main))),P.light&&Y(S[O],"lightChannel",$o(Ao(P.light))),P.dark&&Y(S[O],"darkChannel",$o(Ao(P.dark))),P.contrastText&&Y(S[O],"contrastTextChannel",$o(Ao(P.contrastText))),O==="text"&&(Yt(S[O],"primary"),Yt(S[O],"secondary")),O==="action"&&(P.active&&Yt(S[O],"active"),P.selected&&Yt(S[O],"selected")))})}),E=t.reduce((I,S)=>nt(I,S),E);const k={prefix:i,disableCssColorScheme:r,shouldSkipGeneratingVar:l,getSelector:H1(E),enableContrastVars:a},{vars:R,generateThemeVars:_,generateStyleSheets:V}=a1(E,k);return E.vars=R,Object.entries(E.colorSchemes[E.defaultColorScheme]).forEach(([I,S])=>{E[I]=S}),E.generateThemeVars=_,E.generateStyleSheets=V,E.generateSpacing=function(){return Hp(d.spacing,Zi(this))},E.getColorSchemeSelector=l1(c),E.spacing=E.generateSpacing(),E.shouldSkipGeneratingVar=l,E.unstable_sxConfig={...wr,...d?.unstable_sxConfig},E.unstable_sx=function(S){return In({sx:S,theme:this})},E.toRuntimeSource=rh,E}function Wu(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:yl({...n===!0?{}:n.palette,mode:t})})}function ah(e={},...t){const{palette:n,cssVariables:o=!1,colorSchemes:r=n?void 0:{light:!0},defaultColorScheme:i=n?.mode,...a}=e,l=i||"light",c=r?.[l],u={...r,...n?{[l]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(o===!1){if(!("colorSchemes"in e))return wa(e,...t);let d=n;"palette"in e||u[l]&&(u[l]!==!0?d=u[l].palette:l==="dark"&&(d={mode:"dark"}));const f=wa({...e,palette:d},...t);return f.defaultColorScheme=l,f.colorSchemes=u,f.palette.mode==="light"&&(f.colorSchemes.light={...u.light!==!0&&u.light,palette:f.palette},Wu(f,"dark",u.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:f.palette},Wu(f,"light",u.light)),f}return!n&&!("light"in u)&&l==="light"&&(u.light=!0),Y1({...a,colorSchemes:u,defaultColorScheme:l,...typeof o!="boolean"&&o},...t)}const bl=ah();function Sr(){const e=rs(bl);return process.env.NODE_ENV!=="production"&&D.useDebugValue(e),e[Vi]||e}function lh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const dt=e=>lh(e)&&e!=="classes",le=Xp({themeId:Vi,defaultTheme:bl,rootShouldForwardProp:dt});function Uu(...e){return e.reduce((t,n)=>n==null?t:function(...r){t.apply(this,r),n.apply(this,r)},()=>{})}function ch(e){return T.jsx(Wp,{...e,defaultTheme:bl,themeId:Vi})}process.env.NODE_ENV!=="production"&&(ch.propTypes={styles:s.oneOfType([s.array,s.func,s.number,s.object,s.string,s.bool])});function G1(e){return function(n){return T.jsx(ch,{styles:typeof e=="function"?o=>e({theme:o,...n}):e})}}function K1(){return hl}const Ne=o1;process.env.NODE_ENV!=="production"&&(s.node,s.object.isRequired);function Ie(e){return e1(e)}function X1(e){return ke("MuiSvgIcon",e)}Oe("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Z1=e=>{const{color:t,fontSize:n,classes:o}=e,r={root:["root",t!=="inherit"&&`color${me(t)}`,`fontSize${me(n)}`]};return Pe(r,X1,o)},Q1=le("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${me(n.color)}`],t[`fontSize${me(n.fontSize)}`]]}})(Ne(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),vi=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiSvgIcon"}),{children:r,className:i,color:a="inherit",component:l="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:p="0 0 24 24",...h}=o,g=D.isValidElement(r)&&r.type==="svg",m={...o,color:a,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:g},v={};d||(v.viewBox=p);const b=Z1(m);return T.jsxs(Q1,{as:l,className:be(b.root,i),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...v,...h,...g&&r.props,ownerState:m,children:[g?r.props.children:r,f?T.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(vi.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),s.string]),component:s.elementType,fontSize:s.oneOfType([s.oneOf(["inherit","large","medium","small"]),s.string]),htmlColor:s.string,inheritViewBox:s.bool,shapeRendering:s.string,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),titleAccess:s.string,viewBox:s.string});vi.muiName="SvgIcon";function J1(e,t){function n(o,r){return T.jsx(vi,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:r,...o,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=vi.muiName,D.memo(D.forwardRef(n))}function vl(e,t=166){let n;function o(...r){const i=()=>{e.apply(this,r)};clearTimeout(n),n=setTimeout(i,t)}return o.clear=()=>{clearTimeout(n)},o}function _t(e){return e&&e.ownerDocument||document}function It(e){return _t(e).defaultView||window}function qu(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Ea(e){const{controlled:t,default:n,name:o,state:r="value"}=e,{current:i}=D.useRef(t!==void 0),[a,l]=D.useState(n),c=i?t:a;if(process.env.NODE_ENV!=="production"){D.useEffect(()=>{i!==(t!==void 0)&&console.error([`MUI: A component is changing the ${i?"":"un"}controlled ${r} state of ${o} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${o} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
41
41
|
`))},[r,o,t]);const{current:d}=D.useRef(n);D.useEffect(()=>{!i&&JSON.stringify(n)!==JSON.stringify(d)&&console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${o} after being initialized. To suppress this warning opt to use a controlled ${o}.`].join(`
|
|
42
|
-
`))},[JSON.stringify(n)])}const u=D.useCallback(d=>{i||l(d)},[]);return[c,u]}function Tn(e){const t=D.useRef(e);return an(()=>{t.current=e}),D.useRef((...n)=>(0,t.current)(...n)).current}function it(...e){const t=D.useRef(void 0),n=D.useCallback(o=>{const r=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,l=a(o);return typeof l=="function"?l:()=>{a(null)}}return i.current=o,()=>{i.current=null}});return()=>{r.forEach(i=>i?.())}},e);return D.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=n(o))},e)}function eT(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function uh(e,t){if(!e)return t;function n(a,l){const c={};return Object.keys(l).forEach(u=>{eT(u,l[u])&&typeof a[u]=="function"&&(c[u]=(...d)=>{a[u](...d),l[u](...d)})}),c}if(typeof e=="function"||typeof t=="function")return a=>{const l=typeof t=="function"?t(a):t,c=typeof e=="function"?e({...a,...l}):e,u=be(a?.className,l?.className,c?.className),d=n(c,l);return{...l,...c,...d,...!!u&&{className:u},...l?.style&&c?.style&&{style:{...l.style,...c.style}},...l?.sx&&c?.sx&&{sx:[...Array.isArray(l.sx)?l.sx:[l.sx],...Array.isArray(c.sx)?c.sx:[c.sx]]}}};const o=t,r=n(e,o),i=be(o?.className,e?.className);return{...t,...e,...r,...!!i&&{className:i},...o?.style&&e?.style&&{style:{...o.style,...e.style}},...o?.sx&&e?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function Mn(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...o){return e(...o)||t(...o)}}function dh(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function Ca(e,t){return Ca=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Ca(e,t)}function fh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ca(e,t)}const Yu={disabled:!1};var tT=process.env.NODE_ENV!=="production"?s.oneOfType([s.number,s.shape({enter:s.number,exit:s.number,appear:s.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&s.oneOfType([s.string,s.shape({enter:s.string,exit:s.string,active:s.string}),s.shape({enter:s.string,enterDone:s.string,enterActive:s.string,exit:s.string,exitDone:s.string,exitActive:s.string})]);const xi=F.createContext(null);var nT=function(t){return t.scrollTop},Do="unmounted",gn="exited",yn="entering",Vn="entered",Ta="exiting",$t=(function(e){fh(t,e);function t(o,r){var i;i=e.call(this,o,r)||this;var a=r,l=a&&!a.isMounting?o.enter:o.appear,c;return i.appearStatus=null,o.in?l?(c=gn,i.appearStatus=yn):c=Vn:o.unmountOnExit||o.mountOnEnter?c=Do:c=gn,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(r,i){var a=r.in;return a&&i.status===Do?{status:gn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var i=null;if(r!==this.props){var a=this.state.status;this.props.in?a!==yn&&a!==Vn&&(i=yn):(a===yn||a===Vn)&&(i=Ta)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,i,a,l;return i=a=l=r,r!=null&&typeof r!="number"&&(i=r.exit,a=r.enter,l=r.appear!==void 0?r.appear:a),{exit:i,enter:a,appear:l}},n.updateStatus=function(r,i){if(r===void 0&&(r=!1),i!==null)if(this.cancelNextCallback(),i===yn){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Wn.findDOMNode(this);a&&nT(a)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===gn&&this.setState({status:Do})},n.performEnter=function(r){var i=this,a=this.props.enter,l=this.context?this.context.isMounting:r,c=this.props.nodeRef?[l]:[Wn.findDOMNode(this),l],u=c[0],d=c[1],f=this.getTimeouts(),p=l?f.appear:f.enter;if(!r&&!a||Yu.disabled){this.safeSetState({status:Vn},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:yn},function(){i.props.onEntering(u,d),i.onTransitionEnd(p,function(){i.safeSetState({status:Vn},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var r=this,i=this.props.exit,a=this.getTimeouts(),l=this.props.nodeRef?void 0:Wn.findDOMNode(this);if(!i||Yu.disabled){this.safeSetState({status:gn},function(){r.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Ta},function(){r.props.onExiting(l),r.onTransitionEnd(a.exit,function(){r.safeSetState({status:gn},function(){r.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},n.setNextCallback=function(r){var i=this,a=!0;return this.nextCallback=function(l){a&&(a=!1,i.nextCallback=null,r(l))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(r,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:Wn.findDOMNode(this),l=r==null&&!this.props.addEndListener;if(!a||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===Do)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var l=dh(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return F.createElement(xi.Provider,{value:null},typeof a=="function"?a(r,l):F.cloneElement(F.Children.only(a),l))},t})(F.Component);$t.contextType=xi;$t.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:s.shape({current:typeof Element>"u"?s.any:function(e,t,n,o,r,i){var a=e[t];return s.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,o,r,i)}}),children:s.oneOfType([s.func.isRequired,s.element.isRequired]).isRequired,in:s.bool,mountOnEnter:s.bool,unmountOnExit:s.bool,appear:s.bool,enter:s.bool,exit:s.bool,timeout:function(t){var n=tT;t.addEndListener||(n=n.isRequired);for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];return n.apply(void 0,[t].concat(r))},addEndListener:s.func,onEnter:s.func,onEntering:s.func,onEntered:s.func,onExit:s.func,onExiting:s.func,onExited:s.func}:{};function zn(){}$t.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:zn,onEntering:zn,onEntered:zn,onExit:zn,onExiting:zn,onExited:zn};$t.UNMOUNTED=Do;$t.EXITED=gn;$t.ENTERING=yn;$t.ENTERED=Vn;$t.EXITING=Ta;function oT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xl(e,t){var n=function(i){return t&&F.isValidElement(i)?t(i):i},o=Object.create(null);return e&&F.Children.map(e,function(r){return r}).forEach(function(r){o[r.key]=n(r)}),o}function rT(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var o=Object.create(null),r=[];for(var i in e)i in t?r.length&&(o[i]=r,r=[]):r.push(i);var a,l={};for(var c in t){if(o[c])for(a=0;a<o[c].length;a++){var u=o[c][a];l[o[c][a]]=n(u)}l[c]=n(c)}for(a=0;a<r.length;a++)l[r[a]]=n(r[a]);return l}function Sn(e,t,n){return n[t]!=null?n[t]:e.props[t]}function iT(e,t){return xl(e.children,function(n){return F.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:Sn(n,"appear",e),enter:Sn(n,"enter",e),exit:Sn(n,"exit",e)})})}function sT(e,t,n){var o=xl(e.children),r=rT(t,o);return Object.keys(r).forEach(function(i){var a=r[i];if(F.isValidElement(a)){var l=i in t,c=i in o,u=t[i],d=F.isValidElement(u)&&!u.props.in;c&&(!l||d)?r[i]=F.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:Sn(a,"exit",e),enter:Sn(a,"enter",e)}):!c&&l&&!d?r[i]=F.cloneElement(a,{in:!1}):c&&l&&F.isValidElement(u)&&(r[i]=F.cloneElement(a,{onExited:n.bind(null,a),in:u.props.in,exit:Sn(a,"exit",e),enter:Sn(a,"enter",e)}))}}),r}var aT=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},lT={component:"div",childFactory:function(t){return t}},wl=(function(e){fh(t,e);function t(o,r){var i;i=e.call(this,o,r)||this;var a=i.handleExited.bind(oT(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(r,i){var a=i.children,l=i.handleExited,c=i.firstRender;return{children:c?iT(r,l):sT(r,a,l),firstRender:!1}},n.handleExited=function(r,i){var a=xl(this.props.children);r.key in a||(r.props.onExited&&r.props.onExited(i),this.mounted&&this.setState(function(l){var c=mi({},l.children);return delete c[r.key],{children:c}}))},n.render=function(){var r=this.props,i=r.component,a=r.childFactory,l=dh(r,["component","childFactory"]),c=this.state.contextValue,u=aT(this.state.children).map(a);return delete l.appear,delete l.enter,delete l.exit,i===null?F.createElement(xi.Provider,{value:c},u):F.createElement(xi.Provider,{value:c},F.createElement(i,l,u))},t})(F.Component);wl.propTypes=process.env.NODE_ENV!=="production"?{component:s.any,children:s.node,appear:s.bool,enter:s.bool,exit:s.bool,childFactory:s.func}:{};wl.defaultProps=lT;const Gu={};function ph(e,t){const n=D.useRef(Gu);return n.current===Gu&&(n.current=e(t)),n}const cT=[];function uT(e){D.useEffect(e,cT)}class Sl{static create(){return new Sl}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function hh(){const e=ph(Sl.create).current;return uT(e.disposeEffect),e}function dT(e){const{prototype:t={}}=e;return!!t.isReactComponent}function fT(e,t,n,o,r){const i=e[t],a=r||t;if(i==null||typeof window>"u")return null;let l;return typeof i=="function"&&!dT(i)&&(l="Did you accidentally provide a plain function component instead?"),i===D.Fragment&&(l="Did you accidentally provide a React.Fragment instead?"),l!==void 0?new Error(`Invalid ${o} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const El=Mn(s.elementType,fT),Cl=e=>e.scrollTop;function ao(e,t){const{timeout:n,easing:o,style:r={}}=e;return{duration:r.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:r.transitionTimingFunction??(typeof o=="object"?o[t.mode]:o),delay:r.transitionDelay}}function wi(e){return typeof e=="string"}function mh(e,t,n){return e===void 0||wi(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function gh(e,t,n){return typeof e=="function"?e(t,n):e}function yh(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(o=>o.match(/^on[A-Z]/)&&typeof e[o]=="function"&&!t.includes(o)).forEach(o=>{n[o]=e[o]}),n}function Ku(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function bh(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:o,externalForwardedProps:r,className:i}=e;if(!t){const h=be(n?.className,i,r?.className,o?.className),g={...n?.style,...r?.style,...o?.style},m={...n,...r,...o};return h.length>0&&(m.className=h),Object.keys(g).length>0&&(m.style=g),{props:m,internalRef:void 0}}const a=yh({...r,...o}),l=Ku(o),c=Ku(r),u=t(a),d=be(u?.className,n?.className,i,r?.className,o?.className),f={...u?.style,...n?.style,...r?.style,...o?.style},p={...u,...n,...c,...l};return d.length>0&&(p.className=d),Object.keys(f).length>0&&(p.style=f),{props:p,internalRef:u.ref}}function Fe(e,t){const{className:n,elementType:o,ownerState:r,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:l=!1,...c}=t,{component:u,slots:d={[e]:void 0},slotProps:f={[e]:void 0},...p}=i,h=d[e]||o,g=gh(f[e],r),{props:{component:m,...v},internalRef:b}=bh({className:n,...c,externalForwardedProps:e==="root"?p:void 0,externalSlotProps:g}),C=it(b,g?.ref,t.ref),y=e==="root"?m||u:m,x=mh(h,{...e==="root"&&!u&&!d[e]&&a,...e!=="root"&&!d[e]&&a,...v,...y&&!l&&{as:y},...y&&l&&{component:y},ref:C},r);return[h,x]}function pT(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function vh(e,t,n,o){const r=e[t];if(r==null||!Number.isInteger(r)){const i=pT(r);return new RangeError(`Invalid ${o} \`${t}\` of type \`${i}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function xh(e,t,n,o){return e[t]===void 0?null:vh(e,t,n,o)}function Na(){return null}xh.isRequired=vh;Na.isRequired=Na;const Tl=process.env.NODE_ENV==="production"?Na:xh;function hT(e){return Ne("MuiPaper",e)}Oe("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const mT=e=>{const{square:t,elevation:n,variant:o,classes:r}=e,i={root:["root",o,!t&&"rounded",o==="elevation"&&`elevation${n}`]};return Pe(i,hT,r)},gT=le("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Te(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Nl=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiPaper"}),r=Sr(),{className:i,component:a="div",elevation:l=1,square:c=!1,variant:u="elevation",...d}=o,f={...o,component:a,elevation:l,square:c,variant:u},p=mT(f);return process.env.NODE_ENV!=="production"&&r.shadows[l]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${l}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${l}]\` is defined.`].join(`
|
|
43
|
-
`)),T.jsx(gT,{as:a,ownerState:f,className:be(p.root,i),ref:n,...d,style:{...u==="elevation"&&{"--Paper-shadow":(r.vars||r).shadows[l],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[l]},...!r.vars&&r.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${bi("#fff",Sa(l))}, ${bi("#fff",Sa(l))})`}},...d.style}})});process.env.NODE_ENV!=="production"&&(Nl.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,elevation:Mn(Tl,e=>{const{elevation:t,variant:n}=e;return t>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:s.bool,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOfType([s.oneOf(["elevation","outlined"]),s.string])});const
|
|
44
|
-
`))}return!1}class Si{static create(){return new Si}static use(){const t=ph(Si.create).current,[n,o]=D.useState(!1);return t.shouldMount=n,t.setShouldMount=o,D.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=bT(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function yT(){return Si.use()}function bT(){let e,t;const n=new Promise((o,r)=>{e=o,t=r});return n.resolve=e,n.reject=t,n}function wh(e){const{className:t,classes:n,pulsate:o=!1,rippleX:r,rippleY:i,rippleSize:a,in:l,onExited:c,timeout:u}=e,[d,f]=D.useState(!1),p=be(t,n.ripple,n.rippleVisible,o&&n.ripplePulsate),h={width:a,height:a,top:-(a/2)+i,left:-(a/2)+r},g=be(n.child,d&&n.childLeaving,o&&n.childPulsate);return!l&&!d&&f(!0),D.useEffect(()=>{if(!l&&c!=null){const m=setTimeout(c,u);return()=>{clearTimeout(m)}}},[c,l,u]),T.jsx("span",{className:p,style:h,children:T.jsx("span",{className:g})})}process.env.NODE_ENV!=="production"&&(wh.propTypes={classes:s.object.isRequired,className:s.string,in:s.bool,onExited:s.func,pulsate:s.bool,rippleSize:s.number,rippleX:s.number,rippleY:s.number,timeout:s.number.isRequired});const
|
|
42
|
+
`))},[JSON.stringify(n)])}const u=D.useCallback(d=>{i||l(d)},[]);return[c,u]}function Tn(e){const t=D.useRef(e);return an(()=>{t.current=e}),D.useRef((...n)=>(0,t.current)(...n)).current}function it(...e){const t=D.useRef(void 0),n=D.useCallback(o=>{const r=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,l=a(o);return typeof l=="function"?l:()=>{a(null)}}return i.current=o,()=>{i.current=null}});return()=>{r.forEach(i=>i?.())}},e);return D.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=n(o))},e)}function eT(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function uh(e,t){if(!e)return t;function n(a,l){const c={};return Object.keys(l).forEach(u=>{eT(u,l[u])&&typeof a[u]=="function"&&(c[u]=(...d)=>{a[u](...d),l[u](...d)})}),c}if(typeof e=="function"||typeof t=="function")return a=>{const l=typeof t=="function"?t(a):t,c=typeof e=="function"?e({...a,...l}):e,u=be(a?.className,l?.className,c?.className),d=n(c,l);return{...l,...c,...d,...!!u&&{className:u},...l?.style&&c?.style&&{style:{...l.style,...c.style}},...l?.sx&&c?.sx&&{sx:[...Array.isArray(l.sx)?l.sx:[l.sx],...Array.isArray(c.sx)?c.sx:[c.sx]]}}};const o=t,r=n(e,o),i=be(o?.className,e?.className);return{...t,...e,...r,...!!i&&{className:i},...o?.style&&e?.style&&{style:{...o.style,...e.style}},...o?.sx&&e?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function Mn(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...o){return e(...o)||t(...o)}}function dh(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function Ca(e,t){return Ca=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Ca(e,t)}function fh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ca(e,t)}const Yu={disabled:!1};var tT=process.env.NODE_ENV!=="production"?s.oneOfType([s.number,s.shape({enter:s.number,exit:s.number,appear:s.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&s.oneOfType([s.string,s.shape({enter:s.string,exit:s.string,active:s.string}),s.shape({enter:s.string,enterDone:s.string,enterActive:s.string,exit:s.string,exitDone:s.string,exitActive:s.string})]);const xi=F.createContext(null);var nT=function(t){return t.scrollTop},Do="unmounted",gn="exited",yn="entering",Vn="entered",Ta="exiting",$t=(function(e){fh(t,e);function t(o,r){var i;i=e.call(this,o,r)||this;var a=r,l=a&&!a.isMounting?o.enter:o.appear,c;return i.appearStatus=null,o.in?l?(c=gn,i.appearStatus=yn):c=Vn:o.unmountOnExit||o.mountOnEnter?c=Do:c=gn,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(r,i){var a=r.in;return a&&i.status===Do?{status:gn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var i=null;if(r!==this.props){var a=this.state.status;this.props.in?a!==yn&&a!==Vn&&(i=yn):(a===yn||a===Vn)&&(i=Ta)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,i,a,l;return i=a=l=r,r!=null&&typeof r!="number"&&(i=r.exit,a=r.enter,l=r.appear!==void 0?r.appear:a),{exit:i,enter:a,appear:l}},n.updateStatus=function(r,i){if(r===void 0&&(r=!1),i!==null)if(this.cancelNextCallback(),i===yn){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Wn.findDOMNode(this);a&&nT(a)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===gn&&this.setState({status:Do})},n.performEnter=function(r){var i=this,a=this.props.enter,l=this.context?this.context.isMounting:r,c=this.props.nodeRef?[l]:[Wn.findDOMNode(this),l],u=c[0],d=c[1],f=this.getTimeouts(),p=l?f.appear:f.enter;if(!r&&!a||Yu.disabled){this.safeSetState({status:Vn},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:yn},function(){i.props.onEntering(u,d),i.onTransitionEnd(p,function(){i.safeSetState({status:Vn},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var r=this,i=this.props.exit,a=this.getTimeouts(),l=this.props.nodeRef?void 0:Wn.findDOMNode(this);if(!i||Yu.disabled){this.safeSetState({status:gn},function(){r.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Ta},function(){r.props.onExiting(l),r.onTransitionEnd(a.exit,function(){r.safeSetState({status:gn},function(){r.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},n.setNextCallback=function(r){var i=this,a=!0;return this.nextCallback=function(l){a&&(a=!1,i.nextCallback=null,r(l))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(r,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:Wn.findDOMNode(this),l=r==null&&!this.props.addEndListener;if(!a||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===Do)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var l=dh(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return F.createElement(xi.Provider,{value:null},typeof a=="function"?a(r,l):F.cloneElement(F.Children.only(a),l))},t})(F.Component);$t.contextType=xi;$t.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:s.shape({current:typeof Element>"u"?s.any:function(e,t,n,o,r,i){var a=e[t];return s.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,o,r,i)}}),children:s.oneOfType([s.func.isRequired,s.element.isRequired]).isRequired,in:s.bool,mountOnEnter:s.bool,unmountOnExit:s.bool,appear:s.bool,enter:s.bool,exit:s.bool,timeout:function(t){var n=tT;t.addEndListener||(n=n.isRequired);for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];return n.apply(void 0,[t].concat(r))},addEndListener:s.func,onEnter:s.func,onEntering:s.func,onEntered:s.func,onExit:s.func,onExiting:s.func,onExited:s.func}:{};function zn(){}$t.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:zn,onEntering:zn,onEntered:zn,onExit:zn,onExiting:zn,onExited:zn};$t.UNMOUNTED=Do;$t.EXITED=gn;$t.ENTERING=yn;$t.ENTERED=Vn;$t.EXITING=Ta;function oT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xl(e,t){var n=function(i){return t&&F.isValidElement(i)?t(i):i},o=Object.create(null);return e&&F.Children.map(e,function(r){return r}).forEach(function(r){o[r.key]=n(r)}),o}function rT(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var o=Object.create(null),r=[];for(var i in e)i in t?r.length&&(o[i]=r,r=[]):r.push(i);var a,l={};for(var c in t){if(o[c])for(a=0;a<o[c].length;a++){var u=o[c][a];l[o[c][a]]=n(u)}l[c]=n(c)}for(a=0;a<r.length;a++)l[r[a]]=n(r[a]);return l}function Sn(e,t,n){return n[t]!=null?n[t]:e.props[t]}function iT(e,t){return xl(e.children,function(n){return F.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:Sn(n,"appear",e),enter:Sn(n,"enter",e),exit:Sn(n,"exit",e)})})}function sT(e,t,n){var o=xl(e.children),r=rT(t,o);return Object.keys(r).forEach(function(i){var a=r[i];if(F.isValidElement(a)){var l=i in t,c=i in o,u=t[i],d=F.isValidElement(u)&&!u.props.in;c&&(!l||d)?r[i]=F.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:Sn(a,"exit",e),enter:Sn(a,"enter",e)}):!c&&l&&!d?r[i]=F.cloneElement(a,{in:!1}):c&&l&&F.isValidElement(u)&&(r[i]=F.cloneElement(a,{onExited:n.bind(null,a),in:u.props.in,exit:Sn(a,"exit",e),enter:Sn(a,"enter",e)}))}}),r}var aT=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},lT={component:"div",childFactory:function(t){return t}},wl=(function(e){fh(t,e);function t(o,r){var i;i=e.call(this,o,r)||this;var a=i.handleExited.bind(oT(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(r,i){var a=i.children,l=i.handleExited,c=i.firstRender;return{children:c?iT(r,l):sT(r,a,l),firstRender:!1}},n.handleExited=function(r,i){var a=xl(this.props.children);r.key in a||(r.props.onExited&&r.props.onExited(i),this.mounted&&this.setState(function(l){var c=mi({},l.children);return delete c[r.key],{children:c}}))},n.render=function(){var r=this.props,i=r.component,a=r.childFactory,l=dh(r,["component","childFactory"]),c=this.state.contextValue,u=aT(this.state.children).map(a);return delete l.appear,delete l.enter,delete l.exit,i===null?F.createElement(xi.Provider,{value:c},u):F.createElement(xi.Provider,{value:c},F.createElement(i,l,u))},t})(F.Component);wl.propTypes=process.env.NODE_ENV!=="production"?{component:s.any,children:s.node,appear:s.bool,enter:s.bool,exit:s.bool,childFactory:s.func}:{};wl.defaultProps=lT;const Gu={};function ph(e,t){const n=D.useRef(Gu);return n.current===Gu&&(n.current=e(t)),n}const cT=[];function uT(e){D.useEffect(e,cT)}class Sl{static create(){return new Sl}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function hh(){const e=ph(Sl.create).current;return uT(e.disposeEffect),e}function dT(e){const{prototype:t={}}=e;return!!t.isReactComponent}function fT(e,t,n,o,r){const i=e[t],a=r||t;if(i==null||typeof window>"u")return null;let l;return typeof i=="function"&&!dT(i)&&(l="Did you accidentally provide a plain function component instead?"),i===D.Fragment&&(l="Did you accidentally provide a React.Fragment instead?"),l!==void 0?new Error(`Invalid ${o} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const El=Mn(s.elementType,fT),Cl=e=>e.scrollTop;function ao(e,t){const{timeout:n,easing:o,style:r={}}=e;return{duration:r.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:r.transitionTimingFunction??(typeof o=="object"?o[t.mode]:o),delay:r.transitionDelay}}function wi(e){return typeof e=="string"}function mh(e,t,n){return e===void 0||wi(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function gh(e,t,n){return typeof e=="function"?e(t,n):e}function yh(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(o=>o.match(/^on[A-Z]/)&&typeof e[o]=="function"&&!t.includes(o)).forEach(o=>{n[o]=e[o]}),n}function Ku(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function bh(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:o,externalForwardedProps:r,className:i}=e;if(!t){const h=be(n?.className,i,r?.className,o?.className),g={...n?.style,...r?.style,...o?.style},m={...n,...r,...o};return h.length>0&&(m.className=h),Object.keys(g).length>0&&(m.style=g),{props:m,internalRef:void 0}}const a=yh({...r,...o}),l=Ku(o),c=Ku(r),u=t(a),d=be(u?.className,n?.className,i,r?.className,o?.className),f={...u?.style,...n?.style,...r?.style,...o?.style},p={...u,...n,...c,...l};return d.length>0&&(p.className=d),Object.keys(f).length>0&&(p.style=f),{props:p,internalRef:u.ref}}function Fe(e,t){const{className:n,elementType:o,ownerState:r,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:l=!1,...c}=t,{component:u,slots:d={[e]:void 0},slotProps:f={[e]:void 0},...p}=i,h=d[e]||o,g=gh(f[e],r),{props:{component:m,...v},internalRef:b}=bh({className:n,...c,externalForwardedProps:e==="root"?p:void 0,externalSlotProps:g}),C=it(b,g?.ref,t.ref),y=e==="root"?m||u:m,x=mh(h,{...e==="root"&&!u&&!d[e]&&a,...e!=="root"&&!d[e]&&a,...v,...y&&!l&&{as:y},...y&&l&&{component:y},ref:C},r);return[h,x]}function pT(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function vh(e,t,n,o){const r=e[t];if(r==null||!Number.isInteger(r)){const i=pT(r);return new RangeError(`Invalid ${o} \`${t}\` of type \`${i}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function xh(e,t,n,o){return e[t]===void 0?null:vh(e,t,n,o)}function Na(){return null}xh.isRequired=vh;Na.isRequired=Na;const Tl=process.env.NODE_ENV==="production"?Na:xh;function hT(e){return ke("MuiPaper",e)}Oe("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const mT=e=>{const{square:t,elevation:n,variant:o,classes:r}=e,i={root:["root",o,!t&&"rounded",o==="elevation"&&`elevation${n}`]};return Pe(i,hT,r)},gT=le("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Ne(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Nl=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiPaper"}),r=Sr(),{className:i,component:a="div",elevation:l=1,square:c=!1,variant:u="elevation",...d}=o,f={...o,component:a,elevation:l,square:c,variant:u},p=mT(f);return process.env.NODE_ENV!=="production"&&r.shadows[l]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${l}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${l}]\` is defined.`].join(`
|
|
43
|
+
`)),T.jsx(gT,{as:a,ownerState:f,className:be(p.root,i),ref:n,...d,style:{...u==="elevation"&&{"--Paper-shadow":(r.vars||r).shadows[l],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[l]},...!r.vars&&r.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${bi("#fff",Sa(l))}, ${bi("#fff",Sa(l))})`}},...d.style}})});process.env.NODE_ENV!=="production"&&(Nl.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,elevation:Mn(Tl,e=>{const{elevation:t,variant:n}=e;return t>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:s.bool,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOfType([s.oneOf(["elevation","outlined"]),s.string])});const Et=s.oneOfType([s.func,s.object]);function Xu(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!window.navigator.userAgent.includes("jsdom")&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
44
|
+
`))}return!1}class Si{static create(){return new Si}static use(){const t=ph(Si.create).current,[n,o]=D.useState(!1);return t.shouldMount=n,t.setShouldMount=o,D.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=bT(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function yT(){return Si.use()}function bT(){let e,t;const n=new Promise((o,r)=>{e=o,t=r});return n.resolve=e,n.reject=t,n}function wh(e){const{className:t,classes:n,pulsate:o=!1,rippleX:r,rippleY:i,rippleSize:a,in:l,onExited:c,timeout:u}=e,[d,f]=D.useState(!1),p=be(t,n.ripple,n.rippleVisible,o&&n.ripplePulsate),h={width:a,height:a,top:-(a/2)+i,left:-(a/2)+r},g=be(n.child,d&&n.childLeaving,o&&n.childPulsate);return!l&&!d&&f(!0),D.useEffect(()=>{if(!l&&c!=null){const m=setTimeout(c,u);return()=>{clearTimeout(m)}}},[c,l,u]),T.jsx("span",{className:p,style:h,children:T.jsx("span",{className:g})})}process.env.NODE_ENV!=="production"&&(wh.propTypes={classes:s.object.isRequired,className:s.string,in:s.bool,onExited:s.func,pulsate:s.bool,rippleSize:s.number,rippleX:s.number,rippleY:s.number,timeout:s.number.isRequired});const xt=Oe("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),ka=550,vT=80,xT=vr`
|
|
45
45
|
0% {
|
|
46
46
|
transform: scale(0);
|
|
47
47
|
opacity: 0.1;
|
|
@@ -75,7 +75,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
75
75
|
opacity: 0;
|
|
76
76
|
position: absolute;
|
|
77
77
|
|
|
78
|
-
&.${
|
|
78
|
+
&.${xt.rippleVisible} {
|
|
79
79
|
opacity: 0.3;
|
|
80
80
|
transform: scale(1);
|
|
81
81
|
animation-name: ${xT};
|
|
@@ -83,11 +83,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
83
83
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
&.${
|
|
86
|
+
&.${xt.ripplePulsate} {
|
|
87
87
|
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
& .${
|
|
90
|
+
& .${xt.child} {
|
|
91
91
|
opacity: 1;
|
|
92
92
|
display: block;
|
|
93
93
|
width: 100%;
|
|
@@ -96,14 +96,14 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
96
96
|
background-color: currentColor;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
& .${
|
|
99
|
+
& .${xt.childLeaving} {
|
|
100
100
|
opacity: 0;
|
|
101
101
|
animation-name: ${wT};
|
|
102
102
|
animation-duration: ${ka}ms;
|
|
103
103
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
& .${
|
|
106
|
+
& .${xt.childPulsate} {
|
|
107
107
|
position: absolute;
|
|
108
108
|
/* @noflip */
|
|
109
109
|
left: 0px;
|
|
@@ -114,7 +114,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
114
114
|
animation-iteration-count: infinite;
|
|
115
115
|
animation-delay: 200ms;
|
|
116
116
|
}
|
|
117
|
-
`,Sh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:a,...l}=o,[c,u]=D.useState([]),d=D.useRef(0),f=D.useRef(null);D.useEffect(()=>{f.current&&(f.current(),f.current=null)},[c]);const p=D.useRef(!1),h=hh(),g=D.useRef(null),m=D.useRef(null),v=D.useCallback(x=>{const{pulsate:w,rippleX:E,rippleY:k,rippleSize:R,cb:_}=x;u(V=>[...V,T.jsx(CT,{classes:{ripple:be(i.ripple,
|
|
117
|
+
`,Sh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:a,...l}=o,[c,u]=D.useState([]),d=D.useRef(0),f=D.useRef(null);D.useEffect(()=>{f.current&&(f.current(),f.current=null)},[c]);const p=D.useRef(!1),h=hh(),g=D.useRef(null),m=D.useRef(null),v=D.useCallback(x=>{const{pulsate:w,rippleX:E,rippleY:k,rippleSize:R,cb:_}=x;u(V=>[...V,T.jsx(CT,{classes:{ripple:be(i.ripple,xt.ripple),rippleVisible:be(i.rippleVisible,xt.rippleVisible),ripplePulsate:be(i.ripplePulsate,xt.ripplePulsate),child:be(i.child,xt.child),childLeaving:be(i.childLeaving,xt.childLeaving),childPulsate:be(i.childPulsate,xt.childPulsate)},timeout:ka,pulsate:w,rippleX:E,rippleY:k,rippleSize:R},d.current)]),d.current+=1,f.current=_},[i]),b=D.useCallback((x={},w={},E=()=>{})=>{const{pulsate:k=!1,center:R=r||w.pulsate,fakeElement:_=!1}=w;if(x?.type==="mousedown"&&p.current){p.current=!1;return}x?.type==="touchstart"&&(p.current=!0);const V=_?null:m.current,I=V?V.getBoundingClientRect():{width:0,height:0,left:0,top:0};let S,A,N;if(R||x===void 0||x.clientX===0&&x.clientY===0||!x.clientX&&!x.touches)S=Math.round(I.width/2),A=Math.round(I.height/2);else{const{clientX:O,clientY:P}=x.touches&&x.touches.length>0?x.touches[0]:x;S=Math.round(O-I.left),A=Math.round(P-I.top)}if(R)N=Math.sqrt((2*I.width**2+I.height**2)/3),N%2===0&&(N+=1);else{const O=Math.max(Math.abs((V?V.clientWidth:0)-S),S)*2+2,P=Math.max(Math.abs((V?V.clientHeight:0)-A),A)*2+2;N=Math.sqrt(O**2+P**2)}x?.touches?g.current===null&&(g.current=()=>{v({pulsate:k,rippleX:S,rippleY:A,rippleSize:N,cb:E})},h.start(vT,()=>{g.current&&(g.current(),g.current=null)})):v({pulsate:k,rippleX:S,rippleY:A,rippleSize:N,cb:E})},[r,v,h]),C=D.useCallback(()=>{b({},{pulsate:!0})},[b]),y=D.useCallback((x,w)=>{if(h.clear(),x?.type==="touchend"&&g.current){g.current(),g.current=null,h.start(0,()=>{y(x,w)});return}g.current=null,u(E=>E.length>0?E.slice(1):E),f.current=w},[h]);return D.useImperativeHandle(n,()=>({pulsate:C,start:b,stop:y}),[C,b,y]),T.jsx(ET,{className:be(xt.root,i.root,a),ref:m,...l,children:T.jsx(wl,{component:null,exit:!0,children:c})})});process.env.NODE_ENV!=="production"&&(Sh.propTypes={center:s.bool,classes:s.object,className:s.string});function TT(e){return ke("MuiButtonBase",e)}const NT=Oe("MuiButtonBase",["root","disabled","focusVisible"]),kT=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:o,classes:r}=e,a=Pe({root:["root",t&&"disabled",n&&"focusVisible"]},TT,r);return n&&o&&(a.root+=` ${o}`),a},OT=le("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${NT.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ls=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:a,className:l,component:c="button",disabled:u=!1,disableRipple:d=!1,disableTouchRipple:f=!1,focusRipple:p=!1,focusVisibleClassName:h,LinkComponent:g="a",onBlur:m,onClick:v,onContextMenu:b,onDragLeave:C,onFocus:y,onFocusVisible:x,onKeyDown:w,onKeyUp:E,onMouseDown:k,onMouseLeave:R,onMouseUp:_,onTouchEnd:V,onTouchMove:I,onTouchStart:S,tabIndex:A=0,TouchRippleProps:N,touchRippleRef:O,type:P,...L}=o,M=D.useRef(null),j=yT(),$=it(j.ref,O),[B,H]=D.useState(!1);u&&B&&H(!1),D.useImperativeHandle(r,()=>({focusVisible:()=>{H(!0),M.current.focus()}}),[]);const U=j.shouldMount&&!d&&!u;D.useEffect(()=>{B&&p&&!d&&j.pulsate()},[d,p,B,j]);const W=Gt(j,"start",k,f),K=Gt(j,"stop",b,f),Q=Gt(j,"stop",C,f),ee=Gt(j,"stop",_,f),q=Gt(j,"stop",oe=>{B&&oe.preventDefault(),R&&R(oe)},f),J=Gt(j,"start",S,f),Z=Gt(j,"stop",V,f),ne=Gt(j,"stop",I,f),z=Gt(j,"stop",oe=>{Xu(oe.target)||H(!1),m&&m(oe)},!1),ae=Tn(oe=>{M.current||(M.current=oe.currentTarget),Xu(oe.target)&&(H(!0),x&&x(oe)),y&&y(oe)}),se=()=>{const oe=M.current;return c&&c!=="button"&&!(oe.tagName==="A"&&oe.href)},de=Tn(oe=>{p&&!oe.repeat&&B&&oe.key===" "&&j.stop(oe,()=>{j.start(oe)}),oe.target===oe.currentTarget&&se()&&oe.key===" "&&oe.preventDefault(),w&&w(oe),oe.target===oe.currentTarget&&se()&&oe.key==="Enter"&&!u&&(oe.preventDefault(),v&&v(oe))}),we=Tn(oe=>{p&&oe.key===" "&&B&&!oe.defaultPrevented&&j.stop(oe,()=>{j.pulsate(oe)}),E&&E(oe),v&&oe.target===oe.currentTarget&&se()&&oe.key===" "&&!oe.defaultPrevented&&v(oe)});let Te=c;Te==="button"&&(L.href||L.to)&&(Te=g);const G={};if(Te==="button"){const oe=!!L.formAction;G.type=P===void 0&&!oe?"button":P,G.disabled=u}else!L.href&&!L.to&&(G.role="button"),u&&(G["aria-disabled"]=u);const X=it(n,M),te={...o,centerRipple:i,component:c,disabled:u,disableRipple:d,disableTouchRipple:f,focusRipple:p,tabIndex:A,focusVisible:B},re=kT(te);return T.jsxs(OT,{as:Te,className:be(re.root,l),ownerState:te,onBlur:z,onClick:v,onContextMenu:K,onFocus:ae,onKeyDown:de,onKeyUp:we,onMouseDown:W,onMouseLeave:q,onMouseUp:ee,onDragLeave:Q,onTouchEnd:Z,onTouchMove:ne,onTouchStart:J,ref:X,tabIndex:u?-1:A,type:P,...G,...L,children:[a,U?T.jsx(Sh,{ref:$,center:i,...N}):null]})});function Gt(e,t,n,o=!1){return Tn(r=>(n&&n(r),o||e[t](r),!0))}process.env.NODE_ENV!=="production"&&(ls.propTypes={action:Et,centerRipple:s.bool,children:s.node,classes:s.object,className:s.string,component:El,disabled:s.bool,disableRipple:s.bool,disableTouchRipple:s.bool,focusRipple:s.bool,focusVisibleClassName:s.string,formAction:s.oneOfType([s.func,s.string]),href:s.any,LinkComponent:s.elementType,onBlur:s.func,onClick:s.func,onContextMenu:s.func,onDragLeave:s.func,onFocus:s.func,onFocusVisible:s.func,onKeyDown:s.func,onKeyUp:s.func,onMouseDown:s.func,onMouseLeave:s.func,onMouseUp:s.func,onTouchEnd:s.func,onTouchMove:s.func,onTouchStart:s.func,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number,TouchRippleProps:s.object,touchRippleRef:s.oneOfType([s.func,s.shape({current:s.shape({pulsate:s.func.isRequired,start:s.func.isRequired,stop:s.func.isRequired})})]),type:s.oneOfType([s.oneOf(["button","reset","submit"]),s.string])});function PT(e){return typeof e.main=="string"}function RT(e,t=[]){if(!PT(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function un(e=[]){return([,t])=>t&&RT(t,e)}function _T(e){return ke("MuiCircularProgress",e)}Oe("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Ct=44,Oa=vr`
|
|
118
118
|
0% {
|
|
119
119
|
transform: rotate(0deg);
|
|
120
120
|
}
|
|
@@ -141,19 +141,19 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
141
141
|
animation: ${Oa} 1.4s linear infinite;
|
|
142
142
|
`:null,MT=typeof Pa!="string"?dl`
|
|
143
143
|
animation: ${Pa} 1.4s ease-in-out infinite;
|
|
144
|
-
`:null,$T=e=>{const{classes:t,variant:n,color:o,disableShrink:r}=e,i={root:["root",n,`color${
|
|
144
|
+
`:null,$T=e=>{const{classes:t,variant:n,color:o,disableShrink:r}=e,i={root:["root",n,`color${me(o)}`],svg:["svg"],track:["track"],circle:["circle",`circle${me(n)}`,r&&"circleDisableShrink"]};return Pe(i,_T,t)},AT=le("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${me(n.color)}`]]}})(Ne(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:IT||{animation:`${Oa} 1.4s linear infinite`}},...Object.entries(e.palette).filter(un()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),DT=le("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),jT=le("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${me(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Ne(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:MT||{animation:`${Pa} 1.4s ease-in-out infinite`}}]}))),LT=le("circle",{name:"MuiCircularProgress",slot:"Track"})(Ne(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),Eh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:a=!1,enableTrackSlot:l=!1,size:c=40,style:u,thickness:d=3.6,value:f=0,variant:p="indeterminate",...h}=o,g={...o,color:i,disableShrink:a,size:c,thickness:d,value:f,variant:p,enableTrackSlot:l},m=$T(g),v={},b={},C={};if(p==="determinate"){const y=2*Math.PI*((Ct-d)/2);v.strokeDasharray=y.toFixed(3),C["aria-valuenow"]=Math.round(f),v.strokeDashoffset=`${((100-f)/100*y).toFixed(3)}px`,b.transform="rotate(-90deg)"}return T.jsx(AT,{className:be(m.root,r),style:{width:c,height:c,...b,...u},ownerState:g,ref:n,role:"progressbar",...C,...h,children:T.jsxs(DT,{className:m.svg,ownerState:g,viewBox:`${Ct/2} ${Ct/2} ${Ct} ${Ct}`,children:[l?T.jsx(LT,{className:m.track,ownerState:g,cx:Ct,cy:Ct,r:(Ct-d)/2,fill:"none",strokeWidth:d,"aria-hidden":"true"}):null,T.jsx(jT,{className:m.circle,style:v,ownerState:g,cx:Ct,cy:Ct,r:(Ct-d)/2,fill:"none",strokeWidth:d})]})})});process.env.NODE_ENV!=="production"&&(Eh.propTypes={classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["inherit","primary","secondary","error","info","success","warning"]),s.string]),disableShrink:Mn(s.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),enableTrackSlot:s.bool,size:s.oneOfType([s.number,s.string]),style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),thickness:s.number,value:s.number,variant:s.oneOf(["determinate","indeterminate"])});function FT(e){return ke("MuiTypography",e)}const Zu=Oe("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),BT={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},zT=K1(),VT=e=>{const{align:t,gutterBottom:n,noWrap:o,paragraph:r,variant:i,classes:a}=e,l={root:["root",i,e.align!=="inherit"&&`align${me(t)}`,n&&"gutterBottom",o&&"noWrap",r&&"paragraph"]};return Pe(l,FT,a)},HT=le("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${me(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Ne(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,n])=>t!=="inherit"&&n&&typeof n=="object").map(([t,n])=>({props:{variant:t},style:n})),...Object.entries(e.palette).filter(un()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${me(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),Qu={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},tt=D.forwardRef(function(t,n){const{color:o,...r}=Ie({props:t,name:"MuiTypography"}),i=!BT[o],a=zT({...r,...i&&{color:o}}),{align:l="inherit",className:c,component:u,gutterBottom:d=!1,noWrap:f=!1,paragraph:p=!1,variant:h="body1",variantMapping:g=Qu,...m}=a,v={...a,align:l,color:o,className:c,component:u,gutterBottom:d,noWrap:f,paragraph:p,variant:h,variantMapping:g},b=u||(p?"p":g[h]||Qu[h])||"span",C=VT(v);return T.jsx(HT,{as:b,ref:n,className:be(C.root,c),...m,ownerState:v,style:{...l!=="inherit"&&{"--Typography-textAlign":l},...m.style}})});process.env.NODE_ENV!=="production"&&(tt.propTypes={align:s.oneOf(["center","inherit","justify","left","right"]),children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),s.string]),component:s.elementType,gutterBottom:s.bool,noWrap:s.bool,paragraph:s.bool,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOfType([s.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),s.string]),variantMapping:s.object});function lo(e,t,n,o,r){if(process.env.NODE_ENV==="production")return null;const i=e[t],a=r||t;return i==null?null:i&&i.nodeType!==1?new Error(`Invalid ${o} \`${a}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}function WT(e){const{elementType:t,externalSlotProps:n,ownerState:o,skipResolvingSlotProps:r=!1,...i}=e,a=r?{}:gh(n,o),{props:l,internalRef:c}=bh({...i,externalSlotProps:a}),u=it(c,a?.ref,e.additionalProps?.ref);return mh(t,{...l,ref:u},o)}function ho(e){return parseInt(D.version,10)>=19?e?.props?.ref||null:e?.ref||null}function UT(e){return typeof e=="function"?e():e}const Ei=D.forwardRef(function(t,n){const{children:o,container:r,disablePortal:i=!1}=t,[a,l]=D.useState(null),c=it(D.isValidElement(o)?ho(o):null,n);if(an(()=>{i||l(UT(r)||document.body)},[r,i]),an(()=>{if(a&&!i)return qu(n,a),()=>{qu(n,null)}},[n,a,i]),i){if(D.isValidElement(o)){const u={ref:c};return D.cloneElement(o,u)}return o}return a&&ag.createPortal(o,a)});process.env.NODE_ENV!=="production"&&(Ei.propTypes={children:s.node,container:s.oneOfType([lo,s.func]),disablePortal:s.bool});process.env.NODE_ENV!=="production"&&(Ei.propTypes=Jp(Ei.propTypes));function qT(e){return ke("MuiListSubheader",e)}Oe("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const YT=e=>{const{classes:t,color:n,disableGutters:o,inset:r,disableSticky:i}=e,a={root:["root",n!=="default"&&`color${me(n)}`,!o&&"gutters",r&&"inset",!i&&"sticky"]};return Pe(a,qT,t)},GT=le("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${me(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(Ne(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),Ci=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiListSubheader"}),{className:r,color:i="default",component:a="li",disableGutters:l=!1,disableSticky:c=!1,inset:u=!1,...d}=o,f={...o,color:i,component:a,disableGutters:l,disableSticky:c,inset:u},p=YT(f);return T.jsx(GT,{as:a,className:be(p.root,r),ref:n,ownerState:f,...d})});Ci&&(Ci.muiSkipListHighlight=!0);process.env.NODE_ENV!=="production"&&(Ci.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOf(["default","inherit","primary"]),component:s.elementType,disableGutters:s.bool,disableSticky:s.bool,inset:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function Wr(e){return parseInt(e,10)||0}const KT={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function XT(e){for(const t in e)return!1;return!0}function Ju(e){return XT(e)||e.outerHeightStyle===0&&!e.overflowing}const Ch=D.forwardRef(function(t,n){const{onChange:o,maxRows:r,minRows:i=1,style:a,value:l,...c}=t,{current:u}=D.useRef(l!=null),d=D.useRef(null),f=it(n,d),p=D.useRef(null),h=D.useRef(null),g=D.useCallback(()=>{const y=d.current,x=h.current;if(!y||!x)return;const E=It(y).getComputedStyle(y);if(E.width==="0px")return{outerHeightStyle:0,overflowing:!1};x.style.width=E.width,x.value=y.value||t.placeholder||"x",x.value.slice(-1)===`
|
|
145
145
|
`&&(x.value+=" ");const k=E.boxSizing,R=Wr(E.paddingBottom)+Wr(E.paddingTop),_=Wr(E.borderBottomWidth)+Wr(E.borderTopWidth),V=x.scrollHeight;x.value="x";const I=x.scrollHeight;let S=V;i&&(S=Math.max(Number(i)*I,S)),r&&(S=Math.min(Number(r)*I,S)),S=Math.max(S,I);const A=S+(k==="border-box"?R+_:0),N=Math.abs(S-V)<=1;return{outerHeightStyle:A,overflowing:N}},[r,i,t.placeholder]),m=Tn(()=>{const y=d.current,x=g();if(!y||!x||Ju(x))return!1;const w=x.outerHeightStyle;return p.current!=null&&p.current!==w}),v=D.useCallback(()=>{const y=d.current,x=g();if(!y||!x||Ju(x))return;const w=x.outerHeightStyle;p.current!==w&&(p.current=w,y.style.height=`${w}px`),y.style.overflow=x.overflowing?"hidden":""},[g]),b=D.useRef(-1);an(()=>{const y=vl(v),x=d?.current;if(!x)return;const w=It(x);w.addEventListener("resize",y);let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(()=>{m()&&(E.unobserve(x),cancelAnimationFrame(b.current),v(),b.current=requestAnimationFrame(()=>{E.observe(x)}))}),E.observe(x)),()=>{y.clear(),cancelAnimationFrame(b.current),w.removeEventListener("resize",y),E&&E.disconnect()}},[g,v,m]),an(()=>{v()});const C=y=>{u||v();const x=y.target,w=x.value.length,E=x.value.endsWith(`
|
|
146
|
-
`),k=x.selectionStart===w;E&&k&&x.setSelectionRange(w,w),o&&o(y)};return T.jsxs(D.Fragment,{children:[T.jsx("textarea",{value:l,onChange:C,ref:f,rows:i,style:a,...c}),T.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:h,tabIndex:-1,style:{...KT.shadow,...a,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(Ch.propTypes={className:s.string,maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),onChange:s.func,placeholder:s.string,style:s.object,value:s.oneOfType([s.arrayOf(s.string),s.number,s.string])});function $n({props:e,states:t,muiFormControl:n}){return t.reduce((o,r)=>(o[r]=e[r],n&&typeof e[r]>"u"&&(o[r]=n[r]),o),{})}const cs=D.createContext(void 0);process.env.NODE_ENV!=="production"&&(cs.displayName="FormControlContext");function dn(){return D.useContext(cs)}function ed(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Ti(e,t=!1){return e&&(ed(e.value)&&e.value!==""||t&&ed(e.defaultValue)&&e.defaultValue!=="")}function ZT(e){return e.startAdornment}function QT(e){return
|
|
147
|
-
`))},[]),ne=it(J,x,y.ref,Z),[z,ae]=D.useState(!1),se=dn();process.env.NODE_ENV!=="production"&&D.useEffect(()=>{if(se)return se.registerEffect()},[se]);const fe=$n({props:o,muiFormControl:se,states:["color","disabled","error","hiddenLabel","size","required","filled"]});fe.focused=se?se.focused:z,D.useEffect(()=>{!se&&p&&z&&(ae(!1),V&&V())},[se,p,z,V]);const xe=se&&se.onFilled,Ce=se&&se.onEmpty,G=D.useCallback(me=>{Ti(me)?xe&&xe():Ce&&Ce()},[xe,Ce]);an(()=>{q&&G({value:ee})},[ee,G,q]);const X=me=>{A&&A(me),y.onFocus&&y.onFocus(me),se&&se.onFocus?se.onFocus(me):ae(!0)},te=me=>{V&&V(me),y.onBlur&&y.onBlur(me),se&&se.onBlur?se.onBlur(me):ae(!1)},re=(me,...ke)=>{if(!q){const ve=me.target||J.current;if(ve==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":Zt(1));G({value:ve.value})}y.onChange&&y.onChange(me,...ke),I&&I(me,...ke)};D.useEffect(()=>{G(J.current)},[]);const oe=me=>{J.current&&me.currentTarget===me.target&&J.current.focus(),S&&S(me)};let ue=C,ie=y;R&&ue==="input"&&(j?(process.env.NODE_ENV!=="production"&&(k||E)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),ie={type:void 0,minRows:j,maxRows:j,...ie}):ie={type:void 0,maxRows:E,minRows:k,...ie},ue=Ch);const ye=me=>{G(me.animationName==="mui-auto-fill-cancel"?J.current:{value:"x"})};D.useEffect(()=>{se&&se.setAdornedStart(!!U)},[se,U]);const de={...o,color:fe.color||"primary",disabled:fe.disabled,endAdornment:g,error:fe.error,focused:fe.focused,formControl:se,fullWidth:v,hiddenLabel:fe.hiddenLabel,multiline:R,size:fe.size,startAdornment:U,type:W},ce=JT(de),we=H.root||u.Root||fs,Je=B.root||d.root||{},Ke=H.input||u.Input||ps;return ie={...ie,...B.input??d.input},T.jsxs(D.Fragment,{children:[!h&&typeof nd=="function"&&(td||(td=T.jsx(nd,{}))),T.jsxs(we,{...Je,ref:n,onClick:oe,...Q,...!wi(we)&&{ownerState:{...de,...Je.ownerState}},className:be(ce.root,Je.className,l,L&&"MuiInputBase-readOnly"),children:[U,T.jsx(cs.Provider,{value:null,children:T.jsx(Ke,{"aria-invalid":fe.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:f,disabled:fe.disabled,id:b,onAnimationStart:ye,name:_,placeholder:P,readOnly:L,required:fe.required,rows:j,value:ee,onKeyDown:N,onKeyUp:O,type:W,...ie,...!wi(Ke)&&{as:ue,ownerState:{...de,...ie.ownerState}},ref:ne,className:be(ce.input,ie.className,L&&"MuiInputBase-readOnly"),onBlur:te,onChange:re,onFocus:X})}),g,M?M({...fe,startAdornment:U}):null]})]})});process.env.NODE_ENV!=="production"&&(hs.propTypes={"aria-describedby":s.string,autoComplete:s.string,autoFocus:s.bool,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","error","info","success","warning"]),s.string]),components:s.shape({Input:s.elementType,Root:s.elementType}),componentsProps:s.shape({input:s.object,root:s.object}),defaultValue:s.any,disabled:s.bool,disableInjectingGlobalStyles:s.bool,endAdornment:s.node,error:s.bool,fullWidth:s.bool,id:s.string,inputComponent:El,inputProps:s.object,inputRef:St,margin:s.oneOf(["dense","none"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,onBlur:s.func,onChange:s.func,onClick:s.func,onFocus:s.func,onInvalid:s.func,onKeyDown:s.func,onKeyUp:s.func,placeholder:s.string,readOnly:s.bool,renderSuffix:s.func,required:s.bool,rows:s.oneOfType([s.number,s.string]),size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),slotProps:s.shape({input:s.object,root:s.object}),slots:s.shape({input:s.elementType,root:s.elementType}),startAdornment:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any});function eN(e){return Ne("MuiInput",e)}const To={...co,...Oe("MuiInput",["root","underline","input"])};function tN(e){return Ne("MuiOutlinedInput",e)}const Dt={...co,...Oe("MuiOutlinedInput",["root","notchedOutline","input"])};function nN(e){return Ne("MuiFilledInput",e)}const pn={...co,...Oe("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},oN=J1(T.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function rN(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Th(e,t,n,o,r){const i=e[t],a=r||t;if(i==null||typeof window>"u")return null;let l;const c=i.type;return typeof c=="function"&&!rN(c)&&(l="Did you accidentally use a plain function component for an element instead?"),l!==void 0?new Error(`Invalid ${o} \`${a}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const mo=Mn(s.element,Th);mo.isRequired=Mn(s.element.isRequired,Th);const iN={entering:{opacity:1},entered:{opacity:1}},Nh=D.forwardRef(function(t,n){const o=Sr(),r={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:p,onExit:h,onExited:g,onExiting:m,style:v,timeout:b=r,TransitionComponent:C=$t,...y}=t,x=D.useRef(null),w=it(x,ho(l),n),E=N=>O=>{if(N){const P=x.current;O===void 0?N(P):N(P,O)}},k=E(p),R=E((N,O)=>{Cl(N);const P=ao({style:v,timeout:b,easing:c},{mode:"enter"});N.style.webkitTransition=o.transitions.create("opacity",P),N.style.transition=o.transitions.create("opacity",P),d&&d(N,O)}),_=E(f),V=E(m),I=E(N=>{const O=ao({style:v,timeout:b,easing:c},{mode:"exit"});N.style.webkitTransition=o.transitions.create("opacity",O),N.style.transition=o.transitions.create("opacity",O),h&&h(N)}),S=E(g),A=N=>{i&&i(x.current,N)};return T.jsx(C,{appear:a,in:u,nodeRef:x,onEnter:R,onEntered:_,onEntering:k,onExit:I,onExited:S,onExiting:V,addEndListener:A,timeout:b,...y,children:(N,{ownerState:O,...P})=>D.cloneElement(l,{style:{opacity:0,visibility:N==="exited"&&!u?"hidden":void 0,...iN[N],...v,...l.props.style},ref:w,...P})})});process.env.NODE_ENV!=="production"&&(Nh.propTypes={addEndListener:s.func,appear:s.bool,children:mo.isRequired,easing:s.oneOfType([s.shape({enter:s.string,exit:s.string}),s.string]),in:s.bool,onEnter:s.func,onEntered:s.func,onEntering:s.func,onExit:s.func,onExited:s.func,onExiting:s.func,style:s.object,timeout:s.oneOfType([s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});function sN(e){return Ne("MuiBackdrop",e)}Oe("MuiBackdrop",["root","invisible"]);const aN=e=>{const{classes:t,invisible:n}=e;return Pe({root:["root",n&&"invisible"]},sN,t)},lN=le("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),kh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiBackdrop"}),{children:r,className:i,component:a="div",invisible:l=!1,open:c,components:u={},componentsProps:d={},slotProps:f={},slots:p={},TransitionComponent:h,transitionDuration:g,...m}=o,v={...o,component:a,invisible:l},b=aN(v),C={transition:h,root:u.Root,...p},y={...d,...f},x={component:a,slots:C,slotProps:y},[w,E]=Fe("root",{elementType:lN,externalForwardedProps:x,className:be(b.root,i),ownerState:v}),[k,R]=Fe("transition",{elementType:Nh,externalForwardedProps:x,ownerState:v});return T.jsx(k,{in:c,timeout:g,...m,...R,children:T.jsx(w,{"aria-hidden":!0,...E,ref:n,children:r})})});process.env.NODE_ENV!=="production"&&(kh.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,components:s.shape({Root:s.elementType}),componentsProps:s.shape({root:s.object}),invisible:s.bool,open:s.bool.isRequired,slotProps:s.shape({root:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({root:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),TransitionComponent:s.elementType,transitionDuration:s.oneOfType([s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});const cN=Oe("MuiBox",["root"]),uN=ah(),Er=MC({themeId:Vi,defaultTheme:uN,defaultClassName:cN.root,generateClassName:Up.generate});process.env.NODE_ENV!=="production"&&(Er.propTypes={children:s.node,component:s.elementType,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function dN(e){return Ne("MuiButton",e)}const hn=Oe("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),Oh=D.createContext({});process.env.NODE_ENV!=="production"&&(Oh.displayName="ButtonGroupContext");const Ph=D.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ph.displayName="ButtonGroupButtonContext");const fN=e=>{const{color:t,disableElevation:n,fullWidth:o,size:r,variant:i,loading:a,loadingPosition:l,classes:c}=e,u={root:["root",a&&"loading",i,`${i}${ge(t)}`,`size${ge(r)}`,`${i}Size${ge(r)}`,`color${ge(t)}`,n&&"disableElevation",o&&"fullWidth",a&&`loadingPosition${ge(l)}`],startIcon:["icon","startIcon",`iconSize${ge(r)}`],endIcon:["icon","endIcon",`iconSize${ge(r)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=Pe(u,dN,c);return{...c,...d}},Rh=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],pN=le(ls,{shouldForwardProp:e=>dt(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ge(n.color)}`],t[`size${ge(n.size)}`],t[`${n.variant}Size${ge(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Te(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${hn.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${hn.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${hn.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${hn.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(un()).map(([o])=>({props:{color:o},style:{"--variant-textColor":(e.vars||e).palette[o].main,"--variant-outlinedColor":(e.vars||e).palette[o].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[o].main,.5),"--variant-containedColor":(e.vars||e).palette[o].contrastText,"--variant-containedBg":(e.vars||e).palette[o].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[o].dark,"--variant-textBg":e.alpha((e.vars||e).palette[o].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[o].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[o].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${hn.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${hn.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${hn.loading}`]:{color:"transparent"}}}]}})),hN=le("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ge(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Rh]})),mN=le("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ge(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Rh]})),gN=le("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),od=le("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Qn=D.forwardRef(function(t,n){const o=D.useContext(Oh),r=D.useContext(Ph),i=ar(o,t),a=Ie({props:i,name:"MuiButton"}),{children:l,color:c="primary",component:u="button",className:d,disabled:f=!1,disableElevation:p=!1,disableFocusRipple:h=!1,endIcon:g,focusVisibleClassName:m,fullWidth:v=!1,id:b,loading:C=null,loadingIndicator:y,loadingPosition:x="center",size:w="medium",startIcon:E,type:k,variant:R="text",..._}=a,V=gl(b),I=y??T.jsx(Eh,{"aria-labelledby":V,color:"inherit",size:16}),S={...a,color:c,component:u,disabled:f,disableElevation:p,disableFocusRipple:h,fullWidth:v,loading:C,loadingIndicator:I,loadingPosition:x,size:w,type:k,variant:R},A=fN(S),N=(E||C&&x==="start")&&T.jsx(hN,{className:A.startIcon,ownerState:S,children:E||T.jsx(od,{className:A.loadingIconPlaceholder,ownerState:S})}),O=(g||C&&x==="end")&&T.jsx(mN,{className:A.endIcon,ownerState:S,children:g||T.jsx(od,{className:A.loadingIconPlaceholder,ownerState:S})}),P=r||"",L=typeof C=="boolean"?T.jsx("span",{className:A.loadingWrapper,style:{display:"contents"},children:C&&T.jsx(gN,{className:A.loadingIndicator,ownerState:S,children:I})}):null;return T.jsxs(pN,{ownerState:S,className:be(o.className,A.root,d,P),component:u,disabled:f||C,focusRipple:!h,focusVisibleClassName:be(A.focusVisible,m),ref:n,type:k,id:C?V:b,..._,classes:A,children:[N,x!=="end"&&L,l,x==="end"&&L,O]})});process.env.NODE_ENV!=="production"&&(Qn.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["inherit","primary","secondary","success","error","info","warning"]),s.string]),component:s.elementType,disabled:s.bool,disableElevation:s.bool,disableFocusRipple:s.bool,disableRipple:s.bool,endIcon:s.node,focusVisibleClassName:s.string,fullWidth:s.bool,href:s.string,id:s.string,loading:s.bool,loadingIndicator:s.node,loadingPosition:s.oneOf(["center","end","start"]),size:s.oneOfType([s.oneOf(["small","medium","large"]),s.string]),startIcon:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.oneOfType([s.oneOf(["button","reset","submit"]),s.string]),variant:s.oneOfType([s.oneOf(["contained","outlined","text"]),s.string])});function yN(e){return Ne("PrivateSwitchBase",e)}Oe("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const bN=e=>{const{classes:t,checked:n,disabled:o,edge:r}=e,i={root:["root",n&&"checked",o&&"disabled",r&&`edge${ge(r)}`],input:["input"]};return Pe(i,yN,t)},vN=le(ls,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),xN=le("input",{name:"MuiSwitchBase",shouldForwardProp:dt})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),_h=D.forwardRef(function(t,n){const{autoFocus:o,checked:r,checkedIcon:i,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:f,inputProps:p,inputRef:h,name:g,onBlur:m,onChange:v,onFocus:b,readOnly:C,required:y=!1,tabIndex:x,type:w,value:E,slots:k={},slotProps:R={},..._}=t,[V,I]=Ea({controlled:r,default:!!a,name:"SwitchBase",state:"checked"}),S=dn(),A=K=>{b&&b(K),S&&S.onFocus&&S.onFocus(K)},N=K=>{m&&m(K),S&&S.onBlur&&S.onBlur(K)},O=K=>{if(K.nativeEvent.defaultPrevented||C)return;const Q=K.target.checked;I(Q),v&&v(K,Q)};let P=l;S&&typeof P>"u"&&(P=S.disabled);const L=w==="checkbox"||w==="radio",M={...t,checked:V,disabled:P,disableFocusRipple:c,edge:u},j=bN(M),$={slots:k,slotProps:{input:p,...R}},[B,H]=Fe("root",{ref:n,elementType:vN,className:j.root,shouldForwardComponentProp:!0,externalForwardedProps:{...$,component:"span",..._},getSlotProps:K=>({...K,onFocus:Q=>{K.onFocus?.(Q),A(Q)},onBlur:Q=>{K.onBlur?.(Q),N(Q)}}),ownerState:M,additionalProps:{centerRipple:!0,focusRipple:!c,role:void 0,tabIndex:null}}),[U,W]=Fe("input",{ref:h,elementType:xN,className:j.input,externalForwardedProps:$,getSlotProps:K=>({...K,onChange:Q=>{K.onChange?.(Q),O(Q)}}),ownerState:M,additionalProps:{autoFocus:o,checked:r,defaultChecked:a,disabled:P,id:L?f:void 0,name:g,readOnly:C,required:y,tabIndex:x,type:w,...w==="checkbox"&&E===void 0?{}:{value:E}}});return T.jsxs(B,{...H,children:[T.jsx(U,{...W}),V?i:d]})});process.env.NODE_ENV!=="production"&&(_h.propTypes={autoFocus:s.bool,checked:s.bool,checkedIcon:s.node.isRequired,classes:s.object,className:s.string,defaultChecked:s.bool,disabled:s.bool,disableFocusRipple:s.bool,edge:s.oneOf(["end","start",!1]),icon:s.node.isRequired,id:s.string,inputProps:s.object,inputRef:St,name:s.string,onBlur:s.func,onChange:s.func,onFocus:s.func,readOnly:s.bool,required:s.bool,slotProps:s.shape({input:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object])}),slots:s.shape({input:s.elementType,root:s.elementType}),sx:s.object,tabIndex:s.oneOfType([s.number,s.string]),type:s.string.isRequired,value:s.any});function Ih(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function wN(e){const t=_t(e);return t.body===e?It(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Wo(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function rd(e){return parseFloat(It(e).getComputedStyle(e).paddingRight)||0}function SN(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),o=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||o}function id(e,t,n,o,r){const i=[t,n,...o];[].forEach.call(e.children,a=>{const l=!i.includes(a),c=!SN(a);l&&c&&Wo(a,r)})}function Gs(e,t){let n=-1;return e.some((o,r)=>t(o)?(n=r,!0):!1),n}function EN(e,t){const n=[],o=e.container;if(!t.disableScrollLock){if(wN(o)){const a=Ih(It(o));n.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${rd(o)+a}px`;const l=_t(o).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${rd(c)+a}px`})}let i;if(o.parentNode instanceof DocumentFragment)i=_t(o).body;else{const a=o.parentElement,l=It(o);i=a?.nodeName==="HTML"&&l.getComputedStyle(a).overflowY==="scroll"?a:o}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:l})=>{i?a.style.setProperty(l,i):a.style.removeProperty(l)})}}function CN(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class TN{constructor(){this.modals=[],this.containers=[]}add(t,n){let o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&Wo(t.modalRef,!1);const r=CN(n);id(n,t.mount,t.modalRef,r,!0);const i=Gs(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),o):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:r}),o)}mount(t,n){const o=Gs(this.containers,i=>i.modals.includes(t)),r=this.containers[o];r.restore||(r.restore=EN(r,n))}remove(t,n=!0){const o=this.modals.indexOf(t);if(o===-1)return o;const r=Gs(this.containers,a=>a.modals.includes(t)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(o,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&Wo(t.modalRef,n),id(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&Wo(a.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function jo(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const NN=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function kN(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function ON(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=o=>e.ownerDocument.querySelector(`input[type="radio"]${o}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function PN(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||ON(e))}function RN(e){const t=[],n=[];return Array.from(e.querySelectorAll(NN)).forEach((o,r)=>{const i=kN(o);i===-1||!PN(o)||(i===0?t.push(o):n.push({documentOrder:r,tabIndex:i,node:o}))}),n.sort((o,r)=>o.tabIndex===r.tabIndex?o.documentOrder-r.documentOrder:o.tabIndex-r.tabIndex).map(o=>o.node).concat(t)}function _N(){return!0}function Ni(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:o=!1,disableRestoreFocus:r=!1,getTabbable:i=RN,isEnabled:a=_N,open:l}=e,c=D.useRef(!1),u=D.useRef(null),d=D.useRef(null),f=D.useRef(null),p=D.useRef(null),h=D.useRef(!1),g=D.useRef(null),m=it(ho(t),g),v=D.useRef(null);D.useEffect(()=>{!l||!g.current||(h.current=!n)},[n,l]),D.useEffect(()=>{if(!l||!g.current)return;const y=_t(g.current),x=jo(y);return g.current.contains(x)||(g.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
|
|
148
|
-
`)),g.current.setAttribute("tabIndex","-1")),h.current&&g.current.focus()),()=>{r||(f.current&&f.current.focus&&(c.current=!0,f.current.focus()),f.current=null)}},[l]),D.useEffect(()=>{if(!l||!g.current)return;const y=_t(g.current),x=k=>{if(v.current=k,o||!a()||k.key!=="Tab")return;jo(y)===g.current&&k.shiftKey&&(c.current=!0,d.current&&d.current.focus())},w=()=>{const k=g.current;if(k===null)return;const R=jo(y);if(!y.hasFocus()||!a()||c.current){c.current=!1;return}if(k.contains(R)||o&&R!==u.current&&R!==d.current)return;if(R!==p.current)p.current=null;else if(p.current!==null)return;if(!h.current)return;let _=[];if((R===u.current||R===d.current)&&(_=i(g.current)),_.length>0){const V=!!(v.current?.shiftKey&&v.current?.key==="Tab"),I=_[0],S=_[_.length-1];typeof I!="string"&&typeof S!="string"&&(V?S.focus():I.focus())}else k.focus()};y.addEventListener("focusin",w),y.addEventListener("keydown",x,!0);const E=setInterval(()=>{const k=jo(y);k&&k.tagName==="BODY"&&w()},50);return()=>{clearInterval(E),y.removeEventListener("focusin",w),y.removeEventListener("keydown",x,!0)}},[n,o,r,a,l,i]);const b=y=>{f.current===null&&(f.current=y.relatedTarget),h.current=!0,p.current=y.target;const x=t.props.onFocus;x&&x(y)},C=y=>{f.current===null&&(f.current=y.relatedTarget),h.current=!0};return T.jsxs(D.Fragment,{children:[T.jsx("div",{tabIndex:l?0:-1,onFocus:C,ref:u,"data-testid":"sentinelStart"}),D.cloneElement(t,{ref:m,onFocus:b}),T.jsx("div",{tabIndex:l?0:-1,onFocus:C,ref:d,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(Ni.propTypes={children:mo,disableAutoFocus:s.bool,disableEnforceFocus:s.bool,disableRestoreFocus:s.bool,getTabbable:s.func,isEnabled:s.func,open:s.bool.isRequired});process.env.NODE_ENV!=="production"&&(Ni.propTypes=Jp(Ni.propTypes));function IN(e){return typeof e=="function"?e():e}function MN(e){return e?e.props.hasOwnProperty("in"):!1}const sd=()=>{},Ur=new TN;function $N(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,closeAfterTransition:r=!1,onTransitionEnter:i,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:d}=e,f=D.useRef({}),p=D.useRef(null),h=D.useRef(null),g=it(h,d),[m,v]=D.useState(!u),b=MN(l);let C=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(C=!1);const y=()=>_t(p.current),x=()=>(f.current.modalRef=h.current,f.current.mount=p.current,f.current),w=()=>{Ur.mount(x(),{disableScrollLock:o}),h.current&&(h.current.scrollTop=0)},E=Tn(()=>{const O=IN(t)||y().body;Ur.add(x(),O),h.current&&w()}),k=()=>Ur.isTopModal(x()),R=Tn(O=>{p.current=O,O&&(u&&k()?w():h.current&&Wo(h.current,C))}),_=D.useCallback(()=>{Ur.remove(x(),C)},[C]);D.useEffect(()=>()=>{_()},[_]),D.useEffect(()=>{u?E():(!b||!r)&&_()},[u,_,b,r,E]);const V=O=>P=>{O.onKeyDown?.(P),!(P.key!=="Escape"||P.which===229||!k())&&(n||(P.stopPropagation(),c&&c(P,"escapeKeyDown")))},I=O=>P=>{O.onClick?.(P),P.target===P.currentTarget&&c&&c(P,"backdropClick")};return{getRootProps:(O={})=>{const P=yh(e);delete P.onTransitionEnter,delete P.onTransitionExited;const L={...P,...O};return{role:"presentation",...L,onKeyDown:V(L),ref:g}},getBackdropProps:(O={})=>{const P=O;return{"aria-hidden":!0,...P,onClick:I(P),open:u}},getTransitionProps:()=>{const O=()=>{v(!1),i&&i()},P=()=>{v(!0),a&&a(),r&&_()};return{onEnter:Uu(O,l?.props.onEnter??sd),onExited:Uu(P,l?.props.onExited??sd)}},rootRef:g,portalRef:R,isTopModal:k,exited:m,hasTransition:b}}function AN(e){return Ne("MuiModal",e)}Oe("MuiModal",["root","hidden","backdrop"]);const DN=e=>{const{open:t,exited:n,classes:o}=e;return Pe({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},AN,o)},jN=le("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Te(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),LN=le(kh,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),kl=D.forwardRef(function(t,n){const o=Ie({name:"MuiModal",props:t}),{BackdropComponent:r=LN,BackdropProps:i,classes:a,className:l,closeAfterTransition:c=!1,children:u,container:d,component:f,components:p={},componentsProps:h={},disableAutoFocus:g=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:v=!1,disablePortal:b=!1,disableRestoreFocus:C=!1,disableScrollLock:y=!1,hideBackdrop:x=!1,keepMounted:w=!1,onClose:E,onTransitionEnter:k,onTransitionExited:R,open:_,slotProps:V={},slots:I={},theme:S,...A}=o,N={...o,closeAfterTransition:c,disableAutoFocus:g,disableEnforceFocus:m,disableEscapeKeyDown:v,disablePortal:b,disableRestoreFocus:C,disableScrollLock:y,hideBackdrop:x,keepMounted:w},{getRootProps:O,getBackdropProps:P,getTransitionProps:L,portalRef:M,isTopModal:j,exited:$,hasTransition:B}=$N({...N,rootRef:n}),H={...N,exited:$},U=DN(H),W={};if(u.props.tabIndex===void 0&&(W.tabIndex="-1"),B){const{onEnter:Z,onExited:ne}=L();W.onEnter=Z,W.onExited=ne}const K={slots:{root:p.Root,backdrop:p.Backdrop,...I},slotProps:{...h,...V}},[Q,ee]=Fe("root",{ref:n,elementType:jN,externalForwardedProps:{...K,...A,component:f},getSlotProps:O,ownerState:H,className:be(l,U?.root,!H.open&&H.exited&&U?.hidden)}),[q,J]=Fe("backdrop",{ref:i?.ref,elementType:r,externalForwardedProps:K,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:Z=>P({...Z,onClick:ne=>{Z?.onClick&&Z.onClick(ne)}}),className:be(i?.className,U?.backdrop),ownerState:H});return!w&&!_&&(!B||$)?null:T.jsx(Ei,{ref:M,container:d,disablePortal:b,children:T.jsxs(Q,{...ee,children:[!x&&r?T.jsx(q,{...J}):null,T.jsx(Ni,{disableEnforceFocus:m,disableAutoFocus:g,disableRestoreFocus:C,isEnabled:j,open:_,children:D.cloneElement(u,W)})]})})});process.env.NODE_ENV!=="production"&&(kl.propTypes={BackdropComponent:s.elementType,BackdropProps:s.object,children:mo.isRequired,classes:s.object,className:s.string,closeAfterTransition:s.bool,component:s.elementType,components:s.shape({Backdrop:s.elementType,Root:s.elementType}),componentsProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object])}),container:s.oneOfType([lo,s.func]),disableAutoFocus:s.bool,disableEnforceFocus:s.bool,disableEscapeKeyDown:s.bool,disablePortal:s.bool,disableRestoreFocus:s.bool,disableScrollLock:s.bool,hideBackdrop:s.bool,keepMounted:s.bool,onClose:s.func,onTransitionEnter:s.func,onTransitionExited:s.func,open:s.bool.isRequired,slotProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object])}),slots:s.shape({backdrop:s.elementType,root:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function FN(e){return Ne("MuiDivider",e)}const ad=Oe("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),BN=e=>{const{absolute:t,children:n,classes:o,flexItem:r,light:i,orientation:a,textAlign:l,variant:c}=e;return Pe({root:["root",t&&"absolute",c,i&&"light",a==="vertical"&&"vertical",r&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",l==="right"&&a!=="vertical"&&"textAlignRight",l==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},FN,o)},zN=le("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(Te(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.alpha((e.vars||e).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),VN=le("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(Te(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),sn=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiDivider"}),{absolute:r=!1,children:i,className:a,orientation:l="horizontal",component:c=i||l==="vertical"?"div":"hr",flexItem:u=!1,light:d=!1,role:f=c!=="hr"?"separator":void 0,textAlign:p="center",variant:h="fullWidth",...g}=o,m={...o,absolute:r,component:c,flexItem:u,light:d,orientation:l,role:f,textAlign:p,variant:h},v=BN(m);return T.jsx(zN,{as:c,className:be(v.root,a),role:f,ref:n,ownerState:m,"aria-orientation":f==="separator"&&(c!=="hr"||l==="vertical")?l:void 0,...g,children:i?T.jsx(VN,{className:v.wrapper,ownerState:m,children:i}):null})});sn&&(sn.muiSkipListHighlight=!0);process.env.NODE_ENV!=="production"&&(sn.propTypes={absolute:s.bool,children:s.node,classes:s.object,className:s.string,component:s.elementType,flexItem:s.bool,light:s.bool,orientation:s.oneOf(["horizontal","vertical"]),role:s.string,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),textAlign:s.oneOf(["center","left","right"]),variant:s.oneOfType([s.oneOf(["fullWidth","inset","middle"]),s.string])});function HN(e,t,n){const o=t.getBoundingClientRect(),r=n&&n.getBoundingClientRect(),i=It(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const u=i.getComputedStyle(t);a=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let l=0,c=0;if(a&&a!=="none"&&typeof a=="string"){const u=a.split("(")[1].split(")")[0].split(",");l=parseInt(u[4],10),c=parseInt(u[5],10)}return e==="left"?r?`translateX(${r.right+l-o.left}px)`:`translateX(${i.innerWidth+l-o.left}px)`:e==="right"?r?`translateX(-${o.right-r.left-l}px)`:`translateX(-${o.left+o.width-l}px)`:e==="up"?r?`translateY(${r.bottom+c-o.top}px)`:`translateY(${i.innerHeight+c-o.top}px)`:r?`translateY(-${o.top-r.top+o.height-c}px)`:`translateY(-${o.top+o.height-c}px)`}function Mh(e){return typeof e=="function"?e():e}function qr(e,t,n){const o=Mh(n),r=HN(e,t,o);r&&(t.style.webkitTransform=r,t.style.transform=r)}const $h=D.forwardRef(function(t,n){const o=Sr(),r={enter:o.transitions.easing.easeOut,exit:o.transitions.easing.sharp},i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:a,appear:l=!0,children:c,container:u,direction:d="down",easing:f=r,in:p,onEnter:h,onEntered:g,onEntering:m,onExit:v,onExited:b,onExiting:C,style:y,timeout:x=i,TransitionComponent:w=$t,...E}=t,k=D.useRef(null),R=it(ho(c),k,n),_=M=>j=>{M&&(j===void 0?M(k.current):M(k.current,j))},V=_((M,j)=>{qr(d,M,u),Cl(M),h&&h(M,j)}),I=_((M,j)=>{const $=ao({timeout:x,style:y,easing:f},{mode:"enter"});M.style.webkitTransition=o.transitions.create("-webkit-transform",{...$}),M.style.transition=o.transitions.create("transform",{...$}),M.style.webkitTransform="none",M.style.transform="none",m&&m(M,j)}),S=_(g),A=_(C),N=_(M=>{const j=ao({timeout:x,style:y,easing:f},{mode:"exit"});M.style.webkitTransition=o.transitions.create("-webkit-transform",j),M.style.transition=o.transitions.create("transform",j),qr(d,M,u),v&&v(M)}),O=_(M=>{M.style.webkitTransition="",M.style.transition="",b&&b(M)}),P=M=>{a&&a(k.current,M)},L=D.useCallback(()=>{k.current&&qr(d,k.current,u)},[d,u]);return D.useEffect(()=>{if(p||d==="down"||d==="right")return;const M=vl(()=>{k.current&&qr(d,k.current,u)}),j=It(k.current);return j.addEventListener("resize",M),()=>{M.clear(),j.removeEventListener("resize",M)}},[d,p,u]),D.useEffect(()=>{p||L()},[p,L]),T.jsx(w,{nodeRef:k,onEnter:V,onEntered:S,onEntering:I,onExit:N,onExited:O,onExiting:A,addEndListener:P,appear:l,in:p,timeout:x,...E,children:(M,{ownerState:j,...$})=>D.cloneElement(c,{ref:R,style:{visibility:M==="exited"&&!p?"hidden":void 0,...y,...c.props.style},...$})})});process.env.NODE_ENV!=="production"&&($h.propTypes={addEndListener:s.func,appear:s.bool,children:mo.isRequired,container:Mn(s.oneOfType([lo,s.func]),e=>{if(e.open){const t=Mh(e.container);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="production"&&!globalThis.MUI_TEST_ENV&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
146
|
+
`),k=x.selectionStart===w;E&&k&&x.setSelectionRange(w,w),o&&o(y)};return T.jsxs(D.Fragment,{children:[T.jsx("textarea",{value:l,onChange:C,ref:f,rows:i,style:a,...c}),T.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:h,tabIndex:-1,style:{...KT.shadow,...a,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(Ch.propTypes={className:s.string,maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),onChange:s.func,placeholder:s.string,style:s.object,value:s.oneOfType([s.arrayOf(s.string),s.number,s.string])});function $n({props:e,states:t,muiFormControl:n}){return t.reduce((o,r)=>(o[r]=e[r],n&&typeof e[r]>"u"&&(o[r]=n[r]),o),{})}const cs=D.createContext(void 0);process.env.NODE_ENV!=="production"&&(cs.displayName="FormControlContext");function dn(){return D.useContext(cs)}function ed(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Ti(e,t=!1){return e&&(ed(e.value)&&e.value!==""||t&&ed(e.defaultValue)&&e.defaultValue!=="")}function ZT(e){return e.startAdornment}function QT(e){return ke("MuiInputBase",e)}const co=Oe("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var td;const us=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${me(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},ds=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},JT=e=>{const{classes:t,color:n,disabled:o,error:r,endAdornment:i,focused:a,formControl:l,fullWidth:c,hiddenLabel:u,multiline:d,readOnly:f,size:p,startAdornment:h,type:g}=e,m={root:["root",`color${me(n)}`,o&&"disabled",r&&"error",c&&"fullWidth",a&&"focused",l&&"formControl",p&&p!=="medium"&&`size${me(p)}`,d&&"multiline",h&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",o&&"disabled",g==="search"&&"inputTypeSearch",d&&"inputMultiline",p==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",h&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]};return Pe(m,QT,t)},fs=le("div",{name:"MuiInputBase",slot:"Root",overridesResolver:us})(Ne(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${co.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),ps=le("input",{name:"MuiInputBase",slot:"Input",overridesResolver:ds})(Ne(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},o={opacity:"0 !important"},r=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${co.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":r,"&:focus::-moz-placeholder":r,"&:focus::-ms-input-placeholder":r},[`&.${co.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),nd=G1({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),hs=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiInputBase"}),{"aria-describedby":r,autoComplete:i,autoFocus:a,className:l,color:c,components:u={},componentsProps:d={},defaultValue:f,disabled:p,disableInjectingGlobalStyles:h,endAdornment:g,error:m,fullWidth:v=!1,id:b,inputComponent:C="input",inputProps:y={},inputRef:x,margin:w,maxRows:E,minRows:k,multiline:R=!1,name:_,onBlur:V,onChange:I,onClick:S,onFocus:A,onKeyDown:N,onKeyUp:O,placeholder:P,readOnly:L,renderSuffix:M,rows:j,size:$,slotProps:B={},slots:H={},startAdornment:U,type:W="text",value:K,...Q}=o,ee=y.value!=null?y.value:K,{current:q}=D.useRef(ee!=null),J=D.useRef(),Z=D.useCallback(ye=>{process.env.NODE_ENV!=="production"&&ye&&ye.nodeName!=="INPUT"&&!ye.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
|
|
147
|
+
`))},[]),ne=it(J,x,y.ref,Z),[z,ae]=D.useState(!1),se=dn();process.env.NODE_ENV!=="production"&&D.useEffect(()=>{if(se)return se.registerEffect()},[se]);const de=$n({props:o,muiFormControl:se,states:["color","disabled","error","hiddenLabel","size","required","filled"]});de.focused=se?se.focused:z,D.useEffect(()=>{!se&&p&&z&&(ae(!1),V&&V())},[se,p,z,V]);const we=se&&se.onFilled,Te=se&&se.onEmpty,G=D.useCallback(ye=>{Ti(ye)?we&&we():Te&&Te()},[we,Te]);an(()=>{q&&G({value:ee})},[ee,G,q]);const X=ye=>{A&&A(ye),y.onFocus&&y.onFocus(ye),se&&se.onFocus?se.onFocus(ye):ae(!0)},te=ye=>{V&&V(ye),y.onBlur&&y.onBlur(ye),se&&se.onBlur?se.onBlur(ye):ae(!1)},re=(ye,...Se)=>{if(!q){const xe=ye.target||J.current;if(xe==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":Zt(1));G({value:xe.value})}y.onChange&&y.onChange(ye,...Se),I&&I(ye,...Se)};D.useEffect(()=>{G(J.current)},[]);const oe=ye=>{J.current&&ye.currentTarget===ye.target&&J.current.focus(),S&&S(ye)};let ce=C,ie=y;R&&ce==="input"&&(j?(process.env.NODE_ENV!=="production"&&(k||E)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),ie={type:void 0,minRows:j,maxRows:j,...ie}):ie={type:void 0,maxRows:E,minRows:k,...ie},ce=Ch);const ge=ye=>{G(ye.animationName==="mui-auto-fill-cancel"?J.current:{value:"x"})};D.useEffect(()=>{se&&se.setAdornedStart(!!U)},[se,U]);const he={...o,color:de.color||"primary",disabled:de.disabled,endAdornment:g,error:de.error,focused:de.focused,formControl:se,fullWidth:v,hiddenLabel:de.hiddenLabel,multiline:R,size:de.size,startAdornment:U,type:W},ue=JT(he),ve=H.root||u.Root||fs,qe=B.root||d.root||{},Xe=H.input||u.Input||ps;return ie={...ie,...B.input??d.input},T.jsxs(D.Fragment,{children:[!h&&typeof nd=="function"&&(td||(td=T.jsx(nd,{}))),T.jsxs(ve,{...qe,ref:n,onClick:oe,...Q,...!wi(ve)&&{ownerState:{...he,...qe.ownerState}},className:be(ue.root,qe.className,l,L&&"MuiInputBase-readOnly"),children:[U,T.jsx(cs.Provider,{value:null,children:T.jsx(Xe,{"aria-invalid":de.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:f,disabled:de.disabled,id:b,onAnimationStart:ge,name:_,placeholder:P,readOnly:L,required:de.required,rows:j,value:ee,onKeyDown:N,onKeyUp:O,type:W,...ie,...!wi(Xe)&&{as:ce,ownerState:{...he,...ie.ownerState}},ref:ne,className:be(ue.input,ie.className,L&&"MuiInputBase-readOnly"),onBlur:te,onChange:re,onFocus:X})}),g,M?M({...de,startAdornment:U}):null]})]})});process.env.NODE_ENV!=="production"&&(hs.propTypes={"aria-describedby":s.string,autoComplete:s.string,autoFocus:s.bool,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","error","info","success","warning"]),s.string]),components:s.shape({Input:s.elementType,Root:s.elementType}),componentsProps:s.shape({input:s.object,root:s.object}),defaultValue:s.any,disabled:s.bool,disableInjectingGlobalStyles:s.bool,endAdornment:s.node,error:s.bool,fullWidth:s.bool,id:s.string,inputComponent:El,inputProps:s.object,inputRef:Et,margin:s.oneOf(["dense","none"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,onBlur:s.func,onChange:s.func,onClick:s.func,onFocus:s.func,onInvalid:s.func,onKeyDown:s.func,onKeyUp:s.func,placeholder:s.string,readOnly:s.bool,renderSuffix:s.func,required:s.bool,rows:s.oneOfType([s.number,s.string]),size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),slotProps:s.shape({input:s.object,root:s.object}),slots:s.shape({input:s.elementType,root:s.elementType}),startAdornment:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any});function eN(e){return ke("MuiInput",e)}const To={...co,...Oe("MuiInput",["root","underline","input"])};function tN(e){return ke("MuiOutlinedInput",e)}const Dt={...co,...Oe("MuiOutlinedInput",["root","notchedOutline","input"])};function nN(e){return ke("MuiFilledInput",e)}const pn={...co,...Oe("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},oN=J1(T.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function rN(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Th(e,t,n,o,r){const i=e[t],a=r||t;if(i==null||typeof window>"u")return null;let l;const c=i.type;return typeof c=="function"&&!rN(c)&&(l="Did you accidentally use a plain function component for an element instead?"),l!==void 0?new Error(`Invalid ${o} \`${a}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const mo=Mn(s.element,Th);mo.isRequired=Mn(s.element.isRequired,Th);const iN={entering:{opacity:1},entered:{opacity:1}},Nh=D.forwardRef(function(t,n){const o=Sr(),r={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:p,onExit:h,onExited:g,onExiting:m,style:v,timeout:b=r,TransitionComponent:C=$t,...y}=t,x=D.useRef(null),w=it(x,ho(l),n),E=N=>O=>{if(N){const P=x.current;O===void 0?N(P):N(P,O)}},k=E(p),R=E((N,O)=>{Cl(N);const P=ao({style:v,timeout:b,easing:c},{mode:"enter"});N.style.webkitTransition=o.transitions.create("opacity",P),N.style.transition=o.transitions.create("opacity",P),d&&d(N,O)}),_=E(f),V=E(m),I=E(N=>{const O=ao({style:v,timeout:b,easing:c},{mode:"exit"});N.style.webkitTransition=o.transitions.create("opacity",O),N.style.transition=o.transitions.create("opacity",O),h&&h(N)}),S=E(g),A=N=>{i&&i(x.current,N)};return T.jsx(C,{appear:a,in:u,nodeRef:x,onEnter:R,onEntered:_,onEntering:k,onExit:I,onExited:S,onExiting:V,addEndListener:A,timeout:b,...y,children:(N,{ownerState:O,...P})=>D.cloneElement(l,{style:{opacity:0,visibility:N==="exited"&&!u?"hidden":void 0,...iN[N],...v,...l.props.style},ref:w,...P})})});process.env.NODE_ENV!=="production"&&(Nh.propTypes={addEndListener:s.func,appear:s.bool,children:mo.isRequired,easing:s.oneOfType([s.shape({enter:s.string,exit:s.string}),s.string]),in:s.bool,onEnter:s.func,onEntered:s.func,onEntering:s.func,onExit:s.func,onExited:s.func,onExiting:s.func,style:s.object,timeout:s.oneOfType([s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});function sN(e){return ke("MuiBackdrop",e)}Oe("MuiBackdrop",["root","invisible"]);const aN=e=>{const{classes:t,invisible:n}=e;return Pe({root:["root",n&&"invisible"]},sN,t)},lN=le("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),kh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiBackdrop"}),{children:r,className:i,component:a="div",invisible:l=!1,open:c,components:u={},componentsProps:d={},slotProps:f={},slots:p={},TransitionComponent:h,transitionDuration:g,...m}=o,v={...o,component:a,invisible:l},b=aN(v),C={transition:h,root:u.Root,...p},y={...d,...f},x={component:a,slots:C,slotProps:y},[w,E]=Fe("root",{elementType:lN,externalForwardedProps:x,className:be(b.root,i),ownerState:v}),[k,R]=Fe("transition",{elementType:Nh,externalForwardedProps:x,ownerState:v});return T.jsx(k,{in:c,timeout:g,...m,...R,children:T.jsx(w,{"aria-hidden":!0,...E,ref:n,children:r})})});process.env.NODE_ENV!=="production"&&(kh.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,components:s.shape({Root:s.elementType}),componentsProps:s.shape({root:s.object}),invisible:s.bool,open:s.bool.isRequired,slotProps:s.shape({root:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({root:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),TransitionComponent:s.elementType,transitionDuration:s.oneOfType([s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});const cN=Oe("MuiBox",["root"]),uN=ah(),Er=MC({themeId:Vi,defaultTheme:uN,defaultClassName:cN.root,generateClassName:Up.generate});process.env.NODE_ENV!=="production"&&(Er.propTypes={children:s.node,component:s.elementType,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function dN(e){return ke("MuiButton",e)}const hn=Oe("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),Oh=D.createContext({});process.env.NODE_ENV!=="production"&&(Oh.displayName="ButtonGroupContext");const Ph=D.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ph.displayName="ButtonGroupButtonContext");const fN=e=>{const{color:t,disableElevation:n,fullWidth:o,size:r,variant:i,loading:a,loadingPosition:l,classes:c}=e,u={root:["root",a&&"loading",i,`${i}${me(t)}`,`size${me(r)}`,`${i}Size${me(r)}`,`color${me(t)}`,n&&"disableElevation",o&&"fullWidth",a&&`loadingPosition${me(l)}`],startIcon:["icon","startIcon",`iconSize${me(r)}`],endIcon:["icon","endIcon",`iconSize${me(r)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=Pe(u,dN,c);return{...c,...d}},Rh=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],pN=le(ls,{shouldForwardProp:e=>dt(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${me(n.color)}`],t[`size${me(n.size)}`],t[`${n.variant}Size${me(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Ne(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${hn.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${hn.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${hn.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${hn.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(un()).map(([o])=>({props:{color:o},style:{"--variant-textColor":(e.vars||e).palette[o].main,"--variant-outlinedColor":(e.vars||e).palette[o].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[o].main,.5),"--variant-containedColor":(e.vars||e).palette[o].contrastText,"--variant-containedBg":(e.vars||e).palette[o].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[o].dark,"--variant-textBg":e.alpha((e.vars||e).palette[o].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[o].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[o].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${hn.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${hn.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${hn.loading}`]:{color:"transparent"}}}]}})),hN=le("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${me(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Rh]})),mN=le("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${me(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Rh]})),gN=le("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),od=le("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Qn=D.forwardRef(function(t,n){const o=D.useContext(Oh),r=D.useContext(Ph),i=ar(o,t),a=Ie({props:i,name:"MuiButton"}),{children:l,color:c="primary",component:u="button",className:d,disabled:f=!1,disableElevation:p=!1,disableFocusRipple:h=!1,endIcon:g,focusVisibleClassName:m,fullWidth:v=!1,id:b,loading:C=null,loadingIndicator:y,loadingPosition:x="center",size:w="medium",startIcon:E,type:k,variant:R="text",..._}=a,V=gl(b),I=y??T.jsx(Eh,{"aria-labelledby":V,color:"inherit",size:16}),S={...a,color:c,component:u,disabled:f,disableElevation:p,disableFocusRipple:h,fullWidth:v,loading:C,loadingIndicator:I,loadingPosition:x,size:w,type:k,variant:R},A=fN(S),N=(E||C&&x==="start")&&T.jsx(hN,{className:A.startIcon,ownerState:S,children:E||T.jsx(od,{className:A.loadingIconPlaceholder,ownerState:S})}),O=(g||C&&x==="end")&&T.jsx(mN,{className:A.endIcon,ownerState:S,children:g||T.jsx(od,{className:A.loadingIconPlaceholder,ownerState:S})}),P=r||"",L=typeof C=="boolean"?T.jsx("span",{className:A.loadingWrapper,style:{display:"contents"},children:C&&T.jsx(gN,{className:A.loadingIndicator,ownerState:S,children:I})}):null;return T.jsxs(pN,{ownerState:S,className:be(o.className,A.root,d,P),component:u,disabled:f||C,focusRipple:!h,focusVisibleClassName:be(A.focusVisible,m),ref:n,type:k,id:C?V:b,..._,classes:A,children:[N,x!=="end"&&L,l,x==="end"&&L,O]})});process.env.NODE_ENV!=="production"&&(Qn.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["inherit","primary","secondary","success","error","info","warning"]),s.string]),component:s.elementType,disabled:s.bool,disableElevation:s.bool,disableFocusRipple:s.bool,disableRipple:s.bool,endIcon:s.node,focusVisibleClassName:s.string,fullWidth:s.bool,href:s.string,id:s.string,loading:s.bool,loadingIndicator:s.node,loadingPosition:s.oneOf(["center","end","start"]),size:s.oneOfType([s.oneOf(["small","medium","large"]),s.string]),startIcon:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.oneOfType([s.oneOf(["button","reset","submit"]),s.string]),variant:s.oneOfType([s.oneOf(["contained","outlined","text"]),s.string])});function yN(e){return ke("PrivateSwitchBase",e)}Oe("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const bN=e=>{const{classes:t,checked:n,disabled:o,edge:r}=e,i={root:["root",n&&"checked",o&&"disabled",r&&`edge${me(r)}`],input:["input"]};return Pe(i,yN,t)},vN=le(ls,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),xN=le("input",{name:"MuiSwitchBase",shouldForwardProp:dt})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),_h=D.forwardRef(function(t,n){const{autoFocus:o,checked:r,checkedIcon:i,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:f,inputProps:p,inputRef:h,name:g,onBlur:m,onChange:v,onFocus:b,readOnly:C,required:y=!1,tabIndex:x,type:w,value:E,slots:k={},slotProps:R={},..._}=t,[V,I]=Ea({controlled:r,default:!!a,name:"SwitchBase",state:"checked"}),S=dn(),A=K=>{b&&b(K),S&&S.onFocus&&S.onFocus(K)},N=K=>{m&&m(K),S&&S.onBlur&&S.onBlur(K)},O=K=>{if(K.nativeEvent.defaultPrevented||C)return;const Q=K.target.checked;I(Q),v&&v(K,Q)};let P=l;S&&typeof P>"u"&&(P=S.disabled);const L=w==="checkbox"||w==="radio",M={...t,checked:V,disabled:P,disableFocusRipple:c,edge:u},j=bN(M),$={slots:k,slotProps:{input:p,...R}},[B,H]=Fe("root",{ref:n,elementType:vN,className:j.root,shouldForwardComponentProp:!0,externalForwardedProps:{...$,component:"span",..._},getSlotProps:K=>({...K,onFocus:Q=>{K.onFocus?.(Q),A(Q)},onBlur:Q=>{K.onBlur?.(Q),N(Q)}}),ownerState:M,additionalProps:{centerRipple:!0,focusRipple:!c,role:void 0,tabIndex:null}}),[U,W]=Fe("input",{ref:h,elementType:xN,className:j.input,externalForwardedProps:$,getSlotProps:K=>({...K,onChange:Q=>{K.onChange?.(Q),O(Q)}}),ownerState:M,additionalProps:{autoFocus:o,checked:r,defaultChecked:a,disabled:P,id:L?f:void 0,name:g,readOnly:C,required:y,tabIndex:x,type:w,...w==="checkbox"&&E===void 0?{}:{value:E}}});return T.jsxs(B,{...H,children:[T.jsx(U,{...W}),V?i:d]})});process.env.NODE_ENV!=="production"&&(_h.propTypes={autoFocus:s.bool,checked:s.bool,checkedIcon:s.node.isRequired,classes:s.object,className:s.string,defaultChecked:s.bool,disabled:s.bool,disableFocusRipple:s.bool,edge:s.oneOf(["end","start",!1]),icon:s.node.isRequired,id:s.string,inputProps:s.object,inputRef:Et,name:s.string,onBlur:s.func,onChange:s.func,onFocus:s.func,readOnly:s.bool,required:s.bool,slotProps:s.shape({input:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object])}),slots:s.shape({input:s.elementType,root:s.elementType}),sx:s.object,tabIndex:s.oneOfType([s.number,s.string]),type:s.string.isRequired,value:s.any});function Ih(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function wN(e){const t=_t(e);return t.body===e?It(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Wo(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function rd(e){return parseFloat(It(e).getComputedStyle(e).paddingRight)||0}function SN(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),o=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||o}function id(e,t,n,o,r){const i=[t,n,...o];[].forEach.call(e.children,a=>{const l=!i.includes(a),c=!SN(a);l&&c&&Wo(a,r)})}function Gs(e,t){let n=-1;return e.some((o,r)=>t(o)?(n=r,!0):!1),n}function EN(e,t){const n=[],o=e.container;if(!t.disableScrollLock){if(wN(o)){const a=Ih(It(o));n.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${rd(o)+a}px`;const l=_t(o).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${rd(c)+a}px`})}let i;if(o.parentNode instanceof DocumentFragment)i=_t(o).body;else{const a=o.parentElement,l=It(o);i=a?.nodeName==="HTML"&&l.getComputedStyle(a).overflowY==="scroll"?a:o}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:l})=>{i?a.style.setProperty(l,i):a.style.removeProperty(l)})}}function CN(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class TN{constructor(){this.modals=[],this.containers=[]}add(t,n){let o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&Wo(t.modalRef,!1);const r=CN(n);id(n,t.mount,t.modalRef,r,!0);const i=Gs(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),o):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:r}),o)}mount(t,n){const o=Gs(this.containers,i=>i.modals.includes(t)),r=this.containers[o];r.restore||(r.restore=EN(r,n))}remove(t,n=!0){const o=this.modals.indexOf(t);if(o===-1)return o;const r=Gs(this.containers,a=>a.modals.includes(t)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(o,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&Wo(t.modalRef,n),id(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&Wo(a.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function jo(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const NN=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function kN(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function ON(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=o=>e.ownerDocument.querySelector(`input[type="radio"]${o}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function PN(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||ON(e))}function RN(e){const t=[],n=[];return Array.from(e.querySelectorAll(NN)).forEach((o,r)=>{const i=kN(o);i===-1||!PN(o)||(i===0?t.push(o):n.push({documentOrder:r,tabIndex:i,node:o}))}),n.sort((o,r)=>o.tabIndex===r.tabIndex?o.documentOrder-r.documentOrder:o.tabIndex-r.tabIndex).map(o=>o.node).concat(t)}function _N(){return!0}function Ni(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:o=!1,disableRestoreFocus:r=!1,getTabbable:i=RN,isEnabled:a=_N,open:l}=e,c=D.useRef(!1),u=D.useRef(null),d=D.useRef(null),f=D.useRef(null),p=D.useRef(null),h=D.useRef(!1),g=D.useRef(null),m=it(ho(t),g),v=D.useRef(null);D.useEffect(()=>{!l||!g.current||(h.current=!n)},[n,l]),D.useEffect(()=>{if(!l||!g.current)return;const y=_t(g.current),x=jo(y);return g.current.contains(x)||(g.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
|
|
148
|
+
`)),g.current.setAttribute("tabIndex","-1")),h.current&&g.current.focus()),()=>{r||(f.current&&f.current.focus&&(c.current=!0,f.current.focus()),f.current=null)}},[l]),D.useEffect(()=>{if(!l||!g.current)return;const y=_t(g.current),x=k=>{if(v.current=k,o||!a()||k.key!=="Tab")return;jo(y)===g.current&&k.shiftKey&&(c.current=!0,d.current&&d.current.focus())},w=()=>{const k=g.current;if(k===null)return;const R=jo(y);if(!y.hasFocus()||!a()||c.current){c.current=!1;return}if(k.contains(R)||o&&R!==u.current&&R!==d.current)return;if(R!==p.current)p.current=null;else if(p.current!==null)return;if(!h.current)return;let _=[];if((R===u.current||R===d.current)&&(_=i(g.current)),_.length>0){const V=!!(v.current?.shiftKey&&v.current?.key==="Tab"),I=_[0],S=_[_.length-1];typeof I!="string"&&typeof S!="string"&&(V?S.focus():I.focus())}else k.focus()};y.addEventListener("focusin",w),y.addEventListener("keydown",x,!0);const E=setInterval(()=>{const k=jo(y);k&&k.tagName==="BODY"&&w()},50);return()=>{clearInterval(E),y.removeEventListener("focusin",w),y.removeEventListener("keydown",x,!0)}},[n,o,r,a,l,i]);const b=y=>{f.current===null&&(f.current=y.relatedTarget),h.current=!0,p.current=y.target;const x=t.props.onFocus;x&&x(y)},C=y=>{f.current===null&&(f.current=y.relatedTarget),h.current=!0};return T.jsxs(D.Fragment,{children:[T.jsx("div",{tabIndex:l?0:-1,onFocus:C,ref:u,"data-testid":"sentinelStart"}),D.cloneElement(t,{ref:m,onFocus:b}),T.jsx("div",{tabIndex:l?0:-1,onFocus:C,ref:d,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(Ni.propTypes={children:mo,disableAutoFocus:s.bool,disableEnforceFocus:s.bool,disableRestoreFocus:s.bool,getTabbable:s.func,isEnabled:s.func,open:s.bool.isRequired});process.env.NODE_ENV!=="production"&&(Ni.propTypes=Jp(Ni.propTypes));function IN(e){return typeof e=="function"?e():e}function MN(e){return e?e.props.hasOwnProperty("in"):!1}const sd=()=>{},Ur=new TN;function $N(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,closeAfterTransition:r=!1,onTransitionEnter:i,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:d}=e,f=D.useRef({}),p=D.useRef(null),h=D.useRef(null),g=it(h,d),[m,v]=D.useState(!u),b=MN(l);let C=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(C=!1);const y=()=>_t(p.current),x=()=>(f.current.modalRef=h.current,f.current.mount=p.current,f.current),w=()=>{Ur.mount(x(),{disableScrollLock:o}),h.current&&(h.current.scrollTop=0)},E=Tn(()=>{const O=IN(t)||y().body;Ur.add(x(),O),h.current&&w()}),k=()=>Ur.isTopModal(x()),R=Tn(O=>{p.current=O,O&&(u&&k()?w():h.current&&Wo(h.current,C))}),_=D.useCallback(()=>{Ur.remove(x(),C)},[C]);D.useEffect(()=>()=>{_()},[_]),D.useEffect(()=>{u?E():(!b||!r)&&_()},[u,_,b,r,E]);const V=O=>P=>{O.onKeyDown?.(P),!(P.key!=="Escape"||P.which===229||!k())&&(n||(P.stopPropagation(),c&&c(P,"escapeKeyDown")))},I=O=>P=>{O.onClick?.(P),P.target===P.currentTarget&&c&&c(P,"backdropClick")};return{getRootProps:(O={})=>{const P=yh(e);delete P.onTransitionEnter,delete P.onTransitionExited;const L={...P,...O};return{role:"presentation",...L,onKeyDown:V(L),ref:g}},getBackdropProps:(O={})=>{const P=O;return{"aria-hidden":!0,...P,onClick:I(P),open:u}},getTransitionProps:()=>{const O=()=>{v(!1),i&&i()},P=()=>{v(!0),a&&a(),r&&_()};return{onEnter:Uu(O,l?.props.onEnter??sd),onExited:Uu(P,l?.props.onExited??sd)}},rootRef:g,portalRef:R,isTopModal:k,exited:m,hasTransition:b}}function AN(e){return ke("MuiModal",e)}Oe("MuiModal",["root","hidden","backdrop"]);const DN=e=>{const{open:t,exited:n,classes:o}=e;return Pe({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},AN,o)},jN=le("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Ne(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),LN=le(kh,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),kl=D.forwardRef(function(t,n){const o=Ie({name:"MuiModal",props:t}),{BackdropComponent:r=LN,BackdropProps:i,classes:a,className:l,closeAfterTransition:c=!1,children:u,container:d,component:f,components:p={},componentsProps:h={},disableAutoFocus:g=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:v=!1,disablePortal:b=!1,disableRestoreFocus:C=!1,disableScrollLock:y=!1,hideBackdrop:x=!1,keepMounted:w=!1,onClose:E,onTransitionEnter:k,onTransitionExited:R,open:_,slotProps:V={},slots:I={},theme:S,...A}=o,N={...o,closeAfterTransition:c,disableAutoFocus:g,disableEnforceFocus:m,disableEscapeKeyDown:v,disablePortal:b,disableRestoreFocus:C,disableScrollLock:y,hideBackdrop:x,keepMounted:w},{getRootProps:O,getBackdropProps:P,getTransitionProps:L,portalRef:M,isTopModal:j,exited:$,hasTransition:B}=$N({...N,rootRef:n}),H={...N,exited:$},U=DN(H),W={};if(u.props.tabIndex===void 0&&(W.tabIndex="-1"),B){const{onEnter:Z,onExited:ne}=L();W.onEnter=Z,W.onExited=ne}const K={slots:{root:p.Root,backdrop:p.Backdrop,...I},slotProps:{...h,...V}},[Q,ee]=Fe("root",{ref:n,elementType:jN,externalForwardedProps:{...K,...A,component:f},getSlotProps:O,ownerState:H,className:be(l,U?.root,!H.open&&H.exited&&U?.hidden)}),[q,J]=Fe("backdrop",{ref:i?.ref,elementType:r,externalForwardedProps:K,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:Z=>P({...Z,onClick:ne=>{Z?.onClick&&Z.onClick(ne)}}),className:be(i?.className,U?.backdrop),ownerState:H});return!w&&!_&&(!B||$)?null:T.jsx(Ei,{ref:M,container:d,disablePortal:b,children:T.jsxs(Q,{...ee,children:[!x&&r?T.jsx(q,{...J}):null,T.jsx(Ni,{disableEnforceFocus:m,disableAutoFocus:g,disableRestoreFocus:C,isEnabled:j,open:_,children:D.cloneElement(u,W)})]})})});process.env.NODE_ENV!=="production"&&(kl.propTypes={BackdropComponent:s.elementType,BackdropProps:s.object,children:mo.isRequired,classes:s.object,className:s.string,closeAfterTransition:s.bool,component:s.elementType,components:s.shape({Backdrop:s.elementType,Root:s.elementType}),componentsProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object])}),container:s.oneOfType([lo,s.func]),disableAutoFocus:s.bool,disableEnforceFocus:s.bool,disableEscapeKeyDown:s.bool,disablePortal:s.bool,disableRestoreFocus:s.bool,disableScrollLock:s.bool,hideBackdrop:s.bool,keepMounted:s.bool,onClose:s.func,onTransitionEnter:s.func,onTransitionExited:s.func,open:s.bool.isRequired,slotProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object])}),slots:s.shape({backdrop:s.elementType,root:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function FN(e){return ke("MuiDivider",e)}const ad=Oe("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),BN=e=>{const{absolute:t,children:n,classes:o,flexItem:r,light:i,orientation:a,textAlign:l,variant:c}=e;return Pe({root:["root",t&&"absolute",c,i&&"light",a==="vertical"&&"vertical",r&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",l==="right"&&a!=="vertical"&&"textAlignRight",l==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},FN,o)},zN=le("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(Ne(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.alpha((e.vars||e).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),VN=le("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(Ne(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),sn=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiDivider"}),{absolute:r=!1,children:i,className:a,orientation:l="horizontal",component:c=i||l==="vertical"?"div":"hr",flexItem:u=!1,light:d=!1,role:f=c!=="hr"?"separator":void 0,textAlign:p="center",variant:h="fullWidth",...g}=o,m={...o,absolute:r,component:c,flexItem:u,light:d,orientation:l,role:f,textAlign:p,variant:h},v=BN(m);return T.jsx(zN,{as:c,className:be(v.root,a),role:f,ref:n,ownerState:m,"aria-orientation":f==="separator"&&(c!=="hr"||l==="vertical")?l:void 0,...g,children:i?T.jsx(VN,{className:v.wrapper,ownerState:m,children:i}):null})});sn&&(sn.muiSkipListHighlight=!0);process.env.NODE_ENV!=="production"&&(sn.propTypes={absolute:s.bool,children:s.node,classes:s.object,className:s.string,component:s.elementType,flexItem:s.bool,light:s.bool,orientation:s.oneOf(["horizontal","vertical"]),role:s.string,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),textAlign:s.oneOf(["center","left","right"]),variant:s.oneOfType([s.oneOf(["fullWidth","inset","middle"]),s.string])});function HN(e,t,n){const o=t.getBoundingClientRect(),r=n&&n.getBoundingClientRect(),i=It(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const u=i.getComputedStyle(t);a=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let l=0,c=0;if(a&&a!=="none"&&typeof a=="string"){const u=a.split("(")[1].split(")")[0].split(",");l=parseInt(u[4],10),c=parseInt(u[5],10)}return e==="left"?r?`translateX(${r.right+l-o.left}px)`:`translateX(${i.innerWidth+l-o.left}px)`:e==="right"?r?`translateX(-${o.right-r.left-l}px)`:`translateX(-${o.left+o.width-l}px)`:e==="up"?r?`translateY(${r.bottom+c-o.top}px)`:`translateY(${i.innerHeight+c-o.top}px)`:r?`translateY(-${o.top-r.top+o.height-c}px)`:`translateY(-${o.top+o.height-c}px)`}function Mh(e){return typeof e=="function"?e():e}function qr(e,t,n){const o=Mh(n),r=HN(e,t,o);r&&(t.style.webkitTransform=r,t.style.transform=r)}const $h=D.forwardRef(function(t,n){const o=Sr(),r={enter:o.transitions.easing.easeOut,exit:o.transitions.easing.sharp},i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:a,appear:l=!0,children:c,container:u,direction:d="down",easing:f=r,in:p,onEnter:h,onEntered:g,onEntering:m,onExit:v,onExited:b,onExiting:C,style:y,timeout:x=i,TransitionComponent:w=$t,...E}=t,k=D.useRef(null),R=it(ho(c),k,n),_=M=>j=>{M&&(j===void 0?M(k.current):M(k.current,j))},V=_((M,j)=>{qr(d,M,u),Cl(M),h&&h(M,j)}),I=_((M,j)=>{const $=ao({timeout:x,style:y,easing:f},{mode:"enter"});M.style.webkitTransition=o.transitions.create("-webkit-transform",{...$}),M.style.transition=o.transitions.create("transform",{...$}),M.style.webkitTransform="none",M.style.transform="none",m&&m(M,j)}),S=_(g),A=_(C),N=_(M=>{const j=ao({timeout:x,style:y,easing:f},{mode:"exit"});M.style.webkitTransition=o.transitions.create("-webkit-transform",j),M.style.transition=o.transitions.create("transform",j),qr(d,M,u),v&&v(M)}),O=_(M=>{M.style.webkitTransition="",M.style.transition="",b&&b(M)}),P=M=>{a&&a(k.current,M)},L=D.useCallback(()=>{k.current&&qr(d,k.current,u)},[d,u]);return D.useEffect(()=>{if(p||d==="down"||d==="right")return;const M=vl(()=>{k.current&&qr(d,k.current,u)}),j=It(k.current);return j.addEventListener("resize",M),()=>{M.clear(),j.removeEventListener("resize",M)}},[d,p,u]),D.useEffect(()=>{p||L()},[p,L]),T.jsx(w,{nodeRef:k,onEnter:V,onEntered:S,onEntering:I,onExit:N,onExited:O,onExiting:A,addEndListener:P,appear:l,in:p,timeout:x,...E,children:(M,{ownerState:j,...$})=>D.cloneElement(c,{ref:R,style:{visibility:M==="exited"&&!p?"hidden":void 0,...y,...c.props.style},...$})})});process.env.NODE_ENV!=="production"&&($h.propTypes={addEndListener:s.func,appear:s.bool,children:mo.isRequired,container:Mn(s.oneOfType([lo,s.func]),e=>{if(e.open){const t=Mh(e.container);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="production"&&!globalThis.MUI_TEST_ENV&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
149
149
|
`))}else if(!t||typeof t.getBoundingClientRect!="function"||t.contextElement!=null&&t.contextElement.nodeType!==1)return new Error(["MUI: The `container` prop provided to the component is invalid.","It should be an HTML element instance."].join(`
|
|
150
|
-
`))}return null}),direction:s.oneOf(["down","left","right","up"]),easing:s.oneOfType([s.shape({enter:s.string,exit:s.string}),s.string]),in:s.bool,onEnter:s.func,onEntered:s.func,onEntering:s.func,onExit:s.func,onExited:s.func,onExiting:s.func,style:s.object,timeout:s.oneOfType([s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});function WN(e){return Ne("MuiDrawer",e)}Oe("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Ah=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},UN=e=>{const{classes:t,anchor:n,variant:o}=e,r={root:["root",`anchor${ge(n)}`],docked:[(o==="permanent"||o==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ge(n)}`,o!=="temporary"&&`paperAnchorDocked${ge(n)}`]};return Pe(r,WN,t)},qN=le(kl,{name:"MuiDrawer",slot:"Root",overridesResolver:Ah})(Te(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),YN=le("div",{shouldForwardProp:dt,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Ah})({flex:"0 0 auto"}),GN=le(Nl,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ge(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ge(n.anchor)}`]]}})(Te(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),Dh={left:"right",right:"left",top:"down",bottom:"up"};function KN(e){return["left","right"].includes(e)}function XN({direction:e},t){return e==="rtl"&&KN(t)?Dh[t]:t}const jh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiDrawer"}),r=Sr(),i=eh(),a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:l="left",BackdropProps:c,children:u,className:d,elevation:f=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:h,...g}={},onClose:m,open:v=!1,PaperProps:b={},SlideProps:C,TransitionComponent:y,transitionDuration:x=a,variant:w="temporary",slots:E={},slotProps:k={},...R}=o,_=D.useRef(!1);D.useEffect(()=>{_.current=!0},[]);const V=XN({direction:i?"rtl":"ltr"},l),S={...o,anchor:l,elevation:f,open:v,variant:w,...R},A=UN(S),N={slots:{transition:y,...E},slotProps:{paper:b,transition:C,...k,backdrop:uh(k.backdrop||{...c,...h},{transitionDuration:x})}},[O,P]=Fe("root",{ref:n,elementType:qN,className:be(A.root,A.modal,d),shouldForwardComponentProp:!0,ownerState:S,externalForwardedProps:{...N,...R,...g},additionalProps:{open:v,onClose:m,hideBackdrop:p,slots:{backdrop:N.slots.backdrop},slotProps:{backdrop:N.slotProps.backdrop}}}),[L,M]=Fe("paper",{elementType:GN,shouldForwardComponentProp:!0,className:be(A.paper,b.className),ownerState:S,externalForwardedProps:N,additionalProps:{elevation:w==="temporary"?f:0,square:!0,...w==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[j,$]=Fe("docked",{elementType:YN,ref:n,className:be(A.root,A.docked,d),ownerState:S,externalForwardedProps:N,additionalProps:R}),[B,H]=Fe("transition",{elementType:$h,ownerState:S,externalForwardedProps:N,additionalProps:{in:v,direction:Dh[V],timeout:x,appear:_.current}}),U=T.jsx(L,{...M,children:u});if(w==="permanent")return T.jsx(j,{...$,children:U});const W=T.jsx(B,{...H,children:U});return w==="persistent"?T.jsx(j,{...$,children:W}):T.jsx(O,{...P,children:W})});process.env.NODE_ENV!=="production"&&(jh.propTypes={anchor:s.oneOf(["bottom","left","right","top"]),BackdropProps:s.object,children:s.node,classes:s.object,className:s.string,elevation:Tl,hideBackdrop:s.bool,ModalProps:s.object,onClose:s.func,open:s.bool,PaperProps:s.object,SlideProps:s.object,slotProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),docked:s.oneOfType([s.func,s.object]),paper:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({backdrop:s.elementType,docked:s.elementType,paper:s.elementType,root:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),transitionDuration:s.oneOfType([s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})]),variant:s.oneOf(["permanent","persistent","temporary"])});const ZN=e=>{const{classes:t,disableUnderline:n,startAdornment:o,endAdornment:r,size:i,hiddenLabel:a,multiline:l}=e,c={root:["root",!n&&"underline",o&&"adornedStart",r&&"adornedEnd",i==="small"&&`size${ge(i)}`,a&&"hiddenLabel",l&&"multiline"],input:["input"]},u=Pe(c,nN,t);return{...t,...u}},QN=le(fs,{shouldForwardProp:e=>dt(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...us(e,t),!n.disableUnderline&&t.underline]}})(Te(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:r,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${pn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${pn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${pn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${pn.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${pn.disabled}, .${pn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${pn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(un()).map(([a])=>({props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.main}`}}})),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:l})=>a.multiline&&l==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),JN=le(ps,{name:"MuiFilledInput",slot:"Input",overridesResolver:ds})(Te(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),ms=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:l=!1,hiddenLabel:c,inputComponent:u="input",multiline:d=!1,slotProps:f,slots:p={},type:h="text",...g}=o,m={...o,disableUnderline:r,fullWidth:l,inputComponent:u,multiline:d,type:h},v=ZN(o),b={root:{ownerState:m},input:{ownerState:m}},C=f??a?nt(b,f??a):b,y=p.root??i.Root??QN,x=p.input??i.Input??JN;return T.jsx(hs,{slots:{root:y,input:x},slotProps:C,fullWidth:l,inputComponent:u,multiline:d,ref:n,type:h,...g,classes:v})});process.env.NODE_ENV!=="production"&&(ms.propTypes={autoComplete:s.string,autoFocus:s.bool,classes:s.object,color:s.oneOfType([s.oneOf(["primary","secondary"]),s.string]),components:s.shape({Input:s.elementType,Root:s.elementType}),componentsProps:s.shape({input:s.object,root:s.object}),defaultValue:s.any,disabled:s.bool,disableUnderline:s.bool,endAdornment:s.node,error:s.bool,fullWidth:s.bool,hiddenLabel:s.bool,id:s.string,inputComponent:s.elementType,inputProps:s.object,inputRef:St,margin:s.oneOf(["dense","none"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,onChange:s.func,placeholder:s.string,readOnly:s.bool,required:s.bool,rows:s.oneOfType([s.number,s.string]),slotProps:s.shape({input:s.object,root:s.object}),slots:s.shape({input:s.elementType,root:s.elementType}),startAdornment:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any});ms.muiName="Input";function ek(e){return Ne("MuiFormControl",e)}Oe("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const tk=e=>{const{classes:t,margin:n,fullWidth:o}=e,r={root:["root",n!=="none"&&`margin${ge(n)}`,o&&"fullWidth"]};return Pe(r,ek,t)},nk=le("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${ge(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),ki=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiFormControl"}),{children:r,className:i,color:a="primary",component:l="div",disabled:c=!1,error:u=!1,focused:d,fullWidth:f=!1,hiddenLabel:p=!1,margin:h="none",required:g=!1,size:m="medium",variant:v="outlined",...b}=o,C={...o,color:a,component:l,disabled:c,error:u,fullWidth:f,hiddenLabel:p,margin:h,required:g,size:m,variant:v},y=tk(C),[x,w]=D.useState(()=>{let P=!1;return r&&D.Children.forEach(r,L=>{if(!qs(L,["Input","Select"]))return;const M=qs(L,["Select"])?L.props.input:L;M&&ZT(M.props)&&(P=!0)}),P}),[E,k]=D.useState(()=>{let P=!1;return r&&D.Children.forEach(r,L=>{qs(L,["Input","Select"])&&(Ti(L.props,!0)||Ti(L.props.inputProps,!0))&&(P=!0)}),P}),[R,_]=D.useState(!1);c&&R&&_(!1);const V=d!==void 0&&!c?d:R;let I;const S=D.useRef(!1);process.env.NODE_ENV!=="production"&&(I=()=>(S.current&&console.error(["MUI: There are multiple `InputBase` components inside a FormControl.","This creates visual inconsistencies, only use one `InputBase`."].join(`
|
|
151
|
-
`)),S.current=!0,()=>{S.current=!1}));const A=D.useCallback(()=>{k(!0)},[]),N=D.useCallback(()=>{k(!1)},[]),O=D.useMemo(()=>({adornedStart:x,setAdornedStart:w,color:a,disabled:c,error:u,filled:E,focused:V,fullWidth:f,hiddenLabel:p,size:m,onBlur:()=>{_(!1)},onFocus:()=>{_(!0)},onEmpty:N,onFilled:A,registerEffect:I,required:g,variant:v}),[x,a,c,u,E,V,f,p,I,N,A,g,m,v]);return T.jsx(cs.Provider,{value:O,children:T.jsx(nk,{as:l,ownerState:C,className:be(y.root,i),ref:n,...b,children:r})})});process.env.NODE_ENV!=="production"&&(ki.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","error","info","success","warning"]),s.string]),component:s.elementType,disabled:s.bool,error:s.bool,focused:s.bool,fullWidth:s.bool,hiddenLabel:s.bool,margin:s.oneOf(["dense","none","normal"]),required:s.bool,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOf(["filled","outlined","standard"])});function ok(e){return Ne("MuiFormControlLabel",e)}const Lo=Oe("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),rk=e=>{const{classes:t,disabled:n,labelPlacement:o,error:r,required:i}=e,a={root:["root",n&&"disabled",`labelPlacement${ge(o)}`,r&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",r&&"error"]};return Pe(a,ok,t)},ik=le("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Lo.label}`]:t.label},t.root,t[`labelPlacement${ge(n.labelPlacement)}`]]}})(Te(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Lo.disabled}`]:{cursor:"default"},[`& .${Lo.label}`]:{[`&.${Lo.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),sk=le("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(Te(({theme:e})=>({[`&.${Lo.error}`]:{color:(e.vars||e).palette.error.main}}))),Lh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiFormControlLabel"}),{checked:r,className:i,componentsProps:a={},control:l,disabled:c,disableTypography:u,inputRef:d,label:f,labelPlacement:p="end",name:h,onChange:g,required:m,slots:v={},slotProps:b={},value:C,...y}=o,x=dn(),w=c??l.props.disabled??x?.disabled,E=m??l.props.required,k={disabled:w,required:E};["checked","name","onChange","value","inputRef"].forEach(O=>{typeof l.props[O]>"u"&&typeof o[O]<"u"&&(k[O]=o[O])});const R=$n({props:o,muiFormControl:x,states:["error"]}),_={...o,disabled:w,labelPlacement:p,required:E,error:R.error},V=rk(_),I={slots:v,slotProps:{...a,...b}},[S,A]=Fe("typography",{elementType:tt,externalForwardedProps:I,ownerState:_});let N=f;return N!=null&&N.type!==tt&&!u&&(N=T.jsx(S,{component:"span",...A,className:be(V.label,A?.className),children:N})),T.jsxs(ik,{className:be(V.root,i),ownerState:_,ref:n,...y,children:[D.cloneElement(l,k),E?T.jsxs("div",{children:[N,T.jsxs(sk,{ownerState:_,"aria-hidden":!0,className:V.asterisk,children:[" ","*"]})]}):N]})});process.env.NODE_ENV!=="production"&&(Lh.propTypes={checked:s.bool,classes:s.object,className:s.string,componentsProps:s.shape({typography:s.object}),control:s.element.isRequired,disabled:s.bool,disableTypography:s.bool,inputRef:St,label:s.node,labelPlacement:s.oneOf(["bottom","end","start","top"]),name:s.string,onChange:s.func,required:s.bool,slotProps:s.shape({typography:s.oneOfType([s.func,s.object])}),slots:s.shape({typography:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.any});function ak(e){return Ne("MuiFormHelperText",e)}const ld=Oe("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var cd;const lk=e=>{const{classes:t,contained:n,size:o,disabled:r,error:i,filled:a,focused:l,required:c}=e,u={root:["root",r&&"disabled",i&&"error",o&&`size${ge(o)}`,n&&"contained",l&&"focused",a&&"filled",c&&"required"]};return Pe(u,ak,t)},ck=le("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ge(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Te(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${ld.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ld.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),Fh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiFormHelperText"}),{children:r,className:i,component:a="p",disabled:l,error:c,filled:u,focused:d,margin:f,required:p,variant:h,...g}=o,m=dn(),v=$n({props:o,muiFormControl:m,states:["variant","size","disabled","error","filled","focused","required"]}),b={...o,component:a,contained:v.variant==="filled"||v.variant==="outlined",variant:v.variant,size:v.size,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required};delete b.ownerState;const C=lk(b);return T.jsx(ck,{as:a,className:be(C.root,i),ref:n,...g,ownerState:b,children:r===" "?cd||(cd=T.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):r})});process.env.NODE_ENV!=="production"&&(Fh.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,disabled:s.bool,error:s.bool,filled:s.bool,focused:s.bool,margin:s.oneOf(["dense"]),required:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOfType([s.oneOf(["filled","outlined","standard"]),s.string])});function uk(e){return Ne("MuiFormLabel",e)}const Uo=Oe("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),dk=e=>{const{classes:t,color:n,focused:o,disabled:r,error:i,filled:a,required:l}=e,c={root:["root",`color${ge(n)}`,r&&"disabled",i&&"error",a&&"filled",o&&"focused",l&&"required"],asterisk:["asterisk",i&&"error"]};return Pe(c,uk,t)},fk=le("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(Te(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(un()).map(([t])=>({props:{color:t},style:{[`&.${Uo.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Uo.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Uo.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),pk=le("span",{name:"MuiFormLabel",slot:"Asterisk"})(Te(({theme:e})=>({[`&.${Uo.error}`]:{color:(e.vars||e).palette.error.main}}))),Bh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiFormLabel"}),{children:r,className:i,color:a,component:l="label",disabled:c,error:u,filled:d,focused:f,required:p,...h}=o,g=dn(),m=$n({props:o,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),v={...o,color:m.color||"primary",component:l,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required},b=dk(v);return T.jsxs(fk,{as:l,ownerState:v,className:be(b.root,i),ref:n,...h,children:[r,m.required&&T.jsxs(pk,{ownerState:v,"aria-hidden":!0,className:b.asterisk,children:[" ","*"]})]})});process.env.NODE_ENV!=="production"&&(Bh.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["error","info","primary","secondary","success","warning"]),s.string]),component:s.elementType,disabled:s.bool,error:s.bool,filled:s.bool,focused:s.bool,required:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function Ra(e){return`scale(${e}, ${e**2})`}const hk={entering:{opacity:1,transform:Ra(1)},entered:{opacity:1,transform:"none"}},Ks=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Oi=D.forwardRef(function(t,n){const{addEndListener:o,appear:r=!0,children:i,easing:a,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:h,style:g,timeout:m="auto",TransitionComponent:v=$t,...b}=t,C=hh(),y=D.useRef(),x=Sr(),w=D.useRef(null),E=it(w,ho(i),n),k=O=>P=>{if(O){const L=w.current;P===void 0?O(L):O(L,P)}},R=k(d),_=k((O,P)=>{Cl(O);const{duration:L,delay:M,easing:j}=ao({style:g,timeout:m,easing:a},{mode:"enter"});let $;m==="auto"?($=x.transitions.getAutoHeightDuration(O.clientHeight),y.current=$):$=L,O.style.transition=[x.transitions.create("opacity",{duration:$,delay:M}),x.transitions.create("transform",{duration:Ks?$:$*.666,delay:M,easing:j})].join(","),c&&c(O,P)}),V=k(u),I=k(h),S=k(O=>{const{duration:P,delay:L,easing:M}=ao({style:g,timeout:m,easing:a},{mode:"exit"});let j;m==="auto"?(j=x.transitions.getAutoHeightDuration(O.clientHeight),y.current=j):j=P,O.style.transition=[x.transitions.create("opacity",{duration:j,delay:L}),x.transitions.create("transform",{duration:Ks?j:j*.666,delay:Ks?L:L||j*.333,easing:M})].join(","),O.style.opacity=0,O.style.transform=Ra(.75),f&&f(O)}),A=k(p),N=O=>{m==="auto"&&C.start(y.current||0,O),o&&o(w.current,O)};return T.jsx(v,{appear:r,in:l,nodeRef:w,onEnter:_,onEntered:V,onEntering:R,onExit:S,onExited:A,onExiting:I,addEndListener:N,timeout:m==="auto"?null:m,...b,children:(O,{ownerState:P,...L})=>D.cloneElement(i,{style:{opacity:0,transform:Ra(.75),visibility:O==="exited"&&!l?"hidden":void 0,...hk[O],...g,...i.props.style},ref:E,...L})})});process.env.NODE_ENV!=="production"&&(Oi.propTypes={addEndListener:s.func,appear:s.bool,children:mo.isRequired,easing:s.oneOfType([s.shape({enter:s.string,exit:s.string}),s.string]),in:s.bool,onEnter:s.func,onEntered:s.func,onEntering:s.func,onExit:s.func,onExited:s.func,onExiting:s.func,style:s.object,timeout:s.oneOfType([s.oneOf(["auto"]),s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});Oi&&(Oi.muiSupportAuto=!0);const mk=e=>{const{classes:t,disableUnderline:n}=e,r=Pe({root:["root",!n&&"underline"],input:["input"]},eN,t);return{...t,...r}},gk=le(fs,{shouldForwardProp:e=>dt(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...us(e,t),!n.disableUnderline&&t.underline]}})(Te(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:o})=>o.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:o})=>!o.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${To.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${To.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${To.disabled}, .${To.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${To.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(un()).map(([o])=>({props:{color:o,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o].main}`}}}))]}})),yk=le(ps,{name:"MuiInput",slot:"Input",overridesResolver:ds})({}),gs=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiInput"}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:l=!1,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...h}=o,g=mk(o),v={root:{ownerState:{disableUnderline:r}}},b=d??a?nt(d??a,v):v,C=f.root??i.Root??gk,y=f.input??i.Input??yk;return T.jsx(hs,{slots:{root:C,input:y},slotProps:b,fullWidth:l,inputComponent:c,multiline:u,ref:n,type:p,...h,classes:g})});process.env.NODE_ENV!=="production"&&(gs.propTypes={autoComplete:s.string,autoFocus:s.bool,classes:s.object,color:s.oneOfType([s.oneOf(["primary","secondary"]),s.string]),components:s.shape({Input:s.elementType,Root:s.elementType}),componentsProps:s.shape({input:s.object,root:s.object}),defaultValue:s.any,disabled:s.bool,disableUnderline:s.bool,endAdornment:s.node,error:s.bool,fullWidth:s.bool,id:s.string,inputComponent:s.elementType,inputProps:s.object,inputRef:St,margin:s.oneOf(["dense","none"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,onChange:s.func,placeholder:s.string,readOnly:s.bool,required:s.bool,rows:s.oneOfType([s.number,s.string]),slotProps:s.shape({input:s.object,root:s.object}),slots:s.shape({input:s.elementType,root:s.elementType}),startAdornment:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any});gs.muiName="Input";function bk(e){return Ne("MuiInputLabel",e)}Oe("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const vk=e=>{const{classes:t,formControl:n,size:o,shrink:r,disableAnimation:i,variant:a,required:l}=e,c={root:["root",n&&"formControl",!i&&"animated",r&&"shrink",o&&o!=="medium"&&`size${ge(o)}`,a],asterisk:[l&&"asterisk"]},u=Pe(c,bk,t);return{...t,...u}},xk=le(Bh,{shouldForwardProp:e=>dt(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Uo.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Te(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:o})=>t==="filled"&&n.shrink&&o==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Ol=D.forwardRef(function(t,n){const o=Ie({name:"MuiInputLabel",props:t}),{disableAnimation:r=!1,margin:i,shrink:a,variant:l,className:c,...u}=o,d=dn();let f=a;typeof f>"u"&&d&&(f=d.filled||d.focused||d.adornedStart);const p=$n({props:o,muiFormControl:d,states:["size","variant","required","focused"]}),h={...o,disableAnimation:r,formControl:d,shrink:f,size:p.size,variant:p.variant,required:p.required,focused:p.focused},g=vk(h);return T.jsx(xk,{"data-shrink":f,ref:n,className:be(g.root,c),...u,ownerState:h,classes:g})});process.env.NODE_ENV!=="production"&&(Ol.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["error","info","primary","secondary","success","warning"]),s.string]),disableAnimation:s.bool,disabled:s.bool,error:s.bool,focused:s.bool,margin:s.oneOf(["dense"]),required:s.bool,shrink:s.bool,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOf(["filled","outlined","standard"])});const uo=D.createContext({});process.env.NODE_ENV!=="production"&&(uo.displayName="ListContext");function wk(e){return Ne("MuiList",e)}Oe("MuiList",["root","padding","dense","subheader"]);const Sk=e=>{const{classes:t,disablePadding:n,dense:o,subheader:r}=e;return Pe({root:["root",!n&&"padding",o&&"dense",r&&"subheader"]},wk,t)},Ek=le("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),zh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiList"}),{children:r,className:i,component:a="ul",dense:l=!1,disablePadding:c=!1,subheader:u,...d}=o,f=D.useMemo(()=>({dense:l}),[l]),p={...o,component:a,dense:l,disablePadding:c},h=Sk(p);return T.jsx(uo.Provider,{value:f,children:T.jsxs(Ek,{as:a,className:be(h.root,i),ref:n,ownerState:p,...d,children:[u,r]})})});process.env.NODE_ENV!=="production"&&(zh.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,dense:s.bool,disablePadding:s.bool,subheader:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function Ck(e){return Ne("MuiListItemIcon",e)}const ud=Oe("MuiListItemIcon",["root","alignItemsFlexStart"]),Tk=e=>{const{alignItems:t,classes:n}=e;return Pe({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Ck,n)},Nk=le("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(Te(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Vh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiListItemIcon"}),{className:r,...i}=o,a=D.useContext(uo),l={...o,alignItems:a.alignItems},c=Tk(l);return T.jsx(Nk,{className:be(c.root,r),ownerState:l,ref:n,...i})});process.env.NODE_ENV!=="production"&&(Vh.propTypes={children:s.node,classes:s.object,className:s.string,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function kk(e){return Ne("MuiListItemText",e)}const Yn=Oe("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Ok=e=>{const{classes:t,inset:n,primary:o,secondary:r,dense:i}=e;return Pe({root:["root",n&&"inset",i&&"dense",o&&r&&"multiline"],primary:["primary"],secondary:["secondary"]},kk,t)},Pk=le("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Yn.primary}`]:t.primary},{[`& .${Yn.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${Zu.root}:where(& .${Yn.primary})`]:{display:"block"},[`.${Zu.root}:where(& .${Yn.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Fo=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiListItemText"}),{children:r,className:i,disableTypography:a=!1,inset:l=!1,primary:c,primaryTypographyProps:u,secondary:d,secondaryTypographyProps:f,slots:p={},slotProps:h={},...g}=o,{dense:m}=D.useContext(uo);let v=c??r,b=d;const C={...o,disableTypography:a,inset:l,primary:!!v,secondary:!!b,dense:m},y=Ok(C),x={slots:p,slotProps:{primary:u,secondary:f,...h}},[w,E]=Fe("root",{className:be(y.root,i),elementType:Pk,externalForwardedProps:{...x,...g},ownerState:C,ref:n}),[k,R]=Fe("primary",{className:y.primary,elementType:tt,externalForwardedProps:x,ownerState:C}),[_,V]=Fe("secondary",{className:y.secondary,elementType:tt,externalForwardedProps:x,ownerState:C});return v!=null&&v.type!==tt&&!a&&(v=T.jsx(k,{variant:m?"body2":"body1",component:R?.variant?void 0:"span",...R,children:v})),b!=null&&b.type!==tt&&!a&&(b=T.jsx(_,{variant:"body2",color:"textSecondary",...V,children:b})),T.jsxs(w,{...E,children:[v,b]})});process.env.NODE_ENV!=="production"&&(Fo.propTypes={children:s.node,classes:s.object,className:s.string,disableTypography:s.bool,inset:s.bool,primary:s.node,primaryTypographyProps:s.object,secondary:s.node,secondaryTypographyProps:s.object,slotProps:s.shape({primary:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),secondary:s.oneOfType([s.func,s.object])}),slots:s.shape({primary:s.elementType,root:s.elementType,secondary:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function Xs(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function dd(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Hh(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function No(e,t,n,o,r,i){let a=!1,l=r(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(a)return!1;a=!0}const c=o?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!Hh(l,i)||c)l=r(e,l,n);else return l.focus(),!0}return!1}const Wh=D.forwardRef(function(t,n){const{actions:o,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:l,disabledItemsFocusable:c=!1,disableListWrap:u=!1,onKeyDown:d,variant:f="selectedMenu",...p}=t,h=D.useRef(null),g=D.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});an(()=>{r&&h.current.focus()},[r]),D.useImperativeHandle(o,()=>({adjustStyleForScrollbar:(y,{direction:x})=>{const w=!h.current.style.width;if(y.clientHeight<h.current.clientHeight&&w){const E=`${Ih(It(y))}px`;h.current.style[x==="rtl"?"paddingLeft":"paddingRight"]=E,h.current.style.width=`calc(100% + ${E})`}return h.current}}),[]);const m=y=>{const x=h.current,w=y.key;if(y.ctrlKey||y.metaKey||y.altKey){d&&d(y);return}const k=jo(_t(x));if(w==="ArrowDown")y.preventDefault(),No(x,k,u,c,Xs);else if(w==="ArrowUp")y.preventDefault(),No(x,k,u,c,dd);else if(w==="Home")y.preventDefault(),No(x,null,u,c,Xs);else if(w==="End")y.preventDefault(),No(x,null,u,c,dd);else if(w.length===1){const R=g.current,_=w.toLowerCase(),V=performance.now();R.keys.length>0&&(V-R.lastTime>500?(R.keys=[],R.repeating=!0,R.previousKeyMatched=!0):R.repeating&&_!==R.keys[0]&&(R.repeating=!1)),R.lastTime=V,R.keys.push(_);const I=k&&!R.repeating&&Hh(k,R);R.previousKeyMatched&&(I||No(x,k,!1,c,Xs,R))?y.preventDefault():R.previousKeyMatched=!1}d&&d(y)},v=it(h,n);let b=-1;D.Children.forEach(a,(y,x)=>{if(!D.isValidElement(y)){b===x&&(b+=1,b>=a.length&&(b=-1));return}process.env.NODE_ENV!=="production"&&Rn.isFragment(y)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
152
|
-
`)),y.props.disabled||(f==="selectedMenu"&&y.props.selected||b===-1)&&(b=x),b===x&&(y.props.disabled||y.props.muiSkipListHighlight||y.type.muiSkipListHighlight)&&(b+=1,b>=a.length&&(b=-1))});const C=D.Children.map(a,(y,x)=>{if(x===b){const w={};return i&&(w.autoFocus=!0),y.props.tabIndex===void 0&&f==="selectedMenu"&&(w.tabIndex=0),D.cloneElement(y,w)}return y});return T.jsx(zh,{role:"menu",ref:v,className:l,onKeyDown:m,tabIndex:r?0:-1,...p,children:C})});process.env.NODE_ENV!=="production"&&(Wh.propTypes={autoFocus:s.bool,autoFocusItem:s.bool,children:s.node,className:s.string,disabledItemsFocusable:s.bool,disableListWrap:s.bool,onKeyDown:s.func,variant:s.oneOf(["menu","selectedMenu"])});function Rk(e){return
|
|
153
|
-
`))}return{top:z.top+fd(z,a.vertical),left:z.left+pd(z,a.horizontal)}},[i,a.horizontal,a.vertical,l,c]),S=D.useCallback(Z=>({vertical:fd(Z,C.vertical),horizontal:pd(Z,C.horizontal)}),[C.horizontal,C.vertical]),A=D.useCallback(Z=>{const ne={width:Z.offsetWidth,height:Z.offsetHeight},z=S(ne);if(c==="none")return{top:null,left:null,transformOrigin:hd(z)};const ae=I();let se=ae.top-z.vertical,
|
|
154
|
-
`)),h!==null&&
|
|
150
|
+
`))}return null}),direction:s.oneOf(["down","left","right","up"]),easing:s.oneOfType([s.shape({enter:s.string,exit:s.string}),s.string]),in:s.bool,onEnter:s.func,onEntered:s.func,onEntering:s.func,onExit:s.func,onExited:s.func,onExiting:s.func,style:s.object,timeout:s.oneOfType([s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});function WN(e){return ke("MuiDrawer",e)}Oe("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Ah=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},UN=e=>{const{classes:t,anchor:n,variant:o}=e,r={root:["root",`anchor${me(n)}`],docked:[(o==="permanent"||o==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${me(n)}`,o!=="temporary"&&`paperAnchorDocked${me(n)}`]};return Pe(r,WN,t)},qN=le(kl,{name:"MuiDrawer",slot:"Root",overridesResolver:Ah})(Ne(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),YN=le("div",{shouldForwardProp:dt,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Ah})({flex:"0 0 auto"}),GN=le(Nl,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${me(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${me(n.anchor)}`]]}})(Ne(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),Dh={left:"right",right:"left",top:"down",bottom:"up"};function KN(e){return["left","right"].includes(e)}function XN({direction:e},t){return e==="rtl"&&KN(t)?Dh[t]:t}const jh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiDrawer"}),r=Sr(),i=eh(),a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:l="left",BackdropProps:c,children:u,className:d,elevation:f=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:h,...g}={},onClose:m,open:v=!1,PaperProps:b={},SlideProps:C,TransitionComponent:y,transitionDuration:x=a,variant:w="temporary",slots:E={},slotProps:k={},...R}=o,_=D.useRef(!1);D.useEffect(()=>{_.current=!0},[]);const V=XN({direction:i?"rtl":"ltr"},l),S={...o,anchor:l,elevation:f,open:v,variant:w,...R},A=UN(S),N={slots:{transition:y,...E},slotProps:{paper:b,transition:C,...k,backdrop:uh(k.backdrop||{...c,...h},{transitionDuration:x})}},[O,P]=Fe("root",{ref:n,elementType:qN,className:be(A.root,A.modal,d),shouldForwardComponentProp:!0,ownerState:S,externalForwardedProps:{...N,...R,...g},additionalProps:{open:v,onClose:m,hideBackdrop:p,slots:{backdrop:N.slots.backdrop},slotProps:{backdrop:N.slotProps.backdrop}}}),[L,M]=Fe("paper",{elementType:GN,shouldForwardComponentProp:!0,className:be(A.paper,b.className),ownerState:S,externalForwardedProps:N,additionalProps:{elevation:w==="temporary"?f:0,square:!0,...w==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[j,$]=Fe("docked",{elementType:YN,ref:n,className:be(A.root,A.docked,d),ownerState:S,externalForwardedProps:N,additionalProps:R}),[B,H]=Fe("transition",{elementType:$h,ownerState:S,externalForwardedProps:N,additionalProps:{in:v,direction:Dh[V],timeout:x,appear:_.current}}),U=T.jsx(L,{...M,children:u});if(w==="permanent")return T.jsx(j,{...$,children:U});const W=T.jsx(B,{...H,children:U});return w==="persistent"?T.jsx(j,{...$,children:W}):T.jsx(O,{...P,children:W})});process.env.NODE_ENV!=="production"&&(jh.propTypes={anchor:s.oneOf(["bottom","left","right","top"]),BackdropProps:s.object,children:s.node,classes:s.object,className:s.string,elevation:Tl,hideBackdrop:s.bool,ModalProps:s.object,onClose:s.func,open:s.bool,PaperProps:s.object,SlideProps:s.object,slotProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),docked:s.oneOfType([s.func,s.object]),paper:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({backdrop:s.elementType,docked:s.elementType,paper:s.elementType,root:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),transitionDuration:s.oneOfType([s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})]),variant:s.oneOf(["permanent","persistent","temporary"])});const ZN=e=>{const{classes:t,disableUnderline:n,startAdornment:o,endAdornment:r,size:i,hiddenLabel:a,multiline:l}=e,c={root:["root",!n&&"underline",o&&"adornedStart",r&&"adornedEnd",i==="small"&&`size${me(i)}`,a&&"hiddenLabel",l&&"multiline"],input:["input"]},u=Pe(c,nN,t);return{...t,...u}},QN=le(fs,{shouldForwardProp:e=>dt(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...us(e,t),!n.disableUnderline&&t.underline]}})(Ne(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:r,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${pn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${pn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${pn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${pn.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${pn.disabled}, .${pn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${pn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(un()).map(([a])=>({props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.main}`}}})),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:l})=>a.multiline&&l==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),JN=le(ps,{name:"MuiFilledInput",slot:"Input",overridesResolver:ds})(Ne(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),ms=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:l=!1,hiddenLabel:c,inputComponent:u="input",multiline:d=!1,slotProps:f,slots:p={},type:h="text",...g}=o,m={...o,disableUnderline:r,fullWidth:l,inputComponent:u,multiline:d,type:h},v=ZN(o),b={root:{ownerState:m},input:{ownerState:m}},C=f??a?nt(b,f??a):b,y=p.root??i.Root??QN,x=p.input??i.Input??JN;return T.jsx(hs,{slots:{root:y,input:x},slotProps:C,fullWidth:l,inputComponent:u,multiline:d,ref:n,type:h,...g,classes:v})});process.env.NODE_ENV!=="production"&&(ms.propTypes={autoComplete:s.string,autoFocus:s.bool,classes:s.object,color:s.oneOfType([s.oneOf(["primary","secondary"]),s.string]),components:s.shape({Input:s.elementType,Root:s.elementType}),componentsProps:s.shape({input:s.object,root:s.object}),defaultValue:s.any,disabled:s.bool,disableUnderline:s.bool,endAdornment:s.node,error:s.bool,fullWidth:s.bool,hiddenLabel:s.bool,id:s.string,inputComponent:s.elementType,inputProps:s.object,inputRef:Et,margin:s.oneOf(["dense","none"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,onChange:s.func,placeholder:s.string,readOnly:s.bool,required:s.bool,rows:s.oneOfType([s.number,s.string]),slotProps:s.shape({input:s.object,root:s.object}),slots:s.shape({input:s.elementType,root:s.elementType}),startAdornment:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any});ms.muiName="Input";function ek(e){return ke("MuiFormControl",e)}Oe("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const tk=e=>{const{classes:t,margin:n,fullWidth:o}=e,r={root:["root",n!=="none"&&`margin${me(n)}`,o&&"fullWidth"]};return Pe(r,ek,t)},nk=le("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${me(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),ki=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiFormControl"}),{children:r,className:i,color:a="primary",component:l="div",disabled:c=!1,error:u=!1,focused:d,fullWidth:f=!1,hiddenLabel:p=!1,margin:h="none",required:g=!1,size:m="medium",variant:v="outlined",...b}=o,C={...o,color:a,component:l,disabled:c,error:u,fullWidth:f,hiddenLabel:p,margin:h,required:g,size:m,variant:v},y=tk(C),[x,w]=D.useState(()=>{let P=!1;return r&&D.Children.forEach(r,L=>{if(!qs(L,["Input","Select"]))return;const M=qs(L,["Select"])?L.props.input:L;M&&ZT(M.props)&&(P=!0)}),P}),[E,k]=D.useState(()=>{let P=!1;return r&&D.Children.forEach(r,L=>{qs(L,["Input","Select"])&&(Ti(L.props,!0)||Ti(L.props.inputProps,!0))&&(P=!0)}),P}),[R,_]=D.useState(!1);c&&R&&_(!1);const V=d!==void 0&&!c?d:R;let I;const S=D.useRef(!1);process.env.NODE_ENV!=="production"&&(I=()=>(S.current&&console.error(["MUI: There are multiple `InputBase` components inside a FormControl.","This creates visual inconsistencies, only use one `InputBase`."].join(`
|
|
151
|
+
`)),S.current=!0,()=>{S.current=!1}));const A=D.useCallback(()=>{k(!0)},[]),N=D.useCallback(()=>{k(!1)},[]),O=D.useMemo(()=>({adornedStart:x,setAdornedStart:w,color:a,disabled:c,error:u,filled:E,focused:V,fullWidth:f,hiddenLabel:p,size:m,onBlur:()=>{_(!1)},onFocus:()=>{_(!0)},onEmpty:N,onFilled:A,registerEffect:I,required:g,variant:v}),[x,a,c,u,E,V,f,p,I,N,A,g,m,v]);return T.jsx(cs.Provider,{value:O,children:T.jsx(nk,{as:l,ownerState:C,className:be(y.root,i),ref:n,...b,children:r})})});process.env.NODE_ENV!=="production"&&(ki.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","error","info","success","warning"]),s.string]),component:s.elementType,disabled:s.bool,error:s.bool,focused:s.bool,fullWidth:s.bool,hiddenLabel:s.bool,margin:s.oneOf(["dense","none","normal"]),required:s.bool,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOf(["filled","outlined","standard"])});function ok(e){return ke("MuiFormControlLabel",e)}const Lo=Oe("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),rk=e=>{const{classes:t,disabled:n,labelPlacement:o,error:r,required:i}=e,a={root:["root",n&&"disabled",`labelPlacement${me(o)}`,r&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",r&&"error"]};return Pe(a,ok,t)},ik=le("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Lo.label}`]:t.label},t.root,t[`labelPlacement${me(n.labelPlacement)}`]]}})(Ne(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Lo.disabled}`]:{cursor:"default"},[`& .${Lo.label}`]:{[`&.${Lo.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),sk=le("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(Ne(({theme:e})=>({[`&.${Lo.error}`]:{color:(e.vars||e).palette.error.main}}))),Lh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiFormControlLabel"}),{checked:r,className:i,componentsProps:a={},control:l,disabled:c,disableTypography:u,inputRef:d,label:f,labelPlacement:p="end",name:h,onChange:g,required:m,slots:v={},slotProps:b={},value:C,...y}=o,x=dn(),w=c??l.props.disabled??x?.disabled,E=m??l.props.required,k={disabled:w,required:E};["checked","name","onChange","value","inputRef"].forEach(O=>{typeof l.props[O]>"u"&&typeof o[O]<"u"&&(k[O]=o[O])});const R=$n({props:o,muiFormControl:x,states:["error"]}),_={...o,disabled:w,labelPlacement:p,required:E,error:R.error},V=rk(_),I={slots:v,slotProps:{...a,...b}},[S,A]=Fe("typography",{elementType:tt,externalForwardedProps:I,ownerState:_});let N=f;return N!=null&&N.type!==tt&&!u&&(N=T.jsx(S,{component:"span",...A,className:be(V.label,A?.className),children:N})),T.jsxs(ik,{className:be(V.root,i),ownerState:_,ref:n,...y,children:[D.cloneElement(l,k),E?T.jsxs("div",{children:[N,T.jsxs(sk,{ownerState:_,"aria-hidden":!0,className:V.asterisk,children:[" ","*"]})]}):N]})});process.env.NODE_ENV!=="production"&&(Lh.propTypes={checked:s.bool,classes:s.object,className:s.string,componentsProps:s.shape({typography:s.object}),control:s.element.isRequired,disabled:s.bool,disableTypography:s.bool,inputRef:Et,label:s.node,labelPlacement:s.oneOf(["bottom","end","start","top"]),name:s.string,onChange:s.func,required:s.bool,slotProps:s.shape({typography:s.oneOfType([s.func,s.object])}),slots:s.shape({typography:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.any});function ak(e){return ke("MuiFormHelperText",e)}const ld=Oe("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var cd;const lk=e=>{const{classes:t,contained:n,size:o,disabled:r,error:i,filled:a,focused:l,required:c}=e,u={root:["root",r&&"disabled",i&&"error",o&&`size${me(o)}`,n&&"contained",l&&"focused",a&&"filled",c&&"required"]};return Pe(u,ak,t)},ck=le("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${me(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Ne(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${ld.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ld.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),Fh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiFormHelperText"}),{children:r,className:i,component:a="p",disabled:l,error:c,filled:u,focused:d,margin:f,required:p,variant:h,...g}=o,m=dn(),v=$n({props:o,muiFormControl:m,states:["variant","size","disabled","error","filled","focused","required"]}),b={...o,component:a,contained:v.variant==="filled"||v.variant==="outlined",variant:v.variant,size:v.size,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required};delete b.ownerState;const C=lk(b);return T.jsx(ck,{as:a,className:be(C.root,i),ref:n,...g,ownerState:b,children:r===" "?cd||(cd=T.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):r})});process.env.NODE_ENV!=="production"&&(Fh.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,disabled:s.bool,error:s.bool,filled:s.bool,focused:s.bool,margin:s.oneOf(["dense"]),required:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOfType([s.oneOf(["filled","outlined","standard"]),s.string])});function uk(e){return ke("MuiFormLabel",e)}const Uo=Oe("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),dk=e=>{const{classes:t,color:n,focused:o,disabled:r,error:i,filled:a,required:l}=e,c={root:["root",`color${me(n)}`,r&&"disabled",i&&"error",a&&"filled",o&&"focused",l&&"required"],asterisk:["asterisk",i&&"error"]};return Pe(c,uk,t)},fk=le("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(Ne(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(un()).map(([t])=>({props:{color:t},style:{[`&.${Uo.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Uo.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Uo.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),pk=le("span",{name:"MuiFormLabel",slot:"Asterisk"})(Ne(({theme:e})=>({[`&.${Uo.error}`]:{color:(e.vars||e).palette.error.main}}))),Bh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiFormLabel"}),{children:r,className:i,color:a,component:l="label",disabled:c,error:u,filled:d,focused:f,required:p,...h}=o,g=dn(),m=$n({props:o,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),v={...o,color:m.color||"primary",component:l,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required},b=dk(v);return T.jsxs(fk,{as:l,ownerState:v,className:be(b.root,i),ref:n,...h,children:[r,m.required&&T.jsxs(pk,{ownerState:v,"aria-hidden":!0,className:b.asterisk,children:[" ","*"]})]})});process.env.NODE_ENV!=="production"&&(Bh.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["error","info","primary","secondary","success","warning"]),s.string]),component:s.elementType,disabled:s.bool,error:s.bool,filled:s.bool,focused:s.bool,required:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function Ra(e){return`scale(${e}, ${e**2})`}const hk={entering:{opacity:1,transform:Ra(1)},entered:{opacity:1,transform:"none"}},Ks=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Oi=D.forwardRef(function(t,n){const{addEndListener:o,appear:r=!0,children:i,easing:a,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:h,style:g,timeout:m="auto",TransitionComponent:v=$t,...b}=t,C=hh(),y=D.useRef(),x=Sr(),w=D.useRef(null),E=it(w,ho(i),n),k=O=>P=>{if(O){const L=w.current;P===void 0?O(L):O(L,P)}},R=k(d),_=k((O,P)=>{Cl(O);const{duration:L,delay:M,easing:j}=ao({style:g,timeout:m,easing:a},{mode:"enter"});let $;m==="auto"?($=x.transitions.getAutoHeightDuration(O.clientHeight),y.current=$):$=L,O.style.transition=[x.transitions.create("opacity",{duration:$,delay:M}),x.transitions.create("transform",{duration:Ks?$:$*.666,delay:M,easing:j})].join(","),c&&c(O,P)}),V=k(u),I=k(h),S=k(O=>{const{duration:P,delay:L,easing:M}=ao({style:g,timeout:m,easing:a},{mode:"exit"});let j;m==="auto"?(j=x.transitions.getAutoHeightDuration(O.clientHeight),y.current=j):j=P,O.style.transition=[x.transitions.create("opacity",{duration:j,delay:L}),x.transitions.create("transform",{duration:Ks?j:j*.666,delay:Ks?L:L||j*.333,easing:M})].join(","),O.style.opacity=0,O.style.transform=Ra(.75),f&&f(O)}),A=k(p),N=O=>{m==="auto"&&C.start(y.current||0,O),o&&o(w.current,O)};return T.jsx(v,{appear:r,in:l,nodeRef:w,onEnter:_,onEntered:V,onEntering:R,onExit:S,onExited:A,onExiting:I,addEndListener:N,timeout:m==="auto"?null:m,...b,children:(O,{ownerState:P,...L})=>D.cloneElement(i,{style:{opacity:0,transform:Ra(.75),visibility:O==="exited"&&!l?"hidden":void 0,...hk[O],...g,...i.props.style},ref:E,...L})})});process.env.NODE_ENV!=="production"&&(Oi.propTypes={addEndListener:s.func,appear:s.bool,children:mo.isRequired,easing:s.oneOfType([s.shape({enter:s.string,exit:s.string}),s.string]),in:s.bool,onEnter:s.func,onEntered:s.func,onEntering:s.func,onExit:s.func,onExited:s.func,onExiting:s.func,style:s.object,timeout:s.oneOfType([s.oneOf(["auto"]),s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});Oi&&(Oi.muiSupportAuto=!0);const mk=e=>{const{classes:t,disableUnderline:n}=e,r=Pe({root:["root",!n&&"underline"],input:["input"]},eN,t);return{...t,...r}},gk=le(fs,{shouldForwardProp:e=>dt(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...us(e,t),!n.disableUnderline&&t.underline]}})(Ne(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:o})=>o.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:o})=>!o.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${To.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${To.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${To.disabled}, .${To.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${To.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(un()).map(([o])=>({props:{color:o,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o].main}`}}}))]}})),yk=le(ps,{name:"MuiInput",slot:"Input",overridesResolver:ds})({}),gs=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiInput"}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:l=!1,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...h}=o,g=mk(o),v={root:{ownerState:{disableUnderline:r}}},b=d??a?nt(d??a,v):v,C=f.root??i.Root??gk,y=f.input??i.Input??yk;return T.jsx(hs,{slots:{root:C,input:y},slotProps:b,fullWidth:l,inputComponent:c,multiline:u,ref:n,type:p,...h,classes:g})});process.env.NODE_ENV!=="production"&&(gs.propTypes={autoComplete:s.string,autoFocus:s.bool,classes:s.object,color:s.oneOfType([s.oneOf(["primary","secondary"]),s.string]),components:s.shape({Input:s.elementType,Root:s.elementType}),componentsProps:s.shape({input:s.object,root:s.object}),defaultValue:s.any,disabled:s.bool,disableUnderline:s.bool,endAdornment:s.node,error:s.bool,fullWidth:s.bool,id:s.string,inputComponent:s.elementType,inputProps:s.object,inputRef:Et,margin:s.oneOf(["dense","none"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,onChange:s.func,placeholder:s.string,readOnly:s.bool,required:s.bool,rows:s.oneOfType([s.number,s.string]),slotProps:s.shape({input:s.object,root:s.object}),slots:s.shape({input:s.elementType,root:s.elementType}),startAdornment:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any});gs.muiName="Input";function bk(e){return ke("MuiInputLabel",e)}Oe("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const vk=e=>{const{classes:t,formControl:n,size:o,shrink:r,disableAnimation:i,variant:a,required:l}=e,c={root:["root",n&&"formControl",!i&&"animated",r&&"shrink",o&&o!=="medium"&&`size${me(o)}`,a],asterisk:[l&&"asterisk"]},u=Pe(c,bk,t);return{...t,...u}},xk=le(Bh,{shouldForwardProp:e=>dt(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Uo.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Ne(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:o})=>t==="filled"&&n.shrink&&o==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Ol=D.forwardRef(function(t,n){const o=Ie({name:"MuiInputLabel",props:t}),{disableAnimation:r=!1,margin:i,shrink:a,variant:l,className:c,...u}=o,d=dn();let f=a;typeof f>"u"&&d&&(f=d.filled||d.focused||d.adornedStart);const p=$n({props:o,muiFormControl:d,states:["size","variant","required","focused"]}),h={...o,disableAnimation:r,formControl:d,shrink:f,size:p.size,variant:p.variant,required:p.required,focused:p.focused},g=vk(h);return T.jsx(xk,{"data-shrink":f,ref:n,className:be(g.root,c),...u,ownerState:h,classes:g})});process.env.NODE_ENV!=="production"&&(Ol.propTypes={children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["error","info","primary","secondary","success","warning"]),s.string]),disableAnimation:s.bool,disabled:s.bool,error:s.bool,focused:s.bool,margin:s.oneOf(["dense"]),required:s.bool,shrink:s.bool,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOf(["filled","outlined","standard"])});const uo=D.createContext({});process.env.NODE_ENV!=="production"&&(uo.displayName="ListContext");function wk(e){return ke("MuiList",e)}Oe("MuiList",["root","padding","dense","subheader"]);const Sk=e=>{const{classes:t,disablePadding:n,dense:o,subheader:r}=e;return Pe({root:["root",!n&&"padding",o&&"dense",r&&"subheader"]},wk,t)},Ek=le("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),zh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiList"}),{children:r,className:i,component:a="ul",dense:l=!1,disablePadding:c=!1,subheader:u,...d}=o,f=D.useMemo(()=>({dense:l}),[l]),p={...o,component:a,dense:l,disablePadding:c},h=Sk(p);return T.jsx(uo.Provider,{value:f,children:T.jsxs(Ek,{as:a,className:be(h.root,i),ref:n,ownerState:p,...d,children:[u,r]})})});process.env.NODE_ENV!=="production"&&(zh.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,dense:s.bool,disablePadding:s.bool,subheader:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function Ck(e){return ke("MuiListItemIcon",e)}const ud=Oe("MuiListItemIcon",["root","alignItemsFlexStart"]),Tk=e=>{const{alignItems:t,classes:n}=e;return Pe({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Ck,n)},Nk=le("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(Ne(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Vh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiListItemIcon"}),{className:r,...i}=o,a=D.useContext(uo),l={...o,alignItems:a.alignItems},c=Tk(l);return T.jsx(Nk,{className:be(c.root,r),ownerState:l,ref:n,...i})});process.env.NODE_ENV!=="production"&&(Vh.propTypes={children:s.node,classes:s.object,className:s.string,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function kk(e){return ke("MuiListItemText",e)}const Yn=Oe("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Ok=e=>{const{classes:t,inset:n,primary:o,secondary:r,dense:i}=e;return Pe({root:["root",n&&"inset",i&&"dense",o&&r&&"multiline"],primary:["primary"],secondary:["secondary"]},kk,t)},Pk=le("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Yn.primary}`]:t.primary},{[`& .${Yn.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${Zu.root}:where(& .${Yn.primary})`]:{display:"block"},[`.${Zu.root}:where(& .${Yn.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Fo=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiListItemText"}),{children:r,className:i,disableTypography:a=!1,inset:l=!1,primary:c,primaryTypographyProps:u,secondary:d,secondaryTypographyProps:f,slots:p={},slotProps:h={},...g}=o,{dense:m}=D.useContext(uo);let v=c??r,b=d;const C={...o,disableTypography:a,inset:l,primary:!!v,secondary:!!b,dense:m},y=Ok(C),x={slots:p,slotProps:{primary:u,secondary:f,...h}},[w,E]=Fe("root",{className:be(y.root,i),elementType:Pk,externalForwardedProps:{...x,...g},ownerState:C,ref:n}),[k,R]=Fe("primary",{className:y.primary,elementType:tt,externalForwardedProps:x,ownerState:C}),[_,V]=Fe("secondary",{className:y.secondary,elementType:tt,externalForwardedProps:x,ownerState:C});return v!=null&&v.type!==tt&&!a&&(v=T.jsx(k,{variant:m?"body2":"body1",component:R?.variant?void 0:"span",...R,children:v})),b!=null&&b.type!==tt&&!a&&(b=T.jsx(_,{variant:"body2",color:"textSecondary",...V,children:b})),T.jsxs(w,{...E,children:[v,b]})});process.env.NODE_ENV!=="production"&&(Fo.propTypes={children:s.node,classes:s.object,className:s.string,disableTypography:s.bool,inset:s.bool,primary:s.node,primaryTypographyProps:s.object,secondary:s.node,secondaryTypographyProps:s.object,slotProps:s.shape({primary:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),secondary:s.oneOfType([s.func,s.object])}),slots:s.shape({primary:s.elementType,root:s.elementType,secondary:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function Xs(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function dd(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Hh(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function No(e,t,n,o,r,i){let a=!1,l=r(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(a)return!1;a=!0}const c=o?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!Hh(l,i)||c)l=r(e,l,n);else return l.focus(),!0}return!1}const Wh=D.forwardRef(function(t,n){const{actions:o,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:l,disabledItemsFocusable:c=!1,disableListWrap:u=!1,onKeyDown:d,variant:f="selectedMenu",...p}=t,h=D.useRef(null),g=D.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});an(()=>{r&&h.current.focus()},[r]),D.useImperativeHandle(o,()=>({adjustStyleForScrollbar:(y,{direction:x})=>{const w=!h.current.style.width;if(y.clientHeight<h.current.clientHeight&&w){const E=`${Ih(It(y))}px`;h.current.style[x==="rtl"?"paddingLeft":"paddingRight"]=E,h.current.style.width=`calc(100% + ${E})`}return h.current}}),[]);const m=y=>{const x=h.current,w=y.key;if(y.ctrlKey||y.metaKey||y.altKey){d&&d(y);return}const k=jo(_t(x));if(w==="ArrowDown")y.preventDefault(),No(x,k,u,c,Xs);else if(w==="ArrowUp")y.preventDefault(),No(x,k,u,c,dd);else if(w==="Home")y.preventDefault(),No(x,null,u,c,Xs);else if(w==="End")y.preventDefault(),No(x,null,u,c,dd);else if(w.length===1){const R=g.current,_=w.toLowerCase(),V=performance.now();R.keys.length>0&&(V-R.lastTime>500?(R.keys=[],R.repeating=!0,R.previousKeyMatched=!0):R.repeating&&_!==R.keys[0]&&(R.repeating=!1)),R.lastTime=V,R.keys.push(_);const I=k&&!R.repeating&&Hh(k,R);R.previousKeyMatched&&(I||No(x,k,!1,c,Xs,R))?y.preventDefault():R.previousKeyMatched=!1}d&&d(y)},v=it(h,n);let b=-1;D.Children.forEach(a,(y,x)=>{if(!D.isValidElement(y)){b===x&&(b+=1,b>=a.length&&(b=-1));return}process.env.NODE_ENV!=="production"&&Rn.isFragment(y)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
152
|
+
`)),y.props.disabled||(f==="selectedMenu"&&y.props.selected||b===-1)&&(b=x),b===x&&(y.props.disabled||y.props.muiSkipListHighlight||y.type.muiSkipListHighlight)&&(b+=1,b>=a.length&&(b=-1))});const C=D.Children.map(a,(y,x)=>{if(x===b){const w={};return i&&(w.autoFocus=!0),y.props.tabIndex===void 0&&f==="selectedMenu"&&(w.tabIndex=0),D.cloneElement(y,w)}return y});return T.jsx(zh,{role:"menu",ref:v,className:l,onKeyDown:m,tabIndex:r?0:-1,...p,children:C})});process.env.NODE_ENV!=="production"&&(Wh.propTypes={autoFocus:s.bool,autoFocusItem:s.bool,children:s.node,className:s.string,disabledItemsFocusable:s.bool,disableListWrap:s.bool,onKeyDown:s.func,variant:s.oneOf(["menu","selectedMenu"])});function Rk(e){return ke("MuiPopover",e)}Oe("MuiPopover",["root","paper"]);function fd(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function pd(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function hd(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Bo(e){return typeof e=="function"?e():e}const _k=e=>{const{classes:t}=e;return Pe({root:["root"],paper:["paper"]},Rk,t)},Ik=le(kl,{name:"MuiPopover",slot:"Root"})({}),Uh=le(Nl,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),qh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiPopover"}),{action:r,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:l,anchorReference:c="anchorEl",children:u,className:d,container:f,elevation:p=8,marginThreshold:h=16,open:g,PaperProps:m={},slots:v={},slotProps:b={},transformOrigin:C={vertical:"top",horizontal:"left"},TransitionComponent:y,transitionDuration:x="auto",TransitionProps:w={},disableScrollLock:E=!1,...k}=o,R=D.useRef(),_={...o,anchorOrigin:a,anchorReference:c,elevation:p,marginThreshold:h,transformOrigin:C,TransitionComponent:y,transitionDuration:x,TransitionProps:w},V=_k(_),I=D.useCallback(()=>{if(c==="anchorPosition")return process.env.NODE_ENV!=="production"&&(l||console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')),l;const Z=Bo(i),ne=Z&&Z.nodeType===1?Z:_t(R.current).body,z=ne.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const ae=ne.getBoundingClientRect();!globalThis.MUI_TEST_ENV&&ae.top===0&&ae.left===0&&ae.right===0&&ae.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
153
|
+
`))}return{top:z.top+fd(z,a.vertical),left:z.left+pd(z,a.horizontal)}},[i,a.horizontal,a.vertical,l,c]),S=D.useCallback(Z=>({vertical:fd(Z,C.vertical),horizontal:pd(Z,C.horizontal)}),[C.horizontal,C.vertical]),A=D.useCallback(Z=>{const ne={width:Z.offsetWidth,height:Z.offsetHeight},z=S(ne);if(c==="none")return{top:null,left:null,transformOrigin:hd(z)};const ae=I();let se=ae.top-z.vertical,de=ae.left-z.horizontal;const we=se+ne.height,Te=de+ne.width,G=It(Bo(i)),X=G.innerHeight-h,te=G.innerWidth-h;if(h!==null&&se<h){const re=se-h;se-=re,z.vertical+=re}else if(h!==null&&we>X){const re=we-X;se-=re,z.vertical+=re}if(process.env.NODE_ENV!=="production"&&ne.height>X&&ne.height&&X&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${ne.height-X}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(`
|
|
154
|
+
`)),h!==null&&de<h){const re=de-h;de-=re,z.horizontal+=re}else if(Te>te){const re=Te-te;de-=re,z.horizontal+=re}return{top:`${Math.round(se)}px`,left:`${Math.round(de)}px`,transformOrigin:hd(z)}},[i,c,I,S,h]),[N,O]=D.useState(g),P=D.useCallback(()=>{const Z=R.current;if(!Z)return;const ne=A(Z);ne.top!==null&&Z.style.setProperty("top",ne.top),ne.left!==null&&(Z.style.left=ne.left),Z.style.transformOrigin=ne.transformOrigin,O(!0)},[A]);D.useEffect(()=>(E&&window.addEventListener("scroll",P),()=>window.removeEventListener("scroll",P)),[i,E,P]);const L=()=>{P()},M=()=>{O(!1)};D.useEffect(()=>{g&&P()}),D.useImperativeHandle(r,()=>g?{updatePosition:()=>{P()}}:null,[g,P]),D.useEffect(()=>{if(!g)return;const Z=vl(()=>{P()}),ne=It(Bo(i));return ne.addEventListener("resize",Z),()=>{Z.clear(),ne.removeEventListener("resize",Z)}},[i,g,P]);let j=x;const $={slots:{transition:y,...v},slotProps:{transition:w,paper:m,...b}},[B,H]=Fe("transition",{elementType:Oi,externalForwardedProps:$,ownerState:_,getSlotProps:Z=>({...Z,onEntering:(ne,z)=>{Z.onEntering?.(ne,z),L()},onExited:ne=>{Z.onExited?.(ne),M()}}),additionalProps:{appear:!0,in:g}});x==="auto"&&!B.muiSupportAuto&&(j=void 0);const U=f||(i?_t(Bo(i)).body:void 0),[W,{slots:K,slotProps:Q,...ee}]=Fe("root",{ref:n,elementType:Ik,externalForwardedProps:{...$,...k},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:v.backdrop},slotProps:{backdrop:uh(typeof b.backdrop=="function"?b.backdrop(_):b.backdrop,{invisible:!0})},container:U,open:g},ownerState:_,className:be(V.root,d)}),[q,J]=Fe("paper",{ref:R,className:V.paper,elementType:Uh,externalForwardedProps:$,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:N?void 0:{opacity:0}},ownerState:_});return T.jsx(W,{...ee,...!wi(W)&&{slots:K,slotProps:Q,disableScrollLock:E},children:T.jsx(B,{...H,timeout:j,children:T.jsx(q,{...J,children:u})})})});process.env.NODE_ENV!=="production"&&(qh.propTypes={action:Et,anchorEl:Mn(s.oneOfType([lo,s.func]),e=>{if(e.open&&(!e.anchorReference||e.anchorReference==="anchorEl")){const t=Bo(e.anchorEl);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="production"&&!globalThis.MUI_TEST_ENV&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
155
155
|
`))}else return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.",`It should be an Element or PopoverVirtualElement instance but it's \`${t}\` instead.`].join(`
|
|
156
|
-
`))}return null}),anchorOrigin:s.shape({horizontal:s.oneOfType([s.oneOf(["center","left","right"]),s.number]).isRequired,vertical:s.oneOfType([s.oneOf(["bottom","center","top"]),s.number]).isRequired}),anchorPosition:s.shape({left:s.number.isRequired,top:s.number.isRequired}),anchorReference:s.oneOf(["anchorEl","anchorPosition","none"]),BackdropComponent:s.elementType,BackdropProps:s.object,children:s.node,classes:s.object,className:s.string,container:s.oneOfType([lo,s.func]),disableScrollLock:s.bool,elevation:Tl,marginThreshold:s.number,onClose:s.func,open:s.bool.isRequired,PaperProps:s.shape({component:El}),slotProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),paper:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({backdrop:s.elementType,paper:s.elementType,root:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),transformOrigin:s.shape({horizontal:s.oneOfType([s.oneOf(["center","left","right"]),s.number]).isRequired,vertical:s.oneOfType([s.oneOf(["bottom","center","top"]),s.number]).isRequired}),TransitionComponent:s.elementType,transitionDuration:s.oneOfType([s.oneOf(["auto"]),s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})]),TransitionProps:s.object});function Mk(e){return
|
|
157
|
-
`)),j.props.disabled||(v==="selectedMenu"&&j.props.selected||I===-1)&&(I=$))});const S={slots:b,slotProps:{list:c,transition:m,paper:f,...C}},A=WT({elementType:b.root,externalSlotProps:C.root,ownerState:w,className:[E.root,a]}),[N,O]=Fe("paper",{className:E.paper,elementType:Lk,externalForwardedProps:S,shouldForwardComponentProp:!0,ownerState:w}),[P,L]=Fe("list",{className:be(E.list,c.className),elementType:Fk,shouldForwardComponentProp:!0,externalForwardedProps:S,getSlotProps:j=>({...j,onKeyDown:$=>{V($),j.onKeyDown?.($)}}),ownerState:w}),M=typeof S.slotProps.transition=="function"?S.slotProps.transition(w):S.slotProps.transition;return T.jsx(jk,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?$k:Ak,slots:{root:b.root,paper:N,backdrop:b.backdrop,...b.transition&&{transition:b.transition}},slotProps:{root:A,paper:O,backdrop:typeof C.backdrop=="function"?C.backdrop(w):C.backdrop,transition:{...M,onEntering:(...j)=>{_(...j),M?.onEntering?.(...j)}}},open:d,ref:n,transitionDuration:h,ownerState:w,...y,classes:p,children:T.jsx(P,{actions:R,autoFocus:r&&(I===-1||l),autoFocusItem:k,variant:v,...L,children:i})})});process.env.NODE_ENV!=="production"&&(Pl.propTypes={anchorEl:s.oneOfType([lo,s.func]),autoFocus:s.bool,children:s.node,classes:s.object,className:s.string,disableAutoFocusItem:s.bool,MenuListProps:s.object,onClose:s.func,open:s.bool.isRequired,PaperProps:s.object,PopoverClasses:s.object,slotProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),list:s.oneOfType([s.func,s.object]),paper:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({backdrop:s.elementType,list:s.elementType,paper:s.elementType,root:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),transitionDuration:s.oneOfType([s.oneOf(["auto"]),s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})]),TransitionProps:s.object,variant:s.oneOf(["menu","selectedMenu"])});function Bk(e){return Ne("MuiMenuItem",e)}const ko=Oe("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),zk=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Vk=e=>{const{disabled:t,dense:n,divider:o,disableGutters:r,selected:i,classes:a}=e,c=Pe({root:["root",n&&"dense",t&&"disabled",!r&&"gutters",o&&"divider",i&&"selected"]},Bk,a);return{...a,...c}},Hk=le(ls,{shouldForwardProp:e=>dt(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:zk})(Te(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ko.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${ko.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${ko.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${ko.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ko.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${ad.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${ad.inset}`]:{marginLeft:52},[`& .${Yn.root}`]:{marginTop:0,marginBottom:0},[`& .${Yn.inset}`]:{paddingLeft:36},[`& .${ud.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${ud.root} svg`]:{fontSize:"1.25rem"}}}]}))),Nt=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:a=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:u,role:d="menuitem",tabIndex:f,className:p,...h}=o,g=D.useContext(uo),m=D.useMemo(()=>({dense:a||g.dense||!1,disableGutters:c}),[g.dense,a,c]),v=D.useRef(null);an(()=>{r&&(v.current?v.current.focus():process.env.NODE_ENV!=="production"&&console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."))},[r]);const b={...o,dense:m.dense,divider:l,disableGutters:c},C=Vk(o),y=it(v,n);let x;return o.disabled||(x=f!==void 0?f:-1),T.jsx(uo.Provider,{value:m,children:T.jsx(Hk,{ref:y,role:d,tabIndex:x,component:i,focusVisibleClassName:be(C.focusVisible,u),className:be(C.root,p),...h,ownerState:b,classes:C})})});process.env.NODE_ENV!=="production"&&(Nt.propTypes={autoFocus:s.bool,children:s.node,classes:s.object,className:s.string,component:s.elementType,dense:s.bool,disabled:s.bool,disableGutters:s.bool,divider:s.bool,focusVisibleClassName:s.string,role:s.string,selected:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number});function Wk(e){return Ne("MuiNativeSelect",e)}const Rl=Oe("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Uk=e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:i,error:a}=e,l={select:["select",n,o&&"disabled",r&&"multiple",a&&"error"],icon:["icon",`icon${ge(n)}`,i&&"iconOpen",o&&"disabled"]};return Pe(l,Wk,t)},Yh=le("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Rl.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),qk=le(Yh,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:dt,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Rl.multiple}`]:t.multiple}]}})({}),Gh=le("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Rl.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),Yk=le(Gh,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ge(n.variant)}`],n.open&&t.iconOpen]}})({}),Kh=D.forwardRef(function(t,n){const{className:o,disabled:r,error:i,IconComponent:a,inputRef:l,variant:c="standard",...u}=t,d={...t,disabled:r,variant:c,error:i},f=Uk(d);return T.jsxs(D.Fragment,{children:[T.jsx(qk,{ownerState:d,className:be(f.select,o),disabled:r,ref:l||n,...u}),t.multiple?null:T.jsx(Yk,{as:a,ownerState:d,className:f.icon})]})});process.env.NODE_ENV!=="production"&&(Kh.propTypes={children:s.node,classes:s.object,className:s.string,disabled:s.bool,error:s.bool,IconComponent:s.elementType.isRequired,inputRef:St,multiple:s.bool,name:s.string,onChange:s.func,value:s.any,variant:s.oneOf(["standard","outlined","filled"])});var md;const Gk=le("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:dt})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Kk=le("legend",{name:"MuiNotchedOutlined",shouldForwardProp:dt})(Te(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Xh(e){const{children:t,classes:n,className:o,label:r,notched:i,...a}=e,l=r!=null&&r!=="",c={...e,notched:i,withLabel:l};return T.jsx(Gk,{"aria-hidden":!0,className:o,ownerState:c,...a,children:T.jsx(Kk,{ownerState:c,children:l?T.jsx("span",{children:r}):md||(md=T.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}process.env.NODE_ENV!=="production"&&(Xh.propTypes={children:s.node,classes:s.object,className:s.string,label:s.node,notched:s.bool.isRequired,style:s.object});const Xk=e=>{const{classes:t}=e,o=Pe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},tN,t);return{...t,...o}},Zk=le(fs,{shouldForwardProp:e=>dt(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:us})(Te(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Dt.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Dt.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Dt.focused} .${Dt.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(un()).map(([n])=>({props:{color:n},style:{[`&.${Dt.focused} .${Dt.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Dt.error} .${Dt.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Dt.disabled} .${Dt.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:o})=>n.multiline&&o==="small",style:{padding:"8.5px 14px"}}]}})),Qk=le(Xh,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Te(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),Jk=le(ps,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:ds})(Te(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),ys=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiOutlinedInput"}),{components:r={},fullWidth:i=!1,inputComponent:a="input",label:l,multiline:c=!1,notched:u,slots:d={},slotProps:f={},type:p="text",...h}=o,g=Xk(o),m=dn(),v=$n({props:o,muiFormControl:m,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b={...o,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:m,fullWidth:i,hiddenLabel:v.hiddenLabel,multiline:c,size:v.size,type:p},C=d.root??r.Root??Zk,y=d.input??r.Input??Jk,[x,w]=Fe("notchedOutline",{elementType:Qk,className:g.notchedOutline,shouldForwardComponentProp:!0,ownerState:b,externalForwardedProps:{slots:d,slotProps:f},additionalProps:{label:l!=null&&l!==""&&v.required?T.jsxs(D.Fragment,{children:[l," ","*"]}):l}});return T.jsx(hs,{slots:{root:C,input:y},slotProps:f,renderSuffix:E=>T.jsx(x,{...w,notched:typeof u<"u"?u:!!(E.startAdornment||E.filled||E.focused)}),fullWidth:i,inputComponent:a,multiline:c,ref:n,type:p,...h,classes:{...g,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(ys.propTypes={autoComplete:s.string,autoFocus:s.bool,classes:s.object,color:s.oneOfType([s.oneOf(["primary","secondary"]),s.string]),components:s.shape({Input:s.elementType,Root:s.elementType}),defaultValue:s.any,disabled:s.bool,endAdornment:s.node,error:s.bool,fullWidth:s.bool,id:s.string,inputComponent:s.elementType,inputProps:s.object,inputRef:St,label:s.node,margin:s.oneOf(["dense","none"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,notched:s.bool,onChange:s.func,placeholder:s.string,readOnly:s.bool,required:s.bool,rows:s.oneOfType([s.number,s.string]),slotProps:s.shape({input:s.object,notchedOutline:s.oneOfType([s.func,s.object]),root:s.object}),slots:s.shape({input:s.elementType,notchedOutline:s.elementType,root:s.elementType}),startAdornment:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any});ys.muiName="Input";function Zh(e){return Ne("MuiSelect",e)}const Oo=Oe("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var gd;const eO=le(Yh,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Oo.select}`]:t.select},{[`&.${Oo.select}`]:t[n.variant]},{[`&.${Oo.error}`]:t.error},{[`&.${Oo.multiple}`]:t.multiple}]}})({[`&.${Oo.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),tO=le(Gh,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ge(n.variant)}`],n.open&&t.iconOpen]}})({}),nO=le("input",{shouldForwardProp:e=>lh(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function yd(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function oO(e){return e==null||typeof e=="string"&&!e.trim()}const rO=e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:i,error:a}=e,l={select:["select",n,o&&"disabled",r&&"multiple",a&&"error"],icon:["icon",`icon${ge(n)}`,i&&"iconOpen",o&&"disabled"],nativeInput:["nativeInput"]};return Pe(l,Zh,t)},Qh=D.forwardRef(function(t,n){const{"aria-describedby":o,"aria-label":r,autoFocus:i,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:f,displayEmpty:p,error:h=!1,IconComponent:g,inputRef:m,labelId:v,MenuProps:b={},multiple:C,name:y,onBlur:x,onChange:w,onClose:E,onFocus:k,onKeyDown:R,onMouseDown:_,onOpen:V,open:I,readOnly:S,renderValue:A,required:N,SelectDisplayProps:O={},tabIndex:P,type:L,value:M,variant:j="standard",...$}=t,[B,H]=Ea({controlled:M,default:d,name:"Select"}),[U,W]=Ea({controlled:I,default:u,name:"Select"}),K=D.useRef(null),Q=D.useRef(null),[ee,q]=D.useState(null),{current:J}=D.useRef(I!=null),[Z,ne]=D.useState(),z=it(n,m),ae=D.useCallback(he=>{Q.current=he,he&&q(he)},[]),se=ee?.parentNode;D.useImperativeHandle(z,()=>({focus:()=>{Q.current.focus()},node:K.current,value:B}),[B]);const fe=ee!==null&&U;D.useEffect(()=>{if(!fe||!se||a||typeof ResizeObserver>"u")return;const he=new ResizeObserver(()=>{ne(se.clientWidth)});return he.observe(se),()=>{he.disconnect()}},[fe,se,a]),D.useEffect(()=>{u&&U&&ee&&!J&&(ne(a?null:se.clientWidth),Q.current.focus())},[ee,a]),D.useEffect(()=>{i&&Q.current.focus()},[i]),D.useEffect(()=>{if(!v)return;const he=_t(Q.current).getElementById(v);if(he){const Se=()=>{getSelection().isCollapsed&&Q.current.focus()};return he.addEventListener("click",Se),()=>{he.removeEventListener("click",Se)}}},[v]);const xe=(he,Se)=>{he?V&&V(Se):E&&E(Se),J||(ne(a?null:se.clientWidth),W(he))},Ce=he=>{_?.(he),he.button===0&&(he.preventDefault(),Q.current.focus(),xe(!0,he))},G=he=>{xe(!1,he)},X=D.Children.toArray(l),te=he=>{const Se=X.find(et=>et.props.value===he.target.value);Se!==void 0&&(H(Se.props.value),w&&w(he,Se))},re=he=>Se=>{let et;if(Se.currentTarget.hasAttribute("tabindex")){if(C){et=Array.isArray(B)?B.slice():[];const Jt=B.indexOf(he.props.value);Jt===-1?et.push(he.props.value):et.splice(Jt,1)}else et=he.props.value;if(he.props.onClick&&he.props.onClick(Se),B!==et&&(H(et),w)){const Jt=Se.nativeEvent||Se,Nr=new Jt.constructor(Jt.type,Jt);Object.defineProperty(Nr,"target",{writable:!0,value:{value:et,name:y}}),w(Nr,he)}C||xe(!1,Se)}},oe=he=>{S||([" ","ArrowUp","ArrowDown","Enter"].includes(he.key)&&(he.preventDefault(),xe(!0,he)),R?.(he))},ue=he=>{!fe&&x&&(Object.defineProperty(he,"target",{writable:!0,value:{value:B,name:y}}),x(he))};delete $["aria-invalid"];let ie,ye;const de=[];let ce=!1,we=!1;(Ti({value:B})||p)&&(A?ie=A(B):ce=!0);const Je=X.map(he=>{if(!D.isValidElement(he))return null;process.env.NODE_ENV!=="production"&&Rn.isFragment(he)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
158
|
-
`));let
|
|
159
|
-
`))}},[we,X,C,y,B]),ce&&(C?de.length===0?ie=null:ie=de.reduce((he,Se,et)=>(he.push(Se),et<de.length-1&&he.push(", "),he),[]):ie=ye);let Ke=Z;!a&&J&&ee&&(Ke=se.clientWidth);let me;typeof P<"u"?me=P:me=f?null:0;const ke=O.id||(y?`mui-component-select-${y}`:void 0),ve={...t,variant:j,value:B,open:fe,error:h},Xe=rO(ve),Et={...b.PaperProps,...typeof b.slotProps?.paper=="function"?b.slotProps.paper(ve):b.slotProps?.paper},xo={...b.MenuListProps,...typeof b.slotProps?.list=="function"?b.slotProps.list(ve):b.slotProps?.list},ft=gl();return T.jsxs(D.Fragment,{children:[T.jsx(eO,{as:"div",ref:ae,tabIndex:me,role:"combobox","aria-controls":fe?ft:void 0,"aria-disabled":f?"true":void 0,"aria-expanded":fe?"true":"false","aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[v,ke].filter(Boolean).join(" ")||void 0,"aria-describedby":o,"aria-required":N?"true":void 0,"aria-invalid":h?"true":void 0,onKeyDown:oe,onMouseDown:f||S?null:Ce,onBlur:ue,onFocus:k,...O,ownerState:ve,className:be(O.className,Xe.select,c),id:ke,children:oO(ie)?gd||(gd=T.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):ie}),T.jsx(nO,{"aria-invalid":h,value:Array.isArray(B)?B.join(","):B,name:y,ref:K,"aria-hidden":!0,onChange:te,tabIndex:-1,disabled:f,className:Xe.nativeInput,autoFocus:i,required:N,...$,ownerState:ve}),T.jsx(tO,{as:g,className:Xe.icon,ownerState:ve}),T.jsx(Pl,{id:`menu-${y||""}`,anchorEl:se,open:fe,onClose:G,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...b,slotProps:{...b.slotProps,list:{"aria-labelledby":v,role:"listbox","aria-multiselectable":C?"true":void 0,disableListWrap:!0,id:ft,...xo},paper:{...Et,style:{minWidth:Ke,...Et!=null?Et.style:null}}},children:Je})]})});process.env.NODE_ENV!=="production"&&(Qh.propTypes={"aria-describedby":s.string,"aria-label":s.string,autoFocus:s.bool,autoWidth:s.bool,children:s.node,classes:s.object,className:s.string,defaultOpen:s.bool,defaultValue:s.any,disabled:s.bool,displayEmpty:s.bool,error:s.bool,IconComponent:s.elementType.isRequired,inputRef:St,labelId:s.string,MenuProps:s.object,multiple:s.bool,name:s.string,onBlur:s.func,onChange:s.func,onClose:s.func,onFocus:s.func,onOpen:s.func,open:s.bool,readOnly:s.bool,renderValue:s.func,required:s.bool,SelectDisplayProps:s.object,tabIndex:s.oneOfType([s.number,s.string]),type:s.any,value:s.any,variant:s.oneOf(["standard","outlined","filled"])});const iO=e=>{const{classes:t}=e,o=Pe({root:["root"]},Zh,t);return{...t,...o}},_l={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>dt(e)&&e!=="variant"},sO=le(gs,_l)(""),aO=le(ys,_l)(""),lO=le(ms,_l)(""),lr=D.forwardRef(function(t,n){const o=Ie({name:"MuiSelect",props:t}),{autoWidth:r=!1,children:i,classes:a={},className:l,defaultOpen:c=!1,displayEmpty:u=!1,IconComponent:d=oN,id:f,input:p,inputProps:h,label:g,labelId:m,MenuProps:v,multiple:b=!1,native:C=!1,onClose:y,onOpen:x,open:w,renderValue:E,SelectDisplayProps:k,variant:R="outlined",..._}=o,V=C?Kh:Qh,I=dn(),S=$n({props:o,muiFormControl:I,states:["variant","error"]}),A=S.variant||R,N={...o,variant:A,classes:a},O=iO(N),{root:P,...L}=O,M=p||{standard:T.jsx(sO,{ownerState:N}),outlined:T.jsx(aO,{label:g,ownerState:N}),filled:T.jsx(lO,{ownerState:N})}[A],j=it(n,ho(M));return T.jsx(D.Fragment,{children:D.cloneElement(M,{inputComponent:V,inputProps:{children:i,error:S.error,IconComponent:d,variant:A,type:void 0,multiple:b,...C?{id:f}:{autoWidth:r,defaultOpen:c,displayEmpty:u,labelId:m,MenuProps:v,onClose:y,onOpen:x,open:w,renderValue:E,SelectDisplayProps:{id:f,...k}},...h,classes:h?nt(L,h.classes):L,...p?p.props.inputProps:{}},...(b&&C||u)&&A==="outlined"?{notched:!0}:{},ref:j,className:be(M.props.className,l,O.root),...!p&&{variant:A},..._})})});process.env.NODE_ENV!=="production"&&(lr.propTypes={autoWidth:s.bool,children:s.node,classes:s.object,className:s.string,defaultOpen:s.bool,defaultValue:s.any,displayEmpty:s.bool,IconComponent:s.elementType,id:s.string,input:s.element,inputProps:s.object,label:s.node,labelId:s.string,MenuProps:s.object,multiple:s.bool,native:s.bool,onChange:s.func,onClose:s.func,onOpen:s.func,open:s.bool,renderValue:s.func,SelectDisplayProps:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.oneOfType([s.oneOf([""]),s.any]),variant:s.oneOf(["filled","outlined","standard"])});lr.muiName="Select";const mt=m1({createStyledComponent:le("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Ie({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(mt.propTypes={children:s.node,component:s.elementType,direction:s.oneOfType([s.oneOf(["column-reverse","column","row-reverse","row"]),s.arrayOf(s.oneOf(["column-reverse","column","row-reverse","row"])),s.object]),divider:s.node,spacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),useFlexGap:s.bool});function cO(e){return Ne("MuiSwitch",e)}const st=Oe("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),uO=e=>{const{classes:t,edge:n,size:o,color:r,checked:i,disabled:a}=e,l={root:["root",n&&`edge${ge(n)}`,`size${ge(o)}`],switchBase:["switchBase",`color${ge(r)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=Pe(l,cO,t);return{...t,...c}},dO=le("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${ge(n.edge)}`],t[`size${ge(n.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${st.thumb}`]:{width:16,height:16},[`& .${st.switchBase}`]:{padding:4,[`&.${st.checked}`]:{transform:"translateX(16px)"}}}}]}),fO=le(_h,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${st.input}`]:t.input},n.color!=="default"&&t[`color${ge(n.color)}`]]}})(Te(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${st.checked}`]:{transform:"translateX(20px)"},[`&.${st.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${st.checked} + .${st.track}`]:{opacity:.5},[`&.${st.disabled} + .${st.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${st.input}`]:{left:"-100%",width:"300%"}})),Te(({theme:e})=>({"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(un(["light"])).map(([t])=>({props:{color:t},style:{[`&.${st.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${st.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.55)}`}},[`&.${st.checked} + .${st.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),pO=le("span",{name:"MuiSwitch",slot:"Track"})(Te(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),hO=le("span",{name:"MuiSwitch",slot:"Thumb"})(Te(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),Jh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiSwitch"}),{className:r,color:i="primary",edge:a=!1,size:l="medium",sx:c,slots:u={},slotProps:d={},...f}=o,p={...o,color:i,edge:a,size:l},h=uO(p),g={slots:u,slotProps:d},[m,v]=Fe("root",{className:be(h.root,r),elementType:dO,externalForwardedProps:g,ownerState:p,additionalProps:{sx:c}}),[b,C]=Fe("thumb",{className:h.thumb,elementType:hO,externalForwardedProps:g,ownerState:p}),y=T.jsx(b,{...C}),[x,w]=Fe("track",{className:h.track,elementType:pO,externalForwardedProps:g,ownerState:p});return T.jsxs(m,{...v,children:[T.jsx(fO,{type:"checkbox",icon:y,checkedIcon:y,ref:n,ownerState:p,...f,classes:{...h,root:h.switchBase},slots:{...u.switchBase&&{root:u.switchBase},...u.input&&{input:u.input}},slotProps:{...d.switchBase&&{root:typeof d.switchBase=="function"?d.switchBase(p):d.switchBase},input:{role:"switch"},...d.input&&{input:typeof d.input=="function"?d.input(p):d.input}}}),T.jsx(x,{...w})]})});process.env.NODE_ENV!=="production"&&(Jh.propTypes={checked:s.bool,checkedIcon:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["default","primary","secondary","error","info","success","warning"]),s.string]),defaultChecked:s.bool,disabled:s.bool,disableRipple:s.bool,edge:s.oneOf(["end","start",!1]),icon:s.node,id:s.string,inputProps:s.object,inputRef:St,onChange:s.func,required:s.bool,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),slotProps:s.shape({input:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),switchBase:s.oneOfType([s.func,s.object]),thumb:s.oneOfType([s.func,s.object]),track:s.oneOfType([s.func,s.object])}),slots:s.shape({input:s.elementType,root:s.elementType,switchBase:s.elementType,thumb:s.elementType,track:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.any});function mO(e){return Ne("MuiTextField",e)}Oe("MuiTextField",["root"]);const gO={standard:gs,filled:ms,outlined:ys},yO=e=>{const{classes:t}=e;return Pe({root:["root"]},mO,t)},bO=le(ki,{name:"MuiTextField",slot:"Root"})({}),Vt=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTextField"}),{autoComplete:r,autoFocus:i=!1,children:a,className:l,color:c="primary",defaultValue:u,disabled:d=!1,error:f=!1,FormHelperTextProps:p,fullWidth:h=!1,helperText:g,id:m,InputLabelProps:v,inputProps:b,InputProps:C,inputRef:y,label:x,maxRows:w,minRows:E,multiline:k=!1,name:R,onBlur:_,onChange:V,onFocus:I,placeholder:S,required:A=!1,rows:N,select:O=!1,SelectProps:P,slots:L={},slotProps:M={},type:j,value:$,variant:B="outlined",...H}=o,U={...o,autoFocus:i,color:c,disabled:d,error:f,fullWidth:h,multiline:k,required:A,select:O,variant:B},W=yO(U);process.env.NODE_ENV!=="production"&&O&&!a&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const K=gl(m),Q=g&&K?`${K}-helper-text`:void 0,ee=x&&K?`${K}-label`:void 0,q=gO[B],J={slots:L,slotProps:{input:C,inputLabel:v,htmlInput:b,formHelperText:p,select:P,...M}},Z={},ne=J.slotProps.inputLabel;B==="outlined"&&(ne&&typeof ne.shrink<"u"&&(Z.notched=ne.shrink),Z.label=x),O&&((!P||!P.native)&&(Z.id=void 0),Z["aria-describedby"]=void 0);const[z,ae]=Fe("root",{elementType:bO,shouldForwardComponentProp:!0,externalForwardedProps:{...J,...H},ownerState:U,className:be(W.root,l),ref:n,additionalProps:{disabled:d,error:f,fullWidth:h,required:A,color:c,variant:B}}),[se,fe]=Fe("input",{elementType:q,externalForwardedProps:J,additionalProps:Z,ownerState:U}),[xe,Ce]=Fe("inputLabel",{elementType:Ol,externalForwardedProps:J,ownerState:U}),[G,X]=Fe("htmlInput",{elementType:"input",externalForwardedProps:J,ownerState:U}),[te,re]=Fe("formHelperText",{elementType:Fh,externalForwardedProps:J,ownerState:U}),[oe,ue]=Fe("select",{elementType:lr,externalForwardedProps:J,ownerState:U}),ie=T.jsx(se,{"aria-describedby":Q,autoComplete:r,autoFocus:i,defaultValue:u,fullWidth:h,multiline:k,name:R,rows:N,maxRows:w,minRows:E,type:j,value:$,id:K,inputRef:y,onBlur:_,onChange:V,onFocus:I,placeholder:S,inputProps:X,slots:{input:L.htmlInput?G:void 0},...fe});return T.jsxs(z,{...ae,children:[x!=null&&x!==""&&T.jsx(xe,{htmlFor:K,id:ee,...Ce,children:x}),O?T.jsx(oe,{"aria-describedby":Q,id:K,labelId:ee,value:$,input:ie,...ue,children:a}):ie,g&&T.jsx(te,{id:Q,...re,children:g})]})});process.env.NODE_ENV!=="production"&&(Vt.propTypes={autoComplete:s.string,autoFocus:s.bool,children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","error","info","success","warning"]),s.string]),defaultValue:s.any,disabled:s.bool,error:s.bool,FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:St,label:s.node,margin:s.oneOf(["dense","none","normal"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,onBlur:s.func,onChange:s.func,onFocus:s.func,placeholder:s.string,required:s.bool,rows:s.oneOfType([s.number,s.string]),select:s.bool,SelectProps:s.object,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),slotProps:s.shape({formHelperText:s.oneOfType([s.func,s.object]),htmlInput:s.oneOfType([s.func,s.object]),input:s.oneOfType([s.func,s.object]),inputLabel:s.oneOfType([s.func,s.object]),select:s.oneOfType([s.func,s.object])}),slots:s.shape({formHelperText:s.elementType,htmlInput:s.elementType,input:s.elementType,inputLabel:s.elementType,root:s.elementType,select:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any,variant:s.oneOf(["filled","outlined","standard"])});const Po=2,Zs=5;function jt({node:e,nodeLabel:t,setNodeLabel:n,nodeMetaData:o,setNodeMetaData:r}){const i=e.type==="multiChoice",a=o&&typeof o=="object"&&!Array.isArray(o)?o:{},l=typeof a.field1=="string"?a.field1:"",c=typeof a.field2=="string"?a.field2:"",u=typeof a.field3=="string"?a.field3:"",d=Math.min(Zs,Math.max(Po,Number(a.choiceCount)||Po));return T.jsxs(mt,{spacing:2,children:[T.jsx(Vt,{label:"Node label",helperText:"Shown in the node body (under the divider)",value:t,onChange:f=>n(f.target.value),fullWidth:!0}),i&&T.jsx(Vt,{label:"Number of choices (2–5)",type:"number",inputProps:{min:Po,max:Zs,step:1},value:d,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},choiceCount:Math.min(Zs,Math.max(Po,Number(f.target.value)||Po))})),fullWidth:!0,helperText:"Reducing prunes removed-branch subtrees (END preserved)."}),T.jsx(Vt,{label:"Text field 1",value:l,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},field1:f.target.value})),fullWidth:!0,multiline:!0,minRows:2}),T.jsx(Vt,{label:"Text field 2",value:c,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},field2:f.target.value})),fullWidth:!0,multiline:!0,minRows:2}),T.jsx(Vt,{label:"Text field 3",value:u,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},field3:f.target.value})),fullWidth:!0,multiline:!0,minRows:2})]})}function vO({nodeLabel:e,setNodeLabel:t,nodeMetaData:n,setNodeMetaData:o}){const r=n&&typeof n=="object"&&!Array.isArray(n)?n:{},i=typeof r.subject=="string"?r.subject:"",a=typeof r.body=="string"?r.body:"";return T.jsxs(mt,{spacing:2,children:[T.jsx(Vt,{label:"Node label",helperText:"Shown in the node body (under the divider)",value:e,onChange:l=>t(l.target.value),fullWidth:!0}),T.jsx(Vt,{label:"Email subject",value:i,onChange:l=>o(c=>({...c&&typeof c=="object"&&!Array.isArray(c)?c:{},subject:l.target.value})),fullWidth:!0}),T.jsx(Vt,{label:"Email body",value:a,onChange:l=>o(c=>({...c&&typeof c=="object"&&!Array.isArray(c)?c:{},body:l.target.value})),fullWidth:!0,multiline:!0,minRows:4})]})}function xO({node:e,setNodeLabel:t,nodeMetaData:n,setNodeMetaData:o}){const r=n&&typeof n=="object"&&!Array.isArray(n)?n:{},i=typeof r.trackedEvent=="string"?r.trackedEvent:"",a=r.hasTimeDependency!==!1,l=c=>{const u=c.target.value;o(d=>({...d&&typeof d=="object"&&!Array.isArray(d)?d:{},trackedEvent:u})),t(u)};return T.jsx(mt,{spacing:2,children:T.jsxs(ki,{fullWidth:!0,children:[T.jsxs(mt,{children:[T.jsx(Ol,{id:"demo-simple-select-label",children:"Tracked Event"}),T.jsxs(lr,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:i,label:"Tracked Event",onChange:l,children:[T.jsx(Nt,{value:"Class Booked",children:"Class Booked"}),T.jsx(Nt,{value:"Class Cancelled",children:"Class Cancelled"}),T.jsx(Nt,{value:"Class Rescheduled",children:"Class Rescheduled"})]}),T.jsx(tt,{variant:"caption",sx:{mt:.5,color:"text.secondary"},children:"Select the event to wait for before proceeding."})]}),T.jsxs(mt,{sx:{mt:2},spacing:1,children:[T.jsx(Lh,{control:T.jsx(Jh,{checked:!a,onChange:c=>{const u=c.target.checked;o(d=>({...d&&typeof d=="object"&&!Array.isArray(d)?d:{},hasTimeDependency:!u}))}}),label:"No time dependency"}),!a&&T.jsx(tt,{variant:"caption",sx:{mt:.5,color:"text.secondary"},children:'This node will only follow the "Yes / True" path.'})]}),a&&T.jsxs(mt,{sx:{mt:2},spacing:1,children:[T.jsx(tt,{variant:"subtitle2",children:'Wait time before "No / False" is triggered'}),T.jsxs(mt,{direction:"row",spacing:1,alignItems:"center",children:[T.jsx(Vt,{type:"number",value:r.waitTime??7,onChange:c=>{const u=parseInt(c.target.value,10);o(d=>({...d&&typeof d=="object"&&!Array.isArray(d)?d:{},waitTime:isNaN(u)?0:u}))},InputProps:{inputProps:{min:0}},sx:{width:100}}),T.jsx(ki,{sx:{minWidth:120},children:T.jsxs(lr,{value:r.waitType??"days",onChange:c=>{const u=c.target.value;o(d=>({...d&&typeof d=="object"&&!Array.isArray(d)?d:{},waitType:u}))},children:[T.jsx(Nt,{value:"days",children:"Days"}),T.jsx(Nt,{value:"hours",children:"Hours"}),T.jsx(Nt,{value:"minutes",children:"Minutes"})]})})]}),T.jsx(tt,{variant:"caption",sx:{mt:.5,color:"text.secondary"},children:'Specify how long to wait for the event before taking "No / False" action.'})]})]})})}const at="start",Ue="end",go="mingcute:entrance-fill",yo="mingcute:exit-fill",bo=2,bn=()=>({field1:"",field2:"",field3:""}),wO=()=>({trackedEvent:"",waitTime:7,waitType:"days",hasTimeDependency:!0}),SO=()=>({subject:"",body:""}),EO=()=>({...bn(),choiceCount:bo}),bd=()=>({}),vo=[{kind:"start",title:"Start",icon:go,drawerFormComponent:jt,createInitialNodeMetaData:bd},{kind:"end",title:"Exit",icon:yo,drawerFormComponent:jt,createInitialNodeMetaData:bd},{kind:"email",title:"Email",category:"Send Message",nodeType:"action",icon:"streamline:send-email",drawerFormComponent:vO,createInitialNodeMetaData:SO},{kind:"sms",title:"SMS",category:"Send Message",nodeType:"action",icon:"fa-solid:sms",drawerFormComponent:jt,createInitialNodeMetaData:bn},{kind:"push",title:"Push Notification / Web Message",category:"Send Message",nodeType:"action",icon:"mdi:message-badge-outline",enabled:!1,drawerFormComponent:jt,createInitialNodeMetaData:bn},{kind:"tag",title:"Tag Client",category:"Update",nodeType:"action",icon:"ph:tag",drawerFormComponent:jt,createInitialNodeMetaData:bn},{kind:"note",title:"Add Client Note",category:"Update",nodeType:"action",icon:"material-symbols-light:add-notes-outline",drawerFormComponent:jt,createInitialNodeMetaData:bn},{kind:"delay",title:"Delay",category:"Action",nodeType:"action",icon:"mdi:timer-sand-empty",drawerFormComponent:jt,createInitialNodeMetaData:bn},{kind:"smartFilter",title:"Smart Filter",category:"Event",nodeType:"conditional",icon:"tabler:filter",drawerFormComponent:jt,createInitialNodeMetaData:bn},{kind:"waitForEvent",title:"Tracked Event",category:"Event",nodeType:"conditional",icon:"codicon:github-action",drawerFormComponent:xO,createInitialNodeMetaData:wO},{kind:"multiChoice",title:"Multi Choice",category:"Event",nodeType:"multiChoice",icon:"tabler:list-numbers",drawerFormComponent:jt,createInitialNodeMetaData:EO}],CO=vo;function bs(e){return new Map(e.map(t=>[t.kind,t]))}function em(e){return!!e&&e.kind!=="start"&&e.kind!=="end"}function tm(e,t){if(t.length===0)return e;const n=bs(e);for(const i of t)n.set(i.kind,i);const o=e.map(i=>n.get(i.kind)??i),r=new Set(e.map(i=>i.kind));for(const i of t)r.has(i.kind)||o.push(i);return o}const TO=["Send Message","Update","Action","Event"];function nm(e=vo){const t={"Send Message":[],Update:[],Action:[],Event:[]};for(const n of e)em(n)&&t[n.category].push(n);return t}function NO(e,t=vo){const n=bs(t).get(e);return em(n)?n.nodeType:"action"}const kO=[{id:at,type:"start",position:{x:260,y:60},data:{label:"Start",nodeLabel:"",kind:"start",icon:go,nodeMetaData:{}}},{id:Ue,type:"end",position:{x:260,y:520},data:{label:"Exit",nodeLabel:"",kind:"end",icon:yo,nodeMetaData:{}}}],OO=[{id:"e-start-out-end",type:"plusEdge",source:at,sourceHandle:"out",target:Ue,targetHandle:"in",data:{kind:"default",isRedirect:!1}}],Il=150,PO=170,vd=Il,RO=24,_O=Il+RO;function xd(e){return Math.min(5,Math.max(2,Number(e.data.nodeMetaData?.choiceCount)||bo))}function wd(e,t){const n=new Map(e.map(p=>[p.id,p])),o=n.get(at),r=n.get(Ue),i=o?.position.x??260,a=o?.position.y??60,l=t.filter(p=>!p.data?.isRedirect),c=new Map;for(const p of l){const h=c.get(p.source)??[];h.push(p),c.set(p.source,h)}const u=new Map,d=new Map;u.set(at,0),d.set(at,i);const f=[at];for(;f.length;){const p=f.shift(),h=n.get(p);if(!h)continue;const g=u.get(p)??0,m=d.get(p)??i,v=c.get(p)??[];v.sort((b,C)=>{const y=b.sourceHandle??"",x=C.sourceHandle??"",w=E=>E==="yes"?0:E==="no"?1:E.startsWith("c")?2:3;return w(y)-w(x)});for(const b of v){const C=b.target,y=n.get(C);if(!y)continue;const x=u.get(C),w=g+1;if(x!=null&&x<=g||!(x==null||w<x))continue;u.set(C,w);let k=m;if(h.type==="conditional"){const R=b.sourceHandle??"",_=R==="yes"?m-vd:R==="no"?m+vd:m;if(y.type==="multiChoice"&&(R==="yes"||R==="no")){const V=xd(y),I=Math.max(0,V-2)*Il;k=R==="yes"?_-I:_+I}else k=_}if(h.type==="multiChoice"){const _=(xd(h)-1)/2,V=/^c(\d)$/.exec(b.sourceHandle??""),S=(V?Number(V[1]):1)-1-_;k=m+S*_O}d.set(C,k),f.push(C)}}if(r){d.set(Ue,i);let p=0;for(const[h,g]of u.entries())h!==Ue&&(p=Math.max(p,g));u.set(Ue,p+1)}return e.map(p=>{const h=u.get(p.id),g=d.get(p.id);if(h==null||g==null)return p;const m=a+h*PO;return p.id===Ue?{...p,position:{x:i,y:m}}:{...p,position:{x:g,y:m}}})}function Sd(e){const{nodeId:t,removedHandles:n,nodes:o,edges:r}=e,i=new Map(o.map(b=>[b.id,b])),a=new Map,l=new Map;for(const b of r){const C=a.get(b.source)??[];C.push(b),a.set(b.source,C);const y=l.get(b.target)??[];y.push(b),l.set(b.target,y)}const c=b=>!b.data?.isRedirect,d=r.filter(b=>b.source===t&&n.includes(b.sourceHandle??"")&&c(b)).map(b=>b.target).filter(b=>b&&b!==Ue&&b!==at),f=new Set,p=[...d];for(;p.length;){const b=p.pop();if(b===Ue||b===at||!i.has(b)||f.has(b))continue;f.add(b);const C=a.get(b)??[];for(const y of C)c(y)&&y.target!==Ue&&p.push(y.target)}const h=new Set;let g=!0;for(;g;){g=!1;for(const b of f){if(b===Ue||h.has(b))continue;(l.get(b)??[]).filter(c).filter(x=>!(x.source===t&&n.includes(x.sourceHandle??"")||h.has(x.source))).length===0&&(h.add(b),g=!0)}}if(h.size===0)return{nodes:o,edges:r};const m=o.filter(b=>!h.has(b.id)||b.id===Ue),v=r.filter(b=>!(h.has(b.source)||h.has(b.target)));return{nodes:m,edges:v}}function IO(e,t){const n=e.icons,o=e.aliases||Object.create(null),r=Object.create(null);function i(a){if(n[a])return r[a]=[];if(!(a in r)){r[a]=null;const l=o[a]&&o[a].parent,c=l&&i(l);c&&(r[a]=[l].concat(c))}return r[a]}return Object.keys(n).concat(Object.keys(o)).forEach(i),r}const om=Object.freeze({left:0,top:0,width:16,height:16}),Pi=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ml=Object.freeze({...om,...Pi}),_a=Object.freeze({...Ml,body:"",hidden:!1});function MO(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function Ed(e,t){const n=MO(e,t);for(const o in _a)o in Pi?o in e&&!(o in n)&&(n[o]=Pi[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function $O(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function a(l){i=Ed(o[l]||r[l],i)}return a(t),n.forEach(a),Ed(e,i)}function rm(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=IO(e);for(const r in o){const i=o[r];i&&(t(r,$O(e,r,i)),n.push(r))}return n}const AO={provider:"",aliases:{},not_found:{},...om};function Qs(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function im(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Qs(e,AO))return null;const n=t.icons;for(const r in n){const i=n[r];if(!r||typeof i.body!="string"||!Qs(i,_a))return null}const o=t.aliases||Object.create(null);for(const r in o){const i=o[r],a=i.parent;if(!r||typeof a!="string"||!n[a]&&!o[a]||!Qs(i,_a))return null}return t}const Cd=Object.create(null);function DO(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function fo(e,t){const n=Cd[e]||(Cd[e]=Object.create(null));return n[t]||(n[t]=DO(e,t))}function sm(e,t){return im(t)?rm(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function jO(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}const am=/^[a-z0-9]+(-[a-z0-9]+)*$/,vs=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const l=r.pop(),c=r.pop(),u={provider:r.length>0?r[0]:o,prefix:c,name:l};return t&&!ni(u)?null:u}const i=r[0],a=i.split("-");if(a.length>1){const l={provider:o,prefix:a.shift(),name:a.join("-")};return t&&!ni(l)?null:l}if(n&&o===""){const l={provider:o,prefix:"",name:i};return t&&!ni(l,n)?null:l}return null},ni=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;let cr=!1;function lm(e){return typeof e=="boolean"&&(cr=e),cr}function Td(e){const t=typeof e=="string"?vs(e,!0,cr):e;if(t){const n=fo(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function LO(e,t){const n=vs(e,!0,cr);if(!n)return!1;const o=fo(n.provider,n.prefix);return t?jO(o,n.name,t):(o.missing.add(n.name),!0)}function FO(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),cr&&!t&&!e.prefix){let r=!1;return im(e)&&(e.prefix="",rm(e,(i,a)=>{LO(i,a)&&(r=!0)})),r}const n=e.prefix;if(!ni({prefix:n,name:"a"}))return!1;const o=fo(t,n);return!!sm(o,e)}const cm=Object.freeze({width:null,height:null}),um=Object.freeze({...cm,...Pi}),BO=/(-?[0-9.]*[0-9]+[0-9.]*)/g,zO=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Nd(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(BO);if(o===null||!o.length)return e;const r=[];let i=o.shift(),a=zO.test(i);for(;;){if(a){const l=parseFloat(i);isNaN(l)?r.push(i):r.push(Math.ceil(l*t*n)/n)}else r.push(i);if(i=o.shift(),i===void 0)return r.join("");a=!a}}function VO(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const r=e.indexOf(">",o),i=e.indexOf("</"+t);if(r===-1||i===-1)break;const a=e.indexOf(">",i);if(a===-1)break;n+=e.slice(r+1,i).trim(),e=e.slice(0,o).trim()+e.slice(a+1)}return{defs:n,content:e}}function HO(e,t){return e?"<defs>"+e+"</defs>"+t:t}function WO(e,t,n){const o=VO(e);return HO(o.defs,t+o.content+n)}const UO=e=>e==="unset"||e==="undefined"||e==="none";function qO(e,t){const n={...Ml,...e},o={...um,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(m=>{const v=[],b=m.hFlip,C=m.vFlip;let y=m.rotate;b?C?y+=2:(v.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),v.push("scale(-1 1)"),r.top=r.left=0):C&&(v.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),v.push("scale(1 -1)"),r.top=r.left=0);let x;switch(y<0&&(y-=Math.floor(y/4)*4),y=y%4,y){case 1:x=r.height/2+r.top,v.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:v.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:x=r.width/2+r.left,v.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}y%2===1&&(r.left!==r.top&&(x=r.left,r.left=r.top,r.top=x),r.width!==r.height&&(x=r.width,r.width=r.height,r.height=x)),v.length&&(i=WO(i,'<g transform="'+v.join(" ")+'">',"</g>"))});const a=o.width,l=o.height,c=r.width,u=r.height;let d,f;a===null?(f=l===null?"1em":l==="auto"?u:l,d=Nd(f,c/u)):(d=a==="auto"?c:a,f=l===null?Nd(d,u/c):l==="auto"?u:l);const p={},h=(m,v)=>{UO(v)||(p[m]=v.toString())};h("width",d),h("height",f);const g=[r.left,r.top,c,u];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:i}}const YO=/\sid="(\S+)"/g,GO="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let KO=0;function XO(e,t=GO){const n=[];let o;for(;o=YO.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const a=typeof t=="function"?t(i):t+(KO++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const Ia=Object.create(null);function ZO(e,t){Ia[e]=t}function Ma(e){return Ia[e]||Ia[""]}function $l(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Al=Object.create(null),Ro=["https://api.simplesvg.com","https://api.unisvg.com"],oi=[];for(;Ro.length>0;)Ro.length===1||Math.random()>.5?oi.push(Ro.shift()):oi.push(Ro.pop());Al[""]=$l({resources:["https://api.iconify.design"].concat(oi)});function QO(e,t){const n=$l(t);return n===null?!1:(Al[e]=n,!0)}function Dl(e){return Al[e]}const JO=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let kd=JO();function eP(e,t){const n=Dl(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let r=0;n.resources.forEach(a=>{r=Math.max(r,a.length)});const i=t+".json?icons=";o=n.maxURL-r-n.path.length-i.length}return o}function tP(e){return e===404}const nP=(e,t,n)=>{const o=[],r=eP(e,t),i="icons";let a={type:i,provider:e,prefix:t,icons:[]},l=0;return n.forEach((c,u)=>{l+=c.length+1,l>=r&&u>0&&(o.push(a),a={type:i,provider:e,prefix:t,icons:[]},l=c.length),a.icons.push(c)}),o.push(a),o};function oP(e){if(typeof e=="string"){const t=Dl(e);if(t)return t.path}return"/"}const rP=(e,t,n)=>{if(!kd){n("abort",424);return}let o=oP(t.provider);switch(t.type){case"icons":{const i=t.prefix,l=t.icons.join(","),c=new URLSearchParams({icons:l});o+=i+".json?"+c.toString();break}case"custom":{const i=t.uri;o+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let r=503;kd(e+o).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{n(tP(a)?"abort":"next",a)});return}return r=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",r)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",r)})},iP={prepare:nP,send:rP};function dm(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}function sP(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(i=>{const a=i.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==r)return!0;const u=c.name;if(e.icons[u])a.loaded.push({provider:o,prefix:r,name:u});else if(e.missing.has(u))a.missing.push({provider:o,prefix:r,name:u});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||dm([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let aP=0;function lP(e,t,n){const o=aP++,r=dm.bind(null,n,o);if(!t.pending.length)return r;const i={id:o,icons:t,callback:e,abort:r};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),r}function cP(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,i)=>r.provider!==i.provider?r.provider.localeCompare(i.provider):r.prefix!==i.prefix?r.prefix.localeCompare(i.prefix):r.name.localeCompare(i.name));let o={provider:"",prefix:"",name:""};return e.forEach(r=>{if(o.name===r.name&&o.prefix===r.prefix&&o.provider===r.provider)return;o=r;const i=r.provider,a=r.prefix,l=r.name,c=n[i]||(n[i]=Object.create(null)),u=c[a]||(c[a]=fo(i,a));let d;l in u.icons?d=t.loaded:a===""||u.missing.has(l)?d=t.missing:d=t.pending;const f={provider:i,prefix:a,name:l};d.push(f)}),t}function uP(e,t=!0,n=!1){const o=[];return e.forEach(r=>{const i=typeof r=="string"?vs(r,t,n):r;i&&o.push(i)}),o}const dP={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function fP(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let a;if(e.random){let E=e.resources.slice(0);for(a=[];E.length>1;){const k=Math.floor(Math.random()*E.length);a.push(E[k]),E=E.slice(0,k).concat(E.slice(k+1))}a=a.concat(E)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c="pending",u=0,d,f=null,p=[],h=[];typeof o=="function"&&h.push(o);function g(){f&&(clearTimeout(f),f=null)}function m(){c==="pending"&&(c="aborted"),g(),p.forEach(E=>{E.status==="pending"&&(E.status="aborted")}),p=[]}function v(E,k){k&&(h=[]),typeof E=="function"&&h.push(E)}function b(){return{startTime:l,payload:t,status:c,queriesSent:u,queriesPending:p.length,subscribe:v,abort:m}}function C(){c="failed",h.forEach(E=>{E(void 0,d)})}function y(){p.forEach(E=>{E.status==="pending"&&(E.status="aborted")}),p=[]}function x(E,k,R){const _=k!=="success";switch(p=p.filter(V=>V!==E),c){case"pending":break;case"failed":if(_||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){d=R,C();return}if(_){d=R,p.length||(a.length?w():C());return}if(g(),y(),!e.random){const V=e.resources.indexOf(E.resource);V!==-1&&V!==e.index&&(e.index=V)}c="completed",h.forEach(V=>{V(R)})}function w(){if(c!=="pending")return;g();const E=a.shift();if(E===void 0){if(p.length){f=setTimeout(()=>{g(),c==="pending"&&(y(),C())},e.timeout);return}C();return}const k={status:"pending",resource:E,callback:(R,_)=>{x(k,R,_)}};p.push(k),u++,f=setTimeout(w,e.rotate),n(E,t,k.callback)}return setTimeout(w),b}function fm(e){const t={...dP,...e};let n=[];function o(){n=n.filter(l=>l().status==="pending")}function r(l,c,u){const d=fP(t,l,c,(f,p)=>{o(),u&&u(f,p)});return n.push(d),d}function i(l){return n.find(c=>l(c))||null}return{query:r,find:i,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:o}}function Od(){}const Js=Object.create(null);function pP(e){if(!Js[e]){const t=Dl(e);if(!t)return;const n=fm(t),o={config:t,redundancy:n};Js[e]=o}return Js[e]}function hP(e,t,n){let o,r;if(typeof e=="string"){const i=Ma(e);if(!i)return n(void 0,424),Od;r=i.send;const a=pP(e);a&&(o=a.redundancy)}else{const i=$l(e);if(i){o=fm(i);const a=e.resources?e.resources[0]:"",l=Ma(a);l&&(r=l.send)}}return!o||!r?(n(void 0,424),Od):o.query(t,r,n)().abort}function Pd(){}function mP(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,sP(e)}))}function gP(e){const t=[],n=[];return e.forEach(o=>{(o.match(am)?t:n).push(o)}),{valid:t,invalid:n}}function _o(e,t,n){function o(){const r=e.pendingIcons;t.forEach(i=>{r&&r.delete(i),e.icons[i]||e.missing.add(i)})}if(n&&typeof n=="object")try{if(!sm(e,n).length){o();return}}catch(r){console.error(r)}o(),mP(e)}function Rd(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function yP(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;const i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Rd(e.loadIcons(r,o,n),d=>{_o(e,r,d)});return}if(i){r.forEach(d=>{const f=i(d,o,n);Rd(f,p=>{const h=p?{prefix:o,icons:{[d]:p}}:null;_o(e,[d],h)})});return}const{valid:a,invalid:l}=gP(r);if(l.length&&_o(e,l,null),!a.length)return;const c=o.match(am)?Ma(n):null;if(!c){_o(e,a,null);return}c.prepare(n,o,a).forEach(d=>{hP(n,d,f=>{_o(e,d.icons,f)})})}))}const bP=(e,t)=>{const n=uP(e,!0,lm()),o=cP(n);if(!o.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(o.loaded,o.missing,o.pending,Pd)}),()=>{c=!1}}const r=Object.create(null),i=[];let a,l;return o.pending.forEach(c=>{const{provider:u,prefix:d}=c;if(d===l&&u===a)return;a=u,l=d,i.push(fo(u,d));const f=r[u]||(r[u]=Object.create(null));f[d]||(f[d]=[])}),o.pending.forEach(c=>{const{provider:u,prefix:d,name:f}=c,p=fo(u,d),h=p.pendingIcons||(p.pendingIcons=new Set);h.has(f)||(h.add(f),r[u][d].push(f))}),i.forEach(c=>{const u=r[c.provider][c.prefix];u.length&&yP(c,u)}),t?lP(t,o,i):Pd};function vP(e,t){const n={...e};for(const o in t){const r=t[o],i=typeof r;o in cm?(r===null||r&&(i==="string"||i==="number"))&&(n[o]=r):i===typeof n[o]&&(n[o]=o==="rotate"?r%4:r)}return n}const xP=/[\s,]+/;function wP(e,t){t.split(xP).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function SP(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/r,i%1===0?o(i):0)}}return t}function EP(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function CP(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function TP(e){return"data:image/svg+xml,"+CP(e)}function NP(e){return'url("'+TP(e)+'")'}let qo;function kP(){try{qo=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{qo=null}}function OP(e){return qo===void 0&&kP(),qo?qo.createHTML(e):e}const pm={...um,inline:!1},PP={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},RP={display:"inline-block"},$a={backgroundColor:"currentColor"},hm={backgroundColor:"transparent"},_d={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Id={WebkitMask:$a,mask:$a,background:hm};for(const e in Id){const t=Id[e];for(const n in _d)t[e+n]=_d[n]}const _P={...pm,inline:!0};function Md(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const IP=(e,t,n)=>{const o=t.inline?_P:pm,r=vP(o,t),i=t.mode||"svg",a={},l=t.style||{},c={...i==="svg"?PP:{}};if(n){const v=vs(n,!1,!0);if(v){const b=["iconify"],C=["provider","prefix"];for(const y of C)v[y]&&b.push("iconify--"+v[y]);c.className=b.join(" ")}}for(let v in t){const b=t[v];if(b!==void 0)switch(v){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":c.ref=b;break;case"className":c[v]=(c[v]?c[v]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":r[v]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&wP(r,b);break;case"color":a.color=b;break;case"rotate":typeof b=="string"?r[v]=SP(b):typeof b=="number"&&(r[v]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete c["aria-hidden"];break;default:o[v]===void 0&&(c[v]=b)}}const u=qO(e,r),d=u.attributes;if(r.inline&&(a.verticalAlign="-0.125em"),i==="svg"){c.style={...a,...l},Object.assign(c,d);let v=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),c.dangerouslySetInnerHTML={__html:OP(XO(u.body,b?()=>b+"ID"+v++:"iconifyReact"))},F.createElement("svg",c)}const{body:f,width:p,height:h}=e,g=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),m=EP(f,{...d,width:p+"",height:h+""});return c.style={...a,"--svg":NP(m),width:Md(d.width),height:Md(d.height),...RP,...g?$a:hm,...l},F.createElement("span",c)};lm(!0);ZO("",iP);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!FO(o))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const o="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;QO(n,r)||console.error(o)}catch{console.error(o)}}}}function mm(e){const[t,n]=F.useState(!!e.ssr),[o,r]=F.useState({});function i(h){if(h){const g=e.icon;if(typeof g=="object")return{name:"",data:g};const m=Td(g);if(m)return{name:g,data:m}}return{name:""}}const[a,l]=F.useState(i(!!e.ssr));function c(){const h=o.callback;h&&(h(),r({}))}function u(h){if(JSON.stringify(a)!==JSON.stringify(h))return c(),l(h),!0}function d(){var h;const g=e.icon;if(typeof g=="object"){u({name:"",data:g});return}const m=Td(g);if(u({name:g,data:m}))if(m===void 0){const v=bP([g],d);r({callback:v})}else m&&((h=e.onLoad)===null||h===void 0||h.call(e,g))}F.useEffect(()=>(n(!0),c),[]),F.useEffect(()=>{t&&d()},[e.icon,t]);const{name:f,data:p}=a;return p?IP({...Ml,...p},e,f):e.children?e.children:e.fallback?e.fallback:F.createElement("span",{})}const MP=F.forwardRef((e,t)=>mm({...e,_ref:t}));F.forwardRef((e,t)=>mm({inline:!0,...e,_ref:t}));const jl=F.forwardRef(({icon:e,width:t=20,sx:n,...o},r)=>T.jsx(Er,{ref:r,component:MP,className:"component-iconify",icon:e,sx:{width:t,height:t,...n},...o}));jl.displayName="Iconify";function Cr({title:e,icon:t,children:n}){return T.jsx(Er,{width:"150px",sx:{borderRadius:"3px",backgroundColor:"white",border:"1px solid #646464",boxShadow:"0 0 6px 2px rgba(0, 0, 0, 0.08)"},children:T.jsxs(mt,{children:[T.jsxs(mt,{direction:"row",spacing:1,sx:{p:.5,alignItems:"center"},children:[T.jsx(jl,{icon:t,width:20,sx:{color:"rgba(0, 167, 111, 0.7)"}}),T.jsx(tt,{variant:"caption",sx:{color:"#646464"},children:e})]}),n?T.jsxs(T.Fragment,{children:[T.jsx(sn,{}),n]}):null]})})}function $P(e){if(typeof e!="string")return null;const t=e.trim();return t||null}function AP(e){if(!e||typeof e!="object"||Array.isArray(e))return[];const t=e,n=[],o=new Set;for(const i of["field1","field2","field3","subject","body"])i in t&&(n.push(i),o.add(i));for(const i of Object.keys(t))o.has(i)||n.push(i);const r=[];for(const i of n){const a=$P(t[i]);if(a&&(r.push(a),r.length===3))break}return r}function Tr({nodeLabel:e,nodeMetaData:t}){const n=e?.trim()??"",o=!!n,r=AP(t);return T.jsxs(Er,{children:[T.jsx(tt,{variant:"caption",textAlign:"center",py:.5,sx:{color:o?"#646464":"#f36",fontSize:"8px",fontWeight:600},children:o?n:"Action required"}),r.map((i,a)=>T.jsx(tt,{variant:"caption",textAlign:"center",sx:{color:"#646464",fontSize:"8px",opacity:.85,lineHeight:"10px"},children:i},a))]})}function DP({data:e}){return T.jsxs(T.Fragment,{children:[T.jsx(Cr,{title:e.label,icon:e.icon??(e.kind==="start"?go:yo),children:T.jsx(Tr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),T.jsx(gt,{type:"source",position:pe.Bottom,id:"out"})]})}function jP({data:e}){return T.jsxs(T.Fragment,{children:[T.jsx(gt,{type:"target",position:pe.Top,id:"in"}),T.jsx(Cr,{title:e.label,icon:e.icon??(e.kind==="start"?go:yo),children:T.jsx(Tr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})})]})}function LP({data:e}){return T.jsxs(T.Fragment,{children:[T.jsx(gt,{type:"target",position:pe.Top,id:"in"}),T.jsx(Cr,{title:e.label,icon:e.icon??"ph:circle",children:T.jsx(Tr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),T.jsx(gt,{type:"source",position:pe.Bottom,id:"out"})]})}const FP={left:"30%"},BP={left:"70%"},zP={left:"50%"};function VP({data:e}){const t=e.kind==="abTest",n=e.nodeMetaData&&typeof e.nodeMetaData=="object"&&!Array.isArray(e.nodeMetaData)?e.nodeMetaData:{},r=e.kind==="waitForEvent"?n.hasTimeDependency!==!1:!0;return T.jsxs(T.Fragment,{children:[T.jsx(gt,{type:"target",position:pe.Top,id:"in"}),T.jsx(Cr,{title:e.label,icon:e.icon??"tabler:arrow-fork",children:T.jsx(Tr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),T.jsx(gt,{type:"source",position:pe.Bottom,id:"yes",style:r?FP:zP}),r&&T.jsx(gt,{type:"source",position:pe.Bottom,id:"no",style:BP}),T.jsxs("div",{style:{position:"absolute",width:150,left:0,top:"100%",marginTop:2,display:"flex",justifyContent:r?"space-between":"center",fontSize:9,color:"#4f4f4f",pointerEvents:"none"},children:[T.jsx("span",{style:{transform:r?"translateX(-6px)":void 0},children:t?"A":"Yes"}),r&&T.jsx("span",{style:{transform:"translateX(6px)"},children:t?"B":"No"})]})]})}function HP({data:e}){const t=Math.min(5,Math.max(2,Number(e.nodeMetaData?.choiceCount)||bo));return T.jsxs(T.Fragment,{children:[T.jsx(gt,{type:"target",position:pe.Top,id:"in"}),T.jsx(Cr,{title:e.label,icon:e.icon??"tabler:list-numbers",children:T.jsx(Tr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),Array.from({length:t}).map((n,o)=>{const r=o+1,i=(o+1)/(t+1)*100;return T.jsx(gt,{type:"source",position:pe.Bottom,id:`c${r}`,style:{left:`${i}%`}},r)}),T.jsx("div",{style:{position:"absolute",width:150,left:0,top:"100%",marginTop:2,display:"flex",justifyContent:"space-between",fontSize:9,color:"#4f4f4f",pointerEvents:"none"},children:Array.from({length:t}).map((n,o)=>T.jsx("span",{style:{width:`${100/t}%`,textAlign:"center"},children:o+1},o))})]})}function WP(e){if(e.length<2)return"";const[t,...n]=e;return`M ${t.x} ${t.y} `+n.map(o=>`L ${o.x} ${o.y}`).join(" ")}function UP(e){let t=0;for(let n=1;n<e.length;n++){const o=e[n].x-e[n-1].x,r=e[n].y-e[n-1].y;t+=Math.hypot(o,r)}return t}function qP(e){if(e.length===0)return{x:0,y:0};if(e.length===1)return e[0];const n=UP(e)/2;let o=0;for(let r=1;r<e.length;r++){const i=e[r-1],a=e[r],l=Math.hypot(a.x-i.x,a.y-i.y);if(o+l>=n){const c=l===0?0:(n-o)/l;return{x:i.x+(a.x-i.x)*c,y:i.y+(a.y-i.y)*c}}o+=l}return e[e.length-1]}const YP={width:22,height:22,background:"rgba(0, 167, 111, 0.7)",border:"1px solid rgba(2, 107, 72, 0.7)",cursor:"pointer",borderRadius:"50%",fontSize:12,lineHeight:1,color:"white",fontWeight:600,boxShadow:"0 0 6px 2px rgba(0, 0, 0, 0.08)",padding:0,display:"flex",alignItems:"center",justifyContent:"center"},GP={position:"absolute",background:"transparent",padding:10,color:"#4f4f4f",fontSize:9,fontWeight:500};function KP(e){const{id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:a,targetPosition:l,markerEnd:c,data:u}=e,d=e.sourceHandleId,f=Vw(),p=u?._onPlusClick,h=!!u?.isRedirect,g=i<o-5,[m,v,b]=Ka({sourceX:n,sourceY:o,sourcePosition:a,targetX:r,targetY:i,targetPosition:l}),C=150,y=f.length===0?Math.min(n,r):Math.min(...f.map(j=>j.position.x)),x=f.length===0?Math.max(n,r):Math.max(...f.map(j=>j.position.x+C)),w=140,E=Math.min(y-w,n-w,r-w),k=Math.max(x+w,n+w,r+w),R=h&&d==="yes",_=h&&d==="no",V=R?E:k,I=30,S=[{x:n,y:o},{x:V,y:o},{x:V,y:i-I},{x:r,y:i-I},{x:r,y:i}],A=WP(S),N=qP(S),O=g?A:m,P=g?N.x:v,L=g?N.y:b,M=u?.kind==="yes"?"Yes":u?.kind==="no"?"No":u?.kind==="branch"&&u?.branch?String(u.branch):"";return T.jsxs(T.Fragment,{children:[T.jsx(gr,{id:t,path:O,markerEnd:c,style:{strokeWidth:2,stroke:"#646464",strokeDasharray:h?"6 4":void 0}}),T.jsxs(Fw,{children:[!!M&&T.jsx("div",{style:{...GP,transform:`translate(-50%, 0%) translate(${n}px,${o-10}px)`},className:"nodrag nopan",children:M}),T.jsx("div",{style:{position:"absolute",transform:`translate(-50%, -50%) translate(${P}px,${L}px)`,pointerEvents:"all"},className:"nodrag nopan",children:T.jsx("button",{type:"button",onClick:()=>p?.(t),style:YP,title:"Edge actions",children:"+"})})]})]})}function XP({menu:e,onClose:t,definitions:n,onChooseKind:o,redirectCandidates:r,onChooseRedirectTarget:i,onSwitchMode:a}){const l=F.useMemo(()=>nm(n),[n]),c=F.useCallback(()=>{const f=[],p=(h,g,m)=>{f.push(T.jsx(tt,{variant:"body1",sx:{fontWeight:600,textAlign:"center",px:2,pt:f.length?2:1},children:h},`${m}-t`)),f.push(T.jsx(sn,{},`${m}-d`));for(const v of g){const b=v.enabled===!1;f.push(T.jsxs(Nt,{disabled:b,onClick:()=>o(e.edgeId,v.kind),sx:b?{opacity:.5}:void 0,children:[T.jsx(Vh,{children:T.jsx(jl,{icon:v.icon,width:28,sx:{color:"#646464"}})}),T.jsx(Fo,{children:v.title})]},`${m}-${v.kind}`))}};return p("Send Message",l["Send Message"],"sm"),p("Update",l.Update,"up"),p("Action",l.Action,"ac"),p("Event",l.Event,"ev"),f.push(T.jsx(sn,{},"redir-d")),f.push(T.jsx(Nt,{onClick:()=>a("redirect",!1),children:T.jsx(Fo,{primary:"Redirect to…"})},"redir")),f},[l,e,o,a]),u=F.useCallback(()=>[T.jsx(Ci,{disableSticky:!0,sx:{fontWeight:700,lineHeight:"32px"},children:e?.relinkSolid?"Relink solid edge to…":"Redirect to…"},"rs"),...r.map(f=>T.jsx(Nt,{onClick:()=>i(e.edgeId,f.id,!e?.relinkSolid),children:T.jsx(Fo,{primary:f.label,secondary:f.nodeLabel?.trim()?f.nodeLabel:`id: ${f.id}`})},`rc-${f.id}`)),T.jsx(sn,{},"rd1"),T.jsx(Nt,{onClick:()=>a("choose",!1),children:T.jsx(Fo,{primary:"Back"})},"back")],[e,r,i,a]),d=F.useMemo(()=>e?e.mode==="choose"?c():u():[],[e,c,u]);return T.jsx(Pl,{open:!!e,onClose:t,anchorReference:"anchorPosition",anchorPosition:e?.anchorPosition??{top:0,left:0},MenuListProps:{dense:!0},children:d})}function ZP({open:e,onClose:t,selectedNode:n,selectedDefinition:o,nodeLabel:r,setNodeLabel:i,nodeMetaData:a,setNodeMetaData:l,onSave:c}){const u=o?.drawerFormComponent,d=typeof u=="function"?u:jt;return T.jsxs(jh,{anchor:"right",open:e,onClose:t,PaperProps:{sx:{width:550,p:2}},children:[T.jsx(tt,{variant:"h6",sx:{mb:.5},children:"Node metadata"}),T.jsxs(tt,{sx:{fontSize:12,opacity:.75,mb:2},children:["Type: ",T.jsx("b",{children:n?.data?.label??"—"}),n?` • id: ${n.id}`:""]}),T.jsxs(mt,{spacing:2,children:[n?T.jsx(d,{node:n,nodeLabel:r,setNodeLabel:i,nodeMetaData:a,setNodeMetaData:l}):T.jsx(tt,{sx:{fontSize:13,opacity:.7},children:"No node selected."}),T.jsx(sn,{}),T.jsxs(mt,{direction:"row",spacing:1,children:[T.jsx(Qn,{variant:"outlined",onClick:t,fullWidth:!0,children:"Cancel"}),T.jsx(Qn,{variant:"contained",onClick:c,fullWidth:!0,children:"Save"})]})]})]})}const QP={start:DP,end:jP,conditional:VP,action:LP,multiChoice:HP},JP={plusEdge:KP};function vn(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function Hn(e){const t=vn(e);return Math.min(5,Math.max(2,Number(t.choiceCount)||bo))}function Aa(e){return vn(e).hasTimeDependency!==!1}function gm(e){return e.type==="conditional"&&e.data.kind==="waitForEvent"&&!Aa(e.data.nodeMetaData)}function eR(e){if(e==="yes"||e==="no")return e;const t=/^c(\d+)$/.exec(e??"");return t?t[1]:"child"}function tR(e,t){if(typeof t=="string"&&t.length>0)return t;if(e==="start"||e==="action")return"out"}function nR(e){return e==="start"||e==="end"||e==="action"||e==="conditional"||e==="multiChoice"}function Da(e,t){return`${e}::${t}`}function oR(e){if(e.type==="start"||e.type==="action")return[{sourceHandle:"out",kind:"default"}];if(e.type==="conditional")return gm(e)?[{sourceHandle:"yes",kind:"yes"}]:[{sourceHandle:"yes",kind:"yes"},{sourceHandle:"no",kind:"no"}];if(e.type==="multiChoice"){const t=Hn(e.data.nodeMetaData);return Array.from({length:t},(n,o)=>({sourceHandle:`c${o+1}`,kind:"branch",branch:o+1}))}return[]}function $d(e,t){const n=new Map(e.map(i=>[i.id,i.type])),o=new Set(e.map(i=>i.id)),r=new Set;for(const i of t){const a=n.get(i.source);if(!a||!nR(a)||!o.has(i.target))continue;const l=tR(a,i.sourceHandle);l&&r.add(Da(i.source,l))}return r}function rR(e){if(!e||typeof e!="object"||Array.isArray(e))return{};const t={};for(const[n,o]of Object.entries(e))typeof o!="string"||!o||(t[n]=o);return t}function iR(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}function sR(e){if(!e||typeof e!="object"||Array.isArray(e))return;const{x:t,y:n,zoom:o}=e;if(!(typeof t!="number"||typeof n!="number"||typeof o!="number"))return{x:t,y:n,zoom:o}}function aR(e){return e.map(t=>{if(!t.data)return t;const{_onPlusClick:n,...o}=t.data;return{...t,data:o}})}function lR(e){const t=Array.isArray(e?.nodes),n=Array.isArray(e?.edges);return{nodes:t?e?.nodes:kO,edges:n?aR(e?.edges):OO,viewport:sR(e?.viewport)}}function cR({nodeDefinitions:e=vo,initialFlow:t,onExportJson:n,onCancel:o}){const r=F.useRef(lR(t)),i=!!r.current.viewport,a=Bi(),l=Bw(),c=qw(),u=F.useMemo(()=>bs(e),[e]),[d,f]=Hw(r.current.nodes),[p,h,g]=Ww(r.current.edges),m=F.useRef(p);F.useEffect(()=>{m.current=p},[p]);const[v,b]=F.useState(null),C=F.useRef(!1),y=F.useRef(!1),[x,w]=F.useState(!1),[E,k]=F.useState(null),[R,_]=F.useState(""),[V,I]=F.useState({}),S=F.useRef(null),A=F.useCallback(G=>d.find(X=>X.id===G),[d]),N=F.useCallback((G,X)=>p.filter(te=>te.source===G&&(X==null?!0:(te.sourceHandle??null)===(X??null))).length,[p]),O=F.useCallback(G=>{if(C.current){y.current=!0;return}const X=a.getNodes(),te=a.getEdges(),re=wd(X,te);f(re),G?.fit&&requestAnimationFrame(()=>a.fitView({duration:300,padding:.35}))},[a,f]);F.useEffect(()=>{if(!c)return;const G=setTimeout(()=>O({fit:!i}),30);return()=>clearTimeout(G)},[c,O,i]),F.useEffect(()=>{if(!c)return;const G=r.current.viewport;if(!G)return;const X=setTimeout(()=>{a.setViewport(G)},60);return()=>clearTimeout(X)},[c,a]),F.useEffect(()=>{f(G=>{const X=new Set(G.map(ie=>ie.id)),te=new Map,re=new Map;for(const ie of p){if(!X.has(ie.source)||!X.has(ie.target))continue;const ye=eR(ie.sourceHandle),de=re.get(ie.source)??{};de[ye]=ie.target,re.set(ie.source,de),te.has(ie.target)||te.set(ie.target,ie.source)}let oe=!1;const ue=G.map(ie=>{const ye=te.get(ie.id),de=re.get(ie.id)??{},ce=rR(ie.data.childNodeIds),we=ie.data.parentNodeId===ye,Je=iR(ce,de);return we&&Je?ie:(oe=!0,{...ie,data:{...ie.data,parentNodeId:ye,childNodeIds:Object.keys(de).length>0?de:void 0}})});return oe?ue:G})},[p,f]),F.useEffect(()=>{f(G=>G.map(X=>{const te=X.data.kind??(X.id===at?"start":X.id===Ue?"end":void 0),re=te?u.get(te):void 0,oe=vn(X.data.nodeMetaData),ue=vn(re?.createInitialNodeMetaData?.()??{}),ie=re?{...ue,...oe}:oe,ye={...X.data,nodeMetaData:ie};if(X.id===at||X.id===Ue)return{...X,data:{...X.data,nodeMetaData:ie,label:re?.title??X.data.label??(X.id===at?"Entry":"Exit"),icon:re?.icon??X.data.icon??(X.id===at?go:yo)}};if(re&&!X.data.icon)return{...X,data:{...ye,icon:re.icon,label:X.data.label??re.title}};if(X.type==="multiChoice"){const de=Hn(ie);return{...X,data:{...ye,nodeMetaData:{...ie,choiceCount:de}}}}return{...X,data:ye}}))},[u,f]),F.useEffect(()=>{const G=S.current;if(!G)return;const X=d.find(oe=>oe.id===G.nodeId);if(!X||X.type!=="multiChoice"){S.current=null;return}const te=Hn(X.data.nodeMetaData);if(te!==G.nextCount)return;l(G.nodeId);const re=requestAnimationFrame(()=>{requestAnimationFrame(()=>{let oe=d,ue=p;const ie=[];for(let ye=te+1;ye<=5;ye++)ie.push(`c${ye}`);if(ie.length>0){const ye=Sd({nodeId:G.nodeId,removedHandles:ie,nodes:oe,edges:ue});oe=ye.nodes,ue=ye.edges}ue=ue.filter(ye=>{if(ye.source!==G.nodeId)return!0;const de=ye.sourceHandle??"",ce=/^c(\d)$/.exec(de);return ce?Number(ce[1])<=te:!0});for(let ye=1;ye<=te;ye++){const de=`c${ye}`;ue.some(we=>we.source===G.nodeId&&(we.sourceHandle??"")===de)||(ue=[...ue,{id:`e-${G.nodeId}-${de}-${Ue}`,type:"plusEdge",source:G.nodeId,sourceHandle:de,target:Ue,targetHandle:"in",data:{kind:"branch",branch:ye,isRedirect:!1}}])}f(oe),h(ue),S.current=null,setTimeout(()=>O(),0)})});return()=>cancelAnimationFrame(re)},[d,p,f,h,O,l]),F.useEffect(()=>{if(!d.some(te=>te.id===Ue))return;const G=$d(d,p),X=[];for(const te of d)if(te.id!==Ue)for(const re of oR(te)){const oe=Da(te.id,re.sourceHandle);G.has(oe)||(X.push({id:`e-${te.id}-${re.sourceHandle}-${Ue}`,type:"plusEdge",source:te.id,sourceHandle:re.sourceHandle,target:Ue,targetHandle:"in",data:{kind:re.kind,branch:re.branch,isRedirect:!1}}),G.add(oe))}X.length!==0&&(h(te=>{const re=$d(d,te),oe=new Set(te.map(ie=>ie.id)),ue=[];for(const ie of X){const ye=ie.sourceHandle??"out",de=Da(ie.source,ye);if(re.has(de))continue;let ce=ie.id;oe.has(ce)&&(ce=`${ce}-${crypto.randomUUID().slice(0,8)}`),ue.push({...ie,id:ce}),re.add(de),oe.add(ce)}return ue.length>0?[...te,...ue]:te}),queueMicrotask(()=>O()))},[O,p,d,h]);const P=F.useCallback(()=>({version:2,nodes:d,edges:p.map(G=>{const{_onPlusClick:X,...te}=G.data??{};return{...G,data:te}}),viewport:a.getViewport()}),[d,p,a]),L=F.useCallback(()=>{const G=P();if(n){n(G);return}const X=JSON.stringify(G,null,2);console.log(X),navigator.clipboard?.writeText(X).catch(()=>{}),alert("Export copied to clipboard (and logged to console).")},[P,n]),M=F.useCallback(()=>{b(null),w(!1),o?.()},[o]),j=F.useCallback(G=>{if(!G.source||!G.target)return!1;const X=A(G.source),te=A(G.target);if(!X||!te||te.type==="start"||X.type==="end"||X.type==="start"&&N(X.id)>=1)return!1;if(X.type==="conditional"){const re=G.sourceHandle,oe=!gm(X);if(re!=="yes"&&(re!=="no"||!oe)||N(X.id,re)>=1)return!1}if(X.type==="action"&&((G.sourceHandle??"out")!=="out"||N(X.id,"out")>=1))return!1;if(X.type==="multiChoice"){const re=G.sourceHandle??"";if(!/^c[1-5]$/.test(re)||N(X.id,re)>=1)return!1}return!0},[A,N]),$=F.useCallback(G=>{const X=p.find(ie=>ie.id===G);if(!X)return;const te=a.getNode(X.source),re=a.getNode(X.target);if(!te||!re)return;const oe={x:(te.position.x+re.position.x)/2,y:(te.position.y+re.position.y)/2},ue=a.flowToScreenPosition(oe);b({edgeId:G,mode:"choose",relinkSolid:!1,anchorPosition:{top:ue.y,left:ue.x}})},[p,a]),B=F.useCallback((G,X)=>{const te=p.find(me=>me.id===G);if(!te)return;const re=a.getNode(te.source),oe=a.getNode(te.target);if(!re||!oe)return;const ue=u.get(X);if(!ue||!("nodeType"in ue))return;const ie=ue.nodeType,ye=(re.position.x+oe.position.x)/2,de=(re.position.y+oe.position.y)/2,ce=crypto.randomUUID(),we=vn(ue.createInitialNodeMetaData?.()??{}),Je=ie==="multiChoice"?{...we,choiceCount:Hn(we)}:we,Ke={id:ce,type:ie,position:{x:ye,y:de-40},data:{label:ue.title,nodeLabel:"",kind:X,icon:ue.icon,nodeMetaData:Je}};f(me=>[...me,Ke]),h(me=>{const ke=me.find(ft=>ft.id===G);if(!ke)return me;const ve=me.filter(ft=>ft.id!==G),Xe={id:`e-${ke.source}-${ke.sourceHandle??"out"}-${ce}`,type:"plusEdge",source:ke.source,sourceHandle:ke.sourceHandle,target:ce,targetHandle:"in",data:{kind:ke.data?.kind??"default",isRedirect:!1,branch:ke.data?.branch}};if(ie==="action"){const ft={id:`e-${ce}-out-${ke.target}`,type:"plusEdge",source:ce,sourceHandle:"out",target:ke.target,targetHandle:ke.targetHandle??"in",data:{kind:"default",isRedirect:!1}};return[...ve,Xe,ft]}if(ie==="conditional"){const ft={id:`e-${ce}-yes-${ke.target}`,type:"plusEdge",source:ce,sourceHandle:"yes",target:ke.target,targetHandle:ke.targetHandle??"in",data:{kind:"yes",isRedirect:!1}},he={id:`e-${ce}-no-${ke.target}`,type:"plusEdge",source:ce,sourceHandle:"no",target:ke.target,targetHandle:ke.targetHandle??"in",data:{kind:"no",isRedirect:!1}};return[...ve,Xe,ft,he]}const Et=Math.min(5,Math.max(2,bo)),xo=Array.from({length:Et}).map((ft,he)=>{const Se=he+1;return{id:`e-${ce}-c${Se}-${ke.target}`,type:"plusEdge",source:ce,sourceHandle:`c${Se}`,target:ke.target,targetHandle:ke.targetHandle??"in",data:{kind:"branch",branch:Se,isRedirect:!1}}});return[...ve,Xe,...xo]}),b(null),queueMicrotask(()=>O())},[p,u,a,h,f,O]),H=F.useCallback((G,X,te)=>{const re=A(X);re&&re.type!=="start"&&(h(oe=>oe.map(ue=>{if(ue.id!==G)return ue;const ie=ue.data??{kind:"default"},ye=te.makeRedirect&&!ie.isRedirect?ue.target:ie.baseTarget,de=te.makeRedirect&&!ie.isRedirect?ue.targetHandle??"in":ie.baseTargetHandle;return{...ue,target:X,targetHandle:"in",data:{...ie,isRedirect:!!te.makeRedirect,baseTarget:te.makeRedirect?ye:void 0,baseTargetHandle:te.makeRedirect?de:void 0}}})),b(null),queueMicrotask(()=>O()))},[A,h,O]),U=F.useCallback(async G=>{const X=G.nodes??[];if(X.length===0||X.length!==1)return!0;const te=X[0];if(te.type==="start"||te.type==="end")return!1;const re=a.getEdges(),oe=a.getNodes(),ue=oe.find(ve=>ve.id===te.id);if(!ue)return!1;const ie=re.filter(ve=>ve.target===te.id),ye=re.filter(ve=>ve.source===te.id),de=ie.find(ve=>!ve.data?.isRedirect)??ie[0],ce=ve=>ve.find(Xe=>!Xe.data?.isRedirect)??ve[0];let we;if(ue.type==="conditional"){const ve=ye.filter(Xe=>Xe.sourceHandle==="yes");we=ce(ve)??ce(ye)}else if(ue.type==="multiChoice"){const ve=ye.filter(Xe=>Xe.sourceHandle==="c1");we=ce(ve)??ce(ye)}else{const ve=ye.filter(Xe=>(Xe.sourceHandle??"out")==="out");we=ce(ve)??ce(ye)}const Je=re.filter(ve=>ve.source!==te.id&&ve.target!==te.id),Ke=oe.filter(ve=>ve.id!==te.id);let me=Je;if(de&&we&&we.target!==at){const ve={id:`e-${de.source}-${de.sourceHandle??"out"}-${we.target}`,type:"plusEdge",source:de.source,sourceHandle:de.sourceHandle,target:we.target,targetHandle:we.targetHandle??"in",data:{kind:de.data?.kind??"default",isRedirect:!1,branch:de.data?.branch}};me.some(Et=>Et.source===ve.source&&(Et.sourceHandle??null)===(ve.sourceHandle??null)&&Et.target===ve.target)||(me=[...me,ve])}h(me);const ke=wd(Ke,me);return f(ke),!1},[a,h,f]),W=F.useCallback((G,X)=>{const te=G.data,re=te?.kind??(X.sourceHandle==="yes"?"yes":X.sourceHandle==="no"?"no":/^c[1-5]$/.test(X.sourceHandle??"")?"branch":"default"),oe=te?.branch??(()=>{const de=/^c(\d)$/.exec(X.sourceHandle??"");return de?Number(de[1]):void 0})(),ue=!!te?.isRedirect,ie=te?.baseTarget,ye=te?.baseTargetHandle;h(de=>nv(G,X,de).map(ce=>{if(ce.id!==G.id)return{...ce,data:ce.data??{kind:"default"}};const we=ce.data??{kind:re};return{...ce,data:{kind:we.kind??re,branch:we.branch??oe,isRedirect:!0,baseTarget:ue?ie:G.target,baseTargetHandle:ue?ye:G.targetHandle??"in"}}})),queueMicrotask(()=>O())},[h,O]),K=F.useCallback(G=>{f(X=>tl(G,X))},[f]),Q=F.useCallback(G=>{const X=G.filter(re=>{if(re.type!=="remove")return!1;const oe=re.id;return oe?!!m.current.find(ie=>ie.id===oe)?.data?.isRedirect:!1}),te=G.filter(re=>{if(re.type!=="remove")return!0;const oe=re.id;return oe?!m.current.find(ie=>ie.id===oe)?.data?.isRedirect:!0});te.length&&(h(re=>nl(te,re)),g(te));for(const re of X){const oe=re.id,ue=m.current.find(Ke=>Ke.id===oe);if(!ue)continue;const ie=ue.data?.baseTarget??Ue,ye=ue.data?.baseTargetHandle??"in";h(Ke=>Ke.map(me=>me.id===oe?{...me,target:ie,targetHandle:ye,data:{...me.data??{kind:"default"},isRedirect:!1,baseTarget:void 0,baseTargetHandle:void 0}}:me));const de=a.getNode(ue.source),ce=a.getNode(ie),we=de&&ce?{x:(de.position.x+ce.position.x)/2,y:(de.position.y+ce.position.y)/2}:{x:0,y:0},Je=a.flowToScreenPosition(we);b({edgeId:oe,mode:"redirect",relinkSolid:!0,anchorPosition:{top:Je.y,left:Je.x}}),queueMicrotask(()=>O())}},[h,g,a,O]),ee=F.useMemo(()=>p.map(G=>({...G,data:{...G.data??{kind:"default"},_onPlusClick:$}})),[p,$]),q=F.useMemo(()=>d.filter(G=>G.type!=="start").map(G=>({id:G.id,label:G.data?.label??G.id,nodeLabel:G.data?.nodeLabel??""})),[d]),J=F.useCallback((G,X)=>{X.data?.isRedirect&&(G.preventDefault(),G.stopPropagation(),b({edgeId:X.id,mode:"redirect",relinkSolid:!1,anchorPosition:{top:G.clientY,left:G.clientX}}))},[]),Z=F.useCallback((G,X)=>{k(X.id),_(X.data?.nodeLabel??"");const te=vn(X.data.nodeMetaData);I(X.type==="multiChoice"?{...te,choiceCount:Hn(te)}:te),w(!0)},[]),ne=F.useMemo(()=>E?A(E):void 0,[A,E]),z=F.useMemo(()=>{const G=ne?.data?.kind??(ne?.id===at?"start":ne?.id===Ue?"end":void 0);if(G)return u.get(G)},[u,ne]),ae=F.useCallback(()=>{if(!E)return;const G=d.find(ce=>ce.id===E),X=G?.type==="multiChoice",te=G?.type==="conditional"&&G.data.kind==="waitForEvent",re=vn(V),oe=Hn(re),ue=te?Aa(G.data.nodeMetaData):void 0,ie=te?Aa(re):void 0;let ye=d.map(ce=>ce.id===E?{...ce,data:{...ce.data??{label:""},nodeLabel:R,nodeMetaData:ce.type==="multiChoice"?{...re,choiceCount:oe}:re}}:ce),de=p;if(te&&ue&&!ie){const ce=Sd({nodeId:E,removedHandles:["no"],nodes:ye,edges:de});ye=ce.nodes,de=ce.edges.filter(we=>!(we.source===E&&(we.sourceHandle??"")==="no"))}if(te&&!ue&&ie){const ce=de.find(me=>me.source===E&&(me.sourceHandle??"")==="yes"),we=ce?.target??Ue,Je=ce?.targetHandle??"in";let Ke=!1;if(de=de.map(me=>me.source!==E||(me.sourceHandle??"")!=="no"?me:(Ke=!0,{...me,target:we,targetHandle:Je,data:{...me.data??{kind:"no"},kind:"no",isRedirect:!1,baseTarget:void 0,baseTargetHandle:void 0}})),!Ke){const me=new Set(de.map(Xe=>Xe.id)),ke=`e-${E}-no-${we}`,ve=me.has(ke)?`${ke}-${crypto.randomUUID().slice(0,8)}`:ke;de=[...de,{id:ve,type:"plusEdge",source:E,sourceHandle:"no",target:we,targetHandle:Je,data:{kind:"no",isRedirect:!1}}]}}f(ye),h(de),X&&(S.current={nodeId:E,nextCount:oe}),w(!1),queueMicrotask(()=>O())},[E,R,V,d,p,f,h,O]),se=F.useCallback(()=>b(null),[]),fe=F.useCallback(()=>{C.current=!0},[]),xe=F.useCallback(()=>{C.current=!1,y.current&&(y.current=!1,O())},[O]),Ce=F.useCallback((G,X)=>{b(te=>te&&{...te,mode:G,relinkSolid:X??te.relinkSolid})},[]);return T.jsxs(Er,{sx:{width:"100%",height:"88vh",border:"1px solid #ddd",borderRadius:2,position:"relative",overflow:"hidden",bgcolor:"white"},children:[T.jsxs(mt,{direction:"row",spacing:1,sx:{p:1.25,borderBottom:"1px solid #eee",alignItems:"center"},children:[T.jsx(Qn,{variant:"contained",size:"small",onClick:L,children:"Save"}),T.jsx(Qn,{variant:"outlined",size:"small",onClick:M,children:"Cancel / Close"}),T.jsx(Qn,{variant:"outlined",size:"small",onClick:()=>O({fit:!0}),children:"Auto layout"}),T.jsx(tt,{sx:{ml:"auto",fontSize:12,opacity:.75},children:"Redirect edge delete ⇒ restores solid + asks relink"})]}),T.jsx(XP,{menu:v,onClose:se,definitions:e,onChooseKind:(G,X)=>B(G,X),redirectCandidates:q,onChooseRedirectTarget:(G,X,te)=>H(G,X,{makeRedirect:te}),onSwitchMode:Ce}),T.jsxs(jw,{nodes:d,edges:ee,onNodesChange:K,onEdgesChange:Q,nodeTypes:QP,edgeTypes:JP,fitView:!i,isValidConnection:j,onBeforeDelete:U,onReconnect:W,onEdgeClick:J,onNodeClick:Z,onNodeDragStart:fe,onNodeDragStop:xe,defaultEdgeOptions:{markerEnd:{type:Jo.Arrow,width:12,height:12}},children:[T.jsx(rS,{}),T.jsx(Zw,{})]}),T.jsx(ZP,{open:x,onClose:()=>w(!1),selectedNode:ne,selectedDefinition:z,nodeLabel:R,setNodeLabel:_,nodeMetaData:V,setNodeMetaData:I,onSave:ae})]})}function uR({nodeDefinitions:e,extendNodeDefinitions:t=[],initialFlow:n,onExportJson:o,onCancel:r}){const i=F.useMemo(()=>e||tm(vo,t),[e,t]);return T.jsx(vp,{children:T.jsx(cR,{nodeDefinitions:i,initialFlow:n,onExportJson:o,onCancel:r})})}exports.CATEGORIES=TO;exports.DEFAULT_MULTI_CHOICE_COUNT=bo;exports.DEFAULT_NODE_DEFINITIONS=vo;exports.END_ICON=yo;exports.END_ID=Ue;exports.FlowEditor=uR;exports.NODE_DEFINITIONS=CO;exports.START_ICON=go;exports.START_ID=at;exports.createNodeDefinitionMap=bs;exports.groupDefinitions=nm;exports.kindToNodeType=NO;exports.mergeNodeDefinitions=tm;
|
|
156
|
+
`))}return null}),anchorOrigin:s.shape({horizontal:s.oneOfType([s.oneOf(["center","left","right"]),s.number]).isRequired,vertical:s.oneOfType([s.oneOf(["bottom","center","top"]),s.number]).isRequired}),anchorPosition:s.shape({left:s.number.isRequired,top:s.number.isRequired}),anchorReference:s.oneOf(["anchorEl","anchorPosition","none"]),BackdropComponent:s.elementType,BackdropProps:s.object,children:s.node,classes:s.object,className:s.string,container:s.oneOfType([lo,s.func]),disableScrollLock:s.bool,elevation:Tl,marginThreshold:s.number,onClose:s.func,open:s.bool.isRequired,PaperProps:s.shape({component:El}),slotProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),paper:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({backdrop:s.elementType,paper:s.elementType,root:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),transformOrigin:s.shape({horizontal:s.oneOfType([s.oneOf(["center","left","right"]),s.number]).isRequired,vertical:s.oneOfType([s.oneOf(["bottom","center","top"]),s.number]).isRequired}),TransitionComponent:s.elementType,transitionDuration:s.oneOfType([s.oneOf(["auto"]),s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})]),TransitionProps:s.object});function Mk(e){return ke("MuiMenu",e)}Oe("MuiMenu",["root","paper","list"]);const $k={vertical:"top",horizontal:"right"},Ak={vertical:"top",horizontal:"left"},Dk=e=>{const{classes:t}=e;return Pe({root:["root"],paper:["paper"],list:["list"]},Mk,t)},jk=le(qh,{shouldForwardProp:e=>dt(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),Lk=le(Uh,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Fk=le(Wh,{name:"MuiMenu",slot:"List"})({outline:0}),Pl=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiMenu"}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:l=!1,MenuListProps:c={},onClose:u,open:d,PaperProps:f={},PopoverClasses:p,transitionDuration:h="auto",TransitionProps:{onEntering:g,...m}={},variant:v="selectedMenu",slots:b={},slotProps:C={},...y}=o,x=eh(),w={...o,autoFocus:r,disableAutoFocusItem:l,MenuListProps:c,onEntering:g,PaperProps:f,transitionDuration:h,TransitionProps:m,variant:v},E=Dk(w),k=r&&!l&&d,R=D.useRef(null),_=(j,$)=>{R.current&&R.current.adjustStyleForScrollbar(j,{direction:x?"rtl":"ltr"}),g&&g(j,$)},V=j=>{j.key==="Tab"&&(j.preventDefault(),u&&u(j,"tabKeyDown"))};let I=-1;D.Children.map(i,(j,$)=>{D.isValidElement(j)&&(process.env.NODE_ENV!=="production"&&Rn.isFragment(j)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
157
|
+
`)),j.props.disabled||(v==="selectedMenu"&&j.props.selected||I===-1)&&(I=$))});const S={slots:b,slotProps:{list:c,transition:m,paper:f,...C}},A=WT({elementType:b.root,externalSlotProps:C.root,ownerState:w,className:[E.root,a]}),[N,O]=Fe("paper",{className:E.paper,elementType:Lk,externalForwardedProps:S,shouldForwardComponentProp:!0,ownerState:w}),[P,L]=Fe("list",{className:be(E.list,c.className),elementType:Fk,shouldForwardComponentProp:!0,externalForwardedProps:S,getSlotProps:j=>({...j,onKeyDown:$=>{V($),j.onKeyDown?.($)}}),ownerState:w}),M=typeof S.slotProps.transition=="function"?S.slotProps.transition(w):S.slotProps.transition;return T.jsx(jk,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?$k:Ak,slots:{root:b.root,paper:N,backdrop:b.backdrop,...b.transition&&{transition:b.transition}},slotProps:{root:A,paper:O,backdrop:typeof C.backdrop=="function"?C.backdrop(w):C.backdrop,transition:{...M,onEntering:(...j)=>{_(...j),M?.onEntering?.(...j)}}},open:d,ref:n,transitionDuration:h,ownerState:w,...y,classes:p,children:T.jsx(P,{actions:R,autoFocus:r&&(I===-1||l),autoFocusItem:k,variant:v,...L,children:i})})});process.env.NODE_ENV!=="production"&&(Pl.propTypes={anchorEl:s.oneOfType([lo,s.func]),autoFocus:s.bool,children:s.node,classes:s.object,className:s.string,disableAutoFocusItem:s.bool,MenuListProps:s.object,onClose:s.func,open:s.bool.isRequired,PaperProps:s.object,PopoverClasses:s.object,slotProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),list:s.oneOfType([s.func,s.object]),paper:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),transition:s.oneOfType([s.func,s.object])}),slots:s.shape({backdrop:s.elementType,list:s.elementType,paper:s.elementType,root:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),transitionDuration:s.oneOfType([s.oneOf(["auto"]),s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})]),TransitionProps:s.object,variant:s.oneOf(["menu","selectedMenu"])});function Bk(e){return ke("MuiMenuItem",e)}const ko=Oe("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),zk=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Vk=e=>{const{disabled:t,dense:n,divider:o,disableGutters:r,selected:i,classes:a}=e,c=Pe({root:["root",n&&"dense",t&&"disabled",!r&&"gutters",o&&"divider",i&&"selected"]},Bk,a);return{...a,...c}},Hk=le(ls,{shouldForwardProp:e=>dt(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:zk})(Ne(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ko.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${ko.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${ko.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${ko.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ko.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${ad.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${ad.inset}`]:{marginLeft:52},[`& .${Yn.root}`]:{marginTop:0,marginBottom:0},[`& .${Yn.inset}`]:{paddingLeft:36},[`& .${ud.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${ud.root} svg`]:{fontSize:"1.25rem"}}}]}))),Nt=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:a=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:u,role:d="menuitem",tabIndex:f,className:p,...h}=o,g=D.useContext(uo),m=D.useMemo(()=>({dense:a||g.dense||!1,disableGutters:c}),[g.dense,a,c]),v=D.useRef(null);an(()=>{r&&(v.current?v.current.focus():process.env.NODE_ENV!=="production"&&console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."))},[r]);const b={...o,dense:m.dense,divider:l,disableGutters:c},C=Vk(o),y=it(v,n);let x;return o.disabled||(x=f!==void 0?f:-1),T.jsx(uo.Provider,{value:m,children:T.jsx(Hk,{ref:y,role:d,tabIndex:x,component:i,focusVisibleClassName:be(C.focusVisible,u),className:be(C.root,p),...h,ownerState:b,classes:C})})});process.env.NODE_ENV!=="production"&&(Nt.propTypes={autoFocus:s.bool,children:s.node,classes:s.object,className:s.string,component:s.elementType,dense:s.bool,disabled:s.bool,disableGutters:s.bool,divider:s.bool,focusVisibleClassName:s.string,role:s.string,selected:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number});function Wk(e){return ke("MuiNativeSelect",e)}const Rl=Oe("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Uk=e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:i,error:a}=e,l={select:["select",n,o&&"disabled",r&&"multiple",a&&"error"],icon:["icon",`icon${me(n)}`,i&&"iconOpen",o&&"disabled"]};return Pe(l,Wk,t)},Yh=le("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Rl.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),qk=le(Yh,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:dt,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Rl.multiple}`]:t.multiple}]}})({}),Gh=le("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Rl.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),Yk=le(Gh,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${me(n.variant)}`],n.open&&t.iconOpen]}})({}),Kh=D.forwardRef(function(t,n){const{className:o,disabled:r,error:i,IconComponent:a,inputRef:l,variant:c="standard",...u}=t,d={...t,disabled:r,variant:c,error:i},f=Uk(d);return T.jsxs(D.Fragment,{children:[T.jsx(qk,{ownerState:d,className:be(f.select,o),disabled:r,ref:l||n,...u}),t.multiple?null:T.jsx(Yk,{as:a,ownerState:d,className:f.icon})]})});process.env.NODE_ENV!=="production"&&(Kh.propTypes={children:s.node,classes:s.object,className:s.string,disabled:s.bool,error:s.bool,IconComponent:s.elementType.isRequired,inputRef:Et,multiple:s.bool,name:s.string,onChange:s.func,value:s.any,variant:s.oneOf(["standard","outlined","filled"])});var md;const Gk=le("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:dt})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Kk=le("legend",{name:"MuiNotchedOutlined",shouldForwardProp:dt})(Ne(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Xh(e){const{children:t,classes:n,className:o,label:r,notched:i,...a}=e,l=r!=null&&r!=="",c={...e,notched:i,withLabel:l};return T.jsx(Gk,{"aria-hidden":!0,className:o,ownerState:c,...a,children:T.jsx(Kk,{ownerState:c,children:l?T.jsx("span",{children:r}):md||(md=T.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}process.env.NODE_ENV!=="production"&&(Xh.propTypes={children:s.node,classes:s.object,className:s.string,label:s.node,notched:s.bool.isRequired,style:s.object});const Xk=e=>{const{classes:t}=e,o=Pe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},tN,t);return{...t,...o}},Zk=le(fs,{shouldForwardProp:e=>dt(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:us})(Ne(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Dt.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Dt.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Dt.focused} .${Dt.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(un()).map(([n])=>({props:{color:n},style:{[`&.${Dt.focused} .${Dt.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Dt.error} .${Dt.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Dt.disabled} .${Dt.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:o})=>n.multiline&&o==="small",style:{padding:"8.5px 14px"}}]}})),Qk=le(Xh,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Ne(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),Jk=le(ps,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:ds})(Ne(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),ys=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiOutlinedInput"}),{components:r={},fullWidth:i=!1,inputComponent:a="input",label:l,multiline:c=!1,notched:u,slots:d={},slotProps:f={},type:p="text",...h}=o,g=Xk(o),m=dn(),v=$n({props:o,muiFormControl:m,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b={...o,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:m,fullWidth:i,hiddenLabel:v.hiddenLabel,multiline:c,size:v.size,type:p},C=d.root??r.Root??Zk,y=d.input??r.Input??Jk,[x,w]=Fe("notchedOutline",{elementType:Qk,className:g.notchedOutline,shouldForwardComponentProp:!0,ownerState:b,externalForwardedProps:{slots:d,slotProps:f},additionalProps:{label:l!=null&&l!==""&&v.required?T.jsxs(D.Fragment,{children:[l," ","*"]}):l}});return T.jsx(hs,{slots:{root:C,input:y},slotProps:f,renderSuffix:E=>T.jsx(x,{...w,notched:typeof u<"u"?u:!!(E.startAdornment||E.filled||E.focused)}),fullWidth:i,inputComponent:a,multiline:c,ref:n,type:p,...h,classes:{...g,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(ys.propTypes={autoComplete:s.string,autoFocus:s.bool,classes:s.object,color:s.oneOfType([s.oneOf(["primary","secondary"]),s.string]),components:s.shape({Input:s.elementType,Root:s.elementType}),defaultValue:s.any,disabled:s.bool,endAdornment:s.node,error:s.bool,fullWidth:s.bool,id:s.string,inputComponent:s.elementType,inputProps:s.object,inputRef:Et,label:s.node,margin:s.oneOf(["dense","none"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,notched:s.bool,onChange:s.func,placeholder:s.string,readOnly:s.bool,required:s.bool,rows:s.oneOfType([s.number,s.string]),slotProps:s.shape({input:s.object,notchedOutline:s.oneOfType([s.func,s.object]),root:s.object}),slots:s.shape({input:s.elementType,notchedOutline:s.elementType,root:s.elementType}),startAdornment:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any});ys.muiName="Input";function Zh(e){return ke("MuiSelect",e)}const Oo=Oe("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var gd;const eO=le(Yh,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Oo.select}`]:t.select},{[`&.${Oo.select}`]:t[n.variant]},{[`&.${Oo.error}`]:t.error},{[`&.${Oo.multiple}`]:t.multiple}]}})({[`&.${Oo.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),tO=le(Gh,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${me(n.variant)}`],n.open&&t.iconOpen]}})({}),nO=le("input",{shouldForwardProp:e=>lh(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function yd(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function oO(e){return e==null||typeof e=="string"&&!e.trim()}const rO=e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:i,error:a}=e,l={select:["select",n,o&&"disabled",r&&"multiple",a&&"error"],icon:["icon",`icon${me(n)}`,i&&"iconOpen",o&&"disabled"],nativeInput:["nativeInput"]};return Pe(l,Zh,t)},Qh=D.forwardRef(function(t,n){const{"aria-describedby":o,"aria-label":r,autoFocus:i,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:f,displayEmpty:p,error:h=!1,IconComponent:g,inputRef:m,labelId:v,MenuProps:b={},multiple:C,name:y,onBlur:x,onChange:w,onClose:E,onFocus:k,onKeyDown:R,onMouseDown:_,onOpen:V,open:I,readOnly:S,renderValue:A,required:N,SelectDisplayProps:O={},tabIndex:P,type:L,value:M,variant:j="standard",...$}=t,[B,H]=Ea({controlled:M,default:d,name:"Select"}),[U,W]=Ea({controlled:I,default:u,name:"Select"}),K=D.useRef(null),Q=D.useRef(null),[ee,q]=D.useState(null),{current:J}=D.useRef(I!=null),[Z,ne]=D.useState(),z=it(n,m),ae=D.useCallback(pe=>{Q.current=pe,pe&&q(pe)},[]),se=ee?.parentNode;D.useImperativeHandle(z,()=>({focus:()=>{Q.current.focus()},node:K.current,value:B}),[B]);const de=ee!==null&&U;D.useEffect(()=>{if(!de||!se||a||typeof ResizeObserver>"u")return;const pe=new ResizeObserver(()=>{ne(se.clientWidth)});return pe.observe(se),()=>{pe.disconnect()}},[de,se,a]),D.useEffect(()=>{u&&U&&ee&&!J&&(ne(a?null:se.clientWidth),Q.current.focus())},[ee,a]),D.useEffect(()=>{i&&Q.current.focus()},[i]),D.useEffect(()=>{if(!v)return;const pe=_t(Q.current).getElementById(v);if(pe){const Ee=()=>{getSelection().isCollapsed&&Q.current.focus()};return pe.addEventListener("click",Ee),()=>{pe.removeEventListener("click",Ee)}}},[v]);const we=(pe,Ee)=>{pe?V&&V(Ee):E&&E(Ee),J||(ne(a?null:se.clientWidth),W(pe))},Te=pe=>{_?.(pe),pe.button===0&&(pe.preventDefault(),Q.current.focus(),we(!0,pe))},G=pe=>{we(!1,pe)},X=D.Children.toArray(l),te=pe=>{const Ee=X.find(et=>et.props.value===pe.target.value);Ee!==void 0&&(H(Ee.props.value),w&&w(pe,Ee))},re=pe=>Ee=>{let et;if(Ee.currentTarget.hasAttribute("tabindex")){if(C){et=Array.isArray(B)?B.slice():[];const Jt=B.indexOf(pe.props.value);Jt===-1?et.push(pe.props.value):et.splice(Jt,1)}else et=pe.props.value;if(pe.props.onClick&&pe.props.onClick(Ee),B!==et&&(H(et),w)){const Jt=Ee.nativeEvent||Ee,Nr=new Jt.constructor(Jt.type,Jt);Object.defineProperty(Nr,"target",{writable:!0,value:{value:et,name:y}}),w(Nr,pe)}C||we(!1,Ee)}},oe=pe=>{S||([" ","ArrowUp","ArrowDown","Enter"].includes(pe.key)&&(pe.preventDefault(),we(!0,pe)),R?.(pe))},ce=pe=>{!de&&x&&(Object.defineProperty(pe,"target",{writable:!0,value:{value:B,name:y}}),x(pe))};delete $["aria-invalid"];let ie,ge;const he=[];let ue=!1,ve=!1;(Ti({value:B})||p)&&(A?ie=A(B):ue=!0);const qe=X.map(pe=>{if(!D.isValidElement(pe))return null;process.env.NODE_ENV!=="production"&&Rn.isFragment(pe)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
158
|
+
`));let Ee;if(C){if(!Array.isArray(B))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":Zt(2));Ee=B.some(et=>yd(et,pe.props.value)),Ee&&ue&&he.push(pe.props.children)}else Ee=yd(B,pe.props.value),Ee&&ue&&(ge=pe.props.children);return Ee&&(ve=!0),D.cloneElement(pe,{"aria-selected":Ee?"true":"false",onClick:re(pe),onKeyUp:et=>{et.key===" "&&et.preventDefault(),pe.props.onKeyUp&&pe.props.onKeyUp(et)},role:"option",selected:Ee,value:void 0,"data-value":pe.props.value})});process.env.NODE_ENV!=="production"&&D.useEffect(()=>{if(!ve&&!C&&B!==""){const pe=X.map(Ee=>Ee.props.value);console.warn([`MUI: You have provided an out-of-range value \`${B}\` for the select ${y?`(name="${y}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${pe.filter(Ee=>Ee!=null).map(Ee=>`\`${Ee}\``).join(", ")||'""'}.`].join(`
|
|
159
|
+
`))}},[ve,X,C,y,B]),ue&&(C?he.length===0?ie=null:ie=he.reduce((pe,Ee,et)=>(pe.push(Ee),et<he.length-1&&pe.push(", "),pe),[]):ie=ge);let Xe=Z;!a&&J&&ee&&(Xe=se.clientWidth);let ye;typeof P<"u"?ye=P:ye=f?null:0;const Se=O.id||(y?`mui-component-select-${y}`:void 0),xe={...t,variant:j,value:B,open:de,error:h},Ze=rO(xe),ft={...b.PaperProps,...typeof b.slotProps?.paper=="function"?b.slotProps.paper(xe):b.slotProps?.paper},xo={...b.MenuListProps,...typeof b.slotProps?.list=="function"?b.slotProps.list(xe):b.slotProps?.list},pt=gl();return T.jsxs(D.Fragment,{children:[T.jsx(eO,{as:"div",ref:ae,tabIndex:ye,role:"combobox","aria-controls":de?pt:void 0,"aria-disabled":f?"true":void 0,"aria-expanded":de?"true":"false","aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[v,Se].filter(Boolean).join(" ")||void 0,"aria-describedby":o,"aria-required":N?"true":void 0,"aria-invalid":h?"true":void 0,onKeyDown:oe,onMouseDown:f||S?null:Te,onBlur:ce,onFocus:k,...O,ownerState:xe,className:be(O.className,Ze.select,c),id:Se,children:oO(ie)?gd||(gd=T.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):ie}),T.jsx(nO,{"aria-invalid":h,value:Array.isArray(B)?B.join(","):B,name:y,ref:K,"aria-hidden":!0,onChange:te,tabIndex:-1,disabled:f,className:Ze.nativeInput,autoFocus:i,required:N,...$,ownerState:xe}),T.jsx(tO,{as:g,className:Ze.icon,ownerState:xe}),T.jsx(Pl,{id:`menu-${y||""}`,anchorEl:se,open:de,onClose:G,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...b,slotProps:{...b.slotProps,list:{"aria-labelledby":v,role:"listbox","aria-multiselectable":C?"true":void 0,disableListWrap:!0,id:pt,...xo},paper:{...ft,style:{minWidth:Xe,...ft!=null?ft.style:null}}},children:qe})]})});process.env.NODE_ENV!=="production"&&(Qh.propTypes={"aria-describedby":s.string,"aria-label":s.string,autoFocus:s.bool,autoWidth:s.bool,children:s.node,classes:s.object,className:s.string,defaultOpen:s.bool,defaultValue:s.any,disabled:s.bool,displayEmpty:s.bool,error:s.bool,IconComponent:s.elementType.isRequired,inputRef:Et,labelId:s.string,MenuProps:s.object,multiple:s.bool,name:s.string,onBlur:s.func,onChange:s.func,onClose:s.func,onFocus:s.func,onOpen:s.func,open:s.bool,readOnly:s.bool,renderValue:s.func,required:s.bool,SelectDisplayProps:s.object,tabIndex:s.oneOfType([s.number,s.string]),type:s.any,value:s.any,variant:s.oneOf(["standard","outlined","filled"])});const iO=e=>{const{classes:t}=e,o=Pe({root:["root"]},Zh,t);return{...t,...o}},_l={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>dt(e)&&e!=="variant"},sO=le(gs,_l)(""),aO=le(ys,_l)(""),lO=le(ms,_l)(""),lr=D.forwardRef(function(t,n){const o=Ie({name:"MuiSelect",props:t}),{autoWidth:r=!1,children:i,classes:a={},className:l,defaultOpen:c=!1,displayEmpty:u=!1,IconComponent:d=oN,id:f,input:p,inputProps:h,label:g,labelId:m,MenuProps:v,multiple:b=!1,native:C=!1,onClose:y,onOpen:x,open:w,renderValue:E,SelectDisplayProps:k,variant:R="outlined",..._}=o,V=C?Kh:Qh,I=dn(),S=$n({props:o,muiFormControl:I,states:["variant","error"]}),A=S.variant||R,N={...o,variant:A,classes:a},O=iO(N),{root:P,...L}=O,M=p||{standard:T.jsx(sO,{ownerState:N}),outlined:T.jsx(aO,{label:g,ownerState:N}),filled:T.jsx(lO,{ownerState:N})}[A],j=it(n,ho(M));return T.jsx(D.Fragment,{children:D.cloneElement(M,{inputComponent:V,inputProps:{children:i,error:S.error,IconComponent:d,variant:A,type:void 0,multiple:b,...C?{id:f}:{autoWidth:r,defaultOpen:c,displayEmpty:u,labelId:m,MenuProps:v,onClose:y,onOpen:x,open:w,renderValue:E,SelectDisplayProps:{id:f,...k}},...h,classes:h?nt(L,h.classes):L,...p?p.props.inputProps:{}},...(b&&C||u)&&A==="outlined"?{notched:!0}:{},ref:j,className:be(M.props.className,l,O.root),...!p&&{variant:A},..._})})});process.env.NODE_ENV!=="production"&&(lr.propTypes={autoWidth:s.bool,children:s.node,classes:s.object,className:s.string,defaultOpen:s.bool,defaultValue:s.any,displayEmpty:s.bool,IconComponent:s.elementType,id:s.string,input:s.element,inputProps:s.object,label:s.node,labelId:s.string,MenuProps:s.object,multiple:s.bool,native:s.bool,onChange:s.func,onClose:s.func,onOpen:s.func,open:s.bool,renderValue:s.func,SelectDisplayProps:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.oneOfType([s.oneOf([""]),s.any]),variant:s.oneOf(["filled","outlined","standard"])});lr.muiName="Select";const gt=m1({createStyledComponent:le("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Ie({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(gt.propTypes={children:s.node,component:s.elementType,direction:s.oneOfType([s.oneOf(["column-reverse","column","row-reverse","row"]),s.arrayOf(s.oneOf(["column-reverse","column","row-reverse","row"])),s.object]),divider:s.node,spacing:s.oneOfType([s.arrayOf(s.oneOfType([s.number,s.string])),s.number,s.object,s.string]),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),useFlexGap:s.bool});function cO(e){return ke("MuiSwitch",e)}const st=Oe("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),uO=e=>{const{classes:t,edge:n,size:o,color:r,checked:i,disabled:a}=e,l={root:["root",n&&`edge${me(n)}`,`size${me(o)}`],switchBase:["switchBase",`color${me(r)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=Pe(l,cO,t);return{...t,...c}},dO=le("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${me(n.edge)}`],t[`size${me(n.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${st.thumb}`]:{width:16,height:16},[`& .${st.switchBase}`]:{padding:4,[`&.${st.checked}`]:{transform:"translateX(16px)"}}}}]}),fO=le(_h,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${st.input}`]:t.input},n.color!=="default"&&t[`color${me(n.color)}`]]}})(Ne(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${st.checked}`]:{transform:"translateX(20px)"},[`&.${st.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${st.checked} + .${st.track}`]:{opacity:.5},[`&.${st.disabled} + .${st.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${st.input}`]:{left:"-100%",width:"300%"}})),Ne(({theme:e})=>({"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(un(["light"])).map(([t])=>({props:{color:t},style:{[`&.${st.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${st.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.55)}`}},[`&.${st.checked} + .${st.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),pO=le("span",{name:"MuiSwitch",slot:"Track"})(Ne(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),hO=le("span",{name:"MuiSwitch",slot:"Thumb"})(Ne(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),Jh=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiSwitch"}),{className:r,color:i="primary",edge:a=!1,size:l="medium",sx:c,slots:u={},slotProps:d={},...f}=o,p={...o,color:i,edge:a,size:l},h=uO(p),g={slots:u,slotProps:d},[m,v]=Fe("root",{className:be(h.root,r),elementType:dO,externalForwardedProps:g,ownerState:p,additionalProps:{sx:c}}),[b,C]=Fe("thumb",{className:h.thumb,elementType:hO,externalForwardedProps:g,ownerState:p}),y=T.jsx(b,{...C}),[x,w]=Fe("track",{className:h.track,elementType:pO,externalForwardedProps:g,ownerState:p});return T.jsxs(m,{...v,children:[T.jsx(fO,{type:"checkbox",icon:y,checkedIcon:y,ref:n,ownerState:p,...f,classes:{...h,root:h.switchBase},slots:{...u.switchBase&&{root:u.switchBase},...u.input&&{input:u.input}},slotProps:{...d.switchBase&&{root:typeof d.switchBase=="function"?d.switchBase(p):d.switchBase},input:{role:"switch"},...d.input&&{input:typeof d.input=="function"?d.input(p):d.input}}}),T.jsx(x,{...w})]})});process.env.NODE_ENV!=="production"&&(Jh.propTypes={checked:s.bool,checkedIcon:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["default","primary","secondary","error","info","success","warning"]),s.string]),defaultChecked:s.bool,disabled:s.bool,disableRipple:s.bool,edge:s.oneOf(["end","start",!1]),icon:s.node,id:s.string,inputProps:s.object,inputRef:Et,onChange:s.func,required:s.bool,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),slotProps:s.shape({input:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),switchBase:s.oneOfType([s.func,s.object]),thumb:s.oneOfType([s.func,s.object]),track:s.oneOfType([s.func,s.object])}),slots:s.shape({input:s.elementType,root:s.elementType,switchBase:s.elementType,thumb:s.elementType,track:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.any});function mO(e){return ke("MuiTextField",e)}Oe("MuiTextField",["root"]);const gO={standard:gs,filled:ms,outlined:ys},yO=e=>{const{classes:t}=e;return Pe({root:["root"]},mO,t)},bO=le(ki,{name:"MuiTextField",slot:"Root"})({}),Vt=D.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTextField"}),{autoComplete:r,autoFocus:i=!1,children:a,className:l,color:c="primary",defaultValue:u,disabled:d=!1,error:f=!1,FormHelperTextProps:p,fullWidth:h=!1,helperText:g,id:m,InputLabelProps:v,inputProps:b,InputProps:C,inputRef:y,label:x,maxRows:w,minRows:E,multiline:k=!1,name:R,onBlur:_,onChange:V,onFocus:I,placeholder:S,required:A=!1,rows:N,select:O=!1,SelectProps:P,slots:L={},slotProps:M={},type:j,value:$,variant:B="outlined",...H}=o,U={...o,autoFocus:i,color:c,disabled:d,error:f,fullWidth:h,multiline:k,required:A,select:O,variant:B},W=yO(U);process.env.NODE_ENV!=="production"&&O&&!a&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const K=gl(m),Q=g&&K?`${K}-helper-text`:void 0,ee=x&&K?`${K}-label`:void 0,q=gO[B],J={slots:L,slotProps:{input:C,inputLabel:v,htmlInput:b,formHelperText:p,select:P,...M}},Z={},ne=J.slotProps.inputLabel;B==="outlined"&&(ne&&typeof ne.shrink<"u"&&(Z.notched=ne.shrink),Z.label=x),O&&((!P||!P.native)&&(Z.id=void 0),Z["aria-describedby"]=void 0);const[z,ae]=Fe("root",{elementType:bO,shouldForwardComponentProp:!0,externalForwardedProps:{...J,...H},ownerState:U,className:be(W.root,l),ref:n,additionalProps:{disabled:d,error:f,fullWidth:h,required:A,color:c,variant:B}}),[se,de]=Fe("input",{elementType:q,externalForwardedProps:J,additionalProps:Z,ownerState:U}),[we,Te]=Fe("inputLabel",{elementType:Ol,externalForwardedProps:J,ownerState:U}),[G,X]=Fe("htmlInput",{elementType:"input",externalForwardedProps:J,ownerState:U}),[te,re]=Fe("formHelperText",{elementType:Fh,externalForwardedProps:J,ownerState:U}),[oe,ce]=Fe("select",{elementType:lr,externalForwardedProps:J,ownerState:U}),ie=T.jsx(se,{"aria-describedby":Q,autoComplete:r,autoFocus:i,defaultValue:u,fullWidth:h,multiline:k,name:R,rows:N,maxRows:w,minRows:E,type:j,value:$,id:K,inputRef:y,onBlur:_,onChange:V,onFocus:I,placeholder:S,inputProps:X,slots:{input:L.htmlInput?G:void 0},...de});return T.jsxs(z,{...ae,children:[x!=null&&x!==""&&T.jsx(we,{htmlFor:K,id:ee,...Te,children:x}),O?T.jsx(oe,{"aria-describedby":Q,id:K,labelId:ee,value:$,input:ie,...ce,children:a}):ie,g&&T.jsx(te,{id:Q,...re,children:g})]})});process.env.NODE_ENV!=="production"&&(Vt.propTypes={autoComplete:s.string,autoFocus:s.bool,children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","error","info","success","warning"]),s.string]),defaultValue:s.any,disabled:s.bool,error:s.bool,FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:Et,label:s.node,margin:s.oneOf(["dense","none","normal"]),maxRows:s.oneOfType([s.number,s.string]),minRows:s.oneOfType([s.number,s.string]),multiline:s.bool,name:s.string,onBlur:s.func,onChange:s.func,onFocus:s.func,placeholder:s.string,required:s.bool,rows:s.oneOfType([s.number,s.string]),select:s.bool,SelectProps:s.object,size:s.oneOfType([s.oneOf(["medium","small"]),s.string]),slotProps:s.shape({formHelperText:s.oneOfType([s.func,s.object]),htmlInput:s.oneOfType([s.func,s.object]),input:s.oneOfType([s.func,s.object]),inputLabel:s.oneOfType([s.func,s.object]),select:s.oneOfType([s.func,s.object])}),slots:s.shape({formHelperText:s.elementType,htmlInput:s.elementType,input:s.elementType,inputLabel:s.elementType,root:s.elementType,select:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),type:s.string,value:s.any,variant:s.oneOf(["filled","outlined","standard"])});const Po=2,Zs=5;function jt({node:e,nodeLabel:t,setNodeLabel:n,nodeMetaData:o,setNodeMetaData:r}){const i=e.type==="multiChoice",a=o&&typeof o=="object"&&!Array.isArray(o)?o:{},l=typeof a.field1=="string"?a.field1:"",c=typeof a.field2=="string"?a.field2:"",u=typeof a.field3=="string"?a.field3:"",d=Math.min(Zs,Math.max(Po,Number(a.choiceCount)||Po));return T.jsxs(gt,{spacing:2,children:[T.jsx(Vt,{label:"Node label",helperText:"Shown in the node body (under the divider)",value:t,onChange:f=>n(f.target.value),fullWidth:!0}),i&&T.jsx(Vt,{label:"Number of choices (2–5)",type:"number",inputProps:{min:Po,max:Zs,step:1},value:d,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},choiceCount:Math.min(Zs,Math.max(Po,Number(f.target.value)||Po))})),fullWidth:!0,helperText:"Reducing prunes removed-branch subtrees (END preserved)."}),T.jsx(Vt,{label:"Text field 1",value:l,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},field1:f.target.value})),fullWidth:!0,multiline:!0,minRows:2}),T.jsx(Vt,{label:"Text field 2",value:c,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},field2:f.target.value})),fullWidth:!0,multiline:!0,minRows:2}),T.jsx(Vt,{label:"Text field 3",value:u,onChange:f=>r(p=>({...p&&typeof p=="object"&&!Array.isArray(p)?p:{},field3:f.target.value})),fullWidth:!0,multiline:!0,minRows:2})]})}function vO({nodeLabel:e,setNodeLabel:t,nodeMetaData:n,setNodeMetaData:o}){const r=n&&typeof n=="object"&&!Array.isArray(n)?n:{},i=typeof r.subject=="string"?r.subject:"",a=typeof r.body=="string"?r.body:"";return T.jsxs(gt,{spacing:2,children:[T.jsx(Vt,{label:"Node label",helperText:"Shown in the node body (under the divider)",value:e,onChange:l=>t(l.target.value),fullWidth:!0}),T.jsx(Vt,{label:"Email subject",value:i,onChange:l=>o(c=>({...c&&typeof c=="object"&&!Array.isArray(c)?c:{},subject:l.target.value})),fullWidth:!0}),T.jsx(Vt,{label:"Email body",value:a,onChange:l=>o(c=>({...c&&typeof c=="object"&&!Array.isArray(c)?c:{},body:l.target.value})),fullWidth:!0,multiline:!0,minRows:4})]})}function xO({node:e,setNodeLabel:t,nodeMetaData:n,setNodeMetaData:o}){const r=n&&typeof n=="object"&&!Array.isArray(n)?n:{},i=typeof r.trackedEvent=="string"?r.trackedEvent:"",a=r.hasTimeDependency!==!1,l=c=>{const u=c.target.value;o(d=>({...d&&typeof d=="object"&&!Array.isArray(d)?d:{},trackedEvent:u})),t(u)};return T.jsx(gt,{spacing:2,children:T.jsxs(ki,{fullWidth:!0,children:[T.jsxs(gt,{children:[T.jsx(Ol,{id:"demo-simple-select-label",children:"Tracked Event"}),T.jsxs(lr,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:i,label:"Tracked Event",onChange:l,children:[T.jsx(Nt,{value:"Class Booked",children:"Class Booked"}),T.jsx(Nt,{value:"Class Cancelled",children:"Class Cancelled"}),T.jsx(Nt,{value:"Class Rescheduled",children:"Class Rescheduled"})]}),T.jsx(tt,{variant:"caption",sx:{mt:.5,color:"text.secondary"},children:"Select the event to wait for before proceeding."})]}),T.jsxs(gt,{sx:{mt:2},spacing:1,children:[T.jsx(Lh,{control:T.jsx(Jh,{checked:!a,onChange:c=>{const u=c.target.checked;o(d=>({...d&&typeof d=="object"&&!Array.isArray(d)?d:{},hasTimeDependency:!u}))}}),label:"No time dependency"}),!a&&T.jsx(tt,{variant:"caption",sx:{mt:.5,color:"text.secondary"},children:'This node will only follow the "Yes / True" path.'})]}),a&&T.jsxs(gt,{sx:{mt:2},spacing:1,children:[T.jsx(tt,{variant:"subtitle2",children:'Wait time before "No / False" is triggered'}),T.jsxs(gt,{direction:"row",spacing:1,alignItems:"center",children:[T.jsx(Vt,{type:"number",value:r.waitTime??7,onChange:c=>{const u=parseInt(c.target.value,10);o(d=>({...d&&typeof d=="object"&&!Array.isArray(d)?d:{},waitTime:isNaN(u)?0:u}))},InputProps:{inputProps:{min:0}},sx:{width:100}}),T.jsx(ki,{sx:{minWidth:120},children:T.jsxs(lr,{value:r.waitType??"days",onChange:c=>{const u=c.target.value;o(d=>({...d&&typeof d=="object"&&!Array.isArray(d)?d:{},waitType:u}))},children:[T.jsx(Nt,{value:"days",children:"Days"}),T.jsx(Nt,{value:"hours",children:"Hours"}),T.jsx(Nt,{value:"minutes",children:"Minutes"})]})})]}),T.jsx(tt,{variant:"caption",sx:{mt:.5,color:"text.secondary"},children:'Specify how long to wait for the event before taking "No / False" action.'})]})]})})}const at="start",Ue="end",go="mingcute:entrance-fill",yo="mingcute:exit-fill",bo=2,bn=()=>({field1:"",field2:"",field3:""}),wO=()=>({trackedEvent:"",waitTime:7,waitType:"days",hasTimeDependency:!0}),SO=()=>({subject:"",body:""}),EO=()=>({...bn(),choiceCount:bo}),bd=()=>({}),vo=[{kind:"start",title:"Start",icon:go,drawerFormComponent:jt,createInitialNodeMetaData:bd},{kind:"end",title:"Exit",icon:yo,drawerFormComponent:jt,createInitialNodeMetaData:bd},{kind:"email",title:"Email",category:"Send Message",nodeType:"action",icon:"streamline:send-email",drawerFormComponent:vO,createInitialNodeMetaData:SO},{kind:"sms",title:"SMS",category:"Send Message",nodeType:"action",icon:"fa-solid:sms",drawerFormComponent:jt,createInitialNodeMetaData:bn},{kind:"push",title:"Push Notification / Web Message",category:"Send Message",nodeType:"action",icon:"mdi:message-badge-outline",enabled:!1,drawerFormComponent:jt,createInitialNodeMetaData:bn},{kind:"tag",title:"Tag Client",category:"Update",nodeType:"action",icon:"ph:tag",drawerFormComponent:jt,createInitialNodeMetaData:bn},{kind:"note",title:"Add Client Note",category:"Update",nodeType:"action",icon:"material-symbols-light:add-notes-outline",drawerFormComponent:jt,createInitialNodeMetaData:bn},{kind:"delay",title:"Delay",category:"Action",nodeType:"action",icon:"mdi:timer-sand-empty",drawerFormComponent:jt,createInitialNodeMetaData:bn},{kind:"smartFilter",title:"Smart Filter",category:"Event",nodeType:"conditional",icon:"tabler:filter",drawerFormComponent:jt,createInitialNodeMetaData:bn},{kind:"waitForEvent",title:"Tracked Event",category:"Event",nodeType:"conditional",icon:"codicon:github-action",drawerFormComponent:xO,createInitialNodeMetaData:wO},{kind:"multiChoice",title:"Multi Choice",category:"Event",nodeType:"multiChoice",icon:"tabler:list-numbers",drawerFormComponent:jt,createInitialNodeMetaData:EO}],CO=vo;function bs(e){return new Map(e.map(t=>[t.kind,t]))}function em(e){return!!e&&e.kind!=="start"&&e.kind!=="end"}function tm(e,t){if(t.length===0)return e;const n=bs(e);for(const i of t)n.set(i.kind,i);const o=e.map(i=>n.get(i.kind)??i),r=new Set(e.map(i=>i.kind));for(const i of t)r.has(i.kind)||o.push(i);return o}const TO=["Send Message","Update","Action","Event"];function nm(e=vo){const t={"Send Message":[],Update:[],Action:[],Event:[]};for(const n of e)em(n)&&t[n.category].push(n);return t}function NO(e,t=vo){const n=bs(t).get(e);return em(n)?n.nodeType:"action"}const kO=[{id:at,type:"start",position:{x:260,y:60},data:{label:"Start",nodeLabel:"",kind:"start",icon:go,nodeMetaData:{}}},{id:Ue,type:"end",position:{x:260,y:520},data:{label:"Exit",nodeLabel:"",kind:"end",icon:yo,nodeMetaData:{}}}],OO=[{id:"e-start-out-end",type:"plusEdge",source:at,sourceHandle:"out",target:Ue,targetHandle:"in",data:{kind:"default",isRedirect:!1}}],Il=150,PO=170,vd=Il,RO=24,_O=Il+RO;function xd(e){return Math.min(5,Math.max(2,Number(e.data.nodeMetaData?.choiceCount)||bo))}function wd(e,t){const n=new Map(e.map(p=>[p.id,p])),o=n.get(at),r=n.get(Ue),i=o?.position.x??260,a=o?.position.y??60,l=t.filter(p=>!p.data?.isRedirect),c=new Map;for(const p of l){const h=c.get(p.source)??[];h.push(p),c.set(p.source,h)}const u=new Map,d=new Map;u.set(at,0),d.set(at,i);const f=[at];for(;f.length;){const p=f.shift(),h=n.get(p);if(!h)continue;const g=u.get(p)??0,m=d.get(p)??i,v=c.get(p)??[];v.sort((b,C)=>{const y=b.sourceHandle??"",x=C.sourceHandle??"",w=E=>E==="yes"?0:E==="no"?1:E.startsWith("c")?2:3;return w(y)-w(x)});for(const b of v){const C=b.target,y=n.get(C);if(!y)continue;const x=u.get(C),w=g+1;if(x!=null&&x<=g||!(x==null||w<x))continue;u.set(C,w);let k=m;if(h.type==="conditional"){const R=b.sourceHandle??"",_=R==="yes"?m-vd:R==="no"?m+vd:m;if(y.type==="multiChoice"&&(R==="yes"||R==="no")){const V=xd(y),I=Math.max(0,V-2)*Il;k=R==="yes"?_-I:_+I}else k=_}if(h.type==="multiChoice"){const _=(xd(h)-1)/2,V=/^c(\d)$/.exec(b.sourceHandle??""),S=(V?Number(V[1]):1)-1-_;k=m+S*_O}d.set(C,k),f.push(C)}}if(r){d.set(Ue,i);let p=0;for(const[h,g]of u.entries())h!==Ue&&(p=Math.max(p,g));u.set(Ue,p+1)}return e.map(p=>{const h=u.get(p.id),g=d.get(p.id);if(h==null||g==null)return p;const m=a+h*PO;return p.id===Ue?{...p,position:{x:i,y:m}}:{...p,position:{x:g,y:m}}})}function Sd(e){const{nodeId:t,removedHandles:n,nodes:o,edges:r}=e,i=new Map(o.map(b=>[b.id,b])),a=new Map,l=new Map;for(const b of r){const C=a.get(b.source)??[];C.push(b),a.set(b.source,C);const y=l.get(b.target)??[];y.push(b),l.set(b.target,y)}const c=b=>!b.data?.isRedirect,d=r.filter(b=>b.source===t&&n.includes(b.sourceHandle??"")&&c(b)).map(b=>b.target).filter(b=>b&&b!==Ue&&b!==at),f=new Set,p=[...d];for(;p.length;){const b=p.pop();if(b===Ue||b===at||!i.has(b)||f.has(b))continue;f.add(b);const C=a.get(b)??[];for(const y of C)c(y)&&y.target!==Ue&&p.push(y.target)}const h=new Set;let g=!0;for(;g;){g=!1;for(const b of f){if(b===Ue||h.has(b))continue;(l.get(b)??[]).filter(c).filter(x=>!(x.source===t&&n.includes(x.sourceHandle??"")||h.has(x.source))).length===0&&(h.add(b),g=!0)}}if(h.size===0)return{nodes:o,edges:r};const m=o.filter(b=>!h.has(b.id)||b.id===Ue),v=r.filter(b=>!(h.has(b.source)||h.has(b.target)));return{nodes:m,edges:v}}function IO(e,t){const n=e.icons,o=e.aliases||Object.create(null),r=Object.create(null);function i(a){if(n[a])return r[a]=[];if(!(a in r)){r[a]=null;const l=o[a]&&o[a].parent,c=l&&i(l);c&&(r[a]=[l].concat(c))}return r[a]}return Object.keys(n).concat(Object.keys(o)).forEach(i),r}const om=Object.freeze({left:0,top:0,width:16,height:16}),Pi=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ml=Object.freeze({...om,...Pi}),_a=Object.freeze({...Ml,body:"",hidden:!1});function MO(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function Ed(e,t){const n=MO(e,t);for(const o in _a)o in Pi?o in e&&!(o in n)&&(n[o]=Pi[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function $O(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function a(l){i=Ed(o[l]||r[l],i)}return a(t),n.forEach(a),Ed(e,i)}function rm(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=IO(e);for(const r in o){const i=o[r];i&&(t(r,$O(e,r,i)),n.push(r))}return n}const AO={provider:"",aliases:{},not_found:{},...om};function Qs(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function im(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Qs(e,AO))return null;const n=t.icons;for(const r in n){const i=n[r];if(!r||typeof i.body!="string"||!Qs(i,_a))return null}const o=t.aliases||Object.create(null);for(const r in o){const i=o[r],a=i.parent;if(!r||typeof a!="string"||!n[a]&&!o[a]||!Qs(i,_a))return null}return t}const Cd=Object.create(null);function DO(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function fo(e,t){const n=Cd[e]||(Cd[e]=Object.create(null));return n[t]||(n[t]=DO(e,t))}function sm(e,t){return im(t)?rm(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function jO(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}const am=/^[a-z0-9]+(-[a-z0-9]+)*$/,vs=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const l=r.pop(),c=r.pop(),u={provider:r.length>0?r[0]:o,prefix:c,name:l};return t&&!ni(u)?null:u}const i=r[0],a=i.split("-");if(a.length>1){const l={provider:o,prefix:a.shift(),name:a.join("-")};return t&&!ni(l)?null:l}if(n&&o===""){const l={provider:o,prefix:"",name:i};return t&&!ni(l,n)?null:l}return null},ni=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;let cr=!1;function lm(e){return typeof e=="boolean"&&(cr=e),cr}function Td(e){const t=typeof e=="string"?vs(e,!0,cr):e;if(t){const n=fo(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function LO(e,t){const n=vs(e,!0,cr);if(!n)return!1;const o=fo(n.provider,n.prefix);return t?jO(o,n.name,t):(o.missing.add(n.name),!0)}function FO(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),cr&&!t&&!e.prefix){let r=!1;return im(e)&&(e.prefix="",rm(e,(i,a)=>{LO(i,a)&&(r=!0)})),r}const n=e.prefix;if(!ni({prefix:n,name:"a"}))return!1;const o=fo(t,n);return!!sm(o,e)}const cm=Object.freeze({width:null,height:null}),um=Object.freeze({...cm,...Pi}),BO=/(-?[0-9.]*[0-9]+[0-9.]*)/g,zO=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Nd(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(BO);if(o===null||!o.length)return e;const r=[];let i=o.shift(),a=zO.test(i);for(;;){if(a){const l=parseFloat(i);isNaN(l)?r.push(i):r.push(Math.ceil(l*t*n)/n)}else r.push(i);if(i=o.shift(),i===void 0)return r.join("");a=!a}}function VO(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const r=e.indexOf(">",o),i=e.indexOf("</"+t);if(r===-1||i===-1)break;const a=e.indexOf(">",i);if(a===-1)break;n+=e.slice(r+1,i).trim(),e=e.slice(0,o).trim()+e.slice(a+1)}return{defs:n,content:e}}function HO(e,t){return e?"<defs>"+e+"</defs>"+t:t}function WO(e,t,n){const o=VO(e);return HO(o.defs,t+o.content+n)}const UO=e=>e==="unset"||e==="undefined"||e==="none";function qO(e,t){const n={...Ml,...e},o={...um,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(m=>{const v=[],b=m.hFlip,C=m.vFlip;let y=m.rotate;b?C?y+=2:(v.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),v.push("scale(-1 1)"),r.top=r.left=0):C&&(v.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),v.push("scale(1 -1)"),r.top=r.left=0);let x;switch(y<0&&(y-=Math.floor(y/4)*4),y=y%4,y){case 1:x=r.height/2+r.top,v.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:v.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:x=r.width/2+r.left,v.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}y%2===1&&(r.left!==r.top&&(x=r.left,r.left=r.top,r.top=x),r.width!==r.height&&(x=r.width,r.width=r.height,r.height=x)),v.length&&(i=WO(i,'<g transform="'+v.join(" ")+'">',"</g>"))});const a=o.width,l=o.height,c=r.width,u=r.height;let d,f;a===null?(f=l===null?"1em":l==="auto"?u:l,d=Nd(f,c/u)):(d=a==="auto"?c:a,f=l===null?Nd(d,u/c):l==="auto"?u:l);const p={},h=(m,v)=>{UO(v)||(p[m]=v.toString())};h("width",d),h("height",f);const g=[r.left,r.top,c,u];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:i}}const YO=/\sid="(\S+)"/g,GO="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let KO=0;function XO(e,t=GO){const n=[];let o;for(;o=YO.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const a=typeof t=="function"?t(i):t+(KO++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const Ia=Object.create(null);function ZO(e,t){Ia[e]=t}function Ma(e){return Ia[e]||Ia[""]}function $l(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Al=Object.create(null),Ro=["https://api.simplesvg.com","https://api.unisvg.com"],oi=[];for(;Ro.length>0;)Ro.length===1||Math.random()>.5?oi.push(Ro.shift()):oi.push(Ro.pop());Al[""]=$l({resources:["https://api.iconify.design"].concat(oi)});function QO(e,t){const n=$l(t);return n===null?!1:(Al[e]=n,!0)}function Dl(e){return Al[e]}const JO=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let kd=JO();function eP(e,t){const n=Dl(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let r=0;n.resources.forEach(a=>{r=Math.max(r,a.length)});const i=t+".json?icons=";o=n.maxURL-r-n.path.length-i.length}return o}function tP(e){return e===404}const nP=(e,t,n)=>{const o=[],r=eP(e,t),i="icons";let a={type:i,provider:e,prefix:t,icons:[]},l=0;return n.forEach((c,u)=>{l+=c.length+1,l>=r&&u>0&&(o.push(a),a={type:i,provider:e,prefix:t,icons:[]},l=c.length),a.icons.push(c)}),o.push(a),o};function oP(e){if(typeof e=="string"){const t=Dl(e);if(t)return t.path}return"/"}const rP=(e,t,n)=>{if(!kd){n("abort",424);return}let o=oP(t.provider);switch(t.type){case"icons":{const i=t.prefix,l=t.icons.join(","),c=new URLSearchParams({icons:l});o+=i+".json?"+c.toString();break}case"custom":{const i=t.uri;o+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let r=503;kd(e+o).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{n(tP(a)?"abort":"next",a)});return}return r=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",r)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",r)})},iP={prepare:nP,send:rP};function dm(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}function sP(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(i=>{const a=i.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==r)return!0;const u=c.name;if(e.icons[u])a.loaded.push({provider:o,prefix:r,name:u});else if(e.missing.has(u))a.missing.push({provider:o,prefix:r,name:u});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||dm([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let aP=0;function lP(e,t,n){const o=aP++,r=dm.bind(null,n,o);if(!t.pending.length)return r;const i={id:o,icons:t,callback:e,abort:r};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),r}function cP(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,i)=>r.provider!==i.provider?r.provider.localeCompare(i.provider):r.prefix!==i.prefix?r.prefix.localeCompare(i.prefix):r.name.localeCompare(i.name));let o={provider:"",prefix:"",name:""};return e.forEach(r=>{if(o.name===r.name&&o.prefix===r.prefix&&o.provider===r.provider)return;o=r;const i=r.provider,a=r.prefix,l=r.name,c=n[i]||(n[i]=Object.create(null)),u=c[a]||(c[a]=fo(i,a));let d;l in u.icons?d=t.loaded:a===""||u.missing.has(l)?d=t.missing:d=t.pending;const f={provider:i,prefix:a,name:l};d.push(f)}),t}function uP(e,t=!0,n=!1){const o=[];return e.forEach(r=>{const i=typeof r=="string"?vs(r,t,n):r;i&&o.push(i)}),o}const dP={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function fP(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let a;if(e.random){let E=e.resources.slice(0);for(a=[];E.length>1;){const k=Math.floor(Math.random()*E.length);a.push(E[k]),E=E.slice(0,k).concat(E.slice(k+1))}a=a.concat(E)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c="pending",u=0,d,f=null,p=[],h=[];typeof o=="function"&&h.push(o);function g(){f&&(clearTimeout(f),f=null)}function m(){c==="pending"&&(c="aborted"),g(),p.forEach(E=>{E.status==="pending"&&(E.status="aborted")}),p=[]}function v(E,k){k&&(h=[]),typeof E=="function"&&h.push(E)}function b(){return{startTime:l,payload:t,status:c,queriesSent:u,queriesPending:p.length,subscribe:v,abort:m}}function C(){c="failed",h.forEach(E=>{E(void 0,d)})}function y(){p.forEach(E=>{E.status==="pending"&&(E.status="aborted")}),p=[]}function x(E,k,R){const _=k!=="success";switch(p=p.filter(V=>V!==E),c){case"pending":break;case"failed":if(_||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){d=R,C();return}if(_){d=R,p.length||(a.length?w():C());return}if(g(),y(),!e.random){const V=e.resources.indexOf(E.resource);V!==-1&&V!==e.index&&(e.index=V)}c="completed",h.forEach(V=>{V(R)})}function w(){if(c!=="pending")return;g();const E=a.shift();if(E===void 0){if(p.length){f=setTimeout(()=>{g(),c==="pending"&&(y(),C())},e.timeout);return}C();return}const k={status:"pending",resource:E,callback:(R,_)=>{x(k,R,_)}};p.push(k),u++,f=setTimeout(w,e.rotate),n(E,t,k.callback)}return setTimeout(w),b}function fm(e){const t={...dP,...e};let n=[];function o(){n=n.filter(l=>l().status==="pending")}function r(l,c,u){const d=fP(t,l,c,(f,p)=>{o(),u&&u(f,p)});return n.push(d),d}function i(l){return n.find(c=>l(c))||null}return{query:r,find:i,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:o}}function Od(){}const Js=Object.create(null);function pP(e){if(!Js[e]){const t=Dl(e);if(!t)return;const n=fm(t),o={config:t,redundancy:n};Js[e]=o}return Js[e]}function hP(e,t,n){let o,r;if(typeof e=="string"){const i=Ma(e);if(!i)return n(void 0,424),Od;r=i.send;const a=pP(e);a&&(o=a.redundancy)}else{const i=$l(e);if(i){o=fm(i);const a=e.resources?e.resources[0]:"",l=Ma(a);l&&(r=l.send)}}return!o||!r?(n(void 0,424),Od):o.query(t,r,n)().abort}function Pd(){}function mP(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,sP(e)}))}function gP(e){const t=[],n=[];return e.forEach(o=>{(o.match(am)?t:n).push(o)}),{valid:t,invalid:n}}function _o(e,t,n){function o(){const r=e.pendingIcons;t.forEach(i=>{r&&r.delete(i),e.icons[i]||e.missing.add(i)})}if(n&&typeof n=="object")try{if(!sm(e,n).length){o();return}}catch(r){console.error(r)}o(),mP(e)}function Rd(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function yP(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;const i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Rd(e.loadIcons(r,o,n),d=>{_o(e,r,d)});return}if(i){r.forEach(d=>{const f=i(d,o,n);Rd(f,p=>{const h=p?{prefix:o,icons:{[d]:p}}:null;_o(e,[d],h)})});return}const{valid:a,invalid:l}=gP(r);if(l.length&&_o(e,l,null),!a.length)return;const c=o.match(am)?Ma(n):null;if(!c){_o(e,a,null);return}c.prepare(n,o,a).forEach(d=>{hP(n,d,f=>{_o(e,d.icons,f)})})}))}const bP=(e,t)=>{const n=uP(e,!0,lm()),o=cP(n);if(!o.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(o.loaded,o.missing,o.pending,Pd)}),()=>{c=!1}}const r=Object.create(null),i=[];let a,l;return o.pending.forEach(c=>{const{provider:u,prefix:d}=c;if(d===l&&u===a)return;a=u,l=d,i.push(fo(u,d));const f=r[u]||(r[u]=Object.create(null));f[d]||(f[d]=[])}),o.pending.forEach(c=>{const{provider:u,prefix:d,name:f}=c,p=fo(u,d),h=p.pendingIcons||(p.pendingIcons=new Set);h.has(f)||(h.add(f),r[u][d].push(f))}),i.forEach(c=>{const u=r[c.provider][c.prefix];u.length&&yP(c,u)}),t?lP(t,o,i):Pd};function vP(e,t){const n={...e};for(const o in t){const r=t[o],i=typeof r;o in cm?(r===null||r&&(i==="string"||i==="number"))&&(n[o]=r):i===typeof n[o]&&(n[o]=o==="rotate"?r%4:r)}return n}const xP=/[\s,]+/;function wP(e,t){t.split(xP).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function SP(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/r,i%1===0?o(i):0)}}return t}function EP(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function CP(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function TP(e){return"data:image/svg+xml,"+CP(e)}function NP(e){return'url("'+TP(e)+'")'}let qo;function kP(){try{qo=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{qo=null}}function OP(e){return qo===void 0&&kP(),qo?qo.createHTML(e):e}const pm={...um,inline:!1},PP={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},RP={display:"inline-block"},$a={backgroundColor:"currentColor"},hm={backgroundColor:"transparent"},_d={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Id={WebkitMask:$a,mask:$a,background:hm};for(const e in Id){const t=Id[e];for(const n in _d)t[e+n]=_d[n]}const _P={...pm,inline:!0};function Md(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const IP=(e,t,n)=>{const o=t.inline?_P:pm,r=vP(o,t),i=t.mode||"svg",a={},l=t.style||{},c={...i==="svg"?PP:{}};if(n){const v=vs(n,!1,!0);if(v){const b=["iconify"],C=["provider","prefix"];for(const y of C)v[y]&&b.push("iconify--"+v[y]);c.className=b.join(" ")}}for(let v in t){const b=t[v];if(b!==void 0)switch(v){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":c.ref=b;break;case"className":c[v]=(c[v]?c[v]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":r[v]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&wP(r,b);break;case"color":a.color=b;break;case"rotate":typeof b=="string"?r[v]=SP(b):typeof b=="number"&&(r[v]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete c["aria-hidden"];break;default:o[v]===void 0&&(c[v]=b)}}const u=qO(e,r),d=u.attributes;if(r.inline&&(a.verticalAlign="-0.125em"),i==="svg"){c.style={...a,...l},Object.assign(c,d);let v=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),c.dangerouslySetInnerHTML={__html:OP(XO(u.body,b?()=>b+"ID"+v++:"iconifyReact"))},F.createElement("svg",c)}const{body:f,width:p,height:h}=e,g=i==="mask"||(i==="bg"?!1:f.indexOf("currentColor")!==-1),m=EP(f,{...d,width:p+"",height:h+""});return c.style={...a,"--svg":NP(m),width:Md(d.width),height:Md(d.height),...RP,...g?$a:hm,...l},F.createElement("span",c)};lm(!0);ZO("",iP);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!FO(o))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const o="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;QO(n,r)||console.error(o)}catch{console.error(o)}}}}function mm(e){const[t,n]=F.useState(!!e.ssr),[o,r]=F.useState({});function i(h){if(h){const g=e.icon;if(typeof g=="object")return{name:"",data:g};const m=Td(g);if(m)return{name:g,data:m}}return{name:""}}const[a,l]=F.useState(i(!!e.ssr));function c(){const h=o.callback;h&&(h(),r({}))}function u(h){if(JSON.stringify(a)!==JSON.stringify(h))return c(),l(h),!0}function d(){var h;const g=e.icon;if(typeof g=="object"){u({name:"",data:g});return}const m=Td(g);if(u({name:g,data:m}))if(m===void 0){const v=bP([g],d);r({callback:v})}else m&&((h=e.onLoad)===null||h===void 0||h.call(e,g))}F.useEffect(()=>(n(!0),c),[]),F.useEffect(()=>{t&&d()},[e.icon,t]);const{name:f,data:p}=a;return p?IP({...Ml,...p},e,f):e.children?e.children:e.fallback?e.fallback:F.createElement("span",{})}const MP=F.forwardRef((e,t)=>mm({...e,_ref:t}));F.forwardRef((e,t)=>mm({inline:!0,...e,_ref:t}));const jl=F.forwardRef(({icon:e,width:t=20,sx:n,...o},r)=>T.jsx(Er,{ref:r,component:MP,className:"component-iconify",icon:e,sx:{width:t,height:t,...n},...o}));jl.displayName="Iconify";function Cr({title:e,icon:t,children:n}){return T.jsx(Er,{width:"150px",sx:{borderRadius:"3px",backgroundColor:"white",border:"1px solid #646464",boxShadow:"0 0 6px 2px rgba(0, 0, 0, 0.08)"},children:T.jsxs(gt,{children:[T.jsxs(gt,{direction:"row",spacing:1,sx:{p:.5,alignItems:"center"},children:[T.jsx(jl,{icon:t,width:20,sx:{color:"rgba(0, 167, 111, 0.7)"}}),T.jsx(tt,{variant:"caption",sx:{color:"#646464"},children:e})]}),n?T.jsxs(T.Fragment,{children:[T.jsx(sn,{}),n]}):null]})})}function $P(e){if(typeof e!="string")return null;const t=e.trim();return t||null}function AP(e){if(!e||typeof e!="object"||Array.isArray(e))return[];const t=e,n=[],o=new Set;for(const i of["field1","field2","field3","subject","body"])i in t&&(n.push(i),o.add(i));for(const i of Object.keys(t))o.has(i)||n.push(i);const r=[];for(const i of n){const a=$P(t[i]);if(a&&(r.push(a),r.length===3))break}return r}function Tr({nodeLabel:e,nodeMetaData:t}){const n=e?.trim()??"",o=!!n,r=AP(t);return T.jsxs(Er,{children:[T.jsx(tt,{variant:"caption",textAlign:"center",py:.5,sx:{color:o?"#646464":"#f36",fontSize:"8px",fontWeight:600},children:o?n:"Action required"}),r.map((i,a)=>T.jsx(tt,{variant:"caption",textAlign:"center",sx:{color:"#646464",fontSize:"8px",opacity:.85,lineHeight:"10px"},children:i},a))]})}function DP({data:e}){return T.jsxs(T.Fragment,{children:[T.jsx(Cr,{title:e.label,icon:e.icon??(e.kind==="start"?go:yo),children:T.jsx(Tr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),T.jsx(yt,{type:"source",position:fe.Bottom,id:"out"})]})}function jP({data:e}){return T.jsxs(T.Fragment,{children:[T.jsx(yt,{type:"target",position:fe.Top,id:"in"}),T.jsx(Cr,{title:e.label,icon:e.icon??(e.kind==="start"?go:yo),children:T.jsx(Tr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})})]})}function LP({data:e}){return T.jsxs(T.Fragment,{children:[T.jsx(yt,{type:"target",position:fe.Top,id:"in"}),T.jsx(Cr,{title:e.label,icon:e.icon??"ph:circle",children:T.jsx(Tr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),T.jsx(yt,{type:"source",position:fe.Bottom,id:"out"})]})}const FP={left:"30%"},BP={left:"70%"},zP={left:"50%"};function VP({data:e}){const t=e.kind==="abTest",n=e.nodeMetaData&&typeof e.nodeMetaData=="object"&&!Array.isArray(e.nodeMetaData)?e.nodeMetaData:{},r=e.kind==="waitForEvent"?n.hasTimeDependency!==!1:!0;return T.jsxs(T.Fragment,{children:[T.jsx(yt,{type:"target",position:fe.Top,id:"in"}),T.jsx(Cr,{title:e.label,icon:e.icon??"tabler:arrow-fork",children:T.jsx(Tr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),T.jsx(yt,{type:"source",position:fe.Bottom,id:"yes",style:r?FP:zP}),r&&T.jsx(yt,{type:"source",position:fe.Bottom,id:"no",style:BP}),T.jsxs("div",{style:{position:"absolute",width:150,left:0,top:"100%",marginTop:2,display:"flex",justifyContent:r?"space-between":"center",fontSize:9,color:"#4f4f4f",pointerEvents:"none"},children:[T.jsx("span",{style:{transform:r?"translateX(-6px)":void 0},children:t?"A":"Yes"}),r&&T.jsx("span",{style:{transform:"translateX(6px)"},children:t?"B":"No"})]})]})}function HP({data:e}){const t=Math.min(5,Math.max(2,Number(e.nodeMetaData?.choiceCount)||bo));return T.jsxs(T.Fragment,{children:[T.jsx(yt,{type:"target",position:fe.Top,id:"in"}),T.jsx(Cr,{title:e.label,icon:e.icon??"tabler:list-numbers",children:T.jsx(Tr,{nodeLabel:e.nodeLabel,nodeMetaData:e.nodeMetaData})}),Array.from({length:t}).map((n,o)=>{const r=o+1,i=(o+1)/(t+1)*100;return T.jsx(yt,{type:"source",position:fe.Bottom,id:`c${r}`,style:{left:`${i}%`}},r)}),T.jsx("div",{style:{position:"absolute",width:150,left:0,top:"100%",marginTop:2,display:"flex",justifyContent:"space-between",fontSize:9,color:"#4f4f4f",pointerEvents:"none"},children:Array.from({length:t}).map((n,o)=>T.jsx("span",{style:{width:`${100/t}%`,textAlign:"center"},children:o+1},o))})]})}function WP(e){if(e.length<2)return"";const[t,...n]=e;return`M ${t.x} ${t.y} `+n.map(o=>`L ${o.x} ${o.y}`).join(" ")}function UP(e){let t=0;for(let n=1;n<e.length;n++){const o=e[n].x-e[n-1].x,r=e[n].y-e[n-1].y;t+=Math.hypot(o,r)}return t}function qP(e){if(e.length===0)return{x:0,y:0};if(e.length===1)return e[0];const n=UP(e)/2;let o=0;for(let r=1;r<e.length;r++){const i=e[r-1],a=e[r],l=Math.hypot(a.x-i.x,a.y-i.y);if(o+l>=n){const c=l===0?0:(n-o)/l;return{x:i.x+(a.x-i.x)*c,y:i.y+(a.y-i.y)*c}}o+=l}return e[e.length-1]}const YP={width:22,height:22,background:"rgba(0, 167, 111, 0.7)",border:"1px solid rgba(2, 107, 72, 0.7)",cursor:"pointer",borderRadius:"50%",fontSize:12,lineHeight:1,color:"white",fontWeight:600,boxShadow:"0 0 6px 2px rgba(0, 0, 0, 0.08)",padding:0,display:"flex",alignItems:"center",justifyContent:"center"},GP={position:"absolute",background:"transparent",padding:10,color:"#4f4f4f",fontSize:9,fontWeight:500};function KP(e){const{id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:a,targetPosition:l,markerEnd:c,data:u}=e,d=e.sourceHandleId,f=Vw(),p=u?._onPlusClick,h=!!u?.isRedirect,g=i<o-5,[m,v,b]=Ka({sourceX:n,sourceY:o,sourcePosition:a,targetX:r,targetY:i,targetPosition:l}),C=150,y=f.length===0?Math.min(n,r):Math.min(...f.map(j=>j.position.x)),x=f.length===0?Math.max(n,r):Math.max(...f.map(j=>j.position.x+C)),w=140,E=Math.min(y-w,n-w,r-w),k=Math.max(x+w,n+w,r+w),R=h&&d==="yes",_=h&&d==="no",V=R?E:k,I=30,S=[{x:n,y:o},{x:V,y:o},{x:V,y:i-I},{x:r,y:i-I},{x:r,y:i}],A=WP(S),N=qP(S),O=g?A:m,P=g?N.x:v,L=g?N.y:b,M=u?.kind==="yes"?"Yes":u?.kind==="no"?"No":u?.kind==="branch"&&u?.branch?String(u.branch):"";return T.jsxs(T.Fragment,{children:[T.jsx(gr,{id:t,path:O,markerEnd:c,style:{strokeWidth:2,stroke:"#646464",strokeDasharray:h?"6 4":void 0}}),T.jsxs(Fw,{children:[!!M&&T.jsx("div",{style:{...GP,transform:`translate(-50%, 0%) translate(${n}px,${o-10}px)`},className:"nodrag nopan",children:M}),T.jsx("div",{style:{position:"absolute",transform:`translate(-50%, -50%) translate(${P}px,${L}px)`,pointerEvents:"all"},className:"nodrag nopan",children:T.jsx("button",{type:"button",onClick:()=>p?.(t),style:YP,title:"Edge actions",children:"+"})})]})]})}function XP({menu:e,onClose:t,definitions:n,onChooseKind:o,redirectCandidates:r,onChooseRedirectTarget:i,onSwitchMode:a}){const l=F.useMemo(()=>nm(n),[n]),c=F.useCallback(()=>{const f=[],p=(h,g,m)=>{f.push(T.jsx(tt,{variant:"body1",sx:{fontWeight:600,textAlign:"center",px:2,pt:f.length?2:1},children:h},`${m}-t`)),f.push(T.jsx(sn,{},`${m}-d`));for(const v of g){const b=v.enabled===!1;f.push(T.jsxs(Nt,{disabled:b,onClick:()=>o(e.edgeId,v.kind),sx:b?{opacity:.5}:void 0,children:[T.jsx(Vh,{children:T.jsx(jl,{icon:v.icon,width:28,sx:{color:"#646464"}})}),T.jsx(Fo,{children:v.title})]},`${m}-${v.kind}`))}};return p("Send Message",l["Send Message"],"sm"),p("Update",l.Update,"up"),p("Action",l.Action,"ac"),p("Event",l.Event,"ev"),f.push(T.jsx(sn,{},"redir-d")),f.push(T.jsx(Nt,{onClick:()=>a("redirect",!1),children:T.jsx(Fo,{primary:"Redirect to…"})},"redir")),f},[l,e,o,a]),u=F.useCallback(()=>[T.jsx(Ci,{disableSticky:!0,sx:{fontWeight:700,lineHeight:"32px"},children:e?.relinkSolid?"Relink solid edge to…":"Redirect to…"},"rs"),...r.map(f=>T.jsx(Nt,{onClick:()=>i(e.edgeId,f.id,!e?.relinkSolid),children:T.jsx(Fo,{primary:f.label,secondary:f.nodeLabel?.trim()?f.nodeLabel:`id: ${f.id}`})},`rc-${f.id}`)),T.jsx(sn,{},"rd1"),T.jsx(Nt,{onClick:()=>a("choose",!1),children:T.jsx(Fo,{primary:"Back"})},"back")],[e,r,i,a]),d=F.useMemo(()=>e?e.mode==="choose"?c():u():[],[e,c,u]);return T.jsx(Pl,{open:!!e,onClose:t,anchorReference:"anchorPosition",anchorPosition:e?.anchorPosition??{top:0,left:0},MenuListProps:{dense:!0},children:d})}function ZP({open:e,onClose:t,selectedNode:n,selectedDefinition:o,nodeLabel:r,setNodeLabel:i,nodeMetaData:a,setNodeMetaData:l,onSave:c}){const u=o?.drawerFormComponent,d=typeof u=="function"?u:jt;return T.jsxs(jh,{anchor:"right",open:e,onClose:t,PaperProps:{sx:{width:550,p:2}},children:[T.jsx(tt,{variant:"h6",sx:{mb:.5},children:"Node metadata"}),T.jsxs(tt,{sx:{fontSize:12,opacity:.75,mb:2},children:["Type: ",T.jsx("b",{children:n?.data?.label??"—"}),n?` • id: ${n.id}`:""]}),T.jsxs(gt,{spacing:2,children:[n?T.jsx(d,{node:n,nodeLabel:r,setNodeLabel:i,nodeMetaData:a,setNodeMetaData:l}):T.jsx(tt,{sx:{fontSize:13,opacity:.7},children:"No node selected."}),T.jsx(sn,{}),T.jsxs(gt,{direction:"row",spacing:1,children:[T.jsx(Qn,{variant:"outlined",onClick:t,fullWidth:!0,children:"Cancel"}),T.jsx(Qn,{variant:"contained",onClick:c,fullWidth:!0,children:"Save"})]})]})]})}const QP={start:DP,end:jP,conditional:VP,action:LP,multiChoice:HP},JP={plusEdge:KP};function vn(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function Hn(e){const t=vn(e);return Math.min(5,Math.max(2,Number(t.choiceCount)||bo))}function Aa(e){return vn(e).hasTimeDependency!==!1}function gm(e){return e.type==="conditional"&&e.data.kind==="waitForEvent"&&!Aa(e.data.nodeMetaData)}function eR(e){if(e==="yes"||e==="no")return e;const t=/^c(\d+)$/.exec(e??"");return t?t[1]:"child"}function tR(e,t){if(typeof t=="string"&&t.length>0)return t;if(e==="start"||e==="action")return"out"}function nR(e){return e==="start"||e==="end"||e==="action"||e==="conditional"||e==="multiChoice"}function Da(e,t){return`${e}::${t}`}function oR(e){if(e.type==="start"||e.type==="action")return[{sourceHandle:"out",kind:"default"}];if(e.type==="conditional")return gm(e)?[{sourceHandle:"yes",kind:"yes"}]:[{sourceHandle:"yes",kind:"yes"},{sourceHandle:"no",kind:"no"}];if(e.type==="multiChoice"){const t=Hn(e.data.nodeMetaData);return Array.from({length:t},(n,o)=>({sourceHandle:`c${o+1}`,kind:"branch",branch:o+1}))}return[]}function $d(e,t){const n=new Map(e.map(i=>[i.id,i.type])),o=new Set(e.map(i=>i.id)),r=new Set;for(const i of t){const a=n.get(i.source);if(!a||!nR(a)||!o.has(i.target))continue;const l=tR(a,i.sourceHandle);l&&r.add(Da(i.source,l))}return r}function rR(e){if(!e||typeof e!="object"||Array.isArray(e))return{};const t={};for(const[n,o]of Object.entries(e))typeof o!="string"||!o||(t[n]=o);return t}function iR(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}function sR(e){if(!e||typeof e!="object"||Array.isArray(e))return;const{x:t,y:n,zoom:o}=e;if(!(typeof t!="number"||typeof n!="number"||typeof o!="number"))return{x:t,y:n,zoom:o}}function aR(e){return e.map(t=>{if(!t.data)return t;const{_onPlusClick:n,...o}=t.data;return{...t,data:o}})}function lR(e){const t=Array.isArray(e?.nodes),n=Array.isArray(e?.edges);return{nodes:t?e?.nodes:kO,edges:n?aR(e?.edges):OO,viewport:sR(e?.viewport)}}function cR({nodeDefinitions:e=vo,initialFlow:t,onExportJson:n,onCancel:o}){const r=F.useRef(lR(t)),i=!!r.current.viewport,a=Bi(),l=Bw(),c=qw(),u=F.useMemo(()=>bs(e),[e]),[d,f]=Hw(r.current.nodes),[p,h,g]=Ww(r.current.edges),m=F.useRef(p);F.useEffect(()=>{m.current=p},[p]);const[v,b]=F.useState(null),C=F.useRef(!1),y=F.useRef(!1),[x,w]=F.useState(!1),[E,k]=F.useState(null),[R,_]=F.useState(""),[V,I]=F.useState({}),S=F.useRef(null),A=F.useCallback(G=>d.find(X=>X.id===G),[d]),N=F.useCallback((G,X)=>p.filter(te=>te.source===G&&(X==null?!0:(te.sourceHandle??null)===(X??null))).length,[p]),O=F.useCallback(G=>{if(C.current){y.current=!0;return}const X=a.getNodes(),te=a.getEdges(),re=wd(X,te);f(re),G?.fit&&requestAnimationFrame(()=>a.fitView({duration:300,padding:.35}))},[a,f]);F.useEffect(()=>{if(!c)return;const G=setTimeout(()=>O({fit:!i}),30);return()=>clearTimeout(G)},[c,O,i]),F.useEffect(()=>{if(!c)return;const G=r.current.viewport;if(!G)return;const X=setTimeout(()=>{a.setViewport(G)},60);return()=>clearTimeout(X)},[c,a]),F.useEffect(()=>{f(G=>{const X=new Set(G.map(ie=>ie.id)),te=new Map,re=new Map;for(const ie of p){if(!X.has(ie.source)||!X.has(ie.target))continue;const ge=eR(ie.sourceHandle),he=re.get(ie.source)??{};he[ge]=ie.target,re.set(ie.source,he),te.has(ie.target)||te.set(ie.target,ie.source)}let oe=!1;const ce=G.map(ie=>{const ge=te.get(ie.id),he=re.get(ie.id)??{},ue=rR(ie.data.childNodeIds),ve=ie.data.parentNodeId===ge,qe=iR(ue,he);return ve&&qe?ie:(oe=!0,{...ie,data:{...ie.data,parentNodeId:ge,childNodeIds:Object.keys(he).length>0?he:void 0}})});return oe?ce:G})},[p,f]),F.useEffect(()=>{f(G=>G.map(X=>{const te=X.data.kind??(X.id===at?"start":X.id===Ue?"end":void 0),re=te?u.get(te):void 0,oe=vn(X.data.nodeMetaData),ce=vn(re?.createInitialNodeMetaData?.()??{}),ie=re?{...ce,...oe}:oe,ge={...X.data,nodeMetaData:ie};if(X.id===at||X.id===Ue)return{...X,data:{...X.data,nodeMetaData:ie,label:re?.title??X.data.label??(X.id===at?"Entry":"Exit"),icon:re?.icon??X.data.icon??(X.id===at?go:yo)}};if(re&&!X.data.icon)return{...X,data:{...ge,icon:re.icon,label:X.data.label??re.title}};if(X.type==="multiChoice"){const he=Hn(ie);return{...X,data:{...ge,nodeMetaData:{...ie,choiceCount:he}}}}return{...X,data:ge}}))},[u,f]),F.useEffect(()=>{const G=S.current;if(!G)return;const X=d.find(oe=>oe.id===G.nodeId);if(!X||X.type!=="multiChoice"){S.current=null;return}const te=Hn(X.data.nodeMetaData);if(te!==G.nextCount)return;l(G.nodeId);const re=requestAnimationFrame(()=>{requestAnimationFrame(()=>{let oe=d,ce=p;const ie=[];for(let ge=te+1;ge<=5;ge++)ie.push(`c${ge}`);if(ie.length>0){const ge=Sd({nodeId:G.nodeId,removedHandles:ie,nodes:oe,edges:ce});oe=ge.nodes,ce=ge.edges}ce=ce.filter(ge=>{if(ge.source!==G.nodeId)return!0;const he=ge.sourceHandle??"",ue=/^c(\d)$/.exec(he);return ue?Number(ue[1])<=te:!0});for(let ge=1;ge<=te;ge++){const he=`c${ge}`;ce.some(ve=>ve.source===G.nodeId&&(ve.sourceHandle??"")===he)||(ce=[...ce,{id:`e-${G.nodeId}-${he}-${Ue}`,type:"plusEdge",source:G.nodeId,sourceHandle:he,target:Ue,targetHandle:"in",data:{kind:"branch",branch:ge,isRedirect:!1}}])}f(oe),h(ce),S.current=null,setTimeout(()=>O(),0)})});return()=>cancelAnimationFrame(re)},[d,p,f,h,O,l]),F.useEffect(()=>{if(!d.some(te=>te.id===Ue))return;const G=$d(d,p),X=[];for(const te of d)if(te.id!==Ue)for(const re of oR(te)){const oe=Da(te.id,re.sourceHandle);G.has(oe)||(X.push({id:`e-${te.id}-${re.sourceHandle}-${Ue}`,type:"plusEdge",source:te.id,sourceHandle:re.sourceHandle,target:Ue,targetHandle:"in",data:{kind:re.kind,branch:re.branch,isRedirect:!1}}),G.add(oe))}X.length!==0&&(h(te=>{const re=$d(d,te),oe=new Set(te.map(ie=>ie.id)),ce=[];for(const ie of X){const ge=ie.sourceHandle??"out",he=Da(ie.source,ge);if(re.has(he))continue;let ue=ie.id;oe.has(ue)&&(ue=`${ue}-${crypto.randomUUID().slice(0,8)}`),ce.push({...ie,id:ue}),re.add(he),oe.add(ue)}return ce.length>0?[...te,...ce]:te}),queueMicrotask(()=>O()))},[O,p,d,h]);const P=F.useCallback(()=>({version:2,nodes:d,edges:p.map(G=>{const{_onPlusClick:X,...te}=G.data??{};return{...G,data:te}}),viewport:a.getViewport()}),[d,p,a]),L=F.useCallback(()=>{const G=P();if(n){n(G);return}const X=JSON.stringify(G,null,2);console.log(X),navigator.clipboard?.writeText(X).catch(()=>{}),alert("Export copied to clipboard (and logged to console).")},[P,n]),M=F.useCallback(()=>{b(null),w(!1),o?.()},[o]),j=F.useCallback(G=>{if(!G.source||!G.target)return!1;const X=A(G.source),te=A(G.target);if(!X||!te||te.type==="start"||X.type==="end"||X.type==="start"&&N(X.id)>=1)return!1;if(X.type==="conditional"){const re=G.sourceHandle,oe=!gm(X);if(re!=="yes"&&(re!=="no"||!oe)||N(X.id,re)>=1)return!1}if(X.type==="action"&&((G.sourceHandle??"out")!=="out"||N(X.id,"out")>=1))return!1;if(X.type==="multiChoice"){const re=G.sourceHandle??"";if(!/^c[1-5]$/.test(re)||N(X.id,re)>=1)return!1}return!0},[A,N]),$=F.useCallback(G=>{const X=p.find(ie=>ie.id===G);if(!X)return;const te=a.getNode(X.source),re=a.getNode(X.target);if(!te||!re)return;const oe={x:(te.position.x+re.position.x)/2,y:(te.position.y+re.position.y)/2},ce=a.flowToScreenPosition(oe);b({edgeId:G,mode:"choose",relinkSolid:!1,anchorPosition:{top:ce.y,left:ce.x}})},[p,a]),B=F.useCallback((G,X)=>{const te=p.find(ye=>ye.id===G);if(!te)return;const re=a.getNode(te.source),oe=a.getNode(te.target);if(!re||!oe)return;const ce=u.get(X);if(!ce||!("nodeType"in ce))return;const ie=ce.nodeType,ge=(re.position.x+oe.position.x)/2,he=(re.position.y+oe.position.y)/2,ue=crypto.randomUUID(),ve=vn(ce.createInitialNodeMetaData?.()??{}),qe=ie==="multiChoice"?{...ve,choiceCount:Hn(ve)}:ve,Xe={id:ue,type:ie,position:{x:ge,y:he-40},data:{label:ce.title,nodeLabel:"",kind:X,icon:ce.icon,nodeMetaData:qe}};f(ye=>[...ye,Xe]),h(ye=>{const Se=ye.find(pt=>pt.id===G);if(!Se)return ye;const xe=ye.filter(pt=>pt.id!==G),Ze={id:`e-${Se.source}-${Se.sourceHandle??"out"}-${ue}`,type:"plusEdge",source:Se.source,sourceHandle:Se.sourceHandle,target:ue,targetHandle:"in",data:{kind:Se.data?.kind??"default",isRedirect:!1,branch:Se.data?.branch}};if(ie==="action"){const pt={id:`e-${ue}-out-${Se.target}`,type:"plusEdge",source:ue,sourceHandle:"out",target:Se.target,targetHandle:Se.targetHandle??"in",data:{kind:"default",isRedirect:!1}};return[...xe,Ze,pt]}if(ie==="conditional"){const pt={id:`e-${ue}-yes-${Se.target}`,type:"plusEdge",source:ue,sourceHandle:"yes",target:Se.target,targetHandle:Se.targetHandle??"in",data:{kind:"yes",isRedirect:!1}},pe={id:`e-${ue}-no-${Se.target}`,type:"plusEdge",source:ue,sourceHandle:"no",target:Se.target,targetHandle:Se.targetHandle??"in",data:{kind:"no",isRedirect:!1}};return[...xe,Ze,pt,pe]}const ft=Math.min(5,Math.max(2,bo)),xo=Array.from({length:ft}).map((pt,pe)=>{const Ee=pe+1;return{id:`e-${ue}-c${Ee}-${Se.target}`,type:"plusEdge",source:ue,sourceHandle:`c${Ee}`,target:Se.target,targetHandle:Se.targetHandle??"in",data:{kind:"branch",branch:Ee,isRedirect:!1}}});return[...xe,Ze,...xo]}),b(null),queueMicrotask(()=>O())},[p,u,a,h,f,O]),H=F.useCallback((G,X,te)=>{const re=A(X);re&&re.type!=="start"&&(h(oe=>oe.map(ce=>{if(ce.id!==G)return ce;const ie=ce.data??{kind:"default"},ge=te.makeRedirect&&!ie.isRedirect?ce.target:ie.baseTarget,he=te.makeRedirect&&!ie.isRedirect?ce.targetHandle??"in":ie.baseTargetHandle;return{...ce,target:X,targetHandle:"in",data:{...ie,isRedirect:!!te.makeRedirect,baseTarget:te.makeRedirect?ge:void 0,baseTargetHandle:te.makeRedirect?he:void 0}}})),b(null),queueMicrotask(()=>O()))},[A,h,O]),U=F.useCallback(async G=>{const X=G.nodes??[];if(X.length===0||X.length!==1)return!0;const te=X[0];if(te.type==="start"||te.type==="end")return!1;const re=a.getEdges(),oe=a.getNodes(),ce=oe.find(xe=>xe.id===te.id);if(!ce)return!1;const ie=re.filter(xe=>xe.target===te.id),ge=re.filter(xe=>xe.source===te.id),he=ie.find(xe=>!xe.data?.isRedirect)??ie[0],ue=xe=>xe.find(Ze=>!Ze.data?.isRedirect)??xe[0];let ve;if(ce.type==="conditional"){const xe=ge.filter(Ze=>Ze.sourceHandle==="yes");ve=ue(xe)??ue(ge)}else if(ce.type==="multiChoice"){const xe=ge.filter(Ze=>Ze.sourceHandle==="c1");ve=ue(xe)??ue(ge)}else{const xe=ge.filter(Ze=>(Ze.sourceHandle??"out")==="out");ve=ue(xe)??ue(ge)}const qe=re.filter(xe=>xe.source!==te.id&&xe.target!==te.id),Xe=oe.filter(xe=>xe.id!==te.id);let ye=qe;if(he&&ve&&ve.target!==at){const xe={id:`e-${he.source}-${he.sourceHandle??"out"}-${ve.target}`,type:"plusEdge",source:he.source,sourceHandle:he.sourceHandle,target:ve.target,targetHandle:ve.targetHandle??"in",data:{kind:he.data?.kind??"default",isRedirect:!1,branch:he.data?.branch}};ye.some(ft=>ft.source===xe.source&&(ft.sourceHandle??null)===(xe.sourceHandle??null)&&ft.target===xe.target)||(ye=[...ye,xe])}h(ye);const Se=wd(Xe,ye);return f(Se),!1},[a,h,f]),W=F.useCallback((G,X)=>{const te=G.data,re=te?.kind??(X.sourceHandle==="yes"?"yes":X.sourceHandle==="no"?"no":/^c[1-5]$/.test(X.sourceHandle??"")?"branch":"default"),oe=te?.branch??(()=>{const he=/^c(\d)$/.exec(X.sourceHandle??"");return he?Number(he[1]):void 0})(),ce=!!te?.isRedirect,ie=te?.baseTarget,ge=te?.baseTargetHandle;h(he=>nv(G,X,he).map(ue=>{if(ue.id!==G.id)return{...ue,data:ue.data??{kind:"default"}};const ve=ue.data??{kind:re};return{...ue,data:{kind:ve.kind??re,branch:ve.branch??oe,isRedirect:!0,baseTarget:ce?ie:G.target,baseTargetHandle:ce?ge:G.targetHandle??"in"}}})),queueMicrotask(()=>O())},[h,O]),K=F.useCallback(G=>{f(X=>tl(G,X))},[f]),Q=F.useCallback(G=>{const X=G.filter(re=>{if(re.type!=="remove")return!1;const oe=re.id;return oe?!!m.current.find(ie=>ie.id===oe)?.data?.isRedirect:!1}),te=G.filter(re=>{if(re.type!=="remove")return!0;const oe=re.id;return oe?!m.current.find(ie=>ie.id===oe)?.data?.isRedirect:!0});te.length&&(h(re=>nl(te,re)),g(te));for(const re of X){const oe=re.id,ce=m.current.find(Xe=>Xe.id===oe);if(!ce)continue;const ie=ce.data?.baseTarget??Ue,ge=ce.data?.baseTargetHandle??"in";h(Xe=>Xe.map(ye=>ye.id===oe?{...ye,target:ie,targetHandle:ge,data:{...ye.data??{kind:"default"},isRedirect:!1,baseTarget:void 0,baseTargetHandle:void 0}}:ye));const he=a.getNode(ce.source),ue=a.getNode(ie),ve=he&&ue?{x:(he.position.x+ue.position.x)/2,y:(he.position.y+ue.position.y)/2}:{x:0,y:0},qe=a.flowToScreenPosition(ve);b({edgeId:oe,mode:"redirect",relinkSolid:!0,anchorPosition:{top:qe.y,left:qe.x}}),queueMicrotask(()=>O())}},[h,g,a,O]),ee=F.useMemo(()=>p.map(G=>({...G,data:{...G.data??{kind:"default"},_onPlusClick:$}})),[p,$]),q=F.useMemo(()=>d.filter(G=>G.type!=="start").map(G=>({id:G.id,label:G.data?.label??G.id,nodeLabel:G.data?.nodeLabel??""})),[d]),J=F.useCallback((G,X)=>{X.data?.isRedirect&&(G.preventDefault(),G.stopPropagation(),b({edgeId:X.id,mode:"redirect",relinkSolid:!1,anchorPosition:{top:G.clientY,left:G.clientX}}))},[]),Z=F.useCallback((G,X)=>{k(X.id),_(X.data?.nodeLabel??"");const te=vn(X.data.nodeMetaData);I(X.type==="multiChoice"?{...te,choiceCount:Hn(te)}:te),w(!0)},[]),ne=F.useMemo(()=>E?A(E):void 0,[A,E]),z=F.useMemo(()=>{const G=ne?.data?.kind??(ne?.id===at?"start":ne?.id===Ue?"end":void 0);if(G)return u.get(G)},[u,ne]),ae=F.useCallback(()=>{if(!E)return;const G=d.find(ve=>ve.id===E),X=G?.type==="multiChoice",te=G?.type==="conditional"&&G.data.kind==="waitForEvent",re=vn(V),oe=Hn(re),ce=te?Aa(G.data.nodeMetaData):void 0,ie=te?Aa(re):void 0,ge=te&&ce!==ie;let he=d.map(ve=>ve.id===E?{...ve,data:{...ve.data??{label:""},nodeLabel:R,nodeMetaData:ve.type==="multiChoice"?{...re,choiceCount:oe}:re}}:ve),ue=p;if(te&&ce&&!ie){const ve=Sd({nodeId:E,removedHandles:["no"],nodes:he,edges:ue});he=ve.nodes,ue=ve.edges.filter(qe=>!(qe.source===E&&(qe.sourceHandle??"")==="no"))}if(te&&!ce&&ie){const ve=ue.find(Se=>Se.source===E&&(Se.sourceHandle??"")==="yes"),qe=ve?.target??Ue,Xe=ve?.targetHandle??"in";let ye=!1;if(ue=ue.map(Se=>Se.source!==E||(Se.sourceHandle??"")!=="no"?Se:(ye=!0,{...Se,target:qe,targetHandle:Xe,data:{...Se.data??{kind:"no"},kind:"no",isRedirect:!1,baseTarget:void 0,baseTargetHandle:void 0}})),!ye){const Se=new Set(ue.map(ft=>ft.id)),xe=`e-${E}-no-${qe}`,Ze=Se.has(xe)?`${xe}-${crypto.randomUUID().slice(0,8)}`:xe;ue=[...ue,{id:Ze,type:"plusEdge",source:E,sourceHandle:"no",target:qe,targetHandle:Xe,data:{kind:"no",isRedirect:!1}}]}}if(f(he),h(ue),X&&(S.current={nodeId:E,nextCount:oe}),w(!1),ge){const ve=E;requestAnimationFrame(()=>{l(ve),requestAnimationFrame(()=>O())});return}queueMicrotask(()=>O())},[E,R,V,d,p,f,h,l,O]),se=F.useCallback(()=>b(null),[]),de=F.useCallback(()=>{C.current=!0},[]),we=F.useCallback(()=>{C.current=!1,y.current&&(y.current=!1,O())},[O]),Te=F.useCallback((G,X)=>{b(te=>te&&{...te,mode:G,relinkSolid:X??te.relinkSolid})},[]);return T.jsxs(Er,{sx:{width:"100%",height:"88vh",border:"1px solid #ddd",borderRadius:2,position:"relative",overflow:"hidden",bgcolor:"white"},children:[T.jsxs(gt,{direction:"row",spacing:1,sx:{p:1.25,borderBottom:"1px solid #eee",alignItems:"center"},children:[T.jsx(Qn,{variant:"contained",size:"small",onClick:L,children:"Save"}),T.jsx(Qn,{variant:"outlined",size:"small",onClick:M,children:"Cancel / Close"}),T.jsx(Qn,{variant:"outlined",size:"small",onClick:()=>O({fit:!0}),children:"Auto layout"}),T.jsx(tt,{sx:{ml:"auto",fontSize:12,opacity:.75},children:"Redirect edge delete ⇒ restores solid + asks relink"})]}),T.jsx(XP,{menu:v,onClose:se,definitions:e,onChooseKind:(G,X)=>B(G,X),redirectCandidates:q,onChooseRedirectTarget:(G,X,te)=>H(G,X,{makeRedirect:te}),onSwitchMode:Te}),T.jsxs(jw,{nodes:d,edges:ee,onNodesChange:K,onEdgesChange:Q,nodeTypes:QP,edgeTypes:JP,fitView:!i,isValidConnection:j,onBeforeDelete:U,onReconnect:W,onEdgeClick:J,onNodeClick:Z,onNodeDragStart:de,onNodeDragStop:we,defaultEdgeOptions:{markerEnd:{type:Jo.Arrow,width:12,height:12}},children:[T.jsx(rS,{}),T.jsx(Zw,{})]}),T.jsx(ZP,{open:x,onClose:()=>w(!1),selectedNode:ne,selectedDefinition:z,nodeLabel:R,setNodeLabel:_,nodeMetaData:V,setNodeMetaData:I,onSave:ae})]})}function uR({nodeDefinitions:e,extendNodeDefinitions:t=[],initialFlow:n,onExportJson:o,onCancel:r}){const i=F.useMemo(()=>e||tm(vo,t),[e,t]);return T.jsx(vp,{children:T.jsx(cR,{nodeDefinitions:i,initialFlow:n,onExportJson:o,onCancel:r})})}exports.CATEGORIES=TO;exports.DEFAULT_MULTI_CHOICE_COUNT=bo;exports.DEFAULT_NODE_DEFINITIONS=vo;exports.END_ICON=yo;exports.END_ID=Ue;exports.FlowEditor=uR;exports.NODE_DEFINITIONS=CO;exports.START_ICON=go;exports.START_ID=at;exports.createNodeDefinitionMap=bs;exports.groupDefinitions=nm;exports.kindToNodeType=NO;exports.mergeNodeDefinitions=tm;
|