@ws-ui/roles-editor 1.8.4-rc5 → 1.8.4-rc6

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/index.cjs.js CHANGED
@@ -1,52 +1,52 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),Z=require("@ws-ui/store"),A=require("react"),De=require("@ws-ui/shared"),xr=require("@headlessui/react"),iD=require("react-dom"),ye=require("@ws-ui/icons"),oD=require("./common.cjs");function aD(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ve=aD(A),Gb=aD(iD);var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Uf={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),Z=require("@ws-ui/store"),A=require("react"),De=require("@ws-ui/shared"),xr=require("@headlessui/react"),oD=require("react-dom"),ye=require("@ws-ui/icons"),yc=require("./common.cjs");function aD(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ve=aD(A),Kb=aD(oD);var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vf={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */var q1;function Yz(){return q1||(q1=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",a=0;a<arguments.length;a++){var u=arguments[a];u&&(o=i(o,n(u)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var u in o)t.call(o,u)&&o[u]&&(a=i(a,u));return a}function i(o,a){return a?o?o+" "+a:o+a:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Uf)),Uf.exports}var Xz=Yz();const Ve=Hn(Xz);function Zz({qodly:e,activeTab:t,forceLogin:r,onTabChange:n,restrictedByDefault:i,onRestrictedByDefaultChange:o,onForceLoginChange:a}){return C.jsx(C.Fragment,{children:C.jsx("nav",{className:"relative mb-0 flex h-auto flex-wrap items-center justify-between border-b border-grey-900 bg-grey-800 px-4 py-3",children:C.jsx("div",{className:"flex w-full flex-wrap items-center justify-between",children:C.jsxs("div",{className:"relative flex w-full justify-between",children:[C.jsx("span",{className:"inline-block whitespace-nowrap text-sm leading-relaxed text-white",children:C.jsxs("div",{className:"flex items-center justify-center",children:[C.jsx("button",{"data-cy":"roles_btn_navbar",className:Ve(" min-w-[110px] rounded-l px-4 py-2 text-xs text-white outline-none transition-all duration-150 ease-linear focus:bg-primary-dark focus:text-white focus:outline-none",t==="roles"?"bg-primary-dark font-bold":"bg-grey-300 hover:bg-primary-hover hover:text-white"),type:"button",onClick:()=>n("roles"),children:"Roles"}),C.jsx("button",{"data-cy":"privileges_btn_navbar",className:Ve(" min-w-[110px] rounded-r px-4 py-2 text-xs text-white outline-none transition-all duration-150 ease-linear focus:bg-primary-dark focus:text-white focus:outline-none",t==="privileges"?"bg-primary-dark font-bold":"bg-grey-300 hover:bg-primary-hover hover:text-white"),type:"button",onClick:()=>n("privileges"),children:"Privileges"})]})}),C.jsxs("div",{className:"flex gap-2 justify-between",children:[C.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[C.jsx(De.ControlledSwitch,{size:"sm",value:i||!1,onChange:u=>{o(u)}}),C.jsx("span",{className:"px-1 text-xs text-white",children:"Restrict Access By Default"}),C.jsx(De.Tip,{tipKey:"editors:roles:toolbar:restrictedByDefault",alwaysOn:!0,side:"left"})]}),e===!1&&C.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[C.jsx(De.ControlledSwitch,{size:"sm",value:r||!1,onChange:u=>{a(u)}}),C.jsx("span",{className:"px-1 text-xs text-white",children:"Force login"}),C.jsx(De.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const sD=A.createContext(void 0),Jz=({children:e})=>{const[t,r]=A.useState(null);function n(o){r(o)}const i={selectedRole:t,selectRole:n};return C.jsx(sD.Provider,{value:i,children:e})};function Kb(){const e=A.useContext(sD);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var k1=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},L1=typeof window<"u"&&window.document&&window.document.createElement?ve.useLayoutEffect:ve.useEffect,Wt="top",_r="bottom",Er="right",Gt="left",Yb="auto",Ba=[Wt,_r,Er,Gt],co="start",Ia="end",Qz="clippingParents",uD="viewport",Xo="popper",eH="reference",B1=Ba.reduce(function(e,t){return e.concat([t+"-"+co,t+"-"+Ia])},[]),cD=[].concat(Ba,[Yb]).reduce(function(e,t){return e.concat([t,t+"-"+co,t+"-"+Ia])},[]),tH="beforeRead",rH="read",nH="afterRead",iH="beforeMain",oH="main",aH="afterMain",sH="beforeWrite",uH="write",cH="afterWrite",lH=[tH,rH,nH,iH,oH,aH,sH,uH,cH];function tn(e){return e?(e.nodeName||"").toLowerCase():null}function ar(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pi(e){var t=ar(e).Element;return e instanceof t||e instanceof Element}function wr(e){var t=ar(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Xb(e){if(typeof ShadowRoot>"u")return!1;var t=ar(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function fH(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!wr(o)||!tn(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var u=i[a];u===!1?o.removeAttribute(a):o.setAttribute(a,u===!0?"":u)}))})}function dH(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},a=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),u=a.reduce(function(c,d){return c[d]="",c},{});!wr(i)||!tn(i)||(Object.assign(i.style,u),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const hH={name:"applyStyles",enabled:!0,phase:"write",fn:fH,effect:dH,requires:["computeStyles"]};function Jr(e){return e.split("-")[0]}var ui=Math.max,zu=Math.min,lo=Math.round;function wb(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function lD(){return!/^((?!chrome|android).)*safari/i.test(wb())}function fo(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&wr(e)&&(i=e.offsetWidth>0&&lo(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&lo(n.height)/e.offsetHeight||1);var a=pi(e)?ar(e):window,u=a.visualViewport,c=!lD()&&r,d=(n.left+(c&&u?u.offsetLeft:0))/i,f=(n.top+(c&&u?u.offsetTop:0))/o,h=n.width/i,p=n.height/o;return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function Zb(e){var t=fo(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function fD(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Xb(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function yn(e){return ar(e).getComputedStyle(e)}function pH(e){return["table","td","th"].indexOf(tn(e))>=0}function Un(e){return((pi(e)?e.ownerDocument:e.document)||window.document).documentElement}function yc(e){return tn(e)==="html"?e:e.assignedSlot||e.parentNode||(Xb(e)?e.host:null)||Un(e)}function F1(e){return!wr(e)||yn(e).position==="fixed"?null:e.offsetParent}function vH(e){var t=/firefox/i.test(wb()),r=/Trident/i.test(wb());if(r&&wr(e)){var n=yn(e);if(n.position==="fixed")return null}var i=yc(e);for(Xb(i)&&(i=i.host);wr(i)&&["html","body"].indexOf(tn(i))<0;){var o=yn(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Fa(e){for(var t=ar(e),r=F1(e);r&&pH(r)&&yn(r).position==="static";)r=F1(r);return r&&(tn(r)==="html"||tn(r)==="body"&&yn(r).position==="static")?t:r||vH(e)||t}function Jb(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Sa(e,t,r){return ui(e,zu(t,r))}function gH(e,t,r){var n=Sa(e,t,r);return n>r?r:n}function dD(){return{top:0,right:0,bottom:0,left:0}}function hD(e){return Object.assign({},dD(),e)}function pD(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var mH=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,hD(typeof t!="number"?t:pD(t,Ba))};function yH(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,u=Jr(r.placement),c=Jb(u),d=[Gt,Er].indexOf(u)>=0,f=d?"height":"width";if(!(!o||!a)){var h=mH(i.padding,r),p=Zb(o),v=c==="y"?Wt:Gt,m=c==="y"?_r:Er,y=r.rects.reference[f]+r.rects.reference[c]-a[c]-r.rects.popper[f],b=a[c]-r.rects.reference[c],x=Fa(o),w=x?c==="y"?x.clientHeight||0:x.clientWidth||0:0,S=y/2-b/2,E=h[v],_=w-p[f]-h[m],R=w/2-p[f]/2+S,P=Sa(E,R,_),N=c;r.modifiersData[n]=(t={},t[N]=P,t.centerOffset=P-R,t)}}function bH(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||fD(t.elements.popper,i)&&(t.elements.arrow=i))}const xH={name:"arrow",enabled:!0,phase:"main",fn:yH,effect:bH,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ho(e){return e.split("-")[1]}var wH={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _H(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:lo(r*i)/i||0,y:lo(n*i)/i||0}}function $1(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,u=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=a.x,v=p===void 0?0:p,m=a.y,y=m===void 0?0:m,b=typeof f=="function"?f({x:v,y}):{x:v,y};v=b.x,y=b.y;var x=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),S=Gt,E=Wt,_=window;if(d){var R=Fa(r),P="clientHeight",N="clientWidth";if(R===ar(r)&&(R=Un(r),yn(R).position!=="static"&&u==="absolute"&&(P="scrollHeight",N="scrollWidth")),R=R,i===Wt||(i===Gt||i===Er)&&o===Ia){E=_r;var j=h&&R===_&&_.visualViewport?_.visualViewport.height:R[P];y-=j-n.height,y*=c?1:-1}if(i===Gt||(i===Wt||i===_r)&&o===Ia){S=Er;var L=h&&R===_&&_.visualViewport?_.visualViewport.width:R[N];v-=L-n.width,v*=c?1:-1}}var F=Object.assign({position:u},d&&wH),k=f===!0?_H({x:v,y},ar(r)):{x:v,y};if(v=k.x,y=k.y,c){var D;return Object.assign({},F,(D={},D[E]=w?"0":"",D[S]=x?"0":"",D.transform=(_.devicePixelRatio||1)<=1?"translate("+v+"px, "+y+"px)":"translate3d("+v+"px, "+y+"px, 0)",D))}return Object.assign({},F,(t={},t[E]=w?y+"px":"",t[S]=x?v+"px":"",t.transform="",t))}function EH(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,a=o===void 0?!0:o,u=r.roundOffsets,c=u===void 0?!0:u,d={placement:Jr(t.placement),variation:ho(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,$1(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,$1(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const SH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:EH,data:{}};var su={passive:!0};function OH(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,u=a===void 0?!0:a,c=ar(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",r.update,su)}),u&&c.addEventListener("resize",r.update,su),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",r.update,su)}),u&&c.removeEventListener("resize",r.update,su)}}const CH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:OH,data:{}};var RH={left:"right",right:"left",bottom:"top",top:"bottom"};function Au(e){return e.replace(/left|right|bottom|top/g,function(t){return RH[t]})}var PH={start:"end",end:"start"};function z1(e){return e.replace(/start|end/g,function(t){return PH[t]})}function Qb(e){var t=ar(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function ex(e){return fo(Un(e)).left+Qb(e).scrollLeft}function IH(e,t){var r=ar(e),n=Un(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;var d=lD();(d||!d&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:u+ex(e),y:c}}function NH(e){var t,r=Un(e),n=Qb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=ui(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=ui(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-n.scrollLeft+ex(e),c=-n.scrollTop;return yn(i||r).direction==="rtl"&&(u+=ui(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:c}}function tx(e){var t=yn(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function vD(e){return["html","body","#document"].indexOf(tn(e))>=0?e.ownerDocument.body:wr(e)&&tx(e)?e:vD(yc(e))}function Oa(e,t){var r;t===void 0&&(t=[]);var n=vD(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=ar(n),a=i?[o].concat(o.visualViewport||[],tx(n)?n:[]):n,u=t.concat(a);return i?u:u.concat(Oa(yc(a)))}function _b(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function TH(e,t){var r=fo(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function H1(e,t,r){return t===uD?_b(IH(e,r)):pi(t)?TH(t,r):_b(NH(Un(e)))}function AH(e){var t=Oa(yc(e)),r=["absolute","fixed"].indexOf(yn(e).position)>=0,n=r&&wr(e)?Fa(e):e;return pi(n)?t.filter(function(i){return pi(i)&&fD(i,n)&&tn(i)!=="body"}):[]}function MH(e,t,r,n){var i=t==="clippingParents"?AH(e):[].concat(t),o=[].concat(i,[r]),a=o[0],u=o.reduce(function(c,d){var f=H1(e,d,n);return c.top=ui(f.top,c.top),c.right=zu(f.right,c.right),c.bottom=zu(f.bottom,c.bottom),c.left=ui(f.left,c.left),c},H1(e,a,n));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function gD(e){var t=e.reference,r=e.element,n=e.placement,i=n?Jr(n):null,o=n?ho(n):null,a=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2,c;switch(i){case Wt:c={x:a,y:t.y-r.height};break;case _r:c={x:a,y:t.y+t.height};break;case Er:c={x:t.x+t.width,y:u};break;case Gt:c={x:t.x-r.width,y:u};break;default:c={x:t.x,y:t.y}}var d=i?Jb(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case co:c[d]=c[d]-(t[f]/2-r[f]/2);break;case Ia:c[d]=c[d]+(t[f]/2-r[f]/2);break}}return c}function Na(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.strategy,a=o===void 0?e.strategy:o,u=r.boundary,c=u===void 0?Qz:u,d=r.rootBoundary,f=d===void 0?uD:d,h=r.elementContext,p=h===void 0?Xo:h,v=r.altBoundary,m=v===void 0?!1:v,y=r.padding,b=y===void 0?0:y,x=hD(typeof b!="number"?b:pD(b,Ba)),w=p===Xo?eH:Xo,S=e.rects.popper,E=e.elements[m?w:p],_=MH(pi(E)?E:E.contextElement||Un(e.elements.popper),c,f,a),R=fo(e.elements.reference),P=gD({reference:R,element:S,placement:i}),N=_b(Object.assign({},S,P)),j=p===Xo?N:R,L={top:_.top-j.top+x.top,bottom:j.bottom-_.bottom+x.bottom,left:_.left-j.left+x.left,right:j.right-_.right+x.right},F=e.modifiersData.offset;if(p===Xo&&F){var k=F[i];Object.keys(L).forEach(function(D){var T=[Er,_r].indexOf(D)>=0?1:-1,B=[Wt,_r].indexOf(D)>=0?"y":"x";L[D]+=k[B]*T})}return L}function DH(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,u=r.flipVariations,c=r.allowedAutoPlacements,d=c===void 0?cD:c,f=ho(n),h=f?u?B1:B1.filter(function(m){return ho(m)===f}):Ba,p=h.filter(function(m){return d.indexOf(m)>=0});p.length===0&&(p=h);var v=p.reduce(function(m,y){return m[y]=Na(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[Jr(y)],m},{});return Object.keys(v).sort(function(m,y){return v[m]-v[y]})}function jH(e){if(Jr(e)===Yb)return[];var t=Au(e);return[z1(e),t,z1(t)]}function qH(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,u=a===void 0?!0:a,c=r.fallbackPlacements,d=r.padding,f=r.boundary,h=r.rootBoundary,p=r.altBoundary,v=r.flipVariations,m=v===void 0?!0:v,y=r.allowedAutoPlacements,b=t.options.placement,x=Jr(b),w=x===b,S=c||(w||!m?[Au(b)]:jH(b)),E=[b].concat(S).reduce(function(z,G){return z.concat(Jr(G)===Yb?DH(t,{placement:G,boundary:f,rootBoundary:h,padding:d,flipVariations:m,allowedAutoPlacements:y}):G)},[]),_=t.rects.reference,R=t.rects.popper,P=new Map,N=!0,j=E[0],L=0;L<E.length;L++){var F=E[L],k=Jr(F),D=ho(F)===co,T=[Wt,_r].indexOf(k)>=0,B=T?"width":"height",$=Na(t,{placement:F,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),W=T?D?Er:Gt:D?_r:Wt;_[B]>R[B]&&(W=Au(W));var Y=Au(W),ee=[];if(o&&ee.push($[k]<=0),u&&ee.push($[W]<=0,$[Y]<=0),ee.every(function(z){return z})){j=F,N=!1;break}P.set(F,ee)}if(N)for(var H=m?3:1,Q=function(G){var J=E.find(function(V){var K=P.get(V);if(K)return K.slice(0,G).every(function(ie){return ie})});if(J)return j=J,"break"},ce=H;ce>0;ce--){var se=Q(ce);if(se==="break")break}t.placement!==j&&(t.modifiersData[n]._skip=!0,t.placement=j,t.reset=!0)}}const kH={name:"flip",enabled:!0,phase:"main",fn:qH,requiresIfExists:["offset"],data:{_skip:!1}};function U1(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function V1(e){return[Wt,Er,_r,Gt].some(function(t){return e[t]>=0})}function LH(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Na(t,{elementContext:"reference"}),u=Na(t,{altBoundary:!0}),c=U1(a,n),d=U1(u,i,o),f=V1(c),h=V1(d);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const BH={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:LH};function FH(e,t,r){var n=Jr(e),i=[Gt,Wt].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=o[0],u=o[1];return a=a||0,u=(u||0)*i,[Gt,Er].indexOf(n)>=0?{x:u,y:a}:{x:a,y:u}}function $H(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=cD.reduce(function(f,h){return f[h]=FH(h,t.rects,o),f},{}),u=a[t.placement],c=u.x,d=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[n]=a}const zH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:$H};function HH(e){var t=e.state,r=e.name;t.modifiersData[r]=gD({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const UH={name:"popperOffsets",enabled:!0,phase:"read",fn:HH,data:{}};function VH(e){return e==="x"?"y":"x"}function WH(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,u=a===void 0?!1:a,c=r.boundary,d=r.rootBoundary,f=r.altBoundary,h=r.padding,p=r.tether,v=p===void 0?!0:p,m=r.tetherOffset,y=m===void 0?0:m,b=Na(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),x=Jr(t.placement),w=ho(t.placement),S=!w,E=Jb(x),_=VH(E),R=t.modifiersData.popperOffsets,P=t.rects.reference,N=t.rects.popper,j=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,L=typeof j=="number"?{mainAxis:j,altAxis:j}:Object.assign({mainAxis:0,altAxis:0},j),F=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(R){if(o){var D,T=E==="y"?Wt:Gt,B=E==="y"?_r:Er,$=E==="y"?"height":"width",W=R[E],Y=W+b[T],ee=W-b[B],H=v?-N[$]/2:0,Q=w===co?P[$]:N[$],ce=w===co?-N[$]:-P[$],se=t.elements.arrow,z=v&&se?Zb(se):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:dD(),J=G[T],V=G[B],K=Sa(0,P[$],z[$]),ie=S?P[$]/2-H-K-J-L.mainAxis:Q-K-J-L.mainAxis,ne=S?-P[$]/2+H+K+V+L.mainAxis:ce+K+V+L.mainAxis,ue=t.elements.arrow&&Fa(t.elements.arrow),de=ue?E==="y"?ue.clientTop||0:ue.clientLeft||0:0,we=(D=F==null?void 0:F[E])!=null?D:0,Se=W+ie-we-de,_e=W+ne-we,he=Sa(v?zu(Y,Se):Y,W,v?ui(ee,_e):ee);R[E]=he,k[E]=he-W}if(u){var ae,Oe=E==="x"?Wt:Gt,Ne=E==="x"?_r:Er,He=R[_],qe=_==="y"?"height":"width",Xe=He+b[Oe],We=He-b[Ne],mt=[Wt,Gt].indexOf(x)!==-1,et=(ae=F==null?void 0:F[_])!=null?ae:0,Tt=mt?Xe:He-P[qe]-N[qe]-et+L.altAxis,ut=mt?He+P[qe]+N[qe]-et-L.altAxis:We,tt=v&&mt?gH(Tt,He,ut):Sa(v?Tt:Xe,He,v?ut:We);R[_]=tt,k[_]=tt-He}t.modifiersData[n]=k}}const GH={name:"preventOverflow",enabled:!0,phase:"main",fn:WH,requiresIfExists:["offset"]};function KH(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function YH(e){return e===ar(e)||!wr(e)?Qb(e):KH(e)}function XH(e){var t=e.getBoundingClientRect(),r=lo(t.width)/e.offsetWidth||1,n=lo(t.height)/e.offsetHeight||1;return r!==1||n!==1}function ZH(e,t,r){r===void 0&&(r=!1);var n=wr(t),i=wr(t)&&XH(t),o=Un(t),a=fo(e,i,r),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((tn(t)!=="body"||tx(o))&&(u=YH(t)),wr(t)?(c=fo(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=ex(o))),{x:a.left+u.scrollLeft-c.x,y:a.top+u.scrollTop-c.y,width:a.width,height:a.height}}function JH(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(u){if(!r.has(u)){var c=t.get(u);c&&i(c)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function QH(e){var t=JH(e);return lH.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function e4(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function t4(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var W1={placement:"bottom",modifiers:[],strategy:"absolute"};function G1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function r4(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?W1:i;return function(u,c,d){d===void 0&&(d=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},W1,o),modifiersData:{},elements:{reference:u,popper:c},attributes:{},styles:{}},h=[],p=!1,v={state:f,setOptions:function(x){var w=typeof x=="function"?x(f.options):x;y(),f.options=Object.assign({},o,f.options,w),f.scrollParents={reference:pi(u)?Oa(u):u.contextElement?Oa(u.contextElement):[],popper:Oa(c)};var S=QH(t4([].concat(n,f.options.modifiers)));return f.orderedModifiers=S.filter(function(E){return E.enabled}),m(),v.update()},forceUpdate:function(){if(!p){var x=f.elements,w=x.reference,S=x.popper;if(G1(w,S)){f.rects={reference:ZH(w,Fa(S),f.options.strategy==="fixed"),popper:Zb(S)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(L){return f.modifiersData[L.name]=Object.assign({},L.data)});for(var E=0;E<f.orderedModifiers.length;E++){if(f.reset===!0){f.reset=!1,E=-1;continue}var _=f.orderedModifiers[E],R=_.fn,P=_.options,N=P===void 0?{}:P,j=_.name;typeof R=="function"&&(f=R({state:f,options:N,name:j,instance:v})||f)}}}},update:e4(function(){return new Promise(function(b){v.forceUpdate(),b(f)})}),destroy:function(){y(),p=!0}};if(!G1(u,c))return v;v.setOptions(d).then(function(b){!p&&d.onFirstUpdate&&d.onFirstUpdate(b)});function m(){f.orderedModifiers.forEach(function(b){var x=b.name,w=b.options,S=w===void 0?{}:w,E=b.effect;if(typeof E=="function"){var _=E({state:f,name:x,instance:v,options:S}),R=function(){};h.push(_||R)}})}function y(){h.forEach(function(b){return b()}),h=[]}return v}}var n4=[CH,UH,SH,hH,zH,kH,GH,xH,BH],i4=r4({defaultModifiers:n4}),Vf,K1;function o4(){if(K1)return Vf;K1=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",n=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(o,a){if(o===a)return!0;if(o&&a&&typeof o=="object"&&typeof a=="object"){if(o.constructor!==a.constructor)return!1;var u,c,d;if(Array.isArray(o)){if(u=o.length,u!=a.length)return!1;for(c=u;c--!==0;)if(!i(o[c],a[c]))return!1;return!0}var f;if(t&&o instanceof Map&&a instanceof Map){if(o.size!==a.size)return!1;for(f=o.entries();!(c=f.next()).done;)if(!a.has(c.value[0]))return!1;for(f=o.entries();!(c=f.next()).done;)if(!i(c.value[1],a.get(c.value[0])))return!1;return!0}if(r&&o instanceof Set&&a instanceof Set){if(o.size!==a.size)return!1;for(f=o.entries();!(c=f.next()).done;)if(!a.has(c.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(a)){if(u=o.length,u!=a.length)return!1;for(c=u;c--!==0;)if(o[c]!==a[c])return!1;return!0}if(o.constructor===RegExp)return o.source===a.source&&o.flags===a.flags;if(o.valueOf!==Object.prototype.valueOf&&typeof o.valueOf=="function"&&typeof a.valueOf=="function")return o.valueOf()===a.valueOf();if(o.toString!==Object.prototype.toString&&typeof o.toString=="function"&&typeof a.toString=="function")return o.toString()===a.toString();if(d=Object.keys(o),u=d.length,u!==Object.keys(a).length)return!1;for(c=u;c--!==0;)if(!Object.prototype.hasOwnProperty.call(a,d[c]))return!1;if(e&&o instanceof Element)return!1;for(c=u;c--!==0;)if(!((d[c]==="_owner"||d[c]==="__v"||d[c]==="__o")&&o.$$typeof)&&!i(o[d[c]],a[d[c]]))return!1;return!0}return o!==o&&a!==a}return Vf=function(a,u){try{return i(a,u)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},Vf}var a4=o4();const s4=Hn(a4);var u4=[],bc=function(t,r,n){n===void 0&&(n={});var i=ve.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||u4},a=ve.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),u=a[0],c=a[1],d=ve.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(v){var m=v.state,y=Object.keys(m.elements);Gb.flushSync(function(){c({styles:k1(y.map(function(b){return[b,m.styles[b]||{}]})),attributes:k1(y.map(function(b){return[b,m.attributes[b]]}))})})},requires:["computeStyles"]}},[]),f=ve.useMemo(function(){var p={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[d,{name:"applyStyles",enabled:!1}])};return s4(i.current,p)?i.current||p:(i.current=p,p)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,d]),h=ve.useRef();return L1(function(){h.current&&h.current.setOptions(f)},[f]),L1(function(){if(!(t==null||r==null)){var p=n.createPopper||i4,v=p(t,r,f);return h.current=v,function(){v.destroy(),h.current=null}}},[t,r,n.createPopper]),{state:h.current?h.current.state:null,styles:u.styles,attributes:u.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}};const mD=({tab:e})=>C.jsx("div",{className:"flex flex-1 items-center justify-center border-l-[0.5px] border-grey-900 bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"h-10 w-10"}),C.jsxs("div",{className:"font-semibold",children:["No ",e," Selected"]}),C.jsxs("div",{className:"text-sm",children:["Click on a ",e," in the Sidebar to select it."]})]})});function rx(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Wf,Y1;function c4(){if(Y1)return Wf;Y1=1;function e(){this.__data__=[],this.size=0}return Wf=e,Wf}var Gf,X1;function yo(){if(X1)return Gf;X1=1;function e(t,r){return t===r||t!==t&&r!==r}return Gf=e,Gf}var Kf,Z1;function xc(){if(Z1)return Kf;Z1=1;var e=yo();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Kf=t,Kf}var Yf,J1;function l4(){if(J1)return Yf;J1=1;var e=xc(),t=Array.prototype,r=t.splice;function n(i){var o=this.__data__,a=e(o,i);if(a<0)return!1;var u=o.length-1;return a==u?o.pop():r.call(o,a,1),--this.size,!0}return Yf=n,Yf}var Xf,Q1;function f4(){if(Q1)return Xf;Q1=1;var e=xc();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return Xf=t,Xf}var Zf,eE;function d4(){if(eE)return Zf;eE=1;var e=xc();function t(r){return e(this.__data__,r)>-1}return Zf=t,Zf}var Jf,tE;function h4(){if(tE)return Jf;tE=1;var e=xc();function t(r,n){var i=this.__data__,o=e(i,r);return o<0?(++this.size,i.push([r,n])):i[o][1]=n,this}return Jf=t,Jf}var Qf,rE;function wc(){if(rE)return Qf;rE=1;var e=c4(),t=l4(),r=f4(),n=d4(),i=h4();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var d=a[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,Qf=o,Qf}var ed,nE;function p4(){if(nE)return ed;nE=1;var e=wc();function t(){this.__data__=new e,this.size=0}return ed=t,ed}var td,iE;function v4(){if(iE)return td;iE=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return td=e,td}var rd,oE;function g4(){if(oE)return rd;oE=1;function e(t){return this.__data__.get(t)}return rd=e,rd}var nd,aE;function m4(){if(aE)return nd;aE=1;function e(t){return this.__data__.has(t)}return nd=e,nd}var id,sE;function yD(){if(sE)return id;sE=1;var e=typeof ht=="object"&&ht&&ht.Object===Object&&ht;return id=e,id}var od,uE;function Br(){if(uE)return od;uE=1;var e=yD(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return od=r,od}var ad,cE;function bo(){if(cE)return ad;cE=1;var e=Br(),t=e.Symbol;return ad=t,ad}var sd,lE;function y4(){if(lE)return sd;lE=1;var e=bo(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function o(a){var u=r.call(a,i),c=a[i];try{a[i]=void 0;var d=!0}catch{}var f=n.call(a);return d&&(u?a[i]=c:delete a[i]),f}return sd=o,sd}var ud,fE;function b4(){if(fE)return ud;fE=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return ud=r,ud}var cd,dE;function xi(){if(dE)return cd;dE=1;var e=bo(),t=y4(),r=b4(),n="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(u){return u==null?u===void 0?i:n:o&&o in Object(u)?t(u):r(u)}return cd=a,cd}var ld,hE;function Sr(){if(hE)return ld;hE=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return ld=e,ld}var fd,pE;function $a(){if(pE)return fd;pE=1;var e=xi(),t=Sr(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function a(u){if(!t(u))return!1;var c=e(u);return c==n||c==i||c==r||c==o}return fd=a,fd}var dd,vE;function x4(){if(vE)return dd;vE=1;var e=Br(),t=e["__core-js_shared__"];return dd=t,dd}var hd,gE;function w4(){if(gE)return hd;gE=1;var e=x4(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return hd=r,hd}var pd,mE;function bD(){if(mE)return pd;mE=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return pd=r,pd}var vd,yE;function _4(){if(yE)return vd;yE=1;var e=$a(),t=w4(),r=Sr(),n=bD(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,c=a.toString,d=u.hasOwnProperty,f=RegExp("^"+c.call(d).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(p){if(!r(p)||t(p))return!1;var v=e(p)?f:o;return v.test(n(p))}return vd=h,vd}var gd,bE;function E4(){if(bE)return gd;bE=1;function e(t,r){return t==null?void 0:t[r]}return gd=e,gd}var md,xE;function wi(){if(xE)return md;xE=1;var e=_4(),t=E4();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return md=r,md}var yd,wE;function nx(){if(wE)return yd;wE=1;var e=wi(),t=Br(),r=e(t,"Map");return yd=r,yd}var bd,_E;function _c(){if(_E)return bd;_E=1;var e=wi(),t=e(Object,"create");return bd=t,bd}var xd,EE;function S4(){if(EE)return xd;EE=1;var e=_c();function t(){this.__data__=e?e(null):{},this.size=0}return xd=t,xd}var wd,SE;function O4(){if(SE)return wd;SE=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return wd=e,wd}var _d,OE;function C4(){if(OE)return _d;OE=1;var e=_c(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(o){var a=this.__data__;if(e){var u=a[o];return u===t?void 0:u}return n.call(a,o)?a[o]:void 0}return _d=i,_d}var Ed,CE;function R4(){if(CE)return Ed;CE=1;var e=_c(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return Ed=n,Ed}var Sd,RE;function P4(){if(RE)return Sd;RE=1;var e=_c(),t="__lodash_hash_undefined__";function r(n,i){var o=this.__data__;return this.size+=this.has(n)?0:1,o[n]=e&&i===void 0?t:i,this}return Sd=r,Sd}var Od,PE;function I4(){if(PE)return Od;PE=1;var e=S4(),t=O4(),r=C4(),n=R4(),i=P4();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var d=a[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,Od=o,Od}var Cd,IE;function N4(){if(IE)return Cd;IE=1;var e=I4(),t=wc(),r=nx();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Cd=n,Cd}var Rd,NE;function T4(){if(NE)return Rd;NE=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Rd=e,Rd}var Pd,TE;function Ec(){if(TE)return Pd;TE=1;var e=T4();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Pd=t,Pd}var Id,AE;function A4(){if(AE)return Id;AE=1;var e=Ec();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Id=t,Id}var Nd,ME;function M4(){if(ME)return Nd;ME=1;var e=Ec();function t(r){return e(this,r).get(r)}return Nd=t,Nd}var Td,DE;function D4(){if(DE)return Td;DE=1;var e=Ec();function t(r){return e(this,r).has(r)}return Td=t,Td}var Ad,jE;function j4(){if(jE)return Ad;jE=1;var e=Ec();function t(r,n){var i=e(this,r),o=i.size;return i.set(r,n),this.size+=i.size==o?0:1,this}return Ad=t,Ad}var Md,qE;function ix(){if(qE)return Md;qE=1;var e=N4(),t=A4(),r=M4(),n=D4(),i=j4();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var d=a[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,Md=o,Md}var Dd,kE;function q4(){if(kE)return Dd;kE=1;var e=wc(),t=nx(),r=ix(),n=200;function i(o,a){var u=this.__data__;if(u instanceof e){var c=u.__data__;if(!t||c.length<n-1)return c.push([o,a]),this.size=++u.size,this;u=this.__data__=new r(c)}return u.set(o,a),this.size=u.size,this}return Dd=i,Dd}var jd,LE;function Sc(){if(LE)return jd;LE=1;var e=wc(),t=p4(),r=v4(),n=g4(),i=m4(),o=q4();function a(u){var c=this.__data__=new e(u);this.size=c.size}return a.prototype.clear=t,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=i,a.prototype.set=o,jd=a,jd}var qd,BE;function ox(){if(BE)return qd;BE=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i&&r(t[n],n,t)!==!1;);return t}return qd=e,qd}var kd,FE;function xD(){if(FE)return kd;FE=1;var e=wi(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return kd=t,kd}var Ld,$E;function Oc(){if($E)return Ld;$E=1;var e=xD();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Ld=t,Ld}var Bd,zE;function Cc(){if(zE)return Bd;zE=1;var e=Oc(),t=yo(),r=Object.prototype,n=r.hasOwnProperty;function i(o,a,u){var c=o[a];(!(n.call(o,a)&&t(c,u))||u===void 0&&!(a in o))&&e(o,a,u)}return Bd=i,Bd}var Fd,HE;function za(){if(HE)return Fd;HE=1;var e=Cc(),t=Oc();function r(n,i,o,a){var u=!o;o||(o={});for(var c=-1,d=i.length;++c<d;){var f=i[c],h=a?a(o[f],n[f],f,o,n):void 0;h===void 0&&(h=n[f]),u?t(o,f,h):e(o,f,h)}return o}return Fd=r,Fd}var $d,UE;function k4(){if(UE)return $d;UE=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return $d=e,$d}var zd,VE;function nn(){if(VE)return zd;VE=1;function e(t){return t!=null&&typeof t=="object"}return zd=e,zd}var Hd,WE;function L4(){if(WE)return Hd;WE=1;var e=xi(),t=nn(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Hd=n,Hd}var Ud,GE;function Ha(){if(GE)return Ud;GE=1;var e=L4(),t=nn(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(a){return t(a)&&n.call(a,"callee")&&!i.call(a,"callee")};return Ud=o,Ud}var Vd,KE;function yt(){if(KE)return Vd;KE=1;var e=Array.isArray;return Vd=e,Vd}var ma={exports:{}},Wd,YE;function B4(){if(YE)return Wd;YE=1;function e(){return!1}return Wd=e,Wd}ma.exports;var XE;function xo(){return XE||(XE=1,(function(e,t){var r=Br(),n=B4(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,u=a?r.Buffer:void 0,c=u?u.isBuffer:void 0,d=c||n;e.exports=d})(ma,ma.exports)),ma.exports}var Gd,ZE;function Rc(){if(ZE)return Gd;ZE=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var o=typeof n;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return Gd=r,Gd}var Kd,JE;function ax(){if(JE)return Kd;JE=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Kd=t,Kd}var Yd,QE;function F4(){if(QE)return Yd;QE=1;var e=xi(),t=ax(),r=nn(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",u="[object Error]",c="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object RegExp]",v="[object Set]",m="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",S="[object Float64Array]",E="[object Int8Array]",_="[object Int16Array]",R="[object Int32Array]",P="[object Uint8Array]",N="[object Uint8ClampedArray]",j="[object Uint16Array]",L="[object Uint32Array]",F={};F[w]=F[S]=F[E]=F[_]=F[R]=F[P]=F[N]=F[j]=F[L]=!0,F[n]=F[i]=F[b]=F[o]=F[x]=F[a]=F[u]=F[c]=F[d]=F[f]=F[h]=F[p]=F[v]=F[m]=F[y]=!1;function k(D){return r(D)&&t(D.length)&&!!F[e(D)]}return Yd=k,Yd}var Xd,eS;function Pc(){if(eS)return Xd;eS=1;function e(t){return function(r){return t(r)}}return Xd=e,Xd}var ya={exports:{}};ya.exports;var tS;function sx(){return tS||(tS=1,(function(e,t){var r=yD(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,u=(function(){try{var c=i&&i.require&&i.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();e.exports=u})(ya,ya.exports)),ya.exports}var Zd,rS;function Ua(){if(rS)return Zd;rS=1;var e=F4(),t=Pc(),r=sx(),n=r&&r.isTypedArray,i=n?t(n):e;return Zd=i,Zd}var Jd,nS;function wD(){if(nS)return Jd;nS=1;var e=k4(),t=Ha(),r=yt(),n=xo(),i=Rc(),o=Ua(),a=Object.prototype,u=a.hasOwnProperty;function c(d,f){var h=r(d),p=!h&&t(d),v=!h&&!p&&n(d),m=!h&&!p&&!v&&o(d),y=h||p||v||m,b=y?e(d.length,String):[],x=b.length;for(var w in d)(f||u.call(d,w))&&!(y&&(w=="length"||v&&(w=="offset"||w=="parent")||m&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||i(w,x)))&&b.push(w);return b}return Jd=c,Jd}var Qd,iS;function Ic(){if(iS)return Qd;iS=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return Qd=t,Qd}var eh,oS;function _D(){if(oS)return eh;oS=1;function e(t,r){return function(n){return t(r(n))}}return eh=e,eh}var th,aS;function $4(){if(aS)return th;aS=1;var e=_D(),t=e(Object.keys,Object);return th=t,th}var rh,sS;function ux(){if(sS)return rh;sS=1;var e=Ic(),t=$4(),r=Object.prototype,n=r.hasOwnProperty;function i(o){if(!e(o))return t(o);var a=[];for(var u in Object(o))n.call(o,u)&&u!="constructor"&&a.push(u);return a}return rh=i,rh}var nh,uS;function _n(){if(uS)return nh;uS=1;var e=$a(),t=ax();function r(n){return n!=null&&t(n.length)&&!e(n)}return nh=r,nh}var ih,cS;function Vn(){if(cS)return ih;cS=1;var e=wD(),t=ux(),r=_n();function n(i){return r(i)?e(i):t(i)}return ih=n,ih}var oh,lS;function z4(){if(lS)return oh;lS=1;var e=za(),t=Vn();function r(n,i){return n&&e(i,t(i),n)}return oh=r,oh}var ah,fS;function H4(){if(fS)return ah;fS=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return ah=e,ah}var sh,dS;function U4(){if(dS)return sh;dS=1;var e=Sr(),t=Ic(),r=H4(),n=Object.prototype,i=n.hasOwnProperty;function o(a){if(!e(a))return r(a);var u=t(a),c=[];for(var d in a)d=="constructor"&&(u||!i.call(a,d))||c.push(d);return c}return sh=o,sh}var uh,hS;function _i(){if(hS)return uh;hS=1;var e=wD(),t=U4(),r=_n();function n(i){return r(i)?e(i,!0):t(i)}return uh=n,uh}var ch,pS;function V4(){if(pS)return ch;pS=1;var e=za(),t=_i();function r(n,i){return n&&e(i,t(i),n)}return ch=r,ch}var ba={exports:{}};ba.exports;var vS;function ED(){return vS||(vS=1,(function(e,t){var r=Br(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;function c(d,f){if(f)return d.slice();var h=d.length,p=u?u(h):new d.constructor(h);return d.copy(p),p}e.exports=c})(ba,ba.exports)),ba.exports}var lh,gS;function SD(){if(gS)return lh;gS=1;function e(t,r){var n=-1,i=t.length;for(r||(r=Array(i));++n<i;)r[n]=t[n];return r}return lh=e,lh}var fh,mS;function OD(){if(mS)return fh;mS=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=0,a=[];++n<i;){var u=t[n];r(u,n,t)&&(a[o++]=u)}return a}return fh=e,fh}var dh,yS;function CD(){if(yS)return dh;yS=1;function e(){return[]}return dh=e,dh}var hh,bS;function cx(){if(bS)return hh;bS=1;var e=OD(),t=CD(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(a){return a==null?[]:(a=Object(a),e(i(a),function(u){return n.call(a,u)}))}:t;return hh=o,hh}var ph,xS;function W4(){if(xS)return ph;xS=1;var e=za(),t=cx();function r(n,i){return e(n,t(n),i)}return ph=r,ph}var vh,wS;function lx(){if(wS)return vh;wS=1;function e(t,r){for(var n=-1,i=r.length,o=t.length;++n<i;)t[o+n]=r[n];return t}return vh=e,vh}var gh,_S;function Nc(){if(_S)return gh;_S=1;var e=_D(),t=e(Object.getPrototypeOf,Object);return gh=t,gh}var mh,ES;function RD(){if(ES)return mh;ES=1;var e=lx(),t=Nc(),r=cx(),n=CD(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var u=[];a;)e(u,r(a)),a=t(a);return u}:n;return mh=o,mh}var yh,SS;function G4(){if(SS)return yh;SS=1;var e=za(),t=RD();function r(n,i){return e(n,t(n),i)}return yh=r,yh}var bh,OS;function PD(){if(OS)return bh;OS=1;var e=lx(),t=yt();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return bh=r,bh}var xh,CS;function ID(){if(CS)return xh;CS=1;var e=PD(),t=cx(),r=Vn();function n(i){return e(i,r,t)}return xh=n,xh}var wh,RS;function K4(){if(RS)return wh;RS=1;var e=PD(),t=RD(),r=_i();function n(i){return e(i,r,t)}return wh=n,wh}var _h,PS;function Y4(){if(PS)return _h;PS=1;var e=wi(),t=Br(),r=e(t,"DataView");return _h=r,_h}var Eh,IS;function X4(){if(IS)return Eh;IS=1;var e=wi(),t=Br(),r=e(t,"Promise");return Eh=r,Eh}var Sh,NS;function ND(){if(NS)return Sh;NS=1;var e=wi(),t=Br(),r=e(t,"Set");return Sh=r,Sh}var Oh,TS;function Z4(){if(TS)return Oh;TS=1;var e=wi(),t=Br(),r=e(t,"WeakMap");return Oh=r,Oh}var Ch,AS;function wo(){if(AS)return Ch;AS=1;var e=Y4(),t=nx(),r=X4(),n=ND(),i=Z4(),o=xi(),a=bD(),u="[object Map]",c="[object Object]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",v=a(e),m=a(t),y=a(r),b=a(n),x=a(i),w=o;return(e&&w(new e(new ArrayBuffer(1)))!=p||t&&w(new t)!=u||r&&w(r.resolve())!=d||n&&w(new n)!=f||i&&w(new i)!=h)&&(w=function(S){var E=o(S),_=E==c?S.constructor:void 0,R=_?a(_):"";if(R)switch(R){case v:return p;case m:return u;case y:return d;case b:return f;case x:return h}return E}),Ch=w,Ch}var Rh,MS;function J4(){if(MS)return Rh;MS=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n){var i=n.length,o=new n.constructor(i);return i&&typeof n[0]=="string"&&t.call(n,"index")&&(o.index=n.index,o.input=n.input),o}return Rh=r,Rh}var Ph,DS;function TD(){if(DS)return Ph;DS=1;var e=Br(),t=e.Uint8Array;return Ph=t,Ph}var Ih,jS;function fx(){if(jS)return Ih;jS=1;var e=TD();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return Ih=t,Ih}var Nh,qS;function Q4(){if(qS)return Nh;qS=1;var e=fx();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return Nh=t,Nh}var Th,kS;function eU(){if(kS)return Th;kS=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return Th=t,Th}var Ah,LS;function tU(){if(LS)return Ah;LS=1;var e=bo(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return Ah=n,Ah}var Mh,BS;function AD(){if(BS)return Mh;BS=1;var e=fx();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return Mh=t,Mh}var Dh,FS;function rU(){if(FS)return Dh;FS=1;var e=fx(),t=Q4(),r=eU(),n=tU(),i=AD(),o="[object Boolean]",a="[object Date]",u="[object Map]",c="[object Number]",d="[object RegExp]",f="[object Set]",h="[object String]",p="[object Symbol]",v="[object ArrayBuffer]",m="[object DataView]",y="[object Float32Array]",b="[object Float64Array]",x="[object Int8Array]",w="[object Int16Array]",S="[object Int32Array]",E="[object Uint8Array]",_="[object Uint8ClampedArray]",R="[object Uint16Array]",P="[object Uint32Array]";function N(j,L,F){var k=j.constructor;switch(L){case v:return e(j);case o:case a:return new k(+j);case m:return t(j,F);case y:case b:case x:case w:case S:case E:case _:case R:case P:return i(j,F);case u:return new k;case c:case h:return new k(j);case d:return r(j);case f:return new k;case p:return n(j)}}return Dh=N,Dh}var jh,$S;function MD(){if($S)return jh;$S=1;var e=Sr(),t=Object.create,r=(function(){function n(){}return function(i){if(!e(i))return{};if(t)return t(i);n.prototype=i;var o=new n;return n.prototype=void 0,o}})();return jh=r,jh}var qh,zS;function DD(){if(zS)return qh;zS=1;var e=MD(),t=Nc(),r=Ic();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return qh=n,qh}var kh,HS;function nU(){if(HS)return kh;HS=1;var e=wo(),t=nn(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return kh=n,kh}var Lh,US;function iU(){if(US)return Lh;US=1;var e=nU(),t=Pc(),r=sx(),n=r&&r.isMap,i=n?t(n):e;return Lh=i,Lh}var Bh,VS;function oU(){if(VS)return Bh;VS=1;var e=wo(),t=nn(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return Bh=n,Bh}var Fh,WS;function aU(){if(WS)return Fh;WS=1;var e=oU(),t=Pc(),r=sx(),n=r&&r.isSet,i=n?t(n):e;return Fh=i,Fh}var $h,GS;function jD(){if(GS)return $h;GS=1;var e=Sc(),t=ox(),r=Cc(),n=z4(),i=V4(),o=ED(),a=SD(),u=W4(),c=G4(),d=ID(),f=K4(),h=wo(),p=J4(),v=rU(),m=DD(),y=yt(),b=xo(),x=iU(),w=Sr(),S=aU(),E=Vn(),_=_i(),R=1,P=2,N=4,j="[object Arguments]",L="[object Array]",F="[object Boolean]",k="[object Date]",D="[object Error]",T="[object Function]",B="[object GeneratorFunction]",$="[object Map]",W="[object Number]",Y="[object Object]",ee="[object RegExp]",H="[object Set]",Q="[object String]",ce="[object Symbol]",se="[object WeakMap]",z="[object ArrayBuffer]",G="[object DataView]",J="[object Float32Array]",V="[object Float64Array]",K="[object Int8Array]",ie="[object Int16Array]",ne="[object Int32Array]",ue="[object Uint8Array]",de="[object Uint8ClampedArray]",we="[object Uint16Array]",Se="[object Uint32Array]",_e={};_e[j]=_e[L]=_e[z]=_e[G]=_e[F]=_e[k]=_e[J]=_e[V]=_e[K]=_e[ie]=_e[ne]=_e[$]=_e[W]=_e[Y]=_e[ee]=_e[H]=_e[Q]=_e[ce]=_e[ue]=_e[de]=_e[we]=_e[Se]=!0,_e[D]=_e[T]=_e[se]=!1;function he(ae,Oe,Ne,He,qe,Xe){var We,mt=Oe&R,et=Oe&P,Tt=Oe&N;if(Ne&&(We=qe?Ne(ae,He,qe,Xe):Ne(ae)),We!==void 0)return We;if(!w(ae))return ae;var ut=y(ae);if(ut){if(We=p(ae),!mt)return a(ae,We)}else{var tt=h(ae),Ct=tt==T||tt==B;if(b(ae))return o(ae,mt);if(tt==Y||tt==j||Ct&&!qe){if(We=et||Ct?{}:m(ae),!mt)return et?c(ae,i(We,ae)):u(ae,n(We,ae))}else{if(!_e[tt])return qe?ae:{};We=v(ae,tt,mt)}}Xe||(Xe=new e);var Zt=Xe.get(ae);if(Zt)return Zt;Xe.set(ae,We),S(ae)?ae.forEach(function(xt){We.add(he(xt,Oe,Ne,xt,ae,Xe))}):x(ae)&&ae.forEach(function(xt,jt){We.set(jt,he(xt,Oe,Ne,jt,ae,Xe))});var cr=Tt?et?f:d:et?_:E,Dt=ut?void 0:cr(ae);return t(Dt||ae,function(xt,jt){Dt&&(jt=xt,xt=ae[jt]),r(We,jt,he(xt,Oe,Ne,jt,ae,Xe))}),We}return $h=he,$h}var zh,KS;function sU(){if(KS)return zh;KS=1;var e=jD(),t=4;function r(n){return e(n,t)}return zh=r,zh}var Hh,YS;function dx(){if(YS)return Hh;YS=1;function e(t){return function(){return t}}return Hh=e,Hh}var Uh,XS;function uU(){if(XS)return Uh;XS=1;function e(t){return function(r,n,i){for(var o=-1,a=Object(r),u=i(r),c=u.length;c--;){var d=u[t?c:++o];if(n(a[d],d,a)===!1)break}return r}}return Uh=e,Uh}var Vh,ZS;function hx(){if(ZS)return Vh;ZS=1;var e=uU(),t=e();return Vh=t,Vh}var Wh,JS;function px(){if(JS)return Wh;JS=1;var e=hx(),t=Vn();function r(n,i){return n&&e(n,i,t)}return Wh=r,Wh}var Gh,QS;function cU(){if(QS)return Gh;QS=1;var e=_n();function t(r,n){return function(i,o){if(i==null)return i;if(!e(i))return r(i,o);for(var a=i.length,u=n?a:-1,c=Object(i);(n?u--:++u<a)&&o(c[u],u,c)!==!1;);return i}}return Gh=t,Gh}var Kh,eO;function Tc(){if(eO)return Kh;eO=1;var e=px(),t=cU(),r=t(e);return Kh=r,Kh}var Yh,tO;function Ei(){if(tO)return Yh;tO=1;function e(t){return t}return Yh=e,Yh}var Xh,rO;function qD(){if(rO)return Xh;rO=1;var e=Ei();function t(r){return typeof r=="function"?r:e}return Xh=t,Xh}var Zh,nO;function kD(){if(nO)return Zh;nO=1;var e=ox(),t=Tc(),r=qD(),n=yt();function i(o,a){var u=n(o)?e:t;return u(o,r(a))}return Zh=i,Zh}var Jh,iO;function LD(){return iO||(iO=1,Jh=kD()),Jh}var Qh,oO;function lU(){if(oO)return Qh;oO=1;var e=Tc();function t(r,n){var i=[];return e(r,function(o,a,u){n(o,a,u)&&i.push(o)}),i}return Qh=t,Qh}var ep,aO;function fU(){if(aO)return ep;aO=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return ep=t,ep}var tp,sO;function dU(){if(sO)return tp;sO=1;function e(t){return this.__data__.has(t)}return tp=e,tp}var rp,uO;function BD(){if(uO)return rp;uO=1;var e=ix(),t=fU(),r=dU();function n(i){var o=-1,a=i==null?0:i.length;for(this.__data__=new e;++o<a;)this.add(i[o])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,rp=n,rp}var np,cO;function hU(){if(cO)return np;cO=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return np=e,np}var ip,lO;function FD(){if(lO)return ip;lO=1;function e(t,r){return t.has(r)}return ip=e,ip}var op,fO;function $D(){if(fO)return op;fO=1;var e=BD(),t=hU(),r=FD(),n=1,i=2;function o(a,u,c,d,f,h){var p=c&n,v=a.length,m=u.length;if(v!=m&&!(p&&m>v))return!1;var y=h.get(a),b=h.get(u);if(y&&b)return y==u&&b==a;var x=-1,w=!0,S=c&i?new e:void 0;for(h.set(a,u),h.set(u,a);++x<v;){var E=a[x],_=u[x];if(d)var R=p?d(_,E,x,u,a,h):d(E,_,x,a,u,h);if(R!==void 0){if(R)continue;w=!1;break}if(S){if(!t(u,function(P,N){if(!r(S,N)&&(E===P||f(E,P,c,d,h)))return S.push(N)})){w=!1;break}}else if(!(E===_||f(E,_,c,d,h))){w=!1;break}}return h.delete(a),h.delete(u),w}return op=o,op}var ap,dO;function pU(){if(dO)return ap;dO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return ap=e,ap}var sp,hO;function vx(){if(hO)return sp;hO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return sp=e,sp}var up,pO;function vU(){if(pO)return up;pO=1;var e=bo(),t=TD(),r=yo(),n=$D(),i=pU(),o=vx(),a=1,u=2,c="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Map]",p="[object Number]",v="[object RegExp]",m="[object Set]",y="[object String]",b="[object Symbol]",x="[object ArrayBuffer]",w="[object DataView]",S=e?e.prototype:void 0,E=S?S.valueOf:void 0;function _(R,P,N,j,L,F,k){switch(N){case w:if(R.byteLength!=P.byteLength||R.byteOffset!=P.byteOffset)return!1;R=R.buffer,P=P.buffer;case x:return!(R.byteLength!=P.byteLength||!F(new t(R),new t(P)));case c:case d:case p:return r(+R,+P);case f:return R.name==P.name&&R.message==P.message;case v:case y:return R==P+"";case h:var D=i;case m:var T=j&a;if(D||(D=o),R.size!=P.size&&!T)return!1;var B=k.get(R);if(B)return B==P;j|=u,k.set(R,P);var $=n(D(R),D(P),j,L,F,k);return k.delete(R),$;case b:if(E)return E.call(R)==E.call(P)}return!1}return up=_,up}var cp,vO;function gU(){if(vO)return cp;vO=1;var e=ID(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(o,a,u,c,d,f){var h=u&t,p=e(o),v=p.length,m=e(a),y=m.length;if(v!=y&&!h)return!1;for(var b=v;b--;){var x=p[b];if(!(h?x in a:n.call(a,x)))return!1}var w=f.get(o),S=f.get(a);if(w&&S)return w==a&&S==o;var E=!0;f.set(o,a),f.set(a,o);for(var _=h;++b<v;){x=p[b];var R=o[x],P=a[x];if(c)var N=h?c(P,R,x,a,o,f):c(R,P,x,o,a,f);if(!(N===void 0?R===P||d(R,P,u,c,f):N)){E=!1;break}_||(_=x=="constructor")}if(E&&!_){var j=o.constructor,L=a.constructor;j!=L&&"constructor"in o&&"constructor"in a&&!(typeof j=="function"&&j instanceof j&&typeof L=="function"&&L instanceof L)&&(E=!1)}return f.delete(o),f.delete(a),E}return cp=i,cp}var lp,gO;function mU(){if(gO)return lp;gO=1;var e=Sc(),t=$D(),r=vU(),n=gU(),i=wo(),o=yt(),a=xo(),u=Ua(),c=1,d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype,v=p.hasOwnProperty;function m(y,b,x,w,S,E){var _=o(y),R=o(b),P=_?f:i(y),N=R?f:i(b);P=P==d?h:P,N=N==d?h:N;var j=P==h,L=N==h,F=P==N;if(F&&a(y)){if(!a(b))return!1;_=!0,j=!1}if(F&&!j)return E||(E=new e),_||u(y)?t(y,b,x,w,S,E):r(y,b,P,x,w,S,E);if(!(x&c)){var k=j&&v.call(y,"__wrapped__"),D=L&&v.call(b,"__wrapped__");if(k||D){var T=k?y.value():y,B=D?b.value():b;return E||(E=new e),S(T,B,x,w,E)}}return F?(E||(E=new e),n(y,b,x,w,S,E)):!1}return lp=m,lp}var fp,mO;function zD(){if(mO)return fp;mO=1;var e=mU(),t=nn();function r(n,i,o,a,u){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,o,a,r,u)}return fp=r,fp}var dp,yO;function yU(){if(yO)return dp;yO=1;var e=Sc(),t=zD(),r=1,n=2;function i(o,a,u,c){var d=u.length,f=d,h=!c;if(o==null)return!f;for(o=Object(o);d--;){var p=u[d];if(h&&p[2]?p[1]!==o[p[0]]:!(p[0]in o))return!1}for(;++d<f;){p=u[d];var v=p[0],m=o[v],y=p[1];if(h&&p[2]){if(m===void 0&&!(v in o))return!1}else{var b=new e;if(c)var x=c(m,y,v,o,a,b);if(!(x===void 0?t(y,m,r|n,c,b):x))return!1}}return!0}return dp=i,dp}var hp,bO;function HD(){if(bO)return hp;bO=1;var e=Sr();function t(r){return r===r&&!e(r)}return hp=t,hp}var pp,xO;function bU(){if(xO)return pp;xO=1;var e=HD(),t=Vn();function r(n){for(var i=t(n),o=i.length;o--;){var a=i[o],u=n[a];i[o]=[a,u,e(u)]}return i}return pp=r,pp}var vp,wO;function UD(){if(wO)return vp;wO=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return vp=e,vp}var gp,_O;function xU(){if(_O)return gp;_O=1;var e=yU(),t=bU(),r=UD();function n(i){var o=t(i);return o.length==1&&o[0][2]?r(o[0][0],o[0][1]):function(a){return a===i||e(a,i,o)}}return gp=n,gp}var mp,EO;function _o(){if(EO)return mp;EO=1;var e=xi(),t=nn(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return mp=n,mp}var yp,SO;function gx(){if(SO)return yp;SO=1;var e=yt(),t=_o(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,a){if(e(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||t(o)?!0:n.test(o)||!r.test(o)||a!=null&&o in Object(a)}return yp=i,yp}var bp,OO;function wU(){if(OO)return bp;OO=1;var e=ix(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var a=arguments,u=i?i.apply(this,a):a[0],c=o.cache;if(c.has(u))return c.get(u);var d=n.apply(this,a);return o.cache=c.set(u,d)||c,d};return o.cache=new(r.Cache||e),o}return r.Cache=e,bp=r,bp}var xp,CO;function _U(){if(CO)return xp;CO=1;var e=wU(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return xp=r,xp}var wp,RO;function EU(){if(RO)return wp;RO=1;var e=_U(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(a,u,c,d){o.push(c?d.replace(r,"$1"):u||a)}),o});return wp=n,wp}var _p,PO;function Ac(){if(PO)return _p;PO=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=Array(i);++n<i;)o[n]=r(t[n],n,t);return o}return _p=e,_p}var Ep,IO;function SU(){if(IO)return Ep;IO=1;var e=bo(),t=Ac(),r=yt(),n=_o(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function a(u){if(typeof u=="string")return u;if(r(u))return t(u,a)+"";if(n(u))return o?o.call(u):"";var c=u+"";return c=="0"&&1/u==-1/0?"-0":c}return Ep=a,Ep}var Sp,NO;function VD(){if(NO)return Sp;NO=1;var e=SU();function t(r){return r==null?"":e(r)}return Sp=t,Sp}var Op,TO;function Mc(){if(TO)return Op;TO=1;var e=yt(),t=gx(),r=EU(),n=VD();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return Op=i,Op}var Cp,AO;function Va(){if(AO)return Cp;AO=1;var e=_o();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Cp=t,Cp}var Rp,MO;function Dc(){if(MO)return Rp;MO=1;var e=Mc(),t=Va();function r(n,i){i=e(i,n);for(var o=0,a=i.length;n!=null&&o<a;)n=n[t(i[o++])];return o&&o==a?n:void 0}return Rp=r,Rp}var Pp,DO;function OU(){if(DO)return Pp;DO=1;var e=Dc();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return Pp=t,Pp}var Ip,jO;function CU(){if(jO)return Ip;jO=1;function e(t,r){return t!=null&&r in Object(t)}return Ip=e,Ip}var Np,qO;function WD(){if(qO)return Np;qO=1;var e=Mc(),t=Ha(),r=yt(),n=Rc(),i=ax(),o=Va();function a(u,c,d){c=e(c,u);for(var f=-1,h=c.length,p=!1;++f<h;){var v=o(c[f]);if(!(p=u!=null&&d(u,v)))break;u=u[v]}return p||++f!=h?p:(h=u==null?0:u.length,!!h&&i(h)&&n(v,h)&&(r(u)||t(u)))}return Np=a,Np}var Tp,kO;function GD(){if(kO)return Tp;kO=1;var e=CU(),t=WD();function r(n,i){return n!=null&&t(n,i,e)}return Tp=r,Tp}var Ap,LO;function RU(){if(LO)return Ap;LO=1;var e=zD(),t=OU(),r=GD(),n=gx(),i=HD(),o=UD(),a=Va(),u=1,c=2;function d(f,h){return n(f)&&i(h)?o(a(f),h):function(p){var v=t(p,f);return v===void 0&&v===h?r(p,f):e(h,v,u|c)}}return Ap=d,Ap}var Mp,BO;function KD(){if(BO)return Mp;BO=1;function e(t){return function(r){return r==null?void 0:r[t]}}return Mp=e,Mp}var Dp,FO;function PU(){if(FO)return Dp;FO=1;var e=Dc();function t(r){return function(n){return e(n,r)}}return Dp=t,Dp}var jp,$O;function IU(){if($O)return jp;$O=1;var e=KD(),t=PU(),r=gx(),n=Va();function i(o){return r(o)?e(n(o)):t(o)}return jp=i,jp}var qp,zO;function En(){if(zO)return qp;zO=1;var e=xU(),t=RU(),r=Ei(),n=yt(),i=IU();function o(a){return typeof a=="function"?a:a==null?r:typeof a=="object"?n(a)?t(a[0],a[1]):e(a):i(a)}return qp=o,qp}var kp,HO;function YD(){if(HO)return kp;HO=1;var e=OD(),t=lU(),r=En(),n=yt();function i(o,a){var u=n(o)?e:t;return u(o,r(a,3))}return kp=i,kp}var Lp,UO;function NU(){if(UO)return Lp;UO=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return Lp=r,Lp}var Bp,VO;function XD(){if(VO)return Bp;VO=1;var e=NU(),t=WD();function r(n,i){return n!=null&&t(n,i,e)}return Bp=r,Bp}var Fp,WO;function TU(){if(WO)return Fp;WO=1;var e=ux(),t=wo(),r=Ha(),n=yt(),i=_n(),o=xo(),a=Ic(),u=Ua(),c="[object Map]",d="[object Set]",f=Object.prototype,h=f.hasOwnProperty;function p(v){if(v==null)return!0;if(i(v)&&(n(v)||typeof v=="string"||typeof v.splice=="function"||o(v)||u(v)||r(v)))return!v.length;var m=t(v);if(m==c||m==d)return!v.size;if(a(v))return!e(v).length;for(var y in v)if(h.call(v,y))return!1;return!0}return Fp=p,Fp}var $p,GO;function ZD(){if(GO)return $p;GO=1;function e(t){return t===void 0}return $p=e,$p}var zp,KO;function JD(){if(KO)return zp;KO=1;var e=Tc(),t=_n();function r(n,i){var o=-1,a=t(n)?Array(n.length):[];return e(n,function(u,c,d){a[++o]=i(u,c,d)}),a}return zp=r,zp}var Hp,YO;function QD(){if(YO)return Hp;YO=1;var e=Ac(),t=En(),r=JD(),n=yt();function i(o,a){var u=n(o)?e:r;return u(o,t(a,3))}return Hp=i,Hp}var Up,XO;function AU(){if(XO)return Up;XO=1;function e(t,r,n,i){var o=-1,a=t==null?0:t.length;for(i&&a&&(n=t[++o]);++o<a;)n=r(n,t[o],o,t);return n}return Up=e,Up}var Vp,ZO;function MU(){if(ZO)return Vp;ZO=1;function e(t,r,n,i,o){return o(t,function(a,u,c){n=i?(i=!1,a):r(n,a,u,c)}),n}return Vp=e,Vp}var Wp,JO;function ej(){if(JO)return Wp;JO=1;var e=AU(),t=Tc(),r=En(),n=MU(),i=yt();function o(a,u,c){var d=i(a)?e:n,f=arguments.length<3;return d(a,r(u,4),c,f,t)}return Wp=o,Wp}var Gp,QO;function DU(){if(QO)return Gp;QO=1;var e=xi(),t=yt(),r=nn(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return Gp=i,Gp}var Kp,eC;function jU(){if(eC)return Kp;eC=1;var e=KD(),t=e("length");return Kp=t,Kp}var Yp,tC;function qU(){if(tC)return Yp;tC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="\\u200d",u=RegExp("["+a+e+i+o+"]");function c(d){return u.test(d)}return Yp=c,Yp}var Xp,rC;function kU(){if(rC)return Xp;rC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="["+e+"]",u="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",d="(?:"+u+"|"+c+")",f="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",m=d+"?",y="["+o+"]?",b="(?:"+v+"(?:"+[f,h,p].join("|")+")"+y+m+")*",x=y+m+b,w="(?:"+[f+u+"?",u,h,p,a].join("|")+")",S=RegExp(c+"(?="+c+")|"+w+x,"g");function E(_){for(var R=S.lastIndex=0;S.test(_);)++R;return R}return Xp=E,Xp}var Zp,nC;function LU(){if(nC)return Zp;nC=1;var e=jU(),t=qU(),r=kU();function n(i){return t(i)?r(i):e(i)}return Zp=n,Zp}var Jp,iC;function BU(){if(iC)return Jp;iC=1;var e=ux(),t=wo(),r=_n(),n=DU(),i=LU(),o="[object Map]",a="[object Set]";function u(c){if(c==null)return 0;if(r(c))return n(c)?i(c):c.length;var d=t(c);return d==o||d==a?c.size:e(c).length}return Jp=u,Jp}var Qp,oC;function FU(){if(oC)return Qp;oC=1;var e=ox(),t=MD(),r=px(),n=En(),i=Nc(),o=yt(),a=xo(),u=$a(),c=Sr(),d=Ua();function f(h,p,v){var m=o(h),y=m||a(h)||d(h);if(p=n(p,4),v==null){var b=h&&h.constructor;y?v=m?new b:[]:c(h)?v=u(b)?t(i(h)):{}:v={}}return(y?e:r)(h,function(x,w,S){return p(v,x,w,S)}),v}return Qp=f,Qp}var ev,aC;function $U(){if(aC)return ev;aC=1;var e=bo(),t=Ha(),r=yt(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return ev=i,ev}var tv,sC;function mx(){if(sC)return tv;sC=1;var e=lx(),t=$U();function r(n,i,o,a,u){var c=-1,d=n.length;for(o||(o=t),u||(u=[]);++c<d;){var f=n[c];i>0&&o(f)?i>1?r(f,i-1,o,a,u):e(u,f):a||(u[u.length]=f)}return u}return tv=r,tv}var rv,uC;function zU(){if(uC)return rv;uC=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return rv=e,rv}var nv,cC;function tj(){if(cC)return nv;cC=1;var e=zU(),t=Math.max;function r(n,i,o){return i=t(i===void 0?n.length-1:i,0),function(){for(var a=arguments,u=-1,c=t(a.length-i,0),d=Array(c);++u<c;)d[u]=a[i+u];u=-1;for(var f=Array(i+1);++u<i;)f[u]=a[u];return f[i]=o(d),e(n,this,f)}}return nv=r,nv}var iv,lC;function HU(){if(lC)return iv;lC=1;var e=dx(),t=xD(),r=Ei(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return iv=n,iv}var ov,fC;function UU(){if(fC)return ov;fC=1;var e=800,t=16,r=Date.now;function n(i){var o=0,a=0;return function(){var u=r(),c=t-(u-a);if(a=u,c>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return ov=n,ov}var av,dC;function rj(){if(dC)return av;dC=1;var e=HU(),t=UU(),r=t(e);return av=r,av}var sv,hC;function jc(){if(hC)return sv;hC=1;var e=Ei(),t=tj(),r=rj();function n(i,o){return r(t(i,o,e),i+"")}return sv=n,sv}var uv,pC;function nj(){if(pC)return uv;pC=1;function e(t,r,n,i){for(var o=t.length,a=n+(i?1:-1);i?a--:++a<o;)if(r(t[a],a,t))return a;return-1}return uv=e,uv}var cv,vC;function VU(){if(vC)return cv;vC=1;function e(t){return t!==t}return cv=e,cv}var lv,gC;function WU(){if(gC)return lv;gC=1;function e(t,r,n){for(var i=n-1,o=t.length;++i<o;)if(t[i]===r)return i;return-1}return lv=e,lv}var fv,mC;function GU(){if(mC)return fv;mC=1;var e=nj(),t=VU(),r=WU();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return fv=n,fv}var dv,yC;function KU(){if(yC)return dv;yC=1;var e=GU();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return dv=t,dv}var hv,bC;function YU(){if(bC)return hv;bC=1;function e(t,r,n){for(var i=-1,o=t==null?0:t.length;++i<o;)if(n(r,t[i]))return!0;return!1}return hv=e,hv}var pv,xC;function XU(){if(xC)return pv;xC=1;function e(){}return pv=e,pv}var vv,wC;function ZU(){if(wC)return vv;wC=1;var e=ND(),t=XU(),r=vx(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return vv=i,vv}var gv,_C;function JU(){if(_C)return gv;_C=1;var e=BD(),t=KU(),r=YU(),n=FD(),i=ZU(),o=vx(),a=200;function u(c,d,f){var h=-1,p=t,v=c.length,m=!0,y=[],b=y;if(f)m=!1,p=r;else if(v>=a){var x=d?null:i(c);if(x)return o(x);m=!1,p=n,b=new e}else b=d?[]:y;e:for(;++h<v;){var w=c[h],S=d?d(w):w;if(w=f||w!==0?w:0,m&&S===S){for(var E=b.length;E--;)if(b[E]===S)continue e;d&&b.push(S),y.push(w)}else p(b,S,f)||(b!==y&&b.push(S),y.push(w))}return y}return gv=u,gv}var mv,EC;function ij(){if(EC)return mv;EC=1;var e=_n(),t=nn();function r(n){return t(n)&&e(n)}return mv=r,mv}var yv,SC;function QU(){if(SC)return yv;SC=1;var e=mx(),t=jc(),r=JU(),n=ij(),i=t(function(o){return r(e(o,1,n,!0))});return yv=i,yv}var bv,OC;function eV(){if(OC)return bv;OC=1;var e=Ac();function t(r,n){return e(n,function(i){return r[i]})}return bv=t,bv}var xv,CC;function oj(){if(CC)return xv;CC=1;var e=eV(),t=Vn();function r(n){return n==null?[]:e(n,t(n))}return xv=r,xv}var wv,RC;function Or(){if(RC)return wv;RC=1;var e;if(typeof rx=="function")try{e={clone:sU(),constant:dx(),each:LD(),filter:YD(),has:XD(),isArray:yt(),isEmpty:TU(),isFunction:$a(),isUndefined:ZD(),keys:Vn(),map:QD(),reduce:ej(),size:BU(),transform:FU(),union:QU(),values:oj()}}catch{}return e||(e=window._),wv=e,wv}var _v,PC;function yx(){if(PC)return _v;PC=1;var e=Or();_v=i;var t="\0",r="\0",n="";function i(f){this._isDirected=e.has(f,"directed")?f.directed:!0,this._isMultigraph=e.has(f,"multigraph")?f.multigraph:!1,this._isCompound=e.has(f,"compound")?f.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(f){return this._label=f,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultNodeLabelFn=f,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var f=this;return e.filter(this.nodes(),function(h){return e.isEmpty(f._in[h])})},i.prototype.sinks=function(){var f=this;return e.filter(this.nodes(),function(h){return e.isEmpty(f._out[h])})},i.prototype.setNodes=function(f,h){var p=arguments,v=this;return e.each(f,function(m){p.length>1?v.setNode(m,h):v.setNode(m)}),this},i.prototype.setNode=function(f,h){return e.has(this._nodes,f)?(arguments.length>1&&(this._nodes[f]=h),this):(this._nodes[f]=arguments.length>1?h:this._defaultNodeLabelFn(f),this._isCompound&&(this._parent[f]=r,this._children[f]={},this._children[r][f]=!0),this._in[f]={},this._preds[f]={},this._out[f]={},this._sucs[f]={},++this._nodeCount,this)},i.prototype.node=function(f){return this._nodes[f]},i.prototype.hasNode=function(f){return e.has(this._nodes,f)},i.prototype.removeNode=function(f){var h=this;if(e.has(this._nodes,f)){var p=function(v){h.removeEdge(h._edgeObjs[v])};delete this._nodes[f],this._isCompound&&(this._removeFromParentsChildList(f),delete this._parent[f],e.each(this.children(f),function(v){h.setParent(v)}),delete this._children[f]),e.each(e.keys(this._in[f]),p),delete this._in[f],delete this._preds[f],e.each(e.keys(this._out[f]),p),delete this._out[f],delete this._sucs[f],--this._nodeCount}return this},i.prototype.setParent=function(f,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(h))h=r;else{h+="";for(var p=h;!e.isUndefined(p);p=this.parent(p))if(p===f)throw new Error("Setting "+h+" as parent of "+f+" would create a cycle");this.setNode(h)}return this.setNode(f),this._removeFromParentsChildList(f),this._parent[f]=h,this._children[h][f]=!0,this},i.prototype._removeFromParentsChildList=function(f){delete this._children[this._parent[f]][f]},i.prototype.parent=function(f){if(this._isCompound){var h=this._parent[f];if(h!==r)return h}},i.prototype.children=function(f){if(e.isUndefined(f)&&(f=r),this._isCompound){var h=this._children[f];if(h)return e.keys(h)}else{if(f===r)return this.nodes();if(this.hasNode(f))return[]}},i.prototype.predecessors=function(f){var h=this._preds[f];if(h)return e.keys(h)},i.prototype.successors=function(f){var h=this._sucs[f];if(h)return e.keys(h)},i.prototype.neighbors=function(f){var h=this.predecessors(f);if(h)return e.union(h,this.successors(f))},i.prototype.isLeaf=function(f){var h;return this.isDirected()?h=this.successors(f):h=this.neighbors(f),h.length===0},i.prototype.filterNodes=function(f){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var p=this;e.each(this._nodes,function(y,b){f(b)&&h.setNode(b,y)}),e.each(this._edgeObjs,function(y){h.hasNode(y.v)&&h.hasNode(y.w)&&h.setEdge(y,p.edge(y))});var v={};function m(y){var b=p.parent(y);return b===void 0||h.hasNode(b)?(v[y]=b,b):b in v?v[b]:m(b)}return this._isCompound&&e.each(h.nodes(),function(y){h.setParent(y,m(y))}),h},i.prototype.setDefaultEdgeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultEdgeLabelFn=f,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(f,h){var p=this,v=arguments;return e.reduce(f,function(m,y){return v.length>1?p.setEdge(m,y,h):p.setEdge(m,y),y}),this},i.prototype.setEdge=function(){var f,h,p,v,m=!1,y=arguments[0];typeof y=="object"&&y!==null&&"v"in y?(f=y.v,h=y.w,p=y.name,arguments.length===2&&(v=arguments[1],m=!0)):(f=y,h=arguments[1],p=arguments[3],arguments.length>2&&(v=arguments[2],m=!0)),f=""+f,h=""+h,e.isUndefined(p)||(p=""+p);var b=u(this._isDirected,f,h,p);if(e.has(this._edgeLabels,b))return m&&(this._edgeLabels[b]=v),this;if(!e.isUndefined(p)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(f),this.setNode(h),this._edgeLabels[b]=m?v:this._defaultEdgeLabelFn(f,h,p);var x=c(this._isDirected,f,h,p);return f=x.v,h=x.w,Object.freeze(x),this._edgeObjs[b]=x,o(this._preds[h],f),o(this._sucs[f],h),this._in[h][b]=x,this._out[f][b]=x,this._edgeCount++,this},i.prototype.edge=function(f,h,p){var v=arguments.length===1?d(this._isDirected,arguments[0]):u(this._isDirected,f,h,p);return this._edgeLabels[v]},i.prototype.hasEdge=function(f,h,p){var v=arguments.length===1?d(this._isDirected,arguments[0]):u(this._isDirected,f,h,p);return e.has(this._edgeLabels,v)},i.prototype.removeEdge=function(f,h,p){var v=arguments.length===1?d(this._isDirected,arguments[0]):u(this._isDirected,f,h,p),m=this._edgeObjs[v];return m&&(f=m.v,h=m.w,delete this._edgeLabels[v],delete this._edgeObjs[v],a(this._preds[h],f),a(this._sucs[f],h),delete this._in[h][v],delete this._out[f][v],this._edgeCount--),this},i.prototype.inEdges=function(f,h){var p=this._in[f];if(p){var v=e.values(p);return h?e.filter(v,function(m){return m.v===h}):v}},i.prototype.outEdges=function(f,h){var p=this._out[f];if(p){var v=e.values(p);return h?e.filter(v,function(m){return m.w===h}):v}},i.prototype.nodeEdges=function(f,h){var p=this.inEdges(f,h);if(p)return p.concat(this.outEdges(f,h))};function o(f,h){f[h]?f[h]++:f[h]=1}function a(f,h){--f[h]||delete f[h]}function u(f,h,p,v){var m=""+h,y=""+p;if(!f&&m>y){var b=m;m=y,y=b}return m+n+y+n+(e.isUndefined(v)?t:v)}function c(f,h,p,v){var m=""+h,y=""+p;if(!f&&m>y){var b=m;m=y,y=b}var x={v:m,w:y};return v&&(x.name=v),x}function d(f,h){return u(f,h.v,h.w,h.name)}return _v}var Ev,IC;function tV(){return IC||(IC=1,Ev="2.1.8"),Ev}var Sv,NC;function rV(){return NC||(NC=1,Sv={Graph:yx(),version:tV()}),Sv}var Ov,TC;function nV(){if(TC)return Ov;TC=1;var e=Or(),t=yx();Ov={write:r,read:o};function r(a){var u={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:i(a)};return e.isUndefined(a.graph())||(u.value=e.clone(a.graph())),u}function n(a){return e.map(a.nodes(),function(u){var c=a.node(u),d=a.parent(u),f={v:u};return e.isUndefined(c)||(f.value=c),e.isUndefined(d)||(f.parent=d),f})}function i(a){return e.map(a.edges(),function(u){var c=a.edge(u),d={v:u.v,w:u.w};return e.isUndefined(u.name)||(d.name=u.name),e.isUndefined(c)||(d.value=c),d})}function o(a){var u=new t(a.options).setGraph(a.value);return e.each(a.nodes,function(c){u.setNode(c.v,c.value),c.parent&&u.setParent(c.v,c.parent)}),e.each(a.edges,function(c){u.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),u}return Ov}var Cv,AC;function iV(){if(AC)return Cv;AC=1;var e=Or();Cv=t;function t(r){var n={},i=[],o;function a(u){e.has(n,u)||(n[u]=!0,o.push(u),e.each(r.successors(u),a),e.each(r.predecessors(u),a))}return e.each(r.nodes(),function(u){o=[],a(u),o.length&&i.push(o)}),i}return Cv}var Rv,MC;function aj(){if(MC)return Rv;MC=1;var e=Or();Rv=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(r){return r.key})},t.prototype.has=function(r){return e.has(this._keyIndices,r)},t.prototype.priority=function(r){var n=this._keyIndices[r];if(n!==void 0)return this._arr[n].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(r,n){var i=this._keyIndices;if(r=String(r),!e.has(i,r)){var o=this._arr,a=o.length;return i[r]=a,o.push({key:r,priority:n}),this._decrease(a),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},t.prototype.decrease=function(r,n){var i=this._keyIndices[r];if(n>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[i].priority+" New: "+n);this._arr[i].priority=n,this._decrease(i)},t.prototype._heapify=function(r){var n=this._arr,i=2*r,o=i+1,a=r;i<n.length&&(a=n[i].priority<n[a].priority?i:a,o<n.length&&(a=n[o].priority<n[a].priority?o:a),a!==r&&(this._swap(r,a),this._heapify(a)))},t.prototype._decrease=function(r){for(var n=this._arr,i=n[r].priority,o;r!==0&&(o=r>>1,!(n[o].priority<i));)this._swap(r,o),r=o},t.prototype._swap=function(r,n){var i=this._arr,o=this._keyIndices,a=i[r],u=i[n];i[r]=u,i[n]=a,o[u.key]=r,o[a.key]=n},Rv}var Pv,DC;function sj(){if(DC)return Pv;DC=1;var e=Or(),t=aj();Pv=n;var r=e.constant(1);function n(o,a,u,c){return i(o,String(a),u||r,c||function(d){return o.outEdges(d)})}function i(o,a,u,c){var d={},f=new t,h,p,v=function(m){var y=m.v!==h?m.v:m.w,b=d[y],x=u(m),w=p.distance+x;if(x<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+x);w<b.distance&&(b.distance=w,b.predecessor=h,f.decrease(y,w))};for(o.nodes().forEach(function(m){var y=m===a?0:Number.POSITIVE_INFINITY;d[m]={distance:y},f.add(m,y)});f.size()>0&&(h=f.removeMin(),p=d[h],p.distance!==Number.POSITIVE_INFINITY);)c(h).forEach(v);return d}return Pv}var Iv,jC;function oV(){if(jC)return Iv;jC=1;var e=sj(),t=Or();Iv=r;function r(n,i,o){return t.transform(n.nodes(),function(a,u){a[u]=e(n,u,i,o)},{})}return Iv}var Nv,qC;function uj(){if(qC)return Nv;qC=1;var e=Or();Nv=t;function t(r){var n=0,i=[],o={},a=[];function u(c){var d=o[c]={onStack:!0,lowlink:n,index:n++};if(i.push(c),r.successors(c).forEach(function(p){e.has(o,p)?o[p].onStack&&(d.lowlink=Math.min(d.lowlink,o[p].index)):(u(p),d.lowlink=Math.min(d.lowlink,o[p].lowlink))}),d.lowlink===d.index){var f=[],h;do h=i.pop(),o[h].onStack=!1,f.push(h);while(c!==h);a.push(f)}}return r.nodes().forEach(function(c){e.has(o,c)||u(c)}),a}return Nv}var Tv,kC;function aV(){if(kC)return Tv;kC=1;var e=Or(),t=uj();Tv=r;function r(n){return e.filter(t(n),function(i){return i.length>1||i.length===1&&n.hasEdge(i[0],i[0])})}return Tv}var Av,LC;function sV(){if(LC)return Av;LC=1;var e=Or();Av=r;var t=e.constant(1);function r(i,o,a){return n(i,o||t,a||function(u){return i.outEdges(u)})}function n(i,o,a){var u={},c=i.nodes();return c.forEach(function(d){u[d]={},u[d][d]={distance:0},c.forEach(function(f){d!==f&&(u[d][f]={distance:Number.POSITIVE_INFINITY})}),a(d).forEach(function(f){var h=f.v===d?f.w:f.v,p=o(f);u[d][h]={distance:p,predecessor:d}})}),c.forEach(function(d){var f=u[d];c.forEach(function(h){var p=u[h];c.forEach(function(v){var m=p[d],y=f[v],b=p[v],x=m.distance+y.distance;x<b.distance&&(b.distance=x,b.predecessor=y.predecessor)})})}),u}return Av}var Mv,BC;function cj(){if(BC)return Mv;BC=1;var e=Or();Mv=t,t.CycleException=r;function t(n){var i={},o={},a=[];function u(c){if(e.has(o,c))throw new r;e.has(i,c)||(o[c]=!0,i[c]=!0,e.each(n.predecessors(c),u),delete o[c],a.push(c))}if(e.each(n.sinks(),u),e.size(i)!==n.nodeCount())throw new r;return a}function r(){}return r.prototype=new Error,Mv}var Dv,FC;function uV(){if(FC)return Dv;FC=1;var e=cj();Dv=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return Dv}var jv,$C;function lj(){if($C)return jv;$C=1;var e=Or();jv=t;function t(n,i,o){e.isArray(i)||(i=[i]);var a=(n.isDirected()?n.successors:n.neighbors).bind(n),u=[],c={};return e.each(i,function(d){if(!n.hasNode(d))throw new Error("Graph does not have node: "+d);r(n,d,o==="post",c,a,u)}),u}function r(n,i,o,a,u,c){e.has(a,i)||(a[i]=!0,o||c.push(i),e.each(u(i),function(d){r(n,d,o,a,u,c)}),o&&c.push(i))}return jv}var qv,zC;function cV(){if(zC)return qv;zC=1;var e=lj();qv=t;function t(r,n){return e(r,n,"post")}return qv}var kv,HC;function lV(){if(HC)return kv;HC=1;var e=lj();kv=t;function t(r,n){return e(r,n,"pre")}return kv}var Lv,UC;function fV(){if(UC)return Lv;UC=1;var e=Or(),t=yx(),r=aj();Lv=n;function n(i,o){var a=new t,u={},c=new r,d;function f(p){var v=p.v===d?p.w:p.v,m=c.priority(v);if(m!==void 0){var y=o(p);y<m&&(u[v]=d,c.decrease(v,y))}}if(i.nodeCount()===0)return a;e.each(i.nodes(),function(p){c.add(p,Number.POSITIVE_INFINITY),a.setNode(p)}),c.decrease(i.nodes()[0],0);for(var h=!1;c.size()>0;){if(d=c.removeMin(),e.has(u,d))a.setEdge(d,u[d]);else{if(h)throw new Error("Input graph is not connected: "+i);h=!0}i.nodeEdges(d).forEach(f)}return a}return Lv}var Bv,VC;function dV(){return VC||(VC=1,Bv={components:iV(),dijkstra:sj(),dijkstraAll:oV(),findCycles:aV(),floydWarshall:sV(),isAcyclic:uV(),postorder:cV(),preorder:lV(),prim:fV(),tarjan:uj(),topsort:cj()}),Bv}var Fv,WC;function hV(){if(WC)return Fv;WC=1;var e=rV();return Fv={Graph:e.Graph,json:nV(),alg:dV(),version:e.version},Fv}var $v,GC;function qr(){if(GC)return $v;GC=1;var e;if(typeof rx=="function")try{e=hV()}catch{}return e||(e=window.graphlib),$v=e,$v}var zv,KC;function pV(){if(KC)return zv;KC=1;var e=jD(),t=1,r=4;function n(i){return e(i,t|r)}return zv=n,zv}var Hv,YC;function qc(){if(YC)return Hv;YC=1;var e=yo(),t=_n(),r=Rc(),n=Sr();function i(o,a,u){if(!n(u))return!1;var c=typeof a;return(c=="number"?t(u)&&r(a,u.length):c=="string"&&a in u)?e(u[a],o):!1}return Hv=i,Hv}var Uv,XC;function vV(){if(XC)return Uv;XC=1;var e=jc(),t=yo(),r=qc(),n=_i(),i=Object.prototype,o=i.hasOwnProperty,a=e(function(u,c){u=Object(u);var d=-1,f=c.length,h=f>2?c[2]:void 0;for(h&&r(c[0],c[1],h)&&(f=1);++d<f;)for(var p=c[d],v=n(p),m=-1,y=v.length;++m<y;){var b=v[m],x=u[b];(x===void 0||t(x,i[b])&&!o.call(u,b))&&(u[b]=p[b])}return u});return Uv=a,Uv}var Vv,ZC;function gV(){if(ZC)return Vv;ZC=1;var e=En(),t=_n(),r=Vn();function n(i){return function(o,a,u){var c=Object(o);if(!t(o)){var d=e(a,3);o=r(o),a=function(h){return d(c[h],h,c)}}var f=i(o,a,u);return f>-1?c[d?o[f]:f]:void 0}}return Vv=n,Vv}var Wv,JC;function mV(){if(JC)return Wv;JC=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Wv=t,Wv}var Gv,QC;function yV(){if(QC)return Gv;QC=1;var e=mV(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Gv=r,Gv}var Kv,eR;function bV(){if(eR)return Kv;eR=1;var e=yV(),t=Sr(),r=_o(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt;function c(d){if(typeof d=="number")return d;if(r(d))return n;if(t(d)){var f=typeof d.valueOf=="function"?d.valueOf():d;d=t(f)?f+"":f}if(typeof d!="string")return d===0?d:+d;d=e(d);var h=o.test(d);return h||a.test(d)?u(d.slice(2),h?2:8):i.test(d)?n:+d}return Kv=c,Kv}var Yv,tR;function fj(){if(tR)return Yv;tR=1;var e=bV(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*r}return i===i?i:0}return Yv=n,Yv}var Xv,rR;function xV(){if(rR)return Xv;rR=1;var e=fj();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return Xv=t,Xv}var Zv,nR;function wV(){if(nR)return Zv;nR=1;var e=nj(),t=En(),r=xV(),n=Math.max;function i(o,a,u){var c=o==null?0:o.length;if(!c)return-1;var d=u==null?0:r(u);return d<0&&(d=n(c+d,0)),e(o,t(a,3),d)}return Zv=i,Zv}var Jv,iR;function _V(){if(iR)return Jv;iR=1;var e=gV(),t=wV(),r=e(t);return Jv=r,Jv}var Qv,oR;function dj(){if(oR)return Qv;oR=1;var e=mx();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return Qv=t,Qv}var eg,aR;function EV(){if(aR)return eg;aR=1;var e=hx(),t=qD(),r=_i();function n(i,o){return i==null?i:e(i,t(o),r)}return eg=n,eg}var tg,sR;function SV(){if(sR)return tg;sR=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return tg=e,tg}var rg,uR;function OV(){if(uR)return rg;uR=1;var e=Oc(),t=px(),r=En();function n(i,o){var a={};return o=r(o,3),t(i,function(u,c,d){e(a,c,o(u,c,d))}),a}return rg=n,rg}var ng,cR;function bx(){if(cR)return ng;cR=1;var e=_o();function t(r,n,i){for(var o=-1,a=r.length;++o<a;){var u=r[o],c=n(u);if(c!=null&&(d===void 0?c===c&&!e(c):i(c,d)))var d=c,f=u}return f}return ng=t,ng}var ig,lR;function CV(){if(lR)return ig;lR=1;function e(t,r){return t>r}return ig=e,ig}var og,fR;function RV(){if(fR)return og;fR=1;var e=bx(),t=CV(),r=Ei();function n(i){return i&&i.length?e(i,r,t):void 0}return og=n,og}var ag,dR;function hj(){if(dR)return ag;dR=1;var e=Oc(),t=yo();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return ag=r,ag}var sg,hR;function PV(){if(hR)return sg;hR=1;var e=xi(),t=Nc(),r=nn(),n="[object Object]",i=Function.prototype,o=Object.prototype,a=i.toString,u=o.hasOwnProperty,c=a.call(Object);function d(f){if(!r(f)||e(f)!=n)return!1;var h=t(f);if(h===null)return!0;var p=u.call(h,"constructor")&&h.constructor;return typeof p=="function"&&p instanceof p&&a.call(p)==c}return sg=d,sg}var ug,pR;function pj(){if(pR)return ug;pR=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return ug=e,ug}var cg,vR;function IV(){if(vR)return cg;vR=1;var e=za(),t=_i();function r(n){return e(n,t(n))}return cg=r,cg}var lg,gR;function NV(){if(gR)return lg;gR=1;var e=hj(),t=ED(),r=AD(),n=SD(),i=DD(),o=Ha(),a=yt(),u=ij(),c=xo(),d=$a(),f=Sr(),h=PV(),p=Ua(),v=pj(),m=IV();function y(b,x,w,S,E,_,R){var P=v(b,w),N=v(x,w),j=R.get(N);if(j){e(b,w,j);return}var L=_?_(P,N,w+"",b,x,R):void 0,F=L===void 0;if(F){var k=a(N),D=!k&&c(N),T=!k&&!D&&p(N);L=N,k||D||T?a(P)?L=P:u(P)?L=n(P):D?(F=!1,L=t(N,!0)):T?(F=!1,L=r(N,!0)):L=[]:h(N)||o(N)?(L=P,o(P)?L=m(P):(!f(P)||d(P))&&(L=i(N))):F=!1}F&&(R.set(N,L),E(L,N,S,_,R),R.delete(N)),e(b,w,L)}return lg=y,lg}var fg,mR;function TV(){if(mR)return fg;mR=1;var e=Sc(),t=hj(),r=hx(),n=NV(),i=Sr(),o=_i(),a=pj();function u(c,d,f,h,p){c!==d&&r(d,function(v,m){if(p||(p=new e),i(v))n(c,d,m,f,u,h,p);else{var y=h?h(a(c,m),v,m+"",c,d,p):void 0;y===void 0&&(y=v),t(c,m,y)}},o)}return fg=u,fg}var dg,yR;function AV(){if(yR)return dg;yR=1;var e=jc(),t=qc();function r(n){return e(function(i,o){var a=-1,u=o.length,c=u>1?o[u-1]:void 0,d=u>2?o[2]:void 0;for(c=n.length>3&&typeof c=="function"?(u--,c):void 0,d&&t(o[0],o[1],d)&&(c=u<3?void 0:c,u=1),i=Object(i);++a<u;){var f=o[a];f&&n(i,f,a,c)}return i})}return dg=r,dg}var hg,bR;function MV(){if(bR)return hg;bR=1;var e=TV(),t=AV(),r=t(function(n,i,o){e(n,i,o)});return hg=r,hg}var pg,xR;function vj(){if(xR)return pg;xR=1;function e(t,r){return t<r}return pg=e,pg}var vg,wR;function DV(){if(wR)return vg;wR=1;var e=bx(),t=vj(),r=Ei();function n(i){return i&&i.length?e(i,r,t):void 0}return vg=n,vg}var gg,_R;function jV(){if(_R)return gg;_R=1;var e=bx(),t=En(),r=vj();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return gg=n,gg}var mg,ER;function qV(){if(ER)return mg;ER=1;var e=Br(),t=function(){return e.Date.now()};return mg=t,mg}var yg,SR;function kV(){if(SR)return yg;SR=1;var e=Cc(),t=Mc(),r=Rc(),n=Sr(),i=Va();function o(a,u,c,d){if(!n(a))return a;u=t(u,a);for(var f=-1,h=u.length,p=h-1,v=a;v!=null&&++f<h;){var m=i(u[f]),y=c;if(m==="__proto__"||m==="constructor"||m==="prototype")return a;if(f!=p){var b=v[m];y=d?d(b,m,v):void 0,y===void 0&&(y=n(b)?b:r(u[f+1])?[]:{})}e(v,m,y),v=v[m]}return a}return yg=o,yg}var bg,OR;function LV(){if(OR)return bg;OR=1;var e=Dc(),t=kV(),r=Mc();function n(i,o,a){for(var u=-1,c=o.length,d={};++u<c;){var f=o[u],h=e(i,f);a(h,f)&&t(d,r(f,i),h)}return d}return bg=n,bg}var xg,CR;function BV(){if(CR)return xg;CR=1;var e=LV(),t=GD();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return xg=r,xg}var wg,RR;function FV(){if(RR)return wg;RR=1;var e=dj(),t=tj(),r=rj();function n(i){return r(t(i,void 0,e),i+"")}return wg=n,wg}var _g,PR;function $V(){if(PR)return _g;PR=1;var e=BV(),t=FV(),r=t(function(n,i){return n==null?{}:e(n,i)});return _g=r,_g}var Eg,IR;function zV(){if(IR)return Eg;IR=1;var e=Math.ceil,t=Math.max;function r(n,i,o,a){for(var u=-1,c=t(e((i-n)/(o||1)),0),d=Array(c);c--;)d[a?c:++u]=n,n+=o;return d}return Eg=r,Eg}var Sg,NR;function HV(){if(NR)return Sg;NR=1;var e=zV(),t=qc(),r=fj();function n(i){return function(o,a,u){return u&&typeof u!="number"&&t(o,a,u)&&(a=u=void 0),o=r(o),a===void 0?(a=o,o=0):a=r(a),u=u===void 0?o<a?1:-1:r(u),e(o,a,u,i)}}return Sg=n,Sg}var Og,TR;function UV(){if(TR)return Og;TR=1;var e=HV(),t=e();return Og=t,Og}var Cg,AR;function VV(){if(AR)return Cg;AR=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Cg=e,Cg}var Rg,MR;function WV(){if(MR)return Rg;MR=1;var e=_o();function t(r,n){if(r!==n){var i=r!==void 0,o=r===null,a=r===r,u=e(r),c=n!==void 0,d=n===null,f=n===n,h=e(n);if(!d&&!h&&!u&&r>n||u&&c&&f&&!d&&!h||o&&c&&f||!i&&f||!a)return 1;if(!o&&!u&&!h&&r<n||h&&i&&a&&!o&&!u||d&&i&&a||!c&&a||!f)return-1}return 0}return Rg=t,Rg}var Pg,DR;function GV(){if(DR)return Pg;DR=1;var e=WV();function t(r,n,i){for(var o=-1,a=r.criteria,u=n.criteria,c=a.length,d=i.length;++o<c;){var f=e(a[o],u[o]);if(f){if(o>=d)return f;var h=i[o];return f*(h=="desc"?-1:1)}}return r.index-n.index}return Pg=t,Pg}var Ig,jR;function KV(){if(jR)return Ig;jR=1;var e=Ac(),t=Dc(),r=En(),n=JD(),i=VV(),o=Pc(),a=GV(),u=Ei(),c=yt();function d(f,h,p){h.length?h=e(h,function(y){return c(y)?function(b){return t(b,y.length===1?y[0]:y)}:y}):h=[u];var v=-1;h=e(h,o(r));var m=n(f,function(y,b,x){var w=e(h,function(S){return S(y)});return{criteria:w,index:++v,value:y}});return i(m,function(y,b){return a(y,b,p)})}return Ig=d,Ig}var Ng,qR;function YV(){if(qR)return Ng;qR=1;var e=mx(),t=KV(),r=jc(),n=qc(),i=r(function(o,a){if(o==null)return[];var u=a.length;return u>1&&n(o,a[0],a[1])?a=[]:u>2&&n(a[0],a[1],a[2])&&(a=[a[0]]),t(o,e(a,1),[])});return Ng=i,Ng}var Tg,kR;function XV(){if(kR)return Tg;kR=1;var e=VD(),t=0;function r(n){var i=++t;return e(n)+i}return Tg=r,Tg}var Ag,LR;function ZV(){if(LR)return Ag;LR=1;function e(t,r,n){for(var i=-1,o=t.length,a=r.length,u={};++i<o;){var c=i<a?r[i]:void 0;n(u,t[i],c)}return u}return Ag=e,Ag}var Mg,BR;function JV(){if(BR)return Mg;BR=1;var e=Cc(),t=ZV();function r(n,i){return t(n||[],i||[],e)}return Mg=r,Mg}var Dg,FR;function lt(){if(FR)return Dg;FR=1;var e;if(typeof rx=="function")try{e={cloneDeep:pV(),constant:dx(),defaults:vV(),each:LD(),filter:YD(),find:_V(),flatten:dj(),forEach:kD(),forIn:EV(),has:XD(),isUndefined:ZD(),last:SV(),map:QD(),mapValues:OV(),max:RV(),merge:MV(),min:DV(),minBy:jV(),now:qV(),pick:$V(),range:UV(),reduce:ej(),sortBy:YV(),uniqueId:XV(),values:oj(),zipObject:JV()}}catch{}return e||(e=window._),Dg=e,Dg}var jg,$R;function QV(){if($R)return jg;$R=1,jg=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,i=n._prev;if(i!==n)return t(i),i},e.prototype.enqueue=function(n){var i=this._sentinel;n._prev&&n._next&&t(n),n._next=i._next,i._next._prev=n,i._next=n,n._prev=i},e.prototype.toString=function(){for(var n=[],i=this._sentinel,o=i._prev;o!==i;)n.push(JSON.stringify(o,r)),o=o._prev;return"["+n.join(", ")+"]"};function t(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function r(n,i){if(n!=="_next"&&n!=="_prev")return i}return jg}var qg,zR;function eW(){if(zR)return qg;zR=1;var e=lt(),t=qr().Graph,r=QV();qg=i;var n=e.constant(1);function i(d,f){if(d.nodeCount()<=1)return[];var h=u(d,f||n),p=o(h.graph,h.buckets,h.zeroIdx);return e.flatten(e.map(p,function(v){return d.outEdges(v.v,v.w)}),!0)}function o(d,f,h){for(var p=[],v=f[f.length-1],m=f[0],y;d.nodeCount();){for(;y=m.dequeue();)a(d,f,h,y);for(;y=v.dequeue();)a(d,f,h,y);if(d.nodeCount()){for(var b=f.length-2;b>0;--b)if(y=f[b].dequeue(),y){p=p.concat(a(d,f,h,y,!0));break}}}return p}function a(d,f,h,p,v){var m=v?[]:void 0;return e.forEach(d.inEdges(p.v),function(y){var b=d.edge(y),x=d.node(y.v);v&&m.push({v:y.v,w:y.w}),x.out-=b,c(f,h,x)}),e.forEach(d.outEdges(p.v),function(y){var b=d.edge(y),x=y.w,w=d.node(x);w.in-=b,c(f,h,w)}),d.removeNode(p.v),m}function u(d,f){var h=new t,p=0,v=0;e.forEach(d.nodes(),function(b){h.setNode(b,{v:b,in:0,out:0})}),e.forEach(d.edges(),function(b){var x=h.edge(b.v,b.w)||0,w=f(b),S=x+w;h.setEdge(b.v,b.w,S),v=Math.max(v,h.node(b.v).out+=w),p=Math.max(p,h.node(b.w).in+=w)});var m=e.range(v+p+3).map(function(){return new r}),y=p+1;return e.forEach(h.nodes(),function(b){c(m,y,h.node(b))}),{graph:h,buckets:m,zeroIdx:y}}function c(d,f,h){h.out?h.in?d[h.out-h.in+f].enqueue(h):d[d.length-1].enqueue(h):d[0].enqueue(h)}return qg}var kg,HR;function tW(){if(HR)return kg;HR=1;var e=lt(),t=eW();kg={run:r,undo:i};function r(o){var a=o.graph().acyclicer==="greedy"?t(o,u(o)):n(o);e.forEach(a,function(c){var d=o.edge(c);o.removeEdge(c),d.forwardName=c.name,d.reversed=!0,o.setEdge(c.w,c.v,d,e.uniqueId("rev"))});function u(c){return function(d){return c.edge(d).weight}}}function n(o){var a=[],u={},c={};function d(f){e.has(c,f)||(c[f]=!0,u[f]=!0,e.forEach(o.outEdges(f),function(h){e.has(u,h.w)?a.push(h):d(h.w)}),delete u[f])}return e.forEach(o.nodes(),d),a}function i(o){e.forEach(o.edges(),function(a){var u=o.edge(a);if(u.reversed){o.removeEdge(a);var c=u.forwardName;delete u.reversed,delete u.forwardName,o.setEdge(a.w,a.v,u,c)}})}return kg}var Lg,UR;function Kt(){if(UR)return Lg;UR=1;var e=lt(),t=qr().Graph;Lg={addDummyNode:r,simplify:n,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:a,intersectRect:u,buildLayerMatrix:c,normalizeRanks:d,removeEmptyRanks:f,addBorderNode:h,maxRank:p,partition:v,time:m,notime:y};function r(b,x,w,S){var E;do E=e.uniqueId(S);while(b.hasNode(E));return w.dummy=x,b.setNode(E,w),E}function n(b){var x=new t().setGraph(b.graph());return e.forEach(b.nodes(),function(w){x.setNode(w,b.node(w))}),e.forEach(b.edges(),function(w){var S=x.edge(w.v,w.w)||{weight:0,minlen:1},E=b.edge(w);x.setEdge(w.v,w.w,{weight:S.weight+E.weight,minlen:Math.max(S.minlen,E.minlen)})}),x}function i(b){var x=new t({multigraph:b.isMultigraph()}).setGraph(b.graph());return e.forEach(b.nodes(),function(w){b.children(w).length||x.setNode(w,b.node(w))}),e.forEach(b.edges(),function(w){x.setEdge(w,b.edge(w))}),x}function o(b){var x=e.map(b.nodes(),function(w){var S={};return e.forEach(b.outEdges(w),function(E){S[E.w]=(S[E.w]||0)+b.edge(E).weight}),S});return e.zipObject(b.nodes(),x)}function a(b){var x=e.map(b.nodes(),function(w){var S={};return e.forEach(b.inEdges(w),function(E){S[E.v]=(S[E.v]||0)+b.edge(E).weight}),S});return e.zipObject(b.nodes(),x)}function u(b,x){var w=b.x,S=b.y,E=x.x-w,_=x.y-S,R=b.width/2,P=b.height/2;if(!E&&!_)throw new Error("Not possible to find intersection inside of the rectangle");var N,j;return Math.abs(_)*R>Math.abs(E)*P?(_<0&&(P=-P),N=P*E/_,j=P):(E<0&&(R=-R),N=R,j=R*_/E),{x:w+N,y:S+j}}function c(b){var x=e.map(e.range(p(b)+1),function(){return[]});return e.forEach(b.nodes(),function(w){var S=b.node(w),E=S.rank;e.isUndefined(E)||(x[E][S.order]=w)}),x}function d(b){var x=e.min(e.map(b.nodes(),function(w){return b.node(w).rank}));e.forEach(b.nodes(),function(w){var S=b.node(w);e.has(S,"rank")&&(S.rank-=x)})}function f(b){var x=e.min(e.map(b.nodes(),function(_){return b.node(_).rank})),w=[];e.forEach(b.nodes(),function(_){var R=b.node(_).rank-x;w[R]||(w[R]=[]),w[R].push(_)});var S=0,E=b.graph().nodeRankFactor;e.forEach(w,function(_,R){e.isUndefined(_)&&R%E!==0?--S:S&&e.forEach(_,function(P){b.node(P).rank+=S})})}function h(b,x,w,S){var E={width:0,height:0};return arguments.length>=4&&(E.rank=w,E.order=S),r(b,"border",E,x)}function p(b){return e.max(e.map(b.nodes(),function(x){var w=b.node(x).rank;if(!e.isUndefined(w))return w}))}function v(b,x){var w={lhs:[],rhs:[]};return e.forEach(b,function(S){x(S)?w.lhs.push(S):w.rhs.push(S)}),w}function m(b,x){var w=e.now();try{return x()}finally{console.log(b+" time: "+(e.now()-w)+"ms")}}function y(b,x){return x()}return Lg}var Bg,VR;function rW(){if(VR)return Bg;VR=1;var e=lt(),t=Kt();Bg={run:r,undo:i};function r(o){o.graph().dummyChains=[],e.forEach(o.edges(),function(a){n(o,a)})}function n(o,a){var u=a.v,c=o.node(u).rank,d=a.w,f=o.node(d).rank,h=a.name,p=o.edge(a),v=p.labelRank;if(f!==c+1){o.removeEdge(a);var m,y,b;for(b=0,++c;c<f;++b,++c)p.points=[],y={width:0,height:0,edgeLabel:p,edgeObj:a,rank:c},m=t.addDummyNode(o,"edge",y,"_d"),c===v&&(y.width=p.width,y.height=p.height,y.dummy="edge-label",y.labelpos=p.labelpos),o.setEdge(u,m,{weight:p.weight},h),b===0&&o.graph().dummyChains.push(m),u=m;o.setEdge(u,d,{weight:p.weight},h)}}function i(o){e.forEach(o.graph().dummyChains,function(a){var u=o.node(a),c=u.edgeLabel,d;for(o.setEdge(u.edgeObj,c);u.dummy;)d=o.successors(a)[0],o.removeNode(a),c.points.push({x:u.x,y:u.y}),u.dummy==="edge-label"&&(c.x=u.x,c.y=u.y,c.width=u.width,c.height=u.height),a=d,u=o.node(a)})}return Bg}var Fg,WR;function Hu(){if(WR)return Fg;WR=1;var e=lt();Fg={longestPath:t,slack:r};function t(n){var i={};function o(a){var u=n.node(a);if(e.has(i,a))return u.rank;i[a]=!0;var c=e.min(e.map(n.outEdges(a),function(d){return o(d.w)-n.edge(d).minlen}));return(c===Number.POSITIVE_INFINITY||c===void 0||c===null)&&(c=0),u.rank=c}e.forEach(n.sources(),o)}function r(n,i){return n.node(i.w).rank-n.node(i.v).rank-n.edge(i).minlen}return Fg}var $g,GR;function gj(){if(GR)return $g;GR=1;var e=lt(),t=qr().Graph,r=Hu().slack;$g=n;function n(u){var c=new t({directed:!1}),d=u.nodes()[0],f=u.nodeCount();c.setNode(d,{});for(var h,p;i(c,u)<f;)h=o(c,u),p=c.hasNode(h.v)?r(u,h):-r(u,h),a(c,u,p);return c}function i(u,c){function d(f){e.forEach(c.nodeEdges(f),function(h){var p=h.v,v=f===p?h.w:p;!u.hasNode(v)&&!r(c,h)&&(u.setNode(v,{}),u.setEdge(f,v,{}),d(v))})}return e.forEach(u.nodes(),d),u.nodeCount()}function o(u,c){return e.minBy(c.edges(),function(d){if(u.hasNode(d.v)!==u.hasNode(d.w))return r(c,d)})}function a(u,c,d){e.forEach(u.nodes(),function(f){c.node(f).rank+=d})}return $g}var zg,KR;function nW(){if(KR)return zg;KR=1;var e=lt(),t=gj(),r=Hu().slack,n=Hu().longestPath,i=qr().alg.preorder,o=qr().alg.postorder,a=Kt().simplify;zg=u,u.initLowLimValues=h,u.initCutValues=c,u.calcCutValue=f,u.leaveEdge=v,u.enterEdge=m,u.exchangeEdges=y;function u(S){S=a(S),n(S);var E=t(S);h(E),c(E,S);for(var _,R;_=v(E);)R=m(E,S,_),y(E,S,_,R)}function c(S,E){var _=o(S,S.nodes());_=_.slice(0,_.length-1),e.forEach(_,function(R){d(S,E,R)})}function d(S,E,_){var R=S.node(_),P=R.parent;S.edge(_,P).cutvalue=f(S,E,_)}function f(S,E,_){var R=S.node(_),P=R.parent,N=!0,j=E.edge(_,P),L=0;return j||(N=!1,j=E.edge(P,_)),L=j.weight,e.forEach(E.nodeEdges(_),function(F){var k=F.v===_,D=k?F.w:F.v;if(D!==P){var T=k===N,B=E.edge(F).weight;if(L+=T?B:-B,x(S,_,D)){var $=S.edge(_,D).cutvalue;L+=T?-$:$}}}),L}function h(S,E){arguments.length<2&&(E=S.nodes()[0]),p(S,{},1,E)}function p(S,E,_,R,P){var N=_,j=S.node(R);return E[R]=!0,e.forEach(S.neighbors(R),function(L){e.has(E,L)||(_=p(S,E,_,L,R))}),j.low=N,j.lim=_++,P?j.parent=P:delete j.parent,_}function v(S){return e.find(S.edges(),function(E){return S.edge(E).cutvalue<0})}function m(S,E,_){var R=_.v,P=_.w;E.hasEdge(R,P)||(R=_.w,P=_.v);var N=S.node(R),j=S.node(P),L=N,F=!1;N.lim>j.lim&&(L=j,F=!0);var k=e.filter(E.edges(),function(D){return F===w(S,S.node(D.v),L)&&F!==w(S,S.node(D.w),L)});return e.minBy(k,function(D){return r(E,D)})}function y(S,E,_,R){var P=_.v,N=_.w;S.removeEdge(P,N),S.setEdge(R.v,R.w,{}),h(S),c(S,E),b(S,E)}function b(S,E){var _=e.find(S.nodes(),function(P){return!E.node(P).parent}),R=i(S,_);R=R.slice(1),e.forEach(R,function(P){var N=S.node(P).parent,j=E.edge(P,N),L=!1;j||(j=E.edge(N,P),L=!0),E.node(P).rank=E.node(N).rank+(L?j.minlen:-j.minlen)})}function x(S,E,_){return S.hasEdge(E,_)}function w(S,E,_){return _.low<=E.lim&&E.lim<=_.lim}return zg}var Hg,YR;function iW(){if(YR)return Hg;YR=1;var e=Hu(),t=e.longestPath,r=gj(),n=nW();Hg=i;function i(c){switch(c.graph().ranker){case"network-simplex":u(c);break;case"tight-tree":a(c);break;case"longest-path":o(c);break;default:u(c)}}var o=t;function a(c){t(c),r(c)}function u(c){n(c)}return Hg}var Ug,XR;function oW(){if(XR)return Ug;XR=1;var e=lt();Ug=t;function t(i){var o=n(i);e.forEach(i.graph().dummyChains,function(a){for(var u=i.node(a),c=u.edgeObj,d=r(i,o,c.v,c.w),f=d.path,h=d.lca,p=0,v=f[p],m=!0;a!==c.w;){if(u=i.node(a),m){for(;(v=f[p])!==h&&i.node(v).maxRank<u.rank;)p++;v===h&&(m=!1)}if(!m){for(;p<f.length-1&&i.node(v=f[p+1]).minRank<=u.rank;)p++;v=f[p]}i.setParent(a,v),a=i.successors(a)[0]}})}function r(i,o,a,u){var c=[],d=[],f=Math.min(o[a].low,o[u].low),h=Math.max(o[a].lim,o[u].lim),p,v;p=a;do p=i.parent(p),c.push(p);while(p&&(o[p].low>f||h>o[p].lim));for(v=p,p=u;(p=i.parent(p))!==v;)d.push(p);return{path:c.concat(d.reverse()),lca:v}}function n(i){var o={},a=0;function u(c){var d=a;e.forEach(i.children(c),u),o[c]={low:d,lim:a++}}return e.forEach(i.children(),u),o}return Ug}var Vg,ZR;function aW(){if(ZR)return Vg;ZR=1;var e=lt(),t=Kt();Vg={run:r,cleanup:a};function r(u){var c=t.addDummyNode(u,"root",{},"_root"),d=i(u),f=e.max(e.values(d))-1,h=2*f+1;u.graph().nestingRoot=c,e.forEach(u.edges(),function(v){u.edge(v).minlen*=h});var p=o(u)+1;e.forEach(u.children(),function(v){n(u,c,h,p,f,d,v)}),u.graph().nodeRankFactor=h}function n(u,c,d,f,h,p,v){var m=u.children(v);if(!m.length){v!==c&&u.setEdge(c,v,{weight:0,minlen:d});return}var y=t.addBorderNode(u,"_bt"),b=t.addBorderNode(u,"_bb"),x=u.node(v);u.setParent(y,v),x.borderTop=y,u.setParent(b,v),x.borderBottom=b,e.forEach(m,function(w){n(u,c,d,f,h,p,w);var S=u.node(w),E=S.borderTop?S.borderTop:w,_=S.borderBottom?S.borderBottom:w,R=S.borderTop?f:2*f,P=E!==_?1:h-p[v]+1;u.setEdge(y,E,{weight:R,minlen:P,nestingEdge:!0}),u.setEdge(_,b,{weight:R,minlen:P,nestingEdge:!0})}),u.parent(v)||u.setEdge(c,y,{weight:0,minlen:h+p[v]})}function i(u){var c={};function d(f,h){var p=u.children(f);p&&p.length&&e.forEach(p,function(v){d(v,h+1)}),c[f]=h}return e.forEach(u.children(),function(f){d(f,1)}),c}function o(u){return e.reduce(u.edges(),function(c,d){return c+u.edge(d).weight},0)}function a(u){var c=u.graph();u.removeNode(c.nestingRoot),delete c.nestingRoot,e.forEach(u.edges(),function(d){var f=u.edge(d);f.nestingEdge&&u.removeEdge(d)})}return Vg}var Wg,JR;function sW(){if(JR)return Wg;JR=1;var e=lt(),t=Kt();Wg=r;function r(i){function o(a){var u=i.children(a),c=i.node(a);if(u.length&&e.forEach(u,o),e.has(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(var d=c.minRank,f=c.maxRank+1;d<f;++d)n(i,"borderLeft","_bl",a,c,d),n(i,"borderRight","_br",a,c,d)}}e.forEach(i.children(),o)}function n(i,o,a,u,c,d){var f={width:0,height:0,rank:d,borderType:o},h=c[o][d-1],p=t.addDummyNode(i,"border",f,a);c[o][d]=p,i.setParent(p,u),h&&i.setEdge(h,p,{weight:1})}return Wg}var Gg,QR;function uW(){if(QR)return Gg;QR=1;var e=lt();Gg={adjust:t,undo:r};function t(d){var f=d.graph().rankdir.toLowerCase();(f==="lr"||f==="rl")&&n(d)}function r(d){var f=d.graph().rankdir.toLowerCase();(f==="bt"||f==="rl")&&o(d),(f==="lr"||f==="rl")&&(u(d),n(d))}function n(d){e.forEach(d.nodes(),function(f){i(d.node(f))}),e.forEach(d.edges(),function(f){i(d.edge(f))})}function i(d){var f=d.width;d.width=d.height,d.height=f}function o(d){e.forEach(d.nodes(),function(f){a(d.node(f))}),e.forEach(d.edges(),function(f){var h=d.edge(f);e.forEach(h.points,a),e.has(h,"y")&&a(h)})}function a(d){d.y=-d.y}function u(d){e.forEach(d.nodes(),function(f){c(d.node(f))}),e.forEach(d.edges(),function(f){var h=d.edge(f);e.forEach(h.points,c),e.has(h,"x")&&c(h)})}function c(d){var f=d.x;d.x=d.y,d.y=f}return Gg}var Kg,eP;function cW(){if(eP)return Kg;eP=1;var e=lt();Kg=t;function t(r){var n={},i=e.filter(r.nodes(),function(d){return!r.children(d).length}),o=e.max(e.map(i,function(d){return r.node(d).rank})),a=e.map(e.range(o+1),function(){return[]});function u(d){if(!e.has(n,d)){n[d]=!0;var f=r.node(d);a[f.rank].push(d),e.forEach(r.successors(d),u)}}var c=e.sortBy(i,function(d){return r.node(d).rank});return e.forEach(c,u),a}return Kg}var Yg,tP;function lW(){if(tP)return Yg;tP=1;var e=lt();Yg=t;function t(n,i){for(var o=0,a=1;a<i.length;++a)o+=r(n,i[a-1],i[a]);return o}function r(n,i,o){for(var a=e.zipObject(o,e.map(o,function(p,v){return v})),u=e.flatten(e.map(i,function(p){return e.sortBy(e.map(n.outEdges(p),function(v){return{pos:a[v.w],weight:n.edge(v).weight}}),"pos")}),!0),c=1;c<o.length;)c<<=1;var d=2*c-1;c-=1;var f=e.map(new Array(d),function(){return 0}),h=0;return e.forEach(u.forEach(function(p){var v=p.pos+c;f[v]+=p.weight;for(var m=0;v>0;)v%2&&(m+=f[v+1]),v=v-1>>1,f[v]+=p.weight;h+=p.weight*m})),h}return Yg}var Xg,rP;function fW(){if(rP)return Xg;rP=1;var e=lt();Xg=t;function t(r,n){return e.map(n,function(i){var o=r.inEdges(i);if(o.length){var a=e.reduce(o,function(u,c){var d=r.edge(c),f=r.node(c.v);return{sum:u.sum+d.weight*f.order,weight:u.weight+d.weight}},{sum:0,weight:0});return{v:i,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:i}})}return Xg}var Zg,nP;function dW(){if(nP)return Zg;nP=1;var e=lt();Zg=t;function t(i,o){var a={};e.forEach(i,function(c,d){var f=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:d};e.isUndefined(c.barycenter)||(f.barycenter=c.barycenter,f.weight=c.weight)}),e.forEach(o.edges(),function(c){var d=a[c.v],f=a[c.w];!e.isUndefined(d)&&!e.isUndefined(f)&&(f.indegree++,d.out.push(a[c.w]))});var u=e.filter(a,function(c){return!c.indegree});return r(u)}function r(i){var o=[];function a(d){return function(f){f.merged||(e.isUndefined(f.barycenter)||e.isUndefined(d.barycenter)||f.barycenter>=d.barycenter)&&n(d,f)}}function u(d){return function(f){f.in.push(d),--f.indegree===0&&i.push(f)}}for(;i.length;){var c=i.pop();o.push(c),e.forEach(c.in.reverse(),a(c)),e.forEach(c.out,u(c))}return e.map(e.filter(o,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function n(i,o){var a=0,u=0;i.weight&&(a+=i.barycenter*i.weight,u+=i.weight),o.weight&&(a+=o.barycenter*o.weight,u+=o.weight),i.vs=o.vs.concat(i.vs),i.barycenter=a/u,i.weight=u,i.i=Math.min(o.i,i.i),o.merged=!0}return Zg}var Jg,iP;function hW(){if(iP)return Jg;iP=1;var e=lt(),t=Kt();Jg=r;function r(o,a){var u=t.partition(o,function(y){return e.has(y,"barycenter")}),c=u.lhs,d=e.sortBy(u.rhs,function(y){return-y.i}),f=[],h=0,p=0,v=0;c.sort(i(!!a)),v=n(f,d,v),e.forEach(c,function(y){v+=y.vs.length,f.push(y.vs),h+=y.barycenter*y.weight,p+=y.weight,v=n(f,d,v)});var m={vs:e.flatten(f,!0)};return p&&(m.barycenter=h/p,m.weight=p),m}function n(o,a,u){for(var c;a.length&&(c=e.last(a)).i<=u;)a.pop(),o.push(c.vs),u++;return u}function i(o){return function(a,u){return a.barycenter<u.barycenter?-1:a.barycenter>u.barycenter?1:o?u.i-a.i:a.i-u.i}}return Jg}var Qg,oP;function pW(){if(oP)return Qg;oP=1;var e=lt(),t=fW(),r=dW(),n=hW();Qg=i;function i(u,c,d,f){var h=u.children(c),p=u.node(c),v=p?p.borderLeft:void 0,m=p?p.borderRight:void 0,y={};v&&(h=e.filter(h,function(_){return _!==v&&_!==m}));var b=t(u,h);e.forEach(b,function(_){if(u.children(_.v).length){var R=i(u,_.v,d,f);y[_.v]=R,e.has(R,"barycenter")&&a(_,R)}});var x=r(b,d);o(x,y);var w=n(x,f);if(v&&(w.vs=e.flatten([v,w.vs,m],!0),u.predecessors(v).length)){var S=u.node(u.predecessors(v)[0]),E=u.node(u.predecessors(m)[0]);e.has(w,"barycenter")||(w.barycenter=0,w.weight=0),w.barycenter=(w.barycenter*w.weight+S.order+E.order)/(w.weight+2),w.weight+=2}return w}function o(u,c){e.forEach(u,function(d){d.vs=e.flatten(d.vs.map(function(f){return c[f]?c[f].vs:f}),!0)})}function a(u,c){e.isUndefined(u.barycenter)?(u.barycenter=c.barycenter,u.weight=c.weight):(u.barycenter=(u.barycenter*u.weight+c.barycenter*c.weight)/(u.weight+c.weight),u.weight+=c.weight)}return Qg}var em,aP;function vW(){if(aP)return em;aP=1;var e=lt(),t=qr().Graph;em=r;function r(i,o,a){var u=n(i),c=new t({compound:!0}).setGraph({root:u}).setDefaultNodeLabel(function(d){return i.node(d)});return e.forEach(i.nodes(),function(d){var f=i.node(d),h=i.parent(d);(f.rank===o||f.minRank<=o&&o<=f.maxRank)&&(c.setNode(d),c.setParent(d,h||u),e.forEach(i[a](d),function(p){var v=p.v===d?p.w:p.v,m=c.edge(v,d),y=e.isUndefined(m)?0:m.weight;c.setEdge(v,d,{weight:i.edge(p).weight+y})}),e.has(f,"minRank")&&c.setNode(d,{borderLeft:f.borderLeft[o],borderRight:f.borderRight[o]}))}),c}function n(i){for(var o;i.hasNode(o=e.uniqueId("_root")););return o}return em}var tm,sP;function gW(){if(sP)return tm;sP=1;var e=lt();tm=t;function t(r,n,i){var o={},a;e.forEach(i,function(u){for(var c=r.parent(u),d,f;c;){if(d=r.parent(c),d?(f=o[d],o[d]=c):(f=a,a=c),f&&f!==c){n.setEdge(f,c);return}c=d}})}return tm}var rm,uP;function mW(){if(uP)return rm;uP=1;var e=lt(),t=cW(),r=lW(),n=pW(),i=vW(),o=gW(),a=qr().Graph,u=Kt();rm=c;function c(p){var v=u.maxRank(p),m=d(p,e.range(1,v+1),"inEdges"),y=d(p,e.range(v-1,-1,-1),"outEdges"),b=t(p);h(p,b);for(var x=Number.POSITIVE_INFINITY,w,S=0,E=0;E<4;++S,++E){f(S%2?m:y,S%4>=2),b=u.buildLayerMatrix(p);var _=r(p,b);_<x&&(E=0,w=e.cloneDeep(b),x=_)}h(p,w)}function d(p,v,m){return e.map(v,function(y){return i(p,y,m)})}function f(p,v){var m=new a;e.forEach(p,function(y){var b=y.graph().root,x=n(y,b,m,v);e.forEach(x.vs,function(w,S){y.node(w).order=S}),o(y,m,x.vs)})}function h(p,v){e.forEach(v,function(m){e.forEach(m,function(y,b){p.node(y).order=b})})}return rm}var nm,cP;function yW(){if(cP)return nm;cP=1;var e=lt(),t=qr().Graph,r=Kt();nm={positionX:m,findType1Conflicts:n,findType2Conflicts:i,addConflict:a,hasConflict:u,verticalAlignment:c,horizontalCompaction:d,alignCoordinates:p,findSmallestWidthAlignment:h,balance:v};function n(x,w){var S={};function E(_,R){var P=0,N=0,j=_.length,L=e.last(R);return e.forEach(R,function(F,k){var D=o(x,F),T=D?x.node(D).order:j;(D||F===L)&&(e.forEach(R.slice(N,k+1),function(B){e.forEach(x.predecessors(B),function($){var W=x.node($),Y=W.order;(Y<P||T<Y)&&!(W.dummy&&x.node(B).dummy)&&a(S,$,B)})}),N=k+1,P=T)}),R}return e.reduce(w,E),S}function i(x,w){var S={};function E(R,P,N,j,L){var F;e.forEach(e.range(P,N),function(k){F=R[k],x.node(F).dummy&&e.forEach(x.predecessors(F),function(D){var T=x.node(D);T.dummy&&(T.order<j||T.order>L)&&a(S,D,F)})})}function _(R,P){var N=-1,j,L=0;return e.forEach(P,function(F,k){if(x.node(F).dummy==="border"){var D=x.predecessors(F);D.length&&(j=x.node(D[0]).order,E(P,L,k,N,j),L=k,N=j)}E(P,L,P.length,j,R.length)}),P}return e.reduce(w,_),S}function o(x,w){if(x.node(w).dummy)return e.find(x.predecessors(w),function(S){return x.node(S).dummy})}function a(x,w,S){if(w>S){var E=w;w=S,S=E}var _=x[w];_||(x[w]=_={}),_[S]=!0}function u(x,w,S){if(w>S){var E=w;w=S,S=E}return e.has(x[w],S)}function c(x,w,S,E){var _={},R={},P={};return e.forEach(w,function(N){e.forEach(N,function(j,L){_[j]=j,R[j]=j,P[j]=L})}),e.forEach(w,function(N){var j=-1;e.forEach(N,function(L){var F=E(L);if(F.length){F=e.sortBy(F,function($){return P[$]});for(var k=(F.length-1)/2,D=Math.floor(k),T=Math.ceil(k);D<=T;++D){var B=F[D];R[L]===L&&j<P[B]&&!u(S,L,B)&&(R[B]=L,R[L]=_[L]=_[B],j=P[B])}}})}),{root:_,align:R}}function d(x,w,S,E,_){var R={},P=f(x,w,S,_),N=_?"borderLeft":"borderRight";function j(k,D){for(var T=P.nodes(),B=T.pop(),$={};B;)$[B]?k(B):($[B]=!0,T.push(B),T=T.concat(D(B))),B=T.pop()}function L(k){R[k]=P.inEdges(k).reduce(function(D,T){return Math.max(D,R[T.v]+P.edge(T))},0)}function F(k){var D=P.outEdges(k).reduce(function(B,$){return Math.min(B,R[$.w]-P.edge($))},Number.POSITIVE_INFINITY),T=x.node(k);D!==Number.POSITIVE_INFINITY&&T.borderType!==N&&(R[k]=Math.max(R[k],D))}return j(L,P.predecessors.bind(P)),j(F,P.successors.bind(P)),e.forEach(E,function(k){R[k]=R[S[k]]}),R}function f(x,w,S,E){var _=new t,R=x.graph(),P=y(R.nodesep,R.edgesep,E);return e.forEach(w,function(N){var j;e.forEach(N,function(L){var F=S[L];if(_.setNode(F),j){var k=S[j],D=_.edge(k,F);_.setEdge(k,F,Math.max(P(x,L,j),D||0))}j=L})}),_}function h(x,w){return e.minBy(e.values(w),function(S){var E=Number.NEGATIVE_INFINITY,_=Number.POSITIVE_INFINITY;return e.forIn(S,function(R,P){var N=b(x,P)/2;E=Math.max(R+N,E),_=Math.min(R-N,_)}),E-_})}function p(x,w){var S=e.values(w),E=e.min(S),_=e.max(S);e.forEach(["u","d"],function(R){e.forEach(["l","r"],function(P){var N=R+P,j=x[N],L;if(j!==w){var F=e.values(j);L=P==="l"?E-e.min(F):_-e.max(F),L&&(x[N]=e.mapValues(j,function(k){return k+L}))}})})}function v(x,w){return e.mapValues(x.ul,function(S,E){if(w)return x[w.toLowerCase()][E];var _=e.sortBy(e.map(x,E));return(_[1]+_[2])/2})}function m(x){var w=r.buildLayerMatrix(x),S=e.merge(n(x,w),i(x,w)),E={},_;e.forEach(["u","d"],function(P){_=P==="u"?w:e.values(w).reverse(),e.forEach(["l","r"],function(N){N==="r"&&(_=e.map(_,function(k){return e.values(k).reverse()}));var j=(P==="u"?x.predecessors:x.successors).bind(x),L=c(x,_,S,j),F=d(x,_,L.root,L.align,N==="r");N==="r"&&(F=e.mapValues(F,function(k){return-k})),E[P+N]=F})});var R=h(x,E);return p(E,R),v(E,x.graph().align)}function y(x,w,S){return function(E,_,R){var P=E.node(_),N=E.node(R),j=0,L;if(j+=P.width/2,e.has(P,"labelpos"))switch(P.labelpos.toLowerCase()){case"l":L=-P.width/2;break;case"r":L=P.width/2;break}if(L&&(j+=S?L:-L),L=0,j+=(P.dummy?w:x)/2,j+=(N.dummy?w:x)/2,j+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":L=N.width/2;break;case"r":L=-N.width/2;break}return L&&(j+=S?L:-L),L=0,j}}function b(x,w){return x.node(w).width}return nm}var im,lP;function bW(){if(lP)return im;lP=1;var e=lt(),t=Kt(),r=yW().positionX;im=n;function n(o){o=t.asNonCompoundGraph(o),i(o),e.forEach(r(o),function(a,u){o.node(u).x=a})}function i(o){var a=t.buildLayerMatrix(o),u=o.graph().ranksep,c=0;e.forEach(a,function(d){var f=e.max(e.map(d,function(h){return o.node(h).height}));e.forEach(d,function(h){o.node(h).y=c+f/2}),c+=f+u})}return im}var om,fP;function xW(){if(fP)return om;fP=1;var e=lt(),t=tW(),r=rW(),n=iW(),i=Kt().normalizeRanks,o=oW(),a=Kt().removeEmptyRanks,u=aW(),c=sW(),d=uW(),f=mW(),h=bW(),p=Kt(),v=qr().Graph;om=m;function m(z,G){var J=G&&G.debugTiming?p.time:p.notime;J("layout",function(){var V=J(" buildLayoutGraph",function(){return j(z)});J(" runLayout",function(){y(V,J)}),J(" updateInputGraph",function(){b(z,V)})})}function y(z,G){G(" makeSpaceForEdgeLabels",function(){L(z)}),G(" removeSelfEdges",function(){ee(z)}),G(" acyclic",function(){t.run(z)}),G(" nestingGraph.run",function(){u.run(z)}),G(" rank",function(){n(p.asNonCompoundGraph(z))}),G(" injectEdgeLabelProxies",function(){F(z)}),G(" removeEmptyRanks",function(){a(z)}),G(" nestingGraph.cleanup",function(){u.cleanup(z)}),G(" normalizeRanks",function(){i(z)}),G(" assignRankMinMax",function(){k(z)}),G(" removeEdgeLabelProxies",function(){D(z)}),G(" normalize.run",function(){r.run(z)}),G(" parentDummyChains",function(){o(z)}),G(" addBorderSegments",function(){c(z)}),G(" order",function(){f(z)}),G(" insertSelfEdges",function(){H(z)}),G(" adjustCoordinateSystem",function(){d.adjust(z)}),G(" position",function(){h(z)}),G(" positionSelfEdges",function(){Q(z)}),G(" removeBorderNodes",function(){Y(z)}),G(" normalize.undo",function(){r.undo(z)}),G(" fixupEdgeLabelCoords",function(){$(z)}),G(" undoCoordinateSystem",function(){d.undo(z)}),G(" translateGraph",function(){T(z)}),G(" assignNodeIntersects",function(){B(z)}),G(" reversePoints",function(){W(z)}),G(" acyclic.undo",function(){t.undo(z)})}function b(z,G){e.forEach(z.nodes(),function(J){var V=z.node(J),K=G.node(J);V&&(V.x=K.x,V.y=K.y,G.children(J).length&&(V.width=K.width,V.height=K.height))}),e.forEach(z.edges(),function(J){var V=z.edge(J),K=G.edge(J);V.points=K.points,e.has(K,"x")&&(V.x=K.x,V.y=K.y)}),z.graph().width=G.graph().width,z.graph().height=G.graph().height}var x=["nodesep","edgesep","ranksep","marginx","marginy"],w={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},S=["acyclicer","ranker","rankdir","align"],E=["width","height"],_={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],P={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},N=["labelpos"];function j(z){var G=new v({multigraph:!0,compound:!0}),J=se(z.graph());return G.setGraph(e.merge({},w,ce(J,x),e.pick(J,S))),e.forEach(z.nodes(),function(V){var K=se(z.node(V));G.setNode(V,e.defaults(ce(K,E),_)),G.setParent(V,z.parent(V))}),e.forEach(z.edges(),function(V){var K=se(z.edge(V));G.setEdge(V,e.merge({},P,ce(K,R),e.pick(K,N)))}),G}function L(z){var G=z.graph();G.ranksep/=2,e.forEach(z.edges(),function(J){var V=z.edge(J);V.minlen*=2,V.labelpos.toLowerCase()!=="c"&&(G.rankdir==="TB"||G.rankdir==="BT"?V.width+=V.labeloffset:V.height+=V.labeloffset)})}function F(z){e.forEach(z.edges(),function(G){var J=z.edge(G);if(J.width&&J.height){var V=z.node(G.v),K=z.node(G.w),ie={rank:(K.rank-V.rank)/2+V.rank,e:G};p.addDummyNode(z,"edge-proxy",ie,"_ep")}})}function k(z){var G=0;e.forEach(z.nodes(),function(J){var V=z.node(J);V.borderTop&&(V.minRank=z.node(V.borderTop).rank,V.maxRank=z.node(V.borderBottom).rank,G=e.max(G,V.maxRank))}),z.graph().maxRank=G}function D(z){e.forEach(z.nodes(),function(G){var J=z.node(G);J.dummy==="edge-proxy"&&(z.edge(J.e).labelRank=J.rank,z.removeNode(G))})}function T(z){var G=Number.POSITIVE_INFINITY,J=0,V=Number.POSITIVE_INFINITY,K=0,ie=z.graph(),ne=ie.marginx||0,ue=ie.marginy||0;function de(we){var Se=we.x,_e=we.y,he=we.width,ae=we.height;G=Math.min(G,Se-he/2),J=Math.max(J,Se+he/2),V=Math.min(V,_e-ae/2),K=Math.max(K,_e+ae/2)}e.forEach(z.nodes(),function(we){de(z.node(we))}),e.forEach(z.edges(),function(we){var Se=z.edge(we);e.has(Se,"x")&&de(Se)}),G-=ne,V-=ue,e.forEach(z.nodes(),function(we){var Se=z.node(we);Se.x-=G,Se.y-=V}),e.forEach(z.edges(),function(we){var Se=z.edge(we);e.forEach(Se.points,function(_e){_e.x-=G,_e.y-=V}),e.has(Se,"x")&&(Se.x-=G),e.has(Se,"y")&&(Se.y-=V)}),ie.width=J-G+ne,ie.height=K-V+ue}function B(z){e.forEach(z.edges(),function(G){var J=z.edge(G),V=z.node(G.v),K=z.node(G.w),ie,ne;J.points?(ie=J.points[0],ne=J.points[J.points.length-1]):(J.points=[],ie=K,ne=V),J.points.unshift(p.intersectRect(V,ie)),J.points.push(p.intersectRect(K,ne))})}function $(z){e.forEach(z.edges(),function(G){var J=z.edge(G);if(e.has(J,"x"))switch((J.labelpos==="l"||J.labelpos==="r")&&(J.width-=J.labeloffset),J.labelpos){case"l":J.x-=J.width/2+J.labeloffset;break;case"r":J.x+=J.width/2+J.labeloffset;break}})}function W(z){e.forEach(z.edges(),function(G){var J=z.edge(G);J.reversed&&J.points.reverse()})}function Y(z){e.forEach(z.nodes(),function(G){if(z.children(G).length){var J=z.node(G),V=z.node(J.borderTop),K=z.node(J.borderBottom),ie=z.node(e.last(J.borderLeft)),ne=z.node(e.last(J.borderRight));J.width=Math.abs(ne.x-ie.x),J.height=Math.abs(K.y-V.y),J.x=ie.x+J.width/2,J.y=V.y+J.height/2}}),e.forEach(z.nodes(),function(G){z.node(G).dummy==="border"&&z.removeNode(G)})}function ee(z){e.forEach(z.edges(),function(G){if(G.v===G.w){var J=z.node(G.v);J.selfEdges||(J.selfEdges=[]),J.selfEdges.push({e:G,label:z.edge(G)}),z.removeEdge(G)}})}function H(z){var G=p.buildLayerMatrix(z);e.forEach(G,function(J){var V=0;e.forEach(J,function(K,ie){var ne=z.node(K);ne.order=ie+V,e.forEach(ne.selfEdges,function(ue){p.addDummyNode(z,"selfedge",{width:ue.label.width,height:ue.label.height,rank:ne.rank,order:ie+ ++V,e:ue.e,label:ue.label},"_se")}),delete ne.selfEdges})})}function Q(z){e.forEach(z.nodes(),function(G){var J=z.node(G);if(J.dummy==="selfedge"){var V=z.node(J.e.v),K=V.x+V.width/2,ie=V.y,ne=J.x-K,ue=V.height/2;z.setEdge(J.e,J.label),z.removeNode(G),J.label.points=[{x:K+2*ne/3,y:ie-ue},{x:K+5*ne/6,y:ie-ue},{x:K+ne,y:ie},{x:K+5*ne/6,y:ie+ue},{x:K+2*ne/3,y:ie+ue}],J.label.x=J.x,J.label.y=J.y}})}function ce(z,G){return e.mapValues(e.pick(z,G),Number)}function se(z){var G={};return e.forEach(z,function(J,V){G[V.toLowerCase()]=J}),G}return om}var am,dP;function wW(){if(dP)return am;dP=1;var e=lt(),t=Kt(),r=qr().Graph;am={debugOrdering:n};function n(i){var o=t.buildLayerMatrix(i),a=new r({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(u){a.setNode(u,{label:u}),a.setParent(u,"layer"+i.node(u).rank)}),e.forEach(i.edges(),function(u){a.setEdge(u.v,u.w,{},u.name)}),e.forEach(o,function(u,c){var d="layer"+c;a.setNode(d,{rank:"same"}),e.reduce(u,function(f,h){return a.setEdge(f,h,{style:"invis"}),h})}),a}return am}var sm,hP;function _W(){return hP||(hP=1,sm="0.8.5"),sm}var um,pP;function EW(){return pP||(pP=1,um={graphlib:qr(),layout:xW(),debug:wW(),util:{time:Kt().time,notime:Kt().notime},version:_W()}),um}var SW=EW();const vP=Hn(SW);function OW(e){let t;const r=new Set,n=(d,f)=>{const h=typeof d=="function"?d(t):d;if(h!==t){const p=t;t=f?h:Object.assign({},t,h),r.forEach(v=>v(t,p))}},i=()=>t,o=(d,f=i,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=f(t);function v(){const m=f(t);if(!h(p,m)){const y=p;d(p=m,y)}}return r.add(v),()=>r.delete(v)},c={setState:n,getState:i,subscribe:(d,f,h)=>f||h?o(d,f,h):(r.add(d),()=>r.delete(d)),destroy:()=>r.clear()};return t=e(n,i,c),c}const CW=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),gP=CW?A.useEffect:A.useLayoutEffect;function RW(e){const t=typeof e=="function"?OW(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=A.useReducer(b=>b+1,0),a=t.getState(),u=A.useRef(a),c=A.useRef(n),d=A.useRef(i),f=A.useRef(!1),h=A.useRef();h.current===void 0&&(h.current=n(a));let p,v=!1;(u.current!==a||c.current!==n||d.current!==i||f.current)&&(p=n(a),v=!i(h.current,p)),gP(()=>{v&&(h.current=p),u.current=a,c.current=n,d.current=i,f.current=!1});const m=A.useRef(a);gP(()=>{const b=()=>{try{const w=t.getState(),S=c.current(w);d.current(h.current,S)||(u.current=w,h.current=S,o())}catch{f.current=!0,o()}},x=t.subscribe(b);return t.getState()!==m.current&&b(),x},[]);const y=v?p:h.current;return A.useDebugValue(y),y};return Object.assign(r,t),r[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[r,t];return{next(){const i=n.length<=0;return{value:n.shift(),done:i}}}},r}function PW(){const e=A.createContext(void 0);return{Provider:({initialStore:i,createStore:o,children:a})=>{const u=A.useRef();return u.current||(i&&(console.warn("Provider initialStore is deprecated and will be removed in the next version."),o||(o=()=>i)),u.current=o()),A.createElement(e.Provider,{value:u.current},a)},useStore:(i,o=Object.is)=>{const a=A.useContext(e);if(!a)throw new Error("Seems like you have not used zustand provider as an ancestor.");return a(i,o)},useStoreApi:()=>{const i=A.useContext(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return A.useMemo(()=>({getState:i.getState,setState:i.setState,subscribe:i.subscribe,destroy:i.destroy}),[i])}}}var IW={value:()=>{}};function kc(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Mu(r)}function Mu(e){this._=e}function NW(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Mu.prototype=kc.prototype={constructor:Mu,on:function(e,t){var r=this._,n=NW(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=TW(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=mP(r[i],e.name,t);else if(t==null)for(i in r)r[i]=mP(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Mu(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};function TW(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function mP(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=IW,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Eb="http://www.w3.org/1999/xhtml";const yP={svg:"http://www.w3.org/2000/svg",xhtml:Eb,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Lc(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),yP.hasOwnProperty(t)?{space:yP[t],local:e}:e}function AW(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Eb&&t.documentElement.namespaceURI===Eb?t.createElement(e):t.createElementNS(r,e)}}function MW(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function mj(e){var t=Lc(e);return(t.local?MW:AW)(t)}function DW(){}function xx(e){return e==null?DW:function(){return this.querySelector(e)}}function jW(e){typeof e!="function"&&(e=xx(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,u=n[i]=new Array(a),c,d,f=0;f<a;++f)(c=o[f])&&(d=e.call(c,c.__data__,f,o))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d);return new sr(n,this._parents)}function qW(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function kW(){return[]}function yj(e){return e==null?kW:function(){return this.querySelectorAll(e)}}function LW(e){return function(){return qW(e.apply(this,arguments))}}function BW(e){typeof e=="function"?e=LW(e):e=yj(e);for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],u=a.length,c,d=0;d<u;++d)(c=a[d])&&(n.push(e.call(c,c.__data__,d,a)),i.push(c));return new sr(n,i)}function bj(e){return function(){return this.matches(e)}}function xj(e){return function(t){return t.matches(e)}}var FW=Array.prototype.find;function $W(e){return function(){return FW.call(this.children,e)}}function zW(){return this.firstElementChild}function HW(e){return this.select(e==null?zW:$W(typeof e=="function"?e:xj(e)))}var UW=Array.prototype.filter;function VW(){return Array.from(this.children)}function WW(e){return function(){return UW.call(this.children,e)}}function GW(e){return this.selectAll(e==null?VW:WW(typeof e=="function"?e:xj(e)))}function KW(e){typeof e!="function"&&(e=bj(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,u=n[i]=[],c,d=0;d<a;++d)(c=o[d])&&e.call(c,c.__data__,d,o)&&u.push(c);return new sr(n,this._parents)}function wj(e){return new Array(e.length)}function YW(){return new sr(this._enter||this._groups.map(wj),this._parents)}function Uu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Uu.prototype={constructor:Uu,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 XW(e){return function(){return e}}function ZW(e,t,r,n,i,o){for(var a=0,u,c=t.length,d=o.length;a<d;++a)(u=t[a])?(u.__data__=o[a],n[a]=u):r[a]=new Uu(e,o[a]);for(;a<c;++a)(u=t[a])&&(i[a]=u)}function JW(e,t,r,n,i,o,a){var u,c,d=new Map,f=t.length,h=o.length,p=new Array(f),v;for(u=0;u<f;++u)(c=t[u])&&(p[u]=v=a.call(c,c.__data__,u,t)+"",d.has(v)?i[u]=c:d.set(v,c));for(u=0;u<h;++u)v=a.call(e,o[u],u,o)+"",(c=d.get(v))?(n[u]=c,c.__data__=o[u],d.delete(v)):r[u]=new Uu(e,o[u]);for(u=0;u<f;++u)(c=t[u])&&d.get(p[u])===c&&(i[u]=c)}function QW(e){return e.__data__}function e6(e,t){if(!arguments.length)return Array.from(this,QW);var r=t?JW:ZW,n=this._parents,i=this._groups;typeof e!="function"&&(e=XW(e));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),d=0;d<o;++d){var f=n[d],h=i[d],p=h.length,v=t6(e.call(f,f&&f.__data__,d,n)),m=v.length,y=u[d]=new Array(m),b=a[d]=new Array(m),x=c[d]=new Array(p);r(f,h,y,b,x,v,t);for(var w=0,S=0,E,_;w<m;++w)if(E=y[w]){for(w>=S&&(S=w+1);!(_=b[S])&&++S<m;);E._next=_||null}}return a=new sr(a,n),a._enter=u,a._exit=c,a}function t6(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function r6(){return new sr(this._exit||this._groups.map(wj),this._parents)}function n6(e,t,r){var n=this.enter(),i=this,o=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function i6(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,o=n.length,a=Math.min(i,o),u=new Array(i),c=0;c<a;++c)for(var d=r[c],f=n[c],h=d.length,p=u[c]=new Array(h),v,m=0;m<h;++m)(v=d[m]||f[m])&&(p[m]=v);for(;c<i;++c)u[c]=r[c];return new sr(u,this._parents)}function o6(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function a6(e){e||(e=s6);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],u=a.length,c=i[o]=new Array(u),d,f=0;f<u;++f)(d=a[f])&&(c[f]=d);c.sort(t)}return new sr(i,this._parents).order()}function s6(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function u6(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function c6(){return Array.from(this)}function l6(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}function f6(){let e=0;for(const t of this)++e;return e}function d6(){return!this.node()}function h6(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,u;o<a;++o)(u=i[o])&&e.call(u,u.__data__,o,i);return this}function p6(e){return function(){this.removeAttribute(e)}}function v6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function g6(e,t){return function(){this.setAttribute(e,t)}}function m6(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function y6(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function b6(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function x6(e,t){var r=Lc(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?v6:p6:typeof t=="function"?r.local?b6:y6:r.local?m6:g6)(r,t))}function _j(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function w6(e){return function(){this.style.removeProperty(e)}}function _6(e,t,r){return function(){this.style.setProperty(e,t,r)}}function E6(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function S6(e,t,r){return arguments.length>1?this.each((t==null?w6:typeof t=="function"?E6:_6)(e,t,r??"")):po(this.node(),e)}function po(e,t){return e.style.getPropertyValue(t)||_j(e).getComputedStyle(e,null).getPropertyValue(t)}function O6(e){return function(){delete this[e]}}function C6(e,t){return function(){this[e]=t}}function R6(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function P6(e,t){return arguments.length>1?this.each((t==null?O6:typeof t=="function"?R6:C6)(e,t)):this.node()[e]}function Ej(e){return e.trim().split(/^|\s+/)}function wx(e){return e.classList||new Sj(e)}function Sj(e){this._node=e,this._names=Ej(e.getAttribute("class")||"")}Sj.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 Oj(e,t){for(var r=wx(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Cj(e,t){for(var r=wx(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function I6(e){return function(){Oj(this,e)}}function N6(e){return function(){Cj(this,e)}}function T6(e,t){return function(){(t.apply(this,arguments)?Oj:Cj)(this,e)}}function A6(e,t){var r=Ej(e+"");if(arguments.length<2){for(var n=wx(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?T6:t?I6:N6)(r,t))}function M6(){this.textContent=""}function D6(e){return function(){this.textContent=e}}function j6(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function q6(e){return arguments.length?this.each(e==null?M6:(typeof e=="function"?j6:D6)(e)):this.node().textContent}function k6(){this.innerHTML=""}function L6(e){return function(){this.innerHTML=e}}function B6(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function F6(e){return arguments.length?this.each(e==null?k6:(typeof e=="function"?B6:L6)(e)):this.node().innerHTML}function $6(){this.nextSibling&&this.parentNode.appendChild(this)}function z6(){return this.each($6)}function H6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function U6(){return this.each(H6)}function V6(e){var t=typeof e=="function"?e:mj(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function W6(){return null}function G6(e,t){var r=typeof e=="function"?e:mj(e),n=t==null?W6:typeof t=="function"?t:xx(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function K6(){var e=this.parentNode;e&&e.removeChild(this)}function Y6(){return this.each(K6)}function X6(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Z6(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function J6(e){return this.select(e?Z6:X6)}function Q6(e){return arguments.length?this.property("__data__",e):this.node().__data__}function e8(e){return function(t){e.call(this,t,this.__data__)}}function t8(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function r8(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++n]=o;++n?t.length=n:delete this.__on}}}function n8(e,t,r){return function(){var n=this.__on,i,o=e8(t);if(n){for(var a=0,u=n.length;a<u;++a)if((i=n[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=r),i.value=t;return}}this.addEventListener(e.type,o,r),i={type:e.type,name:e.name,value:t,listener:o,options:r},n?n.push(i):this.__on=[i]}}function i8(e,t,r){var n=t8(e+""),i,o=n.length,a;if(arguments.length<2){var u=this.node().__on;if(u){for(var c=0,d=u.length,f;c<d;++c)for(i=0,f=u[c];i<o;++i)if((a=n[i]).type===f.type&&a.name===f.name)return f.value}return}for(u=t?n8:r8,i=0;i<o;++i)this.each(u(n[i],t,r));return this}function Rj(e,t,r){var n=_j(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function o8(e,t){return function(){return Rj(this,e,t)}}function a8(e,t){return function(){return Rj(this,e,t.apply(this,arguments))}}function s8(e,t){return this.each((typeof t=="function"?a8:o8)(e,t))}function*u8(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length,a;i<o;++i)(a=n[i])&&(yield a)}var Pj=[null];function sr(e,t){this._groups=e,this._parents=t}function Wa(){return new sr([[document.documentElement]],Pj)}function c8(){return this}sr.prototype=Wa.prototype={constructor:sr,select:jW,selectAll:BW,selectChild:HW,selectChildren:GW,filter:KW,data:e6,enter:YW,exit:r6,join:n6,merge:i6,selection:c8,order:o6,sort:a6,call:u6,nodes:c6,node:l6,size:f6,empty:d6,each:h6,attr:x6,style:S6,property:P6,classed:A6,text:q6,html:F6,raise:z6,lower:U6,append:V6,insert:G6,remove:Y6,clone:J6,datum:Q6,on:i8,dispatch:s8,[Symbol.iterator]:u8};function Ar(e){return typeof e=="string"?new sr([[document.querySelector(e)]],[document.documentElement]):new sr([[e]],Pj)}function l8(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Yr(e,t){if(e=l8(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const f8={passive:!1},Ta={capture:!0,passive:!1};function cm(e){e.stopImmediatePropagation()}function to(e){e.preventDefault(),e.stopImmediatePropagation()}function Ij(e){var t=e.document.documentElement,r=Ar(e).on("dragstart.drag",to,Ta);"onselectstart"in t?r.on("selectstart.drag",to,Ta):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Nj(e,t){var r=e.document.documentElement,n=Ar(e).on("dragstart.drag",null);t&&(n.on("click.drag",to,Ta),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const uu=e=>()=>e;function Sb(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:o,x:a,y:u,dx:c,dy:d,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:f}})}Sb.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function d8(e){return!e.ctrlKey&&!e.button}function h8(){return this.parentNode}function p8(e,t){return t??{x:e.x,y:e.y}}function v8(){return navigator.maxTouchPoints||"ontouchstart"in this}function g8(){var e=d8,t=h8,r=p8,n=v8,i={},o=kc("start","drag","end"),a=0,u,c,d,f,h=0;function p(E){E.on("mousedown.drag",v).filter(n).on("touchstart.drag",b).on("touchmove.drag",x,f8).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(E,_){if(!(f||!e.call(this,E,_))){var R=S(this,t.call(this,E,_),E,_,"mouse");R&&(Ar(E.view).on("mousemove.drag",m,Ta).on("mouseup.drag",y,Ta),Ij(E.view),cm(E),d=!1,u=E.clientX,c=E.clientY,R("start",E))}}function m(E){if(to(E),!d){var _=E.clientX-u,R=E.clientY-c;d=_*_+R*R>h}i.mouse("drag",E)}function y(E){Ar(E.view).on("mousemove.drag mouseup.drag",null),Nj(E.view,d),to(E),i.mouse("end",E)}function b(E,_){if(e.call(this,E,_)){var R=E.changedTouches,P=t.call(this,E,_),N=R.length,j,L;for(j=0;j<N;++j)(L=S(this,P,E,_,R[j].identifier,R[j]))&&(cm(E),L("start",E,R[j]))}}function x(E){var _=E.changedTouches,R=_.length,P,N;for(P=0;P<R;++P)(N=i[_[P].identifier])&&(to(E),N("drag",E,_[P]))}function w(E){var _=E.changedTouches,R=_.length,P,N;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),P=0;P<R;++P)(N=i[_[P].identifier])&&(cm(E),N("end",E,_[P]))}function S(E,_,R,P,N,j){var L=o.copy(),F=Yr(j||R,_),k,D,T;if((T=r.call(E,new Sb("beforestart",{sourceEvent:R,target:p,identifier:N,active:a,x:F[0],y:F[1],dx:0,dy:0,dispatch:L}),P))!=null)return k=T.x-F[0]||0,D=T.y-F[1]||0,function B($,W,Y){var ee=F,H;switch($){case"start":i[N]=B,H=a++;break;case"end":delete i[N],--a;case"drag":F=Yr(Y||W,_),H=a;break}L.call($,E,new Sb($,{sourceEvent:W,subject:T,target:p,identifier:N,active:H,x:F[0]+k,y:F[1]+D,dx:F[0]-ee[0],dy:F[1]-ee[1],dispatch:L}),P)}}return p.filter=function(E){return arguments.length?(e=typeof E=="function"?E:uu(!!E),p):e},p.container=function(E){return arguments.length?(t=typeof E=="function"?E:uu(E),p):t},p.subject=function(E){return arguments.length?(r=typeof E=="function"?E:uu(E),p):r},p.touchable=function(E){return arguments.length?(n=typeof E=="function"?E:uu(!!E),p):n},p.on=function(){var E=o.on.apply(o,arguments);return E===o?p:E},p.clickDistance=function(E){return arguments.length?(h=(E=+E)*E,p):Math.sqrt(h)},p}function _x(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Tj(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ga(){}var Aa=.7,Vu=1/Aa,ro="\\s*([+-]?\\d+)\\s*",Ma="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",m8=/^#([0-9a-f]{3,8})$/,y8=new RegExp(`^rgb\\(${ro},${ro},${ro}\\)$`),b8=new RegExp(`^rgb\\(${Qr},${Qr},${Qr}\\)$`),x8=new RegExp(`^rgba\\(${ro},${ro},${ro},${Ma}\\)$`),w8=new RegExp(`^rgba\\(${Qr},${Qr},${Qr},${Ma}\\)$`),_8=new RegExp(`^hsl\\(${Ma},${Qr},${Qr}\\)$`),E8=new RegExp(`^hsla\\(${Ma},${Qr},${Qr},${Ma}\\)$`),bP={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};_x(Ga,Da,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xP,formatHex:xP,formatHex8:S8,formatHsl:O8,formatRgb:wP,toString:wP});function xP(){return this.rgb().formatHex()}function S8(){return this.rgb().formatHex8()}function O8(){return Aj(this).formatHsl()}function wP(){return this.rgb().formatRgb()}function Da(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=m8.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?_P(t):r===3?new Vt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?cu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?cu(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=y8.exec(e))?new Vt(t[1],t[2],t[3],1):(t=b8.exec(e))?new Vt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=x8.exec(e))?cu(t[1],t[2],t[3],t[4]):(t=w8.exec(e))?cu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=_8.exec(e))?OP(t[1],t[2]/100,t[3]/100,1):(t=E8.exec(e))?OP(t[1],t[2]/100,t[3]/100,t[4]):bP.hasOwnProperty(e)?_P(bP[e]):e==="transparent"?new Vt(NaN,NaN,NaN,0):null}function _P(e){return new Vt(e>>16&255,e>>8&255,e&255,1)}function cu(e,t,r,n){return n<=0&&(e=t=r=NaN),new Vt(e,t,r,n)}function C8(e){return e instanceof Ga||(e=Da(e)),e?(e=e.rgb(),new Vt(e.r,e.g,e.b,e.opacity)):new Vt}function Ob(e,t,r,n){return arguments.length===1?C8(e):new Vt(e,t,r,n??1)}function Vt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}_x(Vt,Ob,Tj(Ga,{brighter(e){return e=e==null?Vu:Math.pow(Vu,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Aa:Math.pow(Aa,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vt(ci(this.r),ci(this.g),ci(this.b),Wu(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:EP,formatHex:EP,formatHex8:R8,formatRgb:SP,toString:SP}));function EP(){return`#${si(this.r)}${si(this.g)}${si(this.b)}`}function R8(){return`#${si(this.r)}${si(this.g)}${si(this.b)}${si((isNaN(this.opacity)?1:this.opacity)*255)}`}function SP(){const e=Wu(this.opacity);return`${e===1?"rgb(":"rgba("}${ci(this.r)}, ${ci(this.g)}, ${ci(this.b)}${e===1?")":`, ${e})`}`}function Wu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ci(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function si(e){return e=ci(e),(e<16?"0":"")+e.toString(16)}function OP(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Mr(e,t,r,n)}function Aj(e){if(e instanceof Mr)return new Mr(e.h,e.s,e.l,e.opacity);if(e instanceof Ga||(e=Da(e)),!e)return new Mr;if(e instanceof Mr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,u=o-i,c=(o+i)/2;return u?(t===o?a=(r-n)/u+(r<n)*6:r===o?a=(n-t)/u+2:a=(t-r)/u+4,u/=c<.5?o+i:2-o-i,a*=60):u=c>0&&c<1?0:a,new Mr(a,u,c,e.opacity)}function P8(e,t,r,n){return arguments.length===1?Aj(e):new Mr(e,t,r,n??1)}function Mr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}_x(Mr,P8,Tj(Ga,{brighter(e){return e=e==null?Vu:Math.pow(Vu,e),new Mr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Aa:Math.pow(Aa,e),new Mr(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Vt(lm(e>=240?e-240:e+120,i,n),lm(e,i,n),lm(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Mr(CP(this.h),lu(this.s),lu(this.l),Wu(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=Wu(this.opacity);return`${e===1?"hsl(":"hsla("}${CP(this.h)}, ${lu(this.s)*100}%, ${lu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function CP(e){return e=(e||0)%360,e<0?e+360:e}function lu(e){return Math.max(0,Math.min(1,e||0))}function lm(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Mj=e=>()=>e;function I8(e,t){return function(r){return e+r*t}}function N8(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function T8(e){return(e=+e)==1?Dj:function(t,r){return r-t?N8(t,r,e):Mj(isNaN(t)?r:t)}}function Dj(e,t){var r=t-e;return r?I8(e,r):Mj(isNaN(e)?t:e)}const RP=(function e(t){var r=T8(t);function n(i,o){var a=r((i=Ob(i)).r,(o=Ob(o)).r),u=r(i.g,o.g),c=r(i.b,o.b),d=Dj(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=u(f),i.b=c(f),i.opacity=d(f),i+""}}return n.gamma=e,n})(1);function Ln(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Cb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fm=new RegExp(Cb.source,"g");function A8(e){return function(){return e}}function M8(e){return function(t){return e(t)+""}}function D8(e,t){var r=Cb.lastIndex=fm.lastIndex=0,n,i,o,a=-1,u=[],c=[];for(e=e+"",t=t+"";(n=Cb.exec(e))&&(i=fm.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),u[a]?u[a]+=o:u[++a]=o),(n=n[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,c.push({i:a,x:Ln(n,i)})),r=fm.lastIndex;return r<t.length&&(o=t.slice(r),u[a]?u[a]+=o:u[++a]=o),u.length<2?c[0]?M8(c[0].x):A8(t):(t=c.length,function(d){for(var f=0,h;f<t;++f)u[(h=c[f]).i]=h.x(d);return u.join("")})}var PP=180/Math.PI,Rb={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function jj(e,t,r,n,i,o){var a,u,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*r+t*n)&&(r-=e*c,n-=t*c),(u=Math.sqrt(r*r+n*n))&&(r/=u,n/=u,c/=u),e*n<t*r&&(e=-e,t=-t,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*PP,skewX:Math.atan(c)*PP,scaleX:a,scaleY:u}}var fu;function j8(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Rb:jj(t.a,t.b,t.c,t.d,t.e,t.f)}function q8(e){return e==null||(fu||(fu=document.createElementNS("http://www.w3.org/2000/svg","g")),fu.setAttribute("transform",e),!(e=fu.transform.baseVal.consolidate()))?Rb:(e=e.matrix,jj(e.a,e.b,e.c,e.d,e.e,e.f))}function qj(e,t,r,n){function i(d){return d.length?d.pop()+" ":""}function o(d,f,h,p,v,m){if(d!==h||f!==p){var y=v.push("translate(",null,t,null,r);m.push({i:y-4,x:Ln(d,h)},{i:y-2,x:Ln(f,p)})}else(h||p)&&v.push("translate("+h+t+p+r)}function a(d,f,h,p){d!==f?(d-f>180?f+=360:f-d>180&&(d+=360),p.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Ln(d,f)})):f&&h.push(i(h)+"rotate("+f+n)}function u(d,f,h,p){d!==f?p.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Ln(d,f)}):f&&h.push(i(h)+"skewX("+f+n)}function c(d,f,h,p,v,m){if(d!==h||f!==p){var y=v.push(i(v)+"scale(",null,",",null,")");m.push({i:y-4,x:Ln(d,h)},{i:y-2,x:Ln(f,p)})}else(h!==1||p!==1)&&v.push(i(v)+"scale("+h+","+p+")")}return function(d,f){var h=[],p=[];return d=e(d),f=e(f),o(d.translateX,d.translateY,f.translateX,f.translateY,h,p),a(d.rotate,f.rotate,h,p),u(d.skewX,f.skewX,h,p),c(d.scaleX,d.scaleY,f.scaleX,f.scaleY,h,p),d=f=null,function(v){for(var m=-1,y=p.length,b;++m<y;)h[(b=p[m]).i]=b.x(v);return h.join("")}}}var k8=qj(j8,"px, ","px)","deg)"),L8=qj(q8,", ",")",")"),B8=1e-12;function IP(e){return((e=Math.exp(e))+1/e)/2}function F8(e){return((e=Math.exp(e))-1/e)/2}function $8(e){return((e=Math.exp(2*e))-1)/(e+1)}const z8=(function e(t,r,n){function i(o,a){var u=o[0],c=o[1],d=o[2],f=a[0],h=a[1],p=a[2],v=f-u,m=h-c,y=v*v+m*m,b,x;if(y<B8)x=Math.log(p/d)/t,b=function(P){return[u+P*v,c+P*m,d*Math.exp(t*P*x)]};else{var w=Math.sqrt(y),S=(p*p-d*d+n*y)/(2*d*r*w),E=(p*p-d*d-n*y)/(2*p*r*w),_=Math.log(Math.sqrt(S*S+1)-S),R=Math.log(Math.sqrt(E*E+1)-E);x=(R-_)/t,b=function(P){var N=P*x,j=IP(_),L=d/(r*w)*(j*$8(t*N+_)-F8(_));return[u+L*v,c+L*m,d*j/IP(t*N+_)]}}return b.duration=x*1e3*t/Math.SQRT2,b}return i.rho=function(o){var a=Math.max(.001,+o),u=a*a,c=u*u;return e(a,u,c)},i})(Math.SQRT2,2,4);var vo=0,xa=0,Zo=0,kj=1e3,Gu,wa,Ku=0,vi=0,Bc=0,ja=typeof performance=="object"&&performance.now?performance:Date,Lj=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ex(){return vi||(Lj(H8),vi=ja.now()+Bc)}function H8(){vi=0}function Yu(){this._call=this._time=this._next=null}Yu.prototype=Bj.prototype={constructor:Yu,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Ex():+r)+(t==null?0:+t),!this._next&&wa!==this&&(wa?wa._next=this:Gu=this,wa=this),this._call=e,this._time=r,Pb()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pb())}};function Bj(e,t,r){var n=new Yu;return n.restart(e,t,r),n}function U8(){Ex(),++vo;for(var e=Gu,t;e;)(t=vi-e._time)>=0&&e._call.call(void 0,t),e=e._next;--vo}function NP(){vi=(Ku=ja.now())+Bc,vo=xa=0;try{U8()}finally{vo=0,W8(),vi=0}}function V8(){var e=ja.now(),t=e-Ku;t>kj&&(Bc-=t,Ku=e)}function W8(){for(var e,t=Gu,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Gu=r);wa=e,Pb(n)}function Pb(e){if(!vo){xa&&(xa=clearTimeout(xa));var t=e-vi;t>24?(e<1/0&&(xa=setTimeout(NP,e-ja.now()-Bc)),Zo&&(Zo=clearInterval(Zo))):(Zo||(Ku=ja.now(),Zo=setInterval(V8,kj)),vo=1,Lj(NP))}}function TP(e,t,r){var n=new Yu;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var G8=kc("start","end","cancel","interrupt"),K8=[],Fj=0,AP=1,Ib=2,Du=3,MP=4,Nb=5,ju=6;function Fc(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Y8(e,r,{name:t,index:n,group:i,on:G8,tween:K8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Fj})}function Sx(e,t){var r=Fr(e,t);if(r.state>Fj)throw new Error("too late; already scheduled");return r}function on(e,t){var r=Fr(e,t);if(r.state>Du)throw new Error("too late; already running");return r}function Fr(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Y8(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=Bj(o,0,r.time);function o(d){r.state=AP,r.timer.restart(a,r.delay,r.time),r.delay<=d&&a(d-r.delay)}function a(d){var f,h,p,v;if(r.state!==AP)return c();for(f in n)if(v=n[f],v.name===r.name){if(v.state===Du)return TP(a);v.state===MP?(v.state=ju,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[f]):+f<t&&(v.state=ju,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[f])}if(TP(function(){r.state===Du&&(r.state=MP,r.timer.restart(u,r.delay,r.time),u(d))}),r.state=Ib,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Ib){for(r.state=Du,i=new Array(p=r.tween.length),f=0,h=-1;f<p;++f)(v=r.tween[f].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=v);i.length=h+1}}function u(d){for(var f=d<r.duration?r.ease.call(null,d/r.duration):(r.timer.restart(c),r.state=Nb,1),h=-1,p=i.length;++h<p;)i[h].call(e,f);r.state===Nb&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=ju,r.timer.stop(),delete n[t];for(var d in n)return;delete e.__transition}}function qu(e,t){var r=e.__transition,n,i,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>Ib&&n.state<Nb,n.state=ju,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function X8(e){return this.each(function(){qu(this,e)})}function Z8(e,t){var r,n;return function(){var i=on(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,u=n.length;a<u;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function J8(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=on(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var u={name:t,value:r},c=0,d=i.length;c<d;++c)if(i[c].name===t){i[c]=u;break}c===d&&i.push(u)}o.tween=i}}function Q8(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Fr(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?Z8:J8)(r,e,t))}function Ox(e,t,r){var n=e._id;return e.each(function(){var i=on(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Fr(i,n).value[t]}}function $j(e,t){var r;return(typeof t=="number"?Ln:t instanceof Da?RP:(r=Da(t))?(t=r,RP):D8)(e,t)}function eG(e){return function(){this.removeAttribute(e)}}function tG(e){return function(){this.removeAttributeNS(e.space,e.local)}}function rG(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===n?o:o=t(n=a,r)}}function nG(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?o:o=t(n=a,r)}}function iG(e,t,r){var n,i,o;return function(){var a,u=r(this),c;return u==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=u+"",a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,u)))}}function oG(e,t,r){var n,i,o;return function(){var a,u=r(this),c;return u==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=u+"",a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,u)))}}function aG(e,t){var r=Lc(e),n=r==="transform"?L8:$j;return this.attrTween(e,typeof t=="function"?(r.local?oG:iG)(r,n,Ox(this,"attr."+e,t)):t==null?(r.local?tG:eG)(r):(r.local?nG:rG)(r,n,t))}function sG(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function uG(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function cG(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&uG(e,o)),r}return i._value=t,i}function lG(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&sG(e,o)),r}return i._value=t,i}function fG(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=Lc(e);return this.tween(r,(n.local?cG:lG)(n,t))}function dG(e,t){return function(){Sx(this,e).delay=+t.apply(this,arguments)}}function hG(e,t){return t=+t,function(){Sx(this,e).delay=t}}function pG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?dG:hG)(t,e)):Fr(this.node(),t).delay}function vG(e,t){return function(){on(this,e).duration=+t.apply(this,arguments)}}function gG(e,t){return t=+t,function(){on(this,e).duration=t}}function mG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?vG:gG)(t,e)):Fr(this.node(),t).duration}function yG(e,t){if(typeof t!="function")throw new Error;return function(){on(this,e).ease=t}}function bG(e){var t=this._id;return arguments.length?this.each(yG(t,e)):Fr(this.node(),t).ease}function xG(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;on(this,e).ease=r}}function wG(e){if(typeof e!="function")throw new Error;return this.each(xG(this._id,e))}function _G(e){typeof e!="function"&&(e=bj(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,u=n[i]=[],c,d=0;d<a;++d)(c=o[d])&&e.call(c,c.__data__,d,o)&&u.push(c);return new bn(n,this._parents,this._name,this._id)}function EG(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),u=0;u<o;++u)for(var c=t[u],d=r[u],f=c.length,h=a[u]=new Array(f),p,v=0;v<f;++v)(p=c[v]||d[v])&&(h[v]=p);for(;u<n;++u)a[u]=t[u];return new bn(a,this._parents,this._name,this._id)}function SG(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function OG(e,t,r){var n,i,o=SG(t)?Sx:on;return function(){var a=o(this,e),u=a.on;u!==n&&(i=(n=u).copy()).on(t,r),a.on=i}}function CG(e,t){var r=this._id;return arguments.length<2?Fr(this.node(),r).on.on(e):this.each(OG(r,e,t))}function RG(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function PG(){return this.on("end.remove",RG(this._id))}function IG(e){var t=this._name,r=this._id;typeof e!="function"&&(e=xx(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var u=n[a],c=u.length,d=o[a]=new Array(c),f,h,p=0;p<c;++p)(f=u[p])&&(h=e.call(f,f.__data__,p,u))&&("__data__"in f&&(h.__data__=f.__data__),d[p]=h,Fc(d[p],t,r,p,d,Fr(f,r)));return new bn(o,this._parents,t,r)}function NG(e){var t=this._name,r=this._id;typeof e!="function"&&(e=yj(e));for(var n=this._groups,i=n.length,o=[],a=[],u=0;u<i;++u)for(var c=n[u],d=c.length,f,h=0;h<d;++h)if(f=c[h]){for(var p=e.call(f,f.__data__,h,c),v,m=Fr(f,r),y=0,b=p.length;y<b;++y)(v=p[y])&&Fc(v,t,r,y,p,m);o.push(p),a.push(f)}return new bn(o,a,t,r)}var TG=Wa.prototype.constructor;function AG(){return new TG(this._groups,this._parents)}function MG(e,t){var r,n,i;return function(){var o=po(this,e),a=(this.style.removeProperty(e),po(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function zj(e){return function(){this.style.removeProperty(e)}}function DG(e,t,r){var n,i=r+"",o;return function(){var a=po(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function jG(e,t,r){var n,i,o;return function(){var a=po(this,e),u=r(this),c=u+"";return u==null&&(c=u=(this.style.removeProperty(e),po(this,e))),a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,u))}}function qG(e,t){var r,n,i,o="style."+t,a="end."+o,u;return function(){var c=on(this,e),d=c.on,f=c.value[o]==null?u||(u=zj(t)):void 0;(d!==r||i!==f)&&(n=(r=d).copy()).on(a,i=f),c.on=n}}function kG(e,t,r){var n=(e+="")=="transform"?k8:$j;return t==null?this.styleTween(e,MG(e,n)).on("end.style."+e,zj(e)):typeof t=="function"?this.styleTween(e,jG(e,n,Ox(this,"style."+e,t))).each(qG(this._id,e)):this.styleTween(e,DG(e,n,t),r).on("end.style."+e,null)}function LG(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function BG(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&LG(e,a,r)),n}return o._value=t,o}function FG(e,t,r){var n="style."+(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;return this.tween(n,BG(e,t,r??""))}function $G(e){return function(){this.textContent=e}}function zG(e){return function(){var t=e(this);this.textContent=t??""}}function HG(e){return this.tween("text",typeof e=="function"?zG(Ox(this,"text",e)):$G(e==null?"":e+""))}function UG(e){return function(t){this.textContent=e.call(this,t)}}function VG(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&UG(i)),t}return n._value=e,n}function WG(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,VG(e))}function GG(){for(var e=this._name,t=this._id,r=Hj(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],u=a.length,c,d=0;d<u;++d)if(c=a[d]){var f=Fr(c,t);Fc(c,e,r,d,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new bn(n,this._parents,e,r)}function KG(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var u={value:a},c={value:function(){--i===0&&o()}};r.each(function(){var d=on(this,n),f=d.on;f!==e&&(t=(e=f).copy(),t._.cancel.push(u),t._.interrupt.push(u),t._.end.push(c)),d.on=t}),i===0&&o()})}var YG=0;function bn(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Hj(){return++YG}var gn=Wa.prototype;bn.prototype={constructor:bn,select:IG,selectAll:NG,selectChild:gn.selectChild,selectChildren:gn.selectChildren,filter:_G,merge:EG,selection:AG,transition:GG,call:gn.call,nodes:gn.nodes,node:gn.node,size:gn.size,empty:gn.empty,each:gn.each,on:CG,attr:aG,attrTween:fG,style:kG,styleTween:FG,text:HG,textTween:WG,remove:PG,tween:Q8,delay:pG,duration:mG,ease:bG,easeVarying:wG,end:KG,[Symbol.iterator]:gn[Symbol.iterator]};function XG(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ZG={time:null,delay:0,duration:250,ease:XG};function JG(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function QG(e){var t,r;e instanceof bn?(t=e._id,e=e._name):(t=Hj(),(r=ZG).time=Ex(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],u=a.length,c,d=0;d<u;++d)(c=a[d])&&Fc(c,e,t,d,a,r||JG(c,t));return new bn(n,this._parents,e,t)}Wa.prototype.interrupt=X8;Wa.prototype.transition=QG;const du=e=>()=>e;function eK(e,{sourceEvent:t,target:r,transform:n,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:i}})}function mn(e,t,r){this.k=e,this.x=t,this.y=r}mn.prototype={constructor:mn,scale:function(e){return e===1?this:new mn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new mn(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 li=new mn(1,0,0);mn.prototype;function dm(e){e.stopImmediatePropagation()}function Jo(e){e.preventDefault(),e.stopImmediatePropagation()}function tK(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function rK(){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 DP(){return this.__zoom||li}function nK(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function iK(){return navigator.maxTouchPoints||"ontouchstart"in this}function oK(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function aK(){var e=tK,t=rK,r=oK,n=nK,i=iK,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],u=250,c=z8,d=kc("start","zoom","end"),f,h,p,v=500,m=150,y=0,b=10;function x(T){T.property("__zoom",DP).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",L).filter(i).on("touchstart.zoom",F).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",D).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(T,B,$,W){var Y=T.selection?T.selection():T;Y.property("__zoom",DP),T!==Y?_(T,B,$,W):Y.interrupt().each(function(){R(this,arguments).event(W).start().zoom(null,typeof B=="function"?B.apply(this,arguments):B).end()})},x.scaleBy=function(T,B,$,W){x.scaleTo(T,function(){var Y=this.__zoom.k,ee=typeof B=="function"?B.apply(this,arguments):B;return Y*ee},$,W)},x.scaleTo=function(T,B,$,W){x.transform(T,function(){var Y=t.apply(this,arguments),ee=this.__zoom,H=$==null?E(Y):typeof $=="function"?$.apply(this,arguments):$,Q=ee.invert(H),ce=typeof B=="function"?B.apply(this,arguments):B;return r(S(w(ee,ce),H,Q),Y,a)},$,W)},x.translateBy=function(T,B,$,W){x.transform(T,function(){return r(this.__zoom.translate(typeof B=="function"?B.apply(this,arguments):B,typeof $=="function"?$.apply(this,arguments):$),t.apply(this,arguments),a)},null,W)},x.translateTo=function(T,B,$,W,Y){x.transform(T,function(){var ee=t.apply(this,arguments),H=this.__zoom,Q=W==null?E(ee):typeof W=="function"?W.apply(this,arguments):W;return r(li.translate(Q[0],Q[1]).scale(H.k).translate(typeof B=="function"?-B.apply(this,arguments):-B,typeof $=="function"?-$.apply(this,arguments):-$),ee,a)},W,Y)};function w(T,B){return B=Math.max(o[0],Math.min(o[1],B)),B===T.k?T:new mn(B,T.x,T.y)}function S(T,B,$){var W=B[0]-$[0]*T.k,Y=B[1]-$[1]*T.k;return W===T.x&&Y===T.y?T:new mn(T.k,W,Y)}function E(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function _(T,B,$,W){T.on("start.zoom",function(){R(this,arguments).event(W).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(W).end()}).tween("zoom",function(){var Y=this,ee=arguments,H=R(Y,ee).event(W),Q=t.apply(Y,ee),ce=$==null?E(Q):typeof $=="function"?$.apply(Y,ee):$,se=Math.max(Q[1][0]-Q[0][0],Q[1][1]-Q[0][1]),z=Y.__zoom,G=typeof B=="function"?B.apply(Y,ee):B,J=c(z.invert(ce).concat(se/z.k),G.invert(ce).concat(se/G.k));return function(V){if(V===1)V=G;else{var K=J(V),ie=se/K[2];V=new mn(ie,ce[0]-K[0]*ie,ce[1]-K[1]*ie)}H.zoom(null,V)}})}function R(T,B,$){return!$&&T.__zooming||new P(T,B)}function P(T,B){this.that=T,this.args=B,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,B),this.taps=0}P.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,B){return this.mouse&&T!=="mouse"&&(this.mouse[1]=B.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=B.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=B.invert(this.touch1[0])),this.that.__zoom=B,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var B=Ar(this.that).datum();d.call(T,this.that,new eK(T,{sourceEvent:this.sourceEvent,target:x,transform:this.that.__zoom,dispatch:d}),B)}};function N(T,...B){if(!e.apply(this,arguments))return;var $=R(this,B).event(T),W=this.__zoom,Y=Math.max(o[0],Math.min(o[1],W.k*Math.pow(2,n.apply(this,arguments)))),ee=Yr(T);if($.wheel)($.mouse[0][0]!==ee[0]||$.mouse[0][1]!==ee[1])&&($.mouse[1]=W.invert($.mouse[0]=ee)),clearTimeout($.wheel);else{if(W.k===Y)return;$.mouse=[ee,W.invert(ee)],qu(this),$.start()}Jo(T),$.wheel=setTimeout(H,m),$.zoom("mouse",r(S(w(W,Y),$.mouse[0],$.mouse[1]),$.extent,a));function H(){$.wheel=null,$.end()}}function j(T,...B){if(p||!e.apply(this,arguments))return;var $=T.currentTarget,W=R(this,B,!0).event(T),Y=Ar(T.view).on("mousemove.zoom",ce,!0).on("mouseup.zoom",se,!0),ee=Yr(T,$),H=T.clientX,Q=T.clientY;Ij(T.view),dm(T),W.mouse=[ee,this.__zoom.invert(ee)],qu(this),W.start();function ce(z){if(Jo(z),!W.moved){var G=z.clientX-H,J=z.clientY-Q;W.moved=G*G+J*J>y}W.event(z).zoom("mouse",r(S(W.that.__zoom,W.mouse[0]=Yr(z,$),W.mouse[1]),W.extent,a))}function se(z){Y.on("mousemove.zoom mouseup.zoom",null),Nj(z.view,W.moved),Jo(z),W.event(z).end()}}function L(T,...B){if(e.apply(this,arguments)){var $=this.__zoom,W=Yr(T.changedTouches?T.changedTouches[0]:T,this),Y=$.invert(W),ee=$.k*(T.shiftKey?.5:2),H=r(S(w($,ee),W,Y),t.apply(this,B),a);Jo(T),u>0?Ar(this).transition().duration(u).call(_,H,W,T):Ar(this).call(x.transform,H,W,T)}}function F(T,...B){if(e.apply(this,arguments)){var $=T.touches,W=$.length,Y=R(this,B,T.changedTouches.length===W).event(T),ee,H,Q,ce;for(dm(T),H=0;H<W;++H)Q=$[H],ce=Yr(Q,this),ce=[ce,this.__zoom.invert(ce),Q.identifier],Y.touch0?!Y.touch1&&Y.touch0[2]!==ce[2]&&(Y.touch1=ce,Y.taps=0):(Y.touch0=ce,ee=!0,Y.taps=1+!!f);f&&(f=clearTimeout(f)),ee&&(Y.taps<2&&(h=ce[0],f=setTimeout(function(){f=null},v)),qu(this),Y.start())}}function k(T,...B){if(this.__zooming){var $=R(this,B).event(T),W=T.changedTouches,Y=W.length,ee,H,Q,ce;for(Jo(T),ee=0;ee<Y;++ee)H=W[ee],Q=Yr(H,this),$.touch0&&$.touch0[2]===H.identifier?$.touch0[0]=Q:$.touch1&&$.touch1[2]===H.identifier&&($.touch1[0]=Q);if(H=$.that.__zoom,$.touch1){var se=$.touch0[0],z=$.touch0[1],G=$.touch1[0],J=$.touch1[1],V=(V=G[0]-se[0])*V+(V=G[1]-se[1])*V,K=(K=J[0]-z[0])*K+(K=J[1]-z[1])*K;H=w(H,Math.sqrt(V/K)),Q=[(se[0]+G[0])/2,(se[1]+G[1])/2],ce=[(z[0]+J[0])/2,(z[1]+J[1])/2]}else if($.touch0)Q=$.touch0[0],ce=$.touch0[1];else return;$.zoom("touch",r(S(H,Q,ce),$.extent,a))}}function D(T,...B){if(this.__zooming){var $=R(this,B).event(T),W=T.changedTouches,Y=W.length,ee,H;for(dm(T),p&&clearTimeout(p),p=setTimeout(function(){p=null},v),ee=0;ee<Y;++ee)H=W[ee],$.touch0&&$.touch0[2]===H.identifier?delete $.touch0:$.touch1&&$.touch1[2]===H.identifier&&delete $.touch1;if($.touch1&&!$.touch0&&($.touch0=$.touch1,delete $.touch1),$.touch0)$.touch0[1]=this.__zoom.invert($.touch0[0]);else if($.end(),$.taps===2&&(H=Yr(H,this),Math.hypot(h[0]-H[0],h[1]-H[1])<b)){var Q=Ar(this).on("dblclick.zoom");Q&&Q.apply(this,arguments)}}}return x.wheelDelta=function(T){return arguments.length?(n=typeof T=="function"?T:du(+T),x):n},x.filter=function(T){return arguments.length?(e=typeof T=="function"?T:du(!!T),x):e},x.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:du(!!T),x):i},x.extent=function(T){return arguments.length?(t=typeof T=="function"?T:du([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),x):t},x.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],x):[o[0],o[1]]},x.translateExtent=function(T){return arguments.length?(a[0][0]=+T[0][0],a[1][0]=+T[1][0],a[0][1]=+T[0][1],a[1][1]=+T[1][1],x):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},x.constrain=function(T){return arguments.length?(r=T,x):r},x.duration=function(T){return arguments.length?(u=+T,x):u},x.interpolate=function(T){return arguments.length?(c=T,x):c},x.on=function(){var T=d.on.apply(d,arguments);return T===d?x:T},x.clickDistance=function(T){return arguments.length?(y=(T=+T)*T,x):Math.sqrt(y)},x.tapDistance=function(T){return arguments.length?(b=+T,x):b},x}function ze(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Uj(e,t){if(e){if(typeof e=="string")return Tb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tb(e,t)}}function sK(e){if(Array.isArray(e))return e}function uK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,u;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,u=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw u}}return n}}function cK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
6
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Be(e,t){return sK(e)||uK(e,t)||Uj(e,t)||cK()}var go;(function(e){e.Strict="strict",e.Loose="loose"})(go||(go={}));var gi;(function(e){e.Lines="lines",e.Dots="dots"})(gi||(gi={}));var no;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(no||(no={}));var Fn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Fn||(Fn={}));var Xu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Xu||(Xu={}));var xe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(xe||(xe={}));var Cx=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},io=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(t,r),n)},Vj=function(t,r){return{x:io(t.x,r[0][0],r[1][0]),y:io(t.y,r[0][1],r[1][1])}},Wj=function(t){var r,n;return((r=t.getRootNode)===null||r===void 0?void 0:r.call(t))||((n=window)===null||n===void 0?void 0:n.document)},lK=function(t,r){return{x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x2,r.x2),y2:Math.max(t.y2,r.y2)}},Zu=function(t){var r=t.x,n=t.y,i=t.width,o=t.height;return{x:r,y:n,x2:r+i,y2:n+o}},fK=function(t){var r=t.x,n=t.y,i=t.x2,o=t.y2;return{x:r,y:n,width:i-r,height:o-n}},Gj=function(t){return!isNaN(t)&&isFinite(t)},It=Symbol("internals");function jP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _a(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qP(e,t){var r=e.find(function(d){return d.id===t.parentNode});if(r){var n=t.position.x+t.width-r.width,i=t.position.y+t.height-r.height;if(n>0||i>0||t.position.x<0||t.position.y<0){var o,a;if(r.style=_a({},r.style)||{},r.style.width=(o=r.style.width)!==null&&o!==void 0?o:r.width,r.style.height=(a=r.style.height)!==null&&a!==void 0?a:r.height,n>0&&(r.style.width+=n),i>0&&(r.style.height+=i),t.position.x<0){var u=Math.abs(t.position.x);r.position.x=r.position.x-u,r.style.width+=u,t.position.x=0}if(t.position.y<0){var c=Math.abs(t.position.y);r.position.y=r.position.y-c,r.style.height+=c,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function Kj(e,t){if(e.some(function(n){return n.type==="reset"}))return e.filter(function(n){return n.type==="reset"}).map(function(n){return n.item});var r=e.filter(function(n){return n.type==="add"}).map(function(n){return n.item});return t.reduce(function(n,i){var o=e.find(function(c){return c.id===i.id});if(o)switch(o.type){case"select":return n.push(_a(_a({},i),{},{selected:o.selected})),n;case"position":{var a=_a({},i);return typeof o.position<"u"&&(a.position=o.position),typeof o.positionAbsolute<"u"&&(a.positionAbsolute=o.positionAbsolute),typeof o.dragging<"u"&&(a.dragging=o.dragging),a.expandParent&&qP(n,a),n.push(a),n}case"dimensions":{var u=_a({},i);return typeof o.dimensions<"u"&&(u.width=o.dimensions.width,u.height=o.dimensions.height),u.expandParent&&qP(n,u),n.push(u),n}case"remove":return n}return n.push(i),n},r)}function Yj(e,t){return Kj(e,t)}function dK(e,t){return Kj(e,t)}var Bn=function(t,r){return{id:t,type:"select",selected:r}};function Ji(e,t){return e.reduce(function(r,n){var i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(Bn(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Bn(n.id,!1))),r},[])}function kP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var LP=function(t,r,n){var i=r.querySelectorAll(t);if(!i||!i.length)return null;var o=Array.from(i),a=r.getBoundingClientRect();return o.map(function(u){var c=u.getBoundingClientRect();return Xj({id:u.getAttribute("data-handleid"),position:u.getAttribute("data-handlepos"),x:(c.left-a.left)/n,y:(c.top-a.top)/n},Cx(u))})};function Qo(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,Xj({},i))}}function Zj(e){var t=e.id,r=e.store,n=r.getState(),i=n.addSelectedNodes,o=n.unselectNodesAndEdges,a=n.multiSelectionActive,u=n.nodeInternals,c=u.get(t);r.setState({nodesSelectionActive:!1}),c.selected?c.selected&&a&&o({nodes:[c]}):i([t])}function BP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ca(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var hK=function(t){return"id"in t&&"source"in t&&"target"in t},pK=function(t){var r=t.source,n=t.sourceHandle,i=t.target,o=t.targetHandle;return"reactflow__edge-".concat(r).concat(n||"","-").concat(i).concat(o||"")},Ab=function(t,r){if(typeof t>"u")return"";if(typeof t=="string")return t;var n=r?"".concat(r,"__"):"";return"".concat(n).concat(Object.keys(t).sort().map(function(i){return"".concat(i,"=").concat(t[i])}).join("&"))},vK=function(t,r){return r.some(function(n){return n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle)})},gK=function(t,r){if(!t.source||!t.target)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Can't create edge. An edge needs a source and a target. Help: https://reactflow.dev/error#600"),r;var n;return hK(t)?n=Ca({},t):n=Ca(Ca({},t),{},{id:pK(t)}),vK(n,r)?r:r.concat(n)},Jj=function(t,r,n,i){var o=t.x,a=t.y,u=Be(r,3),c=u[0],d=u[1],f=u[2],h=Be(i,2),p=h[0],v=h[1],m={x:(o-c)/f,y:(a-d)/f};return n?{x:p*Math.round(m.x/p),y:v*Math.round(m.y/v)}:m},Rx=function(t){if(t.length===0)return{x:0,y:0,width:0,height:0};var r=t.reduce(function(n,i){var o=i.positionAbsolute,a=i.position,u=i.width,c=i.height;return lK(n,Zu({x:o?o.x:a.x,y:o?o.y:a.y,width:u||0,height:c||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return fK(r)},Qj=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],i=Be(n,3),o=i[0],a=i[1],u=i[2],c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,f=Zu({x:(r.x-o)/u,y:(r.y-a)/u,width:r.width/u,height:r.height/u}),h=[];return t.forEach(function(p){var v=p.positionAbsolute,m=p.width,y=p.height,b=p.selectable,x=b===void 0?!0:b;if(d&&!x)return!1;var w=Zu(Ca(Ca({},v),{},{width:m||0,height:y||0})),S=Math.max(0,Math.min(f.x2,w.x2)-Math.max(f.x,w.x)),E=Math.max(0,Math.min(f.y2,w.y2)-Math.max(f.y,w.y)),_=Math.ceil(S*E),R=typeof m>"u"||typeof y>"u"||m===null||y===null,P=c&&_>0,N=(m||0)*(y||0),j=R||P||_>=N;j&&h.push(p)}),h},eq=function(t,r){var n=t.map(function(i){return i.id});return r.filter(function(i){return n.includes(i.source)||n.includes(i.target)})},tq=function(t,r,n,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:.1,u=r/(t.width*(1+a)),c=n/(t.height*(1+a)),d=Math.min(u,c),f=io(d,i,o),h=t.x+t.width/2,p=t.y+t.height/2,v=r/2-h*f,m=n/2-p*f;return[v,m,f]},oi=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};function FP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rq(e,t,r,n){var i,o,a,u,c,d,f,h,p,v,m,y;if(!e.parentNode)return n;var b=t.get(e.parentNode);return rq(b,t,r,{x:((i=n.x)!==null&&i!==void 0?i:0)+((o=(a=b.position)===null||a===void 0?void 0:a.x)!==null&&o!==void 0?o:0),y:((u=n.y)!==null&&u!==void 0?u:0)+((c=(d=b.position)===null||d===void 0?void 0:d.y)!==null&&c!==void 0?c:0),z:((f=(h=b[It])===null||h===void 0?void 0:h.z)!==null&&f!==void 0?f:0)>((p=n.z)!==null&&p!==void 0?p:0)?(v=(m=b[It])===null||m===void 0?void 0:m.z)!==null&&v!==void 0?v:0:(y=n.z)!==null&&y!==void 0?y:0})}function hm(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=Gj(i.zIndex)?i.zIndex:i.selected?1e3:0,u=t.get(i.id),c=Qi(Qi({width:u==null?void 0:u.width,height:u==null?void 0:u.height},i),{},{positionAbsolute:{x:i.position.x,y:i.position.y}});i.parentNode&&(c.parentNode=i.parentNode,n[i.parentNode]=!0),Object.defineProperty(c,It,{enumerable:!1,value:{handleBounds:u==null||(o=u[It])===null||o===void 0?void 0:o.handleBounds,z:a}}),r.set(i.id,c)}),r.forEach(function(i){if(i.parentNode&&!r.has(i.parentNode))throw new Error("Parent node ".concat(i.parentNode," not found"));if(i.parentNode||n[i.id]){var o,a,u=rq(i,r,n,Qi(Qi({},i.position),{},{z:(o=(a=i[It])===null||a===void 0?void 0:a.z)!==null&&o!==void 0?o:0})),c=u.x,d=u.y,f=u.z;i.positionAbsolute={x:c,y:d},i[It].z=f,n[i.id]&&(i[It].isParent=!0)}}),r}function nq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e(),n=r.nodeInternals,i=r.width,o=r.height,a=r.minZoom,u=r.maxZoom,c=r.d3Zoom,d=r.d3Selection,f=r.fitViewOnInitDone,h=r.fitViewOnInit;if((t.initial&&!f&&h||!t.initial)&&c&&d){var p=Array.from(n.values()).filter(function(N){return t.includeHiddenNodes?N.width&&N.height:!N.hidden}),v=p.every(function(N){return N.width&&N.height});if(p.length>0&&v){var m,y,b,x=Rx(p),w=tq(x,i,o,(m=t.minZoom)!==null&&m!==void 0?m:a,(y=t.maxZoom)!==null&&y!==void 0?y:u,(b=t.padding)!==null&&b!==void 0?b:.1),S=Be(w,3),E=S[0],_=S[1],R=S[2],P=li.translate(E,_).scale(R);return typeof t.duration=="number"&&t.duration>0?c.transform(oi(d,t.duration),P):c.transform(d,P),!0}}return!1}function mK(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,Qi(Qi({},n),{},(i={},ze(i,It,n[It]),ze(i,"selected",r.selected),i)))}}),new Map(t)}function yK(e,t){return t.map(function(r){var n=e.find(function(i){return i.id===r.id});return n&&(r.selected=n.selected),r})}function hu(e){var t=e.changedNodes,r=e.changedEdges,n=e.get,i=e.set,o=n(),a=o.nodeInternals,u=o.edges,c=o.onNodesChange,d=o.onEdgesChange,f=o.hasDefaultNodes,h=o.hasDefaultEdges;t!=null&&t.length&&(f&&i({nodeInternals:mK(t,a)}),c==null||c(t)),r!=null&&r.length&&(h&&i({edges:yK(r,u)}),d==null||d(r))}var Mb=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],$P={width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Mb,nodeExtent:Mb,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:go.Strict,domNode:null,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,reactFlowVersion:"10.3.17",connectionStartHandle:null,connectOnClick:!0};function zP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Px=PW(),bK=Px.Provider,gt=Px.useStore,Bt=Px.useStoreApi,xK=function(){return RW(function(t,r){return Gr(Gr({},$P),{},{setNodes:function(i){t({nodeInternals:hm(i,r().nodeInternals)})},setEdges:function(i){var o=r(),a=o.defaultEdgeOptions,u=a===void 0?{}:a;t({edges:i.map(function(c){return Gr(Gr({},u),c)})})},setDefaultNodesAndEdges:function(i,o){var a=typeof i<"u",u=typeof o<"u",c=a?hm(i,new Map):new Map,d=u?o:[];t({nodeInternals:c,edges:d,hasDefaultNodes:a,hasDefaultEdges:u})},updateNodeDimensions:function(i){var o=r(),a=o.onNodesChange,u=o.nodeInternals,c=o.fitViewOnInit,d=o.fitViewOnInitDone,f=o.fitViewOnInitOptions,h=o.domNode,p=h==null?void 0:h.querySelector(".react-flow__viewport");if(p){var v=window.getComputedStyle(p),m=new window.DOMMatrixReadOnly(v.transform),y=m.m22,b=i.reduce(function(w,S){var E=u.get(S.id);if(E){var _=Cx(S.nodeElement),R=!!(_.width&&_.height&&(E.width!==_.width||E.height!==_.height||S.forceUpdate));R&&(u.set(E.id,Gr(Gr({},E),{},ze({},It,Gr(Gr({},E[It]),{},{handleBounds:{source:LP(".source",S.nodeElement,y),target:LP(".target",S.nodeElement,y)}})),_)),w.push({id:E.id,type:"dimensions",dimensions:_}))}return w},[]),x=d||c&&!d&&nq(r,Gr({initial:!0},f));t({nodeInternals:new Map(u),fitViewOnInitDone:x}),(b==null?void 0:b.length)>0&&(a==null||a(b))}},updateNodePositions:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,u=r(),c=u.onNodesChange,d=u.nodeInternals,f=u.hasDefaultNodes;if(f||c){var h=i.map(function(m){var y={id:m.id,type:"position",dragging:a};return o&&(y.positionAbsolute=m.positionAbsolute,y.position=m.position),y});if(h!=null&&h.length){if(f){var p=Yj(h,Array.from(d.values())),v=hm(p,d);t({nodeInternals:v})}c==null||c(h)}}},addSelectedNodes:function(i){var o=r(),a=o.multiSelectionActive,u=o.nodeInternals,c=o.edges,d,f=null;a?d=i.map(function(h){return Bn(h,!0)}):(d=Ji(Array.from(u.values()),i),f=Ji(c,[])),hu({changedNodes:d,changedEdges:f,get:r,set:t})},addSelectedEdges:function(i){var o=r(),a=o.multiSelectionActive,u=o.edges,c=o.nodeInternals,d,f=null;a?d=i.map(function(h){return Bn(h,!0)}):(d=Ji(u,i),f=Ji(Array.from(c.values()),[])),hu({changedNodes:f,changedEdges:d,get:r,set:t})},unselectNodesAndEdges:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.nodes,a=i.edges,u=r(),c=u.nodeInternals,d=u.edges,f=o||Array.from(c.values()),h=a||d,p=f.map(function(m){return m.selected=!1,Bn(m.id,!1)}),v=h.map(function(m){return Bn(m.id,!1)});hu({changedNodes:p,changedEdges:v,get:r,set:t})},setMinZoom:function(i){var o=r(),a=o.d3Zoom,u=o.maxZoom;a==null||a.scaleExtent([i,u]),t({minZoom:i})},setMaxZoom:function(i){var o=r(),a=o.d3Zoom,u=o.minZoom;a==null||a.scaleExtent([u,i]),t({maxZoom:i})},setTranslateExtent:function(i){var o=r(),a=o.d3Zoom;a==null||a.translateExtent(i),t({translateExtent:i})},resetSelectedElements:function(){var i=r(),o=i.nodeInternals,a=i.edges,u=Array.from(o.values()),c=u.filter(function(f){return f.selected}).map(function(f){return Bn(f.id,!1)}),d=a.filter(function(f){return f.selected}).map(function(f){return Bn(f.id,!1)});hu({changedNodes:c,changedEdges:d,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(u){u.positionAbsolute=Vj(u.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(Gr({},$P))}})})};function ur(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,n;r<e.length;r++)(n=ur(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function Yt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!Object.is(e[r[n]],t[r[n]]))return!1;return!0}function wK(e){if(Array.isArray(e))return Tb(e)}function _K(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
7
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fi(e){return wK(e)||_K(e)||Uj(e)||EK()}var SK={zoomIn:function(){},zoomOut:function(){},zoomTo:function(t){},getZoom:function(){return 1},setViewport:function(t){},getViewport:function(){return{x:0,y:0,zoom:1}},fitView:function(){},setCenter:function(t,r){},fitBounds:function(t){},project:function(t){return t},viewportInitialized:!1},OK=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},CK=function(){var t=Bt(),r=gt(OK,Yt),n=r.d3Zoom,i=r.d3Selection,o=A.useMemo(function(){return i&&n?{zoomIn:function(u){return n.scaleBy(oi(i,u==null?void 0:u.duration),1.2)},zoomOut:function(u){return n.scaleBy(oi(i,u==null?void 0:u.duration),1/1.2)},zoomTo:function(u,c){return n.scaleTo(oi(i,c==null?void 0:c.duration),u)},getZoom:function(){return t.getState().transform[2]},setViewport:function(u,c){var d,f,h,p=Be(t.getState().transform,3),v=p[0],m=p[1],y=p[2],b=li.translate((d=u.x)!==null&&d!==void 0?d:v,(f=u.y)!==null&&f!==void 0?f:m).scale((h=u.zoom)!==null&&h!==void 0?h:y);n.transform(oi(i,c==null?void 0:c.duration),b)},getViewport:function(){var u=Be(t.getState().transform,3),c=u[0],d=u[1],f=u[2];return{x:c,y:d,zoom:f}},fitView:function(u){return nq(t.getState,u)},setCenter:function(u,c,d){var f=t.getState(),h=f.width,p=f.height,v=f.maxZoom,m=typeof(d==null?void 0:d.zoom)<"u"?d.zoom:v,y=h/2-u*m,b=p/2-c*m,x=li.translate(y,b).scale(m);n.transform(oi(i,d==null?void 0:d.duration),x)},fitBounds:function(u,c){var d,f=t.getState(),h=f.width,p=f.height,v=f.minZoom,m=f.maxZoom,y=tq(u,h,p,v,m,(d=c==null?void 0:c.padding)!==null&&d!==void 0?d:.1),b=Be(y,3),x=b[0],w=b[1],S=b[2],E=li.translate(x,w).scale(S);n.transform(oi(i,c==null?void 0:c.duration),E)},project:function(u){var c=t.getState(),d=c.transform,f=c.snapToGrid,h=c.snapGrid;return Jj(u,d,f,h)},viewportInitialized:!0}:SK},[n,i]);return o};function HP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iq(){var e=CK(),t=Bt(),r=A.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=Array.from(p.values());return v.map(function(m){return Wi({},m)})},[]),n=A.useCallback(function(h){var p=t.getState(),v=p.nodeInternals;return v.get(h)},[]),i=A.useCallback(function(){var h=t.getState(),p=h.edges,v=p===void 0?[]:p;return v.map(function(m){return Wi({},m)})},[]),o=A.useCallback(function(h){var p=t.getState(),v=p.edges,m=v===void 0?[]:v;return m.find(function(y){return y.id===h})},[]),a=A.useCallback(function(h){var p=t.getState(),v=p.nodeInternals,m=p.setNodes,y=p.hasDefaultNodes,b=p.onNodesChange,x=Array.from(v.values()),w=typeof h=="function"?h(x):h;if(y)m(w);else if(b){var S=w.length===0?x.map(function(E){return{type:"remove",id:E.id}}):w.map(function(E){return{item:E,type:"reset"}});b(S)}},[]),u=A.useCallback(function(h){var p=t.getState(),v=p.edges,m=v===void 0?[]:v,y=p.setEdges,b=p.hasDefaultEdges,x=p.onEdgesChange,w=typeof h=="function"?h(m):h;if(b)y(w);else if(x){var S=w.length===0?m.map(function(E){return{type:"remove",id:E.id}}):w.map(function(E){return{item:E,type:"reset"}});x(S)}},[]),c=A.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),m=v.nodeInternals,y=v.setNodes,b=v.hasDefaultNodes,x=v.onNodesChange;if(b){var w=Array.from(m.values()),S=[].concat(w,fi(p));y(S)}else if(x){var E=p.map(function(_){return{item:_,type:"add"}});x(E)}},[]),d=A.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),m=v.edges,y=m===void 0?[]:m,b=v.setEdges,x=v.hasDefaultEdges,w=v.onEdgesChange;if(x)b([].concat(fi(y),fi(p)));else if(w){var S=p.map(function(E){return{item:E,type:"add"}});w(S)}},[]),f=A.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=h.edges,m=v===void 0?[]:v,y=h.transform,b=Array.from(p.values()),x=Be(y,3),w=x[0],S=x[1],E=x[2];return{nodes:b.map(function(_){return Wi({},_)}),edges:m.map(function(_){return Wi({},_)}),viewport:{x:w,y:S,zoom:E}}},[]);return A.useMemo(function(){return Wi(Wi({},e),{},{getNodes:r,getNode:n,getEdges:i,getEdge:o,setNodes:a,setEdges:u,addNodes:c,addEdges:d,toObject:f})},[e,r,n,i,o,a,u,c,d,f])}function RK(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function $c(e,t){if(e==null)return{};var r=RK(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},A.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function IK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},A.createElement("path",{d:"M0 0h32v4.2H0z"}))}function NK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},A.createElement("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 TK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},A.createElement("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 AK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},A.createElement("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"}))}var MK=["children","className"];function UP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function DK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var pu=function(t){var r=t.children,n=t.className,i=$c(t,MK);return A.createElement("button",DK({type:"button",className:ur(["react-flow__controls-button",n])},i),r)},jK=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},qK=function(t){var r=t.style,n=t.showZoom,i=n===void 0?!0:n,o=t.showFitView,a=o===void 0?!0:o,u=t.showInteractive,c=u===void 0?!0:u,d=t.fitViewOptions,f=t.onZoomIn,h=t.onZoomOut,p=t.onFitView,v=t.onInteractiveChange,m=t.className,y=t.children,b=Bt(),x=A.useState(!1),w=Be(x,2),S=w[0],E=w[1],_=gt(jK),R=iq(),P=R.zoomIn,N=R.zoomOut,j=R.fitView;if(A.useEffect(function(){E(!0)},[]),!S)return null;var L=function(){P==null||P(),f==null||f()},F=function(){N==null||N(),h==null||h()},k=function(){j==null||j(d),p==null||p()},D=function(){b.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),v==null||v(!_)};return A.createElement("div",{className:ur(["react-flow__controls",m]),style:r},i&&A.createElement(A.Fragment,null,A.createElement(pu,{onClick:L,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},A.createElement(PK,null)),A.createElement(pu,{onClick:F,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},A.createElement(IK,null))),a&&A.createElement(pu,{className:"react-flow__controls-fitview",onClick:k,title:"fit view","aria-label":"fit view"},A.createElement(NK,null)),c&&A.createElement(pu,{className:"react-flow__controls-interactive",onClick:D,title:"toggle interactivity","aria-label":"toggle interactivity"},_?A.createElement(AK,null):A.createElement(TK,null)),y)};qK.displayName="Controls";var kK=function(t,r,n){return A.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},LK=function(t,r){return A.createElement("circle",{cx:t,cy:t,r:t,fill:r})},vu;function VP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function WP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var BK=(vu={},ze(vu,gi.Dots,"#81818a"),ze(vu,gi.Lines,"#eee"),vu),FK=function(t){return t.transform},oq=function(t){var r=t.variant,n=r===void 0?gi.Dots:r,i=t.gap,o=i===void 0?15:i,a=t.size,u=a===void 0?.4:a,c=t.color,d=t.style,f=t.className,h=A.useRef(null),p=A.useState(null),v=Be(p,2),m=v[0],y=v[1],b=gt(FK),x=Be(b,3),w=x[0],S=x[1],E=x[2];A.useEffect(function(){var F=document.querySelectorAll(".react-flow__background"),k=Array.from(F).findIndex(function(D){return D===h.current});y("pattern-".concat(k))},[]);var _=o*E||1,R=w%_,P=S%_,N=n===gi.Lines,j=c||BK[n],L=N?kK(_,u,j):LK(u*E,j);return A.createElement("svg",{className:ur(["react-flow__background","react-flow__container",f]),style:WP(WP({},d),{},{width:"100%",height:"100%"}),ref:h},m&&A.createElement(A.Fragment,null,A.createElement("pattern",{id:m,x:R,y:P,width:_,height:_,patternUnits:"userSpaceOnUse"},L),A.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(m,")")})))};oq.displayName="Background";var $K=A.memo(oq),zK=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function HK(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&zK.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var i="".concat(n).split("-");return A.createElement("div",{className:ur(["react-flow__attribution"].concat(fi(i))),"data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev/pricing"},A.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var UK=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function GP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function VK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var WK=function(t){var r=t.x,n=t.y,i=t.label,o=t.labelStyle,a=o===void 0?{}:o,u=t.labelShowBg,c=u===void 0?!0:u,d=t.labelBgStyle,f=d===void 0?{}:d,h=t.labelBgPadding,p=h===void 0?[2,4]:h,v=t.labelBgBorderRadius,m=v===void 0?2:v,y=t.children,b=t.className,x=$c(t,UK),w=A.useRef(null),S=A.useState({x:0,y:0,width:0,height:0}),E=Be(S,2),_=E[0],R=E[1],P=ur(["react-flow__edge-textwrapper",b]);return A.useEffect(function(){if(w.current){var N=w.current.getBBox();R({x:N.x,y:N.y,width:N.width,height:N.height})}},[i]),typeof i>"u"||!i?null:A.createElement("g",VK({transform:"translate(".concat(r-_.width/2," ").concat(n-_.height/2,")"),className:P},x),c&&A.createElement("rect",{width:_.width+2*p[0],x:-p[0],y:-p[1],height:_.height+2*p[1],className:"react-flow__edge-textbg",style:f,rx:m,ry:m}),A.createElement("text",{className:"react-flow__edge-text",y:_.height/2,dy:"0.3em",ref:w,style:a},i),y)},GK=A.memo(WK),zc=(function(e){var t=e.path,r=e.centerX,n=e.centerY,i=e.label,o=e.labelStyle,a=e.labelShowBg,u=e.labelBgStyle,c=e.labelBgPadding,d=e.labelBgBorderRadius,f=e.style,h=e.markerEnd,p=e.markerStart,v=i?A.createElement(GK,{x:r,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d}):null;return A.createElement(A.Fragment,null,A.createElement("path",{style:f,d:t,className:"react-flow__edge-path",markerEnd:h,markerStart:p}),v)});function Ju(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a,u;switch(t){case xe.Left:case xe.Right:a=.5*(r+i),u=n;break;case xe.Top:case xe.Bottom:a=r,u=.5*(n+o);break}return[a,u]}function aq(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=Ju({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Be(d,2),h=f[0],p=f[1],v=Ju({pos:c,x1:o,y1:a,x2:t,y2:r}),m=Be(v,2),y=m[0],b=m[1];return"M".concat(t,",").concat(r," C").concat(h,",").concat(p," ").concat(y,",").concat(b," ").concat(o,",").concat(a)}function KK(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=Ju({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Be(d,2),h=f[0],p=f[1],v=Ju({pos:c,x1:o,y1:a,x2:t,y2:r}),m=Be(v,2),y=m[0],b=m[1],x=t*.125+h*.375+y*.375+o*.125,w=r*.125+p*.375+b*.375+a*.125,S=Math.abs(x-t),E=Math.abs(w-r);return[x,w,S,E]}var sq=A.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?xe.Bottom:o,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.label,f=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,m=e.labelBgBorderRadius,y=e.style,b=e.markerEnd,x=e.markerStart,w={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c},S=aq(w),E=KK(w),_=Be(E,2),R=_[0],P=_[1];return A.createElement(zc,{path:S,centerX:R,centerY:P,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:b,markerStart:x})});function KP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function YK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var YP=[xe.Left,xe.Right],uq=function(t){var r=t.sourceX,n=t.sourceY,i=t.targetX,o=t.targetY,a=t.sourcePosition,u=a===void 0?xe.Bottom:a,c=t.targetPosition,d=c===void 0?xe.Top:c,f=YP.includes(u),h=YP.includes(d),p=f&&!h||h&&!f;if(p){var v=f?Math.abs(i-r):0,m=r>i?r-v:r+v,y=f?0:Math.abs(o-n),b=n<o?n+y:n-y;return[m,b,v,y]}var x=Math.abs(i-r)/2,w=i<r?i+x:i-x,S=Math.abs(o-n)/2,E=o<n?o+S:o-S;return[w,E,x,S]};function ea(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,YK({},i))}}var pm=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},vm=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},gm=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},mm=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},ym=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},bm=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},xm=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},wm=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function Db(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.borderRadius,f=d===void 0?5:d,h=e.centerX,p=e.centerY,v=uq({sourceX:t,sourceY:r,targetX:o,targetY:a}),m=Be(v,4),y=m[0],b=m[1],x=m[2],w=m[3],S=Math.min(f,Math.abs(o-t)),E=Math.min(f,Math.abs(a-r)),_=Math.min(S,E,x,w),R=[xe.Left,xe.Right],P=typeof h<"u"?h:y,N=typeof p<"u"?p:b,j=null,L=null;return t<=o?(j=r<=a?pm(t,N,_):bm(t,N,_),L=r<=a?wm(o,N,_):mm(o,N,_)):(j=r<a?gm(t,N,_):xm(t,N,_),L=r<a?ym(o,N,_):vm(o,N,_)),R.includes(i)&&R.includes(c)?t<=o?(j=r<=a?wm(P,r,_):mm(P,r,_),L=r<=a?pm(P,a,_):bm(P,a,_)):(i===xe.Right&&c===xe.Left||i===xe.Left&&c===xe.Right||i===xe.Left&&c===xe.Left)&&(j=r<=a?ym(P,r,_):vm(P,r,_),L=r<=a?gm(P,a,_):xm(P,a,_)):R.includes(i)&&!R.includes(c)?(t<=o?j=r<=a?wm(o,r,_):mm(o,r,_):j=r<=a?ym(o,r,_):vm(o,r,_),L=""):!R.includes(i)&&R.includes(c)&&(t<=o?j=r<=a?pm(t,a,_):bm(t,a,_):j=r<=a?gm(t,a,_):xm(t,a,_),L=""),"M ".concat(t,",").concat(r).concat(j).concat(L,"L ").concat(o,",").concat(a)}var Ix=A.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,u=e.labelShowBg,c=e.labelBgStyle,d=e.labelBgPadding,f=e.labelBgBorderRadius,h=e.style,p=e.sourcePosition,v=p===void 0?xe.Bottom:p,m=e.targetPosition,y=m===void 0?xe.Top:m,b=e.markerEnd,x=e.markerStart,w=e.borderRadius,S=w===void 0?5:w,E=uq({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:v,targetPosition:y}),_=Be(E,2),R=_[0],P=_[1],N=Db({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:i,targetPosition:y,borderRadius:S});return A.createElement(zc,{path:N,centerX:R,centerY:P,label:o,labelStyle:a,labelShowBg:u,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:b,markerStart:x})});function XP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ZP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var cq=A.memo(function(e){return A.createElement(Ix,ZP(ZP({},e),{},{borderRadius:0}))}),lq=A.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,u=e.labelShowBg,c=e.labelBgStyle,d=e.labelBgPadding,f=e.labelBgBorderRadius,h=e.style,p=e.markerEnd,v=e.markerStart,m=Math.abs(i-r)/2,y=i<r?i+m:i-m,b=Math.abs(n-t)/2,x=n<t?n+b:n-b,w="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(i);return A.createElement(zc,{path:w,centerX:x,centerY:y,label:o,labelStyle:a,labelShowBg:u,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:v})});function gu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Qu(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a=e.c,u,c;switch(t){case xe.Left:u=r-gu(r-i,a),c=n;break;case xe.Right:u=r+gu(i-r,a),c=n;break;case xe.Top:u=r,c=n-gu(n-o,a);break;case xe.Bottom:u=r,c=n+gu(o-n,a);break}return[u,c]}function Hc(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.curvature,f=d===void 0?.25:d,h=Qu({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Be(h,2),v=p[0],m=p[1],y=Qu({pos:c,x1:o,y1:a,x2:t,y2:r,c:f}),b=Be(y,2),x=b[0],w=b[1];return"M".concat(t,",").concat(r," C").concat(v,",").concat(m," ").concat(x,",").concat(w," ").concat(o,",").concat(a)}function XK(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.curvature,f=d===void 0?.25:d,h=Qu({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Be(h,2),v=p[0],m=p[1],y=Qu({pos:c,x1:o,y1:a,x2:t,y2:r,c:f}),b=Be(y,2),x=b[0],w=b[1],S=t*.125+v*.375+x*.375+o*.125,E=r*.125+m*.375+w*.375+a*.125,_=Math.abs(S-t),R=Math.abs(E-r);return[S,E,_,R]}var jb=A.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?xe.Bottom:o,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.label,f=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,m=e.labelBgBorderRadius,y=e.style,b=e.markerEnd,x=e.markerStart,w=e.curvature,S={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c,curvature:w},E=Hc(S),_=XK(S),R=Be(_,2),P=R[0],N=R[1];return A.createElement(zc,{path:E,centerX:P,centerY:N,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:b,markerStart:x})}),Nx=A.createContext(null),ZK=Nx.Provider;Nx.Consumer;function qb(e,t,r,n,i,o,a){var u=a.elementFromPoint(e.clientX,e.clientY),c=(u==null?void 0:u.classList.contains("target"))||!1,d=(u==null?void 0:u.classList.contains("source"))||!1,f={elementBelow:u,isValid:!1,connection:{source:null,target:null,sourceHandle:null,targetHandle:null},isHoveringHandle:!1};if(u&&(c||d)){f.isHoveringHandle=!0;var h=u.getAttribute("data-nodeid"),p=u.getAttribute("data-handleid"),v=r?{source:h,sourceHandle:p,target:n,targetHandle:i}:{source:n,sourceHandle:i,target:h,targetHandle:p};f.connection=v;var m=t===go.Strict?r&&d||!r&&c:!0;m&&(f.isValid=o(v))}return f}function _m(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function fq(e){var t=e.event,r=e.handleId,n=e.nodeId,i=e.onConnect,o=e.isTarget,a=e.getState,u=e.setState,c=e.isValidConnection,d=e.elementEdgeUpdaterType,f=e.onEdgeUpdateEnd,h=t.target.closest(".react-flow"),p=Wj(t.target);if(!p)return;var v=p.elementFromPoint(t.clientX,t.clientY),m=v==null?void 0:v.classList.contains("target"),y=v==null?void 0:v.classList.contains("source");if(!h||!m&&!y&&!d)return;var b=a(),x=b.onConnectStart,w=b.connectionMode,S=d||(m?"target":"source"),E=h.getBoundingClientRect(),_;u({connectionPosition:{x:t.clientX-E.left,y:t.clientY-E.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:S}),x==null||x(t,{nodeId:n,handleId:r,handleType:S});function R(N){u({connectionPosition:{x:N.clientX-E.left,y:N.clientY-E.top}});var j=qb(N,w,o,n,r,c,p),L=j.connection,F=j.elementBelow,k=j.isValid,D=j.isHoveringHandle;if(!D)return _m(_);L.source!==L.target&&F&&(_m(_),_=F,F.classList.add("react-flow__handle-connecting"),F.classList.toggle("react-flow__handle-valid",k))}function P(N){var j=a(),L=j.onConnectStop,F=j.onConnectEnd,k=qb(N,w,o,n,r,c,p),D=k.connection,T=k.isValid;L==null||L(N),T&&(i==null||i(D)),F==null||F(N),d&&f&&f(N),_m(_),u({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),p.removeEventListener("mousemove",R),p.removeEventListener("mouseup",P)}p.addEventListener("mousemove",R),p.addEventListener("mouseup",P)}var JK=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];function JP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Em(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var QK=function(){return!0},eY=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},dq=A.forwardRef(function(e,t){var r=e.type,n=r===void 0?"source":r,i=e.position,o=i===void 0?xe.Top:i,a=e.isValidConnection,u=a===void 0?QK:a,c=e.isConnectable,d=c===void 0?!0:c,f=e.id,h=e.onConnect,p=e.children,v=e.className,m=e.onMouseDown,y=$c(e,JK),b=Bt(),x=A.useContext(Nx),w=gt(eY,Yt),S=w.connectionStartHandle,E=w.connectOnClick,_=f||null,R=n==="target",P=function(F){var k=b.getState(),D=k.defaultEdgeOptions,T=k.onConnect,B=k.hasDefaultEdges,$=Em(Em({},D),F);if(B){var W=b.getState(),Y=W.edges;b.setState({edges:gK($,Y)})}T==null||T($),h==null||h($)},N=function(F){F.button===0&&fq({event:F,handleId:_,nodeId:x,onConnect:P,isTarget:R,getState:b.getState,setState:b.setState,isValidConnection:u}),m==null||m(F)},j=function(F){var k=b.getState(),D=k.onClickConnectStart,T=k.onClickConnectStop,B=k.onClickConnectEnd,$=k.connectionMode;if(!S){D==null||D(F,{nodeId:x,handleId:_,handleType:n}),b.setState({connectionStartHandle:{nodeId:x,type:n,handleId:_}});return}var W=Wj(F.target),Y=qb(F,$,S.type==="target",S.nodeId,S.handleId||null,u,W),ee=Y.connection,H=Y.isValid;T==null||T(F),H&&P(ee),B==null||B(F),b.setState({connectionStartHandle:null})};return A.createElement("div",Em({"data-handleid":_,"data-nodeid":x,"data-handlepos":o,className:ur(["react-flow__handle","react-flow__handle-".concat(o),"nodrag",v,{source:!R,target:R,connectable:d,connecting:(S==null?void 0:S.nodeId)===x&&(S==null?void 0:S.handleId)===_&&(S==null?void 0:S.type)===n}]),onMouseDown:N,onClick:E?j:void 0,ref:t},y),p)});dq.displayName="Handle";var ec=A.memo(dq),hq=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?xe.Top:i,a=t.sourcePosition,u=a===void 0?xe.Bottom:a;return A.createElement(A.Fragment,null,A.createElement(ec,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,A.createElement(ec,{type:"source",position:u,isConnectable:n}))};hq.displayName="DefaultNode";var kb=A.memo(hq),pq=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?xe.Bottom:i;return A.createElement(A.Fragment,null,r==null?void 0:r.label,A.createElement(ec,{type:"source",position:o,isConnectable:n}))};pq.displayName="InputNode";var vq=A.memo(pq),gq=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?xe.Top:i;return A.createElement(A.Fragment,null,A.createElement(ec,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};gq.displayName="OutputNode";var mq=A.memo(gq),tY=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},rY=function(t,r){var n=t.selectedNodes.map(function(u){return u.id}),i=r.selectedNodes.map(function(u){return u.id}),o=t.selectedEdges.map(function(u){return u.id}),a=r.selectedEdges.map(function(u){return u.id});return Yt(n,i)&&Yt(o,a)};function nY(e){var t=e.onSelectionChange,r=gt(tY,rY),n=r.selectedNodes,i=r.selectedEdges;return A.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var iY=A.memo(nY),oY=function(t){return{setNodes:t.setNodes,setEdges:t.setEdges,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset}};function jn(e,t){A.useEffect(function(){typeof e<"u"&&t(e)},[e])}function nt(e,t,r){A.useEffect(function(){typeof t<"u"&&r(ze({},e,t))},[t])}var aY=function(t){var r=t.nodes,n=t.edges,i=t.defaultNodes,o=t.defaultEdges,a=t.onConnect,u=t.onConnectStart,c=t.onConnectStop,d=t.onConnectEnd,f=t.onClickConnectStart,h=t.onClickConnectStop,p=t.onClickConnectEnd,v=t.nodesDraggable,m=t.nodesConnectable,y=t.minZoom,b=t.maxZoom,x=t.nodeExtent,w=t.onNodesChange,S=t.onEdgesChange,E=t.elementsSelectable,_=t.connectionMode,R=t.snapGrid,P=t.snapToGrid,N=t.translateExtent,j=t.connectOnClick,L=t.defaultEdgeOptions,F=t.fitView,k=t.fitViewOptions,D=t.onNodesDelete,T=t.onEdgesDelete,B=t.onNodeDrag,$=t.onNodeDragStart,W=t.onNodeDragStop,Y=t.onSelectionDrag,ee=t.onSelectionDragStart,H=t.onSelectionDragStop,Q=gt(oY,Yt),ce=Q.setNodes,se=Q.setEdges,z=Q.setDefaultNodesAndEdges,G=Q.setMinZoom,J=Q.setMaxZoom,V=Q.setTranslateExtent,K=Q.setNodeExtent,ie=Q.reset,ne=Bt();return A.useEffect(function(){return z(i,o),function(){ie()}},[]),nt("defaultEdgeOptions",L,ne.setState),nt("connectionMode",_,ne.setState),nt("onConnect",a,ne.setState),nt("onConnectStart",u,ne.setState),nt("onConnectStop",c,ne.setState),nt("onConnectEnd",d,ne.setState),nt("onClickConnectStart",f,ne.setState),nt("onClickConnectStop",h,ne.setState),nt("onClickConnectEnd",p,ne.setState),nt("nodesDraggable",v,ne.setState),nt("nodesConnectable",m,ne.setState),nt("elementsSelectable",E,ne.setState),nt("snapToGrid",P,ne.setState),nt("snapGrid",R,ne.setState),nt("onNodesChange",w,ne.setState),nt("onEdgesChange",S,ne.setState),nt("connectOnClick",j,ne.setState),nt("fitViewOnInit",F,ne.setState),nt("fitViewOnInitOptions",k,ne.setState),nt("onNodesDelete",D,ne.setState),nt("onEdgesDelete",T,ne.setState),nt("onNodeDrag",B,ne.setState),nt("onNodeDragStart",$,ne.setState),nt("onNodeDragStop",W,ne.setState),nt("onSelectionDrag",Y,ne.setState),nt("onSelectionDragStart",ee,ne.setState),nt("onSelectionDragStop",H,ne.setState),jn(r,ce),jn(n,se),jn(i,ce),jn(o,se),jn(y,G),jn(b,J),jn(N,V),jn(x,K),null},sY=".react-flow{height:100%;overflow:hidden;position:relative;width:100%}.react-flow__container{height:100%;left:0;position:absolute;top:0;width:100%}.react-flow__pane{z-index:1}.react-flow__viewport{pointer-events:none;transform-origin:0 0;z-index:2}.react-flow__renderer{z-index:4}.react-flow__selectionpane{z-index:5}.react-flow .react-flow__edges{overflow:visible;pointer-events:none}.react-flow .react-flow__connectionline{z-index:1001}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.inactive{pointer-events:none}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edge-path{fill:none}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connection-path{fill:none}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{box-sizing:border-box;pointer-events:all;position:absolute;transform-origin:0 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__nodesselection{pointer-events:none;transform-origin:left top;z-index:3}.react-flow__nodesselection-rect{cursor:-webkit-grab;cursor:grab;pointer-events:all;position:absolute}.react-flow__handle{pointer-events:none;position:absolute}.react-flow__handle.connectable{pointer-events:all}.react-flow__handle-bottom{bottom:-4px;left:50%;top:auto;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{left:-4px;top:50%;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__controls{bottom:20px;left:15px;position:absolute;z-index:5}.react-flow__controls-button{border:none;height:24px;width:24px}.react-flow__controls-button svg{width:100%}.react-flow__minimap{bottom:20px;position:absolute;right:15px;z-index:5}.react-flow__attribution{background:hsla(0,0%,100%,.5);color:#999;font-size:10px;padding:2px 3px;position:absolute;z-index:1000}.react-flow__attribution a{color:#555;text-decoration:none}.react-flow__attribution.top{top:0}.react-flow__attribution.bottom{bottom:0}.react-flow__attribution.left{left:0}.react-flow__attribution.right{right:0}.react-flow__attribution.center{left:50%;transform:translateX(-50%)}",uY=sY,cY=".react-flow__edge.selected .react-flow__edge-path{stroke:#555}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-path{stroke:#b1b1b7;stroke-width:1}.react-flow__edge-text{font-size:10px}.react-flow__edge-textbg{fill:#fff}.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1}.react-flow__node{cursor:-webkit-grab;cursor:grab}.react-flow__node-default,.react-flow__node-group,.react-flow__node-input,.react-flow__node-output{background:#fff;border:1px solid #1a192b;border-radius:3px;color:#222;font-size:12px;padding:10px;text-align:center;width:150px}.react-flow__node-default.selected,.react-flow__node-group.selected,.react-flow__node-input.selected,.react-flow__node-output.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-default .react-flow__handle,.react-flow__node-group .react-flow__handle,.react-flow__node-input .react-flow__handle,.react-flow__node-output .react-flow__handle{background:#1a192b}.react-flow__node-default.selectable:hover,.react-flow__node-group.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px rgba(0,0,0,.08)}.react-flow__node-default.selectable.selected,.react-flow__node-group.selectable.selected,.react-flow__node-input.selectable.selected,.react-flow__node-output.selectable.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background:hsla(0,0%,94%,.25);border-color:#1a192b}.react-flow__nodesselection-rect,.react-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__handle{background:#555;border:1px solid #fff;border-radius:100%;height:6px;width:6px}.react-flow__handle.connectable{cursor:crosshair}.react-flow__minimap{background-color:#fff}.react-flow__controls{box-shadow:0 0 2px 1px rgba(0,0,0,.08)}.react-flow__controls-button{align-items:center;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;cursor:pointer;display:flex;height:16px;justify-content:center;padding:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:16px}.react-flow__controls-button svg{max-height:12px;max-width:12px}.react-flow__controls-button:hover{background:#f4f4f4}",lY=cY,fY=function(t,r,n){return n===xe.Left?t-r:n===xe.Right?t+r:t},dY=function(t,r,n){return n===xe.Top?t-r:n===xe.Bottom?t+r:t},QP=function(t){var r=t.className,n=t.position,i=t.centerX,o=t.centerY,a=t.radius,u=a===void 0?10:a;return A.createElement("circle",{className:ur(["react-flow__edgeupdater",r]),cx:fY(i,u,n),cy:dY(o,u,n),r:u,stroke:"transparent",fill:"transparent"})},Gi=(function(e){var t=function(n){var i=n.id,o=n.className,a=n.type,u=n.data,c=n.onClick,d=n.onEdgeDoubleClick,f=n.selected,h=n.animated,p=n.label,v=n.labelStyle,m=n.labelShowBg,y=n.labelBgStyle,b=n.labelBgPadding,x=n.labelBgBorderRadius,w=n.style,S=n.source,E=n.target,_=n.sourceX,R=n.sourceY,P=n.targetX,N=n.targetY,j=n.sourcePosition,L=n.targetPosition,F=n.elementsSelectable,k=n.hidden,D=n.sourceHandleId,T=n.targetHandleId,B=n.onContextMenu,$=n.onMouseEnter,W=n.onMouseMove,Y=n.onMouseLeave,ee=n.edgeUpdaterRadius,H=n.onEdgeUpdate,Q=n.onEdgeUpdateStart,ce=n.onEdgeUpdateEnd,se=n.markerEnd,z=n.markerStart,G=n.rfId,J=A.useState(!1),V=Be(J,2),K=V[0],ie=V[1],ne=Bt(),ue=function(tt){var Ct=ne.getState(),Zt=Ct.edges,cr=Ct.addSelectedEdges,Dt=Zt.find(function(xt){return xt.id===i});F&&(ne.setState({nodesSelectionActive:!1}),cr([i])),c==null||c(tt,Dt)},de=ea(i,ne.getState,d),we=ea(i,ne.getState,B),Se=ea(i,ne.getState,$),_e=ea(i,ne.getState,W),he=ea(i,ne.getState,Y),ae=function(tt,Ct){var Zt=Ct?E:S,cr=(Ct?T:D)||null,Dt=Ct?"target":"source",xt=function(){return!0},jt=Ct,zr=ne.getState().edges.find(function(Hr){return Hr.id===i});Q==null||Q(tt,zr,Dt);var Kn=ce?function(Hr){return ce(Hr,zr,Dt)}:void 0,On=function(Pi){return H==null?void 0:H(zr,Pi)};fq({event:tt,handleId:cr,nodeId:Zt,onConnect:On,isTarget:jt,getState:ne.getState,setState:ne.setState,isValidConnection:xt,elementEdgeUpdaterType:Dt,onEdgeUpdateEnd:Kn})},Oe=function(tt){return ae(tt,!0)},Ne=function(tt){return ae(tt,!1)},He=function(){return ie(!0)},qe=function(){return ie(!1)},Xe=A.useMemo(function(){return"url(#".concat(Ab(z,G),")")},[z,G]),We=A.useMemo(function(){return"url(#".concat(Ab(se,G),")")},[se,G]);if(k)return null;var mt=!F&&!c,et=typeof H<"u",Tt=ur(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:f,animated:h,inactive:mt,updating:K}]);return A.createElement("g",{className:Tt,onClick:ue,onDoubleClick:de,onContextMenu:we,onMouseEnter:Se,onMouseMove:_e,onMouseLeave:he},A.createElement(e,{id:i,source:S,target:E,selected:f,animated:h,label:p,labelStyle:v,labelShowBg:m,labelBgStyle:y,labelBgPadding:b,labelBgBorderRadius:x,data:u,style:w,sourceX:_,sourceY:R,targetX:P,targetY:N,sourcePosition:j,targetPosition:L,sourceHandleId:D,targetHandleId:T,markerStart:Xe,markerEnd:We,"data-testid":"rf__edge-".concat(i)}),et&&A.createElement("g",{onMouseDown:Oe,onMouseEnter:He,onMouseOut:qe},A.createElement(QP,{position:j,centerX:_,centerY:R,radius:ee})),et&&A.createElement("g",{onMouseDown:Ne,onMouseEnter:He,onMouseOut:qe},A.createElement(QP,{position:L,centerX:P,centerY:N,radius:ee})))};return t.displayName="EdgeWrapper",A.memo(t)});function eI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hY(e){var t={default:Gi(e.default||jb),straight:Gi(e.bezier||lq),step:Gi(e.step||cq),smoothstep:Gi(e.step||Ix),simplebezier:Gi(e.simplebezier||sq)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=Gi(e[o]||jb),i},r);return tI(tI({},t),n)}function rI(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=((r==null?void 0:r.x)||0)+t.x,i=((r==null?void 0:r.y)||0)+t.y,o=(r==null?void 0:r.width)||t.width,a=(r==null?void 0:r.height)||t.height;switch(e){case xe.Top:return{x:n+o/2,y:i};case xe.Right:return{x:n+o,y:i+a/2};case xe.Bottom:return{x:n+o/2,y:i+a};case xe.Left:return{x:n,y:i+a/2}}}function nI(e,t){if(!e)return null;var r=null;return e.length===1||!t?r=e[0]:t&&(r=e.find(function(n){return n.id===t})),typeof r>"u"?null:r}var pY=function(t,r,n,i,o,a){var u=rI(n,t,r),c=rI(a,i,o);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y}};function vY(e){var t=e.sourcePos,r=e.targetPos,n=e.sourceWidth,i=e.sourceHeight,o=e.targetWidth,a=e.targetHeight,u=e.width,c=e.height,d=e.transform,f={x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x+n,r.x+o),y2:Math.max(t.y+i,r.y+a)};f.x===f.x2&&(f.x2+=1),f.y===f.y2&&(f.y2+=1);var h=Zu({x:(0-d[0])/d[2],y:(0-d[1])/d[2],width:u/d[2],height:c/d[2]}),p=Math.max(0,Math.min(h.x2,f.x2)-Math.max(h.x,f.x)),v=Math.max(0,Math.min(h.y2,f.y2)-Math.max(h.y,f.y)),m=Math.ceil(p*v);return m>0}function iI(e,t){var r,n,i,o,a,u=e.get(t),c=(u==null||(r=u[It])===null||r===void 0?void 0:r.handleBounds)||null,d=!u||!c||!u.width||!u.height||typeof((n=u.positionAbsolute)===null||n===void 0?void 0:n.x)>"u"||typeof((i=u.positionAbsolute)===null||i===void 0?void 0:i.y)>"u";return[{x:(u==null||(o=u.positionAbsolute)===null||o===void 0?void 0:o.x)||0,y:(u==null||(a=u.positionAbsolute)===null||a===void 0?void 0:a.y)||0,width:(u==null?void 0:u.width)||0,height:(u==null?void 0:u.height)||0},c,!d]}var gY=typeof document<"u"?document:null,tc=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:gY},r=A.useState(!1),n=Be(r,2),i=n[0],o=n[1],a=A.useRef(new Set([])),u=A.useMemo(function(){if(e!==null){var h=Array.isArray(e)?e:[e],p=h.filter(function(m){return typeof m=="string"}).map(function(m){return m.split("+")}),v=p.reduce(function(m,y){return m.concat.apply(m,fi(y))},[]);return[p,v]}return[[],[]]},[e]),c=Be(u,2),d=c[0],f=c[1];return A.useEffect(function(){if(e!==null){var h,p,v=function(x){if(sI(x))return!1;var w=aI(x.code,f);a.current.add(x[w]),oI(d,a.current,!1)&&(x.preventDefault(),o(!0))},m=function(x){if(sI(x))return!1;var w=aI(x.code,f);oI(d,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(x[w])},y=function(){a.current.clear(),o(!1)};return t==null||(h=t.target)===null||h===void 0||h.addEventListener("keydown",v),t==null||(p=t.target)===null||p===void 0||p.addEventListener("keyup",m),window.addEventListener("blur",y),function(){var b,x;t==null||(b=t.target)===null||b===void 0||b.removeEventListener("keydown",v),t==null||(x=t.target)===null||x===void 0||x.removeEventListener("keyup",m),window.removeEventListener("blur",y)}}},[e,o]),i});function oI(e,t,r){return e.filter(function(n){return r||n.length===t.size}).some(function(n){return n.every(function(i){return t.has(i)})})}function aI(e,t){return t.includes(e)?"code":"key"}function sI(e){var t,r=((t=e.composedPath)===null||t===void 0?void 0:t.call(e)[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(r==null?void 0:r.nodeName)||(r==null?void 0:r.hasAttribute("contenteditable"))}var mY=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},yY=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Bt(),i=gt(mY,Yt),o=i.onNodesChange,a=i.onEdgesChange,u=tc(t),c=tc(r);A.useEffect(function(){var d=n.getState(),f=d.nodeInternals,h=d.edges,p=d.hasDefaultNodes,v=d.hasDefaultEdges,m=d.onNodesDelete,y=d.onEdgesDelete,b=Array.from(f.values()),x=b.reduce(function(N,j){return(!j.selected&&j.parentNode&&N.find(function(L){return L.id===j.parentNode})||j.selected)&&N.push(j),N},[]),w=h.filter(function(N){return N.selected});if(u&&(x||w)){var S=eq(x,h),E=[].concat(fi(w),fi(S)),_=E.reduce(function(N,j){return N.includes(j.id)||N.push(j.id),N},[]);if((v||p)&&(v&&n.setState({edges:h.filter(function(N){return!_.includes(N.id)})}),p&&(x.forEach(function(N){f.delete(N.id)}),n.setState({nodeInternals:new Map(f)}))),_.length>0&&(y==null||y(E),a)){var R=_.map(function(N){return{id:N,type:"remove"}});a(R)}if(x.length>0&&(m==null||m(x),o)){var P=x.map(function(N){return{id:N.id,type:"remove"}});o(P)}n.setState({nodesSelectionActive:!1})}},[u,o,a]),A.useEffect(function(){n.setState({multiSelectionActive:c})},[c])});function bY(e){var t=Bt();A.useEffect(function(){var r,n=function(){if(e.current){var o=Cx(e.current);process.env.NODE_ENV==="development"&&(o.height===0||o.width===0)&&console.warn("[React Flow]: The React Flow parent container needs a width and a height to render the graph. Help: https://reactflow.dev/error#400"),t.setState({width:o.width||500,height:o.height||500})}};return n(),window.onresize=n,e.current&&(r=new ResizeObserver(function(){return n()}),r.observe(e.current)),function(){window.onresize=null,r&&e.current&&r.unobserve(e.current)}},[])}var xY=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},Sm=function(t){return{x:t.x,y:t.y,zoom:t.k}},mu=function(t,r){return t.target.closest(".".concat(r))},wY=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},_Y=function(t){var r=t.onMove,n=t.onMoveStart,i=t.onMoveEnd,o=t.zoomOnScroll,a=o===void 0?!0:o,u=t.zoomOnPinch,c=u===void 0?!0:u,d=t.panOnScroll,f=d===void 0?!1:d,h=t.panOnScrollSpeed,p=h===void 0?.5:h,v=t.panOnScrollMode,m=v===void 0?no.Free:v,y=t.zoomOnDoubleClick,b=y===void 0?!0:y,x=t.selectionKeyPressed,w=t.elementsSelectable,S=t.panOnDrag,E=S===void 0?!0:S,_=t.translateExtent,R=t.minZoom,P=t.maxZoom,N=t.defaultZoom,j=N===void 0?1:N,L=t.defaultPosition,F=L===void 0?[0,0]:L,k=t.zoomActivationKeyCode,D=t.preventScrolling,T=D===void 0?!0:D,B=t.children,$=t.noWheelClassName,W=t.noPanClassName,Y=Bt(),ee=A.useRef(!1),H=A.useRef(null),Q=A.useRef({x:0,y:0,zoom:0}),ce=gt(wY,Yt),se=ce.d3Zoom,z=ce.d3Selection,G=ce.d3ZoomHandler,J=tc(k);return bY(H),A.useEffect(function(){if(H.current){var V,K=aK().scaleExtent([R,P]).translateExtent(_),ie=Ar(H.current).call(K),ne=io(F[0],_[0][0],_[1][0]),ue=io(F[1],_[0][1],_[1][1]),de=io(j,R,P),we=li.translate(ne,ue).scale(de);K.transform(ie,we),Y.setState({d3Zoom:K,d3Selection:ie,d3ZoomHandler:ie.on("wheel.zoom"),transform:[ne,ue,de],domNode:(V=ie.node())===null||V===void 0?void 0:V.closest(".react-flow")})}},[]),A.useEffect(function(){z&&se&&(f&&!J?z.on("wheel",function(V){if(mu(V,$))return!1;V.preventDefault(),V.stopImmediatePropagation();var K=z.property("__zoom").k||1;if(V.ctrlKey&&c){var ie=Yr(V),ne=-V.deltaY*(V.deltaMode===1?.05:V.deltaMode?1:.002)*10,ue=K*Math.pow(2,ne);se.scaleTo(z,ue,ie);return}var de=V.deltaMode===1?20:1,we=m===no.Vertical?0:V.deltaX*de,Se=m===no.Horizontal?0:V.deltaY*de;se.translateBy(z,-(we/K)*p,-(Se/K)*p)}).on("wheel.zoom",null):typeof G<"u"&&z.on("wheel",function(V){if(!T||mu(V,$))return null;V.preventDefault()}).on("wheel.zoom",G))},[f,m,z,se,G,J,c,T,$]),A.useEffect(function(){se&&(x&&!ee.current?se.on("zoom",null):x||se.on("zoom",function(V){if(Y.setState({transform:[V.transform.x,V.transform.y,V.transform.k]}),r){var K=Sm(V.transform);r(V.sourceEvent,K)}}))},[x,se,r]),A.useEffect(function(){se&&se.on("start",function(V){if(ee.current=!0,n){var K=Sm(V.transform);Q.current=K,n(V.sourceEvent,K)}})},[se,n]),A.useEffect(function(){se&&se.on("end",function(V){if(ee.current=!1,i&&xY(Q.current,V.transform)){var K=Sm(V.transform);Q.current=K,i(V.sourceEvent,K)}})},[se,i]),A.useEffect(function(){se&&se.filter(function(V){var K=J||a,ie=c&&V.ctrlKey;return!E&&!K&&!f&&!b&&!c||x||!b&&V.type==="dblclick"||mu(V,$)&&V.type==="wheel"||mu(V,W)&&V.type!=="wheel"||!c&&V.ctrlKey&&V.type==="wheel"||!K&&!f&&!ie&&V.type==="wheel"||!E&&(V.type==="mousedown"||V.type==="touchstart")?!1:(!V.ctrlKey||V.type==="wheel")&&!V.button})},[se,a,c,f,b,E,x,w,J]),A.createElement("div",{className:"react-flow__renderer react-flow__container",ref:H},B)};function uI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lI(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var EY=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},fI={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},SY=A.memo(function(e){var t=e.selectionKeyPressed,r=Bt(),n=A.useRef(0),i=A.useRef(0),o=A.useRef(),a=A.useState(fI),u=Be(a,2),c=u[0],d=u[1],f=gt(EY,Yt),h=f.userSelectionActive,p=f.elementsSelectable,v=h||t;if(!p||!v)return null;var m=function(){d(fI),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},y=function(E){var _=E.target.closest(".react-flow");o.current=_.getBoundingClientRect();var R=lI(E,o.current);d({width:0,height:0,startX:R.x,startY:R.y,x:R.x,y:R.y,draw:!0}),r.setState({userSelectionActive:!0,nodesSelectionActive:!1})},b=function(E){var _,R;if(!(!t||!c.draw||!o.current)){var P=lI(E,o.current),N=(_=c.startX)!==null&&_!==void 0?_:0,j=(R=c.startY)!==null&&R!==void 0?R:0,L=cI(cI({},c),{},{x:P.x<N?P.x:N,y:P.y<j?P.y:j,width:Math.abs(P.x-N),height:Math.abs(P.y-j)}),F=r.getState(),k=F.nodeInternals,D=F.edges,T=F.transform,B=F.onNodesChange,$=F.onEdgesChange,W=Array.from(k.values()),Y=Qj(k,L,T,!1,!0),ee=eq(Y,D).map(function(se){return se.id}),H=Y.map(function(se){return se.id});if(n.current!==H.length){n.current=H.length;var Q=Ji(W,H);Q.length&&(B==null||B(Q))}if(i.current!==ee.length){i.current=ee.length;var ce=Ji(D,ee);ce.length&&($==null||$(ce))}d(L)}},x=function(){r.setState({nodesSelectionActive:n.current>0}),m()},w=function(){r.setState({nodesSelectionActive:!1}),m()};return A.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:y,onMouseMove:b,onMouseUp:x,onMouseLeave:w},c.draw&&A.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:c.width,height:c.height,transform:"translate(".concat(c.x,"px, ").concat(c.y,"px)")}}))});function dI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yq(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:yq(r,t):!1}function pI(e,t,r){var n=e;do{var i;if((i=n)!==null&&i!==void 0&&i.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function OY(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!yq(n,e))}).map(function(n){var i,o,a,u;return{id:n.id,position:n.position||{x:0,y:0},positionAbsolute:n.positionAbsolute||{x:0,y:0},distance:{x:t.x-((i=(o=n.positionAbsolute)===null||o===void 0?void 0:o.x)!==null&&i!==void 0?i:0),y:t.y-((a=(u=n.positionAbsolute)===null||u===void 0?void 0:u.y)!==null&&a!==void 0?a:0)},delta:{x:0,y:0},extent:n.extent,parentNode:n.parentNode,width:n.width,height:n.height}})}function CY(e,t,r,n,i,o){var a=Be(n,2),u=a[0],c=a[1],d=e.extent||o,f={x:t.x-e.distance.x,y:t.y-e.distance.y};if(r&&(f.x=u*Math.round(f.x/u),f.y=c*Math.round(f.y/c)),e.extent==="parent")if(e.parentNode&&e.width&&e.height){var h=i.get(e.parentNode);d=h!=null&&h.positionAbsolute&&h!==null&&h!==void 0&&h.width&&h!==null&&h!==void 0&&h.height?[[h.positionAbsolute.x,h.positionAbsolute.y],[h.positionAbsolute.x+h.width-e.width,h.positionAbsolute.y+h.height-e.height]]:d}else process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Only child nodes can use a parent extent. Help: https://reactflow.dev/error#500"),d=o;else if(e.extent&&e.parentNode){var p,v,m,y,b=i.get(e.parentNode),x=(p=b==null||(v=b.positionAbsolute)===null||v===void 0?void 0:v.x)!==null&&p!==void 0?p:0,w=(m=b==null||(y=b.positionAbsolute)===null||y===void 0?void 0:y.y)!==null&&m!==void 0?m:0;d=[[e.extent[0][0]+x,e.extent[0][1]+w],[e.extent[1][0]+x,e.extent[1][1]+w]]}var S={x:0,y:0};if(e.parentNode){var E,_,R,P,N=i.get(e.parentNode);S={x:(E=N==null||(_=N.positionAbsolute)===null||_===void 0?void 0:_.x)!==null&&E!==void 0?E:0,y:(R=N==null||(P=N.positionAbsolute)===null||P===void 0?void 0:P.y)!==null&&R!==void 0?R:0}}return e.positionAbsolute=d?Vj(f,d):f,e.position={x:e.positionAbsolute.x-S.x,y:e.positionAbsolute.y-S.y},e}function Om(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return hI(hI({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function Cm(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function bq(e){var t=e.nodeRef,r=e.disabled,n=r===void 0?!1:r,i=e.noDragClassName,o=e.handleSelector,a=e.nodeId,u=e.isSelectable,c=e.selectNodesOnDrag,d=A.useState(!1),f=Be(d,2),h=f[0],p=f[1],v=Bt(),m=A.useRef(),y=A.useRef({x:null,y:null}),b=A.useCallback(function(x){var w=x.sourceEvent,S=v.getState(),E=S.transform,_=S.snapGrid,R=S.snapToGrid,P=w.touches?w.touches[0].clientX:w.clientX,N=w.touches?w.touches[0].clientY:w.clientY,j=Jj({x:P,y:N},E,R,_);return j},[]);return A.useEffect(function(){if(t!=null&&t.current){var x=Ar(t.current);if(n)x.on(".drag",null);else{var w=g8().on("start",function(S){var E=v.getState(),_=E.nodeInternals,R=E.multiSelectionActive,P=E.unselectNodesAndEdges,N=E.onNodeDragStart,j=E.onSelectionDragStart,L=a?N:Cm(j);if(!c&&!R&&a){var F;(F=_.get(a))!==null&&F!==void 0&&F.selected||P()}a&&u&&c&&Zj({id:a,store:v});var k=b(S);if(y.current=k,m.current=OY(_,k,a),L&&m.current){var D=Om({nodeId:a,dragItems:m.current,nodeInternals:_}),T=Be(D,2),B=T[0],$=T[1];L(S.sourceEvent,B,$)}}).on("drag",function(S){var E=v.getState(),_=E.updateNodePositions,R=E.snapToGrid,P=E.snapGrid,N=E.nodeInternals,j=E.nodeExtent,L=E.onNodeDrag,F=E.onSelectionDrag,k=b(S);if((y.current.x!==k.x||y.current.y!==k.y)&&m.current){y.current=k,m.current=m.current.map(function(Y){return CY(Y,k,R,P,N,j)});var D=a?L:Cm(F);if(_(m.current,!0,!0),p(!0),D){var T=Om({nodeId:a,dragItems:m.current,nodeInternals:N}),B=Be(T,2),$=B[0],W=B[1];D(S.sourceEvent,$,W)}}S.on("end",function(Y){if(p(!1),m.current){var ee=v.getState(),H=ee.updateNodePositions,Q=ee.nodeInternals,ce=ee.onNodeDragStop,se=ee.onSelectionDragStop,z=a?ce:Cm(se);if(H(m.current,!1,!1),z){var G=Om({nodeId:a,dragItems:m.current,nodeInternals:Q}),J=Be(G,2),V=J[0],K=J[1];z(Y.sourceEvent,V,K)}}})}).filter(function(S){var E=S.target,_=!S.button&&(!i||!pI(E,".".concat(i),t))&&(!o||pI(E,o,t));return _});return x.call(w),function(){x.on(".drag",null)}}}},[t,n,i,o,u,v,a,c,b]),h}function vI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function RY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var PY=function(t){return RY({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},Rx(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},IY=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return Rx(r)};function NY(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Bt(),i=gt(PY,Yt),o=i.transformString,a=i.userSelectionActive,u=gt(IY,Yt),c=u.width,d=u.height,f=u.x,h=u.y,p=A.useRef(null);if(bq({nodeRef:p}),a||!c||!d)return null;var v=t?function(m){var y=Array.from(n.getState().nodeInternals.values()).filter(function(b){return b.selected});t(m,y)}:void 0;return A.createElement("div",{className:ur(["react-flow__nodesselection","react-flow__container",r]),style:{transform:o}},A.createElement("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:v,style:{width:c,height:d,top:h,left:f}}))}var TY=A.memo(NY),AY=function(t){return t.nodesSelectionActive},xq=function(t){var r=t.children,n=t.onPaneClick,i=t.onPaneContextMenu,o=t.onPaneScroll,a=t.deleteKeyCode,u=t.onMove,c=t.onMoveStart,d=t.onMoveEnd,f=t.selectionKeyCode,h=t.multiSelectionKeyCode,p=t.zoomActivationKeyCode,v=t.elementsSelectable,m=t.zoomOnScroll,y=t.zoomOnPinch,b=t.panOnScroll,x=t.panOnScrollSpeed,w=t.panOnScrollMode,S=t.zoomOnDoubleClick,E=t.panOnDrag,_=t.translateExtent,R=t.minZoom,P=t.maxZoom,N=t.defaultZoom,j=t.defaultPosition,L=t.preventScrolling,F=t.onSelectionContextMenu,k=t.noWheelClassName,D=t.noPanClassName,T=Bt(),B=gt(AY),$=tc(f);yY({deleteKeyCode:a,multiSelectionKeyCode:h});var W=function(Q){n==null||n(Q),T.getState().resetSelectedElements(),T.setState({nodesSelectionActive:!1})},Y=i?function(H){return i(H)}:void 0,ee=o?function(H){return o(H)}:void 0;return A.createElement(_Y,{onMove:u,onMoveStart:c,onMoveEnd:d,selectionKeyPressed:$,elementsSelectable:v,zoomOnScroll:m,zoomOnPinch:y,panOnScroll:b,panOnScrollSpeed:x,panOnScrollMode:w,zoomOnDoubleClick:S,panOnDrag:E,translateExtent:_,minZoom:R,maxZoom:P,defaultZoom:N,defaultPosition:j,zoomActivationKeyCode:p,preventScrolling:L,noWheelClassName:k,noPanClassName:D},r,A.createElement(SY,{selectionKeyPressed:$}),B&&A.createElement(TY,{onSelectionContextMenu:F,noPanClassName:D}),A.createElement("div",{className:"react-flow__pane react-flow__container",onClick:W,onContextMenu:Y,onWheel:ee}))};xq.displayName="FlowRenderer";var MY=A.memo(xq);function DY(e){var t=gt(A.useCallback(function(r){return e?Qj(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var jY=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},wq=function(t){var r=gt(jY,Yt),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,u=DY(t.onlyRenderVisibleElements),c=A.useRef(),d=A.useMemo(function(){if(typeof ResizeObserver>"u")return null;var f=new ResizeObserver(function(h){var p=h.map(function(v){return{id:v.target.getAttribute("data-id"),nodeElement:v.target,forceUpdate:!0}});a(p)});return c.current=f,f},[]);return A.useEffect(function(){return function(){var f;c==null||(f=c.current)===null||f===void 0||f.disconnect()}},[]),A.createElement("div",{className:"react-flow__nodes react-flow__container"},u.map(function(f){var h,p,v,m,y,b,x,w=f.type||"default";t.nodeTypes[w]||(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Node type "'.concat(w,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),w="default");var S=t.nodeTypes[w]||t.nodeTypes.default,E=!!(f.draggable||n&&typeof f.draggable>"u"),_=!!(f.selectable||o&&typeof f.selectable>"u"),R=!!(f.connectable||i&&typeof f.connectable>"u");return A.createElement(S,{key:f.id,id:f.id,className:f.className,style:f.style,type:w,data:f.data,sourcePosition:f.sourcePosition||xe.Bottom,targetPosition:f.targetPosition||xe.Top,hidden:f.hidden,xPos:(h=(p=f.positionAbsolute)===null||p===void 0?void 0:p.x)!==null&&h!==void 0?h:0,yPos:(v=(m=f.positionAbsolute)===null||m===void 0?void 0:m.y)!==null&&v!==void 0?v:0,selectNodesOnDrag:t.selectNodesOnDrag,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,selected:!!f.selected,isDraggable:E,isSelectable:_,isConnectable:R,resizeObserver:d,dragHandle:f.dragHandle,zIndex:(y=(b=f[It])===null||b===void 0?void 0:b.z)!==null&&y!==void 0?y:0,isParent:!!((x=f[It])!==null&&x!==void 0&&x.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!f.width&&!!f.height})}))};wq.displayName="NodeRenderer";var qY=A.memo(wq),Ki;function gI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var kY=(Ki={},ze(Ki,xe.Left,xe.Right),ze(Ki,xe.Right,xe.Left),ze(Ki,xe.Top,xe.Bottom),ze(Ki,xe.Bottom,xe.Top),Ki),LY=(function(e){var t,r,n,i,o,a=e.connectionNodeId,u=e.connectionHandleType,c=e.connectionLineStyle,d=e.connectionLineType,f=d===void 0?Fn.Bezier:d,h=e.isConnectable,p=e.CustomConnectionLineComponent,v=gt(A.useCallback(function(ee){return{fromNode:ee.nodeInternals.get(a),handleId:ee.connectionHandleId,toX:(ee.connectionPosition.x-ee.transform[0])/ee.transform[2],toY:(ee.connectionPosition.y-ee.transform[1])/ee.transform[2]}},[a]),Yt),m=v.fromNode,y=v.handleId,b=v.toX,x=v.toY,w=m==null||(t=m[It])===null||t===void 0?void 0:t.handleBounds;if(!m||!h||!(w!=null&&w[u]))return null;var S=w[u],E=y?S.find(function(ee){return ee.id===y}):S[0],_=E?E.x+E.width/2:((r=m==null?void 0:m.width)!==null&&r!==void 0?r:0)/2,R=E?E.y+E.height/2:(n=m==null?void 0:m.height)!==null&&n!==void 0?n:0,P=((m==null||(i=m.positionAbsolute)===null||i===void 0?void 0:i.x)||0)+_,N=((m==null||(o=m.positionAbsolute)===null||o===void 0?void 0:o.y)||0)+R,j=E==null?void 0:E.position;if(!j)return null;var L=kY[j],F,k,D,T,B,$;switch(u){case"source":F=P,k=N,D=j,T=b,B=x,$=L;break;case"target":F=b,k=x,D=L,T=P,B=N,$=j;break}if(p)return A.createElement("g",{className:"react-flow__connection"},A.createElement(p,{connectionLineType:f,connectionLineStyle:c,fromNode:m,fromHandle:E,fromX:P,fromY:N,toX:b,toY:x,fromPosition:j,toPosition:L,sourcePosition:D,targetPosition:$,sourceNode:m,sourceHandle:E,targetX:T,targetY:B,sourceX:F,sourceY:k}));var W="",Y={sourceX:F,sourceY:k,sourcePosition:D,targetX:T,targetY:B,targetPosition:$};return f===Fn.Bezier?W=Hc(Y):f===Fn.Step?W=Db(mI(mI({},Y),{},{borderRadius:0})):f===Fn.SmoothStep?W=Db(Y):f===Fn.SimpleBezier?W=aq(Y):W="M".concat(F,",").concat(k," ").concat(T,",").concat(B),A.createElement("g",{className:"react-flow__connection"},A.createElement("path",{d:W,className:"react-flow__connection-path",style:c}))});function Lb(e){"@babel/helpers - typeof";return Lb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lb(e)}var yu,BY=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return A.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:"none",points:"-5,-4 0,0 -5,4"})},FY=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return A.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},yI=(yu={},ze(yu,Xu.Arrow,BY),ze(yu,Xu.ArrowClosed,FY),yu);function $Y(e){var t=A.useMemo(function(){var r=yI.hasOwnProperty(e);return r?yI[e]:(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Marker type "'.concat(e,`" doesn't exist. Help: https://reactflow.dev/error#900`)),function(){return null})},[e]);return t}function bI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var HY=function(t){var r=t.id,n=t.type,i=t.color,o=t.width,a=o===void 0?12.5:o,u=t.height,c=u===void 0?12.5:u,d=t.markerUnits,f=d===void 0?"strokeWidth":d,h=t.strokeWidth,p=t.orient,v=p===void 0?"auto":p,m=$Y(n);return A.createElement("marker",{className:"react-flow__arrowhead",id:r,markerWidth:"".concat(a),markerHeight:"".concat(c),viewBox:"-10 -10 20 20",markerUnits:f,orient:v,refX:"0",refY:"0"},A.createElement(m,{color:i,strokeWidth:h}))},UY=function(t){var r=t.defaultColor,n=t.rfId;return function(i){var o=[];return i.edges.reduce(function(a,u){return[u.markerStart,u.markerEnd].forEach(function(c){if(c&&Lb(c)==="object"){var d=Ab(c,n);o.includes(d)||(a.push(zY({id:d,color:c.color||r},c)),o.push(d))}}),a},[]).sort(function(a,u){return a.id.localeCompare(u.id)})}},_q=function(t){var r=t.defaultColor,n=t.rfId,i=gt(A.useCallback(UY({defaultColor:r,rfId:n}),[r,n]),function(o,a){return!(o.length!==a.length||o.some(function(u,c){return u.id!==a[c].id}))});return A.createElement("defs",null,i.map(function(o){return A.createElement(HY,{id:o.id,key:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient})}))};_q.displayName="MarkerDefinitions";var VY=A.memo(_q),WY=[{level:0,isMaxLevel:!0,edges:[]}];function GY(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,u){var c=Gj(u.zIndex),d=c?u.zIndex:0;if(r){var f,h,p,v;d=c?u.zIndex:Math.max(((f=t.get(u.source))===null||f===void 0||(h=f[It])===null||h===void 0?void 0:h.z)||0,((p=t.get(u.target))===null||p===void 0||(v=p[It])===null||v===void 0?void 0:v.z)||0)}return a[d]?a[d].push(u):a[d]=[u],n=d>n?d:n,a},{}),o=Object.entries(i).map(function(a){var u=Be(a,2),c=u[0],d=u[1],f=+c;return{edges:d,level:f,isMaxLevel:f===n}});return o.length===0?WY:o}function KY(e,t,r){var n=gt(A.useCallback(function(i){return e?i.edges.filter(function(o){var a=t.get(o.source),u=t.get(o.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(u==null?void 0:u.width)&&(u==null?void 0:u.height)&&vY({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:u.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:u.width,targetHeight:u.height,width:i.width,height:i.height,transform:i.transform})}):i.edges},[e,t]));return GY(n,t,r)}var YY=function(t){return{connectionNodeId:t.connectionNodeId,connectionHandleType:t.connectionHandleType,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,width:t.width,height:t.height,connectionMode:t.connectionMode,nodeInternals:t.nodeInternals}},Eq=function(t){var r=gt(YY,Yt),n=r.connectionNodeId,i=r.connectionHandleType,o=r.nodesConnectable,a=r.elementsSelectable,u=r.width,c=r.height,d=r.connectionMode,f=r.nodeInternals,h=KY(t.onlyRenderVisibleElements,f,t.elevateEdgesOnSelect);if(!u)return null;var p=t.connectionLineType,v=t.defaultMarkerColor,m=t.connectionLineStyle,y=t.connectionLineComponent,b=t.connectionLineContainerStyle,x=n&&i;return A.createElement(A.Fragment,null,h.map(function(w){var S=w.level,E=w.edges,_=w.isMaxLevel;return A.createElement("svg",{key:S,style:{zIndex:S},width:u,height:c,className:"react-flow__edges react-flow__container"},_&&A.createElement(VY,{defaultColor:v,rfId:t.rfId}),A.createElement("g",null,E.map(function(R){var P=iI(f,R.source),N=Be(P,3),j=N[0],L=N[1],F=N[2],k=iI(f,R.target),D=Be(k,3),T=D[0],B=D[1],$=D[2];if(!F||!$)return null;var W=R.type||"default";t.edgeTypes[W]||(console.warn('[React Flow]: Edge type "'.concat(W,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),W="default");var Y=t.edgeTypes[W]||t.edgeTypes.default,ee=d===go.Strict?B.target:B.target||B.source,H=nI(L.source,R.sourceHandle||null),Q=nI(ee,R.targetHandle||null),ce=(H==null?void 0:H.position)||xe.Bottom,se=(Q==null?void 0:Q.position)||xe.Top;if(!H)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for source handle id: ".concat(R.sourceHandle,"; edge id: ").concat(R.id,". Help: https://reactflow.dev/error#800")),null;if(!Q)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for target handle id: ".concat(R.targetHandle,"; edge id: ").concat(R.id,". Help: https://reactflow.dev/error#800")),null;var z=pY(j,H,ce,T,Q,se),G=z.sourceX,J=z.sourceY,V=z.targetX,K=z.targetY;return A.createElement(Y,{key:R.id,id:R.id,className:ur([R.className,t.noPanClassName]),type:W,data:R.data,selected:!!R.selected,animated:!!R.animated,hidden:!!R.hidden,label:R.label,labelStyle:R.labelStyle,labelShowBg:R.labelShowBg,labelBgStyle:R.labelBgStyle,labelBgPadding:R.labelBgPadding,labelBgBorderRadius:R.labelBgBorderRadius,style:R.style,source:R.source,target:R.target,sourceHandleId:R.sourceHandle,targetHandleId:R.targetHandle,markerEnd:R.markerEnd,markerStart:R.markerStart,sourceX:G,sourceY:J,targetX:V,targetY:K,sourcePosition:ce,targetPosition:se,elementsSelectable:a,onEdgeUpdate:t.onEdgeUpdate,onContextMenu:t.onEdgeContextMenu,onMouseEnter:t.onEdgeMouseEnter,onMouseMove:t.onEdgeMouseMove,onMouseLeave:t.onEdgeMouseLeave,onClick:t.onEdgeClick,edgeUpdaterRadius:t.edgeUpdaterRadius,onEdgeDoubleClick:t.onEdgeDoubleClick,onEdgeUpdateStart:t.onEdgeUpdateStart,onEdgeUpdateEnd:t.onEdgeUpdateEnd,rfId:t.rfId})})))}),x&&A.createElement("svg",{style:b,width:u,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},A.createElement(LY,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:m,connectionLineType:p,isConnectable:o,CustomConnectionLineComponent:y})))};Eq.displayName="EdgeRenderer";var XY=A.memo(Eq),ZY=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function JY(e){var t=e.children,r=gt(ZY);return A.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function QY(e){var t=iq(),r=A.useRef(!1);A.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var Sq=function(t){var r=t.nodeTypes,n=t.edgeTypes,i=t.onMove,o=t.onMoveStart,a=t.onMoveEnd,u=t.onInit,c=t.onNodeClick,d=t.onEdgeClick,f=t.onNodeDoubleClick,h=t.onEdgeDoubleClick,p=t.onNodeMouseEnter,v=t.onNodeMouseMove,m=t.onNodeMouseLeave,y=t.onNodeContextMenu,b=t.onSelectionContextMenu,x=t.connectionLineType,w=t.connectionLineStyle,S=t.connectionLineComponent,E=t.connectionLineContainerStyle,_=t.selectionKeyCode,R=t.multiSelectionKeyCode,P=t.zoomActivationKeyCode,N=t.deleteKeyCode,j=t.onlyRenderVisibleElements,L=t.elementsSelectable,F=t.selectNodesOnDrag,k=t.translateExtent,D=t.minZoom,T=t.maxZoom,B=t.defaultZoom,$=t.defaultPosition,W=t.preventScrolling,Y=t.defaultMarkerColor,ee=t.zoomOnScroll,H=t.zoomOnPinch,Q=t.panOnScroll,ce=t.panOnScrollSpeed,se=t.panOnScrollMode,z=t.zoomOnDoubleClick,G=t.panOnDrag,J=t.onPaneClick,V=t.onPaneScroll,K=t.onPaneContextMenu,ie=t.onEdgeUpdate,ne=t.onEdgeContextMenu,ue=t.onEdgeMouseEnter,de=t.onEdgeMouseMove,we=t.onEdgeMouseLeave,Se=t.edgeUpdaterRadius,_e=t.onEdgeUpdateStart,he=t.onEdgeUpdateEnd,ae=t.noDragClassName,Oe=t.noWheelClassName,Ne=t.noPanClassName,He=t.elevateEdgesOnSelect,qe=t.id;return QY(u),A.createElement(MY,{onPaneClick:J,onPaneContextMenu:K,onPaneScroll:V,deleteKeyCode:N,selectionKeyCode:_,multiSelectionKeyCode:R,zoomActivationKeyCode:P,elementsSelectable:L,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:ee,zoomOnPinch:H,zoomOnDoubleClick:z,panOnScroll:Q,panOnScrollSpeed:ce,panOnScrollMode:se,panOnDrag:G,translateExtent:k,minZoom:D,maxZoom:T,defaultZoom:B,defaultPosition:$,onSelectionContextMenu:b,preventScrolling:W,noDragClassName:ae,noWheelClassName:Oe,noPanClassName:Ne},A.createElement(JY,null,A.createElement(XY,{edgeTypes:n,onEdgeClick:d,onEdgeDoubleClick:h,connectionLineType:x,connectionLineStyle:w,connectionLineComponent:S,connectionLineContainerStyle:E,onEdgeUpdate:ie,onlyRenderVisibleElements:j,onEdgeContextMenu:ne,onEdgeMouseEnter:ue,onEdgeMouseMove:de,onEdgeMouseLeave:we,onEdgeUpdateStart:_e,onEdgeUpdateEnd:he,edgeUpdaterRadius:Se,defaultMarkerColor:Y,noPanClassName:Ne,elevateEdgesOnSelect:!!He,rfId:qe}),A.createElement(qY,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:f,onNodeMouseEnter:p,onNodeMouseMove:v,onNodeMouseLeave:m,onNodeContextMenu:y,selectNodesOnDrag:F,onlyRenderVisibleElements:j,noPanClassName:Ne,noDragClassName:ae})))};Sq.displayName="GraphView";var e9=A.memo(Sq),Oq=function(){return null};Oq.displayName="GroupNode";function xI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ta=(function(e){var t=function(n){var i=n.id,o=n.type,a=n.data,u=n.xPos,c=n.yPos,d=n.selected,f=n.onClick,h=n.onMouseEnter,p=n.onMouseMove,v=n.onMouseLeave,m=n.onContextMenu,y=n.onDoubleClick,b=n.style,x=n.className,w=n.isDraggable,S=n.isSelectable,E=n.isConnectable,_=n.selectNodesOnDrag,R=n.sourcePosition,P=n.targetPosition,N=n.hidden,j=n.resizeObserver,L=n.dragHandle,F=n.zIndex,k=n.isParent,D=n.noPanClassName,T=n.noDragClassName,B=n.initialized,$=Bt(),W=A.useRef(null),Y=A.useRef(R),ee=A.useRef(P),H=A.useRef(o),Q=S||w||f||h||p||v,ce=Qo(i,$.getState,h),se=Qo(i,$.getState,p),z=Qo(i,$.getState,v),G=Qo(i,$.getState,m),J=Qo(i,$.getState,y),V=function(ne){if(S&&(!_||!w)&&Zj({id:i,store:$}),f){var ue=$.getState().nodeInternals.get(i);f(ne,wI({},ue))}};A.useEffect(function(){if(W.current&&!N){var ie=W.current;return j==null||j.observe(ie),function(){return j==null?void 0:j.unobserve(ie)}}},[N]),A.useEffect(function(){var ie=H.current!==o,ne=Y.current!==R,ue=ee.current!==P;W.current&&(ie||ne||ue)&&(ie&&(H.current=o),ne&&(Y.current=R),ue&&(ee.current=P),$.getState().updateNodeDimensions([{id:i,nodeElement:W.current,forceUpdate:!0}]))},[i,o,R,P]);var K=bq({nodeRef:W,disabled:N||!w,noDragClassName:T,handleSelector:L,nodeId:i,isSelectable:S,selectNodesOnDrag:_});return N?null:A.createElement("div",{className:ur(["react-flow__node","react-flow__node-".concat(o),D,x,{selected:d,selectable:S,parent:k}]),ref:W,style:wI({zIndex:F,transform:"translate(".concat(u,"px,").concat(c,"px)"),pointerEvents:Q?"all":"none",visibility:B?"visible":"hidden"},b),onMouseEnter:ce,onMouseMove:se,onMouseLeave:z,onContextMenu:G,onClick:V,onDoubleClick:J,"data-testid":"rf__node-".concat(i),"data-id":i},A.createElement(ZK,{value:i},A.createElement(e,{id:i,data:a,type:o,xPos:u,yPos:c,selected:d,isConnectable:E,sourcePosition:R,targetPosition:P,dragging:K,dragHandle:L,zIndex:F})))};return t.displayName="NodeWrapper",A.memo(t)});function _I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_I(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_I(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t9(e){var t={input:ta(e.input||vq),default:ta(e.default||kb),output:ta(e.output||mq),group:ta(e.group||Oq)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=ta(e[o]||kb),i},r);return EI(EI({},t),n)}function SI(e,t){var r=A.useRef(null),n=A.useMemo(function(){if(process.env.NODE_ENV==="development"){var i=Object.keys(e);Yt(r.current,i)&&console.warn("[React Flow]: It looks like you have 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. Help: https://reactflow.dev/error#200"),r.current=i}return t(e)},[e]);return n}function OI(e){if(!(!e||typeof document>"u")){var t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");t.appendChild(r),r.appendChild(document.createTextNode(e))}}var Cq=function(t){var r=t.children,n=!0;try{Bt()}catch{n=!1}return n?A.createElement(A.Fragment,null,r):A.createElement(bK,{createStore:xK},r)};Cq.displayName="ReactFlowWrapper";var r9=["nodes","edges","defaultNodes","defaultEdges","className","nodeTypes","edgeTypes","onNodeClick","onEdgeClick","onInit","onMove","onMoveStart","onMoveEnd","onConnect","onConnectStart","onConnectStop","onConnectEnd","onClickConnectStart","onClickConnectStop","onClickConnectEnd","onNodeMouseEnter","onNodeMouseMove","onNodeMouseLeave","onNodeContextMenu","onNodeDoubleClick","onNodeDragStart","onNodeDrag","onNodeDragStop","onNodesDelete","onEdgesDelete","onSelectionChange","onSelectionDragStart","onSelectionDrag","onSelectionDragStop","onSelectionContextMenu","connectionMode","connectionLineType","connectionLineStyle","connectionLineComponent","connectionLineContainerStyle","deleteKeyCode","selectionKeyCode","multiSelectionKeyCode","zoomActivationKeyCode","snapToGrid","snapGrid","onlyRenderVisibleElements","selectNodesOnDrag","nodesDraggable","nodesConnectable","elementsSelectable","minZoom","maxZoom","defaultZoom","defaultPosition","translateExtent","preventScrolling","nodeExtent","defaultMarkerColor","zoomOnScroll","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnScrollMode","zoomOnDoubleClick","panOnDrag","onPaneClick","onPaneScroll","onPaneContextMenu","children","onEdgeUpdate","onEdgeContextMenu","onEdgeDoubleClick","onEdgeMouseEnter","onEdgeMouseMove","onEdgeMouseLeave","onEdgeUpdateStart","onEdgeUpdateEnd","edgeUpdaterRadius","onNodesChange","onEdgesChange","noDragClassName","noWheelClassName","noPanClassName","fitView","fitViewOptions","connectOnClick","attributionPosition","proOptions","defaultEdgeOptions","elevateEdgesOnSelect"];function CI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function RI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}OI(uY),OI(lY);var n9={input:vq,default:kb,output:mq},i9={default:jb,straight:lq,step:cq,smoothstep:Ix,simplebezier:sq},o9=[15,15],a9=[0,0],Rq=A.forwardRef(function(e,t){var r=e.nodes,n=e.edges,i=e.defaultNodes,o=e.defaultEdges,a=e.className,u=e.nodeTypes,c=u===void 0?n9:u,d=e.edgeTypes,f=d===void 0?i9:d,h=e.onNodeClick,p=e.onEdgeClick,v=e.onInit,m=e.onMove,y=e.onMoveStart,b=e.onMoveEnd,x=e.onConnect,w=e.onConnectStart,S=e.onConnectStop,E=e.onConnectEnd,_=e.onClickConnectStart,R=e.onClickConnectStop,P=e.onClickConnectEnd,N=e.onNodeMouseEnter,j=e.onNodeMouseMove,L=e.onNodeMouseLeave,F=e.onNodeContextMenu,k=e.onNodeDoubleClick,D=e.onNodeDragStart,T=e.onNodeDrag,B=e.onNodeDragStop,$=e.onNodesDelete,W=e.onEdgesDelete,Y=e.onSelectionChange,ee=e.onSelectionDragStart,H=e.onSelectionDrag,Q=e.onSelectionDragStop,ce=e.onSelectionContextMenu,se=e.connectionMode,z=se===void 0?go.Strict:se,G=e.connectionLineType,J=G===void 0?Fn.Bezier:G,V=e.connectionLineStyle,K=e.connectionLineComponent,ie=e.connectionLineContainerStyle,ne=e.deleteKeyCode,ue=ne===void 0?"Backspace":ne,de=e.selectionKeyCode,we=de===void 0?"Shift":de,Se=e.multiSelectionKeyCode,_e=Se===void 0?"Meta":Se,he=e.zoomActivationKeyCode,ae=he===void 0?"Meta":he,Oe=e.snapToGrid,Ne=Oe===void 0?!1:Oe,He=e.snapGrid,qe=He===void 0?o9:He,Xe=e.onlyRenderVisibleElements,We=Xe===void 0?!1:Xe,mt=e.selectNodesOnDrag,et=mt===void 0?!0:mt,Tt=e.nodesDraggable,ut=e.nodesConnectable,tt=e.elementsSelectable,Ct=e.minZoom,Zt=Ct===void 0?.5:Ct,cr=e.maxZoom,Dt=cr===void 0?2:cr,xt=e.defaultZoom,jt=xt===void 0?1:xt,zr=e.defaultPosition,Kn=zr===void 0?a9:zr,On=e.translateExtent,Hr=On===void 0?Mb:On,Pi=e.preventScrolling,hl=Pi===void 0?!0:Pi,es=e.nodeExtent,Io=e.defaultMarkerColor,pl=Io===void 0?"#b1b1b7":Io,ts=e.zoomOnScroll,vl=ts===void 0?!0:ts,rs=e.zoomOnPinch,ns=rs===void 0?!0:rs,is=e.panOnScroll,gl=is===void 0?!1:is,os=e.panOnScrollSpeed,No=os===void 0?.5:os,as=e.panOnScrollMode,To=as===void 0?no.Free:as,ss=e.zoomOnDoubleClick,ml=ss===void 0?!0:ss,us=e.panOnDrag,yl=us===void 0?!0:us,bl=e.onPaneClick,xl=e.onPaneScroll,wl=e.onPaneContextMenu,_l=e.children,cs=e.onEdgeUpdate,El=e.onEdgeContextMenu,Sl=e.onEdgeDoubleClick,Ol=e.onEdgeMouseEnter,Cl=e.onEdgeMouseMove,Rl=e.onEdgeMouseLeave,Pl=e.onEdgeUpdateStart,Ii=e.onEdgeUpdateEnd,ls=e.edgeUpdaterRadius,Ni=ls===void 0?10:ls,Il=e.onNodesChange,Nl=e.onEdgesChange,fs=e.noDragClassName,ds=fs===void 0?"nodrag":fs,Ao=e.noWheelClassName,hs=Ao===void 0?"nowheel":Ao,ps=e.noPanClassName,Tl=ps===void 0?"nopan":ps,vs=e.fitView,Al=vs===void 0?!1:vs,gs=e.fitViewOptions,Mo=e.connectOnClick,ms=Mo===void 0?!0:Mo,Do=e.attributionPosition,Ml=e.proOptions,ys=e.defaultEdgeOptions,Yn=e.elevateEdgesOnSelect,bs=Yn===void 0?!1:Yn,Ti=$c(e,r9),xs=SI(c,t9),ws=SI(f,hY);return A.createElement("div",RI(RI({},Ti),{},{ref:t,className:ur(["react-flow",a])}),A.createElement(Cq,null,A.createElement(e9,{onInit:v,onMove:m,onMoveStart:y,onMoveEnd:b,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:N,onNodeMouseMove:j,onNodeMouseLeave:L,onNodeContextMenu:F,onNodeDoubleClick:k,nodeTypes:xs,edgeTypes:ws,connectionLineType:J,connectionLineStyle:V,connectionLineComponent:K,connectionLineContainerStyle:ie,selectionKeyCode:we,deleteKeyCode:ue,multiSelectionKeyCode:_e,zoomActivationKeyCode:ae,onlyRenderVisibleElements:We,selectNodesOnDrag:et,translateExtent:Hr,minZoom:Zt,maxZoom:Dt,defaultZoom:jt,defaultPosition:Kn,preventScrolling:hl,zoomOnScroll:vl,zoomOnPinch:ns,zoomOnDoubleClick:ml,panOnScroll:gl,panOnScrollSpeed:No,panOnScrollMode:To,panOnDrag:yl,onPaneClick:bl,onPaneScroll:xl,onPaneContextMenu:wl,onSelectionContextMenu:ce,onEdgeUpdate:cs,onEdgeContextMenu:El,onEdgeDoubleClick:Sl,onEdgeMouseEnter:Ol,onEdgeMouseMove:Cl,onEdgeMouseLeave:Rl,onEdgeUpdateStart:Pl,onEdgeUpdateEnd:Ii,edgeUpdaterRadius:Ni,defaultMarkerColor:pl,noDragClassName:ds,noWheelClassName:hs,noPanClassName:Tl,elevateEdgesOnSelect:bs,id:Ti==null?void 0:Ti.id}),A.createElement(aY,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:x,onConnectStart:w,onConnectStop:S,onConnectEnd:E,onClickConnectStart:_,onClickConnectStop:R,onClickConnectEnd:P,nodesDraggable:Tt,nodesConnectable:ut,elementsSelectable:tt,minZoom:Zt,maxZoom:Dt,nodeExtent:es,onNodesChange:Il,onEdgesChange:Nl,snapToGrid:Ne,snapGrid:qe,connectionMode:z,translateExtent:Hr,connectOnClick:ms,defaultEdgeOptions:ys,fitView:Al,fitViewOptions:gs,onNodesDelete:$,onEdgesDelete:W,onNodeDragStart:D,onNodeDrag:T,onNodeDragStop:B,onSelectionDrag:H,onSelectionDragStart:ee,onSelectionDragStop:Q}),Y&&A.createElement(iY,{onSelectionChange:Y}),_l,A.createElement(HK,{proOptions:Ml,position:Do})))});Rq.displayName="ReactFlow";function Pq(e){return function(t){var r=A.useState(t),n=Be(r,2),i=n[0],o=n[1],a=A.useCallback(function(u){return o(function(c){return e(u,c)})},[]);return[i,o,a]}}var s9=Pq(Yj),u9=Pq(dK);function PI(e,t){const{width:r,height:n,positionAbsolute:i}=e,o=t.positionAbsolute,a=r/2,u=n/2,c=i.x+a,d=i.y+u,f=o.x+a,h=o.y+u,p=(f-c)/(2*a)-(h-d)/(2*u),v=(f-c)/(2*a)+(h-d)/(2*u),m=1/(Math.abs(p)+Math.abs(v)),y=m*p,b=m*v,x=a*(y+b)+c,w=u*(-y+b)+d;return{x,y:w}}function II(e,t){const r={...e.positionAbsolute,...e},n=Math.round(r.x),i=Math.round(r.y),o=Math.round(t.x),a=Math.round(t.y);return o<=n+1?xe.Left:o>=n+r.width-1?xe.Right:a<=i+1?xe.Top:a>=r.y+r.height-1?xe.Bottom:xe.Top}function Iq(e,t){const r=PI(e,t),n=PI(t,e),i=II(e,r),o=II(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const c9=({targetX:e,targetY:t,sourcePosition:r,targetPosition:n,sourceNode:i})=>{if(!i)return null;const o={id:"connection-target",width:1,height:1,position:{x:e,y:t}},{sx:a,sy:u}=Iq(i,o),c=Hc({sourceX:a,sourceY:u,sourcePosition:r,targetPosition:n,targetX:e,targetY:t});return C.jsxs("g",{children:[C.jsx("path",{fill:"none",stroke:"#222",strokeWidth:1.5,className:"animated",d:c}),C.jsx("circle",{cx:e,cy:t,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})},l9=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=gt(A.useCallback(m=>m.nodeInternals.get(t),[t])),a=gt(A.useCallback(m=>m.nodeInternals.get(r),[r]));if(!o||!a)return null;const{sx:u,sy:c,tx:d,ty:f,sourcePos:h,targetPos:p}=Iq(o,a),v=Hc({sourceX:u,sourceY:c,sourcePosition:h,targetPosition:p,targetX:d,targetY:f});return C.jsx("path",{id:e,className:"react-flow__edge-path",d:v,markerEnd:n,style:i})},NI=172,TI=36,f9={custom:l9},d9=(e,t,r="LR")=>{const n=new vP.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:NI,height:TI})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),vP.layout(n),e.forEach(o=>{const a=n.node(o.id);return o.targetPosition=i?xe.Left:xe.Top,o.sourcePosition=i?xe.Right:xe.Bottom,o.position={x:a.x-NI/2,y:a.y-TI/2},o}),{nodes:e,edges:t}},h9=()=>{},p9=({data:e,dict:t,onSelect:r=h9})=>{const{nodes:n,edges:i}=d9(Object.values(t).filter(h=>h.id===e.selected||e.parents.flat().includes(h.id)||e.children.flat().includes(h.id)).map(h=>({id:h.id,type:h.parents.length===0?"input":h.includes.length===0?"output":"default",sourcePosition:xe.Right,targetPosition:xe.Left,data:{label:h.privilege},position:{x:0,y:0},className:h.id===e.selected?"highlighted":"",selected:h.id===e.selected})),e.links.map(({source:h,target:p})=>({id:`e${h}-${p}`,source:h,target:p}))),[o,a,u]=s9(n),[c,d,f]=u9(i);return A.useEffect(()=>{a([...n]),d([...i])},[e]),C.jsx(Rq,{nodes:o,edges:c,fitView:!0,onNodesChange:u,onEdgesChange:f,onNodeClick:(h,p)=>{r(p.id)},defaultZoom:.5,edgeTypes:f9,connectionLineComponent:c9,children:C.jsx($K,{variant:gi.Dots,color:"#81818140",gap:18,size:1})})};var Nq=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(Nq||{});const Tq=e=>{switch(e){case"entityCollection":return Z.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return Z.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return Z.ESubPermissionType.DS_METHOD;case"entity":return Z.ESubPermissionType.ENTITY_METHOD;default:return Z.EPermissionType.METHOD}},AI=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[Nq[r]])==null||i.forEach(a=>{if(`${o.name.toLowerCase()}.${a.name.toLowerCase()}`.includes(t)||!t){const c={applyTo:`${o.name}.${a.name}`,type:r};r===Z.EPermissionType.METHOD&&(c.subType=Tq(a.applyTo)),n.push(c)}});return n},v9=(e=[],t)=>{var n;const r=[];for(const i of e)(n=i.methods)==null||n.forEach(o=>{(`${i.name.toLowerCase()}.${o.name.toLowerCase()}`.includes(t)||!t)&&r.push({applyTo:`${i.name}.${o.name}`,type:Z.EPermissionType.SINGLETON_METHOD})});return r};function Tx(e,t=[],r=[],n=[]){const i=AI(r,e,Z.EPermissionType.ATTRIBUTE),o=AI(r,e,Z.EPermissionType.METHOD),a=v9(n,e),u=t.filter(h=>!e||`ds.${h.name.toLowerCase()}`.includes(e)).map(h=>({applyTo:`ds.${h.name}`,type:Z.ESubPermissionType.DS_METHOD})),c=[],d=[];return r.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{c.push({applyTo:h.name,type:Z.EPermissionType.DATACLASS})}),n.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{d.push({applyTo:h.name,type:Z.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:Z.EPermissionType.DATASTORE}].filter(h=>!e||`ds.${h.applyTo.toLowerCase()}`.includes(e)),...u,...c,...i,...o,...d,...a].reduce((h,p)=>{const v=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],[m,y]=p.applyTo.split("."),b=h.find(x=>x.prefix===m);return b?(b.resources=[...b.resources,p].sort((x,w)=>{const S=v.indexOf(x.type),E=v.indexOf(w.type);return S>E?1:-1}),b.type=y?b.type:p.type,[...h].sort((x,w)=>{const S=v.indexOf(x.type),E=v.indexOf(w.type);return S>E?1:-1})):[...h,{prefix:m,type:y?null:p.type,resources:[p]}]},[]).reduce((h,p)=>[...h,...p.resources],[])}const g9=(e=[],t=[],r=[])=>{const n=Tx("",e,t,r),i={ds:{applyTo:"ds",type:Z.EPermissionType.DATASTORE,methods:[],dataClasses:[],singletons:[]}},o=(u,c)=>u.applyTo.localeCompare(c.applyTo);n.forEach(u=>{const[c,d]=u.applyTo.split(".");if(d||(u.type===Z.EPermissionType.DATACLASS?i.ds.dataClasses.push({applyTo:c,type:Z.EPermissionType.DATACLASS,methods:[],attributes:[]}):u.type===Z.EPermissionType.SINGLETON&&i.ds.singletons.push({applyTo:c,type:Z.EPermissionType.SINGLETON,methods:[],attributes:[]})),d){const f=(h,p,v)=>{h.forEach(m=>{m.applyTo===c&&m[p].push(v)})};[Z.ESubPermissionType.DS_METHOD,Z.ESubPermissionType.DATACLASS_METHOD,Z.ESubPermissionType.ENTITY_METHOD,Z.ESubPermissionType.ENTITY_SEL_METHOD].includes(u.type)?c==="ds"?i.ds.methods.push(u):f(i.ds.dataClasses,"methods",u):u.type===Z.EPermissionType.ATTRIBUTE?(f(i.ds.dataClasses,"attributes",u),f(i.ds.singletons,"attributes",u)):u.type===Z.EPermissionType.SINGLETON_METHOD&&f(i.ds.singletons,"methods",u)}});const a=u=>{u.forEach(c=>{c.methods&&c.methods.sort(o),c.attributes&&c.attributes.sort(o)})};return i.ds.methods.sort(o),i.ds.dataClasses.sort(o),i.ds.singletons.sort(o),a(i.ds.dataClasses),a(i.ds.singletons),i},Aq=(e,t=[])=>{const r={};return Object.entries(e).forEach(([n,i])=>{r[n]={...i,resources:i.resources.map(o=>{var a,u,c;if(o.type===Z.EPermissionType.METHOD&&t.length){const[d,f]=o.resource.split("."),h=d==="ds"?"dataStore":((c=(u=(a=t.find(p=>p.name===d))==null?void 0:a.methods)==null?void 0:u.find(p=>p.name===f))==null?void 0:c.applyTo)||"dataClass";return{...o,type:o.type,subType:Tq(h)}}return o})}}),r},Mq=(e,t)=>Object.entries(e).map(([r,n])=>{const i=n.resources.map(o=>{var d,f,h,p,v,m;const[a,u]=o.resource.split(".");let c=!0;switch(o.type){case Z.EPermissionType.DATASTORE:c=!!t;break;case Z.ESubPermissionType.DS_METHOD:c=!!t.methods.find(y=>y.name===u&&y.applyTo==="dataStore");break;case Z.EPermissionType.DATACLASS:c=!!t.dataClasses[a];break;case Z.EPermissionType.ATTRIBUTE:c=!!((f=(d=t.dataClasses[a])==null?void 0:d.attributes)!=null&&f.find(y=>y.name===u));break;case Z.ESubPermissionType.ENTITY_SEL_METHOD:c=!!((h=t.dataClasses[a])!=null&&h.methods.find(y=>y.name===u&&y.applyTo==="entityCollection"));break;case Z.ESubPermissionType.DATACLASS_METHOD:c=!!((p=t.dataClasses[a])!=null&&p.methods.find(y=>y.name===u&&y.applyTo==="dataClass"));break;case Z.ESubPermissionType.ENTITY_METHOD:c=!!((v=t.dataClasses[a])!=null&&v.methods.find(y=>y.name===u&&y.applyTo==="entity"));break;case Z.EPermissionType.SINGLETON_METHOD:c=!!((m=t.singletons[a])!=null&&m.methods.find(y=>y.name===u));break;case Z.EPermissionType.SINGLETON:c=!!t.singletons[a];break;default:c=!0}return{...o,exists:c}});return{[r]:{...n,resources:i}}}).reduce((r,n)=>({...r,...n}),{}),Rm=({child:e,parent:t,status:r,onSelect:n,currentPrivilegeId:i})=>{const o=Z.useAppDispatch(),a=Z.useAppSelector(Z.selectPrivileges);function u(){const d=Z.addIn(t.id,e.id,a);o(Z.updatePrivileges(d))}function c(){const d=Z.removeFrom(t.id,e.id,a);o(Z.updatePrivileges(d))}return C.jsxs("div",{className:Ve("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":r==="included","bg-grey-300 text-grey-100":r!=="included","opacity-40":r==="disabled"}),children:[C.jsx("span",{onClick:()=>n(i),className:"text-xs hover:underline",children:e.privilege}),r==="included"?C.jsx("button",{onClick:c,children:C.jsx("span",{className:"text-[13px]",children:C.jsx(ye.FdPlus,{className:"rotate-45 transform text-white"})})}):C.jsx("button",{disabled:r==="disabled",onClick:u,className:"opacity-70 disabled:cursor-not-allowed",children:C.jsx("span",{className:"text-[13px]",children:C.jsx(ye.FdPlus,{className:"text-white"})})})]})},m9=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:i})=>{const o=Object.values(t),a=Z.getPrivilegeById(e.id,t);let u=a?Z.populateShallow(a.includes,t):[],c=a?Z.populateShallow(Z.parents(a.id,t),t):[],d=a?Z.populateShallow(Z.allowed(a.id,t),t):[];return[u,c,d]=[u,c,d].map(f=>f.filter(h=>(h==null?void 0:h.privilege)!=="guest")),o.length<2&&u.length+c.length+d.length===0?null:C.jsxs("div",{className:"w-full border-b border-grey-900 p-4",children:[C.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[" ",o.length>2?C.jsx("h4",{className:"text-[13px] font-semibold text-white",children:"Include a privilege"}):C.jsx("div",{}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx(De.ControlledSwitch,{onChange:()=>n(!i),value:i}),C.jsxs("label",{className:"text-xs text-[#F6F6F6]",children:[" ","Show inherited permissions"]})]})]}),C.jsxs("div",{className:"flex flex-wrap items-center space-x-1",children:[u.map(f=>C.jsx(Rm,{child:f,parent:e,status:"included",onSelect:r,currentPrivilegeId:f.id},f.id)),d.map(f=>C.jsx(Rm,{child:f,parent:e,status:"available",onSelect:r,currentPrivilegeId:f.id},f.id)),c.map(f=>C.jsx(Rm,{child:f,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:f.id},f.id))]})]})};function br(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Dq(e,t=[]){let r=[];function n(o,a){const u=ve.createContext(a),c=r.length;r=[...r,a];const d=h=>{var x;const{scope:p,children:v,...m}=h,y=((x=p==null?void 0:p[e])==null?void 0:x[c])||u,b=ve.useMemo(()=>m,Object.values(m));return C.jsx(y.Provider,{value:b,children:v})};d.displayName=o+"Provider";function f(h,p){var y;const v=((y=p==null?void 0:p[e])==null?void 0:y[c])||u,m=ve.useContext(v);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[d,f]}const i=()=>{const o=r.map(a=>ve.createContext(a));return function(u){const c=(u==null?void 0:u[e])||o;return ve.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return i.scopeName=e,[n,y9(i,...t)]}function y9(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=n.reduce((u,{useScope:c,scopeName:d})=>{const h=c(o)[`__scope${d}`];return{...u,...h}},{});return ve.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var mi=globalThis!=null&&globalThis.document?ve.useLayoutEffect:()=>{},b9=ve[" useInsertionEffect ".trim().toString()]||mi;function x9({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,a]=w9({defaultProp:t,onChange:r}),u=e!==void 0,c=u?e:i;{const f=ve.useRef(e!==void 0);ve.useEffect(()=>{const h=f.current;h!==u&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=u},[u,n])}const d=ve.useCallback(f=>{var h;if(u){const p=_9(f)?f(e):f;p!==e&&((h=a.current)==null||h.call(a,p))}else o(f)},[u,e,o,a]);return[c,d]}function w9({defaultProp:e,onChange:t}){const[r,n]=ve.useState(e),i=ve.useRef(r),o=ve.useRef(t);return b9(()=>{o.current=t},[t]),ve.useEffect(()=>{var a;i.current!==r&&((a=o.current)==null||a.call(o,r),i.current=r)},[r,i]),[r,n,o]}function _9(e){return typeof e=="function"}function MI(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jq(...e){return t=>{let r=!1;const n=e.map(i=>{const o=MI(i,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let i=0;i<n.length;i++){const o=n[i];typeof o=="function"?o():MI(e[i],null)}}}}function Eo(...e){return ve.useCallback(jq(...e),e)}const E9=["top","right","bottom","left"],$n=Math.min,ir=Math.max,rc=Math.round,bu=Math.floor,en=e=>({x:e,y:e}),S9={left:"right",right:"left",bottom:"top",top:"bottom"},O9={start:"end",end:"start"};function Bb(e,t,r){return ir(e,$n(t,r))}function xn(e,t){return typeof e=="function"?e(t):e}function wn(e){return e.split("-")[0]}function So(e){return e.split("-")[1]}function Ax(e){return e==="x"?"y":"x"}function Mx(e){return e==="y"?"height":"width"}const C9=new Set(["top","bottom"]);function Zr(e){return C9.has(wn(e))?"y":"x"}function Dx(e){return Ax(Zr(e))}function R9(e,t,r){r===void 0&&(r=!1);const n=So(e),i=Dx(e),o=Mx(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=nc(a)),[a,nc(a)]}function P9(e){const t=nc(e);return[Fb(e),t,Fb(t)]}function Fb(e){return e.replace(/start|end/g,t=>O9[t])}const DI=["left","right"],jI=["right","left"],I9=["top","bottom"],N9=["bottom","top"];function T9(e,t,r){switch(e){case"top":case"bottom":return r?t?jI:DI:t?DI:jI;case"left":case"right":return t?I9:N9;default:return[]}}function A9(e,t,r,n){const i=So(e);let o=T9(wn(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Fb)))),o}function nc(e){return e.replace(/left|right|bottom|top/g,t=>S9[t])}function M9(e){return{top:0,right:0,bottom:0,left:0,...e}}function qq(e){return typeof e!="number"?M9(e):{top:e,right:e,bottom:e,left:e}}function ic(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function qI(e,t,r){let{reference:n,floating:i}=e;const o=Zr(t),a=Dx(t),u=Mx(a),c=wn(t),d=o==="y",f=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,p=n[u]/2-i[u]/2;let v;switch(c){case"top":v={x:f,y:n.y-i.height};break;case"bottom":v={x:f,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:h};break;case"left":v={x:n.x-i.width,y:h};break;default:v={x:n.x,y:n.y}}switch(So(t)){case"start":v[a]-=p*(r&&d?-1:1);break;case"end":v[a]+=p*(r&&d?-1:1);break}return v}const D9=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=qI(d,n,c),p=n,v={},m=0;for(let y=0;y<u.length;y++){const{name:b,fn:x}=u[y],{x:w,y:S,data:E,reset:_}=await x({x:f,y:h,initialPlacement:n,placement:p,strategy:i,middlewareData:v,rects:d,platform:a,elements:{reference:e,floating:t}});f=w??f,h=S??h,v={...v,[b]:{...v[b],...E}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(d=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:f,y:h}=qI(d,p,c)),y=-1)}return{x:f,y:h,placement:p,strategy:i,middlewareData:v}};async function qa(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:o,rects:a,elements:u,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:p=!1,padding:v=0}=xn(t,e),m=qq(v),b=u[p?h==="floating"?"reference":"floating":h],x=ic(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(b)))==null||r?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:d,rootBoundary:f,strategy:c})),w=h==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),E=await(o.isElement==null?void 0:o.isElement(S))?await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1}:{x:1,y:1},_=ic(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:S,strategy:c}):w);return{top:(x.top-_.top+m.top)/E.y,bottom:(_.bottom-x.bottom+m.bottom)/E.y,left:(x.left-_.left+m.left)/E.x,right:(_.right-x.right+m.right)/E.x}}const j9=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:d,padding:f=0}=xn(e,t)||{};if(d==null)return{};const h=qq(f),p={x:r,y:n},v=Dx(i),m=Mx(v),y=await a.getDimensions(d),b=v==="y",x=b?"top":"left",w=b?"bottom":"right",S=b?"clientHeight":"clientWidth",E=o.reference[m]+o.reference[v]-p[v]-o.floating[m],_=p[v]-o.reference[v],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let P=R?R[S]:0;(!P||!await(a.isElement==null?void 0:a.isElement(R)))&&(P=u.floating[S]||o.floating[m]);const N=E/2-_/2,j=P/2-y[m]/2-1,L=$n(h[x],j),F=$n(h[w],j),k=L,D=P-y[m]-F,T=P/2-y[m]/2+N,B=Bb(k,T,D),$=!c.arrow&&So(i)!=null&&T!==B&&o.reference[m]/2-(T<k?L:F)-y[m]/2<0,W=$?T<k?T-k:T-D:0;return{[v]:p[v]+W,data:{[v]:B,centerOffset:T-B-W,...$&&{alignmentOffset:W}},reset:$}}}),q9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...b}=xn(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const x=wn(i),w=Zr(u),S=wn(u)===u,E=await(c.isRTL==null?void 0:c.isRTL(d.floating)),_=p||(S||!y?[nc(u)]:P9(u)),R=m!=="none";!p&&R&&_.push(...A9(u,y,m,E));const P=[u,..._],N=await qa(t,b),j=[];let L=((n=o.flip)==null?void 0:n.overflows)||[];if(f&&j.push(N[x]),h){const T=R9(i,a,E);j.push(N[T[0]],N[T[1]])}if(L=[...L,{placement:i,overflows:j}],!j.every(T=>T<=0)){var F,k;const T=(((F=o.flip)==null?void 0:F.index)||0)+1,B=P[T];if(B&&(!(h==="alignment"?w!==Zr(B):!1)||L.every(Y=>Zr(Y.placement)===w?Y.overflows[0]>0:!0)))return{data:{index:T,overflows:L},reset:{placement:B}};let $=(k=L.filter(W=>W.overflows[0]<=0).sort((W,Y)=>W.overflows[1]-Y.overflows[1])[0])==null?void 0:k.placement;if(!$)switch(v){case"bestFit":{var D;const W=(D=L.filter(Y=>{if(R){const ee=Zr(Y.placement);return ee===w||ee==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(ee=>ee>0).reduce((ee,H)=>ee+H,0)]).sort((Y,ee)=>Y[1]-ee[1])[0])==null?void 0:D[0];W&&($=W);break}case"initialPlacement":$=u;break}if(i!==$)return{reset:{placement:$}}}return{}}}};function kI(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function LI(e){return E9.some(t=>e[t]>=0)}const k9=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=xn(e,t);switch(n){case"referenceHidden":{const o=await qa(t,{...i,elementContext:"reference"}),a=kI(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:LI(a)}}}case"escaped":{const o=await qa(t,{...i,altBoundary:!0}),a=kI(o,r.floating);return{data:{escapedOffsets:a,escaped:LI(a)}}}default:return{}}}}},kq=new Set(["left","top"]);async function L9(e,t){const{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=wn(r),u=So(r),c=Zr(r)==="y",d=kq.has(a)?-1:1,f=o&&c?-1:1,h=xn(t,e);let{mainAxis:p,crossAxis:v,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&typeof m=="number"&&(v=u==="end"?m*-1:m),c?{x:v*f,y:p*d}:{x:p*d,y:v*f}}const B9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:o,placement:a,middlewareData:u}=t,c=await L9(t,e);return a===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},F9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:b=>{let{x,y:w}=b;return{x,y:w}}},...c}=xn(e,t),d={x:r,y:n},f=await qa(t,c),h=Zr(wn(i)),p=Ax(h);let v=d[p],m=d[h];if(o){const b=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=v+f[b],S=v-f[x];v=Bb(w,v,S)}if(a){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",w=m+f[b],S=m-f[x];m=Bb(w,m,S)}const y=u.fn({...t,[p]:v,[h]:m});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[p]:o,[h]:a}}}}}},$9=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:c=!0,crossAxis:d=!0}=xn(e,t),f={x:r,y:n},h=Zr(i),p=Ax(h);let v=f[p],m=f[h];const y=xn(u,t),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const S=p==="y"?"height":"width",E=o.reference[p]-o.floating[S]+b.mainAxis,_=o.reference[p]+o.reference[S]-b.mainAxis;v<E?v=E:v>_&&(v=_)}if(d){var x,w;const S=p==="y"?"width":"height",E=kq.has(wn(i)),_=o.reference[h]-o.floating[S]+(E&&((x=a.offset)==null?void 0:x[h])||0)+(E?0:b.crossAxis),R=o.reference[h]+o.reference[S]+(E?0:((w=a.offset)==null?void 0:w[h])||0)-(E?b.crossAxis:0);m<_?m=_:m>R&&(m=R)}return{[p]:v,[h]:m}}}},z9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:o,platform:a,elements:u}=t,{apply:c=()=>{},...d}=xn(e,t),f=await qa(t,d),h=wn(i),p=So(i),v=Zr(i)==="y",{width:m,height:y}=o.floating;let b,x;h==="top"||h==="bottom"?(b=h,x=p===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(x=h,b=p==="end"?"top":"bottom");const w=y-f.top-f.bottom,S=m-f.left-f.right,E=$n(y-f[b],w),_=$n(m-f[x],S),R=!t.middlewareData.shift;let P=E,N=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=S),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=w),R&&!p){const L=ir(f.left,0),F=ir(f.right,0),k=ir(f.top,0),D=ir(f.bottom,0);v?N=m-2*(L!==0||F!==0?L+F:ir(f.left,f.right)):P=y-2*(k!==0||D!==0?k+D:ir(f.top,f.bottom))}await c({...t,availableWidth:N,availableHeight:P});const j=await a.getDimensions(u.floating);return m!==j.width||y!==j.height?{reset:{rects:!0}}:{}}}};function Uc(){return typeof window<"u"}function Oo(e){return Lq(e)?(e.nodeName||"").toLowerCase():"#document"}function or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function an(e){var t;return(t=(Lq(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lq(e){return Uc()?e instanceof Node||e instanceof or(e).Node:!1}function kr(e){return Uc()?e instanceof Element||e instanceof or(e).Element:!1}function rn(e){return Uc()?e instanceof HTMLElement||e instanceof or(e).HTMLElement:!1}function BI(e){return!Uc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof or(e).ShadowRoot}const H9=new Set(["inline","contents"]);function Ka(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!H9.has(i)}const U9=new Set(["table","td","th"]);function V9(e){return U9.has(Oo(e))}const W9=[":popover-open",":modal"];function Vc(e){return W9.some(t=>{try{return e.matches(t)}catch{return!1}})}const G9=["transform","translate","scale","rotate","perspective"],K9=["transform","translate","scale","rotate","perspective","filter"],Y9=["paint","layout","strict","content"];function jx(e){const t=qx(),r=kr(e)?Lr(e):e;return G9.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||K9.some(n=>(r.willChange||"").includes(n))||Y9.some(n=>(r.contain||"").includes(n))}function X9(e){let t=zn(e);for(;rn(t)&&!mo(t);){if(jx(t))return t;if(Vc(t))return null;t=zn(t)}return null}function qx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Z9=new Set(["html","body","#document"]);function mo(e){return Z9.has(Oo(e))}function Lr(e){return or(e).getComputedStyle(e)}function Wc(e){return kr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zn(e){if(Oo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||BI(e)&&e.host||an(e);return BI(t)?t.host:t}function Bq(e){const t=zn(e);return mo(t)?e.ownerDocument?e.ownerDocument.body:e.body:rn(t)&&Ka(t)?t:Bq(t)}function ka(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Bq(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=or(i);if(o){const u=$b(a);return t.concat(a,a.visualViewport||[],Ka(i)?i:[],u&&r?ka(u):[])}return t.concat(i,ka(i,[],r))}function $b(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fq(e){const t=Lr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=rn(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,u=rc(r)!==o||rc(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function kx(e){return kr(e)?e:e.contextElement}function oo(e){const t=kx(e);if(!rn(t))return en(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=Fq(t);let a=(o?rc(r.width):r.width)/n,u=(o?rc(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const J9=en(0);function $q(e){const t=or(e);return!qx()||!t.visualViewport?J9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Q9(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==or(e)?!1:t}function yi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=kx(e);let a=en(1);t&&(n?kr(n)&&(a=oo(n)):a=oo(e));const u=Q9(o,r,n)?$q(o):en(0);let c=(i.left+u.x)/a.x,d=(i.top+u.y)/a.y,f=i.width/a.x,h=i.height/a.y;if(o){const p=or(o),v=n&&kr(n)?or(n):n;let m=p,y=$b(m);for(;y&&n&&v!==m;){const b=oo(y),x=y.getBoundingClientRect(),w=Lr(y),S=x.left+(y.clientLeft+parseFloat(w.paddingLeft))*b.x,E=x.top+(y.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,d*=b.y,f*=b.x,h*=b.y,c+=S,d+=E,m=or(y),y=$b(m)}}return ic({width:f,height:h,x:c,y:d})}function Gc(e,t){const r=Wc(e).scrollLeft;return t?t.left+r:yi(an(e)).left+r}function zq(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Gc(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function e7(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o=i==="fixed",a=an(n),u=t?Vc(t.floating):!1;if(n===a||u&&o)return r;let c={scrollLeft:0,scrollTop:0},d=en(1);const f=en(0),h=rn(n);if((h||!h&&!o)&&((Oo(n)!=="body"||Ka(a))&&(c=Wc(n)),rn(n))){const v=yi(n);d=oo(n),f.x=v.x+n.clientLeft,f.y=v.y+n.clientTop}const p=a&&!h&&!o?zq(a,c):en(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+f.x+p.x,y:r.y*d.y-c.scrollTop*d.y+f.y+p.y}}function t7(e){return Array.from(e.getClientRects())}function r7(e){const t=an(e),r=Wc(e),n=e.ownerDocument.body,i=ir(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ir(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Gc(e);const u=-r.scrollTop;return Lr(n).direction==="rtl"&&(a+=ir(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}const FI=25;function n7(e,t){const r=or(e),n=an(e),i=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;const f=qx();(!f||f&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const d=Gc(n);if(d<=0){const f=n.ownerDocument,h=f.body,p=getComputedStyle(h),v=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(n.clientWidth-h.clientWidth-v);m<=FI&&(o-=m)}else d<=FI&&(o+=d);return{width:o,height:a,x:u,y:c}}const i7=new Set(["absolute","fixed"]);function o7(e,t){const r=yi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=rn(e)?oo(e):en(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,d=n*o.y;return{width:a,height:u,x:c,y:d}}function $I(e,t,r){let n;if(t==="viewport")n=n7(e,r);else if(t==="document")n=r7(an(e));else if(kr(t))n=o7(t,r);else{const i=$q(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ic(n)}function Hq(e,t){const r=zn(e);return r===t||!kr(r)||mo(r)?!1:Lr(r).position==="fixed"||Hq(r,t)}function a7(e,t){const r=t.get(e);if(r)return r;let n=ka(e,[],!1).filter(u=>kr(u)&&Oo(u)!=="body"),i=null;const o=Lr(e).position==="fixed";let a=o?zn(e):e;for(;kr(a)&&!mo(a);){const u=Lr(a),c=jx(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&i7.has(i.position)||Ka(a)&&!c&&Hq(e,a))?n=n.filter(f=>f!==a):i=u,a=zn(a)}return t.set(e,n),n}function s7(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const a=[...r==="clippingAncestors"?Vc(t)?[]:a7(t,this._c):[].concat(r),n],u=a[0],c=a.reduce((d,f)=>{const h=$I(t,f,i);return d.top=ir(h.top,d.top),d.right=$n(h.right,d.right),d.bottom=$n(h.bottom,d.bottom),d.left=ir(h.left,d.left),d},$I(t,u,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function u7(e){const{width:t,height:r}=Fq(e);return{width:t,height:r}}function c7(e,t,r){const n=rn(t),i=an(t),o=r==="fixed",a=yi(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=en(0);function d(){c.x=Gc(i)}if(n||!n&&!o)if((Oo(t)!=="body"||Ka(i))&&(u=Wc(t)),n){const v=yi(t,!0,o,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else i&&d();o&&!n&&i&&d();const f=i&&!n&&!o?zq(i,u):en(0),h=a.left+u.scrollLeft-c.x-f.x,p=a.top+u.scrollTop-c.y-f.y;return{x:h,y:p,width:a.width,height:a.height}}function Pm(e){return Lr(e).position==="static"}function zI(e,t){if(!rn(e)||Lr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return an(e)===r&&(r=r.ownerDocument.body),r}function Uq(e,t){const r=or(e);if(Vc(e))return r;if(!rn(e)){let i=zn(e);for(;i&&!mo(i);){if(kr(i)&&!Pm(i))return i;i=zn(i)}return r}let n=zI(e,t);for(;n&&V9(n)&&Pm(n);)n=zI(n,t);return n&&mo(n)&&Pm(n)&&!jx(n)?r:n||X9(e)||r}const l7=async function(e){const t=this.getOffsetParent||Uq,r=this.getDimensions,n=await r(e.floating);return{reference:c7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function f7(e){return Lr(e).direction==="rtl"}const d7={convertOffsetParentRelativeRectToViewportRelativeRect:e7,getDocumentElement:an,getClippingRect:s7,getOffsetParent:Uq,getElementRects:l7,getClientRects:t7,getDimensions:u7,getScale:oo,isElement:kr,isRTL:f7};function Vq(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function h7(e,t){let r=null,n;const i=an(e);function o(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function a(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),o();const d=e.getBoundingClientRect(),{left:f,top:h,width:p,height:v}=d;if(u||t(),!p||!v)return;const m=bu(h),y=bu(i.clientWidth-(f+p)),b=bu(i.clientHeight-(h+v)),x=bu(f),S={rootMargin:-m+"px "+-y+"px "+-b+"px "+-x+"px",threshold:ir(0,$n(1,c))||1};let E=!0;function _(R){const P=R[0].intersectionRatio;if(P!==c){if(!E)return a();P?a(!1,P):n=setTimeout(()=>{a(!1,1e-7)},1e3)}P===1&&!Vq(d,e.getBoundingClientRect())&&a(),E=!1}try{r=new IntersectionObserver(_,{...S,root:i.ownerDocument})}catch{r=new IntersectionObserver(_,S)}r.observe(e)}return a(!0),o}function p7(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=kx(e),f=i||o?[...d?ka(d):[],...ka(t)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",r,{passive:!0}),o&&x.addEventListener("resize",r)});const h=d&&u?h7(d,r):null;let p=-1,v=null;a&&(v=new ResizeObserver(x=>{let[w]=x;w&&w.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=v)==null||S.observe(t)})),r()}),d&&!c&&v.observe(d),v.observe(t));let m,y=c?yi(e):null;c&&b();function b(){const x=yi(e);y&&!Vq(y,x)&&r(),y=x,m=requestAnimationFrame(b)}return r(),()=>{var x;f.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),h==null||h(),(x=v)==null||x.disconnect(),v=null,c&&cancelAnimationFrame(m)}}const v7=B9,g7=F9,m7=q9,y7=z9,b7=k9,HI=j9,x7=$9,w7=(e,t,r)=>{const n=new Map,i={platform:d7,...r},o={...i.platform,_c:n};return D9(e,t,{...i,platform:o})};var _7=typeof document<"u",E7=function(){},ku=_7?A.useLayoutEffect:E7;function oc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!oc(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const o=i[n];if(!(o==="_owner"&&e.$$typeof)&&!oc(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Wq(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function UI(e,t){const r=Wq(e);return Math.round(t*r)/r}function Im(e){const t=ve.useRef(e);return ku(()=>{t.current=e}),t}function S7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:c,open:d}=e,[f,h]=ve.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,v]=ve.useState(n);oc(p,n)||v(n);const[m,y]=ve.useState(null),[b,x]=ve.useState(null),w=ve.useCallback(Y=>{Y!==R.current&&(R.current=Y,y(Y))},[]),S=ve.useCallback(Y=>{Y!==P.current&&(P.current=Y,x(Y))},[]),E=o||m,_=a||b,R=ve.useRef(null),P=ve.useRef(null),N=ve.useRef(f),j=c!=null,L=Im(c),F=Im(i),k=Im(d),D=ve.useCallback(()=>{if(!R.current||!P.current)return;const Y={placement:t,strategy:r,middleware:p};F.current&&(Y.platform=F.current),w7(R.current,P.current,Y).then(ee=>{const H={...ee,isPositioned:k.current!==!1};T.current&&!oc(N.current,H)&&(N.current=H,Gb.flushSync(()=>{h(H)}))})},[p,t,r,F,k]);ku(()=>{d===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(Y=>({...Y,isPositioned:!1})))},[d]);const T=ve.useRef(!1);ku(()=>(T.current=!0,()=>{T.current=!1}),[]),ku(()=>{if(E&&(R.current=E),_&&(P.current=_),E&&_){if(L.current)return L.current(E,_,D);D()}},[E,_,D,L,j]);const B=ve.useMemo(()=>({reference:R,floating:P,setReference:w,setFloating:S}),[w,S]),$=ve.useMemo(()=>({reference:E,floating:_}),[E,_]),W=ve.useMemo(()=>{const Y={position:r,left:0,top:0};if(!$.floating)return Y;const ee=UI($.floating,f.x),H=UI($.floating,f.y);return u?{...Y,transform:"translate("+ee+"px, "+H+"px)",...Wq($.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ee,top:H}},[r,u,$.floating,f.x,f.y]);return ve.useMemo(()=>({...f,update:D,refs:B,elements:$,floatingStyles:W}),[f,D,B,$,W])}const O7=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?HI({element:n.current,padding:i}).fn(r):{}:n?HI({element:n,padding:i}).fn(r):{}}}},C7=(e,t)=>({...v7(e),options:[e,t]}),R7=(e,t)=>({...g7(e),options:[e,t]}),P7=(e,t)=>({...x7(e),options:[e,t]}),I7=(e,t)=>({...m7(e),options:[e,t]}),N7=(e,t)=>({...y7(e),options:[e,t]}),T7=(e,t)=>({...b7(e),options:[e,t]}),A7=(e,t)=>({...O7(e),options:[e,t]});function M7(e){const t=D7(e),r=ve.forwardRef((n,i)=>{const{children:o,...a}=n,u=ve.Children.toArray(o),c=u.find(q7);if(c){const d=c.props.children,f=u.map(h=>h===c?ve.Children.count(d)>1?ve.Children.only(null):ve.isValidElement(d)?d.props.children:null:h);return C.jsx(t,{...a,ref:i,children:ve.isValidElement(d)?ve.cloneElement(d,void 0,f):null})}return C.jsx(t,{...a,ref:i,children:o})});return r.displayName=`${e}.Slot`,r}function D7(e){const t=ve.forwardRef((r,n)=>{const{children:i,...o}=r;if(ve.isValidElement(i)){const a=L7(i),u=k7(o,i.props);return i.type!==ve.Fragment&&(u.ref=n?jq(n,a):a),ve.cloneElement(i,u)}return ve.Children.count(i)>1?ve.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var j7=Symbol("radix.slottable");function q7(e){return ve.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===j7}function k7(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...u)=>{const c=o(...u);return i(...u),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function L7(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var B7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Si=B7.reduce((e,t)=>{const r=M7(`Primitive.${t}`),n=ve.forwardRef((i,o)=>{const{asChild:a,...u}=i,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(c,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function F7(e,t){e&&Gb.flushSync(()=>e.dispatchEvent(t))}var $7="Arrow",Gq=ve.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...o}=e;return C.jsx(Si.svg,{...o,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});Gq.displayName=$7;var z7=Gq;function Kc(e){const t=ve.useRef(e);return ve.useEffect(()=>{t.current=e}),ve.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function H7(e){const[t,r]=ve.useState(void 0);return mi(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,u;if("borderBoxSize"in o){const c=o.borderBoxSize,d=Array.isArray(c)?c[0]:c;a=d.inlineSize,u=d.blockSize}else a=e.offsetWidth,u=e.offsetHeight;r({width:a,height:u})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Lx="Popper",[Kq,Yq]=Dq(Lx),[U7,Xq]=Kq(Lx),Zq=e=>{const{__scopePopper:t,children:r}=e,[n,i]=ve.useState(null);return C.jsx(U7,{scope:t,anchor:n,onAnchorChange:i,children:r})};Zq.displayName=Lx;var Jq="PopperAnchor",Qq=ve.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,o=Xq(Jq,r),a=ve.useRef(null),u=Eo(t,a),c=ve.useRef(null);return ve.useEffect(()=>{const d=c.current;c.current=(n==null?void 0:n.current)||a.current,d!==c.current&&o.onAnchorChange(c.current)}),n?null:C.jsx(Si.div,{...i,ref:u})});Qq.displayName=Jq;var Bx="PopperContent",[V7,W7]=Kq(Bx),e2=ve.forwardRef((e,t)=>{var V,K,ie,ne,ue,de;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:v="optimized",onPlaced:m,...y}=e,b=Xq(Bx,r),[x,w]=ve.useState(null),S=Eo(t,we=>w(we)),[E,_]=ve.useState(null),R=H7(E),P=(R==null?void 0:R.width)??0,N=(R==null?void 0:R.height)??0,j=n+(o!=="center"?"-"+o:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},F=Array.isArray(d)?d:[d],k=F.length>0,D={padding:L,boundary:F.filter(K7),altBoundary:k},{refs:T,floatingStyles:B,placement:$,isPositioned:W,middlewareData:Y}=S7({strategy:"fixed",placement:j,whileElementsMounted:(...we)=>p7(...we,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[C7({mainAxis:i+N,alignmentAxis:a}),c&&R7({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?P7():void 0,...D}),c&&I7({...D}),N7({...D,apply:({elements:we,rects:Se,availableWidth:_e,availableHeight:he})=>{const{width:ae,height:Oe}=Se.reference,Ne=we.floating.style;Ne.setProperty("--radix-popper-available-width",`${_e}px`),Ne.setProperty("--radix-popper-available-height",`${he}px`),Ne.setProperty("--radix-popper-anchor-width",`${ae}px`),Ne.setProperty("--radix-popper-anchor-height",`${Oe}px`)}}),E&&A7({element:E,padding:u}),Y7({arrowWidth:P,arrowHeight:N}),p&&T7({strategy:"referenceHidden",...D})]}),[ee,H]=n2($),Q=Kc(m);mi(()=>{W&&(Q==null||Q())},[W,Q]);const ce=(V=Y.arrow)==null?void 0:V.x,se=(K=Y.arrow)==null?void 0:K.y,z=((ie=Y.arrow)==null?void 0:ie.centerOffset)!==0,[G,J]=ve.useState();return mi(()=>{x&&J(window.getComputedStyle(x).zIndex)},[x]),C.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:W?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(ne=Y.transformOrigin)==null?void 0:ne.x,(ue=Y.transformOrigin)==null?void 0:ue.y].join(" "),...((de=Y.hide)==null?void 0:de.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(V7,{scope:r,placedSide:ee,onArrowChange:_,arrowX:ce,arrowY:se,shouldHideArrow:z,children:C.jsx(Si.div,{"data-side":ee,"data-align":H,...y,ref:S,style:{...y.style,animation:W?void 0:"none"}})})})});e2.displayName=Bx;var t2="PopperArrow",G7={top:"bottom",right:"left",bottom:"top",left:"right"},r2=ve.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,o=W7(t2,n),a=G7[o.placedSide];return C.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:C.jsx(z7,{...i,ref:r,style:{...i.style,display:"block"}})})});r2.displayName=t2;function K7(e){return e!==null}var Y7=e=>({name:"transformOrigin",options:e,fn(t){var b,x,w;const{placement:r,rects:n,middlewareData:i}=t,a=((b=i.arrow)==null?void 0:b.centerOffset)!==0,u=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[d,f]=n2(r),h={start:"0%",center:"50%",end:"100%"}[f],p=(((x=i.arrow)==null?void 0:x.x)??0)+u/2,v=(((w=i.arrow)==null?void 0:w.y)??0)+c/2;let m="",y="";return d==="bottom"?(m=a?h:`${p}px`,y=`${-c}px`):d==="top"?(m=a?h:`${p}px`,y=`${n.floating.height+c}px`):d==="right"?(m=`${-c}px`,y=a?h:`${v}px`):d==="left"&&(m=`${n.floating.width+c}px`,y=a?h:`${v}px`),{data:{x:m,y}}}});function n2(e){const[t,r="center"]=e.split("-");return[t,r]}var X7=Zq,Z7=Qq,J7=e2,Q7=r2,eX="Portal",i2=ve.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=ve.useState(!1);mi(()=>o(!0),[]);const a=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?iD.createPortal(C.jsx(Si.div,{...n,ref:t}),a):null});i2.displayName=eX;function tX(e,t){return ve.useReducer((r,n)=>t[r][n]??r,e)}var Fx=e=>{const{present:t,children:r}=e,n=rX(t),i=typeof r=="function"?r({present:n.isPresent}):ve.Children.only(r),o=Eo(n.ref,nX(i));return typeof r=="function"||n.isPresent?ve.cloneElement(i,{ref:o}):null};Fx.displayName="Presence";function rX(e){const[t,r]=ve.useState(),n=ve.useRef(null),i=ve.useRef(e),o=ve.useRef("none"),a=e?"mounted":"unmounted",[u,c]=tX(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ve.useEffect(()=>{const d=xu(n.current);o.current=u==="mounted"?d:"none"},[u]),mi(()=>{const d=n.current,f=i.current;if(f!==e){const p=o.current,v=xu(d);e?c("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(f&&p!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),mi(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=v=>{const y=xu(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&y&&(c("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=v=>{v.target===t&&(o.current=xu(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:ve.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function xu(e){return(e==null?void 0:e.animationName)||"none"}function nX(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function iX(e,t=globalThis==null?void 0:globalThis.document){const r=Kc(e);ve.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var oX="DismissableLayer",zb="dismissableLayer.update",aX="dismissableLayer.pointerDownOutside",sX="dismissableLayer.focusOutside",VI,o2=ve.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),a2=ve.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...c}=e,d=ve.useContext(o2),[f,h]=ve.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=ve.useState({}),m=Eo(t,P=>h(P)),y=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(b),w=f?y.indexOf(f):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,E=w>=x,_=lX(P=>{const N=P.target,j=[...d.branches].some(L=>L.contains(N));!E||j||(i==null||i(P),a==null||a(P),P.defaultPrevented||u==null||u())},p),R=fX(P=>{const N=P.target;[...d.branches].some(L=>L.contains(N))||(o==null||o(P),a==null||a(P),P.defaultPrevented||u==null||u())},p);return iX(P=>{w===d.layers.size-1&&(n==null||n(P),!P.defaultPrevented&&u&&(P.preventDefault(),u()))},p),ve.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(VI=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),WI(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=VI)}},[f,p,r,d]),ve.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),WI())},[f,d]),ve.useEffect(()=>{const P=()=>v({});return document.addEventListener(zb,P),()=>document.removeEventListener(zb,P)},[]),C.jsx(Si.div,{...c,ref:m,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:br(e.onFocusCapture,R.onFocusCapture),onBlurCapture:br(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:br(e.onPointerDownCapture,_.onPointerDownCapture)})});a2.displayName=oX;var uX="DismissableLayerBranch",cX=ve.forwardRef((e,t)=>{const r=ve.useContext(o2),n=ve.useRef(null),i=Eo(t,n);return ve.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),C.jsx(Si.div,{...e,ref:i})});cX.displayName=uX;function lX(e,t=globalThis==null?void 0:globalThis.document){const r=Kc(e),n=ve.useRef(!1),i=ve.useRef(()=>{});return ve.useEffect(()=>{const o=u=>{if(u.target&&!n.current){let c=function(){s2(aX,r,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function fX(e,t=globalThis==null?void 0:globalThis.document){const r=Kc(e),n=ve.useRef(!1);return ve.useEffect(()=>{const i=o=>{o.target&&!n.current&&s2(sX,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function WI(){const e=new CustomEvent(zb);document.dispatchEvent(e)}function s2(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?F7(i,o):i.dispatchEvent(o)}var Nm,Yc="HoverCard",[u2]=Dq(Yc,[Yq]),Xc=Yq(),[dX,Zc]=u2(Yc),c2=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:i,onOpenChange:o,openDelay:a=700,closeDelay:u=300}=e,c=Xc(t),d=ve.useRef(0),f=ve.useRef(0),h=ve.useRef(!1),p=ve.useRef(!1),[v,m]=x9({prop:n,defaultProp:i??!1,onChange:o,caller:Yc}),y=ve.useCallback(()=>{clearTimeout(f.current),d.current=window.setTimeout(()=>m(!0),a)},[a,m]),b=ve.useCallback(()=>{clearTimeout(d.current),!h.current&&!p.current&&(f.current=window.setTimeout(()=>m(!1),u))},[u,m]),x=ve.useCallback(()=>m(!1),[m]);return ve.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(f.current)},[]),C.jsx(dX,{scope:t,open:v,onOpenChange:m,onOpen:y,onClose:b,onDismiss:x,hasSelectionRef:h,isPointerDownOnContentRef:p,children:C.jsx(X7,{...c,children:r})})};c2.displayName=Yc;var l2="HoverCardTrigger",f2=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Zc(l2,r),o=Xc(r);return C.jsx(Z7,{asChild:!0,...o,children:C.jsx(Si.a,{"data-state":i.open?"open":"closed",...n,ref:t,onPointerEnter:br(e.onPointerEnter,sc(i.onOpen)),onPointerLeave:br(e.onPointerLeave,sc(i.onClose)),onFocus:br(e.onFocus,i.onOpen),onBlur:br(e.onBlur,i.onClose),onTouchStart:br(e.onTouchStart,a=>a.preventDefault())})})});f2.displayName=l2;var $x="HoverCardPortal",[hX,pX]=u2($x,{forceMount:void 0}),d2=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:i}=e,o=Zc($x,t);return C.jsx(hX,{scope:t,forceMount:r,children:C.jsx(Fx,{present:r||o.open,children:C.jsx(i2,{asChild:!0,container:i,children:n})})})};d2.displayName=$x;var ac="HoverCardContent",h2=ve.forwardRef((e,t)=>{const r=pX(ac,e.__scopeHoverCard),{forceMount:n=r.forceMount,...i}=e,o=Zc(ac,e.__scopeHoverCard);return C.jsx(Fx,{present:n||o.open,children:C.jsx(vX,{"data-state":o.open?"open":"closed",...i,onPointerEnter:br(e.onPointerEnter,sc(o.onOpen)),onPointerLeave:br(e.onPointerLeave,sc(o.onClose)),ref:t})})});h2.displayName=ac;var vX=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,...u}=e,c=Zc(ac,r),d=Xc(r),f=ve.useRef(null),h=Eo(t,f),[p,v]=ve.useState(!1);return ve.useEffect(()=>{if(p){const m=document.body;return Nm=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=Nm,m.style.webkitUserSelect=Nm}}},[p]),ve.useEffect(()=>{if(f.current){const m=()=>{v(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var b;((b=document.getSelection())==null?void 0:b.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",m),()=>{document.removeEventListener("pointerup",m),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),ve.useEffect(()=>{f.current&&yX(f.current).forEach(y=>y.setAttribute("tabindex","-1"))}),C.jsx(a2,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:br(o,m=>{m.preventDefault()}),onDismiss:c.onDismiss,children:C.jsx(J7,{...d,...u,onPointerDown:br(u.onPointerDown,m=>{m.currentTarget.contains(m.target)&&v(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:h,style:{...u.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),gX="HoverCardArrow",mX=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Xc(r);return C.jsx(Q7,{...i,...n,ref:t})});mX.displayName=gX;function sc(e){return t=>t.pointerType==="touch"?void 0:e()}function yX(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}var zx=c2,Hx=f2,Dr=d2,jr=h2;const bX=({item:e,depth:t})=>{const[r,n]=A.useState(!1),i=Z.useAppSelector(Z.selectPrivileges),o=Z.populateShallow(e.includes,i);return C.jsxs("div",{className:"py-1 text-xs text-white",children:[C.jsxs("div",{className:"flex items-center",children:[C.jsx("button",{className:"-ml-1",onClick:a=>{a.stopPropagation(),n(!r)},children:C.jsx(ye.FdRight,{className:Ve("h-4 w-4",{"tranform rotate-90":r})})})," ",C.jsx("div",{children:e.privilege})]}),C.jsx("div",{className:"border-l pl-2",style:{marginLeft:t?t*4:3},children:r&&C.jsx(p2,{depth:t+1,data:o})})]})},p2=({data:e,depth:t=0})=>e.map(r=>r.includes.length?C.jsx(bX,{item:r,depth:t},r.id):C.jsx("div",{className:Ve("py-1 text-xs text-white",{}),children:r.privilege},r.id)),GI=zx,KI=Hx,YI=({privilege:e,selectedPrivilege:t,onSelect:r,isGuest:n=!1})=>{const i=Z.useAppDispatch(),o=Z.useAppSelector(Z.selectPrivileges),a=Z.populateShallow(e.includes,o),[u,c]=A.useState(!1),[d,f]=A.useState(e.privilege),[h,p]=A.useState(null),v=De.useOutsideClick(()=>{u&&b()});function m(){c(!0)}function y(){c(!1),f(e.privilege)}function b(){p(null);try{const S=Z.rename(d,e.id,o);i(Z.updatePrivileges(S)),c(!1)}catch(S){p(S.message)}}const x=async S=>{S.stopPropagation();const{confirmed:E}=await i(Z.openModal({title:"Delete Privilege",type:De.ModalType.CONFIRM,color:De.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"})).unwrap();if(E){const _=Z.remove(e.id,o);i(Z.updatePrivileges(_)),r(null)}},w=A.useMemo(()=>e.resources.some(S=>S.exists===!1),[e]);return C.jsxs(GI,{openDelay:0,closeDelay:0,children:[C.jsx(KI,{asChild:!0,children:C.jsxs("div",{className:Ve("rounded border bg-grey-300 p-2",{"border-grey-100":(t==null?void 0:t.id)!==e.id,"border-primary-dark":(t==null?void 0:t.id)===e.id,"border-red-400":w&&(t==null?void 0:t.id)!==e.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{r(e)},ref:v,children:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsxs("div",{className:"flex flex-1 items-center text-white",children:[C.jsx("span",{className:"mr-4",children:n?C.jsx(ye.FdGuest,{className:"h-6 w-6"}):C.jsx(ye.FdGroup,{className:"h-6 w-6"})}),u?C.jsxs("div",{className:"relative h-6 flex-1",children:[C.jsx("input",{autoFocus:!0,onKeyDown:S=>{S.key==="Enter"&&b(),S.key==="Escape"&&y()},type:"text",className:Ve("absolute inset-0 mr-2 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:border-primary-dark focus:outline-none",{"border-b border-red-400":h}),value:d,onChange:S=>f(S.target.value)}),h&&C.jsx("p",{className:"absolute top-5 mt-1 rounded bg-red-400 p-1 text-xs text-white shadow-md",children:h})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:d})]}),n?C.jsx("div",{className:"flex items-center justify-center",children:C.jsxs(GI,{openDelay:0,closeDelay:0,children:[C.jsx(KI,{asChild:!0,children:C.jsx("span",{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-grey-50"})})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"the guest privilege must be used to indicate resources accessible without any permission required (e.g. an authenticate function)"})]})})})})]})}):C.jsx("div",{className:"flex items-center space-x-2",children:u?C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:y,children:C.jsx("span",{children:C.jsx(ye.FdClose,{className:"h-4 w-4 text-grey-50"})})}),C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:b,children:C.jsx("span",{children:C.jsx(ye.FdCheckCircle,{className:"h-4 w-4 text-grey-50"})})})]}):C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:m,children:C.jsx("span",{children:C.jsx(ye.FdPen,{className:"h-4 w-4 text-grey-50"})})}),C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:x,children:C.jsx("span",{children:C.jsx(ye.FdTrash,{className:"h-4 w-4 text-grey-50"})})})]})})]}),a.length?C.jsx("div",{className:"ml-[43px]",children:C.jsx(p2,{data:a})}):null]})}),C.jsx(Dr,{children:C.jsxs(jr,{hidden:!w,style:{zIndex:50},avoidCollisions:!0,side:"top",className:"text-red-500 mb-1 flex max-w-xs items-center gap-x-1 rounded bg-negative-200 px-2 py-2 text-s font-semibold",children:[C.jsx(ye.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"This privilege uses non-existing resources"})]})})]})},xX=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=Z.useAppSelector(Z.selectGuestPrivilege),i=Z.useAppSelector(Z.selectCatalog),o=A.useMemo(()=>{if(i===null||!n)return n;const a=Aq({guest:n},Object.values((i==null?void 0:i.dataClasses)??{}));return Mq(a,i).guest},[e,i]);return C.jsxs("div",{className:"flex flex-1 flex-col gap-y-4 overflow-auto p-4 pb-10 pt-1",children:[o?C.jsx(YI,{privilege:o,onSelect:t,selectedPrivilege:r,isGuest:!0}):null,Object.entries(e).length?Object.entries(e).filter(([,a])=>a.privilege!=="guest").map(([a,u])=>C.jsx(YI,{privilege:u,onSelect:t,selectedPrivilege:r},a)):C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsx("div",{className:"flex flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"font-semibold",children:"There are no privileges"}),C.jsxs("div",{className:"flex items-center text-sm",children:["Create a new Privilege by clicking on the"," ",C.jsx(ye.FdPlus,{className:"ml-2 inline h-4 w-4 text-white"})]})]})})})]})};var wu={exports:{}},_u={exports:{}},Ke={};/** @license React v16.13.1
5
+ */var k1;function Yz(){return k1||(k1=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",a=0;a<arguments.length;a++){var u=arguments[a];u&&(o=i(o,n(u)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var u in o)t.call(o,u)&&o[u]&&(a=i(a,u));return a}function i(o,a){return a?o?o+" "+a:o+a:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Vf)),Vf.exports}var Xz=Yz();const Ve=Hn(Xz);function Zz({qodly:e,activeTab:t,forceLogin:r,onTabChange:n,restrictedByDefault:i,onRestrictedByDefaultChange:o,onForceLoginChange:a}){return C.jsx(C.Fragment,{children:C.jsx("nav",{className:"relative mb-0 flex h-auto flex-wrap items-center justify-between border-b border-grey-900 bg-grey-800 px-4 py-3",children:C.jsx("div",{className:"flex w-full flex-wrap items-center justify-between",children:C.jsxs("div",{className:"relative flex w-full justify-between",children:[C.jsx("span",{className:"inline-block whitespace-nowrap text-sm leading-relaxed text-white",children:C.jsxs("div",{className:"flex items-center justify-center",children:[C.jsx("button",{"data-cy":"roles_btn_navbar",className:Ve(" min-w-[110px] rounded-l px-4 py-2 text-xs text-white outline-none transition-all duration-150 ease-linear focus:bg-primary-dark focus:text-white focus:outline-none",t==="roles"?"bg-primary-dark font-bold":"bg-grey-300 hover:bg-primary-hover hover:text-white"),type:"button",onClick:()=>n("roles"),children:"Roles"}),C.jsx("button",{"data-cy":"privileges_btn_navbar",className:Ve(" min-w-[110px] rounded-r px-4 py-2 text-xs text-white outline-none transition-all duration-150 ease-linear focus:bg-primary-dark focus:text-white focus:outline-none",t==="privileges"?"bg-primary-dark font-bold":"bg-grey-300 hover:bg-primary-hover hover:text-white"),type:"button",onClick:()=>n("privileges"),children:"Privileges"})]})}),C.jsxs("div",{className:"flex gap-2 justify-between",children:[C.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[C.jsx(De.ControlledSwitch,{size:"sm",value:i||!1,onChange:u=>{o(u)}}),C.jsx("span",{className:"px-1 text-xs text-white",children:"Restrict Access By Default"}),C.jsx(De.Tip,{tipKey:"editors:roles:toolbar:restrictedByDefault",alwaysOn:!0,side:"left"})]}),e===!1&&C.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[C.jsx(De.ControlledSwitch,{size:"sm",value:r||!1,onChange:u=>{a(u)}}),C.jsx("span",{className:"px-1 text-xs text-white",children:"Force login"}),C.jsx(De.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const sD=A.createContext(void 0),Jz=({children:e})=>{const[t,r]=A.useState(null);function n(o){r(o)}const i={selectedRole:t,selectRole:n};return C.jsx(sD.Provider,{value:i,children:e})};function Yb(){const e=A.useContext(sD);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var L1=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},B1=typeof window<"u"&&window.document&&window.document.createElement?ve.useLayoutEffect:ve.useEffect,Wt="top",_r="bottom",Er="right",Gt="left",Xb="auto",Ba=[Wt,_r,Er,Gt],co="start",Ia="end",Qz="clippingParents",uD="viewport",Xo="popper",eH="reference",F1=Ba.reduce(function(e,t){return e.concat([t+"-"+co,t+"-"+Ia])},[]),cD=[].concat(Ba,[Xb]).reduce(function(e,t){return e.concat([t,t+"-"+co,t+"-"+Ia])},[]),tH="beforeRead",rH="read",nH="afterRead",iH="beforeMain",oH="main",aH="afterMain",sH="beforeWrite",uH="write",cH="afterWrite",lH=[tH,rH,nH,iH,oH,aH,sH,uH,cH];function tn(e){return e?(e.nodeName||"").toLowerCase():null}function ar(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pi(e){var t=ar(e).Element;return e instanceof t||e instanceof Element}function wr(e){var t=ar(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Zb(e){if(typeof ShadowRoot>"u")return!1;var t=ar(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function fH(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!wr(o)||!tn(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var u=i[a];u===!1?o.removeAttribute(a):o.setAttribute(a,u===!0?"":u)}))})}function dH(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},a=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),u=a.reduce(function(c,d){return c[d]="",c},{});!wr(i)||!tn(i)||(Object.assign(i.style,u),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const hH={name:"applyStyles",enabled:!0,phase:"write",fn:fH,effect:dH,requires:["computeStyles"]};function Jr(e){return e.split("-")[0]}var ui=Math.max,zu=Math.min,lo=Math.round;function _b(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function lD(){return!/^((?!chrome|android).)*safari/i.test(_b())}function fo(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&wr(e)&&(i=e.offsetWidth>0&&lo(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&lo(n.height)/e.offsetHeight||1);var a=pi(e)?ar(e):window,u=a.visualViewport,c=!lD()&&r,d=(n.left+(c&&u?u.offsetLeft:0))/i,f=(n.top+(c&&u?u.offsetTop:0))/o,h=n.width/i,p=n.height/o;return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function Jb(e){var t=fo(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function fD(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Zb(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function yn(e){return ar(e).getComputedStyle(e)}function pH(e){return["table","td","th"].indexOf(tn(e))>=0}function Un(e){return((pi(e)?e.ownerDocument:e.document)||window.document).documentElement}function bc(e){return tn(e)==="html"?e:e.assignedSlot||e.parentNode||(Zb(e)?e.host:null)||Un(e)}function $1(e){return!wr(e)||yn(e).position==="fixed"?null:e.offsetParent}function vH(e){var t=/firefox/i.test(_b()),r=/Trident/i.test(_b());if(r&&wr(e)){var n=yn(e);if(n.position==="fixed")return null}var i=bc(e);for(Zb(i)&&(i=i.host);wr(i)&&["html","body"].indexOf(tn(i))<0;){var o=yn(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Fa(e){for(var t=ar(e),r=$1(e);r&&pH(r)&&yn(r).position==="static";)r=$1(r);return r&&(tn(r)==="html"||tn(r)==="body"&&yn(r).position==="static")?t:r||vH(e)||t}function Qb(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Sa(e,t,r){return ui(e,zu(t,r))}function gH(e,t,r){var n=Sa(e,t,r);return n>r?r:n}function dD(){return{top:0,right:0,bottom:0,left:0}}function hD(e){return Object.assign({},dD(),e)}function pD(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var mH=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,hD(typeof t!="number"?t:pD(t,Ba))};function yH(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,u=Jr(r.placement),c=Qb(u),d=[Gt,Er].indexOf(u)>=0,f=d?"height":"width";if(!(!o||!a)){var h=mH(i.padding,r),p=Jb(o),v=c==="y"?Wt:Gt,m=c==="y"?_r:Er,y=r.rects.reference[f]+r.rects.reference[c]-a[c]-r.rects.popper[f],b=a[c]-r.rects.reference[c],x=Fa(o),w=x?c==="y"?x.clientHeight||0:x.clientWidth||0:0,S=y/2-b/2,E=h[v],_=w-p[f]-h[m],R=w/2-p[f]/2+S,P=Sa(E,R,_),N=c;r.modifiersData[n]=(t={},t[N]=P,t.centerOffset=P-R,t)}}function bH(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||fD(t.elements.popper,i)&&(t.elements.arrow=i))}const xH={name:"arrow",enabled:!0,phase:"main",fn:yH,effect:bH,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ho(e){return e.split("-")[1]}var wH={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _H(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:lo(r*i)/i||0,y:lo(n*i)/i||0}}function z1(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,u=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=a.x,v=p===void 0?0:p,m=a.y,y=m===void 0?0:m,b=typeof f=="function"?f({x:v,y}):{x:v,y};v=b.x,y=b.y;var x=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),S=Gt,E=Wt,_=window;if(d){var R=Fa(r),P="clientHeight",N="clientWidth";if(R===ar(r)&&(R=Un(r),yn(R).position!=="static"&&u==="absolute"&&(P="scrollHeight",N="scrollWidth")),R=R,i===Wt||(i===Gt||i===Er)&&o===Ia){E=_r;var j=h&&R===_&&_.visualViewport?_.visualViewport.height:R[P];y-=j-n.height,y*=c?1:-1}if(i===Gt||(i===Wt||i===_r)&&o===Ia){S=Er;var L=h&&R===_&&_.visualViewport?_.visualViewport.width:R[N];v-=L-n.width,v*=c?1:-1}}var F=Object.assign({position:u},d&&wH),k=f===!0?_H({x:v,y},ar(r)):{x:v,y};if(v=k.x,y=k.y,c){var D;return Object.assign({},F,(D={},D[E]=w?"0":"",D[S]=x?"0":"",D.transform=(_.devicePixelRatio||1)<=1?"translate("+v+"px, "+y+"px)":"translate3d("+v+"px, "+y+"px, 0)",D))}return Object.assign({},F,(t={},t[E]=w?y+"px":"",t[S]=x?v+"px":"",t.transform="",t))}function EH(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,a=o===void 0?!0:o,u=r.roundOffsets,c=u===void 0?!0:u,d={placement:Jr(t.placement),variation:ho(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,z1(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,z1(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const SH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:EH,data:{}};var su={passive:!0};function OH(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,u=a===void 0?!0:a,c=ar(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",r.update,su)}),u&&c.addEventListener("resize",r.update,su),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",r.update,su)}),u&&c.removeEventListener("resize",r.update,su)}}const CH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:OH,data:{}};var RH={left:"right",right:"left",bottom:"top",top:"bottom"};function Au(e){return e.replace(/left|right|bottom|top/g,function(t){return RH[t]})}var PH={start:"end",end:"start"};function H1(e){return e.replace(/start|end/g,function(t){return PH[t]})}function ex(e){var t=ar(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function tx(e){return fo(Un(e)).left+ex(e).scrollLeft}function IH(e,t){var r=ar(e),n=Un(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;var d=lD();(d||!d&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:u+tx(e),y:c}}function NH(e){var t,r=Un(e),n=ex(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=ui(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=ui(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-n.scrollLeft+tx(e),c=-n.scrollTop;return yn(i||r).direction==="rtl"&&(u+=ui(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:c}}function rx(e){var t=yn(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function vD(e){return["html","body","#document"].indexOf(tn(e))>=0?e.ownerDocument.body:wr(e)&&rx(e)?e:vD(bc(e))}function Oa(e,t){var r;t===void 0&&(t=[]);var n=vD(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=ar(n),a=i?[o].concat(o.visualViewport||[],rx(n)?n:[]):n,u=t.concat(a);return i?u:u.concat(Oa(bc(a)))}function Eb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function TH(e,t){var r=fo(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function U1(e,t,r){return t===uD?Eb(IH(e,r)):pi(t)?TH(t,r):Eb(NH(Un(e)))}function AH(e){var t=Oa(bc(e)),r=["absolute","fixed"].indexOf(yn(e).position)>=0,n=r&&wr(e)?Fa(e):e;return pi(n)?t.filter(function(i){return pi(i)&&fD(i,n)&&tn(i)!=="body"}):[]}function MH(e,t,r,n){var i=t==="clippingParents"?AH(e):[].concat(t),o=[].concat(i,[r]),a=o[0],u=o.reduce(function(c,d){var f=U1(e,d,n);return c.top=ui(f.top,c.top),c.right=zu(f.right,c.right),c.bottom=zu(f.bottom,c.bottom),c.left=ui(f.left,c.left),c},U1(e,a,n));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function gD(e){var t=e.reference,r=e.element,n=e.placement,i=n?Jr(n):null,o=n?ho(n):null,a=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2,c;switch(i){case Wt:c={x:a,y:t.y-r.height};break;case _r:c={x:a,y:t.y+t.height};break;case Er:c={x:t.x+t.width,y:u};break;case Gt:c={x:t.x-r.width,y:u};break;default:c={x:t.x,y:t.y}}var d=i?Qb(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case co:c[d]=c[d]-(t[f]/2-r[f]/2);break;case Ia:c[d]=c[d]+(t[f]/2-r[f]/2);break}}return c}function Na(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.strategy,a=o===void 0?e.strategy:o,u=r.boundary,c=u===void 0?Qz:u,d=r.rootBoundary,f=d===void 0?uD:d,h=r.elementContext,p=h===void 0?Xo:h,v=r.altBoundary,m=v===void 0?!1:v,y=r.padding,b=y===void 0?0:y,x=hD(typeof b!="number"?b:pD(b,Ba)),w=p===Xo?eH:Xo,S=e.rects.popper,E=e.elements[m?w:p],_=MH(pi(E)?E:E.contextElement||Un(e.elements.popper),c,f,a),R=fo(e.elements.reference),P=gD({reference:R,element:S,placement:i}),N=Eb(Object.assign({},S,P)),j=p===Xo?N:R,L={top:_.top-j.top+x.top,bottom:j.bottom-_.bottom+x.bottom,left:_.left-j.left+x.left,right:j.right-_.right+x.right},F=e.modifiersData.offset;if(p===Xo&&F){var k=F[i];Object.keys(L).forEach(function(D){var T=[Er,_r].indexOf(D)>=0?1:-1,B=[Wt,_r].indexOf(D)>=0?"y":"x";L[D]+=k[B]*T})}return L}function DH(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,u=r.flipVariations,c=r.allowedAutoPlacements,d=c===void 0?cD:c,f=ho(n),h=f?u?F1:F1.filter(function(m){return ho(m)===f}):Ba,p=h.filter(function(m){return d.indexOf(m)>=0});p.length===0&&(p=h);var v=p.reduce(function(m,y){return m[y]=Na(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[Jr(y)],m},{});return Object.keys(v).sort(function(m,y){return v[m]-v[y]})}function jH(e){if(Jr(e)===Xb)return[];var t=Au(e);return[H1(e),t,H1(t)]}function qH(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,u=a===void 0?!0:a,c=r.fallbackPlacements,d=r.padding,f=r.boundary,h=r.rootBoundary,p=r.altBoundary,v=r.flipVariations,m=v===void 0?!0:v,y=r.allowedAutoPlacements,b=t.options.placement,x=Jr(b),w=x===b,S=c||(w||!m?[Au(b)]:jH(b)),E=[b].concat(S).reduce(function(z,G){return z.concat(Jr(G)===Xb?DH(t,{placement:G,boundary:f,rootBoundary:h,padding:d,flipVariations:m,allowedAutoPlacements:y}):G)},[]),_=t.rects.reference,R=t.rects.popper,P=new Map,N=!0,j=E[0],L=0;L<E.length;L++){var F=E[L],k=Jr(F),D=ho(F)===co,T=[Wt,_r].indexOf(k)>=0,B=T?"width":"height",$=Na(t,{placement:F,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),W=T?D?Er:Gt:D?_r:Wt;_[B]>R[B]&&(W=Au(W));var Y=Au(W),ee=[];if(o&&ee.push($[k]<=0),u&&ee.push($[W]<=0,$[Y]<=0),ee.every(function(z){return z})){j=F,N=!1;break}P.set(F,ee)}if(N)for(var H=m?3:1,Q=function(G){var J=E.find(function(V){var K=P.get(V);if(K)return K.slice(0,G).every(function(ie){return ie})});if(J)return j=J,"break"},ce=H;ce>0;ce--){var se=Q(ce);if(se==="break")break}t.placement!==j&&(t.modifiersData[n]._skip=!0,t.placement=j,t.reset=!0)}}const kH={name:"flip",enabled:!0,phase:"main",fn:qH,requiresIfExists:["offset"],data:{_skip:!1}};function V1(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function W1(e){return[Wt,Er,_r,Gt].some(function(t){return e[t]>=0})}function LH(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Na(t,{elementContext:"reference"}),u=Na(t,{altBoundary:!0}),c=V1(a,n),d=V1(u,i,o),f=W1(c),h=W1(d);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const BH={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:LH};function FH(e,t,r){var n=Jr(e),i=[Gt,Wt].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=o[0],u=o[1];return a=a||0,u=(u||0)*i,[Gt,Er].indexOf(n)>=0?{x:u,y:a}:{x:a,y:u}}function $H(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=cD.reduce(function(f,h){return f[h]=FH(h,t.rects,o),f},{}),u=a[t.placement],c=u.x,d=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[n]=a}const zH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:$H};function HH(e){var t=e.state,r=e.name;t.modifiersData[r]=gD({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const UH={name:"popperOffsets",enabled:!0,phase:"read",fn:HH,data:{}};function VH(e){return e==="x"?"y":"x"}function WH(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,u=a===void 0?!1:a,c=r.boundary,d=r.rootBoundary,f=r.altBoundary,h=r.padding,p=r.tether,v=p===void 0?!0:p,m=r.tetherOffset,y=m===void 0?0:m,b=Na(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),x=Jr(t.placement),w=ho(t.placement),S=!w,E=Qb(x),_=VH(E),R=t.modifiersData.popperOffsets,P=t.rects.reference,N=t.rects.popper,j=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,L=typeof j=="number"?{mainAxis:j,altAxis:j}:Object.assign({mainAxis:0,altAxis:0},j),F=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(R){if(o){var D,T=E==="y"?Wt:Gt,B=E==="y"?_r:Er,$=E==="y"?"height":"width",W=R[E],Y=W+b[T],ee=W-b[B],H=v?-N[$]/2:0,Q=w===co?P[$]:N[$],ce=w===co?-N[$]:-P[$],se=t.elements.arrow,z=v&&se?Jb(se):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:dD(),J=G[T],V=G[B],K=Sa(0,P[$],z[$]),ie=S?P[$]/2-H-K-J-L.mainAxis:Q-K-J-L.mainAxis,ne=S?-P[$]/2+H+K+V+L.mainAxis:ce+K+V+L.mainAxis,ue=t.elements.arrow&&Fa(t.elements.arrow),de=ue?E==="y"?ue.clientTop||0:ue.clientLeft||0:0,we=(D=F==null?void 0:F[E])!=null?D:0,Se=W+ie-we-de,_e=W+ne-we,he=Sa(v?zu(Y,Se):Y,W,v?ui(ee,_e):ee);R[E]=he,k[E]=he-W}if(u){var ae,Oe=E==="x"?Wt:Gt,Ne=E==="x"?_r:Er,He=R[_],qe=_==="y"?"height":"width",Xe=He+b[Oe],We=He-b[Ne],mt=[Wt,Gt].indexOf(x)!==-1,et=(ae=F==null?void 0:F[_])!=null?ae:0,Tt=mt?Xe:He-P[qe]-N[qe]-et+L.altAxis,ut=mt?He+P[qe]+N[qe]-et-L.altAxis:We,tt=v&&mt?gH(Tt,He,ut):Sa(v?Tt:Xe,He,v?ut:We);R[_]=tt,k[_]=tt-He}t.modifiersData[n]=k}}const GH={name:"preventOverflow",enabled:!0,phase:"main",fn:WH,requiresIfExists:["offset"]};function KH(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function YH(e){return e===ar(e)||!wr(e)?ex(e):KH(e)}function XH(e){var t=e.getBoundingClientRect(),r=lo(t.width)/e.offsetWidth||1,n=lo(t.height)/e.offsetHeight||1;return r!==1||n!==1}function ZH(e,t,r){r===void 0&&(r=!1);var n=wr(t),i=wr(t)&&XH(t),o=Un(t),a=fo(e,i,r),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((tn(t)!=="body"||rx(o))&&(u=YH(t)),wr(t)?(c=fo(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=tx(o))),{x:a.left+u.scrollLeft-c.x,y:a.top+u.scrollTop-c.y,width:a.width,height:a.height}}function JH(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(u){if(!r.has(u)){var c=t.get(u);c&&i(c)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function QH(e){var t=JH(e);return lH.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function e4(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function t4(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var G1={placement:"bottom",modifiers:[],strategy:"absolute"};function K1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function r4(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?G1:i;return function(u,c,d){d===void 0&&(d=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},G1,o),modifiersData:{},elements:{reference:u,popper:c},attributes:{},styles:{}},h=[],p=!1,v={state:f,setOptions:function(x){var w=typeof x=="function"?x(f.options):x;y(),f.options=Object.assign({},o,f.options,w),f.scrollParents={reference:pi(u)?Oa(u):u.contextElement?Oa(u.contextElement):[],popper:Oa(c)};var S=QH(t4([].concat(n,f.options.modifiers)));return f.orderedModifiers=S.filter(function(E){return E.enabled}),m(),v.update()},forceUpdate:function(){if(!p){var x=f.elements,w=x.reference,S=x.popper;if(K1(w,S)){f.rects={reference:ZH(w,Fa(S),f.options.strategy==="fixed"),popper:Jb(S)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(L){return f.modifiersData[L.name]=Object.assign({},L.data)});for(var E=0;E<f.orderedModifiers.length;E++){if(f.reset===!0){f.reset=!1,E=-1;continue}var _=f.orderedModifiers[E],R=_.fn,P=_.options,N=P===void 0?{}:P,j=_.name;typeof R=="function"&&(f=R({state:f,options:N,name:j,instance:v})||f)}}}},update:e4(function(){return new Promise(function(b){v.forceUpdate(),b(f)})}),destroy:function(){y(),p=!0}};if(!K1(u,c))return v;v.setOptions(d).then(function(b){!p&&d.onFirstUpdate&&d.onFirstUpdate(b)});function m(){f.orderedModifiers.forEach(function(b){var x=b.name,w=b.options,S=w===void 0?{}:w,E=b.effect;if(typeof E=="function"){var _=E({state:f,name:x,instance:v,options:S}),R=function(){};h.push(_||R)}})}function y(){h.forEach(function(b){return b()}),h=[]}return v}}var n4=[CH,UH,SH,hH,zH,kH,GH,xH,BH],i4=r4({defaultModifiers:n4}),Wf,Y1;function o4(){if(Y1)return Wf;Y1=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",n=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(o,a){if(o===a)return!0;if(o&&a&&typeof o=="object"&&typeof a=="object"){if(o.constructor!==a.constructor)return!1;var u,c,d;if(Array.isArray(o)){if(u=o.length,u!=a.length)return!1;for(c=u;c--!==0;)if(!i(o[c],a[c]))return!1;return!0}var f;if(t&&o instanceof Map&&a instanceof Map){if(o.size!==a.size)return!1;for(f=o.entries();!(c=f.next()).done;)if(!a.has(c.value[0]))return!1;for(f=o.entries();!(c=f.next()).done;)if(!i(c.value[1],a.get(c.value[0])))return!1;return!0}if(r&&o instanceof Set&&a instanceof Set){if(o.size!==a.size)return!1;for(f=o.entries();!(c=f.next()).done;)if(!a.has(c.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(a)){if(u=o.length,u!=a.length)return!1;for(c=u;c--!==0;)if(o[c]!==a[c])return!1;return!0}if(o.constructor===RegExp)return o.source===a.source&&o.flags===a.flags;if(o.valueOf!==Object.prototype.valueOf&&typeof o.valueOf=="function"&&typeof a.valueOf=="function")return o.valueOf()===a.valueOf();if(o.toString!==Object.prototype.toString&&typeof o.toString=="function"&&typeof a.toString=="function")return o.toString()===a.toString();if(d=Object.keys(o),u=d.length,u!==Object.keys(a).length)return!1;for(c=u;c--!==0;)if(!Object.prototype.hasOwnProperty.call(a,d[c]))return!1;if(e&&o instanceof Element)return!1;for(c=u;c--!==0;)if(!((d[c]==="_owner"||d[c]==="__v"||d[c]==="__o")&&o.$$typeof)&&!i(o[d[c]],a[d[c]]))return!1;return!0}return o!==o&&a!==a}return Wf=function(a,u){try{return i(a,u)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},Wf}var a4=o4();const s4=Hn(a4);var u4=[],xc=function(t,r,n){n===void 0&&(n={});var i=ve.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||u4},a=ve.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),u=a[0],c=a[1],d=ve.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(v){var m=v.state,y=Object.keys(m.elements);Kb.flushSync(function(){c({styles:L1(y.map(function(b){return[b,m.styles[b]||{}]})),attributes:L1(y.map(function(b){return[b,m.attributes[b]]}))})})},requires:["computeStyles"]}},[]),f=ve.useMemo(function(){var p={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[d,{name:"applyStyles",enabled:!1}])};return s4(i.current,p)?i.current||p:(i.current=p,p)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,d]),h=ve.useRef();return B1(function(){h.current&&h.current.setOptions(f)},[f]),B1(function(){if(!(t==null||r==null)){var p=n.createPopper||i4,v=p(t,r,f);return h.current=v,function(){v.destroy(),h.current=null}}},[t,r,n.createPopper]),{state:h.current?h.current.state:null,styles:u.styles,attributes:u.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}};const mD=({tab:e})=>C.jsx("div",{className:"flex flex-1 items-center justify-center border-l-[0.5px] border-grey-900 bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"h-10 w-10"}),C.jsxs("div",{className:"font-semibold",children:["No ",e," Selected"]}),C.jsxs("div",{className:"text-sm",children:["Click on a ",e," in the Sidebar to select it."]})]})});function nx(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Gf,X1;function c4(){if(X1)return Gf;X1=1;function e(){this.__data__=[],this.size=0}return Gf=e,Gf}var Kf,Z1;function yo(){if(Z1)return Kf;Z1=1;function e(t,r){return t===r||t!==t&&r!==r}return Kf=e,Kf}var Yf,J1;function wc(){if(J1)return Yf;J1=1;var e=yo();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Yf=t,Yf}var Xf,Q1;function l4(){if(Q1)return Xf;Q1=1;var e=wc(),t=Array.prototype,r=t.splice;function n(i){var o=this.__data__,a=e(o,i);if(a<0)return!1;var u=o.length-1;return a==u?o.pop():r.call(o,a,1),--this.size,!0}return Xf=n,Xf}var Zf,eE;function f4(){if(eE)return Zf;eE=1;var e=wc();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return Zf=t,Zf}var Jf,tE;function d4(){if(tE)return Jf;tE=1;var e=wc();function t(r){return e(this.__data__,r)>-1}return Jf=t,Jf}var Qf,rE;function h4(){if(rE)return Qf;rE=1;var e=wc();function t(r,n){var i=this.__data__,o=e(i,r);return o<0?(++this.size,i.push([r,n])):i[o][1]=n,this}return Qf=t,Qf}var ed,nE;function _c(){if(nE)return ed;nE=1;var e=c4(),t=l4(),r=f4(),n=d4(),i=h4();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var d=a[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,ed=o,ed}var td,iE;function p4(){if(iE)return td;iE=1;var e=_c();function t(){this.__data__=new e,this.size=0}return td=t,td}var rd,oE;function v4(){if(oE)return rd;oE=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return rd=e,rd}var nd,aE;function g4(){if(aE)return nd;aE=1;function e(t){return this.__data__.get(t)}return nd=e,nd}var id,sE;function m4(){if(sE)return id;sE=1;function e(t){return this.__data__.has(t)}return id=e,id}var od,uE;function yD(){if(uE)return od;uE=1;var e=typeof ht=="object"&&ht&&ht.Object===Object&&ht;return od=e,od}var ad,cE;function Br(){if(cE)return ad;cE=1;var e=yD(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return ad=r,ad}var sd,lE;function bo(){if(lE)return sd;lE=1;var e=Br(),t=e.Symbol;return sd=t,sd}var ud,fE;function y4(){if(fE)return ud;fE=1;var e=bo(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function o(a){var u=r.call(a,i),c=a[i];try{a[i]=void 0;var d=!0}catch{}var f=n.call(a);return d&&(u?a[i]=c:delete a[i]),f}return ud=o,ud}var cd,dE;function b4(){if(dE)return cd;dE=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return cd=r,cd}var ld,hE;function xi(){if(hE)return ld;hE=1;var e=bo(),t=y4(),r=b4(),n="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(u){return u==null?u===void 0?i:n:o&&o in Object(u)?t(u):r(u)}return ld=a,ld}var fd,pE;function Sr(){if(pE)return fd;pE=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return fd=e,fd}var dd,vE;function $a(){if(vE)return dd;vE=1;var e=xi(),t=Sr(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function a(u){if(!t(u))return!1;var c=e(u);return c==n||c==i||c==r||c==o}return dd=a,dd}var hd,gE;function x4(){if(gE)return hd;gE=1;var e=Br(),t=e["__core-js_shared__"];return hd=t,hd}var pd,mE;function w4(){if(mE)return pd;mE=1;var e=x4(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return pd=r,pd}var vd,yE;function bD(){if(yE)return vd;yE=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return vd=r,vd}var gd,bE;function _4(){if(bE)return gd;bE=1;var e=$a(),t=w4(),r=Sr(),n=bD(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,c=a.toString,d=u.hasOwnProperty,f=RegExp("^"+c.call(d).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(p){if(!r(p)||t(p))return!1;var v=e(p)?f:o;return v.test(n(p))}return gd=h,gd}var md,xE;function E4(){if(xE)return md;xE=1;function e(t,r){return t==null?void 0:t[r]}return md=e,md}var yd,wE;function wi(){if(wE)return yd;wE=1;var e=_4(),t=E4();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return yd=r,yd}var bd,_E;function ix(){if(_E)return bd;_E=1;var e=wi(),t=Br(),r=e(t,"Map");return bd=r,bd}var xd,EE;function Ec(){if(EE)return xd;EE=1;var e=wi(),t=e(Object,"create");return xd=t,xd}var wd,SE;function S4(){if(SE)return wd;SE=1;var e=Ec();function t(){this.__data__=e?e(null):{},this.size=0}return wd=t,wd}var _d,OE;function O4(){if(OE)return _d;OE=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return _d=e,_d}var Ed,CE;function C4(){if(CE)return Ed;CE=1;var e=Ec(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(o){var a=this.__data__;if(e){var u=a[o];return u===t?void 0:u}return n.call(a,o)?a[o]:void 0}return Ed=i,Ed}var Sd,RE;function R4(){if(RE)return Sd;RE=1;var e=Ec(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return Sd=n,Sd}var Od,PE;function P4(){if(PE)return Od;PE=1;var e=Ec(),t="__lodash_hash_undefined__";function r(n,i){var o=this.__data__;return this.size+=this.has(n)?0:1,o[n]=e&&i===void 0?t:i,this}return Od=r,Od}var Cd,IE;function I4(){if(IE)return Cd;IE=1;var e=S4(),t=O4(),r=C4(),n=R4(),i=P4();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var d=a[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,Cd=o,Cd}var Rd,NE;function N4(){if(NE)return Rd;NE=1;var e=I4(),t=_c(),r=ix();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Rd=n,Rd}var Pd,TE;function T4(){if(TE)return Pd;TE=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Pd=e,Pd}var Id,AE;function Sc(){if(AE)return Id;AE=1;var e=T4();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Id=t,Id}var Nd,ME;function A4(){if(ME)return Nd;ME=1;var e=Sc();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Nd=t,Nd}var Td,DE;function M4(){if(DE)return Td;DE=1;var e=Sc();function t(r){return e(this,r).get(r)}return Td=t,Td}var Ad,jE;function D4(){if(jE)return Ad;jE=1;var e=Sc();function t(r){return e(this,r).has(r)}return Ad=t,Ad}var Md,qE;function j4(){if(qE)return Md;qE=1;var e=Sc();function t(r,n){var i=e(this,r),o=i.size;return i.set(r,n),this.size+=i.size==o?0:1,this}return Md=t,Md}var Dd,kE;function ox(){if(kE)return Dd;kE=1;var e=N4(),t=A4(),r=M4(),n=D4(),i=j4();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var d=a[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,Dd=o,Dd}var jd,LE;function q4(){if(LE)return jd;LE=1;var e=_c(),t=ix(),r=ox(),n=200;function i(o,a){var u=this.__data__;if(u instanceof e){var c=u.__data__;if(!t||c.length<n-1)return c.push([o,a]),this.size=++u.size,this;u=this.__data__=new r(c)}return u.set(o,a),this.size=u.size,this}return jd=i,jd}var qd,BE;function Oc(){if(BE)return qd;BE=1;var e=_c(),t=p4(),r=v4(),n=g4(),i=m4(),o=q4();function a(u){var c=this.__data__=new e(u);this.size=c.size}return a.prototype.clear=t,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=i,a.prototype.set=o,qd=a,qd}var kd,FE;function ax(){if(FE)return kd;FE=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i&&r(t[n],n,t)!==!1;);return t}return kd=e,kd}var Ld,$E;function xD(){if($E)return Ld;$E=1;var e=wi(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Ld=t,Ld}var Bd,zE;function Cc(){if(zE)return Bd;zE=1;var e=xD();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Bd=t,Bd}var Fd,HE;function Rc(){if(HE)return Fd;HE=1;var e=Cc(),t=yo(),r=Object.prototype,n=r.hasOwnProperty;function i(o,a,u){var c=o[a];(!(n.call(o,a)&&t(c,u))||u===void 0&&!(a in o))&&e(o,a,u)}return Fd=i,Fd}var $d,UE;function za(){if(UE)return $d;UE=1;var e=Rc(),t=Cc();function r(n,i,o,a){var u=!o;o||(o={});for(var c=-1,d=i.length;++c<d;){var f=i[c],h=a?a(o[f],n[f],f,o,n):void 0;h===void 0&&(h=n[f]),u?t(o,f,h):e(o,f,h)}return o}return $d=r,$d}var zd,VE;function k4(){if(VE)return zd;VE=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return zd=e,zd}var Hd,WE;function nn(){if(WE)return Hd;WE=1;function e(t){return t!=null&&typeof t=="object"}return Hd=e,Hd}var Ud,GE;function L4(){if(GE)return Ud;GE=1;var e=xi(),t=nn(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Ud=n,Ud}var Vd,KE;function Ha(){if(KE)return Vd;KE=1;var e=L4(),t=nn(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(a){return t(a)&&n.call(a,"callee")&&!i.call(a,"callee")};return Vd=o,Vd}var Wd,YE;function yt(){if(YE)return Wd;YE=1;var e=Array.isArray;return Wd=e,Wd}var ma={exports:{}},Gd,XE;function B4(){if(XE)return Gd;XE=1;function e(){return!1}return Gd=e,Gd}ma.exports;var ZE;function xo(){return ZE||(ZE=1,(function(e,t){var r=Br(),n=B4(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,u=a?r.Buffer:void 0,c=u?u.isBuffer:void 0,d=c||n;e.exports=d})(ma,ma.exports)),ma.exports}var Kd,JE;function Pc(){if(JE)return Kd;JE=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var o=typeof n;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return Kd=r,Kd}var Yd,QE;function sx(){if(QE)return Yd;QE=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Yd=t,Yd}var Xd,eS;function F4(){if(eS)return Xd;eS=1;var e=xi(),t=sx(),r=nn(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",u="[object Error]",c="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object RegExp]",v="[object Set]",m="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",S="[object Float64Array]",E="[object Int8Array]",_="[object Int16Array]",R="[object Int32Array]",P="[object Uint8Array]",N="[object Uint8ClampedArray]",j="[object Uint16Array]",L="[object Uint32Array]",F={};F[w]=F[S]=F[E]=F[_]=F[R]=F[P]=F[N]=F[j]=F[L]=!0,F[n]=F[i]=F[b]=F[o]=F[x]=F[a]=F[u]=F[c]=F[d]=F[f]=F[h]=F[p]=F[v]=F[m]=F[y]=!1;function k(D){return r(D)&&t(D.length)&&!!F[e(D)]}return Xd=k,Xd}var Zd,tS;function Ic(){if(tS)return Zd;tS=1;function e(t){return function(r){return t(r)}}return Zd=e,Zd}var ya={exports:{}};ya.exports;var rS;function ux(){return rS||(rS=1,(function(e,t){var r=yD(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,u=(function(){try{var c=i&&i.require&&i.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();e.exports=u})(ya,ya.exports)),ya.exports}var Jd,nS;function Ua(){if(nS)return Jd;nS=1;var e=F4(),t=Ic(),r=ux(),n=r&&r.isTypedArray,i=n?t(n):e;return Jd=i,Jd}var Qd,iS;function wD(){if(iS)return Qd;iS=1;var e=k4(),t=Ha(),r=yt(),n=xo(),i=Pc(),o=Ua(),a=Object.prototype,u=a.hasOwnProperty;function c(d,f){var h=r(d),p=!h&&t(d),v=!h&&!p&&n(d),m=!h&&!p&&!v&&o(d),y=h||p||v||m,b=y?e(d.length,String):[],x=b.length;for(var w in d)(f||u.call(d,w))&&!(y&&(w=="length"||v&&(w=="offset"||w=="parent")||m&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||i(w,x)))&&b.push(w);return b}return Qd=c,Qd}var eh,oS;function Nc(){if(oS)return eh;oS=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return eh=t,eh}var th,aS;function _D(){if(aS)return th;aS=1;function e(t,r){return function(n){return t(r(n))}}return th=e,th}var rh,sS;function $4(){if(sS)return rh;sS=1;var e=_D(),t=e(Object.keys,Object);return rh=t,rh}var nh,uS;function cx(){if(uS)return nh;uS=1;var e=Nc(),t=$4(),r=Object.prototype,n=r.hasOwnProperty;function i(o){if(!e(o))return t(o);var a=[];for(var u in Object(o))n.call(o,u)&&u!="constructor"&&a.push(u);return a}return nh=i,nh}var ih,cS;function _n(){if(cS)return ih;cS=1;var e=$a(),t=sx();function r(n){return n!=null&&t(n.length)&&!e(n)}return ih=r,ih}var oh,lS;function Vn(){if(lS)return oh;lS=1;var e=wD(),t=cx(),r=_n();function n(i){return r(i)?e(i):t(i)}return oh=n,oh}var ah,fS;function z4(){if(fS)return ah;fS=1;var e=za(),t=Vn();function r(n,i){return n&&e(i,t(i),n)}return ah=r,ah}var sh,dS;function H4(){if(dS)return sh;dS=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return sh=e,sh}var uh,hS;function U4(){if(hS)return uh;hS=1;var e=Sr(),t=Nc(),r=H4(),n=Object.prototype,i=n.hasOwnProperty;function o(a){if(!e(a))return r(a);var u=t(a),c=[];for(var d in a)d=="constructor"&&(u||!i.call(a,d))||c.push(d);return c}return uh=o,uh}var ch,pS;function _i(){if(pS)return ch;pS=1;var e=wD(),t=U4(),r=_n();function n(i){return r(i)?e(i,!0):t(i)}return ch=n,ch}var lh,vS;function V4(){if(vS)return lh;vS=1;var e=za(),t=_i();function r(n,i){return n&&e(i,t(i),n)}return lh=r,lh}var ba={exports:{}};ba.exports;var gS;function ED(){return gS||(gS=1,(function(e,t){var r=Br(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;function c(d,f){if(f)return d.slice();var h=d.length,p=u?u(h):new d.constructor(h);return d.copy(p),p}e.exports=c})(ba,ba.exports)),ba.exports}var fh,mS;function SD(){if(mS)return fh;mS=1;function e(t,r){var n=-1,i=t.length;for(r||(r=Array(i));++n<i;)r[n]=t[n];return r}return fh=e,fh}var dh,yS;function OD(){if(yS)return dh;yS=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=0,a=[];++n<i;){var u=t[n];r(u,n,t)&&(a[o++]=u)}return a}return dh=e,dh}var hh,bS;function CD(){if(bS)return hh;bS=1;function e(){return[]}return hh=e,hh}var ph,xS;function lx(){if(xS)return ph;xS=1;var e=OD(),t=CD(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(a){return a==null?[]:(a=Object(a),e(i(a),function(u){return n.call(a,u)}))}:t;return ph=o,ph}var vh,wS;function W4(){if(wS)return vh;wS=1;var e=za(),t=lx();function r(n,i){return e(n,t(n),i)}return vh=r,vh}var gh,_S;function fx(){if(_S)return gh;_S=1;function e(t,r){for(var n=-1,i=r.length,o=t.length;++n<i;)t[o+n]=r[n];return t}return gh=e,gh}var mh,ES;function Tc(){if(ES)return mh;ES=1;var e=_D(),t=e(Object.getPrototypeOf,Object);return mh=t,mh}var yh,SS;function RD(){if(SS)return yh;SS=1;var e=fx(),t=Tc(),r=lx(),n=CD(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var u=[];a;)e(u,r(a)),a=t(a);return u}:n;return yh=o,yh}var bh,OS;function G4(){if(OS)return bh;OS=1;var e=za(),t=RD();function r(n,i){return e(n,t(n),i)}return bh=r,bh}var xh,CS;function PD(){if(CS)return xh;CS=1;var e=fx(),t=yt();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return xh=r,xh}var wh,RS;function ID(){if(RS)return wh;RS=1;var e=PD(),t=lx(),r=Vn();function n(i){return e(i,r,t)}return wh=n,wh}var _h,PS;function K4(){if(PS)return _h;PS=1;var e=PD(),t=RD(),r=_i();function n(i){return e(i,r,t)}return _h=n,_h}var Eh,IS;function Y4(){if(IS)return Eh;IS=1;var e=wi(),t=Br(),r=e(t,"DataView");return Eh=r,Eh}var Sh,NS;function X4(){if(NS)return Sh;NS=1;var e=wi(),t=Br(),r=e(t,"Promise");return Sh=r,Sh}var Oh,TS;function ND(){if(TS)return Oh;TS=1;var e=wi(),t=Br(),r=e(t,"Set");return Oh=r,Oh}var Ch,AS;function Z4(){if(AS)return Ch;AS=1;var e=wi(),t=Br(),r=e(t,"WeakMap");return Ch=r,Ch}var Rh,MS;function wo(){if(MS)return Rh;MS=1;var e=Y4(),t=ix(),r=X4(),n=ND(),i=Z4(),o=xi(),a=bD(),u="[object Map]",c="[object Object]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",v=a(e),m=a(t),y=a(r),b=a(n),x=a(i),w=o;return(e&&w(new e(new ArrayBuffer(1)))!=p||t&&w(new t)!=u||r&&w(r.resolve())!=d||n&&w(new n)!=f||i&&w(new i)!=h)&&(w=function(S){var E=o(S),_=E==c?S.constructor:void 0,R=_?a(_):"";if(R)switch(R){case v:return p;case m:return u;case y:return d;case b:return f;case x:return h}return E}),Rh=w,Rh}var Ph,DS;function J4(){if(DS)return Ph;DS=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n){var i=n.length,o=new n.constructor(i);return i&&typeof n[0]=="string"&&t.call(n,"index")&&(o.index=n.index,o.input=n.input),o}return Ph=r,Ph}var Ih,jS;function TD(){if(jS)return Ih;jS=1;var e=Br(),t=e.Uint8Array;return Ih=t,Ih}var Nh,qS;function dx(){if(qS)return Nh;qS=1;var e=TD();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return Nh=t,Nh}var Th,kS;function Q4(){if(kS)return Th;kS=1;var e=dx();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return Th=t,Th}var Ah,LS;function eU(){if(LS)return Ah;LS=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return Ah=t,Ah}var Mh,BS;function tU(){if(BS)return Mh;BS=1;var e=bo(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return Mh=n,Mh}var Dh,FS;function AD(){if(FS)return Dh;FS=1;var e=dx();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return Dh=t,Dh}var jh,$S;function rU(){if($S)return jh;$S=1;var e=dx(),t=Q4(),r=eU(),n=tU(),i=AD(),o="[object Boolean]",a="[object Date]",u="[object Map]",c="[object Number]",d="[object RegExp]",f="[object Set]",h="[object String]",p="[object Symbol]",v="[object ArrayBuffer]",m="[object DataView]",y="[object Float32Array]",b="[object Float64Array]",x="[object Int8Array]",w="[object Int16Array]",S="[object Int32Array]",E="[object Uint8Array]",_="[object Uint8ClampedArray]",R="[object Uint16Array]",P="[object Uint32Array]";function N(j,L,F){var k=j.constructor;switch(L){case v:return e(j);case o:case a:return new k(+j);case m:return t(j,F);case y:case b:case x:case w:case S:case E:case _:case R:case P:return i(j,F);case u:return new k;case c:case h:return new k(j);case d:return r(j);case f:return new k;case p:return n(j)}}return jh=N,jh}var qh,zS;function MD(){if(zS)return qh;zS=1;var e=Sr(),t=Object.create,r=(function(){function n(){}return function(i){if(!e(i))return{};if(t)return t(i);n.prototype=i;var o=new n;return n.prototype=void 0,o}})();return qh=r,qh}var kh,HS;function DD(){if(HS)return kh;HS=1;var e=MD(),t=Tc(),r=Nc();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return kh=n,kh}var Lh,US;function nU(){if(US)return Lh;US=1;var e=wo(),t=nn(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Lh=n,Lh}var Bh,VS;function iU(){if(VS)return Bh;VS=1;var e=nU(),t=Ic(),r=ux(),n=r&&r.isMap,i=n?t(n):e;return Bh=i,Bh}var Fh,WS;function oU(){if(WS)return Fh;WS=1;var e=wo(),t=nn(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return Fh=n,Fh}var $h,GS;function aU(){if(GS)return $h;GS=1;var e=oU(),t=Ic(),r=ux(),n=r&&r.isSet,i=n?t(n):e;return $h=i,$h}var zh,KS;function jD(){if(KS)return zh;KS=1;var e=Oc(),t=ax(),r=Rc(),n=z4(),i=V4(),o=ED(),a=SD(),u=W4(),c=G4(),d=ID(),f=K4(),h=wo(),p=J4(),v=rU(),m=DD(),y=yt(),b=xo(),x=iU(),w=Sr(),S=aU(),E=Vn(),_=_i(),R=1,P=2,N=4,j="[object Arguments]",L="[object Array]",F="[object Boolean]",k="[object Date]",D="[object Error]",T="[object Function]",B="[object GeneratorFunction]",$="[object Map]",W="[object Number]",Y="[object Object]",ee="[object RegExp]",H="[object Set]",Q="[object String]",ce="[object Symbol]",se="[object WeakMap]",z="[object ArrayBuffer]",G="[object DataView]",J="[object Float32Array]",V="[object Float64Array]",K="[object Int8Array]",ie="[object Int16Array]",ne="[object Int32Array]",ue="[object Uint8Array]",de="[object Uint8ClampedArray]",we="[object Uint16Array]",Se="[object Uint32Array]",_e={};_e[j]=_e[L]=_e[z]=_e[G]=_e[F]=_e[k]=_e[J]=_e[V]=_e[K]=_e[ie]=_e[ne]=_e[$]=_e[W]=_e[Y]=_e[ee]=_e[H]=_e[Q]=_e[ce]=_e[ue]=_e[de]=_e[we]=_e[Se]=!0,_e[D]=_e[T]=_e[se]=!1;function he(ae,Oe,Ne,He,qe,Xe){var We,mt=Oe&R,et=Oe&P,Tt=Oe&N;if(Ne&&(We=qe?Ne(ae,He,qe,Xe):Ne(ae)),We!==void 0)return We;if(!w(ae))return ae;var ut=y(ae);if(ut){if(We=p(ae),!mt)return a(ae,We)}else{var tt=h(ae),Ct=tt==T||tt==B;if(b(ae))return o(ae,mt);if(tt==Y||tt==j||Ct&&!qe){if(We=et||Ct?{}:m(ae),!mt)return et?c(ae,i(We,ae)):u(ae,n(We,ae))}else{if(!_e[tt])return qe?ae:{};We=v(ae,tt,mt)}}Xe||(Xe=new e);var Zt=Xe.get(ae);if(Zt)return Zt;Xe.set(ae,We),S(ae)?ae.forEach(function(xt){We.add(he(xt,Oe,Ne,xt,ae,Xe))}):x(ae)&&ae.forEach(function(xt,jt){We.set(jt,he(xt,Oe,Ne,jt,ae,Xe))});var cr=Tt?et?f:d:et?_:E,Dt=ut?void 0:cr(ae);return t(Dt||ae,function(xt,jt){Dt&&(jt=xt,xt=ae[jt]),r(We,jt,he(xt,Oe,Ne,jt,ae,Xe))}),We}return zh=he,zh}var Hh,YS;function sU(){if(YS)return Hh;YS=1;var e=jD(),t=4;function r(n){return e(n,t)}return Hh=r,Hh}var Uh,XS;function hx(){if(XS)return Uh;XS=1;function e(t){return function(){return t}}return Uh=e,Uh}var Vh,ZS;function uU(){if(ZS)return Vh;ZS=1;function e(t){return function(r,n,i){for(var o=-1,a=Object(r),u=i(r),c=u.length;c--;){var d=u[t?c:++o];if(n(a[d],d,a)===!1)break}return r}}return Vh=e,Vh}var Wh,JS;function px(){if(JS)return Wh;JS=1;var e=uU(),t=e();return Wh=t,Wh}var Gh,QS;function vx(){if(QS)return Gh;QS=1;var e=px(),t=Vn();function r(n,i){return n&&e(n,i,t)}return Gh=r,Gh}var Kh,eO;function cU(){if(eO)return Kh;eO=1;var e=_n();function t(r,n){return function(i,o){if(i==null)return i;if(!e(i))return r(i,o);for(var a=i.length,u=n?a:-1,c=Object(i);(n?u--:++u<a)&&o(c[u],u,c)!==!1;);return i}}return Kh=t,Kh}var Yh,tO;function Ac(){if(tO)return Yh;tO=1;var e=vx(),t=cU(),r=t(e);return Yh=r,Yh}var Xh,rO;function Ei(){if(rO)return Xh;rO=1;function e(t){return t}return Xh=e,Xh}var Zh,nO;function qD(){if(nO)return Zh;nO=1;var e=Ei();function t(r){return typeof r=="function"?r:e}return Zh=t,Zh}var Jh,iO;function kD(){if(iO)return Jh;iO=1;var e=ax(),t=Ac(),r=qD(),n=yt();function i(o,a){var u=n(o)?e:t;return u(o,r(a))}return Jh=i,Jh}var Qh,oO;function LD(){return oO||(oO=1,Qh=kD()),Qh}var ep,aO;function lU(){if(aO)return ep;aO=1;var e=Ac();function t(r,n){var i=[];return e(r,function(o,a,u){n(o,a,u)&&i.push(o)}),i}return ep=t,ep}var tp,sO;function fU(){if(sO)return tp;sO=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return tp=t,tp}var rp,uO;function dU(){if(uO)return rp;uO=1;function e(t){return this.__data__.has(t)}return rp=e,rp}var np,cO;function BD(){if(cO)return np;cO=1;var e=ox(),t=fU(),r=dU();function n(i){var o=-1,a=i==null?0:i.length;for(this.__data__=new e;++o<a;)this.add(i[o])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,np=n,np}var ip,lO;function hU(){if(lO)return ip;lO=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return ip=e,ip}var op,fO;function FD(){if(fO)return op;fO=1;function e(t,r){return t.has(r)}return op=e,op}var ap,dO;function $D(){if(dO)return ap;dO=1;var e=BD(),t=hU(),r=FD(),n=1,i=2;function o(a,u,c,d,f,h){var p=c&n,v=a.length,m=u.length;if(v!=m&&!(p&&m>v))return!1;var y=h.get(a),b=h.get(u);if(y&&b)return y==u&&b==a;var x=-1,w=!0,S=c&i?new e:void 0;for(h.set(a,u),h.set(u,a);++x<v;){var E=a[x],_=u[x];if(d)var R=p?d(_,E,x,u,a,h):d(E,_,x,a,u,h);if(R!==void 0){if(R)continue;w=!1;break}if(S){if(!t(u,function(P,N){if(!r(S,N)&&(E===P||f(E,P,c,d,h)))return S.push(N)})){w=!1;break}}else if(!(E===_||f(E,_,c,d,h))){w=!1;break}}return h.delete(a),h.delete(u),w}return ap=o,ap}var sp,hO;function pU(){if(hO)return sp;hO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return sp=e,sp}var up,pO;function gx(){if(pO)return up;pO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return up=e,up}var cp,vO;function vU(){if(vO)return cp;vO=1;var e=bo(),t=TD(),r=yo(),n=$D(),i=pU(),o=gx(),a=1,u=2,c="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Map]",p="[object Number]",v="[object RegExp]",m="[object Set]",y="[object String]",b="[object Symbol]",x="[object ArrayBuffer]",w="[object DataView]",S=e?e.prototype:void 0,E=S?S.valueOf:void 0;function _(R,P,N,j,L,F,k){switch(N){case w:if(R.byteLength!=P.byteLength||R.byteOffset!=P.byteOffset)return!1;R=R.buffer,P=P.buffer;case x:return!(R.byteLength!=P.byteLength||!F(new t(R),new t(P)));case c:case d:case p:return r(+R,+P);case f:return R.name==P.name&&R.message==P.message;case v:case y:return R==P+"";case h:var D=i;case m:var T=j&a;if(D||(D=o),R.size!=P.size&&!T)return!1;var B=k.get(R);if(B)return B==P;j|=u,k.set(R,P);var $=n(D(R),D(P),j,L,F,k);return k.delete(R),$;case b:if(E)return E.call(R)==E.call(P)}return!1}return cp=_,cp}var lp,gO;function gU(){if(gO)return lp;gO=1;var e=ID(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(o,a,u,c,d,f){var h=u&t,p=e(o),v=p.length,m=e(a),y=m.length;if(v!=y&&!h)return!1;for(var b=v;b--;){var x=p[b];if(!(h?x in a:n.call(a,x)))return!1}var w=f.get(o),S=f.get(a);if(w&&S)return w==a&&S==o;var E=!0;f.set(o,a),f.set(a,o);for(var _=h;++b<v;){x=p[b];var R=o[x],P=a[x];if(c)var N=h?c(P,R,x,a,o,f):c(R,P,x,o,a,f);if(!(N===void 0?R===P||d(R,P,u,c,f):N)){E=!1;break}_||(_=x=="constructor")}if(E&&!_){var j=o.constructor,L=a.constructor;j!=L&&"constructor"in o&&"constructor"in a&&!(typeof j=="function"&&j instanceof j&&typeof L=="function"&&L instanceof L)&&(E=!1)}return f.delete(o),f.delete(a),E}return lp=i,lp}var fp,mO;function mU(){if(mO)return fp;mO=1;var e=Oc(),t=$D(),r=vU(),n=gU(),i=wo(),o=yt(),a=xo(),u=Ua(),c=1,d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype,v=p.hasOwnProperty;function m(y,b,x,w,S,E){var _=o(y),R=o(b),P=_?f:i(y),N=R?f:i(b);P=P==d?h:P,N=N==d?h:N;var j=P==h,L=N==h,F=P==N;if(F&&a(y)){if(!a(b))return!1;_=!0,j=!1}if(F&&!j)return E||(E=new e),_||u(y)?t(y,b,x,w,S,E):r(y,b,P,x,w,S,E);if(!(x&c)){var k=j&&v.call(y,"__wrapped__"),D=L&&v.call(b,"__wrapped__");if(k||D){var T=k?y.value():y,B=D?b.value():b;return E||(E=new e),S(T,B,x,w,E)}}return F?(E||(E=new e),n(y,b,x,w,S,E)):!1}return fp=m,fp}var dp,yO;function zD(){if(yO)return dp;yO=1;var e=mU(),t=nn();function r(n,i,o,a,u){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,o,a,r,u)}return dp=r,dp}var hp,bO;function yU(){if(bO)return hp;bO=1;var e=Oc(),t=zD(),r=1,n=2;function i(o,a,u,c){var d=u.length,f=d,h=!c;if(o==null)return!f;for(o=Object(o);d--;){var p=u[d];if(h&&p[2]?p[1]!==o[p[0]]:!(p[0]in o))return!1}for(;++d<f;){p=u[d];var v=p[0],m=o[v],y=p[1];if(h&&p[2]){if(m===void 0&&!(v in o))return!1}else{var b=new e;if(c)var x=c(m,y,v,o,a,b);if(!(x===void 0?t(y,m,r|n,c,b):x))return!1}}return!0}return hp=i,hp}var pp,xO;function HD(){if(xO)return pp;xO=1;var e=Sr();function t(r){return r===r&&!e(r)}return pp=t,pp}var vp,wO;function bU(){if(wO)return vp;wO=1;var e=HD(),t=Vn();function r(n){for(var i=t(n),o=i.length;o--;){var a=i[o],u=n[a];i[o]=[a,u,e(u)]}return i}return vp=r,vp}var gp,_O;function UD(){if(_O)return gp;_O=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return gp=e,gp}var mp,EO;function xU(){if(EO)return mp;EO=1;var e=yU(),t=bU(),r=UD();function n(i){var o=t(i);return o.length==1&&o[0][2]?r(o[0][0],o[0][1]):function(a){return a===i||e(a,i,o)}}return mp=n,mp}var yp,SO;function _o(){if(SO)return yp;SO=1;var e=xi(),t=nn(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return yp=n,yp}var bp,OO;function mx(){if(OO)return bp;OO=1;var e=yt(),t=_o(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,a){if(e(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||t(o)?!0:n.test(o)||!r.test(o)||a!=null&&o in Object(a)}return bp=i,bp}var xp,CO;function wU(){if(CO)return xp;CO=1;var e=ox(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var a=arguments,u=i?i.apply(this,a):a[0],c=o.cache;if(c.has(u))return c.get(u);var d=n.apply(this,a);return o.cache=c.set(u,d)||c,d};return o.cache=new(r.Cache||e),o}return r.Cache=e,xp=r,xp}var wp,RO;function _U(){if(RO)return wp;RO=1;var e=wU(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return wp=r,wp}var _p,PO;function EU(){if(PO)return _p;PO=1;var e=_U(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(a,u,c,d){o.push(c?d.replace(r,"$1"):u||a)}),o});return _p=n,_p}var Ep,IO;function Mc(){if(IO)return Ep;IO=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=Array(i);++n<i;)o[n]=r(t[n],n,t);return o}return Ep=e,Ep}var Sp,NO;function SU(){if(NO)return Sp;NO=1;var e=bo(),t=Mc(),r=yt(),n=_o(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function a(u){if(typeof u=="string")return u;if(r(u))return t(u,a)+"";if(n(u))return o?o.call(u):"";var c=u+"";return c=="0"&&1/u==-1/0?"-0":c}return Sp=a,Sp}var Op,TO;function VD(){if(TO)return Op;TO=1;var e=SU();function t(r){return r==null?"":e(r)}return Op=t,Op}var Cp,AO;function Dc(){if(AO)return Cp;AO=1;var e=yt(),t=mx(),r=EU(),n=VD();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return Cp=i,Cp}var Rp,MO;function Va(){if(MO)return Rp;MO=1;var e=_o();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Rp=t,Rp}var Pp,DO;function jc(){if(DO)return Pp;DO=1;var e=Dc(),t=Va();function r(n,i){i=e(i,n);for(var o=0,a=i.length;n!=null&&o<a;)n=n[t(i[o++])];return o&&o==a?n:void 0}return Pp=r,Pp}var Ip,jO;function OU(){if(jO)return Ip;jO=1;var e=jc();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return Ip=t,Ip}var Np,qO;function CU(){if(qO)return Np;qO=1;function e(t,r){return t!=null&&r in Object(t)}return Np=e,Np}var Tp,kO;function WD(){if(kO)return Tp;kO=1;var e=Dc(),t=Ha(),r=yt(),n=Pc(),i=sx(),o=Va();function a(u,c,d){c=e(c,u);for(var f=-1,h=c.length,p=!1;++f<h;){var v=o(c[f]);if(!(p=u!=null&&d(u,v)))break;u=u[v]}return p||++f!=h?p:(h=u==null?0:u.length,!!h&&i(h)&&n(v,h)&&(r(u)||t(u)))}return Tp=a,Tp}var Ap,LO;function GD(){if(LO)return Ap;LO=1;var e=CU(),t=WD();function r(n,i){return n!=null&&t(n,i,e)}return Ap=r,Ap}var Mp,BO;function RU(){if(BO)return Mp;BO=1;var e=zD(),t=OU(),r=GD(),n=mx(),i=HD(),o=UD(),a=Va(),u=1,c=2;function d(f,h){return n(f)&&i(h)?o(a(f),h):function(p){var v=t(p,f);return v===void 0&&v===h?r(p,f):e(h,v,u|c)}}return Mp=d,Mp}var Dp,FO;function KD(){if(FO)return Dp;FO=1;function e(t){return function(r){return r==null?void 0:r[t]}}return Dp=e,Dp}var jp,$O;function PU(){if($O)return jp;$O=1;var e=jc();function t(r){return function(n){return e(n,r)}}return jp=t,jp}var qp,zO;function IU(){if(zO)return qp;zO=1;var e=KD(),t=PU(),r=mx(),n=Va();function i(o){return r(o)?e(n(o)):t(o)}return qp=i,qp}var kp,HO;function En(){if(HO)return kp;HO=1;var e=xU(),t=RU(),r=Ei(),n=yt(),i=IU();function o(a){return typeof a=="function"?a:a==null?r:typeof a=="object"?n(a)?t(a[0],a[1]):e(a):i(a)}return kp=o,kp}var Lp,UO;function YD(){if(UO)return Lp;UO=1;var e=OD(),t=lU(),r=En(),n=yt();function i(o,a){var u=n(o)?e:t;return u(o,r(a,3))}return Lp=i,Lp}var Bp,VO;function NU(){if(VO)return Bp;VO=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return Bp=r,Bp}var Fp,WO;function XD(){if(WO)return Fp;WO=1;var e=NU(),t=WD();function r(n,i){return n!=null&&t(n,i,e)}return Fp=r,Fp}var $p,GO;function TU(){if(GO)return $p;GO=1;var e=cx(),t=wo(),r=Ha(),n=yt(),i=_n(),o=xo(),a=Nc(),u=Ua(),c="[object Map]",d="[object Set]",f=Object.prototype,h=f.hasOwnProperty;function p(v){if(v==null)return!0;if(i(v)&&(n(v)||typeof v=="string"||typeof v.splice=="function"||o(v)||u(v)||r(v)))return!v.length;var m=t(v);if(m==c||m==d)return!v.size;if(a(v))return!e(v).length;for(var y in v)if(h.call(v,y))return!1;return!0}return $p=p,$p}var zp,KO;function ZD(){if(KO)return zp;KO=1;function e(t){return t===void 0}return zp=e,zp}var Hp,YO;function JD(){if(YO)return Hp;YO=1;var e=Ac(),t=_n();function r(n,i){var o=-1,a=t(n)?Array(n.length):[];return e(n,function(u,c,d){a[++o]=i(u,c,d)}),a}return Hp=r,Hp}var Up,XO;function QD(){if(XO)return Up;XO=1;var e=Mc(),t=En(),r=JD(),n=yt();function i(o,a){var u=n(o)?e:r;return u(o,t(a,3))}return Up=i,Up}var Vp,ZO;function AU(){if(ZO)return Vp;ZO=1;function e(t,r,n,i){var o=-1,a=t==null?0:t.length;for(i&&a&&(n=t[++o]);++o<a;)n=r(n,t[o],o,t);return n}return Vp=e,Vp}var Wp,JO;function MU(){if(JO)return Wp;JO=1;function e(t,r,n,i,o){return o(t,function(a,u,c){n=i?(i=!1,a):r(n,a,u,c)}),n}return Wp=e,Wp}var Gp,QO;function ej(){if(QO)return Gp;QO=1;var e=AU(),t=Ac(),r=En(),n=MU(),i=yt();function o(a,u,c){var d=i(a)?e:n,f=arguments.length<3;return d(a,r(u,4),c,f,t)}return Gp=o,Gp}var Kp,eC;function DU(){if(eC)return Kp;eC=1;var e=xi(),t=yt(),r=nn(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return Kp=i,Kp}var Yp,tC;function jU(){if(tC)return Yp;tC=1;var e=KD(),t=e("length");return Yp=t,Yp}var Xp,rC;function qU(){if(rC)return Xp;rC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="\\u200d",u=RegExp("["+a+e+i+o+"]");function c(d){return u.test(d)}return Xp=c,Xp}var Zp,nC;function kU(){if(nC)return Zp;nC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="["+e+"]",u="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",d="(?:"+u+"|"+c+")",f="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",m=d+"?",y="["+o+"]?",b="(?:"+v+"(?:"+[f,h,p].join("|")+")"+y+m+")*",x=y+m+b,w="(?:"+[f+u+"?",u,h,p,a].join("|")+")",S=RegExp(c+"(?="+c+")|"+w+x,"g");function E(_){for(var R=S.lastIndex=0;S.test(_);)++R;return R}return Zp=E,Zp}var Jp,iC;function LU(){if(iC)return Jp;iC=1;var e=jU(),t=qU(),r=kU();function n(i){return t(i)?r(i):e(i)}return Jp=n,Jp}var Qp,oC;function BU(){if(oC)return Qp;oC=1;var e=cx(),t=wo(),r=_n(),n=DU(),i=LU(),o="[object Map]",a="[object Set]";function u(c){if(c==null)return 0;if(r(c))return n(c)?i(c):c.length;var d=t(c);return d==o||d==a?c.size:e(c).length}return Qp=u,Qp}var ev,aC;function FU(){if(aC)return ev;aC=1;var e=ax(),t=MD(),r=vx(),n=En(),i=Tc(),o=yt(),a=xo(),u=$a(),c=Sr(),d=Ua();function f(h,p,v){var m=o(h),y=m||a(h)||d(h);if(p=n(p,4),v==null){var b=h&&h.constructor;y?v=m?new b:[]:c(h)?v=u(b)?t(i(h)):{}:v={}}return(y?e:r)(h,function(x,w,S){return p(v,x,w,S)}),v}return ev=f,ev}var tv,sC;function $U(){if(sC)return tv;sC=1;var e=bo(),t=Ha(),r=yt(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return tv=i,tv}var rv,uC;function yx(){if(uC)return rv;uC=1;var e=fx(),t=$U();function r(n,i,o,a,u){var c=-1,d=n.length;for(o||(o=t),u||(u=[]);++c<d;){var f=n[c];i>0&&o(f)?i>1?r(f,i-1,o,a,u):e(u,f):a||(u[u.length]=f)}return u}return rv=r,rv}var nv,cC;function zU(){if(cC)return nv;cC=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return nv=e,nv}var iv,lC;function tj(){if(lC)return iv;lC=1;var e=zU(),t=Math.max;function r(n,i,o){return i=t(i===void 0?n.length-1:i,0),function(){for(var a=arguments,u=-1,c=t(a.length-i,0),d=Array(c);++u<c;)d[u]=a[i+u];u=-1;for(var f=Array(i+1);++u<i;)f[u]=a[u];return f[i]=o(d),e(n,this,f)}}return iv=r,iv}var ov,fC;function HU(){if(fC)return ov;fC=1;var e=hx(),t=xD(),r=Ei(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return ov=n,ov}var av,dC;function UU(){if(dC)return av;dC=1;var e=800,t=16,r=Date.now;function n(i){var o=0,a=0;return function(){var u=r(),c=t-(u-a);if(a=u,c>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return av=n,av}var sv,hC;function rj(){if(hC)return sv;hC=1;var e=HU(),t=UU(),r=t(e);return sv=r,sv}var uv,pC;function qc(){if(pC)return uv;pC=1;var e=Ei(),t=tj(),r=rj();function n(i,o){return r(t(i,o,e),i+"")}return uv=n,uv}var cv,vC;function nj(){if(vC)return cv;vC=1;function e(t,r,n,i){for(var o=t.length,a=n+(i?1:-1);i?a--:++a<o;)if(r(t[a],a,t))return a;return-1}return cv=e,cv}var lv,gC;function VU(){if(gC)return lv;gC=1;function e(t){return t!==t}return lv=e,lv}var fv,mC;function WU(){if(mC)return fv;mC=1;function e(t,r,n){for(var i=n-1,o=t.length;++i<o;)if(t[i]===r)return i;return-1}return fv=e,fv}var dv,yC;function GU(){if(yC)return dv;yC=1;var e=nj(),t=VU(),r=WU();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return dv=n,dv}var hv,bC;function KU(){if(bC)return hv;bC=1;var e=GU();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return hv=t,hv}var pv,xC;function YU(){if(xC)return pv;xC=1;function e(t,r,n){for(var i=-1,o=t==null?0:t.length;++i<o;)if(n(r,t[i]))return!0;return!1}return pv=e,pv}var vv,wC;function XU(){if(wC)return vv;wC=1;function e(){}return vv=e,vv}var gv,_C;function ZU(){if(_C)return gv;_C=1;var e=ND(),t=XU(),r=gx(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return gv=i,gv}var mv,EC;function JU(){if(EC)return mv;EC=1;var e=BD(),t=KU(),r=YU(),n=FD(),i=ZU(),o=gx(),a=200;function u(c,d,f){var h=-1,p=t,v=c.length,m=!0,y=[],b=y;if(f)m=!1,p=r;else if(v>=a){var x=d?null:i(c);if(x)return o(x);m=!1,p=n,b=new e}else b=d?[]:y;e:for(;++h<v;){var w=c[h],S=d?d(w):w;if(w=f||w!==0?w:0,m&&S===S){for(var E=b.length;E--;)if(b[E]===S)continue e;d&&b.push(S),y.push(w)}else p(b,S,f)||(b!==y&&b.push(S),y.push(w))}return y}return mv=u,mv}var yv,SC;function ij(){if(SC)return yv;SC=1;var e=_n(),t=nn();function r(n){return t(n)&&e(n)}return yv=r,yv}var bv,OC;function QU(){if(OC)return bv;OC=1;var e=yx(),t=qc(),r=JU(),n=ij(),i=t(function(o){return r(e(o,1,n,!0))});return bv=i,bv}var xv,CC;function eV(){if(CC)return xv;CC=1;var e=Mc();function t(r,n){return e(n,function(i){return r[i]})}return xv=t,xv}var wv,RC;function oj(){if(RC)return wv;RC=1;var e=eV(),t=Vn();function r(n){return n==null?[]:e(n,t(n))}return wv=r,wv}var _v,PC;function Or(){if(PC)return _v;PC=1;var e;if(typeof nx=="function")try{e={clone:sU(),constant:hx(),each:LD(),filter:YD(),has:XD(),isArray:yt(),isEmpty:TU(),isFunction:$a(),isUndefined:ZD(),keys:Vn(),map:QD(),reduce:ej(),size:BU(),transform:FU(),union:QU(),values:oj()}}catch{}return e||(e=window._),_v=e,_v}var Ev,IC;function bx(){if(IC)return Ev;IC=1;var e=Or();Ev=i;var t="\0",r="\0",n="";function i(f){this._isDirected=e.has(f,"directed")?f.directed:!0,this._isMultigraph=e.has(f,"multigraph")?f.multigraph:!1,this._isCompound=e.has(f,"compound")?f.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(f){return this._label=f,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultNodeLabelFn=f,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var f=this;return e.filter(this.nodes(),function(h){return e.isEmpty(f._in[h])})},i.prototype.sinks=function(){var f=this;return e.filter(this.nodes(),function(h){return e.isEmpty(f._out[h])})},i.prototype.setNodes=function(f,h){var p=arguments,v=this;return e.each(f,function(m){p.length>1?v.setNode(m,h):v.setNode(m)}),this},i.prototype.setNode=function(f,h){return e.has(this._nodes,f)?(arguments.length>1&&(this._nodes[f]=h),this):(this._nodes[f]=arguments.length>1?h:this._defaultNodeLabelFn(f),this._isCompound&&(this._parent[f]=r,this._children[f]={},this._children[r][f]=!0),this._in[f]={},this._preds[f]={},this._out[f]={},this._sucs[f]={},++this._nodeCount,this)},i.prototype.node=function(f){return this._nodes[f]},i.prototype.hasNode=function(f){return e.has(this._nodes,f)},i.prototype.removeNode=function(f){var h=this;if(e.has(this._nodes,f)){var p=function(v){h.removeEdge(h._edgeObjs[v])};delete this._nodes[f],this._isCompound&&(this._removeFromParentsChildList(f),delete this._parent[f],e.each(this.children(f),function(v){h.setParent(v)}),delete this._children[f]),e.each(e.keys(this._in[f]),p),delete this._in[f],delete this._preds[f],e.each(e.keys(this._out[f]),p),delete this._out[f],delete this._sucs[f],--this._nodeCount}return this},i.prototype.setParent=function(f,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(h))h=r;else{h+="";for(var p=h;!e.isUndefined(p);p=this.parent(p))if(p===f)throw new Error("Setting "+h+" as parent of "+f+" would create a cycle");this.setNode(h)}return this.setNode(f),this._removeFromParentsChildList(f),this._parent[f]=h,this._children[h][f]=!0,this},i.prototype._removeFromParentsChildList=function(f){delete this._children[this._parent[f]][f]},i.prototype.parent=function(f){if(this._isCompound){var h=this._parent[f];if(h!==r)return h}},i.prototype.children=function(f){if(e.isUndefined(f)&&(f=r),this._isCompound){var h=this._children[f];if(h)return e.keys(h)}else{if(f===r)return this.nodes();if(this.hasNode(f))return[]}},i.prototype.predecessors=function(f){var h=this._preds[f];if(h)return e.keys(h)},i.prototype.successors=function(f){var h=this._sucs[f];if(h)return e.keys(h)},i.prototype.neighbors=function(f){var h=this.predecessors(f);if(h)return e.union(h,this.successors(f))},i.prototype.isLeaf=function(f){var h;return this.isDirected()?h=this.successors(f):h=this.neighbors(f),h.length===0},i.prototype.filterNodes=function(f){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var p=this;e.each(this._nodes,function(y,b){f(b)&&h.setNode(b,y)}),e.each(this._edgeObjs,function(y){h.hasNode(y.v)&&h.hasNode(y.w)&&h.setEdge(y,p.edge(y))});var v={};function m(y){var b=p.parent(y);return b===void 0||h.hasNode(b)?(v[y]=b,b):b in v?v[b]:m(b)}return this._isCompound&&e.each(h.nodes(),function(y){h.setParent(y,m(y))}),h},i.prototype.setDefaultEdgeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultEdgeLabelFn=f,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(f,h){var p=this,v=arguments;return e.reduce(f,function(m,y){return v.length>1?p.setEdge(m,y,h):p.setEdge(m,y),y}),this},i.prototype.setEdge=function(){var f,h,p,v,m=!1,y=arguments[0];typeof y=="object"&&y!==null&&"v"in y?(f=y.v,h=y.w,p=y.name,arguments.length===2&&(v=arguments[1],m=!0)):(f=y,h=arguments[1],p=arguments[3],arguments.length>2&&(v=arguments[2],m=!0)),f=""+f,h=""+h,e.isUndefined(p)||(p=""+p);var b=u(this._isDirected,f,h,p);if(e.has(this._edgeLabels,b))return m&&(this._edgeLabels[b]=v),this;if(!e.isUndefined(p)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(f),this.setNode(h),this._edgeLabels[b]=m?v:this._defaultEdgeLabelFn(f,h,p);var x=c(this._isDirected,f,h,p);return f=x.v,h=x.w,Object.freeze(x),this._edgeObjs[b]=x,o(this._preds[h],f),o(this._sucs[f],h),this._in[h][b]=x,this._out[f][b]=x,this._edgeCount++,this},i.prototype.edge=function(f,h,p){var v=arguments.length===1?d(this._isDirected,arguments[0]):u(this._isDirected,f,h,p);return this._edgeLabels[v]},i.prototype.hasEdge=function(f,h,p){var v=arguments.length===1?d(this._isDirected,arguments[0]):u(this._isDirected,f,h,p);return e.has(this._edgeLabels,v)},i.prototype.removeEdge=function(f,h,p){var v=arguments.length===1?d(this._isDirected,arguments[0]):u(this._isDirected,f,h,p),m=this._edgeObjs[v];return m&&(f=m.v,h=m.w,delete this._edgeLabels[v],delete this._edgeObjs[v],a(this._preds[h],f),a(this._sucs[f],h),delete this._in[h][v],delete this._out[f][v],this._edgeCount--),this},i.prototype.inEdges=function(f,h){var p=this._in[f];if(p){var v=e.values(p);return h?e.filter(v,function(m){return m.v===h}):v}},i.prototype.outEdges=function(f,h){var p=this._out[f];if(p){var v=e.values(p);return h?e.filter(v,function(m){return m.w===h}):v}},i.prototype.nodeEdges=function(f,h){var p=this.inEdges(f,h);if(p)return p.concat(this.outEdges(f,h))};function o(f,h){f[h]?f[h]++:f[h]=1}function a(f,h){--f[h]||delete f[h]}function u(f,h,p,v){var m=""+h,y=""+p;if(!f&&m>y){var b=m;m=y,y=b}return m+n+y+n+(e.isUndefined(v)?t:v)}function c(f,h,p,v){var m=""+h,y=""+p;if(!f&&m>y){var b=m;m=y,y=b}var x={v:m,w:y};return v&&(x.name=v),x}function d(f,h){return u(f,h.v,h.w,h.name)}return Ev}var Sv,NC;function tV(){return NC||(NC=1,Sv="2.1.8"),Sv}var Ov,TC;function rV(){return TC||(TC=1,Ov={Graph:bx(),version:tV()}),Ov}var Cv,AC;function nV(){if(AC)return Cv;AC=1;var e=Or(),t=bx();Cv={write:r,read:o};function r(a){var u={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:i(a)};return e.isUndefined(a.graph())||(u.value=e.clone(a.graph())),u}function n(a){return e.map(a.nodes(),function(u){var c=a.node(u),d=a.parent(u),f={v:u};return e.isUndefined(c)||(f.value=c),e.isUndefined(d)||(f.parent=d),f})}function i(a){return e.map(a.edges(),function(u){var c=a.edge(u),d={v:u.v,w:u.w};return e.isUndefined(u.name)||(d.name=u.name),e.isUndefined(c)||(d.value=c),d})}function o(a){var u=new t(a.options).setGraph(a.value);return e.each(a.nodes,function(c){u.setNode(c.v,c.value),c.parent&&u.setParent(c.v,c.parent)}),e.each(a.edges,function(c){u.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),u}return Cv}var Rv,MC;function iV(){if(MC)return Rv;MC=1;var e=Or();Rv=t;function t(r){var n={},i=[],o;function a(u){e.has(n,u)||(n[u]=!0,o.push(u),e.each(r.successors(u),a),e.each(r.predecessors(u),a))}return e.each(r.nodes(),function(u){o=[],a(u),o.length&&i.push(o)}),i}return Rv}var Pv,DC;function aj(){if(DC)return Pv;DC=1;var e=Or();Pv=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(r){return r.key})},t.prototype.has=function(r){return e.has(this._keyIndices,r)},t.prototype.priority=function(r){var n=this._keyIndices[r];if(n!==void 0)return this._arr[n].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(r,n){var i=this._keyIndices;if(r=String(r),!e.has(i,r)){var o=this._arr,a=o.length;return i[r]=a,o.push({key:r,priority:n}),this._decrease(a),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},t.prototype.decrease=function(r,n){var i=this._keyIndices[r];if(n>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[i].priority+" New: "+n);this._arr[i].priority=n,this._decrease(i)},t.prototype._heapify=function(r){var n=this._arr,i=2*r,o=i+1,a=r;i<n.length&&(a=n[i].priority<n[a].priority?i:a,o<n.length&&(a=n[o].priority<n[a].priority?o:a),a!==r&&(this._swap(r,a),this._heapify(a)))},t.prototype._decrease=function(r){for(var n=this._arr,i=n[r].priority,o;r!==0&&(o=r>>1,!(n[o].priority<i));)this._swap(r,o),r=o},t.prototype._swap=function(r,n){var i=this._arr,o=this._keyIndices,a=i[r],u=i[n];i[r]=u,i[n]=a,o[u.key]=r,o[a.key]=n},Pv}var Iv,jC;function sj(){if(jC)return Iv;jC=1;var e=Or(),t=aj();Iv=n;var r=e.constant(1);function n(o,a,u,c){return i(o,String(a),u||r,c||function(d){return o.outEdges(d)})}function i(o,a,u,c){var d={},f=new t,h,p,v=function(m){var y=m.v!==h?m.v:m.w,b=d[y],x=u(m),w=p.distance+x;if(x<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+x);w<b.distance&&(b.distance=w,b.predecessor=h,f.decrease(y,w))};for(o.nodes().forEach(function(m){var y=m===a?0:Number.POSITIVE_INFINITY;d[m]={distance:y},f.add(m,y)});f.size()>0&&(h=f.removeMin(),p=d[h],p.distance!==Number.POSITIVE_INFINITY);)c(h).forEach(v);return d}return Iv}var Nv,qC;function oV(){if(qC)return Nv;qC=1;var e=sj(),t=Or();Nv=r;function r(n,i,o){return t.transform(n.nodes(),function(a,u){a[u]=e(n,u,i,o)},{})}return Nv}var Tv,kC;function uj(){if(kC)return Tv;kC=1;var e=Or();Tv=t;function t(r){var n=0,i=[],o={},a=[];function u(c){var d=o[c]={onStack:!0,lowlink:n,index:n++};if(i.push(c),r.successors(c).forEach(function(p){e.has(o,p)?o[p].onStack&&(d.lowlink=Math.min(d.lowlink,o[p].index)):(u(p),d.lowlink=Math.min(d.lowlink,o[p].lowlink))}),d.lowlink===d.index){var f=[],h;do h=i.pop(),o[h].onStack=!1,f.push(h);while(c!==h);a.push(f)}}return r.nodes().forEach(function(c){e.has(o,c)||u(c)}),a}return Tv}var Av,LC;function aV(){if(LC)return Av;LC=1;var e=Or(),t=uj();Av=r;function r(n){return e.filter(t(n),function(i){return i.length>1||i.length===1&&n.hasEdge(i[0],i[0])})}return Av}var Mv,BC;function sV(){if(BC)return Mv;BC=1;var e=Or();Mv=r;var t=e.constant(1);function r(i,o,a){return n(i,o||t,a||function(u){return i.outEdges(u)})}function n(i,o,a){var u={},c=i.nodes();return c.forEach(function(d){u[d]={},u[d][d]={distance:0},c.forEach(function(f){d!==f&&(u[d][f]={distance:Number.POSITIVE_INFINITY})}),a(d).forEach(function(f){var h=f.v===d?f.w:f.v,p=o(f);u[d][h]={distance:p,predecessor:d}})}),c.forEach(function(d){var f=u[d];c.forEach(function(h){var p=u[h];c.forEach(function(v){var m=p[d],y=f[v],b=p[v],x=m.distance+y.distance;x<b.distance&&(b.distance=x,b.predecessor=y.predecessor)})})}),u}return Mv}var Dv,FC;function cj(){if(FC)return Dv;FC=1;var e=Or();Dv=t,t.CycleException=r;function t(n){var i={},o={},a=[];function u(c){if(e.has(o,c))throw new r;e.has(i,c)||(o[c]=!0,i[c]=!0,e.each(n.predecessors(c),u),delete o[c],a.push(c))}if(e.each(n.sinks(),u),e.size(i)!==n.nodeCount())throw new r;return a}function r(){}return r.prototype=new Error,Dv}var jv,$C;function uV(){if($C)return jv;$C=1;var e=cj();jv=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return jv}var qv,zC;function lj(){if(zC)return qv;zC=1;var e=Or();qv=t;function t(n,i,o){e.isArray(i)||(i=[i]);var a=(n.isDirected()?n.successors:n.neighbors).bind(n),u=[],c={};return e.each(i,function(d){if(!n.hasNode(d))throw new Error("Graph does not have node: "+d);r(n,d,o==="post",c,a,u)}),u}function r(n,i,o,a,u,c){e.has(a,i)||(a[i]=!0,o||c.push(i),e.each(u(i),function(d){r(n,d,o,a,u,c)}),o&&c.push(i))}return qv}var kv,HC;function cV(){if(HC)return kv;HC=1;var e=lj();kv=t;function t(r,n){return e(r,n,"post")}return kv}var Lv,UC;function lV(){if(UC)return Lv;UC=1;var e=lj();Lv=t;function t(r,n){return e(r,n,"pre")}return Lv}var Bv,VC;function fV(){if(VC)return Bv;VC=1;var e=Or(),t=bx(),r=aj();Bv=n;function n(i,o){var a=new t,u={},c=new r,d;function f(p){var v=p.v===d?p.w:p.v,m=c.priority(v);if(m!==void 0){var y=o(p);y<m&&(u[v]=d,c.decrease(v,y))}}if(i.nodeCount()===0)return a;e.each(i.nodes(),function(p){c.add(p,Number.POSITIVE_INFINITY),a.setNode(p)}),c.decrease(i.nodes()[0],0);for(var h=!1;c.size()>0;){if(d=c.removeMin(),e.has(u,d))a.setEdge(d,u[d]);else{if(h)throw new Error("Input graph is not connected: "+i);h=!0}i.nodeEdges(d).forEach(f)}return a}return Bv}var Fv,WC;function dV(){return WC||(WC=1,Fv={components:iV(),dijkstra:sj(),dijkstraAll:oV(),findCycles:aV(),floydWarshall:sV(),isAcyclic:uV(),postorder:cV(),preorder:lV(),prim:fV(),tarjan:uj(),topsort:cj()}),Fv}var $v,GC;function hV(){if(GC)return $v;GC=1;var e=rV();return $v={Graph:e.Graph,json:nV(),alg:dV(),version:e.version},$v}var zv,KC;function qr(){if(KC)return zv;KC=1;var e;if(typeof nx=="function")try{e=hV()}catch{}return e||(e=window.graphlib),zv=e,zv}var Hv,YC;function pV(){if(YC)return Hv;YC=1;var e=jD(),t=1,r=4;function n(i){return e(i,t|r)}return Hv=n,Hv}var Uv,XC;function kc(){if(XC)return Uv;XC=1;var e=yo(),t=_n(),r=Pc(),n=Sr();function i(o,a,u){if(!n(u))return!1;var c=typeof a;return(c=="number"?t(u)&&r(a,u.length):c=="string"&&a in u)?e(u[a],o):!1}return Uv=i,Uv}var Vv,ZC;function vV(){if(ZC)return Vv;ZC=1;var e=qc(),t=yo(),r=kc(),n=_i(),i=Object.prototype,o=i.hasOwnProperty,a=e(function(u,c){u=Object(u);var d=-1,f=c.length,h=f>2?c[2]:void 0;for(h&&r(c[0],c[1],h)&&(f=1);++d<f;)for(var p=c[d],v=n(p),m=-1,y=v.length;++m<y;){var b=v[m],x=u[b];(x===void 0||t(x,i[b])&&!o.call(u,b))&&(u[b]=p[b])}return u});return Vv=a,Vv}var Wv,JC;function gV(){if(JC)return Wv;JC=1;var e=En(),t=_n(),r=Vn();function n(i){return function(o,a,u){var c=Object(o);if(!t(o)){var d=e(a,3);o=r(o),a=function(h){return d(c[h],h,c)}}var f=i(o,a,u);return f>-1?c[d?o[f]:f]:void 0}}return Wv=n,Wv}var Gv,QC;function mV(){if(QC)return Gv;QC=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Gv=t,Gv}var Kv,eR;function yV(){if(eR)return Kv;eR=1;var e=mV(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Kv=r,Kv}var Yv,tR;function bV(){if(tR)return Yv;tR=1;var e=yV(),t=Sr(),r=_o(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt;function c(d){if(typeof d=="number")return d;if(r(d))return n;if(t(d)){var f=typeof d.valueOf=="function"?d.valueOf():d;d=t(f)?f+"":f}if(typeof d!="string")return d===0?d:+d;d=e(d);var h=o.test(d);return h||a.test(d)?u(d.slice(2),h?2:8):i.test(d)?n:+d}return Yv=c,Yv}var Xv,rR;function fj(){if(rR)return Xv;rR=1;var e=bV(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*r}return i===i?i:0}return Xv=n,Xv}var Zv,nR;function xV(){if(nR)return Zv;nR=1;var e=fj();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return Zv=t,Zv}var Jv,iR;function wV(){if(iR)return Jv;iR=1;var e=nj(),t=En(),r=xV(),n=Math.max;function i(o,a,u){var c=o==null?0:o.length;if(!c)return-1;var d=u==null?0:r(u);return d<0&&(d=n(c+d,0)),e(o,t(a,3),d)}return Jv=i,Jv}var Qv,oR;function _V(){if(oR)return Qv;oR=1;var e=gV(),t=wV(),r=e(t);return Qv=r,Qv}var eg,aR;function dj(){if(aR)return eg;aR=1;var e=yx();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return eg=t,eg}var tg,sR;function EV(){if(sR)return tg;sR=1;var e=px(),t=qD(),r=_i();function n(i,o){return i==null?i:e(i,t(o),r)}return tg=n,tg}var rg,uR;function SV(){if(uR)return rg;uR=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return rg=e,rg}var ng,cR;function OV(){if(cR)return ng;cR=1;var e=Cc(),t=vx(),r=En();function n(i,o){var a={};return o=r(o,3),t(i,function(u,c,d){e(a,c,o(u,c,d))}),a}return ng=n,ng}var ig,lR;function xx(){if(lR)return ig;lR=1;var e=_o();function t(r,n,i){for(var o=-1,a=r.length;++o<a;){var u=r[o],c=n(u);if(c!=null&&(d===void 0?c===c&&!e(c):i(c,d)))var d=c,f=u}return f}return ig=t,ig}var og,fR;function CV(){if(fR)return og;fR=1;function e(t,r){return t>r}return og=e,og}var ag,dR;function RV(){if(dR)return ag;dR=1;var e=xx(),t=CV(),r=Ei();function n(i){return i&&i.length?e(i,r,t):void 0}return ag=n,ag}var sg,hR;function hj(){if(hR)return sg;hR=1;var e=Cc(),t=yo();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return sg=r,sg}var ug,pR;function PV(){if(pR)return ug;pR=1;var e=xi(),t=Tc(),r=nn(),n="[object Object]",i=Function.prototype,o=Object.prototype,a=i.toString,u=o.hasOwnProperty,c=a.call(Object);function d(f){if(!r(f)||e(f)!=n)return!1;var h=t(f);if(h===null)return!0;var p=u.call(h,"constructor")&&h.constructor;return typeof p=="function"&&p instanceof p&&a.call(p)==c}return ug=d,ug}var cg,vR;function pj(){if(vR)return cg;vR=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return cg=e,cg}var lg,gR;function IV(){if(gR)return lg;gR=1;var e=za(),t=_i();function r(n){return e(n,t(n))}return lg=r,lg}var fg,mR;function NV(){if(mR)return fg;mR=1;var e=hj(),t=ED(),r=AD(),n=SD(),i=DD(),o=Ha(),a=yt(),u=ij(),c=xo(),d=$a(),f=Sr(),h=PV(),p=Ua(),v=pj(),m=IV();function y(b,x,w,S,E,_,R){var P=v(b,w),N=v(x,w),j=R.get(N);if(j){e(b,w,j);return}var L=_?_(P,N,w+"",b,x,R):void 0,F=L===void 0;if(F){var k=a(N),D=!k&&c(N),T=!k&&!D&&p(N);L=N,k||D||T?a(P)?L=P:u(P)?L=n(P):D?(F=!1,L=t(N,!0)):T?(F=!1,L=r(N,!0)):L=[]:h(N)||o(N)?(L=P,o(P)?L=m(P):(!f(P)||d(P))&&(L=i(N))):F=!1}F&&(R.set(N,L),E(L,N,S,_,R),R.delete(N)),e(b,w,L)}return fg=y,fg}var dg,yR;function TV(){if(yR)return dg;yR=1;var e=Oc(),t=hj(),r=px(),n=NV(),i=Sr(),o=_i(),a=pj();function u(c,d,f,h,p){c!==d&&r(d,function(v,m){if(p||(p=new e),i(v))n(c,d,m,f,u,h,p);else{var y=h?h(a(c,m),v,m+"",c,d,p):void 0;y===void 0&&(y=v),t(c,m,y)}},o)}return dg=u,dg}var hg,bR;function AV(){if(bR)return hg;bR=1;var e=qc(),t=kc();function r(n){return e(function(i,o){var a=-1,u=o.length,c=u>1?o[u-1]:void 0,d=u>2?o[2]:void 0;for(c=n.length>3&&typeof c=="function"?(u--,c):void 0,d&&t(o[0],o[1],d)&&(c=u<3?void 0:c,u=1),i=Object(i);++a<u;){var f=o[a];f&&n(i,f,a,c)}return i})}return hg=r,hg}var pg,xR;function MV(){if(xR)return pg;xR=1;var e=TV(),t=AV(),r=t(function(n,i,o){e(n,i,o)});return pg=r,pg}var vg,wR;function vj(){if(wR)return vg;wR=1;function e(t,r){return t<r}return vg=e,vg}var gg,_R;function DV(){if(_R)return gg;_R=1;var e=xx(),t=vj(),r=Ei();function n(i){return i&&i.length?e(i,r,t):void 0}return gg=n,gg}var mg,ER;function jV(){if(ER)return mg;ER=1;var e=xx(),t=En(),r=vj();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return mg=n,mg}var yg,SR;function qV(){if(SR)return yg;SR=1;var e=Br(),t=function(){return e.Date.now()};return yg=t,yg}var bg,OR;function kV(){if(OR)return bg;OR=1;var e=Rc(),t=Dc(),r=Pc(),n=Sr(),i=Va();function o(a,u,c,d){if(!n(a))return a;u=t(u,a);for(var f=-1,h=u.length,p=h-1,v=a;v!=null&&++f<h;){var m=i(u[f]),y=c;if(m==="__proto__"||m==="constructor"||m==="prototype")return a;if(f!=p){var b=v[m];y=d?d(b,m,v):void 0,y===void 0&&(y=n(b)?b:r(u[f+1])?[]:{})}e(v,m,y),v=v[m]}return a}return bg=o,bg}var xg,CR;function LV(){if(CR)return xg;CR=1;var e=jc(),t=kV(),r=Dc();function n(i,o,a){for(var u=-1,c=o.length,d={};++u<c;){var f=o[u],h=e(i,f);a(h,f)&&t(d,r(f,i),h)}return d}return xg=n,xg}var wg,RR;function BV(){if(RR)return wg;RR=1;var e=LV(),t=GD();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return wg=r,wg}var _g,PR;function FV(){if(PR)return _g;PR=1;var e=dj(),t=tj(),r=rj();function n(i){return r(t(i,void 0,e),i+"")}return _g=n,_g}var Eg,IR;function $V(){if(IR)return Eg;IR=1;var e=BV(),t=FV(),r=t(function(n,i){return n==null?{}:e(n,i)});return Eg=r,Eg}var Sg,NR;function zV(){if(NR)return Sg;NR=1;var e=Math.ceil,t=Math.max;function r(n,i,o,a){for(var u=-1,c=t(e((i-n)/(o||1)),0),d=Array(c);c--;)d[a?c:++u]=n,n+=o;return d}return Sg=r,Sg}var Og,TR;function HV(){if(TR)return Og;TR=1;var e=zV(),t=kc(),r=fj();function n(i){return function(o,a,u){return u&&typeof u!="number"&&t(o,a,u)&&(a=u=void 0),o=r(o),a===void 0?(a=o,o=0):a=r(a),u=u===void 0?o<a?1:-1:r(u),e(o,a,u,i)}}return Og=n,Og}var Cg,AR;function UV(){if(AR)return Cg;AR=1;var e=HV(),t=e();return Cg=t,Cg}var Rg,MR;function VV(){if(MR)return Rg;MR=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Rg=e,Rg}var Pg,DR;function WV(){if(DR)return Pg;DR=1;var e=_o();function t(r,n){if(r!==n){var i=r!==void 0,o=r===null,a=r===r,u=e(r),c=n!==void 0,d=n===null,f=n===n,h=e(n);if(!d&&!h&&!u&&r>n||u&&c&&f&&!d&&!h||o&&c&&f||!i&&f||!a)return 1;if(!o&&!u&&!h&&r<n||h&&i&&a&&!o&&!u||d&&i&&a||!c&&a||!f)return-1}return 0}return Pg=t,Pg}var Ig,jR;function GV(){if(jR)return Ig;jR=1;var e=WV();function t(r,n,i){for(var o=-1,a=r.criteria,u=n.criteria,c=a.length,d=i.length;++o<c;){var f=e(a[o],u[o]);if(f){if(o>=d)return f;var h=i[o];return f*(h=="desc"?-1:1)}}return r.index-n.index}return Ig=t,Ig}var Ng,qR;function KV(){if(qR)return Ng;qR=1;var e=Mc(),t=jc(),r=En(),n=JD(),i=VV(),o=Ic(),a=GV(),u=Ei(),c=yt();function d(f,h,p){h.length?h=e(h,function(y){return c(y)?function(b){return t(b,y.length===1?y[0]:y)}:y}):h=[u];var v=-1;h=e(h,o(r));var m=n(f,function(y,b,x){var w=e(h,function(S){return S(y)});return{criteria:w,index:++v,value:y}});return i(m,function(y,b){return a(y,b,p)})}return Ng=d,Ng}var Tg,kR;function YV(){if(kR)return Tg;kR=1;var e=yx(),t=KV(),r=qc(),n=kc(),i=r(function(o,a){if(o==null)return[];var u=a.length;return u>1&&n(o,a[0],a[1])?a=[]:u>2&&n(a[0],a[1],a[2])&&(a=[a[0]]),t(o,e(a,1),[])});return Tg=i,Tg}var Ag,LR;function XV(){if(LR)return Ag;LR=1;var e=VD(),t=0;function r(n){var i=++t;return e(n)+i}return Ag=r,Ag}var Mg,BR;function ZV(){if(BR)return Mg;BR=1;function e(t,r,n){for(var i=-1,o=t.length,a=r.length,u={};++i<o;){var c=i<a?r[i]:void 0;n(u,t[i],c)}return u}return Mg=e,Mg}var Dg,FR;function JV(){if(FR)return Dg;FR=1;var e=Rc(),t=ZV();function r(n,i){return t(n||[],i||[],e)}return Dg=r,Dg}var jg,$R;function lt(){if($R)return jg;$R=1;var e;if(typeof nx=="function")try{e={cloneDeep:pV(),constant:hx(),defaults:vV(),each:LD(),filter:YD(),find:_V(),flatten:dj(),forEach:kD(),forIn:EV(),has:XD(),isUndefined:ZD(),last:SV(),map:QD(),mapValues:OV(),max:RV(),merge:MV(),min:DV(),minBy:jV(),now:qV(),pick:$V(),range:UV(),reduce:ej(),sortBy:YV(),uniqueId:XV(),values:oj(),zipObject:JV()}}catch{}return e||(e=window._),jg=e,jg}var qg,zR;function QV(){if(zR)return qg;zR=1,qg=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,i=n._prev;if(i!==n)return t(i),i},e.prototype.enqueue=function(n){var i=this._sentinel;n._prev&&n._next&&t(n),n._next=i._next,i._next._prev=n,i._next=n,n._prev=i},e.prototype.toString=function(){for(var n=[],i=this._sentinel,o=i._prev;o!==i;)n.push(JSON.stringify(o,r)),o=o._prev;return"["+n.join(", ")+"]"};function t(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function r(n,i){if(n!=="_next"&&n!=="_prev")return i}return qg}var kg,HR;function eW(){if(HR)return kg;HR=1;var e=lt(),t=qr().Graph,r=QV();kg=i;var n=e.constant(1);function i(d,f){if(d.nodeCount()<=1)return[];var h=u(d,f||n),p=o(h.graph,h.buckets,h.zeroIdx);return e.flatten(e.map(p,function(v){return d.outEdges(v.v,v.w)}),!0)}function o(d,f,h){for(var p=[],v=f[f.length-1],m=f[0],y;d.nodeCount();){for(;y=m.dequeue();)a(d,f,h,y);for(;y=v.dequeue();)a(d,f,h,y);if(d.nodeCount()){for(var b=f.length-2;b>0;--b)if(y=f[b].dequeue(),y){p=p.concat(a(d,f,h,y,!0));break}}}return p}function a(d,f,h,p,v){var m=v?[]:void 0;return e.forEach(d.inEdges(p.v),function(y){var b=d.edge(y),x=d.node(y.v);v&&m.push({v:y.v,w:y.w}),x.out-=b,c(f,h,x)}),e.forEach(d.outEdges(p.v),function(y){var b=d.edge(y),x=y.w,w=d.node(x);w.in-=b,c(f,h,w)}),d.removeNode(p.v),m}function u(d,f){var h=new t,p=0,v=0;e.forEach(d.nodes(),function(b){h.setNode(b,{v:b,in:0,out:0})}),e.forEach(d.edges(),function(b){var x=h.edge(b.v,b.w)||0,w=f(b),S=x+w;h.setEdge(b.v,b.w,S),v=Math.max(v,h.node(b.v).out+=w),p=Math.max(p,h.node(b.w).in+=w)});var m=e.range(v+p+3).map(function(){return new r}),y=p+1;return e.forEach(h.nodes(),function(b){c(m,y,h.node(b))}),{graph:h,buckets:m,zeroIdx:y}}function c(d,f,h){h.out?h.in?d[h.out-h.in+f].enqueue(h):d[d.length-1].enqueue(h):d[0].enqueue(h)}return kg}var Lg,UR;function tW(){if(UR)return Lg;UR=1;var e=lt(),t=eW();Lg={run:r,undo:i};function r(o){var a=o.graph().acyclicer==="greedy"?t(o,u(o)):n(o);e.forEach(a,function(c){var d=o.edge(c);o.removeEdge(c),d.forwardName=c.name,d.reversed=!0,o.setEdge(c.w,c.v,d,e.uniqueId("rev"))});function u(c){return function(d){return c.edge(d).weight}}}function n(o){var a=[],u={},c={};function d(f){e.has(c,f)||(c[f]=!0,u[f]=!0,e.forEach(o.outEdges(f),function(h){e.has(u,h.w)?a.push(h):d(h.w)}),delete u[f])}return e.forEach(o.nodes(),d),a}function i(o){e.forEach(o.edges(),function(a){var u=o.edge(a);if(u.reversed){o.removeEdge(a);var c=u.forwardName;delete u.reversed,delete u.forwardName,o.setEdge(a.w,a.v,u,c)}})}return Lg}var Bg,VR;function Kt(){if(VR)return Bg;VR=1;var e=lt(),t=qr().Graph;Bg={addDummyNode:r,simplify:n,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:a,intersectRect:u,buildLayerMatrix:c,normalizeRanks:d,removeEmptyRanks:f,addBorderNode:h,maxRank:p,partition:v,time:m,notime:y};function r(b,x,w,S){var E;do E=e.uniqueId(S);while(b.hasNode(E));return w.dummy=x,b.setNode(E,w),E}function n(b){var x=new t().setGraph(b.graph());return e.forEach(b.nodes(),function(w){x.setNode(w,b.node(w))}),e.forEach(b.edges(),function(w){var S=x.edge(w.v,w.w)||{weight:0,minlen:1},E=b.edge(w);x.setEdge(w.v,w.w,{weight:S.weight+E.weight,minlen:Math.max(S.minlen,E.minlen)})}),x}function i(b){var x=new t({multigraph:b.isMultigraph()}).setGraph(b.graph());return e.forEach(b.nodes(),function(w){b.children(w).length||x.setNode(w,b.node(w))}),e.forEach(b.edges(),function(w){x.setEdge(w,b.edge(w))}),x}function o(b){var x=e.map(b.nodes(),function(w){var S={};return e.forEach(b.outEdges(w),function(E){S[E.w]=(S[E.w]||0)+b.edge(E).weight}),S});return e.zipObject(b.nodes(),x)}function a(b){var x=e.map(b.nodes(),function(w){var S={};return e.forEach(b.inEdges(w),function(E){S[E.v]=(S[E.v]||0)+b.edge(E).weight}),S});return e.zipObject(b.nodes(),x)}function u(b,x){var w=b.x,S=b.y,E=x.x-w,_=x.y-S,R=b.width/2,P=b.height/2;if(!E&&!_)throw new Error("Not possible to find intersection inside of the rectangle");var N,j;return Math.abs(_)*R>Math.abs(E)*P?(_<0&&(P=-P),N=P*E/_,j=P):(E<0&&(R=-R),N=R,j=R*_/E),{x:w+N,y:S+j}}function c(b){var x=e.map(e.range(p(b)+1),function(){return[]});return e.forEach(b.nodes(),function(w){var S=b.node(w),E=S.rank;e.isUndefined(E)||(x[E][S.order]=w)}),x}function d(b){var x=e.min(e.map(b.nodes(),function(w){return b.node(w).rank}));e.forEach(b.nodes(),function(w){var S=b.node(w);e.has(S,"rank")&&(S.rank-=x)})}function f(b){var x=e.min(e.map(b.nodes(),function(_){return b.node(_).rank})),w=[];e.forEach(b.nodes(),function(_){var R=b.node(_).rank-x;w[R]||(w[R]=[]),w[R].push(_)});var S=0,E=b.graph().nodeRankFactor;e.forEach(w,function(_,R){e.isUndefined(_)&&R%E!==0?--S:S&&e.forEach(_,function(P){b.node(P).rank+=S})})}function h(b,x,w,S){var E={width:0,height:0};return arguments.length>=4&&(E.rank=w,E.order=S),r(b,"border",E,x)}function p(b){return e.max(e.map(b.nodes(),function(x){var w=b.node(x).rank;if(!e.isUndefined(w))return w}))}function v(b,x){var w={lhs:[],rhs:[]};return e.forEach(b,function(S){x(S)?w.lhs.push(S):w.rhs.push(S)}),w}function m(b,x){var w=e.now();try{return x()}finally{console.log(b+" time: "+(e.now()-w)+"ms")}}function y(b,x){return x()}return Bg}var Fg,WR;function rW(){if(WR)return Fg;WR=1;var e=lt(),t=Kt();Fg={run:r,undo:i};function r(o){o.graph().dummyChains=[],e.forEach(o.edges(),function(a){n(o,a)})}function n(o,a){var u=a.v,c=o.node(u).rank,d=a.w,f=o.node(d).rank,h=a.name,p=o.edge(a),v=p.labelRank;if(f!==c+1){o.removeEdge(a);var m,y,b;for(b=0,++c;c<f;++b,++c)p.points=[],y={width:0,height:0,edgeLabel:p,edgeObj:a,rank:c},m=t.addDummyNode(o,"edge",y,"_d"),c===v&&(y.width=p.width,y.height=p.height,y.dummy="edge-label",y.labelpos=p.labelpos),o.setEdge(u,m,{weight:p.weight},h),b===0&&o.graph().dummyChains.push(m),u=m;o.setEdge(u,d,{weight:p.weight},h)}}function i(o){e.forEach(o.graph().dummyChains,function(a){var u=o.node(a),c=u.edgeLabel,d;for(o.setEdge(u.edgeObj,c);u.dummy;)d=o.successors(a)[0],o.removeNode(a),c.points.push({x:u.x,y:u.y}),u.dummy==="edge-label"&&(c.x=u.x,c.y=u.y,c.width=u.width,c.height=u.height),a=d,u=o.node(a)})}return Fg}var $g,GR;function Hu(){if(GR)return $g;GR=1;var e=lt();$g={longestPath:t,slack:r};function t(n){var i={};function o(a){var u=n.node(a);if(e.has(i,a))return u.rank;i[a]=!0;var c=e.min(e.map(n.outEdges(a),function(d){return o(d.w)-n.edge(d).minlen}));return(c===Number.POSITIVE_INFINITY||c===void 0||c===null)&&(c=0),u.rank=c}e.forEach(n.sources(),o)}function r(n,i){return n.node(i.w).rank-n.node(i.v).rank-n.edge(i).minlen}return $g}var zg,KR;function gj(){if(KR)return zg;KR=1;var e=lt(),t=qr().Graph,r=Hu().slack;zg=n;function n(u){var c=new t({directed:!1}),d=u.nodes()[0],f=u.nodeCount();c.setNode(d,{});for(var h,p;i(c,u)<f;)h=o(c,u),p=c.hasNode(h.v)?r(u,h):-r(u,h),a(c,u,p);return c}function i(u,c){function d(f){e.forEach(c.nodeEdges(f),function(h){var p=h.v,v=f===p?h.w:p;!u.hasNode(v)&&!r(c,h)&&(u.setNode(v,{}),u.setEdge(f,v,{}),d(v))})}return e.forEach(u.nodes(),d),u.nodeCount()}function o(u,c){return e.minBy(c.edges(),function(d){if(u.hasNode(d.v)!==u.hasNode(d.w))return r(c,d)})}function a(u,c,d){e.forEach(u.nodes(),function(f){c.node(f).rank+=d})}return zg}var Hg,YR;function nW(){if(YR)return Hg;YR=1;var e=lt(),t=gj(),r=Hu().slack,n=Hu().longestPath,i=qr().alg.preorder,o=qr().alg.postorder,a=Kt().simplify;Hg=u,u.initLowLimValues=h,u.initCutValues=c,u.calcCutValue=f,u.leaveEdge=v,u.enterEdge=m,u.exchangeEdges=y;function u(S){S=a(S),n(S);var E=t(S);h(E),c(E,S);for(var _,R;_=v(E);)R=m(E,S,_),y(E,S,_,R)}function c(S,E){var _=o(S,S.nodes());_=_.slice(0,_.length-1),e.forEach(_,function(R){d(S,E,R)})}function d(S,E,_){var R=S.node(_),P=R.parent;S.edge(_,P).cutvalue=f(S,E,_)}function f(S,E,_){var R=S.node(_),P=R.parent,N=!0,j=E.edge(_,P),L=0;return j||(N=!1,j=E.edge(P,_)),L=j.weight,e.forEach(E.nodeEdges(_),function(F){var k=F.v===_,D=k?F.w:F.v;if(D!==P){var T=k===N,B=E.edge(F).weight;if(L+=T?B:-B,x(S,_,D)){var $=S.edge(_,D).cutvalue;L+=T?-$:$}}}),L}function h(S,E){arguments.length<2&&(E=S.nodes()[0]),p(S,{},1,E)}function p(S,E,_,R,P){var N=_,j=S.node(R);return E[R]=!0,e.forEach(S.neighbors(R),function(L){e.has(E,L)||(_=p(S,E,_,L,R))}),j.low=N,j.lim=_++,P?j.parent=P:delete j.parent,_}function v(S){return e.find(S.edges(),function(E){return S.edge(E).cutvalue<0})}function m(S,E,_){var R=_.v,P=_.w;E.hasEdge(R,P)||(R=_.w,P=_.v);var N=S.node(R),j=S.node(P),L=N,F=!1;N.lim>j.lim&&(L=j,F=!0);var k=e.filter(E.edges(),function(D){return F===w(S,S.node(D.v),L)&&F!==w(S,S.node(D.w),L)});return e.minBy(k,function(D){return r(E,D)})}function y(S,E,_,R){var P=_.v,N=_.w;S.removeEdge(P,N),S.setEdge(R.v,R.w,{}),h(S),c(S,E),b(S,E)}function b(S,E){var _=e.find(S.nodes(),function(P){return!E.node(P).parent}),R=i(S,_);R=R.slice(1),e.forEach(R,function(P){var N=S.node(P).parent,j=E.edge(P,N),L=!1;j||(j=E.edge(N,P),L=!0),E.node(P).rank=E.node(N).rank+(L?j.minlen:-j.minlen)})}function x(S,E,_){return S.hasEdge(E,_)}function w(S,E,_){return _.low<=E.lim&&E.lim<=_.lim}return Hg}var Ug,XR;function iW(){if(XR)return Ug;XR=1;var e=Hu(),t=e.longestPath,r=gj(),n=nW();Ug=i;function i(c){switch(c.graph().ranker){case"network-simplex":u(c);break;case"tight-tree":a(c);break;case"longest-path":o(c);break;default:u(c)}}var o=t;function a(c){t(c),r(c)}function u(c){n(c)}return Ug}var Vg,ZR;function oW(){if(ZR)return Vg;ZR=1;var e=lt();Vg=t;function t(i){var o=n(i);e.forEach(i.graph().dummyChains,function(a){for(var u=i.node(a),c=u.edgeObj,d=r(i,o,c.v,c.w),f=d.path,h=d.lca,p=0,v=f[p],m=!0;a!==c.w;){if(u=i.node(a),m){for(;(v=f[p])!==h&&i.node(v).maxRank<u.rank;)p++;v===h&&(m=!1)}if(!m){for(;p<f.length-1&&i.node(v=f[p+1]).minRank<=u.rank;)p++;v=f[p]}i.setParent(a,v),a=i.successors(a)[0]}})}function r(i,o,a,u){var c=[],d=[],f=Math.min(o[a].low,o[u].low),h=Math.max(o[a].lim,o[u].lim),p,v;p=a;do p=i.parent(p),c.push(p);while(p&&(o[p].low>f||h>o[p].lim));for(v=p,p=u;(p=i.parent(p))!==v;)d.push(p);return{path:c.concat(d.reverse()),lca:v}}function n(i){var o={},a=0;function u(c){var d=a;e.forEach(i.children(c),u),o[c]={low:d,lim:a++}}return e.forEach(i.children(),u),o}return Vg}var Wg,JR;function aW(){if(JR)return Wg;JR=1;var e=lt(),t=Kt();Wg={run:r,cleanup:a};function r(u){var c=t.addDummyNode(u,"root",{},"_root"),d=i(u),f=e.max(e.values(d))-1,h=2*f+1;u.graph().nestingRoot=c,e.forEach(u.edges(),function(v){u.edge(v).minlen*=h});var p=o(u)+1;e.forEach(u.children(),function(v){n(u,c,h,p,f,d,v)}),u.graph().nodeRankFactor=h}function n(u,c,d,f,h,p,v){var m=u.children(v);if(!m.length){v!==c&&u.setEdge(c,v,{weight:0,minlen:d});return}var y=t.addBorderNode(u,"_bt"),b=t.addBorderNode(u,"_bb"),x=u.node(v);u.setParent(y,v),x.borderTop=y,u.setParent(b,v),x.borderBottom=b,e.forEach(m,function(w){n(u,c,d,f,h,p,w);var S=u.node(w),E=S.borderTop?S.borderTop:w,_=S.borderBottom?S.borderBottom:w,R=S.borderTop?f:2*f,P=E!==_?1:h-p[v]+1;u.setEdge(y,E,{weight:R,minlen:P,nestingEdge:!0}),u.setEdge(_,b,{weight:R,minlen:P,nestingEdge:!0})}),u.parent(v)||u.setEdge(c,y,{weight:0,minlen:h+p[v]})}function i(u){var c={};function d(f,h){var p=u.children(f);p&&p.length&&e.forEach(p,function(v){d(v,h+1)}),c[f]=h}return e.forEach(u.children(),function(f){d(f,1)}),c}function o(u){return e.reduce(u.edges(),function(c,d){return c+u.edge(d).weight},0)}function a(u){var c=u.graph();u.removeNode(c.nestingRoot),delete c.nestingRoot,e.forEach(u.edges(),function(d){var f=u.edge(d);f.nestingEdge&&u.removeEdge(d)})}return Wg}var Gg,QR;function sW(){if(QR)return Gg;QR=1;var e=lt(),t=Kt();Gg=r;function r(i){function o(a){var u=i.children(a),c=i.node(a);if(u.length&&e.forEach(u,o),e.has(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(var d=c.minRank,f=c.maxRank+1;d<f;++d)n(i,"borderLeft","_bl",a,c,d),n(i,"borderRight","_br",a,c,d)}}e.forEach(i.children(),o)}function n(i,o,a,u,c,d){var f={width:0,height:0,rank:d,borderType:o},h=c[o][d-1],p=t.addDummyNode(i,"border",f,a);c[o][d]=p,i.setParent(p,u),h&&i.setEdge(h,p,{weight:1})}return Gg}var Kg,eP;function uW(){if(eP)return Kg;eP=1;var e=lt();Kg={adjust:t,undo:r};function t(d){var f=d.graph().rankdir.toLowerCase();(f==="lr"||f==="rl")&&n(d)}function r(d){var f=d.graph().rankdir.toLowerCase();(f==="bt"||f==="rl")&&o(d),(f==="lr"||f==="rl")&&(u(d),n(d))}function n(d){e.forEach(d.nodes(),function(f){i(d.node(f))}),e.forEach(d.edges(),function(f){i(d.edge(f))})}function i(d){var f=d.width;d.width=d.height,d.height=f}function o(d){e.forEach(d.nodes(),function(f){a(d.node(f))}),e.forEach(d.edges(),function(f){var h=d.edge(f);e.forEach(h.points,a),e.has(h,"y")&&a(h)})}function a(d){d.y=-d.y}function u(d){e.forEach(d.nodes(),function(f){c(d.node(f))}),e.forEach(d.edges(),function(f){var h=d.edge(f);e.forEach(h.points,c),e.has(h,"x")&&c(h)})}function c(d){var f=d.x;d.x=d.y,d.y=f}return Kg}var Yg,tP;function cW(){if(tP)return Yg;tP=1;var e=lt();Yg=t;function t(r){var n={},i=e.filter(r.nodes(),function(d){return!r.children(d).length}),o=e.max(e.map(i,function(d){return r.node(d).rank})),a=e.map(e.range(o+1),function(){return[]});function u(d){if(!e.has(n,d)){n[d]=!0;var f=r.node(d);a[f.rank].push(d),e.forEach(r.successors(d),u)}}var c=e.sortBy(i,function(d){return r.node(d).rank});return e.forEach(c,u),a}return Yg}var Xg,rP;function lW(){if(rP)return Xg;rP=1;var e=lt();Xg=t;function t(n,i){for(var o=0,a=1;a<i.length;++a)o+=r(n,i[a-1],i[a]);return o}function r(n,i,o){for(var a=e.zipObject(o,e.map(o,function(p,v){return v})),u=e.flatten(e.map(i,function(p){return e.sortBy(e.map(n.outEdges(p),function(v){return{pos:a[v.w],weight:n.edge(v).weight}}),"pos")}),!0),c=1;c<o.length;)c<<=1;var d=2*c-1;c-=1;var f=e.map(new Array(d),function(){return 0}),h=0;return e.forEach(u.forEach(function(p){var v=p.pos+c;f[v]+=p.weight;for(var m=0;v>0;)v%2&&(m+=f[v+1]),v=v-1>>1,f[v]+=p.weight;h+=p.weight*m})),h}return Xg}var Zg,nP;function fW(){if(nP)return Zg;nP=1;var e=lt();Zg=t;function t(r,n){return e.map(n,function(i){var o=r.inEdges(i);if(o.length){var a=e.reduce(o,function(u,c){var d=r.edge(c),f=r.node(c.v);return{sum:u.sum+d.weight*f.order,weight:u.weight+d.weight}},{sum:0,weight:0});return{v:i,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:i}})}return Zg}var Jg,iP;function dW(){if(iP)return Jg;iP=1;var e=lt();Jg=t;function t(i,o){var a={};e.forEach(i,function(c,d){var f=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:d};e.isUndefined(c.barycenter)||(f.barycenter=c.barycenter,f.weight=c.weight)}),e.forEach(o.edges(),function(c){var d=a[c.v],f=a[c.w];!e.isUndefined(d)&&!e.isUndefined(f)&&(f.indegree++,d.out.push(a[c.w]))});var u=e.filter(a,function(c){return!c.indegree});return r(u)}function r(i){var o=[];function a(d){return function(f){f.merged||(e.isUndefined(f.barycenter)||e.isUndefined(d.barycenter)||f.barycenter>=d.barycenter)&&n(d,f)}}function u(d){return function(f){f.in.push(d),--f.indegree===0&&i.push(f)}}for(;i.length;){var c=i.pop();o.push(c),e.forEach(c.in.reverse(),a(c)),e.forEach(c.out,u(c))}return e.map(e.filter(o,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function n(i,o){var a=0,u=0;i.weight&&(a+=i.barycenter*i.weight,u+=i.weight),o.weight&&(a+=o.barycenter*o.weight,u+=o.weight),i.vs=o.vs.concat(i.vs),i.barycenter=a/u,i.weight=u,i.i=Math.min(o.i,i.i),o.merged=!0}return Jg}var Qg,oP;function hW(){if(oP)return Qg;oP=1;var e=lt(),t=Kt();Qg=r;function r(o,a){var u=t.partition(o,function(y){return e.has(y,"barycenter")}),c=u.lhs,d=e.sortBy(u.rhs,function(y){return-y.i}),f=[],h=0,p=0,v=0;c.sort(i(!!a)),v=n(f,d,v),e.forEach(c,function(y){v+=y.vs.length,f.push(y.vs),h+=y.barycenter*y.weight,p+=y.weight,v=n(f,d,v)});var m={vs:e.flatten(f,!0)};return p&&(m.barycenter=h/p,m.weight=p),m}function n(o,a,u){for(var c;a.length&&(c=e.last(a)).i<=u;)a.pop(),o.push(c.vs),u++;return u}function i(o){return function(a,u){return a.barycenter<u.barycenter?-1:a.barycenter>u.barycenter?1:o?u.i-a.i:a.i-u.i}}return Qg}var em,aP;function pW(){if(aP)return em;aP=1;var e=lt(),t=fW(),r=dW(),n=hW();em=i;function i(u,c,d,f){var h=u.children(c),p=u.node(c),v=p?p.borderLeft:void 0,m=p?p.borderRight:void 0,y={};v&&(h=e.filter(h,function(_){return _!==v&&_!==m}));var b=t(u,h);e.forEach(b,function(_){if(u.children(_.v).length){var R=i(u,_.v,d,f);y[_.v]=R,e.has(R,"barycenter")&&a(_,R)}});var x=r(b,d);o(x,y);var w=n(x,f);if(v&&(w.vs=e.flatten([v,w.vs,m],!0),u.predecessors(v).length)){var S=u.node(u.predecessors(v)[0]),E=u.node(u.predecessors(m)[0]);e.has(w,"barycenter")||(w.barycenter=0,w.weight=0),w.barycenter=(w.barycenter*w.weight+S.order+E.order)/(w.weight+2),w.weight+=2}return w}function o(u,c){e.forEach(u,function(d){d.vs=e.flatten(d.vs.map(function(f){return c[f]?c[f].vs:f}),!0)})}function a(u,c){e.isUndefined(u.barycenter)?(u.barycenter=c.barycenter,u.weight=c.weight):(u.barycenter=(u.barycenter*u.weight+c.barycenter*c.weight)/(u.weight+c.weight),u.weight+=c.weight)}return em}var tm,sP;function vW(){if(sP)return tm;sP=1;var e=lt(),t=qr().Graph;tm=r;function r(i,o,a){var u=n(i),c=new t({compound:!0}).setGraph({root:u}).setDefaultNodeLabel(function(d){return i.node(d)});return e.forEach(i.nodes(),function(d){var f=i.node(d),h=i.parent(d);(f.rank===o||f.minRank<=o&&o<=f.maxRank)&&(c.setNode(d),c.setParent(d,h||u),e.forEach(i[a](d),function(p){var v=p.v===d?p.w:p.v,m=c.edge(v,d),y=e.isUndefined(m)?0:m.weight;c.setEdge(v,d,{weight:i.edge(p).weight+y})}),e.has(f,"minRank")&&c.setNode(d,{borderLeft:f.borderLeft[o],borderRight:f.borderRight[o]}))}),c}function n(i){for(var o;i.hasNode(o=e.uniqueId("_root")););return o}return tm}var rm,uP;function gW(){if(uP)return rm;uP=1;var e=lt();rm=t;function t(r,n,i){var o={},a;e.forEach(i,function(u){for(var c=r.parent(u),d,f;c;){if(d=r.parent(c),d?(f=o[d],o[d]=c):(f=a,a=c),f&&f!==c){n.setEdge(f,c);return}c=d}})}return rm}var nm,cP;function mW(){if(cP)return nm;cP=1;var e=lt(),t=cW(),r=lW(),n=pW(),i=vW(),o=gW(),a=qr().Graph,u=Kt();nm=c;function c(p){var v=u.maxRank(p),m=d(p,e.range(1,v+1),"inEdges"),y=d(p,e.range(v-1,-1,-1),"outEdges"),b=t(p);h(p,b);for(var x=Number.POSITIVE_INFINITY,w,S=0,E=0;E<4;++S,++E){f(S%2?m:y,S%4>=2),b=u.buildLayerMatrix(p);var _=r(p,b);_<x&&(E=0,w=e.cloneDeep(b),x=_)}h(p,w)}function d(p,v,m){return e.map(v,function(y){return i(p,y,m)})}function f(p,v){var m=new a;e.forEach(p,function(y){var b=y.graph().root,x=n(y,b,m,v);e.forEach(x.vs,function(w,S){y.node(w).order=S}),o(y,m,x.vs)})}function h(p,v){e.forEach(v,function(m){e.forEach(m,function(y,b){p.node(y).order=b})})}return nm}var im,lP;function yW(){if(lP)return im;lP=1;var e=lt(),t=qr().Graph,r=Kt();im={positionX:m,findType1Conflicts:n,findType2Conflicts:i,addConflict:a,hasConflict:u,verticalAlignment:c,horizontalCompaction:d,alignCoordinates:p,findSmallestWidthAlignment:h,balance:v};function n(x,w){var S={};function E(_,R){var P=0,N=0,j=_.length,L=e.last(R);return e.forEach(R,function(F,k){var D=o(x,F),T=D?x.node(D).order:j;(D||F===L)&&(e.forEach(R.slice(N,k+1),function(B){e.forEach(x.predecessors(B),function($){var W=x.node($),Y=W.order;(Y<P||T<Y)&&!(W.dummy&&x.node(B).dummy)&&a(S,$,B)})}),N=k+1,P=T)}),R}return e.reduce(w,E),S}function i(x,w){var S={};function E(R,P,N,j,L){var F;e.forEach(e.range(P,N),function(k){F=R[k],x.node(F).dummy&&e.forEach(x.predecessors(F),function(D){var T=x.node(D);T.dummy&&(T.order<j||T.order>L)&&a(S,D,F)})})}function _(R,P){var N=-1,j,L=0;return e.forEach(P,function(F,k){if(x.node(F).dummy==="border"){var D=x.predecessors(F);D.length&&(j=x.node(D[0]).order,E(P,L,k,N,j),L=k,N=j)}E(P,L,P.length,j,R.length)}),P}return e.reduce(w,_),S}function o(x,w){if(x.node(w).dummy)return e.find(x.predecessors(w),function(S){return x.node(S).dummy})}function a(x,w,S){if(w>S){var E=w;w=S,S=E}var _=x[w];_||(x[w]=_={}),_[S]=!0}function u(x,w,S){if(w>S){var E=w;w=S,S=E}return e.has(x[w],S)}function c(x,w,S,E){var _={},R={},P={};return e.forEach(w,function(N){e.forEach(N,function(j,L){_[j]=j,R[j]=j,P[j]=L})}),e.forEach(w,function(N){var j=-1;e.forEach(N,function(L){var F=E(L);if(F.length){F=e.sortBy(F,function($){return P[$]});for(var k=(F.length-1)/2,D=Math.floor(k),T=Math.ceil(k);D<=T;++D){var B=F[D];R[L]===L&&j<P[B]&&!u(S,L,B)&&(R[B]=L,R[L]=_[L]=_[B],j=P[B])}}})}),{root:_,align:R}}function d(x,w,S,E,_){var R={},P=f(x,w,S,_),N=_?"borderLeft":"borderRight";function j(k,D){for(var T=P.nodes(),B=T.pop(),$={};B;)$[B]?k(B):($[B]=!0,T.push(B),T=T.concat(D(B))),B=T.pop()}function L(k){R[k]=P.inEdges(k).reduce(function(D,T){return Math.max(D,R[T.v]+P.edge(T))},0)}function F(k){var D=P.outEdges(k).reduce(function(B,$){return Math.min(B,R[$.w]-P.edge($))},Number.POSITIVE_INFINITY),T=x.node(k);D!==Number.POSITIVE_INFINITY&&T.borderType!==N&&(R[k]=Math.max(R[k],D))}return j(L,P.predecessors.bind(P)),j(F,P.successors.bind(P)),e.forEach(E,function(k){R[k]=R[S[k]]}),R}function f(x,w,S,E){var _=new t,R=x.graph(),P=y(R.nodesep,R.edgesep,E);return e.forEach(w,function(N){var j;e.forEach(N,function(L){var F=S[L];if(_.setNode(F),j){var k=S[j],D=_.edge(k,F);_.setEdge(k,F,Math.max(P(x,L,j),D||0))}j=L})}),_}function h(x,w){return e.minBy(e.values(w),function(S){var E=Number.NEGATIVE_INFINITY,_=Number.POSITIVE_INFINITY;return e.forIn(S,function(R,P){var N=b(x,P)/2;E=Math.max(R+N,E),_=Math.min(R-N,_)}),E-_})}function p(x,w){var S=e.values(w),E=e.min(S),_=e.max(S);e.forEach(["u","d"],function(R){e.forEach(["l","r"],function(P){var N=R+P,j=x[N],L;if(j!==w){var F=e.values(j);L=P==="l"?E-e.min(F):_-e.max(F),L&&(x[N]=e.mapValues(j,function(k){return k+L}))}})})}function v(x,w){return e.mapValues(x.ul,function(S,E){if(w)return x[w.toLowerCase()][E];var _=e.sortBy(e.map(x,E));return(_[1]+_[2])/2})}function m(x){var w=r.buildLayerMatrix(x),S=e.merge(n(x,w),i(x,w)),E={},_;e.forEach(["u","d"],function(P){_=P==="u"?w:e.values(w).reverse(),e.forEach(["l","r"],function(N){N==="r"&&(_=e.map(_,function(k){return e.values(k).reverse()}));var j=(P==="u"?x.predecessors:x.successors).bind(x),L=c(x,_,S,j),F=d(x,_,L.root,L.align,N==="r");N==="r"&&(F=e.mapValues(F,function(k){return-k})),E[P+N]=F})});var R=h(x,E);return p(E,R),v(E,x.graph().align)}function y(x,w,S){return function(E,_,R){var P=E.node(_),N=E.node(R),j=0,L;if(j+=P.width/2,e.has(P,"labelpos"))switch(P.labelpos.toLowerCase()){case"l":L=-P.width/2;break;case"r":L=P.width/2;break}if(L&&(j+=S?L:-L),L=0,j+=(P.dummy?w:x)/2,j+=(N.dummy?w:x)/2,j+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":L=N.width/2;break;case"r":L=-N.width/2;break}return L&&(j+=S?L:-L),L=0,j}}function b(x,w){return x.node(w).width}return im}var om,fP;function bW(){if(fP)return om;fP=1;var e=lt(),t=Kt(),r=yW().positionX;om=n;function n(o){o=t.asNonCompoundGraph(o),i(o),e.forEach(r(o),function(a,u){o.node(u).x=a})}function i(o){var a=t.buildLayerMatrix(o),u=o.graph().ranksep,c=0;e.forEach(a,function(d){var f=e.max(e.map(d,function(h){return o.node(h).height}));e.forEach(d,function(h){o.node(h).y=c+f/2}),c+=f+u})}return om}var am,dP;function xW(){if(dP)return am;dP=1;var e=lt(),t=tW(),r=rW(),n=iW(),i=Kt().normalizeRanks,o=oW(),a=Kt().removeEmptyRanks,u=aW(),c=sW(),d=uW(),f=mW(),h=bW(),p=Kt(),v=qr().Graph;am=m;function m(z,G){var J=G&&G.debugTiming?p.time:p.notime;J("layout",function(){var V=J(" buildLayoutGraph",function(){return j(z)});J(" runLayout",function(){y(V,J)}),J(" updateInputGraph",function(){b(z,V)})})}function y(z,G){G(" makeSpaceForEdgeLabels",function(){L(z)}),G(" removeSelfEdges",function(){ee(z)}),G(" acyclic",function(){t.run(z)}),G(" nestingGraph.run",function(){u.run(z)}),G(" rank",function(){n(p.asNonCompoundGraph(z))}),G(" injectEdgeLabelProxies",function(){F(z)}),G(" removeEmptyRanks",function(){a(z)}),G(" nestingGraph.cleanup",function(){u.cleanup(z)}),G(" normalizeRanks",function(){i(z)}),G(" assignRankMinMax",function(){k(z)}),G(" removeEdgeLabelProxies",function(){D(z)}),G(" normalize.run",function(){r.run(z)}),G(" parentDummyChains",function(){o(z)}),G(" addBorderSegments",function(){c(z)}),G(" order",function(){f(z)}),G(" insertSelfEdges",function(){H(z)}),G(" adjustCoordinateSystem",function(){d.adjust(z)}),G(" position",function(){h(z)}),G(" positionSelfEdges",function(){Q(z)}),G(" removeBorderNodes",function(){Y(z)}),G(" normalize.undo",function(){r.undo(z)}),G(" fixupEdgeLabelCoords",function(){$(z)}),G(" undoCoordinateSystem",function(){d.undo(z)}),G(" translateGraph",function(){T(z)}),G(" assignNodeIntersects",function(){B(z)}),G(" reversePoints",function(){W(z)}),G(" acyclic.undo",function(){t.undo(z)})}function b(z,G){e.forEach(z.nodes(),function(J){var V=z.node(J),K=G.node(J);V&&(V.x=K.x,V.y=K.y,G.children(J).length&&(V.width=K.width,V.height=K.height))}),e.forEach(z.edges(),function(J){var V=z.edge(J),K=G.edge(J);V.points=K.points,e.has(K,"x")&&(V.x=K.x,V.y=K.y)}),z.graph().width=G.graph().width,z.graph().height=G.graph().height}var x=["nodesep","edgesep","ranksep","marginx","marginy"],w={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},S=["acyclicer","ranker","rankdir","align"],E=["width","height"],_={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],P={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},N=["labelpos"];function j(z){var G=new v({multigraph:!0,compound:!0}),J=se(z.graph());return G.setGraph(e.merge({},w,ce(J,x),e.pick(J,S))),e.forEach(z.nodes(),function(V){var K=se(z.node(V));G.setNode(V,e.defaults(ce(K,E),_)),G.setParent(V,z.parent(V))}),e.forEach(z.edges(),function(V){var K=se(z.edge(V));G.setEdge(V,e.merge({},P,ce(K,R),e.pick(K,N)))}),G}function L(z){var G=z.graph();G.ranksep/=2,e.forEach(z.edges(),function(J){var V=z.edge(J);V.minlen*=2,V.labelpos.toLowerCase()!=="c"&&(G.rankdir==="TB"||G.rankdir==="BT"?V.width+=V.labeloffset:V.height+=V.labeloffset)})}function F(z){e.forEach(z.edges(),function(G){var J=z.edge(G);if(J.width&&J.height){var V=z.node(G.v),K=z.node(G.w),ie={rank:(K.rank-V.rank)/2+V.rank,e:G};p.addDummyNode(z,"edge-proxy",ie,"_ep")}})}function k(z){var G=0;e.forEach(z.nodes(),function(J){var V=z.node(J);V.borderTop&&(V.minRank=z.node(V.borderTop).rank,V.maxRank=z.node(V.borderBottom).rank,G=e.max(G,V.maxRank))}),z.graph().maxRank=G}function D(z){e.forEach(z.nodes(),function(G){var J=z.node(G);J.dummy==="edge-proxy"&&(z.edge(J.e).labelRank=J.rank,z.removeNode(G))})}function T(z){var G=Number.POSITIVE_INFINITY,J=0,V=Number.POSITIVE_INFINITY,K=0,ie=z.graph(),ne=ie.marginx||0,ue=ie.marginy||0;function de(we){var Se=we.x,_e=we.y,he=we.width,ae=we.height;G=Math.min(G,Se-he/2),J=Math.max(J,Se+he/2),V=Math.min(V,_e-ae/2),K=Math.max(K,_e+ae/2)}e.forEach(z.nodes(),function(we){de(z.node(we))}),e.forEach(z.edges(),function(we){var Se=z.edge(we);e.has(Se,"x")&&de(Se)}),G-=ne,V-=ue,e.forEach(z.nodes(),function(we){var Se=z.node(we);Se.x-=G,Se.y-=V}),e.forEach(z.edges(),function(we){var Se=z.edge(we);e.forEach(Se.points,function(_e){_e.x-=G,_e.y-=V}),e.has(Se,"x")&&(Se.x-=G),e.has(Se,"y")&&(Se.y-=V)}),ie.width=J-G+ne,ie.height=K-V+ue}function B(z){e.forEach(z.edges(),function(G){var J=z.edge(G),V=z.node(G.v),K=z.node(G.w),ie,ne;J.points?(ie=J.points[0],ne=J.points[J.points.length-1]):(J.points=[],ie=K,ne=V),J.points.unshift(p.intersectRect(V,ie)),J.points.push(p.intersectRect(K,ne))})}function $(z){e.forEach(z.edges(),function(G){var J=z.edge(G);if(e.has(J,"x"))switch((J.labelpos==="l"||J.labelpos==="r")&&(J.width-=J.labeloffset),J.labelpos){case"l":J.x-=J.width/2+J.labeloffset;break;case"r":J.x+=J.width/2+J.labeloffset;break}})}function W(z){e.forEach(z.edges(),function(G){var J=z.edge(G);J.reversed&&J.points.reverse()})}function Y(z){e.forEach(z.nodes(),function(G){if(z.children(G).length){var J=z.node(G),V=z.node(J.borderTop),K=z.node(J.borderBottom),ie=z.node(e.last(J.borderLeft)),ne=z.node(e.last(J.borderRight));J.width=Math.abs(ne.x-ie.x),J.height=Math.abs(K.y-V.y),J.x=ie.x+J.width/2,J.y=V.y+J.height/2}}),e.forEach(z.nodes(),function(G){z.node(G).dummy==="border"&&z.removeNode(G)})}function ee(z){e.forEach(z.edges(),function(G){if(G.v===G.w){var J=z.node(G.v);J.selfEdges||(J.selfEdges=[]),J.selfEdges.push({e:G,label:z.edge(G)}),z.removeEdge(G)}})}function H(z){var G=p.buildLayerMatrix(z);e.forEach(G,function(J){var V=0;e.forEach(J,function(K,ie){var ne=z.node(K);ne.order=ie+V,e.forEach(ne.selfEdges,function(ue){p.addDummyNode(z,"selfedge",{width:ue.label.width,height:ue.label.height,rank:ne.rank,order:ie+ ++V,e:ue.e,label:ue.label},"_se")}),delete ne.selfEdges})})}function Q(z){e.forEach(z.nodes(),function(G){var J=z.node(G);if(J.dummy==="selfedge"){var V=z.node(J.e.v),K=V.x+V.width/2,ie=V.y,ne=J.x-K,ue=V.height/2;z.setEdge(J.e,J.label),z.removeNode(G),J.label.points=[{x:K+2*ne/3,y:ie-ue},{x:K+5*ne/6,y:ie-ue},{x:K+ne,y:ie},{x:K+5*ne/6,y:ie+ue},{x:K+2*ne/3,y:ie+ue}],J.label.x=J.x,J.label.y=J.y}})}function ce(z,G){return e.mapValues(e.pick(z,G),Number)}function se(z){var G={};return e.forEach(z,function(J,V){G[V.toLowerCase()]=J}),G}return am}var sm,hP;function wW(){if(hP)return sm;hP=1;var e=lt(),t=Kt(),r=qr().Graph;sm={debugOrdering:n};function n(i){var o=t.buildLayerMatrix(i),a=new r({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(u){a.setNode(u,{label:u}),a.setParent(u,"layer"+i.node(u).rank)}),e.forEach(i.edges(),function(u){a.setEdge(u.v,u.w,{},u.name)}),e.forEach(o,function(u,c){var d="layer"+c;a.setNode(d,{rank:"same"}),e.reduce(u,function(f,h){return a.setEdge(f,h,{style:"invis"}),h})}),a}return sm}var um,pP;function _W(){return pP||(pP=1,um="0.8.5"),um}var cm,vP;function EW(){return vP||(vP=1,cm={graphlib:qr(),layout:xW(),debug:wW(),util:{time:Kt().time,notime:Kt().notime},version:_W()}),cm}var SW=EW();const gP=Hn(SW);function OW(e){let t;const r=new Set,n=(d,f)=>{const h=typeof d=="function"?d(t):d;if(h!==t){const p=t;t=f?h:Object.assign({},t,h),r.forEach(v=>v(t,p))}},i=()=>t,o=(d,f=i,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=f(t);function v(){const m=f(t);if(!h(p,m)){const y=p;d(p=m,y)}}return r.add(v),()=>r.delete(v)},c={setState:n,getState:i,subscribe:(d,f,h)=>f||h?o(d,f,h):(r.add(d),()=>r.delete(d)),destroy:()=>r.clear()};return t=e(n,i,c),c}const CW=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),mP=CW?A.useEffect:A.useLayoutEffect;function RW(e){const t=typeof e=="function"?OW(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=A.useReducer(b=>b+1,0),a=t.getState(),u=A.useRef(a),c=A.useRef(n),d=A.useRef(i),f=A.useRef(!1),h=A.useRef();h.current===void 0&&(h.current=n(a));let p,v=!1;(u.current!==a||c.current!==n||d.current!==i||f.current)&&(p=n(a),v=!i(h.current,p)),mP(()=>{v&&(h.current=p),u.current=a,c.current=n,d.current=i,f.current=!1});const m=A.useRef(a);mP(()=>{const b=()=>{try{const w=t.getState(),S=c.current(w);d.current(h.current,S)||(u.current=w,h.current=S,o())}catch{f.current=!0,o()}},x=t.subscribe(b);return t.getState()!==m.current&&b(),x},[]);const y=v?p:h.current;return A.useDebugValue(y),y};return Object.assign(r,t),r[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[r,t];return{next(){const i=n.length<=0;return{value:n.shift(),done:i}}}},r}function PW(){const e=A.createContext(void 0);return{Provider:({initialStore:i,createStore:o,children:a})=>{const u=A.useRef();return u.current||(i&&(console.warn("Provider initialStore is deprecated and will be removed in the next version."),o||(o=()=>i)),u.current=o()),A.createElement(e.Provider,{value:u.current},a)},useStore:(i,o=Object.is)=>{const a=A.useContext(e);if(!a)throw new Error("Seems like you have not used zustand provider as an ancestor.");return a(i,o)},useStoreApi:()=>{const i=A.useContext(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return A.useMemo(()=>({getState:i.getState,setState:i.setState,subscribe:i.subscribe,destroy:i.destroy}),[i])}}}var IW={value:()=>{}};function Lc(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Mu(r)}function Mu(e){this._=e}function NW(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Mu.prototype=Lc.prototype={constructor:Mu,on:function(e,t){var r=this._,n=NW(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=TW(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=yP(r[i],e.name,t);else if(t==null)for(i in r)r[i]=yP(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Mu(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};function TW(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function yP(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=IW,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Sb="http://www.w3.org/1999/xhtml";const bP={svg:"http://www.w3.org/2000/svg",xhtml:Sb,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Bc(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),bP.hasOwnProperty(t)?{space:bP[t],local:e}:e}function AW(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Sb&&t.documentElement.namespaceURI===Sb?t.createElement(e):t.createElementNS(r,e)}}function MW(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function mj(e){var t=Bc(e);return(t.local?MW:AW)(t)}function DW(){}function wx(e){return e==null?DW:function(){return this.querySelector(e)}}function jW(e){typeof e!="function"&&(e=wx(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,u=n[i]=new Array(a),c,d,f=0;f<a;++f)(c=o[f])&&(d=e.call(c,c.__data__,f,o))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d);return new sr(n,this._parents)}function qW(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function kW(){return[]}function yj(e){return e==null?kW:function(){return this.querySelectorAll(e)}}function LW(e){return function(){return qW(e.apply(this,arguments))}}function BW(e){typeof e=="function"?e=LW(e):e=yj(e);for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],u=a.length,c,d=0;d<u;++d)(c=a[d])&&(n.push(e.call(c,c.__data__,d,a)),i.push(c));return new sr(n,i)}function bj(e){return function(){return this.matches(e)}}function xj(e){return function(t){return t.matches(e)}}var FW=Array.prototype.find;function $W(e){return function(){return FW.call(this.children,e)}}function zW(){return this.firstElementChild}function HW(e){return this.select(e==null?zW:$W(typeof e=="function"?e:xj(e)))}var UW=Array.prototype.filter;function VW(){return Array.from(this.children)}function WW(e){return function(){return UW.call(this.children,e)}}function GW(e){return this.selectAll(e==null?VW:WW(typeof e=="function"?e:xj(e)))}function KW(e){typeof e!="function"&&(e=bj(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,u=n[i]=[],c,d=0;d<a;++d)(c=o[d])&&e.call(c,c.__data__,d,o)&&u.push(c);return new sr(n,this._parents)}function wj(e){return new Array(e.length)}function YW(){return new sr(this._enter||this._groups.map(wj),this._parents)}function Uu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Uu.prototype={constructor:Uu,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 XW(e){return function(){return e}}function ZW(e,t,r,n,i,o){for(var a=0,u,c=t.length,d=o.length;a<d;++a)(u=t[a])?(u.__data__=o[a],n[a]=u):r[a]=new Uu(e,o[a]);for(;a<c;++a)(u=t[a])&&(i[a]=u)}function JW(e,t,r,n,i,o,a){var u,c,d=new Map,f=t.length,h=o.length,p=new Array(f),v;for(u=0;u<f;++u)(c=t[u])&&(p[u]=v=a.call(c,c.__data__,u,t)+"",d.has(v)?i[u]=c:d.set(v,c));for(u=0;u<h;++u)v=a.call(e,o[u],u,o)+"",(c=d.get(v))?(n[u]=c,c.__data__=o[u],d.delete(v)):r[u]=new Uu(e,o[u]);for(u=0;u<f;++u)(c=t[u])&&d.get(p[u])===c&&(i[u]=c)}function QW(e){return e.__data__}function e6(e,t){if(!arguments.length)return Array.from(this,QW);var r=t?JW:ZW,n=this._parents,i=this._groups;typeof e!="function"&&(e=XW(e));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),d=0;d<o;++d){var f=n[d],h=i[d],p=h.length,v=t6(e.call(f,f&&f.__data__,d,n)),m=v.length,y=u[d]=new Array(m),b=a[d]=new Array(m),x=c[d]=new Array(p);r(f,h,y,b,x,v,t);for(var w=0,S=0,E,_;w<m;++w)if(E=y[w]){for(w>=S&&(S=w+1);!(_=b[S])&&++S<m;);E._next=_||null}}return a=new sr(a,n),a._enter=u,a._exit=c,a}function t6(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function r6(){return new sr(this._exit||this._groups.map(wj),this._parents)}function n6(e,t,r){var n=this.enter(),i=this,o=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function i6(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,o=n.length,a=Math.min(i,o),u=new Array(i),c=0;c<a;++c)for(var d=r[c],f=n[c],h=d.length,p=u[c]=new Array(h),v,m=0;m<h;++m)(v=d[m]||f[m])&&(p[m]=v);for(;c<i;++c)u[c]=r[c];return new sr(u,this._parents)}function o6(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function a6(e){e||(e=s6);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],u=a.length,c=i[o]=new Array(u),d,f=0;f<u;++f)(d=a[f])&&(c[f]=d);c.sort(t)}return new sr(i,this._parents).order()}function s6(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function u6(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function c6(){return Array.from(this)}function l6(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}function f6(){let e=0;for(const t of this)++e;return e}function d6(){return!this.node()}function h6(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,u;o<a;++o)(u=i[o])&&e.call(u,u.__data__,o,i);return this}function p6(e){return function(){this.removeAttribute(e)}}function v6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function g6(e,t){return function(){this.setAttribute(e,t)}}function m6(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function y6(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function b6(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function x6(e,t){var r=Bc(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?v6:p6:typeof t=="function"?r.local?b6:y6:r.local?m6:g6)(r,t))}function _j(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function w6(e){return function(){this.style.removeProperty(e)}}function _6(e,t,r){return function(){this.style.setProperty(e,t,r)}}function E6(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function S6(e,t,r){return arguments.length>1?this.each((t==null?w6:typeof t=="function"?E6:_6)(e,t,r??"")):po(this.node(),e)}function po(e,t){return e.style.getPropertyValue(t)||_j(e).getComputedStyle(e,null).getPropertyValue(t)}function O6(e){return function(){delete this[e]}}function C6(e,t){return function(){this[e]=t}}function R6(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function P6(e,t){return arguments.length>1?this.each((t==null?O6:typeof t=="function"?R6:C6)(e,t)):this.node()[e]}function Ej(e){return e.trim().split(/^|\s+/)}function _x(e){return e.classList||new Sj(e)}function Sj(e){this._node=e,this._names=Ej(e.getAttribute("class")||"")}Sj.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 Oj(e,t){for(var r=_x(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Cj(e,t){for(var r=_x(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function I6(e){return function(){Oj(this,e)}}function N6(e){return function(){Cj(this,e)}}function T6(e,t){return function(){(t.apply(this,arguments)?Oj:Cj)(this,e)}}function A6(e,t){var r=Ej(e+"");if(arguments.length<2){for(var n=_x(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?T6:t?I6:N6)(r,t))}function M6(){this.textContent=""}function D6(e){return function(){this.textContent=e}}function j6(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function q6(e){return arguments.length?this.each(e==null?M6:(typeof e=="function"?j6:D6)(e)):this.node().textContent}function k6(){this.innerHTML=""}function L6(e){return function(){this.innerHTML=e}}function B6(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function F6(e){return arguments.length?this.each(e==null?k6:(typeof e=="function"?B6:L6)(e)):this.node().innerHTML}function $6(){this.nextSibling&&this.parentNode.appendChild(this)}function z6(){return this.each($6)}function H6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function U6(){return this.each(H6)}function V6(e){var t=typeof e=="function"?e:mj(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function W6(){return null}function G6(e,t){var r=typeof e=="function"?e:mj(e),n=t==null?W6:typeof t=="function"?t:wx(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function K6(){var e=this.parentNode;e&&e.removeChild(this)}function Y6(){return this.each(K6)}function X6(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Z6(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function J6(e){return this.select(e?Z6:X6)}function Q6(e){return arguments.length?this.property("__data__",e):this.node().__data__}function e8(e){return function(t){e.call(this,t,this.__data__)}}function t8(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function r8(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++n]=o;++n?t.length=n:delete this.__on}}}function n8(e,t,r){return function(){var n=this.__on,i,o=e8(t);if(n){for(var a=0,u=n.length;a<u;++a)if((i=n[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=r),i.value=t;return}}this.addEventListener(e.type,o,r),i={type:e.type,name:e.name,value:t,listener:o,options:r},n?n.push(i):this.__on=[i]}}function i8(e,t,r){var n=t8(e+""),i,o=n.length,a;if(arguments.length<2){var u=this.node().__on;if(u){for(var c=0,d=u.length,f;c<d;++c)for(i=0,f=u[c];i<o;++i)if((a=n[i]).type===f.type&&a.name===f.name)return f.value}return}for(u=t?n8:r8,i=0;i<o;++i)this.each(u(n[i],t,r));return this}function Rj(e,t,r){var n=_j(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function o8(e,t){return function(){return Rj(this,e,t)}}function a8(e,t){return function(){return Rj(this,e,t.apply(this,arguments))}}function s8(e,t){return this.each((typeof t=="function"?a8:o8)(e,t))}function*u8(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length,a;i<o;++i)(a=n[i])&&(yield a)}var Pj=[null];function sr(e,t){this._groups=e,this._parents=t}function Wa(){return new sr([[document.documentElement]],Pj)}function c8(){return this}sr.prototype=Wa.prototype={constructor:sr,select:jW,selectAll:BW,selectChild:HW,selectChildren:GW,filter:KW,data:e6,enter:YW,exit:r6,join:n6,merge:i6,selection:c8,order:o6,sort:a6,call:u6,nodes:c6,node:l6,size:f6,empty:d6,each:h6,attr:x6,style:S6,property:P6,classed:A6,text:q6,html:F6,raise:z6,lower:U6,append:V6,insert:G6,remove:Y6,clone:J6,datum:Q6,on:i8,dispatch:s8,[Symbol.iterator]:u8};function Ar(e){return typeof e=="string"?new sr([[document.querySelector(e)]],[document.documentElement]):new sr([[e]],Pj)}function l8(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Yr(e,t){if(e=l8(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const f8={passive:!1},Ta={capture:!0,passive:!1};function lm(e){e.stopImmediatePropagation()}function to(e){e.preventDefault(),e.stopImmediatePropagation()}function Ij(e){var t=e.document.documentElement,r=Ar(e).on("dragstart.drag",to,Ta);"onselectstart"in t?r.on("selectstart.drag",to,Ta):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Nj(e,t){var r=e.document.documentElement,n=Ar(e).on("dragstart.drag",null);t&&(n.on("click.drag",to,Ta),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const uu=e=>()=>e;function Ob(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:o,x:a,y:u,dx:c,dy:d,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:f}})}Ob.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function d8(e){return!e.ctrlKey&&!e.button}function h8(){return this.parentNode}function p8(e,t){return t??{x:e.x,y:e.y}}function v8(){return navigator.maxTouchPoints||"ontouchstart"in this}function g8(){var e=d8,t=h8,r=p8,n=v8,i={},o=Lc("start","drag","end"),a=0,u,c,d,f,h=0;function p(E){E.on("mousedown.drag",v).filter(n).on("touchstart.drag",b).on("touchmove.drag",x,f8).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(E,_){if(!(f||!e.call(this,E,_))){var R=S(this,t.call(this,E,_),E,_,"mouse");R&&(Ar(E.view).on("mousemove.drag",m,Ta).on("mouseup.drag",y,Ta),Ij(E.view),lm(E),d=!1,u=E.clientX,c=E.clientY,R("start",E))}}function m(E){if(to(E),!d){var _=E.clientX-u,R=E.clientY-c;d=_*_+R*R>h}i.mouse("drag",E)}function y(E){Ar(E.view).on("mousemove.drag mouseup.drag",null),Nj(E.view,d),to(E),i.mouse("end",E)}function b(E,_){if(e.call(this,E,_)){var R=E.changedTouches,P=t.call(this,E,_),N=R.length,j,L;for(j=0;j<N;++j)(L=S(this,P,E,_,R[j].identifier,R[j]))&&(lm(E),L("start",E,R[j]))}}function x(E){var _=E.changedTouches,R=_.length,P,N;for(P=0;P<R;++P)(N=i[_[P].identifier])&&(to(E),N("drag",E,_[P]))}function w(E){var _=E.changedTouches,R=_.length,P,N;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),P=0;P<R;++P)(N=i[_[P].identifier])&&(lm(E),N("end",E,_[P]))}function S(E,_,R,P,N,j){var L=o.copy(),F=Yr(j||R,_),k,D,T;if((T=r.call(E,new Ob("beforestart",{sourceEvent:R,target:p,identifier:N,active:a,x:F[0],y:F[1],dx:0,dy:0,dispatch:L}),P))!=null)return k=T.x-F[0]||0,D=T.y-F[1]||0,function B($,W,Y){var ee=F,H;switch($){case"start":i[N]=B,H=a++;break;case"end":delete i[N],--a;case"drag":F=Yr(Y||W,_),H=a;break}L.call($,E,new Ob($,{sourceEvent:W,subject:T,target:p,identifier:N,active:H,x:F[0]+k,y:F[1]+D,dx:F[0]-ee[0],dy:F[1]-ee[1],dispatch:L}),P)}}return p.filter=function(E){return arguments.length?(e=typeof E=="function"?E:uu(!!E),p):e},p.container=function(E){return arguments.length?(t=typeof E=="function"?E:uu(E),p):t},p.subject=function(E){return arguments.length?(r=typeof E=="function"?E:uu(E),p):r},p.touchable=function(E){return arguments.length?(n=typeof E=="function"?E:uu(!!E),p):n},p.on=function(){var E=o.on.apply(o,arguments);return E===o?p:E},p.clickDistance=function(E){return arguments.length?(h=(E=+E)*E,p):Math.sqrt(h)},p}function Ex(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Tj(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ga(){}var Aa=.7,Vu=1/Aa,ro="\\s*([+-]?\\d+)\\s*",Ma="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",m8=/^#([0-9a-f]{3,8})$/,y8=new RegExp(`^rgb\\(${ro},${ro},${ro}\\)$`),b8=new RegExp(`^rgb\\(${Qr},${Qr},${Qr}\\)$`),x8=new RegExp(`^rgba\\(${ro},${ro},${ro},${Ma}\\)$`),w8=new RegExp(`^rgba\\(${Qr},${Qr},${Qr},${Ma}\\)$`),_8=new RegExp(`^hsl\\(${Ma},${Qr},${Qr}\\)$`),E8=new RegExp(`^hsla\\(${Ma},${Qr},${Qr},${Ma}\\)$`),xP={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};Ex(Ga,Da,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:wP,formatHex:wP,formatHex8:S8,formatHsl:O8,formatRgb:_P,toString:_P});function wP(){return this.rgb().formatHex()}function S8(){return this.rgb().formatHex8()}function O8(){return Aj(this).formatHsl()}function _P(){return this.rgb().formatRgb()}function Da(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=m8.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?EP(t):r===3?new Vt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?cu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?cu(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=y8.exec(e))?new Vt(t[1],t[2],t[3],1):(t=b8.exec(e))?new Vt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=x8.exec(e))?cu(t[1],t[2],t[3],t[4]):(t=w8.exec(e))?cu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=_8.exec(e))?CP(t[1],t[2]/100,t[3]/100,1):(t=E8.exec(e))?CP(t[1],t[2]/100,t[3]/100,t[4]):xP.hasOwnProperty(e)?EP(xP[e]):e==="transparent"?new Vt(NaN,NaN,NaN,0):null}function EP(e){return new Vt(e>>16&255,e>>8&255,e&255,1)}function cu(e,t,r,n){return n<=0&&(e=t=r=NaN),new Vt(e,t,r,n)}function C8(e){return e instanceof Ga||(e=Da(e)),e?(e=e.rgb(),new Vt(e.r,e.g,e.b,e.opacity)):new Vt}function Cb(e,t,r,n){return arguments.length===1?C8(e):new Vt(e,t,r,n??1)}function Vt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Ex(Vt,Cb,Tj(Ga,{brighter(e){return e=e==null?Vu:Math.pow(Vu,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Aa:Math.pow(Aa,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vt(ci(this.r),ci(this.g),ci(this.b),Wu(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:SP,formatHex:SP,formatHex8:R8,formatRgb:OP,toString:OP}));function SP(){return`#${si(this.r)}${si(this.g)}${si(this.b)}`}function R8(){return`#${si(this.r)}${si(this.g)}${si(this.b)}${si((isNaN(this.opacity)?1:this.opacity)*255)}`}function OP(){const e=Wu(this.opacity);return`${e===1?"rgb(":"rgba("}${ci(this.r)}, ${ci(this.g)}, ${ci(this.b)}${e===1?")":`, ${e})`}`}function Wu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ci(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function si(e){return e=ci(e),(e<16?"0":"")+e.toString(16)}function CP(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Mr(e,t,r,n)}function Aj(e){if(e instanceof Mr)return new Mr(e.h,e.s,e.l,e.opacity);if(e instanceof Ga||(e=Da(e)),!e)return new Mr;if(e instanceof Mr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,u=o-i,c=(o+i)/2;return u?(t===o?a=(r-n)/u+(r<n)*6:r===o?a=(n-t)/u+2:a=(t-r)/u+4,u/=c<.5?o+i:2-o-i,a*=60):u=c>0&&c<1?0:a,new Mr(a,u,c,e.opacity)}function P8(e,t,r,n){return arguments.length===1?Aj(e):new Mr(e,t,r,n??1)}function Mr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Ex(Mr,P8,Tj(Ga,{brighter(e){return e=e==null?Vu:Math.pow(Vu,e),new Mr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Aa:Math.pow(Aa,e),new Mr(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Vt(fm(e>=240?e-240:e+120,i,n),fm(e,i,n),fm(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Mr(RP(this.h),lu(this.s),lu(this.l),Wu(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=Wu(this.opacity);return`${e===1?"hsl(":"hsla("}${RP(this.h)}, ${lu(this.s)*100}%, ${lu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function RP(e){return e=(e||0)%360,e<0?e+360:e}function lu(e){return Math.max(0,Math.min(1,e||0))}function fm(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Mj=e=>()=>e;function I8(e,t){return function(r){return e+r*t}}function N8(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function T8(e){return(e=+e)==1?Dj:function(t,r){return r-t?N8(t,r,e):Mj(isNaN(t)?r:t)}}function Dj(e,t){var r=t-e;return r?I8(e,r):Mj(isNaN(e)?t:e)}const PP=(function e(t){var r=T8(t);function n(i,o){var a=r((i=Cb(i)).r,(o=Cb(o)).r),u=r(i.g,o.g),c=r(i.b,o.b),d=Dj(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=u(f),i.b=c(f),i.opacity=d(f),i+""}}return n.gamma=e,n})(1);function Ln(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Rb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dm=new RegExp(Rb.source,"g");function A8(e){return function(){return e}}function M8(e){return function(t){return e(t)+""}}function D8(e,t){var r=Rb.lastIndex=dm.lastIndex=0,n,i,o,a=-1,u=[],c=[];for(e=e+"",t=t+"";(n=Rb.exec(e))&&(i=dm.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),u[a]?u[a]+=o:u[++a]=o),(n=n[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,c.push({i:a,x:Ln(n,i)})),r=dm.lastIndex;return r<t.length&&(o=t.slice(r),u[a]?u[a]+=o:u[++a]=o),u.length<2?c[0]?M8(c[0].x):A8(t):(t=c.length,function(d){for(var f=0,h;f<t;++f)u[(h=c[f]).i]=h.x(d);return u.join("")})}var IP=180/Math.PI,Pb={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function jj(e,t,r,n,i,o){var a,u,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*r+t*n)&&(r-=e*c,n-=t*c),(u=Math.sqrt(r*r+n*n))&&(r/=u,n/=u,c/=u),e*n<t*r&&(e=-e,t=-t,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*IP,skewX:Math.atan(c)*IP,scaleX:a,scaleY:u}}var fu;function j8(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Pb:jj(t.a,t.b,t.c,t.d,t.e,t.f)}function q8(e){return e==null||(fu||(fu=document.createElementNS("http://www.w3.org/2000/svg","g")),fu.setAttribute("transform",e),!(e=fu.transform.baseVal.consolidate()))?Pb:(e=e.matrix,jj(e.a,e.b,e.c,e.d,e.e,e.f))}function qj(e,t,r,n){function i(d){return d.length?d.pop()+" ":""}function o(d,f,h,p,v,m){if(d!==h||f!==p){var y=v.push("translate(",null,t,null,r);m.push({i:y-4,x:Ln(d,h)},{i:y-2,x:Ln(f,p)})}else(h||p)&&v.push("translate("+h+t+p+r)}function a(d,f,h,p){d!==f?(d-f>180?f+=360:f-d>180&&(d+=360),p.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Ln(d,f)})):f&&h.push(i(h)+"rotate("+f+n)}function u(d,f,h,p){d!==f?p.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Ln(d,f)}):f&&h.push(i(h)+"skewX("+f+n)}function c(d,f,h,p,v,m){if(d!==h||f!==p){var y=v.push(i(v)+"scale(",null,",",null,")");m.push({i:y-4,x:Ln(d,h)},{i:y-2,x:Ln(f,p)})}else(h!==1||p!==1)&&v.push(i(v)+"scale("+h+","+p+")")}return function(d,f){var h=[],p=[];return d=e(d),f=e(f),o(d.translateX,d.translateY,f.translateX,f.translateY,h,p),a(d.rotate,f.rotate,h,p),u(d.skewX,f.skewX,h,p),c(d.scaleX,d.scaleY,f.scaleX,f.scaleY,h,p),d=f=null,function(v){for(var m=-1,y=p.length,b;++m<y;)h[(b=p[m]).i]=b.x(v);return h.join("")}}}var k8=qj(j8,"px, ","px)","deg)"),L8=qj(q8,", ",")",")"),B8=1e-12;function NP(e){return((e=Math.exp(e))+1/e)/2}function F8(e){return((e=Math.exp(e))-1/e)/2}function $8(e){return((e=Math.exp(2*e))-1)/(e+1)}const z8=(function e(t,r,n){function i(o,a){var u=o[0],c=o[1],d=o[2],f=a[0],h=a[1],p=a[2],v=f-u,m=h-c,y=v*v+m*m,b,x;if(y<B8)x=Math.log(p/d)/t,b=function(P){return[u+P*v,c+P*m,d*Math.exp(t*P*x)]};else{var w=Math.sqrt(y),S=(p*p-d*d+n*y)/(2*d*r*w),E=(p*p-d*d-n*y)/(2*p*r*w),_=Math.log(Math.sqrt(S*S+1)-S),R=Math.log(Math.sqrt(E*E+1)-E);x=(R-_)/t,b=function(P){var N=P*x,j=NP(_),L=d/(r*w)*(j*$8(t*N+_)-F8(_));return[u+L*v,c+L*m,d*j/NP(t*N+_)]}}return b.duration=x*1e3*t/Math.SQRT2,b}return i.rho=function(o){var a=Math.max(.001,+o),u=a*a,c=u*u;return e(a,u,c)},i})(Math.SQRT2,2,4);var vo=0,xa=0,Zo=0,kj=1e3,Gu,wa,Ku=0,vi=0,Fc=0,ja=typeof performance=="object"&&performance.now?performance:Date,Lj=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Sx(){return vi||(Lj(H8),vi=ja.now()+Fc)}function H8(){vi=0}function Yu(){this._call=this._time=this._next=null}Yu.prototype=Bj.prototype={constructor:Yu,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Sx():+r)+(t==null?0:+t),!this._next&&wa!==this&&(wa?wa._next=this:Gu=this,wa=this),this._call=e,this._time=r,Ib()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ib())}};function Bj(e,t,r){var n=new Yu;return n.restart(e,t,r),n}function U8(){Sx(),++vo;for(var e=Gu,t;e;)(t=vi-e._time)>=0&&e._call.call(void 0,t),e=e._next;--vo}function TP(){vi=(Ku=ja.now())+Fc,vo=xa=0;try{U8()}finally{vo=0,W8(),vi=0}}function V8(){var e=ja.now(),t=e-Ku;t>kj&&(Fc-=t,Ku=e)}function W8(){for(var e,t=Gu,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Gu=r);wa=e,Ib(n)}function Ib(e){if(!vo){xa&&(xa=clearTimeout(xa));var t=e-vi;t>24?(e<1/0&&(xa=setTimeout(TP,e-ja.now()-Fc)),Zo&&(Zo=clearInterval(Zo))):(Zo||(Ku=ja.now(),Zo=setInterval(V8,kj)),vo=1,Lj(TP))}}function AP(e,t,r){var n=new Yu;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var G8=Lc("start","end","cancel","interrupt"),K8=[],Fj=0,MP=1,Nb=2,Du=3,DP=4,Tb=5,ju=6;function $c(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Y8(e,r,{name:t,index:n,group:i,on:G8,tween:K8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Fj})}function Ox(e,t){var r=Fr(e,t);if(r.state>Fj)throw new Error("too late; already scheduled");return r}function on(e,t){var r=Fr(e,t);if(r.state>Du)throw new Error("too late; already running");return r}function Fr(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Y8(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=Bj(o,0,r.time);function o(d){r.state=MP,r.timer.restart(a,r.delay,r.time),r.delay<=d&&a(d-r.delay)}function a(d){var f,h,p,v;if(r.state!==MP)return c();for(f in n)if(v=n[f],v.name===r.name){if(v.state===Du)return AP(a);v.state===DP?(v.state=ju,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[f]):+f<t&&(v.state=ju,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[f])}if(AP(function(){r.state===Du&&(r.state=DP,r.timer.restart(u,r.delay,r.time),u(d))}),r.state=Nb,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Nb){for(r.state=Du,i=new Array(p=r.tween.length),f=0,h=-1;f<p;++f)(v=r.tween[f].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=v);i.length=h+1}}function u(d){for(var f=d<r.duration?r.ease.call(null,d/r.duration):(r.timer.restart(c),r.state=Tb,1),h=-1,p=i.length;++h<p;)i[h].call(e,f);r.state===Tb&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=ju,r.timer.stop(),delete n[t];for(var d in n)return;delete e.__transition}}function qu(e,t){var r=e.__transition,n,i,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>Nb&&n.state<Tb,n.state=ju,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function X8(e){return this.each(function(){qu(this,e)})}function Z8(e,t){var r,n;return function(){var i=on(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,u=n.length;a<u;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function J8(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=on(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var u={name:t,value:r},c=0,d=i.length;c<d;++c)if(i[c].name===t){i[c]=u;break}c===d&&i.push(u)}o.tween=i}}function Q8(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Fr(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?Z8:J8)(r,e,t))}function Cx(e,t,r){var n=e._id;return e.each(function(){var i=on(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Fr(i,n).value[t]}}function $j(e,t){var r;return(typeof t=="number"?Ln:t instanceof Da?PP:(r=Da(t))?(t=r,PP):D8)(e,t)}function eG(e){return function(){this.removeAttribute(e)}}function tG(e){return function(){this.removeAttributeNS(e.space,e.local)}}function rG(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===n?o:o=t(n=a,r)}}function nG(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?o:o=t(n=a,r)}}function iG(e,t,r){var n,i,o;return function(){var a,u=r(this),c;return u==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=u+"",a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,u)))}}function oG(e,t,r){var n,i,o;return function(){var a,u=r(this),c;return u==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=u+"",a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,u)))}}function aG(e,t){var r=Bc(e),n=r==="transform"?L8:$j;return this.attrTween(e,typeof t=="function"?(r.local?oG:iG)(r,n,Cx(this,"attr."+e,t)):t==null?(r.local?tG:eG)(r):(r.local?nG:rG)(r,n,t))}function sG(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function uG(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function cG(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&uG(e,o)),r}return i._value=t,i}function lG(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&sG(e,o)),r}return i._value=t,i}function fG(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=Bc(e);return this.tween(r,(n.local?cG:lG)(n,t))}function dG(e,t){return function(){Ox(this,e).delay=+t.apply(this,arguments)}}function hG(e,t){return t=+t,function(){Ox(this,e).delay=t}}function pG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?dG:hG)(t,e)):Fr(this.node(),t).delay}function vG(e,t){return function(){on(this,e).duration=+t.apply(this,arguments)}}function gG(e,t){return t=+t,function(){on(this,e).duration=t}}function mG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?vG:gG)(t,e)):Fr(this.node(),t).duration}function yG(e,t){if(typeof t!="function")throw new Error;return function(){on(this,e).ease=t}}function bG(e){var t=this._id;return arguments.length?this.each(yG(t,e)):Fr(this.node(),t).ease}function xG(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;on(this,e).ease=r}}function wG(e){if(typeof e!="function")throw new Error;return this.each(xG(this._id,e))}function _G(e){typeof e!="function"&&(e=bj(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,u=n[i]=[],c,d=0;d<a;++d)(c=o[d])&&e.call(c,c.__data__,d,o)&&u.push(c);return new bn(n,this._parents,this._name,this._id)}function EG(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),u=0;u<o;++u)for(var c=t[u],d=r[u],f=c.length,h=a[u]=new Array(f),p,v=0;v<f;++v)(p=c[v]||d[v])&&(h[v]=p);for(;u<n;++u)a[u]=t[u];return new bn(a,this._parents,this._name,this._id)}function SG(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function OG(e,t,r){var n,i,o=SG(t)?Ox:on;return function(){var a=o(this,e),u=a.on;u!==n&&(i=(n=u).copy()).on(t,r),a.on=i}}function CG(e,t){var r=this._id;return arguments.length<2?Fr(this.node(),r).on.on(e):this.each(OG(r,e,t))}function RG(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function PG(){return this.on("end.remove",RG(this._id))}function IG(e){var t=this._name,r=this._id;typeof e!="function"&&(e=wx(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var u=n[a],c=u.length,d=o[a]=new Array(c),f,h,p=0;p<c;++p)(f=u[p])&&(h=e.call(f,f.__data__,p,u))&&("__data__"in f&&(h.__data__=f.__data__),d[p]=h,$c(d[p],t,r,p,d,Fr(f,r)));return new bn(o,this._parents,t,r)}function NG(e){var t=this._name,r=this._id;typeof e!="function"&&(e=yj(e));for(var n=this._groups,i=n.length,o=[],a=[],u=0;u<i;++u)for(var c=n[u],d=c.length,f,h=0;h<d;++h)if(f=c[h]){for(var p=e.call(f,f.__data__,h,c),v,m=Fr(f,r),y=0,b=p.length;y<b;++y)(v=p[y])&&$c(v,t,r,y,p,m);o.push(p),a.push(f)}return new bn(o,a,t,r)}var TG=Wa.prototype.constructor;function AG(){return new TG(this._groups,this._parents)}function MG(e,t){var r,n,i;return function(){var o=po(this,e),a=(this.style.removeProperty(e),po(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function zj(e){return function(){this.style.removeProperty(e)}}function DG(e,t,r){var n,i=r+"",o;return function(){var a=po(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function jG(e,t,r){var n,i,o;return function(){var a=po(this,e),u=r(this),c=u+"";return u==null&&(c=u=(this.style.removeProperty(e),po(this,e))),a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,u))}}function qG(e,t){var r,n,i,o="style."+t,a="end."+o,u;return function(){var c=on(this,e),d=c.on,f=c.value[o]==null?u||(u=zj(t)):void 0;(d!==r||i!==f)&&(n=(r=d).copy()).on(a,i=f),c.on=n}}function kG(e,t,r){var n=(e+="")=="transform"?k8:$j;return t==null?this.styleTween(e,MG(e,n)).on("end.style."+e,zj(e)):typeof t=="function"?this.styleTween(e,jG(e,n,Cx(this,"style."+e,t))).each(qG(this._id,e)):this.styleTween(e,DG(e,n,t),r).on("end.style."+e,null)}function LG(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function BG(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&LG(e,a,r)),n}return o._value=t,o}function FG(e,t,r){var n="style."+(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;return this.tween(n,BG(e,t,r??""))}function $G(e){return function(){this.textContent=e}}function zG(e){return function(){var t=e(this);this.textContent=t??""}}function HG(e){return this.tween("text",typeof e=="function"?zG(Cx(this,"text",e)):$G(e==null?"":e+""))}function UG(e){return function(t){this.textContent=e.call(this,t)}}function VG(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&UG(i)),t}return n._value=e,n}function WG(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,VG(e))}function GG(){for(var e=this._name,t=this._id,r=Hj(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],u=a.length,c,d=0;d<u;++d)if(c=a[d]){var f=Fr(c,t);$c(c,e,r,d,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new bn(n,this._parents,e,r)}function KG(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var u={value:a},c={value:function(){--i===0&&o()}};r.each(function(){var d=on(this,n),f=d.on;f!==e&&(t=(e=f).copy(),t._.cancel.push(u),t._.interrupt.push(u),t._.end.push(c)),d.on=t}),i===0&&o()})}var YG=0;function bn(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Hj(){return++YG}var gn=Wa.prototype;bn.prototype={constructor:bn,select:IG,selectAll:NG,selectChild:gn.selectChild,selectChildren:gn.selectChildren,filter:_G,merge:EG,selection:AG,transition:GG,call:gn.call,nodes:gn.nodes,node:gn.node,size:gn.size,empty:gn.empty,each:gn.each,on:CG,attr:aG,attrTween:fG,style:kG,styleTween:FG,text:HG,textTween:WG,remove:PG,tween:Q8,delay:pG,duration:mG,ease:bG,easeVarying:wG,end:KG,[Symbol.iterator]:gn[Symbol.iterator]};function XG(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ZG={time:null,delay:0,duration:250,ease:XG};function JG(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function QG(e){var t,r;e instanceof bn?(t=e._id,e=e._name):(t=Hj(),(r=ZG).time=Sx(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],u=a.length,c,d=0;d<u;++d)(c=a[d])&&$c(c,e,t,d,a,r||JG(c,t));return new bn(n,this._parents,e,t)}Wa.prototype.interrupt=X8;Wa.prototype.transition=QG;const du=e=>()=>e;function eK(e,{sourceEvent:t,target:r,transform:n,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:i}})}function mn(e,t,r){this.k=e,this.x=t,this.y=r}mn.prototype={constructor:mn,scale:function(e){return e===1?this:new mn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new mn(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 li=new mn(1,0,0);mn.prototype;function hm(e){e.stopImmediatePropagation()}function Jo(e){e.preventDefault(),e.stopImmediatePropagation()}function tK(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function rK(){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 jP(){return this.__zoom||li}function nK(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function iK(){return navigator.maxTouchPoints||"ontouchstart"in this}function oK(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function aK(){var e=tK,t=rK,r=oK,n=nK,i=iK,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],u=250,c=z8,d=Lc("start","zoom","end"),f,h,p,v=500,m=150,y=0,b=10;function x(T){T.property("__zoom",jP).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",L).filter(i).on("touchstart.zoom",F).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",D).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(T,B,$,W){var Y=T.selection?T.selection():T;Y.property("__zoom",jP),T!==Y?_(T,B,$,W):Y.interrupt().each(function(){R(this,arguments).event(W).start().zoom(null,typeof B=="function"?B.apply(this,arguments):B).end()})},x.scaleBy=function(T,B,$,W){x.scaleTo(T,function(){var Y=this.__zoom.k,ee=typeof B=="function"?B.apply(this,arguments):B;return Y*ee},$,W)},x.scaleTo=function(T,B,$,W){x.transform(T,function(){var Y=t.apply(this,arguments),ee=this.__zoom,H=$==null?E(Y):typeof $=="function"?$.apply(this,arguments):$,Q=ee.invert(H),ce=typeof B=="function"?B.apply(this,arguments):B;return r(S(w(ee,ce),H,Q),Y,a)},$,W)},x.translateBy=function(T,B,$,W){x.transform(T,function(){return r(this.__zoom.translate(typeof B=="function"?B.apply(this,arguments):B,typeof $=="function"?$.apply(this,arguments):$),t.apply(this,arguments),a)},null,W)},x.translateTo=function(T,B,$,W,Y){x.transform(T,function(){var ee=t.apply(this,arguments),H=this.__zoom,Q=W==null?E(ee):typeof W=="function"?W.apply(this,arguments):W;return r(li.translate(Q[0],Q[1]).scale(H.k).translate(typeof B=="function"?-B.apply(this,arguments):-B,typeof $=="function"?-$.apply(this,arguments):-$),ee,a)},W,Y)};function w(T,B){return B=Math.max(o[0],Math.min(o[1],B)),B===T.k?T:new mn(B,T.x,T.y)}function S(T,B,$){var W=B[0]-$[0]*T.k,Y=B[1]-$[1]*T.k;return W===T.x&&Y===T.y?T:new mn(T.k,W,Y)}function E(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function _(T,B,$,W){T.on("start.zoom",function(){R(this,arguments).event(W).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(W).end()}).tween("zoom",function(){var Y=this,ee=arguments,H=R(Y,ee).event(W),Q=t.apply(Y,ee),ce=$==null?E(Q):typeof $=="function"?$.apply(Y,ee):$,se=Math.max(Q[1][0]-Q[0][0],Q[1][1]-Q[0][1]),z=Y.__zoom,G=typeof B=="function"?B.apply(Y,ee):B,J=c(z.invert(ce).concat(se/z.k),G.invert(ce).concat(se/G.k));return function(V){if(V===1)V=G;else{var K=J(V),ie=se/K[2];V=new mn(ie,ce[0]-K[0]*ie,ce[1]-K[1]*ie)}H.zoom(null,V)}})}function R(T,B,$){return!$&&T.__zooming||new P(T,B)}function P(T,B){this.that=T,this.args=B,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,B),this.taps=0}P.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,B){return this.mouse&&T!=="mouse"&&(this.mouse[1]=B.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=B.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=B.invert(this.touch1[0])),this.that.__zoom=B,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var B=Ar(this.that).datum();d.call(T,this.that,new eK(T,{sourceEvent:this.sourceEvent,target:x,transform:this.that.__zoom,dispatch:d}),B)}};function N(T,...B){if(!e.apply(this,arguments))return;var $=R(this,B).event(T),W=this.__zoom,Y=Math.max(o[0],Math.min(o[1],W.k*Math.pow(2,n.apply(this,arguments)))),ee=Yr(T);if($.wheel)($.mouse[0][0]!==ee[0]||$.mouse[0][1]!==ee[1])&&($.mouse[1]=W.invert($.mouse[0]=ee)),clearTimeout($.wheel);else{if(W.k===Y)return;$.mouse=[ee,W.invert(ee)],qu(this),$.start()}Jo(T),$.wheel=setTimeout(H,m),$.zoom("mouse",r(S(w(W,Y),$.mouse[0],$.mouse[1]),$.extent,a));function H(){$.wheel=null,$.end()}}function j(T,...B){if(p||!e.apply(this,arguments))return;var $=T.currentTarget,W=R(this,B,!0).event(T),Y=Ar(T.view).on("mousemove.zoom",ce,!0).on("mouseup.zoom",se,!0),ee=Yr(T,$),H=T.clientX,Q=T.clientY;Ij(T.view),hm(T),W.mouse=[ee,this.__zoom.invert(ee)],qu(this),W.start();function ce(z){if(Jo(z),!W.moved){var G=z.clientX-H,J=z.clientY-Q;W.moved=G*G+J*J>y}W.event(z).zoom("mouse",r(S(W.that.__zoom,W.mouse[0]=Yr(z,$),W.mouse[1]),W.extent,a))}function se(z){Y.on("mousemove.zoom mouseup.zoom",null),Nj(z.view,W.moved),Jo(z),W.event(z).end()}}function L(T,...B){if(e.apply(this,arguments)){var $=this.__zoom,W=Yr(T.changedTouches?T.changedTouches[0]:T,this),Y=$.invert(W),ee=$.k*(T.shiftKey?.5:2),H=r(S(w($,ee),W,Y),t.apply(this,B),a);Jo(T),u>0?Ar(this).transition().duration(u).call(_,H,W,T):Ar(this).call(x.transform,H,W,T)}}function F(T,...B){if(e.apply(this,arguments)){var $=T.touches,W=$.length,Y=R(this,B,T.changedTouches.length===W).event(T),ee,H,Q,ce;for(hm(T),H=0;H<W;++H)Q=$[H],ce=Yr(Q,this),ce=[ce,this.__zoom.invert(ce),Q.identifier],Y.touch0?!Y.touch1&&Y.touch0[2]!==ce[2]&&(Y.touch1=ce,Y.taps=0):(Y.touch0=ce,ee=!0,Y.taps=1+!!f);f&&(f=clearTimeout(f)),ee&&(Y.taps<2&&(h=ce[0],f=setTimeout(function(){f=null},v)),qu(this),Y.start())}}function k(T,...B){if(this.__zooming){var $=R(this,B).event(T),W=T.changedTouches,Y=W.length,ee,H,Q,ce;for(Jo(T),ee=0;ee<Y;++ee)H=W[ee],Q=Yr(H,this),$.touch0&&$.touch0[2]===H.identifier?$.touch0[0]=Q:$.touch1&&$.touch1[2]===H.identifier&&($.touch1[0]=Q);if(H=$.that.__zoom,$.touch1){var se=$.touch0[0],z=$.touch0[1],G=$.touch1[0],J=$.touch1[1],V=(V=G[0]-se[0])*V+(V=G[1]-se[1])*V,K=(K=J[0]-z[0])*K+(K=J[1]-z[1])*K;H=w(H,Math.sqrt(V/K)),Q=[(se[0]+G[0])/2,(se[1]+G[1])/2],ce=[(z[0]+J[0])/2,(z[1]+J[1])/2]}else if($.touch0)Q=$.touch0[0],ce=$.touch0[1];else return;$.zoom("touch",r(S(H,Q,ce),$.extent,a))}}function D(T,...B){if(this.__zooming){var $=R(this,B).event(T),W=T.changedTouches,Y=W.length,ee,H;for(hm(T),p&&clearTimeout(p),p=setTimeout(function(){p=null},v),ee=0;ee<Y;++ee)H=W[ee],$.touch0&&$.touch0[2]===H.identifier?delete $.touch0:$.touch1&&$.touch1[2]===H.identifier&&delete $.touch1;if($.touch1&&!$.touch0&&($.touch0=$.touch1,delete $.touch1),$.touch0)$.touch0[1]=this.__zoom.invert($.touch0[0]);else if($.end(),$.taps===2&&(H=Yr(H,this),Math.hypot(h[0]-H[0],h[1]-H[1])<b)){var Q=Ar(this).on("dblclick.zoom");Q&&Q.apply(this,arguments)}}}return x.wheelDelta=function(T){return arguments.length?(n=typeof T=="function"?T:du(+T),x):n},x.filter=function(T){return arguments.length?(e=typeof T=="function"?T:du(!!T),x):e},x.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:du(!!T),x):i},x.extent=function(T){return arguments.length?(t=typeof T=="function"?T:du([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),x):t},x.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],x):[o[0],o[1]]},x.translateExtent=function(T){return arguments.length?(a[0][0]=+T[0][0],a[1][0]=+T[1][0],a[0][1]=+T[0][1],a[1][1]=+T[1][1],x):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},x.constrain=function(T){return arguments.length?(r=T,x):r},x.duration=function(T){return arguments.length?(u=+T,x):u},x.interpolate=function(T){return arguments.length?(c=T,x):c},x.on=function(){var T=d.on.apply(d,arguments);return T===d?x:T},x.clickDistance=function(T){return arguments.length?(y=(T=+T)*T,x):Math.sqrt(y)},x.tapDistance=function(T){return arguments.length?(b=+T,x):b},x}function ze(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ab(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Uj(e,t){if(e){if(typeof e=="string")return Ab(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ab(e,t)}}function sK(e){if(Array.isArray(e))return e}function uK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,u;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,u=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw u}}return n}}function cK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
6
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Be(e,t){return sK(e)||uK(e,t)||Uj(e,t)||cK()}var go;(function(e){e.Strict="strict",e.Loose="loose"})(go||(go={}));var gi;(function(e){e.Lines="lines",e.Dots="dots"})(gi||(gi={}));var no;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(no||(no={}));var Fn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Fn||(Fn={}));var Xu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Xu||(Xu={}));var xe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(xe||(xe={}));var Rx=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},io=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(t,r),n)},Vj=function(t,r){return{x:io(t.x,r[0][0],r[1][0]),y:io(t.y,r[0][1],r[1][1])}},Wj=function(t){var r,n;return((r=t.getRootNode)===null||r===void 0?void 0:r.call(t))||((n=window)===null||n===void 0?void 0:n.document)},lK=function(t,r){return{x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x2,r.x2),y2:Math.max(t.y2,r.y2)}},Zu=function(t){var r=t.x,n=t.y,i=t.width,o=t.height;return{x:r,y:n,x2:r+i,y2:n+o}},fK=function(t){var r=t.x,n=t.y,i=t.x2,o=t.y2;return{x:r,y:n,width:i-r,height:o-n}},Gj=function(t){return!isNaN(t)&&isFinite(t)},It=Symbol("internals");function qP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _a(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kP(e,t){var r=e.find(function(d){return d.id===t.parentNode});if(r){var n=t.position.x+t.width-r.width,i=t.position.y+t.height-r.height;if(n>0||i>0||t.position.x<0||t.position.y<0){var o,a;if(r.style=_a({},r.style)||{},r.style.width=(o=r.style.width)!==null&&o!==void 0?o:r.width,r.style.height=(a=r.style.height)!==null&&a!==void 0?a:r.height,n>0&&(r.style.width+=n),i>0&&(r.style.height+=i),t.position.x<0){var u=Math.abs(t.position.x);r.position.x=r.position.x-u,r.style.width+=u,t.position.x=0}if(t.position.y<0){var c=Math.abs(t.position.y);r.position.y=r.position.y-c,r.style.height+=c,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function Kj(e,t){if(e.some(function(n){return n.type==="reset"}))return e.filter(function(n){return n.type==="reset"}).map(function(n){return n.item});var r=e.filter(function(n){return n.type==="add"}).map(function(n){return n.item});return t.reduce(function(n,i){var o=e.find(function(c){return c.id===i.id});if(o)switch(o.type){case"select":return n.push(_a(_a({},i),{},{selected:o.selected})),n;case"position":{var a=_a({},i);return typeof o.position<"u"&&(a.position=o.position),typeof o.positionAbsolute<"u"&&(a.positionAbsolute=o.positionAbsolute),typeof o.dragging<"u"&&(a.dragging=o.dragging),a.expandParent&&kP(n,a),n.push(a),n}case"dimensions":{var u=_a({},i);return typeof o.dimensions<"u"&&(u.width=o.dimensions.width,u.height=o.dimensions.height),u.expandParent&&kP(n,u),n.push(u),n}case"remove":return n}return n.push(i),n},r)}function Yj(e,t){return Kj(e,t)}function dK(e,t){return Kj(e,t)}var Bn=function(t,r){return{id:t,type:"select",selected:r}};function Ji(e,t){return e.reduce(function(r,n){var i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(Bn(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Bn(n.id,!1))),r},[])}function LP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var BP=function(t,r,n){var i=r.querySelectorAll(t);if(!i||!i.length)return null;var o=Array.from(i),a=r.getBoundingClientRect();return o.map(function(u){var c=u.getBoundingClientRect();return Xj({id:u.getAttribute("data-handleid"),position:u.getAttribute("data-handlepos"),x:(c.left-a.left)/n,y:(c.top-a.top)/n},Rx(u))})};function Qo(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,Xj({},i))}}function Zj(e){var t=e.id,r=e.store,n=r.getState(),i=n.addSelectedNodes,o=n.unselectNodesAndEdges,a=n.multiSelectionActive,u=n.nodeInternals,c=u.get(t);r.setState({nodesSelectionActive:!1}),c.selected?c.selected&&a&&o({nodes:[c]}):i([t])}function FP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ca(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var hK=function(t){return"id"in t&&"source"in t&&"target"in t},pK=function(t){var r=t.source,n=t.sourceHandle,i=t.target,o=t.targetHandle;return"reactflow__edge-".concat(r).concat(n||"","-").concat(i).concat(o||"")},Mb=function(t,r){if(typeof t>"u")return"";if(typeof t=="string")return t;var n=r?"".concat(r,"__"):"";return"".concat(n).concat(Object.keys(t).sort().map(function(i){return"".concat(i,"=").concat(t[i])}).join("&"))},vK=function(t,r){return r.some(function(n){return n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle)})},gK=function(t,r){if(!t.source||!t.target)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Can't create edge. An edge needs a source and a target. Help: https://reactflow.dev/error#600"),r;var n;return hK(t)?n=Ca({},t):n=Ca(Ca({},t),{},{id:pK(t)}),vK(n,r)?r:r.concat(n)},Jj=function(t,r,n,i){var o=t.x,a=t.y,u=Be(r,3),c=u[0],d=u[1],f=u[2],h=Be(i,2),p=h[0],v=h[1],m={x:(o-c)/f,y:(a-d)/f};return n?{x:p*Math.round(m.x/p),y:v*Math.round(m.y/v)}:m},Px=function(t){if(t.length===0)return{x:0,y:0,width:0,height:0};var r=t.reduce(function(n,i){var o=i.positionAbsolute,a=i.position,u=i.width,c=i.height;return lK(n,Zu({x:o?o.x:a.x,y:o?o.y:a.y,width:u||0,height:c||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return fK(r)},Qj=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],i=Be(n,3),o=i[0],a=i[1],u=i[2],c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,f=Zu({x:(r.x-o)/u,y:(r.y-a)/u,width:r.width/u,height:r.height/u}),h=[];return t.forEach(function(p){var v=p.positionAbsolute,m=p.width,y=p.height,b=p.selectable,x=b===void 0?!0:b;if(d&&!x)return!1;var w=Zu(Ca(Ca({},v),{},{width:m||0,height:y||0})),S=Math.max(0,Math.min(f.x2,w.x2)-Math.max(f.x,w.x)),E=Math.max(0,Math.min(f.y2,w.y2)-Math.max(f.y,w.y)),_=Math.ceil(S*E),R=typeof m>"u"||typeof y>"u"||m===null||y===null,P=c&&_>0,N=(m||0)*(y||0),j=R||P||_>=N;j&&h.push(p)}),h},eq=function(t,r){var n=t.map(function(i){return i.id});return r.filter(function(i){return n.includes(i.source)||n.includes(i.target)})},tq=function(t,r,n,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:.1,u=r/(t.width*(1+a)),c=n/(t.height*(1+a)),d=Math.min(u,c),f=io(d,i,o),h=t.x+t.width/2,p=t.y+t.height/2,v=r/2-h*f,m=n/2-p*f;return[v,m,f]},oi=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};function $P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$P(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$P(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rq(e,t,r,n){var i,o,a,u,c,d,f,h,p,v,m,y;if(!e.parentNode)return n;var b=t.get(e.parentNode);return rq(b,t,r,{x:((i=n.x)!==null&&i!==void 0?i:0)+((o=(a=b.position)===null||a===void 0?void 0:a.x)!==null&&o!==void 0?o:0),y:((u=n.y)!==null&&u!==void 0?u:0)+((c=(d=b.position)===null||d===void 0?void 0:d.y)!==null&&c!==void 0?c:0),z:((f=(h=b[It])===null||h===void 0?void 0:h.z)!==null&&f!==void 0?f:0)>((p=n.z)!==null&&p!==void 0?p:0)?(v=(m=b[It])===null||m===void 0?void 0:m.z)!==null&&v!==void 0?v:0:(y=n.z)!==null&&y!==void 0?y:0})}function pm(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=Gj(i.zIndex)?i.zIndex:i.selected?1e3:0,u=t.get(i.id),c=Qi(Qi({width:u==null?void 0:u.width,height:u==null?void 0:u.height},i),{},{positionAbsolute:{x:i.position.x,y:i.position.y}});i.parentNode&&(c.parentNode=i.parentNode,n[i.parentNode]=!0),Object.defineProperty(c,It,{enumerable:!1,value:{handleBounds:u==null||(o=u[It])===null||o===void 0?void 0:o.handleBounds,z:a}}),r.set(i.id,c)}),r.forEach(function(i){if(i.parentNode&&!r.has(i.parentNode))throw new Error("Parent node ".concat(i.parentNode," not found"));if(i.parentNode||n[i.id]){var o,a,u=rq(i,r,n,Qi(Qi({},i.position),{},{z:(o=(a=i[It])===null||a===void 0?void 0:a.z)!==null&&o!==void 0?o:0})),c=u.x,d=u.y,f=u.z;i.positionAbsolute={x:c,y:d},i[It].z=f,n[i.id]&&(i[It].isParent=!0)}}),r}function nq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e(),n=r.nodeInternals,i=r.width,o=r.height,a=r.minZoom,u=r.maxZoom,c=r.d3Zoom,d=r.d3Selection,f=r.fitViewOnInitDone,h=r.fitViewOnInit;if((t.initial&&!f&&h||!t.initial)&&c&&d){var p=Array.from(n.values()).filter(function(N){return t.includeHiddenNodes?N.width&&N.height:!N.hidden}),v=p.every(function(N){return N.width&&N.height});if(p.length>0&&v){var m,y,b,x=Px(p),w=tq(x,i,o,(m=t.minZoom)!==null&&m!==void 0?m:a,(y=t.maxZoom)!==null&&y!==void 0?y:u,(b=t.padding)!==null&&b!==void 0?b:.1),S=Be(w,3),E=S[0],_=S[1],R=S[2],P=li.translate(E,_).scale(R);return typeof t.duration=="number"&&t.duration>0?c.transform(oi(d,t.duration),P):c.transform(d,P),!0}}return!1}function mK(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,Qi(Qi({},n),{},(i={},ze(i,It,n[It]),ze(i,"selected",r.selected),i)))}}),new Map(t)}function yK(e,t){return t.map(function(r){var n=e.find(function(i){return i.id===r.id});return n&&(r.selected=n.selected),r})}function hu(e){var t=e.changedNodes,r=e.changedEdges,n=e.get,i=e.set,o=n(),a=o.nodeInternals,u=o.edges,c=o.onNodesChange,d=o.onEdgesChange,f=o.hasDefaultNodes,h=o.hasDefaultEdges;t!=null&&t.length&&(f&&i({nodeInternals:mK(t,a)}),c==null||c(t)),r!=null&&r.length&&(h&&i({edges:yK(r,u)}),d==null||d(r))}var Db=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],zP={width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Db,nodeExtent:Db,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:go.Strict,domNode:null,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,reactFlowVersion:"10.3.17",connectionStartHandle:null,connectOnClick:!0};function HP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ix=PW(),bK=Ix.Provider,gt=Ix.useStore,Bt=Ix.useStoreApi,xK=function(){return RW(function(t,r){return Gr(Gr({},zP),{},{setNodes:function(i){t({nodeInternals:pm(i,r().nodeInternals)})},setEdges:function(i){var o=r(),a=o.defaultEdgeOptions,u=a===void 0?{}:a;t({edges:i.map(function(c){return Gr(Gr({},u),c)})})},setDefaultNodesAndEdges:function(i,o){var a=typeof i<"u",u=typeof o<"u",c=a?pm(i,new Map):new Map,d=u?o:[];t({nodeInternals:c,edges:d,hasDefaultNodes:a,hasDefaultEdges:u})},updateNodeDimensions:function(i){var o=r(),a=o.onNodesChange,u=o.nodeInternals,c=o.fitViewOnInit,d=o.fitViewOnInitDone,f=o.fitViewOnInitOptions,h=o.domNode,p=h==null?void 0:h.querySelector(".react-flow__viewport");if(p){var v=window.getComputedStyle(p),m=new window.DOMMatrixReadOnly(v.transform),y=m.m22,b=i.reduce(function(w,S){var E=u.get(S.id);if(E){var _=Rx(S.nodeElement),R=!!(_.width&&_.height&&(E.width!==_.width||E.height!==_.height||S.forceUpdate));R&&(u.set(E.id,Gr(Gr({},E),{},ze({},It,Gr(Gr({},E[It]),{},{handleBounds:{source:BP(".source",S.nodeElement,y),target:BP(".target",S.nodeElement,y)}})),_)),w.push({id:E.id,type:"dimensions",dimensions:_}))}return w},[]),x=d||c&&!d&&nq(r,Gr({initial:!0},f));t({nodeInternals:new Map(u),fitViewOnInitDone:x}),(b==null?void 0:b.length)>0&&(a==null||a(b))}},updateNodePositions:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,u=r(),c=u.onNodesChange,d=u.nodeInternals,f=u.hasDefaultNodes;if(f||c){var h=i.map(function(m){var y={id:m.id,type:"position",dragging:a};return o&&(y.positionAbsolute=m.positionAbsolute,y.position=m.position),y});if(h!=null&&h.length){if(f){var p=Yj(h,Array.from(d.values())),v=pm(p,d);t({nodeInternals:v})}c==null||c(h)}}},addSelectedNodes:function(i){var o=r(),a=o.multiSelectionActive,u=o.nodeInternals,c=o.edges,d,f=null;a?d=i.map(function(h){return Bn(h,!0)}):(d=Ji(Array.from(u.values()),i),f=Ji(c,[])),hu({changedNodes:d,changedEdges:f,get:r,set:t})},addSelectedEdges:function(i){var o=r(),a=o.multiSelectionActive,u=o.edges,c=o.nodeInternals,d,f=null;a?d=i.map(function(h){return Bn(h,!0)}):(d=Ji(u,i),f=Ji(Array.from(c.values()),[])),hu({changedNodes:f,changedEdges:d,get:r,set:t})},unselectNodesAndEdges:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.nodes,a=i.edges,u=r(),c=u.nodeInternals,d=u.edges,f=o||Array.from(c.values()),h=a||d,p=f.map(function(m){return m.selected=!1,Bn(m.id,!1)}),v=h.map(function(m){return Bn(m.id,!1)});hu({changedNodes:p,changedEdges:v,get:r,set:t})},setMinZoom:function(i){var o=r(),a=o.d3Zoom,u=o.maxZoom;a==null||a.scaleExtent([i,u]),t({minZoom:i})},setMaxZoom:function(i){var o=r(),a=o.d3Zoom,u=o.minZoom;a==null||a.scaleExtent([u,i]),t({maxZoom:i})},setTranslateExtent:function(i){var o=r(),a=o.d3Zoom;a==null||a.translateExtent(i),t({translateExtent:i})},resetSelectedElements:function(){var i=r(),o=i.nodeInternals,a=i.edges,u=Array.from(o.values()),c=u.filter(function(f){return f.selected}).map(function(f){return Bn(f.id,!1)}),d=a.filter(function(f){return f.selected}).map(function(f){return Bn(f.id,!1)});hu({changedNodes:c,changedEdges:d,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(u){u.positionAbsolute=Vj(u.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(Gr({},zP))}})})};function ur(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,n;r<e.length;r++)(n=ur(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function Yt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!Object.is(e[r[n]],t[r[n]]))return!1;return!0}function wK(e){if(Array.isArray(e))return Ab(e)}function _K(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
7
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fi(e){return wK(e)||_K(e)||Uj(e)||EK()}var SK={zoomIn:function(){},zoomOut:function(){},zoomTo:function(t){},getZoom:function(){return 1},setViewport:function(t){},getViewport:function(){return{x:0,y:0,zoom:1}},fitView:function(){},setCenter:function(t,r){},fitBounds:function(t){},project:function(t){return t},viewportInitialized:!1},OK=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},CK=function(){var t=Bt(),r=gt(OK,Yt),n=r.d3Zoom,i=r.d3Selection,o=A.useMemo(function(){return i&&n?{zoomIn:function(u){return n.scaleBy(oi(i,u==null?void 0:u.duration),1.2)},zoomOut:function(u){return n.scaleBy(oi(i,u==null?void 0:u.duration),1/1.2)},zoomTo:function(u,c){return n.scaleTo(oi(i,c==null?void 0:c.duration),u)},getZoom:function(){return t.getState().transform[2]},setViewport:function(u,c){var d,f,h,p=Be(t.getState().transform,3),v=p[0],m=p[1],y=p[2],b=li.translate((d=u.x)!==null&&d!==void 0?d:v,(f=u.y)!==null&&f!==void 0?f:m).scale((h=u.zoom)!==null&&h!==void 0?h:y);n.transform(oi(i,c==null?void 0:c.duration),b)},getViewport:function(){var u=Be(t.getState().transform,3),c=u[0],d=u[1],f=u[2];return{x:c,y:d,zoom:f}},fitView:function(u){return nq(t.getState,u)},setCenter:function(u,c,d){var f=t.getState(),h=f.width,p=f.height,v=f.maxZoom,m=typeof(d==null?void 0:d.zoom)<"u"?d.zoom:v,y=h/2-u*m,b=p/2-c*m,x=li.translate(y,b).scale(m);n.transform(oi(i,d==null?void 0:d.duration),x)},fitBounds:function(u,c){var d,f=t.getState(),h=f.width,p=f.height,v=f.minZoom,m=f.maxZoom,y=tq(u,h,p,v,m,(d=c==null?void 0:c.padding)!==null&&d!==void 0?d:.1),b=Be(y,3),x=b[0],w=b[1],S=b[2],E=li.translate(x,w).scale(S);n.transform(oi(i,c==null?void 0:c.duration),E)},project:function(u){var c=t.getState(),d=c.transform,f=c.snapToGrid,h=c.snapGrid;return Jj(u,d,f,h)},viewportInitialized:!0}:SK},[n,i]);return o};function UP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iq(){var e=CK(),t=Bt(),r=A.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=Array.from(p.values());return v.map(function(m){return Wi({},m)})},[]),n=A.useCallback(function(h){var p=t.getState(),v=p.nodeInternals;return v.get(h)},[]),i=A.useCallback(function(){var h=t.getState(),p=h.edges,v=p===void 0?[]:p;return v.map(function(m){return Wi({},m)})},[]),o=A.useCallback(function(h){var p=t.getState(),v=p.edges,m=v===void 0?[]:v;return m.find(function(y){return y.id===h})},[]),a=A.useCallback(function(h){var p=t.getState(),v=p.nodeInternals,m=p.setNodes,y=p.hasDefaultNodes,b=p.onNodesChange,x=Array.from(v.values()),w=typeof h=="function"?h(x):h;if(y)m(w);else if(b){var S=w.length===0?x.map(function(E){return{type:"remove",id:E.id}}):w.map(function(E){return{item:E,type:"reset"}});b(S)}},[]),u=A.useCallback(function(h){var p=t.getState(),v=p.edges,m=v===void 0?[]:v,y=p.setEdges,b=p.hasDefaultEdges,x=p.onEdgesChange,w=typeof h=="function"?h(m):h;if(b)y(w);else if(x){var S=w.length===0?m.map(function(E){return{type:"remove",id:E.id}}):w.map(function(E){return{item:E,type:"reset"}});x(S)}},[]),c=A.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),m=v.nodeInternals,y=v.setNodes,b=v.hasDefaultNodes,x=v.onNodesChange;if(b){var w=Array.from(m.values()),S=[].concat(w,fi(p));y(S)}else if(x){var E=p.map(function(_){return{item:_,type:"add"}});x(E)}},[]),d=A.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),m=v.edges,y=m===void 0?[]:m,b=v.setEdges,x=v.hasDefaultEdges,w=v.onEdgesChange;if(x)b([].concat(fi(y),fi(p)));else if(w){var S=p.map(function(E){return{item:E,type:"add"}});w(S)}},[]),f=A.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=h.edges,m=v===void 0?[]:v,y=h.transform,b=Array.from(p.values()),x=Be(y,3),w=x[0],S=x[1],E=x[2];return{nodes:b.map(function(_){return Wi({},_)}),edges:m.map(function(_){return Wi({},_)}),viewport:{x:w,y:S,zoom:E}}},[]);return A.useMemo(function(){return Wi(Wi({},e),{},{getNodes:r,getNode:n,getEdges:i,getEdge:o,setNodes:a,setEdges:u,addNodes:c,addEdges:d,toObject:f})},[e,r,n,i,o,a,u,c,d,f])}function RK(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function zc(e,t){if(e==null)return{};var r=RK(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},A.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function IK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},A.createElement("path",{d:"M0 0h32v4.2H0z"}))}function NK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},A.createElement("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 TK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},A.createElement("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 AK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},A.createElement("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"}))}var MK=["children","className"];function VP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function DK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var pu=function(t){var r=t.children,n=t.className,i=zc(t,MK);return A.createElement("button",DK({type:"button",className:ur(["react-flow__controls-button",n])},i),r)},jK=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},qK=function(t){var r=t.style,n=t.showZoom,i=n===void 0?!0:n,o=t.showFitView,a=o===void 0?!0:o,u=t.showInteractive,c=u===void 0?!0:u,d=t.fitViewOptions,f=t.onZoomIn,h=t.onZoomOut,p=t.onFitView,v=t.onInteractiveChange,m=t.className,y=t.children,b=Bt(),x=A.useState(!1),w=Be(x,2),S=w[0],E=w[1],_=gt(jK),R=iq(),P=R.zoomIn,N=R.zoomOut,j=R.fitView;if(A.useEffect(function(){E(!0)},[]),!S)return null;var L=function(){P==null||P(),f==null||f()},F=function(){N==null||N(),h==null||h()},k=function(){j==null||j(d),p==null||p()},D=function(){b.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),v==null||v(!_)};return A.createElement("div",{className:ur(["react-flow__controls",m]),style:r},i&&A.createElement(A.Fragment,null,A.createElement(pu,{onClick:L,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},A.createElement(PK,null)),A.createElement(pu,{onClick:F,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},A.createElement(IK,null))),a&&A.createElement(pu,{className:"react-flow__controls-fitview",onClick:k,title:"fit view","aria-label":"fit view"},A.createElement(NK,null)),c&&A.createElement(pu,{className:"react-flow__controls-interactive",onClick:D,title:"toggle interactivity","aria-label":"toggle interactivity"},_?A.createElement(AK,null):A.createElement(TK,null)),y)};qK.displayName="Controls";var kK=function(t,r,n){return A.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},LK=function(t,r){return A.createElement("circle",{cx:t,cy:t,r:t,fill:r})},vu;function WP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function GP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var BK=(vu={},ze(vu,gi.Dots,"#81818a"),ze(vu,gi.Lines,"#eee"),vu),FK=function(t){return t.transform},oq=function(t){var r=t.variant,n=r===void 0?gi.Dots:r,i=t.gap,o=i===void 0?15:i,a=t.size,u=a===void 0?.4:a,c=t.color,d=t.style,f=t.className,h=A.useRef(null),p=A.useState(null),v=Be(p,2),m=v[0],y=v[1],b=gt(FK),x=Be(b,3),w=x[0],S=x[1],E=x[2];A.useEffect(function(){var F=document.querySelectorAll(".react-flow__background"),k=Array.from(F).findIndex(function(D){return D===h.current});y("pattern-".concat(k))},[]);var _=o*E||1,R=w%_,P=S%_,N=n===gi.Lines,j=c||BK[n],L=N?kK(_,u,j):LK(u*E,j);return A.createElement("svg",{className:ur(["react-flow__background","react-flow__container",f]),style:GP(GP({},d),{},{width:"100%",height:"100%"}),ref:h},m&&A.createElement(A.Fragment,null,A.createElement("pattern",{id:m,x:R,y:P,width:_,height:_,patternUnits:"userSpaceOnUse"},L),A.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(m,")")})))};oq.displayName="Background";var $K=A.memo(oq),zK=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function HK(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&zK.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var i="".concat(n).split("-");return A.createElement("div",{className:ur(["react-flow__attribution"].concat(fi(i))),"data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev/pricing"},A.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var UK=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function KP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function VK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var WK=function(t){var r=t.x,n=t.y,i=t.label,o=t.labelStyle,a=o===void 0?{}:o,u=t.labelShowBg,c=u===void 0?!0:u,d=t.labelBgStyle,f=d===void 0?{}:d,h=t.labelBgPadding,p=h===void 0?[2,4]:h,v=t.labelBgBorderRadius,m=v===void 0?2:v,y=t.children,b=t.className,x=zc(t,UK),w=A.useRef(null),S=A.useState({x:0,y:0,width:0,height:0}),E=Be(S,2),_=E[0],R=E[1],P=ur(["react-flow__edge-textwrapper",b]);return A.useEffect(function(){if(w.current){var N=w.current.getBBox();R({x:N.x,y:N.y,width:N.width,height:N.height})}},[i]),typeof i>"u"||!i?null:A.createElement("g",VK({transform:"translate(".concat(r-_.width/2," ").concat(n-_.height/2,")"),className:P},x),c&&A.createElement("rect",{width:_.width+2*p[0],x:-p[0],y:-p[1],height:_.height+2*p[1],className:"react-flow__edge-textbg",style:f,rx:m,ry:m}),A.createElement("text",{className:"react-flow__edge-text",y:_.height/2,dy:"0.3em",ref:w,style:a},i),y)},GK=A.memo(WK),Hc=(function(e){var t=e.path,r=e.centerX,n=e.centerY,i=e.label,o=e.labelStyle,a=e.labelShowBg,u=e.labelBgStyle,c=e.labelBgPadding,d=e.labelBgBorderRadius,f=e.style,h=e.markerEnd,p=e.markerStart,v=i?A.createElement(GK,{x:r,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d}):null;return A.createElement(A.Fragment,null,A.createElement("path",{style:f,d:t,className:"react-flow__edge-path",markerEnd:h,markerStart:p}),v)});function Ju(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a,u;switch(t){case xe.Left:case xe.Right:a=.5*(r+i),u=n;break;case xe.Top:case xe.Bottom:a=r,u=.5*(n+o);break}return[a,u]}function aq(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=Ju({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Be(d,2),h=f[0],p=f[1],v=Ju({pos:c,x1:o,y1:a,x2:t,y2:r}),m=Be(v,2),y=m[0],b=m[1];return"M".concat(t,",").concat(r," C").concat(h,",").concat(p," ").concat(y,",").concat(b," ").concat(o,",").concat(a)}function KK(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=Ju({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Be(d,2),h=f[0],p=f[1],v=Ju({pos:c,x1:o,y1:a,x2:t,y2:r}),m=Be(v,2),y=m[0],b=m[1],x=t*.125+h*.375+y*.375+o*.125,w=r*.125+p*.375+b*.375+a*.125,S=Math.abs(x-t),E=Math.abs(w-r);return[x,w,S,E]}var sq=A.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?xe.Bottom:o,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.label,f=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,m=e.labelBgBorderRadius,y=e.style,b=e.markerEnd,x=e.markerStart,w={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c},S=aq(w),E=KK(w),_=Be(E,2),R=_[0],P=_[1];return A.createElement(Hc,{path:S,centerX:R,centerY:P,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:b,markerStart:x})});function YP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function YK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var XP=[xe.Left,xe.Right],uq=function(t){var r=t.sourceX,n=t.sourceY,i=t.targetX,o=t.targetY,a=t.sourcePosition,u=a===void 0?xe.Bottom:a,c=t.targetPosition,d=c===void 0?xe.Top:c,f=XP.includes(u),h=XP.includes(d),p=f&&!h||h&&!f;if(p){var v=f?Math.abs(i-r):0,m=r>i?r-v:r+v,y=f?0:Math.abs(o-n),b=n<o?n+y:n-y;return[m,b,v,y]}var x=Math.abs(i-r)/2,w=i<r?i+x:i-x,S=Math.abs(o-n)/2,E=o<n?o+S:o-S;return[w,E,x,S]};function ea(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,YK({},i))}}var vm=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},gm=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},mm=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},ym=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},bm=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},xm=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},wm=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},_m=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function jb(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.borderRadius,f=d===void 0?5:d,h=e.centerX,p=e.centerY,v=uq({sourceX:t,sourceY:r,targetX:o,targetY:a}),m=Be(v,4),y=m[0],b=m[1],x=m[2],w=m[3],S=Math.min(f,Math.abs(o-t)),E=Math.min(f,Math.abs(a-r)),_=Math.min(S,E,x,w),R=[xe.Left,xe.Right],P=typeof h<"u"?h:y,N=typeof p<"u"?p:b,j=null,L=null;return t<=o?(j=r<=a?vm(t,N,_):xm(t,N,_),L=r<=a?_m(o,N,_):ym(o,N,_)):(j=r<a?mm(t,N,_):wm(t,N,_),L=r<a?bm(o,N,_):gm(o,N,_)),R.includes(i)&&R.includes(c)?t<=o?(j=r<=a?_m(P,r,_):ym(P,r,_),L=r<=a?vm(P,a,_):xm(P,a,_)):(i===xe.Right&&c===xe.Left||i===xe.Left&&c===xe.Right||i===xe.Left&&c===xe.Left)&&(j=r<=a?bm(P,r,_):gm(P,r,_),L=r<=a?mm(P,a,_):wm(P,a,_)):R.includes(i)&&!R.includes(c)?(t<=o?j=r<=a?_m(o,r,_):ym(o,r,_):j=r<=a?bm(o,r,_):gm(o,r,_),L=""):!R.includes(i)&&R.includes(c)&&(t<=o?j=r<=a?vm(t,a,_):xm(t,a,_):j=r<=a?mm(t,a,_):wm(t,a,_),L=""),"M ".concat(t,",").concat(r).concat(j).concat(L,"L ").concat(o,",").concat(a)}var Nx=A.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,u=e.labelShowBg,c=e.labelBgStyle,d=e.labelBgPadding,f=e.labelBgBorderRadius,h=e.style,p=e.sourcePosition,v=p===void 0?xe.Bottom:p,m=e.targetPosition,y=m===void 0?xe.Top:m,b=e.markerEnd,x=e.markerStart,w=e.borderRadius,S=w===void 0?5:w,E=uq({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:v,targetPosition:y}),_=Be(E,2),R=_[0],P=_[1],N=jb({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:i,targetPosition:y,borderRadius:S});return A.createElement(Hc,{path:N,centerX:R,centerY:P,label:o,labelStyle:a,labelShowBg:u,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:b,markerStart:x})});function ZP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function JP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var cq=A.memo(function(e){return A.createElement(Nx,JP(JP({},e),{},{borderRadius:0}))}),lq=A.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,u=e.labelShowBg,c=e.labelBgStyle,d=e.labelBgPadding,f=e.labelBgBorderRadius,h=e.style,p=e.markerEnd,v=e.markerStart,m=Math.abs(i-r)/2,y=i<r?i+m:i-m,b=Math.abs(n-t)/2,x=n<t?n+b:n-b,w="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(i);return A.createElement(Hc,{path:w,centerX:x,centerY:y,label:o,labelStyle:a,labelShowBg:u,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:v})});function gu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Qu(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a=e.c,u,c;switch(t){case xe.Left:u=r-gu(r-i,a),c=n;break;case xe.Right:u=r+gu(i-r,a),c=n;break;case xe.Top:u=r,c=n-gu(n-o,a);break;case xe.Bottom:u=r,c=n+gu(o-n,a);break}return[u,c]}function Uc(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.curvature,f=d===void 0?.25:d,h=Qu({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Be(h,2),v=p[0],m=p[1],y=Qu({pos:c,x1:o,y1:a,x2:t,y2:r,c:f}),b=Be(y,2),x=b[0],w=b[1];return"M".concat(t,",").concat(r," C").concat(v,",").concat(m," ").concat(x,",").concat(w," ").concat(o,",").concat(a)}function XK(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.curvature,f=d===void 0?.25:d,h=Qu({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Be(h,2),v=p[0],m=p[1],y=Qu({pos:c,x1:o,y1:a,x2:t,y2:r,c:f}),b=Be(y,2),x=b[0],w=b[1],S=t*.125+v*.375+x*.375+o*.125,E=r*.125+m*.375+w*.375+a*.125,_=Math.abs(S-t),R=Math.abs(E-r);return[S,E,_,R]}var qb=A.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?xe.Bottom:o,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.label,f=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,m=e.labelBgBorderRadius,y=e.style,b=e.markerEnd,x=e.markerStart,w=e.curvature,S={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c,curvature:w},E=Uc(S),_=XK(S),R=Be(_,2),P=R[0],N=R[1];return A.createElement(Hc,{path:E,centerX:P,centerY:N,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:b,markerStart:x})}),Tx=A.createContext(null),ZK=Tx.Provider;Tx.Consumer;function kb(e,t,r,n,i,o,a){var u=a.elementFromPoint(e.clientX,e.clientY),c=(u==null?void 0:u.classList.contains("target"))||!1,d=(u==null?void 0:u.classList.contains("source"))||!1,f={elementBelow:u,isValid:!1,connection:{source:null,target:null,sourceHandle:null,targetHandle:null},isHoveringHandle:!1};if(u&&(c||d)){f.isHoveringHandle=!0;var h=u.getAttribute("data-nodeid"),p=u.getAttribute("data-handleid"),v=r?{source:h,sourceHandle:p,target:n,targetHandle:i}:{source:n,sourceHandle:i,target:h,targetHandle:p};f.connection=v;var m=t===go.Strict?r&&d||!r&&c:!0;m&&(f.isValid=o(v))}return f}function Em(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function fq(e){var t=e.event,r=e.handleId,n=e.nodeId,i=e.onConnect,o=e.isTarget,a=e.getState,u=e.setState,c=e.isValidConnection,d=e.elementEdgeUpdaterType,f=e.onEdgeUpdateEnd,h=t.target.closest(".react-flow"),p=Wj(t.target);if(!p)return;var v=p.elementFromPoint(t.clientX,t.clientY),m=v==null?void 0:v.classList.contains("target"),y=v==null?void 0:v.classList.contains("source");if(!h||!m&&!y&&!d)return;var b=a(),x=b.onConnectStart,w=b.connectionMode,S=d||(m?"target":"source"),E=h.getBoundingClientRect(),_;u({connectionPosition:{x:t.clientX-E.left,y:t.clientY-E.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:S}),x==null||x(t,{nodeId:n,handleId:r,handleType:S});function R(N){u({connectionPosition:{x:N.clientX-E.left,y:N.clientY-E.top}});var j=kb(N,w,o,n,r,c,p),L=j.connection,F=j.elementBelow,k=j.isValid,D=j.isHoveringHandle;if(!D)return Em(_);L.source!==L.target&&F&&(Em(_),_=F,F.classList.add("react-flow__handle-connecting"),F.classList.toggle("react-flow__handle-valid",k))}function P(N){var j=a(),L=j.onConnectStop,F=j.onConnectEnd,k=kb(N,w,o,n,r,c,p),D=k.connection,T=k.isValid;L==null||L(N),T&&(i==null||i(D)),F==null||F(N),d&&f&&f(N),Em(_),u({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),p.removeEventListener("mousemove",R),p.removeEventListener("mouseup",P)}p.addEventListener("mousemove",R),p.addEventListener("mouseup",P)}var JK=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];function QP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Sm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var QK=function(){return!0},eY=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},dq=A.forwardRef(function(e,t){var r=e.type,n=r===void 0?"source":r,i=e.position,o=i===void 0?xe.Top:i,a=e.isValidConnection,u=a===void 0?QK:a,c=e.isConnectable,d=c===void 0?!0:c,f=e.id,h=e.onConnect,p=e.children,v=e.className,m=e.onMouseDown,y=zc(e,JK),b=Bt(),x=A.useContext(Tx),w=gt(eY,Yt),S=w.connectionStartHandle,E=w.connectOnClick,_=f||null,R=n==="target",P=function(F){var k=b.getState(),D=k.defaultEdgeOptions,T=k.onConnect,B=k.hasDefaultEdges,$=Sm(Sm({},D),F);if(B){var W=b.getState(),Y=W.edges;b.setState({edges:gK($,Y)})}T==null||T($),h==null||h($)},N=function(F){F.button===0&&fq({event:F,handleId:_,nodeId:x,onConnect:P,isTarget:R,getState:b.getState,setState:b.setState,isValidConnection:u}),m==null||m(F)},j=function(F){var k=b.getState(),D=k.onClickConnectStart,T=k.onClickConnectStop,B=k.onClickConnectEnd,$=k.connectionMode;if(!S){D==null||D(F,{nodeId:x,handleId:_,handleType:n}),b.setState({connectionStartHandle:{nodeId:x,type:n,handleId:_}});return}var W=Wj(F.target),Y=kb(F,$,S.type==="target",S.nodeId,S.handleId||null,u,W),ee=Y.connection,H=Y.isValid;T==null||T(F),H&&P(ee),B==null||B(F),b.setState({connectionStartHandle:null})};return A.createElement("div",Sm({"data-handleid":_,"data-nodeid":x,"data-handlepos":o,className:ur(["react-flow__handle","react-flow__handle-".concat(o),"nodrag",v,{source:!R,target:R,connectable:d,connecting:(S==null?void 0:S.nodeId)===x&&(S==null?void 0:S.handleId)===_&&(S==null?void 0:S.type)===n}]),onMouseDown:N,onClick:E?j:void 0,ref:t},y),p)});dq.displayName="Handle";var ec=A.memo(dq),hq=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?xe.Top:i,a=t.sourcePosition,u=a===void 0?xe.Bottom:a;return A.createElement(A.Fragment,null,A.createElement(ec,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,A.createElement(ec,{type:"source",position:u,isConnectable:n}))};hq.displayName="DefaultNode";var Lb=A.memo(hq),pq=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?xe.Bottom:i;return A.createElement(A.Fragment,null,r==null?void 0:r.label,A.createElement(ec,{type:"source",position:o,isConnectable:n}))};pq.displayName="InputNode";var vq=A.memo(pq),gq=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?xe.Top:i;return A.createElement(A.Fragment,null,A.createElement(ec,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};gq.displayName="OutputNode";var mq=A.memo(gq),tY=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},rY=function(t,r){var n=t.selectedNodes.map(function(u){return u.id}),i=r.selectedNodes.map(function(u){return u.id}),o=t.selectedEdges.map(function(u){return u.id}),a=r.selectedEdges.map(function(u){return u.id});return Yt(n,i)&&Yt(o,a)};function nY(e){var t=e.onSelectionChange,r=gt(tY,rY),n=r.selectedNodes,i=r.selectedEdges;return A.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var iY=A.memo(nY),oY=function(t){return{setNodes:t.setNodes,setEdges:t.setEdges,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset}};function jn(e,t){A.useEffect(function(){typeof e<"u"&&t(e)},[e])}function nt(e,t,r){A.useEffect(function(){typeof t<"u"&&r(ze({},e,t))},[t])}var aY=function(t){var r=t.nodes,n=t.edges,i=t.defaultNodes,o=t.defaultEdges,a=t.onConnect,u=t.onConnectStart,c=t.onConnectStop,d=t.onConnectEnd,f=t.onClickConnectStart,h=t.onClickConnectStop,p=t.onClickConnectEnd,v=t.nodesDraggable,m=t.nodesConnectable,y=t.minZoom,b=t.maxZoom,x=t.nodeExtent,w=t.onNodesChange,S=t.onEdgesChange,E=t.elementsSelectable,_=t.connectionMode,R=t.snapGrid,P=t.snapToGrid,N=t.translateExtent,j=t.connectOnClick,L=t.defaultEdgeOptions,F=t.fitView,k=t.fitViewOptions,D=t.onNodesDelete,T=t.onEdgesDelete,B=t.onNodeDrag,$=t.onNodeDragStart,W=t.onNodeDragStop,Y=t.onSelectionDrag,ee=t.onSelectionDragStart,H=t.onSelectionDragStop,Q=gt(oY,Yt),ce=Q.setNodes,se=Q.setEdges,z=Q.setDefaultNodesAndEdges,G=Q.setMinZoom,J=Q.setMaxZoom,V=Q.setTranslateExtent,K=Q.setNodeExtent,ie=Q.reset,ne=Bt();return A.useEffect(function(){return z(i,o),function(){ie()}},[]),nt("defaultEdgeOptions",L,ne.setState),nt("connectionMode",_,ne.setState),nt("onConnect",a,ne.setState),nt("onConnectStart",u,ne.setState),nt("onConnectStop",c,ne.setState),nt("onConnectEnd",d,ne.setState),nt("onClickConnectStart",f,ne.setState),nt("onClickConnectStop",h,ne.setState),nt("onClickConnectEnd",p,ne.setState),nt("nodesDraggable",v,ne.setState),nt("nodesConnectable",m,ne.setState),nt("elementsSelectable",E,ne.setState),nt("snapToGrid",P,ne.setState),nt("snapGrid",R,ne.setState),nt("onNodesChange",w,ne.setState),nt("onEdgesChange",S,ne.setState),nt("connectOnClick",j,ne.setState),nt("fitViewOnInit",F,ne.setState),nt("fitViewOnInitOptions",k,ne.setState),nt("onNodesDelete",D,ne.setState),nt("onEdgesDelete",T,ne.setState),nt("onNodeDrag",B,ne.setState),nt("onNodeDragStart",$,ne.setState),nt("onNodeDragStop",W,ne.setState),nt("onSelectionDrag",Y,ne.setState),nt("onSelectionDragStart",ee,ne.setState),nt("onSelectionDragStop",H,ne.setState),jn(r,ce),jn(n,se),jn(i,ce),jn(o,se),jn(y,G),jn(b,J),jn(N,V),jn(x,K),null},sY=".react-flow{height:100%;overflow:hidden;position:relative;width:100%}.react-flow__container{height:100%;left:0;position:absolute;top:0;width:100%}.react-flow__pane{z-index:1}.react-flow__viewport{pointer-events:none;transform-origin:0 0;z-index:2}.react-flow__renderer{z-index:4}.react-flow__selectionpane{z-index:5}.react-flow .react-flow__edges{overflow:visible;pointer-events:none}.react-flow .react-flow__connectionline{z-index:1001}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.inactive{pointer-events:none}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edge-path{fill:none}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connection-path{fill:none}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{box-sizing:border-box;pointer-events:all;position:absolute;transform-origin:0 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__nodesselection{pointer-events:none;transform-origin:left top;z-index:3}.react-flow__nodesselection-rect{cursor:-webkit-grab;cursor:grab;pointer-events:all;position:absolute}.react-flow__handle{pointer-events:none;position:absolute}.react-flow__handle.connectable{pointer-events:all}.react-flow__handle-bottom{bottom:-4px;left:50%;top:auto;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{left:-4px;top:50%;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__controls{bottom:20px;left:15px;position:absolute;z-index:5}.react-flow__controls-button{border:none;height:24px;width:24px}.react-flow__controls-button svg{width:100%}.react-flow__minimap{bottom:20px;position:absolute;right:15px;z-index:5}.react-flow__attribution{background:hsla(0,0%,100%,.5);color:#999;font-size:10px;padding:2px 3px;position:absolute;z-index:1000}.react-flow__attribution a{color:#555;text-decoration:none}.react-flow__attribution.top{top:0}.react-flow__attribution.bottom{bottom:0}.react-flow__attribution.left{left:0}.react-flow__attribution.right{right:0}.react-flow__attribution.center{left:50%;transform:translateX(-50%)}",uY=sY,cY=".react-flow__edge.selected .react-flow__edge-path{stroke:#555}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-path{stroke:#b1b1b7;stroke-width:1}.react-flow__edge-text{font-size:10px}.react-flow__edge-textbg{fill:#fff}.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1}.react-flow__node{cursor:-webkit-grab;cursor:grab}.react-flow__node-default,.react-flow__node-group,.react-flow__node-input,.react-flow__node-output{background:#fff;border:1px solid #1a192b;border-radius:3px;color:#222;font-size:12px;padding:10px;text-align:center;width:150px}.react-flow__node-default.selected,.react-flow__node-group.selected,.react-flow__node-input.selected,.react-flow__node-output.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-default .react-flow__handle,.react-flow__node-group .react-flow__handle,.react-flow__node-input .react-flow__handle,.react-flow__node-output .react-flow__handle{background:#1a192b}.react-flow__node-default.selectable:hover,.react-flow__node-group.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px rgba(0,0,0,.08)}.react-flow__node-default.selectable.selected,.react-flow__node-group.selectable.selected,.react-flow__node-input.selectable.selected,.react-flow__node-output.selectable.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background:hsla(0,0%,94%,.25);border-color:#1a192b}.react-flow__nodesselection-rect,.react-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__handle{background:#555;border:1px solid #fff;border-radius:100%;height:6px;width:6px}.react-flow__handle.connectable{cursor:crosshair}.react-flow__minimap{background-color:#fff}.react-flow__controls{box-shadow:0 0 2px 1px rgba(0,0,0,.08)}.react-flow__controls-button{align-items:center;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;cursor:pointer;display:flex;height:16px;justify-content:center;padding:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:16px}.react-flow__controls-button svg{max-height:12px;max-width:12px}.react-flow__controls-button:hover{background:#f4f4f4}",lY=cY,fY=function(t,r,n){return n===xe.Left?t-r:n===xe.Right?t+r:t},dY=function(t,r,n){return n===xe.Top?t-r:n===xe.Bottom?t+r:t},eI=function(t){var r=t.className,n=t.position,i=t.centerX,o=t.centerY,a=t.radius,u=a===void 0?10:a;return A.createElement("circle",{className:ur(["react-flow__edgeupdater",r]),cx:fY(i,u,n),cy:dY(o,u,n),r:u,stroke:"transparent",fill:"transparent"})},Gi=(function(e){var t=function(n){var i=n.id,o=n.className,a=n.type,u=n.data,c=n.onClick,d=n.onEdgeDoubleClick,f=n.selected,h=n.animated,p=n.label,v=n.labelStyle,m=n.labelShowBg,y=n.labelBgStyle,b=n.labelBgPadding,x=n.labelBgBorderRadius,w=n.style,S=n.source,E=n.target,_=n.sourceX,R=n.sourceY,P=n.targetX,N=n.targetY,j=n.sourcePosition,L=n.targetPosition,F=n.elementsSelectable,k=n.hidden,D=n.sourceHandleId,T=n.targetHandleId,B=n.onContextMenu,$=n.onMouseEnter,W=n.onMouseMove,Y=n.onMouseLeave,ee=n.edgeUpdaterRadius,H=n.onEdgeUpdate,Q=n.onEdgeUpdateStart,ce=n.onEdgeUpdateEnd,se=n.markerEnd,z=n.markerStart,G=n.rfId,J=A.useState(!1),V=Be(J,2),K=V[0],ie=V[1],ne=Bt(),ue=function(tt){var Ct=ne.getState(),Zt=Ct.edges,cr=Ct.addSelectedEdges,Dt=Zt.find(function(xt){return xt.id===i});F&&(ne.setState({nodesSelectionActive:!1}),cr([i])),c==null||c(tt,Dt)},de=ea(i,ne.getState,d),we=ea(i,ne.getState,B),Se=ea(i,ne.getState,$),_e=ea(i,ne.getState,W),he=ea(i,ne.getState,Y),ae=function(tt,Ct){var Zt=Ct?E:S,cr=(Ct?T:D)||null,Dt=Ct?"target":"source",xt=function(){return!0},jt=Ct,zr=ne.getState().edges.find(function(Hr){return Hr.id===i});Q==null||Q(tt,zr,Dt);var Kn=ce?function(Hr){return ce(Hr,zr,Dt)}:void 0,On=function(Pi){return H==null?void 0:H(zr,Pi)};fq({event:tt,handleId:cr,nodeId:Zt,onConnect:On,isTarget:jt,getState:ne.getState,setState:ne.setState,isValidConnection:xt,elementEdgeUpdaterType:Dt,onEdgeUpdateEnd:Kn})},Oe=function(tt){return ae(tt,!0)},Ne=function(tt){return ae(tt,!1)},He=function(){return ie(!0)},qe=function(){return ie(!1)},Xe=A.useMemo(function(){return"url(#".concat(Mb(z,G),")")},[z,G]),We=A.useMemo(function(){return"url(#".concat(Mb(se,G),")")},[se,G]);if(k)return null;var mt=!F&&!c,et=typeof H<"u",Tt=ur(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:f,animated:h,inactive:mt,updating:K}]);return A.createElement("g",{className:Tt,onClick:ue,onDoubleClick:de,onContextMenu:we,onMouseEnter:Se,onMouseMove:_e,onMouseLeave:he},A.createElement(e,{id:i,source:S,target:E,selected:f,animated:h,label:p,labelStyle:v,labelShowBg:m,labelBgStyle:y,labelBgPadding:b,labelBgBorderRadius:x,data:u,style:w,sourceX:_,sourceY:R,targetX:P,targetY:N,sourcePosition:j,targetPosition:L,sourceHandleId:D,targetHandleId:T,markerStart:Xe,markerEnd:We,"data-testid":"rf__edge-".concat(i)}),et&&A.createElement("g",{onMouseDown:Oe,onMouseEnter:He,onMouseOut:qe},A.createElement(eI,{position:j,centerX:_,centerY:R,radius:ee})),et&&A.createElement("g",{onMouseDown:Ne,onMouseEnter:He,onMouseOut:qe},A.createElement(eI,{position:L,centerX:P,centerY:N,radius:ee})))};return t.displayName="EdgeWrapper",A.memo(t)});function tI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hY(e){var t={default:Gi(e.default||qb),straight:Gi(e.bezier||lq),step:Gi(e.step||cq),smoothstep:Gi(e.step||Nx),simplebezier:Gi(e.simplebezier||sq)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=Gi(e[o]||qb),i},r);return rI(rI({},t),n)}function nI(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=((r==null?void 0:r.x)||0)+t.x,i=((r==null?void 0:r.y)||0)+t.y,o=(r==null?void 0:r.width)||t.width,a=(r==null?void 0:r.height)||t.height;switch(e){case xe.Top:return{x:n+o/2,y:i};case xe.Right:return{x:n+o,y:i+a/2};case xe.Bottom:return{x:n+o/2,y:i+a};case xe.Left:return{x:n,y:i+a/2}}}function iI(e,t){if(!e)return null;var r=null;return e.length===1||!t?r=e[0]:t&&(r=e.find(function(n){return n.id===t})),typeof r>"u"?null:r}var pY=function(t,r,n,i,o,a){var u=nI(n,t,r),c=nI(a,i,o);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y}};function vY(e){var t=e.sourcePos,r=e.targetPos,n=e.sourceWidth,i=e.sourceHeight,o=e.targetWidth,a=e.targetHeight,u=e.width,c=e.height,d=e.transform,f={x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x+n,r.x+o),y2:Math.max(t.y+i,r.y+a)};f.x===f.x2&&(f.x2+=1),f.y===f.y2&&(f.y2+=1);var h=Zu({x:(0-d[0])/d[2],y:(0-d[1])/d[2],width:u/d[2],height:c/d[2]}),p=Math.max(0,Math.min(h.x2,f.x2)-Math.max(h.x,f.x)),v=Math.max(0,Math.min(h.y2,f.y2)-Math.max(h.y,f.y)),m=Math.ceil(p*v);return m>0}function oI(e,t){var r,n,i,o,a,u=e.get(t),c=(u==null||(r=u[It])===null||r===void 0?void 0:r.handleBounds)||null,d=!u||!c||!u.width||!u.height||typeof((n=u.positionAbsolute)===null||n===void 0?void 0:n.x)>"u"||typeof((i=u.positionAbsolute)===null||i===void 0?void 0:i.y)>"u";return[{x:(u==null||(o=u.positionAbsolute)===null||o===void 0?void 0:o.x)||0,y:(u==null||(a=u.positionAbsolute)===null||a===void 0?void 0:a.y)||0,width:(u==null?void 0:u.width)||0,height:(u==null?void 0:u.height)||0},c,!d]}var gY=typeof document<"u"?document:null,tc=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:gY},r=A.useState(!1),n=Be(r,2),i=n[0],o=n[1],a=A.useRef(new Set([])),u=A.useMemo(function(){if(e!==null){var h=Array.isArray(e)?e:[e],p=h.filter(function(m){return typeof m=="string"}).map(function(m){return m.split("+")}),v=p.reduce(function(m,y){return m.concat.apply(m,fi(y))},[]);return[p,v]}return[[],[]]},[e]),c=Be(u,2),d=c[0],f=c[1];return A.useEffect(function(){if(e!==null){var h,p,v=function(x){if(uI(x))return!1;var w=sI(x.code,f);a.current.add(x[w]),aI(d,a.current,!1)&&(x.preventDefault(),o(!0))},m=function(x){if(uI(x))return!1;var w=sI(x.code,f);aI(d,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(x[w])},y=function(){a.current.clear(),o(!1)};return t==null||(h=t.target)===null||h===void 0||h.addEventListener("keydown",v),t==null||(p=t.target)===null||p===void 0||p.addEventListener("keyup",m),window.addEventListener("blur",y),function(){var b,x;t==null||(b=t.target)===null||b===void 0||b.removeEventListener("keydown",v),t==null||(x=t.target)===null||x===void 0||x.removeEventListener("keyup",m),window.removeEventListener("blur",y)}}},[e,o]),i});function aI(e,t,r){return e.filter(function(n){return r||n.length===t.size}).some(function(n){return n.every(function(i){return t.has(i)})})}function sI(e,t){return t.includes(e)?"code":"key"}function uI(e){var t,r=((t=e.composedPath)===null||t===void 0?void 0:t.call(e)[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(r==null?void 0:r.nodeName)||(r==null?void 0:r.hasAttribute("contenteditable"))}var mY=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},yY=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Bt(),i=gt(mY,Yt),o=i.onNodesChange,a=i.onEdgesChange,u=tc(t),c=tc(r);A.useEffect(function(){var d=n.getState(),f=d.nodeInternals,h=d.edges,p=d.hasDefaultNodes,v=d.hasDefaultEdges,m=d.onNodesDelete,y=d.onEdgesDelete,b=Array.from(f.values()),x=b.reduce(function(N,j){return(!j.selected&&j.parentNode&&N.find(function(L){return L.id===j.parentNode})||j.selected)&&N.push(j),N},[]),w=h.filter(function(N){return N.selected});if(u&&(x||w)){var S=eq(x,h),E=[].concat(fi(w),fi(S)),_=E.reduce(function(N,j){return N.includes(j.id)||N.push(j.id),N},[]);if((v||p)&&(v&&n.setState({edges:h.filter(function(N){return!_.includes(N.id)})}),p&&(x.forEach(function(N){f.delete(N.id)}),n.setState({nodeInternals:new Map(f)}))),_.length>0&&(y==null||y(E),a)){var R=_.map(function(N){return{id:N,type:"remove"}});a(R)}if(x.length>0&&(m==null||m(x),o)){var P=x.map(function(N){return{id:N.id,type:"remove"}});o(P)}n.setState({nodesSelectionActive:!1})}},[u,o,a]),A.useEffect(function(){n.setState({multiSelectionActive:c})},[c])});function bY(e){var t=Bt();A.useEffect(function(){var r,n=function(){if(e.current){var o=Rx(e.current);process.env.NODE_ENV==="development"&&(o.height===0||o.width===0)&&console.warn("[React Flow]: The React Flow parent container needs a width and a height to render the graph. Help: https://reactflow.dev/error#400"),t.setState({width:o.width||500,height:o.height||500})}};return n(),window.onresize=n,e.current&&(r=new ResizeObserver(function(){return n()}),r.observe(e.current)),function(){window.onresize=null,r&&e.current&&r.unobserve(e.current)}},[])}var xY=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},Om=function(t){return{x:t.x,y:t.y,zoom:t.k}},mu=function(t,r){return t.target.closest(".".concat(r))},wY=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},_Y=function(t){var r=t.onMove,n=t.onMoveStart,i=t.onMoveEnd,o=t.zoomOnScroll,a=o===void 0?!0:o,u=t.zoomOnPinch,c=u===void 0?!0:u,d=t.panOnScroll,f=d===void 0?!1:d,h=t.panOnScrollSpeed,p=h===void 0?.5:h,v=t.panOnScrollMode,m=v===void 0?no.Free:v,y=t.zoomOnDoubleClick,b=y===void 0?!0:y,x=t.selectionKeyPressed,w=t.elementsSelectable,S=t.panOnDrag,E=S===void 0?!0:S,_=t.translateExtent,R=t.minZoom,P=t.maxZoom,N=t.defaultZoom,j=N===void 0?1:N,L=t.defaultPosition,F=L===void 0?[0,0]:L,k=t.zoomActivationKeyCode,D=t.preventScrolling,T=D===void 0?!0:D,B=t.children,$=t.noWheelClassName,W=t.noPanClassName,Y=Bt(),ee=A.useRef(!1),H=A.useRef(null),Q=A.useRef({x:0,y:0,zoom:0}),ce=gt(wY,Yt),se=ce.d3Zoom,z=ce.d3Selection,G=ce.d3ZoomHandler,J=tc(k);return bY(H),A.useEffect(function(){if(H.current){var V,K=aK().scaleExtent([R,P]).translateExtent(_),ie=Ar(H.current).call(K),ne=io(F[0],_[0][0],_[1][0]),ue=io(F[1],_[0][1],_[1][1]),de=io(j,R,P),we=li.translate(ne,ue).scale(de);K.transform(ie,we),Y.setState({d3Zoom:K,d3Selection:ie,d3ZoomHandler:ie.on("wheel.zoom"),transform:[ne,ue,de],domNode:(V=ie.node())===null||V===void 0?void 0:V.closest(".react-flow")})}},[]),A.useEffect(function(){z&&se&&(f&&!J?z.on("wheel",function(V){if(mu(V,$))return!1;V.preventDefault(),V.stopImmediatePropagation();var K=z.property("__zoom").k||1;if(V.ctrlKey&&c){var ie=Yr(V),ne=-V.deltaY*(V.deltaMode===1?.05:V.deltaMode?1:.002)*10,ue=K*Math.pow(2,ne);se.scaleTo(z,ue,ie);return}var de=V.deltaMode===1?20:1,we=m===no.Vertical?0:V.deltaX*de,Se=m===no.Horizontal?0:V.deltaY*de;se.translateBy(z,-(we/K)*p,-(Se/K)*p)}).on("wheel.zoom",null):typeof G<"u"&&z.on("wheel",function(V){if(!T||mu(V,$))return null;V.preventDefault()}).on("wheel.zoom",G))},[f,m,z,se,G,J,c,T,$]),A.useEffect(function(){se&&(x&&!ee.current?se.on("zoom",null):x||se.on("zoom",function(V){if(Y.setState({transform:[V.transform.x,V.transform.y,V.transform.k]}),r){var K=Om(V.transform);r(V.sourceEvent,K)}}))},[x,se,r]),A.useEffect(function(){se&&se.on("start",function(V){if(ee.current=!0,n){var K=Om(V.transform);Q.current=K,n(V.sourceEvent,K)}})},[se,n]),A.useEffect(function(){se&&se.on("end",function(V){if(ee.current=!1,i&&xY(Q.current,V.transform)){var K=Om(V.transform);Q.current=K,i(V.sourceEvent,K)}})},[se,i]),A.useEffect(function(){se&&se.filter(function(V){var K=J||a,ie=c&&V.ctrlKey;return!E&&!K&&!f&&!b&&!c||x||!b&&V.type==="dblclick"||mu(V,$)&&V.type==="wheel"||mu(V,W)&&V.type!=="wheel"||!c&&V.ctrlKey&&V.type==="wheel"||!K&&!f&&!ie&&V.type==="wheel"||!E&&(V.type==="mousedown"||V.type==="touchstart")?!1:(!V.ctrlKey||V.type==="wheel")&&!V.button})},[se,a,c,f,b,E,x,w,J]),A.createElement("div",{className:"react-flow__renderer react-flow__container",ref:H},B)};function cI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fI(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var EY=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},dI={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},SY=A.memo(function(e){var t=e.selectionKeyPressed,r=Bt(),n=A.useRef(0),i=A.useRef(0),o=A.useRef(),a=A.useState(dI),u=Be(a,2),c=u[0],d=u[1],f=gt(EY,Yt),h=f.userSelectionActive,p=f.elementsSelectable,v=h||t;if(!p||!v)return null;var m=function(){d(dI),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},y=function(E){var _=E.target.closest(".react-flow");o.current=_.getBoundingClientRect();var R=fI(E,o.current);d({width:0,height:0,startX:R.x,startY:R.y,x:R.x,y:R.y,draw:!0}),r.setState({userSelectionActive:!0,nodesSelectionActive:!1})},b=function(E){var _,R;if(!(!t||!c.draw||!o.current)){var P=fI(E,o.current),N=(_=c.startX)!==null&&_!==void 0?_:0,j=(R=c.startY)!==null&&R!==void 0?R:0,L=lI(lI({},c),{},{x:P.x<N?P.x:N,y:P.y<j?P.y:j,width:Math.abs(P.x-N),height:Math.abs(P.y-j)}),F=r.getState(),k=F.nodeInternals,D=F.edges,T=F.transform,B=F.onNodesChange,$=F.onEdgesChange,W=Array.from(k.values()),Y=Qj(k,L,T,!1,!0),ee=eq(Y,D).map(function(se){return se.id}),H=Y.map(function(se){return se.id});if(n.current!==H.length){n.current=H.length;var Q=Ji(W,H);Q.length&&(B==null||B(Q))}if(i.current!==ee.length){i.current=ee.length;var ce=Ji(D,ee);ce.length&&($==null||$(ce))}d(L)}},x=function(){r.setState({nodesSelectionActive:n.current>0}),m()},w=function(){r.setState({nodesSelectionActive:!1}),m()};return A.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:y,onMouseMove:b,onMouseUp:x,onMouseLeave:w},c.draw&&A.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:c.width,height:c.height,transform:"translate(".concat(c.x,"px, ").concat(c.y,"px)")}}))});function hI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yq(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:yq(r,t):!1}function vI(e,t,r){var n=e;do{var i;if((i=n)!==null&&i!==void 0&&i.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function OY(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!yq(n,e))}).map(function(n){var i,o,a,u;return{id:n.id,position:n.position||{x:0,y:0},positionAbsolute:n.positionAbsolute||{x:0,y:0},distance:{x:t.x-((i=(o=n.positionAbsolute)===null||o===void 0?void 0:o.x)!==null&&i!==void 0?i:0),y:t.y-((a=(u=n.positionAbsolute)===null||u===void 0?void 0:u.y)!==null&&a!==void 0?a:0)},delta:{x:0,y:0},extent:n.extent,parentNode:n.parentNode,width:n.width,height:n.height}})}function CY(e,t,r,n,i,o){var a=Be(n,2),u=a[0],c=a[1],d=e.extent||o,f={x:t.x-e.distance.x,y:t.y-e.distance.y};if(r&&(f.x=u*Math.round(f.x/u),f.y=c*Math.round(f.y/c)),e.extent==="parent")if(e.parentNode&&e.width&&e.height){var h=i.get(e.parentNode);d=h!=null&&h.positionAbsolute&&h!==null&&h!==void 0&&h.width&&h!==null&&h!==void 0&&h.height?[[h.positionAbsolute.x,h.positionAbsolute.y],[h.positionAbsolute.x+h.width-e.width,h.positionAbsolute.y+h.height-e.height]]:d}else process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Only child nodes can use a parent extent. Help: https://reactflow.dev/error#500"),d=o;else if(e.extent&&e.parentNode){var p,v,m,y,b=i.get(e.parentNode),x=(p=b==null||(v=b.positionAbsolute)===null||v===void 0?void 0:v.x)!==null&&p!==void 0?p:0,w=(m=b==null||(y=b.positionAbsolute)===null||y===void 0?void 0:y.y)!==null&&m!==void 0?m:0;d=[[e.extent[0][0]+x,e.extent[0][1]+w],[e.extent[1][0]+x,e.extent[1][1]+w]]}var S={x:0,y:0};if(e.parentNode){var E,_,R,P,N=i.get(e.parentNode);S={x:(E=N==null||(_=N.positionAbsolute)===null||_===void 0?void 0:_.x)!==null&&E!==void 0?E:0,y:(R=N==null||(P=N.positionAbsolute)===null||P===void 0?void 0:P.y)!==null&&R!==void 0?R:0}}return e.positionAbsolute=d?Vj(f,d):f,e.position={x:e.positionAbsolute.x-S.x,y:e.positionAbsolute.y-S.y},e}function Cm(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return pI(pI({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function Rm(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function bq(e){var t=e.nodeRef,r=e.disabled,n=r===void 0?!1:r,i=e.noDragClassName,o=e.handleSelector,a=e.nodeId,u=e.isSelectable,c=e.selectNodesOnDrag,d=A.useState(!1),f=Be(d,2),h=f[0],p=f[1],v=Bt(),m=A.useRef(),y=A.useRef({x:null,y:null}),b=A.useCallback(function(x){var w=x.sourceEvent,S=v.getState(),E=S.transform,_=S.snapGrid,R=S.snapToGrid,P=w.touches?w.touches[0].clientX:w.clientX,N=w.touches?w.touches[0].clientY:w.clientY,j=Jj({x:P,y:N},E,R,_);return j},[]);return A.useEffect(function(){if(t!=null&&t.current){var x=Ar(t.current);if(n)x.on(".drag",null);else{var w=g8().on("start",function(S){var E=v.getState(),_=E.nodeInternals,R=E.multiSelectionActive,P=E.unselectNodesAndEdges,N=E.onNodeDragStart,j=E.onSelectionDragStart,L=a?N:Rm(j);if(!c&&!R&&a){var F;(F=_.get(a))!==null&&F!==void 0&&F.selected||P()}a&&u&&c&&Zj({id:a,store:v});var k=b(S);if(y.current=k,m.current=OY(_,k,a),L&&m.current){var D=Cm({nodeId:a,dragItems:m.current,nodeInternals:_}),T=Be(D,2),B=T[0],$=T[1];L(S.sourceEvent,B,$)}}).on("drag",function(S){var E=v.getState(),_=E.updateNodePositions,R=E.snapToGrid,P=E.snapGrid,N=E.nodeInternals,j=E.nodeExtent,L=E.onNodeDrag,F=E.onSelectionDrag,k=b(S);if((y.current.x!==k.x||y.current.y!==k.y)&&m.current){y.current=k,m.current=m.current.map(function(Y){return CY(Y,k,R,P,N,j)});var D=a?L:Rm(F);if(_(m.current,!0,!0),p(!0),D){var T=Cm({nodeId:a,dragItems:m.current,nodeInternals:N}),B=Be(T,2),$=B[0],W=B[1];D(S.sourceEvent,$,W)}}S.on("end",function(Y){if(p(!1),m.current){var ee=v.getState(),H=ee.updateNodePositions,Q=ee.nodeInternals,ce=ee.onNodeDragStop,se=ee.onSelectionDragStop,z=a?ce:Rm(se);if(H(m.current,!1,!1),z){var G=Cm({nodeId:a,dragItems:m.current,nodeInternals:Q}),J=Be(G,2),V=J[0],K=J[1];z(Y.sourceEvent,V,K)}}})}).filter(function(S){var E=S.target,_=!S.button&&(!i||!vI(E,".".concat(i),t))&&(!o||vI(E,o,t));return _});return x.call(w),function(){x.on(".drag",null)}}}},[t,n,i,o,u,v,a,c,b]),h}function gI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function RY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var PY=function(t){return RY({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},Px(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},IY=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return Px(r)};function NY(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Bt(),i=gt(PY,Yt),o=i.transformString,a=i.userSelectionActive,u=gt(IY,Yt),c=u.width,d=u.height,f=u.x,h=u.y,p=A.useRef(null);if(bq({nodeRef:p}),a||!c||!d)return null;var v=t?function(m){var y=Array.from(n.getState().nodeInternals.values()).filter(function(b){return b.selected});t(m,y)}:void 0;return A.createElement("div",{className:ur(["react-flow__nodesselection","react-flow__container",r]),style:{transform:o}},A.createElement("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:v,style:{width:c,height:d,top:h,left:f}}))}var TY=A.memo(NY),AY=function(t){return t.nodesSelectionActive},xq=function(t){var r=t.children,n=t.onPaneClick,i=t.onPaneContextMenu,o=t.onPaneScroll,a=t.deleteKeyCode,u=t.onMove,c=t.onMoveStart,d=t.onMoveEnd,f=t.selectionKeyCode,h=t.multiSelectionKeyCode,p=t.zoomActivationKeyCode,v=t.elementsSelectable,m=t.zoomOnScroll,y=t.zoomOnPinch,b=t.panOnScroll,x=t.panOnScrollSpeed,w=t.panOnScrollMode,S=t.zoomOnDoubleClick,E=t.panOnDrag,_=t.translateExtent,R=t.minZoom,P=t.maxZoom,N=t.defaultZoom,j=t.defaultPosition,L=t.preventScrolling,F=t.onSelectionContextMenu,k=t.noWheelClassName,D=t.noPanClassName,T=Bt(),B=gt(AY),$=tc(f);yY({deleteKeyCode:a,multiSelectionKeyCode:h});var W=function(Q){n==null||n(Q),T.getState().resetSelectedElements(),T.setState({nodesSelectionActive:!1})},Y=i?function(H){return i(H)}:void 0,ee=o?function(H){return o(H)}:void 0;return A.createElement(_Y,{onMove:u,onMoveStart:c,onMoveEnd:d,selectionKeyPressed:$,elementsSelectable:v,zoomOnScroll:m,zoomOnPinch:y,panOnScroll:b,panOnScrollSpeed:x,panOnScrollMode:w,zoomOnDoubleClick:S,panOnDrag:E,translateExtent:_,minZoom:R,maxZoom:P,defaultZoom:N,defaultPosition:j,zoomActivationKeyCode:p,preventScrolling:L,noWheelClassName:k,noPanClassName:D},r,A.createElement(SY,{selectionKeyPressed:$}),B&&A.createElement(TY,{onSelectionContextMenu:F,noPanClassName:D}),A.createElement("div",{className:"react-flow__pane react-flow__container",onClick:W,onContextMenu:Y,onWheel:ee}))};xq.displayName="FlowRenderer";var MY=A.memo(xq);function DY(e){var t=gt(A.useCallback(function(r){return e?Qj(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var jY=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},wq=function(t){var r=gt(jY,Yt),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,u=DY(t.onlyRenderVisibleElements),c=A.useRef(),d=A.useMemo(function(){if(typeof ResizeObserver>"u")return null;var f=new ResizeObserver(function(h){var p=h.map(function(v){return{id:v.target.getAttribute("data-id"),nodeElement:v.target,forceUpdate:!0}});a(p)});return c.current=f,f},[]);return A.useEffect(function(){return function(){var f;c==null||(f=c.current)===null||f===void 0||f.disconnect()}},[]),A.createElement("div",{className:"react-flow__nodes react-flow__container"},u.map(function(f){var h,p,v,m,y,b,x,w=f.type||"default";t.nodeTypes[w]||(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Node type "'.concat(w,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),w="default");var S=t.nodeTypes[w]||t.nodeTypes.default,E=!!(f.draggable||n&&typeof f.draggable>"u"),_=!!(f.selectable||o&&typeof f.selectable>"u"),R=!!(f.connectable||i&&typeof f.connectable>"u");return A.createElement(S,{key:f.id,id:f.id,className:f.className,style:f.style,type:w,data:f.data,sourcePosition:f.sourcePosition||xe.Bottom,targetPosition:f.targetPosition||xe.Top,hidden:f.hidden,xPos:(h=(p=f.positionAbsolute)===null||p===void 0?void 0:p.x)!==null&&h!==void 0?h:0,yPos:(v=(m=f.positionAbsolute)===null||m===void 0?void 0:m.y)!==null&&v!==void 0?v:0,selectNodesOnDrag:t.selectNodesOnDrag,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,selected:!!f.selected,isDraggable:E,isSelectable:_,isConnectable:R,resizeObserver:d,dragHandle:f.dragHandle,zIndex:(y=(b=f[It])===null||b===void 0?void 0:b.z)!==null&&y!==void 0?y:0,isParent:!!((x=f[It])!==null&&x!==void 0&&x.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!f.width&&!!f.height})}))};wq.displayName="NodeRenderer";var qY=A.memo(wq),Ki;function mI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var kY=(Ki={},ze(Ki,xe.Left,xe.Right),ze(Ki,xe.Right,xe.Left),ze(Ki,xe.Top,xe.Bottom),ze(Ki,xe.Bottom,xe.Top),Ki),LY=(function(e){var t,r,n,i,o,a=e.connectionNodeId,u=e.connectionHandleType,c=e.connectionLineStyle,d=e.connectionLineType,f=d===void 0?Fn.Bezier:d,h=e.isConnectable,p=e.CustomConnectionLineComponent,v=gt(A.useCallback(function(ee){return{fromNode:ee.nodeInternals.get(a),handleId:ee.connectionHandleId,toX:(ee.connectionPosition.x-ee.transform[0])/ee.transform[2],toY:(ee.connectionPosition.y-ee.transform[1])/ee.transform[2]}},[a]),Yt),m=v.fromNode,y=v.handleId,b=v.toX,x=v.toY,w=m==null||(t=m[It])===null||t===void 0?void 0:t.handleBounds;if(!m||!h||!(w!=null&&w[u]))return null;var S=w[u],E=y?S.find(function(ee){return ee.id===y}):S[0],_=E?E.x+E.width/2:((r=m==null?void 0:m.width)!==null&&r!==void 0?r:0)/2,R=E?E.y+E.height/2:(n=m==null?void 0:m.height)!==null&&n!==void 0?n:0,P=((m==null||(i=m.positionAbsolute)===null||i===void 0?void 0:i.x)||0)+_,N=((m==null||(o=m.positionAbsolute)===null||o===void 0?void 0:o.y)||0)+R,j=E==null?void 0:E.position;if(!j)return null;var L=kY[j],F,k,D,T,B,$;switch(u){case"source":F=P,k=N,D=j,T=b,B=x,$=L;break;case"target":F=b,k=x,D=L,T=P,B=N,$=j;break}if(p)return A.createElement("g",{className:"react-flow__connection"},A.createElement(p,{connectionLineType:f,connectionLineStyle:c,fromNode:m,fromHandle:E,fromX:P,fromY:N,toX:b,toY:x,fromPosition:j,toPosition:L,sourcePosition:D,targetPosition:$,sourceNode:m,sourceHandle:E,targetX:T,targetY:B,sourceX:F,sourceY:k}));var W="",Y={sourceX:F,sourceY:k,sourcePosition:D,targetX:T,targetY:B,targetPosition:$};return f===Fn.Bezier?W=Uc(Y):f===Fn.Step?W=jb(yI(yI({},Y),{},{borderRadius:0})):f===Fn.SmoothStep?W=jb(Y):f===Fn.SimpleBezier?W=aq(Y):W="M".concat(F,",").concat(k," ").concat(T,",").concat(B),A.createElement("g",{className:"react-flow__connection"},A.createElement("path",{d:W,className:"react-flow__connection-path",style:c}))});function Bb(e){"@babel/helpers - typeof";return Bb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bb(e)}var yu,BY=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return A.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:"none",points:"-5,-4 0,0 -5,4"})},FY=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return A.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},bI=(yu={},ze(yu,Xu.Arrow,BY),ze(yu,Xu.ArrowClosed,FY),yu);function $Y(e){var t=A.useMemo(function(){var r=bI.hasOwnProperty(e);return r?bI[e]:(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Marker type "'.concat(e,`" doesn't exist. Help: https://reactflow.dev/error#900`)),function(){return null})},[e]);return t}function xI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var HY=function(t){var r=t.id,n=t.type,i=t.color,o=t.width,a=o===void 0?12.5:o,u=t.height,c=u===void 0?12.5:u,d=t.markerUnits,f=d===void 0?"strokeWidth":d,h=t.strokeWidth,p=t.orient,v=p===void 0?"auto":p,m=$Y(n);return A.createElement("marker",{className:"react-flow__arrowhead",id:r,markerWidth:"".concat(a),markerHeight:"".concat(c),viewBox:"-10 -10 20 20",markerUnits:f,orient:v,refX:"0",refY:"0"},A.createElement(m,{color:i,strokeWidth:h}))},UY=function(t){var r=t.defaultColor,n=t.rfId;return function(i){var o=[];return i.edges.reduce(function(a,u){return[u.markerStart,u.markerEnd].forEach(function(c){if(c&&Bb(c)==="object"){var d=Mb(c,n);o.includes(d)||(a.push(zY({id:d,color:c.color||r},c)),o.push(d))}}),a},[]).sort(function(a,u){return a.id.localeCompare(u.id)})}},_q=function(t){var r=t.defaultColor,n=t.rfId,i=gt(A.useCallback(UY({defaultColor:r,rfId:n}),[r,n]),function(o,a){return!(o.length!==a.length||o.some(function(u,c){return u.id!==a[c].id}))});return A.createElement("defs",null,i.map(function(o){return A.createElement(HY,{id:o.id,key:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient})}))};_q.displayName="MarkerDefinitions";var VY=A.memo(_q),WY=[{level:0,isMaxLevel:!0,edges:[]}];function GY(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,u){var c=Gj(u.zIndex),d=c?u.zIndex:0;if(r){var f,h,p,v;d=c?u.zIndex:Math.max(((f=t.get(u.source))===null||f===void 0||(h=f[It])===null||h===void 0?void 0:h.z)||0,((p=t.get(u.target))===null||p===void 0||(v=p[It])===null||v===void 0?void 0:v.z)||0)}return a[d]?a[d].push(u):a[d]=[u],n=d>n?d:n,a},{}),o=Object.entries(i).map(function(a){var u=Be(a,2),c=u[0],d=u[1],f=+c;return{edges:d,level:f,isMaxLevel:f===n}});return o.length===0?WY:o}function KY(e,t,r){var n=gt(A.useCallback(function(i){return e?i.edges.filter(function(o){var a=t.get(o.source),u=t.get(o.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(u==null?void 0:u.width)&&(u==null?void 0:u.height)&&vY({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:u.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:u.width,targetHeight:u.height,width:i.width,height:i.height,transform:i.transform})}):i.edges},[e,t]));return GY(n,t,r)}var YY=function(t){return{connectionNodeId:t.connectionNodeId,connectionHandleType:t.connectionHandleType,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,width:t.width,height:t.height,connectionMode:t.connectionMode,nodeInternals:t.nodeInternals}},Eq=function(t){var r=gt(YY,Yt),n=r.connectionNodeId,i=r.connectionHandleType,o=r.nodesConnectable,a=r.elementsSelectable,u=r.width,c=r.height,d=r.connectionMode,f=r.nodeInternals,h=KY(t.onlyRenderVisibleElements,f,t.elevateEdgesOnSelect);if(!u)return null;var p=t.connectionLineType,v=t.defaultMarkerColor,m=t.connectionLineStyle,y=t.connectionLineComponent,b=t.connectionLineContainerStyle,x=n&&i;return A.createElement(A.Fragment,null,h.map(function(w){var S=w.level,E=w.edges,_=w.isMaxLevel;return A.createElement("svg",{key:S,style:{zIndex:S},width:u,height:c,className:"react-flow__edges react-flow__container"},_&&A.createElement(VY,{defaultColor:v,rfId:t.rfId}),A.createElement("g",null,E.map(function(R){var P=oI(f,R.source),N=Be(P,3),j=N[0],L=N[1],F=N[2],k=oI(f,R.target),D=Be(k,3),T=D[0],B=D[1],$=D[2];if(!F||!$)return null;var W=R.type||"default";t.edgeTypes[W]||(console.warn('[React Flow]: Edge type "'.concat(W,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),W="default");var Y=t.edgeTypes[W]||t.edgeTypes.default,ee=d===go.Strict?B.target:B.target||B.source,H=iI(L.source,R.sourceHandle||null),Q=iI(ee,R.targetHandle||null),ce=(H==null?void 0:H.position)||xe.Bottom,se=(Q==null?void 0:Q.position)||xe.Top;if(!H)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for source handle id: ".concat(R.sourceHandle,"; edge id: ").concat(R.id,". Help: https://reactflow.dev/error#800")),null;if(!Q)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for target handle id: ".concat(R.targetHandle,"; edge id: ").concat(R.id,". Help: https://reactflow.dev/error#800")),null;var z=pY(j,H,ce,T,Q,se),G=z.sourceX,J=z.sourceY,V=z.targetX,K=z.targetY;return A.createElement(Y,{key:R.id,id:R.id,className:ur([R.className,t.noPanClassName]),type:W,data:R.data,selected:!!R.selected,animated:!!R.animated,hidden:!!R.hidden,label:R.label,labelStyle:R.labelStyle,labelShowBg:R.labelShowBg,labelBgStyle:R.labelBgStyle,labelBgPadding:R.labelBgPadding,labelBgBorderRadius:R.labelBgBorderRadius,style:R.style,source:R.source,target:R.target,sourceHandleId:R.sourceHandle,targetHandleId:R.targetHandle,markerEnd:R.markerEnd,markerStart:R.markerStart,sourceX:G,sourceY:J,targetX:V,targetY:K,sourcePosition:ce,targetPosition:se,elementsSelectable:a,onEdgeUpdate:t.onEdgeUpdate,onContextMenu:t.onEdgeContextMenu,onMouseEnter:t.onEdgeMouseEnter,onMouseMove:t.onEdgeMouseMove,onMouseLeave:t.onEdgeMouseLeave,onClick:t.onEdgeClick,edgeUpdaterRadius:t.edgeUpdaterRadius,onEdgeDoubleClick:t.onEdgeDoubleClick,onEdgeUpdateStart:t.onEdgeUpdateStart,onEdgeUpdateEnd:t.onEdgeUpdateEnd,rfId:t.rfId})})))}),x&&A.createElement("svg",{style:b,width:u,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},A.createElement(LY,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:m,connectionLineType:p,isConnectable:o,CustomConnectionLineComponent:y})))};Eq.displayName="EdgeRenderer";var XY=A.memo(Eq),ZY=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function JY(e){var t=e.children,r=gt(ZY);return A.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function QY(e){var t=iq(),r=A.useRef(!1);A.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var Sq=function(t){var r=t.nodeTypes,n=t.edgeTypes,i=t.onMove,o=t.onMoveStart,a=t.onMoveEnd,u=t.onInit,c=t.onNodeClick,d=t.onEdgeClick,f=t.onNodeDoubleClick,h=t.onEdgeDoubleClick,p=t.onNodeMouseEnter,v=t.onNodeMouseMove,m=t.onNodeMouseLeave,y=t.onNodeContextMenu,b=t.onSelectionContextMenu,x=t.connectionLineType,w=t.connectionLineStyle,S=t.connectionLineComponent,E=t.connectionLineContainerStyle,_=t.selectionKeyCode,R=t.multiSelectionKeyCode,P=t.zoomActivationKeyCode,N=t.deleteKeyCode,j=t.onlyRenderVisibleElements,L=t.elementsSelectable,F=t.selectNodesOnDrag,k=t.translateExtent,D=t.minZoom,T=t.maxZoom,B=t.defaultZoom,$=t.defaultPosition,W=t.preventScrolling,Y=t.defaultMarkerColor,ee=t.zoomOnScroll,H=t.zoomOnPinch,Q=t.panOnScroll,ce=t.panOnScrollSpeed,se=t.panOnScrollMode,z=t.zoomOnDoubleClick,G=t.panOnDrag,J=t.onPaneClick,V=t.onPaneScroll,K=t.onPaneContextMenu,ie=t.onEdgeUpdate,ne=t.onEdgeContextMenu,ue=t.onEdgeMouseEnter,de=t.onEdgeMouseMove,we=t.onEdgeMouseLeave,Se=t.edgeUpdaterRadius,_e=t.onEdgeUpdateStart,he=t.onEdgeUpdateEnd,ae=t.noDragClassName,Oe=t.noWheelClassName,Ne=t.noPanClassName,He=t.elevateEdgesOnSelect,qe=t.id;return QY(u),A.createElement(MY,{onPaneClick:J,onPaneContextMenu:K,onPaneScroll:V,deleteKeyCode:N,selectionKeyCode:_,multiSelectionKeyCode:R,zoomActivationKeyCode:P,elementsSelectable:L,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:ee,zoomOnPinch:H,zoomOnDoubleClick:z,panOnScroll:Q,panOnScrollSpeed:ce,panOnScrollMode:se,panOnDrag:G,translateExtent:k,minZoom:D,maxZoom:T,defaultZoom:B,defaultPosition:$,onSelectionContextMenu:b,preventScrolling:W,noDragClassName:ae,noWheelClassName:Oe,noPanClassName:Ne},A.createElement(JY,null,A.createElement(XY,{edgeTypes:n,onEdgeClick:d,onEdgeDoubleClick:h,connectionLineType:x,connectionLineStyle:w,connectionLineComponent:S,connectionLineContainerStyle:E,onEdgeUpdate:ie,onlyRenderVisibleElements:j,onEdgeContextMenu:ne,onEdgeMouseEnter:ue,onEdgeMouseMove:de,onEdgeMouseLeave:we,onEdgeUpdateStart:_e,onEdgeUpdateEnd:he,edgeUpdaterRadius:Se,defaultMarkerColor:Y,noPanClassName:Ne,elevateEdgesOnSelect:!!He,rfId:qe}),A.createElement(qY,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:f,onNodeMouseEnter:p,onNodeMouseMove:v,onNodeMouseLeave:m,onNodeContextMenu:y,selectNodesOnDrag:F,onlyRenderVisibleElements:j,noPanClassName:Ne,noDragClassName:ae})))};Sq.displayName="GraphView";var e9=A.memo(Sq),Oq=function(){return null};Oq.displayName="GroupNode";function wI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _I(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ta=(function(e){var t=function(n){var i=n.id,o=n.type,a=n.data,u=n.xPos,c=n.yPos,d=n.selected,f=n.onClick,h=n.onMouseEnter,p=n.onMouseMove,v=n.onMouseLeave,m=n.onContextMenu,y=n.onDoubleClick,b=n.style,x=n.className,w=n.isDraggable,S=n.isSelectable,E=n.isConnectable,_=n.selectNodesOnDrag,R=n.sourcePosition,P=n.targetPosition,N=n.hidden,j=n.resizeObserver,L=n.dragHandle,F=n.zIndex,k=n.isParent,D=n.noPanClassName,T=n.noDragClassName,B=n.initialized,$=Bt(),W=A.useRef(null),Y=A.useRef(R),ee=A.useRef(P),H=A.useRef(o),Q=S||w||f||h||p||v,ce=Qo(i,$.getState,h),se=Qo(i,$.getState,p),z=Qo(i,$.getState,v),G=Qo(i,$.getState,m),J=Qo(i,$.getState,y),V=function(ne){if(S&&(!_||!w)&&Zj({id:i,store:$}),f){var ue=$.getState().nodeInternals.get(i);f(ne,_I({},ue))}};A.useEffect(function(){if(W.current&&!N){var ie=W.current;return j==null||j.observe(ie),function(){return j==null?void 0:j.unobserve(ie)}}},[N]),A.useEffect(function(){var ie=H.current!==o,ne=Y.current!==R,ue=ee.current!==P;W.current&&(ie||ne||ue)&&(ie&&(H.current=o),ne&&(Y.current=R),ue&&(ee.current=P),$.getState().updateNodeDimensions([{id:i,nodeElement:W.current,forceUpdate:!0}]))},[i,o,R,P]);var K=bq({nodeRef:W,disabled:N||!w,noDragClassName:T,handleSelector:L,nodeId:i,isSelectable:S,selectNodesOnDrag:_});return N?null:A.createElement("div",{className:ur(["react-flow__node","react-flow__node-".concat(o),D,x,{selected:d,selectable:S,parent:k}]),ref:W,style:_I({zIndex:F,transform:"translate(".concat(u,"px,").concat(c,"px)"),pointerEvents:Q?"all":"none",visibility:B?"visible":"hidden"},b),onMouseEnter:ce,onMouseMove:se,onMouseLeave:z,onContextMenu:G,onClick:V,onDoubleClick:J,"data-testid":"rf__node-".concat(i),"data-id":i},A.createElement(ZK,{value:i},A.createElement(e,{id:i,data:a,type:o,xPos:u,yPos:c,selected:d,isConnectable:E,sourcePosition:R,targetPosition:P,dragging:K,dragHandle:L,zIndex:F})))};return t.displayName="NodeWrapper",A.memo(t)});function EI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function SI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t9(e){var t={input:ta(e.input||vq),default:ta(e.default||Lb),output:ta(e.output||mq),group:ta(e.group||Oq)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=ta(e[o]||Lb),i},r);return SI(SI({},t),n)}function OI(e,t){var r=A.useRef(null),n=A.useMemo(function(){if(process.env.NODE_ENV==="development"){var i=Object.keys(e);Yt(r.current,i)&&console.warn("[React Flow]: It looks like you have 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. Help: https://reactflow.dev/error#200"),r.current=i}return t(e)},[e]);return n}function CI(e){if(!(!e||typeof document>"u")){var t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");t.appendChild(r),r.appendChild(document.createTextNode(e))}}var Cq=function(t){var r=t.children,n=!0;try{Bt()}catch{n=!1}return n?A.createElement(A.Fragment,null,r):A.createElement(bK,{createStore:xK},r)};Cq.displayName="ReactFlowWrapper";var r9=["nodes","edges","defaultNodes","defaultEdges","className","nodeTypes","edgeTypes","onNodeClick","onEdgeClick","onInit","onMove","onMoveStart","onMoveEnd","onConnect","onConnectStart","onConnectStop","onConnectEnd","onClickConnectStart","onClickConnectStop","onClickConnectEnd","onNodeMouseEnter","onNodeMouseMove","onNodeMouseLeave","onNodeContextMenu","onNodeDoubleClick","onNodeDragStart","onNodeDrag","onNodeDragStop","onNodesDelete","onEdgesDelete","onSelectionChange","onSelectionDragStart","onSelectionDrag","onSelectionDragStop","onSelectionContextMenu","connectionMode","connectionLineType","connectionLineStyle","connectionLineComponent","connectionLineContainerStyle","deleteKeyCode","selectionKeyCode","multiSelectionKeyCode","zoomActivationKeyCode","snapToGrid","snapGrid","onlyRenderVisibleElements","selectNodesOnDrag","nodesDraggable","nodesConnectable","elementsSelectable","minZoom","maxZoom","defaultZoom","defaultPosition","translateExtent","preventScrolling","nodeExtent","defaultMarkerColor","zoomOnScroll","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnScrollMode","zoomOnDoubleClick","panOnDrag","onPaneClick","onPaneScroll","onPaneContextMenu","children","onEdgeUpdate","onEdgeContextMenu","onEdgeDoubleClick","onEdgeMouseEnter","onEdgeMouseMove","onEdgeMouseLeave","onEdgeUpdateStart","onEdgeUpdateEnd","edgeUpdaterRadius","onNodesChange","onEdgesChange","noDragClassName","noWheelClassName","noPanClassName","fitView","fitViewOptions","connectOnClick","attributionPosition","proOptions","defaultEdgeOptions","elevateEdgesOnSelect"];function RI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function PI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}CI(uY),CI(lY);var n9={input:vq,default:Lb,output:mq},i9={default:qb,straight:lq,step:cq,smoothstep:Nx,simplebezier:sq},o9=[15,15],a9=[0,0],Rq=A.forwardRef(function(e,t){var r=e.nodes,n=e.edges,i=e.defaultNodes,o=e.defaultEdges,a=e.className,u=e.nodeTypes,c=u===void 0?n9:u,d=e.edgeTypes,f=d===void 0?i9:d,h=e.onNodeClick,p=e.onEdgeClick,v=e.onInit,m=e.onMove,y=e.onMoveStart,b=e.onMoveEnd,x=e.onConnect,w=e.onConnectStart,S=e.onConnectStop,E=e.onConnectEnd,_=e.onClickConnectStart,R=e.onClickConnectStop,P=e.onClickConnectEnd,N=e.onNodeMouseEnter,j=e.onNodeMouseMove,L=e.onNodeMouseLeave,F=e.onNodeContextMenu,k=e.onNodeDoubleClick,D=e.onNodeDragStart,T=e.onNodeDrag,B=e.onNodeDragStop,$=e.onNodesDelete,W=e.onEdgesDelete,Y=e.onSelectionChange,ee=e.onSelectionDragStart,H=e.onSelectionDrag,Q=e.onSelectionDragStop,ce=e.onSelectionContextMenu,se=e.connectionMode,z=se===void 0?go.Strict:se,G=e.connectionLineType,J=G===void 0?Fn.Bezier:G,V=e.connectionLineStyle,K=e.connectionLineComponent,ie=e.connectionLineContainerStyle,ne=e.deleteKeyCode,ue=ne===void 0?"Backspace":ne,de=e.selectionKeyCode,we=de===void 0?"Shift":de,Se=e.multiSelectionKeyCode,_e=Se===void 0?"Meta":Se,he=e.zoomActivationKeyCode,ae=he===void 0?"Meta":he,Oe=e.snapToGrid,Ne=Oe===void 0?!1:Oe,He=e.snapGrid,qe=He===void 0?o9:He,Xe=e.onlyRenderVisibleElements,We=Xe===void 0?!1:Xe,mt=e.selectNodesOnDrag,et=mt===void 0?!0:mt,Tt=e.nodesDraggable,ut=e.nodesConnectable,tt=e.elementsSelectable,Ct=e.minZoom,Zt=Ct===void 0?.5:Ct,cr=e.maxZoom,Dt=cr===void 0?2:cr,xt=e.defaultZoom,jt=xt===void 0?1:xt,zr=e.defaultPosition,Kn=zr===void 0?a9:zr,On=e.translateExtent,Hr=On===void 0?Db:On,Pi=e.preventScrolling,pl=Pi===void 0?!0:Pi,es=e.nodeExtent,Io=e.defaultMarkerColor,vl=Io===void 0?"#b1b1b7":Io,ts=e.zoomOnScroll,gl=ts===void 0?!0:ts,rs=e.zoomOnPinch,ns=rs===void 0?!0:rs,is=e.panOnScroll,ml=is===void 0?!1:is,os=e.panOnScrollSpeed,No=os===void 0?.5:os,as=e.panOnScrollMode,To=as===void 0?no.Free:as,ss=e.zoomOnDoubleClick,yl=ss===void 0?!0:ss,us=e.panOnDrag,bl=us===void 0?!0:us,xl=e.onPaneClick,wl=e.onPaneScroll,_l=e.onPaneContextMenu,El=e.children,cs=e.onEdgeUpdate,Sl=e.onEdgeContextMenu,Ol=e.onEdgeDoubleClick,Cl=e.onEdgeMouseEnter,Rl=e.onEdgeMouseMove,Pl=e.onEdgeMouseLeave,Il=e.onEdgeUpdateStart,Ii=e.onEdgeUpdateEnd,ls=e.edgeUpdaterRadius,Ni=ls===void 0?10:ls,Nl=e.onNodesChange,Tl=e.onEdgesChange,fs=e.noDragClassName,ds=fs===void 0?"nodrag":fs,Ao=e.noWheelClassName,hs=Ao===void 0?"nowheel":Ao,ps=e.noPanClassName,Al=ps===void 0?"nopan":ps,vs=e.fitView,Ml=vs===void 0?!1:vs,gs=e.fitViewOptions,Mo=e.connectOnClick,ms=Mo===void 0?!0:Mo,Do=e.attributionPosition,Dl=e.proOptions,ys=e.defaultEdgeOptions,Yn=e.elevateEdgesOnSelect,bs=Yn===void 0?!1:Yn,Ti=zc(e,r9),xs=OI(c,t9),ws=OI(f,hY);return A.createElement("div",PI(PI({},Ti),{},{ref:t,className:ur(["react-flow",a])}),A.createElement(Cq,null,A.createElement(e9,{onInit:v,onMove:m,onMoveStart:y,onMoveEnd:b,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:N,onNodeMouseMove:j,onNodeMouseLeave:L,onNodeContextMenu:F,onNodeDoubleClick:k,nodeTypes:xs,edgeTypes:ws,connectionLineType:J,connectionLineStyle:V,connectionLineComponent:K,connectionLineContainerStyle:ie,selectionKeyCode:we,deleteKeyCode:ue,multiSelectionKeyCode:_e,zoomActivationKeyCode:ae,onlyRenderVisibleElements:We,selectNodesOnDrag:et,translateExtent:Hr,minZoom:Zt,maxZoom:Dt,defaultZoom:jt,defaultPosition:Kn,preventScrolling:pl,zoomOnScroll:gl,zoomOnPinch:ns,zoomOnDoubleClick:yl,panOnScroll:ml,panOnScrollSpeed:No,panOnScrollMode:To,panOnDrag:bl,onPaneClick:xl,onPaneScroll:wl,onPaneContextMenu:_l,onSelectionContextMenu:ce,onEdgeUpdate:cs,onEdgeContextMenu:Sl,onEdgeDoubleClick:Ol,onEdgeMouseEnter:Cl,onEdgeMouseMove:Rl,onEdgeMouseLeave:Pl,onEdgeUpdateStart:Il,onEdgeUpdateEnd:Ii,edgeUpdaterRadius:Ni,defaultMarkerColor:vl,noDragClassName:ds,noWheelClassName:hs,noPanClassName:Al,elevateEdgesOnSelect:bs,id:Ti==null?void 0:Ti.id}),A.createElement(aY,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:x,onConnectStart:w,onConnectStop:S,onConnectEnd:E,onClickConnectStart:_,onClickConnectStop:R,onClickConnectEnd:P,nodesDraggable:Tt,nodesConnectable:ut,elementsSelectable:tt,minZoom:Zt,maxZoom:Dt,nodeExtent:es,onNodesChange:Nl,onEdgesChange:Tl,snapToGrid:Ne,snapGrid:qe,connectionMode:z,translateExtent:Hr,connectOnClick:ms,defaultEdgeOptions:ys,fitView:Ml,fitViewOptions:gs,onNodesDelete:$,onEdgesDelete:W,onNodeDragStart:D,onNodeDrag:T,onNodeDragStop:B,onSelectionDrag:H,onSelectionDragStart:ee,onSelectionDragStop:Q}),Y&&A.createElement(iY,{onSelectionChange:Y}),El,A.createElement(HK,{proOptions:Dl,position:Do})))});Rq.displayName="ReactFlow";function Pq(e){return function(t){var r=A.useState(t),n=Be(r,2),i=n[0],o=n[1],a=A.useCallback(function(u){return o(function(c){return e(u,c)})},[]);return[i,o,a]}}var s9=Pq(Yj),u9=Pq(dK);function II(e,t){const{width:r,height:n,positionAbsolute:i}=e,o=t.positionAbsolute,a=r/2,u=n/2,c=i.x+a,d=i.y+u,f=o.x+a,h=o.y+u,p=(f-c)/(2*a)-(h-d)/(2*u),v=(f-c)/(2*a)+(h-d)/(2*u),m=1/(Math.abs(p)+Math.abs(v)),y=m*p,b=m*v,x=a*(y+b)+c,w=u*(-y+b)+d;return{x,y:w}}function NI(e,t){const r={...e.positionAbsolute,...e},n=Math.round(r.x),i=Math.round(r.y),o=Math.round(t.x),a=Math.round(t.y);return o<=n+1?xe.Left:o>=n+r.width-1?xe.Right:a<=i+1?xe.Top:a>=r.y+r.height-1?xe.Bottom:xe.Top}function Iq(e,t){const r=II(e,t),n=II(t,e),i=NI(e,r),o=NI(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const c9=({targetX:e,targetY:t,sourcePosition:r,targetPosition:n,sourceNode:i})=>{if(!i)return null;const o={id:"connection-target",width:1,height:1,position:{x:e,y:t}},{sx:a,sy:u}=Iq(i,o),c=Uc({sourceX:a,sourceY:u,sourcePosition:r,targetPosition:n,targetX:e,targetY:t});return C.jsxs("g",{children:[C.jsx("path",{fill:"none",stroke:"#222",strokeWidth:1.5,className:"animated",d:c}),C.jsx("circle",{cx:e,cy:t,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})},l9=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=gt(A.useCallback(m=>m.nodeInternals.get(t),[t])),a=gt(A.useCallback(m=>m.nodeInternals.get(r),[r]));if(!o||!a)return null;const{sx:u,sy:c,tx:d,ty:f,sourcePos:h,targetPos:p}=Iq(o,a),v=Uc({sourceX:u,sourceY:c,sourcePosition:h,targetPosition:p,targetX:d,targetY:f});return C.jsx("path",{id:e,className:"react-flow__edge-path",d:v,markerEnd:n,style:i})},TI=172,AI=36,f9={custom:l9},d9=(e,t,r="LR")=>{const n=new gP.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:TI,height:AI})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),gP.layout(n),e.forEach(o=>{const a=n.node(o.id);return o.targetPosition=i?xe.Left:xe.Top,o.sourcePosition=i?xe.Right:xe.Bottom,o.position={x:a.x-TI/2,y:a.y-AI/2},o}),{nodes:e,edges:t}},h9=()=>{},p9=({data:e,dict:t,onSelect:r=h9})=>{const{nodes:n,edges:i}=d9(Object.values(t).filter(h=>h.id===e.selected||e.parents.flat().includes(h.id)||e.children.flat().includes(h.id)).map(h=>({id:h.id,type:h.parents.length===0?"input":h.includes.length===0?"output":"default",sourcePosition:xe.Right,targetPosition:xe.Left,data:{label:h.privilege},position:{x:0,y:0},className:h.id===e.selected?"highlighted":"",selected:h.id===e.selected})),e.links.map(({source:h,target:p})=>({id:`e${h}-${p}`,source:h,target:p}))),[o,a,u]=s9(n),[c,d,f]=u9(i);return A.useEffect(()=>{a([...n]),d([...i])},[e]),C.jsx(Rq,{nodes:o,edges:c,fitView:!0,onNodesChange:u,onEdgesChange:f,onNodeClick:(h,p)=>{r(p.id)},defaultZoom:.5,edgeTypes:f9,connectionLineComponent:c9,children:C.jsx($K,{variant:gi.Dots,color:"#81818140",gap:18,size:1})})};var Nq=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(Nq||{});const Tq=e=>{switch(e){case"entityCollection":return Z.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return Z.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return Z.ESubPermissionType.DS_METHOD;case"entity":return Z.ESubPermissionType.ENTITY_METHOD;default:return Z.EPermissionType.METHOD}},MI=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[Nq[r]])==null||i.forEach(a=>{if(`${o.name.toLowerCase()}.${a.name.toLowerCase()}`.includes(t)||!t){const c={applyTo:`${o.name}.${a.name}`,type:r};r===Z.EPermissionType.METHOD&&(c.subType=Tq(a.applyTo)),n.push(c)}});return n},v9=(e=[],t)=>{var n;const r=[];for(const i of e)(n=i.methods)==null||n.forEach(o=>{(`${i.name.toLowerCase()}.${o.name.toLowerCase()}`.includes(t)||!t)&&r.push({applyTo:`${i.name}.${o.name}`,type:Z.EPermissionType.SINGLETON_METHOD})});return r};function Ax(e,t=[],r=[],n=[]){const i=MI(r,e,Z.EPermissionType.ATTRIBUTE),o=MI(r,e,Z.EPermissionType.METHOD),a=v9(n,e),u=t.filter(h=>!e||`ds.${h.name.toLowerCase()}`.includes(e)).map(h=>({applyTo:`ds.${h.name}`,type:Z.ESubPermissionType.DS_METHOD})),c=[],d=[];return r.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{c.push({applyTo:h.name,type:Z.EPermissionType.DATACLASS})}),n.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{d.push({applyTo:h.name,type:Z.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:Z.EPermissionType.DATASTORE}].filter(h=>!e||`ds.${h.applyTo.toLowerCase()}`.includes(e)),...u,...c,...i,...o,...d,...a].reduce((h,p)=>{const v=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],[m,y]=p.applyTo.split("."),b=h.find(x=>x.prefix===m);return b?(b.resources=[...b.resources,p].sort((x,w)=>{const S=v.indexOf(x.type),E=v.indexOf(w.type);return S>E?1:-1}),b.type=y?b.type:p.type,[...h].sort((x,w)=>{const S=v.indexOf(x.type),E=v.indexOf(w.type);return S>E?1:-1})):[...h,{prefix:m,type:y?null:p.type,resources:[p]}]},[]).reduce((h,p)=>[...h,...p.resources],[])}const g9=(e=[],t=[],r=[])=>{const n=Ax("",e,t,r),i={ds:{applyTo:"ds",type:Z.EPermissionType.DATASTORE,methods:[],dataClasses:[],singletons:[]}},o=(u,c)=>u.applyTo.localeCompare(c.applyTo);n.forEach(u=>{const[c,d]=u.applyTo.split(".");if(d||(u.type===Z.EPermissionType.DATACLASS?i.ds.dataClasses.push({applyTo:c,type:Z.EPermissionType.DATACLASS,methods:[],attributes:[]}):u.type===Z.EPermissionType.SINGLETON&&i.ds.singletons.push({applyTo:c,type:Z.EPermissionType.SINGLETON,methods:[],attributes:[]})),d){const f=(h,p,v)=>{h.forEach(m=>{m.applyTo===c&&m[p].push(v)})};[Z.ESubPermissionType.DS_METHOD,Z.ESubPermissionType.DATACLASS_METHOD,Z.ESubPermissionType.ENTITY_METHOD,Z.ESubPermissionType.ENTITY_SEL_METHOD].includes(u.type)?c==="ds"?i.ds.methods.push(u):f(i.ds.dataClasses,"methods",u):u.type===Z.EPermissionType.ATTRIBUTE?(f(i.ds.dataClasses,"attributes",u),f(i.ds.singletons,"attributes",u)):u.type===Z.EPermissionType.SINGLETON_METHOD&&f(i.ds.singletons,"methods",u)}});const a=u=>{u.forEach(c=>{c.methods&&c.methods.sort(o),c.attributes&&c.attributes.sort(o)})};return i.ds.methods.sort(o),i.ds.dataClasses.sort(o),i.ds.singletons.sort(o),a(i.ds.dataClasses),a(i.ds.singletons),i},Aq=(e,t=[])=>{const r={};return Object.entries(e).forEach(([n,i])=>{r[n]={...i,resources:i.resources.map(o=>{var a,u,c;if(o.type===Z.EPermissionType.METHOD&&t.length){const[d,f]=o.resource.split("."),h=d==="ds"?"dataStore":((c=(u=(a=t.find(p=>p.name===d))==null?void 0:a.methods)==null?void 0:u.find(p=>p.name===f))==null?void 0:c.applyTo)||"dataClass";return{...o,type:o.type,subType:Tq(h)}}return o})}}),r},Mq=(e,t)=>Object.entries(e).map(([r,n])=>{const i=n.resources.map(o=>{var d,f,h,p,v,m;const[a,u]=o.resource.split(".");let c=!0;switch(o.type){case Z.EPermissionType.DATASTORE:c=!!t;break;case Z.ESubPermissionType.DS_METHOD:c=!!t.methods.find(y=>y.name===u&&y.applyTo==="dataStore");break;case Z.EPermissionType.DATACLASS:c=!!t.dataClasses[a];break;case Z.EPermissionType.ATTRIBUTE:c=!!((f=(d=t.dataClasses[a])==null?void 0:d.attributes)!=null&&f.find(y=>y.name===u));break;case Z.ESubPermissionType.ENTITY_SEL_METHOD:c=!!((h=t.dataClasses[a])!=null&&h.methods.find(y=>y.name===u&&y.applyTo==="entityCollection"));break;case Z.ESubPermissionType.DATACLASS_METHOD:c=!!((p=t.dataClasses[a])!=null&&p.methods.find(y=>y.name===u&&y.applyTo==="dataClass"));break;case Z.ESubPermissionType.ENTITY_METHOD:c=!!((v=t.dataClasses[a])!=null&&v.methods.find(y=>y.name===u&&y.applyTo==="entity"));break;case Z.EPermissionType.SINGLETON_METHOD:c=!!((m=t.singletons[a])!=null&&m.methods.find(y=>y.name===u));break;case Z.EPermissionType.SINGLETON:c=!!t.singletons[a];break;default:c=!0}return{...o,exists:c}});return{[r]:{...n,resources:i}}}).reduce((r,n)=>({...r,...n}),{}),Pm=({child:e,parent:t,status:r,onSelect:n,currentPrivilegeId:i})=>{const o=Z.useAppDispatch(),a=Z.useAppSelector(Z.selectPrivileges);function u(){const d=Z.addIn(t.id,e.id,a);o(Z.updatePrivileges(d))}function c(){const d=Z.removeFrom(t.id,e.id,a);o(Z.updatePrivileges(d))}return C.jsxs("div",{className:Ve("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":r==="included","bg-grey-300 text-grey-100":r!=="included","opacity-40":r==="disabled"}),children:[C.jsx("span",{onClick:()=>n(i),className:"text-xs hover:underline",children:e.privilege}),r==="included"?C.jsx("button",{onClick:c,children:C.jsx("span",{className:"text-[13px]",children:C.jsx(ye.FdPlus,{className:"rotate-45 transform text-white"})})}):C.jsx("button",{disabled:r==="disabled",onClick:u,className:"opacity-70 disabled:cursor-not-allowed",children:C.jsx("span",{className:"text-[13px]",children:C.jsx(ye.FdPlus,{className:"text-white"})})})]})},m9=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:i})=>{const o=Object.values(t),a=Z.getPrivilegeById(e.id,t);let u=a?Z.populateShallow(a.includes,t):[],c=a?Z.populateShallow(Z.parents(a.id,t),t):[],d=a?Z.populateShallow(Z.allowed(a.id,t),t):[];return[u,c,d]=[u,c,d].map(f=>f.filter(h=>(h==null?void 0:h.privilege)!=="guest")),o.length<2&&u.length+c.length+d.length===0?null:C.jsxs("div",{className:"w-full border-b border-grey-900 p-4",children:[C.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[" ",o.length>2?C.jsx("h4",{className:"text-[13px] font-semibold text-white",children:"Include a privilege"}):C.jsx("div",{}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx(De.ControlledSwitch,{onChange:()=>n(!i),value:i}),C.jsxs("label",{className:"text-xs text-[#F6F6F6]",children:[" ","Show inherited permissions"]})]})]}),C.jsxs("div",{className:"flex flex-wrap items-center space-x-1",children:[u.map(f=>C.jsx(Pm,{child:f,parent:e,status:"included",onSelect:r,currentPrivilegeId:f.id},f.id)),d.map(f=>C.jsx(Pm,{child:f,parent:e,status:"available",onSelect:r,currentPrivilegeId:f.id},f.id)),c.map(f=>C.jsx(Pm,{child:f,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:f.id},f.id))]})]})};function br(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Dq(e,t=[]){let r=[];function n(o,a){const u=ve.createContext(a),c=r.length;r=[...r,a];const d=h=>{var x;const{scope:p,children:v,...m}=h,y=((x=p==null?void 0:p[e])==null?void 0:x[c])||u,b=ve.useMemo(()=>m,Object.values(m));return C.jsx(y.Provider,{value:b,children:v})};d.displayName=o+"Provider";function f(h,p){var y;const v=((y=p==null?void 0:p[e])==null?void 0:y[c])||u,m=ve.useContext(v);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[d,f]}const i=()=>{const o=r.map(a=>ve.createContext(a));return function(u){const c=(u==null?void 0:u[e])||o;return ve.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return i.scopeName=e,[n,y9(i,...t)]}function y9(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=n.reduce((u,{useScope:c,scopeName:d})=>{const h=c(o)[`__scope${d}`];return{...u,...h}},{});return ve.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var mi=globalThis!=null&&globalThis.document?ve.useLayoutEffect:()=>{},b9=ve[" useInsertionEffect ".trim().toString()]||mi;function x9({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,a]=w9({defaultProp:t,onChange:r}),u=e!==void 0,c=u?e:i;{const f=ve.useRef(e!==void 0);ve.useEffect(()=>{const h=f.current;h!==u&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=u},[u,n])}const d=ve.useCallback(f=>{var h;if(u){const p=_9(f)?f(e):f;p!==e&&((h=a.current)==null||h.call(a,p))}else o(f)},[u,e,o,a]);return[c,d]}function w9({defaultProp:e,onChange:t}){const[r,n]=ve.useState(e),i=ve.useRef(r),o=ve.useRef(t);return b9(()=>{o.current=t},[t]),ve.useEffect(()=>{var a;i.current!==r&&((a=o.current)==null||a.call(o,r),i.current=r)},[r,i]),[r,n,o]}function _9(e){return typeof e=="function"}function DI(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jq(...e){return t=>{let r=!1;const n=e.map(i=>{const o=DI(i,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let i=0;i<n.length;i++){const o=n[i];typeof o=="function"?o():DI(e[i],null)}}}}function Eo(...e){return ve.useCallback(jq(...e),e)}const E9=["top","right","bottom","left"],$n=Math.min,ir=Math.max,rc=Math.round,bu=Math.floor,en=e=>({x:e,y:e}),S9={left:"right",right:"left",bottom:"top",top:"bottom"},O9={start:"end",end:"start"};function Fb(e,t,r){return ir(e,$n(t,r))}function xn(e,t){return typeof e=="function"?e(t):e}function wn(e){return e.split("-")[0]}function So(e){return e.split("-")[1]}function Mx(e){return e==="x"?"y":"x"}function Dx(e){return e==="y"?"height":"width"}const C9=new Set(["top","bottom"]);function Zr(e){return C9.has(wn(e))?"y":"x"}function jx(e){return Mx(Zr(e))}function R9(e,t,r){r===void 0&&(r=!1);const n=So(e),i=jx(e),o=Dx(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=nc(a)),[a,nc(a)]}function P9(e){const t=nc(e);return[$b(e),t,$b(t)]}function $b(e){return e.replace(/start|end/g,t=>O9[t])}const jI=["left","right"],qI=["right","left"],I9=["top","bottom"],N9=["bottom","top"];function T9(e,t,r){switch(e){case"top":case"bottom":return r?t?qI:jI:t?jI:qI;case"left":case"right":return t?I9:N9;default:return[]}}function A9(e,t,r,n){const i=So(e);let o=T9(wn(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map($b)))),o}function nc(e){return e.replace(/left|right|bottom|top/g,t=>S9[t])}function M9(e){return{top:0,right:0,bottom:0,left:0,...e}}function qq(e){return typeof e!="number"?M9(e):{top:e,right:e,bottom:e,left:e}}function ic(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function kI(e,t,r){let{reference:n,floating:i}=e;const o=Zr(t),a=jx(t),u=Dx(a),c=wn(t),d=o==="y",f=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,p=n[u]/2-i[u]/2;let v;switch(c){case"top":v={x:f,y:n.y-i.height};break;case"bottom":v={x:f,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:h};break;case"left":v={x:n.x-i.width,y:h};break;default:v={x:n.x,y:n.y}}switch(So(t)){case"start":v[a]-=p*(r&&d?-1:1);break;case"end":v[a]+=p*(r&&d?-1:1);break}return v}const D9=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=kI(d,n,c),p=n,v={},m=0;for(let y=0;y<u.length;y++){const{name:b,fn:x}=u[y],{x:w,y:S,data:E,reset:_}=await x({x:f,y:h,initialPlacement:n,placement:p,strategy:i,middlewareData:v,rects:d,platform:a,elements:{reference:e,floating:t}});f=w??f,h=S??h,v={...v,[b]:{...v[b],...E}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(d=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:f,y:h}=kI(d,p,c)),y=-1)}return{x:f,y:h,placement:p,strategy:i,middlewareData:v}};async function qa(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:o,rects:a,elements:u,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:p=!1,padding:v=0}=xn(t,e),m=qq(v),b=u[p?h==="floating"?"reference":"floating":h],x=ic(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(b)))==null||r?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:d,rootBoundary:f,strategy:c})),w=h==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),E=await(o.isElement==null?void 0:o.isElement(S))?await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1}:{x:1,y:1},_=ic(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:S,strategy:c}):w);return{top:(x.top-_.top+m.top)/E.y,bottom:(_.bottom-x.bottom+m.bottom)/E.y,left:(x.left-_.left+m.left)/E.x,right:(_.right-x.right+m.right)/E.x}}const j9=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:d,padding:f=0}=xn(e,t)||{};if(d==null)return{};const h=qq(f),p={x:r,y:n},v=jx(i),m=Dx(v),y=await a.getDimensions(d),b=v==="y",x=b?"top":"left",w=b?"bottom":"right",S=b?"clientHeight":"clientWidth",E=o.reference[m]+o.reference[v]-p[v]-o.floating[m],_=p[v]-o.reference[v],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let P=R?R[S]:0;(!P||!await(a.isElement==null?void 0:a.isElement(R)))&&(P=u.floating[S]||o.floating[m]);const N=E/2-_/2,j=P/2-y[m]/2-1,L=$n(h[x],j),F=$n(h[w],j),k=L,D=P-y[m]-F,T=P/2-y[m]/2+N,B=Fb(k,T,D),$=!c.arrow&&So(i)!=null&&T!==B&&o.reference[m]/2-(T<k?L:F)-y[m]/2<0,W=$?T<k?T-k:T-D:0;return{[v]:p[v]+W,data:{[v]:B,centerOffset:T-B-W,...$&&{alignmentOffset:W}},reset:$}}}),q9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...b}=xn(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const x=wn(i),w=Zr(u),S=wn(u)===u,E=await(c.isRTL==null?void 0:c.isRTL(d.floating)),_=p||(S||!y?[nc(u)]:P9(u)),R=m!=="none";!p&&R&&_.push(...A9(u,y,m,E));const P=[u,..._],N=await qa(t,b),j=[];let L=((n=o.flip)==null?void 0:n.overflows)||[];if(f&&j.push(N[x]),h){const T=R9(i,a,E);j.push(N[T[0]],N[T[1]])}if(L=[...L,{placement:i,overflows:j}],!j.every(T=>T<=0)){var F,k;const T=(((F=o.flip)==null?void 0:F.index)||0)+1,B=P[T];if(B&&(!(h==="alignment"?w!==Zr(B):!1)||L.every(Y=>Zr(Y.placement)===w?Y.overflows[0]>0:!0)))return{data:{index:T,overflows:L},reset:{placement:B}};let $=(k=L.filter(W=>W.overflows[0]<=0).sort((W,Y)=>W.overflows[1]-Y.overflows[1])[0])==null?void 0:k.placement;if(!$)switch(v){case"bestFit":{var D;const W=(D=L.filter(Y=>{if(R){const ee=Zr(Y.placement);return ee===w||ee==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(ee=>ee>0).reduce((ee,H)=>ee+H,0)]).sort((Y,ee)=>Y[1]-ee[1])[0])==null?void 0:D[0];W&&($=W);break}case"initialPlacement":$=u;break}if(i!==$)return{reset:{placement:$}}}return{}}}};function LI(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function BI(e){return E9.some(t=>e[t]>=0)}const k9=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=xn(e,t);switch(n){case"referenceHidden":{const o=await qa(t,{...i,elementContext:"reference"}),a=LI(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:BI(a)}}}case"escaped":{const o=await qa(t,{...i,altBoundary:!0}),a=LI(o,r.floating);return{data:{escapedOffsets:a,escaped:BI(a)}}}default:return{}}}}},kq=new Set(["left","top"]);async function L9(e,t){const{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=wn(r),u=So(r),c=Zr(r)==="y",d=kq.has(a)?-1:1,f=o&&c?-1:1,h=xn(t,e);let{mainAxis:p,crossAxis:v,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&typeof m=="number"&&(v=u==="end"?m*-1:m),c?{x:v*f,y:p*d}:{x:p*d,y:v*f}}const B9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:o,placement:a,middlewareData:u}=t,c=await L9(t,e);return a===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},F9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:b=>{let{x,y:w}=b;return{x,y:w}}},...c}=xn(e,t),d={x:r,y:n},f=await qa(t,c),h=Zr(wn(i)),p=Mx(h);let v=d[p],m=d[h];if(o){const b=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=v+f[b],S=v-f[x];v=Fb(w,v,S)}if(a){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",w=m+f[b],S=m-f[x];m=Fb(w,m,S)}const y=u.fn({...t,[p]:v,[h]:m});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[p]:o,[h]:a}}}}}},$9=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:c=!0,crossAxis:d=!0}=xn(e,t),f={x:r,y:n},h=Zr(i),p=Mx(h);let v=f[p],m=f[h];const y=xn(u,t),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const S=p==="y"?"height":"width",E=o.reference[p]-o.floating[S]+b.mainAxis,_=o.reference[p]+o.reference[S]-b.mainAxis;v<E?v=E:v>_&&(v=_)}if(d){var x,w;const S=p==="y"?"width":"height",E=kq.has(wn(i)),_=o.reference[h]-o.floating[S]+(E&&((x=a.offset)==null?void 0:x[h])||0)+(E?0:b.crossAxis),R=o.reference[h]+o.reference[S]+(E?0:((w=a.offset)==null?void 0:w[h])||0)-(E?b.crossAxis:0);m<_?m=_:m>R&&(m=R)}return{[p]:v,[h]:m}}}},z9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:o,platform:a,elements:u}=t,{apply:c=()=>{},...d}=xn(e,t),f=await qa(t,d),h=wn(i),p=So(i),v=Zr(i)==="y",{width:m,height:y}=o.floating;let b,x;h==="top"||h==="bottom"?(b=h,x=p===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(x=h,b=p==="end"?"top":"bottom");const w=y-f.top-f.bottom,S=m-f.left-f.right,E=$n(y-f[b],w),_=$n(m-f[x],S),R=!t.middlewareData.shift;let P=E,N=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=S),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=w),R&&!p){const L=ir(f.left,0),F=ir(f.right,0),k=ir(f.top,0),D=ir(f.bottom,0);v?N=m-2*(L!==0||F!==0?L+F:ir(f.left,f.right)):P=y-2*(k!==0||D!==0?k+D:ir(f.top,f.bottom))}await c({...t,availableWidth:N,availableHeight:P});const j=await a.getDimensions(u.floating);return m!==j.width||y!==j.height?{reset:{rects:!0}}:{}}}};function Vc(){return typeof window<"u"}function Oo(e){return Lq(e)?(e.nodeName||"").toLowerCase():"#document"}function or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function an(e){var t;return(t=(Lq(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lq(e){return Vc()?e instanceof Node||e instanceof or(e).Node:!1}function kr(e){return Vc()?e instanceof Element||e instanceof or(e).Element:!1}function rn(e){return Vc()?e instanceof HTMLElement||e instanceof or(e).HTMLElement:!1}function FI(e){return!Vc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof or(e).ShadowRoot}const H9=new Set(["inline","contents"]);function Ka(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!H9.has(i)}const U9=new Set(["table","td","th"]);function V9(e){return U9.has(Oo(e))}const W9=[":popover-open",":modal"];function Wc(e){return W9.some(t=>{try{return e.matches(t)}catch{return!1}})}const G9=["transform","translate","scale","rotate","perspective"],K9=["transform","translate","scale","rotate","perspective","filter"],Y9=["paint","layout","strict","content"];function qx(e){const t=kx(),r=kr(e)?Lr(e):e;return G9.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||K9.some(n=>(r.willChange||"").includes(n))||Y9.some(n=>(r.contain||"").includes(n))}function X9(e){let t=zn(e);for(;rn(t)&&!mo(t);){if(qx(t))return t;if(Wc(t))return null;t=zn(t)}return null}function kx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Z9=new Set(["html","body","#document"]);function mo(e){return Z9.has(Oo(e))}function Lr(e){return or(e).getComputedStyle(e)}function Gc(e){return kr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zn(e){if(Oo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||FI(e)&&e.host||an(e);return FI(t)?t.host:t}function Bq(e){const t=zn(e);return mo(t)?e.ownerDocument?e.ownerDocument.body:e.body:rn(t)&&Ka(t)?t:Bq(t)}function ka(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Bq(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=or(i);if(o){const u=zb(a);return t.concat(a,a.visualViewport||[],Ka(i)?i:[],u&&r?ka(u):[])}return t.concat(i,ka(i,[],r))}function zb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fq(e){const t=Lr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=rn(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,u=rc(r)!==o||rc(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function Lx(e){return kr(e)?e:e.contextElement}function oo(e){const t=Lx(e);if(!rn(t))return en(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=Fq(t);let a=(o?rc(r.width):r.width)/n,u=(o?rc(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const J9=en(0);function $q(e){const t=or(e);return!kx()||!t.visualViewport?J9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Q9(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==or(e)?!1:t}function yi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=Lx(e);let a=en(1);t&&(n?kr(n)&&(a=oo(n)):a=oo(e));const u=Q9(o,r,n)?$q(o):en(0);let c=(i.left+u.x)/a.x,d=(i.top+u.y)/a.y,f=i.width/a.x,h=i.height/a.y;if(o){const p=or(o),v=n&&kr(n)?or(n):n;let m=p,y=zb(m);for(;y&&n&&v!==m;){const b=oo(y),x=y.getBoundingClientRect(),w=Lr(y),S=x.left+(y.clientLeft+parseFloat(w.paddingLeft))*b.x,E=x.top+(y.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,d*=b.y,f*=b.x,h*=b.y,c+=S,d+=E,m=or(y),y=zb(m)}}return ic({width:f,height:h,x:c,y:d})}function Kc(e,t){const r=Gc(e).scrollLeft;return t?t.left+r:yi(an(e)).left+r}function zq(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Kc(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function e7(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o=i==="fixed",a=an(n),u=t?Wc(t.floating):!1;if(n===a||u&&o)return r;let c={scrollLeft:0,scrollTop:0},d=en(1);const f=en(0),h=rn(n);if((h||!h&&!o)&&((Oo(n)!=="body"||Ka(a))&&(c=Gc(n)),rn(n))){const v=yi(n);d=oo(n),f.x=v.x+n.clientLeft,f.y=v.y+n.clientTop}const p=a&&!h&&!o?zq(a,c):en(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+f.x+p.x,y:r.y*d.y-c.scrollTop*d.y+f.y+p.y}}function t7(e){return Array.from(e.getClientRects())}function r7(e){const t=an(e),r=Gc(e),n=e.ownerDocument.body,i=ir(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ir(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Kc(e);const u=-r.scrollTop;return Lr(n).direction==="rtl"&&(a+=ir(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}const $I=25;function n7(e,t){const r=or(e),n=an(e),i=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;const f=kx();(!f||f&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const d=Kc(n);if(d<=0){const f=n.ownerDocument,h=f.body,p=getComputedStyle(h),v=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(n.clientWidth-h.clientWidth-v);m<=$I&&(o-=m)}else d<=$I&&(o+=d);return{width:o,height:a,x:u,y:c}}const i7=new Set(["absolute","fixed"]);function o7(e,t){const r=yi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=rn(e)?oo(e):en(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,d=n*o.y;return{width:a,height:u,x:c,y:d}}function zI(e,t,r){let n;if(t==="viewport")n=n7(e,r);else if(t==="document")n=r7(an(e));else if(kr(t))n=o7(t,r);else{const i=$q(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ic(n)}function Hq(e,t){const r=zn(e);return r===t||!kr(r)||mo(r)?!1:Lr(r).position==="fixed"||Hq(r,t)}function a7(e,t){const r=t.get(e);if(r)return r;let n=ka(e,[],!1).filter(u=>kr(u)&&Oo(u)!=="body"),i=null;const o=Lr(e).position==="fixed";let a=o?zn(e):e;for(;kr(a)&&!mo(a);){const u=Lr(a),c=qx(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&i7.has(i.position)||Ka(a)&&!c&&Hq(e,a))?n=n.filter(f=>f!==a):i=u,a=zn(a)}return t.set(e,n),n}function s7(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const a=[...r==="clippingAncestors"?Wc(t)?[]:a7(t,this._c):[].concat(r),n],u=a[0],c=a.reduce((d,f)=>{const h=zI(t,f,i);return d.top=ir(h.top,d.top),d.right=$n(h.right,d.right),d.bottom=$n(h.bottom,d.bottom),d.left=ir(h.left,d.left),d},zI(t,u,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function u7(e){const{width:t,height:r}=Fq(e);return{width:t,height:r}}function c7(e,t,r){const n=rn(t),i=an(t),o=r==="fixed",a=yi(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=en(0);function d(){c.x=Kc(i)}if(n||!n&&!o)if((Oo(t)!=="body"||Ka(i))&&(u=Gc(t)),n){const v=yi(t,!0,o,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else i&&d();o&&!n&&i&&d();const f=i&&!n&&!o?zq(i,u):en(0),h=a.left+u.scrollLeft-c.x-f.x,p=a.top+u.scrollTop-c.y-f.y;return{x:h,y:p,width:a.width,height:a.height}}function Im(e){return Lr(e).position==="static"}function HI(e,t){if(!rn(e)||Lr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return an(e)===r&&(r=r.ownerDocument.body),r}function Uq(e,t){const r=or(e);if(Wc(e))return r;if(!rn(e)){let i=zn(e);for(;i&&!mo(i);){if(kr(i)&&!Im(i))return i;i=zn(i)}return r}let n=HI(e,t);for(;n&&V9(n)&&Im(n);)n=HI(n,t);return n&&mo(n)&&Im(n)&&!qx(n)?r:n||X9(e)||r}const l7=async function(e){const t=this.getOffsetParent||Uq,r=this.getDimensions,n=await r(e.floating);return{reference:c7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function f7(e){return Lr(e).direction==="rtl"}const d7={convertOffsetParentRelativeRectToViewportRelativeRect:e7,getDocumentElement:an,getClippingRect:s7,getOffsetParent:Uq,getElementRects:l7,getClientRects:t7,getDimensions:u7,getScale:oo,isElement:kr,isRTL:f7};function Vq(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function h7(e,t){let r=null,n;const i=an(e);function o(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function a(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),o();const d=e.getBoundingClientRect(),{left:f,top:h,width:p,height:v}=d;if(u||t(),!p||!v)return;const m=bu(h),y=bu(i.clientWidth-(f+p)),b=bu(i.clientHeight-(h+v)),x=bu(f),S={rootMargin:-m+"px "+-y+"px "+-b+"px "+-x+"px",threshold:ir(0,$n(1,c))||1};let E=!0;function _(R){const P=R[0].intersectionRatio;if(P!==c){if(!E)return a();P?a(!1,P):n=setTimeout(()=>{a(!1,1e-7)},1e3)}P===1&&!Vq(d,e.getBoundingClientRect())&&a(),E=!1}try{r=new IntersectionObserver(_,{...S,root:i.ownerDocument})}catch{r=new IntersectionObserver(_,S)}r.observe(e)}return a(!0),o}function p7(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=Lx(e),f=i||o?[...d?ka(d):[],...ka(t)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",r,{passive:!0}),o&&x.addEventListener("resize",r)});const h=d&&u?h7(d,r):null;let p=-1,v=null;a&&(v=new ResizeObserver(x=>{let[w]=x;w&&w.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=v)==null||S.observe(t)})),r()}),d&&!c&&v.observe(d),v.observe(t));let m,y=c?yi(e):null;c&&b();function b(){const x=yi(e);y&&!Vq(y,x)&&r(),y=x,m=requestAnimationFrame(b)}return r(),()=>{var x;f.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),h==null||h(),(x=v)==null||x.disconnect(),v=null,c&&cancelAnimationFrame(m)}}const v7=B9,g7=F9,m7=q9,y7=z9,b7=k9,UI=j9,x7=$9,w7=(e,t,r)=>{const n=new Map,i={platform:d7,...r},o={...i.platform,_c:n};return D9(e,t,{...i,platform:o})};var _7=typeof document<"u",E7=function(){},ku=_7?A.useLayoutEffect:E7;function oc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!oc(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const o=i[n];if(!(o==="_owner"&&e.$$typeof)&&!oc(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Wq(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function VI(e,t){const r=Wq(e);return Math.round(t*r)/r}function Nm(e){const t=ve.useRef(e);return ku(()=>{t.current=e}),t}function S7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:c,open:d}=e,[f,h]=ve.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,v]=ve.useState(n);oc(p,n)||v(n);const[m,y]=ve.useState(null),[b,x]=ve.useState(null),w=ve.useCallback(Y=>{Y!==R.current&&(R.current=Y,y(Y))},[]),S=ve.useCallback(Y=>{Y!==P.current&&(P.current=Y,x(Y))},[]),E=o||m,_=a||b,R=ve.useRef(null),P=ve.useRef(null),N=ve.useRef(f),j=c!=null,L=Nm(c),F=Nm(i),k=Nm(d),D=ve.useCallback(()=>{if(!R.current||!P.current)return;const Y={placement:t,strategy:r,middleware:p};F.current&&(Y.platform=F.current),w7(R.current,P.current,Y).then(ee=>{const H={...ee,isPositioned:k.current!==!1};T.current&&!oc(N.current,H)&&(N.current=H,Kb.flushSync(()=>{h(H)}))})},[p,t,r,F,k]);ku(()=>{d===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(Y=>({...Y,isPositioned:!1})))},[d]);const T=ve.useRef(!1);ku(()=>(T.current=!0,()=>{T.current=!1}),[]),ku(()=>{if(E&&(R.current=E),_&&(P.current=_),E&&_){if(L.current)return L.current(E,_,D);D()}},[E,_,D,L,j]);const B=ve.useMemo(()=>({reference:R,floating:P,setReference:w,setFloating:S}),[w,S]),$=ve.useMemo(()=>({reference:E,floating:_}),[E,_]),W=ve.useMemo(()=>{const Y={position:r,left:0,top:0};if(!$.floating)return Y;const ee=VI($.floating,f.x),H=VI($.floating,f.y);return u?{...Y,transform:"translate("+ee+"px, "+H+"px)",...Wq($.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ee,top:H}},[r,u,$.floating,f.x,f.y]);return ve.useMemo(()=>({...f,update:D,refs:B,elements:$,floatingStyles:W}),[f,D,B,$,W])}const O7=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?UI({element:n.current,padding:i}).fn(r):{}:n?UI({element:n,padding:i}).fn(r):{}}}},C7=(e,t)=>({...v7(e),options:[e,t]}),R7=(e,t)=>({...g7(e),options:[e,t]}),P7=(e,t)=>({...x7(e),options:[e,t]}),I7=(e,t)=>({...m7(e),options:[e,t]}),N7=(e,t)=>({...y7(e),options:[e,t]}),T7=(e,t)=>({...b7(e),options:[e,t]}),A7=(e,t)=>({...O7(e),options:[e,t]});function M7(e){const t=D7(e),r=ve.forwardRef((n,i)=>{const{children:o,...a}=n,u=ve.Children.toArray(o),c=u.find(q7);if(c){const d=c.props.children,f=u.map(h=>h===c?ve.Children.count(d)>1?ve.Children.only(null):ve.isValidElement(d)?d.props.children:null:h);return C.jsx(t,{...a,ref:i,children:ve.isValidElement(d)?ve.cloneElement(d,void 0,f):null})}return C.jsx(t,{...a,ref:i,children:o})});return r.displayName=`${e}.Slot`,r}function D7(e){const t=ve.forwardRef((r,n)=>{const{children:i,...o}=r;if(ve.isValidElement(i)){const a=L7(i),u=k7(o,i.props);return i.type!==ve.Fragment&&(u.ref=n?jq(n,a):a),ve.cloneElement(i,u)}return ve.Children.count(i)>1?ve.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var j7=Symbol("radix.slottable");function q7(e){return ve.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===j7}function k7(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...u)=>{const c=o(...u);return i(...u),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function L7(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var B7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Si=B7.reduce((e,t)=>{const r=M7(`Primitive.${t}`),n=ve.forwardRef((i,o)=>{const{asChild:a,...u}=i,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(c,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function F7(e,t){e&&Kb.flushSync(()=>e.dispatchEvent(t))}var $7="Arrow",Gq=ve.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...o}=e;return C.jsx(Si.svg,{...o,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});Gq.displayName=$7;var z7=Gq;function Yc(e){const t=ve.useRef(e);return ve.useEffect(()=>{t.current=e}),ve.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function H7(e){const[t,r]=ve.useState(void 0);return mi(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,u;if("borderBoxSize"in o){const c=o.borderBoxSize,d=Array.isArray(c)?c[0]:c;a=d.inlineSize,u=d.blockSize}else a=e.offsetWidth,u=e.offsetHeight;r({width:a,height:u})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Bx="Popper",[Kq,Yq]=Dq(Bx),[U7,Xq]=Kq(Bx),Zq=e=>{const{__scopePopper:t,children:r}=e,[n,i]=ve.useState(null);return C.jsx(U7,{scope:t,anchor:n,onAnchorChange:i,children:r})};Zq.displayName=Bx;var Jq="PopperAnchor",Qq=ve.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,o=Xq(Jq,r),a=ve.useRef(null),u=Eo(t,a),c=ve.useRef(null);return ve.useEffect(()=>{const d=c.current;c.current=(n==null?void 0:n.current)||a.current,d!==c.current&&o.onAnchorChange(c.current)}),n?null:C.jsx(Si.div,{...i,ref:u})});Qq.displayName=Jq;var Fx="PopperContent",[V7,W7]=Kq(Fx),e2=ve.forwardRef((e,t)=>{var V,K,ie,ne,ue,de;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:v="optimized",onPlaced:m,...y}=e,b=Xq(Fx,r),[x,w]=ve.useState(null),S=Eo(t,we=>w(we)),[E,_]=ve.useState(null),R=H7(E),P=(R==null?void 0:R.width)??0,N=(R==null?void 0:R.height)??0,j=n+(o!=="center"?"-"+o:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},F=Array.isArray(d)?d:[d],k=F.length>0,D={padding:L,boundary:F.filter(K7),altBoundary:k},{refs:T,floatingStyles:B,placement:$,isPositioned:W,middlewareData:Y}=S7({strategy:"fixed",placement:j,whileElementsMounted:(...we)=>p7(...we,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[C7({mainAxis:i+N,alignmentAxis:a}),c&&R7({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?P7():void 0,...D}),c&&I7({...D}),N7({...D,apply:({elements:we,rects:Se,availableWidth:_e,availableHeight:he})=>{const{width:ae,height:Oe}=Se.reference,Ne=we.floating.style;Ne.setProperty("--radix-popper-available-width",`${_e}px`),Ne.setProperty("--radix-popper-available-height",`${he}px`),Ne.setProperty("--radix-popper-anchor-width",`${ae}px`),Ne.setProperty("--radix-popper-anchor-height",`${Oe}px`)}}),E&&A7({element:E,padding:u}),Y7({arrowWidth:P,arrowHeight:N}),p&&T7({strategy:"referenceHidden",...D})]}),[ee,H]=n2($),Q=Yc(m);mi(()=>{W&&(Q==null||Q())},[W,Q]);const ce=(V=Y.arrow)==null?void 0:V.x,se=(K=Y.arrow)==null?void 0:K.y,z=((ie=Y.arrow)==null?void 0:ie.centerOffset)!==0,[G,J]=ve.useState();return mi(()=>{x&&J(window.getComputedStyle(x).zIndex)},[x]),C.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:W?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(ne=Y.transformOrigin)==null?void 0:ne.x,(ue=Y.transformOrigin)==null?void 0:ue.y].join(" "),...((de=Y.hide)==null?void 0:de.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(V7,{scope:r,placedSide:ee,onArrowChange:_,arrowX:ce,arrowY:se,shouldHideArrow:z,children:C.jsx(Si.div,{"data-side":ee,"data-align":H,...y,ref:S,style:{...y.style,animation:W?void 0:"none"}})})})});e2.displayName=Fx;var t2="PopperArrow",G7={top:"bottom",right:"left",bottom:"top",left:"right"},r2=ve.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,o=W7(t2,n),a=G7[o.placedSide];return C.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:C.jsx(z7,{...i,ref:r,style:{...i.style,display:"block"}})})});r2.displayName=t2;function K7(e){return e!==null}var Y7=e=>({name:"transformOrigin",options:e,fn(t){var b,x,w;const{placement:r,rects:n,middlewareData:i}=t,a=((b=i.arrow)==null?void 0:b.centerOffset)!==0,u=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[d,f]=n2(r),h={start:"0%",center:"50%",end:"100%"}[f],p=(((x=i.arrow)==null?void 0:x.x)??0)+u/2,v=(((w=i.arrow)==null?void 0:w.y)??0)+c/2;let m="",y="";return d==="bottom"?(m=a?h:`${p}px`,y=`${-c}px`):d==="top"?(m=a?h:`${p}px`,y=`${n.floating.height+c}px`):d==="right"?(m=`${-c}px`,y=a?h:`${v}px`):d==="left"&&(m=`${n.floating.width+c}px`,y=a?h:`${v}px`),{data:{x:m,y}}}});function n2(e){const[t,r="center"]=e.split("-");return[t,r]}var X7=Zq,Z7=Qq,J7=e2,Q7=r2,eX="Portal",i2=ve.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=ve.useState(!1);mi(()=>o(!0),[]);const a=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?oD.createPortal(C.jsx(Si.div,{...n,ref:t}),a):null});i2.displayName=eX;function tX(e,t){return ve.useReducer((r,n)=>t[r][n]??r,e)}var $x=e=>{const{present:t,children:r}=e,n=rX(t),i=typeof r=="function"?r({present:n.isPresent}):ve.Children.only(r),o=Eo(n.ref,nX(i));return typeof r=="function"||n.isPresent?ve.cloneElement(i,{ref:o}):null};$x.displayName="Presence";function rX(e){const[t,r]=ve.useState(),n=ve.useRef(null),i=ve.useRef(e),o=ve.useRef("none"),a=e?"mounted":"unmounted",[u,c]=tX(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ve.useEffect(()=>{const d=xu(n.current);o.current=u==="mounted"?d:"none"},[u]),mi(()=>{const d=n.current,f=i.current;if(f!==e){const p=o.current,v=xu(d);e?c("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(f&&p!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),mi(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=v=>{const y=xu(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&y&&(c("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=v=>{v.target===t&&(o.current=xu(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:ve.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function xu(e){return(e==null?void 0:e.animationName)||"none"}function nX(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function iX(e,t=globalThis==null?void 0:globalThis.document){const r=Yc(e);ve.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var oX="DismissableLayer",Hb="dismissableLayer.update",aX="dismissableLayer.pointerDownOutside",sX="dismissableLayer.focusOutside",WI,o2=ve.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),a2=ve.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...c}=e,d=ve.useContext(o2),[f,h]=ve.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=ve.useState({}),m=Eo(t,P=>h(P)),y=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(b),w=f?y.indexOf(f):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,E=w>=x,_=lX(P=>{const N=P.target,j=[...d.branches].some(L=>L.contains(N));!E||j||(i==null||i(P),a==null||a(P),P.defaultPrevented||u==null||u())},p),R=fX(P=>{const N=P.target;[...d.branches].some(L=>L.contains(N))||(o==null||o(P),a==null||a(P),P.defaultPrevented||u==null||u())},p);return iX(P=>{w===d.layers.size-1&&(n==null||n(P),!P.defaultPrevented&&u&&(P.preventDefault(),u()))},p),ve.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(WI=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),GI(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=WI)}},[f,p,r,d]),ve.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),GI())},[f,d]),ve.useEffect(()=>{const P=()=>v({});return document.addEventListener(Hb,P),()=>document.removeEventListener(Hb,P)},[]),C.jsx(Si.div,{...c,ref:m,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:br(e.onFocusCapture,R.onFocusCapture),onBlurCapture:br(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:br(e.onPointerDownCapture,_.onPointerDownCapture)})});a2.displayName=oX;var uX="DismissableLayerBranch",cX=ve.forwardRef((e,t)=>{const r=ve.useContext(o2),n=ve.useRef(null),i=Eo(t,n);return ve.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),C.jsx(Si.div,{...e,ref:i})});cX.displayName=uX;function lX(e,t=globalThis==null?void 0:globalThis.document){const r=Yc(e),n=ve.useRef(!1),i=ve.useRef(()=>{});return ve.useEffect(()=>{const o=u=>{if(u.target&&!n.current){let c=function(){s2(aX,r,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function fX(e,t=globalThis==null?void 0:globalThis.document){const r=Yc(e),n=ve.useRef(!1);return ve.useEffect(()=>{const i=o=>{o.target&&!n.current&&s2(sX,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function GI(){const e=new CustomEvent(Hb);document.dispatchEvent(e)}function s2(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?F7(i,o):i.dispatchEvent(o)}var Tm,Xc="HoverCard",[u2]=Dq(Xc,[Yq]),Zc=Yq(),[dX,Jc]=u2(Xc),c2=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:i,onOpenChange:o,openDelay:a=700,closeDelay:u=300}=e,c=Zc(t),d=ve.useRef(0),f=ve.useRef(0),h=ve.useRef(!1),p=ve.useRef(!1),[v,m]=x9({prop:n,defaultProp:i??!1,onChange:o,caller:Xc}),y=ve.useCallback(()=>{clearTimeout(f.current),d.current=window.setTimeout(()=>m(!0),a)},[a,m]),b=ve.useCallback(()=>{clearTimeout(d.current),!h.current&&!p.current&&(f.current=window.setTimeout(()=>m(!1),u))},[u,m]),x=ve.useCallback(()=>m(!1),[m]);return ve.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(f.current)},[]),C.jsx(dX,{scope:t,open:v,onOpenChange:m,onOpen:y,onClose:b,onDismiss:x,hasSelectionRef:h,isPointerDownOnContentRef:p,children:C.jsx(X7,{...c,children:r})})};c2.displayName=Xc;var l2="HoverCardTrigger",f2=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Jc(l2,r),o=Zc(r);return C.jsx(Z7,{asChild:!0,...o,children:C.jsx(Si.a,{"data-state":i.open?"open":"closed",...n,ref:t,onPointerEnter:br(e.onPointerEnter,sc(i.onOpen)),onPointerLeave:br(e.onPointerLeave,sc(i.onClose)),onFocus:br(e.onFocus,i.onOpen),onBlur:br(e.onBlur,i.onClose),onTouchStart:br(e.onTouchStart,a=>a.preventDefault())})})});f2.displayName=l2;var zx="HoverCardPortal",[hX,pX]=u2(zx,{forceMount:void 0}),d2=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:i}=e,o=Jc(zx,t);return C.jsx(hX,{scope:t,forceMount:r,children:C.jsx($x,{present:r||o.open,children:C.jsx(i2,{asChild:!0,container:i,children:n})})})};d2.displayName=zx;var ac="HoverCardContent",h2=ve.forwardRef((e,t)=>{const r=pX(ac,e.__scopeHoverCard),{forceMount:n=r.forceMount,...i}=e,o=Jc(ac,e.__scopeHoverCard);return C.jsx($x,{present:n||o.open,children:C.jsx(vX,{"data-state":o.open?"open":"closed",...i,onPointerEnter:br(e.onPointerEnter,sc(o.onOpen)),onPointerLeave:br(e.onPointerLeave,sc(o.onClose)),ref:t})})});h2.displayName=ac;var vX=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,...u}=e,c=Jc(ac,r),d=Zc(r),f=ve.useRef(null),h=Eo(t,f),[p,v]=ve.useState(!1);return ve.useEffect(()=>{if(p){const m=document.body;return Tm=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=Tm,m.style.webkitUserSelect=Tm}}},[p]),ve.useEffect(()=>{if(f.current){const m=()=>{v(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var b;((b=document.getSelection())==null?void 0:b.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",m),()=>{document.removeEventListener("pointerup",m),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),ve.useEffect(()=>{f.current&&yX(f.current).forEach(y=>y.setAttribute("tabindex","-1"))}),C.jsx(a2,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:br(o,m=>{m.preventDefault()}),onDismiss:c.onDismiss,children:C.jsx(J7,{...d,...u,onPointerDown:br(u.onPointerDown,m=>{m.currentTarget.contains(m.target)&&v(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:h,style:{...u.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),gX="HoverCardArrow",mX=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Zc(r);return C.jsx(Q7,{...i,...n,ref:t})});mX.displayName=gX;function sc(e){return t=>t.pointerType==="touch"?void 0:e()}function yX(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}var Hx=c2,Ux=f2,Dr=d2,jr=h2;const bX=({item:e,depth:t})=>{const[r,n]=A.useState(!1),i=Z.useAppSelector(Z.selectPrivileges),o=Z.populateShallow(e.includes,i);return C.jsxs("div",{className:"py-1 text-xs text-white",children:[C.jsxs("div",{className:"flex items-center",children:[C.jsx("button",{className:"-ml-1",onClick:a=>{a.stopPropagation(),n(!r)},children:C.jsx(ye.FdRight,{className:Ve("h-4 w-4",{"tranform rotate-90":r})})})," ",C.jsx("div",{children:e.privilege})]}),C.jsx("div",{className:"border-l pl-2",style:{marginLeft:t?t*4:3},children:r&&C.jsx(p2,{depth:t+1,data:o})})]})},p2=({data:e,depth:t=0})=>e.map(r=>r.includes.length?C.jsx(bX,{item:r,depth:t},r.id):C.jsx("div",{className:Ve("py-1 text-xs text-white",{}),children:r.privilege},r.id)),KI=Hx,YI=Ux,XI=({privilege:e,selectedPrivilege:t,onSelect:r,isGuest:n=!1})=>{const i=Z.useAppDispatch(),o=Z.useAppSelector(Z.selectPrivileges),a=Z.populateShallow(e.includes,o),[u,c]=A.useState(!1),[d,f]=A.useState(e.privilege),[h,p]=A.useState(null),v=De.useOutsideClick(()=>{u&&b()});function m(){c(!0)}function y(){c(!1),f(e.privilege)}function b(){p(null);try{const S=Z.rename(d,e.id,o);i(Z.updatePrivileges(S)),c(!1)}catch(S){p(S.message)}}const x=async S=>{S.stopPropagation();const{confirmed:E}=await i(Z.openModal({title:"Delete Privilege",type:De.ModalType.CONFIRM,color:De.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"})).unwrap();if(E){const _=Z.remove(e.id,o);i(Z.updatePrivileges(_)),r(null)}},w=A.useMemo(()=>e.resources.some(S=>S.exists===!1),[e]);return C.jsxs(KI,{openDelay:0,closeDelay:0,children:[C.jsx(YI,{asChild:!0,children:C.jsxs("div",{className:Ve("rounded border bg-grey-300 p-2",{"border-grey-100":(t==null?void 0:t.id)!==e.id,"border-primary-dark":(t==null?void 0:t.id)===e.id,"border-red-400":w&&(t==null?void 0:t.id)!==e.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{r(e)},ref:v,children:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsxs("div",{className:"flex flex-1 items-center text-white",children:[C.jsx("span",{className:"mr-4",children:n?C.jsx(ye.FdGuest,{className:"h-6 w-6"}):C.jsx(ye.FdGroup,{className:"h-6 w-6"})}),u?C.jsxs("div",{className:"relative h-6 flex-1",children:[C.jsx("input",{autoFocus:!0,onKeyDown:S=>{S.key==="Enter"&&b(),S.key==="Escape"&&y()},type:"text",className:Ve("absolute inset-0 mr-2 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:border-primary-dark focus:outline-none",{"border-b border-red-400":h}),value:d,onChange:S=>f(S.target.value)}),h&&C.jsx("p",{className:"absolute top-5 mt-1 rounded bg-red-400 p-1 text-xs text-white shadow-md",children:h})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:d})]}),n?C.jsx("div",{className:"flex items-center justify-center",children:C.jsxs(KI,{openDelay:0,closeDelay:0,children:[C.jsx(YI,{asChild:!0,children:C.jsx("span",{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-grey-50"})})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"the guest privilege must be used to indicate resources accessible without any permission required (e.g. an authenticate function)"})]})})})})]})}):C.jsx("div",{className:"flex items-center space-x-2",children:u?C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:y,children:C.jsx("span",{children:C.jsx(ye.FdClose,{className:"h-4 w-4 text-grey-50"})})}),C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:b,children:C.jsx("span",{children:C.jsx(ye.FdCheckCircle,{className:"h-4 w-4 text-grey-50"})})})]}):C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:m,children:C.jsx("span",{children:C.jsx(ye.FdPen,{className:"h-4 w-4 text-grey-50"})})}),C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:x,children:C.jsx("span",{children:C.jsx(ye.FdTrash,{className:"h-4 w-4 text-grey-50"})})})]})})]}),a.length?C.jsx("div",{className:"ml-[43px]",children:C.jsx(p2,{data:a})}):null]})}),C.jsx(Dr,{children:C.jsxs(jr,{hidden:!w,style:{zIndex:50},avoidCollisions:!0,side:"top",className:"text-red-500 mb-1 flex max-w-xs items-center gap-x-1 rounded bg-negative-200 px-2 py-2 text-s font-semibold",children:[C.jsx(ye.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"This privilege uses non-existing resources"})]})})]})},xX=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=Z.useAppSelector(Z.selectGuestPrivilege),i=Z.useAppSelector(Z.selectCatalog),o=A.useMemo(()=>{if(i===null||!n)return n;const a=Aq({guest:n},Object.values((i==null?void 0:i.dataClasses)??{}));return Mq(a,i).guest},[e,i]);return C.jsxs("div",{className:"flex flex-1 flex-col gap-y-4 overflow-auto p-4 pb-10 pt-1",children:[o?C.jsx(XI,{privilege:o,onSelect:t,selectedPrivilege:r,isGuest:!0}):null,Object.entries(e).length?Object.entries(e).filter(([,a])=>a.privilege!=="guest").map(([a,u])=>C.jsx(XI,{privilege:u,onSelect:t,selectedPrivilege:r},a)):C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsx("div",{className:"flex flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"font-semibold",children:"There are no privileges"}),C.jsxs("div",{className:"flex items-center text-sm",children:["Create a new Privilege by clicking on the"," ",C.jsx(ye.FdPlus,{className:"ml-2 inline h-4 w-4 text-white"})]})]})})})]})};var wu={exports:{}},_u={exports:{}},Ke={};/** @license React v16.13.1
8
8
  * react-is.production.min.js
9
9
  *
10
10
  * Copyright (c) Facebook, Inc. and its affiliates.
11
11
  *
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
- */var XI;function wX(){if(XI)return Ke;XI=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function S(_){if(typeof _=="object"&&_!==null){var R=_.$$typeof;switch(R){case t:switch(_=_.type,_){case c:case d:case n:case o:case i:case h:return _;default:switch(_=_&&_.$$typeof,_){case u:case f:case m:case v:case a:return _;default:return R}}case r:return R}}}function E(_){return S(_)===d}return Ke.AsyncMode=c,Ke.ConcurrentMode=d,Ke.ContextConsumer=u,Ke.ContextProvider=a,Ke.Element=t,Ke.ForwardRef=f,Ke.Fragment=n,Ke.Lazy=m,Ke.Memo=v,Ke.Portal=r,Ke.Profiler=o,Ke.StrictMode=i,Ke.Suspense=h,Ke.isAsyncMode=function(_){return E(_)||S(_)===c},Ke.isConcurrentMode=E,Ke.isContextConsumer=function(_){return S(_)===u},Ke.isContextProvider=function(_){return S(_)===a},Ke.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},Ke.isForwardRef=function(_){return S(_)===f},Ke.isFragment=function(_){return S(_)===n},Ke.isLazy=function(_){return S(_)===m},Ke.isMemo=function(_){return S(_)===v},Ke.isPortal=function(_){return S(_)===r},Ke.isProfiler=function(_){return S(_)===o},Ke.isStrictMode=function(_){return S(_)===i},Ke.isSuspense=function(_){return S(_)===h},Ke.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===d||_===o||_===i||_===h||_===p||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===v||_.$$typeof===a||_.$$typeof===u||_.$$typeof===f||_.$$typeof===b||_.$$typeof===x||_.$$typeof===w||_.$$typeof===y)},Ke.typeOf=S,Ke}var Ye={};/** @license React v16.13.1
14
+ */var ZI;function wX(){if(ZI)return Ke;ZI=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function S(_){if(typeof _=="object"&&_!==null){var R=_.$$typeof;switch(R){case t:switch(_=_.type,_){case c:case d:case n:case o:case i:case h:return _;default:switch(_=_&&_.$$typeof,_){case u:case f:case m:case v:case a:return _;default:return R}}case r:return R}}}function E(_){return S(_)===d}return Ke.AsyncMode=c,Ke.ConcurrentMode=d,Ke.ContextConsumer=u,Ke.ContextProvider=a,Ke.Element=t,Ke.ForwardRef=f,Ke.Fragment=n,Ke.Lazy=m,Ke.Memo=v,Ke.Portal=r,Ke.Profiler=o,Ke.StrictMode=i,Ke.Suspense=h,Ke.isAsyncMode=function(_){return E(_)||S(_)===c},Ke.isConcurrentMode=E,Ke.isContextConsumer=function(_){return S(_)===u},Ke.isContextProvider=function(_){return S(_)===a},Ke.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},Ke.isForwardRef=function(_){return S(_)===f},Ke.isFragment=function(_){return S(_)===n},Ke.isLazy=function(_){return S(_)===m},Ke.isMemo=function(_){return S(_)===v},Ke.isPortal=function(_){return S(_)===r},Ke.isProfiler=function(_){return S(_)===o},Ke.isStrictMode=function(_){return S(_)===i},Ke.isSuspense=function(_){return S(_)===h},Ke.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===d||_===o||_===i||_===h||_===p||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===v||_.$$typeof===a||_.$$typeof===u||_.$$typeof===f||_.$$typeof===b||_.$$typeof===x||_.$$typeof===w||_.$$typeof===y)},Ke.typeOf=S,Ke}var Ye={};/** @license React v16.13.1
15
15
  * react-is.development.js
16
16
  *
17
17
  * Copyright (c) Facebook, Inc. and its affiliates.
18
18
  *
19
19
  * This source code is licensed under the MIT license found in the
20
20
  * LICENSE file in the root directory of this source tree.
21
- */var ZI;function _X(){return ZI||(ZI=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function S(de){return typeof de=="string"||typeof de=="function"||de===n||de===d||de===o||de===i||de===h||de===p||typeof de=="object"&&de!==null&&(de.$$typeof===m||de.$$typeof===v||de.$$typeof===a||de.$$typeof===u||de.$$typeof===f||de.$$typeof===b||de.$$typeof===x||de.$$typeof===w||de.$$typeof===y)}function E(de){if(typeof de=="object"&&de!==null){var we=de.$$typeof;switch(we){case t:var Se=de.type;switch(Se){case c:case d:case n:case o:case i:case h:return Se;default:var _e=Se&&Se.$$typeof;switch(_e){case u:case f:case m:case v:case a:return _e;default:return we}}case r:return we}}}var _=c,R=d,P=u,N=a,j=t,L=f,F=n,k=m,D=v,T=r,B=o,$=i,W=h,Y=!1;function ee(de){return Y||(Y=!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.")),H(de)||E(de)===c}function H(de){return E(de)===d}function Q(de){return E(de)===u}function ce(de){return E(de)===a}function se(de){return typeof de=="object"&&de!==null&&de.$$typeof===t}function z(de){return E(de)===f}function G(de){return E(de)===n}function J(de){return E(de)===m}function V(de){return E(de)===v}function K(de){return E(de)===r}function ie(de){return E(de)===o}function ne(de){return E(de)===i}function ue(de){return E(de)===h}Ye.AsyncMode=_,Ye.ConcurrentMode=R,Ye.ContextConsumer=P,Ye.ContextProvider=N,Ye.Element=j,Ye.ForwardRef=L,Ye.Fragment=F,Ye.Lazy=k,Ye.Memo=D,Ye.Portal=T,Ye.Profiler=B,Ye.StrictMode=$,Ye.Suspense=W,Ye.isAsyncMode=ee,Ye.isConcurrentMode=H,Ye.isContextConsumer=Q,Ye.isContextProvider=ce,Ye.isElement=se,Ye.isForwardRef=z,Ye.isFragment=G,Ye.isLazy=J,Ye.isMemo=V,Ye.isPortal=K,Ye.isProfiler=ie,Ye.isStrictMode=ne,Ye.isSuspense=ue,Ye.isValidElementType=S,Ye.typeOf=E})()),Ye}var JI;function v2(){return JI||(JI=1,process.env.NODE_ENV==="production"?_u.exports=wX():_u.exports=_X()),_u.exports}/*
21
+ */var JI;function _X(){return JI||(JI=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function S(de){return typeof de=="string"||typeof de=="function"||de===n||de===d||de===o||de===i||de===h||de===p||typeof de=="object"&&de!==null&&(de.$$typeof===m||de.$$typeof===v||de.$$typeof===a||de.$$typeof===u||de.$$typeof===f||de.$$typeof===b||de.$$typeof===x||de.$$typeof===w||de.$$typeof===y)}function E(de){if(typeof de=="object"&&de!==null){var we=de.$$typeof;switch(we){case t:var Se=de.type;switch(Se){case c:case d:case n:case o:case i:case h:return Se;default:var _e=Se&&Se.$$typeof;switch(_e){case u:case f:case m:case v:case a:return _e;default:return we}}case r:return we}}}var _=c,R=d,P=u,N=a,j=t,L=f,F=n,k=m,D=v,T=r,B=o,$=i,W=h,Y=!1;function ee(de){return Y||(Y=!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.")),H(de)||E(de)===c}function H(de){return E(de)===d}function Q(de){return E(de)===u}function ce(de){return E(de)===a}function se(de){return typeof de=="object"&&de!==null&&de.$$typeof===t}function z(de){return E(de)===f}function G(de){return E(de)===n}function J(de){return E(de)===m}function V(de){return E(de)===v}function K(de){return E(de)===r}function ie(de){return E(de)===o}function ne(de){return E(de)===i}function ue(de){return E(de)===h}Ye.AsyncMode=_,Ye.ConcurrentMode=R,Ye.ContextConsumer=P,Ye.ContextProvider=N,Ye.Element=j,Ye.ForwardRef=L,Ye.Fragment=F,Ye.Lazy=k,Ye.Memo=D,Ye.Portal=T,Ye.Profiler=B,Ye.StrictMode=$,Ye.Suspense=W,Ye.isAsyncMode=ee,Ye.isConcurrentMode=H,Ye.isContextConsumer=Q,Ye.isContextProvider=ce,Ye.isElement=se,Ye.isForwardRef=z,Ye.isFragment=G,Ye.isLazy=J,Ye.isMemo=V,Ye.isPortal=K,Ye.isProfiler=ie,Ye.isStrictMode=ne,Ye.isSuspense=ue,Ye.isValidElementType=S,Ye.typeOf=E})()),Ye}var QI;function v2(){return QI||(QI=1,process.env.NODE_ENV==="production"?_u.exports=wX():_u.exports=_X()),_u.exports}/*
22
22
  object-assign
23
23
  (c) Sindre Sorhus
24
24
  @license MIT
25
- */var Tm,QI;function EX(){if(QI)return Tm;QI=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},u=0;u<10;u++)a["_"+String.fromCharCode(u)]=u;var c=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Tm=i()?Object.assign:function(o,a){for(var u,c=n(o),d,f=1;f<arguments.length;f++){u=Object(arguments[f]);for(var h in u)t.call(u,h)&&(c[h]=u[h]);if(e){d=e(u);for(var p=0;p<d.length;p++)r.call(u,d[p])&&(c[d[p]]=u[d[p]])}}return c},Tm}var Am,eN;function Ux(){if(eN)return Am;eN=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Am=e,Am}var Mm,tN;function g2(){return tN||(tN=1,Mm=Function.call.bind(Object.prototype.hasOwnProperty)),Mm}var Dm,rN;function SX(){if(rN)return Dm;rN=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ux(),r={},n=g2();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,u,c,d){if(process.env.NODE_ENV!=="production"){for(var f in o)if(n(o,f)){var h;try{if(typeof o[f]!="function"){var p=Error((c||"React class")+": "+u+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=o[f](a,f,c,u,null,t)}catch(m){h=m}if(h&&!(h instanceof Error)&&e((c||"React class")+": type specification of "+u+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var v=d?d():"";e("Failed "+u+" type: "+h.message+(v??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Dm=i,Dm}var jm,nN;function OX(){if(nN)return jm;nN=1;var e=v2(),t=EX(),r=Ux(),n=g2(),i=SX(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(u){var c="Warning: "+u;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return jm=function(u,c){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(H){var Q=H&&(d&&H[d]||H[f]);if(typeof Q=="function")return Q}var p="<<anonymous>>",v={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:w(),arrayOf:S,element:E(),elementType:_(),instanceOf:R,node:L(),objectOf:N,oneOf:P,oneOfType:j,shape:k,exact:D};function m(H,Q){return H===Q?H!==0||1/H===1/Q:H!==H&&Q!==Q}function y(H,Q){this.message=H,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}y.prototype=Error.prototype;function b(H){if(process.env.NODE_ENV!=="production")var Q={},ce=0;function se(G,J,V,K,ie,ne,ue){if(K=K||p,ne=ne||V,ue!==r){if(c){var de=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 de.name="Invariant Violation",de}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var we=K+":"+V;!Q[we]&&ce<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+K+"`. 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."),Q[we]=!0,ce++)}}return J[V]==null?G?J[V]===null?new y("The "+ie+" `"+ne+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new y("The "+ie+" `"+ne+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:H(J,V,K,ie,ne)}var z=se.bind(null,!1);return z.isRequired=se.bind(null,!0),z}function x(H){function Q(ce,se,z,G,J,V){var K=ce[se],ie=$(K);if(ie!==H){var ne=W(K);return new y("Invalid "+G+" `"+J+"` of type "+("`"+ne+"` supplied to `"+z+"`, expected ")+("`"+H+"`."),{expectedType:H})}return null}return b(Q)}function w(){return b(a)}function S(H){function Q(ce,se,z,G,J){if(typeof H!="function")return new y("Property `"+J+"` of component `"+z+"` has invalid PropType notation inside arrayOf.");var V=ce[se];if(!Array.isArray(V)){var K=$(V);return new y("Invalid "+G+" `"+J+"` of type "+("`"+K+"` supplied to `"+z+"`, expected an array."))}for(var ie=0;ie<V.length;ie++){var ne=H(V,ie,z,G,J+"["+ie+"]",r);if(ne instanceof Error)return ne}return null}return b(Q)}function E(){function H(Q,ce,se,z,G){var J=Q[ce];if(!u(J)){var V=$(J);return new y("Invalid "+z+" `"+G+"` of type "+("`"+V+"` supplied to `"+se+"`, expected a single ReactElement."))}return null}return b(H)}function _(){function H(Q,ce,se,z,G){var J=Q[ce];if(!e.isValidElementType(J)){var V=$(J);return new y("Invalid "+z+" `"+G+"` of type "+("`"+V+"` supplied to `"+se+"`, expected a single ReactElement type."))}return null}return b(H)}function R(H){function Q(ce,se,z,G,J){if(!(ce[se]instanceof H)){var V=H.name||p,K=ee(ce[se]);return new y("Invalid "+G+" `"+J+"` of type "+("`"+K+"` supplied to `"+z+"`, expected ")+("instance of `"+V+"`."))}return null}return b(Q)}function P(H){if(!Array.isArray(H))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("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])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function Q(ce,se,z,G,J){for(var V=ce[se],K=0;K<H.length;K++)if(m(V,H[K]))return null;var ie=JSON.stringify(H,function(ue,de){var we=W(de);return we==="symbol"?String(de):de});return new y("Invalid "+G+" `"+J+"` of value `"+String(V)+"` "+("supplied to `"+z+"`, expected one of "+ie+"."))}return b(Q)}function N(H){function Q(ce,se,z,G,J){if(typeof H!="function")return new y("Property `"+J+"` of component `"+z+"` has invalid PropType notation inside objectOf.");var V=ce[se],K=$(V);if(K!=="object")return new y("Invalid "+G+" `"+J+"` of type "+("`"+K+"` supplied to `"+z+"`, expected an object."));for(var ie in V)if(n(V,ie)){var ne=H(V,ie,z,G,J+"."+ie,r);if(ne instanceof Error)return ne}return null}return b(Q)}function j(H){if(!Array.isArray(H))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var Q=0;Q<H.length;Q++){var ce=H[Q];if(typeof ce!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Y(ce)+" at index "+Q+"."),a}function se(z,G,J,V,K){for(var ie=[],ne=0;ne<H.length;ne++){var ue=H[ne],de=ue(z,G,J,V,K,r);if(de==null)return null;de.data&&n(de.data,"expectedType")&&ie.push(de.data.expectedType)}var we=ie.length>0?", expected one of type ["+ie.join(", ")+"]":"";return new y("Invalid "+V+" `"+K+"` supplied to "+("`"+J+"`"+we+"."))}return b(se)}function L(){function H(Q,ce,se,z,G){return T(Q[ce])?null:new y("Invalid "+z+" `"+G+"` supplied to "+("`"+se+"`, expected a ReactNode."))}return b(H)}function F(H,Q,ce,se,z){return new y((H||"React class")+": "+Q+" type `"+ce+"."+se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+z+"`.")}function k(H){function Q(ce,se,z,G,J){var V=ce[se],K=$(V);if(K!=="object")return new y("Invalid "+G+" `"+J+"` of type `"+K+"` "+("supplied to `"+z+"`, expected `object`."));for(var ie in H){var ne=H[ie];if(typeof ne!="function")return F(z,G,J,ie,W(ne));var ue=ne(V,ie,z,G,J+"."+ie,r);if(ue)return ue}return null}return b(Q)}function D(H){function Q(ce,se,z,G,J){var V=ce[se],K=$(V);if(K!=="object")return new y("Invalid "+G+" `"+J+"` of type `"+K+"` "+("supplied to `"+z+"`, expected `object`."));var ie=t({},ce[se],H);for(var ne in ie){var ue=H[ne];if(n(H,ne)&&typeof ue!="function")return F(z,G,J,ne,W(ue));if(!ue)return new y("Invalid "+G+" `"+J+"` key `"+ne+"` supplied to `"+z+"`.\nBad object: "+JSON.stringify(ce[se],null," ")+`
26
- Valid keys: `+JSON.stringify(Object.keys(H),null," "));var de=ue(V,ne,z,G,J+"."+ne,r);if(de)return de}return null}return b(Q)}function T(H){switch(typeof H){case"number":case"string":case"undefined":return!0;case"boolean":return!H;case"object":if(Array.isArray(H))return H.every(T);if(H===null||u(H))return!0;var Q=h(H);if(Q){var ce=Q.call(H),se;if(Q!==H.entries){for(;!(se=ce.next()).done;)if(!T(se.value))return!1}else for(;!(se=ce.next()).done;){var z=se.value;if(z&&!T(z[1]))return!1}}else return!1;return!0;default:return!1}}function B(H,Q){return H==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function $(H){var Q=typeof H;return Array.isArray(H)?"array":H instanceof RegExp?"object":B(Q,H)?"symbol":Q}function W(H){if(typeof H>"u"||H===null)return""+H;var Q=$(H);if(Q==="object"){if(H instanceof Date)return"date";if(H instanceof RegExp)return"regexp"}return Q}function Y(H){var Q=W(H);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function ee(H){return!H.constructor||!H.constructor.name?p:H.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},jm}var qm,iN;function CX(){if(iN)return qm;iN=1;var e=Ux();function t(){}function r(){}return r.resetWarningCache=t,qm=function(){function n(a,u,c,d,f,h){if(h!==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}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},qm}var oN;function RX(){if(oN)return wu.exports;if(oN=1,process.env.NODE_ENV!=="production"){var e=v2(),t=!0;wu.exports=OX()(e.isElement,t)}else wu.exports=CX()();return wu.exports}var PX=RX();const le=Hn(PX);var Eu={exports:{}},Je={};/** @license React v17.0.2
25
+ */var Am,eN;function EX(){if(eN)return Am;eN=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},u=0;u<10;u++)a["_"+String.fromCharCode(u)]=u;var c=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Am=i()?Object.assign:function(o,a){for(var u,c=n(o),d,f=1;f<arguments.length;f++){u=Object(arguments[f]);for(var h in u)t.call(u,h)&&(c[h]=u[h]);if(e){d=e(u);for(var p=0;p<d.length;p++)r.call(u,d[p])&&(c[d[p]]=u[d[p]])}}return c},Am}var Mm,tN;function Vx(){if(tN)return Mm;tN=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Mm=e,Mm}var Dm,rN;function g2(){return rN||(rN=1,Dm=Function.call.bind(Object.prototype.hasOwnProperty)),Dm}var jm,nN;function SX(){if(nN)return jm;nN=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Vx(),r={},n=g2();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,u,c,d){if(process.env.NODE_ENV!=="production"){for(var f in o)if(n(o,f)){var h;try{if(typeof o[f]!="function"){var p=Error((c||"React class")+": "+u+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=o[f](a,f,c,u,null,t)}catch(m){h=m}if(h&&!(h instanceof Error)&&e((c||"React class")+": type specification of "+u+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var v=d?d():"";e("Failed "+u+" type: "+h.message+(v??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},jm=i,jm}var qm,iN;function OX(){if(iN)return qm;iN=1;var e=v2(),t=EX(),r=Vx(),n=g2(),i=SX(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(u){var c="Warning: "+u;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return qm=function(u,c){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(H){var Q=H&&(d&&H[d]||H[f]);if(typeof Q=="function")return Q}var p="<<anonymous>>",v={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:w(),arrayOf:S,element:E(),elementType:_(),instanceOf:R,node:L(),objectOf:N,oneOf:P,oneOfType:j,shape:k,exact:D};function m(H,Q){return H===Q?H!==0||1/H===1/Q:H!==H&&Q!==Q}function y(H,Q){this.message=H,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}y.prototype=Error.prototype;function b(H){if(process.env.NODE_ENV!=="production")var Q={},ce=0;function se(G,J,V,K,ie,ne,ue){if(K=K||p,ne=ne||V,ue!==r){if(c){var de=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 de.name="Invariant Violation",de}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var we=K+":"+V;!Q[we]&&ce<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+K+"`. 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."),Q[we]=!0,ce++)}}return J[V]==null?G?J[V]===null?new y("The "+ie+" `"+ne+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new y("The "+ie+" `"+ne+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:H(J,V,K,ie,ne)}var z=se.bind(null,!1);return z.isRequired=se.bind(null,!0),z}function x(H){function Q(ce,se,z,G,J,V){var K=ce[se],ie=$(K);if(ie!==H){var ne=W(K);return new y("Invalid "+G+" `"+J+"` of type "+("`"+ne+"` supplied to `"+z+"`, expected ")+("`"+H+"`."),{expectedType:H})}return null}return b(Q)}function w(){return b(a)}function S(H){function Q(ce,se,z,G,J){if(typeof H!="function")return new y("Property `"+J+"` of component `"+z+"` has invalid PropType notation inside arrayOf.");var V=ce[se];if(!Array.isArray(V)){var K=$(V);return new y("Invalid "+G+" `"+J+"` of type "+("`"+K+"` supplied to `"+z+"`, expected an array."))}for(var ie=0;ie<V.length;ie++){var ne=H(V,ie,z,G,J+"["+ie+"]",r);if(ne instanceof Error)return ne}return null}return b(Q)}function E(){function H(Q,ce,se,z,G){var J=Q[ce];if(!u(J)){var V=$(J);return new y("Invalid "+z+" `"+G+"` of type "+("`"+V+"` supplied to `"+se+"`, expected a single ReactElement."))}return null}return b(H)}function _(){function H(Q,ce,se,z,G){var J=Q[ce];if(!e.isValidElementType(J)){var V=$(J);return new y("Invalid "+z+" `"+G+"` of type "+("`"+V+"` supplied to `"+se+"`, expected a single ReactElement type."))}return null}return b(H)}function R(H){function Q(ce,se,z,G,J){if(!(ce[se]instanceof H)){var V=H.name||p,K=ee(ce[se]);return new y("Invalid "+G+" `"+J+"` of type "+("`"+K+"` supplied to `"+z+"`, expected ")+("instance of `"+V+"`."))}return null}return b(Q)}function P(H){if(!Array.isArray(H))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("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])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function Q(ce,se,z,G,J){for(var V=ce[se],K=0;K<H.length;K++)if(m(V,H[K]))return null;var ie=JSON.stringify(H,function(ue,de){var we=W(de);return we==="symbol"?String(de):de});return new y("Invalid "+G+" `"+J+"` of value `"+String(V)+"` "+("supplied to `"+z+"`, expected one of "+ie+"."))}return b(Q)}function N(H){function Q(ce,se,z,G,J){if(typeof H!="function")return new y("Property `"+J+"` of component `"+z+"` has invalid PropType notation inside objectOf.");var V=ce[se],K=$(V);if(K!=="object")return new y("Invalid "+G+" `"+J+"` of type "+("`"+K+"` supplied to `"+z+"`, expected an object."));for(var ie in V)if(n(V,ie)){var ne=H(V,ie,z,G,J+"."+ie,r);if(ne instanceof Error)return ne}return null}return b(Q)}function j(H){if(!Array.isArray(H))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var Q=0;Q<H.length;Q++){var ce=H[Q];if(typeof ce!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Y(ce)+" at index "+Q+"."),a}function se(z,G,J,V,K){for(var ie=[],ne=0;ne<H.length;ne++){var ue=H[ne],de=ue(z,G,J,V,K,r);if(de==null)return null;de.data&&n(de.data,"expectedType")&&ie.push(de.data.expectedType)}var we=ie.length>0?", expected one of type ["+ie.join(", ")+"]":"";return new y("Invalid "+V+" `"+K+"` supplied to "+("`"+J+"`"+we+"."))}return b(se)}function L(){function H(Q,ce,se,z,G){return T(Q[ce])?null:new y("Invalid "+z+" `"+G+"` supplied to "+("`"+se+"`, expected a ReactNode."))}return b(H)}function F(H,Q,ce,se,z){return new y((H||"React class")+": "+Q+" type `"+ce+"."+se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+z+"`.")}function k(H){function Q(ce,se,z,G,J){var V=ce[se],K=$(V);if(K!=="object")return new y("Invalid "+G+" `"+J+"` of type `"+K+"` "+("supplied to `"+z+"`, expected `object`."));for(var ie in H){var ne=H[ie];if(typeof ne!="function")return F(z,G,J,ie,W(ne));var ue=ne(V,ie,z,G,J+"."+ie,r);if(ue)return ue}return null}return b(Q)}function D(H){function Q(ce,se,z,G,J){var V=ce[se],K=$(V);if(K!=="object")return new y("Invalid "+G+" `"+J+"` of type `"+K+"` "+("supplied to `"+z+"`, expected `object`."));var ie=t({},ce[se],H);for(var ne in ie){var ue=H[ne];if(n(H,ne)&&typeof ue!="function")return F(z,G,J,ne,W(ue));if(!ue)return new y("Invalid "+G+" `"+J+"` key `"+ne+"` supplied to `"+z+"`.\nBad object: "+JSON.stringify(ce[se],null," ")+`
26
+ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var de=ue(V,ne,z,G,J+"."+ne,r);if(de)return de}return null}return b(Q)}function T(H){switch(typeof H){case"number":case"string":case"undefined":return!0;case"boolean":return!H;case"object":if(Array.isArray(H))return H.every(T);if(H===null||u(H))return!0;var Q=h(H);if(Q){var ce=Q.call(H),se;if(Q!==H.entries){for(;!(se=ce.next()).done;)if(!T(se.value))return!1}else for(;!(se=ce.next()).done;){var z=se.value;if(z&&!T(z[1]))return!1}}else return!1;return!0;default:return!1}}function B(H,Q){return H==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function $(H){var Q=typeof H;return Array.isArray(H)?"array":H instanceof RegExp?"object":B(Q,H)?"symbol":Q}function W(H){if(typeof H>"u"||H===null)return""+H;var Q=$(H);if(Q==="object"){if(H instanceof Date)return"date";if(H instanceof RegExp)return"regexp"}return Q}function Y(H){var Q=W(H);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function ee(H){return!H.constructor||!H.constructor.name?p:H.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},qm}var km,oN;function CX(){if(oN)return km;oN=1;var e=Vx();function t(){}function r(){}return r.resetWarningCache=t,km=function(){function n(a,u,c,d,f,h){if(h!==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}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},km}var aN;function RX(){if(aN)return wu.exports;if(aN=1,process.env.NODE_ENV!=="production"){var e=v2(),t=!0;wu.exports=OX()(e.isElement,t)}else wu.exports=CX()();return wu.exports}var PX=RX();const le=Hn(PX);var Eu={exports:{}},Je={};/** @license React v17.0.2
27
27
  * react-is.production.min.js
28
28
  *
29
29
  * Copyright (c) Facebook, Inc. and its affiliates.
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var aN;function IX(){if(aN)return Je;aN=1;var e=60103,t=60106,r=60107,n=60108,i=60114,o=60109,a=60110,u=60112,c=60113,d=60120,f=60115,h=60116,p=60121,v=60122,m=60117,y=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;e=x("react.element"),t=x("react.portal"),r=x("react.fragment"),n=x("react.strict_mode"),i=x("react.profiler"),o=x("react.provider"),a=x("react.context"),u=x("react.forward_ref"),c=x("react.suspense"),d=x("react.suspense_list"),f=x("react.memo"),h=x("react.lazy"),p=x("react.block"),v=x("react.server.block"),m=x("react.fundamental"),y=x("react.debug_trace_mode"),b=x("react.legacy_hidden")}function w(D){if(typeof D=="object"&&D!==null){var T=D.$$typeof;switch(T){case e:switch(D=D.type,D){case r:case i:case n:case c:case d:return D;default:switch(D=D&&D.$$typeof,D){case a:case u:case h:case f:case o:return D;default:return T}}case t:return T}}}var S=o,E=e,_=u,R=r,P=h,N=f,j=t,L=i,F=n,k=c;return Je.ContextConsumer=a,Je.ContextProvider=S,Je.Element=E,Je.ForwardRef=_,Je.Fragment=R,Je.Lazy=P,Je.Memo=N,Je.Portal=j,Je.Profiler=L,Je.StrictMode=F,Je.Suspense=k,Je.isAsyncMode=function(){return!1},Je.isConcurrentMode=function(){return!1},Je.isContextConsumer=function(D){return w(D)===a},Je.isContextProvider=function(D){return w(D)===o},Je.isElement=function(D){return typeof D=="object"&&D!==null&&D.$$typeof===e},Je.isForwardRef=function(D){return w(D)===u},Je.isFragment=function(D){return w(D)===r},Je.isLazy=function(D){return w(D)===h},Je.isMemo=function(D){return w(D)===f},Je.isPortal=function(D){return w(D)===t},Je.isProfiler=function(D){return w(D)===i},Je.isStrictMode=function(D){return w(D)===n},Je.isSuspense=function(D){return w(D)===c},Je.isValidElementType=function(D){return typeof D=="string"||typeof D=="function"||D===r||D===i||D===y||D===n||D===c||D===d||D===b||typeof D=="object"&&D!==null&&(D.$$typeof===h||D.$$typeof===f||D.$$typeof===o||D.$$typeof===a||D.$$typeof===u||D.$$typeof===m||D.$$typeof===p||D[0]===v)},Je.typeOf=w,Je}var Qe={};/** @license React v17.0.2
33
+ */var sN;function IX(){if(sN)return Je;sN=1;var e=60103,t=60106,r=60107,n=60108,i=60114,o=60109,a=60110,u=60112,c=60113,d=60120,f=60115,h=60116,p=60121,v=60122,m=60117,y=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;e=x("react.element"),t=x("react.portal"),r=x("react.fragment"),n=x("react.strict_mode"),i=x("react.profiler"),o=x("react.provider"),a=x("react.context"),u=x("react.forward_ref"),c=x("react.suspense"),d=x("react.suspense_list"),f=x("react.memo"),h=x("react.lazy"),p=x("react.block"),v=x("react.server.block"),m=x("react.fundamental"),y=x("react.debug_trace_mode"),b=x("react.legacy_hidden")}function w(D){if(typeof D=="object"&&D!==null){var T=D.$$typeof;switch(T){case e:switch(D=D.type,D){case r:case i:case n:case c:case d:return D;default:switch(D=D&&D.$$typeof,D){case a:case u:case h:case f:case o:return D;default:return T}}case t:return T}}}var S=o,E=e,_=u,R=r,P=h,N=f,j=t,L=i,F=n,k=c;return Je.ContextConsumer=a,Je.ContextProvider=S,Je.Element=E,Je.ForwardRef=_,Je.Fragment=R,Je.Lazy=P,Je.Memo=N,Je.Portal=j,Je.Profiler=L,Je.StrictMode=F,Je.Suspense=k,Je.isAsyncMode=function(){return!1},Je.isConcurrentMode=function(){return!1},Je.isContextConsumer=function(D){return w(D)===a},Je.isContextProvider=function(D){return w(D)===o},Je.isElement=function(D){return typeof D=="object"&&D!==null&&D.$$typeof===e},Je.isForwardRef=function(D){return w(D)===u},Je.isFragment=function(D){return w(D)===r},Je.isLazy=function(D){return w(D)===h},Je.isMemo=function(D){return w(D)===f},Je.isPortal=function(D){return w(D)===t},Je.isProfiler=function(D){return w(D)===i},Je.isStrictMode=function(D){return w(D)===n},Je.isSuspense=function(D){return w(D)===c},Je.isValidElementType=function(D){return typeof D=="string"||typeof D=="function"||D===r||D===i||D===y||D===n||D===c||D===d||D===b||typeof D=="object"&&D!==null&&(D.$$typeof===h||D.$$typeof===f||D.$$typeof===o||D.$$typeof===a||D.$$typeof===u||D.$$typeof===m||D.$$typeof===p||D[0]===v)},Je.typeOf=w,Je}var Qe={};/** @license React v17.0.2
34
34
  * react-is.development.js
35
35
  *
36
36
  * Copyright (c) Facebook, Inc. and its affiliates.
37
37
  *
38
38
  * This source code is licensed under the MIT license found in the
39
39
  * LICENSE file in the root directory of this source tree.
40
- */var sN;function NX(){return sN||(sN=1,process.env.NODE_ENV!=="production"&&(function(){var e=60103,t=60106,r=60107,n=60108,i=60114,o=60109,a=60110,u=60112,c=60113,d=60120,f=60115,h=60116,p=60121,v=60122,m=60117,y=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;e=x("react.element"),t=x("react.portal"),r=x("react.fragment"),n=x("react.strict_mode"),i=x("react.profiler"),o=x("react.provider"),a=x("react.context"),u=x("react.forward_ref"),c=x("react.suspense"),d=x("react.suspense_list"),f=x("react.memo"),h=x("react.lazy"),p=x("react.block"),v=x("react.server.block"),m=x("react.fundamental"),x("react.scope"),x("react.opaque.id"),y=x("react.debug_trace_mode"),x("react.offscreen"),b=x("react.legacy_hidden")}var w=!1;function S(ue){return!!(typeof ue=="string"||typeof ue=="function"||ue===r||ue===i||ue===y||ue===n||ue===c||ue===d||ue===b||w||typeof ue=="object"&&ue!==null&&(ue.$$typeof===h||ue.$$typeof===f||ue.$$typeof===o||ue.$$typeof===a||ue.$$typeof===u||ue.$$typeof===m||ue.$$typeof===p||ue[0]===v))}function E(ue){if(typeof ue=="object"&&ue!==null){var de=ue.$$typeof;switch(de){case e:var we=ue.type;switch(we){case r:case i:case n:case c:case d:return we;default:var Se=we&&we.$$typeof;switch(Se){case a:case u:case h:case f:case o:return Se;default:return de}}case t:return de}}}var _=a,R=o,P=e,N=u,j=r,L=h,F=f,k=t,D=i,T=n,B=c,$=!1,W=!1;function Y(ue){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ee(ue){return W||(W=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(ue){return E(ue)===a}function Q(ue){return E(ue)===o}function ce(ue){return typeof ue=="object"&&ue!==null&&ue.$$typeof===e}function se(ue){return E(ue)===u}function z(ue){return E(ue)===r}function G(ue){return E(ue)===h}function J(ue){return E(ue)===f}function V(ue){return E(ue)===t}function K(ue){return E(ue)===i}function ie(ue){return E(ue)===n}function ne(ue){return E(ue)===c}Qe.ContextConsumer=_,Qe.ContextProvider=R,Qe.Element=P,Qe.ForwardRef=N,Qe.Fragment=j,Qe.Lazy=L,Qe.Memo=F,Qe.Portal=k,Qe.Profiler=D,Qe.StrictMode=T,Qe.Suspense=B,Qe.isAsyncMode=Y,Qe.isConcurrentMode=ee,Qe.isContextConsumer=H,Qe.isContextProvider=Q,Qe.isElement=ce,Qe.isForwardRef=se,Qe.isFragment=z,Qe.isLazy=G,Qe.isMemo=J,Qe.isPortal=V,Qe.isProfiler=K,Qe.isStrictMode=ie,Qe.isSuspense=ne,Qe.isValidElementType=S,Qe.typeOf=E})()),Qe}var uN;function TX(){return uN||(uN=1,process.env.NODE_ENV==="production"?Eu.exports=IX():Eu.exports=NX()),Eu.exports}var cN=TX();function lN(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function fN(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function km(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return fN(r.overflowY,t)||fN(r.overflowX,t)||(function(n){var i=(function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(e)}return!1}function Su(e,t,r,n,i,o,a,u){return o<e&&a>t||o>e&&a<t?0:o<=e&&u<=r||a>=t&&u>=r?o-e-n:a>t&&u<r||o<e&&u>r?a-t+i:0}var AX=function(e,t){var r=window,n=t.inline,i=t.boundary,o=t.skipOverflowHiddenElements,a=typeof i=="function"?i:function(de){return de!==i};if(!lN(e))throw new TypeError("Invalid target");for(var u,c,d=document.scrollingElement||document.documentElement,f=[],h=e;lN(h)&&a(h);){if((h=(c=(u=h).parentElement)==null?u.getRootNode().host||null:c)===d){f.push(h);break}h!=null&&h===document.body&&km(h)&&!km(document.documentElement)||h!=null&&km(h,o)&&f.push(h)}for(var p=r.visualViewport?r.visualViewport.width:innerWidth,v=r.visualViewport?r.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),x=b.height,w=b.width,S=b.top,E=b.right,_=b.bottom,R=b.left,P=S,N=n==="center"?R+w/2:n==="end"?E:R,j=[],L=0;L<f.length;L++){var F=f[L],k=F.getBoundingClientRect(),D=k.height,T=k.width,B=k.top,$=k.right,W=k.bottom,Y=k.left;if(S>=0&&R>=0&&_<=v&&E<=p&&S>=B&&_<=W&&R>=Y&&E<=$)return j;var ee=getComputedStyle(F),H=parseInt(ee.borderLeftWidth,10),Q=parseInt(ee.borderTopWidth,10),ce=parseInt(ee.borderRightWidth,10),se=parseInt(ee.borderBottomWidth,10),z=0,G=0,J="offsetWidth"in F?F.offsetWidth-F.clientWidth-H-ce:0,V="offsetHeight"in F?F.offsetHeight-F.clientHeight-Q-se:0,K="offsetWidth"in F?F.offsetWidth===0?0:T/F.offsetWidth:0,ie="offsetHeight"in F?F.offsetHeight===0?0:D/F.offsetHeight:0;if(d===F)z=Su(y,y+v,v,Q,se,y+P,y+P+x,x),G=n==="start"?N:n==="center"?N-p/2:n==="end"?N-p:Su(m,m+p,p,H,ce,m+N,m+N+w,w),z=Math.max(0,z+y),G=Math.max(0,G+m);else{z=Su(B,W,D,Q,se+V,P,P+x,x),G=n==="start"?N-Y-H:n==="center"?N-(Y+T/2)+J/2:n==="end"?N-$+ce+J:Su(Y,$,T,H,ce+J,N,N+w,w);var ne=F.scrollLeft,ue=F.scrollTop;P+=ue-(z=Math.max(0,Math.min(ue+z/ie,F.scrollHeight-D/ie+V))),N+=ne-(G=Math.max(0,Math.min(ne+G/K,F.scrollWidth-T/K+J)))}j.push({el:F,top:z,left:G})}return j},uc=function(){return uc=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},uc.apply(this,arguments)};let MX=0;function dN(e){return typeof e=="function"?e:yr}function yr(){}function m2(e,t){if(!e)return;AX(e,{boundary:t}).forEach(n=>{let{el:i,top:o,left:a}=n;i.scrollTop=o,i.scrollLeft=a})}function hN(e,t,r){return e===t||t instanceof r.Node&&e.contains&&e.contains(t)}function Vx(e,t){let r;function n(){r&&clearTimeout(r)}function i(){for(var o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];n(),r=setTimeout(()=>{r=null,e(...a)},t)}return i.cancel=n,i}function Ot(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(u=>(u&&u(n,...o),n.preventDownshiftDefault||n.hasOwnProperty("nativeEvent")&&n.nativeEvent.preventDownshiftDefault))}}function ai(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n=>{t.forEach(i=>{typeof i=="function"?i(n):i&&(i.current=n)})}}function y2(){return String(MX++)}function b2(e){let{isOpen:t,resultCount:r,previousResultCount:n}=e;return t?r?r!==n?`${r} result${r===1?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function pN(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function x2(e){return typeof e.type=="string"}function w2(e){return e.props}function DX(e,t){console.error(`The property "${t}" is required in "${e}"`)}const jX=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Ou(e){e===void 0&&(e={});const t={};return jX.forEach(r=>{e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function cc(e,t){return Object.keys(e).reduce((r,n)=>(r[n]=lc(t,n)?t[n]:e[n],r),{})}function lc(e,t){return e[t]!==void 0}function Hb(e){const{key:t,keyCode:r}=e;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?`Arrow${t}`:t}function qX(e){return Object.prototype.toString.call(e)==="[object Object]"}function ao(e,t,r,n,i){if(i===void 0&&(i=!0),r===0)return-1;const o=r-1;(typeof t!="number"||t<0||t>=r)&&(t=e>0?-1:o+1);let a=t+e;a<0?a=i?o:0:a>o&&(a=i?0:o);const u=bi(e,a,r,n,i);return u===-1?t>=r?-1:t:u}function bi(e,t,r,n,i){const o=n(t);if(!o||!o.hasAttribute("disabled"))return t;if(e>0){for(let a=t+1;a<r;a++)if(!n(a).hasAttribute("disabled"))return a}else for(let a=t-1;a>=0;a--)if(!n(a).hasAttribute("disabled"))return a;return i?e>0?bi(1,0,r,n,!1):bi(-1,r-1,r,n,!1):-1}function fc(e,t,r,n){return n===void 0&&(n=!0),t.some(i=>i&&(hN(i,e,r)||n&&hN(i,r.document.activeElement,r)))}let Wx=yr;process.env.NODE_ENV!=="production"&&(Wx=(e,t,r)=>{const n="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(e).forEach(i=>{t[i]!==void 0&&r[i]===void 0?console.error(`downshift: A component has changed the controlled prop "${i}" to be uncontrolled. ${n}`):t[i]===void 0&&r[i]!==void 0&&console.error(`downshift: A component has changed the uncontrolled prop "${i}" to be controlled. ${n}`)})});const kX=Vx(e=>{E2(e).textContent=""},500);function _2(e,t){const r=E2(t);e&&(r.textContent=e,kX(t))}function E2(e){e===void 0&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const S2=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,O2=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,C2=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,Lu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Bu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,R2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,P2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,I2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,N2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,T2=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,A2=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,M2=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,D2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,Ub=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,j2=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,q2=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,k2=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16;var LX=Object.freeze({__proto__:null,unknown:S2,mouseUp:O2,itemMouseEnter:C2,keyDownArrowUp:Lu,keyDownArrowDown:Bu,keyDownEscape:R2,keyDownEnter:P2,keyDownHome:I2,keyDownEnd:N2,clickItem:T2,blurInput:A2,changeInput:M2,keyDownSpaceButton:D2,clickButton:Ub,blurButton:j2,controlledPropUpdatedSelectedItem:q2,touchEnd:k2});const BX=(()=>{class e extends A.Component{constructor(r){var n;super(r),n=this,this.id=this.props.id||`downshift-${y2()}`,this.menuId=this.props.menuId||`${this.id}-menu`,this.labelId=this.props.labelId||`${this.id}-label`,this.inputId=this.props.inputId||`${this.id}-input`,this.getItemId=this.props.getItemId||(h=>`${this.id}-item-${h}`),this.input=null,this.items=[],this.itemCount=null,this.previousResultCount=0,this.timeoutIds=[],this.internalSetTimeout=(h,p)=>{const v=setTimeout(()=>{this.timeoutIds=this.timeoutIds.filter(m=>m!==v),h()},p);this.timeoutIds.push(v)},this.setItemCount=h=>{this.itemCount=h},this.unsetItemCount=()=>{this.itemCount=null},this.setHighlightedIndex=function(h,p){h===void 0&&(h=n.props.defaultHighlightedIndex),p===void 0&&(p={}),p=Ou(p),n.internalSetState({highlightedIndex:h,...p})},this.clearSelection=h=>{this.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:this.props.defaultHighlightedIndex,isOpen:this.props.defaultIsOpen},h)},this.selectItem=(h,p,v)=>{p=Ou(p),this.internalSetState({isOpen:this.props.defaultIsOpen,highlightedIndex:this.props.defaultHighlightedIndex,selectedItem:h,inputValue:this.props.itemToString(h),...p},v)},this.selectItemAtIndex=(h,p,v)=>{const m=this.items[h];m!=null&&this.selectItem(m,p,v)},this.selectHighlightedItem=(h,p)=>this.selectItemAtIndex(this.getState().highlightedIndex,h,p),this.internalSetState=(h,p)=>{let v,m;const y={},b=typeof h=="function";return!b&&h.hasOwnProperty("inputValue")&&this.props.onInputValueChange(h.inputValue,{...this.getStateAndHelpers(),...h}),this.setState(x=>{x=this.getState(x);let w=b?h(x):h;w=this.props.stateReducer(x,w),v=w.hasOwnProperty("selectedItem");const S={};return v&&w.selectedItem!==x.selectedItem&&(m=w.selectedItem),w.type=w.type||S2,Object.keys(w).forEach(E=>{x[E]!==w[E]&&(y[E]=w[E]),E!=="type"&&(w[E],lc(this.props,E)||(S[E]=w[E]))}),b&&w.hasOwnProperty("inputValue")&&this.props.onInputValueChange(w.inputValue,{...this.getStateAndHelpers(),...w}),S},()=>{dN(p)(),Object.keys(y).length>1&&this.props.onStateChange(y,this.getStateAndHelpers()),v&&this.props.onSelect(h.selectedItem,this.getStateAndHelpers()),m!==void 0&&this.props.onChange(m,this.getStateAndHelpers()),this.props.onUserAction(y,this.getStateAndHelpers())})},this.rootRef=h=>this._rootNode=h,this.getRootProps=function(h,p){let{refKey:v="ref",ref:m,...y}=h===void 0?{}:h,{suppressRefError:b=!1}=p===void 0?{}:p;n.getRootProps.called=!0,n.getRootProps.refKey=v,n.getRootProps.suppressRefError=b;const{isOpen:x}=n.getState();return{[v]:ai(m,n.rootRef),role:"combobox","aria-expanded":x,"aria-haspopup":"listbox","aria-owns":x?n.menuId:null,"aria-labelledby":n.labelId,...y}},this.keyDownHandlers={ArrowDown(h){if(h.preventDefault(),this.getState().isOpen){const p=h.shiftKey?5:1;this.moveHighlightedIndex(p,{type:Bu})}else this.internalSetState({isOpen:!0,type:Bu},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=ao(1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:Bu})}})},ArrowUp(h){if(h.preventDefault(),this.getState().isOpen){const p=h.shiftKey?-5:-1;this.moveHighlightedIndex(p,{type:Lu})}else this.internalSetState({isOpen:!0,type:Lu},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=ao(-1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:Lu})}})},Enter(h){if(h.which===229)return;const{isOpen:p,highlightedIndex:v}=this.getState();if(p&&v!=null){h.preventDefault();const m=this.items[v],y=this.getItemNodeFromIndex(v);if(m==null||y&&y.hasAttribute("disabled"))return;this.selectHighlightedItem({type:P2})}},Escape(h){h.preventDefault(),this.reset({type:R2,...!this.state.isOpen&&{selectedItem:null,inputValue:""}})}},this.buttonKeyDownHandlers={...this.keyDownHandlers," "(h){h.preventDefault(),this.toggleMenu({type:D2})}},this.inputKeyDownHandlers={...this.keyDownHandlers,Home(h){const{isOpen:p}=this.getState();if(!p)return;h.preventDefault();const v=this.getItemCount();if(v<=0||!p)return;const m=bi(1,0,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:I2})},End(h){const{isOpen:p}=this.getState();if(!p)return;h.preventDefault();const v=this.getItemCount();if(v<=0||!p)return;const m=bi(-1,v-1,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:N2})}},this.getToggleButtonProps=function(h){let{onClick:p,onPress:v,onKeyDown:m,onKeyUp:y,onBlur:b,...x}=h===void 0?{}:h;const{isOpen:w}=n.getState(),S={onClick:Ot(p,n.buttonHandleClick),onKeyDown:Ot(m,n.buttonHandleKeyDown),onKeyUp:Ot(y,n.buttonHandleKeyUp),onBlur:Ot(b,n.buttonHandleBlur)},E=x.disabled?{}:S;return{type:"button",role:"button","aria-label":w?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0,...E,...x}},this.buttonHandleKeyUp=h=>{h.preventDefault()},this.buttonHandleKeyDown=h=>{const p=Hb(h);this.buttonKeyDownHandlers[p]&&this.buttonKeyDownHandlers[p].call(this,h)},this.buttonHandleClick=h=>{h.preventDefault(),this.props.environment.document.activeElement===this.props.environment.document.body&&h.target.focus(),process.env.NODE_ENV==="test"?this.toggleMenu({type:Ub}):this.internalSetTimeout(()=>this.toggleMenu({type:Ub}))},this.buttonHandleBlur=h=>{const p=h.target;this.internalSetTimeout(()=>{!this.isMouseDown&&(this.props.environment.document.activeElement==null||this.props.environment.document.activeElement.id!==this.inputId)&&this.props.environment.document.activeElement!==p&&this.reset({type:j2})})},this.getLabelProps=h=>({htmlFor:this.inputId,id:this.labelId,...h}),this.getInputProps=function(h){let{onKeyDown:p,onBlur:v,onChange:m,onInput:y,onChangeText:b,...x}=h===void 0?{}:h,w,S={};w="onChange";const{inputValue:E,isOpen:_,highlightedIndex:R}=n.getState();return x.disabled||(S={[w]:Ot(m,y,n.inputHandleChange),onKeyDown:Ot(p,n.inputHandleKeyDown),onBlur:Ot(v,n.inputHandleBlur)}),{"aria-autocomplete":"list","aria-activedescendant":_&&typeof R=="number"&&R>=0?n.getItemId(R):null,"aria-controls":_?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:E,id:n.inputId,...S,...x}},this.inputHandleKeyDown=h=>{const p=Hb(h);p&&this.inputKeyDownHandlers[p]&&this.inputKeyDownHandlers[p].call(this,h)},this.inputHandleChange=h=>{this.internalSetState({type:M2,isOpen:!0,inputValue:h.target.value,highlightedIndex:this.props.defaultHighlightedIndex})},this.inputHandleBlur=()=>{this.internalSetTimeout(()=>{const h=this.props.environment.document&&!!this.props.environment.document.activeElement&&!!this.props.environment.document.activeElement.dataset&&this.props.environment.document.activeElement.dataset.toggle&&this._rootNode&&this._rootNode.contains(this.props.environment.document.activeElement);!this.isMouseDown&&!h&&this.reset({type:A2})})},this.menuRef=h=>{this._menuNode=h},this.getMenuProps=function(h,p){let{refKey:v="ref",ref:m,...y}=h===void 0?{}:h,{suppressRefError:b=!1}=p===void 0?{}:p;return n.getMenuProps.called=!0,n.getMenuProps.refKey=v,n.getMenuProps.suppressRefError=b,{[v]:ai(m,n.menuRef),role:"listbox","aria-labelledby":y&&y["aria-label"]?null:n.labelId,id:n.menuId,...y}},this.getItemProps=function(h){let{onMouseMove:p,onMouseDown:v,onClick:m,onPress:y,index:b,item:x=process.env.NODE_ENV==="production"?void 0:DX("getItemProps","item"),...w}=h===void 0?{}:h;b===void 0?(n.items.push(x),b=n.items.indexOf(x)):n.items[b]=x;const S="onClick",E=m,_={onMouseMove:Ot(p,()=>{b!==n.getState().highlightedIndex&&(n.setHighlightedIndex(b,{type:C2}),n.avoidScrolling=!0,n.internalSetTimeout(()=>n.avoidScrolling=!1,250))}),onMouseDown:Ot(v,P=>{P.preventDefault()}),[S]:Ot(E,()=>{n.selectItemAtIndex(b,{type:T2})})},R=w.disabled?{onMouseDown:_.onMouseDown}:_;return{id:n.getItemId(b),role:"option","aria-selected":n.getState().highlightedIndex===b,...R,...w}},this.clearItems=()=>{this.items=[]},this.reset=function(h,p){h===void 0&&(h={}),h=Ou(h),n.internalSetState(v=>{let{selectedItem:m}=v;return{isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(m),...h}},p)},this.toggleMenu=function(h,p){h===void 0&&(h={}),h=Ou(h),n.internalSetState(v=>{let{isOpen:m}=v;return{isOpen:!m,...m&&{highlightedIndex:n.props.defaultHighlightedIndex},...h}},()=>{const{isOpen:v,highlightedIndex:m}=n.getState();v&&n.getItemCount()>0&&typeof m=="number"&&n.setHighlightedIndex(m,h),dN(p)()})},this.openMenu=h=>{this.internalSetState({isOpen:!0},h)},this.closeMenu=h=>{this.internalSetState({isOpen:!1},h)},this.updateStatus=Vx(()=>{const h=this.getState(),p=this.items[h.highlightedIndex],v=this.getItemCount(),m=this.props.getA11yStatusMessage({itemToString:this.props.itemToString,previousResultCount:this.previousResultCount,resultCount:v,highlightedItem:p,...h});this.previousResultCount=v,_2(m,this.props.environment.document)},200);const{defaultHighlightedIndex:i,initialHighlightedIndex:o=i,defaultIsOpen:a,initialIsOpen:u=a,initialInputValue:c="",initialSelectedItem:d=null}=this.props,f=this.getState({highlightedIndex:o,isOpen:u,inputValue:c,selectedItem:d});f.selectedItem!=null&&this.props.initialInputValue===void 0&&(f.inputValue=this.props.itemToString(f.selectedItem)),this.state=f}internalClearTimeouts(){this.timeoutIds.forEach(r=>{clearTimeout(r)}),this.timeoutIds=[]}getState(r){return r===void 0&&(r=this.state),cc(r,this.props)}getItemCount(){let r=this.items.length;return this.itemCount!=null?r=this.itemCount:this.props.itemCount!==void 0&&(r=this.props.itemCount),r}getItemNodeFromIndex(r){return this.props.environment.document.getElementById(this.getItemId(r))}scrollHighlightedItemIntoView(){{const r=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(r,this._menuNode)}}moveHighlightedIndex(r,n){const i=this.getItemCount(),{highlightedIndex:o}=this.getState();if(i>0){const a=ao(r,o,i,u=>this.getItemNodeFromIndex(u));this.setHighlightedIndex(a,n)}}getStateAndHelpers(){const{highlightedIndex:r,inputValue:n,selectedItem:i,isOpen:o}=this.getState(),{itemToString:a}=this.props,{id:u}=this,{getRootProps:c,getToggleButtonProps:d,getLabelProps:f,getMenuProps:h,getInputProps:p,getItemProps:v,openMenu:m,closeMenu:y,toggleMenu:b,selectItem:x,selectItemAtIndex:w,selectHighlightedItem:S,setHighlightedIndex:E,clearSelection:_,clearItems:R,reset:P,setItemCount:N,unsetItemCount:j,internalSetState:L}=this;return{getRootProps:c,getToggleButtonProps:d,getLabelProps:f,getMenuProps:h,getInputProps:p,getItemProps:v,reset:P,openMenu:m,closeMenu:y,toggleMenu:b,selectItem:x,selectItemAtIndex:w,selectHighlightedItem:S,setHighlightedIndex:E,clearSelection:_,clearItems:R,setItemCount:N,unsetItemCount:j,setState:L,itemToString:a,id:u,highlightedIndex:r,inputValue:n,isOpen:o,selectedItem:i}}componentDidMount(){process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&vN(this._menuNode,this.getMenuProps);{const r=()=>{this.isMouseDown=!0},n=c=>{this.isMouseDown=!1,!fc(c.target,[this._rootNode,this._menuNode],this.props.environment)&&this.getState().isOpen&&this.reset({type:O2},()=>this.props.onOuterClick(this.getStateAndHelpers()))},i=()=>{this.isTouchMove=!1},o=()=>{this.isTouchMove=!0},a=c=>{const d=fc(c.target,[this._rootNode,this._menuNode],this.props.environment,!1);!this.isTouchMove&&!d&&this.getState().isOpen&&this.reset({type:k2},()=>this.props.onOuterClick(this.getStateAndHelpers()))},{environment:u}=this.props;u.addEventListener("mousedown",r),u.addEventListener("mouseup",n),u.addEventListener("touchstart",i),u.addEventListener("touchmove",o),u.addEventListener("touchend",a),this.cleanup=()=>{this.internalClearTimeouts(),this.updateStatus.cancel(),u.removeEventListener("mousedown",r),u.removeEventListener("mouseup",n),u.removeEventListener("touchstart",i),u.removeEventListener("touchmove",o),u.removeEventListener("touchend",a)}}}shouldScroll(r,n){const{highlightedIndex:i}=this.props.highlightedIndex===void 0?this.getState():this.props,{highlightedIndex:o}=n.highlightedIndex===void 0?r:n;return i&&this.getState().isOpen&&!r.isOpen||i!==o}componentDidUpdate(r,n){process.env.NODE_ENV!=="production"&&(Wx(this.state,r,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&vN(this._menuNode,this.getMenuProps)),lc(this.props,"selectedItem")&&this.props.selectedItemChanged(r.selectedItem,this.props.selectedItem)&&this.internalSetState({type:q2,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(n,r)&&this.scrollHighlightedItemIntoView(),this.updateStatus()}componentWillUnmount(){this.cleanup()}render(){const r=pN(this.props.children,yr);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;const n=pN(r(this.getStateAndHelpers()));if(!n)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&FX(n,this.getRootProps),n;if(x2(n))return A.cloneElement(n,this.getRootProps(w2(n)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")}}return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:b2,itemToString:t=>t==null?"":(process.env.NODE_ENV!=="production"&&qX(t)&&!t.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",t),String(t)),onStateChange:yr,onInputValueChange:yr,onUserAction:yr,onChange:yr,onSelect:yr,onOuterClick:yr,selectedItemChanged:(t,r)=>t!==r,environment:typeof window>"u"?{}:window,stateReducer:(t,r)=>r,suppressRefError:!1,scrollIntoView:m2},e.stateChangeTypes=LX,e})();process.env.NODE_ENV!=="production"&&(BX.propTypes={children:le.func,defaultHighlightedIndex:le.number,defaultIsOpen:le.bool,initialHighlightedIndex:le.number,initialSelectedItem:le.any,initialInputValue:le.string,initialIsOpen:le.bool,getA11yStatusMessage:le.func,itemToString:le.func,onChange:le.func,onSelect:le.func,onStateChange:le.func,onInputValueChange:le.func,onUserAction:le.func,onOuterClick:le.func,selectedItemChanged:le.func,stateReducer:le.func,itemCount:le.number,id:le.string,environment:le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})}),suppressRefError:le.bool,scrollIntoView:le.func,selectedItem:le.any,isOpen:le.bool,inputValue:le.string,highlightedIndex:le.number,labelId:le.string,inputId:le.string,menuId:le.string,getItemId:le.func});function vN(e,t){let{refKey:r}=t;e||console.error(`downshift: The ref prop "${r}" from getMenuProps was not applied correctly on your menu element.`)}function FX(e,t){let{refKey:r}=t;const n=r!=="ref",i=!x2(e);i&&!n&&!cN.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!i&&n&&console.error(`downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "${r}"`),!cN.isForwardRef(e)&&!w2(e)[r]&&console.error(`downshift: You must apply the ref prop "${r}" from getRootProps onto your root element.`)}const L2={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function $X(e,t,r){const{props:n,type:i}=e,o={};Object.keys(t).forEach(a=>{zX(a,e,t,r),r[a]!==t[a]&&(o[a]=r[a])}),n.onStateChange&&Object.keys(o).length&&n.onStateChange({type:i,...o})}function zX(e,t,r,n){const{props:i,type:o}=t,a=`on${Gx(e)}Change`;i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a]({type:o,...n})}function HX(e,t){return t.changes}function UX(e){const{selectedItem:t,itemToString:r}=e;return t?`${r(t)} has been selected.`:""}const VX=Vx((e,t)=>{_2(e(),t)},200),WX=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?A.useLayoutEffect:A.useEffect;function GX(e){let{id:t=`downshift-${y2()}`,labelId:r,menuId:n,getItemId:i,toggleButtonId:o,inputId:a}=e;return A.useRef({labelId:r||`${t}-label`,menuId:n||`${t}-menu`,getItemId:i||(c=>`${t}-item-${c}`),toggleButtonId:o||`${t}-toggle-button`,inputId:a||`${t}-input`}).current}function KX(e,t,r){return e!==void 0?e:r.length===0?-1:r.indexOf(t)}function YX(e){return e?String(e):""}function Gx(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function B2(e){const t=A.useRef(e);return t.current=e,t}function XX(e,t,r){const n=A.useRef(),i=A.useRef(),o=A.useCallback((h,p)=>{i.current=p,h=cc(h,p.props);const v=e(h,p);return p.props.stateReducer(h,{...p,changes:v})},[e]),[a,u]=A.useReducer(o,t),c=B2(r),d=A.useCallback(h=>u({props:c.current,...h}),[c]),f=i.current;return A.useEffect(()=>{f&&n.current&&n.current!==a&&$X(f,cc(n.current,f.props),a),n.current=a},[a,r,f]),[a,d]}const Ra={itemToString:YX,stateReducer:HX,getA11ySelectionMessage:UX,scrollIntoView:m2,circularNavigation:!1,environment:typeof window>"u"?{}:window};function Xr(e,t,r){r===void 0&&(r=L2);const n=e[`default${Gx(t)}`];return n!==void 0?n:r[t]}function Cu(e,t,r){r===void 0&&(r=L2);const n=e[t];if(n!==void 0)return n;const i=e[`initial${Gx(t)}`];return i!==void 0?i:Xr(e,t,r)}function ZX(e){const t=Cu(e,"selectedItem"),r=Cu(e,"isOpen"),n=Cu(e,"highlightedIndex"),i=Cu(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.indexOf(t):n,isOpen:r,selectedItem:t,inputValue:i}}function dc(e,t,r,n){const{items:i,initialHighlightedIndex:o,defaultHighlightedIndex:a}=e,{selectedItem:u,highlightedIndex:c}=t;return i.length===0?-1:o!==void 0&&c===o?o:a!==void 0?a:u?r===0?i.indexOf(u):ao(r,i.indexOf(u),i.length,n,!1):r===0?-1:r<0?i.length-1:0}function JX(e,t,r,n){const i=A.useRef({isMouseDown:!1,isTouchMove:!1});return A.useEffect(()=>{const o=()=>{i.current.isMouseDown=!0},a=f=>{i.current.isMouseDown=!1,e&&!fc(f.target,t.map(h=>h.current),r)&&n()},u=()=>{i.current.isTouchMove=!1},c=()=>{i.current.isTouchMove=!0},d=f=>{e&&!i.current.isTouchMove&&!fc(f.target,t.map(h=>h.current),r,!1)&&n()};return r.addEventListener("mousedown",o),r.addEventListener("mouseup",a),r.addEventListener("touchstart",u),r.addEventListener("touchmove",c),r.addEventListener("touchend",d),function(){r.removeEventListener("mousedown",o),r.removeEventListener("mouseup",a),r.removeEventListener("touchstart",u),r.removeEventListener("touchmove",c),r.removeEventListener("touchend",d)}},[e,r]),i}let F2=()=>yr;process.env.NODE_ENV!=="production"&&(F2=function(){const e=A.useRef(!0);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const i=A.useRef(r.reduce((a,u)=>(a[u]={},a),{}));return A.useEffect(()=>{Object.keys(i.current).forEach(a=>{const u=i.current[a];if(e.current&&!Object.keys(u).length){console.error(`downshift: You forgot to call the ${a} getter function on your component / element.`);return}const{suppressRefError:c,refKey:d,elementRef:f}=u;(!f||!f.current)&&!c&&console.error(`downshift: The ref prop "${d}" from ${a} was not applied correctly on your element.`)}),e.current=!1}),A.useCallback((a,u,c,d)=>{i.current[a]={suppressRefError:u,refKey:c,elementRef:d}},[])});function gN(e,t,r){let{isInitialMount:n,highlightedIndex:i,items:o,environment:a,...u}=r;A.useEffect(()=>{n||VX(()=>e({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length,...u}),a.document)},t)}function QX(e){let{highlightedIndex:t,isOpen:r,itemRefs:n,getItemNodeFromIndex:i,menuElement:o,scrollIntoView:a}=e;const u=A.useRef(!0);return WX(()=>{t<0||!r||!Object.keys(n.current).length||(u.current===!1?u.current=!0:a(i(t),o))},[t]),u}let $2=yr;process.env.NODE_ENV!=="production"&&($2=e=>{let{isInitialMount:t,props:r,state:n}=e;const i=A.useRef(r);A.useEffect(()=>{t||(Wx(n,i.current,r),i.current=r)},[n,r,t])});function eZ(e,t,r){const{type:n,props:i}=t;let o;switch(n){case r.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case r.MenuMouseLeave:o={highlightedIndex:-1};break;case r.ToggleButtonClick:case r.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:dc(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:dc(i,e,0)};break;case r.FunctionCloseMenu:o={isOpen:!1};break;case r.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case r.FunctionSetInputValue:o={inputValue:t.inputValue};break;case r.FunctionReset:o={highlightedIndex:Xr(i,"highlightedIndex"),isOpen:Xr(i,"isOpen"),selectedItem:Xr(i,"selectedItem"),inputValue:Xr(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...o}}le.array.isRequired,le.func,le.func,le.func,le.bool,le.number,le.number,le.number,le.bool,le.bool,le.bool,le.any,le.any,le.any,le.string,le.string,le.string,le.func,le.string,le.func,le.func,le.func,le.func,le.func,le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})});function tZ(e){var t=e.isOpen,r=e.resultCount,n=e.previousResultCount;return t?r?r!==n?"".concat(r," result").concat(r===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}uc(uc({},Ra),{getA11yStatusMessage:tZ});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const Kx=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Yx=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Xx=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Zx=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Jx=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,Qx=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":5,ew=process.env.NODE_ENV!=="production"?"__input_change__":6,hc=process.env.NODE_ENV!=="production"?"__input_blur__":7,z2=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":8,H2=process.env.NODE_ENV!=="production"?"__item_mouse_move__":9,tw=process.env.NODE_ENV!=="production"?"__item_click__":10,U2=process.env.NODE_ENV!=="production"?"__togglebutton_click__":11,V2=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":12,W2=process.env.NODE_ENV!=="production"?"__function_open_menu__":13,G2=process.env.NODE_ENV!=="production"?"__function_close_menu__":14,K2=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":15,rw=process.env.NODE_ENV!=="production"?"__function_select_item__":16,Y2=process.env.NODE_ENV!=="production"?"__function_set_input_value__":17,X2=process.env.NODE_ENV!=="production"?"__function_reset__":18,nw=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":19;var Z2=Object.freeze({__proto__:null,InputKeyDownArrowDown:Kx,InputKeyDownArrowUp:Yx,InputKeyDownEscape:Xx,InputKeyDownHome:Zx,InputKeyDownEnd:Jx,InputKeyDownEnter:Qx,InputChange:ew,InputBlur:hc,MenuMouseLeave:z2,ItemMouseMove:H2,ItemClick:tw,ToggleButtonClick:U2,FunctionToggleMenu:V2,FunctionOpenMenu:W2,FunctionCloseMenu:G2,FunctionSetHighlightedIndex:K2,FunctionSelectItem:rw,FunctionSetInputValue:Y2,FunctionReset:X2,ControlledPropUpdatedSelectedItem:nw});function rZ(e){const t=ZX(e),{selectedItem:r}=t;let{inputValue:n}=t;return n===""&&r&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(n=e.itemToString(r)),{...t,inputValue:n}}const nZ={items:le.array.isRequired,itemToString:le.func,getA11yStatusMessage:le.func,getA11ySelectionMessage:le.func,circularNavigation:le.bool,highlightedIndex:le.number,defaultHighlightedIndex:le.number,initialHighlightedIndex:le.number,isOpen:le.bool,defaultIsOpen:le.bool,initialIsOpen:le.bool,selectedItem:le.any,initialSelectedItem:le.any,defaultSelectedItem:le.any,inputValue:le.string,defaultInputValue:le.string,initialInputValue:le.string,id:le.string,labelId:le.string,menuId:le.string,getItemId:le.func,inputId:le.string,toggleButtonId:le.string,stateReducer:le.func,onSelectedItemChange:le.func,onHighlightedIndexChange:le.func,onStateChange:le.func,onIsOpenChange:le.func,onInputValueChange:le.func,environment:le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})})};function iZ(e,t,r){const n=A.useRef(),[i,o]=XX(e,t,r);return A.useEffect(()=>{lc(r,"selectedItem")&&(n.current!==r.selectedItem&&o({type:nw,inputValue:r.itemToString(r.selectedItem)}),n.current=i.selectedItem===n.current?r.selectedItem:i.selectedItem)}),[cc(i,r),o]}let J2=yr;process.env.NODE_ENV!=="production"&&(J2=(e,t)=>{le.checkPropTypes(nZ,e,"prop",t.name)});const oZ={...Ra,getA11yStatusMessage:b2,circularNavigation:!0};function aZ(e,t){const{type:r,props:n,shiftKey:i}=t;let o;switch(r){case tw:o={isOpen:Xr(n,"isOpen"),highlightedIndex:Xr(n,"highlightedIndex"),selectedItem:n.items[t.index],inputValue:n.itemToString(n.items[t.index])};break;case Kx:e.isOpen?o={highlightedIndex:ao(i?5:1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:dc(n,e,1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case Yx:e.isOpen?o={highlightedIndex:ao(i?-5:-1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:dc(n,e,-1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case Qx:o={...e.isOpen&&e.highlightedIndex>=0&&{selectedItem:n.items[e.highlightedIndex],isOpen:Xr(n,"isOpen"),highlightedIndex:Xr(n,"highlightedIndex"),inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case Xx:o={isOpen:!1,highlightedIndex:-1,...!e.isOpen&&{selectedItem:null,inputValue:""}};break;case Zx:o={highlightedIndex:bi(1,0,n.items.length,t.getItemNodeFromIndex,!1)};break;case Jx:o={highlightedIndex:bi(-1,n.items.length-1,n.items.length,t.getItemNodeFromIndex,!1)};break;case hc:o={isOpen:!1,highlightedIndex:-1,...e.highlightedIndex>=0&&t.selectItem&&{selectedItem:n.items[e.highlightedIndex],inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case ew:o={isOpen:!0,highlightedIndex:Xr(n,"highlightedIndex"),inputValue:t.inputValue};break;case rw:o={selectedItem:t.selectedItem,inputValue:n.itemToString(t.selectedItem)};break;case nw:o={inputValue:t.inputValue};break;default:return eZ(e,t,Z2)}return{...e,...o}}eo.stateChangeTypes=Z2;function eo(e){e===void 0&&(e={}),J2(e,eo);const t={...oZ,...e},{initialIsOpen:r,defaultIsOpen:n,items:i,scrollIntoView:o,environment:a,getA11yStatusMessage:u,getA11ySelectionMessage:c,itemToString:d}=t,f=rZ(t),[h,p]=iZ(aZ,f,t),{isOpen:v,highlightedIndex:m,selectedItem:y,inputValue:b}=h,x=A.useRef(null),w=A.useRef({}),S=A.useRef(null),E=A.useRef(null),_=A.useRef(null),R=A.useRef(!0),P=GX(t),N=A.useRef(),j=B2({state:h,props:t}),L=A.useCallback(K=>w.current[P.getItemId(K)],[P]);gN(u,[v,m,b,i],{isInitialMount:R.current,previousResultCount:N.current,items:i,environment:a,itemToString:d,...h}),gN(c,[y],{isInitialMount:R.current,previousResultCount:N.current,items:i,environment:a,itemToString:d,...h});const F=QX({menuElement:x.current,highlightedIndex:m,isOpen:v,itemRefs:w,scrollIntoView:o,getItemNodeFromIndex:L});$2({isInitialMount:R.current,props:t,state:h}),A.useEffect(()=>{(r||n||v)&&S.current&&S.current.focus()},[]),A.useEffect(()=>{R.current||(N.current=i.length)});const k=JX(v,[_,x,E],a,()=>{p({type:hc,selectItem:!1})}),D=F2("getInputProps","getComboboxProps","getMenuProps");A.useEffect(()=>{R.current=!1},[]),A.useEffect(()=>{v||(w.current={})},[v]);const T=A.useMemo(()=>({ArrowDown(K){K.preventDefault(),p({type:Kx,shiftKey:K.shiftKey,getItemNodeFromIndex:L})},ArrowUp(K){K.preventDefault(),p({type:Yx,shiftKey:K.shiftKey,getItemNodeFromIndex:L})},Home(K){j.current.state.isOpen&&(K.preventDefault(),p({type:Zx,getItemNodeFromIndex:L}))},End(K){j.current.state.isOpen&&(K.preventDefault(),p({type:Jx,getItemNodeFromIndex:L}))},Escape(K){const ie=j.current.state;(ie.isOpen||ie.inputValue||ie.selectedItem||ie.highlightedIndex>-1)&&(K.preventDefault(),p({type:Xx}))},Enter(K){const ie=j.current.state;!ie.isOpen||ie.highlightedIndex<0||K.which===229||(K.preventDefault(),p({type:Qx,getItemNodeFromIndex:L}))}}),[p,j,L]),B=A.useCallback(K=>({id:P.labelId,htmlFor:P.inputId,...K}),[P]),$=A.useCallback(function(K,ie){let{onMouseLeave:ne,refKey:ue="ref",ref:de,...we}=K===void 0?{}:K,{suppressRefError:Se=!1}=ie===void 0?{}:ie;return D("getMenuProps",Se,ue,x),{[ue]:ai(de,_e=>{x.current=_e}),id:P.menuId,role:"listbox","aria-labelledby":P.labelId,onMouseLeave:Ot(ne,()=>{p({type:z2})}),...we}},[p,D,P]),W=A.useCallback(function(K){let{item:ie,index:ne,refKey:ue="ref",ref:de,onMouseMove:we,onMouseDown:Se,onClick:_e,onPress:he,disabled:ae,...Oe}=K===void 0?{}:K;const{props:Ne,state:He}=j.current,qe=KX(ne,ie,Ne.items);if(qe<0)throw new Error("Pass either item or item index in getItemProps!");const Xe="onClick",We=_e,mt=()=>{ne!==He.highlightedIndex&&(F.current=!1,p({type:H2,index:ne,disabled:ae}))},et=()=>{p({type:tw,index:ne})},Tt=ut=>ut.preventDefault();return{[ue]:ai(de,ut=>{ut&&(w.current[P.getItemId(qe)]=ut)}),disabled:ae,role:"option","aria-selected":`${qe===He.highlightedIndex}`,id:P.getItemId(qe),...!ae&&{[Xe]:Ot(We,et)},onMouseMove:Ot(we,mt),onMouseDown:Ot(Se,Tt),...Oe}},[p,j,F,P]),Y=A.useCallback(function(K){let{onClick:ie,onPress:ne,refKey:ue="ref",ref:de,...we}=K===void 0?{}:K;const Se=()=>{p({type:U2}),!j.current.state.isOpen&&S.current&&S.current.focus()};return{[ue]:ai(de,_e=>{E.current=_e}),id:P.toggleButtonId,tabIndex:-1,...!we.disabled&&{onClick:Ot(ie,Se)},...we}},[p,j,P]),ee=A.useCallback(function(K,ie){let{onKeyDown:ne,onChange:ue,onInput:de,onBlur:we,onChangeText:Se,refKey:_e="ref",ref:he,...ae}=K===void 0?{}:K,{suppressRefError:Oe=!1}=ie===void 0?{}:ie;D("getInputProps",Oe,_e,S);const Ne=j.current.state,He=et=>{const Tt=Hb(et);Tt&&T[Tt]&&T[Tt](et)},qe=et=>{p({type:ew,inputValue:et.target.value})},Xe=()=>{Ne.isOpen&&!k.current.isMouseDown&&p({type:hc,selectItem:!0})},We="onChange";let mt={};return ae.disabled||(mt={[We]:Ot(ue,de,qe),onKeyDown:Ot(ne,He),onBlur:Ot(we,Xe)}),{[_e]:ai(he,et=>{S.current=et}),id:P.inputId,"aria-autocomplete":"list","aria-controls":P.menuId,...Ne.isOpen&&Ne.highlightedIndex>-1&&{"aria-activedescendant":P.getItemId(Ne.highlightedIndex)},"aria-labelledby":P.labelId,autoComplete:"off",value:Ne.inputValue,...mt,...ae}},[p,T,j,k,D,P]),H=A.useCallback(function(K,ie){let{refKey:ne="ref",ref:ue,...de}=K===void 0?{}:K,{suppressRefError:we=!1}=ie===void 0?{}:ie;return D("getComboboxProps",we,ne,_),{[ne]:ai(ue,Se=>{_.current=Se}),role:"combobox","aria-haspopup":"listbox","aria-owns":P.menuId,"aria-expanded":j.current.state.isOpen,...de}},[j,D,P]),Q=A.useCallback(()=>{p({type:V2})},[p]),ce=A.useCallback(()=>{p({type:G2})},[p]),se=A.useCallback(()=>{p({type:W2})},[p]),z=A.useCallback(K=>{p({type:K2,highlightedIndex:K})},[p]),G=A.useCallback(K=>{p({type:rw,selectedItem:K})},[p]),J=A.useCallback(K=>{p({type:Y2,inputValue:K})},[p]),V=A.useCallback(()=>{p({type:X2})},[p]);return{getItemProps:W,getLabelProps:B,getMenuProps:$,getInputProps:ee,getComboboxProps:H,getToggleButtonProps:Y,toggleMenu:Q,openMenu:se,closeMenu:ce,setHighlightedIndex:z,setInputValue:J,selectItem:G,reset:V,highlightedIndex:m,isOpen:v,selectedItem:y,inputValue:b}}le.array,le.array,le.array,le.func,le.func,le.func,le.number,le.number,le.number,le.func,le.func,le.string,le.string,le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})});Ra.itemToString,Ra.stateReducer,Ra.environment;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;var Ea={exports:{}};/**
40
+ */var uN;function NX(){return uN||(uN=1,process.env.NODE_ENV!=="production"&&(function(){var e=60103,t=60106,r=60107,n=60108,i=60114,o=60109,a=60110,u=60112,c=60113,d=60120,f=60115,h=60116,p=60121,v=60122,m=60117,y=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;e=x("react.element"),t=x("react.portal"),r=x("react.fragment"),n=x("react.strict_mode"),i=x("react.profiler"),o=x("react.provider"),a=x("react.context"),u=x("react.forward_ref"),c=x("react.suspense"),d=x("react.suspense_list"),f=x("react.memo"),h=x("react.lazy"),p=x("react.block"),v=x("react.server.block"),m=x("react.fundamental"),x("react.scope"),x("react.opaque.id"),y=x("react.debug_trace_mode"),x("react.offscreen"),b=x("react.legacy_hidden")}var w=!1;function S(ue){return!!(typeof ue=="string"||typeof ue=="function"||ue===r||ue===i||ue===y||ue===n||ue===c||ue===d||ue===b||w||typeof ue=="object"&&ue!==null&&(ue.$$typeof===h||ue.$$typeof===f||ue.$$typeof===o||ue.$$typeof===a||ue.$$typeof===u||ue.$$typeof===m||ue.$$typeof===p||ue[0]===v))}function E(ue){if(typeof ue=="object"&&ue!==null){var de=ue.$$typeof;switch(de){case e:var we=ue.type;switch(we){case r:case i:case n:case c:case d:return we;default:var Se=we&&we.$$typeof;switch(Se){case a:case u:case h:case f:case o:return Se;default:return de}}case t:return de}}}var _=a,R=o,P=e,N=u,j=r,L=h,F=f,k=t,D=i,T=n,B=c,$=!1,W=!1;function Y(ue){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ee(ue){return W||(W=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(ue){return E(ue)===a}function Q(ue){return E(ue)===o}function ce(ue){return typeof ue=="object"&&ue!==null&&ue.$$typeof===e}function se(ue){return E(ue)===u}function z(ue){return E(ue)===r}function G(ue){return E(ue)===h}function J(ue){return E(ue)===f}function V(ue){return E(ue)===t}function K(ue){return E(ue)===i}function ie(ue){return E(ue)===n}function ne(ue){return E(ue)===c}Qe.ContextConsumer=_,Qe.ContextProvider=R,Qe.Element=P,Qe.ForwardRef=N,Qe.Fragment=j,Qe.Lazy=L,Qe.Memo=F,Qe.Portal=k,Qe.Profiler=D,Qe.StrictMode=T,Qe.Suspense=B,Qe.isAsyncMode=Y,Qe.isConcurrentMode=ee,Qe.isContextConsumer=H,Qe.isContextProvider=Q,Qe.isElement=ce,Qe.isForwardRef=se,Qe.isFragment=z,Qe.isLazy=G,Qe.isMemo=J,Qe.isPortal=V,Qe.isProfiler=K,Qe.isStrictMode=ie,Qe.isSuspense=ne,Qe.isValidElementType=S,Qe.typeOf=E})()),Qe}var cN;function TX(){return cN||(cN=1,process.env.NODE_ENV==="production"?Eu.exports=IX():Eu.exports=NX()),Eu.exports}var lN=TX();function fN(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function dN(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function Lm(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return dN(r.overflowY,t)||dN(r.overflowX,t)||(function(n){var i=(function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(e)}return!1}function Su(e,t,r,n,i,o,a,u){return o<e&&a>t||o>e&&a<t?0:o<=e&&u<=r||a>=t&&u>=r?o-e-n:a>t&&u<r||o<e&&u>r?a-t+i:0}var AX=function(e,t){var r=window,n=t.inline,i=t.boundary,o=t.skipOverflowHiddenElements,a=typeof i=="function"?i:function(de){return de!==i};if(!fN(e))throw new TypeError("Invalid target");for(var u,c,d=document.scrollingElement||document.documentElement,f=[],h=e;fN(h)&&a(h);){if((h=(c=(u=h).parentElement)==null?u.getRootNode().host||null:c)===d){f.push(h);break}h!=null&&h===document.body&&Lm(h)&&!Lm(document.documentElement)||h!=null&&Lm(h,o)&&f.push(h)}for(var p=r.visualViewport?r.visualViewport.width:innerWidth,v=r.visualViewport?r.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),x=b.height,w=b.width,S=b.top,E=b.right,_=b.bottom,R=b.left,P=S,N=n==="center"?R+w/2:n==="end"?E:R,j=[],L=0;L<f.length;L++){var F=f[L],k=F.getBoundingClientRect(),D=k.height,T=k.width,B=k.top,$=k.right,W=k.bottom,Y=k.left;if(S>=0&&R>=0&&_<=v&&E<=p&&S>=B&&_<=W&&R>=Y&&E<=$)return j;var ee=getComputedStyle(F),H=parseInt(ee.borderLeftWidth,10),Q=parseInt(ee.borderTopWidth,10),ce=parseInt(ee.borderRightWidth,10),se=parseInt(ee.borderBottomWidth,10),z=0,G=0,J="offsetWidth"in F?F.offsetWidth-F.clientWidth-H-ce:0,V="offsetHeight"in F?F.offsetHeight-F.clientHeight-Q-se:0,K="offsetWidth"in F?F.offsetWidth===0?0:T/F.offsetWidth:0,ie="offsetHeight"in F?F.offsetHeight===0?0:D/F.offsetHeight:0;if(d===F)z=Su(y,y+v,v,Q,se,y+P,y+P+x,x),G=n==="start"?N:n==="center"?N-p/2:n==="end"?N-p:Su(m,m+p,p,H,ce,m+N,m+N+w,w),z=Math.max(0,z+y),G=Math.max(0,G+m);else{z=Su(B,W,D,Q,se+V,P,P+x,x),G=n==="start"?N-Y-H:n==="center"?N-(Y+T/2)+J/2:n==="end"?N-$+ce+J:Su(Y,$,T,H,ce+J,N,N+w,w);var ne=F.scrollLeft,ue=F.scrollTop;P+=ue-(z=Math.max(0,Math.min(ue+z/ie,F.scrollHeight-D/ie+V))),N+=ne-(G=Math.max(0,Math.min(ne+G/K,F.scrollWidth-T/K+J)))}j.push({el:F,top:z,left:G})}return j},uc=function(){return uc=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},uc.apply(this,arguments)};let MX=0;function hN(e){return typeof e=="function"?e:yr}function yr(){}function m2(e,t){if(!e)return;AX(e,{boundary:t}).forEach(n=>{let{el:i,top:o,left:a}=n;i.scrollTop=o,i.scrollLeft=a})}function pN(e,t,r){return e===t||t instanceof r.Node&&e.contains&&e.contains(t)}function Wx(e,t){let r;function n(){r&&clearTimeout(r)}function i(){for(var o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];n(),r=setTimeout(()=>{r=null,e(...a)},t)}return i.cancel=n,i}function Ot(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(u=>(u&&u(n,...o),n.preventDownshiftDefault||n.hasOwnProperty("nativeEvent")&&n.nativeEvent.preventDownshiftDefault))}}function ai(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n=>{t.forEach(i=>{typeof i=="function"?i(n):i&&(i.current=n)})}}function y2(){return String(MX++)}function b2(e){let{isOpen:t,resultCount:r,previousResultCount:n}=e;return t?r?r!==n?`${r} result${r===1?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function vN(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function x2(e){return typeof e.type=="string"}function w2(e){return e.props}function DX(e,t){console.error(`The property "${t}" is required in "${e}"`)}const jX=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Ou(e){e===void 0&&(e={});const t={};return jX.forEach(r=>{e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function cc(e,t){return Object.keys(e).reduce((r,n)=>(r[n]=lc(t,n)?t[n]:e[n],r),{})}function lc(e,t){return e[t]!==void 0}function Ub(e){const{key:t,keyCode:r}=e;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?`Arrow${t}`:t}function qX(e){return Object.prototype.toString.call(e)==="[object Object]"}function ao(e,t,r,n,i){if(i===void 0&&(i=!0),r===0)return-1;const o=r-1;(typeof t!="number"||t<0||t>=r)&&(t=e>0?-1:o+1);let a=t+e;a<0?a=i?o:0:a>o&&(a=i?0:o);const u=bi(e,a,r,n,i);return u===-1?t>=r?-1:t:u}function bi(e,t,r,n,i){const o=n(t);if(!o||!o.hasAttribute("disabled"))return t;if(e>0){for(let a=t+1;a<r;a++)if(!n(a).hasAttribute("disabled"))return a}else for(let a=t-1;a>=0;a--)if(!n(a).hasAttribute("disabled"))return a;return i?e>0?bi(1,0,r,n,!1):bi(-1,r-1,r,n,!1):-1}function fc(e,t,r,n){return n===void 0&&(n=!0),t.some(i=>i&&(pN(i,e,r)||n&&pN(i,r.document.activeElement,r)))}let Gx=yr;process.env.NODE_ENV!=="production"&&(Gx=(e,t,r)=>{const n="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(e).forEach(i=>{t[i]!==void 0&&r[i]===void 0?console.error(`downshift: A component has changed the controlled prop "${i}" to be uncontrolled. ${n}`):t[i]===void 0&&r[i]!==void 0&&console.error(`downshift: A component has changed the uncontrolled prop "${i}" to be controlled. ${n}`)})});const kX=Wx(e=>{E2(e).textContent=""},500);function _2(e,t){const r=E2(t);e&&(r.textContent=e,kX(t))}function E2(e){e===void 0&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const S2=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,O2=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,C2=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,Lu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Bu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,R2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,P2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,I2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,N2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,T2=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,A2=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,M2=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,D2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,Vb=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,j2=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,q2=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,k2=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16;var LX=Object.freeze({__proto__:null,unknown:S2,mouseUp:O2,itemMouseEnter:C2,keyDownArrowUp:Lu,keyDownArrowDown:Bu,keyDownEscape:R2,keyDownEnter:P2,keyDownHome:I2,keyDownEnd:N2,clickItem:T2,blurInput:A2,changeInput:M2,keyDownSpaceButton:D2,clickButton:Vb,blurButton:j2,controlledPropUpdatedSelectedItem:q2,touchEnd:k2});const BX=(()=>{class e extends A.Component{constructor(r){var n;super(r),n=this,this.id=this.props.id||`downshift-${y2()}`,this.menuId=this.props.menuId||`${this.id}-menu`,this.labelId=this.props.labelId||`${this.id}-label`,this.inputId=this.props.inputId||`${this.id}-input`,this.getItemId=this.props.getItemId||(h=>`${this.id}-item-${h}`),this.input=null,this.items=[],this.itemCount=null,this.previousResultCount=0,this.timeoutIds=[],this.internalSetTimeout=(h,p)=>{const v=setTimeout(()=>{this.timeoutIds=this.timeoutIds.filter(m=>m!==v),h()},p);this.timeoutIds.push(v)},this.setItemCount=h=>{this.itemCount=h},this.unsetItemCount=()=>{this.itemCount=null},this.setHighlightedIndex=function(h,p){h===void 0&&(h=n.props.defaultHighlightedIndex),p===void 0&&(p={}),p=Ou(p),n.internalSetState({highlightedIndex:h,...p})},this.clearSelection=h=>{this.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:this.props.defaultHighlightedIndex,isOpen:this.props.defaultIsOpen},h)},this.selectItem=(h,p,v)=>{p=Ou(p),this.internalSetState({isOpen:this.props.defaultIsOpen,highlightedIndex:this.props.defaultHighlightedIndex,selectedItem:h,inputValue:this.props.itemToString(h),...p},v)},this.selectItemAtIndex=(h,p,v)=>{const m=this.items[h];m!=null&&this.selectItem(m,p,v)},this.selectHighlightedItem=(h,p)=>this.selectItemAtIndex(this.getState().highlightedIndex,h,p),this.internalSetState=(h,p)=>{let v,m;const y={},b=typeof h=="function";return!b&&h.hasOwnProperty("inputValue")&&this.props.onInputValueChange(h.inputValue,{...this.getStateAndHelpers(),...h}),this.setState(x=>{x=this.getState(x);let w=b?h(x):h;w=this.props.stateReducer(x,w),v=w.hasOwnProperty("selectedItem");const S={};return v&&w.selectedItem!==x.selectedItem&&(m=w.selectedItem),w.type=w.type||S2,Object.keys(w).forEach(E=>{x[E]!==w[E]&&(y[E]=w[E]),E!=="type"&&(w[E],lc(this.props,E)||(S[E]=w[E]))}),b&&w.hasOwnProperty("inputValue")&&this.props.onInputValueChange(w.inputValue,{...this.getStateAndHelpers(),...w}),S},()=>{hN(p)(),Object.keys(y).length>1&&this.props.onStateChange(y,this.getStateAndHelpers()),v&&this.props.onSelect(h.selectedItem,this.getStateAndHelpers()),m!==void 0&&this.props.onChange(m,this.getStateAndHelpers()),this.props.onUserAction(y,this.getStateAndHelpers())})},this.rootRef=h=>this._rootNode=h,this.getRootProps=function(h,p){let{refKey:v="ref",ref:m,...y}=h===void 0?{}:h,{suppressRefError:b=!1}=p===void 0?{}:p;n.getRootProps.called=!0,n.getRootProps.refKey=v,n.getRootProps.suppressRefError=b;const{isOpen:x}=n.getState();return{[v]:ai(m,n.rootRef),role:"combobox","aria-expanded":x,"aria-haspopup":"listbox","aria-owns":x?n.menuId:null,"aria-labelledby":n.labelId,...y}},this.keyDownHandlers={ArrowDown(h){if(h.preventDefault(),this.getState().isOpen){const p=h.shiftKey?5:1;this.moveHighlightedIndex(p,{type:Bu})}else this.internalSetState({isOpen:!0,type:Bu},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=ao(1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:Bu})}})},ArrowUp(h){if(h.preventDefault(),this.getState().isOpen){const p=h.shiftKey?-5:-1;this.moveHighlightedIndex(p,{type:Lu})}else this.internalSetState({isOpen:!0,type:Lu},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=ao(-1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:Lu})}})},Enter(h){if(h.which===229)return;const{isOpen:p,highlightedIndex:v}=this.getState();if(p&&v!=null){h.preventDefault();const m=this.items[v],y=this.getItemNodeFromIndex(v);if(m==null||y&&y.hasAttribute("disabled"))return;this.selectHighlightedItem({type:P2})}},Escape(h){h.preventDefault(),this.reset({type:R2,...!this.state.isOpen&&{selectedItem:null,inputValue:""}})}},this.buttonKeyDownHandlers={...this.keyDownHandlers," "(h){h.preventDefault(),this.toggleMenu({type:D2})}},this.inputKeyDownHandlers={...this.keyDownHandlers,Home(h){const{isOpen:p}=this.getState();if(!p)return;h.preventDefault();const v=this.getItemCount();if(v<=0||!p)return;const m=bi(1,0,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:I2})},End(h){const{isOpen:p}=this.getState();if(!p)return;h.preventDefault();const v=this.getItemCount();if(v<=0||!p)return;const m=bi(-1,v-1,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:N2})}},this.getToggleButtonProps=function(h){let{onClick:p,onPress:v,onKeyDown:m,onKeyUp:y,onBlur:b,...x}=h===void 0?{}:h;const{isOpen:w}=n.getState(),S={onClick:Ot(p,n.buttonHandleClick),onKeyDown:Ot(m,n.buttonHandleKeyDown),onKeyUp:Ot(y,n.buttonHandleKeyUp),onBlur:Ot(b,n.buttonHandleBlur)},E=x.disabled?{}:S;return{type:"button",role:"button","aria-label":w?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0,...E,...x}},this.buttonHandleKeyUp=h=>{h.preventDefault()},this.buttonHandleKeyDown=h=>{const p=Ub(h);this.buttonKeyDownHandlers[p]&&this.buttonKeyDownHandlers[p].call(this,h)},this.buttonHandleClick=h=>{h.preventDefault(),this.props.environment.document.activeElement===this.props.environment.document.body&&h.target.focus(),process.env.NODE_ENV==="test"?this.toggleMenu({type:Vb}):this.internalSetTimeout(()=>this.toggleMenu({type:Vb}))},this.buttonHandleBlur=h=>{const p=h.target;this.internalSetTimeout(()=>{!this.isMouseDown&&(this.props.environment.document.activeElement==null||this.props.environment.document.activeElement.id!==this.inputId)&&this.props.environment.document.activeElement!==p&&this.reset({type:j2})})},this.getLabelProps=h=>({htmlFor:this.inputId,id:this.labelId,...h}),this.getInputProps=function(h){let{onKeyDown:p,onBlur:v,onChange:m,onInput:y,onChangeText:b,...x}=h===void 0?{}:h,w,S={};w="onChange";const{inputValue:E,isOpen:_,highlightedIndex:R}=n.getState();return x.disabled||(S={[w]:Ot(m,y,n.inputHandleChange),onKeyDown:Ot(p,n.inputHandleKeyDown),onBlur:Ot(v,n.inputHandleBlur)}),{"aria-autocomplete":"list","aria-activedescendant":_&&typeof R=="number"&&R>=0?n.getItemId(R):null,"aria-controls":_?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:E,id:n.inputId,...S,...x}},this.inputHandleKeyDown=h=>{const p=Ub(h);p&&this.inputKeyDownHandlers[p]&&this.inputKeyDownHandlers[p].call(this,h)},this.inputHandleChange=h=>{this.internalSetState({type:M2,isOpen:!0,inputValue:h.target.value,highlightedIndex:this.props.defaultHighlightedIndex})},this.inputHandleBlur=()=>{this.internalSetTimeout(()=>{const h=this.props.environment.document&&!!this.props.environment.document.activeElement&&!!this.props.environment.document.activeElement.dataset&&this.props.environment.document.activeElement.dataset.toggle&&this._rootNode&&this._rootNode.contains(this.props.environment.document.activeElement);!this.isMouseDown&&!h&&this.reset({type:A2})})},this.menuRef=h=>{this._menuNode=h},this.getMenuProps=function(h,p){let{refKey:v="ref",ref:m,...y}=h===void 0?{}:h,{suppressRefError:b=!1}=p===void 0?{}:p;return n.getMenuProps.called=!0,n.getMenuProps.refKey=v,n.getMenuProps.suppressRefError=b,{[v]:ai(m,n.menuRef),role:"listbox","aria-labelledby":y&&y["aria-label"]?null:n.labelId,id:n.menuId,...y}},this.getItemProps=function(h){let{onMouseMove:p,onMouseDown:v,onClick:m,onPress:y,index:b,item:x=process.env.NODE_ENV==="production"?void 0:DX("getItemProps","item"),...w}=h===void 0?{}:h;b===void 0?(n.items.push(x),b=n.items.indexOf(x)):n.items[b]=x;const S="onClick",E=m,_={onMouseMove:Ot(p,()=>{b!==n.getState().highlightedIndex&&(n.setHighlightedIndex(b,{type:C2}),n.avoidScrolling=!0,n.internalSetTimeout(()=>n.avoidScrolling=!1,250))}),onMouseDown:Ot(v,P=>{P.preventDefault()}),[S]:Ot(E,()=>{n.selectItemAtIndex(b,{type:T2})})},R=w.disabled?{onMouseDown:_.onMouseDown}:_;return{id:n.getItemId(b),role:"option","aria-selected":n.getState().highlightedIndex===b,...R,...w}},this.clearItems=()=>{this.items=[]},this.reset=function(h,p){h===void 0&&(h={}),h=Ou(h),n.internalSetState(v=>{let{selectedItem:m}=v;return{isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(m),...h}},p)},this.toggleMenu=function(h,p){h===void 0&&(h={}),h=Ou(h),n.internalSetState(v=>{let{isOpen:m}=v;return{isOpen:!m,...m&&{highlightedIndex:n.props.defaultHighlightedIndex},...h}},()=>{const{isOpen:v,highlightedIndex:m}=n.getState();v&&n.getItemCount()>0&&typeof m=="number"&&n.setHighlightedIndex(m,h),hN(p)()})},this.openMenu=h=>{this.internalSetState({isOpen:!0},h)},this.closeMenu=h=>{this.internalSetState({isOpen:!1},h)},this.updateStatus=Wx(()=>{const h=this.getState(),p=this.items[h.highlightedIndex],v=this.getItemCount(),m=this.props.getA11yStatusMessage({itemToString:this.props.itemToString,previousResultCount:this.previousResultCount,resultCount:v,highlightedItem:p,...h});this.previousResultCount=v,_2(m,this.props.environment.document)},200);const{defaultHighlightedIndex:i,initialHighlightedIndex:o=i,defaultIsOpen:a,initialIsOpen:u=a,initialInputValue:c="",initialSelectedItem:d=null}=this.props,f=this.getState({highlightedIndex:o,isOpen:u,inputValue:c,selectedItem:d});f.selectedItem!=null&&this.props.initialInputValue===void 0&&(f.inputValue=this.props.itemToString(f.selectedItem)),this.state=f}internalClearTimeouts(){this.timeoutIds.forEach(r=>{clearTimeout(r)}),this.timeoutIds=[]}getState(r){return r===void 0&&(r=this.state),cc(r,this.props)}getItemCount(){let r=this.items.length;return this.itemCount!=null?r=this.itemCount:this.props.itemCount!==void 0&&(r=this.props.itemCount),r}getItemNodeFromIndex(r){return this.props.environment.document.getElementById(this.getItemId(r))}scrollHighlightedItemIntoView(){{const r=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(r,this._menuNode)}}moveHighlightedIndex(r,n){const i=this.getItemCount(),{highlightedIndex:o}=this.getState();if(i>0){const a=ao(r,o,i,u=>this.getItemNodeFromIndex(u));this.setHighlightedIndex(a,n)}}getStateAndHelpers(){const{highlightedIndex:r,inputValue:n,selectedItem:i,isOpen:o}=this.getState(),{itemToString:a}=this.props,{id:u}=this,{getRootProps:c,getToggleButtonProps:d,getLabelProps:f,getMenuProps:h,getInputProps:p,getItemProps:v,openMenu:m,closeMenu:y,toggleMenu:b,selectItem:x,selectItemAtIndex:w,selectHighlightedItem:S,setHighlightedIndex:E,clearSelection:_,clearItems:R,reset:P,setItemCount:N,unsetItemCount:j,internalSetState:L}=this;return{getRootProps:c,getToggleButtonProps:d,getLabelProps:f,getMenuProps:h,getInputProps:p,getItemProps:v,reset:P,openMenu:m,closeMenu:y,toggleMenu:b,selectItem:x,selectItemAtIndex:w,selectHighlightedItem:S,setHighlightedIndex:E,clearSelection:_,clearItems:R,setItemCount:N,unsetItemCount:j,setState:L,itemToString:a,id:u,highlightedIndex:r,inputValue:n,isOpen:o,selectedItem:i}}componentDidMount(){process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&gN(this._menuNode,this.getMenuProps);{const r=()=>{this.isMouseDown=!0},n=c=>{this.isMouseDown=!1,!fc(c.target,[this._rootNode,this._menuNode],this.props.environment)&&this.getState().isOpen&&this.reset({type:O2},()=>this.props.onOuterClick(this.getStateAndHelpers()))},i=()=>{this.isTouchMove=!1},o=()=>{this.isTouchMove=!0},a=c=>{const d=fc(c.target,[this._rootNode,this._menuNode],this.props.environment,!1);!this.isTouchMove&&!d&&this.getState().isOpen&&this.reset({type:k2},()=>this.props.onOuterClick(this.getStateAndHelpers()))},{environment:u}=this.props;u.addEventListener("mousedown",r),u.addEventListener("mouseup",n),u.addEventListener("touchstart",i),u.addEventListener("touchmove",o),u.addEventListener("touchend",a),this.cleanup=()=>{this.internalClearTimeouts(),this.updateStatus.cancel(),u.removeEventListener("mousedown",r),u.removeEventListener("mouseup",n),u.removeEventListener("touchstart",i),u.removeEventListener("touchmove",o),u.removeEventListener("touchend",a)}}}shouldScroll(r,n){const{highlightedIndex:i}=this.props.highlightedIndex===void 0?this.getState():this.props,{highlightedIndex:o}=n.highlightedIndex===void 0?r:n;return i&&this.getState().isOpen&&!r.isOpen||i!==o}componentDidUpdate(r,n){process.env.NODE_ENV!=="production"&&(Gx(this.state,r,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&gN(this._menuNode,this.getMenuProps)),lc(this.props,"selectedItem")&&this.props.selectedItemChanged(r.selectedItem,this.props.selectedItem)&&this.internalSetState({type:q2,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(n,r)&&this.scrollHighlightedItemIntoView(),this.updateStatus()}componentWillUnmount(){this.cleanup()}render(){const r=vN(this.props.children,yr);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;const n=vN(r(this.getStateAndHelpers()));if(!n)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&FX(n,this.getRootProps),n;if(x2(n))return A.cloneElement(n,this.getRootProps(w2(n)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")}}return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:b2,itemToString:t=>t==null?"":(process.env.NODE_ENV!=="production"&&qX(t)&&!t.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",t),String(t)),onStateChange:yr,onInputValueChange:yr,onUserAction:yr,onChange:yr,onSelect:yr,onOuterClick:yr,selectedItemChanged:(t,r)=>t!==r,environment:typeof window>"u"?{}:window,stateReducer:(t,r)=>r,suppressRefError:!1,scrollIntoView:m2},e.stateChangeTypes=LX,e})();process.env.NODE_ENV!=="production"&&(BX.propTypes={children:le.func,defaultHighlightedIndex:le.number,defaultIsOpen:le.bool,initialHighlightedIndex:le.number,initialSelectedItem:le.any,initialInputValue:le.string,initialIsOpen:le.bool,getA11yStatusMessage:le.func,itemToString:le.func,onChange:le.func,onSelect:le.func,onStateChange:le.func,onInputValueChange:le.func,onUserAction:le.func,onOuterClick:le.func,selectedItemChanged:le.func,stateReducer:le.func,itemCount:le.number,id:le.string,environment:le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})}),suppressRefError:le.bool,scrollIntoView:le.func,selectedItem:le.any,isOpen:le.bool,inputValue:le.string,highlightedIndex:le.number,labelId:le.string,inputId:le.string,menuId:le.string,getItemId:le.func});function gN(e,t){let{refKey:r}=t;e||console.error(`downshift: The ref prop "${r}" from getMenuProps was not applied correctly on your menu element.`)}function FX(e,t){let{refKey:r}=t;const n=r!=="ref",i=!x2(e);i&&!n&&!lN.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!i&&n&&console.error(`downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "${r}"`),!lN.isForwardRef(e)&&!w2(e)[r]&&console.error(`downshift: You must apply the ref prop "${r}" from getRootProps onto your root element.`)}const L2={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function $X(e,t,r){const{props:n,type:i}=e,o={};Object.keys(t).forEach(a=>{zX(a,e,t,r),r[a]!==t[a]&&(o[a]=r[a])}),n.onStateChange&&Object.keys(o).length&&n.onStateChange({type:i,...o})}function zX(e,t,r,n){const{props:i,type:o}=t,a=`on${Kx(e)}Change`;i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a]({type:o,...n})}function HX(e,t){return t.changes}function UX(e){const{selectedItem:t,itemToString:r}=e;return t?`${r(t)} has been selected.`:""}const VX=Wx((e,t)=>{_2(e(),t)},200),WX=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?A.useLayoutEffect:A.useEffect;function GX(e){let{id:t=`downshift-${y2()}`,labelId:r,menuId:n,getItemId:i,toggleButtonId:o,inputId:a}=e;return A.useRef({labelId:r||`${t}-label`,menuId:n||`${t}-menu`,getItemId:i||(c=>`${t}-item-${c}`),toggleButtonId:o||`${t}-toggle-button`,inputId:a||`${t}-input`}).current}function KX(e,t,r){return e!==void 0?e:r.length===0?-1:r.indexOf(t)}function YX(e){return e?String(e):""}function Kx(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function B2(e){const t=A.useRef(e);return t.current=e,t}function XX(e,t,r){const n=A.useRef(),i=A.useRef(),o=A.useCallback((h,p)=>{i.current=p,h=cc(h,p.props);const v=e(h,p);return p.props.stateReducer(h,{...p,changes:v})},[e]),[a,u]=A.useReducer(o,t),c=B2(r),d=A.useCallback(h=>u({props:c.current,...h}),[c]),f=i.current;return A.useEffect(()=>{f&&n.current&&n.current!==a&&$X(f,cc(n.current,f.props),a),n.current=a},[a,r,f]),[a,d]}const Ra={itemToString:YX,stateReducer:HX,getA11ySelectionMessage:UX,scrollIntoView:m2,circularNavigation:!1,environment:typeof window>"u"?{}:window};function Xr(e,t,r){r===void 0&&(r=L2);const n=e[`default${Kx(t)}`];return n!==void 0?n:r[t]}function Cu(e,t,r){r===void 0&&(r=L2);const n=e[t];if(n!==void 0)return n;const i=e[`initial${Kx(t)}`];return i!==void 0?i:Xr(e,t,r)}function ZX(e){const t=Cu(e,"selectedItem"),r=Cu(e,"isOpen"),n=Cu(e,"highlightedIndex"),i=Cu(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.indexOf(t):n,isOpen:r,selectedItem:t,inputValue:i}}function dc(e,t,r,n){const{items:i,initialHighlightedIndex:o,defaultHighlightedIndex:a}=e,{selectedItem:u,highlightedIndex:c}=t;return i.length===0?-1:o!==void 0&&c===o?o:a!==void 0?a:u?r===0?i.indexOf(u):ao(r,i.indexOf(u),i.length,n,!1):r===0?-1:r<0?i.length-1:0}function JX(e,t,r,n){const i=A.useRef({isMouseDown:!1,isTouchMove:!1});return A.useEffect(()=>{const o=()=>{i.current.isMouseDown=!0},a=f=>{i.current.isMouseDown=!1,e&&!fc(f.target,t.map(h=>h.current),r)&&n()},u=()=>{i.current.isTouchMove=!1},c=()=>{i.current.isTouchMove=!0},d=f=>{e&&!i.current.isTouchMove&&!fc(f.target,t.map(h=>h.current),r,!1)&&n()};return r.addEventListener("mousedown",o),r.addEventListener("mouseup",a),r.addEventListener("touchstart",u),r.addEventListener("touchmove",c),r.addEventListener("touchend",d),function(){r.removeEventListener("mousedown",o),r.removeEventListener("mouseup",a),r.removeEventListener("touchstart",u),r.removeEventListener("touchmove",c),r.removeEventListener("touchend",d)}},[e,r]),i}let F2=()=>yr;process.env.NODE_ENV!=="production"&&(F2=function(){const e=A.useRef(!0);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const i=A.useRef(r.reduce((a,u)=>(a[u]={},a),{}));return A.useEffect(()=>{Object.keys(i.current).forEach(a=>{const u=i.current[a];if(e.current&&!Object.keys(u).length){console.error(`downshift: You forgot to call the ${a} getter function on your component / element.`);return}const{suppressRefError:c,refKey:d,elementRef:f}=u;(!f||!f.current)&&!c&&console.error(`downshift: The ref prop "${d}" from ${a} was not applied correctly on your element.`)}),e.current=!1}),A.useCallback((a,u,c,d)=>{i.current[a]={suppressRefError:u,refKey:c,elementRef:d}},[])});function mN(e,t,r){let{isInitialMount:n,highlightedIndex:i,items:o,environment:a,...u}=r;A.useEffect(()=>{n||VX(()=>e({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length,...u}),a.document)},t)}function QX(e){let{highlightedIndex:t,isOpen:r,itemRefs:n,getItemNodeFromIndex:i,menuElement:o,scrollIntoView:a}=e;const u=A.useRef(!0);return WX(()=>{t<0||!r||!Object.keys(n.current).length||(u.current===!1?u.current=!0:a(i(t),o))},[t]),u}let $2=yr;process.env.NODE_ENV!=="production"&&($2=e=>{let{isInitialMount:t,props:r,state:n}=e;const i=A.useRef(r);A.useEffect(()=>{t||(Gx(n,i.current,r),i.current=r)},[n,r,t])});function eZ(e,t,r){const{type:n,props:i}=t;let o;switch(n){case r.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case r.MenuMouseLeave:o={highlightedIndex:-1};break;case r.ToggleButtonClick:case r.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:dc(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:dc(i,e,0)};break;case r.FunctionCloseMenu:o={isOpen:!1};break;case r.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case r.FunctionSetInputValue:o={inputValue:t.inputValue};break;case r.FunctionReset:o={highlightedIndex:Xr(i,"highlightedIndex"),isOpen:Xr(i,"isOpen"),selectedItem:Xr(i,"selectedItem"),inputValue:Xr(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...o}}le.array.isRequired,le.func,le.func,le.func,le.bool,le.number,le.number,le.number,le.bool,le.bool,le.bool,le.any,le.any,le.any,le.string,le.string,le.string,le.func,le.string,le.func,le.func,le.func,le.func,le.func,le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})});function tZ(e){var t=e.isOpen,r=e.resultCount,n=e.previousResultCount;return t?r?r!==n?"".concat(r," result").concat(r===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}uc(uc({},Ra),{getA11yStatusMessage:tZ});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const Yx=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Xx=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Zx=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Jx=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Qx=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,ew=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":5,tw=process.env.NODE_ENV!=="production"?"__input_change__":6,hc=process.env.NODE_ENV!=="production"?"__input_blur__":7,z2=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":8,H2=process.env.NODE_ENV!=="production"?"__item_mouse_move__":9,rw=process.env.NODE_ENV!=="production"?"__item_click__":10,U2=process.env.NODE_ENV!=="production"?"__togglebutton_click__":11,V2=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":12,W2=process.env.NODE_ENV!=="production"?"__function_open_menu__":13,G2=process.env.NODE_ENV!=="production"?"__function_close_menu__":14,K2=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":15,nw=process.env.NODE_ENV!=="production"?"__function_select_item__":16,Y2=process.env.NODE_ENV!=="production"?"__function_set_input_value__":17,X2=process.env.NODE_ENV!=="production"?"__function_reset__":18,iw=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":19;var Z2=Object.freeze({__proto__:null,InputKeyDownArrowDown:Yx,InputKeyDownArrowUp:Xx,InputKeyDownEscape:Zx,InputKeyDownHome:Jx,InputKeyDownEnd:Qx,InputKeyDownEnter:ew,InputChange:tw,InputBlur:hc,MenuMouseLeave:z2,ItemMouseMove:H2,ItemClick:rw,ToggleButtonClick:U2,FunctionToggleMenu:V2,FunctionOpenMenu:W2,FunctionCloseMenu:G2,FunctionSetHighlightedIndex:K2,FunctionSelectItem:nw,FunctionSetInputValue:Y2,FunctionReset:X2,ControlledPropUpdatedSelectedItem:iw});function rZ(e){const t=ZX(e),{selectedItem:r}=t;let{inputValue:n}=t;return n===""&&r&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(n=e.itemToString(r)),{...t,inputValue:n}}const nZ={items:le.array.isRequired,itemToString:le.func,getA11yStatusMessage:le.func,getA11ySelectionMessage:le.func,circularNavigation:le.bool,highlightedIndex:le.number,defaultHighlightedIndex:le.number,initialHighlightedIndex:le.number,isOpen:le.bool,defaultIsOpen:le.bool,initialIsOpen:le.bool,selectedItem:le.any,initialSelectedItem:le.any,defaultSelectedItem:le.any,inputValue:le.string,defaultInputValue:le.string,initialInputValue:le.string,id:le.string,labelId:le.string,menuId:le.string,getItemId:le.func,inputId:le.string,toggleButtonId:le.string,stateReducer:le.func,onSelectedItemChange:le.func,onHighlightedIndexChange:le.func,onStateChange:le.func,onIsOpenChange:le.func,onInputValueChange:le.func,environment:le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})})};function iZ(e,t,r){const n=A.useRef(),[i,o]=XX(e,t,r);return A.useEffect(()=>{lc(r,"selectedItem")&&(n.current!==r.selectedItem&&o({type:iw,inputValue:r.itemToString(r.selectedItem)}),n.current=i.selectedItem===n.current?r.selectedItem:i.selectedItem)}),[cc(i,r),o]}let J2=yr;process.env.NODE_ENV!=="production"&&(J2=(e,t)=>{le.checkPropTypes(nZ,e,"prop",t.name)});const oZ={...Ra,getA11yStatusMessage:b2,circularNavigation:!0};function aZ(e,t){const{type:r,props:n,shiftKey:i}=t;let o;switch(r){case rw:o={isOpen:Xr(n,"isOpen"),highlightedIndex:Xr(n,"highlightedIndex"),selectedItem:n.items[t.index],inputValue:n.itemToString(n.items[t.index])};break;case Yx:e.isOpen?o={highlightedIndex:ao(i?5:1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:dc(n,e,1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case Xx:e.isOpen?o={highlightedIndex:ao(i?-5:-1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:dc(n,e,-1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case ew:o={...e.isOpen&&e.highlightedIndex>=0&&{selectedItem:n.items[e.highlightedIndex],isOpen:Xr(n,"isOpen"),highlightedIndex:Xr(n,"highlightedIndex"),inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case Zx:o={isOpen:!1,highlightedIndex:-1,...!e.isOpen&&{selectedItem:null,inputValue:""}};break;case Jx:o={highlightedIndex:bi(1,0,n.items.length,t.getItemNodeFromIndex,!1)};break;case Qx:o={highlightedIndex:bi(-1,n.items.length-1,n.items.length,t.getItemNodeFromIndex,!1)};break;case hc:o={isOpen:!1,highlightedIndex:-1,...e.highlightedIndex>=0&&t.selectItem&&{selectedItem:n.items[e.highlightedIndex],inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case tw:o={isOpen:!0,highlightedIndex:Xr(n,"highlightedIndex"),inputValue:t.inputValue};break;case nw:o={selectedItem:t.selectedItem,inputValue:n.itemToString(t.selectedItem)};break;case iw:o={inputValue:t.inputValue};break;default:return eZ(e,t,Z2)}return{...e,...o}}eo.stateChangeTypes=Z2;function eo(e){e===void 0&&(e={}),J2(e,eo);const t={...oZ,...e},{initialIsOpen:r,defaultIsOpen:n,items:i,scrollIntoView:o,environment:a,getA11yStatusMessage:u,getA11ySelectionMessage:c,itemToString:d}=t,f=rZ(t),[h,p]=iZ(aZ,f,t),{isOpen:v,highlightedIndex:m,selectedItem:y,inputValue:b}=h,x=A.useRef(null),w=A.useRef({}),S=A.useRef(null),E=A.useRef(null),_=A.useRef(null),R=A.useRef(!0),P=GX(t),N=A.useRef(),j=B2({state:h,props:t}),L=A.useCallback(K=>w.current[P.getItemId(K)],[P]);mN(u,[v,m,b,i],{isInitialMount:R.current,previousResultCount:N.current,items:i,environment:a,itemToString:d,...h}),mN(c,[y],{isInitialMount:R.current,previousResultCount:N.current,items:i,environment:a,itemToString:d,...h});const F=QX({menuElement:x.current,highlightedIndex:m,isOpen:v,itemRefs:w,scrollIntoView:o,getItemNodeFromIndex:L});$2({isInitialMount:R.current,props:t,state:h}),A.useEffect(()=>{(r||n||v)&&S.current&&S.current.focus()},[]),A.useEffect(()=>{R.current||(N.current=i.length)});const k=JX(v,[_,x,E],a,()=>{p({type:hc,selectItem:!1})}),D=F2("getInputProps","getComboboxProps","getMenuProps");A.useEffect(()=>{R.current=!1},[]),A.useEffect(()=>{v||(w.current={})},[v]);const T=A.useMemo(()=>({ArrowDown(K){K.preventDefault(),p({type:Yx,shiftKey:K.shiftKey,getItemNodeFromIndex:L})},ArrowUp(K){K.preventDefault(),p({type:Xx,shiftKey:K.shiftKey,getItemNodeFromIndex:L})},Home(K){j.current.state.isOpen&&(K.preventDefault(),p({type:Jx,getItemNodeFromIndex:L}))},End(K){j.current.state.isOpen&&(K.preventDefault(),p({type:Qx,getItemNodeFromIndex:L}))},Escape(K){const ie=j.current.state;(ie.isOpen||ie.inputValue||ie.selectedItem||ie.highlightedIndex>-1)&&(K.preventDefault(),p({type:Zx}))},Enter(K){const ie=j.current.state;!ie.isOpen||ie.highlightedIndex<0||K.which===229||(K.preventDefault(),p({type:ew,getItemNodeFromIndex:L}))}}),[p,j,L]),B=A.useCallback(K=>({id:P.labelId,htmlFor:P.inputId,...K}),[P]),$=A.useCallback(function(K,ie){let{onMouseLeave:ne,refKey:ue="ref",ref:de,...we}=K===void 0?{}:K,{suppressRefError:Se=!1}=ie===void 0?{}:ie;return D("getMenuProps",Se,ue,x),{[ue]:ai(de,_e=>{x.current=_e}),id:P.menuId,role:"listbox","aria-labelledby":P.labelId,onMouseLeave:Ot(ne,()=>{p({type:z2})}),...we}},[p,D,P]),W=A.useCallback(function(K){let{item:ie,index:ne,refKey:ue="ref",ref:de,onMouseMove:we,onMouseDown:Se,onClick:_e,onPress:he,disabled:ae,...Oe}=K===void 0?{}:K;const{props:Ne,state:He}=j.current,qe=KX(ne,ie,Ne.items);if(qe<0)throw new Error("Pass either item or item index in getItemProps!");const Xe="onClick",We=_e,mt=()=>{ne!==He.highlightedIndex&&(F.current=!1,p({type:H2,index:ne,disabled:ae}))},et=()=>{p({type:rw,index:ne})},Tt=ut=>ut.preventDefault();return{[ue]:ai(de,ut=>{ut&&(w.current[P.getItemId(qe)]=ut)}),disabled:ae,role:"option","aria-selected":`${qe===He.highlightedIndex}`,id:P.getItemId(qe),...!ae&&{[Xe]:Ot(We,et)},onMouseMove:Ot(we,mt),onMouseDown:Ot(Se,Tt),...Oe}},[p,j,F,P]),Y=A.useCallback(function(K){let{onClick:ie,onPress:ne,refKey:ue="ref",ref:de,...we}=K===void 0?{}:K;const Se=()=>{p({type:U2}),!j.current.state.isOpen&&S.current&&S.current.focus()};return{[ue]:ai(de,_e=>{E.current=_e}),id:P.toggleButtonId,tabIndex:-1,...!we.disabled&&{onClick:Ot(ie,Se)},...we}},[p,j,P]),ee=A.useCallback(function(K,ie){let{onKeyDown:ne,onChange:ue,onInput:de,onBlur:we,onChangeText:Se,refKey:_e="ref",ref:he,...ae}=K===void 0?{}:K,{suppressRefError:Oe=!1}=ie===void 0?{}:ie;D("getInputProps",Oe,_e,S);const Ne=j.current.state,He=et=>{const Tt=Ub(et);Tt&&T[Tt]&&T[Tt](et)},qe=et=>{p({type:tw,inputValue:et.target.value})},Xe=()=>{Ne.isOpen&&!k.current.isMouseDown&&p({type:hc,selectItem:!0})},We="onChange";let mt={};return ae.disabled||(mt={[We]:Ot(ue,de,qe),onKeyDown:Ot(ne,He),onBlur:Ot(we,Xe)}),{[_e]:ai(he,et=>{S.current=et}),id:P.inputId,"aria-autocomplete":"list","aria-controls":P.menuId,...Ne.isOpen&&Ne.highlightedIndex>-1&&{"aria-activedescendant":P.getItemId(Ne.highlightedIndex)},"aria-labelledby":P.labelId,autoComplete:"off",value:Ne.inputValue,...mt,...ae}},[p,T,j,k,D,P]),H=A.useCallback(function(K,ie){let{refKey:ne="ref",ref:ue,...de}=K===void 0?{}:K,{suppressRefError:we=!1}=ie===void 0?{}:ie;return D("getComboboxProps",we,ne,_),{[ne]:ai(ue,Se=>{_.current=Se}),role:"combobox","aria-haspopup":"listbox","aria-owns":P.menuId,"aria-expanded":j.current.state.isOpen,...de}},[j,D,P]),Q=A.useCallback(()=>{p({type:V2})},[p]),ce=A.useCallback(()=>{p({type:G2})},[p]),se=A.useCallback(()=>{p({type:W2})},[p]),z=A.useCallback(K=>{p({type:K2,highlightedIndex:K})},[p]),G=A.useCallback(K=>{p({type:nw,selectedItem:K})},[p]),J=A.useCallback(K=>{p({type:Y2,inputValue:K})},[p]),V=A.useCallback(()=>{p({type:X2})},[p]);return{getItemProps:W,getLabelProps:B,getMenuProps:$,getInputProps:ee,getComboboxProps:H,getToggleButtonProps:Y,toggleMenu:Q,openMenu:se,closeMenu:ce,setHighlightedIndex:z,setInputValue:J,selectItem:G,reset:V,highlightedIndex:m,isOpen:v,selectedItem:y,inputValue:b}}le.array,le.array,le.array,le.func,le.func,le.func,le.number,le.number,le.number,le.func,le.func,le.string,le.string,le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})});Ra.itemToString,Ra.stateReducer,Ra.environment;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;var Ea={exports:{}};/**
41
41
  * @license
42
42
  * Lodash <https://lodash.com/>
43
43
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
44
44
  * Released under MIT license <https://lodash.com/license>
45
45
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
46
46
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
47
- */var sZ=Ea.exports,mN;function uZ(){return mN||(mN=1,(function(e,t){(function(){var r,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",h=1,p=2,v=4,m=1,y=2,b=1,x=2,w=4,S=8,E=16,_=32,R=64,P=128,N=256,j=512,L=30,F="...",k=800,D=16,T=1,B=2,$=3,W=1/0,Y=9007199254740991,ee=17976931348623157e292,H=NaN,Q=4294967295,ce=Q-1,se=Q>>>1,z=[["ary",P],["bind",b],["bindKey",x],["curry",S],["curryRight",E],["flip",j],["partial",_],["partialRight",R],["rearg",N]],G="[object Arguments]",J="[object Array]",V="[object AsyncFunction]",K="[object Boolean]",ie="[object Date]",ne="[object DOMException]",ue="[object Error]",de="[object Function]",we="[object GeneratorFunction]",Se="[object Map]",_e="[object Number]",he="[object Null]",ae="[object Object]",Oe="[object Promise]",Ne="[object Proxy]",He="[object RegExp]",qe="[object Set]",Xe="[object String]",We="[object Symbol]",mt="[object Undefined]",et="[object WeakMap]",Tt="[object WeakSet]",ut="[object ArrayBuffer]",tt="[object DataView]",Ct="[object Float32Array]",Zt="[object Float64Array]",cr="[object Int8Array]",Dt="[object Int16Array]",xt="[object Int32Array]",jt="[object Uint8Array]",zr="[object Uint8ClampedArray]",Kn="[object Uint16Array]",On="[object Uint32Array]",Hr=/\b__p \+= '';/g,Pi=/\b(__p \+=) '' \+/g,hl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,es=/&(?:amp|lt|gt|quot|#39);/g,Io=/[&<>"']/g,pl=RegExp(es.source),ts=RegExp(Io.source),vl=/<%-([\s\S]+?)%>/g,rs=/<%([\s\S]+?)%>/g,ns=/<%=([\s\S]+?)%>/g,is=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gl=/^\w*$/,os=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,No=/[\\^$.*+?()[\]{}|]/g,as=RegExp(No.source),To=/^\s+/,ss=/\s/,ml=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,us=/\{\n\/\* \[wrapped with (.+)\] \*/,yl=/,? & /,bl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xl=/[()=,{}\[\]\/\s]/,wl=/\\(\\)?/g,_l=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,cs=/\w*$/,El=/^[-+]0x[0-9a-f]+$/i,Sl=/^0b[01]+$/i,Ol=/^\[object .+?Constructor\]$/,Cl=/^0o[0-7]+$/i,Rl=/^(?:0|[1-9]\d*)$/,Pl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ii=/($^)/,ls=/['\n\r\u2028\u2029\\]/g,Ni="\\ud800-\\udfff",Il="\\u0300-\\u036f",Nl="\\ufe20-\\ufe2f",fs="\\u20d0-\\u20ff",ds=Il+Nl+fs,Ao="\\u2700-\\u27bf",hs="a-z\\xdf-\\xf6\\xf8-\\xff",ps="\\xac\\xb1\\xd7\\xf7",Tl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vs="\\u2000-\\u206f",Al=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",gs="A-Z\\xc0-\\xd6\\xd8-\\xde",Mo="\\ufe0e\\ufe0f",ms=ps+Tl+vs+Al,Do="['’]",Ml="["+Ni+"]",ys="["+ms+"]",Yn="["+ds+"]",bs="\\d+",Ti="["+Ao+"]",xs="["+hs+"]",ws="[^"+Ni+ms+bs+Ao+hs+gs+"]",Dl="\\ud83c[\\udffb-\\udfff]",Zk="(?:"+Yn+"|"+Dl+")",ww="[^"+Ni+"]",jl="(?:\\ud83c[\\udde6-\\uddff]){2}",ql="[\\ud800-\\udbff][\\udc00-\\udfff]",Ai="["+gs+"]",_w="\\u200d",Ew="(?:"+xs+"|"+ws+")",Jk="(?:"+Ai+"|"+ws+")",Sw="(?:"+Do+"(?:d|ll|m|re|s|t|ve))?",Ow="(?:"+Do+"(?:D|LL|M|RE|S|T|VE))?",Cw=Zk+"?",Rw="["+Mo+"]?",Qk="(?:"+_w+"(?:"+[ww,jl,ql].join("|")+")"+Rw+Cw+")*",eL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",tL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pw=Rw+Cw+Qk,rL="(?:"+[Ti,jl,ql].join("|")+")"+Pw,nL="(?:"+[ww+Yn+"?",Yn,jl,ql,Ml].join("|")+")",iL=RegExp(Do,"g"),oL=RegExp(Yn,"g"),kl=RegExp(Dl+"(?="+Dl+")|"+nL+Pw,"g"),aL=RegExp([Ai+"?"+xs+"+"+Sw+"(?="+[ys,Ai,"$"].join("|")+")",Jk+"+"+Ow+"(?="+[ys,Ai+Ew,"$"].join("|")+")",Ai+"?"+Ew+"+"+Sw,Ai+"+"+Ow,tL,eL,bs,rL].join("|"),"g"),sL=RegExp("["+_w+Ni+ds+Mo+"]"),uL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,cL=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],lL=-1,st={};st[Ct]=st[Zt]=st[cr]=st[Dt]=st[xt]=st[jt]=st[zr]=st[Kn]=st[On]=!0,st[G]=st[J]=st[ut]=st[K]=st[tt]=st[ie]=st[ue]=st[de]=st[Se]=st[_e]=st[ae]=st[He]=st[qe]=st[Xe]=st[et]=!1;var ot={};ot[G]=ot[J]=ot[ut]=ot[tt]=ot[K]=ot[ie]=ot[Ct]=ot[Zt]=ot[cr]=ot[Dt]=ot[xt]=ot[Se]=ot[_e]=ot[ae]=ot[He]=ot[qe]=ot[Xe]=ot[We]=ot[jt]=ot[zr]=ot[Kn]=ot[On]=!0,ot[ue]=ot[de]=ot[et]=!1;var fL={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},dL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},hL={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},pL={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},vL=parseFloat,gL=parseInt,Iw=typeof ht=="object"&&ht&&ht.Object===Object&&ht,mL=typeof self=="object"&&self&&self.Object===Object&&self,Rt=Iw||mL||Function("return this")(),Ll=t&&!t.nodeType&&t,Xn=Ll&&!0&&e&&!e.nodeType&&e,Nw=Xn&&Xn.exports===Ll,Bl=Nw&&Iw.process,lr=(function(){try{var te=Xn&&Xn.require&&Xn.require("util").types;return te||Bl&&Bl.binding&&Bl.binding("util")}catch{}})(),Tw=lr&&lr.isArrayBuffer,Aw=lr&&lr.isDate,Mw=lr&&lr.isMap,Dw=lr&&lr.isRegExp,jw=lr&&lr.isSet,qw=lr&&lr.isTypedArray;function Jt(te,fe,oe){switch(oe.length){case 0:return te.call(fe);case 1:return te.call(fe,oe[0]);case 2:return te.call(fe,oe[0],oe[1]);case 3:return te.call(fe,oe[0],oe[1],oe[2])}return te.apply(fe,oe)}function yL(te,fe,oe,Ee){for(var Te=-1,Ue=te==null?0:te.length;++Te<Ue;){var wt=te[Te];fe(Ee,wt,oe(wt),te)}return Ee}function fr(te,fe){for(var oe=-1,Ee=te==null?0:te.length;++oe<Ee&&fe(te[oe],oe,te)!==!1;);return te}function bL(te,fe){for(var oe=te==null?0:te.length;oe--&&fe(te[oe],oe,te)!==!1;);return te}function kw(te,fe){for(var oe=-1,Ee=te==null?0:te.length;++oe<Ee;)if(!fe(te[oe],oe,te))return!1;return!0}function Cn(te,fe){for(var oe=-1,Ee=te==null?0:te.length,Te=0,Ue=[];++oe<Ee;){var wt=te[oe];fe(wt,oe,te)&&(Ue[Te++]=wt)}return Ue}function _s(te,fe){var oe=te==null?0:te.length;return!!oe&&Mi(te,fe,0)>-1}function Fl(te,fe,oe){for(var Ee=-1,Te=te==null?0:te.length;++Ee<Te;)if(oe(fe,te[Ee]))return!0;return!1}function ct(te,fe){for(var oe=-1,Ee=te==null?0:te.length,Te=Array(Ee);++oe<Ee;)Te[oe]=fe(te[oe],oe,te);return Te}function Rn(te,fe){for(var oe=-1,Ee=fe.length,Te=te.length;++oe<Ee;)te[Te+oe]=fe[oe];return te}function $l(te,fe,oe,Ee){var Te=-1,Ue=te==null?0:te.length;for(Ee&&Ue&&(oe=te[++Te]);++Te<Ue;)oe=fe(oe,te[Te],Te,te);return oe}function xL(te,fe,oe,Ee){var Te=te==null?0:te.length;for(Ee&&Te&&(oe=te[--Te]);Te--;)oe=fe(oe,te[Te],Te,te);return oe}function zl(te,fe){for(var oe=-1,Ee=te==null?0:te.length;++oe<Ee;)if(fe(te[oe],oe,te))return!0;return!1}var wL=Hl("length");function _L(te){return te.split("")}function EL(te){return te.match(bl)||[]}function Lw(te,fe,oe){var Ee;return oe(te,function(Te,Ue,wt){if(fe(Te,Ue,wt))return Ee=Ue,!1}),Ee}function Es(te,fe,oe,Ee){for(var Te=te.length,Ue=oe+(Ee?1:-1);Ee?Ue--:++Ue<Te;)if(fe(te[Ue],Ue,te))return Ue;return-1}function Mi(te,fe,oe){return fe===fe?jL(te,fe,oe):Es(te,Bw,oe)}function SL(te,fe,oe,Ee){for(var Te=oe-1,Ue=te.length;++Te<Ue;)if(Ee(te[Te],fe))return Te;return-1}function Bw(te){return te!==te}function Fw(te,fe){var oe=te==null?0:te.length;return oe?Vl(te,fe)/oe:H}function Hl(te){return function(fe){return fe==null?r:fe[te]}}function Ul(te){return function(fe){return te==null?r:te[fe]}}function $w(te,fe,oe,Ee,Te){return Te(te,function(Ue,wt,rt){oe=Ee?(Ee=!1,Ue):fe(oe,Ue,wt,rt)}),oe}function OL(te,fe){var oe=te.length;for(te.sort(fe);oe--;)te[oe]=te[oe].value;return te}function Vl(te,fe){for(var oe,Ee=-1,Te=te.length;++Ee<Te;){var Ue=fe(te[Ee]);Ue!==r&&(oe=oe===r?Ue:oe+Ue)}return oe}function Wl(te,fe){for(var oe=-1,Ee=Array(te);++oe<te;)Ee[oe]=fe(oe);return Ee}function CL(te,fe){return ct(fe,function(oe){return[oe,te[oe]]})}function zw(te){return te&&te.slice(0,Ww(te)+1).replace(To,"")}function Qt(te){return function(fe){return te(fe)}}function Gl(te,fe){return ct(fe,function(oe){return te[oe]})}function jo(te,fe){return te.has(fe)}function Hw(te,fe){for(var oe=-1,Ee=te.length;++oe<Ee&&Mi(fe,te[oe],0)>-1;);return oe}function Uw(te,fe){for(var oe=te.length;oe--&&Mi(fe,te[oe],0)>-1;);return oe}function RL(te,fe){for(var oe=te.length,Ee=0;oe--;)te[oe]===fe&&++Ee;return Ee}var PL=Ul(fL),IL=Ul(dL);function NL(te){return"\\"+pL[te]}function TL(te,fe){return te==null?r:te[fe]}function Di(te){return sL.test(te)}function AL(te){return uL.test(te)}function ML(te){for(var fe,oe=[];!(fe=te.next()).done;)oe.push(fe.value);return oe}function Kl(te){var fe=-1,oe=Array(te.size);return te.forEach(function(Ee,Te){oe[++fe]=[Te,Ee]}),oe}function Vw(te,fe){return function(oe){return te(fe(oe))}}function Pn(te,fe){for(var oe=-1,Ee=te.length,Te=0,Ue=[];++oe<Ee;){var wt=te[oe];(wt===fe||wt===f)&&(te[oe]=f,Ue[Te++]=oe)}return Ue}function Ss(te){var fe=-1,oe=Array(te.size);return te.forEach(function(Ee){oe[++fe]=Ee}),oe}function DL(te){var fe=-1,oe=Array(te.size);return te.forEach(function(Ee){oe[++fe]=[Ee,Ee]}),oe}function jL(te,fe,oe){for(var Ee=oe-1,Te=te.length;++Ee<Te;)if(te[Ee]===fe)return Ee;return-1}function qL(te,fe,oe){for(var Ee=oe+1;Ee--;)if(te[Ee]===fe)return Ee;return Ee}function ji(te){return Di(te)?LL(te):wL(te)}function Pr(te){return Di(te)?BL(te):_L(te)}function Ww(te){for(var fe=te.length;fe--&&ss.test(te.charAt(fe)););return fe}var kL=Ul(hL);function LL(te){for(var fe=kl.lastIndex=0;kl.test(te);)++fe;return fe}function BL(te){return te.match(kl)||[]}function FL(te){return te.match(aL)||[]}var $L=(function te(fe){fe=fe==null?Rt:qi.defaults(Rt.Object(),fe,qi.pick(Rt,cL));var oe=fe.Array,Ee=fe.Date,Te=fe.Error,Ue=fe.Function,wt=fe.Math,rt=fe.Object,Yl=fe.RegExp,zL=fe.String,dr=fe.TypeError,Os=oe.prototype,HL=Ue.prototype,ki=rt.prototype,Cs=fe["__core-js_shared__"],Rs=HL.toString,Ze=ki.hasOwnProperty,UL=0,Gw=(function(){var s=/[^.]+$/.exec(Cs&&Cs.keys&&Cs.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})(),Ps=ki.toString,VL=Rs.call(rt),WL=Rt._,GL=Yl("^"+Rs.call(Ze).replace(No,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Is=Nw?fe.Buffer:r,In=fe.Symbol,Ns=fe.Uint8Array,Kw=Is?Is.allocUnsafe:r,Ts=Vw(rt.getPrototypeOf,rt),Yw=rt.create,Xw=ki.propertyIsEnumerable,As=Os.splice,Zw=In?In.isConcatSpreadable:r,qo=In?In.iterator:r,Zn=In?In.toStringTag:r,Ms=(function(){try{var s=ri(rt,"defineProperty");return s({},"",{}),s}catch{}})(),KL=fe.clearTimeout!==Rt.clearTimeout&&fe.clearTimeout,YL=Ee&&Ee.now!==Rt.Date.now&&Ee.now,XL=fe.setTimeout!==Rt.setTimeout&&fe.setTimeout,Ds=wt.ceil,js=wt.floor,Xl=rt.getOwnPropertySymbols,ZL=Is?Is.isBuffer:r,Jw=fe.isFinite,JL=Os.join,QL=Vw(rt.keys,rt),_t=wt.max,At=wt.min,eB=Ee.now,tB=fe.parseInt,Qw=wt.random,rB=Os.reverse,Zl=ri(fe,"DataView"),ko=ri(fe,"Map"),Jl=ri(fe,"Promise"),Li=ri(fe,"Set"),Lo=ri(fe,"WeakMap"),Bo=ri(rt,"create"),qs=Lo&&new Lo,Bi={},nB=ni(Zl),iB=ni(ko),oB=ni(Jl),aB=ni(Li),sB=ni(Lo),ks=In?In.prototype:r,Fo=ks?ks.valueOf:r,e_=ks?ks.toString:r;function M(s){if(dt(s)&&!Ae(s)&&!(s instanceof Fe)){if(s instanceof hr)return s;if(Ze.call(s,"__wrapped__"))return t1(s)}return new hr(s)}var Fi=(function(){function s(){}return function(l){if(!ft(l))return{};if(Yw)return Yw(l);s.prototype=l;var g=new s;return s.prototype=r,g}})();function Ls(){}function hr(s,l){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}M.templateSettings={escape:vl,evaluate:rs,interpolate:ns,variable:"",imports:{_:M}},M.prototype=Ls.prototype,M.prototype.constructor=M,hr.prototype=Fi(Ls.prototype),hr.prototype.constructor=hr;function Fe(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Q,this.__views__=[]}function uB(){var s=new Fe(this.__wrapped__);return s.__actions__=$t(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=$t(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=$t(this.__views__),s}function cB(){if(this.__filtered__){var s=new Fe(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function lB(){var s=this.__wrapped__.value(),l=this.__dir__,g=Ae(s),O=l<0,I=g?s.length:0,q=_F(0,I,this.__views__),U=q.start,X=q.end,re=X-U,pe=O?X:U-1,ge=this.__iteratees__,me=ge.length,be=0,Ce=At(re,this.__takeCount__);if(!g||!O&&I==re&&Ce==re)return S_(s,this.__actions__);var Pe=[];e:for(;re--&&be<Ce;){pe+=l;for(var je=-1,Ie=s[pe];++je<me;){var Le=ge[je],$e=Le.iteratee,rr=Le.type,Lt=$e(Ie);if(rr==B)Ie=Lt;else if(!Lt){if(rr==T)continue e;break e}}Pe[be++]=Ie}return Pe}Fe.prototype=Fi(Ls.prototype),Fe.prototype.constructor=Fe;function Jn(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var O=s[l];this.set(O[0],O[1])}}function fB(){this.__data__=Bo?Bo(null):{},this.size=0}function dB(s){var l=this.has(s)&&delete this.__data__[s];return this.size-=l?1:0,l}function hB(s){var l=this.__data__;if(Bo){var g=l[s];return g===c?r:g}return Ze.call(l,s)?l[s]:r}function pB(s){var l=this.__data__;return Bo?l[s]!==r:Ze.call(l,s)}function vB(s,l){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Bo&&l===r?c:l,this}Jn.prototype.clear=fB,Jn.prototype.delete=dB,Jn.prototype.get=hB,Jn.prototype.has=pB,Jn.prototype.set=vB;function sn(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var O=s[l];this.set(O[0],O[1])}}function gB(){this.__data__=[],this.size=0}function mB(s){var l=this.__data__,g=Bs(l,s);if(g<0)return!1;var O=l.length-1;return g==O?l.pop():As.call(l,g,1),--this.size,!0}function yB(s){var l=this.__data__,g=Bs(l,s);return g<0?r:l[g][1]}function bB(s){return Bs(this.__data__,s)>-1}function xB(s,l){var g=this.__data__,O=Bs(g,s);return O<0?(++this.size,g.push([s,l])):g[O][1]=l,this}sn.prototype.clear=gB,sn.prototype.delete=mB,sn.prototype.get=yB,sn.prototype.has=bB,sn.prototype.set=xB;function un(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var O=s[l];this.set(O[0],O[1])}}function wB(){this.size=0,this.__data__={hash:new Jn,map:new(ko||sn),string:new Jn}}function _B(s){var l=Zs(this,s).delete(s);return this.size-=l?1:0,l}function EB(s){return Zs(this,s).get(s)}function SB(s){return Zs(this,s).has(s)}function OB(s,l){var g=Zs(this,s),O=g.size;return g.set(s,l),this.size+=g.size==O?0:1,this}un.prototype.clear=wB,un.prototype.delete=_B,un.prototype.get=EB,un.prototype.has=SB,un.prototype.set=OB;function Qn(s){var l=-1,g=s==null?0:s.length;for(this.__data__=new un;++l<g;)this.add(s[l])}function CB(s){return this.__data__.set(s,c),this}function RB(s){return this.__data__.has(s)}Qn.prototype.add=Qn.prototype.push=CB,Qn.prototype.has=RB;function Ir(s){var l=this.__data__=new sn(s);this.size=l.size}function PB(){this.__data__=new sn,this.size=0}function IB(s){var l=this.__data__,g=l.delete(s);return this.size=l.size,g}function NB(s){return this.__data__.get(s)}function TB(s){return this.__data__.has(s)}function AB(s,l){var g=this.__data__;if(g instanceof sn){var O=g.__data__;if(!ko||O.length<i-1)return O.push([s,l]),this.size=++g.size,this;g=this.__data__=new un(O)}return g.set(s,l),this.size=g.size,this}Ir.prototype.clear=PB,Ir.prototype.delete=IB,Ir.prototype.get=NB,Ir.prototype.has=TB,Ir.prototype.set=AB;function t_(s,l){var g=Ae(s),O=!g&&ii(s),I=!g&&!O&&Dn(s),q=!g&&!O&&!I&&Ui(s),U=g||O||I||q,X=U?Wl(s.length,zL):[],re=X.length;for(var pe in s)(l||Ze.call(s,pe))&&!(U&&(pe=="length"||I&&(pe=="offset"||pe=="parent")||q&&(pe=="buffer"||pe=="byteLength"||pe=="byteOffset")||dn(pe,re)))&&X.push(pe);return X}function r_(s){var l=s.length;return l?s[lf(0,l-1)]:r}function MB(s,l){return Js($t(s),ei(l,0,s.length))}function DB(s){return Js($t(s))}function Ql(s,l,g){(g!==r&&!Nr(s[l],g)||g===r&&!(l in s))&&cn(s,l,g)}function $o(s,l,g){var O=s[l];(!(Ze.call(s,l)&&Nr(O,g))||g===r&&!(l in s))&&cn(s,l,g)}function Bs(s,l){for(var g=s.length;g--;)if(Nr(s[g][0],l))return g;return-1}function jB(s,l,g,O){return Nn(s,function(I,q,U){l(O,I,g(I),U)}),O}function n_(s,l){return s&&Vr(l,St(l),s)}function qB(s,l){return s&&Vr(l,Ht(l),s)}function cn(s,l,g){l=="__proto__"&&Ms?Ms(s,l,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[l]=g}function ef(s,l){for(var g=-1,O=l.length,I=oe(O),q=s==null;++g<O;)I[g]=q?r:jf(s,l[g]);return I}function ei(s,l,g){return s===s&&(g!==r&&(s=s<=g?s:g),l!==r&&(s=s>=l?s:l)),s}function pr(s,l,g,O,I,q){var U,X=l&h,re=l&p,pe=l&v;if(g&&(U=I?g(s,O,I,q):g(s)),U!==r)return U;if(!ft(s))return s;var ge=Ae(s);if(ge){if(U=SF(s),!X)return $t(s,U)}else{var me=Mt(s),be=me==de||me==we;if(Dn(s))return R_(s,X);if(me==ae||me==G||be&&!I){if(U=re||be?{}:W_(s),!X)return re?hF(s,qB(U,s)):dF(s,n_(U,s))}else{if(!ot[me])return I?s:{};U=OF(s,me,X)}}q||(q=new Ir);var Ce=q.get(s);if(Ce)return Ce;q.set(s,U),w1(s)?s.forEach(function(Ie){U.add(pr(Ie,l,g,Ie,s,q))}):b1(s)&&s.forEach(function(Ie,Le){U.set(Le,pr(Ie,l,g,Le,s,q))});var Pe=pe?re?wf:xf:re?Ht:St,je=ge?r:Pe(s);return fr(je||s,function(Ie,Le){je&&(Le=Ie,Ie=s[Le]),$o(U,Le,pr(Ie,l,g,Le,s,q))}),U}function kB(s){var l=St(s);return function(g){return i_(g,s,l)}}function i_(s,l,g){var O=g.length;if(s==null)return!O;for(s=rt(s);O--;){var I=g[O],q=l[I],U=s[I];if(U===r&&!(I in s)||!q(U))return!1}return!0}function o_(s,l,g){if(typeof s!="function")throw new dr(a);return Ko(function(){s.apply(r,g)},l)}function zo(s,l,g,O){var I=-1,q=_s,U=!0,X=s.length,re=[],pe=l.length;if(!X)return re;g&&(l=ct(l,Qt(g))),O?(q=Fl,U=!1):l.length>=i&&(q=jo,U=!1,l=new Qn(l));e:for(;++I<X;){var ge=s[I],me=g==null?ge:g(ge);if(ge=O||ge!==0?ge:0,U&&me===me){for(var be=pe;be--;)if(l[be]===me)continue e;re.push(ge)}else q(l,me,O)||re.push(ge)}return re}var Nn=A_(Ur),a_=A_(rf,!0);function LB(s,l){var g=!0;return Nn(s,function(O,I,q){return g=!!l(O,I,q),g}),g}function Fs(s,l,g){for(var O=-1,I=s.length;++O<I;){var q=s[O],U=l(q);if(U!=null&&(X===r?U===U&&!tr(U):g(U,X)))var X=U,re=q}return re}function BB(s,l,g,O){var I=s.length;for(g=Me(g),g<0&&(g=-g>I?0:I+g),O=O===r||O>I?I:Me(O),O<0&&(O+=I),O=g>O?0:E1(O);g<O;)s[g++]=l;return s}function s_(s,l){var g=[];return Nn(s,function(O,I,q){l(O,I,q)&&g.push(O)}),g}function Pt(s,l,g,O,I){var q=-1,U=s.length;for(g||(g=RF),I||(I=[]);++q<U;){var X=s[q];l>0&&g(X)?l>1?Pt(X,l-1,g,O,I):Rn(I,X):O||(I[I.length]=X)}return I}var tf=M_(),u_=M_(!0);function Ur(s,l){return s&&tf(s,l,St)}function rf(s,l){return s&&u_(s,l,St)}function $s(s,l){return Cn(l,function(g){return hn(s[g])})}function ti(s,l){l=An(l,s);for(var g=0,O=l.length;s!=null&&g<O;)s=s[Wr(l[g++])];return g&&g==O?s:r}function c_(s,l,g){var O=l(s);return Ae(s)?O:Rn(O,g(s))}function qt(s){return s==null?s===r?mt:he:Zn&&Zn in rt(s)?wF(s):DF(s)}function nf(s,l){return s>l}function FB(s,l){return s!=null&&Ze.call(s,l)}function $B(s,l){return s!=null&&l in rt(s)}function zB(s,l,g){return s>=At(l,g)&&s<_t(l,g)}function of(s,l,g){for(var O=g?Fl:_s,I=s[0].length,q=s.length,U=q,X=oe(q),re=1/0,pe=[];U--;){var ge=s[U];U&&l&&(ge=ct(ge,Qt(l))),re=At(ge.length,re),X[U]=!g&&(l||I>=120&&ge.length>=120)?new Qn(U&&ge):r}ge=s[0];var me=-1,be=X[0];e:for(;++me<I&&pe.length<re;){var Ce=ge[me],Pe=l?l(Ce):Ce;if(Ce=g||Ce!==0?Ce:0,!(be?jo(be,Pe):O(pe,Pe,g))){for(U=q;--U;){var je=X[U];if(!(je?jo(je,Pe):O(s[U],Pe,g)))continue e}be&&be.push(Pe),pe.push(Ce)}}return pe}function HB(s,l,g,O){return Ur(s,function(I,q,U){l(O,g(I),q,U)}),O}function Ho(s,l,g){l=An(l,s),s=X_(s,l);var O=s==null?s:s[Wr(gr(l))];return O==null?r:Jt(O,s,g)}function l_(s){return dt(s)&&qt(s)==G}function UB(s){return dt(s)&&qt(s)==ut}function VB(s){return dt(s)&&qt(s)==ie}function Uo(s,l,g,O,I){return s===l?!0:s==null||l==null||!dt(s)&&!dt(l)?s!==s&&l!==l:WB(s,l,g,O,Uo,I)}function WB(s,l,g,O,I,q){var U=Ae(s),X=Ae(l),re=U?J:Mt(s),pe=X?J:Mt(l);re=re==G?ae:re,pe=pe==G?ae:pe;var ge=re==ae,me=pe==ae,be=re==pe;if(be&&Dn(s)){if(!Dn(l))return!1;U=!0,ge=!1}if(be&&!ge)return q||(q=new Ir),U||Ui(s)?H_(s,l,g,O,I,q):bF(s,l,re,g,O,I,q);if(!(g&m)){var Ce=ge&&Ze.call(s,"__wrapped__"),Pe=me&&Ze.call(l,"__wrapped__");if(Ce||Pe){var je=Ce?s.value():s,Ie=Pe?l.value():l;return q||(q=new Ir),I(je,Ie,g,O,q)}}return be?(q||(q=new Ir),xF(s,l,g,O,I,q)):!1}function GB(s){return dt(s)&&Mt(s)==Se}function af(s,l,g,O){var I=g.length,q=I,U=!O;if(s==null)return!q;for(s=rt(s);I--;){var X=g[I];if(U&&X[2]?X[1]!==s[X[0]]:!(X[0]in s))return!1}for(;++I<q;){X=g[I];var re=X[0],pe=s[re],ge=X[1];if(U&&X[2]){if(pe===r&&!(re in s))return!1}else{var me=new Ir;if(O)var be=O(pe,ge,re,s,l,me);if(!(be===r?Uo(ge,pe,m|y,O,me):be))return!1}}return!0}function f_(s){if(!ft(s)||IF(s))return!1;var l=hn(s)?GL:Ol;return l.test(ni(s))}function KB(s){return dt(s)&&qt(s)==He}function YB(s){return dt(s)&&Mt(s)==qe}function XB(s){return dt(s)&&iu(s.length)&&!!st[qt(s)]}function d_(s){return typeof s=="function"?s:s==null?Ut:typeof s=="object"?Ae(s)?v_(s[0],s[1]):p_(s):D1(s)}function sf(s){if(!Go(s))return QL(s);var l=[];for(var g in rt(s))Ze.call(s,g)&&g!="constructor"&&l.push(g);return l}function ZB(s){if(!ft(s))return MF(s);var l=Go(s),g=[];for(var O in s)O=="constructor"&&(l||!Ze.call(s,O))||g.push(O);return g}function uf(s,l){return s<l}function h_(s,l){var g=-1,O=zt(s)?oe(s.length):[];return Nn(s,function(I,q,U){O[++g]=l(I,q,U)}),O}function p_(s){var l=Ef(s);return l.length==1&&l[0][2]?K_(l[0][0],l[0][1]):function(g){return g===s||af(g,s,l)}}function v_(s,l){return Of(s)&&G_(l)?K_(Wr(s),l):function(g){var O=jf(g,s);return O===r&&O===l?qf(g,s):Uo(l,O,m|y)}}function zs(s,l,g,O,I){s!==l&&tf(l,function(q,U){if(I||(I=new Ir),ft(q))JB(s,l,U,g,zs,O,I);else{var X=O?O(Rf(s,U),q,U+"",s,l,I):r;X===r&&(X=q),Ql(s,U,X)}},Ht)}function JB(s,l,g,O,I,q,U){var X=Rf(s,g),re=Rf(l,g),pe=U.get(re);if(pe){Ql(s,g,pe);return}var ge=q?q(X,re,g+"",s,l,U):r,me=ge===r;if(me){var be=Ae(re),Ce=!be&&Dn(re),Pe=!be&&!Ce&&Ui(re);ge=re,be||Ce||Pe?Ae(X)?ge=X:pt(X)?ge=$t(X):Ce?(me=!1,ge=R_(re,!0)):Pe?(me=!1,ge=P_(re,!0)):ge=[]:Yo(re)||ii(re)?(ge=X,ii(X)?ge=S1(X):(!ft(X)||hn(X))&&(ge=W_(re))):me=!1}me&&(U.set(re,ge),I(ge,re,O,q,U),U.delete(re)),Ql(s,g,ge)}function g_(s,l){var g=s.length;if(g)return l+=l<0?g:0,dn(l,g)?s[l]:r}function m_(s,l,g){l.length?l=ct(l,function(q){return Ae(q)?function(U){return ti(U,q.length===1?q[0]:q)}:q}):l=[Ut];var O=-1;l=ct(l,Qt(Re()));var I=h_(s,function(q,U,X){var re=ct(l,function(pe){return pe(q)});return{criteria:re,index:++O,value:q}});return OL(I,function(q,U){return fF(q,U,g)})}function QB(s,l){return y_(s,l,function(g,O){return qf(s,O)})}function y_(s,l,g){for(var O=-1,I=l.length,q={};++O<I;){var U=l[O],X=ti(s,U);g(X,U)&&Vo(q,An(U,s),X)}return q}function eF(s){return function(l){return ti(l,s)}}function cf(s,l,g,O){var I=O?SL:Mi,q=-1,U=l.length,X=s;for(s===l&&(l=$t(l)),g&&(X=ct(s,Qt(g)));++q<U;)for(var re=0,pe=l[q],ge=g?g(pe):pe;(re=I(X,ge,re,O))>-1;)X!==s&&As.call(X,re,1),As.call(s,re,1);return s}function b_(s,l){for(var g=s?l.length:0,O=g-1;g--;){var I=l[g];if(g==O||I!==q){var q=I;dn(I)?As.call(s,I,1):hf(s,I)}}return s}function lf(s,l){return s+js(Qw()*(l-s+1))}function tF(s,l,g,O){for(var I=-1,q=_t(Ds((l-s)/(g||1)),0),U=oe(q);q--;)U[O?q:++I]=s,s+=g;return U}function ff(s,l){var g="";if(!s||l<1||l>Y)return g;do l%2&&(g+=s),l=js(l/2),l&&(s+=s);while(l);return g}function ke(s,l){return Pf(Y_(s,l,Ut),s+"")}function rF(s){return r_(Vi(s))}function nF(s,l){var g=Vi(s);return Js(g,ei(l,0,g.length))}function Vo(s,l,g,O){if(!ft(s))return s;l=An(l,s);for(var I=-1,q=l.length,U=q-1,X=s;X!=null&&++I<q;){var re=Wr(l[I]),pe=g;if(re==="__proto__"||re==="constructor"||re==="prototype")return s;if(I!=U){var ge=X[re];pe=O?O(ge,re,X):r,pe===r&&(pe=ft(ge)?ge:dn(l[I+1])?[]:{})}$o(X,re,pe),X=X[re]}return s}var x_=qs?function(s,l){return qs.set(s,l),s}:Ut,iF=Ms?function(s,l){return Ms(s,"toString",{configurable:!0,enumerable:!1,value:Lf(l),writable:!0})}:Ut;function oF(s){return Js(Vi(s))}function vr(s,l,g){var O=-1,I=s.length;l<0&&(l=-l>I?0:I+l),g=g>I?I:g,g<0&&(g+=I),I=l>g?0:g-l>>>0,l>>>=0;for(var q=oe(I);++O<I;)q[O]=s[O+l];return q}function aF(s,l){var g;return Nn(s,function(O,I,q){return g=l(O,I,q),!g}),!!g}function Hs(s,l,g){var O=0,I=s==null?O:s.length;if(typeof l=="number"&&l===l&&I<=se){for(;O<I;){var q=O+I>>>1,U=s[q];U!==null&&!tr(U)&&(g?U<=l:U<l)?O=q+1:I=q}return I}return df(s,l,Ut,g)}function df(s,l,g,O){var I=0,q=s==null?0:s.length;if(q===0)return 0;l=g(l);for(var U=l!==l,X=l===null,re=tr(l),pe=l===r;I<q;){var ge=js((I+q)/2),me=g(s[ge]),be=me!==r,Ce=me===null,Pe=me===me,je=tr(me);if(U)var Ie=O||Pe;else pe?Ie=Pe&&(O||be):X?Ie=Pe&&be&&(O||!Ce):re?Ie=Pe&&be&&!Ce&&(O||!je):Ce||je?Ie=!1:Ie=O?me<=l:me<l;Ie?I=ge+1:q=ge}return At(q,ce)}function w_(s,l){for(var g=-1,O=s.length,I=0,q=[];++g<O;){var U=s[g],X=l?l(U):U;if(!g||!Nr(X,re)){var re=X;q[I++]=U===0?0:U}}return q}function __(s){return typeof s=="number"?s:tr(s)?H:+s}function er(s){if(typeof s=="string")return s;if(Ae(s))return ct(s,er)+"";if(tr(s))return e_?e_.call(s):"";var l=s+"";return l=="0"&&1/s==-W?"-0":l}function Tn(s,l,g){var O=-1,I=_s,q=s.length,U=!0,X=[],re=X;if(g)U=!1,I=Fl;else if(q>=i){var pe=l?null:mF(s);if(pe)return Ss(pe);U=!1,I=jo,re=new Qn}else re=l?[]:X;e:for(;++O<q;){var ge=s[O],me=l?l(ge):ge;if(ge=g||ge!==0?ge:0,U&&me===me){for(var be=re.length;be--;)if(re[be]===me)continue e;l&&re.push(me),X.push(ge)}else I(re,me,g)||(re!==X&&re.push(me),X.push(ge))}return X}function hf(s,l){return l=An(l,s),s=X_(s,l),s==null||delete s[Wr(gr(l))]}function E_(s,l,g,O){return Vo(s,l,g(ti(s,l)),O)}function Us(s,l,g,O){for(var I=s.length,q=O?I:-1;(O?q--:++q<I)&&l(s[q],q,s););return g?vr(s,O?0:q,O?q+1:I):vr(s,O?q+1:0,O?I:q)}function S_(s,l){var g=s;return g instanceof Fe&&(g=g.value()),$l(l,function(O,I){return I.func.apply(I.thisArg,Rn([O],I.args))},g)}function pf(s,l,g){var O=s.length;if(O<2)return O?Tn(s[0]):[];for(var I=-1,q=oe(O);++I<O;)for(var U=s[I],X=-1;++X<O;)X!=I&&(q[I]=zo(q[I]||U,s[X],l,g));return Tn(Pt(q,1),l,g)}function O_(s,l,g){for(var O=-1,I=s.length,q=l.length,U={};++O<I;){var X=O<q?l[O]:r;g(U,s[O],X)}return U}function vf(s){return pt(s)?s:[]}function gf(s){return typeof s=="function"?s:Ut}function An(s,l){return Ae(s)?s:Of(s,l)?[s]:e1(Ge(s))}var sF=ke;function Mn(s,l,g){var O=s.length;return g=g===r?O:g,!l&&g>=O?s:vr(s,l,g)}var C_=KL||function(s){return Rt.clearTimeout(s)};function R_(s,l){if(l)return s.slice();var g=s.length,O=Kw?Kw(g):new s.constructor(g);return s.copy(O),O}function mf(s){var l=new s.constructor(s.byteLength);return new Ns(l).set(new Ns(s)),l}function uF(s,l){var g=l?mf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function cF(s){var l=new s.constructor(s.source,cs.exec(s));return l.lastIndex=s.lastIndex,l}function lF(s){return Fo?rt(Fo.call(s)):{}}function P_(s,l){var g=l?mf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function I_(s,l){if(s!==l){var g=s!==r,O=s===null,I=s===s,q=tr(s),U=l!==r,X=l===null,re=l===l,pe=tr(l);if(!X&&!pe&&!q&&s>l||q&&U&&re&&!X&&!pe||O&&U&&re||!g&&re||!I)return 1;if(!O&&!q&&!pe&&s<l||pe&&g&&I&&!O&&!q||X&&g&&I||!U&&I||!re)return-1}return 0}function fF(s,l,g){for(var O=-1,I=s.criteria,q=l.criteria,U=I.length,X=g.length;++O<U;){var re=I_(I[O],q[O]);if(re){if(O>=X)return re;var pe=g[O];return re*(pe=="desc"?-1:1)}}return s.index-l.index}function N_(s,l,g,O){for(var I=-1,q=s.length,U=g.length,X=-1,re=l.length,pe=_t(q-U,0),ge=oe(re+pe),me=!O;++X<re;)ge[X]=l[X];for(;++I<U;)(me||I<q)&&(ge[g[I]]=s[I]);for(;pe--;)ge[X++]=s[I++];return ge}function T_(s,l,g,O){for(var I=-1,q=s.length,U=-1,X=g.length,re=-1,pe=l.length,ge=_t(q-X,0),me=oe(ge+pe),be=!O;++I<ge;)me[I]=s[I];for(var Ce=I;++re<pe;)me[Ce+re]=l[re];for(;++U<X;)(be||I<q)&&(me[Ce+g[U]]=s[I++]);return me}function $t(s,l){var g=-1,O=s.length;for(l||(l=oe(O));++g<O;)l[g]=s[g];return l}function Vr(s,l,g,O){var I=!g;g||(g={});for(var q=-1,U=l.length;++q<U;){var X=l[q],re=O?O(g[X],s[X],X,g,s):r;re===r&&(re=s[X]),I?cn(g,X,re):$o(g,X,re)}return g}function dF(s,l){return Vr(s,Sf(s),l)}function hF(s,l){return Vr(s,U_(s),l)}function Vs(s,l){return function(g,O){var I=Ae(g)?yL:jB,q=l?l():{};return I(g,s,Re(O,2),q)}}function $i(s){return ke(function(l,g){var O=-1,I=g.length,q=I>1?g[I-1]:r,U=I>2?g[2]:r;for(q=s.length>3&&typeof q=="function"?(I--,q):r,U&&kt(g[0],g[1],U)&&(q=I<3?r:q,I=1),l=rt(l);++O<I;){var X=g[O];X&&s(l,X,O,q)}return l})}function A_(s,l){return function(g,O){if(g==null)return g;if(!zt(g))return s(g,O);for(var I=g.length,q=l?I:-1,U=rt(g);(l?q--:++q<I)&&O(U[q],q,U)!==!1;);return g}}function M_(s){return function(l,g,O){for(var I=-1,q=rt(l),U=O(l),X=U.length;X--;){var re=U[s?X:++I];if(g(q[re],re,q)===!1)break}return l}}function pF(s,l,g){var O=l&b,I=Wo(s);function q(){var U=this&&this!==Rt&&this instanceof q?I:s;return U.apply(O?g:this,arguments)}return q}function D_(s){return function(l){l=Ge(l);var g=Di(l)?Pr(l):r,O=g?g[0]:l.charAt(0),I=g?Mn(g,1).join(""):l.slice(1);return O[s]()+I}}function zi(s){return function(l){return $l(A1(T1(l).replace(iL,"")),s,"")}}function Wo(s){return function(){var l=arguments;switch(l.length){case 0:return new s;case 1:return new s(l[0]);case 2:return new s(l[0],l[1]);case 3:return new s(l[0],l[1],l[2]);case 4:return new s(l[0],l[1],l[2],l[3]);case 5:return new s(l[0],l[1],l[2],l[3],l[4]);case 6:return new s(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new s(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var g=Fi(s.prototype),O=s.apply(g,l);return ft(O)?O:g}}function vF(s,l,g){var O=Wo(s);function I(){for(var q=arguments.length,U=oe(q),X=q,re=Hi(I);X--;)U[X]=arguments[X];var pe=q<3&&U[0]!==re&&U[q-1]!==re?[]:Pn(U,re);if(q-=pe.length,q<g)return B_(s,l,Ws,I.placeholder,r,U,pe,r,r,g-q);var ge=this&&this!==Rt&&this instanceof I?O:s;return Jt(ge,this,U)}return I}function j_(s){return function(l,g,O){var I=rt(l);if(!zt(l)){var q=Re(g,3);l=St(l),g=function(X){return q(I[X],X,I)}}var U=s(l,g,O);return U>-1?I[q?l[U]:U]:r}}function q_(s){return fn(function(l){var g=l.length,O=g,I=hr.prototype.thru;for(s&&l.reverse();O--;){var q=l[O];if(typeof q!="function")throw new dr(a);if(I&&!U&&Xs(q)=="wrapper")var U=new hr([],!0)}for(O=U?O:g;++O<g;){q=l[O];var X=Xs(q),re=X=="wrapper"?_f(q):r;re&&Cf(re[0])&&re[1]==(P|S|_|N)&&!re[4].length&&re[9]==1?U=U[Xs(re[0])].apply(U,re[3]):U=q.length==1&&Cf(q)?U[X]():U.thru(q)}return function(){var pe=arguments,ge=pe[0];if(U&&pe.length==1&&Ae(ge))return U.plant(ge).value();for(var me=0,be=g?l[me].apply(this,pe):ge;++me<g;)be=l[me].call(this,be);return be}})}function Ws(s,l,g,O,I,q,U,X,re,pe){var ge=l&P,me=l&b,be=l&x,Ce=l&(S|E),Pe=l&j,je=be?r:Wo(s);function Ie(){for(var Le=arguments.length,$e=oe(Le),rr=Le;rr--;)$e[rr]=arguments[rr];if(Ce)var Lt=Hi(Ie),nr=RL($e,Lt);if(O&&($e=N_($e,O,I,Ce)),q&&($e=T_($e,q,U,Ce)),Le-=nr,Ce&&Le<pe){var vt=Pn($e,Lt);return B_(s,l,Ws,Ie.placeholder,g,$e,vt,X,re,pe-Le)}var Tr=me?g:this,vn=be?Tr[s]:s;return Le=$e.length,X?$e=jF($e,X):Pe&&Le>1&&$e.reverse(),ge&&re<Le&&($e.length=re),this&&this!==Rt&&this instanceof Ie&&(vn=je||Wo(vn)),vn.apply(Tr,$e)}return Ie}function k_(s,l){return function(g,O){return HB(g,s,l(O),{})}}function Gs(s,l){return function(g,O){var I;if(g===r&&O===r)return l;if(g!==r&&(I=g),O!==r){if(I===r)return O;typeof g=="string"||typeof O=="string"?(g=er(g),O=er(O)):(g=__(g),O=__(O)),I=s(g,O)}return I}}function yf(s){return fn(function(l){return l=ct(l,Qt(Re())),ke(function(g){var O=this;return s(l,function(I){return Jt(I,O,g)})})})}function Ks(s,l){l=l===r?" ":er(l);var g=l.length;if(g<2)return g?ff(l,s):l;var O=ff(l,Ds(s/ji(l)));return Di(l)?Mn(Pr(O),0,s).join(""):O.slice(0,s)}function gF(s,l,g,O){var I=l&b,q=Wo(s);function U(){for(var X=-1,re=arguments.length,pe=-1,ge=O.length,me=oe(ge+re),be=this&&this!==Rt&&this instanceof U?q:s;++pe<ge;)me[pe]=O[pe];for(;re--;)me[pe++]=arguments[++X];return Jt(be,I?g:this,me)}return U}function L_(s){return function(l,g,O){return O&&typeof O!="number"&&kt(l,g,O)&&(g=O=r),l=pn(l),g===r?(g=l,l=0):g=pn(g),O=O===r?l<g?1:-1:pn(O),tF(l,g,O,s)}}function Ys(s){return function(l,g){return typeof l=="string"&&typeof g=="string"||(l=mr(l),g=mr(g)),s(l,g)}}function B_(s,l,g,O,I,q,U,X,re,pe){var ge=l&S,me=ge?U:r,be=ge?r:U,Ce=ge?q:r,Pe=ge?r:q;l|=ge?_:R,l&=~(ge?R:_),l&w||(l&=-4);var je=[s,l,I,Ce,me,Pe,be,X,re,pe],Ie=g.apply(r,je);return Cf(s)&&Z_(Ie,je),Ie.placeholder=O,J_(Ie,s,l)}function bf(s){var l=wt[s];return function(g,O){if(g=mr(g),O=O==null?0:At(Me(O),292),O&&Jw(g)){var I=(Ge(g)+"e").split("e"),q=l(I[0]+"e"+(+I[1]+O));return I=(Ge(q)+"e").split("e"),+(I[0]+"e"+(+I[1]-O))}return l(g)}}var mF=Li&&1/Ss(new Li([,-0]))[1]==W?function(s){return new Li(s)}:$f;function F_(s){return function(l){var g=Mt(l);return g==Se?Kl(l):g==qe?DL(l):CL(l,s(l))}}function ln(s,l,g,O,I,q,U,X){var re=l&x;if(!re&&typeof s!="function")throw new dr(a);var pe=O?O.length:0;if(pe||(l&=-97,O=I=r),U=U===r?U:_t(Me(U),0),X=X===r?X:Me(X),pe-=I?I.length:0,l&R){var ge=O,me=I;O=I=r}var be=re?r:_f(s),Ce=[s,l,g,O,I,ge,me,q,U,X];if(be&&AF(Ce,be),s=Ce[0],l=Ce[1],g=Ce[2],O=Ce[3],I=Ce[4],X=Ce[9]=Ce[9]===r?re?0:s.length:_t(Ce[9]-pe,0),!X&&l&(S|E)&&(l&=-25),!l||l==b)var Pe=pF(s,l,g);else l==S||l==E?Pe=vF(s,l,X):(l==_||l==(b|_))&&!I.length?Pe=gF(s,l,g,O):Pe=Ws.apply(r,Ce);var je=be?x_:Z_;return J_(je(Pe,Ce),s,l)}function $_(s,l,g,O){return s===r||Nr(s,ki[g])&&!Ze.call(O,g)?l:s}function z_(s,l,g,O,I,q){return ft(s)&&ft(l)&&(q.set(l,s),zs(s,l,r,z_,q),q.delete(l)),s}function yF(s){return Yo(s)?r:s}function H_(s,l,g,O,I,q){var U=g&m,X=s.length,re=l.length;if(X!=re&&!(U&&re>X))return!1;var pe=q.get(s),ge=q.get(l);if(pe&&ge)return pe==l&&ge==s;var me=-1,be=!0,Ce=g&y?new Qn:r;for(q.set(s,l),q.set(l,s);++me<X;){var Pe=s[me],je=l[me];if(O)var Ie=U?O(je,Pe,me,l,s,q):O(Pe,je,me,s,l,q);if(Ie!==r){if(Ie)continue;be=!1;break}if(Ce){if(!zl(l,function(Le,$e){if(!jo(Ce,$e)&&(Pe===Le||I(Pe,Le,g,O,q)))return Ce.push($e)})){be=!1;break}}else if(!(Pe===je||I(Pe,je,g,O,q))){be=!1;break}}return q.delete(s),q.delete(l),be}function bF(s,l,g,O,I,q,U){switch(g){case tt:if(s.byteLength!=l.byteLength||s.byteOffset!=l.byteOffset)return!1;s=s.buffer,l=l.buffer;case ut:return!(s.byteLength!=l.byteLength||!q(new Ns(s),new Ns(l)));case K:case ie:case _e:return Nr(+s,+l);case ue:return s.name==l.name&&s.message==l.message;case He:case Xe:return s==l+"";case Se:var X=Kl;case qe:var re=O&m;if(X||(X=Ss),s.size!=l.size&&!re)return!1;var pe=U.get(s);if(pe)return pe==l;O|=y,U.set(s,l);var ge=H_(X(s),X(l),O,I,q,U);return U.delete(s),ge;case We:if(Fo)return Fo.call(s)==Fo.call(l)}return!1}function xF(s,l,g,O,I,q){var U=g&m,X=xf(s),re=X.length,pe=xf(l),ge=pe.length;if(re!=ge&&!U)return!1;for(var me=re;me--;){var be=X[me];if(!(U?be in l:Ze.call(l,be)))return!1}var Ce=q.get(s),Pe=q.get(l);if(Ce&&Pe)return Ce==l&&Pe==s;var je=!0;q.set(s,l),q.set(l,s);for(var Ie=U;++me<re;){be=X[me];var Le=s[be],$e=l[be];if(O)var rr=U?O($e,Le,be,l,s,q):O(Le,$e,be,s,l,q);if(!(rr===r?Le===$e||I(Le,$e,g,O,q):rr)){je=!1;break}Ie||(Ie=be=="constructor")}if(je&&!Ie){var Lt=s.constructor,nr=l.constructor;Lt!=nr&&"constructor"in s&&"constructor"in l&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof nr=="function"&&nr instanceof nr)&&(je=!1)}return q.delete(s),q.delete(l),je}function fn(s){return Pf(Y_(s,r,i1),s+"")}function xf(s){return c_(s,St,Sf)}function wf(s){return c_(s,Ht,U_)}var _f=qs?function(s){return qs.get(s)}:$f;function Xs(s){for(var l=s.name+"",g=Bi[l],O=Ze.call(Bi,l)?g.length:0;O--;){var I=g[O],q=I.func;if(q==null||q==s)return I.name}return l}function Hi(s){var l=Ze.call(M,"placeholder")?M:s;return l.placeholder}function Re(){var s=M.iteratee||Bf;return s=s===Bf?d_:s,arguments.length?s(arguments[0],arguments[1]):s}function Zs(s,l){var g=s.__data__;return PF(l)?g[typeof l=="string"?"string":"hash"]:g.map}function Ef(s){for(var l=St(s),g=l.length;g--;){var O=l[g],I=s[O];l[g]=[O,I,G_(I)]}return l}function ri(s,l){var g=TL(s,l);return f_(g)?g:r}function wF(s){var l=Ze.call(s,Zn),g=s[Zn];try{s[Zn]=r;var O=!0}catch{}var I=Ps.call(s);return O&&(l?s[Zn]=g:delete s[Zn]),I}var Sf=Xl?function(s){return s==null?[]:(s=rt(s),Cn(Xl(s),function(l){return Xw.call(s,l)}))}:zf,U_=Xl?function(s){for(var l=[];s;)Rn(l,Sf(s)),s=Ts(s);return l}:zf,Mt=qt;(Zl&&Mt(new Zl(new ArrayBuffer(1)))!=tt||ko&&Mt(new ko)!=Se||Jl&&Mt(Jl.resolve())!=Oe||Li&&Mt(new Li)!=qe||Lo&&Mt(new Lo)!=et)&&(Mt=function(s){var l=qt(s),g=l==ae?s.constructor:r,O=g?ni(g):"";if(O)switch(O){case nB:return tt;case iB:return Se;case oB:return Oe;case aB:return qe;case sB:return et}return l});function _F(s,l,g){for(var O=-1,I=g.length;++O<I;){var q=g[O],U=q.size;switch(q.type){case"drop":s+=U;break;case"dropRight":l-=U;break;case"take":l=At(l,s+U);break;case"takeRight":s=_t(s,l-U);break}}return{start:s,end:l}}function EF(s){var l=s.match(us);return l?l[1].split(yl):[]}function V_(s,l,g){l=An(l,s);for(var O=-1,I=l.length,q=!1;++O<I;){var U=Wr(l[O]);if(!(q=s!=null&&g(s,U)))break;s=s[U]}return q||++O!=I?q:(I=s==null?0:s.length,!!I&&iu(I)&&dn(U,I)&&(Ae(s)||ii(s)))}function SF(s){var l=s.length,g=new s.constructor(l);return l&&typeof s[0]=="string"&&Ze.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function W_(s){return typeof s.constructor=="function"&&!Go(s)?Fi(Ts(s)):{}}function OF(s,l,g){var O=s.constructor;switch(l){case ut:return mf(s);case K:case ie:return new O(+s);case tt:return uF(s,g);case Ct:case Zt:case cr:case Dt:case xt:case jt:case zr:case Kn:case On:return P_(s,g);case Se:return new O;case _e:case Xe:return new O(s);case He:return cF(s);case qe:return new O;case We:return lF(s)}}function CF(s,l){var g=l.length;if(!g)return s;var O=g-1;return l[O]=(g>1?"& ":"")+l[O],l=l.join(g>2?", ":" "),s.replace(ml,`{
47
+ */var sZ=Ea.exports,yN;function uZ(){return yN||(yN=1,(function(e,t){(function(){var r,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",h=1,p=2,v=4,m=1,y=2,b=1,x=2,w=4,S=8,E=16,_=32,R=64,P=128,N=256,j=512,L=30,F="...",k=800,D=16,T=1,B=2,$=3,W=1/0,Y=9007199254740991,ee=17976931348623157e292,H=NaN,Q=4294967295,ce=Q-1,se=Q>>>1,z=[["ary",P],["bind",b],["bindKey",x],["curry",S],["curryRight",E],["flip",j],["partial",_],["partialRight",R],["rearg",N]],G="[object Arguments]",J="[object Array]",V="[object AsyncFunction]",K="[object Boolean]",ie="[object Date]",ne="[object DOMException]",ue="[object Error]",de="[object Function]",we="[object GeneratorFunction]",Se="[object Map]",_e="[object Number]",he="[object Null]",ae="[object Object]",Oe="[object Promise]",Ne="[object Proxy]",He="[object RegExp]",qe="[object Set]",Xe="[object String]",We="[object Symbol]",mt="[object Undefined]",et="[object WeakMap]",Tt="[object WeakSet]",ut="[object ArrayBuffer]",tt="[object DataView]",Ct="[object Float32Array]",Zt="[object Float64Array]",cr="[object Int8Array]",Dt="[object Int16Array]",xt="[object Int32Array]",jt="[object Uint8Array]",zr="[object Uint8ClampedArray]",Kn="[object Uint16Array]",On="[object Uint32Array]",Hr=/\b__p \+= '';/g,Pi=/\b(__p \+=) '' \+/g,pl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,es=/&(?:amp|lt|gt|quot|#39);/g,Io=/[&<>"']/g,vl=RegExp(es.source),ts=RegExp(Io.source),gl=/<%-([\s\S]+?)%>/g,rs=/<%([\s\S]+?)%>/g,ns=/<%=([\s\S]+?)%>/g,is=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ml=/^\w*$/,os=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,No=/[\\^$.*+?()[\]{}|]/g,as=RegExp(No.source),To=/^\s+/,ss=/\s/,yl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,us=/\{\n\/\* \[wrapped with (.+)\] \*/,bl=/,? & /,xl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wl=/[()=,{}\[\]\/\s]/,_l=/\\(\\)?/g,El=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,cs=/\w*$/,Sl=/^[-+]0x[0-9a-f]+$/i,Ol=/^0b[01]+$/i,Cl=/^\[object .+?Constructor\]$/,Rl=/^0o[0-7]+$/i,Pl=/^(?:0|[1-9]\d*)$/,Il=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ii=/($^)/,ls=/['\n\r\u2028\u2029\\]/g,Ni="\\ud800-\\udfff",Nl="\\u0300-\\u036f",Tl="\\ufe20-\\ufe2f",fs="\\u20d0-\\u20ff",ds=Nl+Tl+fs,Ao="\\u2700-\\u27bf",hs="a-z\\xdf-\\xf6\\xf8-\\xff",ps="\\xac\\xb1\\xd7\\xf7",Al="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vs="\\u2000-\\u206f",Ml=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",gs="A-Z\\xc0-\\xd6\\xd8-\\xde",Mo="\\ufe0e\\ufe0f",ms=ps+Al+vs+Ml,Do="['’]",Dl="["+Ni+"]",ys="["+ms+"]",Yn="["+ds+"]",bs="\\d+",Ti="["+Ao+"]",xs="["+hs+"]",ws="[^"+Ni+ms+bs+Ao+hs+gs+"]",jl="\\ud83c[\\udffb-\\udfff]",Zk="(?:"+Yn+"|"+jl+")",_w="[^"+Ni+"]",ql="(?:\\ud83c[\\udde6-\\uddff]){2}",kl="[\\ud800-\\udbff][\\udc00-\\udfff]",Ai="["+gs+"]",Ew="\\u200d",Sw="(?:"+xs+"|"+ws+")",Jk="(?:"+Ai+"|"+ws+")",Ow="(?:"+Do+"(?:d|ll|m|re|s|t|ve))?",Cw="(?:"+Do+"(?:D|LL|M|RE|S|T|VE))?",Rw=Zk+"?",Pw="["+Mo+"]?",Qk="(?:"+Ew+"(?:"+[_w,ql,kl].join("|")+")"+Pw+Rw+")*",eL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",tL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Iw=Pw+Rw+Qk,rL="(?:"+[Ti,ql,kl].join("|")+")"+Iw,nL="(?:"+[_w+Yn+"?",Yn,ql,kl,Dl].join("|")+")",iL=RegExp(Do,"g"),oL=RegExp(Yn,"g"),Ll=RegExp(jl+"(?="+jl+")|"+nL+Iw,"g"),aL=RegExp([Ai+"?"+xs+"+"+Ow+"(?="+[ys,Ai,"$"].join("|")+")",Jk+"+"+Cw+"(?="+[ys,Ai+Sw,"$"].join("|")+")",Ai+"?"+Sw+"+"+Ow,Ai+"+"+Cw,tL,eL,bs,rL].join("|"),"g"),sL=RegExp("["+Ew+Ni+ds+Mo+"]"),uL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,cL=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],lL=-1,st={};st[Ct]=st[Zt]=st[cr]=st[Dt]=st[xt]=st[jt]=st[zr]=st[Kn]=st[On]=!0,st[G]=st[J]=st[ut]=st[K]=st[tt]=st[ie]=st[ue]=st[de]=st[Se]=st[_e]=st[ae]=st[He]=st[qe]=st[Xe]=st[et]=!1;var ot={};ot[G]=ot[J]=ot[ut]=ot[tt]=ot[K]=ot[ie]=ot[Ct]=ot[Zt]=ot[cr]=ot[Dt]=ot[xt]=ot[Se]=ot[_e]=ot[ae]=ot[He]=ot[qe]=ot[Xe]=ot[We]=ot[jt]=ot[zr]=ot[Kn]=ot[On]=!0,ot[ue]=ot[de]=ot[et]=!1;var fL={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},dL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},hL={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},pL={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},vL=parseFloat,gL=parseInt,Nw=typeof ht=="object"&&ht&&ht.Object===Object&&ht,mL=typeof self=="object"&&self&&self.Object===Object&&self,Rt=Nw||mL||Function("return this")(),Bl=t&&!t.nodeType&&t,Xn=Bl&&!0&&e&&!e.nodeType&&e,Tw=Xn&&Xn.exports===Bl,Fl=Tw&&Nw.process,lr=(function(){try{var te=Xn&&Xn.require&&Xn.require("util").types;return te||Fl&&Fl.binding&&Fl.binding("util")}catch{}})(),Aw=lr&&lr.isArrayBuffer,Mw=lr&&lr.isDate,Dw=lr&&lr.isMap,jw=lr&&lr.isRegExp,qw=lr&&lr.isSet,kw=lr&&lr.isTypedArray;function Jt(te,fe,oe){switch(oe.length){case 0:return te.call(fe);case 1:return te.call(fe,oe[0]);case 2:return te.call(fe,oe[0],oe[1]);case 3:return te.call(fe,oe[0],oe[1],oe[2])}return te.apply(fe,oe)}function yL(te,fe,oe,Ee){for(var Te=-1,Ue=te==null?0:te.length;++Te<Ue;){var wt=te[Te];fe(Ee,wt,oe(wt),te)}return Ee}function fr(te,fe){for(var oe=-1,Ee=te==null?0:te.length;++oe<Ee&&fe(te[oe],oe,te)!==!1;);return te}function bL(te,fe){for(var oe=te==null?0:te.length;oe--&&fe(te[oe],oe,te)!==!1;);return te}function Lw(te,fe){for(var oe=-1,Ee=te==null?0:te.length;++oe<Ee;)if(!fe(te[oe],oe,te))return!1;return!0}function Cn(te,fe){for(var oe=-1,Ee=te==null?0:te.length,Te=0,Ue=[];++oe<Ee;){var wt=te[oe];fe(wt,oe,te)&&(Ue[Te++]=wt)}return Ue}function _s(te,fe){var oe=te==null?0:te.length;return!!oe&&Mi(te,fe,0)>-1}function $l(te,fe,oe){for(var Ee=-1,Te=te==null?0:te.length;++Ee<Te;)if(oe(fe,te[Ee]))return!0;return!1}function ct(te,fe){for(var oe=-1,Ee=te==null?0:te.length,Te=Array(Ee);++oe<Ee;)Te[oe]=fe(te[oe],oe,te);return Te}function Rn(te,fe){for(var oe=-1,Ee=fe.length,Te=te.length;++oe<Ee;)te[Te+oe]=fe[oe];return te}function zl(te,fe,oe,Ee){var Te=-1,Ue=te==null?0:te.length;for(Ee&&Ue&&(oe=te[++Te]);++Te<Ue;)oe=fe(oe,te[Te],Te,te);return oe}function xL(te,fe,oe,Ee){var Te=te==null?0:te.length;for(Ee&&Te&&(oe=te[--Te]);Te--;)oe=fe(oe,te[Te],Te,te);return oe}function Hl(te,fe){for(var oe=-1,Ee=te==null?0:te.length;++oe<Ee;)if(fe(te[oe],oe,te))return!0;return!1}var wL=Ul("length");function _L(te){return te.split("")}function EL(te){return te.match(xl)||[]}function Bw(te,fe,oe){var Ee;return oe(te,function(Te,Ue,wt){if(fe(Te,Ue,wt))return Ee=Ue,!1}),Ee}function Es(te,fe,oe,Ee){for(var Te=te.length,Ue=oe+(Ee?1:-1);Ee?Ue--:++Ue<Te;)if(fe(te[Ue],Ue,te))return Ue;return-1}function Mi(te,fe,oe){return fe===fe?jL(te,fe,oe):Es(te,Fw,oe)}function SL(te,fe,oe,Ee){for(var Te=oe-1,Ue=te.length;++Te<Ue;)if(Ee(te[Te],fe))return Te;return-1}function Fw(te){return te!==te}function $w(te,fe){var oe=te==null?0:te.length;return oe?Wl(te,fe)/oe:H}function Ul(te){return function(fe){return fe==null?r:fe[te]}}function Vl(te){return function(fe){return te==null?r:te[fe]}}function zw(te,fe,oe,Ee,Te){return Te(te,function(Ue,wt,rt){oe=Ee?(Ee=!1,Ue):fe(oe,Ue,wt,rt)}),oe}function OL(te,fe){var oe=te.length;for(te.sort(fe);oe--;)te[oe]=te[oe].value;return te}function Wl(te,fe){for(var oe,Ee=-1,Te=te.length;++Ee<Te;){var Ue=fe(te[Ee]);Ue!==r&&(oe=oe===r?Ue:oe+Ue)}return oe}function Gl(te,fe){for(var oe=-1,Ee=Array(te);++oe<te;)Ee[oe]=fe(oe);return Ee}function CL(te,fe){return ct(fe,function(oe){return[oe,te[oe]]})}function Hw(te){return te&&te.slice(0,Gw(te)+1).replace(To,"")}function Qt(te){return function(fe){return te(fe)}}function Kl(te,fe){return ct(fe,function(oe){return te[oe]})}function jo(te,fe){return te.has(fe)}function Uw(te,fe){for(var oe=-1,Ee=te.length;++oe<Ee&&Mi(fe,te[oe],0)>-1;);return oe}function Vw(te,fe){for(var oe=te.length;oe--&&Mi(fe,te[oe],0)>-1;);return oe}function RL(te,fe){for(var oe=te.length,Ee=0;oe--;)te[oe]===fe&&++Ee;return Ee}var PL=Vl(fL),IL=Vl(dL);function NL(te){return"\\"+pL[te]}function TL(te,fe){return te==null?r:te[fe]}function Di(te){return sL.test(te)}function AL(te){return uL.test(te)}function ML(te){for(var fe,oe=[];!(fe=te.next()).done;)oe.push(fe.value);return oe}function Yl(te){var fe=-1,oe=Array(te.size);return te.forEach(function(Ee,Te){oe[++fe]=[Te,Ee]}),oe}function Ww(te,fe){return function(oe){return te(fe(oe))}}function Pn(te,fe){for(var oe=-1,Ee=te.length,Te=0,Ue=[];++oe<Ee;){var wt=te[oe];(wt===fe||wt===f)&&(te[oe]=f,Ue[Te++]=oe)}return Ue}function Ss(te){var fe=-1,oe=Array(te.size);return te.forEach(function(Ee){oe[++fe]=Ee}),oe}function DL(te){var fe=-1,oe=Array(te.size);return te.forEach(function(Ee){oe[++fe]=[Ee,Ee]}),oe}function jL(te,fe,oe){for(var Ee=oe-1,Te=te.length;++Ee<Te;)if(te[Ee]===fe)return Ee;return-1}function qL(te,fe,oe){for(var Ee=oe+1;Ee--;)if(te[Ee]===fe)return Ee;return Ee}function ji(te){return Di(te)?LL(te):wL(te)}function Pr(te){return Di(te)?BL(te):_L(te)}function Gw(te){for(var fe=te.length;fe--&&ss.test(te.charAt(fe)););return fe}var kL=Vl(hL);function LL(te){for(var fe=Ll.lastIndex=0;Ll.test(te);)++fe;return fe}function BL(te){return te.match(Ll)||[]}function FL(te){return te.match(aL)||[]}var $L=(function te(fe){fe=fe==null?Rt:qi.defaults(Rt.Object(),fe,qi.pick(Rt,cL));var oe=fe.Array,Ee=fe.Date,Te=fe.Error,Ue=fe.Function,wt=fe.Math,rt=fe.Object,Xl=fe.RegExp,zL=fe.String,dr=fe.TypeError,Os=oe.prototype,HL=Ue.prototype,ki=rt.prototype,Cs=fe["__core-js_shared__"],Rs=HL.toString,Ze=ki.hasOwnProperty,UL=0,Kw=(function(){var s=/[^.]+$/.exec(Cs&&Cs.keys&&Cs.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})(),Ps=ki.toString,VL=Rs.call(rt),WL=Rt._,GL=Xl("^"+Rs.call(Ze).replace(No,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Is=Tw?fe.Buffer:r,In=fe.Symbol,Ns=fe.Uint8Array,Yw=Is?Is.allocUnsafe:r,Ts=Ww(rt.getPrototypeOf,rt),Xw=rt.create,Zw=ki.propertyIsEnumerable,As=Os.splice,Jw=In?In.isConcatSpreadable:r,qo=In?In.iterator:r,Zn=In?In.toStringTag:r,Ms=(function(){try{var s=ri(rt,"defineProperty");return s({},"",{}),s}catch{}})(),KL=fe.clearTimeout!==Rt.clearTimeout&&fe.clearTimeout,YL=Ee&&Ee.now!==Rt.Date.now&&Ee.now,XL=fe.setTimeout!==Rt.setTimeout&&fe.setTimeout,Ds=wt.ceil,js=wt.floor,Zl=rt.getOwnPropertySymbols,ZL=Is?Is.isBuffer:r,Qw=fe.isFinite,JL=Os.join,QL=Ww(rt.keys,rt),_t=wt.max,At=wt.min,eB=Ee.now,tB=fe.parseInt,e_=wt.random,rB=Os.reverse,Jl=ri(fe,"DataView"),ko=ri(fe,"Map"),Ql=ri(fe,"Promise"),Li=ri(fe,"Set"),Lo=ri(fe,"WeakMap"),Bo=ri(rt,"create"),qs=Lo&&new Lo,Bi={},nB=ni(Jl),iB=ni(ko),oB=ni(Ql),aB=ni(Li),sB=ni(Lo),ks=In?In.prototype:r,Fo=ks?ks.valueOf:r,t_=ks?ks.toString:r;function M(s){if(dt(s)&&!Ae(s)&&!(s instanceof Fe)){if(s instanceof hr)return s;if(Ze.call(s,"__wrapped__"))return r1(s)}return new hr(s)}var Fi=(function(){function s(){}return function(l){if(!ft(l))return{};if(Xw)return Xw(l);s.prototype=l;var g=new s;return s.prototype=r,g}})();function Ls(){}function hr(s,l){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}M.templateSettings={escape:gl,evaluate:rs,interpolate:ns,variable:"",imports:{_:M}},M.prototype=Ls.prototype,M.prototype.constructor=M,hr.prototype=Fi(Ls.prototype),hr.prototype.constructor=hr;function Fe(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Q,this.__views__=[]}function uB(){var s=new Fe(this.__wrapped__);return s.__actions__=$t(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=$t(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=$t(this.__views__),s}function cB(){if(this.__filtered__){var s=new Fe(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function lB(){var s=this.__wrapped__.value(),l=this.__dir__,g=Ae(s),O=l<0,I=g?s.length:0,q=_F(0,I,this.__views__),U=q.start,X=q.end,re=X-U,pe=O?X:U-1,ge=this.__iteratees__,me=ge.length,be=0,Ce=At(re,this.__takeCount__);if(!g||!O&&I==re&&Ce==re)return O_(s,this.__actions__);var Pe=[];e:for(;re--&&be<Ce;){pe+=l;for(var je=-1,Ie=s[pe];++je<me;){var Le=ge[je],$e=Le.iteratee,rr=Le.type,Lt=$e(Ie);if(rr==B)Ie=Lt;else if(!Lt){if(rr==T)continue e;break e}}Pe[be++]=Ie}return Pe}Fe.prototype=Fi(Ls.prototype),Fe.prototype.constructor=Fe;function Jn(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var O=s[l];this.set(O[0],O[1])}}function fB(){this.__data__=Bo?Bo(null):{},this.size=0}function dB(s){var l=this.has(s)&&delete this.__data__[s];return this.size-=l?1:0,l}function hB(s){var l=this.__data__;if(Bo){var g=l[s];return g===c?r:g}return Ze.call(l,s)?l[s]:r}function pB(s){var l=this.__data__;return Bo?l[s]!==r:Ze.call(l,s)}function vB(s,l){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Bo&&l===r?c:l,this}Jn.prototype.clear=fB,Jn.prototype.delete=dB,Jn.prototype.get=hB,Jn.prototype.has=pB,Jn.prototype.set=vB;function sn(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var O=s[l];this.set(O[0],O[1])}}function gB(){this.__data__=[],this.size=0}function mB(s){var l=this.__data__,g=Bs(l,s);if(g<0)return!1;var O=l.length-1;return g==O?l.pop():As.call(l,g,1),--this.size,!0}function yB(s){var l=this.__data__,g=Bs(l,s);return g<0?r:l[g][1]}function bB(s){return Bs(this.__data__,s)>-1}function xB(s,l){var g=this.__data__,O=Bs(g,s);return O<0?(++this.size,g.push([s,l])):g[O][1]=l,this}sn.prototype.clear=gB,sn.prototype.delete=mB,sn.prototype.get=yB,sn.prototype.has=bB,sn.prototype.set=xB;function un(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var O=s[l];this.set(O[0],O[1])}}function wB(){this.size=0,this.__data__={hash:new Jn,map:new(ko||sn),string:new Jn}}function _B(s){var l=Zs(this,s).delete(s);return this.size-=l?1:0,l}function EB(s){return Zs(this,s).get(s)}function SB(s){return Zs(this,s).has(s)}function OB(s,l){var g=Zs(this,s),O=g.size;return g.set(s,l),this.size+=g.size==O?0:1,this}un.prototype.clear=wB,un.prototype.delete=_B,un.prototype.get=EB,un.prototype.has=SB,un.prototype.set=OB;function Qn(s){var l=-1,g=s==null?0:s.length;for(this.__data__=new un;++l<g;)this.add(s[l])}function CB(s){return this.__data__.set(s,c),this}function RB(s){return this.__data__.has(s)}Qn.prototype.add=Qn.prototype.push=CB,Qn.prototype.has=RB;function Ir(s){var l=this.__data__=new sn(s);this.size=l.size}function PB(){this.__data__=new sn,this.size=0}function IB(s){var l=this.__data__,g=l.delete(s);return this.size=l.size,g}function NB(s){return this.__data__.get(s)}function TB(s){return this.__data__.has(s)}function AB(s,l){var g=this.__data__;if(g instanceof sn){var O=g.__data__;if(!ko||O.length<i-1)return O.push([s,l]),this.size=++g.size,this;g=this.__data__=new un(O)}return g.set(s,l),this.size=g.size,this}Ir.prototype.clear=PB,Ir.prototype.delete=IB,Ir.prototype.get=NB,Ir.prototype.has=TB,Ir.prototype.set=AB;function r_(s,l){var g=Ae(s),O=!g&&ii(s),I=!g&&!O&&Dn(s),q=!g&&!O&&!I&&Ui(s),U=g||O||I||q,X=U?Gl(s.length,zL):[],re=X.length;for(var pe in s)(l||Ze.call(s,pe))&&!(U&&(pe=="length"||I&&(pe=="offset"||pe=="parent")||q&&(pe=="buffer"||pe=="byteLength"||pe=="byteOffset")||dn(pe,re)))&&X.push(pe);return X}function n_(s){var l=s.length;return l?s[ff(0,l-1)]:r}function MB(s,l){return Js($t(s),ei(l,0,s.length))}function DB(s){return Js($t(s))}function ef(s,l,g){(g!==r&&!Nr(s[l],g)||g===r&&!(l in s))&&cn(s,l,g)}function $o(s,l,g){var O=s[l];(!(Ze.call(s,l)&&Nr(O,g))||g===r&&!(l in s))&&cn(s,l,g)}function Bs(s,l){for(var g=s.length;g--;)if(Nr(s[g][0],l))return g;return-1}function jB(s,l,g,O){return Nn(s,function(I,q,U){l(O,I,g(I),U)}),O}function i_(s,l){return s&&Vr(l,St(l),s)}function qB(s,l){return s&&Vr(l,Ht(l),s)}function cn(s,l,g){l=="__proto__"&&Ms?Ms(s,l,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[l]=g}function tf(s,l){for(var g=-1,O=l.length,I=oe(O),q=s==null;++g<O;)I[g]=q?r:qf(s,l[g]);return I}function ei(s,l,g){return s===s&&(g!==r&&(s=s<=g?s:g),l!==r&&(s=s>=l?s:l)),s}function pr(s,l,g,O,I,q){var U,X=l&h,re=l&p,pe=l&v;if(g&&(U=I?g(s,O,I,q):g(s)),U!==r)return U;if(!ft(s))return s;var ge=Ae(s);if(ge){if(U=SF(s),!X)return $t(s,U)}else{var me=Mt(s),be=me==de||me==we;if(Dn(s))return P_(s,X);if(me==ae||me==G||be&&!I){if(U=re||be?{}:G_(s),!X)return re?hF(s,qB(U,s)):dF(s,i_(U,s))}else{if(!ot[me])return I?s:{};U=OF(s,me,X)}}q||(q=new Ir);var Ce=q.get(s);if(Ce)return Ce;q.set(s,U),_1(s)?s.forEach(function(Ie){U.add(pr(Ie,l,g,Ie,s,q))}):x1(s)&&s.forEach(function(Ie,Le){U.set(Le,pr(Ie,l,g,Le,s,q))});var Pe=pe?re?_f:wf:re?Ht:St,je=ge?r:Pe(s);return fr(je||s,function(Ie,Le){je&&(Le=Ie,Ie=s[Le]),$o(U,Le,pr(Ie,l,g,Le,s,q))}),U}function kB(s){var l=St(s);return function(g){return o_(g,s,l)}}function o_(s,l,g){var O=g.length;if(s==null)return!O;for(s=rt(s);O--;){var I=g[O],q=l[I],U=s[I];if(U===r&&!(I in s)||!q(U))return!1}return!0}function a_(s,l,g){if(typeof s!="function")throw new dr(a);return Ko(function(){s.apply(r,g)},l)}function zo(s,l,g,O){var I=-1,q=_s,U=!0,X=s.length,re=[],pe=l.length;if(!X)return re;g&&(l=ct(l,Qt(g))),O?(q=$l,U=!1):l.length>=i&&(q=jo,U=!1,l=new Qn(l));e:for(;++I<X;){var ge=s[I],me=g==null?ge:g(ge);if(ge=O||ge!==0?ge:0,U&&me===me){for(var be=pe;be--;)if(l[be]===me)continue e;re.push(ge)}else q(l,me,O)||re.push(ge)}return re}var Nn=M_(Ur),s_=M_(nf,!0);function LB(s,l){var g=!0;return Nn(s,function(O,I,q){return g=!!l(O,I,q),g}),g}function Fs(s,l,g){for(var O=-1,I=s.length;++O<I;){var q=s[O],U=l(q);if(U!=null&&(X===r?U===U&&!tr(U):g(U,X)))var X=U,re=q}return re}function BB(s,l,g,O){var I=s.length;for(g=Me(g),g<0&&(g=-g>I?0:I+g),O=O===r||O>I?I:Me(O),O<0&&(O+=I),O=g>O?0:S1(O);g<O;)s[g++]=l;return s}function u_(s,l){var g=[];return Nn(s,function(O,I,q){l(O,I,q)&&g.push(O)}),g}function Pt(s,l,g,O,I){var q=-1,U=s.length;for(g||(g=RF),I||(I=[]);++q<U;){var X=s[q];l>0&&g(X)?l>1?Pt(X,l-1,g,O,I):Rn(I,X):O||(I[I.length]=X)}return I}var rf=D_(),c_=D_(!0);function Ur(s,l){return s&&rf(s,l,St)}function nf(s,l){return s&&c_(s,l,St)}function $s(s,l){return Cn(l,function(g){return hn(s[g])})}function ti(s,l){l=An(l,s);for(var g=0,O=l.length;s!=null&&g<O;)s=s[Wr(l[g++])];return g&&g==O?s:r}function l_(s,l,g){var O=l(s);return Ae(s)?O:Rn(O,g(s))}function qt(s){return s==null?s===r?mt:he:Zn&&Zn in rt(s)?wF(s):DF(s)}function of(s,l){return s>l}function FB(s,l){return s!=null&&Ze.call(s,l)}function $B(s,l){return s!=null&&l in rt(s)}function zB(s,l,g){return s>=At(l,g)&&s<_t(l,g)}function af(s,l,g){for(var O=g?$l:_s,I=s[0].length,q=s.length,U=q,X=oe(q),re=1/0,pe=[];U--;){var ge=s[U];U&&l&&(ge=ct(ge,Qt(l))),re=At(ge.length,re),X[U]=!g&&(l||I>=120&&ge.length>=120)?new Qn(U&&ge):r}ge=s[0];var me=-1,be=X[0];e:for(;++me<I&&pe.length<re;){var Ce=ge[me],Pe=l?l(Ce):Ce;if(Ce=g||Ce!==0?Ce:0,!(be?jo(be,Pe):O(pe,Pe,g))){for(U=q;--U;){var je=X[U];if(!(je?jo(je,Pe):O(s[U],Pe,g)))continue e}be&&be.push(Pe),pe.push(Ce)}}return pe}function HB(s,l,g,O){return Ur(s,function(I,q,U){l(O,g(I),q,U)}),O}function Ho(s,l,g){l=An(l,s),s=Z_(s,l);var O=s==null?s:s[Wr(gr(l))];return O==null?r:Jt(O,s,g)}function f_(s){return dt(s)&&qt(s)==G}function UB(s){return dt(s)&&qt(s)==ut}function VB(s){return dt(s)&&qt(s)==ie}function Uo(s,l,g,O,I){return s===l?!0:s==null||l==null||!dt(s)&&!dt(l)?s!==s&&l!==l:WB(s,l,g,O,Uo,I)}function WB(s,l,g,O,I,q){var U=Ae(s),X=Ae(l),re=U?J:Mt(s),pe=X?J:Mt(l);re=re==G?ae:re,pe=pe==G?ae:pe;var ge=re==ae,me=pe==ae,be=re==pe;if(be&&Dn(s)){if(!Dn(l))return!1;U=!0,ge=!1}if(be&&!ge)return q||(q=new Ir),U||Ui(s)?U_(s,l,g,O,I,q):bF(s,l,re,g,O,I,q);if(!(g&m)){var Ce=ge&&Ze.call(s,"__wrapped__"),Pe=me&&Ze.call(l,"__wrapped__");if(Ce||Pe){var je=Ce?s.value():s,Ie=Pe?l.value():l;return q||(q=new Ir),I(je,Ie,g,O,q)}}return be?(q||(q=new Ir),xF(s,l,g,O,I,q)):!1}function GB(s){return dt(s)&&Mt(s)==Se}function sf(s,l,g,O){var I=g.length,q=I,U=!O;if(s==null)return!q;for(s=rt(s);I--;){var X=g[I];if(U&&X[2]?X[1]!==s[X[0]]:!(X[0]in s))return!1}for(;++I<q;){X=g[I];var re=X[0],pe=s[re],ge=X[1];if(U&&X[2]){if(pe===r&&!(re in s))return!1}else{var me=new Ir;if(O)var be=O(pe,ge,re,s,l,me);if(!(be===r?Uo(ge,pe,m|y,O,me):be))return!1}}return!0}function d_(s){if(!ft(s)||IF(s))return!1;var l=hn(s)?GL:Cl;return l.test(ni(s))}function KB(s){return dt(s)&&qt(s)==He}function YB(s){return dt(s)&&Mt(s)==qe}function XB(s){return dt(s)&&iu(s.length)&&!!st[qt(s)]}function h_(s){return typeof s=="function"?s:s==null?Ut:typeof s=="object"?Ae(s)?g_(s[0],s[1]):v_(s):j1(s)}function uf(s){if(!Go(s))return QL(s);var l=[];for(var g in rt(s))Ze.call(s,g)&&g!="constructor"&&l.push(g);return l}function ZB(s){if(!ft(s))return MF(s);var l=Go(s),g=[];for(var O in s)O=="constructor"&&(l||!Ze.call(s,O))||g.push(O);return g}function cf(s,l){return s<l}function p_(s,l){var g=-1,O=zt(s)?oe(s.length):[];return Nn(s,function(I,q,U){O[++g]=l(I,q,U)}),O}function v_(s){var l=Sf(s);return l.length==1&&l[0][2]?Y_(l[0][0],l[0][1]):function(g){return g===s||sf(g,s,l)}}function g_(s,l){return Cf(s)&&K_(l)?Y_(Wr(s),l):function(g){var O=qf(g,s);return O===r&&O===l?kf(g,s):Uo(l,O,m|y)}}function zs(s,l,g,O,I){s!==l&&rf(l,function(q,U){if(I||(I=new Ir),ft(q))JB(s,l,U,g,zs,O,I);else{var X=O?O(Pf(s,U),q,U+"",s,l,I):r;X===r&&(X=q),ef(s,U,X)}},Ht)}function JB(s,l,g,O,I,q,U){var X=Pf(s,g),re=Pf(l,g),pe=U.get(re);if(pe){ef(s,g,pe);return}var ge=q?q(X,re,g+"",s,l,U):r,me=ge===r;if(me){var be=Ae(re),Ce=!be&&Dn(re),Pe=!be&&!Ce&&Ui(re);ge=re,be||Ce||Pe?Ae(X)?ge=X:pt(X)?ge=$t(X):Ce?(me=!1,ge=P_(re,!0)):Pe?(me=!1,ge=I_(re,!0)):ge=[]:Yo(re)||ii(re)?(ge=X,ii(X)?ge=O1(X):(!ft(X)||hn(X))&&(ge=G_(re))):me=!1}me&&(U.set(re,ge),I(ge,re,O,q,U),U.delete(re)),ef(s,g,ge)}function m_(s,l){var g=s.length;if(g)return l+=l<0?g:0,dn(l,g)?s[l]:r}function y_(s,l,g){l.length?l=ct(l,function(q){return Ae(q)?function(U){return ti(U,q.length===1?q[0]:q)}:q}):l=[Ut];var O=-1;l=ct(l,Qt(Re()));var I=p_(s,function(q,U,X){var re=ct(l,function(pe){return pe(q)});return{criteria:re,index:++O,value:q}});return OL(I,function(q,U){return fF(q,U,g)})}function QB(s,l){return b_(s,l,function(g,O){return kf(s,O)})}function b_(s,l,g){for(var O=-1,I=l.length,q={};++O<I;){var U=l[O],X=ti(s,U);g(X,U)&&Vo(q,An(U,s),X)}return q}function eF(s){return function(l){return ti(l,s)}}function lf(s,l,g,O){var I=O?SL:Mi,q=-1,U=l.length,X=s;for(s===l&&(l=$t(l)),g&&(X=ct(s,Qt(g)));++q<U;)for(var re=0,pe=l[q],ge=g?g(pe):pe;(re=I(X,ge,re,O))>-1;)X!==s&&As.call(X,re,1),As.call(s,re,1);return s}function x_(s,l){for(var g=s?l.length:0,O=g-1;g--;){var I=l[g];if(g==O||I!==q){var q=I;dn(I)?As.call(s,I,1):pf(s,I)}}return s}function ff(s,l){return s+js(e_()*(l-s+1))}function tF(s,l,g,O){for(var I=-1,q=_t(Ds((l-s)/(g||1)),0),U=oe(q);q--;)U[O?q:++I]=s,s+=g;return U}function df(s,l){var g="";if(!s||l<1||l>Y)return g;do l%2&&(g+=s),l=js(l/2),l&&(s+=s);while(l);return g}function ke(s,l){return If(X_(s,l,Ut),s+"")}function rF(s){return n_(Vi(s))}function nF(s,l){var g=Vi(s);return Js(g,ei(l,0,g.length))}function Vo(s,l,g,O){if(!ft(s))return s;l=An(l,s);for(var I=-1,q=l.length,U=q-1,X=s;X!=null&&++I<q;){var re=Wr(l[I]),pe=g;if(re==="__proto__"||re==="constructor"||re==="prototype")return s;if(I!=U){var ge=X[re];pe=O?O(ge,re,X):r,pe===r&&(pe=ft(ge)?ge:dn(l[I+1])?[]:{})}$o(X,re,pe),X=X[re]}return s}var w_=qs?function(s,l){return qs.set(s,l),s}:Ut,iF=Ms?function(s,l){return Ms(s,"toString",{configurable:!0,enumerable:!1,value:Bf(l),writable:!0})}:Ut;function oF(s){return Js(Vi(s))}function vr(s,l,g){var O=-1,I=s.length;l<0&&(l=-l>I?0:I+l),g=g>I?I:g,g<0&&(g+=I),I=l>g?0:g-l>>>0,l>>>=0;for(var q=oe(I);++O<I;)q[O]=s[O+l];return q}function aF(s,l){var g;return Nn(s,function(O,I,q){return g=l(O,I,q),!g}),!!g}function Hs(s,l,g){var O=0,I=s==null?O:s.length;if(typeof l=="number"&&l===l&&I<=se){for(;O<I;){var q=O+I>>>1,U=s[q];U!==null&&!tr(U)&&(g?U<=l:U<l)?O=q+1:I=q}return I}return hf(s,l,Ut,g)}function hf(s,l,g,O){var I=0,q=s==null?0:s.length;if(q===0)return 0;l=g(l);for(var U=l!==l,X=l===null,re=tr(l),pe=l===r;I<q;){var ge=js((I+q)/2),me=g(s[ge]),be=me!==r,Ce=me===null,Pe=me===me,je=tr(me);if(U)var Ie=O||Pe;else pe?Ie=Pe&&(O||be):X?Ie=Pe&&be&&(O||!Ce):re?Ie=Pe&&be&&!Ce&&(O||!je):Ce||je?Ie=!1:Ie=O?me<=l:me<l;Ie?I=ge+1:q=ge}return At(q,ce)}function __(s,l){for(var g=-1,O=s.length,I=0,q=[];++g<O;){var U=s[g],X=l?l(U):U;if(!g||!Nr(X,re)){var re=X;q[I++]=U===0?0:U}}return q}function E_(s){return typeof s=="number"?s:tr(s)?H:+s}function er(s){if(typeof s=="string")return s;if(Ae(s))return ct(s,er)+"";if(tr(s))return t_?t_.call(s):"";var l=s+"";return l=="0"&&1/s==-W?"-0":l}function Tn(s,l,g){var O=-1,I=_s,q=s.length,U=!0,X=[],re=X;if(g)U=!1,I=$l;else if(q>=i){var pe=l?null:mF(s);if(pe)return Ss(pe);U=!1,I=jo,re=new Qn}else re=l?[]:X;e:for(;++O<q;){var ge=s[O],me=l?l(ge):ge;if(ge=g||ge!==0?ge:0,U&&me===me){for(var be=re.length;be--;)if(re[be]===me)continue e;l&&re.push(me),X.push(ge)}else I(re,me,g)||(re!==X&&re.push(me),X.push(ge))}return X}function pf(s,l){return l=An(l,s),s=Z_(s,l),s==null||delete s[Wr(gr(l))]}function S_(s,l,g,O){return Vo(s,l,g(ti(s,l)),O)}function Us(s,l,g,O){for(var I=s.length,q=O?I:-1;(O?q--:++q<I)&&l(s[q],q,s););return g?vr(s,O?0:q,O?q+1:I):vr(s,O?q+1:0,O?I:q)}function O_(s,l){var g=s;return g instanceof Fe&&(g=g.value()),zl(l,function(O,I){return I.func.apply(I.thisArg,Rn([O],I.args))},g)}function vf(s,l,g){var O=s.length;if(O<2)return O?Tn(s[0]):[];for(var I=-1,q=oe(O);++I<O;)for(var U=s[I],X=-1;++X<O;)X!=I&&(q[I]=zo(q[I]||U,s[X],l,g));return Tn(Pt(q,1),l,g)}function C_(s,l,g){for(var O=-1,I=s.length,q=l.length,U={};++O<I;){var X=O<q?l[O]:r;g(U,s[O],X)}return U}function gf(s){return pt(s)?s:[]}function mf(s){return typeof s=="function"?s:Ut}function An(s,l){return Ae(s)?s:Cf(s,l)?[s]:t1(Ge(s))}var sF=ke;function Mn(s,l,g){var O=s.length;return g=g===r?O:g,!l&&g>=O?s:vr(s,l,g)}var R_=KL||function(s){return Rt.clearTimeout(s)};function P_(s,l){if(l)return s.slice();var g=s.length,O=Yw?Yw(g):new s.constructor(g);return s.copy(O),O}function yf(s){var l=new s.constructor(s.byteLength);return new Ns(l).set(new Ns(s)),l}function uF(s,l){var g=l?yf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function cF(s){var l=new s.constructor(s.source,cs.exec(s));return l.lastIndex=s.lastIndex,l}function lF(s){return Fo?rt(Fo.call(s)):{}}function I_(s,l){var g=l?yf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function N_(s,l){if(s!==l){var g=s!==r,O=s===null,I=s===s,q=tr(s),U=l!==r,X=l===null,re=l===l,pe=tr(l);if(!X&&!pe&&!q&&s>l||q&&U&&re&&!X&&!pe||O&&U&&re||!g&&re||!I)return 1;if(!O&&!q&&!pe&&s<l||pe&&g&&I&&!O&&!q||X&&g&&I||!U&&I||!re)return-1}return 0}function fF(s,l,g){for(var O=-1,I=s.criteria,q=l.criteria,U=I.length,X=g.length;++O<U;){var re=N_(I[O],q[O]);if(re){if(O>=X)return re;var pe=g[O];return re*(pe=="desc"?-1:1)}}return s.index-l.index}function T_(s,l,g,O){for(var I=-1,q=s.length,U=g.length,X=-1,re=l.length,pe=_t(q-U,0),ge=oe(re+pe),me=!O;++X<re;)ge[X]=l[X];for(;++I<U;)(me||I<q)&&(ge[g[I]]=s[I]);for(;pe--;)ge[X++]=s[I++];return ge}function A_(s,l,g,O){for(var I=-1,q=s.length,U=-1,X=g.length,re=-1,pe=l.length,ge=_t(q-X,0),me=oe(ge+pe),be=!O;++I<ge;)me[I]=s[I];for(var Ce=I;++re<pe;)me[Ce+re]=l[re];for(;++U<X;)(be||I<q)&&(me[Ce+g[U]]=s[I++]);return me}function $t(s,l){var g=-1,O=s.length;for(l||(l=oe(O));++g<O;)l[g]=s[g];return l}function Vr(s,l,g,O){var I=!g;g||(g={});for(var q=-1,U=l.length;++q<U;){var X=l[q],re=O?O(g[X],s[X],X,g,s):r;re===r&&(re=s[X]),I?cn(g,X,re):$o(g,X,re)}return g}function dF(s,l){return Vr(s,Of(s),l)}function hF(s,l){return Vr(s,V_(s),l)}function Vs(s,l){return function(g,O){var I=Ae(g)?yL:jB,q=l?l():{};return I(g,s,Re(O,2),q)}}function $i(s){return ke(function(l,g){var O=-1,I=g.length,q=I>1?g[I-1]:r,U=I>2?g[2]:r;for(q=s.length>3&&typeof q=="function"?(I--,q):r,U&&kt(g[0],g[1],U)&&(q=I<3?r:q,I=1),l=rt(l);++O<I;){var X=g[O];X&&s(l,X,O,q)}return l})}function M_(s,l){return function(g,O){if(g==null)return g;if(!zt(g))return s(g,O);for(var I=g.length,q=l?I:-1,U=rt(g);(l?q--:++q<I)&&O(U[q],q,U)!==!1;);return g}}function D_(s){return function(l,g,O){for(var I=-1,q=rt(l),U=O(l),X=U.length;X--;){var re=U[s?X:++I];if(g(q[re],re,q)===!1)break}return l}}function pF(s,l,g){var O=l&b,I=Wo(s);function q(){var U=this&&this!==Rt&&this instanceof q?I:s;return U.apply(O?g:this,arguments)}return q}function j_(s){return function(l){l=Ge(l);var g=Di(l)?Pr(l):r,O=g?g[0]:l.charAt(0),I=g?Mn(g,1).join(""):l.slice(1);return O[s]()+I}}function zi(s){return function(l){return zl(M1(A1(l).replace(iL,"")),s,"")}}function Wo(s){return function(){var l=arguments;switch(l.length){case 0:return new s;case 1:return new s(l[0]);case 2:return new s(l[0],l[1]);case 3:return new s(l[0],l[1],l[2]);case 4:return new s(l[0],l[1],l[2],l[3]);case 5:return new s(l[0],l[1],l[2],l[3],l[4]);case 6:return new s(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new s(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var g=Fi(s.prototype),O=s.apply(g,l);return ft(O)?O:g}}function vF(s,l,g){var O=Wo(s);function I(){for(var q=arguments.length,U=oe(q),X=q,re=Hi(I);X--;)U[X]=arguments[X];var pe=q<3&&U[0]!==re&&U[q-1]!==re?[]:Pn(U,re);if(q-=pe.length,q<g)return F_(s,l,Ws,I.placeholder,r,U,pe,r,r,g-q);var ge=this&&this!==Rt&&this instanceof I?O:s;return Jt(ge,this,U)}return I}function q_(s){return function(l,g,O){var I=rt(l);if(!zt(l)){var q=Re(g,3);l=St(l),g=function(X){return q(I[X],X,I)}}var U=s(l,g,O);return U>-1?I[q?l[U]:U]:r}}function k_(s){return fn(function(l){var g=l.length,O=g,I=hr.prototype.thru;for(s&&l.reverse();O--;){var q=l[O];if(typeof q!="function")throw new dr(a);if(I&&!U&&Xs(q)=="wrapper")var U=new hr([],!0)}for(O=U?O:g;++O<g;){q=l[O];var X=Xs(q),re=X=="wrapper"?Ef(q):r;re&&Rf(re[0])&&re[1]==(P|S|_|N)&&!re[4].length&&re[9]==1?U=U[Xs(re[0])].apply(U,re[3]):U=q.length==1&&Rf(q)?U[X]():U.thru(q)}return function(){var pe=arguments,ge=pe[0];if(U&&pe.length==1&&Ae(ge))return U.plant(ge).value();for(var me=0,be=g?l[me].apply(this,pe):ge;++me<g;)be=l[me].call(this,be);return be}})}function Ws(s,l,g,O,I,q,U,X,re,pe){var ge=l&P,me=l&b,be=l&x,Ce=l&(S|E),Pe=l&j,je=be?r:Wo(s);function Ie(){for(var Le=arguments.length,$e=oe(Le),rr=Le;rr--;)$e[rr]=arguments[rr];if(Ce)var Lt=Hi(Ie),nr=RL($e,Lt);if(O&&($e=T_($e,O,I,Ce)),q&&($e=A_($e,q,U,Ce)),Le-=nr,Ce&&Le<pe){var vt=Pn($e,Lt);return F_(s,l,Ws,Ie.placeholder,g,$e,vt,X,re,pe-Le)}var Tr=me?g:this,vn=be?Tr[s]:s;return Le=$e.length,X?$e=jF($e,X):Pe&&Le>1&&$e.reverse(),ge&&re<Le&&($e.length=re),this&&this!==Rt&&this instanceof Ie&&(vn=je||Wo(vn)),vn.apply(Tr,$e)}return Ie}function L_(s,l){return function(g,O){return HB(g,s,l(O),{})}}function Gs(s,l){return function(g,O){var I;if(g===r&&O===r)return l;if(g!==r&&(I=g),O!==r){if(I===r)return O;typeof g=="string"||typeof O=="string"?(g=er(g),O=er(O)):(g=E_(g),O=E_(O)),I=s(g,O)}return I}}function bf(s){return fn(function(l){return l=ct(l,Qt(Re())),ke(function(g){var O=this;return s(l,function(I){return Jt(I,O,g)})})})}function Ks(s,l){l=l===r?" ":er(l);var g=l.length;if(g<2)return g?df(l,s):l;var O=df(l,Ds(s/ji(l)));return Di(l)?Mn(Pr(O),0,s).join(""):O.slice(0,s)}function gF(s,l,g,O){var I=l&b,q=Wo(s);function U(){for(var X=-1,re=arguments.length,pe=-1,ge=O.length,me=oe(ge+re),be=this&&this!==Rt&&this instanceof U?q:s;++pe<ge;)me[pe]=O[pe];for(;re--;)me[pe++]=arguments[++X];return Jt(be,I?g:this,me)}return U}function B_(s){return function(l,g,O){return O&&typeof O!="number"&&kt(l,g,O)&&(g=O=r),l=pn(l),g===r?(g=l,l=0):g=pn(g),O=O===r?l<g?1:-1:pn(O),tF(l,g,O,s)}}function Ys(s){return function(l,g){return typeof l=="string"&&typeof g=="string"||(l=mr(l),g=mr(g)),s(l,g)}}function F_(s,l,g,O,I,q,U,X,re,pe){var ge=l&S,me=ge?U:r,be=ge?r:U,Ce=ge?q:r,Pe=ge?r:q;l|=ge?_:R,l&=~(ge?R:_),l&w||(l&=-4);var je=[s,l,I,Ce,me,Pe,be,X,re,pe],Ie=g.apply(r,je);return Rf(s)&&J_(Ie,je),Ie.placeholder=O,Q_(Ie,s,l)}function xf(s){var l=wt[s];return function(g,O){if(g=mr(g),O=O==null?0:At(Me(O),292),O&&Qw(g)){var I=(Ge(g)+"e").split("e"),q=l(I[0]+"e"+(+I[1]+O));return I=(Ge(q)+"e").split("e"),+(I[0]+"e"+(+I[1]-O))}return l(g)}}var mF=Li&&1/Ss(new Li([,-0]))[1]==W?function(s){return new Li(s)}:zf;function $_(s){return function(l){var g=Mt(l);return g==Se?Yl(l):g==qe?DL(l):CL(l,s(l))}}function ln(s,l,g,O,I,q,U,X){var re=l&x;if(!re&&typeof s!="function")throw new dr(a);var pe=O?O.length:0;if(pe||(l&=-97,O=I=r),U=U===r?U:_t(Me(U),0),X=X===r?X:Me(X),pe-=I?I.length:0,l&R){var ge=O,me=I;O=I=r}var be=re?r:Ef(s),Ce=[s,l,g,O,I,ge,me,q,U,X];if(be&&AF(Ce,be),s=Ce[0],l=Ce[1],g=Ce[2],O=Ce[3],I=Ce[4],X=Ce[9]=Ce[9]===r?re?0:s.length:_t(Ce[9]-pe,0),!X&&l&(S|E)&&(l&=-25),!l||l==b)var Pe=pF(s,l,g);else l==S||l==E?Pe=vF(s,l,X):(l==_||l==(b|_))&&!I.length?Pe=gF(s,l,g,O):Pe=Ws.apply(r,Ce);var je=be?w_:J_;return Q_(je(Pe,Ce),s,l)}function z_(s,l,g,O){return s===r||Nr(s,ki[g])&&!Ze.call(O,g)?l:s}function H_(s,l,g,O,I,q){return ft(s)&&ft(l)&&(q.set(l,s),zs(s,l,r,H_,q),q.delete(l)),s}function yF(s){return Yo(s)?r:s}function U_(s,l,g,O,I,q){var U=g&m,X=s.length,re=l.length;if(X!=re&&!(U&&re>X))return!1;var pe=q.get(s),ge=q.get(l);if(pe&&ge)return pe==l&&ge==s;var me=-1,be=!0,Ce=g&y?new Qn:r;for(q.set(s,l),q.set(l,s);++me<X;){var Pe=s[me],je=l[me];if(O)var Ie=U?O(je,Pe,me,l,s,q):O(Pe,je,me,s,l,q);if(Ie!==r){if(Ie)continue;be=!1;break}if(Ce){if(!Hl(l,function(Le,$e){if(!jo(Ce,$e)&&(Pe===Le||I(Pe,Le,g,O,q)))return Ce.push($e)})){be=!1;break}}else if(!(Pe===je||I(Pe,je,g,O,q))){be=!1;break}}return q.delete(s),q.delete(l),be}function bF(s,l,g,O,I,q,U){switch(g){case tt:if(s.byteLength!=l.byteLength||s.byteOffset!=l.byteOffset)return!1;s=s.buffer,l=l.buffer;case ut:return!(s.byteLength!=l.byteLength||!q(new Ns(s),new Ns(l)));case K:case ie:case _e:return Nr(+s,+l);case ue:return s.name==l.name&&s.message==l.message;case He:case Xe:return s==l+"";case Se:var X=Yl;case qe:var re=O&m;if(X||(X=Ss),s.size!=l.size&&!re)return!1;var pe=U.get(s);if(pe)return pe==l;O|=y,U.set(s,l);var ge=U_(X(s),X(l),O,I,q,U);return U.delete(s),ge;case We:if(Fo)return Fo.call(s)==Fo.call(l)}return!1}function xF(s,l,g,O,I,q){var U=g&m,X=wf(s),re=X.length,pe=wf(l),ge=pe.length;if(re!=ge&&!U)return!1;for(var me=re;me--;){var be=X[me];if(!(U?be in l:Ze.call(l,be)))return!1}var Ce=q.get(s),Pe=q.get(l);if(Ce&&Pe)return Ce==l&&Pe==s;var je=!0;q.set(s,l),q.set(l,s);for(var Ie=U;++me<re;){be=X[me];var Le=s[be],$e=l[be];if(O)var rr=U?O($e,Le,be,l,s,q):O(Le,$e,be,s,l,q);if(!(rr===r?Le===$e||I(Le,$e,g,O,q):rr)){je=!1;break}Ie||(Ie=be=="constructor")}if(je&&!Ie){var Lt=s.constructor,nr=l.constructor;Lt!=nr&&"constructor"in s&&"constructor"in l&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof nr=="function"&&nr instanceof nr)&&(je=!1)}return q.delete(s),q.delete(l),je}function fn(s){return If(X_(s,r,o1),s+"")}function wf(s){return l_(s,St,Of)}function _f(s){return l_(s,Ht,V_)}var Ef=qs?function(s){return qs.get(s)}:zf;function Xs(s){for(var l=s.name+"",g=Bi[l],O=Ze.call(Bi,l)?g.length:0;O--;){var I=g[O],q=I.func;if(q==null||q==s)return I.name}return l}function Hi(s){var l=Ze.call(M,"placeholder")?M:s;return l.placeholder}function Re(){var s=M.iteratee||Ff;return s=s===Ff?h_:s,arguments.length?s(arguments[0],arguments[1]):s}function Zs(s,l){var g=s.__data__;return PF(l)?g[typeof l=="string"?"string":"hash"]:g.map}function Sf(s){for(var l=St(s),g=l.length;g--;){var O=l[g],I=s[O];l[g]=[O,I,K_(I)]}return l}function ri(s,l){var g=TL(s,l);return d_(g)?g:r}function wF(s){var l=Ze.call(s,Zn),g=s[Zn];try{s[Zn]=r;var O=!0}catch{}var I=Ps.call(s);return O&&(l?s[Zn]=g:delete s[Zn]),I}var Of=Zl?function(s){return s==null?[]:(s=rt(s),Cn(Zl(s),function(l){return Zw.call(s,l)}))}:Hf,V_=Zl?function(s){for(var l=[];s;)Rn(l,Of(s)),s=Ts(s);return l}:Hf,Mt=qt;(Jl&&Mt(new Jl(new ArrayBuffer(1)))!=tt||ko&&Mt(new ko)!=Se||Ql&&Mt(Ql.resolve())!=Oe||Li&&Mt(new Li)!=qe||Lo&&Mt(new Lo)!=et)&&(Mt=function(s){var l=qt(s),g=l==ae?s.constructor:r,O=g?ni(g):"";if(O)switch(O){case nB:return tt;case iB:return Se;case oB:return Oe;case aB:return qe;case sB:return et}return l});function _F(s,l,g){for(var O=-1,I=g.length;++O<I;){var q=g[O],U=q.size;switch(q.type){case"drop":s+=U;break;case"dropRight":l-=U;break;case"take":l=At(l,s+U);break;case"takeRight":s=_t(s,l-U);break}}return{start:s,end:l}}function EF(s){var l=s.match(us);return l?l[1].split(bl):[]}function W_(s,l,g){l=An(l,s);for(var O=-1,I=l.length,q=!1;++O<I;){var U=Wr(l[O]);if(!(q=s!=null&&g(s,U)))break;s=s[U]}return q||++O!=I?q:(I=s==null?0:s.length,!!I&&iu(I)&&dn(U,I)&&(Ae(s)||ii(s)))}function SF(s){var l=s.length,g=new s.constructor(l);return l&&typeof s[0]=="string"&&Ze.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function G_(s){return typeof s.constructor=="function"&&!Go(s)?Fi(Ts(s)):{}}function OF(s,l,g){var O=s.constructor;switch(l){case ut:return yf(s);case K:case ie:return new O(+s);case tt:return uF(s,g);case Ct:case Zt:case cr:case Dt:case xt:case jt:case zr:case Kn:case On:return I_(s,g);case Se:return new O;case _e:case Xe:return new O(s);case He:return cF(s);case qe:return new O;case We:return lF(s)}}function CF(s,l){var g=l.length;if(!g)return s;var O=g-1;return l[O]=(g>1?"& ":"")+l[O],l=l.join(g>2?", ":" "),s.replace(yl,`{
48
48
  /* [wrapped with `+l+`] */
49
- `)}function RF(s){return Ae(s)||ii(s)||!!(Zw&&s&&s[Zw])}function dn(s,l){var g=typeof s;return l=l??Y,!!l&&(g=="number"||g!="symbol"&&Rl.test(s))&&s>-1&&s%1==0&&s<l}function kt(s,l,g){if(!ft(g))return!1;var O=typeof l;return(O=="number"?zt(g)&&dn(l,g.length):O=="string"&&l in g)?Nr(g[l],s):!1}function Of(s,l){if(Ae(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||tr(s)?!0:gl.test(s)||!is.test(s)||l!=null&&s in rt(l)}function PF(s){var l=typeof s;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?s!=="__proto__":s===null}function Cf(s){var l=Xs(s),g=M[l];if(typeof g!="function"||!(l in Fe.prototype))return!1;if(s===g)return!0;var O=_f(g);return!!O&&s===O[0]}function IF(s){return!!Gw&&Gw in s}var NF=Cs?hn:Hf;function Go(s){var l=s&&s.constructor,g=typeof l=="function"&&l.prototype||ki;return s===g}function G_(s){return s===s&&!ft(s)}function K_(s,l){return function(g){return g==null?!1:g[s]===l&&(l!==r||s in rt(g))}}function TF(s){var l=ru(s,function(O){return g.size===d&&g.clear(),O}),g=l.cache;return l}function AF(s,l){var g=s[1],O=l[1],I=g|O,q=I<(b|x|P),U=O==P&&g==S||O==P&&g==N&&s[7].length<=l[8]||O==(P|N)&&l[7].length<=l[8]&&g==S;if(!(q||U))return s;O&b&&(s[2]=l[2],I|=g&b?0:w);var X=l[3];if(X){var re=s[3];s[3]=re?N_(re,X,l[4]):X,s[4]=re?Pn(s[3],f):l[4]}return X=l[5],X&&(re=s[5],s[5]=re?T_(re,X,l[6]):X,s[6]=re?Pn(s[5],f):l[6]),X=l[7],X&&(s[7]=X),O&P&&(s[8]=s[8]==null?l[8]:At(s[8],l[8])),s[9]==null&&(s[9]=l[9]),s[0]=l[0],s[1]=I,s}function MF(s){var l=[];if(s!=null)for(var g in rt(s))l.push(g);return l}function DF(s){return Ps.call(s)}function Y_(s,l,g){return l=_t(l===r?s.length-1:l,0),function(){for(var O=arguments,I=-1,q=_t(O.length-l,0),U=oe(q);++I<q;)U[I]=O[l+I];I=-1;for(var X=oe(l+1);++I<l;)X[I]=O[I];return X[l]=g(U),Jt(s,this,X)}}function X_(s,l){return l.length<2?s:ti(s,vr(l,0,-1))}function jF(s,l){for(var g=s.length,O=At(l.length,g),I=$t(s);O--;){var q=l[O];s[O]=dn(q,g)?I[q]:r}return s}function Rf(s,l){if(!(l==="constructor"&&typeof s[l]=="function")&&l!="__proto__")return s[l]}var Z_=Q_(x_),Ko=XL||function(s,l){return Rt.setTimeout(s,l)},Pf=Q_(iF);function J_(s,l,g){var O=l+"";return Pf(s,CF(O,qF(EF(O),g)))}function Q_(s){var l=0,g=0;return function(){var O=eB(),I=D-(O-g);if(g=O,I>0){if(++l>=k)return arguments[0]}else l=0;return s.apply(r,arguments)}}function Js(s,l){var g=-1,O=s.length,I=O-1;for(l=l===r?O:l;++g<l;){var q=lf(g,I),U=s[q];s[q]=s[g],s[g]=U}return s.length=l,s}var e1=TF(function(s){var l=[];return s.charCodeAt(0)===46&&l.push(""),s.replace(os,function(g,O,I,q){l.push(I?q.replace(wl,"$1"):O||g)}),l});function Wr(s){if(typeof s=="string"||tr(s))return s;var l=s+"";return l=="0"&&1/s==-W?"-0":l}function ni(s){if(s!=null){try{return Rs.call(s)}catch{}try{return s+""}catch{}}return""}function qF(s,l){return fr(z,function(g){var O="_."+g[0];l&g[1]&&!_s(s,O)&&s.push(O)}),s.sort()}function t1(s){if(s instanceof Fe)return s.clone();var l=new hr(s.__wrapped__,s.__chain__);return l.__actions__=$t(s.__actions__),l.__index__=s.__index__,l.__values__=s.__values__,l}function kF(s,l,g){(g?kt(s,l,g):l===r)?l=1:l=_t(Me(l),0);var O=s==null?0:s.length;if(!O||l<1)return[];for(var I=0,q=0,U=oe(Ds(O/l));I<O;)U[q++]=vr(s,I,I+=l);return U}function LF(s){for(var l=-1,g=s==null?0:s.length,O=0,I=[];++l<g;){var q=s[l];q&&(I[O++]=q)}return I}function BF(){var s=arguments.length;if(!s)return[];for(var l=oe(s-1),g=arguments[0],O=s;O--;)l[O-1]=arguments[O];return Rn(Ae(g)?$t(g):[g],Pt(l,1))}var FF=ke(function(s,l){return pt(s)?zo(s,Pt(l,1,pt,!0)):[]}),$F=ke(function(s,l){var g=gr(l);return pt(g)&&(g=r),pt(s)?zo(s,Pt(l,1,pt,!0),Re(g,2)):[]}),zF=ke(function(s,l){var g=gr(l);return pt(g)&&(g=r),pt(s)?zo(s,Pt(l,1,pt,!0),r,g):[]});function HF(s,l,g){var O=s==null?0:s.length;return O?(l=g||l===r?1:Me(l),vr(s,l<0?0:l,O)):[]}function UF(s,l,g){var O=s==null?0:s.length;return O?(l=g||l===r?1:Me(l),l=O-l,vr(s,0,l<0?0:l)):[]}function VF(s,l){return s&&s.length?Us(s,Re(l,3),!0,!0):[]}function WF(s,l){return s&&s.length?Us(s,Re(l,3),!0):[]}function GF(s,l,g,O){var I=s==null?0:s.length;return I?(g&&typeof g!="number"&&kt(s,l,g)&&(g=0,O=I),BB(s,l,g,O)):[]}function r1(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var I=g==null?0:Me(g);return I<0&&(I=_t(O+I,0)),Es(s,Re(l,3),I)}function n1(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var I=O-1;return g!==r&&(I=Me(g),I=g<0?_t(O+I,0):At(I,O-1)),Es(s,Re(l,3),I,!0)}function i1(s){var l=s==null?0:s.length;return l?Pt(s,1):[]}function KF(s){var l=s==null?0:s.length;return l?Pt(s,W):[]}function YF(s,l){var g=s==null?0:s.length;return g?(l=l===r?1:Me(l),Pt(s,l)):[]}function XF(s){for(var l=-1,g=s==null?0:s.length,O={};++l<g;){var I=s[l];O[I[0]]=I[1]}return O}function o1(s){return s&&s.length?s[0]:r}function ZF(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var I=g==null?0:Me(g);return I<0&&(I=_t(O+I,0)),Mi(s,l,I)}function JF(s){var l=s==null?0:s.length;return l?vr(s,0,-1):[]}var QF=ke(function(s){var l=ct(s,vf);return l.length&&l[0]===s[0]?of(l):[]}),e$=ke(function(s){var l=gr(s),g=ct(s,vf);return l===gr(g)?l=r:g.pop(),g.length&&g[0]===s[0]?of(g,Re(l,2)):[]}),t$=ke(function(s){var l=gr(s),g=ct(s,vf);return l=typeof l=="function"?l:r,l&&g.pop(),g.length&&g[0]===s[0]?of(g,r,l):[]});function r$(s,l){return s==null?"":JL.call(s,l)}function gr(s){var l=s==null?0:s.length;return l?s[l-1]:r}function n$(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var I=O;return g!==r&&(I=Me(g),I=I<0?_t(O+I,0):At(I,O-1)),l===l?qL(s,l,I):Es(s,Bw,I,!0)}function i$(s,l){return s&&s.length?g_(s,Me(l)):r}var o$=ke(a1);function a1(s,l){return s&&s.length&&l&&l.length?cf(s,l):s}function a$(s,l,g){return s&&s.length&&l&&l.length?cf(s,l,Re(g,2)):s}function s$(s,l,g){return s&&s.length&&l&&l.length?cf(s,l,r,g):s}var u$=fn(function(s,l){var g=s==null?0:s.length,O=ef(s,l);return b_(s,ct(l,function(I){return dn(I,g)?+I:I}).sort(I_)),O});function c$(s,l){var g=[];if(!(s&&s.length))return g;var O=-1,I=[],q=s.length;for(l=Re(l,3);++O<q;){var U=s[O];l(U,O,s)&&(g.push(U),I.push(O))}return b_(s,I),g}function If(s){return s==null?s:rB.call(s)}function l$(s,l,g){var O=s==null?0:s.length;return O?(g&&typeof g!="number"&&kt(s,l,g)?(l=0,g=O):(l=l==null?0:Me(l),g=g===r?O:Me(g)),vr(s,l,g)):[]}function f$(s,l){return Hs(s,l)}function d$(s,l,g){return df(s,l,Re(g,2))}function h$(s,l){var g=s==null?0:s.length;if(g){var O=Hs(s,l);if(O<g&&Nr(s[O],l))return O}return-1}function p$(s,l){return Hs(s,l,!0)}function v$(s,l,g){return df(s,l,Re(g,2),!0)}function g$(s,l){var g=s==null?0:s.length;if(g){var O=Hs(s,l,!0)-1;if(Nr(s[O],l))return O}return-1}function m$(s){return s&&s.length?w_(s):[]}function y$(s,l){return s&&s.length?w_(s,Re(l,2)):[]}function b$(s){var l=s==null?0:s.length;return l?vr(s,1,l):[]}function x$(s,l,g){return s&&s.length?(l=g||l===r?1:Me(l),vr(s,0,l<0?0:l)):[]}function w$(s,l,g){var O=s==null?0:s.length;return O?(l=g||l===r?1:Me(l),l=O-l,vr(s,l<0?0:l,O)):[]}function _$(s,l){return s&&s.length?Us(s,Re(l,3),!1,!0):[]}function E$(s,l){return s&&s.length?Us(s,Re(l,3)):[]}var S$=ke(function(s){return Tn(Pt(s,1,pt,!0))}),O$=ke(function(s){var l=gr(s);return pt(l)&&(l=r),Tn(Pt(s,1,pt,!0),Re(l,2))}),C$=ke(function(s){var l=gr(s);return l=typeof l=="function"?l:r,Tn(Pt(s,1,pt,!0),r,l)});function R$(s){return s&&s.length?Tn(s):[]}function P$(s,l){return s&&s.length?Tn(s,Re(l,2)):[]}function I$(s,l){return l=typeof l=="function"?l:r,s&&s.length?Tn(s,r,l):[]}function Nf(s){if(!(s&&s.length))return[];var l=0;return s=Cn(s,function(g){if(pt(g))return l=_t(g.length,l),!0}),Wl(l,function(g){return ct(s,Hl(g))})}function s1(s,l){if(!(s&&s.length))return[];var g=Nf(s);return l==null?g:ct(g,function(O){return Jt(l,r,O)})}var N$=ke(function(s,l){return pt(s)?zo(s,l):[]}),T$=ke(function(s){return pf(Cn(s,pt))}),A$=ke(function(s){var l=gr(s);return pt(l)&&(l=r),pf(Cn(s,pt),Re(l,2))}),M$=ke(function(s){var l=gr(s);return l=typeof l=="function"?l:r,pf(Cn(s,pt),r,l)}),D$=ke(Nf);function j$(s,l){return O_(s||[],l||[],$o)}function q$(s,l){return O_(s||[],l||[],Vo)}var k$=ke(function(s){var l=s.length,g=l>1?s[l-1]:r;return g=typeof g=="function"?(s.pop(),g):r,s1(s,g)});function u1(s){var l=M(s);return l.__chain__=!0,l}function L$(s,l){return l(s),s}function Qs(s,l){return l(s)}var B$=fn(function(s){var l=s.length,g=l?s[0]:0,O=this.__wrapped__,I=function(q){return ef(q,s)};return l>1||this.__actions__.length||!(O instanceof Fe)||!dn(g)?this.thru(I):(O=O.slice(g,+g+(l?1:0)),O.__actions__.push({func:Qs,args:[I],thisArg:r}),new hr(O,this.__chain__).thru(function(q){return l&&!q.length&&q.push(r),q}))});function F$(){return u1(this)}function $$(){return new hr(this.value(),this.__chain__)}function z$(){this.__values__===r&&(this.__values__=_1(this.value()));var s=this.__index__>=this.__values__.length,l=s?r:this.__values__[this.__index__++];return{done:s,value:l}}function H$(){return this}function U$(s){for(var l,g=this;g instanceof Ls;){var O=t1(g);O.__index__=0,O.__values__=r,l?I.__wrapped__=O:l=O;var I=O;g=g.__wrapped__}return I.__wrapped__=s,l}function V$(){var s=this.__wrapped__;if(s instanceof Fe){var l=s;return this.__actions__.length&&(l=new Fe(this)),l=l.reverse(),l.__actions__.push({func:Qs,args:[If],thisArg:r}),new hr(l,this.__chain__)}return this.thru(If)}function W$(){return S_(this.__wrapped__,this.__actions__)}var G$=Vs(function(s,l,g){Ze.call(s,g)?++s[g]:cn(s,g,1)});function K$(s,l,g){var O=Ae(s)?kw:LB;return g&&kt(s,l,g)&&(l=r),O(s,Re(l,3))}function Y$(s,l){var g=Ae(s)?Cn:s_;return g(s,Re(l,3))}var X$=j_(r1),Z$=j_(n1);function J$(s,l){return Pt(eu(s,l),1)}function Q$(s,l){return Pt(eu(s,l),W)}function e3(s,l,g){return g=g===r?1:Me(g),Pt(eu(s,l),g)}function c1(s,l){var g=Ae(s)?fr:Nn;return g(s,Re(l,3))}function l1(s,l){var g=Ae(s)?bL:a_;return g(s,Re(l,3))}var t3=Vs(function(s,l,g){Ze.call(s,g)?s[g].push(l):cn(s,g,[l])});function r3(s,l,g,O){s=zt(s)?s:Vi(s),g=g&&!O?Me(g):0;var I=s.length;return g<0&&(g=_t(I+g,0)),ou(s)?g<=I&&s.indexOf(l,g)>-1:!!I&&Mi(s,l,g)>-1}var n3=ke(function(s,l,g){var O=-1,I=typeof l=="function",q=zt(s)?oe(s.length):[];return Nn(s,function(U){q[++O]=I?Jt(l,U,g):Ho(U,l,g)}),q}),i3=Vs(function(s,l,g){cn(s,g,l)});function eu(s,l){var g=Ae(s)?ct:h_;return g(s,Re(l,3))}function o3(s,l,g,O){return s==null?[]:(Ae(l)||(l=l==null?[]:[l]),g=O?r:g,Ae(g)||(g=g==null?[]:[g]),m_(s,l,g))}var a3=Vs(function(s,l,g){s[g?0:1].push(l)},function(){return[[],[]]});function s3(s,l,g){var O=Ae(s)?$l:$w,I=arguments.length<3;return O(s,Re(l,4),g,I,Nn)}function u3(s,l,g){var O=Ae(s)?xL:$w,I=arguments.length<3;return O(s,Re(l,4),g,I,a_)}function c3(s,l){var g=Ae(s)?Cn:s_;return g(s,nu(Re(l,3)))}function l3(s){var l=Ae(s)?r_:rF;return l(s)}function f3(s,l,g){(g?kt(s,l,g):l===r)?l=1:l=Me(l);var O=Ae(s)?MB:nF;return O(s,l)}function d3(s){var l=Ae(s)?DB:oF;return l(s)}function h3(s){if(s==null)return 0;if(zt(s))return ou(s)?ji(s):s.length;var l=Mt(s);return l==Se||l==qe?s.size:sf(s).length}function p3(s,l,g){var O=Ae(s)?zl:aF;return g&&kt(s,l,g)&&(l=r),O(s,Re(l,3))}var v3=ke(function(s,l){if(s==null)return[];var g=l.length;return g>1&&kt(s,l[0],l[1])?l=[]:g>2&&kt(l[0],l[1],l[2])&&(l=[l[0]]),m_(s,Pt(l,1),[])}),tu=YL||function(){return Rt.Date.now()};function g3(s,l){if(typeof l!="function")throw new dr(a);return s=Me(s),function(){if(--s<1)return l.apply(this,arguments)}}function f1(s,l,g){return l=g?r:l,l=s&&l==null?s.length:l,ln(s,P,r,r,r,r,l)}function d1(s,l){var g;if(typeof l!="function")throw new dr(a);return s=Me(s),function(){return--s>0&&(g=l.apply(this,arguments)),s<=1&&(l=r),g}}var Tf=ke(function(s,l,g){var O=b;if(g.length){var I=Pn(g,Hi(Tf));O|=_}return ln(s,O,l,g,I)}),h1=ke(function(s,l,g){var O=b|x;if(g.length){var I=Pn(g,Hi(h1));O|=_}return ln(l,O,s,g,I)});function p1(s,l,g){l=g?r:l;var O=ln(s,S,r,r,r,r,r,l);return O.placeholder=p1.placeholder,O}function v1(s,l,g){l=g?r:l;var O=ln(s,E,r,r,r,r,r,l);return O.placeholder=v1.placeholder,O}function g1(s,l,g){var O,I,q,U,X,re,pe=0,ge=!1,me=!1,be=!0;if(typeof s!="function")throw new dr(a);l=mr(l)||0,ft(g)&&(ge=!!g.leading,me="maxWait"in g,q=me?_t(mr(g.maxWait)||0,l):q,be="trailing"in g?!!g.trailing:be);function Ce(vt){var Tr=O,vn=I;return O=I=r,pe=vt,U=s.apply(vn,Tr),U}function Pe(vt){return pe=vt,X=Ko(Le,l),ge?Ce(vt):U}function je(vt){var Tr=vt-re,vn=vt-pe,j1=l-Tr;return me?At(j1,q-vn):j1}function Ie(vt){var Tr=vt-re,vn=vt-pe;return re===r||Tr>=l||Tr<0||me&&vn>=q}function Le(){var vt=tu();if(Ie(vt))return $e(vt);X=Ko(Le,je(vt))}function $e(vt){return X=r,be&&O?Ce(vt):(O=I=r,U)}function rr(){X!==r&&C_(X),pe=0,O=re=I=X=r}function Lt(){return X===r?U:$e(tu())}function nr(){var vt=tu(),Tr=Ie(vt);if(O=arguments,I=this,re=vt,Tr){if(X===r)return Pe(re);if(me)return C_(X),X=Ko(Le,l),Ce(re)}return X===r&&(X=Ko(Le,l)),U}return nr.cancel=rr,nr.flush=Lt,nr}var m3=ke(function(s,l){return o_(s,1,l)}),y3=ke(function(s,l,g){return o_(s,mr(l)||0,g)});function b3(s){return ln(s,j)}function ru(s,l){if(typeof s!="function"||l!=null&&typeof l!="function")throw new dr(a);var g=function(){var O=arguments,I=l?l.apply(this,O):O[0],q=g.cache;if(q.has(I))return q.get(I);var U=s.apply(this,O);return g.cache=q.set(I,U)||q,U};return g.cache=new(ru.Cache||un),g}ru.Cache=un;function nu(s){if(typeof s!="function")throw new dr(a);return function(){var l=arguments;switch(l.length){case 0:return!s.call(this);case 1:return!s.call(this,l[0]);case 2:return!s.call(this,l[0],l[1]);case 3:return!s.call(this,l[0],l[1],l[2])}return!s.apply(this,l)}}function x3(s){return d1(2,s)}var w3=sF(function(s,l){l=l.length==1&&Ae(l[0])?ct(l[0],Qt(Re())):ct(Pt(l,1),Qt(Re()));var g=l.length;return ke(function(O){for(var I=-1,q=At(O.length,g);++I<q;)O[I]=l[I].call(this,O[I]);return Jt(s,this,O)})}),Af=ke(function(s,l){var g=Pn(l,Hi(Af));return ln(s,_,r,l,g)}),m1=ke(function(s,l){var g=Pn(l,Hi(m1));return ln(s,R,r,l,g)}),_3=fn(function(s,l){return ln(s,N,r,r,r,l)});function E3(s,l){if(typeof s!="function")throw new dr(a);return l=l===r?l:Me(l),ke(s,l)}function S3(s,l){if(typeof s!="function")throw new dr(a);return l=l==null?0:_t(Me(l),0),ke(function(g){var O=g[l],I=Mn(g,0,l);return O&&Rn(I,O),Jt(s,this,I)})}function O3(s,l,g){var O=!0,I=!0;if(typeof s!="function")throw new dr(a);return ft(g)&&(O="leading"in g?!!g.leading:O,I="trailing"in g?!!g.trailing:I),g1(s,l,{leading:O,maxWait:l,trailing:I})}function C3(s){return f1(s,1)}function R3(s,l){return Af(gf(l),s)}function P3(){if(!arguments.length)return[];var s=arguments[0];return Ae(s)?s:[s]}function I3(s){return pr(s,v)}function N3(s,l){return l=typeof l=="function"?l:r,pr(s,v,l)}function T3(s){return pr(s,h|v)}function A3(s,l){return l=typeof l=="function"?l:r,pr(s,h|v,l)}function M3(s,l){return l==null||i_(s,l,St(l))}function Nr(s,l){return s===l||s!==s&&l!==l}var D3=Ys(nf),j3=Ys(function(s,l){return s>=l}),ii=l_((function(){return arguments})())?l_:function(s){return dt(s)&&Ze.call(s,"callee")&&!Xw.call(s,"callee")},Ae=oe.isArray,q3=Tw?Qt(Tw):UB;function zt(s){return s!=null&&iu(s.length)&&!hn(s)}function pt(s){return dt(s)&&zt(s)}function k3(s){return s===!0||s===!1||dt(s)&&qt(s)==K}var Dn=ZL||Hf,L3=Aw?Qt(Aw):VB;function B3(s){return dt(s)&&s.nodeType===1&&!Yo(s)}function F3(s){if(s==null)return!0;if(zt(s)&&(Ae(s)||typeof s=="string"||typeof s.splice=="function"||Dn(s)||Ui(s)||ii(s)))return!s.length;var l=Mt(s);if(l==Se||l==qe)return!s.size;if(Go(s))return!sf(s).length;for(var g in s)if(Ze.call(s,g))return!1;return!0}function $3(s,l){return Uo(s,l)}function z3(s,l,g){g=typeof g=="function"?g:r;var O=g?g(s,l):r;return O===r?Uo(s,l,r,g):!!O}function Mf(s){if(!dt(s))return!1;var l=qt(s);return l==ue||l==ne||typeof s.message=="string"&&typeof s.name=="string"&&!Yo(s)}function H3(s){return typeof s=="number"&&Jw(s)}function hn(s){if(!ft(s))return!1;var l=qt(s);return l==de||l==we||l==V||l==Ne}function y1(s){return typeof s=="number"&&s==Me(s)}function iu(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Y}function ft(s){var l=typeof s;return s!=null&&(l=="object"||l=="function")}function dt(s){return s!=null&&typeof s=="object"}var b1=Mw?Qt(Mw):GB;function U3(s,l){return s===l||af(s,l,Ef(l))}function V3(s,l,g){return g=typeof g=="function"?g:r,af(s,l,Ef(l),g)}function W3(s){return x1(s)&&s!=+s}function G3(s){if(NF(s))throw new Te(o);return f_(s)}function K3(s){return s===null}function Y3(s){return s==null}function x1(s){return typeof s=="number"||dt(s)&&qt(s)==_e}function Yo(s){if(!dt(s)||qt(s)!=ae)return!1;var l=Ts(s);if(l===null)return!0;var g=Ze.call(l,"constructor")&&l.constructor;return typeof g=="function"&&g instanceof g&&Rs.call(g)==VL}var Df=Dw?Qt(Dw):KB;function X3(s){return y1(s)&&s>=-Y&&s<=Y}var w1=jw?Qt(jw):YB;function ou(s){return typeof s=="string"||!Ae(s)&&dt(s)&&qt(s)==Xe}function tr(s){return typeof s=="symbol"||dt(s)&&qt(s)==We}var Ui=qw?Qt(qw):XB;function Z3(s){return s===r}function J3(s){return dt(s)&&Mt(s)==et}function Q3(s){return dt(s)&&qt(s)==Tt}var e5=Ys(uf),t5=Ys(function(s,l){return s<=l});function _1(s){if(!s)return[];if(zt(s))return ou(s)?Pr(s):$t(s);if(qo&&s[qo])return ML(s[qo]());var l=Mt(s),g=l==Se?Kl:l==qe?Ss:Vi;return g(s)}function pn(s){if(!s)return s===0?s:0;if(s=mr(s),s===W||s===-W){var l=s<0?-1:1;return l*ee}return s===s?s:0}function Me(s){var l=pn(s),g=l%1;return l===l?g?l-g:l:0}function E1(s){return s?ei(Me(s),0,Q):0}function mr(s){if(typeof s=="number")return s;if(tr(s))return H;if(ft(s)){var l=typeof s.valueOf=="function"?s.valueOf():s;s=ft(l)?l+"":l}if(typeof s!="string")return s===0?s:+s;s=zw(s);var g=Sl.test(s);return g||Cl.test(s)?gL(s.slice(2),g?2:8):El.test(s)?H:+s}function S1(s){return Vr(s,Ht(s))}function r5(s){return s?ei(Me(s),-Y,Y):s===0?s:0}function Ge(s){return s==null?"":er(s)}var n5=$i(function(s,l){if(Go(l)||zt(l)){Vr(l,St(l),s);return}for(var g in l)Ze.call(l,g)&&$o(s,g,l[g])}),O1=$i(function(s,l){Vr(l,Ht(l),s)}),au=$i(function(s,l,g,O){Vr(l,Ht(l),s,O)}),i5=$i(function(s,l,g,O){Vr(l,St(l),s,O)}),o5=fn(ef);function a5(s,l){var g=Fi(s);return l==null?g:n_(g,l)}var s5=ke(function(s,l){s=rt(s);var g=-1,O=l.length,I=O>2?l[2]:r;for(I&&kt(l[0],l[1],I)&&(O=1);++g<O;)for(var q=l[g],U=Ht(q),X=-1,re=U.length;++X<re;){var pe=U[X],ge=s[pe];(ge===r||Nr(ge,ki[pe])&&!Ze.call(s,pe))&&(s[pe]=q[pe])}return s}),u5=ke(function(s){return s.push(r,z_),Jt(C1,r,s)});function c5(s,l){return Lw(s,Re(l,3),Ur)}function l5(s,l){return Lw(s,Re(l,3),rf)}function f5(s,l){return s==null?s:tf(s,Re(l,3),Ht)}function d5(s,l){return s==null?s:u_(s,Re(l,3),Ht)}function h5(s,l){return s&&Ur(s,Re(l,3))}function p5(s,l){return s&&rf(s,Re(l,3))}function v5(s){return s==null?[]:$s(s,St(s))}function g5(s){return s==null?[]:$s(s,Ht(s))}function jf(s,l,g){var O=s==null?r:ti(s,l);return O===r?g:O}function m5(s,l){return s!=null&&V_(s,l,FB)}function qf(s,l){return s!=null&&V_(s,l,$B)}var y5=k_(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=Ps.call(l)),s[l]=g},Lf(Ut)),b5=k_(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=Ps.call(l)),Ze.call(s,l)?s[l].push(g):s[l]=[g]},Re),x5=ke(Ho);function St(s){return zt(s)?t_(s):sf(s)}function Ht(s){return zt(s)?t_(s,!0):ZB(s)}function w5(s,l){var g={};return l=Re(l,3),Ur(s,function(O,I,q){cn(g,l(O,I,q),O)}),g}function _5(s,l){var g={};return l=Re(l,3),Ur(s,function(O,I,q){cn(g,I,l(O,I,q))}),g}var E5=$i(function(s,l,g){zs(s,l,g)}),C1=$i(function(s,l,g,O){zs(s,l,g,O)}),S5=fn(function(s,l){var g={};if(s==null)return g;var O=!1;l=ct(l,function(q){return q=An(q,s),O||(O=q.length>1),q}),Vr(s,wf(s),g),O&&(g=pr(g,h|p|v,yF));for(var I=l.length;I--;)hf(g,l[I]);return g});function O5(s,l){return R1(s,nu(Re(l)))}var C5=fn(function(s,l){return s==null?{}:QB(s,l)});function R1(s,l){if(s==null)return{};var g=ct(wf(s),function(O){return[O]});return l=Re(l),y_(s,g,function(O,I){return l(O,I[0])})}function R5(s,l,g){l=An(l,s);var O=-1,I=l.length;for(I||(I=1,s=r);++O<I;){var q=s==null?r:s[Wr(l[O])];q===r&&(O=I,q=g),s=hn(q)?q.call(s):q}return s}function P5(s,l,g){return s==null?s:Vo(s,l,g)}function I5(s,l,g,O){return O=typeof O=="function"?O:r,s==null?s:Vo(s,l,g,O)}var P1=F_(St),I1=F_(Ht);function N5(s,l,g){var O=Ae(s),I=O||Dn(s)||Ui(s);if(l=Re(l,4),g==null){var q=s&&s.constructor;I?g=O?new q:[]:ft(s)?g=hn(q)?Fi(Ts(s)):{}:g={}}return(I?fr:Ur)(s,function(U,X,re){return l(g,U,X,re)}),g}function T5(s,l){return s==null?!0:hf(s,l)}function A5(s,l,g){return s==null?s:E_(s,l,gf(g))}function M5(s,l,g,O){return O=typeof O=="function"?O:r,s==null?s:E_(s,l,gf(g),O)}function Vi(s){return s==null?[]:Gl(s,St(s))}function D5(s){return s==null?[]:Gl(s,Ht(s))}function j5(s,l,g){return g===r&&(g=l,l=r),g!==r&&(g=mr(g),g=g===g?g:0),l!==r&&(l=mr(l),l=l===l?l:0),ei(mr(s),l,g)}function q5(s,l,g){return l=pn(l),g===r?(g=l,l=0):g=pn(g),s=mr(s),zB(s,l,g)}function k5(s,l,g){if(g&&typeof g!="boolean"&&kt(s,l,g)&&(l=g=r),g===r&&(typeof l=="boolean"?(g=l,l=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&l===r?(s=0,l=1):(s=pn(s),l===r?(l=s,s=0):l=pn(l)),s>l){var O=s;s=l,l=O}if(g||s%1||l%1){var I=Qw();return At(s+I*(l-s+vL("1e-"+((I+"").length-1))),l)}return lf(s,l)}var L5=zi(function(s,l,g){return l=l.toLowerCase(),s+(g?N1(l):l)});function N1(s){return kf(Ge(s).toLowerCase())}function T1(s){return s=Ge(s),s&&s.replace(Pl,PL).replace(oL,"")}function B5(s,l,g){s=Ge(s),l=er(l);var O=s.length;g=g===r?O:ei(Me(g),0,O);var I=g;return g-=l.length,g>=0&&s.slice(g,I)==l}function F5(s){return s=Ge(s),s&&ts.test(s)?s.replace(Io,IL):s}function $5(s){return s=Ge(s),s&&as.test(s)?s.replace(No,"\\$&"):s}var z5=zi(function(s,l,g){return s+(g?"-":"")+l.toLowerCase()}),H5=zi(function(s,l,g){return s+(g?" ":"")+l.toLowerCase()}),U5=D_("toLowerCase");function V5(s,l,g){s=Ge(s),l=Me(l);var O=l?ji(s):0;if(!l||O>=l)return s;var I=(l-O)/2;return Ks(js(I),g)+s+Ks(Ds(I),g)}function W5(s,l,g){s=Ge(s),l=Me(l);var O=l?ji(s):0;return l&&O<l?s+Ks(l-O,g):s}function G5(s,l,g){s=Ge(s),l=Me(l);var O=l?ji(s):0;return l&&O<l?Ks(l-O,g)+s:s}function K5(s,l,g){return g||l==null?l=0:l&&(l=+l),tB(Ge(s).replace(To,""),l||0)}function Y5(s,l,g){return(g?kt(s,l,g):l===r)?l=1:l=Me(l),ff(Ge(s),l)}function X5(){var s=arguments,l=Ge(s[0]);return s.length<3?l:l.replace(s[1],s[2])}var Z5=zi(function(s,l,g){return s+(g?"_":"")+l.toLowerCase()});function J5(s,l,g){return g&&typeof g!="number"&&kt(s,l,g)&&(l=g=r),g=g===r?Q:g>>>0,g?(s=Ge(s),s&&(typeof l=="string"||l!=null&&!Df(l))&&(l=er(l),!l&&Di(s))?Mn(Pr(s),0,g):s.split(l,g)):[]}var Q5=zi(function(s,l,g){return s+(g?" ":"")+kf(l)});function ez(s,l,g){return s=Ge(s),g=g==null?0:ei(Me(g),0,s.length),l=er(l),s.slice(g,g+l.length)==l}function tz(s,l,g){var O=M.templateSettings;g&&kt(s,l,g)&&(l=r),s=Ge(s),l=au({},l,O,$_);var I=au({},l.imports,O.imports,$_),q=St(I),U=Gl(I,q),X,re,pe=0,ge=l.interpolate||Ii,me="__p += '",be=Yl((l.escape||Ii).source+"|"+ge.source+"|"+(ge===ns?_l:Ii).source+"|"+(l.evaluate||Ii).source+"|$","g"),Ce="//# sourceURL="+(Ze.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++lL+"]")+`
49
+ `)}function RF(s){return Ae(s)||ii(s)||!!(Jw&&s&&s[Jw])}function dn(s,l){var g=typeof s;return l=l??Y,!!l&&(g=="number"||g!="symbol"&&Pl.test(s))&&s>-1&&s%1==0&&s<l}function kt(s,l,g){if(!ft(g))return!1;var O=typeof l;return(O=="number"?zt(g)&&dn(l,g.length):O=="string"&&l in g)?Nr(g[l],s):!1}function Cf(s,l){if(Ae(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||tr(s)?!0:ml.test(s)||!is.test(s)||l!=null&&s in rt(l)}function PF(s){var l=typeof s;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?s!=="__proto__":s===null}function Rf(s){var l=Xs(s),g=M[l];if(typeof g!="function"||!(l in Fe.prototype))return!1;if(s===g)return!0;var O=Ef(g);return!!O&&s===O[0]}function IF(s){return!!Kw&&Kw in s}var NF=Cs?hn:Uf;function Go(s){var l=s&&s.constructor,g=typeof l=="function"&&l.prototype||ki;return s===g}function K_(s){return s===s&&!ft(s)}function Y_(s,l){return function(g){return g==null?!1:g[s]===l&&(l!==r||s in rt(g))}}function TF(s){var l=ru(s,function(O){return g.size===d&&g.clear(),O}),g=l.cache;return l}function AF(s,l){var g=s[1],O=l[1],I=g|O,q=I<(b|x|P),U=O==P&&g==S||O==P&&g==N&&s[7].length<=l[8]||O==(P|N)&&l[7].length<=l[8]&&g==S;if(!(q||U))return s;O&b&&(s[2]=l[2],I|=g&b?0:w);var X=l[3];if(X){var re=s[3];s[3]=re?T_(re,X,l[4]):X,s[4]=re?Pn(s[3],f):l[4]}return X=l[5],X&&(re=s[5],s[5]=re?A_(re,X,l[6]):X,s[6]=re?Pn(s[5],f):l[6]),X=l[7],X&&(s[7]=X),O&P&&(s[8]=s[8]==null?l[8]:At(s[8],l[8])),s[9]==null&&(s[9]=l[9]),s[0]=l[0],s[1]=I,s}function MF(s){var l=[];if(s!=null)for(var g in rt(s))l.push(g);return l}function DF(s){return Ps.call(s)}function X_(s,l,g){return l=_t(l===r?s.length-1:l,0),function(){for(var O=arguments,I=-1,q=_t(O.length-l,0),U=oe(q);++I<q;)U[I]=O[l+I];I=-1;for(var X=oe(l+1);++I<l;)X[I]=O[I];return X[l]=g(U),Jt(s,this,X)}}function Z_(s,l){return l.length<2?s:ti(s,vr(l,0,-1))}function jF(s,l){for(var g=s.length,O=At(l.length,g),I=$t(s);O--;){var q=l[O];s[O]=dn(q,g)?I[q]:r}return s}function Pf(s,l){if(!(l==="constructor"&&typeof s[l]=="function")&&l!="__proto__")return s[l]}var J_=e1(w_),Ko=XL||function(s,l){return Rt.setTimeout(s,l)},If=e1(iF);function Q_(s,l,g){var O=l+"";return If(s,CF(O,qF(EF(O),g)))}function e1(s){var l=0,g=0;return function(){var O=eB(),I=D-(O-g);if(g=O,I>0){if(++l>=k)return arguments[0]}else l=0;return s.apply(r,arguments)}}function Js(s,l){var g=-1,O=s.length,I=O-1;for(l=l===r?O:l;++g<l;){var q=ff(g,I),U=s[q];s[q]=s[g],s[g]=U}return s.length=l,s}var t1=TF(function(s){var l=[];return s.charCodeAt(0)===46&&l.push(""),s.replace(os,function(g,O,I,q){l.push(I?q.replace(_l,"$1"):O||g)}),l});function Wr(s){if(typeof s=="string"||tr(s))return s;var l=s+"";return l=="0"&&1/s==-W?"-0":l}function ni(s){if(s!=null){try{return Rs.call(s)}catch{}try{return s+""}catch{}}return""}function qF(s,l){return fr(z,function(g){var O="_."+g[0];l&g[1]&&!_s(s,O)&&s.push(O)}),s.sort()}function r1(s){if(s instanceof Fe)return s.clone();var l=new hr(s.__wrapped__,s.__chain__);return l.__actions__=$t(s.__actions__),l.__index__=s.__index__,l.__values__=s.__values__,l}function kF(s,l,g){(g?kt(s,l,g):l===r)?l=1:l=_t(Me(l),0);var O=s==null?0:s.length;if(!O||l<1)return[];for(var I=0,q=0,U=oe(Ds(O/l));I<O;)U[q++]=vr(s,I,I+=l);return U}function LF(s){for(var l=-1,g=s==null?0:s.length,O=0,I=[];++l<g;){var q=s[l];q&&(I[O++]=q)}return I}function BF(){var s=arguments.length;if(!s)return[];for(var l=oe(s-1),g=arguments[0],O=s;O--;)l[O-1]=arguments[O];return Rn(Ae(g)?$t(g):[g],Pt(l,1))}var FF=ke(function(s,l){return pt(s)?zo(s,Pt(l,1,pt,!0)):[]}),$F=ke(function(s,l){var g=gr(l);return pt(g)&&(g=r),pt(s)?zo(s,Pt(l,1,pt,!0),Re(g,2)):[]}),zF=ke(function(s,l){var g=gr(l);return pt(g)&&(g=r),pt(s)?zo(s,Pt(l,1,pt,!0),r,g):[]});function HF(s,l,g){var O=s==null?0:s.length;return O?(l=g||l===r?1:Me(l),vr(s,l<0?0:l,O)):[]}function UF(s,l,g){var O=s==null?0:s.length;return O?(l=g||l===r?1:Me(l),l=O-l,vr(s,0,l<0?0:l)):[]}function VF(s,l){return s&&s.length?Us(s,Re(l,3),!0,!0):[]}function WF(s,l){return s&&s.length?Us(s,Re(l,3),!0):[]}function GF(s,l,g,O){var I=s==null?0:s.length;return I?(g&&typeof g!="number"&&kt(s,l,g)&&(g=0,O=I),BB(s,l,g,O)):[]}function n1(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var I=g==null?0:Me(g);return I<0&&(I=_t(O+I,0)),Es(s,Re(l,3),I)}function i1(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var I=O-1;return g!==r&&(I=Me(g),I=g<0?_t(O+I,0):At(I,O-1)),Es(s,Re(l,3),I,!0)}function o1(s){var l=s==null?0:s.length;return l?Pt(s,1):[]}function KF(s){var l=s==null?0:s.length;return l?Pt(s,W):[]}function YF(s,l){var g=s==null?0:s.length;return g?(l=l===r?1:Me(l),Pt(s,l)):[]}function XF(s){for(var l=-1,g=s==null?0:s.length,O={};++l<g;){var I=s[l];O[I[0]]=I[1]}return O}function a1(s){return s&&s.length?s[0]:r}function ZF(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var I=g==null?0:Me(g);return I<0&&(I=_t(O+I,0)),Mi(s,l,I)}function JF(s){var l=s==null?0:s.length;return l?vr(s,0,-1):[]}var QF=ke(function(s){var l=ct(s,gf);return l.length&&l[0]===s[0]?af(l):[]}),e$=ke(function(s){var l=gr(s),g=ct(s,gf);return l===gr(g)?l=r:g.pop(),g.length&&g[0]===s[0]?af(g,Re(l,2)):[]}),t$=ke(function(s){var l=gr(s),g=ct(s,gf);return l=typeof l=="function"?l:r,l&&g.pop(),g.length&&g[0]===s[0]?af(g,r,l):[]});function r$(s,l){return s==null?"":JL.call(s,l)}function gr(s){var l=s==null?0:s.length;return l?s[l-1]:r}function n$(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var I=O;return g!==r&&(I=Me(g),I=I<0?_t(O+I,0):At(I,O-1)),l===l?qL(s,l,I):Es(s,Fw,I,!0)}function i$(s,l){return s&&s.length?m_(s,Me(l)):r}var o$=ke(s1);function s1(s,l){return s&&s.length&&l&&l.length?lf(s,l):s}function a$(s,l,g){return s&&s.length&&l&&l.length?lf(s,l,Re(g,2)):s}function s$(s,l,g){return s&&s.length&&l&&l.length?lf(s,l,r,g):s}var u$=fn(function(s,l){var g=s==null?0:s.length,O=tf(s,l);return x_(s,ct(l,function(I){return dn(I,g)?+I:I}).sort(N_)),O});function c$(s,l){var g=[];if(!(s&&s.length))return g;var O=-1,I=[],q=s.length;for(l=Re(l,3);++O<q;){var U=s[O];l(U,O,s)&&(g.push(U),I.push(O))}return x_(s,I),g}function Nf(s){return s==null?s:rB.call(s)}function l$(s,l,g){var O=s==null?0:s.length;return O?(g&&typeof g!="number"&&kt(s,l,g)?(l=0,g=O):(l=l==null?0:Me(l),g=g===r?O:Me(g)),vr(s,l,g)):[]}function f$(s,l){return Hs(s,l)}function d$(s,l,g){return hf(s,l,Re(g,2))}function h$(s,l){var g=s==null?0:s.length;if(g){var O=Hs(s,l);if(O<g&&Nr(s[O],l))return O}return-1}function p$(s,l){return Hs(s,l,!0)}function v$(s,l,g){return hf(s,l,Re(g,2),!0)}function g$(s,l){var g=s==null?0:s.length;if(g){var O=Hs(s,l,!0)-1;if(Nr(s[O],l))return O}return-1}function m$(s){return s&&s.length?__(s):[]}function y$(s,l){return s&&s.length?__(s,Re(l,2)):[]}function b$(s){var l=s==null?0:s.length;return l?vr(s,1,l):[]}function x$(s,l,g){return s&&s.length?(l=g||l===r?1:Me(l),vr(s,0,l<0?0:l)):[]}function w$(s,l,g){var O=s==null?0:s.length;return O?(l=g||l===r?1:Me(l),l=O-l,vr(s,l<0?0:l,O)):[]}function _$(s,l){return s&&s.length?Us(s,Re(l,3),!1,!0):[]}function E$(s,l){return s&&s.length?Us(s,Re(l,3)):[]}var S$=ke(function(s){return Tn(Pt(s,1,pt,!0))}),O$=ke(function(s){var l=gr(s);return pt(l)&&(l=r),Tn(Pt(s,1,pt,!0),Re(l,2))}),C$=ke(function(s){var l=gr(s);return l=typeof l=="function"?l:r,Tn(Pt(s,1,pt,!0),r,l)});function R$(s){return s&&s.length?Tn(s):[]}function P$(s,l){return s&&s.length?Tn(s,Re(l,2)):[]}function I$(s,l){return l=typeof l=="function"?l:r,s&&s.length?Tn(s,r,l):[]}function Tf(s){if(!(s&&s.length))return[];var l=0;return s=Cn(s,function(g){if(pt(g))return l=_t(g.length,l),!0}),Gl(l,function(g){return ct(s,Ul(g))})}function u1(s,l){if(!(s&&s.length))return[];var g=Tf(s);return l==null?g:ct(g,function(O){return Jt(l,r,O)})}var N$=ke(function(s,l){return pt(s)?zo(s,l):[]}),T$=ke(function(s){return vf(Cn(s,pt))}),A$=ke(function(s){var l=gr(s);return pt(l)&&(l=r),vf(Cn(s,pt),Re(l,2))}),M$=ke(function(s){var l=gr(s);return l=typeof l=="function"?l:r,vf(Cn(s,pt),r,l)}),D$=ke(Tf);function j$(s,l){return C_(s||[],l||[],$o)}function q$(s,l){return C_(s||[],l||[],Vo)}var k$=ke(function(s){var l=s.length,g=l>1?s[l-1]:r;return g=typeof g=="function"?(s.pop(),g):r,u1(s,g)});function c1(s){var l=M(s);return l.__chain__=!0,l}function L$(s,l){return l(s),s}function Qs(s,l){return l(s)}var B$=fn(function(s){var l=s.length,g=l?s[0]:0,O=this.__wrapped__,I=function(q){return tf(q,s)};return l>1||this.__actions__.length||!(O instanceof Fe)||!dn(g)?this.thru(I):(O=O.slice(g,+g+(l?1:0)),O.__actions__.push({func:Qs,args:[I],thisArg:r}),new hr(O,this.__chain__).thru(function(q){return l&&!q.length&&q.push(r),q}))});function F$(){return c1(this)}function $$(){return new hr(this.value(),this.__chain__)}function z$(){this.__values__===r&&(this.__values__=E1(this.value()));var s=this.__index__>=this.__values__.length,l=s?r:this.__values__[this.__index__++];return{done:s,value:l}}function H$(){return this}function U$(s){for(var l,g=this;g instanceof Ls;){var O=r1(g);O.__index__=0,O.__values__=r,l?I.__wrapped__=O:l=O;var I=O;g=g.__wrapped__}return I.__wrapped__=s,l}function V$(){var s=this.__wrapped__;if(s instanceof Fe){var l=s;return this.__actions__.length&&(l=new Fe(this)),l=l.reverse(),l.__actions__.push({func:Qs,args:[Nf],thisArg:r}),new hr(l,this.__chain__)}return this.thru(Nf)}function W$(){return O_(this.__wrapped__,this.__actions__)}var G$=Vs(function(s,l,g){Ze.call(s,g)?++s[g]:cn(s,g,1)});function K$(s,l,g){var O=Ae(s)?Lw:LB;return g&&kt(s,l,g)&&(l=r),O(s,Re(l,3))}function Y$(s,l){var g=Ae(s)?Cn:u_;return g(s,Re(l,3))}var X$=q_(n1),Z$=q_(i1);function J$(s,l){return Pt(eu(s,l),1)}function Q$(s,l){return Pt(eu(s,l),W)}function e3(s,l,g){return g=g===r?1:Me(g),Pt(eu(s,l),g)}function l1(s,l){var g=Ae(s)?fr:Nn;return g(s,Re(l,3))}function f1(s,l){var g=Ae(s)?bL:s_;return g(s,Re(l,3))}var t3=Vs(function(s,l,g){Ze.call(s,g)?s[g].push(l):cn(s,g,[l])});function r3(s,l,g,O){s=zt(s)?s:Vi(s),g=g&&!O?Me(g):0;var I=s.length;return g<0&&(g=_t(I+g,0)),ou(s)?g<=I&&s.indexOf(l,g)>-1:!!I&&Mi(s,l,g)>-1}var n3=ke(function(s,l,g){var O=-1,I=typeof l=="function",q=zt(s)?oe(s.length):[];return Nn(s,function(U){q[++O]=I?Jt(l,U,g):Ho(U,l,g)}),q}),i3=Vs(function(s,l,g){cn(s,g,l)});function eu(s,l){var g=Ae(s)?ct:p_;return g(s,Re(l,3))}function o3(s,l,g,O){return s==null?[]:(Ae(l)||(l=l==null?[]:[l]),g=O?r:g,Ae(g)||(g=g==null?[]:[g]),y_(s,l,g))}var a3=Vs(function(s,l,g){s[g?0:1].push(l)},function(){return[[],[]]});function s3(s,l,g){var O=Ae(s)?zl:zw,I=arguments.length<3;return O(s,Re(l,4),g,I,Nn)}function u3(s,l,g){var O=Ae(s)?xL:zw,I=arguments.length<3;return O(s,Re(l,4),g,I,s_)}function c3(s,l){var g=Ae(s)?Cn:u_;return g(s,nu(Re(l,3)))}function l3(s){var l=Ae(s)?n_:rF;return l(s)}function f3(s,l,g){(g?kt(s,l,g):l===r)?l=1:l=Me(l);var O=Ae(s)?MB:nF;return O(s,l)}function d3(s){var l=Ae(s)?DB:oF;return l(s)}function h3(s){if(s==null)return 0;if(zt(s))return ou(s)?ji(s):s.length;var l=Mt(s);return l==Se||l==qe?s.size:uf(s).length}function p3(s,l,g){var O=Ae(s)?Hl:aF;return g&&kt(s,l,g)&&(l=r),O(s,Re(l,3))}var v3=ke(function(s,l){if(s==null)return[];var g=l.length;return g>1&&kt(s,l[0],l[1])?l=[]:g>2&&kt(l[0],l[1],l[2])&&(l=[l[0]]),y_(s,Pt(l,1),[])}),tu=YL||function(){return Rt.Date.now()};function g3(s,l){if(typeof l!="function")throw new dr(a);return s=Me(s),function(){if(--s<1)return l.apply(this,arguments)}}function d1(s,l,g){return l=g?r:l,l=s&&l==null?s.length:l,ln(s,P,r,r,r,r,l)}function h1(s,l){var g;if(typeof l!="function")throw new dr(a);return s=Me(s),function(){return--s>0&&(g=l.apply(this,arguments)),s<=1&&(l=r),g}}var Af=ke(function(s,l,g){var O=b;if(g.length){var I=Pn(g,Hi(Af));O|=_}return ln(s,O,l,g,I)}),p1=ke(function(s,l,g){var O=b|x;if(g.length){var I=Pn(g,Hi(p1));O|=_}return ln(l,O,s,g,I)});function v1(s,l,g){l=g?r:l;var O=ln(s,S,r,r,r,r,r,l);return O.placeholder=v1.placeholder,O}function g1(s,l,g){l=g?r:l;var O=ln(s,E,r,r,r,r,r,l);return O.placeholder=g1.placeholder,O}function m1(s,l,g){var O,I,q,U,X,re,pe=0,ge=!1,me=!1,be=!0;if(typeof s!="function")throw new dr(a);l=mr(l)||0,ft(g)&&(ge=!!g.leading,me="maxWait"in g,q=me?_t(mr(g.maxWait)||0,l):q,be="trailing"in g?!!g.trailing:be);function Ce(vt){var Tr=O,vn=I;return O=I=r,pe=vt,U=s.apply(vn,Tr),U}function Pe(vt){return pe=vt,X=Ko(Le,l),ge?Ce(vt):U}function je(vt){var Tr=vt-re,vn=vt-pe,q1=l-Tr;return me?At(q1,q-vn):q1}function Ie(vt){var Tr=vt-re,vn=vt-pe;return re===r||Tr>=l||Tr<0||me&&vn>=q}function Le(){var vt=tu();if(Ie(vt))return $e(vt);X=Ko(Le,je(vt))}function $e(vt){return X=r,be&&O?Ce(vt):(O=I=r,U)}function rr(){X!==r&&R_(X),pe=0,O=re=I=X=r}function Lt(){return X===r?U:$e(tu())}function nr(){var vt=tu(),Tr=Ie(vt);if(O=arguments,I=this,re=vt,Tr){if(X===r)return Pe(re);if(me)return R_(X),X=Ko(Le,l),Ce(re)}return X===r&&(X=Ko(Le,l)),U}return nr.cancel=rr,nr.flush=Lt,nr}var m3=ke(function(s,l){return a_(s,1,l)}),y3=ke(function(s,l,g){return a_(s,mr(l)||0,g)});function b3(s){return ln(s,j)}function ru(s,l){if(typeof s!="function"||l!=null&&typeof l!="function")throw new dr(a);var g=function(){var O=arguments,I=l?l.apply(this,O):O[0],q=g.cache;if(q.has(I))return q.get(I);var U=s.apply(this,O);return g.cache=q.set(I,U)||q,U};return g.cache=new(ru.Cache||un),g}ru.Cache=un;function nu(s){if(typeof s!="function")throw new dr(a);return function(){var l=arguments;switch(l.length){case 0:return!s.call(this);case 1:return!s.call(this,l[0]);case 2:return!s.call(this,l[0],l[1]);case 3:return!s.call(this,l[0],l[1],l[2])}return!s.apply(this,l)}}function x3(s){return h1(2,s)}var w3=sF(function(s,l){l=l.length==1&&Ae(l[0])?ct(l[0],Qt(Re())):ct(Pt(l,1),Qt(Re()));var g=l.length;return ke(function(O){for(var I=-1,q=At(O.length,g);++I<q;)O[I]=l[I].call(this,O[I]);return Jt(s,this,O)})}),Mf=ke(function(s,l){var g=Pn(l,Hi(Mf));return ln(s,_,r,l,g)}),y1=ke(function(s,l){var g=Pn(l,Hi(y1));return ln(s,R,r,l,g)}),_3=fn(function(s,l){return ln(s,N,r,r,r,l)});function E3(s,l){if(typeof s!="function")throw new dr(a);return l=l===r?l:Me(l),ke(s,l)}function S3(s,l){if(typeof s!="function")throw new dr(a);return l=l==null?0:_t(Me(l),0),ke(function(g){var O=g[l],I=Mn(g,0,l);return O&&Rn(I,O),Jt(s,this,I)})}function O3(s,l,g){var O=!0,I=!0;if(typeof s!="function")throw new dr(a);return ft(g)&&(O="leading"in g?!!g.leading:O,I="trailing"in g?!!g.trailing:I),m1(s,l,{leading:O,maxWait:l,trailing:I})}function C3(s){return d1(s,1)}function R3(s,l){return Mf(mf(l),s)}function P3(){if(!arguments.length)return[];var s=arguments[0];return Ae(s)?s:[s]}function I3(s){return pr(s,v)}function N3(s,l){return l=typeof l=="function"?l:r,pr(s,v,l)}function T3(s){return pr(s,h|v)}function A3(s,l){return l=typeof l=="function"?l:r,pr(s,h|v,l)}function M3(s,l){return l==null||o_(s,l,St(l))}function Nr(s,l){return s===l||s!==s&&l!==l}var D3=Ys(of),j3=Ys(function(s,l){return s>=l}),ii=f_((function(){return arguments})())?f_:function(s){return dt(s)&&Ze.call(s,"callee")&&!Zw.call(s,"callee")},Ae=oe.isArray,q3=Aw?Qt(Aw):UB;function zt(s){return s!=null&&iu(s.length)&&!hn(s)}function pt(s){return dt(s)&&zt(s)}function k3(s){return s===!0||s===!1||dt(s)&&qt(s)==K}var Dn=ZL||Uf,L3=Mw?Qt(Mw):VB;function B3(s){return dt(s)&&s.nodeType===1&&!Yo(s)}function F3(s){if(s==null)return!0;if(zt(s)&&(Ae(s)||typeof s=="string"||typeof s.splice=="function"||Dn(s)||Ui(s)||ii(s)))return!s.length;var l=Mt(s);if(l==Se||l==qe)return!s.size;if(Go(s))return!uf(s).length;for(var g in s)if(Ze.call(s,g))return!1;return!0}function $3(s,l){return Uo(s,l)}function z3(s,l,g){g=typeof g=="function"?g:r;var O=g?g(s,l):r;return O===r?Uo(s,l,r,g):!!O}function Df(s){if(!dt(s))return!1;var l=qt(s);return l==ue||l==ne||typeof s.message=="string"&&typeof s.name=="string"&&!Yo(s)}function H3(s){return typeof s=="number"&&Qw(s)}function hn(s){if(!ft(s))return!1;var l=qt(s);return l==de||l==we||l==V||l==Ne}function b1(s){return typeof s=="number"&&s==Me(s)}function iu(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Y}function ft(s){var l=typeof s;return s!=null&&(l=="object"||l=="function")}function dt(s){return s!=null&&typeof s=="object"}var x1=Dw?Qt(Dw):GB;function U3(s,l){return s===l||sf(s,l,Sf(l))}function V3(s,l,g){return g=typeof g=="function"?g:r,sf(s,l,Sf(l),g)}function W3(s){return w1(s)&&s!=+s}function G3(s){if(NF(s))throw new Te(o);return d_(s)}function K3(s){return s===null}function Y3(s){return s==null}function w1(s){return typeof s=="number"||dt(s)&&qt(s)==_e}function Yo(s){if(!dt(s)||qt(s)!=ae)return!1;var l=Ts(s);if(l===null)return!0;var g=Ze.call(l,"constructor")&&l.constructor;return typeof g=="function"&&g instanceof g&&Rs.call(g)==VL}var jf=jw?Qt(jw):KB;function X3(s){return b1(s)&&s>=-Y&&s<=Y}var _1=qw?Qt(qw):YB;function ou(s){return typeof s=="string"||!Ae(s)&&dt(s)&&qt(s)==Xe}function tr(s){return typeof s=="symbol"||dt(s)&&qt(s)==We}var Ui=kw?Qt(kw):XB;function Z3(s){return s===r}function J3(s){return dt(s)&&Mt(s)==et}function Q3(s){return dt(s)&&qt(s)==Tt}var e5=Ys(cf),t5=Ys(function(s,l){return s<=l});function E1(s){if(!s)return[];if(zt(s))return ou(s)?Pr(s):$t(s);if(qo&&s[qo])return ML(s[qo]());var l=Mt(s),g=l==Se?Yl:l==qe?Ss:Vi;return g(s)}function pn(s){if(!s)return s===0?s:0;if(s=mr(s),s===W||s===-W){var l=s<0?-1:1;return l*ee}return s===s?s:0}function Me(s){var l=pn(s),g=l%1;return l===l?g?l-g:l:0}function S1(s){return s?ei(Me(s),0,Q):0}function mr(s){if(typeof s=="number")return s;if(tr(s))return H;if(ft(s)){var l=typeof s.valueOf=="function"?s.valueOf():s;s=ft(l)?l+"":l}if(typeof s!="string")return s===0?s:+s;s=Hw(s);var g=Ol.test(s);return g||Rl.test(s)?gL(s.slice(2),g?2:8):Sl.test(s)?H:+s}function O1(s){return Vr(s,Ht(s))}function r5(s){return s?ei(Me(s),-Y,Y):s===0?s:0}function Ge(s){return s==null?"":er(s)}var n5=$i(function(s,l){if(Go(l)||zt(l)){Vr(l,St(l),s);return}for(var g in l)Ze.call(l,g)&&$o(s,g,l[g])}),C1=$i(function(s,l){Vr(l,Ht(l),s)}),au=$i(function(s,l,g,O){Vr(l,Ht(l),s,O)}),i5=$i(function(s,l,g,O){Vr(l,St(l),s,O)}),o5=fn(tf);function a5(s,l){var g=Fi(s);return l==null?g:i_(g,l)}var s5=ke(function(s,l){s=rt(s);var g=-1,O=l.length,I=O>2?l[2]:r;for(I&&kt(l[0],l[1],I)&&(O=1);++g<O;)for(var q=l[g],U=Ht(q),X=-1,re=U.length;++X<re;){var pe=U[X],ge=s[pe];(ge===r||Nr(ge,ki[pe])&&!Ze.call(s,pe))&&(s[pe]=q[pe])}return s}),u5=ke(function(s){return s.push(r,H_),Jt(R1,r,s)});function c5(s,l){return Bw(s,Re(l,3),Ur)}function l5(s,l){return Bw(s,Re(l,3),nf)}function f5(s,l){return s==null?s:rf(s,Re(l,3),Ht)}function d5(s,l){return s==null?s:c_(s,Re(l,3),Ht)}function h5(s,l){return s&&Ur(s,Re(l,3))}function p5(s,l){return s&&nf(s,Re(l,3))}function v5(s){return s==null?[]:$s(s,St(s))}function g5(s){return s==null?[]:$s(s,Ht(s))}function qf(s,l,g){var O=s==null?r:ti(s,l);return O===r?g:O}function m5(s,l){return s!=null&&W_(s,l,FB)}function kf(s,l){return s!=null&&W_(s,l,$B)}var y5=L_(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=Ps.call(l)),s[l]=g},Bf(Ut)),b5=L_(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=Ps.call(l)),Ze.call(s,l)?s[l].push(g):s[l]=[g]},Re),x5=ke(Ho);function St(s){return zt(s)?r_(s):uf(s)}function Ht(s){return zt(s)?r_(s,!0):ZB(s)}function w5(s,l){var g={};return l=Re(l,3),Ur(s,function(O,I,q){cn(g,l(O,I,q),O)}),g}function _5(s,l){var g={};return l=Re(l,3),Ur(s,function(O,I,q){cn(g,I,l(O,I,q))}),g}var E5=$i(function(s,l,g){zs(s,l,g)}),R1=$i(function(s,l,g,O){zs(s,l,g,O)}),S5=fn(function(s,l){var g={};if(s==null)return g;var O=!1;l=ct(l,function(q){return q=An(q,s),O||(O=q.length>1),q}),Vr(s,_f(s),g),O&&(g=pr(g,h|p|v,yF));for(var I=l.length;I--;)pf(g,l[I]);return g});function O5(s,l){return P1(s,nu(Re(l)))}var C5=fn(function(s,l){return s==null?{}:QB(s,l)});function P1(s,l){if(s==null)return{};var g=ct(_f(s),function(O){return[O]});return l=Re(l),b_(s,g,function(O,I){return l(O,I[0])})}function R5(s,l,g){l=An(l,s);var O=-1,I=l.length;for(I||(I=1,s=r);++O<I;){var q=s==null?r:s[Wr(l[O])];q===r&&(O=I,q=g),s=hn(q)?q.call(s):q}return s}function P5(s,l,g){return s==null?s:Vo(s,l,g)}function I5(s,l,g,O){return O=typeof O=="function"?O:r,s==null?s:Vo(s,l,g,O)}var I1=$_(St),N1=$_(Ht);function N5(s,l,g){var O=Ae(s),I=O||Dn(s)||Ui(s);if(l=Re(l,4),g==null){var q=s&&s.constructor;I?g=O?new q:[]:ft(s)?g=hn(q)?Fi(Ts(s)):{}:g={}}return(I?fr:Ur)(s,function(U,X,re){return l(g,U,X,re)}),g}function T5(s,l){return s==null?!0:pf(s,l)}function A5(s,l,g){return s==null?s:S_(s,l,mf(g))}function M5(s,l,g,O){return O=typeof O=="function"?O:r,s==null?s:S_(s,l,mf(g),O)}function Vi(s){return s==null?[]:Kl(s,St(s))}function D5(s){return s==null?[]:Kl(s,Ht(s))}function j5(s,l,g){return g===r&&(g=l,l=r),g!==r&&(g=mr(g),g=g===g?g:0),l!==r&&(l=mr(l),l=l===l?l:0),ei(mr(s),l,g)}function q5(s,l,g){return l=pn(l),g===r?(g=l,l=0):g=pn(g),s=mr(s),zB(s,l,g)}function k5(s,l,g){if(g&&typeof g!="boolean"&&kt(s,l,g)&&(l=g=r),g===r&&(typeof l=="boolean"?(g=l,l=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&l===r?(s=0,l=1):(s=pn(s),l===r?(l=s,s=0):l=pn(l)),s>l){var O=s;s=l,l=O}if(g||s%1||l%1){var I=e_();return At(s+I*(l-s+vL("1e-"+((I+"").length-1))),l)}return ff(s,l)}var L5=zi(function(s,l,g){return l=l.toLowerCase(),s+(g?T1(l):l)});function T1(s){return Lf(Ge(s).toLowerCase())}function A1(s){return s=Ge(s),s&&s.replace(Il,PL).replace(oL,"")}function B5(s,l,g){s=Ge(s),l=er(l);var O=s.length;g=g===r?O:ei(Me(g),0,O);var I=g;return g-=l.length,g>=0&&s.slice(g,I)==l}function F5(s){return s=Ge(s),s&&ts.test(s)?s.replace(Io,IL):s}function $5(s){return s=Ge(s),s&&as.test(s)?s.replace(No,"\\$&"):s}var z5=zi(function(s,l,g){return s+(g?"-":"")+l.toLowerCase()}),H5=zi(function(s,l,g){return s+(g?" ":"")+l.toLowerCase()}),U5=j_("toLowerCase");function V5(s,l,g){s=Ge(s),l=Me(l);var O=l?ji(s):0;if(!l||O>=l)return s;var I=(l-O)/2;return Ks(js(I),g)+s+Ks(Ds(I),g)}function W5(s,l,g){s=Ge(s),l=Me(l);var O=l?ji(s):0;return l&&O<l?s+Ks(l-O,g):s}function G5(s,l,g){s=Ge(s),l=Me(l);var O=l?ji(s):0;return l&&O<l?Ks(l-O,g)+s:s}function K5(s,l,g){return g||l==null?l=0:l&&(l=+l),tB(Ge(s).replace(To,""),l||0)}function Y5(s,l,g){return(g?kt(s,l,g):l===r)?l=1:l=Me(l),df(Ge(s),l)}function X5(){var s=arguments,l=Ge(s[0]);return s.length<3?l:l.replace(s[1],s[2])}var Z5=zi(function(s,l,g){return s+(g?"_":"")+l.toLowerCase()});function J5(s,l,g){return g&&typeof g!="number"&&kt(s,l,g)&&(l=g=r),g=g===r?Q:g>>>0,g?(s=Ge(s),s&&(typeof l=="string"||l!=null&&!jf(l))&&(l=er(l),!l&&Di(s))?Mn(Pr(s),0,g):s.split(l,g)):[]}var Q5=zi(function(s,l,g){return s+(g?" ":"")+Lf(l)});function ez(s,l,g){return s=Ge(s),g=g==null?0:ei(Me(g),0,s.length),l=er(l),s.slice(g,g+l.length)==l}function tz(s,l,g){var O=M.templateSettings;g&&kt(s,l,g)&&(l=r),s=Ge(s),l=au({},l,O,z_);var I=au({},l.imports,O.imports,z_),q=St(I),U=Kl(I,q),X,re,pe=0,ge=l.interpolate||Ii,me="__p += '",be=Xl((l.escape||Ii).source+"|"+ge.source+"|"+(ge===ns?El:Ii).source+"|"+(l.evaluate||Ii).source+"|$","g"),Ce="//# sourceURL="+(Ze.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++lL+"]")+`
50
50
  `;s.replace(be,function(Ie,Le,$e,rr,Lt,nr){return $e||($e=rr),me+=s.slice(pe,nr).replace(ls,NL),Le&&(X=!0,me+=`' +
51
51
  __e(`+Le+`) +
52
52
  '`),Lt&&(re=!0,me+=`';
@@ -57,16 +57,16 @@ __p += '`),$e&&(me+=`' +
57
57
  `;var Pe=Ze.call(l,"variable")&&l.variable;if(!Pe)me=`with (obj) {
58
58
  `+me+`
59
59
  }
60
- `;else if(xl.test(Pe))throw new Te(u);me=(re?me.replace(Hr,""):me).replace(Pi,"$1").replace(hl,"$1;"),me="function("+(Pe||"obj")+`) {
60
+ `;else if(wl.test(Pe))throw new Te(u);me=(re?me.replace(Hr,""):me).replace(Pi,"$1").replace(pl,"$1;"),me="function("+(Pe||"obj")+`) {
61
61
  `+(Pe?"":`obj || (obj = {});
62
62
  `)+"var __t, __p = ''"+(X?", __e = _.escape":"")+(re?`, __j = Array.prototype.join;
63
63
  function print() { __p += __j.call(arguments, '') }
64
64
  `:`;
65
65
  `)+me+`return __p
66
- }`;var je=M1(function(){return Ue(q,Ce+"return "+me).apply(r,U)});if(je.source=me,Mf(je))throw je;return je}function rz(s){return Ge(s).toLowerCase()}function nz(s){return Ge(s).toUpperCase()}function iz(s,l,g){if(s=Ge(s),s&&(g||l===r))return zw(s);if(!s||!(l=er(l)))return s;var O=Pr(s),I=Pr(l),q=Hw(O,I),U=Uw(O,I)+1;return Mn(O,q,U).join("")}function oz(s,l,g){if(s=Ge(s),s&&(g||l===r))return s.slice(0,Ww(s)+1);if(!s||!(l=er(l)))return s;var O=Pr(s),I=Uw(O,Pr(l))+1;return Mn(O,0,I).join("")}function az(s,l,g){if(s=Ge(s),s&&(g||l===r))return s.replace(To,"");if(!s||!(l=er(l)))return s;var O=Pr(s),I=Hw(O,Pr(l));return Mn(O,I).join("")}function sz(s,l){var g=L,O=F;if(ft(l)){var I="separator"in l?l.separator:I;g="length"in l?Me(l.length):g,O="omission"in l?er(l.omission):O}s=Ge(s);var q=s.length;if(Di(s)){var U=Pr(s);q=U.length}if(g>=q)return s;var X=g-ji(O);if(X<1)return O;var re=U?Mn(U,0,X).join(""):s.slice(0,X);if(I===r)return re+O;if(U&&(X+=re.length-X),Df(I)){if(s.slice(X).search(I)){var pe,ge=re;for(I.global||(I=Yl(I.source,Ge(cs.exec(I))+"g")),I.lastIndex=0;pe=I.exec(ge);)var me=pe.index;re=re.slice(0,me===r?X:me)}}else if(s.indexOf(er(I),X)!=X){var be=re.lastIndexOf(I);be>-1&&(re=re.slice(0,be))}return re+O}function uz(s){return s=Ge(s),s&&pl.test(s)?s.replace(es,kL):s}var cz=zi(function(s,l,g){return s+(g?" ":"")+l.toUpperCase()}),kf=D_("toUpperCase");function A1(s,l,g){return s=Ge(s),l=g?r:l,l===r?AL(s)?FL(s):EL(s):s.match(l)||[]}var M1=ke(function(s,l){try{return Jt(s,r,l)}catch(g){return Mf(g)?g:new Te(g)}}),lz=fn(function(s,l){return fr(l,function(g){g=Wr(g),cn(s,g,Tf(s[g],s))}),s});function fz(s){var l=s==null?0:s.length,g=Re();return s=l?ct(s,function(O){if(typeof O[1]!="function")throw new dr(a);return[g(O[0]),O[1]]}):[],ke(function(O){for(var I=-1;++I<l;){var q=s[I];if(Jt(q[0],this,O))return Jt(q[1],this,O)}})}function dz(s){return kB(pr(s,h))}function Lf(s){return function(){return s}}function hz(s,l){return s==null||s!==s?l:s}var pz=q_(),vz=q_(!0);function Ut(s){return s}function Bf(s){return d_(typeof s=="function"?s:pr(s,h))}function gz(s){return p_(pr(s,h))}function mz(s,l){return v_(s,pr(l,h))}var yz=ke(function(s,l){return function(g){return Ho(g,s,l)}}),bz=ke(function(s,l){return function(g){return Ho(s,g,l)}});function Ff(s,l,g){var O=St(l),I=$s(l,O);g==null&&!(ft(l)&&(I.length||!O.length))&&(g=l,l=s,s=this,I=$s(l,St(l)));var q=!(ft(g)&&"chain"in g)||!!g.chain,U=hn(s);return fr(I,function(X){var re=l[X];s[X]=re,U&&(s.prototype[X]=function(){var pe=this.__chain__;if(q||pe){var ge=s(this.__wrapped__),me=ge.__actions__=$t(this.__actions__);return me.push({func:re,args:arguments,thisArg:s}),ge.__chain__=pe,ge}return re.apply(s,Rn([this.value()],arguments))})}),s}function xz(){return Rt._===this&&(Rt._=WL),this}function $f(){}function wz(s){return s=Me(s),ke(function(l){return g_(l,s)})}var _z=yf(ct),Ez=yf(kw),Sz=yf(zl);function D1(s){return Of(s)?Hl(Wr(s)):eF(s)}function Oz(s){return function(l){return s==null?r:ti(s,l)}}var Cz=L_(),Rz=L_(!0);function zf(){return[]}function Hf(){return!1}function Pz(){return{}}function Iz(){return""}function Nz(){return!0}function Tz(s,l){if(s=Me(s),s<1||s>Y)return[];var g=Q,O=At(s,Q);l=Re(l),s-=Q;for(var I=Wl(O,l);++g<s;)l(g);return I}function Az(s){return Ae(s)?ct(s,Wr):tr(s)?[s]:$t(e1(Ge(s)))}function Mz(s){var l=++UL;return Ge(s)+l}var Dz=Gs(function(s,l){return s+l},0),jz=bf("ceil"),qz=Gs(function(s,l){return s/l},1),kz=bf("floor");function Lz(s){return s&&s.length?Fs(s,Ut,nf):r}function Bz(s,l){return s&&s.length?Fs(s,Re(l,2),nf):r}function Fz(s){return Fw(s,Ut)}function $z(s,l){return Fw(s,Re(l,2))}function zz(s){return s&&s.length?Fs(s,Ut,uf):r}function Hz(s,l){return s&&s.length?Fs(s,Re(l,2),uf):r}var Uz=Gs(function(s,l){return s*l},1),Vz=bf("round"),Wz=Gs(function(s,l){return s-l},0);function Gz(s){return s&&s.length?Vl(s,Ut):0}function Kz(s,l){return s&&s.length?Vl(s,Re(l,2)):0}return M.after=g3,M.ary=f1,M.assign=n5,M.assignIn=O1,M.assignInWith=au,M.assignWith=i5,M.at=o5,M.before=d1,M.bind=Tf,M.bindAll=lz,M.bindKey=h1,M.castArray=P3,M.chain=u1,M.chunk=kF,M.compact=LF,M.concat=BF,M.cond=fz,M.conforms=dz,M.constant=Lf,M.countBy=G$,M.create=a5,M.curry=p1,M.curryRight=v1,M.debounce=g1,M.defaults=s5,M.defaultsDeep=u5,M.defer=m3,M.delay=y3,M.difference=FF,M.differenceBy=$F,M.differenceWith=zF,M.drop=HF,M.dropRight=UF,M.dropRightWhile=VF,M.dropWhile=WF,M.fill=GF,M.filter=Y$,M.flatMap=J$,M.flatMapDeep=Q$,M.flatMapDepth=e3,M.flatten=i1,M.flattenDeep=KF,M.flattenDepth=YF,M.flip=b3,M.flow=pz,M.flowRight=vz,M.fromPairs=XF,M.functions=v5,M.functionsIn=g5,M.groupBy=t3,M.initial=JF,M.intersection=QF,M.intersectionBy=e$,M.intersectionWith=t$,M.invert=y5,M.invertBy=b5,M.invokeMap=n3,M.iteratee=Bf,M.keyBy=i3,M.keys=St,M.keysIn=Ht,M.map=eu,M.mapKeys=w5,M.mapValues=_5,M.matches=gz,M.matchesProperty=mz,M.memoize=ru,M.merge=E5,M.mergeWith=C1,M.method=yz,M.methodOf=bz,M.mixin=Ff,M.negate=nu,M.nthArg=wz,M.omit=S5,M.omitBy=O5,M.once=x3,M.orderBy=o3,M.over=_z,M.overArgs=w3,M.overEvery=Ez,M.overSome=Sz,M.partial=Af,M.partialRight=m1,M.partition=a3,M.pick=C5,M.pickBy=R1,M.property=D1,M.propertyOf=Oz,M.pull=o$,M.pullAll=a1,M.pullAllBy=a$,M.pullAllWith=s$,M.pullAt=u$,M.range=Cz,M.rangeRight=Rz,M.rearg=_3,M.reject=c3,M.remove=c$,M.rest=E3,M.reverse=If,M.sampleSize=f3,M.set=P5,M.setWith=I5,M.shuffle=d3,M.slice=l$,M.sortBy=v3,M.sortedUniq=m$,M.sortedUniqBy=y$,M.split=J5,M.spread=S3,M.tail=b$,M.take=x$,M.takeRight=w$,M.takeRightWhile=_$,M.takeWhile=E$,M.tap=L$,M.throttle=O3,M.thru=Qs,M.toArray=_1,M.toPairs=P1,M.toPairsIn=I1,M.toPath=Az,M.toPlainObject=S1,M.transform=N5,M.unary=C3,M.union=S$,M.unionBy=O$,M.unionWith=C$,M.uniq=R$,M.uniqBy=P$,M.uniqWith=I$,M.unset=T5,M.unzip=Nf,M.unzipWith=s1,M.update=A5,M.updateWith=M5,M.values=Vi,M.valuesIn=D5,M.without=N$,M.words=A1,M.wrap=R3,M.xor=T$,M.xorBy=A$,M.xorWith=M$,M.zip=D$,M.zipObject=j$,M.zipObjectDeep=q$,M.zipWith=k$,M.entries=P1,M.entriesIn=I1,M.extend=O1,M.extendWith=au,Ff(M,M),M.add=Dz,M.attempt=M1,M.camelCase=L5,M.capitalize=N1,M.ceil=jz,M.clamp=j5,M.clone=I3,M.cloneDeep=T3,M.cloneDeepWith=A3,M.cloneWith=N3,M.conformsTo=M3,M.deburr=T1,M.defaultTo=hz,M.divide=qz,M.endsWith=B5,M.eq=Nr,M.escape=F5,M.escapeRegExp=$5,M.every=K$,M.find=X$,M.findIndex=r1,M.findKey=c5,M.findLast=Z$,M.findLastIndex=n1,M.findLastKey=l5,M.floor=kz,M.forEach=c1,M.forEachRight=l1,M.forIn=f5,M.forInRight=d5,M.forOwn=h5,M.forOwnRight=p5,M.get=jf,M.gt=D3,M.gte=j3,M.has=m5,M.hasIn=qf,M.head=o1,M.identity=Ut,M.includes=r3,M.indexOf=ZF,M.inRange=q5,M.invoke=x5,M.isArguments=ii,M.isArray=Ae,M.isArrayBuffer=q3,M.isArrayLike=zt,M.isArrayLikeObject=pt,M.isBoolean=k3,M.isBuffer=Dn,M.isDate=L3,M.isElement=B3,M.isEmpty=F3,M.isEqual=$3,M.isEqualWith=z3,M.isError=Mf,M.isFinite=H3,M.isFunction=hn,M.isInteger=y1,M.isLength=iu,M.isMap=b1,M.isMatch=U3,M.isMatchWith=V3,M.isNaN=W3,M.isNative=G3,M.isNil=Y3,M.isNull=K3,M.isNumber=x1,M.isObject=ft,M.isObjectLike=dt,M.isPlainObject=Yo,M.isRegExp=Df,M.isSafeInteger=X3,M.isSet=w1,M.isString=ou,M.isSymbol=tr,M.isTypedArray=Ui,M.isUndefined=Z3,M.isWeakMap=J3,M.isWeakSet=Q3,M.join=r$,M.kebabCase=z5,M.last=gr,M.lastIndexOf=n$,M.lowerCase=H5,M.lowerFirst=U5,M.lt=e5,M.lte=t5,M.max=Lz,M.maxBy=Bz,M.mean=Fz,M.meanBy=$z,M.min=zz,M.minBy=Hz,M.stubArray=zf,M.stubFalse=Hf,M.stubObject=Pz,M.stubString=Iz,M.stubTrue=Nz,M.multiply=Uz,M.nth=i$,M.noConflict=xz,M.noop=$f,M.now=tu,M.pad=V5,M.padEnd=W5,M.padStart=G5,M.parseInt=K5,M.random=k5,M.reduce=s3,M.reduceRight=u3,M.repeat=Y5,M.replace=X5,M.result=R5,M.round=Vz,M.runInContext=te,M.sample=l3,M.size=h3,M.snakeCase=Z5,M.some=p3,M.sortedIndex=f$,M.sortedIndexBy=d$,M.sortedIndexOf=h$,M.sortedLastIndex=p$,M.sortedLastIndexBy=v$,M.sortedLastIndexOf=g$,M.startCase=Q5,M.startsWith=ez,M.subtract=Wz,M.sum=Gz,M.sumBy=Kz,M.template=tz,M.times=Tz,M.toFinite=pn,M.toInteger=Me,M.toLength=E1,M.toLower=rz,M.toNumber=mr,M.toSafeInteger=r5,M.toString=Ge,M.toUpper=nz,M.trim=iz,M.trimEnd=oz,M.trimStart=az,M.truncate=sz,M.unescape=uz,M.uniqueId=Mz,M.upperCase=cz,M.upperFirst=kf,M.each=c1,M.eachRight=l1,M.first=o1,Ff(M,(function(){var s={};return Ur(M,function(l,g){Ze.call(M.prototype,g)||(s[g]=l)}),s})(),{chain:!1}),M.VERSION=n,fr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){M[s].placeholder=M}),fr(["drop","take"],function(s,l){Fe.prototype[s]=function(g){g=g===r?1:_t(Me(g),0);var O=this.__filtered__&&!l?new Fe(this):this.clone();return O.__filtered__?O.__takeCount__=At(g,O.__takeCount__):O.__views__.push({size:At(g,Q),type:s+(O.__dir__<0?"Right":"")}),O},Fe.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),fr(["filter","map","takeWhile"],function(s,l){var g=l+1,O=g==T||g==$;Fe.prototype[s]=function(I){var q=this.clone();return q.__iteratees__.push({iteratee:Re(I,3),type:g}),q.__filtered__=q.__filtered__||O,q}}),fr(["head","last"],function(s,l){var g="take"+(l?"Right":"");Fe.prototype[s]=function(){return this[g](1).value()[0]}}),fr(["initial","tail"],function(s,l){var g="drop"+(l?"":"Right");Fe.prototype[s]=function(){return this.__filtered__?new Fe(this):this[g](1)}}),Fe.prototype.compact=function(){return this.filter(Ut)},Fe.prototype.find=function(s){return this.filter(s).head()},Fe.prototype.findLast=function(s){return this.reverse().find(s)},Fe.prototype.invokeMap=ke(function(s,l){return typeof s=="function"?new Fe(this):this.map(function(g){return Ho(g,s,l)})}),Fe.prototype.reject=function(s){return this.filter(nu(Re(s)))},Fe.prototype.slice=function(s,l){s=Me(s);var g=this;return g.__filtered__&&(s>0||l<0)?new Fe(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),l!==r&&(l=Me(l),g=l<0?g.dropRight(-l):g.take(l-s)),g)},Fe.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Fe.prototype.toArray=function(){return this.take(Q)},Ur(Fe.prototype,function(s,l){var g=/^(?:filter|find|map|reject)|While$/.test(l),O=/^(?:head|last)$/.test(l),I=M[O?"take"+(l=="last"?"Right":""):l],q=O||/^find/.test(l);I&&(M.prototype[l]=function(){var U=this.__wrapped__,X=O?[1]:arguments,re=U instanceof Fe,pe=X[0],ge=re||Ae(U),me=function(Le){var $e=I.apply(M,Rn([Le],X));return O&&be?$e[0]:$e};ge&&g&&typeof pe=="function"&&pe.length!=1&&(re=ge=!1);var be=this.__chain__,Ce=!!this.__actions__.length,Pe=q&&!be,je=re&&!Ce;if(!q&&ge){U=je?U:new Fe(this);var Ie=s.apply(U,X);return Ie.__actions__.push({func:Qs,args:[me],thisArg:r}),new hr(Ie,be)}return Pe&&je?s.apply(this,X):(Ie=this.thru(me),Pe?O?Ie.value()[0]:Ie.value():Ie)})}),fr(["pop","push","shift","sort","splice","unshift"],function(s){var l=Os[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",O=/^(?:pop|shift)$/.test(s);M.prototype[s]=function(){var I=arguments;if(O&&!this.__chain__){var q=this.value();return l.apply(Ae(q)?q:[],I)}return this[g](function(U){return l.apply(Ae(U)?U:[],I)})}}),Ur(Fe.prototype,function(s,l){var g=M[l];if(g){var O=g.name+"";Ze.call(Bi,O)||(Bi[O]=[]),Bi[O].push({name:l,func:g})}}),Bi[Ws(r,x).name]=[{name:"wrapper",func:r}],Fe.prototype.clone=uB,Fe.prototype.reverse=cB,Fe.prototype.value=lB,M.prototype.at=B$,M.prototype.chain=F$,M.prototype.commit=$$,M.prototype.next=z$,M.prototype.plant=U$,M.prototype.reverse=V$,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=W$,M.prototype.first=M.prototype.head,qo&&(M.prototype[qo]=H$),M}),qi=$L();Xn?((Xn.exports=qi)._=qi,Ll._=qi):Rt._=qi}).call(sZ)})(Ea,Ea.exports)),Ea.exports}var Q2=uZ(),yN={},ra,bN;function bt(){if(bN)return ra;bN=1;var e=function(t){return t&&t.Math===Math&&t};return ra=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof ht=="object"&&ht)||e(typeof ra=="object"&&ra)||(function(){return this})()||Function("return this")(),ra}var Lm={},Bm,xN;function at(){return xN||(xN=1,Bm=function(e){try{return!!e()}catch{return!0}}),Bm}var Fm,wN;function $r(){if(wN)return Fm;wN=1;var e=at();return Fm=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Fm}var $m,_N;function Jc(){if(_N)return $m;_N=1;var e=at();return $m=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),$m}var zm,EN;function Xt(){if(EN)return zm;EN=1;var e=Jc(),t=Function.prototype.call;return zm=e?t.bind(t):function(){return t.apply(t,arguments)},zm}var Hm={},SN;function ek(){if(SN)return Hm;SN=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Hm.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,Hm}var Um,ON;function iw(){return ON||(ON=1,Um=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),Um}var Vm,CN;function it(){if(CN)return Vm;CN=1;var e=Jc(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Vm=e?n:function(i){return function(){return r.apply(i,arguments)}},Vm}var Wm,RN;function Wn(){if(RN)return Wm;RN=1;var e=it(),t=e({}.toString),r=e("".slice);return Wm=function(n){return r(t(n),8,-1)},Wm}var Gm,PN;function Qc(){if(PN)return Gm;PN=1;var e=it(),t=at(),r=Wn(),n=Object,i=e("".split);return Gm=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,Gm}var Km,IN;function Ya(){return IN||(IN=1,Km=function(e){return e==null}),Km}var Ym,NN;function Oi(){if(NN)return Ym;NN=1;var e=Ya(),t=TypeError;return Ym=function(r){if(e(r))throw new t("Can't call method on "+r);return r},Ym}var Xm,TN;function Co(){if(TN)return Xm;TN=1;var e=Qc(),t=Oi();return Xm=function(r){return e(t(r))},Xm}var Zm,AN;function Et(){if(AN)return Zm;AN=1;var e=typeof document=="object"&&document.all;return Zm=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},Zm}var Jm,MN;function Nt(){if(MN)return Jm;MN=1;var e=Et();return Jm=function(t){return typeof t=="object"?t!==null:e(t)},Jm}var Qm,DN;function el(){if(DN)return Qm;DN=1;var e=bt(),t=Et(),r=function(n){return t(n)?n:void 0};return Qm=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},Qm}var ey,jN;function tl(){if(jN)return ey;jN=1;var e=it();return ey=e({}.isPrototypeOf),ey}var ty,qN;function tk(){if(qN)return ty;qN=1;var e=bt(),t=e.navigator,r=t&&t.userAgent;return ty=r?String(r):"",ty}var ry,kN;function ow(){if(kN)return ry;kN=1;var e=bt(),t=tk(),r=e.process,n=e.Deno,i=r&&r.versions||n&&n.version,o=i&&i.v8,a,u;return o&&(a=o.split("."),u=a[0]>0&&a[0]<4?1:+(a[0]+a[1])),!u&&t&&(a=t.match(/Edge\/(\d+)/),(!a||a[1]>=74)&&(a=t.match(/Chrome\/(\d+)/),a&&(u=+a[1]))),ry=u,ry}var ny,LN;function rk(){if(LN)return ny;LN=1;var e=ow(),t=at(),r=bt(),n=r.String;return ny=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),ny}var iy,BN;function nk(){if(BN)return iy;BN=1;var e=rk();return iy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",iy}var oy,FN;function ik(){if(FN)return oy;FN=1;var e=el(),t=Et(),r=tl(),n=nk(),i=Object;return oy=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},oy}var ay,$N;function aw(){if($N)return ay;$N=1;var e=String;return ay=function(t){try{return e(t)}catch{return"Object"}},ay}var sy,zN;function Xa(){if(zN)return sy;zN=1;var e=Et(),t=aw(),r=TypeError;return sy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},sy}var uy,HN;function Za(){if(HN)return uy;HN=1;var e=Xa(),t=Ya();return uy=function(r,n){var i=r[n];return t(i)?void 0:e(i)},uy}var cy,UN;function cZ(){if(UN)return cy;UN=1;var e=Xt(),t=Et(),r=Nt(),n=TypeError;return cy=function(i,o){var a,u;if(o==="string"&&t(a=i.toString)&&!r(u=e(a,i))||t(a=i.valueOf)&&!r(u=e(a,i))||o!=="string"&&t(a=i.toString)&&!r(u=e(a,i)))return u;throw new n("Can't convert object to primitive value")},cy}var ly={exports:{}},fy,VN;function rl(){return VN||(VN=1,fy=!1),fy}var dy,WN;function sw(){if(WN)return dy;WN=1;var e=bt(),t=Object.defineProperty;return dy=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},dy}var GN;function uw(){if(GN)return ly.exports;GN=1;var e=rl(),t=bt(),r=sw(),n="__core-js_shared__",i=ly.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.45.1",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"}),ly.exports}var hy,KN;function cw(){if(KN)return hy;KN=1;var e=uw();return hy=function(t,r){return e[t]||(e[t]=r||{})},hy}var py,YN;function Ro(){if(YN)return py;YN=1;var e=Oi(),t=Object;return py=function(r){return t(e(r))},py}var vy,XN;function Cr(){if(XN)return vy;XN=1;var e=it(),t=Ro(),r=e({}.hasOwnProperty);return vy=Object.hasOwn||function(i,o){return r(t(i),o)},vy}var gy,ZN;function lw(){if(ZN)return gy;ZN=1;var e=it(),t=0,r=Math.random(),n=e(1.1.toString);return gy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},gy}var my,JN;function Ft(){if(JN)return my;JN=1;var e=bt(),t=cw(),r=Cr(),n=lw(),i=rk(),o=nk(),a=e.Symbol,u=t("wks"),c=o?a.for||a:a&&a.withoutSetter||n;return my=function(d){return r(u,d)||(u[d]=i&&r(a,d)?a[d]:c("Symbol."+d)),u[d]},my}var yy,QN;function lZ(){if(QN)return yy;QN=1;var e=Xt(),t=Nt(),r=ik(),n=Za(),i=cZ(),o=Ft(),a=TypeError,u=o("toPrimitive");return yy=function(c,d){if(!t(c)||r(c))return c;var f=n(c,u),h;if(f){if(d===void 0&&(d="default"),h=e(f,c,d),!t(h)||r(h))return h;throw new a("Can't convert object to primitive value")}return d===void 0&&(d="number"),i(c,d)},yy}var by,eT;function ok(){if(eT)return by;eT=1;var e=lZ(),t=ik();return by=function(r){var n=e(r,"string");return t(n)?n:n+""},by}var xy,tT;function fw(){if(tT)return xy;tT=1;var e=bt(),t=Nt(),r=e.document,n=t(r)&&t(r.createElement);return xy=function(i){return n?r.createElement(i):{}},xy}var wy,rT;function ak(){if(rT)return wy;rT=1;var e=$r(),t=at(),r=fw();return wy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),wy}var nT;function sk(){if(nT)return Lm;nT=1;var e=$r(),t=Xt(),r=ek(),n=iw(),i=Co(),o=ok(),a=Cr(),u=ak(),c=Object.getOwnPropertyDescriptor;return Lm.f=e?c:function(f,h){if(f=i(f),h=o(h),u)try{return c(f,h)}catch{}if(a(f,h))return n(!t(r.f,f,h),f[h])},Lm}var _y={},Ey,iT;function uk(){if(iT)return Ey;iT=1;var e=$r(),t=at();return Ey=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Ey}var Sy,oT;function Rr(){if(oT)return Sy;oT=1;var e=Nt(),t=String,r=TypeError;return Sy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Sy}var aT;function Sn(){if(aT)return _y;aT=1;var e=$r(),t=ak(),r=uk(),n=Rr(),i=ok(),o=TypeError,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c="enumerable",d="configurable",f="writable";return _y.f=e?r?function(p,v,m){if(n(p),v=i(v),n(m),typeof p=="function"&&v==="prototype"&&"value"in m&&f in m&&!m[f]){var y=u(p,v);y&&y[f]&&(p[v]=m.value,m={configurable:d in m?m[d]:y[d],enumerable:c in m?m[c]:y[c],writable:!1})}return a(p,v,m)}:a:function(p,v,m){if(n(p),v=i(v),n(m),t)try{return a(p,v,m)}catch{}if("get"in m||"set"in m)throw new o("Accessors not supported");return"value"in m&&(p[v]=m.value),p},_y}var Oy,sT;function Ja(){if(sT)return Oy;sT=1;var e=$r(),t=Sn(),r=iw();return Oy=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},Oy}var Cy={exports:{}},Ry,uT;function dw(){if(uT)return Ry;uT=1;var e=$r(),t=Cr(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,i=t(r,"name"),o=i&&(function(){}).name==="something",a=i&&(!e||e&&n(r,"name").configurable);return Ry={EXISTS:i,PROPER:o,CONFIGURABLE:a},Ry}var Py,cT;function ck(){if(cT)return Py;cT=1;var e=it(),t=Et(),r=uw(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),Py=r.inspectSource,Py}var Iy,lT;function lk(){if(lT)return Iy;lT=1;var e=bt(),t=Et(),r=e.WeakMap;return Iy=t(r)&&/native code/.test(String(r)),Iy}var Ny,fT;function hw(){if(fT)return Ny;fT=1;var e=cw(),t=lw(),r=e("keys");return Ny=function(n){return r[n]||(r[n]=t(n))},Ny}var Ty,dT;function nl(){return dT||(dT=1,Ty={}),Ty}var Ay,hT;function Po(){if(hT)return Ay;hT=1;var e=lk(),t=bt(),r=Nt(),n=Ja(),i=Cr(),o=uw(),a=hw(),u=nl(),c="Object already initialized",d=t.TypeError,f=t.WeakMap,h,p,v,m=function(w){return v(w)?p(w):h(w,{})},y=function(w){return function(S){var E;if(!r(S)||(E=p(S)).type!==w)throw new d("Incompatible receiver, "+w+" required");return E}};if(e||o.state){var b=o.state||(o.state=new f);b.get=b.get,b.has=b.has,b.set=b.set,h=function(w,S){if(b.has(w))throw new d(c);return S.facade=w,b.set(w,S),S},p=function(w){return b.get(w)||{}},v=function(w){return b.has(w)}}else{var x=a("state");u[x]=!0,h=function(w,S){if(i(w,x))throw new d(c);return S.facade=w,n(w,x,S),S},p=function(w){return i(w,x)?w[x]:{}},v=function(w){return i(w,x)}}return Ay={set:h,get:p,has:v,enforce:m,getterFor:y},Ay}var pT;function fk(){if(pT)return Cy.exports;pT=1;var e=it(),t=at(),r=Et(),n=Cr(),i=$r(),o=dw().CONFIGURABLE,a=ck(),u=Po(),c=u.enforce,d=u.get,f=String,h=Object.defineProperty,p=e("".slice),v=e("".replace),m=e([].join),y=i&&!t(function(){return h(function(){},"length",{value:8}).length!==8}),b=String(String).split("String"),x=Cy.exports=function(w,S,E){p(f(S),0,7)==="Symbol("&&(S="["+v(f(S),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),E&&E.getter&&(S="get "+S),E&&E.setter&&(S="set "+S),(!n(w,"name")||o&&w.name!==S)&&(i?h(w,"name",{value:S,configurable:!0}):w.name=S),y&&E&&n(E,"arity")&&w.length!==E.arity&&h(w,"length",{value:E.arity});try{E&&n(E,"constructor")&&E.constructor?i&&h(w,"prototype",{writable:!1}):w.prototype&&(w.prototype=void 0)}catch{}var _=c(w);return n(_,"source")||(_.source=m(b,typeof S=="string"?S:"")),w};return Function.prototype.toString=x(function(){return r(this)&&d(this).source||a(this)},"toString"),Cy.exports}var My,vT;function Ci(){if(vT)return My;vT=1;var e=Et(),t=Sn(),r=fk(),n=sw();return My=function(i,o,a,u){u||(u={});var c=u.enumerable,d=u.name!==void 0?u.name:o;if(e(a)&&r(a,d,u),u.global)c?i[o]=a:n(o,a);else{try{u.unsafe?i[o]&&(c=!0):delete i[o]}catch{}c?i[o]=a:t.f(i,o,{value:a,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return i},My}var Dy={},jy,gT;function fZ(){if(gT)return jy;gT=1;var e=Math.ceil,t=Math.floor;return jy=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},jy}var qy,mT;function il(){if(mT)return qy;mT=1;var e=fZ();return qy=function(t){var r=+t;return r!==r||r===0?0:e(r)},qy}var ky,yT;function dZ(){if(yT)return ky;yT=1;var e=il(),t=Math.max,r=Math.min;return ky=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},ky}var Ly,bT;function pw(){if(bT)return Ly;bT=1;var e=il(),t=Math.min;return Ly=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},Ly}var By,xT;function ol(){if(xT)return By;xT=1;var e=pw();return By=function(t){return e(t.length)},By}var Fy,wT;function hZ(){if(wT)return Fy;wT=1;var e=Co(),t=dZ(),r=ol(),n=function(i){return function(o,a,u){var c=e(o),d=r(c);if(d===0)return!i&&-1;var f=t(u,d),h;if(i&&a!==a){for(;d>f;)if(h=c[f++],h!==h)return!0}else for(;d>f;f++)if((i||f in c)&&c[f]===a)return i||f||0;return!i&&-1}};return Fy={includes:n(!0),indexOf:n(!1)},Fy}var $y,_T;function dk(){if(_T)return $y;_T=1;var e=it(),t=Cr(),r=Co(),n=hZ().indexOf,i=nl(),o=e([].push);return $y=function(a,u){var c=r(a),d=0,f=[],h;for(h in c)!t(i,h)&&t(c,h)&&o(f,h);for(;u.length>d;)t(c,h=u[d++])&&(~n(f,h)||o(f,h));return f},$y}var zy,ET;function vw(){return ET||(ET=1,zy=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),zy}var ST;function gw(){if(ST)return Dy;ST=1;var e=dk(),t=vw(),r=t.concat("length","prototype");return Dy.f=Object.getOwnPropertyNames||function(i){return e(i,r)},Dy}var Hy={},OT;function hk(){return OT||(OT=1,Hy.f=Object.getOwnPropertySymbols),Hy}var Uy,CT;function pZ(){if(CT)return Uy;CT=1;var e=el(),t=it(),r=gw(),n=hk(),i=Rr(),o=t([].concat);return Uy=e("Reflect","ownKeys")||function(u){var c=r.f(i(u)),d=n.f;return d?o(c,d(u)):c},Uy}var Vy,RT;function vZ(){if(RT)return Vy;RT=1;var e=Cr(),t=pZ(),r=sk(),n=Sn();return Vy=function(i,o,a){for(var u=t(o),c=n.f,d=r.f,f=0;f<u.length;f++){var h=u[f];!e(i,h)&&!(a&&e(a,h))&&c(i,h,d(o,h))}},Vy}var Wy,PT;function pk(){if(PT)return Wy;PT=1;var e=at(),t=Et(),r=/#|\.prototype\./,n=function(c,d){var f=o[i(c)];return f===u?!0:f===a?!1:t(d)?e(d):!!d},i=n.normalize=function(c){return String(c).replace(r,".").toLowerCase()},o=n.data={},a=n.NATIVE="N",u=n.POLYFILL="P";return Wy=n,Wy}var Gy,IT;function Gn(){if(IT)return Gy;IT=1;var e=bt(),t=sk().f,r=Ja(),n=Ci(),i=sw(),o=vZ(),a=pk();return Gy=function(u,c){var d=u.target,f=u.global,h=u.stat,p,v,m,y,b,x;if(f?v=e:h?v=e[d]||i(d,{}):v=e[d]&&e[d].prototype,v)for(m in c){if(b=c[m],u.dontCallGetSet?(x=t(v,m),y=x&&x.value):y=v[m],p=a(f?m:d+(h?".":"#")+m,u.forced),!p&&y!==void 0){if(typeof b==typeof y)continue;o(b,y)}(u.sham||y&&y.sham)&&r(b,"sham",!0),n(v,m,b,u)}},Gy}var Ky,NT;function mw(){if(NT)return Ky;NT=1;var e=Ft(),t=e("toStringTag"),r={};return r[t]="z",Ky=String(r)==="[object z]",Ky}var Yy,TT;function al(){if(TT)return Yy;TT=1;var e=mw(),t=Et(),r=Wn(),n=Ft(),i=n("toStringTag"),o=Object,a=r((function(){return arguments})())==="Arguments",u=function(c,d){try{return c[d]}catch{}};return Yy=e?r:function(c){var d,f,h;return c===void 0?"Undefined":c===null?"Null":typeof(f=u(d=o(c),i))=="string"?f:a?r(d):(h=r(d))==="Object"&&t(d.callee)?"Arguments":h},Yy}var Xy,AT;function Ri(){if(AT)return Xy;AT=1;var e=al(),t=String;return Xy=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},Xy}var Zy,MT;function vk(){return MT||(MT=1,Zy=`
67
- \v\f\r                 \u2028\u2029\uFEFF`),Zy}var Jy,DT;function gZ(){if(DT)return Jy;DT=1;var e=it(),t=Oi(),r=Ri(),n=vk(),i=e("".replace),o=RegExp("^["+n+"]+"),a=RegExp("(^|[^"+n+"])["+n+"]+$"),u=function(c){return function(d){var f=r(t(d));return c&1&&(f=i(f,o,"")),c&2&&(f=i(f,a,"$1")),f}};return Jy={start:u(1),end:u(2),trim:u(3)},Jy}var Qy,jT;function mZ(){if(jT)return Qy;jT=1;var e=bt(),t=at(),r=it(),n=Ri(),i=gZ().trim,o=vk(),a=e.parseInt,u=e.Symbol,c=u&&u.iterator,d=/^[+-]?0x/i,f=r(d.exec),h=a(o+"08")!==8||a(o+"0x16")!==22||c&&!t(function(){a(Object(c))});return Qy=h?function(v,m){var y=i(n(v));return a(y,m>>>0||(f(d,y)?16:10))}:a,Qy}var qT;function yZ(){if(qT)return yN;qT=1;var e=Gn(),t=mZ();return e({global:!0,forced:parseInt!==t},{parseInt:t}),yN}yZ();var kT={},e0,LT;function gk(){if(LT)return e0;LT=1;var e=dk(),t=vw();return e0=Object.keys||function(n){return e(n,t)},e0}var t0,BT;function bZ(){if(BT)return t0;BT=1;var e=$r(),t=it(),r=Xt(),n=at(),i=gk(),o=hk(),a=ek(),u=Ro(),c=Qc(),d=Object.assign,f=Object.defineProperty,h=t([].concat);return t0=!d||n(function(){if(e&&d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var p={},v={},m=Symbol("assign detection"),y="abcdefghijklmnopqrst";return p[m]=7,y.split("").forEach(function(b){v[b]=b}),d({},p)[m]!==7||i(d({},v)).join("")!==y})?function(v,m){for(var y=u(v),b=arguments.length,x=1,w=o.f,S=a.f;b>x;)for(var E=c(arguments[x++]),_=w?h(i(E),w(E)):i(E),R=_.length,P=0,N;R>P;)N=_[P++],(!e||r(S,E,N))&&(y[N]=E[N]);return y}:d,t0}var FT;function xZ(){if(FT)return kT;FT=1;var e=Gn(),t=bZ();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),kT}xZ();var $T={},r0,zT;function wZ(){if(zT)return r0;zT=1;var e=Wn(),t=it();return r0=function(r){if(e(r)==="Function")return t(r)},r0}var n0,HT;function mk(){if(HT)return n0;HT=1;var e=wZ(),t=Xa(),r=Jc(),n=e(e.bind);return n0=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},n0}var i0,UT;function _Z(){if(UT)return i0;UT=1;var e=Wn();return i0=Array.isArray||function(r){return e(r)==="Array"},i0}var o0,VT;function EZ(){if(VT)return o0;VT=1;var e=it(),t=at(),r=Et(),n=al(),i=el(),o=ck(),a=function(){},u=i("Reflect","construct"),c=/^\s*(?:class|function)\b/,d=e(c.exec),f=!c.test(a),h=function(m){if(!r(m))return!1;try{return u(a,[],m),!0}catch{return!1}},p=function(m){if(!r(m))return!1;switch(n(m)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!d(c,o(m))}catch{return!0}};return p.sham=!0,o0=!u||t(function(){var v;return h(h.call)||!h(Object)||!h(function(){v=!0})||v})?p:h,o0}var a0,WT;function SZ(){if(WT)return a0;WT=1;var e=_Z(),t=EZ(),r=Nt(),n=Ft(),i=n("species"),o=Array;return a0=function(a){var u;return e(a)&&(u=a.constructor,t(u)&&(u===o||e(u.prototype))?u=void 0:r(u)&&(u=u[i],u===null&&(u=void 0))),u===void 0?o:u},a0}var s0,GT;function OZ(){if(GT)return s0;GT=1;var e=SZ();return s0=function(t,r){return new(e(t))(r===0?0:r)},s0}var u0,KT;function yk(){if(KT)return u0;KT=1;var e=mk(),t=it(),r=Qc(),n=Ro(),i=ol(),o=OZ(),a=t([].push),u=function(c){var d=c===1,f=c===2,h=c===3,p=c===4,v=c===6,m=c===7,y=c===5||v;return function(b,x,w,S){for(var E=n(b),_=r(E),R=i(_),P=e(x,w),N=0,j=S||o,L=d?j(b,R):f||m?j(b,0):void 0,F,k;R>N;N++)if((y||N in _)&&(F=_[N],k=P(F,N,E),c))if(d)L[N]=k;else if(k)switch(c){case 3:return!0;case 5:return F;case 6:return N;case 2:a(L,F)}else switch(c){case 4:return!1;case 7:a(L,F)}return v?-1:h||p?p:L}};return u0={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)},u0}var c0,YT;function CZ(){if(YT)return c0;YT=1;var e=at(),t=Ft(),r=ow(),n=t("species");return c0=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},c0}var XT;function RZ(){if(XT)return $T;XT=1;var e=Gn(),t=yk().filter,r=CZ(),n=r("filter");return e({target:"Array",proto:!0,forced:!n},{filter:function(o){return t(this,o,arguments.length>1?arguments[1]:void 0)}}),$T}RZ();var ZT={},l0,JT;function PZ(){if(JT)return l0;JT=1;var e=mw(),t=al();return l0=e?{}.toString:function(){return"[object "+t(this)+"]"},l0}var QT;function IZ(){if(QT)return ZT;QT=1;var e=mw(),t=Ci(),r=PZ();return e||t(Object.prototype,"toString",r,{unsafe:!0}),ZT}IZ();var f0={},eA;function NZ(){if(eA)return f0;eA=1;var e=$r(),t=uk(),r=Sn(),n=Rr(),i=Co(),o=gk();return f0.f=e&&!t?Object.defineProperties:function(u,c){n(u);for(var d=i(c),f=o(c),h=f.length,p=0,v;h>p;)r.f(u,v=f[p++],d[v]);return u},f0}var d0,tA;function TZ(){if(tA)return d0;tA=1;var e=el();return d0=e("document","documentElement"),d0}var h0,rA;function sl(){if(rA)return h0;rA=1;var e=Rr(),t=NZ(),r=vw(),n=nl(),i=TZ(),o=fw(),a=hw(),u=">",c="<",d="prototype",f="script",h=a("IE_PROTO"),p=function(){},v=function(w){return c+f+u+w+c+"/"+f+u},m=function(w){w.write(v("")),w.close();var S=w.parentWindow.Object;return w=null,S},y=function(){var w=o("iframe"),S="java"+f+":",E;return w.style.display="none",i.appendChild(w),w.src=String(S),E=w.contentWindow.document,E.open(),E.write(v("document.F=Object")),E.close(),E.F},b,x=function(){try{b=new ActiveXObject("htmlfile")}catch{}x=typeof document<"u"?document.domain&&b?m(b):y():m(b);for(var w=r.length;w--;)delete x[d][r[w]];return x()};return n[h]=!0,h0=Object.create||function(S,E){var _;return S!==null?(p[d]=e(S),_=new p,p[d]=null,_[h]=S):_=x(),E===void 0?_:t.f(_,E)},h0}var p0,nA;function AZ(){if(nA)return p0;nA=1;var e=Ft(),t=sl(),r=Sn().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),p0=function(o){i[n][o]=!0},p0}var v0,iA;function Qa(){return iA||(iA=1,v0={}),v0}var g0,oA;function MZ(){if(oA)return g0;oA=1;var e=at();return g0=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),g0}var m0,aA;function bk(){if(aA)return m0;aA=1;var e=Cr(),t=Et(),r=Ro(),n=hw(),i=MZ(),o=n("IE_PROTO"),a=Object,u=a.prototype;return m0=i?a.getPrototypeOf:function(c){var d=r(c);if(e(d,o))return d[o];var f=d.constructor;return t(f)&&d instanceof f?f.prototype:d instanceof a?u:null},m0}var y0,sA;function xk(){if(sA)return y0;sA=1;var e=at(),t=Et(),r=Nt(),n=sl(),i=bk(),o=Ci(),a=Ft(),u=rl(),c=a("iterator"),d=!1,f,h,p;[].keys&&(p=[].keys(),"next"in p?(h=i(i(p)),h!==Object.prototype&&(f=h)):d=!0);var v=!r(f)||e(function(){var m={};return f[c].call(m)!==m});return v?f={}:u&&(f=n(f)),t(f[c])||o(f,c,function(){return this}),y0={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:d},y0}var b0,uA;function ul(){if(uA)return b0;uA=1;var e=Sn().f,t=Cr(),r=Ft(),n=r("toStringTag");return b0=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},b0}var x0,cA;function DZ(){if(cA)return x0;cA=1;var e=xk().IteratorPrototype,t=sl(),r=iw(),n=ul(),i=Qa(),o=function(){return this};return x0=function(a,u,c,d){var f=u+" Iterator";return a.prototype=t(e,{next:r(+!d,c)}),n(a,f,!1,!0),i[f]=o,a},x0}var w0,lA;function jZ(){if(lA)return w0;lA=1;var e=it(),t=Xa();return w0=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},w0}var _0,fA;function qZ(){if(fA)return _0;fA=1;var e=Nt();return _0=function(t){return e(t)||t===null},_0}var E0,dA;function kZ(){if(dA)return E0;dA=1;var e=qZ(),t=String,r=TypeError;return E0=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},E0}var S0,hA;function wk(){if(hA)return S0;hA=1;var e=jZ(),t=Nt(),r=Oi(),n=kZ();return S0=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,o={},a;try{a=e(Object.prototype,"__proto__","set"),a(o,[]),i=o instanceof Array}catch{}return function(c,d){return r(c),n(d),t(c)&&(i?a(c,d):c.__proto__=d),c}})():void 0),S0}var O0,pA;function _k(){if(pA)return O0;pA=1;var e=Gn(),t=Xt(),r=rl(),n=dw(),i=Et(),o=DZ(),a=bk(),u=wk(),c=ul(),d=Ja(),f=Ci(),h=Ft(),p=Qa(),v=xk(),m=n.PROPER,y=n.CONFIGURABLE,b=v.IteratorPrototype,x=v.BUGGY_SAFARI_ITERATORS,w=h("iterator"),S="keys",E="values",_="entries",R=function(){return this};return O0=function(P,N,j,L,F,k,D){o(j,N,L);var T=function(z){if(z===F&&ee)return ee;if(!x&&z&&z in W)return W[z];switch(z){case S:return function(){return new j(this,z)};case E:return function(){return new j(this,z)};case _:return function(){return new j(this,z)}}return function(){return new j(this)}},B=N+" Iterator",$=!1,W=P.prototype,Y=W[w]||W["@@iterator"]||F&&W[F],ee=!x&&Y||T(F),H=N==="Array"&&W.entries||Y,Q,ce,se;if(H&&(Q=a(H.call(new P)),Q!==Object.prototype&&Q.next&&(!r&&a(Q)!==b&&(u?u(Q,b):i(Q[w])||f(Q,w,R)),c(Q,B,!0,!0),r&&(p[B]=R))),m&&F===E&&Y&&Y.name!==E&&(!r&&y?d(W,"name",E):($=!0,ee=function(){return t(Y,this)})),F)if(ce={values:T(E),keys:k?ee:T(S),entries:T(_)},D)for(se in ce)(x||$||!(se in W))&&f(W,se,ce[se]);else e({target:N,proto:!0,forced:x||$},ce);return(!r||D)&&W[w]!==ee&&f(W,w,ee,{name:F}),p[N]=ee,ce},O0}var C0,vA;function Ek(){return vA||(vA=1,C0=function(e,t){return{value:e,done:t}}),C0}var R0,gA;function Sk(){if(gA)return R0;gA=1;var e=Co(),t=AZ(),r=Qa(),n=Po(),i=Sn().f,o=_k(),a=Ek(),u=rl(),c=$r(),d="Array Iterator",f=n.set,h=n.getterFor(d);R0=o(Array,"Array",function(v,m){f(this,{type:d,target:e(v),index:0,kind:m})},function(){var v=h(this),m=v.target,y=v.index++;if(!m||y>=m.length)return v.target=null,a(void 0,!0);switch(v.kind){case"keys":return a(y,!1);case"values":return a(m[y],!1)}return a([y,m[y]],!1)},"values");var p=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!u&&c&&p.name!=="values")try{i(p,"name",{value:"values"})}catch{}return R0}Sk();var mA={},P0,yA;function Ok(){if(yA)return P0;yA=1;var e=it(),t=il(),r=Ri(),n=Oi(),i=e("".charAt),o=e("".charCodeAt),a=e("".slice),u=function(c){return function(d,f){var h=r(n(d)),p=t(f),v=h.length,m,y;return p<0||p>=v?c?"":void 0:(m=o(h,p),m<55296||m>56319||p+1===v||(y=o(h,p+1))<56320||y>57343?c?i(h,p):m:c?a(h,p,p+2):(m-55296<<10)+(y-56320)+65536)}};return P0={codeAt:u(!1),charAt:u(!0)},P0}var bA;function LZ(){if(bA)return mA;bA=1;var e=Ok().charAt,t=Ri(),r=Po(),n=_k(),i=Ek(),o="String Iterator",a=r.set,u=r.getterFor(o);return n(String,"String",function(c){a(this,{type:o,string:t(c),index:0})},function(){var d=u(this),f=d.string,h=d.index,p;return h>=f.length?i(void 0,!0):(p=e(f,h),d.index+=p.length,i(p,!1))}),mA}LZ();var xA={},wA={},I0,_A;function Ck(){if(_A)return I0;_A=1;var e=at();return I0=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),I0}var N0,EA;function Rk(){if(EA)return N0;EA=1;var e=Ci();return N0=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},N0}var T0={exports:{}},A0={},M0,SA;function BZ(){if(SA)return M0;SA=1;var e=it();return M0=e([].slice),M0}var OA;function FZ(){if(OA)return A0;OA=1;var e=Wn(),t=Co(),r=gw().f,n=BZ(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return A0.f=function(u){return i&&e(u)==="Window"?o(u):r(t(u))},A0}var D0,CA;function $Z(){if(CA)return D0;CA=1;var e=at();return D0=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),D0}var j0,RA;function zZ(){if(RA)return j0;RA=1;var e=at(),t=Nt(),r=Wn(),n=$Z(),i=Object.isExtensible,o=e(function(){});return j0=o||n?function(u){return!t(u)||n&&r(u)==="ArrayBuffer"?!1:i?i(u):!0}:i,j0}var PA;function yw(){if(PA)return T0.exports;PA=1;var e=Gn(),t=it(),r=nl(),n=Nt(),i=Cr(),o=Sn().f,a=gw(),u=FZ(),c=zZ(),d=lw(),f=Ck(),h=!1,p=d("meta"),v=0,m=function(E){o(E,p,{value:{objectID:"O"+v++,weakData:{}}})},y=function(E,_){if(!n(E))return typeof E=="symbol"?E:(typeof E=="string"?"S":"P")+E;if(!i(E,p)){if(!c(E))return"F";if(!_)return"E";m(E)}return E[p].objectID},b=function(E,_){if(!i(E,p)){if(!c(E))return!0;if(!_)return!1;m(E)}return E[p].weakData},x=function(E){return f&&h&&c(E)&&!i(E,p)&&m(E),E},w=function(){S.enable=function(){},h=!0;var E=a.f,_=t([].splice),R={};R[p]=1,E(R).length&&(a.f=function(P){for(var N=E(P),j=0,L=N.length;j<L;j++)if(N[j]===p){_(N,j,1);break}return N},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},S=T0.exports={enable:w,fastKey:y,getWeakData:b,onFreeze:x};return r[p]=!0,T0.exports}var q0,IA;function HZ(){if(IA)return q0;IA=1;var e=Ft(),t=Qa(),r=e("iterator"),n=Array.prototype;return q0=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},q0}var k0,NA;function Pk(){if(NA)return k0;NA=1;var e=al(),t=Za(),r=Ya(),n=Qa(),i=Ft(),o=i("iterator");return k0=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},k0}var L0,TA;function UZ(){if(TA)return L0;TA=1;var e=Xt(),t=Xa(),r=Rr(),n=aw(),i=Pk(),o=TypeError;return L0=function(a,u){var c=arguments.length<2?i(a):u;if(t(c))return r(e(c,a));throw new o(n(a)+" is not iterable")},L0}var B0,AA;function VZ(){if(AA)return B0;AA=1;var e=Xt(),t=Rr(),r=Za();return B0=function(n,i,o){var a,u;t(n);try{if(a=r(n,"return"),!a){if(i==="throw")throw o;return o}a=e(a,n)}catch(c){u=!0,a=c}if(i==="throw")throw o;if(u)throw a;return t(a),o},B0}var F0,MA;function Ik(){if(MA)return F0;MA=1;var e=mk(),t=Xt(),r=Rr(),n=aw(),i=HZ(),o=ol(),a=tl(),u=UZ(),c=Pk(),d=VZ(),f=TypeError,h=function(v,m){this.stopped=v,this.result=m},p=h.prototype;return F0=function(v,m,y){var b=y&&y.that,x=!!(y&&y.AS_ENTRIES),w=!!(y&&y.IS_RECORD),S=!!(y&&y.IS_ITERATOR),E=!!(y&&y.INTERRUPTED),_=e(m,b),R,P,N,j,L,F,k,D=function(B){return R&&d(R,"normal"),new h(!0,B)},T=function(B){return x?(r(B),E?_(B[0],B[1],D):_(B[0],B[1])):E?_(B,D):_(B)};if(w)R=v.iterator;else if(S)R=v;else{if(P=c(v),!P)throw new f(n(v)+" is not iterable");if(i(P)){for(N=0,j=o(v);j>N;N++)if(L=T(v[N]),L&&a(p,L))return L;return new h(!1)}R=u(v,P)}for(F=w?v.next:R.next;!(k=t(F,R)).done;){try{L=T(k.value)}catch(B){d(R,"throw",B)}if(typeof L=="object"&&L&&a(p,L))return L}return new h(!1)},F0}var $0,DA;function Nk(){if(DA)return $0;DA=1;var e=tl(),t=TypeError;return $0=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},$0}var z0,jA;function WZ(){if(jA)return z0;jA=1;var e=Ft(),t=e("iterator"),r=!1;try{var n=0,i={next:function(){return{done:!!n++}},return:function(){r=!0}};i[t]=function(){return this},Array.from(i,function(){throw 2})}catch{}return z0=function(o,a){try{if(!a&&!r)return!1}catch{return!1}var u=!1;try{var c={};c[t]=function(){return{next:function(){return{done:u=!0}}}},o(c)}catch{}return u},z0}var H0,qA;function GZ(){if(qA)return H0;qA=1;var e=Et(),t=Nt(),r=wk();return H0=function(n,i,o){var a,u;return r&&e(a=i.constructor)&&a!==o&&t(u=a.prototype)&&u!==o.prototype&&r(n,u),n},H0}var U0,kA;function KZ(){if(kA)return U0;kA=1;var e=Gn(),t=bt(),r=it(),n=pk(),i=Ci(),o=yw(),a=Ik(),u=Nk(),c=Et(),d=Ya(),f=Nt(),h=at(),p=WZ(),v=ul(),m=GZ();return U0=function(y,b,x){var w=y.indexOf("Map")!==-1,S=y.indexOf("Weak")!==-1,E=w?"set":"add",_=t[y],R=_&&_.prototype,P=_,N={},j=function($){var W=r(R[$]);i(R,$,$==="add"?function(ee){return W(this,ee===0?0:ee),this}:$==="delete"?function(Y){return S&&!f(Y)?!1:W(this,Y===0?0:Y)}:$==="get"?function(ee){return S&&!f(ee)?void 0:W(this,ee===0?0:ee)}:$==="has"?function(ee){return S&&!f(ee)?!1:W(this,ee===0?0:ee)}:function(ee,H){return W(this,ee===0?0:ee,H),this})},L=n(y,!c(_)||!(S||R.forEach&&!h(function(){new _().entries().next()})));if(L)P=x.getConstructor(b,y,w,E),o.enable();else if(n(y,!0)){var F=new P,k=F[E](S?{}:-0,1)!==F,D=h(function(){F.has(1)}),T=p(function($){new _($)}),B=!S&&h(function(){for(var $=new _,W=5;W--;)$[E](W,W);return!$.has(-0)});T||(P=b(function($,W){u($,R);var Y=m(new _,$,P);return d(W)||a(W,Y[E],{that:Y,AS_ENTRIES:w}),Y}),P.prototype=R,R.constructor=P),(D||B)&&(j("delete"),j("has"),w&&j("get")),(B||k)&&j(E),S&&R.clear&&delete R.clear}return N[y]=P,e({global:!0,constructor:!0,forced:P!==_},N),v(P,y),S||x.setStrong(P,y,w),P},U0}var V0,LA;function YZ(){if(LA)return V0;LA=1;var e=it(),t=Rk(),r=yw().getWeakData,n=Nk(),i=Rr(),o=Ya(),a=Nt(),u=Ik(),c=yk(),d=Cr(),f=Po(),h=f.set,p=f.getterFor,v=c.find,m=c.findIndex,y=e([].splice),b=0,x=function(E){return E.frozen||(E.frozen=new w)},w=function(){this.entries=[]},S=function(E,_){return v(E.entries,function(R){return R[0]===_})};return w.prototype={get:function(E){var _=S(this,E);if(_)return _[1]},has:function(E){return!!S(this,E)},set:function(E,_){var R=S(this,E);R?R[1]=_:this.entries.push([E,_])},delete:function(E){var _=m(this.entries,function(R){return R[0]===E});return~_&&y(this.entries,_,1),!!~_}},V0={getConstructor:function(E,_,R,P){var N=E(function(k,D){n(k,j),h(k,{type:_,id:b++,frozen:null}),o(D)||u(D,k[P],{that:k,AS_ENTRIES:R})}),j=N.prototype,L=p(_),F=function(k,D,T){var B=L(k),$=r(i(D),!0);return $===!0?x(B).set(D,T):$[B.id]=T,k};return t(j,{delete:function(k){var D=L(this);if(!a(k))return!1;var T=r(k);return T===!0?x(D).delete(k):T&&d(T,D.id)&&delete T[D.id]},has:function(D){var T=L(this);if(!a(D))return!1;var B=r(D);return B===!0?x(T).has(D):B&&d(B,T.id)}}),t(j,R?{get:function(D){var T=L(this);if(a(D)){var B=r(D);if(B===!0)return x(T).get(D);if(B)return B[T.id]}},set:function(D,T){return F(this,D,T)}}:{add:function(D){return F(this,D,!0)}}),N}},V0}var BA;function XZ(){if(BA)return wA;BA=1;var e=Ck(),t=bt(),r=it(),n=Rk(),i=yw(),o=KZ(),a=YZ(),u=Nt(),c=Po().enforce,d=at(),f=lk(),h=Object,p=Array.isArray,v=h.isExtensible,m=h.isFrozen,y=h.isSealed,b=h.freeze,x=h.seal,w=!t.ActiveXObject&&"ActiveXObject"in t,S,E=function(k){return function(){return k(this,arguments.length?arguments[0]:void 0)}},_=o("WeakMap",E,a),R=_.prototype,P=r(R.set),N=function(){return e&&d(function(){var k=b([]);return P(new _,k,1),!m(k)})};if(f)if(w){S=a.getConstructor(E,"WeakMap",!0),i.enable();var j=r(R.delete),L=r(R.has),F=r(R.get);n(R,{delete:function(k){if(u(k)&&!v(k)){var D=c(this);return D.frozen||(D.frozen=new S),j(this,k)||D.frozen.delete(k)}return j(this,k)},has:function(D){if(u(D)&&!v(D)){var T=c(this);return T.frozen||(T.frozen=new S),L(this,D)||T.frozen.has(D)}return L(this,D)},get:function(D){if(u(D)&&!v(D)){var T=c(this);return T.frozen||(T.frozen=new S),L(this,D)?F(this,D):T.frozen.get(D)}return F(this,D)},set:function(D,T){if(u(D)&&!v(D)){var B=c(this);B.frozen||(B.frozen=new S),L(this,D)?P(this,D,T):B.frozen.set(D,T)}else P(this,D,T);return this}})}else N()&&n(R,{set:function(D,T){var B;return p(D)&&(m(D)?B=b:y(D)&&(B=x)),P(this,D,T),B&&B(D),this}});return wA}var FA;function ZZ(){return FA||(FA=1,XZ()),xA}ZZ();var $A={},W0,zA;function JZ(){return zA||(zA=1,W0={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),W0}var G0,HA;function QZ(){if(HA)return G0;HA=1;var e=fw(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return G0=r===Object.prototype?void 0:r,G0}var UA;function eJ(){if(UA)return $A;UA=1;var e=bt(),t=JZ(),r=QZ(),n=Sk(),i=Ja(),o=ul(),a=Ft(),u=a("iterator"),c=n.values,d=function(h,p){if(h){if(h[u]!==c)try{i(h,u,c)}catch{h[u]=c}if(o(h,p,!0),t[p]){for(var v in n)if(h[v]!==n[v])try{i(h,v,n[v])}catch{h[v]=n[v]}}}};for(var f in t)d(e[f]&&e[f].prototype,f);return d(r,"DOMTokenList"),$A}eJ();var K0,VA;function tJ(){if(VA)return K0;VA=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,c=typeof ht=="object"&&ht&&ht.Object===Object&&ht,d=typeof self=="object"&&self&&self.Object===Object&&self,f=c||d||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,m=Math.min,y=function(){return f.Date.now()};function b(R,P,N){var j,L,F,k,D,T,B=0,$=!1,W=!1,Y=!0;if(typeof R!="function")throw new TypeError(e);P=_(P)||0,w(N)&&($=!!N.leading,W="maxWait"in N,F=W?v(_(N.maxWait)||0,P):F,Y="trailing"in N?!!N.trailing:Y);function ee(K){var ie=j,ne=L;return j=L=void 0,B=K,k=R.apply(ne,ie),k}function H(K){return B=K,D=setTimeout(se,P),$?ee(K):k}function Q(K){var ie=K-T,ne=K-B,ue=P-ie;return W?m(ue,F-ne):ue}function ce(K){var ie=K-T,ne=K-B;return T===void 0||ie>=P||ie<0||W&&ne>=F}function se(){var K=y();if(ce(K))return z(K);D=setTimeout(se,Q(K))}function z(K){return D=void 0,Y&&j?ee(K):(j=L=void 0,k)}function G(){D!==void 0&&clearTimeout(D),B=0,j=T=L=D=void 0}function J(){return D===void 0?k:z(y())}function V(){var K=y(),ie=ce(K);if(j=arguments,L=this,T=K,ie){if(D===void 0)return H(T);if(W)return D=setTimeout(se,P),ee(T)}return D===void 0&&(D=setTimeout(se,P)),k}return V.cancel=G,V.flush=J,V}function x(R,P,N){var j=!0,L=!0;if(typeof R!="function")throw new TypeError(e);return w(N)&&(j="leading"in N?!!N.leading:j,L="trailing"in N?!!N.trailing:L),b(R,P,{leading:j,maxWait:P,trailing:L})}function w(R){var P=typeof R;return!!R&&(P=="object"||P=="function")}function S(R){return!!R&&typeof R=="object"}function E(R){return typeof R=="symbol"||S(R)&&p.call(R)==r}function _(R){if(typeof R=="number")return R;if(E(R))return t;if(w(R)){var P=typeof R.valueOf=="function"?R.valueOf():R;R=w(P)?P+"":P}if(typeof R!="string")return R===0?R:+R;R=R.replace(n,"");var N=o.test(R);return N||a.test(R)?u(R.slice(2),N?2:8):i.test(R)?t:+R}return K0=x,K0}var rJ=tJ();const WA=Hn(rJ);var Y0,GA;function nJ(){if(GA)return Y0;GA=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,c=typeof ht=="object"&&ht&&ht.Object===Object&&ht,d=typeof self=="object"&&self&&self.Object===Object&&self,f=c||d||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,m=Math.min,y=function(){return f.Date.now()};function b(_,R,P){var N,j,L,F,k,D,T=0,B=!1,$=!1,W=!0;if(typeof _!="function")throw new TypeError(e);R=E(R)||0,x(P)&&(B=!!P.leading,$="maxWait"in P,L=$?v(E(P.maxWait)||0,R):L,W="trailing"in P?!!P.trailing:W);function Y(V){var K=N,ie=j;return N=j=void 0,T=V,F=_.apply(ie,K),F}function ee(V){return T=V,k=setTimeout(ce,R),B?Y(V):F}function H(V){var K=V-D,ie=V-T,ne=R-K;return $?m(ne,L-ie):ne}function Q(V){var K=V-D,ie=V-T;return D===void 0||K>=R||K<0||$&&ie>=L}function ce(){var V=y();if(Q(V))return se(V);k=setTimeout(ce,H(V))}function se(V){return k=void 0,W&&N?Y(V):(N=j=void 0,F)}function z(){k!==void 0&&clearTimeout(k),T=0,N=D=j=k=void 0}function G(){return k===void 0?F:se(y())}function J(){var V=y(),K=Q(V);if(N=arguments,j=this,D=V,K){if(k===void 0)return ee(D);if($)return k=setTimeout(ce,R),Y(D)}return k===void 0&&(k=setTimeout(ce,R)),F}return J.cancel=z,J.flush=G,J}function x(_){var R=typeof _;return!!_&&(R=="object"||R=="function")}function w(_){return!!_&&typeof _=="object"}function S(_){return typeof _=="symbol"||w(_)&&p.call(_)==r}function E(_){if(typeof _=="number")return _;if(S(_))return t;if(x(_)){var R=typeof _.valueOf=="function"?_.valueOf():_;_=x(R)?R+"":R}if(typeof _!="string")return _===0?_:+_;_=_.replace(n,"");var P=o.test(_);return P||a.test(_)?u(_.slice(2),P?2:8):i.test(_)?t:+_}return Y0=b,Y0}var iJ=nJ();const KA=Hn(iJ);var X0,YA;function oJ(){if(YA)return X0;YA=1;var e="Expected a function",t="__lodash_hash_undefined__",r="[object Function]",n="[object GeneratorFunction]",i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=typeof ht=="object"&&ht&&ht.Object===Object&&ht,u=typeof self=="object"&&self&&self.Object===Object&&self,c=a||u||Function("return this")();function d(he,ae){return he==null?void 0:he[ae]}function f(he){var ae=!1;if(he!=null&&typeof he.toString!="function")try{ae=!!(he+"")}catch{}return ae}var h=Array.prototype,p=Function.prototype,v=Object.prototype,m=c["__core-js_shared__"],y=(function(){var he=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||"");return he?"Symbol(src)_1."+he:""})(),b=p.toString,x=v.hasOwnProperty,w=v.toString,S=RegExp("^"+b.call(x).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=h.splice,_=K(c,"Map"),R=K(Object,"create");function P(he){var ae=-1,Oe=he?he.length:0;for(this.clear();++ae<Oe;){var Ne=he[ae];this.set(Ne[0],Ne[1])}}function N(){this.__data__=R?R(null):{}}function j(he){return this.has(he)&&delete this.__data__[he]}function L(he){var ae=this.__data__;if(R){var Oe=ae[he];return Oe===t?void 0:Oe}return x.call(ae,he)?ae[he]:void 0}function F(he){var ae=this.__data__;return R?ae[he]!==void 0:x.call(ae,he)}function k(he,ae){var Oe=this.__data__;return Oe[he]=R&&ae===void 0?t:ae,this}P.prototype.clear=N,P.prototype.delete=j,P.prototype.get=L,P.prototype.has=F,P.prototype.set=k;function D(he){var ae=-1,Oe=he?he.length:0;for(this.clear();++ae<Oe;){var Ne=he[ae];this.set(Ne[0],Ne[1])}}function T(){this.__data__=[]}function B(he){var ae=this.__data__,Oe=G(ae,he);if(Oe<0)return!1;var Ne=ae.length-1;return Oe==Ne?ae.pop():E.call(ae,Oe,1),!0}function $(he){var ae=this.__data__,Oe=G(ae,he);return Oe<0?void 0:ae[Oe][1]}function W(he){return G(this.__data__,he)>-1}function Y(he,ae){var Oe=this.__data__,Ne=G(Oe,he);return Ne<0?Oe.push([he,ae]):Oe[Ne][1]=ae,this}D.prototype.clear=T,D.prototype.delete=B,D.prototype.get=$,D.prototype.has=W,D.prototype.set=Y;function ee(he){var ae=-1,Oe=he?he.length:0;for(this.clear();++ae<Oe;){var Ne=he[ae];this.set(Ne[0],Ne[1])}}function H(){this.__data__={hash:new P,map:new(_||D),string:new P}}function Q(he){return V(this,he).delete(he)}function ce(he){return V(this,he).get(he)}function se(he){return V(this,he).has(he)}function z(he,ae){return V(this,he).set(he,ae),this}ee.prototype.clear=H,ee.prototype.delete=Q,ee.prototype.get=ce,ee.prototype.has=se,ee.prototype.set=z;function G(he,ae){for(var Oe=he.length;Oe--;)if(we(he[Oe][0],ae))return Oe;return-1}function J(he){if(!_e(he)||ne(he))return!1;var ae=Se(he)||f(he)?S:o;return ae.test(ue(he))}function V(he,ae){var Oe=he.__data__;return ie(ae)?Oe[typeof ae=="string"?"string":"hash"]:Oe.map}function K(he,ae){var Oe=d(he,ae);return J(Oe)?Oe:void 0}function ie(he){var ae=typeof he;return ae=="string"||ae=="number"||ae=="symbol"||ae=="boolean"?he!=="__proto__":he===null}function ne(he){return!!y&&y in he}function ue(he){if(he!=null){try{return b.call(he)}catch{}try{return he+""}catch{}}return""}function de(he,ae){if(typeof he!="function"||ae&&typeof ae!="function")throw new TypeError(e);var Oe=function(){var Ne=arguments,He=ae?ae.apply(this,Ne):Ne[0],qe=Oe.cache;if(qe.has(He))return qe.get(He);var Xe=he.apply(this,Ne);return Oe.cache=qe.set(He,Xe),Xe};return Oe.cache=new(de.Cache||ee),Oe}de.Cache=ee;function we(he,ae){return he===ae||he!==he&&ae!==ae}function Se(he){var ae=_e(he)?w.call(he):"";return ae==r||ae==n}function _e(he){var ae=typeof he;return!!he&&(ae=="object"||ae=="function")}return X0=de,X0}var aJ=oJ();const sJ=Hn(aJ);var di=[],uJ=function(){return di.some(function(e){return e.activeTargets.length>0})},cJ=function(){return di.some(function(e){return e.skippedTargets.length>0})},XA="ResizeObserver loop completed with undelivered notifications.",lJ=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:XA}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=XA),window.dispatchEvent(e)},La;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(La||(La={}));var hi=function(e){return Object.freeze(e)},fJ=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,hi(this)}return e})(),Tk=(function(){function e(t,r,n,i){return this.x=t,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,hi(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,i=t.top,o=t.right,a=t.bottom,u=t.left,c=t.width,d=t.height;return{x:r,y:n,top:i,right:o,bottom:a,left:u,width:c,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),bw=function(e){return e instanceof SVGElement&&"getBBox"in e},Ak=function(e){if(bw(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},ZA=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},dJ=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Pa=typeof window<"u"?window:{},Ru=new WeakMap,JA=/auto|scroll/,hJ=/^tb|vertical/,pJ=/msie|trident/i.test(Pa.navigator&&Pa.navigator.userAgent),Kr=function(e){return parseFloat(e||"0")},so=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new fJ((r?t:e)||0,(r?e:t)||0)},QA=hi({devicePixelContentBoxSize:so(),borderBoxSize:so(),contentBoxSize:so(),contentRect:new Tk(0,0,0,0)}),Mk=function(e,t){if(t===void 0&&(t=!1),Ru.has(e)&&!t)return Ru.get(e);if(Ak(e))return Ru.set(e,QA),QA;var r=getComputedStyle(e),n=bw(e)&&e.ownerSVGElement&&e.getBBox(),i=!pJ&&r.boxSizing==="border-box",o=hJ.test(r.writingMode||""),a=!n&&JA.test(r.overflowY||""),u=!n&&JA.test(r.overflowX||""),c=n?0:Kr(r.paddingTop),d=n?0:Kr(r.paddingRight),f=n?0:Kr(r.paddingBottom),h=n?0:Kr(r.paddingLeft),p=n?0:Kr(r.borderTopWidth),v=n?0:Kr(r.borderRightWidth),m=n?0:Kr(r.borderBottomWidth),y=n?0:Kr(r.borderLeftWidth),b=h+d,x=c+f,w=y+v,S=p+m,E=u?e.offsetHeight-S-e.clientHeight:0,_=a?e.offsetWidth-w-e.clientWidth:0,R=i?b+w:0,P=i?x+S:0,N=n?n.width:Kr(r.width)-R-_,j=n?n.height:Kr(r.height)-P-E,L=N+b+_+w,F=j+x+E+S,k=hi({devicePixelContentBoxSize:so(Math.round(N*devicePixelRatio),Math.round(j*devicePixelRatio),o),borderBoxSize:so(L,F,o),contentBoxSize:so(N,j,o),contentRect:new Tk(h,c,N,j)});return Ru.set(e,k),k},Dk=function(e,t,r){var n=Mk(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case La.DEVICE_PIXEL_CONTENT_BOX:return a;case La.BORDER_BOX:return i;default:return o}},vJ=(function(){function e(t){var r=Mk(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=hi([r.borderBoxSize]),this.contentBoxSize=hi([r.contentBoxSize]),this.devicePixelContentBoxSize=hi([r.devicePixelContentBoxSize])}return e})(),jk=function(e){if(Ak(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},gJ=function(){var e=1/0,t=[];di.forEach(function(a){if(a.activeTargets.length!==0){var u=[];a.activeTargets.forEach(function(d){var f=new vJ(d.target),h=jk(d.target);u.push(f),d.lastReportedSize=Dk(d.target,d.observedBox),h<e&&(e=h)}),t.push(function(){a.callback.call(a.observer,u,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var i=n[r];i()}return e},eM=function(e){di.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(jk(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},mJ=function(){var e=0;for(eM(e);uJ();)e=gJ(),eM(e);return cJ()&&lJ(),e>0},Z0,qk=[],yJ=function(){return qk.splice(0).forEach(function(e){return e()})},bJ=function(e){if(!Z0){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return yJ()}).observe(r,n),Z0=function(){r.textContent="".concat(t?t--:t++)}}qk.push(e),Z0()},xJ=function(e){bJ(function(){requestAnimationFrame(e)})},Fu=0,wJ=function(){return!!Fu},_J=250,EJ={attributes:!0,characterData:!0,childList:!0,subtree:!0},tM=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],rM=function(e){return e===void 0&&(e=0),Date.now()+e},J0=!1,SJ=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=_J),!J0){J0=!0;var n=rM(t);xJ(function(){var i=!1;try{i=mJ()}finally{if(J0=!1,t=n-rM(),!wJ())return;i?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,EJ)};document.body?r():Pa.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),tM.forEach(function(r){return Pa.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),tM.forEach(function(r){return Pa.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),Vb=new SJ,nM=function(e){!Fu&&e>0&&Vb.start(),Fu+=e,!Fu&&Vb.stop()},OJ=function(e){return!bw(e)&&!dJ(e)&&getComputedStyle(e).display==="inline"},CJ=(function(){function e(t,r){this.target=t,this.observedBox=r||La.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Dk(this.target,this.observedBox,!0);return OJ(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),RJ=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Pu=new WeakMap,iM=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Iu=(function(){function e(){}return e.connect=function(t,r){var n=new RJ(t,r);Pu.set(t,n)},e.observe=function(t,r,n){var i=Pu.get(t),o=i.observationTargets.length===0;iM(i.observationTargets,r)<0&&(o&&di.push(i),i.observationTargets.push(new CJ(r,n&&n.box)),nM(1),Vb.schedule())},e.unobserve=function(t,r){var n=Pu.get(t),i=iM(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&di.splice(di.indexOf(n),1),n.observationTargets.splice(i,1),nM(-1))},e.disconnect=function(t){var r=this,n=Pu.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),PJ=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Iu.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ZA(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Iu.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ZA(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Iu.unobserve(this,t)},e.prototype.disconnect=function(){Iu.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Q0,oM;function IJ(){if(oM)return Q0;oM=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return Q0=e,Q0}var NJ=IJ();const kk=Hn(NJ);var aM={},eb,sM;function TJ(){if(sM)return eb;sM=1;var e=Xa(),t=Ro(),r=Qc(),n=ol(),i=TypeError,o="Reduce of empty array with no initial value",a=function(u){return function(c,d,f,h){var p=t(c),v=r(p),m=n(p);if(e(d),m===0&&f<2)throw new i(o);var y=u?m-1:0,b=u?-1:1;if(f<2)for(;;){if(y in v){h=v[y],y+=b;break}if(y+=b,u?y<0:m<=y)throw new i(o)}for(;u?y>=0:m>y;y+=b)y in v&&(h=d(h,v[y],y,p));return h}};return eb={left:a(!1),right:a(!0)},eb}var tb,uM;function AJ(){if(uM)return tb;uM=1;var e=at();return tb=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},tb}var rb,cM;function MJ(){if(cM)return rb;cM=1;var e=bt(),t=tk(),r=Wn(),n=function(i){return t.slice(0,i.length)===i};return rb=(function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&typeof Bun.version=="string"?"BUN":e.Deno&&typeof Deno.version=="object"?"DENO":r(e.process)==="process"?"NODE":e.window&&e.document?"BROWSER":"REST"})(),rb}var nb,lM;function DJ(){if(lM)return nb;lM=1;var e=MJ();return nb=e==="NODE",nb}var fM;function jJ(){if(fM)return aM;fM=1;var e=Gn(),t=TJ().left,r=AJ(),n=ow(),i=DJ(),o=!i&&n>79&&n<83,a=o||!r("reduce");return e({target:"Array",proto:!0,forced:a},{reduce:function(c){var d=arguments.length;return t(this,c,d,d>1?arguments[1]:void 0)}}),aM}jJ();var dM={},ib,hM;function Lk(){if(hM)return ib;hM=1;var e=Rr();return ib=function(){var t=e(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},ib}var ob,pM;function qJ(){if(pM)return ob;pM=1;var e=at(),t=bt(),r=t.RegExp,n=e(function(){var a=r("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),i=n||e(function(){return!r("a","y").sticky}),o=n||e(function(){var a=r("^r","gy");return a.lastIndex=2,a.exec("str")!==null});return ob={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},ob}var ab,vM;function kJ(){if(vM)return ab;vM=1;var e=at(),t=bt(),r=t.RegExp;return ab=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
68
- `)&&n.flags==="s")}),ab}var sb,gM;function LJ(){if(gM)return sb;gM=1;var e=at(),t=bt(),r=t.RegExp;return sb=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),sb}var ub,mM;function xw(){if(mM)return ub;mM=1;var e=Xt(),t=it(),r=Ri(),n=Lk(),i=qJ(),o=cw(),a=sl(),u=Po().get,c=kJ(),d=LJ(),f=o("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,v=t("".charAt),m=t("".indexOf),y=t("".replace),b=t("".slice),x=(function(){var _=/a/,R=/b*/g;return e(h,_,"a"),e(h,R,"a"),_.lastIndex!==0||R.lastIndex!==0})(),w=i.BROKEN_CARET,S=/()??/.exec("")[1]!==void 0,E=x||S||w||c||d;return E&&(p=function(R){var P=this,N=u(P),j=r(R),L=N.raw,F,k,D,T,B,$,W;if(L)return L.lastIndex=P.lastIndex,F=e(p,L,j),P.lastIndex=L.lastIndex,F;var Y=N.groups,ee=w&&P.sticky,H=e(n,P),Q=P.source,ce=0,se=j;if(ee&&(H=y(H,"y",""),m(H,"g")===-1&&(H+="g"),se=b(j,P.lastIndex),P.lastIndex>0&&(!P.multiline||P.multiline&&v(j,P.lastIndex-1)!==`
69
- `)&&(Q="(?: "+Q+")",se=" "+se,ce++),k=new RegExp("^(?:"+Q+")",H)),S&&(k=new RegExp("^"+Q+"$(?!\\s)",H)),x&&(D=P.lastIndex),T=e(h,ee?k:P,se),ee?T?(T.input=b(T.input,ce),T[0]=b(T[0],ce),T.index=P.lastIndex,P.lastIndex+=T[0].length):P.lastIndex=0:x&&T&&(P.lastIndex=P.global?T.index+T[0].length:D),S&&T&&T.length>1&&e(f,T[0],k,function(){for(B=1;B<arguments.length-2;B++)arguments[B]===void 0&&(T[B]=void 0)}),T&&Y)for(T.groups=$=a(null),B=0;B<Y.length;B++)W=Y[B],$[W[0]]=T[W[1]];return T}),ub=p,ub}var yM;function Bk(){if(yM)return dM;yM=1;var e=Gn(),t=xw();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),dM}Bk();var bM={},cb,xM;function Fk(){if(xM)return cb;xM=1,Bk();var e=Xt(),t=Ci(),r=xw(),n=at(),i=Ft(),o=Ja(),a=i("species"),u=RegExp.prototype;return cb=function(c,d,f,h){var p=i(c),v=!n(function(){var x={};return x[p]=function(){return 7},""[c](x)!==7}),m=v&&!n(function(){var x=!1,w=/a/;return c==="split"&&(w={},w.constructor={},w.constructor[a]=function(){return w},w.flags="",w[p]=/./[p]),w.exec=function(){return x=!0,null},w[p](""),!x});if(!v||!m||f){var y=/./[p],b=d(p,""[c],function(x,w,S,E,_){var R=w.exec;return R===r||R===u.exec?v&&!_?{done:!0,value:e(y,w,S,E)}:{done:!0,value:e(x,S,w,E)}:{done:!1}});t(String.prototype,c,b[0]),t(u,p,b[1])}h&&o(u[p],"sham",!0)},cb}var lb,wM;function $k(){if(wM)return lb;wM=1;var e=Ok().charAt;return lb=function(t,r,n){return r+(n?e(t,r).length:1)},lb}var fb,_M;function BJ(){if(_M)return fb;_M=1;var e=bt(),t=at(),r=e.RegExp,n=!t(function(){var i=!0;try{r(".","d")}catch{i=!1}var o={},a="",u=i?"dgimsy":"gimsy",c=function(p,v){Object.defineProperty(o,p,{get:function(){return a+=v,!0}})},d={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};i&&(d.hasIndices="d");for(var f in d)c(f,d[f]);var h=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(o);return h!==u||a!==u});return fb={correct:n},fb}var db,EM;function zk(){if(EM)return db;EM=1;var e=Xt(),t=Cr(),r=tl(),n=BJ(),i=Lk(),o=RegExp.prototype;return db=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},db}var hb,SM;function Hk(){if(SM)return hb;SM=1;var e=Xt(),t=Rr(),r=Et(),n=Wn(),i=xw(),o=TypeError;return hb=function(a,u){var c=a.exec;if(r(c)){var d=e(c,a,u);return d!==null&&t(d),d}if(n(a)==="RegExp")return e(i,a,u);throw new o("RegExp#exec called on incompatible receiver")},hb}var OM;function FJ(){if(OM)return bM;OM=1;var e=Xt(),t=it(),r=Fk(),n=Rr(),i=Nt(),o=pw(),a=Ri(),u=Oi(),c=Za(),d=$k(),f=zk(),h=Hk(),p=t("".indexOf);return r("match",function(v,m,y){return[function(x){var w=u(this),S=i(x)?c(x,v):void 0;return S?e(S,x,w):new RegExp(x)[v](a(w))},function(b){var x=n(this),w=a(b),S=y(m,x,w);if(S.done)return S.value;var E=a(f(x));if(p(E,"g")===-1)return h(x,w);var _=p(E,"u")!==-1;x.lastIndex=0;for(var R=[],P=0,N;(N=h(x,w))!==null;){var j=a(N[0]);R[P]=j,j===""&&(x.lastIndex=d(w,o(x.lastIndex),_)),P++}return P===0?null:R}]}),bM}FJ();var CM={},pb,RM;function $J(){if(RM)return pb;RM=1;var e=fk(),t=Sn();return pb=function(r,n,i){return i.get&&e(i.get,n,{getter:!0}),i.set&&e(i.set,n,{setter:!0}),t.f(r,n,i)},pb}var PM;function zJ(){if(PM)return CM;PM=1;var e=$r(),t=dw().EXISTS,r=it(),n=$J(),i=Function.prototype,o=r(i.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=r(a.exec),c="name";return e&&!t&&n(i,c,{configurable:!0,get:function(){try{return u(a,o(this))[1]}catch{return""}}}),CM}zJ();var IM={},vb,NM;function HJ(){if(NM)return vb;NM=1;var e=Jc(),t=Function.prototype,r=t.apply,n=t.call;return vb=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),vb}var gb,TM;function UJ(){if(TM)return gb;TM=1;var e=it(),t=Ro(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;return gb=function(c,d,f,h,p,v){var m=f+c.length,y=h.length,b=u;return p!==void 0&&(p=t(p),b=a),i(v,b,function(x,w){var S;switch(n(w,0)){case"$":return"$";case"&":return c;case"`":return o(d,0,f);case"'":return o(d,m);case"<":S=p[o(w,1,-1)];break;default:var E=+w;if(E===0)return x;if(E>y){var _=r(E/10);return _===0?x:_<=y?h[_-1]===void 0?n(w,1):h[_-1]+n(w,1):x}S=h[E-1]}return S===void 0?"":S})},gb}var AM;function VJ(){if(AM)return IM;AM=1;var e=HJ(),t=Xt(),r=it(),n=Fk(),i=at(),o=Rr(),a=Et(),u=Nt(),c=il(),d=pw(),f=Ri(),h=Oi(),p=$k(),v=Za(),m=UJ(),y=zk(),b=Hk(),x=Ft(),w=x("replace"),S=Math.max,E=Math.min,_=r([].concat),R=r([].push),P=r("".indexOf),N=r("".slice),j=function(D){return D===void 0?D:String(D)},L=(function(){return"a".replace(/./,"$0")==="$0"})(),F=(function(){return/./[w]?/./[w]("a","$0")==="":!1})(),k=!i(function(){var D=/./;return D.exec=function(){var T=[];return T.groups={a:"7"},T},"".replace(D,"$<a>")!=="7"});return n("replace",function(D,T,B){var $=F?"$":"$0";return[function(Y,ee){var H=h(this),Q=u(Y)?v(Y,w):void 0;return Q?t(Q,Y,H,ee):t(T,f(H),Y,ee)},function(W,Y){var ee=o(this),H=f(W);if(typeof Y=="string"&&P(Y,$)===-1&&P(Y,"$<")===-1){var Q=B(T,ee,H,Y);if(Q.done)return Q.value}var ce=a(Y);ce||(Y=f(Y));var se=f(y(ee)),z=P(se,"g")!==-1,G;z&&(G=P(se,"u")!==-1,ee.lastIndex=0);for(var J=[],V;V=b(ee,H),!(V===null||(R(J,V),!z));){var K=f(V[0]);K===""&&(ee.lastIndex=p(H,d(ee.lastIndex),G))}for(var ie="",ne=0,ue=0;ue<J.length;ue++){V=J[ue];for(var de=f(V[0]),we=S(E(c(V.index),H.length),0),Se=[],_e,he=1;he<V.length;he++)R(Se,j(V[he]));var ae=V.groups;if(ce){var Oe=_([de],Se,we,H);ae!==void 0&&R(Oe,ae),_e=f(e(Y,void 0,Oe))}else _e=m(de,H,we,Se,ae,Y);we>=ne&&(ie+=N(H,ne,we)+_e,ne=we+de.length)}return ie+N(H,ne)}]},!k||!L||F),IM}VJ();function qn(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function $u(e){return!e||!e.ownerDocument?document:e.ownerDocument}var Zi=null,MM=null;kk&&window.addEventListener("resize",function(){MM!==window.devicePixelRatio&&(MM=window.devicePixelRatio,Zi=null)});function DM(e){if(Zi===null){var t=$u(e);if(typeof t>"u")return Zi=0,Zi;var r=t.body,n=t.createElement("div");n.classList.add("simplebar-hide-scrollbar"),r.appendChild(n);var i=n.getBoundingClientRect().right;r.removeChild(n),Zi=i}return Zi}var pc=(function(){function e(r,n){var i=this;this.onScroll=function(){var o=qn(i.el);i.scrollXTicking||(o.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(o.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0)},this.scrollX=function(){i.axis.x.isOverflowing&&(i.showScrollbar("x"),i.positionScrollbar("x")),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&(i.showScrollbar("y"),i.positionScrollbar("y")),i.scrollYTicking=!1},this.onMouseEnter=function(){i.showScrollbar("x"),i.showScrollbar("y")},this.onMouseMove=function(o){i.mouseX=o.clientX,i.mouseY=o.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this.onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.hideScrollbars=function(){i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.track.rect)||(i.axis.y.scrollbar.el.classList.remove(i.classNames.visible),i.axis.y.isVisible=!1),i.isWithinBounds(i.axis.x.track.rect)||(i.axis.x.scrollbar.el.classList.remove(i.classNames.visible),i.axis.x.isVisible=!1)},this.onPointerEvent=function(o){var a,u;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(a=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(u=i.isWithinBounds(i.axis.y.track.rect)),(a||u)&&(o.preventDefault(),o.stopPropagation(),o.type==="mousedown"&&(a&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(o,"x"):i.onTrackClick(o,"x")),u&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(o,"y"):i.onTrackClick(o,"y"))))},this.drag=function(o){var a,u=i.axis[i.draggedAxis].track,c=u.rect[i.axis[i.draggedAxis].sizeAttr],d=i.axis[i.draggedAxis].scrollbar,f=i.contentWrapperEl[i.axis[i.draggedAxis].scrollSizeAttr],h=parseInt(i.elStyles[i.axis[i.draggedAxis].sizeAttr],10);o.preventDefault(),o.stopPropagation(),i.draggedAxis==="y"?a=o.pageY:a=o.pageX;var p=a-u.rect[i.axis[i.draggedAxis].offsetAttr]-i.axis[i.draggedAxis].dragOffset,v=p/(c-d.size),m=v*(f-h);i.draggedAxis==="x"&&(m=i.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?m-(c+d.size):m,m=i.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-m:m),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=m},this.onEndDrag=function(o){var a=$u(i.el),u=qn(i.el);o.preventDefault(),o.stopPropagation(),i.el.classList.remove(i.classNames.dragging),a.removeEventListener("mousemove",i.drag,!0),a.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=u.setTimeout(function(){a.removeEventListener("click",i.preventClick,!0),a.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=r,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,n),this.classNames=Object.assign({},e.defaultOptions.classNames,this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,!e.instances.has(this.el)&&(this.recalculate=WA(this.recalculate.bind(this),64),this.onMouseMove=WA(this.onMouseMove.bind(this),64),this.hideScrollbars=KA(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=KA(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=sJ(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var n=document.createElement("div");n.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var i=n.firstElementChild;document.body.appendChild(i);var o=i.firstElementChild;i.scrollLeft=0;var a=e.getOffset(i),u=e.getOffset(o);i.scrollLeft=999;var c=e.getOffset(o);return{isRtlScrollingInverted:a.left!==u.left&&u.left-c.left!==0,isRtlScrollbarInverted:a.left!==u.left}},e.getOffset=function(n){var i=n.getBoundingClientRect(),o=$u(n),a=qn(n);return{top:i.top+(a.pageYOffset||o.documentElement.scrollTop),left:i.left+(a.pageXOffset||o.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),kk&&(this.initDOM(),this.setAccessibilityAttributes(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var n=this;if(Array.prototype.filter.call(this.el.children,function(a){return a.classList.contains(n.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var i=document.createElement("div"),o=document.createElement("div");i.classList.add(this.classNames.track),o.classList.add(this.classNames.scrollbar),i.appendChild(o),this.axis.x.track.el=i.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=i.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.setAccessibilityAttributes=function(){var n=this.options.ariaLabel||"scrollable content";this.contentWrapperEl.setAttribute("tabindex","0"),this.contentWrapperEl.setAttribute("role","region"),this.contentWrapperEl.setAttribute("aria-label",n)},t.initListeners=function(){var n=this,i=qn(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(c){n.el.addEventListener(c,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(c){n.el.addEventListener(c,n.onPointerEvent,{capture:!0,passive:!0})}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),i.addEventListener("resize",this.onWindowResize);var o=!1,a=null,u=i.ResizeObserver||PJ;this.resizeObserver=new u(function(){!o||a!==null||(a=i.requestAnimationFrame(function(){n.recalculate(),a=null}))}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),i.requestAnimationFrame(function(){o=!0}),this.mutationObserver=new i.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var n=qn(this.el);this.elStyles=n.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var i=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1,a=this.contentEl.offsetWidth,u=this.contentWrapperEl.offsetWidth,c=this.elStyles.overflowX,d=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var f=this.contentEl.scrollHeight,h=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=i?"auto":"100%",this.placeholderEl.style.width=o?a+"px":"auto",this.placeholderEl.style.height=f+"px";var p=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=h>a,this.axis.y.isOverflowing=f>p,this.axis.x.isOverflowing=c==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=d==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var v=this.axis.x.isOverflowing?this.scrollbarWidth:0,m=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&h>u-m,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&f>p-v,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(n){if(n===void 0&&(n="y"),!this.axis[n].isOverflowing)return 0;var i=this.contentEl[this.axis[n].scrollSizeAttr],o=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a,u=o/i;return a=Math.max(~~(u*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},t.positionScrollbar=function(n){if(n===void 0&&(n="y"),!!this.axis[n].isOverflowing){var i=this.contentWrapperEl[this.axis[n].scrollSizeAttr],o=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a=parseInt(this.elStyles[this.axis[n].sizeAttr],10),u=this.axis[n].scrollbar,c=this.contentWrapperEl[this.axis[n].scrollOffsetAttr];c=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-c:c;var d=c/(i-a),f=~~((o-u.size)*d);f=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?f+(o-u.size):f,u.el.style.transform=n==="x"?"translate3d("+f+"px, 0, 0)":"translate3d(0, "+f+"px, 0)"}},t.toggleTrackVisibility=function(n){n===void 0&&(n="y");var i=this.axis[n].track.el,o=this.axis[n].scrollbar.el;this.axis[n].isOverflowing||this.axis[n].forceVisible?(i.style.visibility="visible",this.contentWrapperEl.style[this.axis[n].overflowAttr]="scroll"):(i.style.visibility="hidden",this.contentWrapperEl.style[this.axis[n].overflowAttr]="hidden"),this.axis[n].isOverflowing?o.style.display="block":o.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(n){n===void 0&&(n="y"),this.axis[n].track.rect=this.axis[n].track.el.getBoundingClientRect(),this.axis[n].scrollbar.rect=this.axis[n].scrollbar.el.getBoundingClientRect();var i=this.isWithinBounds(this.axis[n].scrollbar.rect);i?this.axis[n].scrollbar.el.classList.add(this.classNames.hover):this.axis[n].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[n].track.rect)?(this.showScrollbar(n),this.axis[n].track.el.classList.add(this.classNames.hover)):this.axis[n].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(n){n===void 0&&(n="y"),this.axis[n].track.el.classList.remove(this.classNames.hover),this.axis[n].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(n){n===void 0&&(n="y");var i=this.axis[n].scrollbar.el;this.axis[n].isVisible||(i.classList.add(this.classNames.visible),this.axis[n].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(n,i){i===void 0&&(i="y");var o=$u(this.el),a=qn(this.el),u=this.axis[i].scrollbar,c=i==="y"?n.pageY:n.pageX;this.axis[i].dragOffset=c-u.rect[this.axis[i].offsetAttr],this.draggedAxis=i,this.el.classList.add(this.classNames.dragging),o.addEventListener("mousemove",this.drag,!0),o.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(o.addEventListener("click",this.preventClick,!0),o.addEventListener("dblclick",this.preventClick,!0)):(a.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(n,i){var o=this;if(i===void 0&&(i="y"),!!this.options.clickOnTrack){var a=qn(this.el);this.axis[i].scrollbar.rect=this.axis[i].scrollbar.el.getBoundingClientRect();var u=this.axis[i].scrollbar,c=u.rect[this.axis[i].offsetAttr],d=parseInt(this.elStyles[this.axis[i].sizeAttr],10),f=this.contentWrapperEl[this.axis[i].scrollOffsetAttr],h=i==="y"?this.mouseY-c:this.mouseX-c,p=h<0?-1:1,v=p===-1?f-d:f+d,m=function y(){if(p===-1){if(f>v){var b;f-=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((b={},b[o.axis[i].offsetAttr]=f,b)),a.requestAnimationFrame(y)}}else if(f<v){var x;f+=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((x={},x[o.axis[i].offsetAttr]=f,x)),a.requestAnimationFrame(y)}};m()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:DM(this.el)}catch{return DM(this.el)}},t.removeListeners=function(){var n=this,i=qn(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(o){n.el.removeEventListener(o,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(o){n.el.removeEventListener(o,n.onPointerEvent,{capture:!0,passive:!0})}),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),i.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(n){return this.mouseX>=n.left&&this.mouseX<=n.left+n.width&&this.mouseY>=n.top&&this.mouseY<=n.top+n.height},t.findChild=function(n,i){var o=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;return Array.prototype.filter.call(n.children,function(a){return o.call(a,i)})[0]},e})();pc.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3};pc.instances=new WeakMap;function jM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jM(Object(r),!0).forEach(function(n){WJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WJ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vc(){return vc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vc.apply(this,arguments)}function GJ(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function KJ(e,t){if(e==null)return{};var r=GJ(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var YJ=["children","scrollableNodeProps","tag"],XJ=function(t){var r=Array.prototype.reduce.call(t,function(n,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var a=o[1].replace(/\W+(.)/g,function(u,c){return c.toUpperCase()});switch(i.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=i.value}}return n},{});return r},cl=A.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=e.tag,a=o===void 0?"div":o,u=KJ(e,YJ),c=a,d,f=A.useRef(),h=A.useRef(),p=A.useRef(),v={},m={},y=[];return Object.keys(u).forEach(function(b){Object.prototype.hasOwnProperty.call(pc.defaultOptions,b)?v[b]=u[b]:b.match(/data-simplebar-(.+)/)&&b!=="data-simplebar-direction"?y.push({name:b,value:u[b]}):m[b]=u[b]}),y.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
66
+ }`;var je=D1(function(){return Ue(q,Ce+"return "+me).apply(r,U)});if(je.source=me,Df(je))throw je;return je}function rz(s){return Ge(s).toLowerCase()}function nz(s){return Ge(s).toUpperCase()}function iz(s,l,g){if(s=Ge(s),s&&(g||l===r))return Hw(s);if(!s||!(l=er(l)))return s;var O=Pr(s),I=Pr(l),q=Uw(O,I),U=Vw(O,I)+1;return Mn(O,q,U).join("")}function oz(s,l,g){if(s=Ge(s),s&&(g||l===r))return s.slice(0,Gw(s)+1);if(!s||!(l=er(l)))return s;var O=Pr(s),I=Vw(O,Pr(l))+1;return Mn(O,0,I).join("")}function az(s,l,g){if(s=Ge(s),s&&(g||l===r))return s.replace(To,"");if(!s||!(l=er(l)))return s;var O=Pr(s),I=Uw(O,Pr(l));return Mn(O,I).join("")}function sz(s,l){var g=L,O=F;if(ft(l)){var I="separator"in l?l.separator:I;g="length"in l?Me(l.length):g,O="omission"in l?er(l.omission):O}s=Ge(s);var q=s.length;if(Di(s)){var U=Pr(s);q=U.length}if(g>=q)return s;var X=g-ji(O);if(X<1)return O;var re=U?Mn(U,0,X).join(""):s.slice(0,X);if(I===r)return re+O;if(U&&(X+=re.length-X),jf(I)){if(s.slice(X).search(I)){var pe,ge=re;for(I.global||(I=Xl(I.source,Ge(cs.exec(I))+"g")),I.lastIndex=0;pe=I.exec(ge);)var me=pe.index;re=re.slice(0,me===r?X:me)}}else if(s.indexOf(er(I),X)!=X){var be=re.lastIndexOf(I);be>-1&&(re=re.slice(0,be))}return re+O}function uz(s){return s=Ge(s),s&&vl.test(s)?s.replace(es,kL):s}var cz=zi(function(s,l,g){return s+(g?" ":"")+l.toUpperCase()}),Lf=j_("toUpperCase");function M1(s,l,g){return s=Ge(s),l=g?r:l,l===r?AL(s)?FL(s):EL(s):s.match(l)||[]}var D1=ke(function(s,l){try{return Jt(s,r,l)}catch(g){return Df(g)?g:new Te(g)}}),lz=fn(function(s,l){return fr(l,function(g){g=Wr(g),cn(s,g,Af(s[g],s))}),s});function fz(s){var l=s==null?0:s.length,g=Re();return s=l?ct(s,function(O){if(typeof O[1]!="function")throw new dr(a);return[g(O[0]),O[1]]}):[],ke(function(O){for(var I=-1;++I<l;){var q=s[I];if(Jt(q[0],this,O))return Jt(q[1],this,O)}})}function dz(s){return kB(pr(s,h))}function Bf(s){return function(){return s}}function hz(s,l){return s==null||s!==s?l:s}var pz=k_(),vz=k_(!0);function Ut(s){return s}function Ff(s){return h_(typeof s=="function"?s:pr(s,h))}function gz(s){return v_(pr(s,h))}function mz(s,l){return g_(s,pr(l,h))}var yz=ke(function(s,l){return function(g){return Ho(g,s,l)}}),bz=ke(function(s,l){return function(g){return Ho(s,g,l)}});function $f(s,l,g){var O=St(l),I=$s(l,O);g==null&&!(ft(l)&&(I.length||!O.length))&&(g=l,l=s,s=this,I=$s(l,St(l)));var q=!(ft(g)&&"chain"in g)||!!g.chain,U=hn(s);return fr(I,function(X){var re=l[X];s[X]=re,U&&(s.prototype[X]=function(){var pe=this.__chain__;if(q||pe){var ge=s(this.__wrapped__),me=ge.__actions__=$t(this.__actions__);return me.push({func:re,args:arguments,thisArg:s}),ge.__chain__=pe,ge}return re.apply(s,Rn([this.value()],arguments))})}),s}function xz(){return Rt._===this&&(Rt._=WL),this}function zf(){}function wz(s){return s=Me(s),ke(function(l){return m_(l,s)})}var _z=bf(ct),Ez=bf(Lw),Sz=bf(Hl);function j1(s){return Cf(s)?Ul(Wr(s)):eF(s)}function Oz(s){return function(l){return s==null?r:ti(s,l)}}var Cz=B_(),Rz=B_(!0);function Hf(){return[]}function Uf(){return!1}function Pz(){return{}}function Iz(){return""}function Nz(){return!0}function Tz(s,l){if(s=Me(s),s<1||s>Y)return[];var g=Q,O=At(s,Q);l=Re(l),s-=Q;for(var I=Gl(O,l);++g<s;)l(g);return I}function Az(s){return Ae(s)?ct(s,Wr):tr(s)?[s]:$t(t1(Ge(s)))}function Mz(s){var l=++UL;return Ge(s)+l}var Dz=Gs(function(s,l){return s+l},0),jz=xf("ceil"),qz=Gs(function(s,l){return s/l},1),kz=xf("floor");function Lz(s){return s&&s.length?Fs(s,Ut,of):r}function Bz(s,l){return s&&s.length?Fs(s,Re(l,2),of):r}function Fz(s){return $w(s,Ut)}function $z(s,l){return $w(s,Re(l,2))}function zz(s){return s&&s.length?Fs(s,Ut,cf):r}function Hz(s,l){return s&&s.length?Fs(s,Re(l,2),cf):r}var Uz=Gs(function(s,l){return s*l},1),Vz=xf("round"),Wz=Gs(function(s,l){return s-l},0);function Gz(s){return s&&s.length?Wl(s,Ut):0}function Kz(s,l){return s&&s.length?Wl(s,Re(l,2)):0}return M.after=g3,M.ary=d1,M.assign=n5,M.assignIn=C1,M.assignInWith=au,M.assignWith=i5,M.at=o5,M.before=h1,M.bind=Af,M.bindAll=lz,M.bindKey=p1,M.castArray=P3,M.chain=c1,M.chunk=kF,M.compact=LF,M.concat=BF,M.cond=fz,M.conforms=dz,M.constant=Bf,M.countBy=G$,M.create=a5,M.curry=v1,M.curryRight=g1,M.debounce=m1,M.defaults=s5,M.defaultsDeep=u5,M.defer=m3,M.delay=y3,M.difference=FF,M.differenceBy=$F,M.differenceWith=zF,M.drop=HF,M.dropRight=UF,M.dropRightWhile=VF,M.dropWhile=WF,M.fill=GF,M.filter=Y$,M.flatMap=J$,M.flatMapDeep=Q$,M.flatMapDepth=e3,M.flatten=o1,M.flattenDeep=KF,M.flattenDepth=YF,M.flip=b3,M.flow=pz,M.flowRight=vz,M.fromPairs=XF,M.functions=v5,M.functionsIn=g5,M.groupBy=t3,M.initial=JF,M.intersection=QF,M.intersectionBy=e$,M.intersectionWith=t$,M.invert=y5,M.invertBy=b5,M.invokeMap=n3,M.iteratee=Ff,M.keyBy=i3,M.keys=St,M.keysIn=Ht,M.map=eu,M.mapKeys=w5,M.mapValues=_5,M.matches=gz,M.matchesProperty=mz,M.memoize=ru,M.merge=E5,M.mergeWith=R1,M.method=yz,M.methodOf=bz,M.mixin=$f,M.negate=nu,M.nthArg=wz,M.omit=S5,M.omitBy=O5,M.once=x3,M.orderBy=o3,M.over=_z,M.overArgs=w3,M.overEvery=Ez,M.overSome=Sz,M.partial=Mf,M.partialRight=y1,M.partition=a3,M.pick=C5,M.pickBy=P1,M.property=j1,M.propertyOf=Oz,M.pull=o$,M.pullAll=s1,M.pullAllBy=a$,M.pullAllWith=s$,M.pullAt=u$,M.range=Cz,M.rangeRight=Rz,M.rearg=_3,M.reject=c3,M.remove=c$,M.rest=E3,M.reverse=Nf,M.sampleSize=f3,M.set=P5,M.setWith=I5,M.shuffle=d3,M.slice=l$,M.sortBy=v3,M.sortedUniq=m$,M.sortedUniqBy=y$,M.split=J5,M.spread=S3,M.tail=b$,M.take=x$,M.takeRight=w$,M.takeRightWhile=_$,M.takeWhile=E$,M.tap=L$,M.throttle=O3,M.thru=Qs,M.toArray=E1,M.toPairs=I1,M.toPairsIn=N1,M.toPath=Az,M.toPlainObject=O1,M.transform=N5,M.unary=C3,M.union=S$,M.unionBy=O$,M.unionWith=C$,M.uniq=R$,M.uniqBy=P$,M.uniqWith=I$,M.unset=T5,M.unzip=Tf,M.unzipWith=u1,M.update=A5,M.updateWith=M5,M.values=Vi,M.valuesIn=D5,M.without=N$,M.words=M1,M.wrap=R3,M.xor=T$,M.xorBy=A$,M.xorWith=M$,M.zip=D$,M.zipObject=j$,M.zipObjectDeep=q$,M.zipWith=k$,M.entries=I1,M.entriesIn=N1,M.extend=C1,M.extendWith=au,$f(M,M),M.add=Dz,M.attempt=D1,M.camelCase=L5,M.capitalize=T1,M.ceil=jz,M.clamp=j5,M.clone=I3,M.cloneDeep=T3,M.cloneDeepWith=A3,M.cloneWith=N3,M.conformsTo=M3,M.deburr=A1,M.defaultTo=hz,M.divide=qz,M.endsWith=B5,M.eq=Nr,M.escape=F5,M.escapeRegExp=$5,M.every=K$,M.find=X$,M.findIndex=n1,M.findKey=c5,M.findLast=Z$,M.findLastIndex=i1,M.findLastKey=l5,M.floor=kz,M.forEach=l1,M.forEachRight=f1,M.forIn=f5,M.forInRight=d5,M.forOwn=h5,M.forOwnRight=p5,M.get=qf,M.gt=D3,M.gte=j3,M.has=m5,M.hasIn=kf,M.head=a1,M.identity=Ut,M.includes=r3,M.indexOf=ZF,M.inRange=q5,M.invoke=x5,M.isArguments=ii,M.isArray=Ae,M.isArrayBuffer=q3,M.isArrayLike=zt,M.isArrayLikeObject=pt,M.isBoolean=k3,M.isBuffer=Dn,M.isDate=L3,M.isElement=B3,M.isEmpty=F3,M.isEqual=$3,M.isEqualWith=z3,M.isError=Df,M.isFinite=H3,M.isFunction=hn,M.isInteger=b1,M.isLength=iu,M.isMap=x1,M.isMatch=U3,M.isMatchWith=V3,M.isNaN=W3,M.isNative=G3,M.isNil=Y3,M.isNull=K3,M.isNumber=w1,M.isObject=ft,M.isObjectLike=dt,M.isPlainObject=Yo,M.isRegExp=jf,M.isSafeInteger=X3,M.isSet=_1,M.isString=ou,M.isSymbol=tr,M.isTypedArray=Ui,M.isUndefined=Z3,M.isWeakMap=J3,M.isWeakSet=Q3,M.join=r$,M.kebabCase=z5,M.last=gr,M.lastIndexOf=n$,M.lowerCase=H5,M.lowerFirst=U5,M.lt=e5,M.lte=t5,M.max=Lz,M.maxBy=Bz,M.mean=Fz,M.meanBy=$z,M.min=zz,M.minBy=Hz,M.stubArray=Hf,M.stubFalse=Uf,M.stubObject=Pz,M.stubString=Iz,M.stubTrue=Nz,M.multiply=Uz,M.nth=i$,M.noConflict=xz,M.noop=zf,M.now=tu,M.pad=V5,M.padEnd=W5,M.padStart=G5,M.parseInt=K5,M.random=k5,M.reduce=s3,M.reduceRight=u3,M.repeat=Y5,M.replace=X5,M.result=R5,M.round=Vz,M.runInContext=te,M.sample=l3,M.size=h3,M.snakeCase=Z5,M.some=p3,M.sortedIndex=f$,M.sortedIndexBy=d$,M.sortedIndexOf=h$,M.sortedLastIndex=p$,M.sortedLastIndexBy=v$,M.sortedLastIndexOf=g$,M.startCase=Q5,M.startsWith=ez,M.subtract=Wz,M.sum=Gz,M.sumBy=Kz,M.template=tz,M.times=Tz,M.toFinite=pn,M.toInteger=Me,M.toLength=S1,M.toLower=rz,M.toNumber=mr,M.toSafeInteger=r5,M.toString=Ge,M.toUpper=nz,M.trim=iz,M.trimEnd=oz,M.trimStart=az,M.truncate=sz,M.unescape=uz,M.uniqueId=Mz,M.upperCase=cz,M.upperFirst=Lf,M.each=l1,M.eachRight=f1,M.first=a1,$f(M,(function(){var s={};return Ur(M,function(l,g){Ze.call(M.prototype,g)||(s[g]=l)}),s})(),{chain:!1}),M.VERSION=n,fr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){M[s].placeholder=M}),fr(["drop","take"],function(s,l){Fe.prototype[s]=function(g){g=g===r?1:_t(Me(g),0);var O=this.__filtered__&&!l?new Fe(this):this.clone();return O.__filtered__?O.__takeCount__=At(g,O.__takeCount__):O.__views__.push({size:At(g,Q),type:s+(O.__dir__<0?"Right":"")}),O},Fe.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),fr(["filter","map","takeWhile"],function(s,l){var g=l+1,O=g==T||g==$;Fe.prototype[s]=function(I){var q=this.clone();return q.__iteratees__.push({iteratee:Re(I,3),type:g}),q.__filtered__=q.__filtered__||O,q}}),fr(["head","last"],function(s,l){var g="take"+(l?"Right":"");Fe.prototype[s]=function(){return this[g](1).value()[0]}}),fr(["initial","tail"],function(s,l){var g="drop"+(l?"":"Right");Fe.prototype[s]=function(){return this.__filtered__?new Fe(this):this[g](1)}}),Fe.prototype.compact=function(){return this.filter(Ut)},Fe.prototype.find=function(s){return this.filter(s).head()},Fe.prototype.findLast=function(s){return this.reverse().find(s)},Fe.prototype.invokeMap=ke(function(s,l){return typeof s=="function"?new Fe(this):this.map(function(g){return Ho(g,s,l)})}),Fe.prototype.reject=function(s){return this.filter(nu(Re(s)))},Fe.prototype.slice=function(s,l){s=Me(s);var g=this;return g.__filtered__&&(s>0||l<0)?new Fe(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),l!==r&&(l=Me(l),g=l<0?g.dropRight(-l):g.take(l-s)),g)},Fe.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Fe.prototype.toArray=function(){return this.take(Q)},Ur(Fe.prototype,function(s,l){var g=/^(?:filter|find|map|reject)|While$/.test(l),O=/^(?:head|last)$/.test(l),I=M[O?"take"+(l=="last"?"Right":""):l],q=O||/^find/.test(l);I&&(M.prototype[l]=function(){var U=this.__wrapped__,X=O?[1]:arguments,re=U instanceof Fe,pe=X[0],ge=re||Ae(U),me=function(Le){var $e=I.apply(M,Rn([Le],X));return O&&be?$e[0]:$e};ge&&g&&typeof pe=="function"&&pe.length!=1&&(re=ge=!1);var be=this.__chain__,Ce=!!this.__actions__.length,Pe=q&&!be,je=re&&!Ce;if(!q&&ge){U=je?U:new Fe(this);var Ie=s.apply(U,X);return Ie.__actions__.push({func:Qs,args:[me],thisArg:r}),new hr(Ie,be)}return Pe&&je?s.apply(this,X):(Ie=this.thru(me),Pe?O?Ie.value()[0]:Ie.value():Ie)})}),fr(["pop","push","shift","sort","splice","unshift"],function(s){var l=Os[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",O=/^(?:pop|shift)$/.test(s);M.prototype[s]=function(){var I=arguments;if(O&&!this.__chain__){var q=this.value();return l.apply(Ae(q)?q:[],I)}return this[g](function(U){return l.apply(Ae(U)?U:[],I)})}}),Ur(Fe.prototype,function(s,l){var g=M[l];if(g){var O=g.name+"";Ze.call(Bi,O)||(Bi[O]=[]),Bi[O].push({name:l,func:g})}}),Bi[Ws(r,x).name]=[{name:"wrapper",func:r}],Fe.prototype.clone=uB,Fe.prototype.reverse=cB,Fe.prototype.value=lB,M.prototype.at=B$,M.prototype.chain=F$,M.prototype.commit=$$,M.prototype.next=z$,M.prototype.plant=U$,M.prototype.reverse=V$,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=W$,M.prototype.first=M.prototype.head,qo&&(M.prototype[qo]=H$),M}),qi=$L();Xn?((Xn.exports=qi)._=qi,Bl._=qi):Rt._=qi}).call(sZ)})(Ea,Ea.exports)),Ea.exports}var Q2=uZ(),bN={},ra,xN;function bt(){if(xN)return ra;xN=1;var e=function(t){return t&&t.Math===Math&&t};return ra=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof ht=="object"&&ht)||e(typeof ra=="object"&&ra)||(function(){return this})()||Function("return this")(),ra}var Bm={},Fm,wN;function at(){return wN||(wN=1,Fm=function(e){try{return!!e()}catch{return!0}}),Fm}var $m,_N;function $r(){if(_N)return $m;_N=1;var e=at();return $m=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),$m}var zm,EN;function Qc(){if(EN)return zm;EN=1;var e=at();return zm=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),zm}var Hm,SN;function Xt(){if(SN)return Hm;SN=1;var e=Qc(),t=Function.prototype.call;return Hm=e?t.bind(t):function(){return t.apply(t,arguments)},Hm}var Um={},ON;function ek(){if(ON)return Um;ON=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Um.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,Um}var Vm,CN;function ow(){return CN||(CN=1,Vm=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),Vm}var Wm,RN;function it(){if(RN)return Wm;RN=1;var e=Qc(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Wm=e?n:function(i){return function(){return r.apply(i,arguments)}},Wm}var Gm,PN;function Wn(){if(PN)return Gm;PN=1;var e=it(),t=e({}.toString),r=e("".slice);return Gm=function(n){return r(t(n),8,-1)},Gm}var Km,IN;function el(){if(IN)return Km;IN=1;var e=it(),t=at(),r=Wn(),n=Object,i=e("".split);return Km=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,Km}var Ym,NN;function Ya(){return NN||(NN=1,Ym=function(e){return e==null}),Ym}var Xm,TN;function Oi(){if(TN)return Xm;TN=1;var e=Ya(),t=TypeError;return Xm=function(r){if(e(r))throw new t("Can't call method on "+r);return r},Xm}var Zm,AN;function Co(){if(AN)return Zm;AN=1;var e=el(),t=Oi();return Zm=function(r){return e(t(r))},Zm}var Jm,MN;function Et(){if(MN)return Jm;MN=1;var e=typeof document=="object"&&document.all;return Jm=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},Jm}var Qm,DN;function Nt(){if(DN)return Qm;DN=1;var e=Et();return Qm=function(t){return typeof t=="object"?t!==null:e(t)},Qm}var ey,jN;function tl(){if(jN)return ey;jN=1;var e=bt(),t=Et(),r=function(n){return t(n)?n:void 0};return ey=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},ey}var ty,qN;function rl(){if(qN)return ty;qN=1;var e=it();return ty=e({}.isPrototypeOf),ty}var ry,kN;function tk(){if(kN)return ry;kN=1;var e=bt(),t=e.navigator,r=t&&t.userAgent;return ry=r?String(r):"",ry}var ny,LN;function aw(){if(LN)return ny;LN=1;var e=bt(),t=tk(),r=e.process,n=e.Deno,i=r&&r.versions||n&&n.version,o=i&&i.v8,a,u;return o&&(a=o.split("."),u=a[0]>0&&a[0]<4?1:+(a[0]+a[1])),!u&&t&&(a=t.match(/Edge\/(\d+)/),(!a||a[1]>=74)&&(a=t.match(/Chrome\/(\d+)/),a&&(u=+a[1]))),ny=u,ny}var iy,BN;function rk(){if(BN)return iy;BN=1;var e=aw(),t=at(),r=bt(),n=r.String;return iy=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),iy}var oy,FN;function nk(){if(FN)return oy;FN=1;var e=rk();return oy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",oy}var ay,$N;function ik(){if($N)return ay;$N=1;var e=tl(),t=Et(),r=rl(),n=nk(),i=Object;return ay=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},ay}var sy,zN;function sw(){if(zN)return sy;zN=1;var e=String;return sy=function(t){try{return e(t)}catch{return"Object"}},sy}var uy,HN;function Xa(){if(HN)return uy;HN=1;var e=Et(),t=sw(),r=TypeError;return uy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},uy}var cy,UN;function Za(){if(UN)return cy;UN=1;var e=Xa(),t=Ya();return cy=function(r,n){var i=r[n];return t(i)?void 0:e(i)},cy}var ly,VN;function cZ(){if(VN)return ly;VN=1;var e=Xt(),t=Et(),r=Nt(),n=TypeError;return ly=function(i,o){var a,u;if(o==="string"&&t(a=i.toString)&&!r(u=e(a,i))||t(a=i.valueOf)&&!r(u=e(a,i))||o!=="string"&&t(a=i.toString)&&!r(u=e(a,i)))return u;throw new n("Can't convert object to primitive value")},ly}var fy={exports:{}},dy,WN;function nl(){return WN||(WN=1,dy=!1),dy}var hy,GN;function uw(){if(GN)return hy;GN=1;var e=bt(),t=Object.defineProperty;return hy=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},hy}var KN;function cw(){if(KN)return fy.exports;KN=1;var e=nl(),t=bt(),r=uw(),n="__core-js_shared__",i=fy.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.45.1",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"}),fy.exports}var py,YN;function lw(){if(YN)return py;YN=1;var e=cw();return py=function(t,r){return e[t]||(e[t]=r||{})},py}var vy,XN;function Ro(){if(XN)return vy;XN=1;var e=Oi(),t=Object;return vy=function(r){return t(e(r))},vy}var gy,ZN;function Cr(){if(ZN)return gy;ZN=1;var e=it(),t=Ro(),r=e({}.hasOwnProperty);return gy=Object.hasOwn||function(i,o){return r(t(i),o)},gy}var my,JN;function fw(){if(JN)return my;JN=1;var e=it(),t=0,r=Math.random(),n=e(1.1.toString);return my=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},my}var yy,QN;function Ft(){if(QN)return yy;QN=1;var e=bt(),t=lw(),r=Cr(),n=fw(),i=rk(),o=nk(),a=e.Symbol,u=t("wks"),c=o?a.for||a:a&&a.withoutSetter||n;return yy=function(d){return r(u,d)||(u[d]=i&&r(a,d)?a[d]:c("Symbol."+d)),u[d]},yy}var by,eT;function lZ(){if(eT)return by;eT=1;var e=Xt(),t=Nt(),r=ik(),n=Za(),i=cZ(),o=Ft(),a=TypeError,u=o("toPrimitive");return by=function(c,d){if(!t(c)||r(c))return c;var f=n(c,u),h;if(f){if(d===void 0&&(d="default"),h=e(f,c,d),!t(h)||r(h))return h;throw new a("Can't convert object to primitive value")}return d===void 0&&(d="number"),i(c,d)},by}var xy,tT;function ok(){if(tT)return xy;tT=1;var e=lZ(),t=ik();return xy=function(r){var n=e(r,"string");return t(n)?n:n+""},xy}var wy,rT;function dw(){if(rT)return wy;rT=1;var e=bt(),t=Nt(),r=e.document,n=t(r)&&t(r.createElement);return wy=function(i){return n?r.createElement(i):{}},wy}var _y,nT;function ak(){if(nT)return _y;nT=1;var e=$r(),t=at(),r=dw();return _y=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),_y}var iT;function sk(){if(iT)return Bm;iT=1;var e=$r(),t=Xt(),r=ek(),n=ow(),i=Co(),o=ok(),a=Cr(),u=ak(),c=Object.getOwnPropertyDescriptor;return Bm.f=e?c:function(f,h){if(f=i(f),h=o(h),u)try{return c(f,h)}catch{}if(a(f,h))return n(!t(r.f,f,h),f[h])},Bm}var Ey={},Sy,oT;function uk(){if(oT)return Sy;oT=1;var e=$r(),t=at();return Sy=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Sy}var Oy,aT;function Rr(){if(aT)return Oy;aT=1;var e=Nt(),t=String,r=TypeError;return Oy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Oy}var sT;function Sn(){if(sT)return Ey;sT=1;var e=$r(),t=ak(),r=uk(),n=Rr(),i=ok(),o=TypeError,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c="enumerable",d="configurable",f="writable";return Ey.f=e?r?function(p,v,m){if(n(p),v=i(v),n(m),typeof p=="function"&&v==="prototype"&&"value"in m&&f in m&&!m[f]){var y=u(p,v);y&&y[f]&&(p[v]=m.value,m={configurable:d in m?m[d]:y[d],enumerable:c in m?m[c]:y[c],writable:!1})}return a(p,v,m)}:a:function(p,v,m){if(n(p),v=i(v),n(m),t)try{return a(p,v,m)}catch{}if("get"in m||"set"in m)throw new o("Accessors not supported");return"value"in m&&(p[v]=m.value),p},Ey}var Cy,uT;function Ja(){if(uT)return Cy;uT=1;var e=$r(),t=Sn(),r=ow();return Cy=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},Cy}var Ry={exports:{}},Py,cT;function hw(){if(cT)return Py;cT=1;var e=$r(),t=Cr(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,i=t(r,"name"),o=i&&(function(){}).name==="something",a=i&&(!e||e&&n(r,"name").configurable);return Py={EXISTS:i,PROPER:o,CONFIGURABLE:a},Py}var Iy,lT;function ck(){if(lT)return Iy;lT=1;var e=it(),t=Et(),r=cw(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),Iy=r.inspectSource,Iy}var Ny,fT;function lk(){if(fT)return Ny;fT=1;var e=bt(),t=Et(),r=e.WeakMap;return Ny=t(r)&&/native code/.test(String(r)),Ny}var Ty,dT;function pw(){if(dT)return Ty;dT=1;var e=lw(),t=fw(),r=e("keys");return Ty=function(n){return r[n]||(r[n]=t(n))},Ty}var Ay,hT;function il(){return hT||(hT=1,Ay={}),Ay}var My,pT;function Po(){if(pT)return My;pT=1;var e=lk(),t=bt(),r=Nt(),n=Ja(),i=Cr(),o=cw(),a=pw(),u=il(),c="Object already initialized",d=t.TypeError,f=t.WeakMap,h,p,v,m=function(w){return v(w)?p(w):h(w,{})},y=function(w){return function(S){var E;if(!r(S)||(E=p(S)).type!==w)throw new d("Incompatible receiver, "+w+" required");return E}};if(e||o.state){var b=o.state||(o.state=new f);b.get=b.get,b.has=b.has,b.set=b.set,h=function(w,S){if(b.has(w))throw new d(c);return S.facade=w,b.set(w,S),S},p=function(w){return b.get(w)||{}},v=function(w){return b.has(w)}}else{var x=a("state");u[x]=!0,h=function(w,S){if(i(w,x))throw new d(c);return S.facade=w,n(w,x,S),S},p=function(w){return i(w,x)?w[x]:{}},v=function(w){return i(w,x)}}return My={set:h,get:p,has:v,enforce:m,getterFor:y},My}var vT;function fk(){if(vT)return Ry.exports;vT=1;var e=it(),t=at(),r=Et(),n=Cr(),i=$r(),o=hw().CONFIGURABLE,a=ck(),u=Po(),c=u.enforce,d=u.get,f=String,h=Object.defineProperty,p=e("".slice),v=e("".replace),m=e([].join),y=i&&!t(function(){return h(function(){},"length",{value:8}).length!==8}),b=String(String).split("String"),x=Ry.exports=function(w,S,E){p(f(S),0,7)==="Symbol("&&(S="["+v(f(S),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),E&&E.getter&&(S="get "+S),E&&E.setter&&(S="set "+S),(!n(w,"name")||o&&w.name!==S)&&(i?h(w,"name",{value:S,configurable:!0}):w.name=S),y&&E&&n(E,"arity")&&w.length!==E.arity&&h(w,"length",{value:E.arity});try{E&&n(E,"constructor")&&E.constructor?i&&h(w,"prototype",{writable:!1}):w.prototype&&(w.prototype=void 0)}catch{}var _=c(w);return n(_,"source")||(_.source=m(b,typeof S=="string"?S:"")),w};return Function.prototype.toString=x(function(){return r(this)&&d(this).source||a(this)},"toString"),Ry.exports}var Dy,gT;function Ci(){if(gT)return Dy;gT=1;var e=Et(),t=Sn(),r=fk(),n=uw();return Dy=function(i,o,a,u){u||(u={});var c=u.enumerable,d=u.name!==void 0?u.name:o;if(e(a)&&r(a,d,u),u.global)c?i[o]=a:n(o,a);else{try{u.unsafe?i[o]&&(c=!0):delete i[o]}catch{}c?i[o]=a:t.f(i,o,{value:a,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return i},Dy}var jy={},qy,mT;function fZ(){if(mT)return qy;mT=1;var e=Math.ceil,t=Math.floor;return qy=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},qy}var ky,yT;function ol(){if(yT)return ky;yT=1;var e=fZ();return ky=function(t){var r=+t;return r!==r||r===0?0:e(r)},ky}var Ly,bT;function dZ(){if(bT)return Ly;bT=1;var e=ol(),t=Math.max,r=Math.min;return Ly=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},Ly}var By,xT;function vw(){if(xT)return By;xT=1;var e=ol(),t=Math.min;return By=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},By}var Fy,wT;function al(){if(wT)return Fy;wT=1;var e=vw();return Fy=function(t){return e(t.length)},Fy}var $y,_T;function hZ(){if(_T)return $y;_T=1;var e=Co(),t=dZ(),r=al(),n=function(i){return function(o,a,u){var c=e(o),d=r(c);if(d===0)return!i&&-1;var f=t(u,d),h;if(i&&a!==a){for(;d>f;)if(h=c[f++],h!==h)return!0}else for(;d>f;f++)if((i||f in c)&&c[f]===a)return i||f||0;return!i&&-1}};return $y={includes:n(!0),indexOf:n(!1)},$y}var zy,ET;function dk(){if(ET)return zy;ET=1;var e=it(),t=Cr(),r=Co(),n=hZ().indexOf,i=il(),o=e([].push);return zy=function(a,u){var c=r(a),d=0,f=[],h;for(h in c)!t(i,h)&&t(c,h)&&o(f,h);for(;u.length>d;)t(c,h=u[d++])&&(~n(f,h)||o(f,h));return f},zy}var Hy,ST;function gw(){return ST||(ST=1,Hy=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Hy}var OT;function mw(){if(OT)return jy;OT=1;var e=dk(),t=gw(),r=t.concat("length","prototype");return jy.f=Object.getOwnPropertyNames||function(i){return e(i,r)},jy}var Uy={},CT;function hk(){return CT||(CT=1,Uy.f=Object.getOwnPropertySymbols),Uy}var Vy,RT;function pZ(){if(RT)return Vy;RT=1;var e=tl(),t=it(),r=mw(),n=hk(),i=Rr(),o=t([].concat);return Vy=e("Reflect","ownKeys")||function(u){var c=r.f(i(u)),d=n.f;return d?o(c,d(u)):c},Vy}var Wy,PT;function vZ(){if(PT)return Wy;PT=1;var e=Cr(),t=pZ(),r=sk(),n=Sn();return Wy=function(i,o,a){for(var u=t(o),c=n.f,d=r.f,f=0;f<u.length;f++){var h=u[f];!e(i,h)&&!(a&&e(a,h))&&c(i,h,d(o,h))}},Wy}var Gy,IT;function pk(){if(IT)return Gy;IT=1;var e=at(),t=Et(),r=/#|\.prototype\./,n=function(c,d){var f=o[i(c)];return f===u?!0:f===a?!1:t(d)?e(d):!!d},i=n.normalize=function(c){return String(c).replace(r,".").toLowerCase()},o=n.data={},a=n.NATIVE="N",u=n.POLYFILL="P";return Gy=n,Gy}var Ky,NT;function Gn(){if(NT)return Ky;NT=1;var e=bt(),t=sk().f,r=Ja(),n=Ci(),i=uw(),o=vZ(),a=pk();return Ky=function(u,c){var d=u.target,f=u.global,h=u.stat,p,v,m,y,b,x;if(f?v=e:h?v=e[d]||i(d,{}):v=e[d]&&e[d].prototype,v)for(m in c){if(b=c[m],u.dontCallGetSet?(x=t(v,m),y=x&&x.value):y=v[m],p=a(f?m:d+(h?".":"#")+m,u.forced),!p&&y!==void 0){if(typeof b==typeof y)continue;o(b,y)}(u.sham||y&&y.sham)&&r(b,"sham",!0),n(v,m,b,u)}},Ky}var Yy,TT;function yw(){if(TT)return Yy;TT=1;var e=Ft(),t=e("toStringTag"),r={};return r[t]="z",Yy=String(r)==="[object z]",Yy}var Xy,AT;function sl(){if(AT)return Xy;AT=1;var e=yw(),t=Et(),r=Wn(),n=Ft(),i=n("toStringTag"),o=Object,a=r((function(){return arguments})())==="Arguments",u=function(c,d){try{return c[d]}catch{}};return Xy=e?r:function(c){var d,f,h;return c===void 0?"Undefined":c===null?"Null":typeof(f=u(d=o(c),i))=="string"?f:a?r(d):(h=r(d))==="Object"&&t(d.callee)?"Arguments":h},Xy}var Zy,MT;function Ri(){if(MT)return Zy;MT=1;var e=sl(),t=String;return Zy=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},Zy}var Jy,DT;function vk(){return DT||(DT=1,Jy=`
67
+ \v\f\r                 \u2028\u2029\uFEFF`),Jy}var Qy,jT;function gZ(){if(jT)return Qy;jT=1;var e=it(),t=Oi(),r=Ri(),n=vk(),i=e("".replace),o=RegExp("^["+n+"]+"),a=RegExp("(^|[^"+n+"])["+n+"]+$"),u=function(c){return function(d){var f=r(t(d));return c&1&&(f=i(f,o,"")),c&2&&(f=i(f,a,"$1")),f}};return Qy={start:u(1),end:u(2),trim:u(3)},Qy}var e0,qT;function mZ(){if(qT)return e0;qT=1;var e=bt(),t=at(),r=it(),n=Ri(),i=gZ().trim,o=vk(),a=e.parseInt,u=e.Symbol,c=u&&u.iterator,d=/^[+-]?0x/i,f=r(d.exec),h=a(o+"08")!==8||a(o+"0x16")!==22||c&&!t(function(){a(Object(c))});return e0=h?function(v,m){var y=i(n(v));return a(y,m>>>0||(f(d,y)?16:10))}:a,e0}var kT;function yZ(){if(kT)return bN;kT=1;var e=Gn(),t=mZ();return e({global:!0,forced:parseInt!==t},{parseInt:t}),bN}yZ();var LT={},t0,BT;function gk(){if(BT)return t0;BT=1;var e=dk(),t=gw();return t0=Object.keys||function(n){return e(n,t)},t0}var r0,FT;function bZ(){if(FT)return r0;FT=1;var e=$r(),t=it(),r=Xt(),n=at(),i=gk(),o=hk(),a=ek(),u=Ro(),c=el(),d=Object.assign,f=Object.defineProperty,h=t([].concat);return r0=!d||n(function(){if(e&&d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var p={},v={},m=Symbol("assign detection"),y="abcdefghijklmnopqrst";return p[m]=7,y.split("").forEach(function(b){v[b]=b}),d({},p)[m]!==7||i(d({},v)).join("")!==y})?function(v,m){for(var y=u(v),b=arguments.length,x=1,w=o.f,S=a.f;b>x;)for(var E=c(arguments[x++]),_=w?h(i(E),w(E)):i(E),R=_.length,P=0,N;R>P;)N=_[P++],(!e||r(S,E,N))&&(y[N]=E[N]);return y}:d,r0}var $T;function xZ(){if($T)return LT;$T=1;var e=Gn(),t=bZ();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),LT}xZ();var zT={},n0,HT;function wZ(){if(HT)return n0;HT=1;var e=Wn(),t=it();return n0=function(r){if(e(r)==="Function")return t(r)},n0}var i0,UT;function mk(){if(UT)return i0;UT=1;var e=wZ(),t=Xa(),r=Qc(),n=e(e.bind);return i0=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},i0}var o0,VT;function _Z(){if(VT)return o0;VT=1;var e=Wn();return o0=Array.isArray||function(r){return e(r)==="Array"},o0}var a0,WT;function EZ(){if(WT)return a0;WT=1;var e=it(),t=at(),r=Et(),n=sl(),i=tl(),o=ck(),a=function(){},u=i("Reflect","construct"),c=/^\s*(?:class|function)\b/,d=e(c.exec),f=!c.test(a),h=function(m){if(!r(m))return!1;try{return u(a,[],m),!0}catch{return!1}},p=function(m){if(!r(m))return!1;switch(n(m)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!d(c,o(m))}catch{return!0}};return p.sham=!0,a0=!u||t(function(){var v;return h(h.call)||!h(Object)||!h(function(){v=!0})||v})?p:h,a0}var s0,GT;function SZ(){if(GT)return s0;GT=1;var e=_Z(),t=EZ(),r=Nt(),n=Ft(),i=n("species"),o=Array;return s0=function(a){var u;return e(a)&&(u=a.constructor,t(u)&&(u===o||e(u.prototype))?u=void 0:r(u)&&(u=u[i],u===null&&(u=void 0))),u===void 0?o:u},s0}var u0,KT;function OZ(){if(KT)return u0;KT=1;var e=SZ();return u0=function(t,r){return new(e(t))(r===0?0:r)},u0}var c0,YT;function yk(){if(YT)return c0;YT=1;var e=mk(),t=it(),r=el(),n=Ro(),i=al(),o=OZ(),a=t([].push),u=function(c){var d=c===1,f=c===2,h=c===3,p=c===4,v=c===6,m=c===7,y=c===5||v;return function(b,x,w,S){for(var E=n(b),_=r(E),R=i(_),P=e(x,w),N=0,j=S||o,L=d?j(b,R):f||m?j(b,0):void 0,F,k;R>N;N++)if((y||N in _)&&(F=_[N],k=P(F,N,E),c))if(d)L[N]=k;else if(k)switch(c){case 3:return!0;case 5:return F;case 6:return N;case 2:a(L,F)}else switch(c){case 4:return!1;case 7:a(L,F)}return v?-1:h||p?p:L}};return c0={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)},c0}var l0,XT;function CZ(){if(XT)return l0;XT=1;var e=at(),t=Ft(),r=aw(),n=t("species");return l0=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},l0}var ZT;function RZ(){if(ZT)return zT;ZT=1;var e=Gn(),t=yk().filter,r=CZ(),n=r("filter");return e({target:"Array",proto:!0,forced:!n},{filter:function(o){return t(this,o,arguments.length>1?arguments[1]:void 0)}}),zT}RZ();var JT={},f0,QT;function PZ(){if(QT)return f0;QT=1;var e=yw(),t=sl();return f0=e?{}.toString:function(){return"[object "+t(this)+"]"},f0}var eA;function IZ(){if(eA)return JT;eA=1;var e=yw(),t=Ci(),r=PZ();return e||t(Object.prototype,"toString",r,{unsafe:!0}),JT}IZ();var d0={},tA;function NZ(){if(tA)return d0;tA=1;var e=$r(),t=uk(),r=Sn(),n=Rr(),i=Co(),o=gk();return d0.f=e&&!t?Object.defineProperties:function(u,c){n(u);for(var d=i(c),f=o(c),h=f.length,p=0,v;h>p;)r.f(u,v=f[p++],d[v]);return u},d0}var h0,rA;function TZ(){if(rA)return h0;rA=1;var e=tl();return h0=e("document","documentElement"),h0}var p0,nA;function ul(){if(nA)return p0;nA=1;var e=Rr(),t=NZ(),r=gw(),n=il(),i=TZ(),o=dw(),a=pw(),u=">",c="<",d="prototype",f="script",h=a("IE_PROTO"),p=function(){},v=function(w){return c+f+u+w+c+"/"+f+u},m=function(w){w.write(v("")),w.close();var S=w.parentWindow.Object;return w=null,S},y=function(){var w=o("iframe"),S="java"+f+":",E;return w.style.display="none",i.appendChild(w),w.src=String(S),E=w.contentWindow.document,E.open(),E.write(v("document.F=Object")),E.close(),E.F},b,x=function(){try{b=new ActiveXObject("htmlfile")}catch{}x=typeof document<"u"?document.domain&&b?m(b):y():m(b);for(var w=r.length;w--;)delete x[d][r[w]];return x()};return n[h]=!0,p0=Object.create||function(S,E){var _;return S!==null?(p[d]=e(S),_=new p,p[d]=null,_[h]=S):_=x(),E===void 0?_:t.f(_,E)},p0}var v0,iA;function AZ(){if(iA)return v0;iA=1;var e=Ft(),t=ul(),r=Sn().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),v0=function(o){i[n][o]=!0},v0}var g0,oA;function Qa(){return oA||(oA=1,g0={}),g0}var m0,aA;function MZ(){if(aA)return m0;aA=1;var e=at();return m0=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),m0}var y0,sA;function bk(){if(sA)return y0;sA=1;var e=Cr(),t=Et(),r=Ro(),n=pw(),i=MZ(),o=n("IE_PROTO"),a=Object,u=a.prototype;return y0=i?a.getPrototypeOf:function(c){var d=r(c);if(e(d,o))return d[o];var f=d.constructor;return t(f)&&d instanceof f?f.prototype:d instanceof a?u:null},y0}var b0,uA;function xk(){if(uA)return b0;uA=1;var e=at(),t=Et(),r=Nt(),n=ul(),i=bk(),o=Ci(),a=Ft(),u=nl(),c=a("iterator"),d=!1,f,h,p;[].keys&&(p=[].keys(),"next"in p?(h=i(i(p)),h!==Object.prototype&&(f=h)):d=!0);var v=!r(f)||e(function(){var m={};return f[c].call(m)!==m});return v?f={}:u&&(f=n(f)),t(f[c])||o(f,c,function(){return this}),b0={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:d},b0}var x0,cA;function cl(){if(cA)return x0;cA=1;var e=Sn().f,t=Cr(),r=Ft(),n=r("toStringTag");return x0=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},x0}var w0,lA;function DZ(){if(lA)return w0;lA=1;var e=xk().IteratorPrototype,t=ul(),r=ow(),n=cl(),i=Qa(),o=function(){return this};return w0=function(a,u,c,d){var f=u+" Iterator";return a.prototype=t(e,{next:r(+!d,c)}),n(a,f,!1,!0),i[f]=o,a},w0}var _0,fA;function jZ(){if(fA)return _0;fA=1;var e=it(),t=Xa();return _0=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},_0}var E0,dA;function qZ(){if(dA)return E0;dA=1;var e=Nt();return E0=function(t){return e(t)||t===null},E0}var S0,hA;function kZ(){if(hA)return S0;hA=1;var e=qZ(),t=String,r=TypeError;return S0=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},S0}var O0,pA;function wk(){if(pA)return O0;pA=1;var e=jZ(),t=Nt(),r=Oi(),n=kZ();return O0=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,o={},a;try{a=e(Object.prototype,"__proto__","set"),a(o,[]),i=o instanceof Array}catch{}return function(c,d){return r(c),n(d),t(c)&&(i?a(c,d):c.__proto__=d),c}})():void 0),O0}var C0,vA;function _k(){if(vA)return C0;vA=1;var e=Gn(),t=Xt(),r=nl(),n=hw(),i=Et(),o=DZ(),a=bk(),u=wk(),c=cl(),d=Ja(),f=Ci(),h=Ft(),p=Qa(),v=xk(),m=n.PROPER,y=n.CONFIGURABLE,b=v.IteratorPrototype,x=v.BUGGY_SAFARI_ITERATORS,w=h("iterator"),S="keys",E="values",_="entries",R=function(){return this};return C0=function(P,N,j,L,F,k,D){o(j,N,L);var T=function(z){if(z===F&&ee)return ee;if(!x&&z&&z in W)return W[z];switch(z){case S:return function(){return new j(this,z)};case E:return function(){return new j(this,z)};case _:return function(){return new j(this,z)}}return function(){return new j(this)}},B=N+" Iterator",$=!1,W=P.prototype,Y=W[w]||W["@@iterator"]||F&&W[F],ee=!x&&Y||T(F),H=N==="Array"&&W.entries||Y,Q,ce,se;if(H&&(Q=a(H.call(new P)),Q!==Object.prototype&&Q.next&&(!r&&a(Q)!==b&&(u?u(Q,b):i(Q[w])||f(Q,w,R)),c(Q,B,!0,!0),r&&(p[B]=R))),m&&F===E&&Y&&Y.name!==E&&(!r&&y?d(W,"name",E):($=!0,ee=function(){return t(Y,this)})),F)if(ce={values:T(E),keys:k?ee:T(S),entries:T(_)},D)for(se in ce)(x||$||!(se in W))&&f(W,se,ce[se]);else e({target:N,proto:!0,forced:x||$},ce);return(!r||D)&&W[w]!==ee&&f(W,w,ee,{name:F}),p[N]=ee,ce},C0}var R0,gA;function Ek(){return gA||(gA=1,R0=function(e,t){return{value:e,done:t}}),R0}var P0,mA;function Sk(){if(mA)return P0;mA=1;var e=Co(),t=AZ(),r=Qa(),n=Po(),i=Sn().f,o=_k(),a=Ek(),u=nl(),c=$r(),d="Array Iterator",f=n.set,h=n.getterFor(d);P0=o(Array,"Array",function(v,m){f(this,{type:d,target:e(v),index:0,kind:m})},function(){var v=h(this),m=v.target,y=v.index++;if(!m||y>=m.length)return v.target=null,a(void 0,!0);switch(v.kind){case"keys":return a(y,!1);case"values":return a(m[y],!1)}return a([y,m[y]],!1)},"values");var p=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!u&&c&&p.name!=="values")try{i(p,"name",{value:"values"})}catch{}return P0}Sk();var yA={},I0,bA;function Ok(){if(bA)return I0;bA=1;var e=it(),t=ol(),r=Ri(),n=Oi(),i=e("".charAt),o=e("".charCodeAt),a=e("".slice),u=function(c){return function(d,f){var h=r(n(d)),p=t(f),v=h.length,m,y;return p<0||p>=v?c?"":void 0:(m=o(h,p),m<55296||m>56319||p+1===v||(y=o(h,p+1))<56320||y>57343?c?i(h,p):m:c?a(h,p,p+2):(m-55296<<10)+(y-56320)+65536)}};return I0={codeAt:u(!1),charAt:u(!0)},I0}var xA;function LZ(){if(xA)return yA;xA=1;var e=Ok().charAt,t=Ri(),r=Po(),n=_k(),i=Ek(),o="String Iterator",a=r.set,u=r.getterFor(o);return n(String,"String",function(c){a(this,{type:o,string:t(c),index:0})},function(){var d=u(this),f=d.string,h=d.index,p;return h>=f.length?i(void 0,!0):(p=e(f,h),d.index+=p.length,i(p,!1))}),yA}LZ();var wA={},_A={},N0,EA;function Ck(){if(EA)return N0;EA=1;var e=at();return N0=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),N0}var T0,SA;function Rk(){if(SA)return T0;SA=1;var e=Ci();return T0=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},T0}var A0={exports:{}},M0={},D0,OA;function BZ(){if(OA)return D0;OA=1;var e=it();return D0=e([].slice),D0}var CA;function FZ(){if(CA)return M0;CA=1;var e=Wn(),t=Co(),r=mw().f,n=BZ(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return M0.f=function(u){return i&&e(u)==="Window"?o(u):r(t(u))},M0}var j0,RA;function $Z(){if(RA)return j0;RA=1;var e=at();return j0=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),j0}var q0,PA;function zZ(){if(PA)return q0;PA=1;var e=at(),t=Nt(),r=Wn(),n=$Z(),i=Object.isExtensible,o=e(function(){});return q0=o||n?function(u){return!t(u)||n&&r(u)==="ArrayBuffer"?!1:i?i(u):!0}:i,q0}var IA;function bw(){if(IA)return A0.exports;IA=1;var e=Gn(),t=it(),r=il(),n=Nt(),i=Cr(),o=Sn().f,a=mw(),u=FZ(),c=zZ(),d=fw(),f=Ck(),h=!1,p=d("meta"),v=0,m=function(E){o(E,p,{value:{objectID:"O"+v++,weakData:{}}})},y=function(E,_){if(!n(E))return typeof E=="symbol"?E:(typeof E=="string"?"S":"P")+E;if(!i(E,p)){if(!c(E))return"F";if(!_)return"E";m(E)}return E[p].objectID},b=function(E,_){if(!i(E,p)){if(!c(E))return!0;if(!_)return!1;m(E)}return E[p].weakData},x=function(E){return f&&h&&c(E)&&!i(E,p)&&m(E),E},w=function(){S.enable=function(){},h=!0;var E=a.f,_=t([].splice),R={};R[p]=1,E(R).length&&(a.f=function(P){for(var N=E(P),j=0,L=N.length;j<L;j++)if(N[j]===p){_(N,j,1);break}return N},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},S=A0.exports={enable:w,fastKey:y,getWeakData:b,onFreeze:x};return r[p]=!0,A0.exports}var k0,NA;function HZ(){if(NA)return k0;NA=1;var e=Ft(),t=Qa(),r=e("iterator"),n=Array.prototype;return k0=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},k0}var L0,TA;function Pk(){if(TA)return L0;TA=1;var e=sl(),t=Za(),r=Ya(),n=Qa(),i=Ft(),o=i("iterator");return L0=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},L0}var B0,AA;function UZ(){if(AA)return B0;AA=1;var e=Xt(),t=Xa(),r=Rr(),n=sw(),i=Pk(),o=TypeError;return B0=function(a,u){var c=arguments.length<2?i(a):u;if(t(c))return r(e(c,a));throw new o(n(a)+" is not iterable")},B0}var F0,MA;function VZ(){if(MA)return F0;MA=1;var e=Xt(),t=Rr(),r=Za();return F0=function(n,i,o){var a,u;t(n);try{if(a=r(n,"return"),!a){if(i==="throw")throw o;return o}a=e(a,n)}catch(c){u=!0,a=c}if(i==="throw")throw o;if(u)throw a;return t(a),o},F0}var $0,DA;function Ik(){if(DA)return $0;DA=1;var e=mk(),t=Xt(),r=Rr(),n=sw(),i=HZ(),o=al(),a=rl(),u=UZ(),c=Pk(),d=VZ(),f=TypeError,h=function(v,m){this.stopped=v,this.result=m},p=h.prototype;return $0=function(v,m,y){var b=y&&y.that,x=!!(y&&y.AS_ENTRIES),w=!!(y&&y.IS_RECORD),S=!!(y&&y.IS_ITERATOR),E=!!(y&&y.INTERRUPTED),_=e(m,b),R,P,N,j,L,F,k,D=function(B){return R&&d(R,"normal"),new h(!0,B)},T=function(B){return x?(r(B),E?_(B[0],B[1],D):_(B[0],B[1])):E?_(B,D):_(B)};if(w)R=v.iterator;else if(S)R=v;else{if(P=c(v),!P)throw new f(n(v)+" is not iterable");if(i(P)){for(N=0,j=o(v);j>N;N++)if(L=T(v[N]),L&&a(p,L))return L;return new h(!1)}R=u(v,P)}for(F=w?v.next:R.next;!(k=t(F,R)).done;){try{L=T(k.value)}catch(B){d(R,"throw",B)}if(typeof L=="object"&&L&&a(p,L))return L}return new h(!1)},$0}var z0,jA;function Nk(){if(jA)return z0;jA=1;var e=rl(),t=TypeError;return z0=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},z0}var H0,qA;function WZ(){if(qA)return H0;qA=1;var e=Ft(),t=e("iterator"),r=!1;try{var n=0,i={next:function(){return{done:!!n++}},return:function(){r=!0}};i[t]=function(){return this},Array.from(i,function(){throw 2})}catch{}return H0=function(o,a){try{if(!a&&!r)return!1}catch{return!1}var u=!1;try{var c={};c[t]=function(){return{next:function(){return{done:u=!0}}}},o(c)}catch{}return u},H0}var U0,kA;function GZ(){if(kA)return U0;kA=1;var e=Et(),t=Nt(),r=wk();return U0=function(n,i,o){var a,u;return r&&e(a=i.constructor)&&a!==o&&t(u=a.prototype)&&u!==o.prototype&&r(n,u),n},U0}var V0,LA;function KZ(){if(LA)return V0;LA=1;var e=Gn(),t=bt(),r=it(),n=pk(),i=Ci(),o=bw(),a=Ik(),u=Nk(),c=Et(),d=Ya(),f=Nt(),h=at(),p=WZ(),v=cl(),m=GZ();return V0=function(y,b,x){var w=y.indexOf("Map")!==-1,S=y.indexOf("Weak")!==-1,E=w?"set":"add",_=t[y],R=_&&_.prototype,P=_,N={},j=function($){var W=r(R[$]);i(R,$,$==="add"?function(ee){return W(this,ee===0?0:ee),this}:$==="delete"?function(Y){return S&&!f(Y)?!1:W(this,Y===0?0:Y)}:$==="get"?function(ee){return S&&!f(ee)?void 0:W(this,ee===0?0:ee)}:$==="has"?function(ee){return S&&!f(ee)?!1:W(this,ee===0?0:ee)}:function(ee,H){return W(this,ee===0?0:ee,H),this})},L=n(y,!c(_)||!(S||R.forEach&&!h(function(){new _().entries().next()})));if(L)P=x.getConstructor(b,y,w,E),o.enable();else if(n(y,!0)){var F=new P,k=F[E](S?{}:-0,1)!==F,D=h(function(){F.has(1)}),T=p(function($){new _($)}),B=!S&&h(function(){for(var $=new _,W=5;W--;)$[E](W,W);return!$.has(-0)});T||(P=b(function($,W){u($,R);var Y=m(new _,$,P);return d(W)||a(W,Y[E],{that:Y,AS_ENTRIES:w}),Y}),P.prototype=R,R.constructor=P),(D||B)&&(j("delete"),j("has"),w&&j("get")),(B||k)&&j(E),S&&R.clear&&delete R.clear}return N[y]=P,e({global:!0,constructor:!0,forced:P!==_},N),v(P,y),S||x.setStrong(P,y,w),P},V0}var W0,BA;function YZ(){if(BA)return W0;BA=1;var e=it(),t=Rk(),r=bw().getWeakData,n=Nk(),i=Rr(),o=Ya(),a=Nt(),u=Ik(),c=yk(),d=Cr(),f=Po(),h=f.set,p=f.getterFor,v=c.find,m=c.findIndex,y=e([].splice),b=0,x=function(E){return E.frozen||(E.frozen=new w)},w=function(){this.entries=[]},S=function(E,_){return v(E.entries,function(R){return R[0]===_})};return w.prototype={get:function(E){var _=S(this,E);if(_)return _[1]},has:function(E){return!!S(this,E)},set:function(E,_){var R=S(this,E);R?R[1]=_:this.entries.push([E,_])},delete:function(E){var _=m(this.entries,function(R){return R[0]===E});return~_&&y(this.entries,_,1),!!~_}},W0={getConstructor:function(E,_,R,P){var N=E(function(k,D){n(k,j),h(k,{type:_,id:b++,frozen:null}),o(D)||u(D,k[P],{that:k,AS_ENTRIES:R})}),j=N.prototype,L=p(_),F=function(k,D,T){var B=L(k),$=r(i(D),!0);return $===!0?x(B).set(D,T):$[B.id]=T,k};return t(j,{delete:function(k){var D=L(this);if(!a(k))return!1;var T=r(k);return T===!0?x(D).delete(k):T&&d(T,D.id)&&delete T[D.id]},has:function(D){var T=L(this);if(!a(D))return!1;var B=r(D);return B===!0?x(T).has(D):B&&d(B,T.id)}}),t(j,R?{get:function(D){var T=L(this);if(a(D)){var B=r(D);if(B===!0)return x(T).get(D);if(B)return B[T.id]}},set:function(D,T){return F(this,D,T)}}:{add:function(D){return F(this,D,!0)}}),N}},W0}var FA;function XZ(){if(FA)return _A;FA=1;var e=Ck(),t=bt(),r=it(),n=Rk(),i=bw(),o=KZ(),a=YZ(),u=Nt(),c=Po().enforce,d=at(),f=lk(),h=Object,p=Array.isArray,v=h.isExtensible,m=h.isFrozen,y=h.isSealed,b=h.freeze,x=h.seal,w=!t.ActiveXObject&&"ActiveXObject"in t,S,E=function(k){return function(){return k(this,arguments.length?arguments[0]:void 0)}},_=o("WeakMap",E,a),R=_.prototype,P=r(R.set),N=function(){return e&&d(function(){var k=b([]);return P(new _,k,1),!m(k)})};if(f)if(w){S=a.getConstructor(E,"WeakMap",!0),i.enable();var j=r(R.delete),L=r(R.has),F=r(R.get);n(R,{delete:function(k){if(u(k)&&!v(k)){var D=c(this);return D.frozen||(D.frozen=new S),j(this,k)||D.frozen.delete(k)}return j(this,k)},has:function(D){if(u(D)&&!v(D)){var T=c(this);return T.frozen||(T.frozen=new S),L(this,D)||T.frozen.has(D)}return L(this,D)},get:function(D){if(u(D)&&!v(D)){var T=c(this);return T.frozen||(T.frozen=new S),L(this,D)?F(this,D):T.frozen.get(D)}return F(this,D)},set:function(D,T){if(u(D)&&!v(D)){var B=c(this);B.frozen||(B.frozen=new S),L(this,D)?P(this,D,T):B.frozen.set(D,T)}else P(this,D,T);return this}})}else N()&&n(R,{set:function(D,T){var B;return p(D)&&(m(D)?B=b:y(D)&&(B=x)),P(this,D,T),B&&B(D),this}});return _A}var $A;function ZZ(){return $A||($A=1,XZ()),wA}ZZ();var zA={},G0,HA;function JZ(){return HA||(HA=1,G0={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),G0}var K0,UA;function QZ(){if(UA)return K0;UA=1;var e=dw(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return K0=r===Object.prototype?void 0:r,K0}var VA;function eJ(){if(VA)return zA;VA=1;var e=bt(),t=JZ(),r=QZ(),n=Sk(),i=Ja(),o=cl(),a=Ft(),u=a("iterator"),c=n.values,d=function(h,p){if(h){if(h[u]!==c)try{i(h,u,c)}catch{h[u]=c}if(o(h,p,!0),t[p]){for(var v in n)if(h[v]!==n[v])try{i(h,v,n[v])}catch{h[v]=n[v]}}}};for(var f in t)d(e[f]&&e[f].prototype,f);return d(r,"DOMTokenList"),zA}eJ();var Y0,WA;function tJ(){if(WA)return Y0;WA=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,c=typeof ht=="object"&&ht&&ht.Object===Object&&ht,d=typeof self=="object"&&self&&self.Object===Object&&self,f=c||d||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,m=Math.min,y=function(){return f.Date.now()};function b(R,P,N){var j,L,F,k,D,T,B=0,$=!1,W=!1,Y=!0;if(typeof R!="function")throw new TypeError(e);P=_(P)||0,w(N)&&($=!!N.leading,W="maxWait"in N,F=W?v(_(N.maxWait)||0,P):F,Y="trailing"in N?!!N.trailing:Y);function ee(K){var ie=j,ne=L;return j=L=void 0,B=K,k=R.apply(ne,ie),k}function H(K){return B=K,D=setTimeout(se,P),$?ee(K):k}function Q(K){var ie=K-T,ne=K-B,ue=P-ie;return W?m(ue,F-ne):ue}function ce(K){var ie=K-T,ne=K-B;return T===void 0||ie>=P||ie<0||W&&ne>=F}function se(){var K=y();if(ce(K))return z(K);D=setTimeout(se,Q(K))}function z(K){return D=void 0,Y&&j?ee(K):(j=L=void 0,k)}function G(){D!==void 0&&clearTimeout(D),B=0,j=T=L=D=void 0}function J(){return D===void 0?k:z(y())}function V(){var K=y(),ie=ce(K);if(j=arguments,L=this,T=K,ie){if(D===void 0)return H(T);if(W)return D=setTimeout(se,P),ee(T)}return D===void 0&&(D=setTimeout(se,P)),k}return V.cancel=G,V.flush=J,V}function x(R,P,N){var j=!0,L=!0;if(typeof R!="function")throw new TypeError(e);return w(N)&&(j="leading"in N?!!N.leading:j,L="trailing"in N?!!N.trailing:L),b(R,P,{leading:j,maxWait:P,trailing:L})}function w(R){var P=typeof R;return!!R&&(P=="object"||P=="function")}function S(R){return!!R&&typeof R=="object"}function E(R){return typeof R=="symbol"||S(R)&&p.call(R)==r}function _(R){if(typeof R=="number")return R;if(E(R))return t;if(w(R)){var P=typeof R.valueOf=="function"?R.valueOf():R;R=w(P)?P+"":P}if(typeof R!="string")return R===0?R:+R;R=R.replace(n,"");var N=o.test(R);return N||a.test(R)?u(R.slice(2),N?2:8):i.test(R)?t:+R}return Y0=x,Y0}var rJ=tJ();const GA=Hn(rJ);var X0,KA;function nJ(){if(KA)return X0;KA=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,c=typeof ht=="object"&&ht&&ht.Object===Object&&ht,d=typeof self=="object"&&self&&self.Object===Object&&self,f=c||d||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,m=Math.min,y=function(){return f.Date.now()};function b(_,R,P){var N,j,L,F,k,D,T=0,B=!1,$=!1,W=!0;if(typeof _!="function")throw new TypeError(e);R=E(R)||0,x(P)&&(B=!!P.leading,$="maxWait"in P,L=$?v(E(P.maxWait)||0,R):L,W="trailing"in P?!!P.trailing:W);function Y(V){var K=N,ie=j;return N=j=void 0,T=V,F=_.apply(ie,K),F}function ee(V){return T=V,k=setTimeout(ce,R),B?Y(V):F}function H(V){var K=V-D,ie=V-T,ne=R-K;return $?m(ne,L-ie):ne}function Q(V){var K=V-D,ie=V-T;return D===void 0||K>=R||K<0||$&&ie>=L}function ce(){var V=y();if(Q(V))return se(V);k=setTimeout(ce,H(V))}function se(V){return k=void 0,W&&N?Y(V):(N=j=void 0,F)}function z(){k!==void 0&&clearTimeout(k),T=0,N=D=j=k=void 0}function G(){return k===void 0?F:se(y())}function J(){var V=y(),K=Q(V);if(N=arguments,j=this,D=V,K){if(k===void 0)return ee(D);if($)return k=setTimeout(ce,R),Y(D)}return k===void 0&&(k=setTimeout(ce,R)),F}return J.cancel=z,J.flush=G,J}function x(_){var R=typeof _;return!!_&&(R=="object"||R=="function")}function w(_){return!!_&&typeof _=="object"}function S(_){return typeof _=="symbol"||w(_)&&p.call(_)==r}function E(_){if(typeof _=="number")return _;if(S(_))return t;if(x(_)){var R=typeof _.valueOf=="function"?_.valueOf():_;_=x(R)?R+"":R}if(typeof _!="string")return _===0?_:+_;_=_.replace(n,"");var P=o.test(_);return P||a.test(_)?u(_.slice(2),P?2:8):i.test(_)?t:+_}return X0=b,X0}var iJ=nJ();const YA=Hn(iJ);var Z0,XA;function oJ(){if(XA)return Z0;XA=1;var e="Expected a function",t="__lodash_hash_undefined__",r="[object Function]",n="[object GeneratorFunction]",i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=typeof ht=="object"&&ht&&ht.Object===Object&&ht,u=typeof self=="object"&&self&&self.Object===Object&&self,c=a||u||Function("return this")();function d(he,ae){return he==null?void 0:he[ae]}function f(he){var ae=!1;if(he!=null&&typeof he.toString!="function")try{ae=!!(he+"")}catch{}return ae}var h=Array.prototype,p=Function.prototype,v=Object.prototype,m=c["__core-js_shared__"],y=(function(){var he=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||"");return he?"Symbol(src)_1."+he:""})(),b=p.toString,x=v.hasOwnProperty,w=v.toString,S=RegExp("^"+b.call(x).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=h.splice,_=K(c,"Map"),R=K(Object,"create");function P(he){var ae=-1,Oe=he?he.length:0;for(this.clear();++ae<Oe;){var Ne=he[ae];this.set(Ne[0],Ne[1])}}function N(){this.__data__=R?R(null):{}}function j(he){return this.has(he)&&delete this.__data__[he]}function L(he){var ae=this.__data__;if(R){var Oe=ae[he];return Oe===t?void 0:Oe}return x.call(ae,he)?ae[he]:void 0}function F(he){var ae=this.__data__;return R?ae[he]!==void 0:x.call(ae,he)}function k(he,ae){var Oe=this.__data__;return Oe[he]=R&&ae===void 0?t:ae,this}P.prototype.clear=N,P.prototype.delete=j,P.prototype.get=L,P.prototype.has=F,P.prototype.set=k;function D(he){var ae=-1,Oe=he?he.length:0;for(this.clear();++ae<Oe;){var Ne=he[ae];this.set(Ne[0],Ne[1])}}function T(){this.__data__=[]}function B(he){var ae=this.__data__,Oe=G(ae,he);if(Oe<0)return!1;var Ne=ae.length-1;return Oe==Ne?ae.pop():E.call(ae,Oe,1),!0}function $(he){var ae=this.__data__,Oe=G(ae,he);return Oe<0?void 0:ae[Oe][1]}function W(he){return G(this.__data__,he)>-1}function Y(he,ae){var Oe=this.__data__,Ne=G(Oe,he);return Ne<0?Oe.push([he,ae]):Oe[Ne][1]=ae,this}D.prototype.clear=T,D.prototype.delete=B,D.prototype.get=$,D.prototype.has=W,D.prototype.set=Y;function ee(he){var ae=-1,Oe=he?he.length:0;for(this.clear();++ae<Oe;){var Ne=he[ae];this.set(Ne[0],Ne[1])}}function H(){this.__data__={hash:new P,map:new(_||D),string:new P}}function Q(he){return V(this,he).delete(he)}function ce(he){return V(this,he).get(he)}function se(he){return V(this,he).has(he)}function z(he,ae){return V(this,he).set(he,ae),this}ee.prototype.clear=H,ee.prototype.delete=Q,ee.prototype.get=ce,ee.prototype.has=se,ee.prototype.set=z;function G(he,ae){for(var Oe=he.length;Oe--;)if(we(he[Oe][0],ae))return Oe;return-1}function J(he){if(!_e(he)||ne(he))return!1;var ae=Se(he)||f(he)?S:o;return ae.test(ue(he))}function V(he,ae){var Oe=he.__data__;return ie(ae)?Oe[typeof ae=="string"?"string":"hash"]:Oe.map}function K(he,ae){var Oe=d(he,ae);return J(Oe)?Oe:void 0}function ie(he){var ae=typeof he;return ae=="string"||ae=="number"||ae=="symbol"||ae=="boolean"?he!=="__proto__":he===null}function ne(he){return!!y&&y in he}function ue(he){if(he!=null){try{return b.call(he)}catch{}try{return he+""}catch{}}return""}function de(he,ae){if(typeof he!="function"||ae&&typeof ae!="function")throw new TypeError(e);var Oe=function(){var Ne=arguments,He=ae?ae.apply(this,Ne):Ne[0],qe=Oe.cache;if(qe.has(He))return qe.get(He);var Xe=he.apply(this,Ne);return Oe.cache=qe.set(He,Xe),Xe};return Oe.cache=new(de.Cache||ee),Oe}de.Cache=ee;function we(he,ae){return he===ae||he!==he&&ae!==ae}function Se(he){var ae=_e(he)?w.call(he):"";return ae==r||ae==n}function _e(he){var ae=typeof he;return!!he&&(ae=="object"||ae=="function")}return Z0=de,Z0}var aJ=oJ();const sJ=Hn(aJ);var di=[],uJ=function(){return di.some(function(e){return e.activeTargets.length>0})},cJ=function(){return di.some(function(e){return e.skippedTargets.length>0})},ZA="ResizeObserver loop completed with undelivered notifications.",lJ=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:ZA}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=ZA),window.dispatchEvent(e)},La;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(La||(La={}));var hi=function(e){return Object.freeze(e)},fJ=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,hi(this)}return e})(),Tk=(function(){function e(t,r,n,i){return this.x=t,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,hi(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,i=t.top,o=t.right,a=t.bottom,u=t.left,c=t.width,d=t.height;return{x:r,y:n,top:i,right:o,bottom:a,left:u,width:c,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),xw=function(e){return e instanceof SVGElement&&"getBBox"in e},Ak=function(e){if(xw(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},JA=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},dJ=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Pa=typeof window<"u"?window:{},Ru=new WeakMap,QA=/auto|scroll/,hJ=/^tb|vertical/,pJ=/msie|trident/i.test(Pa.navigator&&Pa.navigator.userAgent),Kr=function(e){return parseFloat(e||"0")},so=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new fJ((r?t:e)||0,(r?e:t)||0)},eM=hi({devicePixelContentBoxSize:so(),borderBoxSize:so(),contentBoxSize:so(),contentRect:new Tk(0,0,0,0)}),Mk=function(e,t){if(t===void 0&&(t=!1),Ru.has(e)&&!t)return Ru.get(e);if(Ak(e))return Ru.set(e,eM),eM;var r=getComputedStyle(e),n=xw(e)&&e.ownerSVGElement&&e.getBBox(),i=!pJ&&r.boxSizing==="border-box",o=hJ.test(r.writingMode||""),a=!n&&QA.test(r.overflowY||""),u=!n&&QA.test(r.overflowX||""),c=n?0:Kr(r.paddingTop),d=n?0:Kr(r.paddingRight),f=n?0:Kr(r.paddingBottom),h=n?0:Kr(r.paddingLeft),p=n?0:Kr(r.borderTopWidth),v=n?0:Kr(r.borderRightWidth),m=n?0:Kr(r.borderBottomWidth),y=n?0:Kr(r.borderLeftWidth),b=h+d,x=c+f,w=y+v,S=p+m,E=u?e.offsetHeight-S-e.clientHeight:0,_=a?e.offsetWidth-w-e.clientWidth:0,R=i?b+w:0,P=i?x+S:0,N=n?n.width:Kr(r.width)-R-_,j=n?n.height:Kr(r.height)-P-E,L=N+b+_+w,F=j+x+E+S,k=hi({devicePixelContentBoxSize:so(Math.round(N*devicePixelRatio),Math.round(j*devicePixelRatio),o),borderBoxSize:so(L,F,o),contentBoxSize:so(N,j,o),contentRect:new Tk(h,c,N,j)});return Ru.set(e,k),k},Dk=function(e,t,r){var n=Mk(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case La.DEVICE_PIXEL_CONTENT_BOX:return a;case La.BORDER_BOX:return i;default:return o}},vJ=(function(){function e(t){var r=Mk(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=hi([r.borderBoxSize]),this.contentBoxSize=hi([r.contentBoxSize]),this.devicePixelContentBoxSize=hi([r.devicePixelContentBoxSize])}return e})(),jk=function(e){if(Ak(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},gJ=function(){var e=1/0,t=[];di.forEach(function(a){if(a.activeTargets.length!==0){var u=[];a.activeTargets.forEach(function(d){var f=new vJ(d.target),h=jk(d.target);u.push(f),d.lastReportedSize=Dk(d.target,d.observedBox),h<e&&(e=h)}),t.push(function(){a.callback.call(a.observer,u,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var i=n[r];i()}return e},tM=function(e){di.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(jk(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},mJ=function(){var e=0;for(tM(e);uJ();)e=gJ(),tM(e);return cJ()&&lJ(),e>0},J0,qk=[],yJ=function(){return qk.splice(0).forEach(function(e){return e()})},bJ=function(e){if(!J0){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return yJ()}).observe(r,n),J0=function(){r.textContent="".concat(t?t--:t++)}}qk.push(e),J0()},xJ=function(e){bJ(function(){requestAnimationFrame(e)})},Fu=0,wJ=function(){return!!Fu},_J=250,EJ={attributes:!0,characterData:!0,childList:!0,subtree:!0},rM=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],nM=function(e){return e===void 0&&(e=0),Date.now()+e},Q0=!1,SJ=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=_J),!Q0){Q0=!0;var n=nM(t);xJ(function(){var i=!1;try{i=mJ()}finally{if(Q0=!1,t=n-nM(),!wJ())return;i?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,EJ)};document.body?r():Pa.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),rM.forEach(function(r){return Pa.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),rM.forEach(function(r){return Pa.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),Wb=new SJ,iM=function(e){!Fu&&e>0&&Wb.start(),Fu+=e,!Fu&&Wb.stop()},OJ=function(e){return!xw(e)&&!dJ(e)&&getComputedStyle(e).display==="inline"},CJ=(function(){function e(t,r){this.target=t,this.observedBox=r||La.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Dk(this.target,this.observedBox,!0);return OJ(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),RJ=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Pu=new WeakMap,oM=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Iu=(function(){function e(){}return e.connect=function(t,r){var n=new RJ(t,r);Pu.set(t,n)},e.observe=function(t,r,n){var i=Pu.get(t),o=i.observationTargets.length===0;oM(i.observationTargets,r)<0&&(o&&di.push(i),i.observationTargets.push(new CJ(r,n&&n.box)),iM(1),Wb.schedule())},e.unobserve=function(t,r){var n=Pu.get(t),i=oM(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&di.splice(di.indexOf(n),1),n.observationTargets.splice(i,1),iM(-1))},e.disconnect=function(t){var r=this,n=Pu.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),PJ=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Iu.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!JA(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Iu.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!JA(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Iu.unobserve(this,t)},e.prototype.disconnect=function(){Iu.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),eb,aM;function IJ(){if(aM)return eb;aM=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return eb=e,eb}var NJ=IJ();const kk=Hn(NJ);var sM={},tb,uM;function TJ(){if(uM)return tb;uM=1;var e=Xa(),t=Ro(),r=el(),n=al(),i=TypeError,o="Reduce of empty array with no initial value",a=function(u){return function(c,d,f,h){var p=t(c),v=r(p),m=n(p);if(e(d),m===0&&f<2)throw new i(o);var y=u?m-1:0,b=u?-1:1;if(f<2)for(;;){if(y in v){h=v[y],y+=b;break}if(y+=b,u?y<0:m<=y)throw new i(o)}for(;u?y>=0:m>y;y+=b)y in v&&(h=d(h,v[y],y,p));return h}};return tb={left:a(!1),right:a(!0)},tb}var rb,cM;function AJ(){if(cM)return rb;cM=1;var e=at();return rb=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},rb}var nb,lM;function MJ(){if(lM)return nb;lM=1;var e=bt(),t=tk(),r=Wn(),n=function(i){return t.slice(0,i.length)===i};return nb=(function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&typeof Bun.version=="string"?"BUN":e.Deno&&typeof Deno.version=="object"?"DENO":r(e.process)==="process"?"NODE":e.window&&e.document?"BROWSER":"REST"})(),nb}var ib,fM;function DJ(){if(fM)return ib;fM=1;var e=MJ();return ib=e==="NODE",ib}var dM;function jJ(){if(dM)return sM;dM=1;var e=Gn(),t=TJ().left,r=AJ(),n=aw(),i=DJ(),o=!i&&n>79&&n<83,a=o||!r("reduce");return e({target:"Array",proto:!0,forced:a},{reduce:function(c){var d=arguments.length;return t(this,c,d,d>1?arguments[1]:void 0)}}),sM}jJ();var hM={},ob,pM;function Lk(){if(pM)return ob;pM=1;var e=Rr();return ob=function(){var t=e(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},ob}var ab,vM;function qJ(){if(vM)return ab;vM=1;var e=at(),t=bt(),r=t.RegExp,n=e(function(){var a=r("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),i=n||e(function(){return!r("a","y").sticky}),o=n||e(function(){var a=r("^r","gy");return a.lastIndex=2,a.exec("str")!==null});return ab={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},ab}var sb,gM;function kJ(){if(gM)return sb;gM=1;var e=at(),t=bt(),r=t.RegExp;return sb=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
68
+ `)&&n.flags==="s")}),sb}var ub,mM;function LJ(){if(mM)return ub;mM=1;var e=at(),t=bt(),r=t.RegExp;return ub=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),ub}var cb,yM;function ww(){if(yM)return cb;yM=1;var e=Xt(),t=it(),r=Ri(),n=Lk(),i=qJ(),o=lw(),a=ul(),u=Po().get,c=kJ(),d=LJ(),f=o("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,v=t("".charAt),m=t("".indexOf),y=t("".replace),b=t("".slice),x=(function(){var _=/a/,R=/b*/g;return e(h,_,"a"),e(h,R,"a"),_.lastIndex!==0||R.lastIndex!==0})(),w=i.BROKEN_CARET,S=/()??/.exec("")[1]!==void 0,E=x||S||w||c||d;return E&&(p=function(R){var P=this,N=u(P),j=r(R),L=N.raw,F,k,D,T,B,$,W;if(L)return L.lastIndex=P.lastIndex,F=e(p,L,j),P.lastIndex=L.lastIndex,F;var Y=N.groups,ee=w&&P.sticky,H=e(n,P),Q=P.source,ce=0,se=j;if(ee&&(H=y(H,"y",""),m(H,"g")===-1&&(H+="g"),se=b(j,P.lastIndex),P.lastIndex>0&&(!P.multiline||P.multiline&&v(j,P.lastIndex-1)!==`
69
+ `)&&(Q="(?: "+Q+")",se=" "+se,ce++),k=new RegExp("^(?:"+Q+")",H)),S&&(k=new RegExp("^"+Q+"$(?!\\s)",H)),x&&(D=P.lastIndex),T=e(h,ee?k:P,se),ee?T?(T.input=b(T.input,ce),T[0]=b(T[0],ce),T.index=P.lastIndex,P.lastIndex+=T[0].length):P.lastIndex=0:x&&T&&(P.lastIndex=P.global?T.index+T[0].length:D),S&&T&&T.length>1&&e(f,T[0],k,function(){for(B=1;B<arguments.length-2;B++)arguments[B]===void 0&&(T[B]=void 0)}),T&&Y)for(T.groups=$=a(null),B=0;B<Y.length;B++)W=Y[B],$[W[0]]=T[W[1]];return T}),cb=p,cb}var bM;function Bk(){if(bM)return hM;bM=1;var e=Gn(),t=ww();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),hM}Bk();var xM={},lb,wM;function Fk(){if(wM)return lb;wM=1,Bk();var e=Xt(),t=Ci(),r=ww(),n=at(),i=Ft(),o=Ja(),a=i("species"),u=RegExp.prototype;return lb=function(c,d,f,h){var p=i(c),v=!n(function(){var x={};return x[p]=function(){return 7},""[c](x)!==7}),m=v&&!n(function(){var x=!1,w=/a/;return c==="split"&&(w={},w.constructor={},w.constructor[a]=function(){return w},w.flags="",w[p]=/./[p]),w.exec=function(){return x=!0,null},w[p](""),!x});if(!v||!m||f){var y=/./[p],b=d(p,""[c],function(x,w,S,E,_){var R=w.exec;return R===r||R===u.exec?v&&!_?{done:!0,value:e(y,w,S,E)}:{done:!0,value:e(x,S,w,E)}:{done:!1}});t(String.prototype,c,b[0]),t(u,p,b[1])}h&&o(u[p],"sham",!0)},lb}var fb,_M;function $k(){if(_M)return fb;_M=1;var e=Ok().charAt;return fb=function(t,r,n){return r+(n?e(t,r).length:1)},fb}var db,EM;function BJ(){if(EM)return db;EM=1;var e=bt(),t=at(),r=e.RegExp,n=!t(function(){var i=!0;try{r(".","d")}catch{i=!1}var o={},a="",u=i?"dgimsy":"gimsy",c=function(p,v){Object.defineProperty(o,p,{get:function(){return a+=v,!0}})},d={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};i&&(d.hasIndices="d");for(var f in d)c(f,d[f]);var h=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(o);return h!==u||a!==u});return db={correct:n},db}var hb,SM;function zk(){if(SM)return hb;SM=1;var e=Xt(),t=Cr(),r=rl(),n=BJ(),i=Lk(),o=RegExp.prototype;return hb=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},hb}var pb,OM;function Hk(){if(OM)return pb;OM=1;var e=Xt(),t=Rr(),r=Et(),n=Wn(),i=ww(),o=TypeError;return pb=function(a,u){var c=a.exec;if(r(c)){var d=e(c,a,u);return d!==null&&t(d),d}if(n(a)==="RegExp")return e(i,a,u);throw new o("RegExp#exec called on incompatible receiver")},pb}var CM;function FJ(){if(CM)return xM;CM=1;var e=Xt(),t=it(),r=Fk(),n=Rr(),i=Nt(),o=vw(),a=Ri(),u=Oi(),c=Za(),d=$k(),f=zk(),h=Hk(),p=t("".indexOf);return r("match",function(v,m,y){return[function(x){var w=u(this),S=i(x)?c(x,v):void 0;return S?e(S,x,w):new RegExp(x)[v](a(w))},function(b){var x=n(this),w=a(b),S=y(m,x,w);if(S.done)return S.value;var E=a(f(x));if(p(E,"g")===-1)return h(x,w);var _=p(E,"u")!==-1;x.lastIndex=0;for(var R=[],P=0,N;(N=h(x,w))!==null;){var j=a(N[0]);R[P]=j,j===""&&(x.lastIndex=d(w,o(x.lastIndex),_)),P++}return P===0?null:R}]}),xM}FJ();var RM={},vb,PM;function $J(){if(PM)return vb;PM=1;var e=fk(),t=Sn();return vb=function(r,n,i){return i.get&&e(i.get,n,{getter:!0}),i.set&&e(i.set,n,{setter:!0}),t.f(r,n,i)},vb}var IM;function zJ(){if(IM)return RM;IM=1;var e=$r(),t=hw().EXISTS,r=it(),n=$J(),i=Function.prototype,o=r(i.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=r(a.exec),c="name";return e&&!t&&n(i,c,{configurable:!0,get:function(){try{return u(a,o(this))[1]}catch{return""}}}),RM}zJ();var NM={},gb,TM;function HJ(){if(TM)return gb;TM=1;var e=Qc(),t=Function.prototype,r=t.apply,n=t.call;return gb=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),gb}var mb,AM;function UJ(){if(AM)return mb;AM=1;var e=it(),t=Ro(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;return mb=function(c,d,f,h,p,v){var m=f+c.length,y=h.length,b=u;return p!==void 0&&(p=t(p),b=a),i(v,b,function(x,w){var S;switch(n(w,0)){case"$":return"$";case"&":return c;case"`":return o(d,0,f);case"'":return o(d,m);case"<":S=p[o(w,1,-1)];break;default:var E=+w;if(E===0)return x;if(E>y){var _=r(E/10);return _===0?x:_<=y?h[_-1]===void 0?n(w,1):h[_-1]+n(w,1):x}S=h[E-1]}return S===void 0?"":S})},mb}var MM;function VJ(){if(MM)return NM;MM=1;var e=HJ(),t=Xt(),r=it(),n=Fk(),i=at(),o=Rr(),a=Et(),u=Nt(),c=ol(),d=vw(),f=Ri(),h=Oi(),p=$k(),v=Za(),m=UJ(),y=zk(),b=Hk(),x=Ft(),w=x("replace"),S=Math.max,E=Math.min,_=r([].concat),R=r([].push),P=r("".indexOf),N=r("".slice),j=function(D){return D===void 0?D:String(D)},L=(function(){return"a".replace(/./,"$0")==="$0"})(),F=(function(){return/./[w]?/./[w]("a","$0")==="":!1})(),k=!i(function(){var D=/./;return D.exec=function(){var T=[];return T.groups={a:"7"},T},"".replace(D,"$<a>")!=="7"});return n("replace",function(D,T,B){var $=F?"$":"$0";return[function(Y,ee){var H=h(this),Q=u(Y)?v(Y,w):void 0;return Q?t(Q,Y,H,ee):t(T,f(H),Y,ee)},function(W,Y){var ee=o(this),H=f(W);if(typeof Y=="string"&&P(Y,$)===-1&&P(Y,"$<")===-1){var Q=B(T,ee,H,Y);if(Q.done)return Q.value}var ce=a(Y);ce||(Y=f(Y));var se=f(y(ee)),z=P(se,"g")!==-1,G;z&&(G=P(se,"u")!==-1,ee.lastIndex=0);for(var J=[],V;V=b(ee,H),!(V===null||(R(J,V),!z));){var K=f(V[0]);K===""&&(ee.lastIndex=p(H,d(ee.lastIndex),G))}for(var ie="",ne=0,ue=0;ue<J.length;ue++){V=J[ue];for(var de=f(V[0]),we=S(E(c(V.index),H.length),0),Se=[],_e,he=1;he<V.length;he++)R(Se,j(V[he]));var ae=V.groups;if(ce){var Oe=_([de],Se,we,H);ae!==void 0&&R(Oe,ae),_e=f(e(Y,void 0,Oe))}else _e=m(de,H,we,Se,ae,Y);we>=ne&&(ie+=N(H,ne,we)+_e,ne=we+de.length)}return ie+N(H,ne)}]},!k||!L||F),NM}VJ();function qn(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function $u(e){return!e||!e.ownerDocument?document:e.ownerDocument}var Zi=null,DM=null;kk&&window.addEventListener("resize",function(){DM!==window.devicePixelRatio&&(DM=window.devicePixelRatio,Zi=null)});function jM(e){if(Zi===null){var t=$u(e);if(typeof t>"u")return Zi=0,Zi;var r=t.body,n=t.createElement("div");n.classList.add("simplebar-hide-scrollbar"),r.appendChild(n);var i=n.getBoundingClientRect().right;r.removeChild(n),Zi=i}return Zi}var pc=(function(){function e(r,n){var i=this;this.onScroll=function(){var o=qn(i.el);i.scrollXTicking||(o.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(o.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0)},this.scrollX=function(){i.axis.x.isOverflowing&&(i.showScrollbar("x"),i.positionScrollbar("x")),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&(i.showScrollbar("y"),i.positionScrollbar("y")),i.scrollYTicking=!1},this.onMouseEnter=function(){i.showScrollbar("x"),i.showScrollbar("y")},this.onMouseMove=function(o){i.mouseX=o.clientX,i.mouseY=o.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this.onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.hideScrollbars=function(){i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.track.rect)||(i.axis.y.scrollbar.el.classList.remove(i.classNames.visible),i.axis.y.isVisible=!1),i.isWithinBounds(i.axis.x.track.rect)||(i.axis.x.scrollbar.el.classList.remove(i.classNames.visible),i.axis.x.isVisible=!1)},this.onPointerEvent=function(o){var a,u;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(a=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(u=i.isWithinBounds(i.axis.y.track.rect)),(a||u)&&(o.preventDefault(),o.stopPropagation(),o.type==="mousedown"&&(a&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(o,"x"):i.onTrackClick(o,"x")),u&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(o,"y"):i.onTrackClick(o,"y"))))},this.drag=function(o){var a,u=i.axis[i.draggedAxis].track,c=u.rect[i.axis[i.draggedAxis].sizeAttr],d=i.axis[i.draggedAxis].scrollbar,f=i.contentWrapperEl[i.axis[i.draggedAxis].scrollSizeAttr],h=parseInt(i.elStyles[i.axis[i.draggedAxis].sizeAttr],10);o.preventDefault(),o.stopPropagation(),i.draggedAxis==="y"?a=o.pageY:a=o.pageX;var p=a-u.rect[i.axis[i.draggedAxis].offsetAttr]-i.axis[i.draggedAxis].dragOffset,v=p/(c-d.size),m=v*(f-h);i.draggedAxis==="x"&&(m=i.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?m-(c+d.size):m,m=i.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-m:m),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=m},this.onEndDrag=function(o){var a=$u(i.el),u=qn(i.el);o.preventDefault(),o.stopPropagation(),i.el.classList.remove(i.classNames.dragging),a.removeEventListener("mousemove",i.drag,!0),a.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=u.setTimeout(function(){a.removeEventListener("click",i.preventClick,!0),a.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=r,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,n),this.classNames=Object.assign({},e.defaultOptions.classNames,this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,!e.instances.has(this.el)&&(this.recalculate=GA(this.recalculate.bind(this),64),this.onMouseMove=GA(this.onMouseMove.bind(this),64),this.hideScrollbars=YA(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=YA(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=sJ(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var n=document.createElement("div");n.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var i=n.firstElementChild;document.body.appendChild(i);var o=i.firstElementChild;i.scrollLeft=0;var a=e.getOffset(i),u=e.getOffset(o);i.scrollLeft=999;var c=e.getOffset(o);return{isRtlScrollingInverted:a.left!==u.left&&u.left-c.left!==0,isRtlScrollbarInverted:a.left!==u.left}},e.getOffset=function(n){var i=n.getBoundingClientRect(),o=$u(n),a=qn(n);return{top:i.top+(a.pageYOffset||o.documentElement.scrollTop),left:i.left+(a.pageXOffset||o.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),kk&&(this.initDOM(),this.setAccessibilityAttributes(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var n=this;if(Array.prototype.filter.call(this.el.children,function(a){return a.classList.contains(n.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var i=document.createElement("div"),o=document.createElement("div");i.classList.add(this.classNames.track),o.classList.add(this.classNames.scrollbar),i.appendChild(o),this.axis.x.track.el=i.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=i.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.setAccessibilityAttributes=function(){var n=this.options.ariaLabel||"scrollable content";this.contentWrapperEl.setAttribute("tabindex","0"),this.contentWrapperEl.setAttribute("role","region"),this.contentWrapperEl.setAttribute("aria-label",n)},t.initListeners=function(){var n=this,i=qn(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(c){n.el.addEventListener(c,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(c){n.el.addEventListener(c,n.onPointerEvent,{capture:!0,passive:!0})}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),i.addEventListener("resize",this.onWindowResize);var o=!1,a=null,u=i.ResizeObserver||PJ;this.resizeObserver=new u(function(){!o||a!==null||(a=i.requestAnimationFrame(function(){n.recalculate(),a=null}))}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),i.requestAnimationFrame(function(){o=!0}),this.mutationObserver=new i.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var n=qn(this.el);this.elStyles=n.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var i=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1,a=this.contentEl.offsetWidth,u=this.contentWrapperEl.offsetWidth,c=this.elStyles.overflowX,d=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var f=this.contentEl.scrollHeight,h=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=i?"auto":"100%",this.placeholderEl.style.width=o?a+"px":"auto",this.placeholderEl.style.height=f+"px";var p=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=h>a,this.axis.y.isOverflowing=f>p,this.axis.x.isOverflowing=c==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=d==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var v=this.axis.x.isOverflowing?this.scrollbarWidth:0,m=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&h>u-m,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&f>p-v,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(n){if(n===void 0&&(n="y"),!this.axis[n].isOverflowing)return 0;var i=this.contentEl[this.axis[n].scrollSizeAttr],o=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a,u=o/i;return a=Math.max(~~(u*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},t.positionScrollbar=function(n){if(n===void 0&&(n="y"),!!this.axis[n].isOverflowing){var i=this.contentWrapperEl[this.axis[n].scrollSizeAttr],o=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a=parseInt(this.elStyles[this.axis[n].sizeAttr],10),u=this.axis[n].scrollbar,c=this.contentWrapperEl[this.axis[n].scrollOffsetAttr];c=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-c:c;var d=c/(i-a),f=~~((o-u.size)*d);f=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?f+(o-u.size):f,u.el.style.transform=n==="x"?"translate3d("+f+"px, 0, 0)":"translate3d(0, "+f+"px, 0)"}},t.toggleTrackVisibility=function(n){n===void 0&&(n="y");var i=this.axis[n].track.el,o=this.axis[n].scrollbar.el;this.axis[n].isOverflowing||this.axis[n].forceVisible?(i.style.visibility="visible",this.contentWrapperEl.style[this.axis[n].overflowAttr]="scroll"):(i.style.visibility="hidden",this.contentWrapperEl.style[this.axis[n].overflowAttr]="hidden"),this.axis[n].isOverflowing?o.style.display="block":o.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(n){n===void 0&&(n="y"),this.axis[n].track.rect=this.axis[n].track.el.getBoundingClientRect(),this.axis[n].scrollbar.rect=this.axis[n].scrollbar.el.getBoundingClientRect();var i=this.isWithinBounds(this.axis[n].scrollbar.rect);i?this.axis[n].scrollbar.el.classList.add(this.classNames.hover):this.axis[n].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[n].track.rect)?(this.showScrollbar(n),this.axis[n].track.el.classList.add(this.classNames.hover)):this.axis[n].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(n){n===void 0&&(n="y"),this.axis[n].track.el.classList.remove(this.classNames.hover),this.axis[n].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(n){n===void 0&&(n="y");var i=this.axis[n].scrollbar.el;this.axis[n].isVisible||(i.classList.add(this.classNames.visible),this.axis[n].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(n,i){i===void 0&&(i="y");var o=$u(this.el),a=qn(this.el),u=this.axis[i].scrollbar,c=i==="y"?n.pageY:n.pageX;this.axis[i].dragOffset=c-u.rect[this.axis[i].offsetAttr],this.draggedAxis=i,this.el.classList.add(this.classNames.dragging),o.addEventListener("mousemove",this.drag,!0),o.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(o.addEventListener("click",this.preventClick,!0),o.addEventListener("dblclick",this.preventClick,!0)):(a.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(n,i){var o=this;if(i===void 0&&(i="y"),!!this.options.clickOnTrack){var a=qn(this.el);this.axis[i].scrollbar.rect=this.axis[i].scrollbar.el.getBoundingClientRect();var u=this.axis[i].scrollbar,c=u.rect[this.axis[i].offsetAttr],d=parseInt(this.elStyles[this.axis[i].sizeAttr],10),f=this.contentWrapperEl[this.axis[i].scrollOffsetAttr],h=i==="y"?this.mouseY-c:this.mouseX-c,p=h<0?-1:1,v=p===-1?f-d:f+d,m=function y(){if(p===-1){if(f>v){var b;f-=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((b={},b[o.axis[i].offsetAttr]=f,b)),a.requestAnimationFrame(y)}}else if(f<v){var x;f+=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((x={},x[o.axis[i].offsetAttr]=f,x)),a.requestAnimationFrame(y)}};m()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:jM(this.el)}catch{return jM(this.el)}},t.removeListeners=function(){var n=this,i=qn(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(o){n.el.removeEventListener(o,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(o){n.el.removeEventListener(o,n.onPointerEvent,{capture:!0,passive:!0})}),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),i.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(n){return this.mouseX>=n.left&&this.mouseX<=n.left+n.width&&this.mouseY>=n.top&&this.mouseY<=n.top+n.height},t.findChild=function(n,i){var o=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;return Array.prototype.filter.call(n.children,function(a){return o.call(a,i)})[0]},e})();pc.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3};pc.instances=new WeakMap;function qM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qM(Object(r),!0).forEach(function(n){WJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WJ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vc(){return vc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vc.apply(this,arguments)}function GJ(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function KJ(e,t){if(e==null)return{};var r=GJ(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var YJ=["children","scrollableNodeProps","tag"],XJ=function(t){var r=Array.prototype.reduce.call(t,function(n,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var a=o[1].replace(/\W+(.)/g,function(u,c){return c.toUpperCase()});switch(i.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=i.value}}return n},{});return r},ll=A.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=e.tag,a=o===void 0?"div":o,u=KJ(e,YJ),c=a,d,f=A.useRef(),h=A.useRef(),p=A.useRef(),v={},m={},y=[];return Object.keys(u).forEach(function(b){Object.prototype.hasOwnProperty.call(pc.defaultOptions,b)?v[b]=u[b]:b.match(/data-simplebar-(.+)/)&&b!=="data-simplebar-direction"?y.push({name:b,value:u[b]}):m[b]=u[b]}),y.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
70
70
  'data-simplebar-auto-hide="false"' —> 'autoHide="false"'
71
- `),A.useEffect(function(){return f=i.ref||f,h.current&&(d=new pc(h.current,Nu(Nu(Nu(Nu({},XJ(y)),v),f&&{scrollableNode:f.current}),p.current&&{contentNode:p.current})),typeof t=="function"?t(d):t&&(t.current=d)),function(){d.unMount(),d=null,typeof t=="function"&&t(null)}},[]),A.createElement(c,vc({ref:h,"data-simplebar":!0},m),A.createElement("div",{className:"simplebar-wrapper"},A.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},A.createElement("div",{className:"simplebar-height-auto-observer"})),A.createElement("div",{className:"simplebar-mask"},A.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:f,contentNodeRef:p}):A.createElement("div",vc({},i,{className:"simplebar-content-wrapper".concat(i.className?" ".concat(i.className):"")}),A.createElement("div",{className:"simplebar-content"},r)))),A.createElement("div",{className:"simplebar-placeholder"})),A.createElement("div",{className:"simplebar-track simplebar-horizontal"},A.createElement("div",{className:"simplebar-scrollbar"})),A.createElement("div",{className:"simplebar-track simplebar-vertical"},A.createElement("div",{className:"simplebar-scrollbar"})))});cl.displayName="SimpleBar";cl.propTypes={children:le.oneOfType([le.node,le.func]),scrollableNodeProps:le.object,tag:le.string};const ll=({container:e,...t})=>C.jsx(De.Portal,{...t,container:e||document.querySelector(`.${oD.ROLES_EDITOR_SCOPE_CLASS}`)||document.body}),gc=zx,mc=Hx,Uk=(e,t)=>{if(e===Z.EPermissionType.METHOD&&t)switch(t){case Z.ESubPermissionType.ENTITY_SEL_METHOD:return C.jsx(ye.FdFunctionSelection,{className:"h-6 w-6"});case Z.ESubPermissionType.ENTITY_METHOD:return C.jsx(ye.FdFunctionEntity,{className:"h-6 w-6"});case Z.ESubPermissionType.DS_METHOD:return C.jsx(ye.FdFunctionDatastore,{className:"h-6 w-6"});case Z.ESubPermissionType.DATACLASS_METHOD:return C.jsx(ye.FdFunctionDataclass,{className:"h-6 w-6"})}switch(e){case Z.EPermissionType.DATACLASS:return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"});case Z.EPermissionType.SINGLETON:return C.jsx(ye.FdSingleton,{className:"h-6 w-6"});case Z.EPermissionType.DATASTORE:return C.jsx(ye.FdModel3,{className:"h-6 w-6"});case Z.EPermissionType.ATTRIBUTE:return C.jsx(ye.FdTableColumn,{className:"h-6 w-6"});case Z.EPermissionType.METHOD:return C.jsx(ye.FdCode,{className:"h-6 w-6"});case Z.EPermissionType.SINGLETON_METHOD:return C.jsx(ye.FdFunctionSingleton,{className:"h-6 w-6"});default:return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"})}},qM=({children:e})=>C.jsx("div",{className:"h-full w-full",children:C.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})});function ZJ(e){const{isIndeterminate:t,isChecked:r,...n}=e,i=t?"M22.5 12C22.5 17.799 17.799 22.5 12 22.5C6.20101 22.5 1.5 17.799 1.5 12C1.5 6.20101 6.20101 1.5 12 1.5C17.799 1.5 22.5 6.20101 22.5 12Z":"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z";return C.jsx(De.BaseCheckboxIcon,{viewBox:"0 0 24 24",...n,children:C.jsx("path",{fill:t?"transparent":"currentColor",d:i,stroke:t?"currentColor":void 0,strokeWidth:t?3:void 0})})}function JJ(e){return C.jsx(De.Checkbox,{icon:C.jsx(ZJ,{}),...e})}const Yi=({permissions:e,label:t,onToggle:r,onSelect:n,promoted:i,showIncluded:o,privileges:a,exists:u})=>{const c=e.find(d=>d.name===t);return c?C.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[c.checked||c.from.length===0||t==="promote"?C.jsx(De.Checkbox,{isChecked:c.checked,onChange:()=>r&&r(c),isInvalid:u===!1}):C.jsx(JJ,{isIndeterminate:o&&c.from.length>0,onChange:()=>r&&r(c),isInvalid:u===!1}),C.jsxs("div",{className:"absolute left-5 top-0 flex cursor-pointer items-center space-x-1",children:[t!=="promote"&&(c.checked&&(c.info||c.from.length>0)||!c.checked&&c.from.length>0)&&C.jsx(C.Fragment,{children:C.jsxs(gc,{openDelay:0,closeDelay:0,children:[C.jsx(mc,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsxs("div",{className:"space-y-1 px-2",children:[c.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:c.from.map(d=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[d].id),children:a[d].privilege}))})]})]}):null,c.info&&C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"})," ",c.info]})]})})})]})}),(c.checked||c.from.length>0)&&["execute"].includes(t)&&!!(i!=null&&i.length)&&C.jsxs(gc,{openDelay:0,closeDelay:0,children:[C.jsx(mc,{children:C.jsx(ye.FdCrown,{className:"h-3 w-3 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsxs("span",{className:"mr-1",children:["Function is promoted with:"," "]}),i==null?void 0:i.map(d=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[d].id),children:a[d].privilege}))]})]})})})})]})]})]}):null},QJ=({privilegeId:e,privileges:t})=>{const r=Z.useAppSelector(Z.selectCatalogMethods),n=Z.useAppSelector(Z.selectDataclasses),i=Z.useAppSelector(Z.selectSingletons),o=t[e],a=Z.useAppDispatch(),[u,c]=A.useState([]),[d,f]=A.useState("");A.useEffect(()=>{f("")},[e]);const{isOpen:h,getMenuProps:p,getInputProps:v,getComboboxProps:m,highlightedIndex:y,getItemProps:b,selectedItem:x,openMenu:w}=eo({onInputValueChange(){c([])},items:[],itemToString(_){return _?_.applyTo:""},defaultHighlightedIndex:0,stateReducer:(_,R)=>{const{changes:P,type:N}=R;switch(N){case eo.stateChangeTypes.InputKeyDownArrowDown:return{...P,isOpen:!0,highlightedIndex:_.highlightedIndex<=u.length?_.highlightedIndex+1:0};case eo.stateChangeTypes.InputKeyDownArrowUp:return{...P,isOpen:!0,highlightedIndex:_.highlightedIndex>=0?_.highlightedIndex-1:u.length};case eo.stateChangeTypes.InputKeyDownEnter:const j=u[_.highlightedIndex];if(!j)return P;const L=Z.addPermission(e,j,t);return a(Z.updatePrivileges(L)),{...P,isOpen:!0,highlightedIndex:0}}return P}});A.useEffect(()=>{const _=o.resources.map(({resource:P,type:N,subType:j})=>({type:N,applyTo:P,subType:j})),R=Tx(d.toLowerCase(),r,Object.values(n),Object.values(i));c(R.filter(({applyTo:P,type:N,subType:j})=>!Q2.find(_,{applyTo:P,type:N,subType:j})))},[d,o.resources]);const S=p({},{suppressRefError:!0}),E=A.useRef(null);return A.useEffect(()=>{h&&E.current&&E.current.focus()},[h]),C.jsxs("div",{className:"relative w-56 text-white group",...m(),children:[C.jsx("div",{...m(),children:C.jsx("input",{...v(),ref:E,type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-2 pr-5 text-xs border-grey-500 focus:outline-none focus:ring-1 focus:ring-white focus:rounded-b-none focus:ring-inset",placeholder:"Create a permission",value:d,onChange:({target:{value:_}})=>f(_),onFocus:()=>{w()}})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-1",children:C.jsx(ye.FdDown,{className:"h-4 w-4 cursor-pointer",onMouseDown:_=>{_.preventDefault()},onClick:()=>{w()}})}),h&&C.jsx("ul",{...S,tabIndex:0,className:"absolute max-h-80 inset-x-0 top-full overflow-auto rounded-md border border-grey-50 bg-grey-900 p-0 text-grey-50 shadow-md group-focus-within:rounded-t-none group-focus-within:border-t-0",children:u.map((_,R)=>C.jsxs("li",{className:Ve(x===_&&"font-bold","flex min-w-fit cursor-pointer items-center space-x-2 px-3 py-2 text-xs shadow-sm",{"bg-primary-hover":y===R,"font-bold":x===_}),...b({item:_,index:R}),onClick:()=>{const P=Z.addPermission(e,_,t);a(Z.updatePrivileges(P))},children:[Uk(_.type,_.subType),C.jsx("span",{children:_.applyTo})]},`${_.applyTo}-${R}`))})]})};function eQ(e){const t=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],r=e.reduce((n,i)=>{const[o]=i.resource.split("."),a=n.find(u=>u.prefix===o.toLowerCase());return a?(a.resources.push(i),n):[...n,{prefix:o.toLowerCase(),type:i.type,resources:[i]}]},[]);return r.sort((n,i)=>n.prefix==="ds"?-1:i.prefix==="ds"||n.prefix>i.prefix?1:-1),r.map(n=>({...n,resources:n.resources.sort((i,o)=>{const a=t.indexOf(i.type),u=t.indexOf(o.type);return a!==u?a-u:i.resource.toLowerCase()>o.resource.toLowerCase()?1:-1})})).reduce((n,i)=>[...n,...i.resources],[])}const tQ=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n})=>{const[i,o]=A.useState(null),[a,u]=A.useState(null),{styles:c,attributes:d}=bc(i,a,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),[f,h]=A.useState([]),[p,v]=A.useState(""),m=Z.useAppDispatch();Z.useAppSelector(Z.selectCatalog);const{id:y}=e,b=A.useMemo(()=>Z.getInheritedResources(y,n),[y,n[y].includes,n[y].resources]),x=A.useMemo(()=>Z.getPromotions(y,n),[n[y]]);function w(k){h(D=>D.some(T=>k.includes(T))?D.filter(T=>!k.includes(T)):[...D,...k])}const S=async k=>{const{confirmed:D}=await m(Z.openModal({title:"Delete Privilege",type:De.ModalType.CONFIRM,color:De.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"})).unwrap();if(D){const T=Z.removePermission(e.id,k,n);m(Z.updatePrivileges(T))}},E=async()=>{const{confirmed:k}=await m(Z.openModal({title:"Reset Permissions",type:De.ModalType.CONFIRM,color:De.ModalColor.DANGER,message:"Are you sure you want to reset permissions for this Privilege?",icon:"FdWarningDanger"})).unwrap();if(k){const D=Z.resetResources(e.id,n);m(Z.updatePrivileges(D))}},R=b.filter(k=>f.length===0?!0:f.includes(k.type)).filter(({resource:k})=>p?new RegExp(Q2.escapeRegExp(p),"i").test(k):!0),P=eQ(R),N=P.filter(k=>{const D=k.permissions.every(T=>!T.checked)&&k.permissions.some(T=>T.from.length>0);return r||!D}),j=(k,D)=>{const T=Z.togglePermission(e.id,k,D,n);m(Z.updatePrivileges(T))},L=A.useMemo(()=>N.some(k=>k.exists===!1),[N]),F=async()=>{const{confirmed:k}=await m(Z.openModal({title:"Delete Privilege",type:De.ModalType.CONFIRM,color:De.ModalColor.DANGER,message:"Are you sure you want to remove these permissions?",views:{tips:[{type:"warning",message:"This action will remove all permissions that don't exist in the catalog for all privileges"}]},icon:"FdWarningDanger"})).unwrap(),D=Object.entries(n).map(([T,B])=>{const $=B.resources.filter(W=>!W.exists);return{[T]:$.map(W=>({applyTo:W.resource,type:W.type}))}}).reduce((T,B)=>({...T,...B}),{});if(k){const T=Z.removeMultiplePermissions(D,n);m(Z.updatePrivileges(T))}};return C.jsxs(cl,{className:"z-20 h-full flex-1 overflow-auto bg-grey-800 p-[15px] pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[C.jsxs("table",{className:"relative h-full w-full",children:[C.jsx("thead",{className:"sticky top-0 z-20 bg-grey-800",children:C.jsxs("tr",{className:"border-b border-grey-100",children:[C.jsx("td",{className:"py-2",children:C.jsxs("div",{className:"flex items-center space-x-2",children:[C.jsxs("div",{className:"relative w-56 text-white",children:[C.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center px-1",children:C.jsx(ye.FdSearch,{className:"h-4 w-4 text-gray-400"})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2",children:C.jsx(xr.Popover,{className:"flex items-center",children:({open:k})=>C.jsxs(C.Fragment,{children:[C.jsx(xr.Popover.Button,{ref:o,children:C.jsx(ye.FdAdjust,{className:"h-4 w-4"})}),k&&C.jsx(ll,{children:C.jsxs(xr.Popover.Panel,{ref:u,style:c.popper,...d.popper,className:"z-50 rounded-md border border-grey-50 bg-grey-900 px-4 py-2.5 text-xs text-grey-50",static:!0,children:[C.jsx("h5",{className:"mb-2 text-sm",children:"Filter"}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:f.includes("datastore"),onChange:()=>{w(["datastore"])},label:"Datastore"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:f.includes("dataclass"),onChange:()=>{w(["dataclass"])},label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:f.includes("singleton"),onChange:()=>{w(["singleton"])},label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:f.some(D=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes(D)),onChange:()=>{w(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:f.includes("attribute"),onChange:()=>{w(["attribute"])},label:"Attribute"})})]})]})})]})})}),C.jsx("input",{type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-6 text-xs focus:outline-none",placeholder:"Search available permissions",value:p,onChange:k=>{v(k.target.value)}})]}),C.jsx(QJ,{privilegeId:y,privileges:n}),C.jsx("div",{children:C.jsxs(gc,{openDelay:0,closeDelay:0,children:[C.jsx(mc,{children:C.jsx("button",{className:"flex h-6 items-center space-x-1 rounded-md px-2 text-sm text-grey-50 hover:bg-primary-hover",onClick:E,children:C.jsx(ye.FdReload,{})})}),C.jsx(Dr,{children:C.jsxs(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"mb-1 flex max-w-xs items-center gap-x-1 rounded bg-primary-light px-2 py-2 text-s font-semibold text-primary-darker",children:[C.jsx(ye.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"Resetting the privilege will remove all configured ressources"})]})})]})}),C.jsxs(gc,{openDelay:0,closeDelay:0,children:[C.jsx(mc,{children:C.jsx("button",{className:Ve("flex h-6 items-center space-x-1 rounded-md px-2 text-sm text-grey-50 hover:bg-primary-hover disabled:opacity-50 disabled:hover:bg-primary-dark"),onClick:F,disabled:!L,children:C.jsx(ye.FdClean,{className:"h-4 w-4"})})}),C.jsx(Dr,{children:C.jsxs(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"mb-1 flex max-w-xs items-center gap-x-1 rounded bg-primary-light px-2 py-2 text-s font-semibold text-primary-darker",children:[C.jsx(ye.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"Delete all the non existing resources from privileges"})]})})]})]})}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Read"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Create"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Update"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Delete"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Execute"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Promote"})]})}),N.length?C.jsx("tbody",{children:N.map((k,D)=>{const T=k.permissions.some(B=>B.from.length>0);return C.jsxs("tr",{className:Ve("group even:bg-grey-600",{"opacity-60":k.exists===!1}),children:[C.jsxs("td",{className:Ve("group flex items-center gap-3 py-2 text-xs group-hover:rounded-l group-hover:bg-grey-300",k.exists===!1?"text-negative-400":"text-white",{"border-b-[0.5px] border-grey-300":!1}),children:[Uk(k.type,k.subType),k.resource,C.jsx(De.Tooltip,{placement:"top",label:"Remove Permission",isDisabled:T,children:C.jsx("button",{onClick:()=>{T?De.toastSubject.next({kind:"info",markdown:!0,message:`<div className="flex gap-x-3"><h3 className="font-bold">Info:</h3><p className="font-normal">Inherited permissions can't be removed</p></div>`,customIcon:ye.FdInfoBold}):S({applyTo:k.resource,type:k.type})},className:Ve("flex flex-shrink-0 items-center justify-center rounded p-1 opacity-0 group-hover:opacity-100",T?"hover:bg-grey-300 group-hover:opacity-70":"hover:bg-primary-hover"),children:C.jsx(ye.FdPlus,{className:"h-4 w-4 rotate-45 transform text-white"})})})]}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Yi,{permissions:k.permissions,showIncluded:r,label:"read",onToggle:B=>j(k,B),onSelect:t,privileges:n,exists:k.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Yi,{permissions:k.permissions,showIncluded:r,label:"create",onToggle:B=>j(k,B),onSelect:t,privileges:n,exists:k.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Yi,{permissions:k.permissions,showIncluded:r,label:"update",onToggle:B=>j(k,B),onSelect:t,privileges:n,exists:k.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Yi,{permissions:k.permissions,showIncluded:r,label:"drop",onToggle:B=>j(k,B),onSelect:t,privileges:n,exists:k.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Yi,{promoted:x[k.resource],permissions:k.permissions,showIncluded:r,label:"execute",onToggle:B=>j(k,B),onSelect:t,privileges:n,exists:k.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-grey-300 ",children:C.jsx(Yi,{permissions:k.permissions,showIncluded:r,label:"promote",onToggle:B=>j(k,B),onSelect:t,privileges:n,exists:k.exists})})]},D)})}):null]}),!P.length&&p?C.jsx(qM,{children:"The Permission you're looking for can't be found "}):null,!P.length&&!p?C.jsxs(qM,{children:["This Privilege has no Permissions configured yet ",C.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},rQ=({onCreate:e})=>{const t=Z.useAppSelector(Z.selectPrivileges),r=Z.useAppDispatch(),[n,i]=A.useState(null),[o,a]=A.useState(null),[u,c]=A.useState(""),[d,f]=A.useState(null),{styles:h,attributes:p}=bc(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});return A.useEffect(()=>{c(""),f(null)},[o]),C.jsx(xr.Popover,{children:({open:v,close:m})=>C.jsxs(C.Fragment,{children:[C.jsx(xr.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:i,children:C.jsx("span",{children:C.jsx(ye.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(ll,{children:C.jsxs(xr.Popover.Panel,{ref:a,style:h.popper,...p.popper,"data-cy":"New-priv-pop-up",className:"z-50 min-w-[256px] rounded border border-grey-50 bg-grey-900 px-4 py-2 text-xs text-grey-50 shadow-md",static:!0,children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Privilege"}),C.jsxs("div",{className:"mt-2",children:[C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{className:"text-grey-100",children:"Name"}),C.jsx("input",{autoFocus:!0,value:u,onChange:y=>c(y.target.value),onKeyDown:y=>{if(y.key==="Enter"){f(null);try{const b=Z.create(u,t),x=r(Z.updatePrivileges(b)),w=Object.values(x.payload).find(S=>S.privilege===u);w&&(e(w),m())}catch(b){f(b.message)}}},type:"text",className:Ve("w-full rounded border bg-grey-300 p-1 focus:outline-none",{"border-grey-100":!d,"border-red-400":d})})]}),d&&C.jsx("p",{className:"mt-1 text-xs text-red-400",children:d})]}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx("button",{className:"rounded border border-primary-dark bg-primary-dark px-4 py-1 hover:border-primary-hover hover:bg-primary-hover",onClick:()=>{f(null);try{const y=Z.create(u,t),b=r(Z.updatePrivileges(y)),x=Object.values(b.payload).find(w=>w.privilege===u);x&&e(x),m()}catch(y){f(y.message)}},children:"Create"}),C.jsx("button",{className:"rounded border border-grey-100 px-4 py-1 text-grey-100 hover:bg-white hover:text-primary-dark",onClick:()=>m(),children:"Cancel"})]})]})})]})})},nQ=()=>{const e=Z.useAppSelector(Z.selectCatalog),t=Z.useAppSelector(Z.selectPrivileges),r=A.useMemo(()=>{if(e===null)return t;const c=Aq(t,Object.values((e==null?void 0:e.dataClasses)??{}));return Mq(c,e)},[t,e]),[n,i]=A.useState(null),o=A.useMemo(()=>Object.keys(r),[r]);A.useEffect(()=>{n&&r[n.id]||!o.length||i(r[o[0]])},[r]),A.useEffect(()=>{o.length<2&&u(!0)},[o.length]);const[a,u]=A.useState(!0);return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs("div",{className:"flex h-full w-[356px] flex-col bg-grey-800",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between bg-grey-800 px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[C.jsx("span",{children:C.jsx(ye.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),C.jsx(rQ,{onCreate:c=>{i(c)}})]}),C.jsx(xX,{privileges:r,selectedPrivilege:n,selectPrivilege:c=>{i(c)}})]}),n&&r[n.id]?C.jsxs("div",{className:"privileges-container relative flex flex-1 flex-col overflow-x-auto border-l-[0.5px] border-grey-900 bg-grey-800",children:[C.jsxs("div",{className:"mb-1 flex h-full w-full flex-col items-stretch",children:[n.privilege!=="guest"?C.jsx(m9,{privileges:r,selectedPrivilege:n,onSelect:c=>i(t[c]),setShowIncluded:u,showIncluded:a}):null,C.jsx(tQ,{privileges:r,selectedPrivilege:n,onSelect:c=>i(t[c]),showIncluded:a})]}),C.jsx(iQ,{privileges:r,selectedPrivilege:n,setSelectedPrivilege:i})]}):C.jsx(mD,{tab:"Privilege"})]})},iQ=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=A.useState(!1);return C.jsx(De.Panel,{path:De.ROLES_TAB_PATH,isOpen:n,onOpen:()=>i(!0),onClose:()=>i(!1),children:C.jsx("div",{className:"h-full w-full px-3 pb-3",children:C.jsx("div",{className:"h-full w-full rounded bg-grey-900",children:C.jsx(p9,{dict:e,data:Z.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})};var mb={},na={},Tu={},kM;function Vk(){if(kM)return Tu;kM=1,Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.default=r;let e;const t=new Uint8Array(16);function r(){if(!e&&(e=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)}return Tu}var Xi={},ia={},oa={},LM;function oQ(){if(LM)return oa;LM=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.default=void 0;var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return oa.default=e,oa}var BM;function fl(){if(BM)return ia;BM=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.default=void 0;var e=t(oQ());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){return typeof i=="string"&&e.default.test(i)}var n=r;return ia.default=n,ia}var FM;function dl(){if(FM)return Xi;FM=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.default=void 0,Xi.unsafeStringify=n;var e=t(fl());function t(a){return a&&a.__esModule?a:{default:a}}const r=[];for(let a=0;a<256;++a)r.push((a+256).toString(16).slice(1));function n(a,u=0){return r[a[u+0]]+r[a[u+1]]+r[a[u+2]]+r[a[u+3]]+"-"+r[a[u+4]]+r[a[u+5]]+"-"+r[a[u+6]]+r[a[u+7]]+"-"+r[a[u+8]]+r[a[u+9]]+"-"+r[a[u+10]]+r[a[u+11]]+r[a[u+12]]+r[a[u+13]]+r[a[u+14]]+r[a[u+15]]}function i(a,u=0){const c=n(a,u);if(!(0,e.default)(c))throw TypeError("Stringified UUID is invalid");return c}var o=i;return Xi.default=o,Xi}var $M;function aQ(){if($M)return na;$M=1,Object.defineProperty(na,"__esModule",{value:!0}),na.default=void 0;var e=r(Vk()),t=dl();function r(d){return d&&d.__esModule?d:{default:d}}let n,i,o=0,a=0;function u(d,f,h){let p=f&&h||0;const v=f||new Array(16);d=d||{};let m=d.node||n,y=d.clockseq!==void 0?d.clockseq:i;if(m==null||y==null){const _=d.random||(d.rng||e.default)();m==null&&(m=n=[_[0]|1,_[1],_[2],_[3],_[4],_[5]]),y==null&&(y=i=(_[6]<<8|_[7])&16383)}let b=d.msecs!==void 0?d.msecs:Date.now(),x=d.nsecs!==void 0?d.nsecs:a+1;const w=b-o+(x-a)/1e4;if(w<0&&d.clockseq===void 0&&(y=y+1&16383),(w<0||b>o)&&d.nsecs===void 0&&(x=0),x>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=b,a=x,i=y,b+=122192928e5;const S=((b&268435455)*1e4+x)%4294967296;v[p++]=S>>>24&255,v[p++]=S>>>16&255,v[p++]=S>>>8&255,v[p++]=S&255;const E=b/4294967296*1e4&268435455;v[p++]=E>>>8&255,v[p++]=E&255,v[p++]=E>>>24&15|16,v[p++]=E>>>16&255,v[p++]=y>>>8|128,v[p++]=y&255;for(let _=0;_<6;++_)v[p+_]=m[_];return f||(0,t.unsafeStringify)(v)}var c=u;return na.default=c,na}var aa={},kn={},sa={},zM;function Wk(){if(zM)return sa;zM=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.default=void 0;var e=t(fl());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){if(!(0,e.default)(i))throw TypeError("Invalid UUID");let o;const a=new Uint8Array(16);return a[0]=(o=parseInt(i.slice(0,8),16))>>>24,a[1]=o>>>16&255,a[2]=o>>>8&255,a[3]=o&255,a[4]=(o=parseInt(i.slice(9,13),16))>>>8,a[5]=o&255,a[6]=(o=parseInt(i.slice(14,18),16))>>>8,a[7]=o&255,a[8]=(o=parseInt(i.slice(19,23),16))>>>8,a[9]=o&255,a[10]=(o=parseInt(i.slice(24,36),16))/1099511627776&255,a[11]=o/4294967296&255,a[12]=o>>>24&255,a[13]=o>>>16&255,a[14]=o>>>8&255,a[15]=o&255,a}var n=r;return sa.default=n,sa}var HM;function Gk(){if(HM)return kn;HM=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.URL=kn.DNS=void 0,kn.default=a;var e=dl(),t=r(Wk());function r(u){return u&&u.__esModule?u:{default:u}}function n(u){u=unescape(encodeURIComponent(u));const c=[];for(let d=0;d<u.length;++d)c.push(u.charCodeAt(d));return c}const i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";kn.DNS=i;const o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";kn.URL=o;function a(u,c,d){function f(h,p,v,m){var y;if(typeof h=="string"&&(h=n(h)),typeof p=="string"&&(p=(0,t.default)(p)),((y=p)===null||y===void 0?void 0:y.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let b=new Uint8Array(16+h.length);if(b.set(p),b.set(h,p.length),b=d(b),b[6]=b[6]&15|c,b[8]=b[8]&63|128,v){m=m||0;for(let x=0;x<16;++x)v[m+x]=b[x];return v}return(0,e.unsafeStringify)(b)}try{f.name=u}catch{}return f.DNS=i,f.URL=o,f}return kn}var ua={},UM;function sQ(){if(UM)return ua;UM=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.default=void 0;function e(v){if(typeof v=="string"){const m=unescape(encodeURIComponent(v));v=new Uint8Array(m.length);for(let y=0;y<m.length;++y)v[y]=m.charCodeAt(y)}return t(n(i(v),v.length*8))}function t(v){const m=[],y=v.length*32,b="0123456789abcdef";for(let x=0;x<y;x+=8){const w=v[x>>5]>>>x%32&255,S=parseInt(b.charAt(w>>>4&15)+b.charAt(w&15),16);m.push(S)}return m}function r(v){return(v+64>>>9<<4)+14+1}function n(v,m){v[m>>5]|=128<<m%32,v[r(m)-1]=m;let y=1732584193,b=-271733879,x=-1732584194,w=271733878;for(let S=0;S<v.length;S+=16){const E=y,_=b,R=x,P=w;y=c(y,b,x,w,v[S],7,-680876936),w=c(w,y,b,x,v[S+1],12,-389564586),x=c(x,w,y,b,v[S+2],17,606105819),b=c(b,x,w,y,v[S+3],22,-1044525330),y=c(y,b,x,w,v[S+4],7,-176418897),w=c(w,y,b,x,v[S+5],12,1200080426),x=c(x,w,y,b,v[S+6],17,-1473231341),b=c(b,x,w,y,v[S+7],22,-45705983),y=c(y,b,x,w,v[S+8],7,1770035416),w=c(w,y,b,x,v[S+9],12,-1958414417),x=c(x,w,y,b,v[S+10],17,-42063),b=c(b,x,w,y,v[S+11],22,-1990404162),y=c(y,b,x,w,v[S+12],7,1804603682),w=c(w,y,b,x,v[S+13],12,-40341101),x=c(x,w,y,b,v[S+14],17,-1502002290),b=c(b,x,w,y,v[S+15],22,1236535329),y=d(y,b,x,w,v[S+1],5,-165796510),w=d(w,y,b,x,v[S+6],9,-1069501632),x=d(x,w,y,b,v[S+11],14,643717713),b=d(b,x,w,y,v[S],20,-373897302),y=d(y,b,x,w,v[S+5],5,-701558691),w=d(w,y,b,x,v[S+10],9,38016083),x=d(x,w,y,b,v[S+15],14,-660478335),b=d(b,x,w,y,v[S+4],20,-405537848),y=d(y,b,x,w,v[S+9],5,568446438),w=d(w,y,b,x,v[S+14],9,-1019803690),x=d(x,w,y,b,v[S+3],14,-187363961),b=d(b,x,w,y,v[S+8],20,1163531501),y=d(y,b,x,w,v[S+13],5,-1444681467),w=d(w,y,b,x,v[S+2],9,-51403784),x=d(x,w,y,b,v[S+7],14,1735328473),b=d(b,x,w,y,v[S+12],20,-1926607734),y=f(y,b,x,w,v[S+5],4,-378558),w=f(w,y,b,x,v[S+8],11,-2022574463),x=f(x,w,y,b,v[S+11],16,1839030562),b=f(b,x,w,y,v[S+14],23,-35309556),y=f(y,b,x,w,v[S+1],4,-1530992060),w=f(w,y,b,x,v[S+4],11,1272893353),x=f(x,w,y,b,v[S+7],16,-155497632),b=f(b,x,w,y,v[S+10],23,-1094730640),y=f(y,b,x,w,v[S+13],4,681279174),w=f(w,y,b,x,v[S],11,-358537222),x=f(x,w,y,b,v[S+3],16,-722521979),b=f(b,x,w,y,v[S+6],23,76029189),y=f(y,b,x,w,v[S+9],4,-640364487),w=f(w,y,b,x,v[S+12],11,-421815835),x=f(x,w,y,b,v[S+15],16,530742520),b=f(b,x,w,y,v[S+2],23,-995338651),y=h(y,b,x,w,v[S],6,-198630844),w=h(w,y,b,x,v[S+7],10,1126891415),x=h(x,w,y,b,v[S+14],15,-1416354905),b=h(b,x,w,y,v[S+5],21,-57434055),y=h(y,b,x,w,v[S+12],6,1700485571),w=h(w,y,b,x,v[S+3],10,-1894986606),x=h(x,w,y,b,v[S+10],15,-1051523),b=h(b,x,w,y,v[S+1],21,-2054922799),y=h(y,b,x,w,v[S+8],6,1873313359),w=h(w,y,b,x,v[S+15],10,-30611744),x=h(x,w,y,b,v[S+6],15,-1560198380),b=h(b,x,w,y,v[S+13],21,1309151649),y=h(y,b,x,w,v[S+4],6,-145523070),w=h(w,y,b,x,v[S+11],10,-1120210379),x=h(x,w,y,b,v[S+2],15,718787259),b=h(b,x,w,y,v[S+9],21,-343485551),y=o(y,E),b=o(b,_),x=o(x,R),w=o(w,P)}return[y,b,x,w]}function i(v){if(v.length===0)return[];const m=v.length*8,y=new Uint32Array(r(m));for(let b=0;b<m;b+=8)y[b>>5]|=(v[b/8]&255)<<b%32;return y}function o(v,m){const y=(v&65535)+(m&65535);return(v>>16)+(m>>16)+(y>>16)<<16|y&65535}function a(v,m){return v<<m|v>>>32-m}function u(v,m,y,b,x,w){return o(a(o(o(m,v),o(b,w)),x),y)}function c(v,m,y,b,x,w,S){return u(m&y|~m&b,v,m,x,w,S)}function d(v,m,y,b,x,w,S){return u(m&b|y&~b,v,m,x,w,S)}function f(v,m,y,b,x,w,S){return u(m^y^b,v,m,x,w,S)}function h(v,m,y,b,x,w,S){return u(y^(m|~b),v,m,x,w,S)}var p=e;return ua.default=p,ua}var VM;function uQ(){if(VM)return aa;VM=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.default=void 0;var e=r(Gk()),t=r(sQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return aa.default=i,aa}var ca={},la={},WM;function cQ(){if(WM)return la;WM=1,Object.defineProperty(la,"__esModule",{value:!0}),la.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return la.default=t,la}var GM;function lQ(){if(GM)return ca;GM=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.default=void 0;var e=n(cQ()),t=n(Vk()),r=dl();function n(a){return a&&a.__esModule?a:{default:a}}function i(a,u,c){if(e.default.randomUUID&&!u&&!a)return e.default.randomUUID();a=a||{};const d=a.random||(a.rng||t.default)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,u){c=c||0;for(let f=0;f<16;++f)u[c+f]=d[f];return u}return(0,r.unsafeStringify)(d)}var o=i;return ca.default=o,ca}var fa={},da={},KM;function fQ(){if(KM)return da;KM=1,Object.defineProperty(da,"__esModule",{value:!0}),da.default=void 0;function e(i,o,a,u){switch(i){case 0:return o&a^~o&u;case 1:return o^a^u;case 2:return o&a^o&u^a&u;case 3:return o^a^u}}function t(i,o){return i<<o|i>>>32-o}function r(i){const o=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof i=="string"){const f=unescape(encodeURIComponent(i));i=[];for(let h=0;h<f.length;++h)i.push(f.charCodeAt(h))}else Array.isArray(i)||(i=Array.prototype.slice.call(i));i.push(128);const u=i.length/4+2,c=Math.ceil(u/16),d=new Array(c);for(let f=0;f<c;++f){const h=new Uint32Array(16);for(let p=0;p<16;++p)h[p]=i[f*64+p*4]<<24|i[f*64+p*4+1]<<16|i[f*64+p*4+2]<<8|i[f*64+p*4+3];d[f]=h}d[c-1][14]=(i.length-1)*8/Math.pow(2,32),d[c-1][14]=Math.floor(d[c-1][14]),d[c-1][15]=(i.length-1)*8&4294967295;for(let f=0;f<c;++f){const h=new Uint32Array(80);for(let x=0;x<16;++x)h[x]=d[f][x];for(let x=16;x<80;++x)h[x]=t(h[x-3]^h[x-8]^h[x-14]^h[x-16],1);let p=a[0],v=a[1],m=a[2],y=a[3],b=a[4];for(let x=0;x<80;++x){const w=Math.floor(x/20),S=t(p,5)+e(w,v,m,y)+b+o[w]+h[x]>>>0;b=y,y=m,m=t(v,30)>>>0,v=p,p=S}a[0]=a[0]+p>>>0,a[1]=a[1]+v>>>0,a[2]=a[2]+m>>>0,a[3]=a[3]+y>>>0,a[4]=a[4]+b>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,a[0]&255,a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,a[1]&255,a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,a[2]&255,a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,a[3]&255,a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,a[4]&255]}var n=r;return da.default=n,da}var YM;function dQ(){if(YM)return fa;YM=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.default=void 0;var e=r(Gk()),t=r(fQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return fa.default=i,fa}var ha={},XM;function hQ(){if(XM)return ha;XM=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.default=void 0;var e="00000000-0000-0000-0000-000000000000";return ha.default=e,ha}var pa={},ZM;function pQ(){if(ZM)return pa;ZM=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.default=void 0;var e=t(fl());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){if(!(0,e.default)(i))throw TypeError("Invalid UUID");return parseInt(i.slice(14,15),16)}var n=r;return pa.default=n,pa}var JM;function vQ(){return JM||(JM=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return a.default}});var t=f(aQ()),r=f(uQ()),n=f(lQ()),i=f(dQ()),o=f(hQ()),a=f(pQ()),u=f(fl()),c=f(dl()),d=f(Wk());function f(h){return h&&h.__esModule?h:{default:h}}})(mb)),mb}var yb,QM;function gQ(){if(QM)return yb;QM=1;function e(t,r){if(!t||!r||!t.length||!r.length)throw new Error("Bad alphabet");this.srcAlphabet=t,this.dstAlphabet=r}return e.prototype.convert=function(t){var r,n,i,o={},a=this.srcAlphabet.length,u=this.dstAlphabet.length,c=t.length,d=typeof t=="string"?"":[];if(!this.isValid(t))throw new Error('Number "'+t+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return t;for(r=0;r<c;r++)o[r]=this.srcAlphabet.indexOf(t[r]);do{for(n=0,i=0,r=0;r<c;r++)n=n*a+o[r],n>=u?(o[i++]=parseInt(n/u,10),n=n%u):i>0&&(o[i++]=0);c=i,d=this.dstAlphabet.slice(n,n+1).concat(d)}while(i!==0);return d},e.prototype.isValid=function(t){for(var r=0;r<t.length;++r)if(this.srcAlphabet.indexOf(t[r])===-1)return!1;return!0},yb=e,yb}var bb,eD;function mQ(){if(eD)return bb;eD=1;var e=gQ();function t(r,n){var i=new e(r,n);return function(o){return i.convert(o)}}return t.BIN="01",t.OCT="01234567",t.DEC="0123456789",t.HEX="0123456789abcdef",bb=t,bb}var xb,tD;function yQ(){if(tD)return xb;tD=1;const{v4:e,validate:t}=vQ(),r=mQ(),n={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},i={consistentLength:!0};let o;const a=(d,f,h)=>{const p=f(d.toLowerCase().replace(/-/g,""));return!h||!h.consistentLength?p:p.padStart(h.shortIdLength,h.paddingChar)},u=(d,f)=>{const p=f(d).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[p[1],p[2],p[3],p[4],p[5]].join("-")},c=d=>Math.ceil(Math.log(2**128)/Math.log(d));return xb=(()=>{const d=(f,h)=>{const p=f||n.flickrBase58,v={...i,...h};if([...new Set(Array.from(p))].length!==p.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const m=c(p.length),y={shortIdLength:m,consistentLength:v.consistentLength,paddingChar:p[0]},b=r(r.HEX,p),x=r(p,r.HEX),w=()=>a(e(),b,y),E={alphabet:p,fromUUID:_=>a(_,b,y),maxLength:m,generate:w,new:w,toUUID:_=>u(_,x),uuid:e,validate:(_,R=!1)=>{if(!_||typeof _!="string")return!1;const P=v.consistentLength?_.length===m:_.length<=m,N=_.split("").every(j=>p.includes(j));return R===!1?P&&N:P&&N&&t(u(_,x))}};return Object.freeze(E),E};return d.constants=n,d.uuid=e,d.generate=()=>(o||(o=d(n.flickrBase58).generate),o()),d})(),xb}var bQ=yQ();const xQ=({role:e})=>{var R;const[t,r]=A.useState(e),[n,i]=A.useState(e.role),[o,a]=A.useState(null),u=Z.useAppSelector(Z.selectPrivileges),c=((R=t.privileges)==null?void 0:R.filter(P=>u[P]&&u[P].privilege!=="guest").length)||0,d=Z.useAppSelector(Z.selectRoles),f=Z.useAppDispatch(),{selectedRole:h,selectRole:p}=Kb(),[v,m]=A.useState(!1),y=De.useOutsideClick(()=>{v&&x()});A.useEffect(()=>{e.role||m(!0)},[]),A.useEffect(()=>{r(e)},[e]);const b=()=>{a(""),m(!0)},x=()=>{a(null),e.role&&e.role===n&&m(!1);try{const P=Z.saveRole({...t,role:n},d);f(Z.updateRoles(P)),m(!1)}catch(P){a(P.message)}},w=Z.useAppDispatch(),S=async P=>{P.stopPropagation();const{confirmed:N}=await w(Z.openModal({title:"Delete Role",type:De.ModalType.CONFIRM,color:De.ModalColor.DANGER,message:"Are you sure you want to remove this Role?",icon:"FdWarningDanger"})).unwrap();N&&E()},E=()=>{const P=Z.removeRole(t.id,d),N=Object.keys(P),j=N.length>=1,L=N[N.length-1];p(L&&j?L:null),f(Z.updateRoles(P))},_=(P=null)=>{if(P&&P.stopPropagation(),!e.role){E();return}m(!1),i(e.role)};return C.jsx(C.Fragment,{children:C.jsxs("div",{className:Ve("rounded border bg-grey-300 p-2",{"border-grey-100":h!==t.id,"border-primary-dark":h===t.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{p(t.id)},ref:y,children:[C.jsx("div",{className:"flex items-center justify-between",children:C.jsxs("div",{className:"flex flex-1 items-center text-white",children:[C.jsx("span",{className:"mr-4",children:C.jsx(ye.FdGroup,{className:"h-6 w-6"})}),v?C.jsxs("div",{className:"relative h-6 flex-1",children:[C.jsx("input",{type:"text",value:n,onChange:({target:{value:P}})=>{i(P)},onKeyDown:P=>{P.key==="Enter"&&x(),P.key==="Escape"&&_()},className:Ve("absolute inset-0 mr-2 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:border-primary-dark focus:outline-none",{"border-b border-red-400":o}),placeholder:"role",autoComplete:"off",autoFocus:!0}),o&&C.jsx("p",{className:"absolute top-5 mt-1 rounded bg-red-400 p-1 text-xs text-white shadow-md",children:o})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",title:n,children:t.role}),C.jsx("div",{className:Ve("justify-betwee ml-auto flex w-fit items-center gap-x-2"),children:v?C.jsxs(C.Fragment,{children:[C.jsx("button",{onClick:x,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(ye.FdSave,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:_,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(ye.FdClose,{className:"h-4 w-4 text-grey-50"})})]}):C.jsxs(C.Fragment,{children:[C.jsx("button",{onClick:b,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(ye.FdPen,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:P=>S(P),className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(ye.FdTrash,{className:"h-4 w-4 text-grey-50"})})]})})]})}),C.jsxs("span",{className:Ve("ml-[43px] py-1 text-xs text-white"),children:[c," Privilege",c>1?"s":""]})]})})},Kk=(e,t)=>e?t[e]:null,rD=(e,t,r)=>{const n=Kk(e,r);return n?Object.values(r).reduce((i,o)=>o.id===e?n.privileges.includes(t)?{...i,[n.id]:{...n,privileges:n.privileges.filter(a=>a!==t)}}:{...i,[n.id]:{...n,privileges:[...n.privileges,t]}}:{...i,[o.id]:o},{}):r},wQ=()=>{const e=Z.useAppSelector(Z.selectPrivileges),t=Z.useAppSelector(Z.selectRoles),r=Z.useAppDispatch(),{selectedRole:n}=Kb(),i=Kk(n,t),o=(a,u)=>u&&u.privileges.includes(a.id);return C.jsxs("div",{className:"w-full border-b border-grey-900 p-4 ",children:[C.jsx("div",{className:"mb-4 flex items-center gap-x-5 text-white",children:C.jsx("h4",{className:"text-[13px] font-semibold ",children:"Privileges"})}),C.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[C.jsx("div",{"data-cy":"item=>Permisions",className:Ve("inline-flex items-center gap-1 space-x-1 rounded bg-primary-darker px-2 py-0.5 text-xs font-semibold italic text-white"),children:"guest"}),Object.values(e).filter(a=>o(a,i)&&a.privilege!=="guest").map((a,u)=>C.jsxs("div",{"data-cy":"item=>Permisions",className:Ve("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":o(a,i),"bg-grey-300 text-grey-100":!o(a,i)}),onClick:()=>{const c=rD(i.id,a.id,t);r(Z.updateRoles(c))},children:[C.jsx("span",{className:"text-xs",children:a.privilege}),C.jsx("button",{className:"focus:outline-none",children:o(a,i)?C.jsx(ye.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(ye.FdPlus,{className:"h-[14px] w-[14px]"})})]},u)),Object.values(e).filter(a=>!o(a,i)&&a.privilege!=="guest").map((a,u)=>C.jsxs("div",{"data-cy":"item=>Permisions",className:Ve("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":o(a,i),"bg-grey-300 text-grey-100":!o(a,i)}),onClick:()=>{const c=rD(i.id,a.id,t);r(Z.updateRoles(c))},children:[C.jsx("span",{className:"text-xs",children:a.privilege}),C.jsx("button",{className:"text-white focus:outline-none",children:o(a,i)?C.jsx(ye.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(ye.FdPlus,{className:"h-[14px] w-[14px]"})})]},u))]})]})},_Q=({children:e})=>C.jsx("div",{className:"h-full w-full",children:C.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"absolute -right-full h-10 w-10 translate-x-1"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})}),Wb=(e,t,r,n=!1)=>{const i=e.applyTo,o=e.type===Z.EPermissionType.DATACLASS?"ds":i.split(".")[0],a={...t,...r},u=()=>({value:!n,inherited:!1,from:[],explicitly:!1}),c={read:u(),create:u(),update:u(),drop:u(),execute:u(),promote:u()},d=h=>{h.forEach(p=>{a[p]&&(a[p].resources.forEach(v=>{if(v.resource===i||v.resource===o){const m=Wb(e,t,{[p]:a[p]},n);Object.values(v.permissions).forEach(y=>{c[y.name].explicitly||(!c[y.name].from.includes(a[p].privilege)&&y.checked&&c[y.name].from.push(a[p].privilege),c[y.name].inherited=c[y.name].inherited||m[y.name].value||m[y.name].inherited)})}}),a[p].includes.length>0&&d(a[p].includes))})};if(Object.values(r).forEach(h=>{h.resources.forEach(p=>{p.resource===i&&Object.values(p.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))})}),(h.includes.length>0||h.privilege==="guest")&&d(h.includes)}),Object.values(t).forEach(h=>{h.resources.forEach(p=>{p.resource===i&&(h.privilege==="guest"?Object.values(p.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))}):Object.values(p.permissions).forEach(v=>{!c[v.name].explicitly&&v.checked&&(n?c[v.name].value=!0:c[v.name].value=!1)}))})}),(n?Object.entries(c).some(([h,p])=>h!=="promote"&&!p.value&&!p.explicitly):Object.entries(c).some(([h,p])=>h!=="promote"&&p.value&&!p.explicitly))&&![Z.EPermissionType.DATASTORE,Z.EPermissionType.SINGLETON].includes(e.type)){const h={applyTo:o,type:e.type===Z.EPermissionType.DATACLASS?Z.EPermissionType.DATASTORE:e.type===Z.EPermissionType.SINGLETON_METHOD?Z.EPermissionType.SINGLETON:Z.EPermissionType.DATACLASS},p=Wb(h,t,r,n),v=m=>{let y=c[m].value;return n?!c[m].value&&!c[m].explicitly&&(y=p[m].value):c[m].value&&!c[m].explicitly&&(y=p[m].value),{value:y,inherited:c[m].inherited||p[m].inherited,from:c[m].from.length>0?c[m].from:p[m].from,explicitly:c[m].explicitly}};return{read:v("read"),create:v("create"),update:v("update"),drop:v("drop"),execute:v("execute"),promote:v("promote")}}return{read:c.read,create:c.create,update:c.update,drop:c.drop,execute:c.execute,promote:c.promote}},EQ=e=>{switch(e){case"dataclass":return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"});case"singleton":return C.jsx(ye.FdSingleton,{className:"h-6 w-6"});case"datastore":return C.jsx(ye.FdModel3,{className:"h-6 w-6"});case"attribute":return C.jsx(ye.FdTableColumn,{className:"h-6 w-6"});case"method":return C.jsx(ye.FdCode,{className:"h-6 w-6"});case"singletonMethod":return C.jsx(ye.FdFunctionSingleton,{className:"h-6 w-6"});case"entityselMethod":return C.jsx(ye.FdFunctionSelection,{className:"h-6 w-6"});case"entityMethod":return C.jsx(ye.FdFunctionEntity,{className:"h-6 w-6"});case"dsMethod":return C.jsx(ye.FdFunctionDatastore,{className:"h-6 w-6"});case"dataclassMethod":return C.jsx(ye.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"})}},va=zx,ga=Hx,uo=({privileges:e,permission:t,hasChild:r,depth:n,isChild:i=!1,className:o,inSearch:a,toggleCollapse:u,collapsed:c,isRestrictedByDefault:d,toastMessageCallback:f})=>{const[h,p]=t.applyTo.split("."),v=A.useMemo(()=>Wb(t,e.otherPrivs,e.rolePrivs,d),[e,t,d]);return C.jsxs("tr",{className:Ve("group even:bg-grey-600",o),children:[C.jsxs("td",{className:Ve("flex h-full w-full items-center gap-3 p-0 text-xs group-hover:rounded-l group-hover:bg-grey-300",{"px-1":a}),children:[Array(n).fill("").map((m,y)=>C.jsx("div",{className:Ve("ml-1.5 mr-1 h-full w-0.5 border-l-2 border-grey-100",{"mr-0.5":i})},y)),r&&C.jsx("button",{onClick:u,className:"w-3",children:c?C.jsx(ye.FdRight,{className:"inline h-4 w-4"}):C.jsx(ye.FdDown,{className:"inline h-4 w-4"})}),EQ(t.type),a?t.applyTo:p||h]}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[Z.EPermissionType.ATTRIBUTE,Z.EPermissionType.DATASTORE,Z.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:Ve("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.read.value||v.read.inherited}),onClick:f,children:(v.read.value||v.read.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.read.value&&v.read.inherited?C.jsxs(va,{openDelay:0,closeDelay:0,children:[C.jsx(ga,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.read.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.read.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[Z.EPermissionType.ATTRIBUTE,Z.EPermissionType.DATASTORE,Z.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:Ve("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.create.value||v.create.inherited}),onClick:f,children:(v.create.value||v.create.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.create.value&&v.create.inherited?C.jsxs(va,{openDelay:0,closeDelay:0,children:[C.jsx(ga,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.create.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.create.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[Z.EPermissionType.ATTRIBUTE,Z.EPermissionType.DATASTORE,Z.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:Ve("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.update.value||v.update.inherited}),onClick:f,children:(v.update.value||v.update.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.update.value&&v.update.inherited?C.jsxs(va,{openDelay:0,closeDelay:0,children:[C.jsx(ga,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.update.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.update.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[Z.EPermissionType.ATTRIBUTE,Z.EPermissionType.DATASTORE,Z.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:Ve("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.drop.value||v.drop.inherited}),onClick:f,children:(v.drop.value||v.drop.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.drop.value&&v.drop.inherited?C.jsxs(va,{openDelay:0,closeDelay:0,children:[C.jsx(ga,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.drop.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.drop.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-grey-300",children:t.type!=="attribute"&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:Ve("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.execute.value||v.execute.inherited}),onClick:f,children:(v.execute.value||v.execute.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.execute.value&&v.execute.inherited?C.jsxs(va,{openDelay:0,closeDelay:0,children:[C.jsx(ga,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.execute.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.execute.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})})]})},nD=({depth:e,permission:t,privileges:r,childCollapsed:n,didChildCollapsed:i,toastMessageCallback:o})=>{const[a,u]=A.useState(n),c=Z.useAppSelector(Z.selectRestrictedByDefault),d=Z.useAppSelector(Z.selectPrivileges);return A.useEffect(()=>{n===!0&&u(!0)},[n]),C.jsxs(C.Fragment,{children:[C.jsx(uo,{privileges:r,permission:t,isChild:!0,depth:e,hasChild:!0,toggleCollapse:()=>{const f=!a;u(f),i==null||i(f)},isRestrictedByDefault:c,allPrivileges:d,collapsed:a,toastMessageCallback:o}),!a&&C.jsxs(C.Fragment,{children:[t.attributes.map((f,h)=>C.jsx(uo,{privileges:r,permission:f,depth:e+1,isRestrictedByDefault:c,allPrivileges:d,toastMessageCallback:o},`${f.type}-${h}`)),t.methods.map((f,h)=>C.jsx(uo,{privileges:r,permission:f,depth:e+1,isRestrictedByDefault:c,allPrivileges:d,toastMessageCallback:o},`${f.type}-${h}`))]})]})},SQ=({selectedRole:e})=>{const[t,r]=A.useState(null),[n,i]=A.useState(null),{styles:o,attributes:a}=bc(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),u=Z.useAppSelector(Z.selectRestrictedByDefault),c=Z.useAppSelector(Z.selectPrivileges),[d,f]=A.useState([]),[h,p]=A.useState(""),v=Z.useAppSelector(Z.selectCatalogMethods),m=Z.useAppSelector(Z.selectDataclasses),y=Z.useAppSelector(Z.selectSingletons),[b,x]=A.useState({}),[w,S]=A.useState([]);A.useEffect(()=>{const B=g9(v,Object.values(m),Object.values(y));x(B)},[e]);function E(B){const $=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"];return B.sort((W,Y)=>{const ee=$.indexOf(W.type),H=$.indexOf(Y.type);return ee!==H?ee-H:W.applyTo.toLowerCase()>Y.applyTo.toLowerCase()?1:-1})}A.useEffect(()=>{S(E(Tx(h,v,Object.values(m),Object.values(y)).filter(B=>d.length?d.includes(B.type):!0)))},[d,h]);const[_,R]=A.useState(!1),P=B=>{f($=>$.some(W=>B.includes(W))?$.filter(W=>!B.includes(W)):[...$,...B])},N=Z.useAppSelector(Z.selectRoles),j={toggleAllCollapsed:B=>{B.allCollapsed=!B.allCollapsed},toggleChildCollapsed:B=>{B.childCollapsed=!B.childCollapsed},setAllCollapsed:(B,$)=>{B.allCollapsed=$},setChildCollapsed:(B,$)=>{B.childCollapsed=$}},L=A.useMemo(()=>{const B=Object.values(c).find(H=>H.privilege==="guest"),$=N[e],W=$?Object.fromEntries($.privileges.map(H=>[H,c[H]]).filter(([,H])=>!!H)):{};if(u)return{rolePrivs:W,otherPrivs:B?{[B.id]:B}:{}};const Y=B?{[B.id]:{...B,active:!0}}:{},ee=Object.fromEntries(Object.entries(c).filter(([H])=>H!==(B==null?void 0:B.id)&&!($!=null&&$.privileges.includes(H))).map(([H,Q])=>[H,{...Q,active:!1}]));return{rolePrivs:W,otherPrivs:{...Y,...ee}}},[c,N,e,u]),{state:{allCollapsed:F,childCollapsed:k},dispatch:D}=De.useEnhancedState({allCollapsed:!1,childCollapsed:!1},j,"Table Collapse Store"),T=()=>{De.toastSubject.next({kind:"info",markdown:!0,message:'<div className="flex gap-x-1 items-center"><h3 className="font-bold mr-1">Info:</h3><p className="font-normal">You can add or modify permissions only in the Privilege section.</p></div>',customIcon:ye.FdInfoCircle})};return C.jsxs(cl,{className:"z-20 h-full flex-1 overflow-auto bg-grey-800 p-[15px] pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[C.jsxs("table",{className:"relative h-full w-full",children:[C.jsx("thead",{className:"sticky top-0 z-20 bg-grey-800",children:C.jsxs("tr",{className:"border-b border-grey-100",children:[C.jsx("td",{className:"py-2",children:C.jsxs("div",{className:"flex items-center space-x-2",children:[C.jsx(De.FloatingTooltip,{message:"Collapse All",side:"top",children:C.jsx("button",{onClick:()=>{k?(D.setAllCollapsed(!0),R(!0)):D.setChildCollapsed(!0)},className:Ve("cursor-pointer rounded-md p-1 hover:bg-primary-hover focus:outline-none",{"pointer-events-none text-grey-200":F,"text-white":!F}),children:C.jsx(ye.FdCollapseAll,{className:"h-4 w-4"})})}),C.jsxs("div",{className:"relative w-56 text-white",children:[C.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center px-1",children:C.jsx(ye.FdSearch,{className:"h-4 w-4 text-gray-400"})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2",children:C.jsx(xr.Popover,{className:"flex items-center",children:({open:B})=>C.jsxs(C.Fragment,{children:[C.jsx(xr.Popover.Button,{ref:r,children:C.jsx(ye.FdAdjust,{className:"h-4 w-4"})}),B&&C.jsx(ll,{children:C.jsxs(xr.Popover.Panel,{ref:i,style:o.popper,...a.popper,className:"z-50 rounded-md border border-grey-50 bg-grey-900 px-4 py-2.5 text-xs text-grey-50",static:!0,children:[C.jsx("h5",{className:"mb-2 text-sm",children:"Filter"}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:d.includes("datastore"),onChange:()=>{P(["datastore"])},label:"Datastore"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:d.includes("dataclass"),onChange:()=>{P(["dataclass"])},label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:d.includes("singleton"),onChange:()=>{P(["singleton"])},label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:d.some($=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes($)),onChange:()=>{P(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:d.includes("attribute"),onChange:()=>{P(["attribute"])},label:"Attribute"})})]})]})})]})})}),C.jsx("input",{type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-6 text-xs focus:outline-none",placeholder:"Search",value:h,onChange:B=>{p(B.target.value)}})]})]})}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"read"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Create"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Update"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Delete"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Execute"})]})}),C.jsx("tbody",{className:"relative bg-grey-800 text-white",children:d.length||h?w.map((B,$)=>C.jsx(uo,{privileges:L,permission:B,depth:0,inSearch:!0,isRestrictedByDefault:u,allPrivileges:c,toastMessageCallback:T},`${B.type}-${$}`)):Object.values(b).map((B,$)=>C.jsxs(A.Fragment,{children:[C.jsx(uo,{privileges:L,permission:B,isRestrictedByDefault:u,allPrivileges:c,hasChild:!0,depth:0,toggleCollapse:()=>{const W=!_;R(W),D.setAllCollapsed(!W&&F?!1:F)},collapsed:_,toastMessageCallback:T}),B.type==="datastore"&&!_?C.jsxs(C.Fragment,{children:[B.methods.map((W,Y)=>C.jsx(uo,{privileges:L,isRestrictedByDefault:u,allPrivileges:c,permission:W,depth:1,collapsed:F||!1,toastMessageCallback:T},`${W.type}-${Y}`)),B.dataClasses.map((W,Y)=>C.jsx(nD,{depth:1,privileges:L,permission:W,childCollapsed:k,didChildCollapsed:ee=>{D.setChildCollapsed(ee?k:!1)},toastMessageCallback:T},`${W.type}-${Y}`))]}):null,B.singletons.map((W,Y)=>C.jsx(nD,{depth:0,privileges:L,permission:W,childCollapsed:F,didChildCollapsed:ee=>{D.setAllCollapsed(ee?F:!1)},toastMessageCallback:T},`${W.type}-${Y}`))]},`${B.type}-${$}`))})]}),(h||d.length)&&!w.length?C.jsx(_Q,{children:"The Permission you're looking for can't be found "}):null]})},OQ=()=>{const e=Z.useAppSelector(Z.selectRoles),t=Z.useAppDispatch(),[r,n]=A.useState(null),[i,o]=A.useState(null),[a,u]=A.useState(""),[c,d]=A.useState(null),{styles:f,attributes:h}=bc(r,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});A.useEffect(()=>{u(""),d(null)},[i]);const p=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(e).find(b=>b.role===a))throw new Error(`A role with the name ${a} already exists`);const m=bQ.generate(),y=Z.createRole(m,a,e);t(Z.updateRoles(y))};return C.jsx(xr.Popover,{children:({open:v,close:m})=>{const y=()=>{d(null);try{p(),m()}catch(b){d(b.message)}};return C.jsxs(C.Fragment,{children:[C.jsx(xr.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:n,children:C.jsx("span",{children:C.jsx(ye.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(ll,{children:C.jsxs(xr.Popover.Panel,{ref:o,style:f.popper,...h.popper,"data-cy":"New-priv-pop-up",className:"z-50 min-w-[256px] rounded border border-grey-50 bg-grey-900 px-4 py-2 text-xs text-grey-50 shadow-md",static:!0,children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Role"}),C.jsxs("div",{className:"mt-2",children:[C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{className:"text-grey-100",children:"Name"}),C.jsx("input",{autoFocus:!0,value:a,onChange:b=>u(b.target.value),onKeyDown:b=>{b.key==="Enter"&&y()},type:"text",className:Ve("w-full rounded border bg-grey-300 p-1 focus:outline-none",{"border-grey-100":!c,"border-red-400":c})})]}),c&&C.jsx("p",{className:"mt-1 text-xs text-red-400",children:c})]}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx("button",{className:"rounded border border-primary-dark bg-primary-dark px-4 py-1 hover:border-primary-hover hover:bg-primary-hover",onClick:()=>{y()},children:"Create"}),C.jsx("button",{className:"rounded border border-grey-100 px-4 py-1 text-grey-100 hover:bg-white hover:text-primary-dark",onClick:()=>m(),children:"Cancel"})]})]})})]})}})},CQ=()=>{const e=Z.useAppSelector(Z.selectRoles),{selectedRole:t}=Kb();return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs("div",{className:"flex h-full w-[356px] flex-col bg-grey-800",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between bg-grey-800 px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[C.jsx("span",{children:C.jsx(ye.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),C.jsx(OQ,{})]}),C.jsx("div",{className:"flex-1 space-y-4 overflow-auto p-4 pb-10 pt-1",children:Object.values(e).map((r,n)=>C.jsx(xQ,{role:r},n))})]}),C.jsx("div",{className:Ve("relative flex h-full w-full flex-1 flex-col items-stretch overflow-x-auto bg-grey-800",{"border-l-[0.5px] border-grey-900":t}),children:C.jsx("div",{className:"flex h-full w-full select-none flex-col bg-grey-800",children:t?C.jsxs(C.Fragment,{children:[C.jsx(wQ,{}),C.jsx(SQ,{selectedRole:t})]}):C.jsx(mD,{tab:"Role"})})})]})};function Yk(){const e=Z.useAppSelector(Z.selectRolesFlags),t=Z.useAppDispatch();A.useEffect(()=>{t(Z.setTabFlags({path:De.ROLES_TAB_PATH,flags:e}))},[e])}const Xk=()=>{const e=Z.useAppSelector(Z.selectQodly),t=Z.useAppSelector(Z.selectSelectedTab),r=Z.useAppSelector(Z.selectForceLogin),n=Z.useAppSelector(Z.selectRestrictedByDefault),i=A.useRef(),o=Z.useAppDispatch();return Yk(),C.jsx("div",{className:"absolute inset-0 flex flex-1 overflow-hidden",children:C.jsx("div",{className:"relative flex flex-1 overflow-x-auto bg-grey-900","data-cy":"Roles&Privileges-editor-cy",ref:a=>i.current=a,children:C.jsxs("div",{className:"flex w-full flex-col",children:[C.jsx(Zz,{activeTab:t,forceLogin:r,restrictedByDefault:n,onTabChange:a=>{o(Z.toggleTab(a))},onForceLoginChange:a=>{o(Z.toggleForceLogin(a))},onRestrictedByDefaultChange:a=>{o(Z.toggleRestrictedByDefault(a))},qodly:e}),t==="roles"?C.jsx(Jz,{children:C.jsx(CQ,{})}):C.jsx(nQ,{})]})})})},RQ=()=>{const e=Z.useAppSelector(Z.selectModals),t=Z.useAppDispatch();return C.jsx(C.Fragment,{children:e.map((r,n)=>C.jsx(De.Modal,{hasOverlay:n===0,...r,onClose:i=>t(Z.closeModal(i)),onEdit:i=>t(Z.editModal(i))},r.id))})},PQ=e=>C.jsxs(Z.ReduxProvider,{store:Z.getStore(),children:[C.jsx(De.TipsProvider,{children:C.jsx("div",{className:"relative z-10 overflow-hidden",style:{height:"100vh"},children:C.jsx(Xk,{...e})})}),C.jsx(RQ,{})]});exports.ROLES_EDITOR_SCOPE_CLASS=oD.ROLES_EDITOR_SCOPE_CLASS;exports.Roles=Xk;exports.Standalone=PQ;exports.useRolesFlagsSync=Yk;
71
+ `),A.useEffect(function(){return f=i.ref||f,h.current&&(d=new pc(h.current,Nu(Nu(Nu(Nu({},XJ(y)),v),f&&{scrollableNode:f.current}),p.current&&{contentNode:p.current})),typeof t=="function"?t(d):t&&(t.current=d)),function(){d.unMount(),d=null,typeof t=="function"&&t(null)}},[]),A.createElement(c,vc({ref:h,"data-simplebar":!0},m),A.createElement("div",{className:"simplebar-wrapper"},A.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},A.createElement("div",{className:"simplebar-height-auto-observer"})),A.createElement("div",{className:"simplebar-mask"},A.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:f,contentNodeRef:p}):A.createElement("div",vc({},i,{className:"simplebar-content-wrapper".concat(i.className?" ".concat(i.className):"")}),A.createElement("div",{className:"simplebar-content"},r)))),A.createElement("div",{className:"simplebar-placeholder"})),A.createElement("div",{className:"simplebar-track simplebar-horizontal"},A.createElement("div",{className:"simplebar-scrollbar"})),A.createElement("div",{className:"simplebar-track simplebar-vertical"},A.createElement("div",{className:"simplebar-scrollbar"})))});ll.displayName="SimpleBar";ll.propTypes={children:le.oneOfType([le.node,le.func]),scrollableNodeProps:le.object,tag:le.string};const fl=({container:e,...t})=>C.jsx(De.Portal,{...t,container:e||document.querySelector(`.${yc.ROLES_EDITOR_SCOPE_CLASS}`)||document.body}),gc=Hx,mc=Ux,Uk=(e,t)=>{if(e===Z.EPermissionType.METHOD&&t)switch(t){case Z.ESubPermissionType.ENTITY_SEL_METHOD:return C.jsx(ye.FdFunctionSelection,{className:"h-6 w-6"});case Z.ESubPermissionType.ENTITY_METHOD:return C.jsx(ye.FdFunctionEntity,{className:"h-6 w-6"});case Z.ESubPermissionType.DS_METHOD:return C.jsx(ye.FdFunctionDatastore,{className:"h-6 w-6"});case Z.ESubPermissionType.DATACLASS_METHOD:return C.jsx(ye.FdFunctionDataclass,{className:"h-6 w-6"})}switch(e){case Z.EPermissionType.DATACLASS:return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"});case Z.EPermissionType.SINGLETON:return C.jsx(ye.FdSingleton,{className:"h-6 w-6"});case Z.EPermissionType.DATASTORE:return C.jsx(ye.FdModel3,{className:"h-6 w-6"});case Z.EPermissionType.ATTRIBUTE:return C.jsx(ye.FdTableColumn,{className:"h-6 w-6"});case Z.EPermissionType.METHOD:return C.jsx(ye.FdCode,{className:"h-6 w-6"});case Z.EPermissionType.SINGLETON_METHOD:return C.jsx(ye.FdFunctionSingleton,{className:"h-6 w-6"});default:return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"})}},kM=({children:e})=>C.jsx("div",{className:"h-full w-full",children:C.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})});function ZJ(e){const{isIndeterminate:t,isChecked:r,...n}=e,i=t?"M22.5 12C22.5 17.799 17.799 22.5 12 22.5C6.20101 22.5 1.5 17.799 1.5 12C1.5 6.20101 6.20101 1.5 12 1.5C17.799 1.5 22.5 6.20101 22.5 12Z":"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z";return C.jsx(De.BaseCheckboxIcon,{viewBox:"0 0 24 24",...n,children:C.jsx("path",{fill:t?"transparent":"currentColor",d:i,stroke:t?"currentColor":void 0,strokeWidth:t?3:void 0})})}function JJ(e){return C.jsx(De.Checkbox,{icon:C.jsx(ZJ,{}),...e})}const Yi=({permissions:e,label:t,onToggle:r,onSelect:n,promoted:i,showIncluded:o,privileges:a,exists:u})=>{const c=e.find(d=>d.name===t);return c?C.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[c.checked||c.from.length===0||t==="promote"?C.jsx(De.Checkbox,{isChecked:c.checked,onChange:()=>r&&r(c),isInvalid:u===!1}):C.jsx(JJ,{isIndeterminate:o&&c.from.length>0,onChange:()=>r&&r(c),isInvalid:u===!1}),C.jsxs("div",{className:"absolute left-5 top-0 flex cursor-pointer items-center space-x-1",children:[t!=="promote"&&(c.checked&&(c.info||c.from.length>0)||!c.checked&&c.from.length>0)&&C.jsx(C.Fragment,{children:C.jsxs(gc,{openDelay:0,closeDelay:0,children:[C.jsx(mc,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsxs("div",{className:"space-y-1 px-2",children:[c.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:c.from.map(d=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[d].id),children:a[d].privilege}))})]})]}):null,c.info&&C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"})," ",c.info]})]})})})]})}),(c.checked||c.from.length>0)&&["execute"].includes(t)&&!!(i!=null&&i.length)&&C.jsxs(gc,{openDelay:0,closeDelay:0,children:[C.jsx(mc,{children:C.jsx(ye.FdCrown,{className:"h-3 w-3 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsxs("span",{className:"mr-1",children:["Function is promoted with:"," "]}),i==null?void 0:i.map(d=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[d].id),children:a[d].privilege}))]})]})})})})]})]})]}):null},QJ=({privilegeId:e,privileges:t})=>{const r=Z.useAppSelector(Z.selectCatalogMethods),n=Z.useAppSelector(Z.selectDataclasses),i=Z.useAppSelector(Z.selectSingletons),o=t[e],a=Z.useAppDispatch(),[u,c]=A.useState([]),[d,f]=A.useState("");A.useEffect(()=>{f("")},[e]);const{isOpen:h,getMenuProps:p,getInputProps:v,getComboboxProps:m,highlightedIndex:y,getItemProps:b,selectedItem:x,openMenu:w}=eo({onInputValueChange(){c([])},items:[],itemToString(_){return _?_.applyTo:""},defaultHighlightedIndex:0,stateReducer:(_,R)=>{const{changes:P,type:N}=R;switch(N){case eo.stateChangeTypes.InputKeyDownArrowDown:return{...P,isOpen:!0,highlightedIndex:_.highlightedIndex<=u.length?_.highlightedIndex+1:0};case eo.stateChangeTypes.InputKeyDownArrowUp:return{...P,isOpen:!0,highlightedIndex:_.highlightedIndex>=0?_.highlightedIndex-1:u.length};case eo.stateChangeTypes.InputKeyDownEnter:const j=u[_.highlightedIndex];if(!j)return P;const L=Z.addPermission(e,j,t);return a(Z.updatePrivileges(L)),{...P,isOpen:!0,highlightedIndex:0}}return P}});A.useEffect(()=>{const _=o.resources.map(({resource:P,type:N,subType:j})=>({type:N,applyTo:P,subType:j})),R=Ax(d.toLowerCase(),r,Object.values(n),Object.values(i));c(R.filter(({applyTo:P,type:N,subType:j})=>!Q2.find(_,{applyTo:P,type:N,subType:j})))},[d,o.resources]);const S=p({},{suppressRefError:!0}),E=A.useRef(null);return A.useEffect(()=>{h&&E.current&&E.current.focus()},[h]),C.jsxs("div",{className:"relative w-56 text-white group",...m(),children:[C.jsx("div",{...m(),children:C.jsx("input",{...v(),ref:E,type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-2 pr-5 text-xs border-grey-500 focus:outline-none focus:ring-1 focus:ring-white focus:rounded-b-none focus:ring-inset",placeholder:"Create a permission",value:d,onChange:({target:{value:_}})=>f(_),onFocus:()=>{w()}})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-1",children:C.jsx(ye.FdDown,{className:"h-4 w-4 cursor-pointer",onMouseDown:_=>{_.preventDefault()},onClick:()=>{w()}})}),h&&C.jsx("ul",{...S,tabIndex:0,className:"absolute max-h-80 inset-x-0 top-full overflow-auto rounded-md border border-grey-50 bg-grey-900 p-0 text-grey-50 shadow-md group-focus-within:rounded-t-none group-focus-within:border-t-0",children:u.map((_,R)=>C.jsxs("li",{className:Ve(x===_&&"font-bold","flex min-w-fit cursor-pointer items-center space-x-2 px-3 py-2 text-xs shadow-sm",{"bg-primary-hover":y===R,"font-bold":x===_}),...b({item:_,index:R}),onClick:()=>{const P=Z.addPermission(e,_,t);a(Z.updatePrivileges(P))},children:[Uk(_.type,_.subType),C.jsx("span",{children:_.applyTo})]},`${_.applyTo}-${R}`))})]})};function eQ(e){const t=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],r=e.reduce((n,i)=>{const[o]=i.resource.split("."),a=n.find(u=>u.prefix===o.toLowerCase());return a?(a.resources.push(i),n):[...n,{prefix:o.toLowerCase(),type:i.type,resources:[i]}]},[]);return r.sort((n,i)=>n.prefix==="ds"?-1:i.prefix==="ds"||n.prefix>i.prefix?1:-1),r.map(n=>({...n,resources:n.resources.sort((i,o)=>{const a=t.indexOf(i.type),u=t.indexOf(o.type);return a!==u?a-u:i.resource.toLowerCase()>o.resource.toLowerCase()?1:-1})})).reduce((n,i)=>[...n,...i.resources],[])}const tQ=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n})=>{const[i,o]=A.useState(null),[a,u]=A.useState(null),{styles:c,attributes:d}=xc(i,a,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),[f,h]=A.useState([]),[p,v]=A.useState(""),m=Z.useAppDispatch();Z.useAppSelector(Z.selectCatalog);const{id:y}=e,b=A.useMemo(()=>Z.getInheritedResources(y,n),[y,n[y].includes,n[y].resources]),x=A.useMemo(()=>Z.getPromotions(y,n),[n[y]]);function w(k){h(D=>D.some(T=>k.includes(T))?D.filter(T=>!k.includes(T)):[...D,...k])}const S=async k=>{const{confirmed:D}=await m(Z.openModal({title:"Delete Privilege",type:De.ModalType.CONFIRM,color:De.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"})).unwrap();if(D){const T=Z.removePermission(e.id,k,n);m(Z.updatePrivileges(T))}},E=async()=>{const{confirmed:k}=await m(Z.openModal({title:"Reset Permissions",type:De.ModalType.CONFIRM,color:De.ModalColor.DANGER,message:"Are you sure you want to reset permissions for this Privilege?",icon:"FdWarningDanger"})).unwrap();if(k){const D=Z.resetResources(e.id,n);m(Z.updatePrivileges(D))}},R=b.filter(k=>f.length===0?!0:f.includes(k.type)).filter(({resource:k})=>p?new RegExp(Q2.escapeRegExp(p),"i").test(k):!0),P=eQ(R),N=P.filter(k=>{const D=k.permissions.every(T=>!T.checked)&&k.permissions.some(T=>T.from.length>0);return r||!D}),j=(k,D)=>{const T=Z.togglePermission(e.id,k,D,n);m(Z.updatePrivileges(T))},L=A.useMemo(()=>N.some(k=>k.exists===!1),[N]),F=async()=>{const{confirmed:k}=await m(Z.openModal({title:"Delete Privilege",type:De.ModalType.CONFIRM,color:De.ModalColor.DANGER,message:"Are you sure you want to remove these permissions?",views:{tips:[{type:"warning",message:"This action will remove all permissions that don't exist in the catalog for all privileges"}]},icon:"FdWarningDanger"})).unwrap(),D=Object.entries(n).map(([T,B])=>{const $=B.resources.filter(W=>!W.exists);return{[T]:$.map(W=>({applyTo:W.resource,type:W.type}))}}).reduce((T,B)=>({...T,...B}),{});if(k){const T=Z.removeMultiplePermissions(D,n);m(Z.updatePrivileges(T))}};return C.jsxs(ll,{className:"z-20 h-full flex-1 overflow-auto bg-grey-800 p-[15px] pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[C.jsxs("table",{className:"relative h-full w-full",children:[C.jsx("thead",{className:"sticky top-0 z-20 bg-grey-800",children:C.jsxs("tr",{className:"border-b border-grey-100",children:[C.jsx("td",{className:"py-2",children:C.jsxs("div",{className:"flex items-center space-x-2",children:[C.jsxs("div",{className:"relative w-56 text-white",children:[C.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center px-1",children:C.jsx(ye.FdSearch,{className:"h-4 w-4 text-gray-400"})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2",children:C.jsx(xr.Popover,{className:"flex items-center",children:({open:k})=>C.jsxs(C.Fragment,{children:[C.jsx(xr.Popover.Button,{ref:o,children:C.jsx(ye.FdAdjust,{className:"h-4 w-4"})}),k&&C.jsx(fl,{children:C.jsxs(xr.Popover.Panel,{ref:u,style:c.popper,...d.popper,className:"z-50 rounded-md border border-grey-50 bg-grey-900 px-4 py-2.5 text-xs text-grey-50",static:!0,children:[C.jsx("h5",{className:"mb-2 text-sm",children:"Filter"}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:f.includes("datastore"),onChange:()=>{w(["datastore"])},label:"Datastore"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:f.includes("dataclass"),onChange:()=>{w(["dataclass"])},label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:f.includes("singleton"),onChange:()=>{w(["singleton"])},label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:f.some(D=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes(D)),onChange:()=>{w(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:f.includes("attribute"),onChange:()=>{w(["attribute"])},label:"Attribute"})})]})]})})]})})}),C.jsx("input",{type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-6 text-xs focus:outline-none",placeholder:"Search available permissions",value:p,onChange:k=>{v(k.target.value)}})]}),C.jsx(QJ,{privilegeId:y,privileges:n}),C.jsx("div",{children:C.jsxs(gc,{openDelay:0,closeDelay:0,children:[C.jsx(mc,{children:C.jsx("button",{className:"flex h-6 items-center space-x-1 rounded-md px-2 text-sm text-grey-50 hover:bg-primary-hover",onClick:E,children:C.jsx(ye.FdReload,{})})}),C.jsx(Dr,{children:C.jsxs(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"mb-1 flex max-w-xs items-center gap-x-1 rounded bg-primary-light px-2 py-2 text-s font-semibold text-primary-darker",children:[C.jsx(ye.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"Resetting the privilege will remove all configured ressources"})]})})]})}),C.jsxs(gc,{openDelay:0,closeDelay:0,children:[C.jsx(mc,{children:C.jsx("button",{className:Ve("flex h-6 items-center space-x-1 rounded-md px-2 text-sm text-grey-50 hover:bg-primary-hover disabled:opacity-50 disabled:hover:bg-primary-dark"),onClick:F,disabled:!L,children:C.jsx(ye.FdClean,{className:"h-4 w-4"})})}),C.jsx(Dr,{children:C.jsxs(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"mb-1 flex max-w-xs items-center gap-x-1 rounded bg-primary-light px-2 py-2 text-s font-semibold text-primary-darker",children:[C.jsx(ye.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"Delete all the non existing resources from privileges"})]})})]})]})}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Read"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Create"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Update"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Delete"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Execute"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Promote"})]})}),N.length?C.jsx("tbody",{children:N.map((k,D)=>{const T=k.permissions.some(B=>B.from.length>0);return C.jsxs("tr",{className:Ve("group even:bg-grey-600",{"opacity-60":k.exists===!1}),children:[C.jsxs("td",{className:Ve("group flex items-center gap-3 py-2 text-xs group-hover:rounded-l group-hover:bg-grey-300",k.exists===!1?"text-negative-400":"text-white",{"border-b-[0.5px] border-grey-300":!1}),children:[Uk(k.type,k.subType),k.resource,C.jsx(De.Tooltip,{placement:"top",label:"Remove Permission",isDisabled:T,container:document.querySelector(`.${yc.ROLES_EDITOR_SCOPE_CLASS}`),children:C.jsx("button",{onClick:()=>{T?De.toastSubject.next({kind:"info",markdown:!0,message:`<div className="flex gap-x-3"><h3 className="font-bold">Info:</h3><p className="font-normal">Inherited permissions can't be removed</p></div>`,customIcon:ye.FdInfoBold}):S({applyTo:k.resource,type:k.type})},className:Ve("flex flex-shrink-0 items-center justify-center rounded p-1 opacity-0 group-hover:opacity-100",T?"hover:bg-grey-300 group-hover:opacity-70":"hover:bg-primary-hover"),children:C.jsx(ye.FdPlus,{className:"h-4 w-4 rotate-45 transform text-white"})})})]}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Yi,{permissions:k.permissions,showIncluded:r,label:"read",onToggle:B=>j(k,B),onSelect:t,privileges:n,exists:k.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Yi,{permissions:k.permissions,showIncluded:r,label:"create",onToggle:B=>j(k,B),onSelect:t,privileges:n,exists:k.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Yi,{permissions:k.permissions,showIncluded:r,label:"update",onToggle:B=>j(k,B),onSelect:t,privileges:n,exists:k.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Yi,{permissions:k.permissions,showIncluded:r,label:"drop",onToggle:B=>j(k,B),onSelect:t,privileges:n,exists:k.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Yi,{promoted:x[k.resource],permissions:k.permissions,showIncluded:r,label:"execute",onToggle:B=>j(k,B),onSelect:t,privileges:n,exists:k.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-grey-300 ",children:C.jsx(Yi,{permissions:k.permissions,showIncluded:r,label:"promote",onToggle:B=>j(k,B),onSelect:t,privileges:n,exists:k.exists})})]},D)})}):null]}),!P.length&&p?C.jsx(kM,{children:"The Permission you're looking for can't be found "}):null,!P.length&&!p?C.jsxs(kM,{children:["This Privilege has no Permissions configured yet ",C.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},rQ=({onCreate:e})=>{const t=Z.useAppSelector(Z.selectPrivileges),r=Z.useAppDispatch(),[n,i]=A.useState(null),[o,a]=A.useState(null),[u,c]=A.useState(""),[d,f]=A.useState(null),{styles:h,attributes:p}=xc(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});return A.useEffect(()=>{c(""),f(null)},[o]),C.jsx(xr.Popover,{children:({open:v,close:m})=>C.jsxs(C.Fragment,{children:[C.jsx(xr.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:i,children:C.jsx("span",{children:C.jsx(ye.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(fl,{children:C.jsxs(xr.Popover.Panel,{ref:a,style:h.popper,...p.popper,"data-cy":"New-priv-pop-up",className:"z-50 min-w-[256px] rounded border border-grey-50 bg-grey-900 px-4 py-2 text-xs text-grey-50 shadow-md",static:!0,children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Privilege"}),C.jsxs("div",{className:"mt-2",children:[C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{className:"text-grey-100",children:"Name"}),C.jsx("input",{autoFocus:!0,value:u,onChange:y=>c(y.target.value),onKeyDown:y=>{if(y.key==="Enter"){f(null);try{const b=Z.create(u,t),x=r(Z.updatePrivileges(b)),w=Object.values(x.payload).find(S=>S.privilege===u);w&&(e(w),m())}catch(b){f(b.message)}}},type:"text",className:Ve("w-full rounded border bg-grey-300 p-1 focus:outline-none",{"border-grey-100":!d,"border-red-400":d})})]}),d&&C.jsx("p",{className:"mt-1 text-xs text-red-400",children:d})]}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx("button",{className:"rounded border border-primary-dark bg-primary-dark px-4 py-1 hover:border-primary-hover hover:bg-primary-hover",onClick:()=>{f(null);try{const y=Z.create(u,t),b=r(Z.updatePrivileges(y)),x=Object.values(b.payload).find(w=>w.privilege===u);x&&e(x),m()}catch(y){f(y.message)}},children:"Create"}),C.jsx("button",{className:"rounded border border-grey-100 px-4 py-1 text-grey-100 hover:bg-white hover:text-primary-dark",onClick:()=>m(),children:"Cancel"})]})]})})]})})},nQ=()=>{const e=Z.useAppSelector(Z.selectCatalog),t=Z.useAppSelector(Z.selectPrivileges),r=A.useMemo(()=>{if(e===null)return t;const c=Aq(t,Object.values((e==null?void 0:e.dataClasses)??{}));return Mq(c,e)},[t,e]),[n,i]=A.useState(null),o=A.useMemo(()=>Object.keys(r),[r]);A.useEffect(()=>{n&&r[n.id]||!o.length||i(r[o[0]])},[r]),A.useEffect(()=>{o.length<2&&u(!0)},[o.length]);const[a,u]=A.useState(!0);return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs("div",{className:"flex h-full w-[356px] flex-col bg-grey-800",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between bg-grey-800 px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[C.jsx("span",{children:C.jsx(ye.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),C.jsx(rQ,{onCreate:c=>{i(c)}})]}),C.jsx(xX,{privileges:r,selectedPrivilege:n,selectPrivilege:c=>{i(c)}})]}),n&&r[n.id]?C.jsxs("div",{className:"privileges-container relative flex flex-1 flex-col overflow-x-auto border-l-[0.5px] border-grey-900 bg-grey-800",children:[C.jsxs("div",{className:"mb-1 flex h-full w-full flex-col items-stretch",children:[n.privilege!=="guest"?C.jsx(m9,{privileges:r,selectedPrivilege:n,onSelect:c=>i(t[c]),setShowIncluded:u,showIncluded:a}):null,C.jsx(tQ,{privileges:r,selectedPrivilege:n,onSelect:c=>i(t[c]),showIncluded:a})]}),C.jsx(iQ,{privileges:r,selectedPrivilege:n,setSelectedPrivilege:i})]}):C.jsx(mD,{tab:"Privilege"})]})},iQ=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=A.useState(!1);return C.jsx(De.Panel,{path:De.ROLES_TAB_PATH,isOpen:n,onOpen:()=>i(!0),onClose:()=>i(!1),children:C.jsx("div",{className:"h-full w-full px-3 pb-3",children:C.jsx("div",{className:"h-full w-full rounded bg-grey-900",children:C.jsx(p9,{dict:e,data:Z.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})};var yb={},na={},Tu={},LM;function Vk(){if(LM)return Tu;LM=1,Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.default=r;let e;const t=new Uint8Array(16);function r(){if(!e&&(e=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)}return Tu}var Xi={},ia={},oa={},BM;function oQ(){if(BM)return oa;BM=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.default=void 0;var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return oa.default=e,oa}var FM;function dl(){if(FM)return ia;FM=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.default=void 0;var e=t(oQ());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){return typeof i=="string"&&e.default.test(i)}var n=r;return ia.default=n,ia}var $M;function hl(){if($M)return Xi;$M=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.default=void 0,Xi.unsafeStringify=n;var e=t(dl());function t(a){return a&&a.__esModule?a:{default:a}}const r=[];for(let a=0;a<256;++a)r.push((a+256).toString(16).slice(1));function n(a,u=0){return r[a[u+0]]+r[a[u+1]]+r[a[u+2]]+r[a[u+3]]+"-"+r[a[u+4]]+r[a[u+5]]+"-"+r[a[u+6]]+r[a[u+7]]+"-"+r[a[u+8]]+r[a[u+9]]+"-"+r[a[u+10]]+r[a[u+11]]+r[a[u+12]]+r[a[u+13]]+r[a[u+14]]+r[a[u+15]]}function i(a,u=0){const c=n(a,u);if(!(0,e.default)(c))throw TypeError("Stringified UUID is invalid");return c}var o=i;return Xi.default=o,Xi}var zM;function aQ(){if(zM)return na;zM=1,Object.defineProperty(na,"__esModule",{value:!0}),na.default=void 0;var e=r(Vk()),t=hl();function r(d){return d&&d.__esModule?d:{default:d}}let n,i,o=0,a=0;function u(d,f,h){let p=f&&h||0;const v=f||new Array(16);d=d||{};let m=d.node||n,y=d.clockseq!==void 0?d.clockseq:i;if(m==null||y==null){const _=d.random||(d.rng||e.default)();m==null&&(m=n=[_[0]|1,_[1],_[2],_[3],_[4],_[5]]),y==null&&(y=i=(_[6]<<8|_[7])&16383)}let b=d.msecs!==void 0?d.msecs:Date.now(),x=d.nsecs!==void 0?d.nsecs:a+1;const w=b-o+(x-a)/1e4;if(w<0&&d.clockseq===void 0&&(y=y+1&16383),(w<0||b>o)&&d.nsecs===void 0&&(x=0),x>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=b,a=x,i=y,b+=122192928e5;const S=((b&268435455)*1e4+x)%4294967296;v[p++]=S>>>24&255,v[p++]=S>>>16&255,v[p++]=S>>>8&255,v[p++]=S&255;const E=b/4294967296*1e4&268435455;v[p++]=E>>>8&255,v[p++]=E&255,v[p++]=E>>>24&15|16,v[p++]=E>>>16&255,v[p++]=y>>>8|128,v[p++]=y&255;for(let _=0;_<6;++_)v[p+_]=m[_];return f||(0,t.unsafeStringify)(v)}var c=u;return na.default=c,na}var aa={},kn={},sa={},HM;function Wk(){if(HM)return sa;HM=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.default=void 0;var e=t(dl());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){if(!(0,e.default)(i))throw TypeError("Invalid UUID");let o;const a=new Uint8Array(16);return a[0]=(o=parseInt(i.slice(0,8),16))>>>24,a[1]=o>>>16&255,a[2]=o>>>8&255,a[3]=o&255,a[4]=(o=parseInt(i.slice(9,13),16))>>>8,a[5]=o&255,a[6]=(o=parseInt(i.slice(14,18),16))>>>8,a[7]=o&255,a[8]=(o=parseInt(i.slice(19,23),16))>>>8,a[9]=o&255,a[10]=(o=parseInt(i.slice(24,36),16))/1099511627776&255,a[11]=o/4294967296&255,a[12]=o>>>24&255,a[13]=o>>>16&255,a[14]=o>>>8&255,a[15]=o&255,a}var n=r;return sa.default=n,sa}var UM;function Gk(){if(UM)return kn;UM=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.URL=kn.DNS=void 0,kn.default=a;var e=hl(),t=r(Wk());function r(u){return u&&u.__esModule?u:{default:u}}function n(u){u=unescape(encodeURIComponent(u));const c=[];for(let d=0;d<u.length;++d)c.push(u.charCodeAt(d));return c}const i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";kn.DNS=i;const o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";kn.URL=o;function a(u,c,d){function f(h,p,v,m){var y;if(typeof h=="string"&&(h=n(h)),typeof p=="string"&&(p=(0,t.default)(p)),((y=p)===null||y===void 0?void 0:y.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let b=new Uint8Array(16+h.length);if(b.set(p),b.set(h,p.length),b=d(b),b[6]=b[6]&15|c,b[8]=b[8]&63|128,v){m=m||0;for(let x=0;x<16;++x)v[m+x]=b[x];return v}return(0,e.unsafeStringify)(b)}try{f.name=u}catch{}return f.DNS=i,f.URL=o,f}return kn}var ua={},VM;function sQ(){if(VM)return ua;VM=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.default=void 0;function e(v){if(typeof v=="string"){const m=unescape(encodeURIComponent(v));v=new Uint8Array(m.length);for(let y=0;y<m.length;++y)v[y]=m.charCodeAt(y)}return t(n(i(v),v.length*8))}function t(v){const m=[],y=v.length*32,b="0123456789abcdef";for(let x=0;x<y;x+=8){const w=v[x>>5]>>>x%32&255,S=parseInt(b.charAt(w>>>4&15)+b.charAt(w&15),16);m.push(S)}return m}function r(v){return(v+64>>>9<<4)+14+1}function n(v,m){v[m>>5]|=128<<m%32,v[r(m)-1]=m;let y=1732584193,b=-271733879,x=-1732584194,w=271733878;for(let S=0;S<v.length;S+=16){const E=y,_=b,R=x,P=w;y=c(y,b,x,w,v[S],7,-680876936),w=c(w,y,b,x,v[S+1],12,-389564586),x=c(x,w,y,b,v[S+2],17,606105819),b=c(b,x,w,y,v[S+3],22,-1044525330),y=c(y,b,x,w,v[S+4],7,-176418897),w=c(w,y,b,x,v[S+5],12,1200080426),x=c(x,w,y,b,v[S+6],17,-1473231341),b=c(b,x,w,y,v[S+7],22,-45705983),y=c(y,b,x,w,v[S+8],7,1770035416),w=c(w,y,b,x,v[S+9],12,-1958414417),x=c(x,w,y,b,v[S+10],17,-42063),b=c(b,x,w,y,v[S+11],22,-1990404162),y=c(y,b,x,w,v[S+12],7,1804603682),w=c(w,y,b,x,v[S+13],12,-40341101),x=c(x,w,y,b,v[S+14],17,-1502002290),b=c(b,x,w,y,v[S+15],22,1236535329),y=d(y,b,x,w,v[S+1],5,-165796510),w=d(w,y,b,x,v[S+6],9,-1069501632),x=d(x,w,y,b,v[S+11],14,643717713),b=d(b,x,w,y,v[S],20,-373897302),y=d(y,b,x,w,v[S+5],5,-701558691),w=d(w,y,b,x,v[S+10],9,38016083),x=d(x,w,y,b,v[S+15],14,-660478335),b=d(b,x,w,y,v[S+4],20,-405537848),y=d(y,b,x,w,v[S+9],5,568446438),w=d(w,y,b,x,v[S+14],9,-1019803690),x=d(x,w,y,b,v[S+3],14,-187363961),b=d(b,x,w,y,v[S+8],20,1163531501),y=d(y,b,x,w,v[S+13],5,-1444681467),w=d(w,y,b,x,v[S+2],9,-51403784),x=d(x,w,y,b,v[S+7],14,1735328473),b=d(b,x,w,y,v[S+12],20,-1926607734),y=f(y,b,x,w,v[S+5],4,-378558),w=f(w,y,b,x,v[S+8],11,-2022574463),x=f(x,w,y,b,v[S+11],16,1839030562),b=f(b,x,w,y,v[S+14],23,-35309556),y=f(y,b,x,w,v[S+1],4,-1530992060),w=f(w,y,b,x,v[S+4],11,1272893353),x=f(x,w,y,b,v[S+7],16,-155497632),b=f(b,x,w,y,v[S+10],23,-1094730640),y=f(y,b,x,w,v[S+13],4,681279174),w=f(w,y,b,x,v[S],11,-358537222),x=f(x,w,y,b,v[S+3],16,-722521979),b=f(b,x,w,y,v[S+6],23,76029189),y=f(y,b,x,w,v[S+9],4,-640364487),w=f(w,y,b,x,v[S+12],11,-421815835),x=f(x,w,y,b,v[S+15],16,530742520),b=f(b,x,w,y,v[S+2],23,-995338651),y=h(y,b,x,w,v[S],6,-198630844),w=h(w,y,b,x,v[S+7],10,1126891415),x=h(x,w,y,b,v[S+14],15,-1416354905),b=h(b,x,w,y,v[S+5],21,-57434055),y=h(y,b,x,w,v[S+12],6,1700485571),w=h(w,y,b,x,v[S+3],10,-1894986606),x=h(x,w,y,b,v[S+10],15,-1051523),b=h(b,x,w,y,v[S+1],21,-2054922799),y=h(y,b,x,w,v[S+8],6,1873313359),w=h(w,y,b,x,v[S+15],10,-30611744),x=h(x,w,y,b,v[S+6],15,-1560198380),b=h(b,x,w,y,v[S+13],21,1309151649),y=h(y,b,x,w,v[S+4],6,-145523070),w=h(w,y,b,x,v[S+11],10,-1120210379),x=h(x,w,y,b,v[S+2],15,718787259),b=h(b,x,w,y,v[S+9],21,-343485551),y=o(y,E),b=o(b,_),x=o(x,R),w=o(w,P)}return[y,b,x,w]}function i(v){if(v.length===0)return[];const m=v.length*8,y=new Uint32Array(r(m));for(let b=0;b<m;b+=8)y[b>>5]|=(v[b/8]&255)<<b%32;return y}function o(v,m){const y=(v&65535)+(m&65535);return(v>>16)+(m>>16)+(y>>16)<<16|y&65535}function a(v,m){return v<<m|v>>>32-m}function u(v,m,y,b,x,w){return o(a(o(o(m,v),o(b,w)),x),y)}function c(v,m,y,b,x,w,S){return u(m&y|~m&b,v,m,x,w,S)}function d(v,m,y,b,x,w,S){return u(m&b|y&~b,v,m,x,w,S)}function f(v,m,y,b,x,w,S){return u(m^y^b,v,m,x,w,S)}function h(v,m,y,b,x,w,S){return u(y^(m|~b),v,m,x,w,S)}var p=e;return ua.default=p,ua}var WM;function uQ(){if(WM)return aa;WM=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.default=void 0;var e=r(Gk()),t=r(sQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return aa.default=i,aa}var ca={},la={},GM;function cQ(){if(GM)return la;GM=1,Object.defineProperty(la,"__esModule",{value:!0}),la.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return la.default=t,la}var KM;function lQ(){if(KM)return ca;KM=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.default=void 0;var e=n(cQ()),t=n(Vk()),r=hl();function n(a){return a&&a.__esModule?a:{default:a}}function i(a,u,c){if(e.default.randomUUID&&!u&&!a)return e.default.randomUUID();a=a||{};const d=a.random||(a.rng||t.default)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,u){c=c||0;for(let f=0;f<16;++f)u[c+f]=d[f];return u}return(0,r.unsafeStringify)(d)}var o=i;return ca.default=o,ca}var fa={},da={},YM;function fQ(){if(YM)return da;YM=1,Object.defineProperty(da,"__esModule",{value:!0}),da.default=void 0;function e(i,o,a,u){switch(i){case 0:return o&a^~o&u;case 1:return o^a^u;case 2:return o&a^o&u^a&u;case 3:return o^a^u}}function t(i,o){return i<<o|i>>>32-o}function r(i){const o=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof i=="string"){const f=unescape(encodeURIComponent(i));i=[];for(let h=0;h<f.length;++h)i.push(f.charCodeAt(h))}else Array.isArray(i)||(i=Array.prototype.slice.call(i));i.push(128);const u=i.length/4+2,c=Math.ceil(u/16),d=new Array(c);for(let f=0;f<c;++f){const h=new Uint32Array(16);for(let p=0;p<16;++p)h[p]=i[f*64+p*4]<<24|i[f*64+p*4+1]<<16|i[f*64+p*4+2]<<8|i[f*64+p*4+3];d[f]=h}d[c-1][14]=(i.length-1)*8/Math.pow(2,32),d[c-1][14]=Math.floor(d[c-1][14]),d[c-1][15]=(i.length-1)*8&4294967295;for(let f=0;f<c;++f){const h=new Uint32Array(80);for(let x=0;x<16;++x)h[x]=d[f][x];for(let x=16;x<80;++x)h[x]=t(h[x-3]^h[x-8]^h[x-14]^h[x-16],1);let p=a[0],v=a[1],m=a[2],y=a[3],b=a[4];for(let x=0;x<80;++x){const w=Math.floor(x/20),S=t(p,5)+e(w,v,m,y)+b+o[w]+h[x]>>>0;b=y,y=m,m=t(v,30)>>>0,v=p,p=S}a[0]=a[0]+p>>>0,a[1]=a[1]+v>>>0,a[2]=a[2]+m>>>0,a[3]=a[3]+y>>>0,a[4]=a[4]+b>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,a[0]&255,a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,a[1]&255,a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,a[2]&255,a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,a[3]&255,a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,a[4]&255]}var n=r;return da.default=n,da}var XM;function dQ(){if(XM)return fa;XM=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.default=void 0;var e=r(Gk()),t=r(fQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return fa.default=i,fa}var ha={},ZM;function hQ(){if(ZM)return ha;ZM=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.default=void 0;var e="00000000-0000-0000-0000-000000000000";return ha.default=e,ha}var pa={},JM;function pQ(){if(JM)return pa;JM=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.default=void 0;var e=t(dl());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){if(!(0,e.default)(i))throw TypeError("Invalid UUID");return parseInt(i.slice(14,15),16)}var n=r;return pa.default=n,pa}var QM;function vQ(){return QM||(QM=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return a.default}});var t=f(aQ()),r=f(uQ()),n=f(lQ()),i=f(dQ()),o=f(hQ()),a=f(pQ()),u=f(dl()),c=f(hl()),d=f(Wk());function f(h){return h&&h.__esModule?h:{default:h}}})(yb)),yb}var bb,eD;function gQ(){if(eD)return bb;eD=1;function e(t,r){if(!t||!r||!t.length||!r.length)throw new Error("Bad alphabet");this.srcAlphabet=t,this.dstAlphabet=r}return e.prototype.convert=function(t){var r,n,i,o={},a=this.srcAlphabet.length,u=this.dstAlphabet.length,c=t.length,d=typeof t=="string"?"":[];if(!this.isValid(t))throw new Error('Number "'+t+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return t;for(r=0;r<c;r++)o[r]=this.srcAlphabet.indexOf(t[r]);do{for(n=0,i=0,r=0;r<c;r++)n=n*a+o[r],n>=u?(o[i++]=parseInt(n/u,10),n=n%u):i>0&&(o[i++]=0);c=i,d=this.dstAlphabet.slice(n,n+1).concat(d)}while(i!==0);return d},e.prototype.isValid=function(t){for(var r=0;r<t.length;++r)if(this.srcAlphabet.indexOf(t[r])===-1)return!1;return!0},bb=e,bb}var xb,tD;function mQ(){if(tD)return xb;tD=1;var e=gQ();function t(r,n){var i=new e(r,n);return function(o){return i.convert(o)}}return t.BIN="01",t.OCT="01234567",t.DEC="0123456789",t.HEX="0123456789abcdef",xb=t,xb}var wb,rD;function yQ(){if(rD)return wb;rD=1;const{v4:e,validate:t}=vQ(),r=mQ(),n={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},i={consistentLength:!0};let o;const a=(d,f,h)=>{const p=f(d.toLowerCase().replace(/-/g,""));return!h||!h.consistentLength?p:p.padStart(h.shortIdLength,h.paddingChar)},u=(d,f)=>{const p=f(d).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[p[1],p[2],p[3],p[4],p[5]].join("-")},c=d=>Math.ceil(Math.log(2**128)/Math.log(d));return wb=(()=>{const d=(f,h)=>{const p=f||n.flickrBase58,v={...i,...h};if([...new Set(Array.from(p))].length!==p.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const m=c(p.length),y={shortIdLength:m,consistentLength:v.consistentLength,paddingChar:p[0]},b=r(r.HEX,p),x=r(p,r.HEX),w=()=>a(e(),b,y),E={alphabet:p,fromUUID:_=>a(_,b,y),maxLength:m,generate:w,new:w,toUUID:_=>u(_,x),uuid:e,validate:(_,R=!1)=>{if(!_||typeof _!="string")return!1;const P=v.consistentLength?_.length===m:_.length<=m,N=_.split("").every(j=>p.includes(j));return R===!1?P&&N:P&&N&&t(u(_,x))}};return Object.freeze(E),E};return d.constants=n,d.uuid=e,d.generate=()=>(o||(o=d(n.flickrBase58).generate),o()),d})(),wb}var bQ=yQ();const xQ=({role:e})=>{var R;const[t,r]=A.useState(e),[n,i]=A.useState(e.role),[o,a]=A.useState(null),u=Z.useAppSelector(Z.selectPrivileges),c=((R=t.privileges)==null?void 0:R.filter(P=>u[P]&&u[P].privilege!=="guest").length)||0,d=Z.useAppSelector(Z.selectRoles),f=Z.useAppDispatch(),{selectedRole:h,selectRole:p}=Yb(),[v,m]=A.useState(!1),y=De.useOutsideClick(()=>{v&&x()});A.useEffect(()=>{e.role||m(!0)},[]),A.useEffect(()=>{r(e)},[e]);const b=()=>{a(""),m(!0)},x=()=>{a(null),e.role&&e.role===n&&m(!1);try{const P=Z.saveRole({...t,role:n},d);f(Z.updateRoles(P)),m(!1)}catch(P){a(P.message)}},w=Z.useAppDispatch(),S=async P=>{P.stopPropagation();const{confirmed:N}=await w(Z.openModal({title:"Delete Role",type:De.ModalType.CONFIRM,color:De.ModalColor.DANGER,message:"Are you sure you want to remove this Role?",icon:"FdWarningDanger"})).unwrap();N&&E()},E=()=>{const P=Z.removeRole(t.id,d),N=Object.keys(P),j=N.length>=1,L=N[N.length-1];p(L&&j?L:null),f(Z.updateRoles(P))},_=(P=null)=>{if(P&&P.stopPropagation(),!e.role){E();return}m(!1),i(e.role)};return C.jsx(C.Fragment,{children:C.jsxs("div",{className:Ve("rounded border bg-grey-300 p-2",{"border-grey-100":h!==t.id,"border-primary-dark":h===t.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{p(t.id)},ref:y,children:[C.jsx("div",{className:"flex items-center justify-between",children:C.jsxs("div",{className:"flex flex-1 items-center text-white",children:[C.jsx("span",{className:"mr-4",children:C.jsx(ye.FdGroup,{className:"h-6 w-6"})}),v?C.jsxs("div",{className:"relative h-6 flex-1",children:[C.jsx("input",{type:"text",value:n,onChange:({target:{value:P}})=>{i(P)},onKeyDown:P=>{P.key==="Enter"&&x(),P.key==="Escape"&&_()},className:Ve("absolute inset-0 mr-2 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:border-primary-dark focus:outline-none",{"border-b border-red-400":o}),placeholder:"role",autoComplete:"off",autoFocus:!0}),o&&C.jsx("p",{className:"absolute top-5 mt-1 rounded bg-red-400 p-1 text-xs text-white shadow-md",children:o})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",title:n,children:t.role}),C.jsx("div",{className:Ve("justify-betwee ml-auto flex w-fit items-center gap-x-2"),children:v?C.jsxs(C.Fragment,{children:[C.jsx("button",{onClick:x,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(ye.FdSave,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:_,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(ye.FdClose,{className:"h-4 w-4 text-grey-50"})})]}):C.jsxs(C.Fragment,{children:[C.jsx("button",{onClick:b,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(ye.FdPen,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:P=>S(P),className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(ye.FdTrash,{className:"h-4 w-4 text-grey-50"})})]})})]})}),C.jsxs("span",{className:Ve("ml-[43px] py-1 text-xs text-white"),children:[c," Privilege",c>1?"s":""]})]})})},Kk=(e,t)=>e?t[e]:null,nD=(e,t,r)=>{const n=Kk(e,r);return n?Object.values(r).reduce((i,o)=>o.id===e?n.privileges.includes(t)?{...i,[n.id]:{...n,privileges:n.privileges.filter(a=>a!==t)}}:{...i,[n.id]:{...n,privileges:[...n.privileges,t]}}:{...i,[o.id]:o},{}):r},wQ=()=>{const e=Z.useAppSelector(Z.selectPrivileges),t=Z.useAppSelector(Z.selectRoles),r=Z.useAppDispatch(),{selectedRole:n}=Yb(),i=Kk(n,t),o=(a,u)=>u&&u.privileges.includes(a.id);return C.jsxs("div",{className:"w-full border-b border-grey-900 p-4 ",children:[C.jsx("div",{className:"mb-4 flex items-center gap-x-5 text-white",children:C.jsx("h4",{className:"text-[13px] font-semibold ",children:"Privileges"})}),C.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[C.jsx("div",{"data-cy":"item=>Permisions",className:Ve("inline-flex items-center gap-1 space-x-1 rounded bg-primary-darker px-2 py-0.5 text-xs font-semibold italic text-white"),children:"guest"}),Object.values(e).filter(a=>o(a,i)&&a.privilege!=="guest").map((a,u)=>C.jsxs("div",{"data-cy":"item=>Permisions",className:Ve("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":o(a,i),"bg-grey-300 text-grey-100":!o(a,i)}),onClick:()=>{const c=nD(i.id,a.id,t);r(Z.updateRoles(c))},children:[C.jsx("span",{className:"text-xs",children:a.privilege}),C.jsx("button",{className:"focus:outline-none",children:o(a,i)?C.jsx(ye.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(ye.FdPlus,{className:"h-[14px] w-[14px]"})})]},u)),Object.values(e).filter(a=>!o(a,i)&&a.privilege!=="guest").map((a,u)=>C.jsxs("div",{"data-cy":"item=>Permisions",className:Ve("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":o(a,i),"bg-grey-300 text-grey-100":!o(a,i)}),onClick:()=>{const c=nD(i.id,a.id,t);r(Z.updateRoles(c))},children:[C.jsx("span",{className:"text-xs",children:a.privilege}),C.jsx("button",{className:"text-white focus:outline-none",children:o(a,i)?C.jsx(ye.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(ye.FdPlus,{className:"h-[14px] w-[14px]"})})]},u))]})]})},_Q=({children:e})=>C.jsx("div",{className:"h-full w-full",children:C.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"absolute -right-full h-10 w-10 translate-x-1"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})}),Gb=(e,t,r,n=!1)=>{const i=e.applyTo,o=e.type===Z.EPermissionType.DATACLASS?"ds":i.split(".")[0],a={...t,...r},u=()=>({value:!n,inherited:!1,from:[],explicitly:!1}),c={read:u(),create:u(),update:u(),drop:u(),execute:u(),promote:u()},d=h=>{h.forEach(p=>{a[p]&&(a[p].resources.forEach(v=>{if(v.resource===i||v.resource===o){const m=Gb(e,t,{[p]:a[p]},n);Object.values(v.permissions).forEach(y=>{c[y.name].explicitly||(!c[y.name].from.includes(a[p].privilege)&&y.checked&&c[y.name].from.push(a[p].privilege),c[y.name].inherited=c[y.name].inherited||m[y.name].value||m[y.name].inherited)})}}),a[p].includes.length>0&&d(a[p].includes))})};if(Object.values(r).forEach(h=>{h.resources.forEach(p=>{p.resource===i&&Object.values(p.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))})}),(h.includes.length>0||h.privilege==="guest")&&d(h.includes)}),Object.values(t).forEach(h=>{h.resources.forEach(p=>{p.resource===i&&(h.privilege==="guest"?Object.values(p.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))}):Object.values(p.permissions).forEach(v=>{!c[v.name].explicitly&&v.checked&&(n?c[v.name].value=!0:c[v.name].value=!1)}))})}),(n?Object.entries(c).some(([h,p])=>h!=="promote"&&!p.value&&!p.explicitly):Object.entries(c).some(([h,p])=>h!=="promote"&&p.value&&!p.explicitly))&&![Z.EPermissionType.DATASTORE,Z.EPermissionType.SINGLETON].includes(e.type)){const h={applyTo:o,type:e.type===Z.EPermissionType.DATACLASS?Z.EPermissionType.DATASTORE:e.type===Z.EPermissionType.SINGLETON_METHOD?Z.EPermissionType.SINGLETON:Z.EPermissionType.DATACLASS},p=Gb(h,t,r,n),v=m=>{let y=c[m].value;return n?!c[m].value&&!c[m].explicitly&&(y=p[m].value):c[m].value&&!c[m].explicitly&&(y=p[m].value),{value:y,inherited:c[m].inherited||p[m].inherited,from:c[m].from.length>0?c[m].from:p[m].from,explicitly:c[m].explicitly}};return{read:v("read"),create:v("create"),update:v("update"),drop:v("drop"),execute:v("execute"),promote:v("promote")}}return{read:c.read,create:c.create,update:c.update,drop:c.drop,execute:c.execute,promote:c.promote}},EQ=e=>{switch(e){case"dataclass":return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"});case"singleton":return C.jsx(ye.FdSingleton,{className:"h-6 w-6"});case"datastore":return C.jsx(ye.FdModel3,{className:"h-6 w-6"});case"attribute":return C.jsx(ye.FdTableColumn,{className:"h-6 w-6"});case"method":return C.jsx(ye.FdCode,{className:"h-6 w-6"});case"singletonMethod":return C.jsx(ye.FdFunctionSingleton,{className:"h-6 w-6"});case"entityselMethod":return C.jsx(ye.FdFunctionSelection,{className:"h-6 w-6"});case"entityMethod":return C.jsx(ye.FdFunctionEntity,{className:"h-6 w-6"});case"dsMethod":return C.jsx(ye.FdFunctionDatastore,{className:"h-6 w-6"});case"dataclassMethod":return C.jsx(ye.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"})}},va=Hx,ga=Ux,uo=({privileges:e,permission:t,hasChild:r,depth:n,isChild:i=!1,className:o,inSearch:a,toggleCollapse:u,collapsed:c,isRestrictedByDefault:d,toastMessageCallback:f})=>{const[h,p]=t.applyTo.split("."),v=A.useMemo(()=>Gb(t,e.otherPrivs,e.rolePrivs,d),[e,t,d]);return C.jsxs("tr",{className:Ve("group even:bg-grey-600",o),children:[C.jsxs("td",{className:Ve("flex h-full w-full items-center gap-3 p-0 text-xs group-hover:rounded-l group-hover:bg-grey-300",{"px-1":a}),children:[Array(n).fill("").map((m,y)=>C.jsx("div",{className:Ve("ml-1.5 mr-1 h-full w-0.5 border-l-2 border-grey-100",{"mr-0.5":i})},y)),r&&C.jsx("button",{onClick:u,className:"w-3",children:c?C.jsx(ye.FdRight,{className:"inline h-4 w-4"}):C.jsx(ye.FdDown,{className:"inline h-4 w-4"})}),EQ(t.type),a?t.applyTo:p||h]}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[Z.EPermissionType.ATTRIBUTE,Z.EPermissionType.DATASTORE,Z.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:Ve("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.read.value||v.read.inherited}),onClick:f,children:(v.read.value||v.read.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.read.value&&v.read.inherited?C.jsxs(va,{openDelay:0,closeDelay:0,children:[C.jsx(ga,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.read.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.read.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[Z.EPermissionType.ATTRIBUTE,Z.EPermissionType.DATASTORE,Z.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:Ve("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.create.value||v.create.inherited}),onClick:f,children:(v.create.value||v.create.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.create.value&&v.create.inherited?C.jsxs(va,{openDelay:0,closeDelay:0,children:[C.jsx(ga,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.create.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.create.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[Z.EPermissionType.ATTRIBUTE,Z.EPermissionType.DATASTORE,Z.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:Ve("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.update.value||v.update.inherited}),onClick:f,children:(v.update.value||v.update.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.update.value&&v.update.inherited?C.jsxs(va,{openDelay:0,closeDelay:0,children:[C.jsx(ga,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.update.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.update.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[Z.EPermissionType.ATTRIBUTE,Z.EPermissionType.DATASTORE,Z.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:Ve("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.drop.value||v.drop.inherited}),onClick:f,children:(v.drop.value||v.drop.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.drop.value&&v.drop.inherited?C.jsxs(va,{openDelay:0,closeDelay:0,children:[C.jsx(ga,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.drop.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.drop.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-grey-300",children:t.type!=="attribute"&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:Ve("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.execute.value||v.execute.inherited}),onClick:f,children:(v.execute.value||v.execute.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.execute.value&&v.execute.inherited?C.jsxs(va,{openDelay:0,closeDelay:0,children:[C.jsx(ga,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Dr,{children:C.jsx(jr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.execute.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.execute.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})})]})},iD=({depth:e,permission:t,privileges:r,childCollapsed:n,didChildCollapsed:i,toastMessageCallback:o})=>{const[a,u]=A.useState(n),c=Z.useAppSelector(Z.selectRestrictedByDefault),d=Z.useAppSelector(Z.selectPrivileges);return A.useEffect(()=>{n===!0&&u(!0)},[n]),C.jsxs(C.Fragment,{children:[C.jsx(uo,{privileges:r,permission:t,isChild:!0,depth:e,hasChild:!0,toggleCollapse:()=>{const f=!a;u(f),i==null||i(f)},isRestrictedByDefault:c,allPrivileges:d,collapsed:a,toastMessageCallback:o}),!a&&C.jsxs(C.Fragment,{children:[t.attributes.map((f,h)=>C.jsx(uo,{privileges:r,permission:f,depth:e+1,isRestrictedByDefault:c,allPrivileges:d,toastMessageCallback:o},`${f.type}-${h}`)),t.methods.map((f,h)=>C.jsx(uo,{privileges:r,permission:f,depth:e+1,isRestrictedByDefault:c,allPrivileges:d,toastMessageCallback:o},`${f.type}-${h}`))]})]})},SQ=({selectedRole:e})=>{const[t,r]=A.useState(null),[n,i]=A.useState(null),{styles:o,attributes:a}=xc(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),u=Z.useAppSelector(Z.selectRestrictedByDefault),c=Z.useAppSelector(Z.selectPrivileges),[d,f]=A.useState([]),[h,p]=A.useState(""),v=Z.useAppSelector(Z.selectCatalogMethods),m=Z.useAppSelector(Z.selectDataclasses),y=Z.useAppSelector(Z.selectSingletons),[b,x]=A.useState({}),[w,S]=A.useState([]);A.useEffect(()=>{const B=g9(v,Object.values(m),Object.values(y));x(B)},[e]);function E(B){const $=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"];return B.sort((W,Y)=>{const ee=$.indexOf(W.type),H=$.indexOf(Y.type);return ee!==H?ee-H:W.applyTo.toLowerCase()>Y.applyTo.toLowerCase()?1:-1})}A.useEffect(()=>{S(E(Ax(h,v,Object.values(m),Object.values(y)).filter(B=>d.length?d.includes(B.type):!0)))},[d,h]);const[_,R]=A.useState(!1),P=B=>{f($=>$.some(W=>B.includes(W))?$.filter(W=>!B.includes(W)):[...$,...B])},N=Z.useAppSelector(Z.selectRoles),j={toggleAllCollapsed:B=>{B.allCollapsed=!B.allCollapsed},toggleChildCollapsed:B=>{B.childCollapsed=!B.childCollapsed},setAllCollapsed:(B,$)=>{B.allCollapsed=$},setChildCollapsed:(B,$)=>{B.childCollapsed=$}},L=A.useMemo(()=>{const B=Object.values(c).find(H=>H.privilege==="guest"),$=N[e],W=$?Object.fromEntries($.privileges.map(H=>[H,c[H]]).filter(([,H])=>!!H)):{};if(u)return{rolePrivs:W,otherPrivs:B?{[B.id]:B}:{}};const Y=B?{[B.id]:{...B,active:!0}}:{},ee=Object.fromEntries(Object.entries(c).filter(([H])=>H!==(B==null?void 0:B.id)&&!($!=null&&$.privileges.includes(H))).map(([H,Q])=>[H,{...Q,active:!1}]));return{rolePrivs:W,otherPrivs:{...Y,...ee}}},[c,N,e,u]),{state:{allCollapsed:F,childCollapsed:k},dispatch:D}=De.useEnhancedState({allCollapsed:!1,childCollapsed:!1},j,"Table Collapse Store"),T=()=>{De.toastSubject.next({kind:"info",markdown:!0,message:'<div className="flex gap-x-1 items-center"><h3 className="font-bold mr-1">Info:</h3><p className="font-normal">You can add or modify permissions only in the Privilege section.</p></div>',customIcon:ye.FdInfoCircle})};return C.jsxs(ll,{className:"z-20 h-full flex-1 overflow-auto bg-grey-800 p-[15px] pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[C.jsxs("table",{className:"relative h-full w-full",children:[C.jsx("thead",{className:"sticky top-0 z-20 bg-grey-800",children:C.jsxs("tr",{className:"border-b border-grey-100",children:[C.jsx("td",{className:"py-2",children:C.jsxs("div",{className:"flex items-center space-x-2",children:[C.jsx(De.FloatingTooltip,{message:"Collapse All",side:"top",portalled:!1,children:C.jsx("button",{onClick:()=>{k?(D.setAllCollapsed(!0),R(!0)):D.setChildCollapsed(!0)},className:Ve("cursor-pointer rounded-md p-1 hover:bg-primary-hover focus:outline-none",{"pointer-events-none text-grey-200":F,"text-white":!F}),children:C.jsx(ye.FdCollapseAll,{className:"h-4 w-4"})})}),C.jsxs("div",{className:"relative w-56 text-white",children:[C.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center px-1",children:C.jsx(ye.FdSearch,{className:"h-4 w-4 text-gray-400"})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2",children:C.jsx(xr.Popover,{className:"flex items-center",children:({open:B})=>C.jsxs(C.Fragment,{children:[C.jsx(xr.Popover.Button,{ref:r,children:C.jsx(ye.FdAdjust,{className:"h-4 w-4"})}),B&&C.jsx(fl,{children:C.jsxs(xr.Popover.Panel,{ref:i,style:o.popper,...a.popper,className:"z-50 rounded-md border border-grey-50 bg-grey-900 px-4 py-2.5 text-xs text-grey-50",static:!0,children:[C.jsx("h5",{className:"mb-2 text-sm",children:"Filter"}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:d.includes("datastore"),onChange:()=>{P(["datastore"])},label:"Datastore"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:d.includes("dataclass"),onChange:()=>{P(["dataclass"])},label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:d.includes("singleton"),onChange:()=>{P(["singleton"])},label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:d.some($=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes($)),onChange:()=>{P(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(De.Checkbox,{isChecked:d.includes("attribute"),onChange:()=>{P(["attribute"])},label:"Attribute"})})]})]})})]})})}),C.jsx("input",{type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-6 text-xs focus:outline-none",placeholder:"Search",value:h,onChange:B=>{p(B.target.value)}})]})]})}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"read"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Create"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Update"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Delete"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Execute"})]})}),C.jsx("tbody",{className:"relative bg-grey-800 text-white",children:d.length||h?w.map((B,$)=>C.jsx(uo,{privileges:L,permission:B,depth:0,inSearch:!0,isRestrictedByDefault:u,allPrivileges:c,toastMessageCallback:T},`${B.type}-${$}`)):Object.values(b).map((B,$)=>C.jsxs(A.Fragment,{children:[C.jsx(uo,{privileges:L,permission:B,isRestrictedByDefault:u,allPrivileges:c,hasChild:!0,depth:0,toggleCollapse:()=>{const W=!_;R(W),D.setAllCollapsed(!W&&F?!1:F)},collapsed:_,toastMessageCallback:T}),B.type==="datastore"&&!_?C.jsxs(C.Fragment,{children:[B.methods.map((W,Y)=>C.jsx(uo,{privileges:L,isRestrictedByDefault:u,allPrivileges:c,permission:W,depth:1,collapsed:F||!1,toastMessageCallback:T},`${W.type}-${Y}`)),B.dataClasses.map((W,Y)=>C.jsx(iD,{depth:1,privileges:L,permission:W,childCollapsed:k,didChildCollapsed:ee=>{D.setChildCollapsed(ee?k:!1)},toastMessageCallback:T},`${W.type}-${Y}`))]}):null,B.singletons.map((W,Y)=>C.jsx(iD,{depth:0,privileges:L,permission:W,childCollapsed:F,didChildCollapsed:ee=>{D.setAllCollapsed(ee?F:!1)},toastMessageCallback:T},`${W.type}-${Y}`))]},`${B.type}-${$}`))})]}),(h||d.length)&&!w.length?C.jsx(_Q,{children:"The Permission you're looking for can't be found "}):null]})},OQ=()=>{const e=Z.useAppSelector(Z.selectRoles),t=Z.useAppDispatch(),[r,n]=A.useState(null),[i,o]=A.useState(null),[a,u]=A.useState(""),[c,d]=A.useState(null),{styles:f,attributes:h}=xc(r,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});A.useEffect(()=>{u(""),d(null)},[i]);const p=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(e).find(b=>b.role===a))throw new Error(`A role with the name ${a} already exists`);const m=bQ.generate(),y=Z.createRole(m,a,e);t(Z.updateRoles(y))};return C.jsx(xr.Popover,{children:({open:v,close:m})=>{const y=()=>{d(null);try{p(),m()}catch(b){d(b.message)}};return C.jsxs(C.Fragment,{children:[C.jsx(xr.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:n,children:C.jsx("span",{children:C.jsx(ye.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(fl,{children:C.jsxs(xr.Popover.Panel,{ref:o,style:f.popper,...h.popper,"data-cy":"New-priv-pop-up",className:"z-50 min-w-[256px] rounded border border-grey-50 bg-grey-900 px-4 py-2 text-xs text-grey-50 shadow-md",static:!0,children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Role"}),C.jsxs("div",{className:"mt-2",children:[C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{className:"text-grey-100",children:"Name"}),C.jsx("input",{autoFocus:!0,value:a,onChange:b=>u(b.target.value),onKeyDown:b=>{b.key==="Enter"&&y()},type:"text",className:Ve("w-full rounded border bg-grey-300 p-1 focus:outline-none",{"border-grey-100":!c,"border-red-400":c})})]}),c&&C.jsx("p",{className:"mt-1 text-xs text-red-400",children:c})]}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx("button",{className:"rounded border border-primary-dark bg-primary-dark px-4 py-1 hover:border-primary-hover hover:bg-primary-hover",onClick:()=>{y()},children:"Create"}),C.jsx("button",{className:"rounded border border-grey-100 px-4 py-1 text-grey-100 hover:bg-white hover:text-primary-dark",onClick:()=>m(),children:"Cancel"})]})]})})]})}})},CQ=()=>{const e=Z.useAppSelector(Z.selectRoles),{selectedRole:t}=Yb();return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs("div",{className:"flex h-full w-[356px] flex-col bg-grey-800",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between bg-grey-800 px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[C.jsx("span",{children:C.jsx(ye.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),C.jsx(OQ,{})]}),C.jsx("div",{className:"flex-1 space-y-4 overflow-auto p-4 pb-10 pt-1",children:Object.values(e).map((r,n)=>C.jsx(xQ,{role:r},n))})]}),C.jsx("div",{className:Ve("relative flex h-full w-full flex-1 flex-col items-stretch overflow-x-auto bg-grey-800",{"border-l-[0.5px] border-grey-900":t}),children:C.jsx("div",{className:"flex h-full w-full select-none flex-col bg-grey-800",children:t?C.jsxs(C.Fragment,{children:[C.jsx(wQ,{}),C.jsx(SQ,{selectedRole:t})]}):C.jsx(mD,{tab:"Role"})})})]})};function Yk(){const e=Z.useAppSelector(Z.selectRolesFlags),t=Z.useAppDispatch();A.useEffect(()=>{t(Z.setTabFlags({path:De.ROLES_TAB_PATH,flags:e}))},[e])}const Xk=()=>{const e=Z.useAppSelector(Z.selectQodly),t=Z.useAppSelector(Z.selectSelectedTab),r=Z.useAppSelector(Z.selectForceLogin),n=Z.useAppSelector(Z.selectRestrictedByDefault),i=A.useRef(),o=Z.useAppDispatch();return Yk(),C.jsx("div",{className:"absolute inset-0 flex flex-1 overflow-hidden",children:C.jsx("div",{className:"relative flex flex-1 overflow-x-auto bg-grey-900","data-cy":"Roles&Privileges-editor-cy",ref:a=>i.current=a,children:C.jsxs("div",{className:"flex w-full flex-col",children:[C.jsx(Zz,{activeTab:t,forceLogin:r,restrictedByDefault:n,onTabChange:a=>{o(Z.toggleTab(a))},onForceLoginChange:a=>{o(Z.toggleForceLogin(a))},onRestrictedByDefaultChange:a=>{o(Z.toggleRestrictedByDefault(a))},qodly:e}),t==="roles"?C.jsx(Jz,{children:C.jsx(CQ,{})}):C.jsx(nQ,{})]})})})},RQ=()=>{const e=Z.useAppSelector(Z.selectModals),t=Z.useAppDispatch();return C.jsx(C.Fragment,{children:e.map((r,n)=>C.jsx(De.Modal,{hasOverlay:n===0,...r,onClose:i=>t(Z.closeModal(i)),onEdit:i=>t(Z.editModal(i)),container:document.querySelector(`.${yc.ROLES_EDITOR_SCOPE_CLASS}`)},r.id))})},PQ=e=>C.jsxs(Z.ReduxProvider,{store:Z.getStore(),children:[C.jsx(De.TipsProvider,{children:C.jsx("div",{className:"relative z-10 overflow-hidden",style:{height:"100vh"},children:C.jsx(Xk,{...e})})}),C.jsx(RQ,{})]});exports.ROLES_EDITOR_SCOPE_CLASS=yc.ROLES_EDITOR_SCOPE_CLASS;exports.Roles=Xk;exports.Standalone=PQ;exports.useRolesFlagsSync=Yk;
72
72
  //# sourceMappingURL=index.cjs.js.map