@ws-ui/roles-editor 1.13.0 → 1.13.1
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/Sidebar/Roles/rolesContext.d.ts +1 -0
- package/dist/Standalone/style.css +1 -1
- package/dist/Tabs/Privileges/Table.d.ts +1 -0
- package/dist/Tabs/Roles/Card.d.ts +3 -2
- package/dist/Tabs/Roles/Row.d.ts +3 -0
- package/dist/index.cjs.js +28 -28
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +10760 -10525
- package/dist/index.es.js.map +1 -1
- package/dist/roles-editor.css +1 -1
- package/package.json +4 -4
package/dist/index.cjs.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),Q=require("@ws-ui/store"),T=require("react"),Te=require("@ws-ui/shared"),_r=require("@headlessui/react"),nx=require("react-dom"),xe=require("@ws-ui/icons"),CD=require("./common.cjs.js");function RD(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=RD(T),ix=RD(nx);var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qf={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 U1;function aH(){return U1||(U1=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})()})(Kf)),Kf.exports}var sH=aH();const Ve=Un(sH);function uH({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(Te.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(Te.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(Te.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(Te.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const xD=T.createContext(void 0),cH=({children:e})=>{const[t,r]=T.useState(null);function n(o){r(o)}const i={selectedRole:t,selectRole:n};return C.jsx(xD.Provider,{value:i,children:e})};function tx(){const e=T.useContext(xD);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var W1=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},V1=typeof window<"u"&&window.document&&window.document.createElement?pe.useLayoutEffect:pe.useEffect,Gt="top",Sr="bottom",Or="right",Kt="left",rx="auto",Ua=[Gt,Sr,Or,Kt],vo="start",ja="end",lH="clippingParents",wD="viewport",ra="popper",fH="reference",G1=Ua.reduce(function(e,t){return e.concat([t+"-"+vo,t+"-"+ja])},[]),_D=[].concat(Ua,[rx]).reduce(function(e,t){return e.concat([t,t+"-"+vo,t+"-"+ja])},[]),dH="beforeRead",hH="read",pH="afterRead",vH="beforeMain",gH="main",mH="afterMain",yH="beforeWrite",bH="write",xH="afterWrite",wH=[dH,hH,pH,vH,gH,mH,yH,bH,xH];function nn(e){return e?(e.nodeName||"").toLowerCase():null}function ur(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function mi(e){var t=ur(e).Element;return e instanceof t||e instanceof Element}function Er(e){var t=ur(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function nx(e){if(typeof ShadowRoot>"u")return!1;var t=ur(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function _H(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];!Er(o)||!nn(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 EH(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},{});!Er(i)||!nn(i)||(Object.assign(i.style,u),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const SH={name:"applyStyles",enabled:!0,phase:"write",fn:_H,effect:EH,requires:["computeStyles"]};function en(e){return e.split("-")[0]}var fi=Math.max,ku=Math.min,go=Math.round;function Rb(){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 ED(){return!/^((?!chrome|android).)*safari/i.test(Rb())}function mo(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&Er(e)&&(i=e.offsetWidth>0&&go(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&go(n.height)/e.offsetHeight||1);var a=mi(e)?ur(e):window,u=a.visualViewport,c=!ED()&&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 ix(e){var t=mo(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 SD(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&nx(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function bn(e){return ur(e).getComputedStyle(e)}function OH(e){return["table","td","th"].indexOf(nn(e))>=0}function Wn(e){return((mi(e)?e.ownerDocument:e.document)||window.document).documentElement}function pc(e){return nn(e)==="html"?e:e.assignedSlot||e.parentNode||(nx(e)?e.host:null)||Wn(e)}function K1(e){return!Er(e)||bn(e).position==="fixed"?null:e.offsetParent}function CH(e){var t=/firefox/i.test(Rb()),r=/Trident/i.test(Rb());if(r&&Er(e)){var n=bn(e);if(n.position==="fixed")return null}var i=pc(e);for(nx(i)&&(i=i.host);Er(i)&&["html","body"].indexOf(nn(i))<0;){var o=bn(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 Wa(e){for(var t=ur(e),r=K1(e);r&&OH(r)&&bn(r).position==="static";)r=K1(r);return r&&(nn(r)==="html"||nn(r)==="body"&&bn(r).position==="static")?t:r||CH(e)||t}function ox(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Na(e,t,r){return fi(e,ku(t,r))}function RH(e,t,r){var n=Na(e,t,r);return n>r?r:n}function OD(){return{top:0,right:0,bottom:0,left:0}}function CD(e){return Object.assign({},OD(),e)}function RD(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var IH=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,CD(typeof t!="number"?t:RD(t,Ua))};function PH(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,u=en(r.placement),c=ox(u),d=[Kt,Or].indexOf(u)>=0,f=d?"height":"width";if(!(!o||!a)){var h=IH(i.padding,r),p=ix(o),v=c==="y"?Gt:Kt,m=c==="y"?Sr:Or,y=r.rects.reference[f]+r.rects.reference[c]-a[c]-r.rects.popper[f],x=a[c]-r.rects.reference[c],b=Wa(o),w=b?c==="y"?b.clientHeight||0:b.clientWidth||0:0,E=y/2-x/2,_=h[v],S=w-p[f]-h[m],R=w/2-p[f]/2+E,I=Na(_,R,S),N=c;r.modifiersData[n]=(t={},t[N]=I,t.centerOffset=I-R,t)}}function NH(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)||SD(t.elements.popper,i)&&(t.elements.arrow=i))}const TH={name:"arrow",enabled:!0,phase:"main",fn:PH,effect:NH,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function yo(e){return e.split("-")[1]}var AH={top:"auto",right:"auto",bottom:"auto",left:"auto"};function MH(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:go(r*i)/i||0,y:go(n*i)/i||0}}function Y1(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,x=typeof f=="function"?f({x:v,y}):{x:v,y};v=x.x,y=x.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),E=Kt,_=Gt,S=window;if(d){var R=Wa(r),I="clientHeight",N="clientWidth";if(R===ur(r)&&(R=Wn(r),bn(R).position!=="static"&&u==="absolute"&&(I="scrollHeight",N="scrollWidth")),R=R,i===Gt||(i===Kt||i===Or)&&o===ja){_=Sr;var A=h&&R===S&&S.visualViewport?S.visualViewport.height:R[I];y-=A-n.height,y*=c?1:-1}if(i===Kt||(i===Gt||i===Sr)&&o===ja){E=Or;var L=h&&R===S&&S.visualViewport?S.visualViewport.width:R[N];v-=L-n.width,v*=c?1:-1}}var B=Object.assign({position:u},d&&AH),U=f===!0?MH({x:v,y},ur(r)):{x:v,y};if(v=U.x,y=U.y,c){var j;return Object.assign({},B,(j={},j[_]=w?"0":"",j[E]=b?"0":"",j.transform=(S.devicePixelRatio||1)<=1?"translate("+v+"px, "+y+"px)":"translate3d("+v+"px, "+y+"px, 0)",j))}return Object.assign({},B,(t={},t[_]=w?y+"px":"",t[E]=b?v+"px":"",t.transform="",t))}function DH(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:en(t.placement),variation:yo(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,Y1(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,Y1(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 jH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:DH,data:{}};var ru={passive:!0};function qH(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=ur(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",r.update,ru)}),u&&c.addEventListener("resize",r.update,ru),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",r.update,ru)}),u&&c.removeEventListener("resize",r.update,ru)}}const kH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qH,data:{}};var LH={left:"right",right:"left",bottom:"top",top:"bottom"};function Ru(e){return e.replace(/left|right|bottom|top/g,function(t){return LH[t]})}var BH={start:"end",end:"start"};function X1(e){return e.replace(/start|end/g,function(t){return BH[t]})}function ax(e){var t=ur(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function sx(e){return mo(Wn(e)).left+ax(e).scrollLeft}function FH(e,t){var r=ur(e),n=Wn(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;var d=ED();(d||!d&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:u+sx(e),y:c}}function $H(e){var t,r=Wn(e),n=ax(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=fi(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=fi(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-n.scrollLeft+sx(e),c=-n.scrollTop;return bn(i||r).direction==="rtl"&&(u+=fi(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:c}}function ux(e){var t=bn(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function ID(e){return["html","body","#document"].indexOf(nn(e))>=0?e.ownerDocument.body:Er(e)&&ux(e)?e:ID(pc(e))}function Ta(e,t){var r;t===void 0&&(t=[]);var n=ID(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=ur(n),a=i?[o].concat(o.visualViewport||[],ux(n)?n:[]):n,u=t.concat(a);return i?u:u.concat(Ta(pc(a)))}function Ib(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function zH(e,t){var r=mo(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 Z1(e,t,r){return t===wD?Ib(FH(e,r)):mi(t)?zH(t,r):Ib($H(Wn(e)))}function HH(e){var t=Ta(pc(e)),r=["absolute","fixed"].indexOf(bn(e).position)>=0,n=r&&Er(e)?Wa(e):e;return mi(n)?t.filter(function(i){return mi(i)&&SD(i,n)&&nn(i)!=="body"}):[]}function UH(e,t,r,n){var i=t==="clippingParents"?HH(e):[].concat(t),o=[].concat(i,[r]),a=o[0],u=o.reduce(function(c,d){var f=Z1(e,d,n);return c.top=fi(f.top,c.top),c.right=ku(f.right,c.right),c.bottom=ku(f.bottom,c.bottom),c.left=fi(f.left,c.left),c},Z1(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 PD(e){var t=e.reference,r=e.element,n=e.placement,i=n?en(n):null,o=n?yo(n):null,a=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2,c;switch(i){case Gt:c={x:a,y:t.y-r.height};break;case Sr:c={x:a,y:t.y+t.height};break;case Or:c={x:t.x+t.width,y:u};break;case Kt:c={x:t.x-r.width,y:u};break;default:c={x:t.x,y:t.y}}var d=i?ox(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case vo:c[d]=c[d]-(t[f]/2-r[f]/2);break;case ja:c[d]=c[d]+(t[f]/2-r[f]/2);break}}return c}function qa(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?lH:u,d=r.rootBoundary,f=d===void 0?wD:d,h=r.elementContext,p=h===void 0?ra:h,v=r.altBoundary,m=v===void 0?!1:v,y=r.padding,x=y===void 0?0:y,b=CD(typeof x!="number"?x:RD(x,Ua)),w=p===ra?fH:ra,E=e.rects.popper,_=e.elements[m?w:p],S=UH(mi(_)?_:_.contextElement||Wn(e.elements.popper),c,f,a),R=mo(e.elements.reference),I=PD({reference:R,element:E,placement:i}),N=Ib(Object.assign({},E,I)),A=p===ra?N:R,L={top:S.top-A.top+b.top,bottom:A.bottom-S.bottom+b.bottom,left:S.left-A.left+b.left,right:A.right-S.right+b.right},B=e.modifiersData.offset;if(p===ra&&B){var U=B[i];Object.keys(L).forEach(function(j){var D=[Or,Sr].indexOf(j)>=0?1:-1,G=[Gt,Sr].indexOf(j)>=0?"y":"x";L[j]+=U[G]*D})}return L}function WH(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?_D:c,f=yo(n),h=f?u?G1:G1.filter(function(m){return yo(m)===f}):Ua,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]=qa(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[en(y)],m},{});return Object.keys(v).sort(function(m,y){return v[m]-v[y]})}function VH(e){if(en(e)===rx)return[];var t=Ru(e);return[X1(e),t,X1(t)]}function GH(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,x=t.options.placement,b=en(x),w=b===x,E=c||(w||!m?[Ru(x)]:VH(x)),_=[x].concat(E).reduce(function(H,K){return H.concat(en(K)===rx?WH(t,{placement:K,boundary:f,rootBoundary:h,padding:d,flipVariations:m,allowedAutoPlacements:y}):K)},[]),S=t.rects.reference,R=t.rects.popper,I=new Map,N=!0,A=_[0],L=0;L<_.length;L++){var B=_[L],U=en(B),j=yo(B)===vo,D=[Gt,Sr].indexOf(U)>=0,G=D?"width":"height",F=qa(t,{placement:B,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),X=D?j?Or:Kt:j?Sr:Gt;S[G]>R[G]&&(X=Ru(X));var Z=Ru(X),Q=[];if(o&&Q.push(F[U]<=0),u&&Q.push(F[X]<=0,F[Z]<=0),Q.every(function(H){return H})){A=B,N=!1;break}I.set(B,Q)}if(N)for(var V=m?3:1,ee=function(K){var $=_.find(function(k){var z=I.get(k);if(z)return z.slice(0,K).every(function(re){return re})});if($)return A=$,"break"},oe=V;oe>0;oe--){var ae=ee(oe);if(ae==="break")break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}const KH={name:"flip",enabled:!0,phase:"main",fn:GH,requiresIfExists:["offset"],data:{_skip:!1}};function J1(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 Q1(e){return[Gt,Or,Sr,Kt].some(function(t){return e[t]>=0})}function YH(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=qa(t,{elementContext:"reference"}),u=qa(t,{altBoundary:!0}),c=J1(a,n),d=J1(u,i,o),f=Q1(c),h=Q1(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 XH={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:YH};function ZH(e,t,r){var n=en(e),i=[Kt,Gt].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,[Kt,Or].indexOf(n)>=0?{x:u,y:a}:{x:a,y:u}}function JH(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=_D.reduce(function(f,h){return f[h]=ZH(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 QH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:JH};function e4(e){var t=e.state,r=e.name;t.modifiersData[r]=PD({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const t4={name:"popperOffsets",enabled:!0,phase:"read",fn:e4,data:{}};function r4(e){return e==="x"?"y":"x"}function n4(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,x=qa(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),b=en(t.placement),w=yo(t.placement),E=!w,_=ox(b),S=r4(_),R=t.modifiersData.popperOffsets,I=t.rects.reference,N=t.rects.popper,A=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,L=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,U={x:0,y:0};if(R){if(o){var j,D=_==="y"?Gt:Kt,G=_==="y"?Sr:Or,F=_==="y"?"height":"width",X=R[_],Z=X+x[D],Q=X-x[G],V=v?-N[F]/2:0,ee=w===vo?I[F]:N[F],oe=w===vo?-N[F]:-I[F],ae=t.elements.arrow,H=v&&ae?ix(ae):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:OD(),$=K[D],k=K[G],z=Na(0,I[F],H[F]),re=E?I[F]/2-V-z-$-L.mainAxis:ee-z-$-L.mainAxis,ie=E?-I[F]/2+V+z+k+L.mainAxis:oe+z+k+L.mainAxis,se=t.elements.arrow&&Wa(t.elements.arrow),ce=se?_==="y"?se.clientTop||0:se.clientLeft||0:0,be=(j=B==null?void 0:B[_])!=null?j:0,Ce=X+re-be-ce,_e=X+ie-be,he=Na(v?ku(Z,Ce):Z,X,v?fi(Q,_e):Q);R[_]=he,U[_]=he-X}if(u){var fe,Ee=_==="x"?Gt:Kt,Pe=_==="x"?Sr:Or,Ze=R[S],ze=S==="y"?"height":"width",Fe=Ze+x[Ee],Ue=Ze-x[Pe],ct=[Gt,Kt].indexOf(b)!==-1,lt=(fe=B==null?void 0:B[S])!=null?fe:0,mt=ct?Fe:Ze-I[ze]-N[ze]-lt+L.altAxis,yt=ct?Ze+I[ze]+N[ze]-lt-L.altAxis:Ue,rt=v&&ct?RH(mt,Ze,yt):Na(v?mt:Fe,Ze,v?yt:Ue);R[S]=rt,U[S]=rt-Ze}t.modifiersData[n]=U}}const i4={name:"preventOverflow",enabled:!0,phase:"main",fn:n4,requiresIfExists:["offset"]};function o4(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function a4(e){return e===ur(e)||!Er(e)?ax(e):o4(e)}function s4(e){var t=e.getBoundingClientRect(),r=go(t.width)/e.offsetWidth||1,n=go(t.height)/e.offsetHeight||1;return r!==1||n!==1}function u4(e,t,r){r===void 0&&(r=!1);var n=Er(t),i=Er(t)&&s4(t),o=Wn(t),a=mo(e,i,r),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((nn(t)!=="body"||ux(o))&&(u=a4(t)),Er(t)?(c=mo(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=sx(o))),{x:a.left+u.scrollLeft-c.x,y:a.top+u.scrollTop-c.y,width:a.width,height:a.height}}function c4(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 l4(e){var t=c4(e);return wH.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function f4(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function d4(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 eE={placement:"bottom",modifiers:[],strategy:"absolute"};function tE(){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 h4(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?eE:i;return function(u,c,d){d===void 0&&(d=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},eE,o),modifiersData:{},elements:{reference:u,popper:c},attributes:{},styles:{}},h=[],p=!1,v={state:f,setOptions:function(b){var w=typeof b=="function"?b(f.options):b;y(),f.options=Object.assign({},o,f.options,w),f.scrollParents={reference:mi(u)?Ta(u):u.contextElement?Ta(u.contextElement):[],popper:Ta(c)};var E=l4(d4([].concat(n,f.options.modifiers)));return f.orderedModifiers=E.filter(function(_){return _.enabled}),m(),v.update()},forceUpdate:function(){if(!p){var b=f.elements,w=b.reference,E=b.popper;if(tE(w,E)){f.rects={reference:u4(w,Wa(E),f.options.strategy==="fixed"),popper:ix(E)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(L){return f.modifiersData[L.name]=Object.assign({},L.data)});for(var _=0;_<f.orderedModifiers.length;_++){if(f.reset===!0){f.reset=!1,_=-1;continue}var S=f.orderedModifiers[_],R=S.fn,I=S.options,N=I===void 0?{}:I,A=S.name;typeof R=="function"&&(f=R({state:f,options:N,name:A,instance:v})||f)}}}},update:f4(function(){return new Promise(function(x){v.forceUpdate(),x(f)})}),destroy:function(){y(),p=!0}};if(!tE(u,c))return v;v.setOptions(d).then(function(x){!p&&d.onFirstUpdate&&d.onFirstUpdate(x)});function m(){f.orderedModifiers.forEach(function(x){var b=x.name,w=x.options,E=w===void 0?{}:w,_=x.effect;if(typeof _=="function"){var S=_({state:f,name:b,instance:v,options:E}),R=function(){};h.push(S||R)}})}function y(){h.forEach(function(x){return x()}),h=[]}return v}}var p4=[kH,t4,jH,SH,QH,KH,i4,TH,XH],v4=h4({defaultModifiers:p4}),Yf,rE;function g4(){if(rE)return Yf;rE=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 Yf=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}},Yf}var m4=g4();const y4=Un(m4);var b4=[],vc=function(t,r,n){n===void 0&&(n={});var i=pe.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||b4},a=pe.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),u=a[0],c=a[1],d=pe.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(v){var m=v.state,y=Object.keys(m.elements);ex.flushSync(function(){c({styles:W1(y.map(function(x){return[x,m.styles[x]||{}]})),attributes:W1(y.map(function(x){return[x,m.attributes[x]]}))})})},requires:["computeStyles"]}},[]),f=pe.useMemo(function(){var p={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[d,{name:"applyStyles",enabled:!1}])};return y4(i.current,p)?i.current||p:(i.current=p,p)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,d]),h=pe.useRef();return V1(function(){h.current&&h.current.setOptions(f)},[f]),V1(function(){if(!(t==null||r==null)){var p=n.createPopper||v4,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 ND=({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 cx(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 Xf,nE;function x4(){if(nE)return Xf;nE=1;function e(){this.__data__=[],this.size=0}return Xf=e,Xf}var Zf,iE;function Eo(){if(iE)return Zf;iE=1;function e(t,r){return t===r||t!==t&&r!==r}return Zf=e,Zf}var Jf,oE;function gc(){if(oE)return Jf;oE=1;var e=Eo();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Jf=t,Jf}var Qf,aE;function w4(){if(aE)return Qf;aE=1;var e=gc(),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 Qf=n,Qf}var ed,sE;function _4(){if(sE)return ed;sE=1;var e=gc();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return ed=t,ed}var td,uE;function E4(){if(uE)return td;uE=1;var e=gc();function t(r){return e(this.__data__,r)>-1}return td=t,td}var rd,cE;function S4(){if(cE)return rd;cE=1;var e=gc();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 rd=t,rd}var nd,lE;function mc(){if(lE)return nd;lE=1;var e=x4(),t=w4(),r=_4(),n=E4(),i=S4();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,nd=o,nd}var id,fE;function O4(){if(fE)return id;fE=1;var e=mc();function t(){this.__data__=new e,this.size=0}return id=t,id}var od,dE;function C4(){if(dE)return od;dE=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return od=e,od}var ad,hE;function R4(){if(hE)return ad;hE=1;function e(t){return this.__data__.get(t)}return ad=e,ad}var sd,pE;function I4(){if(pE)return sd;pE=1;function e(t){return this.__data__.has(t)}return sd=e,sd}var ud,vE;function TD(){if(vE)return ud;vE=1;var e=typeof ht=="object"&&ht&&ht.Object===Object&&ht;return ud=e,ud}var cd,gE;function Hr(){if(gE)return cd;gE=1;var e=TD(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return cd=r,cd}var ld,mE;function So(){if(mE)return ld;mE=1;var e=Hr(),t=e.Symbol;return ld=t,ld}var fd,yE;function P4(){if(yE)return fd;yE=1;var e=So(),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 fd=o,fd}var dd,bE;function N4(){if(bE)return dd;bE=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return dd=r,dd}var hd,xE;function Ei(){if(xE)return hd;xE=1;var e=So(),t=P4(),r=N4(),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 hd=a,hd}var pd,wE;function Cr(){if(wE)return pd;wE=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return pd=e,pd}var vd,_E;function Va(){if(_E)return vd;_E=1;var e=Ei(),t=Cr(),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 vd=a,vd}var gd,EE;function T4(){if(EE)return gd;EE=1;var e=Hr(),t=e["__core-js_shared__"];return gd=t,gd}var md,SE;function A4(){if(SE)return md;SE=1;var e=T4(),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 md=r,md}var yd,OE;function AD(){if(OE)return yd;OE=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 yd=r,yd}var bd,CE;function M4(){if(CE)return bd;CE=1;var e=Va(),t=A4(),r=Cr(),n=AD(),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 bd=h,bd}var xd,RE;function D4(){if(RE)return xd;RE=1;function e(t,r){return t==null?void 0:t[r]}return xd=e,xd}var wd,IE;function Si(){if(IE)return wd;IE=1;var e=M4(),t=D4();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return wd=r,wd}var _d,PE;function lx(){if(PE)return _d;PE=1;var e=Si(),t=Hr(),r=e(t,"Map");return _d=r,_d}var Ed,NE;function yc(){if(NE)return Ed;NE=1;var e=Si(),t=e(Object,"create");return Ed=t,Ed}var Sd,TE;function j4(){if(TE)return Sd;TE=1;var e=yc();function t(){this.__data__=e?e(null):{},this.size=0}return Sd=t,Sd}var Od,AE;function q4(){if(AE)return Od;AE=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Od=e,Od}var Cd,ME;function k4(){if(ME)return Cd;ME=1;var e=yc(),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 Cd=i,Cd}var Rd,DE;function L4(){if(DE)return Rd;DE=1;var e=yc(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return Rd=n,Rd}var Id,jE;function B4(){if(jE)return Id;jE=1;var e=yc(),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 Id=r,Id}var Pd,qE;function F4(){if(qE)return Pd;qE=1;var e=j4(),t=q4(),r=k4(),n=L4(),i=B4();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,Pd=o,Pd}var Nd,kE;function $4(){if(kE)return Nd;kE=1;var e=F4(),t=mc(),r=lx();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Nd=n,Nd}var Td,LE;function z4(){if(LE)return Td;LE=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Td=e,Td}var Ad,BE;function bc(){if(BE)return Ad;BE=1;var e=z4();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Ad=t,Ad}var Md,FE;function H4(){if(FE)return Md;FE=1;var e=bc();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Md=t,Md}var Dd,$E;function U4(){if($E)return Dd;$E=1;var e=bc();function t(r){return e(this,r).get(r)}return Dd=t,Dd}var jd,zE;function W4(){if(zE)return jd;zE=1;var e=bc();function t(r){return e(this,r).has(r)}return jd=t,jd}var qd,HE;function V4(){if(HE)return qd;HE=1;var e=bc();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 qd=t,qd}var kd,UE;function fx(){if(UE)return kd;UE=1;var e=$4(),t=H4(),r=U4(),n=W4(),i=V4();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,kd=o,kd}var Ld,WE;function G4(){if(WE)return Ld;WE=1;var e=mc(),t=lx(),r=fx(),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 Ld=i,Ld}var Bd,VE;function xc(){if(VE)return Bd;VE=1;var e=mc(),t=O4(),r=C4(),n=R4(),i=I4(),o=G4();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,Bd=a,Bd}var Fd,GE;function dx(){if(GE)return Fd;GE=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 Fd=e,Fd}var $d,KE;function MD(){if(KE)return $d;KE=1;var e=Si(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return $d=t,$d}var zd,YE;function wc(){if(YE)return zd;YE=1;var e=MD();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return zd=t,zd}var Hd,XE;function _c(){if(XE)return Hd;XE=1;var e=wc(),t=Eo(),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 Hd=i,Hd}var Ud,ZE;function Ga(){if(ZE)return Ud;ZE=1;var e=_c(),t=wc();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 Ud=r,Ud}var Wd,JE;function K4(){if(JE)return Wd;JE=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Wd=e,Wd}var Vd,QE;function on(){if(QE)return Vd;QE=1;function e(t){return t!=null&&typeof t=="object"}return Vd=e,Vd}var Gd,eS;function Y4(){if(eS)return Gd;eS=1;var e=Ei(),t=on(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Gd=n,Gd}var Kd,tS;function Ka(){if(tS)return Kd;tS=1;var e=Y4(),t=on(),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 Kd=o,Kd}var Yd,rS;function xt(){if(rS)return Yd;rS=1;var e=Array.isArray;return Yd=e,Yd}var Ea={exports:{}},Xd,nS;function X4(){if(nS)return Xd;nS=1;function e(){return!1}return Xd=e,Xd}Ea.exports;var iS;function Oo(){return iS||(iS=1,(function(e,t){var r=Hr(),n=X4(),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})(Ea,Ea.exports)),Ea.exports}var Zd,oS;function Ec(){if(oS)return Zd;oS=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 Zd=r,Zd}var Jd,aS;function hx(){if(aS)return Jd;aS=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Jd=t,Jd}var Qd,sS;function Z4(){if(sS)return Qd;sS=1;var e=Ei(),t=hx(),r=on(),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]",x="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",E="[object Float64Array]",_="[object Int8Array]",S="[object Int16Array]",R="[object Int32Array]",I="[object Uint8Array]",N="[object Uint8ClampedArray]",A="[object Uint16Array]",L="[object Uint32Array]",B={};B[w]=B[E]=B[_]=B[S]=B[R]=B[I]=B[N]=B[A]=B[L]=!0,B[n]=B[i]=B[x]=B[o]=B[b]=B[a]=B[u]=B[c]=B[d]=B[f]=B[h]=B[p]=B[v]=B[m]=B[y]=!1;function U(j){return r(j)&&t(j.length)&&!!B[e(j)]}return Qd=U,Qd}var eh,uS;function Sc(){if(uS)return eh;uS=1;function e(t){return function(r){return t(r)}}return eh=e,eh}var Sa={exports:{}};Sa.exports;var cS;function px(){return cS||(cS=1,(function(e,t){var r=TD(),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})(Sa,Sa.exports)),Sa.exports}var th,lS;function Ya(){if(lS)return th;lS=1;var e=Z4(),t=Sc(),r=px(),n=r&&r.isTypedArray,i=n?t(n):e;return th=i,th}var rh,fS;function DD(){if(fS)return rh;fS=1;var e=K4(),t=Ka(),r=xt(),n=Oo(),i=Ec(),o=Ya(),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,x=y?e(d.length,String):[],b=x.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,b)))&&x.push(w);return x}return rh=c,rh}var nh,dS;function Oc(){if(dS)return nh;dS=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return nh=t,nh}var ih,hS;function jD(){if(hS)return ih;hS=1;function e(t,r){return function(n){return t(r(n))}}return ih=e,ih}var oh,pS;function J4(){if(pS)return oh;pS=1;var e=jD(),t=e(Object.keys,Object);return oh=t,oh}var ah,vS;function vx(){if(vS)return ah;vS=1;var e=Oc(),t=J4(),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 ah=i,ah}var sh,gS;function En(){if(gS)return sh;gS=1;var e=Va(),t=hx();function r(n){return n!=null&&t(n.length)&&!e(n)}return sh=r,sh}var uh,mS;function Vn(){if(mS)return uh;mS=1;var e=DD(),t=vx(),r=En();function n(i){return r(i)?e(i):t(i)}return uh=n,uh}var ch,yS;function Q4(){if(yS)return ch;yS=1;var e=Ga(),t=Vn();function r(n,i){return n&&e(i,t(i),n)}return ch=r,ch}var lh,bS;function eU(){if(bS)return lh;bS=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return lh=e,lh}var fh,xS;function tU(){if(xS)return fh;xS=1;var e=Cr(),t=Oc(),r=eU(),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 fh=o,fh}var dh,wS;function Oi(){if(wS)return dh;wS=1;var e=DD(),t=tU(),r=En();function n(i){return r(i)?e(i,!0):t(i)}return dh=n,dh}var hh,_S;function rU(){if(_S)return hh;_S=1;var e=Ga(),t=Oi();function r(n,i){return n&&e(i,t(i),n)}return hh=r,hh}var Oa={exports:{}};Oa.exports;var ES;function qD(){return ES||(ES=1,(function(e,t){var r=Hr(),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})(Oa,Oa.exports)),Oa.exports}var ph,SS;function kD(){if(SS)return ph;SS=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 ph=e,ph}var vh,OS;function LD(){if(OS)return vh;OS=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 vh=e,vh}var gh,CS;function BD(){if(CS)return gh;CS=1;function e(){return[]}return gh=e,gh}var mh,RS;function gx(){if(RS)return mh;RS=1;var e=LD(),t=BD(),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 mh=o,mh}var yh,IS;function nU(){if(IS)return yh;IS=1;var e=Ga(),t=gx();function r(n,i){return e(n,t(n),i)}return yh=r,yh}var bh,PS;function mx(){if(PS)return bh;PS=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 bh=e,bh}var xh,NS;function Cc(){if(NS)return xh;NS=1;var e=jD(),t=e(Object.getPrototypeOf,Object);return xh=t,xh}var wh,TS;function FD(){if(TS)return wh;TS=1;var e=mx(),t=Cc(),r=gx(),n=BD(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var u=[];a;)e(u,r(a)),a=t(a);return u}:n;return wh=o,wh}var _h,AS;function iU(){if(AS)return _h;AS=1;var e=Ga(),t=FD();function r(n,i){return e(n,t(n),i)}return _h=r,_h}var Eh,MS;function $D(){if(MS)return Eh;MS=1;var e=mx(),t=xt();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return Eh=r,Eh}var Sh,DS;function zD(){if(DS)return Sh;DS=1;var e=$D(),t=gx(),r=Vn();function n(i){return e(i,r,t)}return Sh=n,Sh}var Oh,jS;function oU(){if(jS)return Oh;jS=1;var e=$D(),t=FD(),r=Oi();function n(i){return e(i,r,t)}return Oh=n,Oh}var Ch,qS;function aU(){if(qS)return Ch;qS=1;var e=Si(),t=Hr(),r=e(t,"DataView");return Ch=r,Ch}var Rh,kS;function sU(){if(kS)return Rh;kS=1;var e=Si(),t=Hr(),r=e(t,"Promise");return Rh=r,Rh}var Ih,LS;function HD(){if(LS)return Ih;LS=1;var e=Si(),t=Hr(),r=e(t,"Set");return Ih=r,Ih}var Ph,BS;function uU(){if(BS)return Ph;BS=1;var e=Si(),t=Hr(),r=e(t,"WeakMap");return Ph=r,Ph}var Nh,FS;function Co(){if(FS)return Nh;FS=1;var e=aU(),t=lx(),r=sU(),n=HD(),i=uU(),o=Ei(),a=AD(),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),x=a(n),b=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(E){var _=o(E),S=_==c?E.constructor:void 0,R=S?a(S):"";if(R)switch(R){case v:return p;case m:return u;case y:return d;case x:return f;case b:return h}return _}),Nh=w,Nh}var Th,$S;function cU(){if($S)return Th;$S=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 Th=r,Th}var Ah,zS;function UD(){if(zS)return Ah;zS=1;var e=Hr(),t=e.Uint8Array;return Ah=t,Ah}var Mh,HS;function yx(){if(HS)return Mh;HS=1;var e=UD();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return Mh=t,Mh}var Dh,US;function lU(){if(US)return Dh;US=1;var e=yx();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return Dh=t,Dh}var jh,WS;function fU(){if(WS)return jh;WS=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return jh=t,jh}var qh,VS;function dU(){if(VS)return qh;VS=1;var e=So(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return qh=n,qh}var kh,GS;function WD(){if(GS)return kh;GS=1;var e=yx();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return kh=t,kh}var Lh,KS;function hU(){if(KS)return Lh;KS=1;var e=yx(),t=lU(),r=fU(),n=dU(),i=WD(),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]",x="[object Float64Array]",b="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",_="[object Uint8Array]",S="[object Uint8ClampedArray]",R="[object Uint16Array]",I="[object Uint32Array]";function N(A,L,B){var U=A.constructor;switch(L){case v:return e(A);case o:case a:return new U(+A);case m:return t(A,B);case y:case x:case b:case w:case E:case _:case S:case R:case I:return i(A,B);case u:return new U;case c:case h:return new U(A);case d:return r(A);case f:return new U;case p:return n(A)}}return Lh=N,Lh}var Bh,YS;function VD(){if(YS)return Bh;YS=1;var e=Cr(),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 Bh=r,Bh}var Fh,XS;function GD(){if(XS)return Fh;XS=1;var e=VD(),t=Cc(),r=Oc();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Fh=n,Fh}var $h,ZS;function pU(){if(ZS)return $h;ZS=1;var e=Co(),t=on(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return $h=n,$h}var zh,JS;function vU(){if(JS)return zh;JS=1;var e=pU(),t=Sc(),r=px(),n=r&&r.isMap,i=n?t(n):e;return zh=i,zh}var Hh,QS;function gU(){if(QS)return Hh;QS=1;var e=Co(),t=on(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return Hh=n,Hh}var Uh,eO;function mU(){if(eO)return Uh;eO=1;var e=gU(),t=Sc(),r=px(),n=r&&r.isSet,i=n?t(n):e;return Uh=i,Uh}var Wh,tO;function KD(){if(tO)return Wh;tO=1;var e=xc(),t=dx(),r=_c(),n=Q4(),i=rU(),o=qD(),a=kD(),u=nU(),c=iU(),d=zD(),f=oU(),h=Co(),p=cU(),v=hU(),m=GD(),y=xt(),x=Oo(),b=vU(),w=Cr(),E=mU(),_=Vn(),S=Oi(),R=1,I=2,N=4,A="[object Arguments]",L="[object Array]",B="[object Boolean]",U="[object Date]",j="[object Error]",D="[object Function]",G="[object GeneratorFunction]",F="[object Map]",X="[object Number]",Z="[object Object]",Q="[object RegExp]",V="[object Set]",ee="[object String]",oe="[object Symbol]",ae="[object WeakMap]",H="[object ArrayBuffer]",K="[object DataView]",$="[object Float32Array]",k="[object Float64Array]",z="[object Int8Array]",re="[object Int16Array]",ie="[object Int32Array]",se="[object Uint8Array]",ce="[object Uint8ClampedArray]",be="[object Uint16Array]",Ce="[object Uint32Array]",_e={};_e[A]=_e[L]=_e[H]=_e[K]=_e[B]=_e[U]=_e[$]=_e[k]=_e[z]=_e[re]=_e[ie]=_e[F]=_e[X]=_e[Z]=_e[Q]=_e[V]=_e[ee]=_e[oe]=_e[se]=_e[ce]=_e[be]=_e[Ce]=!0,_e[j]=_e[D]=_e[ae]=!1;function he(fe,Ee,Pe,Ze,ze,Fe){var Ue,ct=Ee&R,lt=Ee&I,mt=Ee&N;if(Pe&&(Ue=ze?Pe(fe,Ze,ze,Fe):Pe(fe)),Ue!==void 0)return Ue;if(!w(fe))return fe;var yt=y(fe);if(yt){if(Ue=p(fe),!ct)return a(fe,Ue)}else{var rt=h(fe),bt=rt==D||rt==G;if(x(fe))return o(fe,ct);if(rt==Z||rt==A||bt&&!ze){if(Ue=lt||bt?{}:m(fe),!ct)return lt?c(fe,i(Ue,fe)):u(fe,n(Ue,fe))}else{if(!_e[rt])return ze?fe:{};Ue=v(fe,rt,ct)}}Fe||(Fe=new e);var Jt=Fe.get(fe);if(Jt)return Jt;Fe.set(fe,Ue),E(fe)?fe.forEach(function(_t){Ue.add(he(_t,Ee,Pe,_t,fe,Fe))}):b(fe)&&fe.forEach(function(_t,jt){Ue.set(jt,he(_t,Ee,Pe,jt,fe,Fe))});var fr=mt?lt?f:d:lt?S:_,Dt=yt?void 0:fr(fe);return t(Dt||fe,function(_t,jt){Dt&&(jt=_t,_t=fe[jt]),r(Ue,jt,he(_t,Ee,Pe,jt,fe,Fe))}),Ue}return Wh=he,Wh}var Vh,rO;function yU(){if(rO)return Vh;rO=1;var e=KD(),t=4;function r(n){return e(n,t)}return Vh=r,Vh}var Gh,nO;function bx(){if(nO)return Gh;nO=1;function e(t){return function(){return t}}return Gh=e,Gh}var Kh,iO;function bU(){if(iO)return Kh;iO=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 Kh=e,Kh}var Yh,oO;function xx(){if(oO)return Yh;oO=1;var e=bU(),t=e();return Yh=t,Yh}var Xh,aO;function wx(){if(aO)return Xh;aO=1;var e=xx(),t=Vn();function r(n,i){return n&&e(n,i,t)}return Xh=r,Xh}var Zh,sO;function xU(){if(sO)return Zh;sO=1;var e=En();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 Zh=t,Zh}var Jh,uO;function Rc(){if(uO)return Jh;uO=1;var e=wx(),t=xU(),r=t(e);return Jh=r,Jh}var Qh,cO;function Ci(){if(cO)return Qh;cO=1;function e(t){return t}return Qh=e,Qh}var ep,lO;function YD(){if(lO)return ep;lO=1;var e=Ci();function t(r){return typeof r=="function"?r:e}return ep=t,ep}var tp,fO;function XD(){if(fO)return tp;fO=1;var e=dx(),t=Rc(),r=YD(),n=xt();function i(o,a){var u=n(o)?e:t;return u(o,r(a))}return tp=i,tp}var rp,dO;function ZD(){return dO||(dO=1,rp=XD()),rp}var np,hO;function wU(){if(hO)return np;hO=1;var e=Rc();function t(r,n){var i=[];return e(r,function(o,a,u){n(o,a,u)&&i.push(o)}),i}return np=t,np}var ip,pO;function _U(){if(pO)return ip;pO=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return ip=t,ip}var op,vO;function EU(){if(vO)return op;vO=1;function e(t){return this.__data__.has(t)}return op=e,op}var ap,gO;function JD(){if(gO)return ap;gO=1;var e=fx(),t=_U(),r=EU();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,ap=n,ap}var sp,mO;function SU(){if(mO)return sp;mO=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 sp=e,sp}var up,yO;function QD(){if(yO)return up;yO=1;function e(t,r){return t.has(r)}return up=e,up}var cp,bO;function ej(){if(bO)return cp;bO=1;var e=JD(),t=SU(),r=QD(),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),x=h.get(u);if(y&&x)return y==u&&x==a;var b=-1,w=!0,E=c&i?new e:void 0;for(h.set(a,u),h.set(u,a);++b<v;){var _=a[b],S=u[b];if(d)var R=p?d(S,_,b,u,a,h):d(_,S,b,a,u,h);if(R!==void 0){if(R)continue;w=!1;break}if(E){if(!t(u,function(I,N){if(!r(E,N)&&(_===I||f(_,I,c,d,h)))return E.push(N)})){w=!1;break}}else if(!(_===S||f(_,S,c,d,h))){w=!1;break}}return h.delete(a),h.delete(u),w}return cp=o,cp}var lp,xO;function OU(){if(xO)return lp;xO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return lp=e,lp}var fp,wO;function _x(){if(wO)return fp;wO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return fp=e,fp}var dp,_O;function CU(){if(_O)return dp;_O=1;var e=So(),t=UD(),r=Eo(),n=ej(),i=OU(),o=_x(),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]",x="[object Symbol]",b="[object ArrayBuffer]",w="[object DataView]",E=e?e.prototype:void 0,_=E?E.valueOf:void 0;function S(R,I,N,A,L,B,U){switch(N){case w:if(R.byteLength!=I.byteLength||R.byteOffset!=I.byteOffset)return!1;R=R.buffer,I=I.buffer;case b:return!(R.byteLength!=I.byteLength||!B(new t(R),new t(I)));case c:case d:case p:return r(+R,+I);case f:return R.name==I.name&&R.message==I.message;case v:case y:return R==I+"";case h:var j=i;case m:var D=A&a;if(j||(j=o),R.size!=I.size&&!D)return!1;var G=U.get(R);if(G)return G==I;A|=u,U.set(R,I);var F=n(j(R),j(I),A,L,B,U);return U.delete(R),F;case x:if(_)return _.call(R)==_.call(I)}return!1}return dp=S,dp}var hp,EO;function RU(){if(EO)return hp;EO=1;var e=zD(),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 x=v;x--;){var b=p[x];if(!(h?b in a:n.call(a,b)))return!1}var w=f.get(o),E=f.get(a);if(w&&E)return w==a&&E==o;var _=!0;f.set(o,a),f.set(a,o);for(var S=h;++x<v;){b=p[x];var R=o[b],I=a[b];if(c)var N=h?c(I,R,b,a,o,f):c(R,I,b,o,a,f);if(!(N===void 0?R===I||d(R,I,u,c,f):N)){_=!1;break}S||(S=b=="constructor")}if(_&&!S){var A=o.constructor,L=a.constructor;A!=L&&"constructor"in o&&"constructor"in a&&!(typeof A=="function"&&A instanceof A&&typeof L=="function"&&L instanceof L)&&(_=!1)}return f.delete(o),f.delete(a),_}return hp=i,hp}var pp,SO;function IU(){if(SO)return pp;SO=1;var e=xc(),t=ej(),r=CU(),n=RU(),i=Co(),o=xt(),a=Oo(),u=Ya(),c=1,d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype,v=p.hasOwnProperty;function m(y,x,b,w,E,_){var S=o(y),R=o(x),I=S?f:i(y),N=R?f:i(x);I=I==d?h:I,N=N==d?h:N;var A=I==h,L=N==h,B=I==N;if(B&&a(y)){if(!a(x))return!1;S=!0,A=!1}if(B&&!A)return _||(_=new e),S||u(y)?t(y,x,b,w,E,_):r(y,x,I,b,w,E,_);if(!(b&c)){var U=A&&v.call(y,"__wrapped__"),j=L&&v.call(x,"__wrapped__");if(U||j){var D=U?y.value():y,G=j?x.value():x;return _||(_=new e),E(D,G,b,w,_)}}return B?(_||(_=new e),n(y,x,b,w,E,_)):!1}return pp=m,pp}var vp,OO;function tj(){if(OO)return vp;OO=1;var e=IU(),t=on();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 vp=r,vp}var gp,CO;function PU(){if(CO)return gp;CO=1;var e=xc(),t=tj(),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 x=new e;if(c)var b=c(m,y,v,o,a,x);if(!(b===void 0?t(y,m,r|n,c,x):b))return!1}}return!0}return gp=i,gp}var mp,RO;function rj(){if(RO)return mp;RO=1;var e=Cr();function t(r){return r===r&&!e(r)}return mp=t,mp}var yp,IO;function NU(){if(IO)return yp;IO=1;var e=rj(),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 yp=r,yp}var bp,PO;function nj(){if(PO)return bp;PO=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return bp=e,bp}var xp,NO;function TU(){if(NO)return xp;NO=1;var e=PU(),t=NU(),r=nj();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 xp=n,xp}var wp,TO;function Ro(){if(TO)return wp;TO=1;var e=Ei(),t=on(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return wp=n,wp}var _p,AO;function Ex(){if(AO)return _p;AO=1;var e=xt(),t=Ro(),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 _p=i,_p}var Ep,MO;function AU(){if(MO)return Ep;MO=1;var e=fx(),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,Ep=r,Ep}var Sp,DO;function MU(){if(DO)return Sp;DO=1;var e=AU(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return Sp=r,Sp}var Op,jO;function DU(){if(jO)return Op;jO=1;var e=MU(),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 Op=n,Op}var Cp,qO;function Ic(){if(qO)return Cp;qO=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 Cp=e,Cp}var Rp,kO;function jU(){if(kO)return Rp;kO=1;var e=So(),t=Ic(),r=xt(),n=Ro(),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 Rp=a,Rp}var Ip,LO;function ij(){if(LO)return Ip;LO=1;var e=jU();function t(r){return r==null?"":e(r)}return Ip=t,Ip}var Pp,BO;function Pc(){if(BO)return Pp;BO=1;var e=xt(),t=Ex(),r=DU(),n=ij();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return Pp=i,Pp}var Np,FO;function Xa(){if(FO)return Np;FO=1;var e=Ro();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Np=t,Np}var Tp,$O;function Nc(){if($O)return Tp;$O=1;var e=Pc(),t=Xa();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 Tp=r,Tp}var Ap,zO;function qU(){if(zO)return Ap;zO=1;var e=Nc();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return Ap=t,Ap}var Mp,HO;function kU(){if(HO)return Mp;HO=1;function e(t,r){return t!=null&&r in Object(t)}return Mp=e,Mp}var Dp,UO;function oj(){if(UO)return Dp;UO=1;var e=Pc(),t=Ka(),r=xt(),n=Ec(),i=hx(),o=Xa();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 Dp=a,Dp}var jp,WO;function aj(){if(WO)return jp;WO=1;var e=kU(),t=oj();function r(n,i){return n!=null&&t(n,i,e)}return jp=r,jp}var qp,VO;function LU(){if(VO)return qp;VO=1;var e=tj(),t=qU(),r=aj(),n=Ex(),i=rj(),o=nj(),a=Xa(),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 qp=d,qp}var kp,GO;function sj(){if(GO)return kp;GO=1;function e(t){return function(r){return r==null?void 0:r[t]}}return kp=e,kp}var Lp,KO;function BU(){if(KO)return Lp;KO=1;var e=Nc();function t(r){return function(n){return e(n,r)}}return Lp=t,Lp}var Bp,YO;function FU(){if(YO)return Bp;YO=1;var e=sj(),t=BU(),r=Ex(),n=Xa();function i(o){return r(o)?e(n(o)):t(o)}return Bp=i,Bp}var Fp,XO;function Sn(){if(XO)return Fp;XO=1;var e=TU(),t=LU(),r=Ci(),n=xt(),i=FU();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 Fp=o,Fp}var $p,ZO;function uj(){if(ZO)return $p;ZO=1;var e=LD(),t=wU(),r=Sn(),n=xt();function i(o,a){var u=n(o)?e:t;return u(o,r(a,3))}return $p=i,$p}var zp,JO;function $U(){if(JO)return zp;JO=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return zp=r,zp}var Hp,QO;function cj(){if(QO)return Hp;QO=1;var e=$U(),t=oj();function r(n,i){return n!=null&&t(n,i,e)}return Hp=r,Hp}var Up,eC;function zU(){if(eC)return Up;eC=1;var e=vx(),t=Co(),r=Ka(),n=xt(),i=En(),o=Oo(),a=Oc(),u=Ya(),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 Up=p,Up}var Wp,tC;function lj(){if(tC)return Wp;tC=1;function e(t){return t===void 0}return Wp=e,Wp}var Vp,rC;function fj(){if(rC)return Vp;rC=1;var e=Rc(),t=En();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 Vp=r,Vp}var Gp,nC;function dj(){if(nC)return Gp;nC=1;var e=Ic(),t=Sn(),r=fj(),n=xt();function i(o,a){var u=n(o)?e:r;return u(o,t(a,3))}return Gp=i,Gp}var Kp,iC;function HU(){if(iC)return Kp;iC=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 Kp=e,Kp}var Yp,oC;function UU(){if(oC)return Yp;oC=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 Yp=e,Yp}var Xp,aC;function hj(){if(aC)return Xp;aC=1;var e=HU(),t=Rc(),r=Sn(),n=UU(),i=xt();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 Xp=o,Xp}var Zp,sC;function WU(){if(sC)return Zp;sC=1;var e=Ei(),t=xt(),r=on(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return Zp=i,Zp}var Jp,uC;function VU(){if(uC)return Jp;uC=1;var e=sj(),t=e("length");return Jp=t,Jp}var Qp,cC;function GU(){if(cC)return Qp;cC=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 Qp=c,Qp}var ev,lC;function KU(){if(lC)return ev;lC=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+"]?",x="(?:"+v+"(?:"+[f,h,p].join("|")+")"+y+m+")*",b=y+m+x,w="(?:"+[f+u+"?",u,h,p,a].join("|")+")",E=RegExp(c+"(?="+c+")|"+w+b,"g");function _(S){for(var R=E.lastIndex=0;E.test(S);)++R;return R}return ev=_,ev}var tv,fC;function YU(){if(fC)return tv;fC=1;var e=VU(),t=GU(),r=KU();function n(i){return t(i)?r(i):e(i)}return tv=n,tv}var rv,dC;function XU(){if(dC)return rv;dC=1;var e=vx(),t=Co(),r=En(),n=WU(),i=YU(),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 rv=u,rv}var nv,hC;function ZU(){if(hC)return nv;hC=1;var e=dx(),t=VD(),r=wx(),n=Sn(),i=Cc(),o=xt(),a=Oo(),u=Va(),c=Cr(),d=Ya();function f(h,p,v){var m=o(h),y=m||a(h)||d(h);if(p=n(p,4),v==null){var x=h&&h.constructor;y?v=m?new x:[]:c(h)?v=u(x)?t(i(h)):{}:v={}}return(y?e:r)(h,function(b,w,E){return p(v,b,w,E)}),v}return nv=f,nv}var iv,pC;function JU(){if(pC)return iv;pC=1;var e=So(),t=Ka(),r=xt(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return iv=i,iv}var ov,vC;function Sx(){if(vC)return ov;vC=1;var e=mx(),t=JU();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 ov=r,ov}var av,gC;function QU(){if(gC)return av;gC=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 av=e,av}var sv,mC;function pj(){if(mC)return sv;mC=1;var e=QU(),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 sv=r,sv}var uv,yC;function eW(){if(yC)return uv;yC=1;var e=bx(),t=MD(),r=Ci(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return uv=n,uv}var cv,bC;function tW(){if(bC)return cv;bC=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 cv=n,cv}var lv,xC;function vj(){if(xC)return lv;xC=1;var e=eW(),t=tW(),r=t(e);return lv=r,lv}var fv,wC;function Tc(){if(wC)return fv;wC=1;var e=Ci(),t=pj(),r=vj();function n(i,o){return r(t(i,o,e),i+"")}return fv=n,fv}var dv,_C;function gj(){if(_C)return dv;_C=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 dv=e,dv}var hv,EC;function rW(){if(EC)return hv;EC=1;function e(t){return t!==t}return hv=e,hv}var pv,SC;function nW(){if(SC)return pv;SC=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 pv=e,pv}var vv,OC;function iW(){if(OC)return vv;OC=1;var e=gj(),t=rW(),r=nW();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return vv=n,vv}var gv,CC;function oW(){if(CC)return gv;CC=1;var e=iW();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return gv=t,gv}var mv,RC;function aW(){if(RC)return mv;RC=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 mv=e,mv}var yv,IC;function sW(){if(IC)return yv;IC=1;function e(){}return yv=e,yv}var bv,PC;function uW(){if(PC)return bv;PC=1;var e=HD(),t=sW(),r=_x(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return bv=i,bv}var xv,NC;function cW(){if(NC)return xv;NC=1;var e=JD(),t=oW(),r=aW(),n=QD(),i=uW(),o=_x(),a=200;function u(c,d,f){var h=-1,p=t,v=c.length,m=!0,y=[],x=y;if(f)m=!1,p=r;else if(v>=a){var b=d?null:i(c);if(b)return o(b);m=!1,p=n,x=new e}else x=d?[]:y;e:for(;++h<v;){var w=c[h],E=d?d(w):w;if(w=f||w!==0?w:0,m&&E===E){for(var _=x.length;_--;)if(x[_]===E)continue e;d&&x.push(E),y.push(w)}else p(x,E,f)||(x!==y&&x.push(E),y.push(w))}return y}return xv=u,xv}var wv,TC;function mj(){if(TC)return wv;TC=1;var e=En(),t=on();function r(n){return t(n)&&e(n)}return wv=r,wv}var _v,AC;function lW(){if(AC)return _v;AC=1;var e=Sx(),t=Tc(),r=cW(),n=mj(),i=t(function(o){return r(e(o,1,n,!0))});return _v=i,_v}var Ev,MC;function fW(){if(MC)return Ev;MC=1;var e=Ic();function t(r,n){return e(n,function(i){return r[i]})}return Ev=t,Ev}var Sv,DC;function yj(){if(DC)return Sv;DC=1;var e=fW(),t=Vn();function r(n){return n==null?[]:e(n,t(n))}return Sv=r,Sv}var Ov,jC;function Rr(){if(jC)return Ov;jC=1;var e;if(typeof cx=="function")try{e={clone:yU(),constant:bx(),each:ZD(),filter:uj(),has:cj(),isArray:xt(),isEmpty:zU(),isFunction:Va(),isUndefined:lj(),keys:Vn(),map:dj(),reduce:hj(),size:XU(),transform:ZU(),union:lW(),values:yj()}}catch{}return e||(e=window._),Ov=e,Ov}var Cv,qC;function Ox(){if(qC)return Cv;qC=1;var e=Rr();Cv=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,x){f(x)&&h.setNode(x,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 x=p.parent(y);return x===void 0||h.hasNode(x)?(v[y]=x,x):x in v?v[x]:m(x)}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 x=u(this._isDirected,f,h,p);if(e.has(this._edgeLabels,x))return m&&(this._edgeLabels[x]=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[x]=m?v:this._defaultEdgeLabelFn(f,h,p);var b=c(this._isDirected,f,h,p);return f=b.v,h=b.w,Object.freeze(b),this._edgeObjs[x]=b,o(this._preds[h],f),o(this._sucs[f],h),this._in[h][x]=b,this._out[f][x]=b,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 x=m;m=y,y=x}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 x=m;m=y,y=x}var b={v:m,w:y};return v&&(b.name=v),b}function d(f,h){return u(f,h.v,h.w,h.name)}return Cv}var Rv,kC;function dW(){return kC||(kC=1,Rv="2.1.8"),Rv}var Iv,LC;function hW(){return LC||(LC=1,Iv={Graph:Ox(),version:dW()}),Iv}var Pv,BC;function pW(){if(BC)return Pv;BC=1;var e=Rr(),t=Ox();Pv={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 Pv}var Nv,FC;function vW(){if(FC)return Nv;FC=1;var e=Rr();Nv=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 Nv}var Tv,$C;function bj(){if($C)return Tv;$C=1;var e=Rr();Tv=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},Tv}var Av,zC;function xj(){if(zC)return Av;zC=1;var e=Rr(),t=bj();Av=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,x=d[y],b=u(m),w=p.distance+b;if(b<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+b);w<x.distance&&(x.distance=w,x.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 Av}var Mv,HC;function gW(){if(HC)return Mv;HC=1;var e=xj(),t=Rr();Mv=r;function r(n,i,o){return t.transform(n.nodes(),function(a,u){a[u]=e(n,u,i,o)},{})}return Mv}var Dv,UC;function wj(){if(UC)return Dv;UC=1;var e=Rr();Dv=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 Dv}var jv,WC;function mW(){if(WC)return jv;WC=1;var e=Rr(),t=wj();jv=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 jv}var qv,VC;function yW(){if(VC)return qv;VC=1;var e=Rr();qv=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],x=p[v],b=m.distance+y.distance;b<x.distance&&(x.distance=b,x.predecessor=y.predecessor)})})}),u}return qv}var kv,GC;function _j(){if(GC)return kv;GC=1;var e=Rr();kv=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,kv}var Lv,KC;function bW(){if(KC)return Lv;KC=1;var e=_j();Lv=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return Lv}var Bv,YC;function Ej(){if(YC)return Bv;YC=1;var e=Rr();Bv=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 Bv}var Fv,XC;function xW(){if(XC)return Fv;XC=1;var e=Ej();Fv=t;function t(r,n){return e(r,n,"post")}return Fv}var $v,ZC;function wW(){if(ZC)return $v;ZC=1;var e=Ej();$v=t;function t(r,n){return e(r,n,"pre")}return $v}var zv,JC;function _W(){if(JC)return zv;JC=1;var e=Rr(),t=Ox(),r=bj();zv=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 zv}var Hv,QC;function EW(){return QC||(QC=1,Hv={components:vW(),dijkstra:xj(),dijkstraAll:gW(),findCycles:mW(),floydWarshall:yW(),isAcyclic:bW(),postorder:xW(),preorder:wW(),prim:_W(),tarjan:wj(),topsort:_j()}),Hv}var Uv,eR;function SW(){if(eR)return Uv;eR=1;var e=hW();return Uv={Graph:e.Graph,json:pW(),alg:EW(),version:e.version},Uv}var Wv,tR;function Fr(){if(tR)return Wv;tR=1;var e;if(typeof cx=="function")try{e=SW()}catch{}return e||(e=window.graphlib),Wv=e,Wv}var Vv,rR;function OW(){if(rR)return Vv;rR=1;var e=KD(),t=1,r=4;function n(i){return e(i,t|r)}return Vv=n,Vv}var Gv,nR;function Ac(){if(nR)return Gv;nR=1;var e=Eo(),t=En(),r=Ec(),n=Cr();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 Gv=i,Gv}var Kv,iR;function CW(){if(iR)return Kv;iR=1;var e=Tc(),t=Eo(),r=Ac(),n=Oi(),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 x=v[m],b=u[x];(b===void 0||t(b,i[x])&&!o.call(u,x))&&(u[x]=p[x])}return u});return Kv=a,Kv}var Yv,oR;function RW(){if(oR)return Yv;oR=1;var e=Sn(),t=En(),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 Yv=n,Yv}var Xv,aR;function IW(){if(aR)return Xv;aR=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Xv=t,Xv}var Zv,sR;function PW(){if(sR)return Zv;sR=1;var e=IW(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Zv=r,Zv}var Jv,uR;function NW(){if(uR)return Jv;uR=1;var e=PW(),t=Cr(),r=Ro(),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 Jv=c,Jv}var Qv,cR;function Sj(){if(cR)return Qv;cR=1;var e=NW(),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 Qv=n,Qv}var eg,lR;function TW(){if(lR)return eg;lR=1;var e=Sj();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return eg=t,eg}var tg,fR;function AW(){if(fR)return tg;fR=1;var e=gj(),t=Sn(),r=TW(),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 tg=i,tg}var rg,dR;function MW(){if(dR)return rg;dR=1;var e=RW(),t=AW(),r=e(t);return rg=r,rg}var ng,hR;function Oj(){if(hR)return ng;hR=1;var e=Sx();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return ng=t,ng}var ig,pR;function DW(){if(pR)return ig;pR=1;var e=xx(),t=YD(),r=Oi();function n(i,o){return i==null?i:e(i,t(o),r)}return ig=n,ig}var og,vR;function jW(){if(vR)return og;vR=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return og=e,og}var ag,gR;function qW(){if(gR)return ag;gR=1;var e=wc(),t=wx(),r=Sn();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 ag=n,ag}var sg,mR;function Cx(){if(mR)return sg;mR=1;var e=Ro();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 sg=t,sg}var ug,yR;function kW(){if(yR)return ug;yR=1;function e(t,r){return t>r}return ug=e,ug}var cg,bR;function LW(){if(bR)return cg;bR=1;var e=Cx(),t=kW(),r=Ci();function n(i){return i&&i.length?e(i,r,t):void 0}return cg=n,cg}var lg,xR;function Cj(){if(xR)return lg;xR=1;var e=wc(),t=Eo();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return lg=r,lg}var fg,wR;function BW(){if(wR)return fg;wR=1;var e=Ei(),t=Cc(),r=on(),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 fg=d,fg}var dg,_R;function Rj(){if(_R)return dg;_R=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return dg=e,dg}var hg,ER;function FW(){if(ER)return hg;ER=1;var e=Ga(),t=Oi();function r(n){return e(n,t(n))}return hg=r,hg}var pg,SR;function $W(){if(SR)return pg;SR=1;var e=Cj(),t=qD(),r=WD(),n=kD(),i=GD(),o=Ka(),a=xt(),u=mj(),c=Oo(),d=Va(),f=Cr(),h=BW(),p=Ya(),v=Rj(),m=FW();function y(x,b,w,E,_,S,R){var I=v(x,w),N=v(b,w),A=R.get(N);if(A){e(x,w,A);return}var L=S?S(I,N,w+"",x,b,R):void 0,B=L===void 0;if(B){var U=a(N),j=!U&&c(N),D=!U&&!j&&p(N);L=N,U||j||D?a(I)?L=I:u(I)?L=n(I):j?(B=!1,L=t(N,!0)):D?(B=!1,L=r(N,!0)):L=[]:h(N)||o(N)?(L=I,o(I)?L=m(I):(!f(I)||d(I))&&(L=i(N))):B=!1}B&&(R.set(N,L),_(L,N,E,S,R),R.delete(N)),e(x,w,L)}return pg=y,pg}var vg,OR;function zW(){if(OR)return vg;OR=1;var e=xc(),t=Cj(),r=xx(),n=$W(),i=Cr(),o=Oi(),a=Rj();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 vg=u,vg}var gg,CR;function HW(){if(CR)return gg;CR=1;var e=Tc(),t=Ac();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 gg=r,gg}var mg,RR;function UW(){if(RR)return mg;RR=1;var e=zW(),t=HW(),r=t(function(n,i,o){e(n,i,o)});return mg=r,mg}var yg,IR;function Ij(){if(IR)return yg;IR=1;function e(t,r){return t<r}return yg=e,yg}var bg,PR;function WW(){if(PR)return bg;PR=1;var e=Cx(),t=Ij(),r=Ci();function n(i){return i&&i.length?e(i,r,t):void 0}return bg=n,bg}var xg,NR;function VW(){if(NR)return xg;NR=1;var e=Cx(),t=Sn(),r=Ij();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return xg=n,xg}var wg,TR;function GW(){if(TR)return wg;TR=1;var e=Hr(),t=function(){return e.Date.now()};return wg=t,wg}var _g,AR;function KW(){if(AR)return _g;AR=1;var e=_c(),t=Pc(),r=Ec(),n=Cr(),i=Xa();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 x=v[m];y=d?d(x,m,v):void 0,y===void 0&&(y=n(x)?x:r(u[f+1])?[]:{})}e(v,m,y),v=v[m]}return a}return _g=o,_g}var Eg,MR;function YW(){if(MR)return Eg;MR=1;var e=Nc(),t=KW(),r=Pc();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 Eg=n,Eg}var Sg,DR;function XW(){if(DR)return Sg;DR=1;var e=YW(),t=aj();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return Sg=r,Sg}var Og,jR;function ZW(){if(jR)return Og;jR=1;var e=Oj(),t=pj(),r=vj();function n(i){return r(t(i,void 0,e),i+"")}return Og=n,Og}var Cg,qR;function JW(){if(qR)return Cg;qR=1;var e=XW(),t=ZW(),r=t(function(n,i){return n==null?{}:e(n,i)});return Cg=r,Cg}var Rg,kR;function QW(){if(kR)return Rg;kR=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 Rg=r,Rg}var Ig,LR;function eV(){if(LR)return Ig;LR=1;var e=QW(),t=Ac(),r=Sj();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 Ig=n,Ig}var Pg,BR;function tV(){if(BR)return Pg;BR=1;var e=eV(),t=e();return Pg=t,Pg}var Ng,FR;function rV(){if(FR)return Ng;FR=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Ng=e,Ng}var Tg,$R;function nV(){if($R)return Tg;$R=1;var e=Ro();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 Tg=t,Tg}var Ag,zR;function iV(){if(zR)return Ag;zR=1;var e=nV();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 Ag=t,Ag}var Mg,HR;function oV(){if(HR)return Mg;HR=1;var e=Ic(),t=Nc(),r=Sn(),n=fj(),i=rV(),o=Sc(),a=iV(),u=Ci(),c=xt();function d(f,h,p){h.length?h=e(h,function(y){return c(y)?function(x){return t(x,y.length===1?y[0]:y)}:y}):h=[u];var v=-1;h=e(h,o(r));var m=n(f,function(y,x,b){var w=e(h,function(E){return E(y)});return{criteria:w,index:++v,value:y}});return i(m,function(y,x){return a(y,x,p)})}return Mg=d,Mg}var Dg,UR;function aV(){if(UR)return Dg;UR=1;var e=Sx(),t=oV(),r=Tc(),n=Ac(),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 Dg=i,Dg}var jg,WR;function sV(){if(WR)return jg;WR=1;var e=ij(),t=0;function r(n){var i=++t;return e(n)+i}return jg=r,jg}var qg,VR;function uV(){if(VR)return qg;VR=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 qg=e,qg}var kg,GR;function cV(){if(GR)return kg;GR=1;var e=_c(),t=uV();function r(n,i){return t(n||[],i||[],e)}return kg=r,kg}var Lg,KR;function ut(){if(KR)return Lg;KR=1;var e;if(typeof cx=="function")try{e={cloneDeep:OW(),constant:bx(),defaults:CW(),each:ZD(),filter:uj(),find:MW(),flatten:Oj(),forEach:XD(),forIn:DW(),has:cj(),isUndefined:lj(),last:jW(),map:dj(),mapValues:qW(),max:LW(),merge:UW(),min:WW(),minBy:VW(),now:GW(),pick:JW(),range:tV(),reduce:hj(),sortBy:aV(),uniqueId:sV(),values:yj(),zipObject:cV()}}catch{}return e||(e=window._),Lg=e,Lg}var Bg,YR;function lV(){if(YR)return Bg;YR=1,Bg=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 Bg}var Fg,XR;function fV(){if(XR)return Fg;XR=1;var e=ut(),t=Fr().Graph,r=lV();Fg=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 x=f.length-2;x>0;--x)if(y=f[x].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 x=d.edge(y),b=d.node(y.v);v&&m.push({v:y.v,w:y.w}),b.out-=x,c(f,h,b)}),e.forEach(d.outEdges(p.v),function(y){var x=d.edge(y),b=y.w,w=d.node(b);w.in-=x,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(x){h.setNode(x,{v:x,in:0,out:0})}),e.forEach(d.edges(),function(x){var b=h.edge(x.v,x.w)||0,w=f(x),E=b+w;h.setEdge(x.v,x.w,E),v=Math.max(v,h.node(x.v).out+=w),p=Math.max(p,h.node(x.w).in+=w)});var m=e.range(v+p+3).map(function(){return new r}),y=p+1;return e.forEach(h.nodes(),function(x){c(m,y,h.node(x))}),{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 Fg}var $g,ZR;function dV(){if(ZR)return $g;ZR=1;var e=ut(),t=fV();$g={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 $g}var zg,JR;function Yt(){if(JR)return zg;JR=1;var e=ut(),t=Fr().Graph;zg={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(x,b,w,E){var _;do _=e.uniqueId(E);while(x.hasNode(_));return w.dummy=b,x.setNode(_,w),_}function n(x){var b=new t().setGraph(x.graph());return e.forEach(x.nodes(),function(w){b.setNode(w,x.node(w))}),e.forEach(x.edges(),function(w){var E=b.edge(w.v,w.w)||{weight:0,minlen:1},_=x.edge(w);b.setEdge(w.v,w.w,{weight:E.weight+_.weight,minlen:Math.max(E.minlen,_.minlen)})}),b}function i(x){var b=new t({multigraph:x.isMultigraph()}).setGraph(x.graph());return e.forEach(x.nodes(),function(w){x.children(w).length||b.setNode(w,x.node(w))}),e.forEach(x.edges(),function(w){b.setEdge(w,x.edge(w))}),b}function o(x){var b=e.map(x.nodes(),function(w){var E={};return e.forEach(x.outEdges(w),function(_){E[_.w]=(E[_.w]||0)+x.edge(_).weight}),E});return e.zipObject(x.nodes(),b)}function a(x){var b=e.map(x.nodes(),function(w){var E={};return e.forEach(x.inEdges(w),function(_){E[_.v]=(E[_.v]||0)+x.edge(_).weight}),E});return e.zipObject(x.nodes(),b)}function u(x,b){var w=x.x,E=x.y,_=b.x-w,S=b.y-E,R=x.width/2,I=x.height/2;if(!_&&!S)throw new Error("Not possible to find intersection inside of the rectangle");var N,A;return Math.abs(S)*R>Math.abs(_)*I?(S<0&&(I=-I),N=I*_/S,A=I):(_<0&&(R=-R),N=R,A=R*S/_),{x:w+N,y:E+A}}function c(x){var b=e.map(e.range(p(x)+1),function(){return[]});return e.forEach(x.nodes(),function(w){var E=x.node(w),_=E.rank;e.isUndefined(_)||(b[_][E.order]=w)}),b}function d(x){var b=e.min(e.map(x.nodes(),function(w){return x.node(w).rank}));e.forEach(x.nodes(),function(w){var E=x.node(w);e.has(E,"rank")&&(E.rank-=b)})}function f(x){var b=e.min(e.map(x.nodes(),function(S){return x.node(S).rank})),w=[];e.forEach(x.nodes(),function(S){var R=x.node(S).rank-b;w[R]||(w[R]=[]),w[R].push(S)});var E=0,_=x.graph().nodeRankFactor;e.forEach(w,function(S,R){e.isUndefined(S)&&R%_!==0?--E:E&&e.forEach(S,function(I){x.node(I).rank+=E})})}function h(x,b,w,E){var _={width:0,height:0};return arguments.length>=4&&(_.rank=w,_.order=E),r(x,"border",_,b)}function p(x){return e.max(e.map(x.nodes(),function(b){var w=x.node(b).rank;if(!e.isUndefined(w))return w}))}function v(x,b){var w={lhs:[],rhs:[]};return e.forEach(x,function(E){b(E)?w.lhs.push(E):w.rhs.push(E)}),w}function m(x,b){var w=e.now();try{return b()}finally{console.log(x+" time: "+(e.now()-w)+"ms")}}function y(x,b){return b()}return zg}var Hg,QR;function hV(){if(QR)return Hg;QR=1;var e=ut(),t=Yt();Hg={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,x;for(x=0,++c;c<f;++x,++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),x===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 Hg}var Ug,eI;function Lu(){if(eI)return Ug;eI=1;var e=ut();Ug={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 Ug}var Wg,tI;function Pj(){if(tI)return Wg;tI=1;var e=ut(),t=Fr().Graph,r=Lu().slack;Wg=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 Wg}var Vg,rI;function pV(){if(rI)return Vg;rI=1;var e=ut(),t=Pj(),r=Lu().slack,n=Lu().longestPath,i=Fr().alg.preorder,o=Fr().alg.postorder,a=Yt().simplify;Vg=u,u.initLowLimValues=h,u.initCutValues=c,u.calcCutValue=f,u.leaveEdge=v,u.enterEdge=m,u.exchangeEdges=y;function u(E){E=a(E),n(E);var _=t(E);h(_),c(_,E);for(var S,R;S=v(_);)R=m(_,E,S),y(_,E,S,R)}function c(E,_){var S=o(E,E.nodes());S=S.slice(0,S.length-1),e.forEach(S,function(R){d(E,_,R)})}function d(E,_,S){var R=E.node(S),I=R.parent;E.edge(S,I).cutvalue=f(E,_,S)}function f(E,_,S){var R=E.node(S),I=R.parent,N=!0,A=_.edge(S,I),L=0;return A||(N=!1,A=_.edge(I,S)),L=A.weight,e.forEach(_.nodeEdges(S),function(B){var U=B.v===S,j=U?B.w:B.v;if(j!==I){var D=U===N,G=_.edge(B).weight;if(L+=D?G:-G,b(E,S,j)){var F=E.edge(S,j).cutvalue;L+=D?-F:F}}}),L}function h(E,_){arguments.length<2&&(_=E.nodes()[0]),p(E,{},1,_)}function p(E,_,S,R,I){var N=S,A=E.node(R);return _[R]=!0,e.forEach(E.neighbors(R),function(L){e.has(_,L)||(S=p(E,_,S,L,R))}),A.low=N,A.lim=S++,I?A.parent=I:delete A.parent,S}function v(E){return e.find(E.edges(),function(_){return E.edge(_).cutvalue<0})}function m(E,_,S){var R=S.v,I=S.w;_.hasEdge(R,I)||(R=S.w,I=S.v);var N=E.node(R),A=E.node(I),L=N,B=!1;N.lim>A.lim&&(L=A,B=!0);var U=e.filter(_.edges(),function(j){return B===w(E,E.node(j.v),L)&&B!==w(E,E.node(j.w),L)});return e.minBy(U,function(j){return r(_,j)})}function y(E,_,S,R){var I=S.v,N=S.w;E.removeEdge(I,N),E.setEdge(R.v,R.w,{}),h(E),c(E,_),x(E,_)}function x(E,_){var S=e.find(E.nodes(),function(I){return!_.node(I).parent}),R=i(E,S);R=R.slice(1),e.forEach(R,function(I){var N=E.node(I).parent,A=_.edge(I,N),L=!1;A||(A=_.edge(N,I),L=!0),_.node(I).rank=_.node(N).rank+(L?A.minlen:-A.minlen)})}function b(E,_,S){return E.hasEdge(_,S)}function w(E,_,S){return S.low<=_.lim&&_.lim<=S.lim}return Vg}var Gg,nI;function vV(){if(nI)return Gg;nI=1;var e=Lu(),t=e.longestPath,r=Pj(),n=pV();Gg=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 Gg}var Kg,iI;function gV(){if(iI)return Kg;iI=1;var e=ut();Kg=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 Kg}var Yg,oI;function mV(){if(oI)return Yg;oI=1;var e=ut(),t=Yt();Yg={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"),x=t.addBorderNode(u,"_bb"),b=u.node(v);u.setParent(y,v),b.borderTop=y,u.setParent(x,v),b.borderBottom=x,e.forEach(m,function(w){n(u,c,d,f,h,p,w);var E=u.node(w),_=E.borderTop?E.borderTop:w,S=E.borderBottom?E.borderBottom:w,R=E.borderTop?f:2*f,I=_!==S?1:h-p[v]+1;u.setEdge(y,_,{weight:R,minlen:I,nestingEdge:!0}),u.setEdge(S,x,{weight:R,minlen:I,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 Yg}var Xg,aI;function yV(){if(aI)return Xg;aI=1;var e=ut(),t=Yt();Xg=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 Xg}var Zg,sI;function bV(){if(sI)return Zg;sI=1;var e=ut();Zg={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 Zg}var Jg,uI;function xV(){if(uI)return Jg;uI=1;var e=ut();Jg=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 Jg}var Qg,cI;function wV(){if(cI)return Qg;cI=1;var e=ut();Qg=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 Qg}var em,lI;function _V(){if(lI)return em;lI=1;var e=ut();em=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 em}var tm,fI;function EV(){if(fI)return tm;fI=1;var e=ut();tm=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 tm}var rm,dI;function SV(){if(dI)return rm;dI=1;var e=ut(),t=Yt();rm=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 rm}var nm,hI;function OV(){if(hI)return nm;hI=1;var e=ut(),t=_V(),r=EV(),n=SV();nm=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(S){return S!==v&&S!==m}));var x=t(u,h);e.forEach(x,function(S){if(u.children(S.v).length){var R=i(u,S.v,d,f);y[S.v]=R,e.has(R,"barycenter")&&a(S,R)}});var b=r(x,d);o(b,y);var w=n(b,f);if(v&&(w.vs=e.flatten([v,w.vs,m],!0),u.predecessors(v).length)){var E=u.node(u.predecessors(v)[0]),_=u.node(u.predecessors(m)[0]);e.has(w,"barycenter")||(w.barycenter=0,w.weight=0),w.barycenter=(w.barycenter*w.weight+E.order+_.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 nm}var im,pI;function CV(){if(pI)return im;pI=1;var e=ut(),t=Fr().Graph;im=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 im}var om,vI;function RV(){if(vI)return om;vI=1;var e=ut();om=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 om}var am,gI;function IV(){if(gI)return am;gI=1;var e=ut(),t=xV(),r=wV(),n=OV(),i=CV(),o=RV(),a=Fr().Graph,u=Yt();am=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"),x=t(p);h(p,x);for(var b=Number.POSITIVE_INFINITY,w,E=0,_=0;_<4;++E,++_){f(E%2?m:y,E%4>=2),x=u.buildLayerMatrix(p);var S=r(p,x);S<b&&(_=0,w=e.cloneDeep(x),b=S)}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 x=y.graph().root,b=n(y,x,m,v);e.forEach(b.vs,function(w,E){y.node(w).order=E}),o(y,m,b.vs)})}function h(p,v){e.forEach(v,function(m){e.forEach(m,function(y,x){p.node(y).order=x})})}return am}var sm,mI;function PV(){if(mI)return sm;mI=1;var e=ut(),t=Fr().Graph,r=Yt();sm={positionX:m,findType1Conflicts:n,findType2Conflicts:i,addConflict:a,hasConflict:u,verticalAlignment:c,horizontalCompaction:d,alignCoordinates:p,findSmallestWidthAlignment:h,balance:v};function n(b,w){var E={};function _(S,R){var I=0,N=0,A=S.length,L=e.last(R);return e.forEach(R,function(B,U){var j=o(b,B),D=j?b.node(j).order:A;(j||B===L)&&(e.forEach(R.slice(N,U+1),function(G){e.forEach(b.predecessors(G),function(F){var X=b.node(F),Z=X.order;(Z<I||D<Z)&&!(X.dummy&&b.node(G).dummy)&&a(E,F,G)})}),N=U+1,I=D)}),R}return e.reduce(w,_),E}function i(b,w){var E={};function _(R,I,N,A,L){var B;e.forEach(e.range(I,N),function(U){B=R[U],b.node(B).dummy&&e.forEach(b.predecessors(B),function(j){var D=b.node(j);D.dummy&&(D.order<A||D.order>L)&&a(E,j,B)})})}function S(R,I){var N=-1,A,L=0;return e.forEach(I,function(B,U){if(b.node(B).dummy==="border"){var j=b.predecessors(B);j.length&&(A=b.node(j[0]).order,_(I,L,U,N,A),L=U,N=A)}_(I,L,I.length,A,R.length)}),I}return e.reduce(w,S),E}function o(b,w){if(b.node(w).dummy)return e.find(b.predecessors(w),function(E){return b.node(E).dummy})}function a(b,w,E){if(w>E){var _=w;w=E,E=_}var S=b[w];S||(b[w]=S={}),S[E]=!0}function u(b,w,E){if(w>E){var _=w;w=E,E=_}return e.has(b[w],E)}function c(b,w,E,_){var S={},R={},I={};return e.forEach(w,function(N){e.forEach(N,function(A,L){S[A]=A,R[A]=A,I[A]=L})}),e.forEach(w,function(N){var A=-1;e.forEach(N,function(L){var B=_(L);if(B.length){B=e.sortBy(B,function(F){return I[F]});for(var U=(B.length-1)/2,j=Math.floor(U),D=Math.ceil(U);j<=D;++j){var G=B[j];R[L]===L&&A<I[G]&&!u(E,L,G)&&(R[G]=L,R[L]=S[L]=S[G],A=I[G])}}})}),{root:S,align:R}}function d(b,w,E,_,S){var R={},I=f(b,w,E,S),N=S?"borderLeft":"borderRight";function A(U,j){for(var D=I.nodes(),G=D.pop(),F={};G;)F[G]?U(G):(F[G]=!0,D.push(G),D=D.concat(j(G))),G=D.pop()}function L(U){R[U]=I.inEdges(U).reduce(function(j,D){return Math.max(j,R[D.v]+I.edge(D))},0)}function B(U){var j=I.outEdges(U).reduce(function(G,F){return Math.min(G,R[F.w]-I.edge(F))},Number.POSITIVE_INFINITY),D=b.node(U);j!==Number.POSITIVE_INFINITY&&D.borderType!==N&&(R[U]=Math.max(R[U],j))}return A(L,I.predecessors.bind(I)),A(B,I.successors.bind(I)),e.forEach(_,function(U){R[U]=R[E[U]]}),R}function f(b,w,E,_){var S=new t,R=b.graph(),I=y(R.nodesep,R.edgesep,_);return e.forEach(w,function(N){var A;e.forEach(N,function(L){var B=E[L];if(S.setNode(B),A){var U=E[A],j=S.edge(U,B);S.setEdge(U,B,Math.max(I(b,L,A),j||0))}A=L})}),S}function h(b,w){return e.minBy(e.values(w),function(E){var _=Number.NEGATIVE_INFINITY,S=Number.POSITIVE_INFINITY;return e.forIn(E,function(R,I){var N=x(b,I)/2;_=Math.max(R+N,_),S=Math.min(R-N,S)}),_-S})}function p(b,w){var E=e.values(w),_=e.min(E),S=e.max(E);e.forEach(["u","d"],function(R){e.forEach(["l","r"],function(I){var N=R+I,A=b[N],L;if(A!==w){var B=e.values(A);L=I==="l"?_-e.min(B):S-e.max(B),L&&(b[N]=e.mapValues(A,function(U){return U+L}))}})})}function v(b,w){return e.mapValues(b.ul,function(E,_){if(w)return b[w.toLowerCase()][_];var S=e.sortBy(e.map(b,_));return(S[1]+S[2])/2})}function m(b){var w=r.buildLayerMatrix(b),E=e.merge(n(b,w),i(b,w)),_={},S;e.forEach(["u","d"],function(I){S=I==="u"?w:e.values(w).reverse(),e.forEach(["l","r"],function(N){N==="r"&&(S=e.map(S,function(U){return e.values(U).reverse()}));var A=(I==="u"?b.predecessors:b.successors).bind(b),L=c(b,S,E,A),B=d(b,S,L.root,L.align,N==="r");N==="r"&&(B=e.mapValues(B,function(U){return-U})),_[I+N]=B})});var R=h(b,_);return p(_,R),v(_,b.graph().align)}function y(b,w,E){return function(_,S,R){var I=_.node(S),N=_.node(R),A=0,L;if(A+=I.width/2,e.has(I,"labelpos"))switch(I.labelpos.toLowerCase()){case"l":L=-I.width/2;break;case"r":L=I.width/2;break}if(L&&(A+=E?L:-L),L=0,A+=(I.dummy?w:b)/2,A+=(N.dummy?w:b)/2,A+=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&&(A+=E?L:-L),L=0,A}}function x(b,w){return b.node(w).width}return sm}var um,yI;function NV(){if(yI)return um;yI=1;var e=ut(),t=Yt(),r=PV().positionX;um=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 um}var cm,bI;function TV(){if(bI)return cm;bI=1;var e=ut(),t=dV(),r=hV(),n=vV(),i=Yt().normalizeRanks,o=gV(),a=Yt().removeEmptyRanks,u=mV(),c=yV(),d=bV(),f=IV(),h=NV(),p=Yt(),v=Fr().Graph;cm=m;function m(H,K){var $=K&&K.debugTiming?p.time:p.notime;$("layout",function(){var k=$(" buildLayoutGraph",function(){return A(H)});$(" runLayout",function(){y(k,$)}),$(" updateInputGraph",function(){x(H,k)})})}function y(H,K){K(" makeSpaceForEdgeLabels",function(){L(H)}),K(" removeSelfEdges",function(){Q(H)}),K(" acyclic",function(){t.run(H)}),K(" nestingGraph.run",function(){u.run(H)}),K(" rank",function(){n(p.asNonCompoundGraph(H))}),K(" injectEdgeLabelProxies",function(){B(H)}),K(" removeEmptyRanks",function(){a(H)}),K(" nestingGraph.cleanup",function(){u.cleanup(H)}),K(" normalizeRanks",function(){i(H)}),K(" assignRankMinMax",function(){U(H)}),K(" removeEdgeLabelProxies",function(){j(H)}),K(" normalize.run",function(){r.run(H)}),K(" parentDummyChains",function(){o(H)}),K(" addBorderSegments",function(){c(H)}),K(" order",function(){f(H)}),K(" insertSelfEdges",function(){V(H)}),K(" adjustCoordinateSystem",function(){d.adjust(H)}),K(" position",function(){h(H)}),K(" positionSelfEdges",function(){ee(H)}),K(" removeBorderNodes",function(){Z(H)}),K(" normalize.undo",function(){r.undo(H)}),K(" fixupEdgeLabelCoords",function(){F(H)}),K(" undoCoordinateSystem",function(){d.undo(H)}),K(" translateGraph",function(){D(H)}),K(" assignNodeIntersects",function(){G(H)}),K(" reversePoints",function(){X(H)}),K(" acyclic.undo",function(){t.undo(H)})}function x(H,K){e.forEach(H.nodes(),function($){var k=H.node($),z=K.node($);k&&(k.x=z.x,k.y=z.y,K.children($).length&&(k.width=z.width,k.height=z.height))}),e.forEach(H.edges(),function($){var k=H.edge($),z=K.edge($);k.points=z.points,e.has(z,"x")&&(k.x=z.x,k.y=z.y)}),H.graph().width=K.graph().width,H.graph().height=K.graph().height}var b=["nodesep","edgesep","ranksep","marginx","marginy"],w={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},E=["acyclicer","ranker","rankdir","align"],_=["width","height"],S={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],I={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},N=["labelpos"];function A(H){var K=new v({multigraph:!0,compound:!0}),$=ae(H.graph());return K.setGraph(e.merge({},w,oe($,b),e.pick($,E))),e.forEach(H.nodes(),function(k){var z=ae(H.node(k));K.setNode(k,e.defaults(oe(z,_),S)),K.setParent(k,H.parent(k))}),e.forEach(H.edges(),function(k){var z=ae(H.edge(k));K.setEdge(k,e.merge({},I,oe(z,R),e.pick(z,N)))}),K}function L(H){var K=H.graph();K.ranksep/=2,e.forEach(H.edges(),function($){var k=H.edge($);k.minlen*=2,k.labelpos.toLowerCase()!=="c"&&(K.rankdir==="TB"||K.rankdir==="BT"?k.width+=k.labeloffset:k.height+=k.labeloffset)})}function B(H){e.forEach(H.edges(),function(K){var $=H.edge(K);if($.width&&$.height){var k=H.node(K.v),z=H.node(K.w),re={rank:(z.rank-k.rank)/2+k.rank,e:K};p.addDummyNode(H,"edge-proxy",re,"_ep")}})}function U(H){var K=0;e.forEach(H.nodes(),function($){var k=H.node($);k.borderTop&&(k.minRank=H.node(k.borderTop).rank,k.maxRank=H.node(k.borderBottom).rank,K=e.max(K,k.maxRank))}),H.graph().maxRank=K}function j(H){e.forEach(H.nodes(),function(K){var $=H.node(K);$.dummy==="edge-proxy"&&(H.edge($.e).labelRank=$.rank,H.removeNode(K))})}function D(H){var K=Number.POSITIVE_INFINITY,$=0,k=Number.POSITIVE_INFINITY,z=0,re=H.graph(),ie=re.marginx||0,se=re.marginy||0;function ce(be){var Ce=be.x,_e=be.y,he=be.width,fe=be.height;K=Math.min(K,Ce-he/2),$=Math.max($,Ce+he/2),k=Math.min(k,_e-fe/2),z=Math.max(z,_e+fe/2)}e.forEach(H.nodes(),function(be){ce(H.node(be))}),e.forEach(H.edges(),function(be){var Ce=H.edge(be);e.has(Ce,"x")&&ce(Ce)}),K-=ie,k-=se,e.forEach(H.nodes(),function(be){var Ce=H.node(be);Ce.x-=K,Ce.y-=k}),e.forEach(H.edges(),function(be){var Ce=H.edge(be);e.forEach(Ce.points,function(_e){_e.x-=K,_e.y-=k}),e.has(Ce,"x")&&(Ce.x-=K),e.has(Ce,"y")&&(Ce.y-=k)}),re.width=$-K+ie,re.height=z-k+se}function G(H){e.forEach(H.edges(),function(K){var $=H.edge(K),k=H.node(K.v),z=H.node(K.w),re,ie;$.points?(re=$.points[0],ie=$.points[$.points.length-1]):($.points=[],re=z,ie=k),$.points.unshift(p.intersectRect(k,re)),$.points.push(p.intersectRect(z,ie))})}function F(H){e.forEach(H.edges(),function(K){var $=H.edge(K);if(e.has($,"x"))switch(($.labelpos==="l"||$.labelpos==="r")&&($.width-=$.labeloffset),$.labelpos){case"l":$.x-=$.width/2+$.labeloffset;break;case"r":$.x+=$.width/2+$.labeloffset;break}})}function X(H){e.forEach(H.edges(),function(K){var $=H.edge(K);$.reversed&&$.points.reverse()})}function Z(H){e.forEach(H.nodes(),function(K){if(H.children(K).length){var $=H.node(K),k=H.node($.borderTop),z=H.node($.borderBottom),re=H.node(e.last($.borderLeft)),ie=H.node(e.last($.borderRight));$.width=Math.abs(ie.x-re.x),$.height=Math.abs(z.y-k.y),$.x=re.x+$.width/2,$.y=k.y+$.height/2}}),e.forEach(H.nodes(),function(K){H.node(K).dummy==="border"&&H.removeNode(K)})}function Q(H){e.forEach(H.edges(),function(K){if(K.v===K.w){var $=H.node(K.v);$.selfEdges||($.selfEdges=[]),$.selfEdges.push({e:K,label:H.edge(K)}),H.removeEdge(K)}})}function V(H){var K=p.buildLayerMatrix(H);e.forEach(K,function($){var k=0;e.forEach($,function(z,re){var ie=H.node(z);ie.order=re+k,e.forEach(ie.selfEdges,function(se){p.addDummyNode(H,"selfedge",{width:se.label.width,height:se.label.height,rank:ie.rank,order:re+ ++k,e:se.e,label:se.label},"_se")}),delete ie.selfEdges})})}function ee(H){e.forEach(H.nodes(),function(K){var $=H.node(K);if($.dummy==="selfedge"){var k=H.node($.e.v),z=k.x+k.width/2,re=k.y,ie=$.x-z,se=k.height/2;H.setEdge($.e,$.label),H.removeNode(K),$.label.points=[{x:z+2*ie/3,y:re-se},{x:z+5*ie/6,y:re-se},{x:z+ie,y:re},{x:z+5*ie/6,y:re+se},{x:z+2*ie/3,y:re+se}],$.label.x=$.x,$.label.y=$.y}})}function oe(H,K){return e.mapValues(e.pick(H,K),Number)}function ae(H){var K={};return e.forEach(H,function($,k){K[k.toLowerCase()]=$}),K}return cm}var lm,xI;function AV(){if(xI)return lm;xI=1;var e=ut(),t=Yt(),r=Fr().Graph;lm={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 lm}var fm,wI;function MV(){return wI||(wI=1,fm="0.8.5"),fm}var dm,_I;function DV(){return _I||(_I=1,dm={graphlib:Fr(),layout:TV(),debug:AV(),util:{time:Yt().time,notime:Yt().notime},version:MV()}),dm}var jV=DV();const EI=Un(jV);function qV(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 kV=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),SI=kV?T.useEffect:T.useLayoutEffect;function LV(e){const t=typeof e=="function"?qV(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=T.useReducer(x=>x+1,0),a=t.getState(),u=T.useRef(a),c=T.useRef(n),d=T.useRef(i),f=T.useRef(!1),h=T.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)),SI(()=>{v&&(h.current=p),u.current=a,c.current=n,d.current=i,f.current=!1});const m=T.useRef(a);SI(()=>{const x=()=>{try{const w=t.getState(),E=c.current(w);d.current(h.current,E)||(u.current=w,h.current=E,o())}catch{f.current=!0,o()}},b=t.subscribe(x);return t.getState()!==m.current&&x(),b},[]);const y=v?p:h.current;return T.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 BV(){const e=T.createContext(void 0);return{Provider:({initialStore:i,createStore:o,children:a})=>{const u=T.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()),T.createElement(e.Provider,{value:u.current},a)},useStore:(i,o=Object.is)=>{const a=T.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=T.useContext(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return T.useMemo(()=>({getState:i.getState,setState:i.setState,subscribe:i.subscribe,destroy:i.destroy}),[i])}}}var FV={value:()=>{}};function Mc(){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 Iu(r)}function Iu(e){this._=e}function $V(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}})}Iu.prototype=Mc.prototype={constructor:Iu,on:function(e,t){var r=this._,n=$V(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=zV(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]=OI(r[i],e.name,t);else if(t==null)for(i in r)r[i]=OI(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 Iu(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 zV(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function OI(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=FV,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Pb="http://www.w3.org/1999/xhtml";const CI={svg:"http://www.w3.org/2000/svg",xhtml:Pb,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Dc(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),CI.hasOwnProperty(t)?{space:CI[t],local:e}:e}function HV(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Pb&&t.documentElement.namespaceURI===Pb?t.createElement(e):t.createElementNS(r,e)}}function UV(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Nj(e){var t=Dc(e);return(t.local?UV:HV)(t)}function WV(){}function Rx(e){return e==null?WV:function(){return this.querySelector(e)}}function VV(e){typeof e!="function"&&(e=Rx(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 cr(n,this._parents)}function GV(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function KV(){return[]}function Tj(e){return e==null?KV:function(){return this.querySelectorAll(e)}}function YV(e){return function(){return GV(e.apply(this,arguments))}}function XV(e){typeof e=="function"?e=YV(e):e=Tj(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 cr(n,i)}function Aj(e){return function(){return this.matches(e)}}function Mj(e){return function(t){return t.matches(e)}}var ZV=Array.prototype.find;function JV(e){return function(){return ZV.call(this.children,e)}}function QV(){return this.firstElementChild}function e6(e){return this.select(e==null?QV:JV(typeof e=="function"?e:Mj(e)))}var t6=Array.prototype.filter;function r6(){return Array.from(this.children)}function n6(e){return function(){return t6.call(this.children,e)}}function i6(e){return this.selectAll(e==null?r6:n6(typeof e=="function"?e:Mj(e)))}function o6(e){typeof e!="function"&&(e=Aj(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 cr(n,this._parents)}function Dj(e){return new Array(e.length)}function a6(){return new cr(this._enter||this._groups.map(Dj),this._parents)}function Bu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Bu.prototype={constructor:Bu,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 s6(e){return function(){return e}}function u6(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 Bu(e,o[a]);for(;a<c;++a)(u=t[a])&&(i[a]=u)}function c6(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 Bu(e,o[u]);for(u=0;u<f;++u)(c=t[u])&&d.get(p[u])===c&&(i[u]=c)}function l6(e){return e.__data__}function f6(e,t){if(!arguments.length)return Array.from(this,l6);var r=t?c6:u6,n=this._parents,i=this._groups;typeof e!="function"&&(e=s6(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=d6(e.call(f,f&&f.__data__,d,n)),m=v.length,y=u[d]=new Array(m),x=a[d]=new Array(m),b=c[d]=new Array(p);r(f,h,y,x,b,v,t);for(var w=0,E=0,_,S;w<m;++w)if(_=y[w]){for(w>=E&&(E=w+1);!(S=x[E])&&++E<m;);_._next=S||null}}return a=new cr(a,n),a._enter=u,a._exit=c,a}function d6(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function h6(){return new cr(this._exit||this._groups.map(Dj),this._parents)}function p6(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 v6(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 cr(u,this._parents)}function g6(){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 m6(e){e||(e=y6);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 cr(i,this._parents).order()}function y6(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function b6(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function x6(){return Array.from(this)}function w6(){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 _6(){let e=0;for(const t of this)++e;return e}function E6(){return!this.node()}function S6(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 O6(e){return function(){this.removeAttribute(e)}}function C6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function R6(e,t){return function(){this.setAttribute(e,t)}}function I6(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function P6(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function N6(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 T6(e,t){var r=Dc(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?C6:O6:typeof t=="function"?r.local?N6:P6:r.local?I6:R6)(r,t))}function jj(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function A6(e){return function(){this.style.removeProperty(e)}}function M6(e,t,r){return function(){this.style.setProperty(e,t,r)}}function D6(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function j6(e,t,r){return arguments.length>1?this.each((t==null?A6:typeof t=="function"?D6:M6)(e,t,r??"")):bo(this.node(),e)}function bo(e,t){return e.style.getPropertyValue(t)||jj(e).getComputedStyle(e,null).getPropertyValue(t)}function q6(e){return function(){delete this[e]}}function k6(e,t){return function(){this[e]=t}}function L6(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function B6(e,t){return arguments.length>1?this.each((t==null?q6:typeof t=="function"?L6:k6)(e,t)):this.node()[e]}function qj(e){return e.trim().split(/^|\s+/)}function Ix(e){return e.classList||new kj(e)}function kj(e){this._node=e,this._names=qj(e.getAttribute("class")||"")}kj.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 Lj(e,t){for(var r=Ix(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Bj(e,t){for(var r=Ix(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function F6(e){return function(){Lj(this,e)}}function $6(e){return function(){Bj(this,e)}}function z6(e,t){return function(){(t.apply(this,arguments)?Lj:Bj)(this,e)}}function H6(e,t){var r=qj(e+"");if(arguments.length<2){for(var n=Ix(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?z6:t?F6:$6)(r,t))}function U6(){this.textContent=""}function W6(e){return function(){this.textContent=e}}function V6(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function G6(e){return arguments.length?this.each(e==null?U6:(typeof e=="function"?V6:W6)(e)):this.node().textContent}function K6(){this.innerHTML=""}function Y6(e){return function(){this.innerHTML=e}}function X6(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Z6(e){return arguments.length?this.each(e==null?K6:(typeof e=="function"?X6:Y6)(e)):this.node().innerHTML}function J6(){this.nextSibling&&this.parentNode.appendChild(this)}function Q6(){return this.each(J6)}function e8(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function t8(){return this.each(e8)}function r8(e){var t=typeof e=="function"?e:Nj(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function n8(){return null}function i8(e,t){var r=typeof e=="function"?e:Nj(e),n=t==null?n8:typeof t=="function"?t:Rx(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function o8(){var e=this.parentNode;e&&e.removeChild(this)}function a8(){return this.each(o8)}function s8(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function u8(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function c8(e){return this.select(e?u8:s8)}function l8(e){return arguments.length?this.property("__data__",e):this.node().__data__}function f8(e){return function(t){e.call(this,t,this.__data__)}}function d8(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 h8(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 p8(e,t,r){return function(){var n=this.__on,i,o=f8(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 v8(e,t,r){var n=d8(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?p8:h8,i=0;i<o;++i)this.each(u(n[i],t,r));return this}function Fj(e,t,r){var n=jj(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 g8(e,t){return function(){return Fj(this,e,t)}}function m8(e,t){return function(){return Fj(this,e,t.apply(this,arguments))}}function y8(e,t){return this.each((typeof t=="function"?m8:g8)(e,t))}function*b8(){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 $j=[null];function cr(e,t){this._groups=e,this._parents=t}function Za(){return new cr([[document.documentElement]],$j)}function x8(){return this}cr.prototype=Za.prototype={constructor:cr,select:VV,selectAll:XV,selectChild:e6,selectChildren:i6,filter:o6,data:f6,enter:a6,exit:h6,join:p6,merge:v6,selection:x8,order:g6,sort:m6,call:b6,nodes:x6,node:w6,size:_6,empty:E6,each:S6,attr:T6,style:j6,property:B6,classed:H6,text:G6,html:Z6,raise:Q6,lower:t8,append:r8,insert:i8,remove:a8,clone:c8,datum:l8,on:v8,dispatch:y8,[Symbol.iterator]:b8};function qr(e){return typeof e=="string"?new cr([[document.querySelector(e)]],[document.documentElement]):new cr([[e]],$j)}function w8(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Zr(e,t){if(e=w8(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 _8={passive:!1},ka={capture:!0,passive:!1};function hm(e){e.stopImmediatePropagation()}function ao(e){e.preventDefault(),e.stopImmediatePropagation()}function zj(e){var t=e.document.documentElement,r=qr(e).on("dragstart.drag",ao,ka);"onselectstart"in t?r.on("selectstart.drag",ao,ka):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Hj(e,t){var r=e.document.documentElement,n=qr(e).on("dragstart.drag",null);t&&(n.on("click.drag",ao,ka),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 nu=e=>()=>e;function Nb(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}})}Nb.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function E8(e){return!e.ctrlKey&&!e.button}function S8(){return this.parentNode}function O8(e,t){return t??{x:e.x,y:e.y}}function C8(){return navigator.maxTouchPoints||"ontouchstart"in this}function R8(){var e=E8,t=S8,r=O8,n=C8,i={},o=Mc("start","drag","end"),a=0,u,c,d,f,h=0;function p(_){_.on("mousedown.drag",v).filter(n).on("touchstart.drag",x).on("touchmove.drag",b,_8).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(_,S){if(!(f||!e.call(this,_,S))){var R=E(this,t.call(this,_,S),_,S,"mouse");R&&(qr(_.view).on("mousemove.drag",m,ka).on("mouseup.drag",y,ka),zj(_.view),hm(_),d=!1,u=_.clientX,c=_.clientY,R("start",_))}}function m(_){if(ao(_),!d){var S=_.clientX-u,R=_.clientY-c;d=S*S+R*R>h}i.mouse("drag",_)}function y(_){qr(_.view).on("mousemove.drag mouseup.drag",null),Hj(_.view,d),ao(_),i.mouse("end",_)}function x(_,S){if(e.call(this,_,S)){var R=_.changedTouches,I=t.call(this,_,S),N=R.length,A,L;for(A=0;A<N;++A)(L=E(this,I,_,S,R[A].identifier,R[A]))&&(hm(_),L("start",_,R[A]))}}function b(_){var S=_.changedTouches,R=S.length,I,N;for(I=0;I<R;++I)(N=i[S[I].identifier])&&(ao(_),N("drag",_,S[I]))}function w(_){var S=_.changedTouches,R=S.length,I,N;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),I=0;I<R;++I)(N=i[S[I].identifier])&&(hm(_),N("end",_,S[I]))}function E(_,S,R,I,N,A){var L=o.copy(),B=Zr(A||R,S),U,j,D;if((D=r.call(_,new Nb("beforestart",{sourceEvent:R,target:p,identifier:N,active:a,x:B[0],y:B[1],dx:0,dy:0,dispatch:L}),I))!=null)return U=D.x-B[0]||0,j=D.y-B[1]||0,function G(F,X,Z){var Q=B,V;switch(F){case"start":i[N]=G,V=a++;break;case"end":delete i[N],--a;case"drag":B=Zr(Z||X,S),V=a;break}L.call(F,_,new Nb(F,{sourceEvent:X,subject:D,target:p,identifier:N,active:V,x:B[0]+U,y:B[1]+j,dx:B[0]-Q[0],dy:B[1]-Q[1],dispatch:L}),I)}}return p.filter=function(_){return arguments.length?(e=typeof _=="function"?_:nu(!!_),p):e},p.container=function(_){return arguments.length?(t=typeof _=="function"?_:nu(_),p):t},p.subject=function(_){return arguments.length?(r=typeof _=="function"?_:nu(_),p):r},p.touchable=function(_){return arguments.length?(n=typeof _=="function"?_:nu(!!_),p):n},p.on=function(){var _=o.on.apply(o,arguments);return _===o?p:_},p.clickDistance=function(_){return arguments.length?(h=(_=+_)*_,p):Math.sqrt(h)},p}function Px(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Uj(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ja(){}var La=.7,Fu=1/La,so="\\s*([+-]?\\d+)\\s*",Ba="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",I8=/^#([0-9a-f]{3,8})$/,P8=new RegExp(`^rgb\\(${so},${so},${so}\\)$`),N8=new RegExp(`^rgb\\(${tn},${tn},${tn}\\)$`),T8=new RegExp(`^rgba\\(${so},${so},${so},${Ba}\\)$`),A8=new RegExp(`^rgba\\(${tn},${tn},${tn},${Ba}\\)$`),M8=new RegExp(`^hsl\\(${Ba},${tn},${tn}\\)$`),D8=new RegExp(`^hsla\\(${Ba},${tn},${tn},${Ba}\\)$`),RI={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};Px(Ja,Fa,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:II,formatHex:II,formatHex8:j8,formatHsl:q8,formatRgb:PI,toString:PI});function II(){return this.rgb().formatHex()}function j8(){return this.rgb().formatHex8()}function q8(){return Wj(this).formatHsl()}function PI(){return this.rgb().formatRgb()}function Fa(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=I8.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?NI(t):r===3?new Vt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?iu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?iu(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=P8.exec(e))?new Vt(t[1],t[2],t[3],1):(t=N8.exec(e))?new Vt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=T8.exec(e))?iu(t[1],t[2],t[3],t[4]):(t=A8.exec(e))?iu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=M8.exec(e))?MI(t[1],t[2]/100,t[3]/100,1):(t=D8.exec(e))?MI(t[1],t[2]/100,t[3]/100,t[4]):RI.hasOwnProperty(e)?NI(RI[e]):e==="transparent"?new Vt(NaN,NaN,NaN,0):null}function NI(e){return new Vt(e>>16&255,e>>8&255,e&255,1)}function iu(e,t,r,n){return n<=0&&(e=t=r=NaN),new Vt(e,t,r,n)}function k8(e){return e instanceof Ja||(e=Fa(e)),e?(e=e.rgb(),new Vt(e.r,e.g,e.b,e.opacity)):new Vt}function Tb(e,t,r,n){return arguments.length===1?k8(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}Px(Vt,Tb,Uj(Ja,{brighter(e){return e=e==null?Fu:Math.pow(Fu,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?La:Math.pow(La,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vt(di(this.r),di(this.g),di(this.b),$u(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:TI,formatHex:TI,formatHex8:L8,formatRgb:AI,toString:AI}));function TI(){return`#${li(this.r)}${li(this.g)}${li(this.b)}`}function L8(){return`#${li(this.r)}${li(this.g)}${li(this.b)}${li((isNaN(this.opacity)?1:this.opacity)*255)}`}function AI(){const e=$u(this.opacity);return`${e===1?"rgb(":"rgba("}${di(this.r)}, ${di(this.g)}, ${di(this.b)}${e===1?")":`, ${e})`}`}function $u(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function di(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function li(e){return e=di(e),(e<16?"0":"")+e.toString(16)}function MI(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new kr(e,t,r,n)}function Wj(e){if(e instanceof kr)return new kr(e.h,e.s,e.l,e.opacity);if(e instanceof Ja||(e=Fa(e)),!e)return new kr;if(e instanceof kr)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 kr(a,u,c,e.opacity)}function B8(e,t,r,n){return arguments.length===1?Wj(e):new kr(e,t,r,n??1)}function kr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Px(kr,B8,Uj(Ja,{brighter(e){return e=e==null?Fu:Math.pow(Fu,e),new kr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?La:Math.pow(La,e),new kr(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(pm(e>=240?e-240:e+120,i,n),pm(e,i,n),pm(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new kr(DI(this.h),ou(this.s),ou(this.l),$u(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=$u(this.opacity);return`${e===1?"hsl(":"hsla("}${DI(this.h)}, ${ou(this.s)*100}%, ${ou(this.l)*100}%${e===1?")":`, ${e})`}`}}));function DI(e){return e=(e||0)%360,e<0?e+360:e}function ou(e){return Math.max(0,Math.min(1,e||0))}function pm(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 Vj=e=>()=>e;function F8(e,t){return function(r){return e+r*t}}function $8(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 z8(e){return(e=+e)==1?Gj:function(t,r){return r-t?$8(t,r,e):Vj(isNaN(t)?r:t)}}function Gj(e,t){var r=t-e;return r?F8(e,r):Vj(isNaN(e)?t:e)}const jI=(function e(t){var r=z8(t);function n(i,o){var a=r((i=Tb(i)).r,(o=Tb(o)).r),u=r(i.g,o.g),c=r(i.b,o.b),d=Gj(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 Bn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Ab=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vm=new RegExp(Ab.source,"g");function H8(e){return function(){return e}}function U8(e){return function(t){return e(t)+""}}function W8(e,t){var r=Ab.lastIndex=vm.lastIndex=0,n,i,o,a=-1,u=[],c=[];for(e=e+"",t=t+"";(n=Ab.exec(e))&&(i=vm.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:Bn(n,i)})),r=vm.lastIndex;return r<t.length&&(o=t.slice(r),u[a]?u[a]+=o:u[++a]=o),u.length<2?c[0]?U8(c[0].x):H8(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 qI=180/Math.PI,Mb={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Kj(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)*qI,skewX:Math.atan(c)*qI,scaleX:a,scaleY:u}}var au;function V8(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Mb:Kj(t.a,t.b,t.c,t.d,t.e,t.f)}function G8(e){return e==null||(au||(au=document.createElementNS("http://www.w3.org/2000/svg","g")),au.setAttribute("transform",e),!(e=au.transform.baseVal.consolidate()))?Mb:(e=e.matrix,Kj(e.a,e.b,e.c,e.d,e.e,e.f))}function Yj(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:Bn(d,h)},{i:y-2,x:Bn(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:Bn(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:Bn(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:Bn(d,h)},{i:y-2,x:Bn(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,x;++m<y;)h[(x=p[m]).i]=x.x(v);return h.join("")}}}var K8=Yj(V8,"px, ","px)","deg)"),Y8=Yj(G8,", ",")",")"),X8=1e-12;function kI(e){return((e=Math.exp(e))+1/e)/2}function Z8(e){return((e=Math.exp(e))-1/e)/2}function J8(e){return((e=Math.exp(2*e))-1)/(e+1)}const Q8=(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,x,b;if(y<X8)b=Math.log(p/d)/t,x=function(I){return[u+I*v,c+I*m,d*Math.exp(t*I*b)]};else{var w=Math.sqrt(y),E=(p*p-d*d+n*y)/(2*d*r*w),_=(p*p-d*d-n*y)/(2*p*r*w),S=Math.log(Math.sqrt(E*E+1)-E),R=Math.log(Math.sqrt(_*_+1)-_);b=(R-S)/t,x=function(I){var N=I*b,A=kI(S),L=d/(r*w)*(A*J8(t*N+S)-Z8(S));return[u+L*v,c+L*m,d*A/kI(t*N+S)]}}return x.duration=b*1e3*t/Math.SQRT2,x}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 xo=0,Ca=0,na=0,Xj=1e3,zu,Ra,Hu=0,yi=0,jc=0,$a=typeof performance=="object"&&performance.now?performance:Date,Zj=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Nx(){return yi||(Zj(eG),yi=$a.now()+jc)}function eG(){yi=0}function Uu(){this._call=this._time=this._next=null}Uu.prototype=Jj.prototype={constructor:Uu,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Nx():+r)+(t==null?0:+t),!this._next&&Ra!==this&&(Ra?Ra._next=this:zu=this,Ra=this),this._call=e,this._time=r,Db()},stop:function(){this._call&&(this._call=null,this._time=1/0,Db())}};function Jj(e,t,r){var n=new Uu;return n.restart(e,t,r),n}function tG(){Nx(),++xo;for(var e=zu,t;e;)(t=yi-e._time)>=0&&e._call.call(void 0,t),e=e._next;--xo}function LI(){yi=(Hu=$a.now())+jc,xo=Ca=0;try{tG()}finally{xo=0,nG(),yi=0}}function rG(){var e=$a.now(),t=e-Hu;t>Xj&&(jc-=t,Hu=e)}function nG(){for(var e,t=zu,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:zu=r);Ra=e,Db(n)}function Db(e){if(!xo){Ca&&(Ca=clearTimeout(Ca));var t=e-yi;t>24?(e<1/0&&(Ca=setTimeout(LI,e-$a.now()-jc)),na&&(na=clearInterval(na))):(na||(Hu=$a.now(),na=setInterval(rG,Xj)),xo=1,Zj(LI))}}function BI(e,t,r){var n=new Uu;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var iG=Mc("start","end","cancel","interrupt"),oG=[],Qj=0,FI=1,jb=2,Pu=3,$I=4,qb=5,Nu=6;function qc(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;aG(e,r,{name:t,index:n,group:i,on:iG,tween:oG,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Qj})}function Tx(e,t){var r=Ur(e,t);if(r.state>Qj)throw new Error("too late; already scheduled");return r}function an(e,t){var r=Ur(e,t);if(r.state>Pu)throw new Error("too late; already running");return r}function Ur(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function aG(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=Jj(o,0,r.time);function o(d){r.state=FI,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!==FI)return c();for(f in n)if(v=n[f],v.name===r.name){if(v.state===Pu)return BI(a);v.state===$I?(v.state=Nu,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[f]):+f<t&&(v.state=Nu,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[f])}if(BI(function(){r.state===Pu&&(r.state=$I,r.timer.restart(u,r.delay,r.time),u(d))}),r.state=jb,r.on.call("start",e,e.__data__,r.index,r.group),r.state===jb){for(r.state=Pu,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=qb,1),h=-1,p=i.length;++h<p;)i[h].call(e,f);r.state===qb&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Nu,r.timer.stop(),delete n[t];for(var d in n)return;delete e.__transition}}function Tu(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>jb&&n.state<qb,n.state=Nu,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function sG(e){return this.each(function(){Tu(this,e)})}function uG(e,t){var r,n;return function(){var i=an(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 cG(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=an(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 lG(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Ur(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?uG:cG)(r,e,t))}function Ax(e,t,r){var n=e._id;return e.each(function(){var i=an(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Ur(i,n).value[t]}}function e2(e,t){var r;return(typeof t=="number"?Bn:t instanceof Fa?jI:(r=Fa(t))?(t=r,jI):W8)(e,t)}function fG(e){return function(){this.removeAttribute(e)}}function dG(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hG(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 pG(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 vG(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 gG(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 mG(e,t){var r=Dc(e),n=r==="transform"?Y8:e2;return this.attrTween(e,typeof t=="function"?(r.local?gG:vG)(r,n,Ax(this,"attr."+e,t)):t==null?(r.local?dG:fG)(r):(r.local?pG:hG)(r,n,t))}function yG(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function bG(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function xG(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&bG(e,o)),r}return i._value=t,i}function wG(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&yG(e,o)),r}return i._value=t,i}function _G(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=Dc(e);return this.tween(r,(n.local?xG:wG)(n,t))}function EG(e,t){return function(){Tx(this,e).delay=+t.apply(this,arguments)}}function SG(e,t){return t=+t,function(){Tx(this,e).delay=t}}function OG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?EG:SG)(t,e)):Ur(this.node(),t).delay}function CG(e,t){return function(){an(this,e).duration=+t.apply(this,arguments)}}function RG(e,t){return t=+t,function(){an(this,e).duration=t}}function IG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?CG:RG)(t,e)):Ur(this.node(),t).duration}function PG(e,t){if(typeof t!="function")throw new Error;return function(){an(this,e).ease=t}}function NG(e){var t=this._id;return arguments.length?this.each(PG(t,e)):Ur(this.node(),t).ease}function TG(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;an(this,e).ease=r}}function AG(e){if(typeof e!="function")throw new Error;return this.each(TG(this._id,e))}function MG(e){typeof e!="function"&&(e=Aj(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 xn(n,this._parents,this._name,this._id)}function DG(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 xn(a,this._parents,this._name,this._id)}function jG(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 qG(e,t,r){var n,i,o=jG(t)?Tx:an;return function(){var a=o(this,e),u=a.on;u!==n&&(i=(n=u).copy()).on(t,r),a.on=i}}function kG(e,t){var r=this._id;return arguments.length<2?Ur(this.node(),r).on.on(e):this.each(qG(r,e,t))}function LG(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function BG(){return this.on("end.remove",LG(this._id))}function FG(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Rx(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,qc(d[p],t,r,p,d,Ur(f,r)));return new xn(o,this._parents,t,r)}function $G(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Tj(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=Ur(f,r),y=0,x=p.length;y<x;++y)(v=p[y])&&qc(v,t,r,y,p,m);o.push(p),a.push(f)}return new xn(o,a,t,r)}var zG=Za.prototype.constructor;function HG(){return new zG(this._groups,this._parents)}function UG(e,t){var r,n,i;return function(){var o=bo(this,e),a=(this.style.removeProperty(e),bo(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function t2(e){return function(){this.style.removeProperty(e)}}function WG(e,t,r){var n,i=r+"",o;return function(){var a=bo(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function VG(e,t,r){var n,i,o;return function(){var a=bo(this,e),u=r(this),c=u+"";return u==null&&(c=u=(this.style.removeProperty(e),bo(this,e))),a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,u))}}function GG(e,t){var r,n,i,o="style."+t,a="end."+o,u;return function(){var c=an(this,e),d=c.on,f=c.value[o]==null?u||(u=t2(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:e2;return t==null?this.styleTween(e,UG(e,n)).on("end.style."+e,t2(e)):typeof t=="function"?this.styleTween(e,VG(e,n,Ax(this,"style."+e,t))).each(GG(this._id,e)):this.styleTween(e,WG(e,n,t),r).on("end.style."+e,null)}function YG(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function XG(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&YG(e,a,r)),n}return o._value=t,o}function ZG(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,XG(e,t,r??""))}function JG(e){return function(){this.textContent=e}}function QG(e){return function(){var t=e(this);this.textContent=t??""}}function eK(e){return this.tween("text",typeof e=="function"?QG(Ax(this,"text",e)):JG(e==null?"":e+""))}function tK(e){return function(t){this.textContent=e.call(this,t)}}function rK(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&tK(i)),t}return n._value=e,n}function nK(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,rK(e))}function iK(){for(var e=this._name,t=this._id,r=r2(),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=Ur(c,t);qc(c,e,r,d,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new xn(n,this._parents,e,r)}function oK(){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=an(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 aK=0;function xn(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function r2(){return++aK}var mn=Za.prototype;xn.prototype={constructor:xn,select:FG,selectAll:$G,selectChild:mn.selectChild,selectChildren:mn.selectChildren,filter:MG,merge:DG,selection:HG,transition:iK,call:mn.call,nodes:mn.nodes,node:mn.node,size:mn.size,empty:mn.empty,each:mn.each,on:kG,attr:mG,attrTween:_G,style:KG,styleTween:ZG,text:eK,textTween:nK,remove:BG,tween:lG,delay:OG,duration:IG,ease:NG,easeVarying:AG,end:oK,[Symbol.iterator]:mn[Symbol.iterator]};function sK(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var uK={time:null,delay:0,duration:250,ease:sK};function cK(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 lK(e){var t,r;e instanceof xn?(t=e._id,e=e._name):(t=r2(),(r=uK).time=Nx(),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])&&qc(c,e,t,d,a,r||cK(c,t));return new xn(n,this._parents,e,t)}Za.prototype.interrupt=sG;Za.prototype.transition=lK;const su=e=>()=>e;function fK(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 yn(e,t,r){this.k=e,this.x=t,this.y=r}yn.prototype={constructor:yn,scale:function(e){return e===1?this:new yn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new yn(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 hi=new yn(1,0,0);yn.prototype;function gm(e){e.stopImmediatePropagation()}function ia(e){e.preventDefault(),e.stopImmediatePropagation()}function dK(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function hK(){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 zI(){return this.__zoom||hi}function pK(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function vK(){return navigator.maxTouchPoints||"ontouchstart"in this}function gK(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 mK(){var e=dK,t=hK,r=gK,n=pK,i=vK,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],u=250,c=Q8,d=Mc("start","zoom","end"),f,h,p,v=500,m=150,y=0,x=10;function b(D){D.property("__zoom",zI).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",L).filter(i).on("touchstart.zoom",B).on("touchmove.zoom",U).on("touchend.zoom touchcancel.zoom",j).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(D,G,F,X){var Z=D.selection?D.selection():D;Z.property("__zoom",zI),D!==Z?S(D,G,F,X):Z.interrupt().each(function(){R(this,arguments).event(X).start().zoom(null,typeof G=="function"?G.apply(this,arguments):G).end()})},b.scaleBy=function(D,G,F,X){b.scaleTo(D,function(){var Z=this.__zoom.k,Q=typeof G=="function"?G.apply(this,arguments):G;return Z*Q},F,X)},b.scaleTo=function(D,G,F,X){b.transform(D,function(){var Z=t.apply(this,arguments),Q=this.__zoom,V=F==null?_(Z):typeof F=="function"?F.apply(this,arguments):F,ee=Q.invert(V),oe=typeof G=="function"?G.apply(this,arguments):G;return r(E(w(Q,oe),V,ee),Z,a)},F,X)},b.translateBy=function(D,G,F,X){b.transform(D,function(){return r(this.__zoom.translate(typeof G=="function"?G.apply(this,arguments):G,typeof F=="function"?F.apply(this,arguments):F),t.apply(this,arguments),a)},null,X)},b.translateTo=function(D,G,F,X,Z){b.transform(D,function(){var Q=t.apply(this,arguments),V=this.__zoom,ee=X==null?_(Q):typeof X=="function"?X.apply(this,arguments):X;return r(hi.translate(ee[0],ee[1]).scale(V.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof F=="function"?-F.apply(this,arguments):-F),Q,a)},X,Z)};function w(D,G){return G=Math.max(o[0],Math.min(o[1],G)),G===D.k?D:new yn(G,D.x,D.y)}function E(D,G,F){var X=G[0]-F[0]*D.k,Z=G[1]-F[1]*D.k;return X===D.x&&Z===D.y?D:new yn(D.k,X,Z)}function _(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function S(D,G,F,X){D.on("start.zoom",function(){R(this,arguments).event(X).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(X).end()}).tween("zoom",function(){var Z=this,Q=arguments,V=R(Z,Q).event(X),ee=t.apply(Z,Q),oe=F==null?_(ee):typeof F=="function"?F.apply(Z,Q):F,ae=Math.max(ee[1][0]-ee[0][0],ee[1][1]-ee[0][1]),H=Z.__zoom,K=typeof G=="function"?G.apply(Z,Q):G,$=c(H.invert(oe).concat(ae/H.k),K.invert(oe).concat(ae/K.k));return function(k){if(k===1)k=K;else{var z=$(k),re=ae/z[2];k=new yn(re,oe[0]-z[0]*re,oe[1]-z[1]*re)}V.zoom(null,k)}})}function R(D,G,F){return!F&&D.__zooming||new I(D,G)}function I(D,G){this.that=D,this.args=G,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,G),this.taps=0}I.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,G){return this.mouse&&D!=="mouse"&&(this.mouse[1]=G.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=G.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=G.invert(this.touch1[0])),this.that.__zoom=G,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var G=qr(this.that).datum();d.call(D,this.that,new fK(D,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:d}),G)}};function N(D,...G){if(!e.apply(this,arguments))return;var F=R(this,G).event(D),X=this.__zoom,Z=Math.max(o[0],Math.min(o[1],X.k*Math.pow(2,n.apply(this,arguments)))),Q=Zr(D);if(F.wheel)(F.mouse[0][0]!==Q[0]||F.mouse[0][1]!==Q[1])&&(F.mouse[1]=X.invert(F.mouse[0]=Q)),clearTimeout(F.wheel);else{if(X.k===Z)return;F.mouse=[Q,X.invert(Q)],Tu(this),F.start()}ia(D),F.wheel=setTimeout(V,m),F.zoom("mouse",r(E(w(X,Z),F.mouse[0],F.mouse[1]),F.extent,a));function V(){F.wheel=null,F.end()}}function A(D,...G){if(p||!e.apply(this,arguments))return;var F=D.currentTarget,X=R(this,G,!0).event(D),Z=qr(D.view).on("mousemove.zoom",oe,!0).on("mouseup.zoom",ae,!0),Q=Zr(D,F),V=D.clientX,ee=D.clientY;zj(D.view),gm(D),X.mouse=[Q,this.__zoom.invert(Q)],Tu(this),X.start();function oe(H){if(ia(H),!X.moved){var K=H.clientX-V,$=H.clientY-ee;X.moved=K*K+$*$>y}X.event(H).zoom("mouse",r(E(X.that.__zoom,X.mouse[0]=Zr(H,F),X.mouse[1]),X.extent,a))}function ae(H){Z.on("mousemove.zoom mouseup.zoom",null),Hj(H.view,X.moved),ia(H),X.event(H).end()}}function L(D,...G){if(e.apply(this,arguments)){var F=this.__zoom,X=Zr(D.changedTouches?D.changedTouches[0]:D,this),Z=F.invert(X),Q=F.k*(D.shiftKey?.5:2),V=r(E(w(F,Q),X,Z),t.apply(this,G),a);ia(D),u>0?qr(this).transition().duration(u).call(S,V,X,D):qr(this).call(b.transform,V,X,D)}}function B(D,...G){if(e.apply(this,arguments)){var F=D.touches,X=F.length,Z=R(this,G,D.changedTouches.length===X).event(D),Q,V,ee,oe;for(gm(D),V=0;V<X;++V)ee=F[V],oe=Zr(ee,this),oe=[oe,this.__zoom.invert(oe),ee.identifier],Z.touch0?!Z.touch1&&Z.touch0[2]!==oe[2]&&(Z.touch1=oe,Z.taps=0):(Z.touch0=oe,Q=!0,Z.taps=1+!!f);f&&(f=clearTimeout(f)),Q&&(Z.taps<2&&(h=oe[0],f=setTimeout(function(){f=null},v)),Tu(this),Z.start())}}function U(D,...G){if(this.__zooming){var F=R(this,G).event(D),X=D.changedTouches,Z=X.length,Q,V,ee,oe;for(ia(D),Q=0;Q<Z;++Q)V=X[Q],ee=Zr(V,this),F.touch0&&F.touch0[2]===V.identifier?F.touch0[0]=ee:F.touch1&&F.touch1[2]===V.identifier&&(F.touch1[0]=ee);if(V=F.that.__zoom,F.touch1){var ae=F.touch0[0],H=F.touch0[1],K=F.touch1[0],$=F.touch1[1],k=(k=K[0]-ae[0])*k+(k=K[1]-ae[1])*k,z=(z=$[0]-H[0])*z+(z=$[1]-H[1])*z;V=w(V,Math.sqrt(k/z)),ee=[(ae[0]+K[0])/2,(ae[1]+K[1])/2],oe=[(H[0]+$[0])/2,(H[1]+$[1])/2]}else if(F.touch0)ee=F.touch0[0],oe=F.touch0[1];else return;F.zoom("touch",r(E(V,ee,oe),F.extent,a))}}function j(D,...G){if(this.__zooming){var F=R(this,G).event(D),X=D.changedTouches,Z=X.length,Q,V;for(gm(D),p&&clearTimeout(p),p=setTimeout(function(){p=null},v),Q=0;Q<Z;++Q)V=X[Q],F.touch0&&F.touch0[2]===V.identifier?delete F.touch0:F.touch1&&F.touch1[2]===V.identifier&&delete F.touch1;if(F.touch1&&!F.touch0&&(F.touch0=F.touch1,delete F.touch1),F.touch0)F.touch0[1]=this.__zoom.invert(F.touch0[0]);else if(F.end(),F.taps===2&&(V=Zr(V,this),Math.hypot(h[0]-V[0],h[1]-V[1])<x)){var ee=qr(this).on("dblclick.zoom");ee&&ee.apply(this,arguments)}}}return b.wheelDelta=function(D){return arguments.length?(n=typeof D=="function"?D:su(+D),b):n},b.filter=function(D){return arguments.length?(e=typeof D=="function"?D:su(!!D),b):e},b.touchable=function(D){return arguments.length?(i=typeof D=="function"?D:su(!!D),b):i},b.extent=function(D){return arguments.length?(t=typeof D=="function"?D:su([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),b):t},b.scaleExtent=function(D){return arguments.length?(o[0]=+D[0],o[1]=+D[1],b):[o[0],o[1]]},b.translateExtent=function(D){return arguments.length?(a[0][0]=+D[0][0],a[1][0]=+D[1][0],a[0][1]=+D[0][1],a[1][1]=+D[1][1],b):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},b.constrain=function(D){return arguments.length?(r=D,b):r},b.duration=function(D){return arguments.length?(u=+D,b):u},b.interpolate=function(D){return arguments.length?(c=D,b):c},b.on=function(){var D=d.on.apply(d,arguments);return D===d?b:D},b.clickDistance=function(D){return arguments.length?(y=(D=+D)*D,b):Math.sqrt(y)},b.tapDistance=function(D){return arguments.length?(x=+D,b):x},b}function He(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kb(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 n2(e,t){if(e){if(typeof e=="string")return kb(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 kb(e,t)}}function yK(e){if(Array.isArray(e))return e}function bK(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 xK(){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 Le(e,t){return yK(e)||bK(e,t)||n2(e,t)||xK()}var wo;(function(e){e.Strict="strict",e.Loose="loose"})(wo||(wo={}));var bi;(function(e){e.Lines="lines",e.Dots="dots"})(bi||(bi={}));var uo;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(uo||(uo={}));var $n;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})($n||($n={}));var Wu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Wu||(Wu={}));var we;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(we||(we={}));var Mx=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},co=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)},i2=function(t,r){return{x:co(t.x,r[0][0],r[1][0]),y:co(t.y,r[0][1],r[1][1])}},o2=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)},wK=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)}},Vu=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}},_K=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}},a2=function(t){return!isNaN(t)&&isFinite(t)},Nt=Symbol("internals");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 Ia(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){He(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 UI(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=Ia({},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 s2(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(Ia(Ia({},i),{},{selected:o.selected})),n;case"position":{var a=Ia({},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&&UI(n,a),n.push(a),n}case"dimensions":{var u=Ia({},i);return typeof o.dimensions<"u"&&(u.width=o.dimensions.width,u.height=o.dimensions.height),u.expandParent&&UI(n,u),n.push(u),n}case"remove":return n}return n.push(i),n},r)}function u2(e,t){return s2(e,t)}function EK(e,t){return s2(e,t)}var Fn=function(t,r){return{id:t,type:"select",selected:r}};function no(e,t){return e.reduce(function(r,n){var i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(Fn(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Fn(n.id,!1))),r},[])}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 c2(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){He(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 VI=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 c2({id:u.getAttribute("data-handleid"),position:u.getAttribute("data-handlepos"),x:(c.left-a.left)/n,y:(c.top-a.top)/n},Mx(u))})};function oa(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,c2({},i))}}function l2(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 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 Aa(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){He(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 SK=function(t){return"id"in t&&"source"in t&&"target"in t},OK=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||"")},Lb=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("&"))},CK=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)})},RK=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 SK(t)?n=Aa({},t):n=Aa(Aa({},t),{},{id:OK(t)}),CK(n,r)?r:r.concat(n)},f2=function(t,r,n,i){var o=t.x,a=t.y,u=Le(r,3),c=u[0],d=u[1],f=u[2],h=Le(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},Dx=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 wK(n,Vu({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 _K(r)},d2=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],i=Le(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=Vu({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,x=p.selectable,b=x===void 0?!0:x;if(d&&!b)return!1;var w=Vu(Aa(Aa({},v),{},{width:m||0,height:y||0})),E=Math.max(0,Math.min(f.x2,w.x2)-Math.max(f.x,w.x)),_=Math.max(0,Math.min(f.y2,w.y2)-Math.max(f.y,w.y)),S=Math.ceil(E*_),R=typeof m>"u"||typeof y>"u"||m===null||y===null,I=c&&S>0,N=(m||0)*(y||0),A=R||I||S>=N;A&&h.push(p)}),h},h2=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)})},p2=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=co(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]},ui=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};function KI(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 io(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v2(e,t,r,n){var i,o,a,u,c,d,f,h,p,v,m,y;if(!e.parentNode)return n;var x=t.get(e.parentNode);return v2(x,t,r,{x:((i=n.x)!==null&&i!==void 0?i:0)+((o=(a=x.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=x.position)===null||d===void 0?void 0:d.y)!==null&&c!==void 0?c:0),z:((f=(h=x[Nt])===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=x[Nt])===null||m===void 0?void 0:m.z)!==null&&v!==void 0?v:0:(y=n.z)!==null&&y!==void 0?y:0})}function mm(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=a2(i.zIndex)?i.zIndex:i.selected?1e3:0,u=t.get(i.id),c=io(io({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,Nt,{enumerable:!1,value:{handleBounds:u==null||(o=u[Nt])===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=v2(i,r,n,io(io({},i.position),{},{z:(o=(a=i[Nt])===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[Nt].z=f,n[i.id]&&(i[Nt].isParent=!0)}}),r}function g2(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,x,b=Dx(p),w=p2(b,i,o,(m=t.minZoom)!==null&&m!==void 0?m:a,(y=t.maxZoom)!==null&&y!==void 0?y:u,(x=t.padding)!==null&&x!==void 0?x:.1),E=Le(w,3),_=E[0],S=E[1],R=E[2],I=hi.translate(_,S).scale(R);return typeof t.duration=="number"&&t.duration>0?c.transform(ui(d,t.duration),I):c.transform(d,I),!0}}return!1}function IK(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,io(io({},n),{},(i={},He(i,Nt,n[Nt]),He(i,"selected",r.selected),i)))}}),new Map(t)}function PK(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 uu(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:IK(t,a)}),c==null||c(t)),r!=null&&r.length&&(h&&i({edges:PK(r,u)}),d==null||d(r))}var Bb=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],YI={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:Bb,nodeExtent:Bb,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:wo.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 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 Yr(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){He(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 jx=BV(),NK=jx.Provider,gt=jx.useStore,Ft=jx.useStoreApi,TK=function(){return LV(function(t,r){return Yr(Yr({},YI),{},{setNodes:function(i){t({nodeInternals:mm(i,r().nodeInternals)})},setEdges:function(i){var o=r(),a=o.defaultEdgeOptions,u=a===void 0?{}:a;t({edges:i.map(function(c){return Yr(Yr({},u),c)})})},setDefaultNodesAndEdges:function(i,o){var a=typeof i<"u",u=typeof o<"u",c=a?mm(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,x=i.reduce(function(w,E){var _=u.get(E.id);if(_){var S=Mx(E.nodeElement),R=!!(S.width&&S.height&&(_.width!==S.width||_.height!==S.height||E.forceUpdate));R&&(u.set(_.id,Yr(Yr({},_),{},He({},Nt,Yr(Yr({},_[Nt]),{},{handleBounds:{source:VI(".source",E.nodeElement,y),target:VI(".target",E.nodeElement,y)}})),S)),w.push({id:_.id,type:"dimensions",dimensions:S}))}return w},[]),b=d||c&&!d&&g2(r,Yr({initial:!0},f));t({nodeInternals:new Map(u),fitViewOnInitDone:b}),(x==null?void 0:x.length)>0&&(a==null||a(x))}},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=u2(h,Array.from(d.values())),v=mm(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 Fn(h,!0)}):(d=no(Array.from(u.values()),i),f=no(c,[])),uu({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 Fn(h,!0)}):(d=no(u,i),f=no(Array.from(c.values()),[])),uu({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,Fn(m.id,!1)}),v=h.map(function(m){return Fn(m.id,!1)});uu({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 Fn(f.id,!1)}),d=a.filter(function(f){return f.selected}).map(function(f){return Fn(f.id,!1)});uu({changedNodes:c,changedEdges:d,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(u){u.positionAbsolute=i2(u.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(Yr({},YI))}})})};function lr(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=lr(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function Xt(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 AK(e){if(Array.isArray(e))return kb(e)}function MK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function DK(){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 pi(e){return AK(e)||MK(e)||n2(e)||DK()}var jK={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},qK=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},kK=function(){var t=Ft(),r=gt(qK,Xt),n=r.d3Zoom,i=r.d3Selection,o=T.useMemo(function(){return i&&n?{zoomIn:function(u){return n.scaleBy(ui(i,u==null?void 0:u.duration),1.2)},zoomOut:function(u){return n.scaleBy(ui(i,u==null?void 0:u.duration),1/1.2)},zoomTo:function(u,c){return n.scaleTo(ui(i,c==null?void 0:c.duration),u)},getZoom:function(){return t.getState().transform[2]},setViewport:function(u,c){var d,f,h,p=Le(t.getState().transform,3),v=p[0],m=p[1],y=p[2],x=hi.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(ui(i,c==null?void 0:c.duration),x)},getViewport:function(){var u=Le(t.getState().transform,3),c=u[0],d=u[1],f=u[2];return{x:c,y:d,zoom:f}},fitView:function(u){return g2(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,x=p/2-c*m,b=hi.translate(y,x).scale(m);n.transform(ui(i,d==null?void 0:d.duration),b)},fitBounds:function(u,c){var d,f=t.getState(),h=f.width,p=f.height,v=f.minZoom,m=f.maxZoom,y=p2(u,h,p,v,m,(d=c==null?void 0:c.padding)!==null&&d!==void 0?d:.1),x=Le(y,3),b=x[0],w=x[1],E=x[2],_=hi.translate(b,w).scale(E);n.transform(ui(i,c==null?void 0:c.duration),_)},project:function(u){var c=t.getState(),d=c.transform,f=c.snapToGrid,h=c.snapGrid;return f2(u,d,f,h)},viewportInitialized:!0}:jK},[n,i]);return o};function ZI(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 Xi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function m2(){var e=kK(),t=Ft(),r=T.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=Array.from(p.values());return v.map(function(m){return Xi({},m)})},[]),n=T.useCallback(function(h){var p=t.getState(),v=p.nodeInternals;return v.get(h)},[]),i=T.useCallback(function(){var h=t.getState(),p=h.edges,v=p===void 0?[]:p;return v.map(function(m){return Xi({},m)})},[]),o=T.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=T.useCallback(function(h){var p=t.getState(),v=p.nodeInternals,m=p.setNodes,y=p.hasDefaultNodes,x=p.onNodesChange,b=Array.from(v.values()),w=typeof h=="function"?h(b):h;if(y)m(w);else if(x){var E=w.length===0?b.map(function(_){return{type:"remove",id:_.id}}):w.map(function(_){return{item:_,type:"reset"}});x(E)}},[]),u=T.useCallback(function(h){var p=t.getState(),v=p.edges,m=v===void 0?[]:v,y=p.setEdges,x=p.hasDefaultEdges,b=p.onEdgesChange,w=typeof h=="function"?h(m):h;if(x)y(w);else if(b){var E=w.length===0?m.map(function(_){return{type:"remove",id:_.id}}):w.map(function(_){return{item:_,type:"reset"}});b(E)}},[]),c=T.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),m=v.nodeInternals,y=v.setNodes,x=v.hasDefaultNodes,b=v.onNodesChange;if(x){var w=Array.from(m.values()),E=[].concat(w,pi(p));y(E)}else if(b){var _=p.map(function(S){return{item:S,type:"add"}});b(_)}},[]),d=T.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),m=v.edges,y=m===void 0?[]:m,x=v.setEdges,b=v.hasDefaultEdges,w=v.onEdgesChange;if(b)x([].concat(pi(y),pi(p)));else if(w){var E=p.map(function(_){return{item:_,type:"add"}});w(E)}},[]),f=T.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=h.edges,m=v===void 0?[]:v,y=h.transform,x=Array.from(p.values()),b=Le(y,3),w=b[0],E=b[1],_=b[2];return{nodes:x.map(function(S){return Xi({},S)}),edges:m.map(function(S){return Xi({},S)}),viewport:{x:w,y:E,zoom:_}}},[]);return T.useMemo(function(){return Xi(Xi({},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 LK(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 kc(e,t){if(e==null)return{};var r=LK(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 BK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},T.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function FK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},T.createElement("path",{d:"M0 0h32v4.2H0z"}))}function $K(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},T.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 zK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},T.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 HK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},T.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 UK=["children","className"];function JI(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 WK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var cu=function(t){var r=t.children,n=t.className,i=kc(t,UK);return T.createElement("button",WK({type:"button",className:lr(["react-flow__controls-button",n])},i),r)},VK=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},GK=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,x=Ft(),b=T.useState(!1),w=Le(b,2),E=w[0],_=w[1],S=gt(VK),R=m2(),I=R.zoomIn,N=R.zoomOut,A=R.fitView;if(T.useEffect(function(){_(!0)},[]),!E)return null;var L=function(){I==null||I(),f==null||f()},B=function(){N==null||N(),h==null||h()},U=function(){A==null||A(d),p==null||p()},j=function(){x.setState({nodesDraggable:!S,nodesConnectable:!S,elementsSelectable:!S}),v==null||v(!S)};return T.createElement("div",{className:lr(["react-flow__controls",m]),style:r},i&&T.createElement(T.Fragment,null,T.createElement(cu,{onClick:L,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},T.createElement(BK,null)),T.createElement(cu,{onClick:B,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},T.createElement(FK,null))),a&&T.createElement(cu,{className:"react-flow__controls-fitview",onClick:U,title:"fit view","aria-label":"fit view"},T.createElement($K,null)),c&&T.createElement(cu,{className:"react-flow__controls-interactive",onClick:j,title:"toggle interactivity","aria-label":"toggle interactivity"},S?T.createElement(HK,null):T.createElement(zK,null)),y)};GK.displayName="Controls";var KK=function(t,r,n){return T.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},YK=function(t,r){return T.createElement("circle",{cx:t,cy:t,r:t,fill:r})},lu;function QI(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 eP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var XK=(lu={},He(lu,bi.Dots,"#81818a"),He(lu,bi.Lines,"#eee"),lu),ZK=function(t){return t.transform},y2=function(t){var r=t.variant,n=r===void 0?bi.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=T.useRef(null),p=T.useState(null),v=Le(p,2),m=v[0],y=v[1],x=gt(ZK),b=Le(x,3),w=b[0],E=b[1],_=b[2];T.useEffect(function(){var B=document.querySelectorAll(".react-flow__background"),U=Array.from(B).findIndex(function(j){return j===h.current});y("pattern-".concat(U))},[]);var S=o*_||1,R=w%S,I=E%S,N=n===bi.Lines,A=c||XK[n],L=N?KK(S,u,A):YK(u*_,A);return T.createElement("svg",{className:lr(["react-flow__background","react-flow__container",f]),style:eP(eP({},d),{},{width:"100%",height:"100%"}),ref:h},m&&T.createElement(T.Fragment,null,T.createElement("pattern",{id:m,x:R,y:I,width:S,height:S,patternUnits:"userSpaceOnUse"},L),T.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(m,")")})))};y2.displayName="Background";var JK=T.memo(y2),QK=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function eY(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&QK.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var i="".concat(n).split("-");return T.createElement("div",{className:lr(["react-flow__attribution"].concat(pi(i))),"data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev/pricing"},T.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var tY=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function tP(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?tP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var nY=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,x=t.className,b=kc(t,tY),w=T.useRef(null),E=T.useState({x:0,y:0,width:0,height:0}),_=Le(E,2),S=_[0],R=_[1],I=lr(["react-flow__edge-textwrapper",x]);return T.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:T.createElement("g",rY({transform:"translate(".concat(r-S.width/2," ").concat(n-S.height/2,")"),className:I},b),c&&T.createElement("rect",{width:S.width+2*p[0],x:-p[0],y:-p[1],height:S.height+2*p[1],className:"react-flow__edge-textbg",style:f,rx:m,ry:m}),T.createElement("text",{className:"react-flow__edge-text",y:S.height/2,dy:"0.3em",ref:w,style:a},i),y)},iY=T.memo(nY),Lc=(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?T.createElement(iY,{x:r,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d}):null;return T.createElement(T.Fragment,null,T.createElement("path",{style:f,d:t,className:"react-flow__edge-path",markerEnd:h,markerStart:p}),v)});function Gu(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a,u;switch(t){case we.Left:case we.Right:a=.5*(r+i),u=n;break;case we.Top:case we.Bottom:a=r,u=.5*(n+o);break}return[a,u]}function b2(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?we.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?we.Top:u,d=Gu({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Le(d,2),h=f[0],p=f[1],v=Gu({pos:c,x1:o,y1:a,x2:t,y2:r}),m=Le(v,2),y=m[0],x=m[1];return"M".concat(t,",").concat(r," C").concat(h,",").concat(p," ").concat(y,",").concat(x," ").concat(o,",").concat(a)}function oY(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?we.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?we.Top:u,d=Gu({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Le(d,2),h=f[0],p=f[1],v=Gu({pos:c,x1:o,y1:a,x2:t,y2:r}),m=Le(v,2),y=m[0],x=m[1],b=t*.125+h*.375+y*.375+o*.125,w=r*.125+p*.375+x*.375+a*.125,E=Math.abs(b-t),_=Math.abs(w-r);return[b,w,E,_]}var x2=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?we.Bottom:o,u=e.targetPosition,c=u===void 0?we.Top:u,d=e.label,f=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,m=e.labelBgBorderRadius,y=e.style,x=e.markerEnd,b=e.markerStart,w={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c},E=b2(w),_=oY(w),S=Le(_,2),R=S[0],I=S[1];return T.createElement(Lc,{path:E,centerX:R,centerY:I,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:x,markerStart:b})});function rP(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 aY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var nP=[we.Left,we.Right],w2=function(t){var r=t.sourceX,n=t.sourceY,i=t.targetX,o=t.targetY,a=t.sourcePosition,u=a===void 0?we.Bottom:a,c=t.targetPosition,d=c===void 0?we.Top:c,f=nP.includes(u),h=nP.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),x=n<o?n+y:n-y;return[m,x,v,y]}var b=Math.abs(i-r)/2,w=i<r?i+b:i-b,E=Math.abs(o-n)/2,_=o<n?o+E:o-E;return[w,_,b,E]};function aa(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,aY({},i))}}var ym=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},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-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},_m=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},Em=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},Sm=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},Om=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function Fb(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?we.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?we.Top:u,d=e.borderRadius,f=d===void 0?5:d,h=e.centerX,p=e.centerY,v=w2({sourceX:t,sourceY:r,targetX:o,targetY:a}),m=Le(v,4),y=m[0],x=m[1],b=m[2],w=m[3],E=Math.min(f,Math.abs(o-t)),_=Math.min(f,Math.abs(a-r)),S=Math.min(E,_,b,w),R=[we.Left,we.Right],I=typeof h<"u"?h:y,N=typeof p<"u"?p:x,A=null,L=null;return t<=o?(A=r<=a?ym(t,N,S):Em(t,N,S),L=r<=a?Om(o,N,S):wm(o,N,S)):(A=r<a?xm(t,N,S):Sm(t,N,S),L=r<a?_m(o,N,S):bm(o,N,S)),R.includes(i)&&R.includes(c)?t<=o?(A=r<=a?Om(I,r,S):wm(I,r,S),L=r<=a?ym(I,a,S):Em(I,a,S)):(i===we.Right&&c===we.Left||i===we.Left&&c===we.Right||i===we.Left&&c===we.Left)&&(A=r<=a?_m(I,r,S):bm(I,r,S),L=r<=a?xm(I,a,S):Sm(I,a,S)):R.includes(i)&&!R.includes(c)?(t<=o?A=r<=a?Om(o,r,S):wm(o,r,S):A=r<=a?_m(o,r,S):bm(o,r,S),L=""):!R.includes(i)&&R.includes(c)&&(t<=o?A=r<=a?ym(t,a,S):Em(t,a,S):A=r<=a?xm(t,a,S):Sm(t,a,S),L=""),"M ".concat(t,",").concat(r).concat(A).concat(L,"L ").concat(o,",").concat(a)}var qx=T.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?we.Bottom:p,m=e.targetPosition,y=m===void 0?we.Top:m,x=e.markerEnd,b=e.markerStart,w=e.borderRadius,E=w===void 0?5:w,_=w2({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:v,targetPosition:y}),S=Le(_,2),R=S[0],I=S[1],N=Fb({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:i,targetPosition:y,borderRadius:E});return T.createElement(Lc,{path:N,centerX:R,centerY:I,label:o,labelStyle:a,labelShowBg:u,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:x,markerStart:b})});function iP(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 oP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var _2=T.memo(function(e){return T.createElement(qx,oP(oP({},e),{},{borderRadius:0}))}),E2=T.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,x=Math.abs(n-t)/2,b=n<t?n+x:n-x,w="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(i);return T.createElement(Lc,{path:w,centerX:b,centerY:y,label:o,labelStyle:a,labelShowBg:u,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:v})});function fu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ku(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 we.Left:u=r-fu(r-i,a),c=n;break;case we.Right:u=r+fu(i-r,a),c=n;break;case we.Top:u=r,c=n-fu(n-o,a);break;case we.Bottom:u=r,c=n+fu(o-n,a);break}return[u,c]}function Bc(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?we.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?we.Top:u,d=e.curvature,f=d===void 0?.25:d,h=Ku({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Le(h,2),v=p[0],m=p[1],y=Ku({pos:c,x1:o,y1:a,x2:t,y2:r,c:f}),x=Le(y,2),b=x[0],w=x[1];return"M".concat(t,",").concat(r," C").concat(v,",").concat(m," ").concat(b,",").concat(w," ").concat(o,",").concat(a)}function sY(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?we.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?we.Top:u,d=e.curvature,f=d===void 0?.25:d,h=Ku({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Le(h,2),v=p[0],m=p[1],y=Ku({pos:c,x1:o,y1:a,x2:t,y2:r,c:f}),x=Le(y,2),b=x[0],w=x[1],E=t*.125+v*.375+b*.375+o*.125,_=r*.125+m*.375+w*.375+a*.125,S=Math.abs(E-t),R=Math.abs(_-r);return[E,_,S,R]}var $b=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?we.Bottom:o,u=e.targetPosition,c=u===void 0?we.Top:u,d=e.label,f=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,m=e.labelBgBorderRadius,y=e.style,x=e.markerEnd,b=e.markerStart,w=e.curvature,E={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c,curvature:w},_=Bc(E),S=sY(E),R=Le(S,2),I=R[0],N=R[1];return T.createElement(Lc,{path:_,centerX:I,centerY:N,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:x,markerStart:b})}),kx=T.createContext(null),uY=kx.Provider;kx.Consumer;function zb(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===wo.Strict?r&&d||!r&&c:!0;m&&(f.isValid=o(v))}return f}function Cm(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function S2(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=o2(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 x=a(),b=x.onConnectStart,w=x.connectionMode,E=d||(m?"target":"source"),_=h.getBoundingClientRect(),S;u({connectionPosition:{x:t.clientX-_.left,y:t.clientY-_.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:E}),b==null||b(t,{nodeId:n,handleId:r,handleType:E});function R(N){u({connectionPosition:{x:N.clientX-_.left,y:N.clientY-_.top}});var A=zb(N,w,o,n,r,c,p),L=A.connection,B=A.elementBelow,U=A.isValid,j=A.isHoveringHandle;if(!j)return Cm(S);L.source!==L.target&&B&&(Cm(S),S=B,B.classList.add("react-flow__handle-connecting"),B.classList.toggle("react-flow__handle-valid",U))}function I(N){var A=a(),L=A.onConnectStop,B=A.onConnectEnd,U=zb(N,w,o,n,r,c,p),j=U.connection,D=U.isValid;L==null||L(N),D&&(i==null||i(j)),B==null||B(N),d&&f&&f(N),Cm(S),u({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),p.removeEventListener("mousemove",R),p.removeEventListener("mouseup",I)}p.addEventListener("mousemove",R),p.addEventListener("mouseup",I)}var cY=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];function aP(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 Rm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var lY=function(){return!0},fY=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},O2=T.forwardRef(function(e,t){var r=e.type,n=r===void 0?"source":r,i=e.position,o=i===void 0?we.Top:i,a=e.isValidConnection,u=a===void 0?lY: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=kc(e,cY),x=Ft(),b=T.useContext(kx),w=gt(fY,Xt),E=w.connectionStartHandle,_=w.connectOnClick,S=f||null,R=n==="target",I=function(B){var U=x.getState(),j=U.defaultEdgeOptions,D=U.onConnect,G=U.hasDefaultEdges,F=Rm(Rm({},j),B);if(G){var X=x.getState(),Z=X.edges;x.setState({edges:RK(F,Z)})}D==null||D(F),h==null||h(F)},N=function(B){B.button===0&&S2({event:B,handleId:S,nodeId:b,onConnect:I,isTarget:R,getState:x.getState,setState:x.setState,isValidConnection:u}),m==null||m(B)},A=function(B){var U=x.getState(),j=U.onClickConnectStart,D=U.onClickConnectStop,G=U.onClickConnectEnd,F=U.connectionMode;if(!E){j==null||j(B,{nodeId:b,handleId:S,handleType:n}),x.setState({connectionStartHandle:{nodeId:b,type:n,handleId:S}});return}var X=o2(B.target),Z=zb(B,F,E.type==="target",E.nodeId,E.handleId||null,u,X),Q=Z.connection,V=Z.isValid;D==null||D(B),V&&I(Q),G==null||G(B),x.setState({connectionStartHandle:null})};return T.createElement("div",Rm({"data-handleid":S,"data-nodeid":b,"data-handlepos":o,className:lr(["react-flow__handle","react-flow__handle-".concat(o),"nodrag",v,{source:!R,target:R,connectable:d,connecting:(E==null?void 0:E.nodeId)===b&&(E==null?void 0:E.handleId)===S&&(E==null?void 0:E.type)===n}]),onMouseDown:N,onClick:_?A:void 0,ref:t},y),p)});O2.displayName="Handle";var Yu=T.memo(O2),C2=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?we.Top:i,a=t.sourcePosition,u=a===void 0?we.Bottom:a;return T.createElement(T.Fragment,null,T.createElement(Yu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,T.createElement(Yu,{type:"source",position:u,isConnectable:n}))};C2.displayName="DefaultNode";var Hb=T.memo(C2),R2=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?we.Bottom:i;return T.createElement(T.Fragment,null,r==null?void 0:r.label,T.createElement(Yu,{type:"source",position:o,isConnectable:n}))};R2.displayName="InputNode";var I2=T.memo(R2),P2=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?we.Top:i;return T.createElement(T.Fragment,null,T.createElement(Yu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};P2.displayName="OutputNode";var N2=T.memo(P2),dY=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},hY=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 Xt(n,i)&&Xt(o,a)};function pY(e){var t=e.onSelectionChange,r=gt(dY,hY),n=r.selectedNodes,i=r.selectedEdges;return T.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var vY=T.memo(pY),gY=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 qn(e,t){T.useEffect(function(){typeof e<"u"&&t(e)},[e])}function tt(e,t,r){T.useEffect(function(){typeof t<"u"&&r(He({},e,t))},[t])}var mY=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,x=t.maxZoom,b=t.nodeExtent,w=t.onNodesChange,E=t.onEdgesChange,_=t.elementsSelectable,S=t.connectionMode,R=t.snapGrid,I=t.snapToGrid,N=t.translateExtent,A=t.connectOnClick,L=t.defaultEdgeOptions,B=t.fitView,U=t.fitViewOptions,j=t.onNodesDelete,D=t.onEdgesDelete,G=t.onNodeDrag,F=t.onNodeDragStart,X=t.onNodeDragStop,Z=t.onSelectionDrag,Q=t.onSelectionDragStart,V=t.onSelectionDragStop,ee=gt(gY,Xt),oe=ee.setNodes,ae=ee.setEdges,H=ee.setDefaultNodesAndEdges,K=ee.setMinZoom,$=ee.setMaxZoom,k=ee.setTranslateExtent,z=ee.setNodeExtent,re=ee.reset,ie=Ft();return T.useEffect(function(){return H(i,o),function(){re()}},[]),tt("defaultEdgeOptions",L,ie.setState),tt("connectionMode",S,ie.setState),tt("onConnect",a,ie.setState),tt("onConnectStart",u,ie.setState),tt("onConnectStop",c,ie.setState),tt("onConnectEnd",d,ie.setState),tt("onClickConnectStart",f,ie.setState),tt("onClickConnectStop",h,ie.setState),tt("onClickConnectEnd",p,ie.setState),tt("nodesDraggable",v,ie.setState),tt("nodesConnectable",m,ie.setState),tt("elementsSelectable",_,ie.setState),tt("snapToGrid",I,ie.setState),tt("snapGrid",R,ie.setState),tt("onNodesChange",w,ie.setState),tt("onEdgesChange",E,ie.setState),tt("connectOnClick",A,ie.setState),tt("fitViewOnInit",B,ie.setState),tt("fitViewOnInitOptions",U,ie.setState),tt("onNodesDelete",j,ie.setState),tt("onEdgesDelete",D,ie.setState),tt("onNodeDrag",G,ie.setState),tt("onNodeDragStart",F,ie.setState),tt("onNodeDragStop",X,ie.setState),tt("onSelectionDrag",Z,ie.setState),tt("onSelectionDragStart",Q,ie.setState),tt("onSelectionDragStop",V,ie.setState),qn(r,oe),qn(n,ae),qn(i,oe),qn(o,ae),qn(y,K),qn(x,$),qn(N,k),qn(b,z),null},yY=".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%)}",bY=yY,xY=".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}",wY=xY,_Y=function(t,r,n){return n===we.Left?t-r:n===we.Right?t+r:t},EY=function(t,r,n){return n===we.Top?t-r:n===we.Bottom?t+r:t},sP=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 T.createElement("circle",{className:lr(["react-flow__edgeupdater",r]),cx:_Y(i,u,n),cy:EY(o,u,n),r:u,stroke:"transparent",fill:"transparent"})},Zi=(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,x=n.labelBgPadding,b=n.labelBgBorderRadius,w=n.style,E=n.source,_=n.target,S=n.sourceX,R=n.sourceY,I=n.targetX,N=n.targetY,A=n.sourcePosition,L=n.targetPosition,B=n.elementsSelectable,U=n.hidden,j=n.sourceHandleId,D=n.targetHandleId,G=n.onContextMenu,F=n.onMouseEnter,X=n.onMouseMove,Z=n.onMouseLeave,Q=n.edgeUpdaterRadius,V=n.onEdgeUpdate,ee=n.onEdgeUpdateStart,oe=n.onEdgeUpdateEnd,ae=n.markerEnd,H=n.markerStart,K=n.rfId,$=T.useState(!1),k=Le($,2),z=k[0],re=k[1],ie=Ft(),se=function(rt){var bt=ie.getState(),Jt=bt.edges,fr=bt.addSelectedEdges,Dt=Jt.find(function(_t){return _t.id===i});B&&(ie.setState({nodesSelectionActive:!1}),fr([i])),c==null||c(rt,Dt)},ce=aa(i,ie.getState,d),be=aa(i,ie.getState,G),Ce=aa(i,ie.getState,F),_e=aa(i,ie.getState,X),he=aa(i,ie.getState,Z),fe=function(rt,bt){var Jt=bt?_:E,fr=(bt?D:j)||null,Dt=bt?"target":"source",_t=function(){return!0},jt=bt,Wr=ie.getState().edges.find(function(dr){return dr.id===i});ee==null||ee(rt,Wr,Dt);var Yn=oe?function(dr){return oe(dr,Wr,Dt)}:void 0,Cn=function(Ti){return V==null?void 0:V(Wr,Ti)};S2({event:rt,handleId:fr,nodeId:Jt,onConnect:Cn,isTarget:jt,getState:ie.getState,setState:ie.setState,isValidConnection:_t,elementEdgeUpdaterType:Dt,onEdgeUpdateEnd:Yn})},Ee=function(rt){return fe(rt,!0)},Pe=function(rt){return fe(rt,!1)},Ze=function(){return re(!0)},ze=function(){return re(!1)},Fe=T.useMemo(function(){return"url(#".concat(Lb(H,K),")")},[H,K]),Ue=T.useMemo(function(){return"url(#".concat(Lb(ae,K),")")},[ae,K]);if(U)return null;var ct=!B&&!c,lt=typeof V<"u",mt=lr(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:f,animated:h,inactive:ct,updating:z}]);return T.createElement("g",{className:mt,onClick:se,onDoubleClick:ce,onContextMenu:be,onMouseEnter:Ce,onMouseMove:_e,onMouseLeave:he},T.createElement(e,{id:i,source:E,target:_,selected:f,animated:h,label:p,labelStyle:v,labelShowBg:m,labelBgStyle:y,labelBgPadding:x,labelBgBorderRadius:b,data:u,style:w,sourceX:S,sourceY:R,targetX:I,targetY:N,sourcePosition:A,targetPosition:L,sourceHandleId:j,targetHandleId:D,markerStart:Fe,markerEnd:Ue,"data-testid":"rf__edge-".concat(i)}),lt&&T.createElement("g",{onMouseDown:Ee,onMouseEnter:Ze,onMouseOut:ze},T.createElement(sP,{position:A,centerX:S,centerY:R,radius:Q})),lt&&T.createElement("g",{onMouseDown:Pe,onMouseEnter:Ze,onMouseOut:ze},T.createElement(sP,{position:L,centerX:I,centerY:N,radius:Q})))};return t.displayName="EdgeWrapper",T.memo(t)});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 cP(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){He(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 SY(e){var t={default:Zi(e.default||$b),straight:Zi(e.bezier||E2),step:Zi(e.step||_2),smoothstep:Zi(e.step||qx),simplebezier:Zi(e.simplebezier||x2)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=Zi(e[o]||$b),i},r);return cP(cP({},t),n)}function lP(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 we.Top:return{x:n+o/2,y:i};case we.Right:return{x:n+o,y:i+a/2};case we.Bottom:return{x:n+o/2,y:i+a};case we.Left:return{x:n,y:i+a/2}}}function fP(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 OY=function(t,r,n,i,o,a){var u=lP(n,t,r),c=lP(a,i,o);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y}};function CY(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=Vu({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 dP(e,t){var r,n,i,o,a,u=e.get(t),c=(u==null||(r=u[Nt])===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 RY=typeof document<"u"?document:null,Xu=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:RY},r=T.useState(!1),n=Le(r,2),i=n[0],o=n[1],a=T.useRef(new Set([])),u=T.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,pi(y))},[]);return[p,v]}return[[],[]]},[e]),c=Le(u,2),d=c[0],f=c[1];return T.useEffect(function(){if(e!==null){var h,p,v=function(b){if(vP(b))return!1;var w=pP(b.code,f);a.current.add(b[w]),hP(d,a.current,!1)&&(b.preventDefault(),o(!0))},m=function(b){if(vP(b))return!1;var w=pP(b.code,f);hP(d,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(b[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 x,b;t==null||(x=t.target)===null||x===void 0||x.removeEventListener("keydown",v),t==null||(b=t.target)===null||b===void 0||b.removeEventListener("keyup",m),window.removeEventListener("blur",y)}}},[e,o]),i});function hP(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 pP(e,t){return t.includes(e)?"code":"key"}function vP(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 IY=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},PY=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Ft(),i=gt(IY,Xt),o=i.onNodesChange,a=i.onEdgesChange,u=Xu(t),c=Xu(r);T.useEffect(function(){var d=n.getState(),f=d.nodeInternals,h=d.edges,p=d.hasDefaultNodes,v=d.hasDefaultEdges,m=d.onNodesDelete,y=d.onEdgesDelete,x=Array.from(f.values()),b=x.reduce(function(N,A){return(!A.selected&&A.parentNode&&N.find(function(L){return L.id===A.parentNode})||A.selected)&&N.push(A),N},[]),w=h.filter(function(N){return N.selected});if(u&&(b||w)){var E=h2(b,h),_=[].concat(pi(w),pi(E)),S=_.reduce(function(N,A){return N.includes(A.id)||N.push(A.id),N},[]);if((v||p)&&(v&&n.setState({edges:h.filter(function(N){return!S.includes(N.id)})}),p&&(b.forEach(function(N){f.delete(N.id)}),n.setState({nodeInternals:new Map(f)}))),S.length>0&&(y==null||y(_),a)){var R=S.map(function(N){return{id:N,type:"remove"}});a(R)}if(b.length>0&&(m==null||m(b),o)){var I=b.map(function(N){return{id:N.id,type:"remove"}});o(I)}n.setState({nodesSelectionActive:!1})}},[u,o,a]),T.useEffect(function(){n.setState({multiSelectionActive:c})},[c])});function NY(e){var t=Ft();T.useEffect(function(){var r,n=function(){if(e.current){var o=Mx(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 TY=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},Im=function(t){return{x:t.x,y:t.y,zoom:t.k}},du=function(t,r){return t.target.closest(".".concat(r))},AY=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},MY=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?uo.Free:v,y=t.zoomOnDoubleClick,x=y===void 0?!0:y,b=t.selectionKeyPressed,w=t.elementsSelectable,E=t.panOnDrag,_=E===void 0?!0:E,S=t.translateExtent,R=t.minZoom,I=t.maxZoom,N=t.defaultZoom,A=N===void 0?1:N,L=t.defaultPosition,B=L===void 0?[0,0]:L,U=t.zoomActivationKeyCode,j=t.preventScrolling,D=j===void 0?!0:j,G=t.children,F=t.noWheelClassName,X=t.noPanClassName,Z=Ft(),Q=T.useRef(!1),V=T.useRef(null),ee=T.useRef({x:0,y:0,zoom:0}),oe=gt(AY,Xt),ae=oe.d3Zoom,H=oe.d3Selection,K=oe.d3ZoomHandler,$=Xu(U);return NY(V),T.useEffect(function(){if(V.current){var k,z=mK().scaleExtent([R,I]).translateExtent(S),re=qr(V.current).call(z),ie=co(B[0],S[0][0],S[1][0]),se=co(B[1],S[0][1],S[1][1]),ce=co(A,R,I),be=hi.translate(ie,se).scale(ce);z.transform(re,be),Z.setState({d3Zoom:z,d3Selection:re,d3ZoomHandler:re.on("wheel.zoom"),transform:[ie,se,ce],domNode:(k=re.node())===null||k===void 0?void 0:k.closest(".react-flow")})}},[]),T.useEffect(function(){H&&ae&&(f&&!$?H.on("wheel",function(k){if(du(k,F))return!1;k.preventDefault(),k.stopImmediatePropagation();var z=H.property("__zoom").k||1;if(k.ctrlKey&&c){var re=Zr(k),ie=-k.deltaY*(k.deltaMode===1?.05:k.deltaMode?1:.002)*10,se=z*Math.pow(2,ie);ae.scaleTo(H,se,re);return}var ce=k.deltaMode===1?20:1,be=m===uo.Vertical?0:k.deltaX*ce,Ce=m===uo.Horizontal?0:k.deltaY*ce;ae.translateBy(H,-(be/z)*p,-(Ce/z)*p)}).on("wheel.zoom",null):typeof K<"u"&&H.on("wheel",function(k){if(!D||du(k,F))return null;k.preventDefault()}).on("wheel.zoom",K))},[f,m,H,ae,K,$,c,D,F]),T.useEffect(function(){ae&&(b&&!Q.current?ae.on("zoom",null):b||ae.on("zoom",function(k){if(Z.setState({transform:[k.transform.x,k.transform.y,k.transform.k]}),r){var z=Im(k.transform);r(k.sourceEvent,z)}}))},[b,ae,r]),T.useEffect(function(){ae&&ae.on("start",function(k){if(Q.current=!0,n){var z=Im(k.transform);ee.current=z,n(k.sourceEvent,z)}})},[ae,n]),T.useEffect(function(){ae&&ae.on("end",function(k){if(Q.current=!1,i&&TY(ee.current,k.transform)){var z=Im(k.transform);ee.current=z,i(k.sourceEvent,z)}})},[ae,i]),T.useEffect(function(){ae&&ae.filter(function(k){var z=$||a,re=c&&k.ctrlKey;return!_&&!z&&!f&&!x&&!c||b||!x&&k.type==="dblclick"||du(k,F)&&k.type==="wheel"||du(k,X)&&k.type!=="wheel"||!c&&k.ctrlKey&&k.type==="wheel"||!z&&!f&&!re&&k.type==="wheel"||!_&&(k.type==="mousedown"||k.type==="touchstart")?!1:(!k.ctrlKey||k.type==="wheel")&&!k.button})},[ae,a,c,f,x,_,b,w,$]),T.createElement("div",{className:"react-flow__renderer react-flow__container",ref:V},G)};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 mP(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){He(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}function yP(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var DY=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},bP={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},jY=T.memo(function(e){var t=e.selectionKeyPressed,r=Ft(),n=T.useRef(0),i=T.useRef(0),o=T.useRef(),a=T.useState(bP),u=Le(a,2),c=u[0],d=u[1],f=gt(DY,Xt),h=f.userSelectionActive,p=f.elementsSelectable,v=h||t;if(!p||!v)return null;var m=function(){d(bP),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},y=function(_){var S=_.target.closest(".react-flow");o.current=S.getBoundingClientRect();var R=yP(_,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})},x=function(_){var S,R;if(!(!t||!c.draw||!o.current)){var I=yP(_,o.current),N=(S=c.startX)!==null&&S!==void 0?S:0,A=(R=c.startY)!==null&&R!==void 0?R:0,L=mP(mP({},c),{},{x:I.x<N?I.x:N,y:I.y<A?I.y:A,width:Math.abs(I.x-N),height:Math.abs(I.y-A)}),B=r.getState(),U=B.nodeInternals,j=B.edges,D=B.transform,G=B.onNodesChange,F=B.onEdgesChange,X=Array.from(U.values()),Z=d2(U,L,D,!1,!0),Q=h2(Z,j).map(function(ae){return ae.id}),V=Z.map(function(ae){return ae.id});if(n.current!==V.length){n.current=V.length;var ee=no(X,V);ee.length&&(G==null||G(ee))}if(i.current!==Q.length){i.current=Q.length;var oe=no(j,Q);oe.length&&(F==null||F(oe))}d(L)}},b=function(){r.setState({nodesSelectionActive:n.current>0}),m()},w=function(){r.setState({nodesSelectionActive:!1}),m()};return T.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:y,onMouseMove:x,onMouseUp:b,onMouseLeave:w},c.draw&&T.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 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 wP(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){He(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}function T2(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:T2(r,t):!1}function _P(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 qY(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!T2(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 kY(e,t,r,n,i,o){var a=Le(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,x=i.get(e.parentNode),b=(p=x==null||(v=x.positionAbsolute)===null||v===void 0?void 0:v.x)!==null&&p!==void 0?p:0,w=(m=x==null||(y=x.positionAbsolute)===null||y===void 0?void 0:y.y)!==null&&m!==void 0?m:0;d=[[e.extent[0][0]+b,e.extent[0][1]+w],[e.extent[1][0]+b,e.extent[1][1]+w]]}var E={x:0,y:0};if(e.parentNode){var _,S,R,I,N=i.get(e.parentNode);E={x:(_=N==null||(S=N.positionAbsolute)===null||S===void 0?void 0:S.x)!==null&&_!==void 0?_:0,y:(R=N==null||(I=N.positionAbsolute)===null||I===void 0?void 0:I.y)!==null&&R!==void 0?R:0}}return e.positionAbsolute=d?i2(f,d):f,e.position={x:e.positionAbsolute.x-E.x,y:e.positionAbsolute.y-E.y},e}function Pm(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return wP(wP({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function Nm(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function A2(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=T.useState(!1),f=Le(d,2),h=f[0],p=f[1],v=Ft(),m=T.useRef(),y=T.useRef({x:null,y:null}),x=T.useCallback(function(b){var w=b.sourceEvent,E=v.getState(),_=E.transform,S=E.snapGrid,R=E.snapToGrid,I=w.touches?w.touches[0].clientX:w.clientX,N=w.touches?w.touches[0].clientY:w.clientY,A=f2({x:I,y:N},_,R,S);return A},[]);return T.useEffect(function(){if(t!=null&&t.current){var b=qr(t.current);if(n)b.on(".drag",null);else{var w=R8().on("start",function(E){var _=v.getState(),S=_.nodeInternals,R=_.multiSelectionActive,I=_.unselectNodesAndEdges,N=_.onNodeDragStart,A=_.onSelectionDragStart,L=a?N:Nm(A);if(!c&&!R&&a){var B;(B=S.get(a))!==null&&B!==void 0&&B.selected||I()}a&&u&&c&&l2({id:a,store:v});var U=x(E);if(y.current=U,m.current=qY(S,U,a),L&&m.current){var j=Pm({nodeId:a,dragItems:m.current,nodeInternals:S}),D=Le(j,2),G=D[0],F=D[1];L(E.sourceEvent,G,F)}}).on("drag",function(E){var _=v.getState(),S=_.updateNodePositions,R=_.snapToGrid,I=_.snapGrid,N=_.nodeInternals,A=_.nodeExtent,L=_.onNodeDrag,B=_.onSelectionDrag,U=x(E);if((y.current.x!==U.x||y.current.y!==U.y)&&m.current){y.current=U,m.current=m.current.map(function(Z){return kY(Z,U,R,I,N,A)});var j=a?L:Nm(B);if(S(m.current,!0,!0),p(!0),j){var D=Pm({nodeId:a,dragItems:m.current,nodeInternals:N}),G=Le(D,2),F=G[0],X=G[1];j(E.sourceEvent,F,X)}}E.on("end",function(Z){if(p(!1),m.current){var Q=v.getState(),V=Q.updateNodePositions,ee=Q.nodeInternals,oe=Q.onNodeDragStop,ae=Q.onSelectionDragStop,H=a?oe:Nm(ae);if(V(m.current,!1,!1),H){var K=Pm({nodeId:a,dragItems:m.current,nodeInternals:ee}),$=Le(K,2),k=$[0],z=$[1];H(Z.sourceEvent,k,z)}}})}).filter(function(E){var _=E.target,S=!E.button&&(!i||!_P(_,".".concat(i),t))&&(!o||_P(_,o,t));return S});return b.call(w),function(){b.on(".drag",null)}}}},[t,n,i,o,u,v,a,c,x]),h}function EP(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 LY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var BY=function(t){return LY({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},Dx(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},FY=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return Dx(r)};function $Y(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Ft(),i=gt(BY,Xt),o=i.transformString,a=i.userSelectionActive,u=gt(FY,Xt),c=u.width,d=u.height,f=u.x,h=u.y,p=T.useRef(null);if(A2({nodeRef:p}),a||!c||!d)return null;var v=t?function(m){var y=Array.from(n.getState().nodeInternals.values()).filter(function(x){return x.selected});t(m,y)}:void 0;return T.createElement("div",{className:lr(["react-flow__nodesselection","react-flow__container",r]),style:{transform:o}},T.createElement("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:v,style:{width:c,height:d,top:h,left:f}}))}var zY=T.memo($Y),HY=function(t){return t.nodesSelectionActive},M2=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,x=t.panOnScroll,b=t.panOnScrollSpeed,w=t.panOnScrollMode,E=t.zoomOnDoubleClick,_=t.panOnDrag,S=t.translateExtent,R=t.minZoom,I=t.maxZoom,N=t.defaultZoom,A=t.defaultPosition,L=t.preventScrolling,B=t.onSelectionContextMenu,U=t.noWheelClassName,j=t.noPanClassName,D=Ft(),G=gt(HY),F=Xu(f);PY({deleteKeyCode:a,multiSelectionKeyCode:h});var X=function(ee){n==null||n(ee),D.getState().resetSelectedElements(),D.setState({nodesSelectionActive:!1})},Z=i?function(V){return i(V)}:void 0,Q=o?function(V){return o(V)}:void 0;return T.createElement(MY,{onMove:u,onMoveStart:c,onMoveEnd:d,selectionKeyPressed:F,elementsSelectable:v,zoomOnScroll:m,zoomOnPinch:y,panOnScroll:x,panOnScrollSpeed:b,panOnScrollMode:w,zoomOnDoubleClick:E,panOnDrag:_,translateExtent:S,minZoom:R,maxZoom:I,defaultZoom:N,defaultPosition:A,zoomActivationKeyCode:p,preventScrolling:L,noWheelClassName:U,noPanClassName:j},r,T.createElement(jY,{selectionKeyPressed:F}),G&&T.createElement(zY,{onSelectionContextMenu:B,noPanClassName:j}),T.createElement("div",{className:"react-flow__pane react-flow__container",onClick:X,onContextMenu:Z,onWheel:Q}))};M2.displayName="FlowRenderer";var UY=T.memo(M2);function WY(e){var t=gt(T.useCallback(function(r){return e?d2(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var VY=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},D2=function(t){var r=gt(VY,Xt),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,u=WY(t.onlyRenderVisibleElements),c=T.useRef(),d=T.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 T.useEffect(function(){return function(){var f;c==null||(f=c.current)===null||f===void 0||f.disconnect()}},[]),T.createElement("div",{className:"react-flow__nodes react-flow__container"},u.map(function(f){var h,p,v,m,y,x,b,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 E=t.nodeTypes[w]||t.nodeTypes.default,_=!!(f.draggable||n&&typeof f.draggable>"u"),S=!!(f.selectable||o&&typeof f.selectable>"u"),R=!!(f.connectable||i&&typeof f.connectable>"u");return T.createElement(E,{key:f.id,id:f.id,className:f.className,style:f.style,type:w,data:f.data,sourcePosition:f.sourcePosition||we.Bottom,targetPosition:f.targetPosition||we.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:_,isSelectable:S,isConnectable:R,resizeObserver:d,dragHandle:f.dragHandle,zIndex:(y=(x=f[Nt])===null||x===void 0?void 0:x.z)!==null&&y!==void 0?y:0,isParent:!!((b=f[Nt])!==null&&b!==void 0&&b.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!f.width&&!!f.height})}))};D2.displayName="NodeRenderer";var GY=T.memo(D2),Ji;function SP(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 OP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var KY=(Ji={},He(Ji,we.Left,we.Right),He(Ji,we.Right,we.Left),He(Ji,we.Top,we.Bottom),He(Ji,we.Bottom,we.Top),Ji),YY=(function(e){var t,r,n,i,o,a=e.connectionNodeId,u=e.connectionHandleType,c=e.connectionLineStyle,d=e.connectionLineType,f=d===void 0?$n.Bezier:d,h=e.isConnectable,p=e.CustomConnectionLineComponent,v=gt(T.useCallback(function(Q){return{fromNode:Q.nodeInternals.get(a),handleId:Q.connectionHandleId,toX:(Q.connectionPosition.x-Q.transform[0])/Q.transform[2],toY:(Q.connectionPosition.y-Q.transform[1])/Q.transform[2]}},[a]),Xt),m=v.fromNode,y=v.handleId,x=v.toX,b=v.toY,w=m==null||(t=m[Nt])===null||t===void 0?void 0:t.handleBounds;if(!m||!h||!(w!=null&&w[u]))return null;var E=w[u],_=y?E.find(function(Q){return Q.id===y}):E[0],S=_?_.x+_.width/2:((r=m==null?void 0:m.width)!==null&&r!==void 0?r:0)/2,R=_?_.y+_.height/2:(n=m==null?void 0:m.height)!==null&&n!==void 0?n:0,I=((m==null||(i=m.positionAbsolute)===null||i===void 0?void 0:i.x)||0)+S,N=((m==null||(o=m.positionAbsolute)===null||o===void 0?void 0:o.y)||0)+R,A=_==null?void 0:_.position;if(!A)return null;var L=KY[A],B,U,j,D,G,F;switch(u){case"source":B=I,U=N,j=A,D=x,G=b,F=L;break;case"target":B=x,U=b,j=L,D=I,G=N,F=A;break}if(p)return T.createElement("g",{className:"react-flow__connection"},T.createElement(p,{connectionLineType:f,connectionLineStyle:c,fromNode:m,fromHandle:_,fromX:I,fromY:N,toX:x,toY:b,fromPosition:A,toPosition:L,sourcePosition:j,targetPosition:F,sourceNode:m,sourceHandle:_,targetX:D,targetY:G,sourceX:B,sourceY:U}));var X="",Z={sourceX:B,sourceY:U,sourcePosition:j,targetX:D,targetY:G,targetPosition:F};return f===$n.Bezier?X=Bc(Z):f===$n.Step?X=Fb(OP(OP({},Z),{},{borderRadius:0})):f===$n.SmoothStep?X=Fb(Z):f===$n.SimpleBezier?X=b2(Z):X="M".concat(B,",").concat(U," ").concat(D,",").concat(G),T.createElement("g",{className:"react-flow__connection"},T.createElement("path",{d:X,className:"react-flow__connection-path",style:c}))});function Ub(e){"@babel/helpers - typeof";return Ub=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},Ub(e)}var hu,XY=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return T.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:"none",points:"-5,-4 0,0 -5,4"})},ZY=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return T.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},CP=(hu={},He(hu,Wu.Arrow,XY),He(hu,Wu.ArrowClosed,ZY),hu);function JY(e){var t=T.useMemo(function(){var r=CP.hasOwnProperty(e);return r?CP[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 RP(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 QY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var e9=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=JY(n);return T.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"},T.createElement(m,{color:i,strokeWidth:h}))},t9=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&&Ub(c)==="object"){var d=Lb(c,n);o.includes(d)||(a.push(QY({id:d,color:c.color||r},c)),o.push(d))}}),a},[]).sort(function(a,u){return a.id.localeCompare(u.id)})}},j2=function(t){var r=t.defaultColor,n=t.rfId,i=gt(T.useCallback(t9({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 T.createElement("defs",null,i.map(function(o){return T.createElement(e9,{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})}))};j2.displayName="MarkerDefinitions";var r9=T.memo(j2),n9=[{level:0,isMaxLevel:!0,edges:[]}];function i9(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,u){var c=a2(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[Nt])===null||h===void 0?void 0:h.z)||0,((p=t.get(u.target))===null||p===void 0||(v=p[Nt])===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=Le(a,2),c=u[0],d=u[1],f=+c;return{edges:d,level:f,isMaxLevel:f===n}});return o.length===0?n9:o}function o9(e,t,r){var n=gt(T.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)&&CY({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 i9(n,t,r)}var a9=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}},q2=function(t){var r=gt(a9,Xt),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=o9(t.onlyRenderVisibleElements,f,t.elevateEdgesOnSelect);if(!u)return null;var p=t.connectionLineType,v=t.defaultMarkerColor,m=t.connectionLineStyle,y=t.connectionLineComponent,x=t.connectionLineContainerStyle,b=n&&i;return T.createElement(T.Fragment,null,h.map(function(w){var E=w.level,_=w.edges,S=w.isMaxLevel;return T.createElement("svg",{key:E,style:{zIndex:E},width:u,height:c,className:"react-flow__edges react-flow__container"},S&&T.createElement(r9,{defaultColor:v,rfId:t.rfId}),T.createElement("g",null,_.map(function(R){var I=dP(f,R.source),N=Le(I,3),A=N[0],L=N[1],B=N[2],U=dP(f,R.target),j=Le(U,3),D=j[0],G=j[1],F=j[2];if(!B||!F)return null;var X=R.type||"default";t.edgeTypes[X]||(console.warn('[React Flow]: Edge type "'.concat(X,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),X="default");var Z=t.edgeTypes[X]||t.edgeTypes.default,Q=d===wo.Strict?G.target:G.target||G.source,V=fP(L.source,R.sourceHandle||null),ee=fP(Q,R.targetHandle||null),oe=(V==null?void 0:V.position)||we.Bottom,ae=(ee==null?void 0:ee.position)||we.Top;if(!V)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(!ee)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 H=OY(A,V,oe,D,ee,ae),K=H.sourceX,$=H.sourceY,k=H.targetX,z=H.targetY;return T.createElement(Z,{key:R.id,id:R.id,className:lr([R.className,t.noPanClassName]),type:X,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:K,sourceY:$,targetX:k,targetY:z,sourcePosition:oe,targetPosition:ae,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})})))}),b&&T.createElement("svg",{style:x,width:u,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},T.createElement(YY,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:m,connectionLineType:p,isConnectable:o,CustomConnectionLineComponent:y})))};q2.displayName="EdgeRenderer";var s9=T.memo(q2),u9=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function c9(e){var t=e.children,r=gt(u9);return T.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function l9(e){var t=m2(),r=T.useRef(!1);T.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var k2=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,x=t.onSelectionContextMenu,b=t.connectionLineType,w=t.connectionLineStyle,E=t.connectionLineComponent,_=t.connectionLineContainerStyle,S=t.selectionKeyCode,R=t.multiSelectionKeyCode,I=t.zoomActivationKeyCode,N=t.deleteKeyCode,A=t.onlyRenderVisibleElements,L=t.elementsSelectable,B=t.selectNodesOnDrag,U=t.translateExtent,j=t.minZoom,D=t.maxZoom,G=t.defaultZoom,F=t.defaultPosition,X=t.preventScrolling,Z=t.defaultMarkerColor,Q=t.zoomOnScroll,V=t.zoomOnPinch,ee=t.panOnScroll,oe=t.panOnScrollSpeed,ae=t.panOnScrollMode,H=t.zoomOnDoubleClick,K=t.panOnDrag,$=t.onPaneClick,k=t.onPaneScroll,z=t.onPaneContextMenu,re=t.onEdgeUpdate,ie=t.onEdgeContextMenu,se=t.onEdgeMouseEnter,ce=t.onEdgeMouseMove,be=t.onEdgeMouseLeave,Ce=t.edgeUpdaterRadius,_e=t.onEdgeUpdateStart,he=t.onEdgeUpdateEnd,fe=t.noDragClassName,Ee=t.noWheelClassName,Pe=t.noPanClassName,Ze=t.elevateEdgesOnSelect,ze=t.id;return l9(u),T.createElement(UY,{onPaneClick:$,onPaneContextMenu:z,onPaneScroll:k,deleteKeyCode:N,selectionKeyCode:S,multiSelectionKeyCode:R,zoomActivationKeyCode:I,elementsSelectable:L,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:Q,zoomOnPinch:V,zoomOnDoubleClick:H,panOnScroll:ee,panOnScrollSpeed:oe,panOnScrollMode:ae,panOnDrag:K,translateExtent:U,minZoom:j,maxZoom:D,defaultZoom:G,defaultPosition:F,onSelectionContextMenu:x,preventScrolling:X,noDragClassName:fe,noWheelClassName:Ee,noPanClassName:Pe},T.createElement(c9,null,T.createElement(s9,{edgeTypes:n,onEdgeClick:d,onEdgeDoubleClick:h,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:E,connectionLineContainerStyle:_,onEdgeUpdate:re,onlyRenderVisibleElements:A,onEdgeContextMenu:ie,onEdgeMouseEnter:se,onEdgeMouseMove:ce,onEdgeMouseLeave:be,onEdgeUpdateStart:_e,onEdgeUpdateEnd:he,edgeUpdaterRadius:Ce,defaultMarkerColor:Z,noPanClassName:Pe,elevateEdgesOnSelect:!!Ze,rfId:ze}),T.createElement(GY,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:f,onNodeMouseEnter:p,onNodeMouseMove:v,onNodeMouseLeave:m,onNodeContextMenu:y,selectNodesOnDrag:B,onlyRenderVisibleElements:A,noPanClassName:Pe,noDragClassName:fe})))};k2.displayName="GraphView";var f9=T.memo(k2),L2=function(){return null};L2.displayName="GroupNode";function IP(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 PP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var sa=(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,x=n.style,b=n.className,w=n.isDraggable,E=n.isSelectable,_=n.isConnectable,S=n.selectNodesOnDrag,R=n.sourcePosition,I=n.targetPosition,N=n.hidden,A=n.resizeObserver,L=n.dragHandle,B=n.zIndex,U=n.isParent,j=n.noPanClassName,D=n.noDragClassName,G=n.initialized,F=Ft(),X=T.useRef(null),Z=T.useRef(R),Q=T.useRef(I),V=T.useRef(o),ee=E||w||f||h||p||v,oe=oa(i,F.getState,h),ae=oa(i,F.getState,p),H=oa(i,F.getState,v),K=oa(i,F.getState,m),$=oa(i,F.getState,y),k=function(ie){if(E&&(!S||!w)&&l2({id:i,store:F}),f){var se=F.getState().nodeInternals.get(i);f(ie,PP({},se))}};T.useEffect(function(){if(X.current&&!N){var re=X.current;return A==null||A.observe(re),function(){return A==null?void 0:A.unobserve(re)}}},[N]),T.useEffect(function(){var re=V.current!==o,ie=Z.current!==R,se=Q.current!==I;X.current&&(re||ie||se)&&(re&&(V.current=o),ie&&(Z.current=R),se&&(Q.current=I),F.getState().updateNodeDimensions([{id:i,nodeElement:X.current,forceUpdate:!0}]))},[i,o,R,I]);var z=A2({nodeRef:X,disabled:N||!w,noDragClassName:D,handleSelector:L,nodeId:i,isSelectable:E,selectNodesOnDrag:S});return N?null:T.createElement("div",{className:lr(["react-flow__node","react-flow__node-".concat(o),j,b,{selected:d,selectable:E,parent:U}]),ref:X,style:PP({zIndex:B,transform:"translate(".concat(u,"px,").concat(c,"px)"),pointerEvents:ee?"all":"none",visibility:G?"visible":"hidden"},x),onMouseEnter:oe,onMouseMove:ae,onMouseLeave:H,onContextMenu:K,onClick:k,onDoubleClick:$,"data-testid":"rf__node-".concat(i),"data-id":i},T.createElement(uY,{value:i},T.createElement(e,{id:i,data:a,type:o,xPos:u,yPos:c,selected:d,isConnectable:_,sourcePosition:R,targetPosition:I,dragging:z,dragHandle:L,zIndex:B})))};return t.displayName="NodeWrapper",T.memo(t)});function NP(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 TP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d9(e){var t={input:sa(e.input||I2),default:sa(e.default||Hb),output:sa(e.output||N2),group:sa(e.group||L2)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=sa(e[o]||Hb),i},r);return TP(TP({},t),n)}function AP(e,t){var r=T.useRef(null),n=T.useMemo(function(){if(process.env.NODE_ENV==="development"){var i=Object.keys(e);Xt(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 MP(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 B2=function(t){var r=t.children,n=!0;try{Ft()}catch{n=!1}return n?T.createElement(T.Fragment,null,r):T.createElement(NK,{createStore:TK},r)};B2.displayName="ReactFlowWrapper";var h9=["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 DP(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?DP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}MP(bY),MP(wY);var p9={input:I2,default:Hb,output:N2},v9={default:$b,straight:E2,step:_2,smoothstep:qx,simplebezier:x2},g9=[15,15],m9=[0,0],F2=T.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?p9:u,d=e.edgeTypes,f=d===void 0?v9:d,h=e.onNodeClick,p=e.onEdgeClick,v=e.onInit,m=e.onMove,y=e.onMoveStart,x=e.onMoveEnd,b=e.onConnect,w=e.onConnectStart,E=e.onConnectStop,_=e.onConnectEnd,S=e.onClickConnectStart,R=e.onClickConnectStop,I=e.onClickConnectEnd,N=e.onNodeMouseEnter,A=e.onNodeMouseMove,L=e.onNodeMouseLeave,B=e.onNodeContextMenu,U=e.onNodeDoubleClick,j=e.onNodeDragStart,D=e.onNodeDrag,G=e.onNodeDragStop,F=e.onNodesDelete,X=e.onEdgesDelete,Z=e.onSelectionChange,Q=e.onSelectionDragStart,V=e.onSelectionDrag,ee=e.onSelectionDragStop,oe=e.onSelectionContextMenu,ae=e.connectionMode,H=ae===void 0?wo.Strict:ae,K=e.connectionLineType,$=K===void 0?$n.Bezier:K,k=e.connectionLineStyle,z=e.connectionLineComponent,re=e.connectionLineContainerStyle,ie=e.deleteKeyCode,se=ie===void 0?"Backspace":ie,ce=e.selectionKeyCode,be=ce===void 0?"Shift":ce,Ce=e.multiSelectionKeyCode,_e=Ce===void 0?"Meta":Ce,he=e.zoomActivationKeyCode,fe=he===void 0?"Meta":he,Ee=e.snapToGrid,Pe=Ee===void 0?!1:Ee,Ze=e.snapGrid,ze=Ze===void 0?g9:Ze,Fe=e.onlyRenderVisibleElements,Ue=Fe===void 0?!1:Fe,ct=e.selectNodesOnDrag,lt=ct===void 0?!0:ct,mt=e.nodesDraggable,yt=e.nodesConnectable,rt=e.elementsSelectable,bt=e.minZoom,Jt=bt===void 0?.5:bt,fr=e.maxZoom,Dt=fr===void 0?2:fr,_t=e.defaultZoom,jt=_t===void 0?1:_t,Wr=e.defaultPosition,Yn=Wr===void 0?m9:Wr,Cn=e.translateExtent,dr=Cn===void 0?Bb:Cn,Ti=e.preventScrolling,ll=Ti===void 0?!0:Ti,fl=e.nodeExtent,Do=e.defaultMarkerColor,os=Do===void 0?"#b1b1b7":Do,as=e.zoomOnScroll,dl=as===void 0?!0:as,ss=e.zoomOnPinch,hl=ss===void 0?!0:ss,jo=e.panOnScroll,pl=jo===void 0?!1:jo,us=e.panOnScrollSpeed,vl=us===void 0?.5:us,Ai=e.panOnScrollMode,gl=Ai===void 0?uo.Free:Ai,Mi=e.zoomOnDoubleClick,ml=Mi===void 0?!0:Mi,cs=e.panOnDrag,yl=cs===void 0?!0:cs,bl=e.onPaneClick,xl=e.onPaneScroll,ls=e.onPaneContextMenu,wl=e.children,_l=e.onEdgeUpdate,fs=e.onEdgeContextMenu,El=e.onEdgeDoubleClick,Sl=e.onEdgeMouseEnter,Ol=e.onEdgeMouseMove,Cl=e.onEdgeMouseLeave,Rl=e.onEdgeUpdateStart,Il=e.onEdgeUpdateEnd,Xn=e.edgeUpdaterRadius,Pl=Xn===void 0?10:Xn,Di=e.onNodesChange,Nl=e.onEdgesChange,ds=e.noDragClassName,Tl=ds===void 0?"nodrag":ds,qo=e.noWheelClassName,hs=qo===void 0?"nowheel":qo,ko=e.noPanClassName,Al=ko===void 0?"nopan":ko,ps=e.fitView,Ml=ps===void 0?!1:ps,Dl=e.fitViewOptions,Lo=e.connectOnClick,vs=Lo===void 0?!0:Lo,gs=e.attributionPosition,Bo=e.proOptions,jl=e.defaultEdgeOptions,Fo=e.elevateEdgesOnSelect,ji=Fo===void 0?!1:Fo,Zn=kc(e,h9),ql=AP(c,d9),ms=AP(f,SY);return T.createElement("div",jP(jP({},Zn),{},{ref:t,className:lr(["react-flow",a])}),T.createElement(B2,null,T.createElement(f9,{onInit:v,onMove:m,onMoveStart:y,onMoveEnd:x,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:N,onNodeMouseMove:A,onNodeMouseLeave:L,onNodeContextMenu:B,onNodeDoubleClick:U,nodeTypes:ql,edgeTypes:ms,connectionLineType:$,connectionLineStyle:k,connectionLineComponent:z,connectionLineContainerStyle:re,selectionKeyCode:be,deleteKeyCode:se,multiSelectionKeyCode:_e,zoomActivationKeyCode:fe,onlyRenderVisibleElements:Ue,selectNodesOnDrag:lt,translateExtent:dr,minZoom:Jt,maxZoom:Dt,defaultZoom:jt,defaultPosition:Yn,preventScrolling:ll,zoomOnScroll:dl,zoomOnPinch:hl,zoomOnDoubleClick:ml,panOnScroll:pl,panOnScrollSpeed:vl,panOnScrollMode:gl,panOnDrag:yl,onPaneClick:bl,onPaneScroll:xl,onPaneContextMenu:ls,onSelectionContextMenu:oe,onEdgeUpdate:_l,onEdgeContextMenu:fs,onEdgeDoubleClick:El,onEdgeMouseEnter:Sl,onEdgeMouseMove:Ol,onEdgeMouseLeave:Cl,onEdgeUpdateStart:Rl,onEdgeUpdateEnd:Il,edgeUpdaterRadius:Pl,defaultMarkerColor:os,noDragClassName:Tl,noWheelClassName:hs,noPanClassName:Al,elevateEdgesOnSelect:ji,id:Zn==null?void 0:Zn.id}),T.createElement(mY,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:b,onConnectStart:w,onConnectStop:E,onConnectEnd:_,onClickConnectStart:S,onClickConnectStop:R,onClickConnectEnd:I,nodesDraggable:mt,nodesConnectable:yt,elementsSelectable:rt,minZoom:Jt,maxZoom:Dt,nodeExtent:fl,onNodesChange:Di,onEdgesChange:Nl,snapToGrid:Pe,snapGrid:ze,connectionMode:H,translateExtent:dr,connectOnClick:vs,defaultEdgeOptions:jl,fitView:Ml,fitViewOptions:Dl,onNodesDelete:F,onEdgesDelete:X,onNodeDragStart:j,onNodeDrag:D,onNodeDragStop:G,onSelectionDrag:V,onSelectionDragStart:Q,onSelectionDragStop:ee}),Z&&T.createElement(vY,{onSelectionChange:Z}),wl,T.createElement(eY,{proOptions:Bo,position:gs})))});F2.displayName="ReactFlow";function $2(e){return function(t){var r=T.useState(t),n=Le(r,2),i=n[0],o=n[1],a=T.useCallback(function(u){return o(function(c){return e(u,c)})},[]);return[i,o,a]}}var y9=$2(u2),b9=$2(EK);function qP(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,x=m*v,b=a*(y+x)+c,w=u*(-y+x)+d;return{x:b,y:w}}function kP(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?we.Left:o>=n+r.width-1?we.Right:a<=i+1?we.Top:a>=r.y+r.height-1?we.Bottom:we.Top}function z2(e,t){const r=qP(e,t),n=qP(t,e),i=kP(e,r),o=kP(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const x9=({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}=z2(i,o),c=Bc({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})]})},w9=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=gt(T.useCallback(m=>m.nodeInternals.get(t),[t])),a=gt(T.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}=z2(o,a),v=Bc({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})},LP=172,BP=36,_9={custom:w9},E9=(e,t,r="LR")=>{const n=new EI.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:LP,height:BP})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),EI.layout(n),e.forEach(o=>{const a=n.node(o.id);return o.targetPosition=i?we.Left:we.Top,o.sourcePosition=i?we.Right:we.Bottom,o.position={x:a.x-LP/2,y:a.y-BP/2},o}),{nodes:e,edges:t}},S9=()=>{},O9=({data:e,dict:t,onSelect:r=S9})=>{const{nodes:n,edges:i}=E9(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:we.Right,targetPosition:we.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]=y9(n),[c,d,f]=b9(i);return T.useEffect(()=>{a([...n]),d([...i])},[e]),C.jsx(F2,{nodes:o,edges:c,fitView:!0,onNodesChange:u,onEdgesChange:f,onNodeClick:(h,p)=>{r(p.id)},defaultZoom:.5,edgeTypes:_9,connectionLineComponent:x9,children:C.jsx(JK,{variant:bi.Dots,color:"#81818140",gap:18,size:1})})};var H2=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(H2||{});const U2=e=>{switch(e){case"entityCollection":return J.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return J.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return J.ESubPermissionType.DS_METHOD;case"entity":return J.ESubPermissionType.ENTITY_METHOD;default:return J.EPermissionType.METHOD}},FP=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[H2[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===J.EPermissionType.METHOD&&(c.subType=U2(a.applyTo)),n.push(c)}});return n},C9=(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:J.EPermissionType.SINGLETON_METHOD})});return r};function Lx(e,t=[],r=[],n=[]){const i=FP(r,e,J.EPermissionType.ATTRIBUTE),o=FP(r,e,J.EPermissionType.METHOD),a=C9(n,e),u=t.filter(h=>!e||`ds.${h.name.toLowerCase()}`.includes(e)).map(h=>({applyTo:`ds.${h.name}`,type:J.ESubPermissionType.DS_METHOD})),c=[],d=[];return r.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{c.push({applyTo:h.name,type:J.EPermissionType.DATACLASS})}),n.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{d.push({applyTo:h.name,type:J.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:J.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("."),x=h.find(b=>b.prefix===m);return x?(x.resources=[...x.resources,p].sort((b,w)=>{const E=v.indexOf(b.type),_=v.indexOf(w.type);return E>_?1:-1}),x.type=y?x.type:p.type,[...h].sort((b,w)=>{const E=v.indexOf(b.type),_=v.indexOf(w.type);return E>_?1:-1})):[...h,{prefix:m,type:y?null:p.type,resources:[p]}]},[]).reduce((h,p)=>[...h,...p.resources],[])}const R9=(e=[],t=[],r=[])=>{const n=Lx("",e,t,r),i={ds:{applyTo:"ds",type:J.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===J.EPermissionType.DATACLASS?i.ds.dataClasses.push({applyTo:c,type:J.EPermissionType.DATACLASS,methods:[],attributes:[]}):u.type===J.EPermissionType.SINGLETON&&i.ds.singletons.push({applyTo:c,type:J.EPermissionType.SINGLETON,methods:[],attributes:[]})),d){const f=(h,p,v)=>{h.forEach(m=>{m.applyTo===c&&m[p].push(v)})};[J.ESubPermissionType.DS_METHOD,J.ESubPermissionType.DATACLASS_METHOD,J.ESubPermissionType.ENTITY_METHOD,J.ESubPermissionType.ENTITY_SEL_METHOD].includes(u.type)?c==="ds"?i.ds.methods.push(u):f(i.ds.dataClasses,"methods",u):u.type===J.EPermissionType.ATTRIBUTE?(f(i.ds.dataClasses,"attributes",u),f(i.ds.singletons,"attributes",u)):u.type===J.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},W2=(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===J.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:U2(h)}}return o})}}),r},V2=(e,t)=>Object.entries(e).map(([r,n])=>{const i=n.resources.map(o=>{var d,f,h,p,v,m,y,x;const[a,u]=o.resource.split(".");let c=!0;switch(o.type){case J.EPermissionType.DATASTORE:c=!!t;break;case J.EPermissionType.METHOD:a==="ds"?c=!!t.methods.find(b=>b.name===u&&b.applyTo==="dataStore"):c=!!((f=(d=t.dataClasses[a])==null?void 0:d.methods)!=null&&f.find(b=>b.name===u));break;case J.ESubPermissionType.DS_METHOD:c=!!t.methods.find(b=>b.name===u&&b.applyTo==="dataStore");break;case J.EPermissionType.DATACLASS:c=!!t.dataClasses[a];break;case J.EPermissionType.ATTRIBUTE:c=!!((p=(h=t.dataClasses[a])==null?void 0:h.attributes)!=null&&p.find(b=>b.name===u));break;case J.ESubPermissionType.ENTITY_SEL_METHOD:c=!!((v=t.dataClasses[a])!=null&&v.methods.find(b=>b.name===u&&b.applyTo==="entityCollection"));break;case J.ESubPermissionType.DATACLASS_METHOD:c=!!((m=t.dataClasses[a])!=null&&m.methods.find(b=>b.name===u&&b.applyTo==="dataClass"));break;case J.ESubPermissionType.ENTITY_METHOD:c=!!((y=t.dataClasses[a])!=null&&y.methods.find(b=>b.name===u&&b.applyTo==="entity"));break;case J.EPermissionType.SINGLETON_METHOD:c=!!((x=t.singletons[a])!=null&&x.methods.find(b=>b.name===u));break;case J.EPermissionType.SINGLETON:c=!!t.singletons[a];break;default:c=!0}return{...o,exists:c}});return{[r]:{...n,resources:i}}}).reduce((r,n)=>({...r,...n}),{}),Tm=({child:e,parent:t,status:r,onSelect:n,currentPrivilegeId:i})=>{const o=J.useAppDispatch(),a=J.useAppSelector(J.selectPrivileges);function u(){const d=J.addIn(t.id,e.id,a);o(J.updatePrivileges(d))}function c(){const d=J.removeFrom(t.id,e.id,a);o(J.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"})})})]})},I9=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:i})=>{const o=Object.values(t),a=J.getPrivilegeById(e.id,t);let u=a?J.populateShallow(a.includes,t):[],c=a?J.populateShallow(J.parents(a.id,t),t):[],d=a?J.populateShallow(J.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(Te.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-start justify-start gap-1",children:[u.map(f=>C.jsx(Tm,{child:f,parent:e,status:"included",onSelect:r,currentPrivilegeId:f.id},f.id)),d.map(f=>C.jsx(Tm,{child:f,parent:e,status:"available",onSelect:r,currentPrivilegeId:f.id},f.id)),c.map(f=>C.jsx(Tm,{child:f,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:f.id},f.id))]})]})};function wr(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 G2(e,t=[]){let r=[];function n(o,a){const u=pe.createContext(a),c=r.length;r=[...r,a];const d=h=>{var b;const{scope:p,children:v,...m}=h,y=((b=p==null?void 0:p[e])==null?void 0:b[c])||u,x=pe.useMemo(()=>m,Object.values(m));return C.jsx(y.Provider,{value:x,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=pe.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=>pe.createContext(a));return function(u){const c=(u==null?void 0:u[e])||o;return pe.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return i.scopeName=e,[n,P9(i,...t)]}function P9(...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 pe.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var xi=globalThis!=null&&globalThis.document?pe.useLayoutEffect:()=>{},N9=pe[" useInsertionEffect ".trim().toString()]||xi;function T9({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,a]=A9({defaultProp:t,onChange:r}),u=e!==void 0,c=u?e:i;{const f=pe.useRef(e!==void 0);pe.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=pe.useCallback(f=>{var h;if(u){const p=M9(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 A9({defaultProp:e,onChange:t}){const[r,n]=pe.useState(e),i=pe.useRef(r),o=pe.useRef(t);return N9(()=>{o.current=t},[t]),pe.useEffect(()=>{var a;i.current!==r&&((a=o.current)==null||a.call(o,r),i.current=r)},[r,i]),[r,n,o]}function M9(e){return typeof e=="function"}function $P(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function K2(...e){return t=>{let r=!1;const n=e.map(i=>{const o=$P(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():$P(e[i],null)}}}}function Io(...e){return pe.useCallback(K2(...e),e)}const D9=["top","right","bottom","left"],zn=Math.min,ar=Math.max,Zu=Math.round,pu=Math.floor,rn=e=>({x:e,y:e}),j9={left:"right",right:"left",bottom:"top",top:"bottom"};function Wb(e,t,r){return ar(e,zn(t,r))}function wn(e,t){return typeof e=="function"?e(t):e}function _n(e){return e.split("-")[0]}function Po(e){return e.split("-")[1]}function Bx(e){return e==="x"?"y":"x"}function Fx(e){return e==="y"?"height":"width"}function Qr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function $x(e){return Bx(Qr(e))}function q9(e,t,r){r===void 0&&(r=!1);const n=Po(e),i=$x(e),o=Fx(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Ju(a)),[a,Ju(a)]}function k9(e){const t=Ju(e);return[Vb(e),t,Vb(t)]}function Vb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const zP=["left","right"],HP=["right","left"],L9=["top","bottom"],B9=["bottom","top"];function F9(e,t,r){switch(e){case"top":case"bottom":return r?t?HP:zP:t?zP:HP;case"left":case"right":return t?L9:B9;default:return[]}}function $9(e,t,r,n){const i=Po(e);let o=F9(_n(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Vb)))),o}function Ju(e){const t=_n(e);return j9[t]+e.slice(t.length)}function z9(e){return{top:0,right:0,bottom:0,left:0,...e}}function Y2(e){return typeof e!="number"?z9(e):{top:e,right:e,bottom:e,left:e}}function Qu(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 UP(e,t,r){let{reference:n,floating:i}=e;const o=Qr(t),a=$x(t),u=Fx(a),c=_n(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(Po(t)){case"start":v[a]-=p*(r&&d?-1:1);break;case"end":v[a]+=p*(r&&d?-1:1);break}return v}async function H9(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}=wn(t,e),m=Y2(v),x=u[p?h==="floating"?"reference":"floating":h],b=Qu(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.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,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),_=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},S=Qu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:E,strategy:c}):w);return{top:(b.top-S.top+m.top)/_.y,bottom:(S.bottom-b.bottom+m.bottom)/_.y,left:(b.left-S.left+m.left)/_.x,right:(S.right-b.right+m.right)/_.x}}const U9=50,W9=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=a.detectOverflow?a:{...a,detectOverflow:H9},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}=UP(d,n,c),p=n,v=0;const m={};for(let y=0;y<o.length;y++){const x=o[y];if(!x)continue;const{name:b,fn:w}=x,{x:E,y:_,data:S,reset:R}=await w({x:f,y:h,initialPlacement:n,placement:p,strategy:i,middlewareData:m,rects:d,platform:u,elements:{reference:e,floating:t}});f=E??f,h=_??h,m[b]={...m[b],...S},R&&v<U9&&(v++,typeof R=="object"&&(R.placement&&(p=R.placement),R.rects&&(d=R.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):R.rects),{x:f,y:h}=UP(d,p,c)),y=-1)}return{x:f,y:h,placement:p,strategy:i,middlewareData:m}},V9=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}=wn(e,t)||{};if(d==null)return{};const h=Y2(f),p={x:r,y:n},v=$x(i),m=Fx(v),y=await a.getDimensions(d),x=v==="y",b=x?"top":"left",w=x?"bottom":"right",E=x?"clientHeight":"clientWidth",_=o.reference[m]+o.reference[v]-p[v]-o.floating[m],S=p[v]-o.reference[v],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let I=R?R[E]:0;(!I||!await(a.isElement==null?void 0:a.isElement(R)))&&(I=u.floating[E]||o.floating[m]);const N=_/2-S/2,A=I/2-y[m]/2-1,L=zn(h[b],A),B=zn(h[w],A),U=L,j=I-y[m]-B,D=I/2-y[m]/2+N,G=Wb(U,D,j),F=!c.arrow&&Po(i)!=null&&D!==G&&o.reference[m]/2-(D<U?L:B)-y[m]/2<0,X=F?D<U?D-U:D-j:0;return{[v]:p[v]+X,data:{[v]:G,centerOffset:D-G-X,...F&&{alignmentOffset:X}},reset:F}}}),G9=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,...x}=wn(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const b=_n(i),w=Qr(u),E=_n(u)===u,_=await(c.isRTL==null?void 0:c.isRTL(d.floating)),S=p||(E||!y?[Ju(u)]:k9(u)),R=m!=="none";!p&&R&&S.push(...$9(u,y,m,_));const I=[u,...S],N=await c.detectOverflow(t,x),A=[];let L=((n=o.flip)==null?void 0:n.overflows)||[];if(f&&A.push(N[b]),h){const D=q9(i,a,_);A.push(N[D[0]],N[D[1]])}if(L=[...L,{placement:i,overflows:A}],!A.every(D=>D<=0)){var B,U;const D=(((B=o.flip)==null?void 0:B.index)||0)+1,G=I[D];if(G&&(!(h==="alignment"?w!==Qr(G):!1)||L.every(Z=>Qr(Z.placement)===w?Z.overflows[0]>0:!0)))return{data:{index:D,overflows:L},reset:{placement:G}};let F=(U=L.filter(X=>X.overflows[0]<=0).sort((X,Z)=>X.overflows[1]-Z.overflows[1])[0])==null?void 0:U.placement;if(!F)switch(v){case"bestFit":{var j;const X=(j=L.filter(Z=>{if(R){const Q=Qr(Z.placement);return Q===w||Q==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(Q=>Q>0).reduce((Q,V)=>Q+V,0)]).sort((Z,Q)=>Z[1]-Q[1])[0])==null?void 0:j[0];X&&(F=X);break}case"initialPlacement":F=u;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function WP(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function VP(e){return D9.some(t=>e[t]>=0)}const K9=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...o}=wn(e,t);switch(i){case"referenceHidden":{const a=await n.detectOverflow(t,{...o,elementContext:"reference"}),u=WP(a,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:VP(u)}}}case"escaped":{const a=await n.detectOverflow(t,{...o,altBoundary:!0}),u=WP(a,r.floating);return{data:{escapedOffsets:u,escaped:VP(u)}}}default:return{}}}}},X2=new Set(["left","top"]);async function Y9(e,t){const{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=_n(r),u=Po(r),c=Qr(r)==="y",d=X2.has(a)?-1:1,f=o&&c?-1:1,h=wn(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 X9=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 Y9(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}}}}},Z9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:u=!1,limiter:c={fn:b=>{let{x:w,y:E}=b;return{x:w,y:E}}},...d}=wn(e,t),f={x:r,y:n},h=await o.detectOverflow(t,d),p=Qr(_n(i)),v=Bx(p);let m=f[v],y=f[p];if(a){const b=v==="y"?"top":"left",w=v==="y"?"bottom":"right",E=m+h[b],_=m-h[w];m=Wb(E,m,_)}if(u){const b=p==="y"?"top":"left",w=p==="y"?"bottom":"right",E=y+h[b],_=y-h[w];y=Wb(E,y,_)}const x=c.fn({...t,[v]:m,[p]:y});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[v]:a,[p]:u}}}}}},J9=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}=wn(e,t),f={x:r,y:n},h=Qr(i),p=Bx(h);let v=f[p],m=f[h];const y=wn(u,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const E=p==="y"?"height":"width",_=o.reference[p]-o.floating[E]+x.mainAxis,S=o.reference[p]+o.reference[E]-x.mainAxis;v<_?v=_:v>S&&(v=S)}if(d){var b,w;const E=p==="y"?"width":"height",_=X2.has(_n(i)),S=o.reference[h]-o.floating[E]+(_&&((b=a.offset)==null?void 0:b[h])||0)+(_?0:x.crossAxis),R=o.reference[h]+o.reference[E]+(_?0:((w=a.offset)==null?void 0:w[h])||0)-(_?x.crossAxis:0);m<S?m=S:m>R&&(m=R)}return{[p]:v,[h]:m}}}},Q9=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}=wn(e,t),f=await a.detectOverflow(t,d),h=_n(i),p=Po(i),v=Qr(i)==="y",{width:m,height:y}=o.floating;let x,b;h==="top"||h==="bottom"?(x=h,b=p===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(b=h,x=p==="end"?"top":"bottom");const w=y-f.top-f.bottom,E=m-f.left-f.right,_=zn(y-f[x],w),S=zn(m-f[b],E),R=!t.middlewareData.shift;let I=_,N=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=E),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(I=w),R&&!p){const L=ar(f.left,0),B=ar(f.right,0),U=ar(f.top,0),j=ar(f.bottom,0);v?N=m-2*(L!==0||B!==0?L+B:ar(f.left,f.right)):I=y-2*(U!==0||j!==0?U+j:ar(f.top,f.bottom))}await c({...t,availableWidth:N,availableHeight:I});const A=await a.getDimensions(u.floating);return m!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function Fc(){return typeof window<"u"}function No(e){return Z2(e)?(e.nodeName||"").toLowerCase():"#document"}function sr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sn(e){var t;return(t=(Z2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Z2(e){return Fc()?e instanceof Node||e instanceof sr(e).Node:!1}function $r(e){return Fc()?e instanceof Element||e instanceof sr(e).Element:!1}function On(e){return Fc()?e instanceof HTMLElement||e instanceof sr(e).HTMLElement:!1}function GP(e){return!Fc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof sr(e).ShadowRoot}function Qa(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=zr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function e7(e){return/^(table|td|th)$/.test(No(e))}function $c(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const t7=/transform|translate|scale|rotate|perspective|filter/,r7=/paint|layout|strict|content/,si=e=>!!e&&e!=="none";let Am;function zx(e){const t=$r(e)?zr(e):e;return si(t.transform)||si(t.translate)||si(t.scale)||si(t.rotate)||si(t.perspective)||!Hx()&&(si(t.backdropFilter)||si(t.filter))||t7.test(t.willChange||"")||r7.test(t.contain||"")}function n7(e){let t=Hn(e);for(;On(t)&&!_o(t);){if(zx(t))return t;if($c(t))return null;t=Hn(t)}return null}function Hx(){return Am==null&&(Am=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Am}function _o(e){return/^(html|body|#document)$/.test(No(e))}function zr(e){return sr(e).getComputedStyle(e)}function zc(e){return $r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hn(e){if(No(e)==="html")return e;const t=e.assignedSlot||e.parentNode||GP(e)&&e.host||sn(e);return GP(t)?t.host:t}function J2(e){const t=Hn(e);return _o(t)?e.ownerDocument?e.ownerDocument.body:e.body:On(t)&&Qa(t)?t:J2(t)}function za(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=J2(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=sr(i);if(o){const u=Gb(a);return t.concat(a,a.visualViewport||[],Qa(i)?i:[],u&&r?za(u):[])}else return t.concat(i,za(i,[],r))}function Gb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Q2(e){const t=zr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=On(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,u=Zu(r)!==o||Zu(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function Ux(e){return $r(e)?e:e.contextElement}function lo(e){const t=Ux(e);if(!On(t))return rn(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=Q2(t);let a=(o?Zu(r.width):r.width)/n,u=(o?Zu(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const i7=rn(0);function eq(e){const t=sr(e);return!Hx()||!t.visualViewport?i7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function o7(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==sr(e)?!1:t}function wi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=Ux(e);let a=rn(1);t&&(n?$r(n)&&(a=lo(n)):a=lo(e));const u=o7(o,r,n)?eq(o):rn(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=sr(o),v=n&&$r(n)?sr(n):n;let m=p,y=Gb(m);for(;y&&n&&v!==m;){const x=lo(y),b=y.getBoundingClientRect(),w=zr(y),E=b.left+(y.clientLeft+parseFloat(w.paddingLeft))*x.x,_=b.top+(y.clientTop+parseFloat(w.paddingTop))*x.y;c*=x.x,d*=x.y,f*=x.x,h*=x.y,c+=E,d+=_,m=sr(y),y=Gb(m)}}return Qu({width:f,height:h,x:c,y:d})}function Hc(e,t){const r=zc(e).scrollLeft;return t?t.left+r:wi(sn(e)).left+r}function tq(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Hc(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function a7(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o=i==="fixed",a=sn(n),u=t?$c(t.floating):!1;if(n===a||u&&o)return r;let c={scrollLeft:0,scrollTop:0},d=rn(1);const f=rn(0),h=On(n);if((h||!h&&!o)&&((No(n)!=="body"||Qa(a))&&(c=zc(n)),h)){const v=wi(n);d=lo(n),f.x=v.x+n.clientLeft,f.y=v.y+n.clientTop}const p=a&&!h&&!o?tq(a,c):rn(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 s7(e){return Array.from(e.getClientRects())}function u7(e){const t=sn(e),r=zc(e),n=e.ownerDocument.body,i=ar(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ar(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Hc(e);const u=-r.scrollTop;return zr(n).direction==="rtl"&&(a+=ar(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}const KP=25;function c7(e,t){const r=sr(e),n=sn(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=Hx();(!f||f&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const d=Hc(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<=KP&&(o-=m)}else d<=KP&&(o+=d);return{width:o,height:a,x:u,y:c}}function l7(e,t){const r=wi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=On(e)?lo(e):rn(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 YP(e,t,r){let n;if(t==="viewport")n=c7(e,r);else if(t==="document")n=u7(sn(e));else if($r(t))n=l7(t,r);else{const i=eq(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Qu(n)}function rq(e,t){const r=Hn(e);return r===t||!$r(r)||_o(r)?!1:zr(r).position==="fixed"||rq(r,t)}function f7(e,t){const r=t.get(e);if(r)return r;let n=za(e,[],!1).filter(u=>$r(u)&&No(u)!=="body"),i=null;const o=zr(e).position==="fixed";let a=o?Hn(e):e;for(;$r(a)&&!_o(a);){const u=zr(a),c=zx(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Qa(a)&&!c&&rq(e,a))?n=n.filter(f=>f!==a):i=u,a=Hn(a)}return t.set(e,n),n}function d7(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const a=[...r==="clippingAncestors"?$c(t)?[]:f7(t,this._c):[].concat(r),n],u=YP(t,a[0],i);let c=u.top,d=u.right,f=u.bottom,h=u.left;for(let p=1;p<a.length;p++){const v=YP(t,a[p],i);c=ar(v.top,c),d=zn(v.right,d),f=zn(v.bottom,f),h=ar(v.left,h)}return{width:d-h,height:f-c,x:h,y:c}}function h7(e){const{width:t,height:r}=Q2(e);return{width:t,height:r}}function p7(e,t,r){const n=On(t),i=sn(t),o=r==="fixed",a=wi(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=rn(0);function d(){c.x=Hc(i)}if(n||!n&&!o)if((No(t)!=="body"||Qa(i))&&(u=zc(t)),n){const v=wi(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?tq(i,u):rn(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 Mm(e){return zr(e).position==="static"}function XP(e,t){if(!On(e)||zr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return sn(e)===r&&(r=r.ownerDocument.body),r}function nq(e,t){const r=sr(e);if($c(e))return r;if(!On(e)){let i=Hn(e);for(;i&&!_o(i);){if($r(i)&&!Mm(i))return i;i=Hn(i)}return r}let n=XP(e,t);for(;n&&e7(n)&&Mm(n);)n=XP(n,t);return n&&_o(n)&&Mm(n)&&!zx(n)?r:n||n7(e)||r}const v7=async function(e){const t=this.getOffsetParent||nq,r=this.getDimensions,n=await r(e.floating);return{reference:p7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function g7(e){return zr(e).direction==="rtl"}const m7={convertOffsetParentRelativeRectToViewportRelativeRect:a7,getDocumentElement:sn,getClippingRect:d7,getOffsetParent:nq,getElementRects:v7,getClientRects:s7,getDimensions:h7,getScale:lo,isElement:$r,isRTL:g7};function iq(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function y7(e,t){let r=null,n;const i=sn(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=pu(h),y=pu(i.clientWidth-(f+p)),x=pu(i.clientHeight-(h+v)),b=pu(f),E={rootMargin:-m+"px "+-y+"px "+-x+"px "+-b+"px",threshold:ar(0,zn(1,c))||1};let _=!0;function S(R){const I=R[0].intersectionRatio;if(I!==c){if(!_)return a();I?a(!1,I):n=setTimeout(()=>{a(!1,1e-7)},1e3)}I===1&&!iq(d,e.getBoundingClientRect())&&a(),_=!1}try{r=new IntersectionObserver(S,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,E)}r.observe(e)}return a(!0),o}function b7(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=Ux(e),f=i||o?[...d?za(d):[],...t?za(t):[]]:[];f.forEach(b=>{i&&b.addEventListener("scroll",r,{passive:!0}),o&&b.addEventListener("resize",r)});const h=d&&u?y7(d,r):null;let p=-1,v=null;a&&(v=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&v&&t&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var E;(E=v)==null||E.observe(t)})),r()}),d&&!c&&v.observe(d),t&&v.observe(t));let m,y=c?wi(e):null;c&&x();function x(){const b=wi(e);y&&!iq(y,b)&&r(),y=b,m=requestAnimationFrame(x)}return r(),()=>{var b;f.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),h==null||h(),(b=v)==null||b.disconnect(),v=null,c&&cancelAnimationFrame(m)}}const x7=X9,w7=Z9,_7=G9,E7=Q9,S7=K9,ZP=V9,O7=J9,C7=(e,t,r)=>{const n=new Map,i={platform:m7,...r},o={...i.platform,_c:n};return W9(e,t,{...i,platform:o})};var R7=typeof document<"u",I7=function(){},Au=R7?T.useLayoutEffect:I7;function ec(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(!ec(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)&&!ec(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function oq(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function JP(e,t){const r=oq(e);return Math.round(t*r)/r}function Dm(e){const t=pe.useRef(e);return Au(()=>{t.current=e}),t}function P7(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]=pe.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,v]=pe.useState(n);ec(p,n)||v(n);const[m,y]=pe.useState(null),[x,b]=pe.useState(null),w=pe.useCallback(Z=>{Z!==R.current&&(R.current=Z,y(Z))},[]),E=pe.useCallback(Z=>{Z!==I.current&&(I.current=Z,b(Z))},[]),_=o||m,S=a||x,R=pe.useRef(null),I=pe.useRef(null),N=pe.useRef(f),A=c!=null,L=Dm(c),B=Dm(i),U=Dm(d),j=pe.useCallback(()=>{if(!R.current||!I.current)return;const Z={placement:t,strategy:r,middleware:p};B.current&&(Z.platform=B.current),C7(R.current,I.current,Z).then(Q=>{const V={...Q,isPositioned:U.current!==!1};D.current&&!ec(N.current,V)&&(N.current=V,ex.flushSync(()=>{h(V)}))})},[p,t,r,B,U]);Au(()=>{d===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(Z=>({...Z,isPositioned:!1})))},[d]);const D=pe.useRef(!1);Au(()=>(D.current=!0,()=>{D.current=!1}),[]),Au(()=>{if(_&&(R.current=_),S&&(I.current=S),_&&S){if(L.current)return L.current(_,S,j);j()}},[_,S,j,L,A]);const G=pe.useMemo(()=>({reference:R,floating:I,setReference:w,setFloating:E}),[w,E]),F=pe.useMemo(()=>({reference:_,floating:S}),[_,S]),X=pe.useMemo(()=>{const Z={position:r,left:0,top:0};if(!F.floating)return Z;const Q=JP(F.floating,f.x),V=JP(F.floating,f.y);return u?{...Z,transform:"translate("+Q+"px, "+V+"px)",...oq(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Q,top:V}},[r,u,F.floating,f.x,f.y]);return pe.useMemo(()=>({...f,update:j,refs:G,elements:F,floatingStyles:X}),[f,j,G,F,X])}const N7=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?ZP({element:n.current,padding:i}).fn(r):{}:n?ZP({element:n,padding:i}).fn(r):{}}}},T7=(e,t)=>{const r=x7(e);return{name:r.name,fn:r.fn,options:[e,t]}},A7=(e,t)=>{const r=w7(e);return{name:r.name,fn:r.fn,options:[e,t]}},M7=(e,t)=>({fn:O7(e).fn,options:[e,t]}),D7=(e,t)=>{const r=_7(e);return{name:r.name,fn:r.fn,options:[e,t]}},j7=(e,t)=>{const r=E7(e);return{name:r.name,fn:r.fn,options:[e,t]}},q7=(e,t)=>{const r=S7(e);return{name:r.name,fn:r.fn,options:[e,t]}},k7=(e,t)=>{const r=N7(e);return{name:r.name,fn:r.fn,options:[e,t]}};function L7(e){const t=B7(e),r=pe.forwardRef((n,i)=>{const{children:o,...a}=n,u=pe.Children.toArray(o),c=u.find($7);if(c){const d=c.props.children,f=u.map(h=>h===c?pe.Children.count(d)>1?pe.Children.only(null):pe.isValidElement(d)?d.props.children:null:h);return C.jsx(t,{...a,ref:i,children:pe.isValidElement(d)?pe.cloneElement(d,void 0,f):null})}return C.jsx(t,{...a,ref:i,children:o})});return r.displayName=`${e}.Slot`,r}function B7(e){const t=pe.forwardRef((r,n)=>{const{children:i,...o}=r;if(pe.isValidElement(i)){const a=H7(i),u=z7(o,i.props);return i.type!==pe.Fragment&&(u.ref=n?K2(n,a):a),pe.cloneElement(i,u)}return pe.Children.count(i)>1?pe.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var F7=Symbol("radix.slottable");function $7(e){return pe.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===F7}function z7(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 H7(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 U7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ri=U7.reduce((e,t)=>{const r=L7(`Primitive.${t}`),n=pe.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 W7(e,t){e&&ex.flushSync(()=>e.dispatchEvent(t))}var V7="Arrow",aq=pe.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...o}=e;return C.jsx(Ri.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"})})});aq.displayName=V7;var G7=aq;function Uc(e){const t=pe.useRef(e);return pe.useEffect(()=>{t.current=e}),pe.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function K7(e){const[t,r]=pe.useState(void 0);return xi(()=>{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 Wx="Popper",[sq,uq]=G2(Wx),[Y7,cq]=sq(Wx),lq=e=>{const{__scopePopper:t,children:r}=e,[n,i]=pe.useState(null);return C.jsx(Y7,{scope:t,anchor:n,onAnchorChange:i,children:r})};lq.displayName=Wx;var fq="PopperAnchor",dq=pe.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,o=cq(fq,r),a=pe.useRef(null),u=Io(t,a),c=pe.useRef(null);return pe.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(Ri.div,{...i,ref:u})});dq.displayName=fq;var Vx="PopperContent",[X7,Z7]=sq(Vx),hq=pe.forwardRef((e,t)=>{var k,z,re,ie,se,ce;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,x=cq(Vx,r),[b,w]=pe.useState(null),E=Io(t,be=>w(be)),[_,S]=pe.useState(null),R=K7(_),I=(R==null?void 0:R.width)??0,N=(R==null?void 0:R.height)??0,A=n+(o!=="center"?"-"+o:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},B=Array.isArray(d)?d:[d],U=B.length>0,j={padding:L,boundary:B.filter(Q7),altBoundary:U},{refs:D,floatingStyles:G,placement:F,isPositioned:X,middlewareData:Z}=P7({strategy:"fixed",placement:A,whileElementsMounted:(...be)=>b7(...be,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[T7({mainAxis:i+N,alignmentAxis:a}),c&&A7({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?M7():void 0,...j}),c&&D7({...j}),j7({...j,apply:({elements:be,rects:Ce,availableWidth:_e,availableHeight:he})=>{const{width:fe,height:Ee}=Ce.reference,Pe=be.floating.style;Pe.setProperty("--radix-popper-available-width",`${_e}px`),Pe.setProperty("--radix-popper-available-height",`${he}px`),Pe.setProperty("--radix-popper-anchor-width",`${fe}px`),Pe.setProperty("--radix-popper-anchor-height",`${Ee}px`)}}),_&&k7({element:_,padding:u}),eX({arrowWidth:I,arrowHeight:N}),p&&q7({strategy:"referenceHidden",...j})]}),[Q,V]=gq(F),ee=Uc(m);xi(()=>{X&&(ee==null||ee())},[X,ee]);const oe=(k=Z.arrow)==null?void 0:k.x,ae=(z=Z.arrow)==null?void 0:z.y,H=((re=Z.arrow)==null?void 0:re.centerOffset)!==0,[K,$]=pe.useState();return xi(()=>{b&&$(window.getComputedStyle(b).zIndex)},[b]),C.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:X?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(ie=Z.transformOrigin)==null?void 0:ie.x,(se=Z.transformOrigin)==null?void 0:se.y].join(" "),...((ce=Z.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(X7,{scope:r,placedSide:Q,onArrowChange:S,arrowX:oe,arrowY:ae,shouldHideArrow:H,children:C.jsx(Ri.div,{"data-side":Q,"data-align":V,...y,ref:E,style:{...y.style,animation:X?void 0:"none"}})})})});hq.displayName=Vx;var pq="PopperArrow",J7={top:"bottom",right:"left",bottom:"top",left:"right"},vq=pe.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,o=Z7(pq,n),a=J7[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(G7,{...i,ref:r,style:{...i.style,display:"block"}})})});vq.displayName=pq;function Q7(e){return e!==null}var eX=e=>({name:"transformOrigin",options:e,fn(t){var x,b,w;const{placement:r,rects:n,middlewareData:i}=t,a=((x=i.arrow)==null?void 0:x.centerOffset)!==0,u=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[d,f]=gq(r),h={start:"0%",center:"50%",end:"100%"}[f],p=(((b=i.arrow)==null?void 0:b.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 gq(e){const[t,r="center"]=e.split("-");return[t,r]}var tX=lq,rX=dq,nX=hq,iX=vq,oX="Portal",mq=pe.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=pe.useState(!1);xi(()=>o(!0),[]);const a=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?Qb.createPortal(C.jsx(Ri.div,{...n,ref:t}),a):null});mq.displayName=oX;function aX(e,t){return pe.useReducer((r,n)=>t[r][n]??r,e)}var Gx=e=>{const{present:t,children:r}=e,n=sX(t),i=typeof r=="function"?r({present:n.isPresent}):pe.Children.only(r),o=Io(n.ref,uX(i));return typeof r=="function"||n.isPresent?pe.cloneElement(i,{ref:o}):null};Gx.displayName="Presence";function sX(e){const[t,r]=pe.useState(),n=pe.useRef(null),i=pe.useRef(e),o=pe.useRef("none"),a=e?"mounted":"unmounted",[u,c]=aX(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return pe.useEffect(()=>{const d=vu(n.current);o.current=u==="mounted"?d:"none"},[u]),xi(()=>{const d=n.current,f=i.current;if(f!==e){const p=o.current,v=vu(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]),xi(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=v=>{const y=vu(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&y&&(c("ANIMATION_END"),!i.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=v=>{v.target===t&&(o.current=vu(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:pe.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function vu(e){return(e==null?void 0:e.animationName)||"none"}function uX(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 cX(e,t=globalThis==null?void 0:globalThis.document){const r=Uc(e);pe.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 lX="DismissableLayer",Kb="dismissableLayer.update",fX="dismissableLayer.pointerDownOutside",dX="dismissableLayer.focusOutside",QP,yq=pe.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bq=pe.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...c}=e,d=pe.useContext(yq),[f,h]=pe.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=pe.useState({}),m=Io(t,I=>h(I)),y=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(x),w=f?y.indexOf(f):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,_=w>=b,S=vX(I=>{const N=I.target,A=[...d.branches].some(L=>L.contains(N));!_||A||(i==null||i(I),a==null||a(I),I.defaultPrevented||u==null||u())},p),R=gX(I=>{const N=I.target;[...d.branches].some(L=>L.contains(N))||(o==null||o(I),a==null||a(I),I.defaultPrevented||u==null||u())},p);return cX(I=>{w===d.layers.size-1&&(n==null||n(I),!I.defaultPrevented&&u&&(I.preventDefault(),u()))},p),pe.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(QP=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),eN(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=QP)}},[f,p,r,d]),pe.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),eN())},[f,d]),pe.useEffect(()=>{const I=()=>v({});return document.addEventListener(Kb,I),()=>document.removeEventListener(Kb,I)},[]),C.jsx(Ri.div,{...c,ref:m,style:{pointerEvents:E?_?"auto":"none":void 0,...e.style},onFocusCapture:wr(e.onFocusCapture,R.onFocusCapture),onBlurCapture:wr(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:wr(e.onPointerDownCapture,S.onPointerDownCapture)})});bq.displayName=lX;var hX="DismissableLayerBranch",pX=pe.forwardRef((e,t)=>{const r=pe.useContext(yq),n=pe.useRef(null),i=Io(t,n);return pe.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),C.jsx(Ri.div,{...e,ref:i})});pX.displayName=hX;function vX(e,t=globalThis==null?void 0:globalThis.document){const r=Uc(e),n=pe.useRef(!1),i=pe.useRef(()=>{});return pe.useEffect(()=>{const o=u=>{if(u.target&&!n.current){let c=function(){xq(fX,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 gX(e,t=globalThis==null?void 0:globalThis.document){const r=Uc(e),n=pe.useRef(!1);return pe.useEffect(()=>{const i=o=>{o.target&&!n.current&&xq(dX,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 eN(){const e=new CustomEvent(Kb);document.dispatchEvent(e)}function xq(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?W7(i,o):i.dispatchEvent(o)}var jm,Wc="HoverCard",[wq]=G2(Wc,[uq]),Vc=uq(),[mX,Gc]=wq(Wc),_q=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:i,onOpenChange:o,openDelay:a=700,closeDelay:u=300}=e,c=Vc(t),d=pe.useRef(0),f=pe.useRef(0),h=pe.useRef(!1),p=pe.useRef(!1),[v,m]=T9({prop:n,defaultProp:i??!1,onChange:o,caller:Wc}),y=pe.useCallback(()=>{clearTimeout(f.current),d.current=window.setTimeout(()=>m(!0),a)},[a,m]),x=pe.useCallback(()=>{clearTimeout(d.current),!h.current&&!p.current&&(f.current=window.setTimeout(()=>m(!1),u))},[u,m]),b=pe.useCallback(()=>m(!1),[m]);return pe.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(f.current)},[]),C.jsx(mX,{scope:t,open:v,onOpenChange:m,onOpen:y,onClose:x,onDismiss:b,hasSelectionRef:h,isPointerDownOnContentRef:p,children:C.jsx(tX,{...c,children:r})})};_q.displayName=Wc;var Eq="HoverCardTrigger",Sq=pe.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Gc(Eq,r),o=Vc(r);return C.jsx(rX,{asChild:!0,...o,children:C.jsx(Ri.a,{"data-state":i.open?"open":"closed",...n,ref:t,onPointerEnter:wr(e.onPointerEnter,rc(i.onOpen)),onPointerLeave:wr(e.onPointerLeave,rc(i.onClose)),onFocus:wr(e.onFocus,i.onOpen),onBlur:wr(e.onBlur,i.onClose),onTouchStart:wr(e.onTouchStart,a=>a.preventDefault())})})});Sq.displayName=Eq;var Kx="HoverCardPortal",[yX,bX]=wq(Kx,{forceMount:void 0}),Oq=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:i}=e,o=Gc(Kx,t);return C.jsx(yX,{scope:t,forceMount:r,children:C.jsx(Gx,{present:r||o.open,children:C.jsx(mq,{asChild:!0,container:i,children:n})})})};Oq.displayName=Kx;var tc="HoverCardContent",Cq=pe.forwardRef((e,t)=>{const r=bX(tc,e.__scopeHoverCard),{forceMount:n=r.forceMount,...i}=e,o=Gc(tc,e.__scopeHoverCard);return C.jsx(Gx,{present:n||o.open,children:C.jsx(xX,{"data-state":o.open?"open":"closed",...i,onPointerEnter:wr(e.onPointerEnter,rc(o.onOpen)),onPointerLeave:wr(e.onPointerLeave,rc(o.onClose)),ref:t})})});Cq.displayName=tc;var xX=pe.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,...u}=e,c=Gc(tc,r),d=Vc(r),f=pe.useRef(null),h=Io(t,f),[p,v]=pe.useState(!1);return pe.useEffect(()=>{if(p){const m=document.body;return jm=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=jm,m.style.webkitUserSelect=jm}}},[p]),pe.useEffect(()=>{if(f.current){const m=()=>{v(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var x;((x=document.getSelection())==null?void 0:x.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]),pe.useEffect(()=>{f.current&&EX(f.current).forEach(y=>y.setAttribute("tabindex","-1"))}),C.jsx(bq,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:wr(o,m=>{m.preventDefault()}),onDismiss:c.onDismiss,children:C.jsx(nX,{...d,...u,onPointerDown:wr(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)"}})})}),wX="HoverCardArrow",_X=pe.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Vc(r);return C.jsx(iX,{...i,...n,ref:t})});_X.displayName=wX;function rc(e){return t=>t.pointerType==="touch"?void 0:e()}function EX(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 Yx=_q,Xx=Sq,Lr=Oq,Br=Cq;const SX=({item:e,depth:t})=>{const[r,n]=T.useState(!1),i=J.useAppSelector(J.selectPrivileges),o=J.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(Rq,{depth:t+1,data:o})})]})},Rq=({data:e,depth:t=0})=>e.map(r=>r.includes.length?C.jsx(SX,{item:r,depth:t},r.id):C.jsx("div",{className:Ve("py-1 text-xs text-white",{}),children:r.privilege},r.id)),Bt=()=>document.querySelector(`.${yD.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,Kc=({container:e,...t})=>C.jsx(Te.Portal,{...t,container:e||Bt()}),tN=Yx,rN=Xx,nN=({privilege:e,selectedPrivilege:t,onSelect:r,isGuest:n=!1})=>{const i=J.useAppDispatch(),o=J.useAppSelector(J.selectPrivileges),a=J.populateShallow(e.includes,o),[u,c]=T.useState(!1),[d,f]=T.useState(e.privilege),[h,p]=T.useState(null),v=Te.useOutsideClick(()=>{u&&x()});Te.useDidMountEffect(()=>{e.privilege!==d&&f(e.privilege)},[e.privilege]);function m(){c(!0),p(null)}function y(){c(!1),f(e.privilege)}function x(){p(null);try{Te.validateName(d);const E=J.rename(d,e.id,o);i(J.updatePrivileges(E)),c(!1)}catch(E){p(E.message)}}const b=async E=>{E.stopPropagation();const{confirmed:_}=await i(J.openModal({title:"Delete Privilege",type:Te.ModalType.CONFIRM,color:Te.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"})).unwrap();if(_){const S=J.remove(e.id,o);if((t==null?void 0:t.id)!==e.id){i(J.updatePrivileges(S));return}const R=Object.keys(S).filter(I=>S[I].privilege!=="guest");if(R.length===0)r(null);else{const I=Object.keys(o).filter(B=>o[B].privilege!=="guest"),N=I.indexOf(e.id),A=Math.max(0,N-1),L=I[A];N===0?r(S[R[0]]):S[L]?r(S[L]):r(S[R[0]])}i(J.updatePrivileges(S))}},w=T.useMemo(()=>e.resources.some(E=>E.exists===!1),[e]);return C.jsxs(tN,{openDelay:0,closeDelay:0,children:[C.jsx(rN,{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 mr-2",children:[C.jsx("input",{autoFocus:!0,onKeyDown:E=>{E.key==="Enter"&&x(),E.key==="Escape"&&y()},type:"text",className:Ve("absolute inset-0 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:outline-none",{"border-b border-red-400 rounded-b-none":h,"focus:border-primary-dark":!h}),value:d,onChange:E=>f(E.target.value)}),h&&C.jsx("p",{className:"absolute top-5 mt-1 w-full rounded rounded-t-none 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(tN,{openDelay:0,closeDelay:0,children:[C.jsx(rN,{asChild:!0,children:C.jsx("span",{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-grey-50"})})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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:x,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:b,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(Rq,{data:a})}):null]})}),C.jsx(Lr,{container:Bt(),children:C.jsxs(Br,{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"})]})})]})},OX=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=J.useAppSelector(J.selectGuestPrivilege),i=J.useAppSelector(J.selectCatalog),o=T.useMemo(()=>{if(i===null||!n)return n;const a=W2({guest:n},Object.values((i==null?void 0:i.dataClasses)??{}));return V2(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(nN,{privilege:o,onSelect:t,selectedPrivilege:r,isGuest:!0}):null,Object.entries(e).length?Object.entries(e).filter(([,a])=>a.privilege!=="guest").sort(([,a],[,u])=>Te.localeCompare(a.privilege,u.privilege)).map(([a,u])=>C.jsx(nN,{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"})]})]})})})]})};function Qi(e,t,r){let n=r.initialDeps??[],i,o=!0;function a(){var u,c,d;let f;r.key&&((u=r.debug)!=null&&u.call(r))&&(f=Date.now());const h=e();if(!(h.length!==n.length||h.some((m,y)=>n[y]!==m)))return i;n=h;let v;if(r.key&&((c=r.debug)!=null&&c.call(r))&&(v=Date.now()),i=t(...h),r.key&&((d=r.debug)!=null&&d.call(r))){const m=Math.round((Date.now()-f)*100)/100,y=Math.round((Date.now()-v)*100)/100,x=y/16,b=(w,E)=>{for(w=String(w);w.length<E;)w=" "+w;return w};console.info(`%c⏱ ${b(y,5)} /${b(m,5)} ms`,`
|
|
5
|
+
*/var K1;function pH(){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})()})(Qf)),Qf.exports}var vH=pH();const We=Vn(vH);function gH({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:We(" 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:We(" 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(Te.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(Te.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(Te.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(Te.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const ID=T.createContext(void 0),mH=({children:e})=>{const[t,r]=T.useState(null),[n,i]=T.useState(null);function o(u){r(u),setTimeout(()=>i(u),0)}const a={selectedRole:t,deferredSelectedRole:n,selectRole:o};return C.jsx(ID.Provider,{value:a,children:e})};function ox(){const e=T.useContext(ID);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var Y1=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},X1=typeof window<"u"&&window.document&&window.document.createElement?ve.useLayoutEffect:ve.useEffect,Gt="top",Sr="bottom",Or="right",Kt="left",ax="auto",Ka=[Gt,Sr,Or,Kt],yo="start",La="end",yH="clippingParents",PD="viewport",oa="popper",bH="reference",Z1=Ka.reduce(function(e,t){return e.concat([t+"-"+yo,t+"-"+La])},[]),ND=[].concat(Ka,[ax]).reduce(function(e,t){return e.concat([t,t+"-"+yo,t+"-"+La])},[]),xH="beforeRead",wH="read",_H="afterRead",EH="beforeMain",SH="main",OH="afterMain",CH="beforeWrite",RH="write",IH="afterWrite",PH=[xH,wH,_H,EH,SH,OH,CH,RH,IH];function nn(e){return e?(e.nodeName||"").toLowerCase():null}function ur(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function bi(e){var t=ur(e).Element;return e instanceof t||e instanceof Element}function Er(e){var t=ur(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function sx(e){if(typeof ShadowRoot>"u")return!1;var t=ur(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function NH(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];!Er(o)||!nn(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 TH(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(l,d){return l[d]="",l},{});!Er(i)||!nn(i)||(Object.assign(i.style,u),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const AH={name:"applyStyles",enabled:!0,phase:"write",fn:NH,effect:TH,requires:["computeStyles"]};function en(e){return e.split("-")[0]}var hi=Math.max,$u=Math.min,bo=Math.round;function Ab(){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 TD(){return!/^((?!chrome|android).)*safari/i.test(Ab())}function xo(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&Er(e)&&(i=e.offsetWidth>0&&bo(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&bo(n.height)/e.offsetHeight||1);var a=bi(e)?ur(e):window,u=a.visualViewport,l=!TD()&&r,d=(n.left+(l&&u?u.offsetLeft:0))/i,f=(n.top+(l&&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 ux(e){var t=xo(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 AD(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&sx(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function bn(e){return ur(e).getComputedStyle(e)}function MH(e){return["table","td","th"].indexOf(nn(e))>=0}function Un(e){return((bi(e)?e.ownerDocument:e.document)||window.document).documentElement}function bl(e){return nn(e)==="html"?e:e.assignedSlot||e.parentNode||(sx(e)?e.host:null)||Un(e)}function J1(e){return!Er(e)||bn(e).position==="fixed"?null:e.offsetParent}function DH(e){var t=/firefox/i.test(Ab()),r=/Trident/i.test(Ab());if(r&&Er(e)){var n=bn(e);if(n.position==="fixed")return null}var i=bl(e);for(sx(i)&&(i=i.host);Er(i)&&["html","body"].indexOf(nn(i))<0;){var o=bn(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 Ya(e){for(var t=ur(e),r=J1(e);r&&MH(r)&&bn(r).position==="static";)r=J1(r);return r&&(nn(r)==="html"||nn(r)==="body"&&bn(r).position==="static")?t:r||DH(e)||t}function lx(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ma(e,t,r){return hi(e,$u(t,r))}function jH(e,t,r){var n=Ma(e,t,r);return n>r?r:n}function MD(){return{top:0,right:0,bottom:0,left:0}}function DD(e){return Object.assign({},MD(),e)}function jD(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var qH=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,DD(typeof t!="number"?t:jD(t,Ka))};function kH(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,u=en(r.placement),l=lx(u),d=[Kt,Or].indexOf(u)>=0,f=d?"height":"width";if(!(!o||!a)){var h=qH(i.padding,r),p=ux(o),v=l==="y"?Gt:Kt,m=l==="y"?Sr:Or,y=r.rects.reference[f]+r.rects.reference[l]-a[l]-r.rects.popper[f],x=a[l]-r.rects.reference[l],b=Ya(o),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,E=y/2-x/2,_=h[v],S=w-p[f]-h[m],R=w/2-p[f]/2+E,I=Ma(_,R,S),P=l;r.modifiersData[n]=(t={},t[P]=I,t.centerOffset=I-R,t)}}function LH(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)||AD(t.elements.popper,i)&&(t.elements.arrow=i))}const BH={name:"arrow",enabled:!0,phase:"main",fn:kH,effect:LH,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wo(e){return e.split("-")[1]}var FH={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:bo(r*i)/i||0,y:bo(n*i)/i||0}}function Q1(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,u=e.position,l=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,x=typeof f=="function"?f({x:v,y}):{x:v,y};v=x.x,y=x.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),E=Kt,_=Gt,S=window;if(d){var R=Ya(r),I="clientHeight",P="clientWidth";if(R===ur(r)&&(R=Un(r),bn(R).position!=="static"&&u==="absolute"&&(I="scrollHeight",P="scrollWidth")),R=R,i===Gt||(i===Kt||i===Or)&&o===La){_=Sr;var A=h&&R===S&&S.visualViewport?S.visualViewport.height:R[I];y-=A-n.height,y*=l?1:-1}if(i===Kt||(i===Gt||i===Sr)&&o===La){E=Or;var k=h&&R===S&&S.visualViewport?S.visualViewport.width:R[P];v-=k-n.width,v*=l?1:-1}}var L=Object.assign({position:u},d&&FH),$=f===!0?$H({x:v,y},ur(r)):{x:v,y};if(v=$.x,y=$.y,l){var j;return Object.assign({},L,(j={},j[_]=w?"0":"",j[E]=b?"0":"",j.transform=(S.devicePixelRatio||1)<=1?"translate("+v+"px, "+y+"px)":"translate3d("+v+"px, "+y+"px, 0)",j))}return Object.assign({},L,(t={},t[_]=w?y+"px":"",t[E]=b?v+"px":"",t.transform="",t))}function zH(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,l=u===void 0?!0:u,d={placement:en(t.placement),variation:wo(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,Q1(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Q1(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const HH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zH,data:{}};var au={passive:!0};function VH(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,l=ur(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",r.update,au)}),u&&l.addEventListener("resize",r.update,au),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",r.update,au)}),u&&l.removeEventListener("resize",r.update,au)}}const UH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:VH,data:{}};var WH={left:"right",right:"left",bottom:"top",top:"bottom"};function Tu(e){return e.replace(/left|right|bottom|top/g,function(t){return WH[t]})}var GH={start:"end",end:"start"};function eE(e){return e.replace(/start|end/g,function(t){return GH[t]})}function cx(e){var t=ur(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function fx(e){return xo(Un(e)).left+cx(e).scrollLeft}function KH(e,t){var r=ur(e),n=Un(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,l=0;if(i){o=i.width,a=i.height;var d=TD();(d||!d&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:u+fx(e),y:l}}function YH(e){var t,r=Un(e),n=cx(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=hi(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=hi(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-n.scrollLeft+fx(e),l=-n.scrollTop;return bn(i||r).direction==="rtl"&&(u+=hi(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:l}}function dx(e){var t=bn(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function qD(e){return["html","body","#document"].indexOf(nn(e))>=0?e.ownerDocument.body:Er(e)&&dx(e)?e:qD(bl(e))}function Da(e,t){var r;t===void 0&&(t=[]);var n=qD(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=ur(n),a=i?[o].concat(o.visualViewport||[],dx(n)?n:[]):n,u=t.concat(a);return i?u:u.concat(Da(bl(a)))}function Mb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function XH(e,t){var r=xo(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 tE(e,t,r){return t===PD?Mb(KH(e,r)):bi(t)?XH(t,r):Mb(YH(Un(e)))}function ZH(e){var t=Da(bl(e)),r=["absolute","fixed"].indexOf(bn(e).position)>=0,n=r&&Er(e)?Ya(e):e;return bi(n)?t.filter(function(i){return bi(i)&&AD(i,n)&&nn(i)!=="body"}):[]}function JH(e,t,r,n){var i=t==="clippingParents"?ZH(e):[].concat(t),o=[].concat(i,[r]),a=o[0],u=o.reduce(function(l,d){var f=tE(e,d,n);return l.top=hi(f.top,l.top),l.right=$u(f.right,l.right),l.bottom=$u(f.bottom,l.bottom),l.left=hi(f.left,l.left),l},tE(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 kD(e){var t=e.reference,r=e.element,n=e.placement,i=n?en(n):null,o=n?wo(n):null,a=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2,l;switch(i){case Gt:l={x:a,y:t.y-r.height};break;case Sr:l={x:a,y:t.y+t.height};break;case Or:l={x:t.x+t.width,y:u};break;case Kt:l={x:t.x-r.width,y:u};break;default:l={x:t.x,y:t.y}}var d=i?lx(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case yo:l[d]=l[d]-(t[f]/2-r[f]/2);break;case La:l[d]=l[d]+(t[f]/2-r[f]/2);break}}return l}function Ba(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,l=u===void 0?yH:u,d=r.rootBoundary,f=d===void 0?PD:d,h=r.elementContext,p=h===void 0?oa:h,v=r.altBoundary,m=v===void 0?!1:v,y=r.padding,x=y===void 0?0:y,b=DD(typeof x!="number"?x:jD(x,Ka)),w=p===oa?bH:oa,E=e.rects.popper,_=e.elements[m?w:p],S=JH(bi(_)?_:_.contextElement||Un(e.elements.popper),l,f,a),R=xo(e.elements.reference),I=kD({reference:R,element:E,placement:i}),P=Mb(Object.assign({},E,I)),A=p===oa?P:R,k={top:S.top-A.top+b.top,bottom:A.bottom-S.bottom+b.bottom,left:S.left-A.left+b.left,right:A.right-S.right+b.right},L=e.modifiersData.offset;if(p===oa&&L){var $=L[i];Object.keys(k).forEach(function(j){var D=[Or,Sr].indexOf(j)>=0?1:-1,G=[Gt,Sr].indexOf(j)>=0?"y":"x";k[j]+=$[G]*D})}return k}function QH(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,u=r.flipVariations,l=r.allowedAutoPlacements,d=l===void 0?ND:l,f=wo(n),h=f?u?Z1:Z1.filter(function(m){return wo(m)===f}):Ka,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]=Ba(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[en(y)],m},{});return Object.keys(v).sort(function(m,y){return v[m]-v[y]})}function e4(e){if(en(e)===ax)return[];var t=Tu(e);return[eE(e),t,eE(t)]}function t4(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,l=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,x=t.options.placement,b=en(x),w=b===x,E=l||(w||!m?[Tu(x)]:e4(x)),_=[x].concat(E).reduce(function(F,W){return F.concat(en(W)===ax?QH(t,{placement:W,boundary:f,rootBoundary:h,padding:d,flipVariations:m,allowedAutoPlacements:y}):W)},[]),S=t.rects.reference,R=t.rects.popper,I=new Map,P=!0,A=_[0],k=0;k<_.length;k++){var L=_[k],$=en(L),j=wo(L)===yo,D=[Gt,Sr].indexOf($)>=0,G=D?"width":"height",B=Ba(t,{placement:L,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),Y=D?j?Or:Kt:j?Sr:Gt;S[G]>R[G]&&(Y=Tu(Y));var Z=Tu(Y),te=[];if(o&&te.push(B[$]<=0),u&&te.push(B[Y]<=0,B[Z]<=0),te.every(function(F){return F})){A=L,P=!1;break}I.set(L,te)}if(P)for(var U=m?3:1,re=function(W){var J=_.find(function(H){var K=I.get(H);if(K)return K.slice(0,W).every(function(se){return se})});if(J)return A=J,"break"},ae=U;ae>0;ae--){var le=re(ae);if(le==="break")break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}const r4={name:"flip",enabled:!0,phase:"main",fn:t4,requiresIfExists:["offset"],data:{_skip:!1}};function rE(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 nE(e){return[Gt,Or,Sr,Kt].some(function(t){return e[t]>=0})}function n4(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ba(t,{elementContext:"reference"}),u=Ba(t,{altBoundary:!0}),l=rE(a,n),d=rE(u,i,o),f=nE(l),h=nE(d);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const i4={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:n4};function o4(e,t,r){var n=en(e),i=[Kt,Gt].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,[Kt,Or].indexOf(n)>=0?{x:u,y:a}:{x:a,y:u}}function a4(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=ND.reduce(function(f,h){return f[h]=o4(h,t.rects,o),f},{}),u=a[t.placement],l=u.x,d=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=d),t.modifiersData[n]=a}const s4={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:a4};function u4(e){var t=e.state,r=e.name;t.modifiersData[r]=kD({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const l4={name:"popperOffsets",enabled:!0,phase:"read",fn:u4,data:{}};function c4(e){return e==="x"?"y":"x"}function f4(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,l=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,x=Ba(t,{boundary:l,rootBoundary:d,padding:h,altBoundary:f}),b=en(t.placement),w=wo(t.placement),E=!w,_=lx(b),S=c4(_),R=t.modifiersData.popperOffsets,I=t.rects.reference,P=t.rects.popper,A=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,k=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(R){if(o){var j,D=_==="y"?Gt:Kt,G=_==="y"?Sr:Or,B=_==="y"?"height":"width",Y=R[_],Z=Y+x[D],te=Y-x[G],U=v?-P[B]/2:0,re=w===yo?I[B]:P[B],ae=w===yo?-P[B]:-I[B],le=t.elements.arrow,F=v&&le?ux(le):{width:0,height:0},W=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:MD(),J=W[D],H=W[G],K=Ma(0,I[B],F[B]),se=E?I[B]/2-U-K-J-k.mainAxis:re-K-J-k.mainAxis,oe=E?-I[B]/2+U+K+H+k.mainAxis:ae+K+H+k.mainAxis,fe=t.elements.arrow&&Ya(t.elements.arrow),V=fe?_==="y"?fe.clientTop||0:fe.clientLeft||0:0,ee=(j=L==null?void 0:L[_])!=null?j:0,we=Y+se-ee-V,be=Y+oe-ee,de=Ma(v?$u(Z,we):Z,Y,v?hi(te,be):te);R[_]=de,$[_]=de-Y}if(u){var ue,Ee=_==="x"?Gt:Kt,Pe=_==="x"?Sr:Or,Ze=R[S],ze=S==="y"?"height":"width",Fe=Ze+x[Ee],Ve=Ze-x[Pe],lt=[Gt,Kt].indexOf(b)!==-1,ct=(ue=L==null?void 0:L[S])!=null?ue:0,mt=lt?Fe:Ze-I[ze]-P[ze]-ct+k.altAxis,yt=lt?Ze+I[ze]+P[ze]-ct-k.altAxis:Ve,rt=v&<?jH(mt,Ze,yt):Ma(v?mt:Fe,Ze,v?yt:Ve);R[S]=rt,$[S]=rt-Ze}t.modifiersData[n]=$}}const d4={name:"preventOverflow",enabled:!0,phase:"main",fn:f4,requiresIfExists:["offset"]};function h4(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function p4(e){return e===ur(e)||!Er(e)?cx(e):h4(e)}function v4(e){var t=e.getBoundingClientRect(),r=bo(t.width)/e.offsetWidth||1,n=bo(t.height)/e.offsetHeight||1;return r!==1||n!==1}function g4(e,t,r){r===void 0&&(r=!1);var n=Er(t),i=Er(t)&&v4(t),o=Un(t),a=xo(e,i,r),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((nn(t)!=="body"||dx(o))&&(u=p4(t)),Er(t)?(l=xo(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=fx(o))),{x:a.left+u.scrollLeft-l.x,y:a.top+u.scrollTop-l.y,width:a.width,height:a.height}}function m4(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 l=t.get(u);l&&i(l)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function y4(e){var t=m4(e);return PH.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function b4(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function x4(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 iE={placement:"bottom",modifiers:[],strategy:"absolute"};function oE(){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 w4(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?iE:i;return function(u,l,d){d===void 0&&(d=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},iE,o),modifiersData:{},elements:{reference:u,popper:l},attributes:{},styles:{}},h=[],p=!1,v={state:f,setOptions:function(b){var w=typeof b=="function"?b(f.options):b;y(),f.options=Object.assign({},o,f.options,w),f.scrollParents={reference:bi(u)?Da(u):u.contextElement?Da(u.contextElement):[],popper:Da(l)};var E=y4(x4([].concat(n,f.options.modifiers)));return f.orderedModifiers=E.filter(function(_){return _.enabled}),m(),v.update()},forceUpdate:function(){if(!p){var b=f.elements,w=b.reference,E=b.popper;if(oE(w,E)){f.rects={reference:g4(w,Ya(E),f.options.strategy==="fixed"),popper:ux(E)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(k){return f.modifiersData[k.name]=Object.assign({},k.data)});for(var _=0;_<f.orderedModifiers.length;_++){if(f.reset===!0){f.reset=!1,_=-1;continue}var S=f.orderedModifiers[_],R=S.fn,I=S.options,P=I===void 0?{}:I,A=S.name;typeof R=="function"&&(f=R({state:f,options:P,name:A,instance:v})||f)}}}},update:b4(function(){return new Promise(function(x){v.forceUpdate(),x(f)})}),destroy:function(){y(),p=!0}};if(!oE(u,l))return v;v.setOptions(d).then(function(x){!p&&d.onFirstUpdate&&d.onFirstUpdate(x)});function m(){f.orderedModifiers.forEach(function(x){var b=x.name,w=x.options,E=w===void 0?{}:w,_=x.effect;if(typeof _=="function"){var S=_({state:f,name:b,instance:v,options:E}),R=function(){};h.push(S||R)}})}function y(){h.forEach(function(x){return x()}),h=[]}return v}}var _4=[UH,l4,HH,AH,s4,r4,d4,BH,i4],E4=w4({defaultModifiers:_4}),ed,aE;function S4(){if(aE)return ed;aE=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,l,d;if(Array.isArray(o)){if(u=o.length,u!=a.length)return!1;for(l=u;l--!==0;)if(!i(o[l],a[l]))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();!(l=f.next()).done;)if(!a.has(l.value[0]))return!1;for(f=o.entries();!(l=f.next()).done;)if(!i(l.value[1],a.get(l.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();!(l=f.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(a)){if(u=o.length,u!=a.length)return!1;for(l=u;l--!==0;)if(o[l]!==a[l])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(l=u;l--!==0;)if(!Object.prototype.hasOwnProperty.call(a,d[l]))return!1;if(e&&o instanceof Element)return!1;for(l=u;l--!==0;)if(!((d[l]==="_owner"||d[l]==="__v"||d[l]==="__o")&&o.$$typeof)&&!i(o[d[l]],a[d[l]]))return!1;return!0}return o!==o&&a!==a}return ed=function(a,u){try{return i(a,u)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},ed}var O4=S4();const C4=Vn(O4);var R4=[],xl=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||R4},a=ve.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),u=a[0],l=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);ix.flushSync(function(){l({styles:Y1(y.map(function(x){return[x,m.styles[x]||{}]})),attributes:Y1(y.map(function(x){return[x,m.attributes[x]]}))})})},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 C4(i.current,p)?i.current||p:(i.current=p,p)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,d]),h=ve.useRef();return X1(function(){h.current&&h.current.setOptions(f)},[f]),X1(function(){if(!(t==null||r==null)){var p=n.createPopper||E4,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 LD=({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(xe.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 hx(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 td,sE;function I4(){if(sE)return td;sE=1;function e(){this.__data__=[],this.size=0}return td=e,td}var rd,uE;function Co(){if(uE)return rd;uE=1;function e(t,r){return t===r||t!==t&&r!==r}return rd=e,rd}var nd,lE;function wl(){if(lE)return nd;lE=1;var e=Co();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return nd=t,nd}var id,cE;function P4(){if(cE)return id;cE=1;var e=wl(),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 id=n,id}var od,fE;function N4(){if(fE)return od;fE=1;var e=wl();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return od=t,od}var ad,dE;function T4(){if(dE)return ad;dE=1;var e=wl();function t(r){return e(this.__data__,r)>-1}return ad=t,ad}var sd,hE;function A4(){if(hE)return sd;hE=1;var e=wl();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 sd=t,sd}var ud,pE;function _l(){if(pE)return ud;pE=1;var e=I4(),t=P4(),r=N4(),n=T4(),i=A4();function o(a){var u=-1,l=a==null?0:a.length;for(this.clear();++u<l;){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,ud=o,ud}var ld,vE;function M4(){if(vE)return ld;vE=1;var e=_l();function t(){this.__data__=new e,this.size=0}return ld=t,ld}var cd,gE;function D4(){if(gE)return cd;gE=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return cd=e,cd}var fd,mE;function j4(){if(mE)return fd;mE=1;function e(t){return this.__data__.get(t)}return fd=e,fd}var dd,yE;function q4(){if(yE)return dd;yE=1;function e(t){return this.__data__.has(t)}return dd=e,dd}var hd,bE;function BD(){if(bE)return hd;bE=1;var e=typeof ht=="object"&&ht&&ht.Object===Object&&ht;return hd=e,hd}var pd,xE;function Hr(){if(xE)return pd;xE=1;var e=BD(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return pd=r,pd}var vd,wE;function Ro(){if(wE)return vd;wE=1;var e=Hr(),t=e.Symbol;return vd=t,vd}var gd,_E;function k4(){if(_E)return gd;_E=1;var e=Ro(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function o(a){var u=r.call(a,i),l=a[i];try{a[i]=void 0;var d=!0}catch{}var f=n.call(a);return d&&(u?a[i]=l:delete a[i]),f}return gd=o,gd}var md,EE;function L4(){if(EE)return md;EE=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return md=r,md}var yd,SE;function Oi(){if(SE)return yd;SE=1;var e=Ro(),t=k4(),r=L4(),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 yd=a,yd}var bd,OE;function Cr(){if(OE)return bd;OE=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return bd=e,bd}var xd,CE;function Xa(){if(CE)return xd;CE=1;var e=Oi(),t=Cr(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function a(u){if(!t(u))return!1;var l=e(u);return l==n||l==i||l==r||l==o}return xd=a,xd}var wd,RE;function B4(){if(RE)return wd;RE=1;var e=Hr(),t=e["__core-js_shared__"];return wd=t,wd}var _d,IE;function F4(){if(IE)return _d;IE=1;var e=B4(),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 _d=r,_d}var Ed,PE;function FD(){if(PE)return Ed;PE=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 Ed=r,Ed}var Sd,NE;function $4(){if(NE)return Sd;NE=1;var e=Xa(),t=F4(),r=Cr(),n=FD(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,l=a.toString,d=u.hasOwnProperty,f=RegExp("^"+l.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 Sd=h,Sd}var Od,TE;function z4(){if(TE)return Od;TE=1;function e(t,r){return t==null?void 0:t[r]}return Od=e,Od}var Cd,AE;function Ci(){if(AE)return Cd;AE=1;var e=$4(),t=z4();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return Cd=r,Cd}var Rd,ME;function px(){if(ME)return Rd;ME=1;var e=Ci(),t=Hr(),r=e(t,"Map");return Rd=r,Rd}var Id,DE;function El(){if(DE)return Id;DE=1;var e=Ci(),t=e(Object,"create");return Id=t,Id}var Pd,jE;function H4(){if(jE)return Pd;jE=1;var e=El();function t(){this.__data__=e?e(null):{},this.size=0}return Pd=t,Pd}var Nd,qE;function V4(){if(qE)return Nd;qE=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Nd=e,Nd}var Td,kE;function U4(){if(kE)return Td;kE=1;var e=El(),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 Td=i,Td}var Ad,LE;function W4(){if(LE)return Ad;LE=1;var e=El(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return Ad=n,Ad}var Md,BE;function G4(){if(BE)return Md;BE=1;var e=El(),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 Md=r,Md}var Dd,FE;function K4(){if(FE)return Dd;FE=1;var e=H4(),t=V4(),r=U4(),n=W4(),i=G4();function o(a){var u=-1,l=a==null?0:a.length;for(this.clear();++u<l;){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,$E;function Y4(){if($E)return jd;$E=1;var e=K4(),t=_l(),r=px();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return jd=n,jd}var qd,zE;function X4(){if(zE)return qd;zE=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return qd=e,qd}var kd,HE;function Sl(){if(HE)return kd;HE=1;var e=X4();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return kd=t,kd}var Ld,VE;function Z4(){if(VE)return Ld;VE=1;var e=Sl();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Ld=t,Ld}var Bd,UE;function J4(){if(UE)return Bd;UE=1;var e=Sl();function t(r){return e(this,r).get(r)}return Bd=t,Bd}var Fd,WE;function Q4(){if(WE)return Fd;WE=1;var e=Sl();function t(r){return e(this,r).has(r)}return Fd=t,Fd}var $d,GE;function eV(){if(GE)return $d;GE=1;var e=Sl();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 $d=t,$d}var zd,KE;function vx(){if(KE)return zd;KE=1;var e=Y4(),t=Z4(),r=J4(),n=Q4(),i=eV();function o(a){var u=-1,l=a==null?0:a.length;for(this.clear();++u<l;){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,zd=o,zd}var Hd,YE;function tV(){if(YE)return Hd;YE=1;var e=_l(),t=px(),r=vx(),n=200;function i(o,a){var u=this.__data__;if(u instanceof e){var l=u.__data__;if(!t||l.length<n-1)return l.push([o,a]),this.size=++u.size,this;u=this.__data__=new r(l)}return u.set(o,a),this.size=u.size,this}return Hd=i,Hd}var Vd,XE;function Ol(){if(XE)return Vd;XE=1;var e=_l(),t=M4(),r=D4(),n=j4(),i=q4(),o=tV();function a(u){var l=this.__data__=new e(u);this.size=l.size}return a.prototype.clear=t,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=i,a.prototype.set=o,Vd=a,Vd}var Ud,ZE;function gx(){if(ZE)return Ud;ZE=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 Ud=e,Ud}var Wd,JE;function $D(){if(JE)return Wd;JE=1;var e=Ci(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Wd=t,Wd}var Gd,QE;function Cl(){if(QE)return Gd;QE=1;var e=$D();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Gd=t,Gd}var Kd,eS;function Rl(){if(eS)return Kd;eS=1;var e=Cl(),t=Co(),r=Object.prototype,n=r.hasOwnProperty;function i(o,a,u){var l=o[a];(!(n.call(o,a)&&t(l,u))||u===void 0&&!(a in o))&&e(o,a,u)}return Kd=i,Kd}var Yd,tS;function Za(){if(tS)return Yd;tS=1;var e=Rl(),t=Cl();function r(n,i,o,a){var u=!o;o||(o={});for(var l=-1,d=i.length;++l<d;){var f=i[l],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 Yd=r,Yd}var Xd,rS;function rV(){if(rS)return Xd;rS=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Xd=e,Xd}var Zd,nS;function on(){if(nS)return Zd;nS=1;function e(t){return t!=null&&typeof t=="object"}return Zd=e,Zd}var Jd,iS;function nV(){if(iS)return Jd;iS=1;var e=Oi(),t=on(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Jd=n,Jd}var Qd,oS;function Ja(){if(oS)return Qd;oS=1;var e=nV(),t=on(),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 Qd=o,Qd}var eh,aS;function xt(){if(aS)return eh;aS=1;var e=Array.isArray;return eh=e,eh}var Ca={exports:{}},th,sS;function iV(){if(sS)return th;sS=1;function e(){return!1}return th=e,th}Ca.exports;var uS;function Io(){return uS||(uS=1,(function(e,t){var r=Hr(),n=iV(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,u=a?r.Buffer:void 0,l=u?u.isBuffer:void 0,d=l||n;e.exports=d})(Ca,Ca.exports)),Ca.exports}var rh,lS;function Il(){if(lS)return rh;lS=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 rh=r,rh}var nh,cS;function mx(){if(cS)return nh;cS=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return nh=t,nh}var ih,fS;function oV(){if(fS)return ih;fS=1;var e=Oi(),t=mx(),r=on(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",u="[object Error]",l="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object RegExp]",v="[object Set]",m="[object String]",y="[object WeakMap]",x="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",E="[object Float64Array]",_="[object Int8Array]",S="[object Int16Array]",R="[object Int32Array]",I="[object Uint8Array]",P="[object Uint8ClampedArray]",A="[object Uint16Array]",k="[object Uint32Array]",L={};L[w]=L[E]=L[_]=L[S]=L[R]=L[I]=L[P]=L[A]=L[k]=!0,L[n]=L[i]=L[x]=L[o]=L[b]=L[a]=L[u]=L[l]=L[d]=L[f]=L[h]=L[p]=L[v]=L[m]=L[y]=!1;function $(j){return r(j)&&t(j.length)&&!!L[e(j)]}return ih=$,ih}var oh,dS;function Pl(){if(dS)return oh;dS=1;function e(t){return function(r){return t(r)}}return oh=e,oh}var Ra={exports:{}};Ra.exports;var hS;function yx(){return hS||(hS=1,(function(e,t){var r=BD(),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 l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}})();e.exports=u})(Ra,Ra.exports)),Ra.exports}var ah,pS;function Qa(){if(pS)return ah;pS=1;var e=oV(),t=Pl(),r=yx(),n=r&&r.isTypedArray,i=n?t(n):e;return ah=i,ah}var sh,vS;function zD(){if(vS)return sh;vS=1;var e=rV(),t=Ja(),r=xt(),n=Io(),i=Il(),o=Qa(),a=Object.prototype,u=a.hasOwnProperty;function l(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,x=y?e(d.length,String):[],b=x.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,b)))&&x.push(w);return x}return sh=l,sh}var uh,gS;function Nl(){if(gS)return uh;gS=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return uh=t,uh}var lh,mS;function HD(){if(mS)return lh;mS=1;function e(t,r){return function(n){return t(r(n))}}return lh=e,lh}var ch,yS;function aV(){if(yS)return ch;yS=1;var e=HD(),t=e(Object.keys,Object);return ch=t,ch}var fh,bS;function bx(){if(bS)return fh;bS=1;var e=Nl(),t=aV(),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 fh=i,fh}var dh,xS;function En(){if(xS)return dh;xS=1;var e=Xa(),t=mx();function r(n){return n!=null&&t(n.length)&&!e(n)}return dh=r,dh}var hh,wS;function Wn(){if(wS)return hh;wS=1;var e=zD(),t=bx(),r=En();function n(i){return r(i)?e(i):t(i)}return hh=n,hh}var ph,_S;function sV(){if(_S)return ph;_S=1;var e=Za(),t=Wn();function r(n,i){return n&&e(i,t(i),n)}return ph=r,ph}var vh,ES;function uV(){if(ES)return vh;ES=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return vh=e,vh}var gh,SS;function lV(){if(SS)return gh;SS=1;var e=Cr(),t=Nl(),r=uV(),n=Object.prototype,i=n.hasOwnProperty;function o(a){if(!e(a))return r(a);var u=t(a),l=[];for(var d in a)d=="constructor"&&(u||!i.call(a,d))||l.push(d);return l}return gh=o,gh}var mh,OS;function Ri(){if(OS)return mh;OS=1;var e=zD(),t=lV(),r=En();function n(i){return r(i)?e(i,!0):t(i)}return mh=n,mh}var yh,CS;function cV(){if(CS)return yh;CS=1;var e=Za(),t=Ri();function r(n,i){return n&&e(i,t(i),n)}return yh=r,yh}var Ia={exports:{}};Ia.exports;var RS;function VD(){return RS||(RS=1,(function(e,t){var r=Hr(),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 l(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=l})(Ia,Ia.exports)),Ia.exports}var bh,IS;function UD(){if(IS)return bh;IS=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 bh=e,bh}var xh,PS;function WD(){if(PS)return xh;PS=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 xh=e,xh}var wh,NS;function GD(){if(NS)return wh;NS=1;function e(){return[]}return wh=e,wh}var _h,TS;function xx(){if(TS)return _h;TS=1;var e=WD(),t=GD(),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 _h=o,_h}var Eh,AS;function fV(){if(AS)return Eh;AS=1;var e=Za(),t=xx();function r(n,i){return e(n,t(n),i)}return Eh=r,Eh}var Sh,MS;function wx(){if(MS)return Sh;MS=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 Sh=e,Sh}var Oh,DS;function Tl(){if(DS)return Oh;DS=1;var e=HD(),t=e(Object.getPrototypeOf,Object);return Oh=t,Oh}var Ch,jS;function KD(){if(jS)return Ch;jS=1;var e=wx(),t=Tl(),r=xx(),n=GD(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var u=[];a;)e(u,r(a)),a=t(a);return u}:n;return Ch=o,Ch}var Rh,qS;function dV(){if(qS)return Rh;qS=1;var e=Za(),t=KD();function r(n,i){return e(n,t(n),i)}return Rh=r,Rh}var Ih,kS;function YD(){if(kS)return Ih;kS=1;var e=wx(),t=xt();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return Ih=r,Ih}var Ph,LS;function XD(){if(LS)return Ph;LS=1;var e=YD(),t=xx(),r=Wn();function n(i){return e(i,r,t)}return Ph=n,Ph}var Nh,BS;function hV(){if(BS)return Nh;BS=1;var e=YD(),t=KD(),r=Ri();function n(i){return e(i,r,t)}return Nh=n,Nh}var Th,FS;function pV(){if(FS)return Th;FS=1;var e=Ci(),t=Hr(),r=e(t,"DataView");return Th=r,Th}var Ah,$S;function vV(){if($S)return Ah;$S=1;var e=Ci(),t=Hr(),r=e(t,"Promise");return Ah=r,Ah}var Mh,zS;function ZD(){if(zS)return Mh;zS=1;var e=Ci(),t=Hr(),r=e(t,"Set");return Mh=r,Mh}var Dh,HS;function gV(){if(HS)return Dh;HS=1;var e=Ci(),t=Hr(),r=e(t,"WeakMap");return Dh=r,Dh}var jh,VS;function Po(){if(VS)return jh;VS=1;var e=pV(),t=px(),r=vV(),n=ZD(),i=gV(),o=Oi(),a=FD(),u="[object Map]",l="[object Object]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",v=a(e),m=a(t),y=a(r),x=a(n),b=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(E){var _=o(E),S=_==l?E.constructor:void 0,R=S?a(S):"";if(R)switch(R){case v:return p;case m:return u;case y:return d;case x:return f;case b:return h}return _}),jh=w,jh}var qh,US;function mV(){if(US)return qh;US=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 qh=r,qh}var kh,WS;function JD(){if(WS)return kh;WS=1;var e=Hr(),t=e.Uint8Array;return kh=t,kh}var Lh,GS;function _x(){if(GS)return Lh;GS=1;var e=JD();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return Lh=t,Lh}var Bh,KS;function yV(){if(KS)return Bh;KS=1;var e=_x();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return Bh=t,Bh}var Fh,YS;function bV(){if(YS)return Fh;YS=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return Fh=t,Fh}var $h,XS;function xV(){if(XS)return $h;XS=1;var e=Ro(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return $h=n,$h}var zh,ZS;function QD(){if(ZS)return zh;ZS=1;var e=_x();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return zh=t,zh}var Hh,JS;function wV(){if(JS)return Hh;JS=1;var e=_x(),t=yV(),r=bV(),n=xV(),i=QD(),o="[object Boolean]",a="[object Date]",u="[object Map]",l="[object Number]",d="[object RegExp]",f="[object Set]",h="[object String]",p="[object Symbol]",v="[object ArrayBuffer]",m="[object DataView]",y="[object Float32Array]",x="[object Float64Array]",b="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",_="[object Uint8Array]",S="[object Uint8ClampedArray]",R="[object Uint16Array]",I="[object Uint32Array]";function P(A,k,L){var $=A.constructor;switch(k){case v:return e(A);case o:case a:return new $(+A);case m:return t(A,L);case y:case x:case b:case w:case E:case _:case S:case R:case I:return i(A,L);case u:return new $;case l:case h:return new $(A);case d:return r(A);case f:return new $;case p:return n(A)}}return Hh=P,Hh}var Vh,QS;function ej(){if(QS)return Vh;QS=1;var e=Cr(),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 Vh=r,Vh}var Uh,eO;function tj(){if(eO)return Uh;eO=1;var e=ej(),t=Tl(),r=Nl();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Uh=n,Uh}var Wh,tO;function _V(){if(tO)return Wh;tO=1;var e=Po(),t=on(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Wh=n,Wh}var Gh,rO;function EV(){if(rO)return Gh;rO=1;var e=_V(),t=Pl(),r=yx(),n=r&&r.isMap,i=n?t(n):e;return Gh=i,Gh}var Kh,nO;function SV(){if(nO)return Kh;nO=1;var e=Po(),t=on(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return Kh=n,Kh}var Yh,iO;function OV(){if(iO)return Yh;iO=1;var e=SV(),t=Pl(),r=yx(),n=r&&r.isSet,i=n?t(n):e;return Yh=i,Yh}var Xh,oO;function rj(){if(oO)return Xh;oO=1;var e=Ol(),t=gx(),r=Rl(),n=sV(),i=cV(),o=VD(),a=UD(),u=fV(),l=dV(),d=XD(),f=hV(),h=Po(),p=mV(),v=wV(),m=tj(),y=xt(),x=Io(),b=EV(),w=Cr(),E=OV(),_=Wn(),S=Ri(),R=1,I=2,P=4,A="[object Arguments]",k="[object Array]",L="[object Boolean]",$="[object Date]",j="[object Error]",D="[object Function]",G="[object GeneratorFunction]",B="[object Map]",Y="[object Number]",Z="[object Object]",te="[object RegExp]",U="[object Set]",re="[object String]",ae="[object Symbol]",le="[object WeakMap]",F="[object ArrayBuffer]",W="[object DataView]",J="[object Float32Array]",H="[object Float64Array]",K="[object Int8Array]",se="[object Int16Array]",oe="[object Int32Array]",fe="[object Uint8Array]",V="[object Uint8ClampedArray]",ee="[object Uint16Array]",we="[object Uint32Array]",be={};be[A]=be[k]=be[F]=be[W]=be[L]=be[$]=be[J]=be[H]=be[K]=be[se]=be[oe]=be[B]=be[Y]=be[Z]=be[te]=be[U]=be[re]=be[ae]=be[fe]=be[V]=be[ee]=be[we]=!0,be[j]=be[D]=be[le]=!1;function de(ue,Ee,Pe,Ze,ze,Fe){var Ve,lt=Ee&R,ct=Ee&I,mt=Ee&P;if(Pe&&(Ve=ze?Pe(ue,Ze,ze,Fe):Pe(ue)),Ve!==void 0)return Ve;if(!w(ue))return ue;var yt=y(ue);if(yt){if(Ve=p(ue),!lt)return a(ue,Ve)}else{var rt=h(ue),bt=rt==D||rt==G;if(x(ue))return o(ue,lt);if(rt==Z||rt==A||bt&&!ze){if(Ve=ct||bt?{}:m(ue),!lt)return ct?l(ue,i(Ve,ue)):u(ue,n(Ve,ue))}else{if(!be[rt])return ze?ue:{};Ve=v(ue,rt,lt)}}Fe||(Fe=new e);var Jt=Fe.get(ue);if(Jt)return Jt;Fe.set(ue,Ve),E(ue)?ue.forEach(function(_t){Ve.add(de(_t,Ee,Pe,_t,ue,Fe))}):b(ue)&&ue.forEach(function(_t,jt){Ve.set(jt,de(_t,Ee,Pe,jt,ue,Fe))});var fr=mt?ct?f:d:ct?S:_,Dt=yt?void 0:fr(ue);return t(Dt||ue,function(_t,jt){Dt&&(jt=_t,_t=ue[jt]),r(Ve,jt,de(_t,Ee,Pe,jt,ue,Fe))}),Ve}return Xh=de,Xh}var Zh,aO;function CV(){if(aO)return Zh;aO=1;var e=rj(),t=4;function r(n){return e(n,t)}return Zh=r,Zh}var Jh,sO;function Ex(){if(sO)return Jh;sO=1;function e(t){return function(){return t}}return Jh=e,Jh}var Qh,uO;function RV(){if(uO)return Qh;uO=1;function e(t){return function(r,n,i){for(var o=-1,a=Object(r),u=i(r),l=u.length;l--;){var d=u[t?l:++o];if(n(a[d],d,a)===!1)break}return r}}return Qh=e,Qh}var ep,lO;function Sx(){if(lO)return ep;lO=1;var e=RV(),t=e();return ep=t,ep}var tp,cO;function Ox(){if(cO)return tp;cO=1;var e=Sx(),t=Wn();function r(n,i){return n&&e(n,i,t)}return tp=r,tp}var rp,fO;function IV(){if(fO)return rp;fO=1;var e=En();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,l=Object(i);(n?u--:++u<a)&&o(l[u],u,l)!==!1;);return i}}return rp=t,rp}var np,dO;function Al(){if(dO)return np;dO=1;var e=Ox(),t=IV(),r=t(e);return np=r,np}var ip,hO;function Ii(){if(hO)return ip;hO=1;function e(t){return t}return ip=e,ip}var op,pO;function nj(){if(pO)return op;pO=1;var e=Ii();function t(r){return typeof r=="function"?r:e}return op=t,op}var ap,vO;function ij(){if(vO)return ap;vO=1;var e=gx(),t=Al(),r=nj(),n=xt();function i(o,a){var u=n(o)?e:t;return u(o,r(a))}return ap=i,ap}var sp,gO;function oj(){return gO||(gO=1,sp=ij()),sp}var up,mO;function PV(){if(mO)return up;mO=1;var e=Al();function t(r,n){var i=[];return e(r,function(o,a,u){n(o,a,u)&&i.push(o)}),i}return up=t,up}var lp,yO;function NV(){if(yO)return lp;yO=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return lp=t,lp}var cp,bO;function TV(){if(bO)return cp;bO=1;function e(t){return this.__data__.has(t)}return cp=e,cp}var fp,xO;function aj(){if(xO)return fp;xO=1;var e=vx(),t=NV(),r=TV();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,fp=n,fp}var dp,wO;function AV(){if(wO)return dp;wO=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 dp=e,dp}var hp,_O;function sj(){if(_O)return hp;_O=1;function e(t,r){return t.has(r)}return hp=e,hp}var pp,EO;function uj(){if(EO)return pp;EO=1;var e=aj(),t=AV(),r=sj(),n=1,i=2;function o(a,u,l,d,f,h){var p=l&n,v=a.length,m=u.length;if(v!=m&&!(p&&m>v))return!1;var y=h.get(a),x=h.get(u);if(y&&x)return y==u&&x==a;var b=-1,w=!0,E=l&i?new e:void 0;for(h.set(a,u),h.set(u,a);++b<v;){var _=a[b],S=u[b];if(d)var R=p?d(S,_,b,u,a,h):d(_,S,b,a,u,h);if(R!==void 0){if(R)continue;w=!1;break}if(E){if(!t(u,function(I,P){if(!r(E,P)&&(_===I||f(_,I,l,d,h)))return E.push(P)})){w=!1;break}}else if(!(_===S||f(_,S,l,d,h))){w=!1;break}}return h.delete(a),h.delete(u),w}return pp=o,pp}var vp,SO;function MV(){if(SO)return vp;SO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return vp=e,vp}var gp,OO;function Cx(){if(OO)return gp;OO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return gp=e,gp}var mp,CO;function DV(){if(CO)return mp;CO=1;var e=Ro(),t=JD(),r=Co(),n=uj(),i=MV(),o=Cx(),a=1,u=2,l="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Map]",p="[object Number]",v="[object RegExp]",m="[object Set]",y="[object String]",x="[object Symbol]",b="[object ArrayBuffer]",w="[object DataView]",E=e?e.prototype:void 0,_=E?E.valueOf:void 0;function S(R,I,P,A,k,L,$){switch(P){case w:if(R.byteLength!=I.byteLength||R.byteOffset!=I.byteOffset)return!1;R=R.buffer,I=I.buffer;case b:return!(R.byteLength!=I.byteLength||!L(new t(R),new t(I)));case l:case d:case p:return r(+R,+I);case f:return R.name==I.name&&R.message==I.message;case v:case y:return R==I+"";case h:var j=i;case m:var D=A&a;if(j||(j=o),R.size!=I.size&&!D)return!1;var G=$.get(R);if(G)return G==I;A|=u,$.set(R,I);var B=n(j(R),j(I),A,k,L,$);return $.delete(R),B;case x:if(_)return _.call(R)==_.call(I)}return!1}return mp=S,mp}var yp,RO;function jV(){if(RO)return yp;RO=1;var e=XD(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(o,a,u,l,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 x=v;x--;){var b=p[x];if(!(h?b in a:n.call(a,b)))return!1}var w=f.get(o),E=f.get(a);if(w&&E)return w==a&&E==o;var _=!0;f.set(o,a),f.set(a,o);for(var S=h;++x<v;){b=p[x];var R=o[b],I=a[b];if(l)var P=h?l(I,R,b,a,o,f):l(R,I,b,o,a,f);if(!(P===void 0?R===I||d(R,I,u,l,f):P)){_=!1;break}S||(S=b=="constructor")}if(_&&!S){var A=o.constructor,k=a.constructor;A!=k&&"constructor"in o&&"constructor"in a&&!(typeof A=="function"&&A instanceof A&&typeof k=="function"&&k instanceof k)&&(_=!1)}return f.delete(o),f.delete(a),_}return yp=i,yp}var bp,IO;function qV(){if(IO)return bp;IO=1;var e=Ol(),t=uj(),r=DV(),n=jV(),i=Po(),o=xt(),a=Io(),u=Qa(),l=1,d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype,v=p.hasOwnProperty;function m(y,x,b,w,E,_){var S=o(y),R=o(x),I=S?f:i(y),P=R?f:i(x);I=I==d?h:I,P=P==d?h:P;var A=I==h,k=P==h,L=I==P;if(L&&a(y)){if(!a(x))return!1;S=!0,A=!1}if(L&&!A)return _||(_=new e),S||u(y)?t(y,x,b,w,E,_):r(y,x,I,b,w,E,_);if(!(b&l)){var $=A&&v.call(y,"__wrapped__"),j=k&&v.call(x,"__wrapped__");if($||j){var D=$?y.value():y,G=j?x.value():x;return _||(_=new e),E(D,G,b,w,_)}}return L?(_||(_=new e),n(y,x,b,w,E,_)):!1}return bp=m,bp}var xp,PO;function lj(){if(PO)return xp;PO=1;var e=qV(),t=on();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 xp=r,xp}var wp,NO;function kV(){if(NO)return wp;NO=1;var e=Ol(),t=lj(),r=1,n=2;function i(o,a,u,l){var d=u.length,f=d,h=!l;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 x=new e;if(l)var b=l(m,y,v,o,a,x);if(!(b===void 0?t(y,m,r|n,l,x):b))return!1}}return!0}return wp=i,wp}var _p,TO;function cj(){if(TO)return _p;TO=1;var e=Cr();function t(r){return r===r&&!e(r)}return _p=t,_p}var Ep,AO;function LV(){if(AO)return Ep;AO=1;var e=cj(),t=Wn();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 Ep=r,Ep}var Sp,MO;function fj(){if(MO)return Sp;MO=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return Sp=e,Sp}var Op,DO;function BV(){if(DO)return Op;DO=1;var e=kV(),t=LV(),r=fj();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 Op=n,Op}var Cp,jO;function No(){if(jO)return Cp;jO=1;var e=Oi(),t=on(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return Cp=n,Cp}var Rp,qO;function Rx(){if(qO)return Rp;qO=1;var e=xt(),t=No(),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 Rp=i,Rp}var Ip,kO;function FV(){if(kO)return Ip;kO=1;var e=vx(),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],l=o.cache;if(l.has(u))return l.get(u);var d=n.apply(this,a);return o.cache=l.set(u,d)||l,d};return o.cache=new(r.Cache||e),o}return r.Cache=e,Ip=r,Ip}var Pp,LO;function $V(){if(LO)return Pp;LO=1;var e=FV(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return Pp=r,Pp}var Np,BO;function zV(){if(BO)return Np;BO=1;var e=$V(),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,l,d){o.push(l?d.replace(r,"$1"):u||a)}),o});return Np=n,Np}var Tp,FO;function Ml(){if(FO)return Tp;FO=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 Tp=e,Tp}var Ap,$O;function HV(){if($O)return Ap;$O=1;var e=Ro(),t=Ml(),r=xt(),n=No(),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 l=u+"";return l=="0"&&1/u==-1/0?"-0":l}return Ap=a,Ap}var Mp,zO;function dj(){if(zO)return Mp;zO=1;var e=HV();function t(r){return r==null?"":e(r)}return Mp=t,Mp}var Dp,HO;function Dl(){if(HO)return Dp;HO=1;var e=xt(),t=Rx(),r=zV(),n=dj();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return Dp=i,Dp}var jp,VO;function es(){if(VO)return jp;VO=1;var e=No();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return jp=t,jp}var qp,UO;function jl(){if(UO)return qp;UO=1;var e=Dl(),t=es();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 qp=r,qp}var kp,WO;function VV(){if(WO)return kp;WO=1;var e=jl();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return kp=t,kp}var Lp,GO;function UV(){if(GO)return Lp;GO=1;function e(t,r){return t!=null&&r in Object(t)}return Lp=e,Lp}var Bp,KO;function hj(){if(KO)return Bp;KO=1;var e=Dl(),t=Ja(),r=xt(),n=Il(),i=mx(),o=es();function a(u,l,d){l=e(l,u);for(var f=-1,h=l.length,p=!1;++f<h;){var v=o(l[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 Bp=a,Bp}var Fp,YO;function pj(){if(YO)return Fp;YO=1;var e=UV(),t=hj();function r(n,i){return n!=null&&t(n,i,e)}return Fp=r,Fp}var $p,XO;function WV(){if(XO)return $p;XO=1;var e=lj(),t=VV(),r=pj(),n=Rx(),i=cj(),o=fj(),a=es(),u=1,l=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|l)}}return $p=d,$p}var zp,ZO;function vj(){if(ZO)return zp;ZO=1;function e(t){return function(r){return r==null?void 0:r[t]}}return zp=e,zp}var Hp,JO;function GV(){if(JO)return Hp;JO=1;var e=jl();function t(r){return function(n){return e(n,r)}}return Hp=t,Hp}var Vp,QO;function KV(){if(QO)return Vp;QO=1;var e=vj(),t=GV(),r=Rx(),n=es();function i(o){return r(o)?e(n(o)):t(o)}return Vp=i,Vp}var Up,eC;function Sn(){if(eC)return Up;eC=1;var e=BV(),t=WV(),r=Ii(),n=xt(),i=KV();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 Up=o,Up}var Wp,tC;function gj(){if(tC)return Wp;tC=1;var e=WD(),t=PV(),r=Sn(),n=xt();function i(o,a){var u=n(o)?e:t;return u(o,r(a,3))}return Wp=i,Wp}var Gp,rC;function YV(){if(rC)return Gp;rC=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return Gp=r,Gp}var Kp,nC;function mj(){if(nC)return Kp;nC=1;var e=YV(),t=hj();function r(n,i){return n!=null&&t(n,i,e)}return Kp=r,Kp}var Yp,iC;function XV(){if(iC)return Yp;iC=1;var e=bx(),t=Po(),r=Ja(),n=xt(),i=En(),o=Io(),a=Nl(),u=Qa(),l="[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==l||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 Yp=p,Yp}var Xp,oC;function yj(){if(oC)return Xp;oC=1;function e(t){return t===void 0}return Xp=e,Xp}var Zp,aC;function bj(){if(aC)return Zp;aC=1;var e=Al(),t=En();function r(n,i){var o=-1,a=t(n)?Array(n.length):[];return e(n,function(u,l,d){a[++o]=i(u,l,d)}),a}return Zp=r,Zp}var Jp,sC;function xj(){if(sC)return Jp;sC=1;var e=Ml(),t=Sn(),r=bj(),n=xt();function i(o,a){var u=n(o)?e:r;return u(o,t(a,3))}return Jp=i,Jp}var Qp,uC;function ZV(){if(uC)return Qp;uC=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 Qp=e,Qp}var ev,lC;function JV(){if(lC)return ev;lC=1;function e(t,r,n,i,o){return o(t,function(a,u,l){n=i?(i=!1,a):r(n,a,u,l)}),n}return ev=e,ev}var tv,cC;function wj(){if(cC)return tv;cC=1;var e=ZV(),t=Al(),r=Sn(),n=JV(),i=xt();function o(a,u,l){var d=i(a)?e:n,f=arguments.length<3;return d(a,r(u,4),l,f,t)}return tv=o,tv}var rv,fC;function QV(){if(fC)return rv;fC=1;var e=Oi(),t=xt(),r=on(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return rv=i,rv}var nv,dC;function eU(){if(dC)return nv;dC=1;var e=vj(),t=e("length");return nv=t,nv}var iv,hC;function tU(){if(hC)return iv;hC=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 l(d){return u.test(d)}return iv=l,iv}var ov,pC;function rU(){if(pC)return ov;pC=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+"]",l="\\ud83c[\\udffb-\\udfff]",d="(?:"+u+"|"+l+")",f="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",m=d+"?",y="["+o+"]?",x="(?:"+v+"(?:"+[f,h,p].join("|")+")"+y+m+")*",b=y+m+x,w="(?:"+[f+u+"?",u,h,p,a].join("|")+")",E=RegExp(l+"(?="+l+")|"+w+b,"g");function _(S){for(var R=E.lastIndex=0;E.test(S);)++R;return R}return ov=_,ov}var av,vC;function nU(){if(vC)return av;vC=1;var e=eU(),t=tU(),r=rU();function n(i){return t(i)?r(i):e(i)}return av=n,av}var sv,gC;function iU(){if(gC)return sv;gC=1;var e=bx(),t=Po(),r=En(),n=QV(),i=nU(),o="[object Map]",a="[object Set]";function u(l){if(l==null)return 0;if(r(l))return n(l)?i(l):l.length;var d=t(l);return d==o||d==a?l.size:e(l).length}return sv=u,sv}var uv,mC;function oU(){if(mC)return uv;mC=1;var e=gx(),t=ej(),r=Ox(),n=Sn(),i=Tl(),o=xt(),a=Io(),u=Xa(),l=Cr(),d=Qa();function f(h,p,v){var m=o(h),y=m||a(h)||d(h);if(p=n(p,4),v==null){var x=h&&h.constructor;y?v=m?new x:[]:l(h)?v=u(x)?t(i(h)):{}:v={}}return(y?e:r)(h,function(b,w,E){return p(v,b,w,E)}),v}return uv=f,uv}var lv,yC;function aU(){if(yC)return lv;yC=1;var e=Ro(),t=Ja(),r=xt(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return lv=i,lv}var cv,bC;function Ix(){if(bC)return cv;bC=1;var e=wx(),t=aU();function r(n,i,o,a,u){var l=-1,d=n.length;for(o||(o=t),u||(u=[]);++l<d;){var f=n[l];i>0&&o(f)?i>1?r(f,i-1,o,a,u):e(u,f):a||(u[u.length]=f)}return u}return cv=r,cv}var fv,xC;function sU(){if(xC)return fv;xC=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 fv=e,fv}var dv,wC;function _j(){if(wC)return dv;wC=1;var e=sU(),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,l=t(a.length-i,0),d=Array(l);++u<l;)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 dv=r,dv}var hv,_C;function uU(){if(_C)return hv;_C=1;var e=Ex(),t=$D(),r=Ii(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return hv=n,hv}var pv,EC;function lU(){if(EC)return pv;EC=1;var e=800,t=16,r=Date.now;function n(i){var o=0,a=0;return function(){var u=r(),l=t-(u-a);if(a=u,l>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return pv=n,pv}var vv,SC;function Ej(){if(SC)return vv;SC=1;var e=uU(),t=lU(),r=t(e);return vv=r,vv}var gv,OC;function ql(){if(OC)return gv;OC=1;var e=Ii(),t=_j(),r=Ej();function n(i,o){return r(t(i,o,e),i+"")}return gv=n,gv}var mv,CC;function Sj(){if(CC)return mv;CC=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 mv=e,mv}var yv,RC;function cU(){if(RC)return yv;RC=1;function e(t){return t!==t}return yv=e,yv}var bv,IC;function fU(){if(IC)return bv;IC=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 bv=e,bv}var xv,PC;function dU(){if(PC)return xv;PC=1;var e=Sj(),t=cU(),r=fU();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return xv=n,xv}var wv,NC;function hU(){if(NC)return wv;NC=1;var e=dU();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return wv=t,wv}var _v,TC;function pU(){if(TC)return _v;TC=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 _v=e,_v}var Ev,AC;function vU(){if(AC)return Ev;AC=1;function e(){}return Ev=e,Ev}var Sv,MC;function gU(){if(MC)return Sv;MC=1;var e=ZD(),t=vU(),r=Cx(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return Sv=i,Sv}var Ov,DC;function mU(){if(DC)return Ov;DC=1;var e=aj(),t=hU(),r=pU(),n=sj(),i=gU(),o=Cx(),a=200;function u(l,d,f){var h=-1,p=t,v=l.length,m=!0,y=[],x=y;if(f)m=!1,p=r;else if(v>=a){var b=d?null:i(l);if(b)return o(b);m=!1,p=n,x=new e}else x=d?[]:y;e:for(;++h<v;){var w=l[h],E=d?d(w):w;if(w=f||w!==0?w:0,m&&E===E){for(var _=x.length;_--;)if(x[_]===E)continue e;d&&x.push(E),y.push(w)}else p(x,E,f)||(x!==y&&x.push(E),y.push(w))}return y}return Ov=u,Ov}var Cv,jC;function Oj(){if(jC)return Cv;jC=1;var e=En(),t=on();function r(n){return t(n)&&e(n)}return Cv=r,Cv}var Rv,qC;function yU(){if(qC)return Rv;qC=1;var e=Ix(),t=ql(),r=mU(),n=Oj(),i=t(function(o){return r(e(o,1,n,!0))});return Rv=i,Rv}var Iv,kC;function bU(){if(kC)return Iv;kC=1;var e=Ml();function t(r,n){return e(n,function(i){return r[i]})}return Iv=t,Iv}var Pv,LC;function Cj(){if(LC)return Pv;LC=1;var e=bU(),t=Wn();function r(n){return n==null?[]:e(n,t(n))}return Pv=r,Pv}var Nv,BC;function Rr(){if(BC)return Nv;BC=1;var e;if(typeof hx=="function")try{e={clone:CV(),constant:Ex(),each:oj(),filter:gj(),has:mj(),isArray:xt(),isEmpty:XV(),isFunction:Xa(),isUndefined:yj(),keys:Wn(),map:xj(),reduce:wj(),size:iU(),transform:oU(),union:yU(),values:Cj()}}catch{}return e||(e=window._),Nv=e,Nv}var Tv,FC;function Px(){if(FC)return Tv;FC=1;var e=Rr();Tv=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,x){f(x)&&h.setNode(x,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 x=p.parent(y);return x===void 0||h.hasNode(x)?(v[y]=x,x):x in v?v[x]:m(x)}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 x=u(this._isDirected,f,h,p);if(e.has(this._edgeLabels,x))return m&&(this._edgeLabels[x]=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[x]=m?v:this._defaultEdgeLabelFn(f,h,p);var b=l(this._isDirected,f,h,p);return f=b.v,h=b.w,Object.freeze(b),this._edgeObjs[x]=b,o(this._preds[h],f),o(this._sucs[f],h),this._in[h][x]=b,this._out[f][x]=b,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 x=m;m=y,y=x}return m+n+y+n+(e.isUndefined(v)?t:v)}function l(f,h,p,v){var m=""+h,y=""+p;if(!f&&m>y){var x=m;m=y,y=x}var b={v:m,w:y};return v&&(b.name=v),b}function d(f,h){return u(f,h.v,h.w,h.name)}return Tv}var Av,$C;function xU(){return $C||($C=1,Av="2.1.8"),Av}var Mv,zC;function wU(){return zC||(zC=1,Mv={Graph:Px(),version:xU()}),Mv}var Dv,HC;function _U(){if(HC)return Dv;HC=1;var e=Rr(),t=Px();Dv={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 l=a.node(u),d=a.parent(u),f={v:u};return e.isUndefined(l)||(f.value=l),e.isUndefined(d)||(f.parent=d),f})}function i(a){return e.map(a.edges(),function(u){var l=a.edge(u),d={v:u.v,w:u.w};return e.isUndefined(u.name)||(d.name=u.name),e.isUndefined(l)||(d.value=l),d})}function o(a){var u=new t(a.options).setGraph(a.value);return e.each(a.nodes,function(l){u.setNode(l.v,l.value),l.parent&&u.setParent(l.v,l.parent)}),e.each(a.edges,function(l){u.setEdge({v:l.v,w:l.w,name:l.name},l.value)}),u}return Dv}var jv,VC;function EU(){if(VC)return jv;VC=1;var e=Rr();jv=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 jv}var qv,UC;function Rj(){if(UC)return qv;UC=1;var e=Rr();qv=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},qv}var kv,WC;function Ij(){if(WC)return kv;WC=1;var e=Rr(),t=Rj();kv=n;var r=e.constant(1);function n(o,a,u,l){return i(o,String(a),u||r,l||function(d){return o.outEdges(d)})}function i(o,a,u,l){var d={},f=new t,h,p,v=function(m){var y=m.v!==h?m.v:m.w,x=d[y],b=u(m),w=p.distance+b;if(b<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+b);w<x.distance&&(x.distance=w,x.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);)l(h).forEach(v);return d}return kv}var Lv,GC;function SU(){if(GC)return Lv;GC=1;var e=Ij(),t=Rr();Lv=r;function r(n,i,o){return t.transform(n.nodes(),function(a,u){a[u]=e(n,u,i,o)},{})}return Lv}var Bv,KC;function Pj(){if(KC)return Bv;KC=1;var e=Rr();Bv=t;function t(r){var n=0,i=[],o={},a=[];function u(l){var d=o[l]={onStack:!0,lowlink:n,index:n++};if(i.push(l),r.successors(l).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(l!==h);a.push(f)}}return r.nodes().forEach(function(l){e.has(o,l)||u(l)}),a}return Bv}var Fv,YC;function OU(){if(YC)return Fv;YC=1;var e=Rr(),t=Pj();Fv=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 Fv}var $v,XC;function CU(){if(XC)return $v;XC=1;var e=Rr();$v=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={},l=i.nodes();return l.forEach(function(d){u[d]={},u[d][d]={distance:0},l.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}})}),l.forEach(function(d){var f=u[d];l.forEach(function(h){var p=u[h];l.forEach(function(v){var m=p[d],y=f[v],x=p[v],b=m.distance+y.distance;b<x.distance&&(x.distance=b,x.predecessor=y.predecessor)})})}),u}return $v}var zv,ZC;function Nj(){if(ZC)return zv;ZC=1;var e=Rr();zv=t,t.CycleException=r;function t(n){var i={},o={},a=[];function u(l){if(e.has(o,l))throw new r;e.has(i,l)||(o[l]=!0,i[l]=!0,e.each(n.predecessors(l),u),delete o[l],a.push(l))}if(e.each(n.sinks(),u),e.size(i)!==n.nodeCount())throw new r;return a}function r(){}return r.prototype=new Error,zv}var Hv,JC;function RU(){if(JC)return Hv;JC=1;var e=Nj();Hv=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return Hv}var Vv,QC;function Tj(){if(QC)return Vv;QC=1;var e=Rr();Vv=t;function t(n,i,o){e.isArray(i)||(i=[i]);var a=(n.isDirected()?n.successors:n.neighbors).bind(n),u=[],l={};return e.each(i,function(d){if(!n.hasNode(d))throw new Error("Graph does not have node: "+d);r(n,d,o==="post",l,a,u)}),u}function r(n,i,o,a,u,l){e.has(a,i)||(a[i]=!0,o||l.push(i),e.each(u(i),function(d){r(n,d,o,a,u,l)}),o&&l.push(i))}return Vv}var Uv,eR;function IU(){if(eR)return Uv;eR=1;var e=Tj();Uv=t;function t(r,n){return e(r,n,"post")}return Uv}var Wv,tR;function PU(){if(tR)return Wv;tR=1;var e=Tj();Wv=t;function t(r,n){return e(r,n,"pre")}return Wv}var Gv,rR;function NU(){if(rR)return Gv;rR=1;var e=Rr(),t=Px(),r=Rj();Gv=n;function n(i,o){var a=new t,u={},l=new r,d;function f(p){var v=p.v===d?p.w:p.v,m=l.priority(v);if(m!==void 0){var y=o(p);y<m&&(u[v]=d,l.decrease(v,y))}}if(i.nodeCount()===0)return a;e.each(i.nodes(),function(p){l.add(p,Number.POSITIVE_INFINITY),a.setNode(p)}),l.decrease(i.nodes()[0],0);for(var h=!1;l.size()>0;){if(d=l.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 Gv}var Kv,nR;function TU(){return nR||(nR=1,Kv={components:EU(),dijkstra:Ij(),dijkstraAll:SU(),findCycles:OU(),floydWarshall:CU(),isAcyclic:RU(),postorder:IU(),preorder:PU(),prim:NU(),tarjan:Pj(),topsort:Nj()}),Kv}var Yv,iR;function AU(){if(iR)return Yv;iR=1;var e=wU();return Yv={Graph:e.Graph,json:_U(),alg:TU(),version:e.version},Yv}var Xv,oR;function Fr(){if(oR)return Xv;oR=1;var e;if(typeof hx=="function")try{e=AU()}catch{}return e||(e=window.graphlib),Xv=e,Xv}var Zv,aR;function MU(){if(aR)return Zv;aR=1;var e=rj(),t=1,r=4;function n(i){return e(i,t|r)}return Zv=n,Zv}var Jv,sR;function kl(){if(sR)return Jv;sR=1;var e=Co(),t=En(),r=Il(),n=Cr();function i(o,a,u){if(!n(u))return!1;var l=typeof a;return(l=="number"?t(u)&&r(a,u.length):l=="string"&&a in u)?e(u[a],o):!1}return Jv=i,Jv}var Qv,uR;function DU(){if(uR)return Qv;uR=1;var e=ql(),t=Co(),r=kl(),n=Ri(),i=Object.prototype,o=i.hasOwnProperty,a=e(function(u,l){u=Object(u);var d=-1,f=l.length,h=f>2?l[2]:void 0;for(h&&r(l[0],l[1],h)&&(f=1);++d<f;)for(var p=l[d],v=n(p),m=-1,y=v.length;++m<y;){var x=v[m],b=u[x];(b===void 0||t(b,i[x])&&!o.call(u,x))&&(u[x]=p[x])}return u});return Qv=a,Qv}var eg,lR;function jU(){if(lR)return eg;lR=1;var e=Sn(),t=En(),r=Wn();function n(i){return function(o,a,u){var l=Object(o);if(!t(o)){var d=e(a,3);o=r(o),a=function(h){return d(l[h],h,l)}}var f=i(o,a,u);return f>-1?l[d?o[f]:f]:void 0}}return eg=n,eg}var tg,cR;function qU(){if(cR)return tg;cR=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return tg=t,tg}var rg,fR;function kU(){if(fR)return rg;fR=1;var e=qU(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return rg=r,rg}var ng,dR;function LU(){if(dR)return ng;dR=1;var e=kU(),t=Cr(),r=No(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt;function l(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 ng=l,ng}var ig,hR;function Aj(){if(hR)return ig;hR=1;var e=LU(),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 ig=n,ig}var og,pR;function BU(){if(pR)return og;pR=1;var e=Aj();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return og=t,og}var ag,vR;function FU(){if(vR)return ag;vR=1;var e=Sj(),t=Sn(),r=BU(),n=Math.max;function i(o,a,u){var l=o==null?0:o.length;if(!l)return-1;var d=u==null?0:r(u);return d<0&&(d=n(l+d,0)),e(o,t(a,3),d)}return ag=i,ag}var sg,gR;function $U(){if(gR)return sg;gR=1;var e=jU(),t=FU(),r=e(t);return sg=r,sg}var ug,mR;function Mj(){if(mR)return ug;mR=1;var e=Ix();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return ug=t,ug}var lg,yR;function zU(){if(yR)return lg;yR=1;var e=Sx(),t=nj(),r=Ri();function n(i,o){return i==null?i:e(i,t(o),r)}return lg=n,lg}var cg,bR;function HU(){if(bR)return cg;bR=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return cg=e,cg}var fg,xR;function VU(){if(xR)return fg;xR=1;var e=Cl(),t=Ox(),r=Sn();function n(i,o){var a={};return o=r(o,3),t(i,function(u,l,d){e(a,l,o(u,l,d))}),a}return fg=n,fg}var dg,wR;function Nx(){if(wR)return dg;wR=1;var e=No();function t(r,n,i){for(var o=-1,a=r.length;++o<a;){var u=r[o],l=n(u);if(l!=null&&(d===void 0?l===l&&!e(l):i(l,d)))var d=l,f=u}return f}return dg=t,dg}var hg,_R;function UU(){if(_R)return hg;_R=1;function e(t,r){return t>r}return hg=e,hg}var pg,ER;function WU(){if(ER)return pg;ER=1;var e=Nx(),t=UU(),r=Ii();function n(i){return i&&i.length?e(i,r,t):void 0}return pg=n,pg}var vg,SR;function Dj(){if(SR)return vg;SR=1;var e=Cl(),t=Co();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return vg=r,vg}var gg,OR;function GU(){if(OR)return gg;OR=1;var e=Oi(),t=Tl(),r=on(),n="[object Object]",i=Function.prototype,o=Object.prototype,a=i.toString,u=o.hasOwnProperty,l=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)==l}return gg=d,gg}var mg,CR;function jj(){if(CR)return mg;CR=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return mg=e,mg}var yg,RR;function KU(){if(RR)return yg;RR=1;var e=Za(),t=Ri();function r(n){return e(n,t(n))}return yg=r,yg}var bg,IR;function YU(){if(IR)return bg;IR=1;var e=Dj(),t=VD(),r=QD(),n=UD(),i=tj(),o=Ja(),a=xt(),u=Oj(),l=Io(),d=Xa(),f=Cr(),h=GU(),p=Qa(),v=jj(),m=KU();function y(x,b,w,E,_,S,R){var I=v(x,w),P=v(b,w),A=R.get(P);if(A){e(x,w,A);return}var k=S?S(I,P,w+"",x,b,R):void 0,L=k===void 0;if(L){var $=a(P),j=!$&&l(P),D=!$&&!j&&p(P);k=P,$||j||D?a(I)?k=I:u(I)?k=n(I):j?(L=!1,k=t(P,!0)):D?(L=!1,k=r(P,!0)):k=[]:h(P)||o(P)?(k=I,o(I)?k=m(I):(!f(I)||d(I))&&(k=i(P))):L=!1}L&&(R.set(P,k),_(k,P,E,S,R),R.delete(P)),e(x,w,k)}return bg=y,bg}var xg,PR;function XU(){if(PR)return xg;PR=1;var e=Ol(),t=Dj(),r=Sx(),n=YU(),i=Cr(),o=Ri(),a=jj();function u(l,d,f,h,p){l!==d&&r(d,function(v,m){if(p||(p=new e),i(v))n(l,d,m,f,u,h,p);else{var y=h?h(a(l,m),v,m+"",l,d,p):void 0;y===void 0&&(y=v),t(l,m,y)}},o)}return xg=u,xg}var wg,NR;function ZU(){if(NR)return wg;NR=1;var e=ql(),t=kl();function r(n){return e(function(i,o){var a=-1,u=o.length,l=u>1?o[u-1]:void 0,d=u>2?o[2]:void 0;for(l=n.length>3&&typeof l=="function"?(u--,l):void 0,d&&t(o[0],o[1],d)&&(l=u<3?void 0:l,u=1),i=Object(i);++a<u;){var f=o[a];f&&n(i,f,a,l)}return i})}return wg=r,wg}var _g,TR;function JU(){if(TR)return _g;TR=1;var e=XU(),t=ZU(),r=t(function(n,i,o){e(n,i,o)});return _g=r,_g}var Eg,AR;function qj(){if(AR)return Eg;AR=1;function e(t,r){return t<r}return Eg=e,Eg}var Sg,MR;function QU(){if(MR)return Sg;MR=1;var e=Nx(),t=qj(),r=Ii();function n(i){return i&&i.length?e(i,r,t):void 0}return Sg=n,Sg}var Og,DR;function eW(){if(DR)return Og;DR=1;var e=Nx(),t=Sn(),r=qj();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return Og=n,Og}var Cg,jR;function tW(){if(jR)return Cg;jR=1;var e=Hr(),t=function(){return e.Date.now()};return Cg=t,Cg}var Rg,qR;function rW(){if(qR)return Rg;qR=1;var e=Rl(),t=Dl(),r=Il(),n=Cr(),i=es();function o(a,u,l,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=l;if(m==="__proto__"||m==="constructor"||m==="prototype")return a;if(f!=p){var x=v[m];y=d?d(x,m,v):void 0,y===void 0&&(y=n(x)?x:r(u[f+1])?[]:{})}e(v,m,y),v=v[m]}return a}return Rg=o,Rg}var Ig,kR;function nW(){if(kR)return Ig;kR=1;var e=jl(),t=rW(),r=Dl();function n(i,o,a){for(var u=-1,l=o.length,d={};++u<l;){var f=o[u],h=e(i,f);a(h,f)&&t(d,r(f,i),h)}return d}return Ig=n,Ig}var Pg,LR;function iW(){if(LR)return Pg;LR=1;var e=nW(),t=pj();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return Pg=r,Pg}var Ng,BR;function oW(){if(BR)return Ng;BR=1;var e=Mj(),t=_j(),r=Ej();function n(i){return r(t(i,void 0,e),i+"")}return Ng=n,Ng}var Tg,FR;function aW(){if(FR)return Tg;FR=1;var e=iW(),t=oW(),r=t(function(n,i){return n==null?{}:e(n,i)});return Tg=r,Tg}var Ag,$R;function sW(){if($R)return Ag;$R=1;var e=Math.ceil,t=Math.max;function r(n,i,o,a){for(var u=-1,l=t(e((i-n)/(o||1)),0),d=Array(l);l--;)d[a?l:++u]=n,n+=o;return d}return Ag=r,Ag}var Mg,zR;function uW(){if(zR)return Mg;zR=1;var e=sW(),t=kl(),r=Aj();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 Mg=n,Mg}var Dg,HR;function lW(){if(HR)return Dg;HR=1;var e=uW(),t=e();return Dg=t,Dg}var jg,VR;function cW(){if(VR)return jg;VR=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return jg=e,jg}var qg,UR;function fW(){if(UR)return qg;UR=1;var e=No();function t(r,n){if(r!==n){var i=r!==void 0,o=r===null,a=r===r,u=e(r),l=n!==void 0,d=n===null,f=n===n,h=e(n);if(!d&&!h&&!u&&r>n||u&&l&&f&&!d&&!h||o&&l&&f||!i&&f||!a)return 1;if(!o&&!u&&!h&&r<n||h&&i&&a&&!o&&!u||d&&i&&a||!l&&a||!f)return-1}return 0}return qg=t,qg}var kg,WR;function dW(){if(WR)return kg;WR=1;var e=fW();function t(r,n,i){for(var o=-1,a=r.criteria,u=n.criteria,l=a.length,d=i.length;++o<l;){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 kg=t,kg}var Lg,GR;function hW(){if(GR)return Lg;GR=1;var e=Ml(),t=jl(),r=Sn(),n=bj(),i=cW(),o=Pl(),a=dW(),u=Ii(),l=xt();function d(f,h,p){h.length?h=e(h,function(y){return l(y)?function(x){return t(x,y.length===1?y[0]:y)}:y}):h=[u];var v=-1;h=e(h,o(r));var m=n(f,function(y,x,b){var w=e(h,function(E){return E(y)});return{criteria:w,index:++v,value:y}});return i(m,function(y,x){return a(y,x,p)})}return Lg=d,Lg}var Bg,KR;function pW(){if(KR)return Bg;KR=1;var e=Ix(),t=hW(),r=ql(),n=kl(),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 Bg=i,Bg}var Fg,YR;function vW(){if(YR)return Fg;YR=1;var e=dj(),t=0;function r(n){var i=++t;return e(n)+i}return Fg=r,Fg}var $g,XR;function gW(){if(XR)return $g;XR=1;function e(t,r,n){for(var i=-1,o=t.length,a=r.length,u={};++i<o;){var l=i<a?r[i]:void 0;n(u,t[i],l)}return u}return $g=e,$g}var zg,ZR;function mW(){if(ZR)return zg;ZR=1;var e=Rl(),t=gW();function r(n,i){return t(n||[],i||[],e)}return zg=r,zg}var Hg,JR;function ut(){if(JR)return Hg;JR=1;var e;if(typeof hx=="function")try{e={cloneDeep:MU(),constant:Ex(),defaults:DU(),each:oj(),filter:gj(),find:$U(),flatten:Mj(),forEach:ij(),forIn:zU(),has:mj(),isUndefined:yj(),last:HU(),map:xj(),mapValues:VU(),max:WU(),merge:JU(),min:QU(),minBy:eW(),now:tW(),pick:aW(),range:lW(),reduce:wj(),sortBy:pW(),uniqueId:vW(),values:Cj(),zipObject:mW()}}catch{}return e||(e=window._),Hg=e,Hg}var Vg,QR;function yW(){if(QR)return Vg;QR=1,Vg=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 Vg}var Ug,eI;function bW(){if(eI)return Ug;eI=1;var e=ut(),t=Fr().Graph,r=yW();Ug=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 x=f.length-2;x>0;--x)if(y=f[x].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 x=d.edge(y),b=d.node(y.v);v&&m.push({v:y.v,w:y.w}),b.out-=x,l(f,h,b)}),e.forEach(d.outEdges(p.v),function(y){var x=d.edge(y),b=y.w,w=d.node(b);w.in-=x,l(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(x){h.setNode(x,{v:x,in:0,out:0})}),e.forEach(d.edges(),function(x){var b=h.edge(x.v,x.w)||0,w=f(x),E=b+w;h.setEdge(x.v,x.w,E),v=Math.max(v,h.node(x.v).out+=w),p=Math.max(p,h.node(x.w).in+=w)});var m=e.range(v+p+3).map(function(){return new r}),y=p+1;return e.forEach(h.nodes(),function(x){l(m,y,h.node(x))}),{graph:h,buckets:m,zeroIdx:y}}function l(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 Ug}var Wg,tI;function xW(){if(tI)return Wg;tI=1;var e=ut(),t=bW();Wg={run:r,undo:i};function r(o){var a=o.graph().acyclicer==="greedy"?t(o,u(o)):n(o);e.forEach(a,function(l){var d=o.edge(l);o.removeEdge(l),d.forwardName=l.name,d.reversed=!0,o.setEdge(l.w,l.v,d,e.uniqueId("rev"))});function u(l){return function(d){return l.edge(d).weight}}}function n(o){var a=[],u={},l={};function d(f){e.has(l,f)||(l[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 l=u.forwardName;delete u.reversed,delete u.forwardName,o.setEdge(a.w,a.v,u,l)}})}return Wg}var Gg,rI;function Yt(){if(rI)return Gg;rI=1;var e=ut(),t=Fr().Graph;Gg={addDummyNode:r,simplify:n,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:a,intersectRect:u,buildLayerMatrix:l,normalizeRanks:d,removeEmptyRanks:f,addBorderNode:h,maxRank:p,partition:v,time:m,notime:y};function r(x,b,w,E){var _;do _=e.uniqueId(E);while(x.hasNode(_));return w.dummy=b,x.setNode(_,w),_}function n(x){var b=new t().setGraph(x.graph());return e.forEach(x.nodes(),function(w){b.setNode(w,x.node(w))}),e.forEach(x.edges(),function(w){var E=b.edge(w.v,w.w)||{weight:0,minlen:1},_=x.edge(w);b.setEdge(w.v,w.w,{weight:E.weight+_.weight,minlen:Math.max(E.minlen,_.minlen)})}),b}function i(x){var b=new t({multigraph:x.isMultigraph()}).setGraph(x.graph());return e.forEach(x.nodes(),function(w){x.children(w).length||b.setNode(w,x.node(w))}),e.forEach(x.edges(),function(w){b.setEdge(w,x.edge(w))}),b}function o(x){var b=e.map(x.nodes(),function(w){var E={};return e.forEach(x.outEdges(w),function(_){E[_.w]=(E[_.w]||0)+x.edge(_).weight}),E});return e.zipObject(x.nodes(),b)}function a(x){var b=e.map(x.nodes(),function(w){var E={};return e.forEach(x.inEdges(w),function(_){E[_.v]=(E[_.v]||0)+x.edge(_).weight}),E});return e.zipObject(x.nodes(),b)}function u(x,b){var w=x.x,E=x.y,_=b.x-w,S=b.y-E,R=x.width/2,I=x.height/2;if(!_&&!S)throw new Error("Not possible to find intersection inside of the rectangle");var P,A;return Math.abs(S)*R>Math.abs(_)*I?(S<0&&(I=-I),P=I*_/S,A=I):(_<0&&(R=-R),P=R,A=R*S/_),{x:w+P,y:E+A}}function l(x){var b=e.map(e.range(p(x)+1),function(){return[]});return e.forEach(x.nodes(),function(w){var E=x.node(w),_=E.rank;e.isUndefined(_)||(b[_][E.order]=w)}),b}function d(x){var b=e.min(e.map(x.nodes(),function(w){return x.node(w).rank}));e.forEach(x.nodes(),function(w){var E=x.node(w);e.has(E,"rank")&&(E.rank-=b)})}function f(x){var b=e.min(e.map(x.nodes(),function(S){return x.node(S).rank})),w=[];e.forEach(x.nodes(),function(S){var R=x.node(S).rank-b;w[R]||(w[R]=[]),w[R].push(S)});var E=0,_=x.graph().nodeRankFactor;e.forEach(w,function(S,R){e.isUndefined(S)&&R%_!==0?--E:E&&e.forEach(S,function(I){x.node(I).rank+=E})})}function h(x,b,w,E){var _={width:0,height:0};return arguments.length>=4&&(_.rank=w,_.order=E),r(x,"border",_,b)}function p(x){return e.max(e.map(x.nodes(),function(b){var w=x.node(b).rank;if(!e.isUndefined(w))return w}))}function v(x,b){var w={lhs:[],rhs:[]};return e.forEach(x,function(E){b(E)?w.lhs.push(E):w.rhs.push(E)}),w}function m(x,b){var w=e.now();try{return b()}finally{console.log(x+" time: "+(e.now()-w)+"ms")}}function y(x,b){return b()}return Gg}var Kg,nI;function wW(){if(nI)return Kg;nI=1;var e=ut(),t=Yt();Kg={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,l=o.node(u).rank,d=a.w,f=o.node(d).rank,h=a.name,p=o.edge(a),v=p.labelRank;if(f!==l+1){o.removeEdge(a);var m,y,x;for(x=0,++l;l<f;++x,++l)p.points=[],y={width:0,height:0,edgeLabel:p,edgeObj:a,rank:l},m=t.addDummyNode(o,"edge",y,"_d"),l===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),x===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),l=u.edgeLabel,d;for(o.setEdge(u.edgeObj,l);u.dummy;)d=o.successors(a)[0],o.removeNode(a),l.points.push({x:u.x,y:u.y}),u.dummy==="edge-label"&&(l.x=u.x,l.y=u.y,l.width=u.width,l.height=u.height),a=d,u=o.node(a)})}return Kg}var Yg,iI;function zu(){if(iI)return Yg;iI=1;var e=ut();Yg={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 l=e.min(e.map(n.outEdges(a),function(d){return o(d.w)-n.edge(d).minlen}));return(l===Number.POSITIVE_INFINITY||l===void 0||l===null)&&(l=0),u.rank=l}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 Yg}var Xg,oI;function kj(){if(oI)return Xg;oI=1;var e=ut(),t=Fr().Graph,r=zu().slack;Xg=n;function n(u){var l=new t({directed:!1}),d=u.nodes()[0],f=u.nodeCount();l.setNode(d,{});for(var h,p;i(l,u)<f;)h=o(l,u),p=l.hasNode(h.v)?r(u,h):-r(u,h),a(l,u,p);return l}function i(u,l){function d(f){e.forEach(l.nodeEdges(f),function(h){var p=h.v,v=f===p?h.w:p;!u.hasNode(v)&&!r(l,h)&&(u.setNode(v,{}),u.setEdge(f,v,{}),d(v))})}return e.forEach(u.nodes(),d),u.nodeCount()}function o(u,l){return e.minBy(l.edges(),function(d){if(u.hasNode(d.v)!==u.hasNode(d.w))return r(l,d)})}function a(u,l,d){e.forEach(u.nodes(),function(f){l.node(f).rank+=d})}return Xg}var Zg,aI;function _W(){if(aI)return Zg;aI=1;var e=ut(),t=kj(),r=zu().slack,n=zu().longestPath,i=Fr().alg.preorder,o=Fr().alg.postorder,a=Yt().simplify;Zg=u,u.initLowLimValues=h,u.initCutValues=l,u.calcCutValue=f,u.leaveEdge=v,u.enterEdge=m,u.exchangeEdges=y;function u(E){E=a(E),n(E);var _=t(E);h(_),l(_,E);for(var S,R;S=v(_);)R=m(_,E,S),y(_,E,S,R)}function l(E,_){var S=o(E,E.nodes());S=S.slice(0,S.length-1),e.forEach(S,function(R){d(E,_,R)})}function d(E,_,S){var R=E.node(S),I=R.parent;E.edge(S,I).cutvalue=f(E,_,S)}function f(E,_,S){var R=E.node(S),I=R.parent,P=!0,A=_.edge(S,I),k=0;return A||(P=!1,A=_.edge(I,S)),k=A.weight,e.forEach(_.nodeEdges(S),function(L){var $=L.v===S,j=$?L.w:L.v;if(j!==I){var D=$===P,G=_.edge(L).weight;if(k+=D?G:-G,b(E,S,j)){var B=E.edge(S,j).cutvalue;k+=D?-B:B}}}),k}function h(E,_){arguments.length<2&&(_=E.nodes()[0]),p(E,{},1,_)}function p(E,_,S,R,I){var P=S,A=E.node(R);return _[R]=!0,e.forEach(E.neighbors(R),function(k){e.has(_,k)||(S=p(E,_,S,k,R))}),A.low=P,A.lim=S++,I?A.parent=I:delete A.parent,S}function v(E){return e.find(E.edges(),function(_){return E.edge(_).cutvalue<0})}function m(E,_,S){var R=S.v,I=S.w;_.hasEdge(R,I)||(R=S.w,I=S.v);var P=E.node(R),A=E.node(I),k=P,L=!1;P.lim>A.lim&&(k=A,L=!0);var $=e.filter(_.edges(),function(j){return L===w(E,E.node(j.v),k)&&L!==w(E,E.node(j.w),k)});return e.minBy($,function(j){return r(_,j)})}function y(E,_,S,R){var I=S.v,P=S.w;E.removeEdge(I,P),E.setEdge(R.v,R.w,{}),h(E),l(E,_),x(E,_)}function x(E,_){var S=e.find(E.nodes(),function(I){return!_.node(I).parent}),R=i(E,S);R=R.slice(1),e.forEach(R,function(I){var P=E.node(I).parent,A=_.edge(I,P),k=!1;A||(A=_.edge(P,I),k=!0),_.node(I).rank=_.node(P).rank+(k?A.minlen:-A.minlen)})}function b(E,_,S){return E.hasEdge(_,S)}function w(E,_,S){return S.low<=_.lim&&_.lim<=S.lim}return Zg}var Jg,sI;function EW(){if(sI)return Jg;sI=1;var e=zu(),t=e.longestPath,r=kj(),n=_W();Jg=i;function i(l){switch(l.graph().ranker){case"network-simplex":u(l);break;case"tight-tree":a(l);break;case"longest-path":o(l);break;default:u(l)}}var o=t;function a(l){t(l),r(l)}function u(l){n(l)}return Jg}var Qg,uI;function SW(){if(uI)return Qg;uI=1;var e=ut();Qg=t;function t(i){var o=n(i);e.forEach(i.graph().dummyChains,function(a){for(var u=i.node(a),l=u.edgeObj,d=r(i,o,l.v,l.w),f=d.path,h=d.lca,p=0,v=f[p],m=!0;a!==l.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 l=[],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),l.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:l.concat(d.reverse()),lca:v}}function n(i){var o={},a=0;function u(l){var d=a;e.forEach(i.children(l),u),o[l]={low:d,lim:a++}}return e.forEach(i.children(),u),o}return Qg}var em,lI;function OW(){if(lI)return em;lI=1;var e=ut(),t=Yt();em={run:r,cleanup:a};function r(u){var l=t.addDummyNode(u,"root",{},"_root"),d=i(u),f=e.max(e.values(d))-1,h=2*f+1;u.graph().nestingRoot=l,e.forEach(u.edges(),function(v){u.edge(v).minlen*=h});var p=o(u)+1;e.forEach(u.children(),function(v){n(u,l,h,p,f,d,v)}),u.graph().nodeRankFactor=h}function n(u,l,d,f,h,p,v){var m=u.children(v);if(!m.length){v!==l&&u.setEdge(l,v,{weight:0,minlen:d});return}var y=t.addBorderNode(u,"_bt"),x=t.addBorderNode(u,"_bb"),b=u.node(v);u.setParent(y,v),b.borderTop=y,u.setParent(x,v),b.borderBottom=x,e.forEach(m,function(w){n(u,l,d,f,h,p,w);var E=u.node(w),_=E.borderTop?E.borderTop:w,S=E.borderBottom?E.borderBottom:w,R=E.borderTop?f:2*f,I=_!==S?1:h-p[v]+1;u.setEdge(y,_,{weight:R,minlen:I,nestingEdge:!0}),u.setEdge(S,x,{weight:R,minlen:I,nestingEdge:!0})}),u.parent(v)||u.setEdge(l,y,{weight:0,minlen:h+p[v]})}function i(u){var l={};function d(f,h){var p=u.children(f);p&&p.length&&e.forEach(p,function(v){d(v,h+1)}),l[f]=h}return e.forEach(u.children(),function(f){d(f,1)}),l}function o(u){return e.reduce(u.edges(),function(l,d){return l+u.edge(d).weight},0)}function a(u){var l=u.graph();u.removeNode(l.nestingRoot),delete l.nestingRoot,e.forEach(u.edges(),function(d){var f=u.edge(d);f.nestingEdge&&u.removeEdge(d)})}return em}var tm,cI;function CW(){if(cI)return tm;cI=1;var e=ut(),t=Yt();tm=r;function r(i){function o(a){var u=i.children(a),l=i.node(a);if(u.length&&e.forEach(u,o),e.has(l,"minRank")){l.borderLeft=[],l.borderRight=[];for(var d=l.minRank,f=l.maxRank+1;d<f;++d)n(i,"borderLeft","_bl",a,l,d),n(i,"borderRight","_br",a,l,d)}}e.forEach(i.children(),o)}function n(i,o,a,u,l,d){var f={width:0,height:0,rank:d,borderType:o},h=l[o][d-1],p=t.addDummyNode(i,"border",f,a);l[o][d]=p,i.setParent(p,u),h&&i.setEdge(h,p,{weight:1})}return tm}var rm,fI;function RW(){if(fI)return rm;fI=1;var e=ut();rm={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){l(d.node(f))}),e.forEach(d.edges(),function(f){var h=d.edge(f);e.forEach(h.points,l),e.has(h,"x")&&l(h)})}function l(d){var f=d.x;d.x=d.y,d.y=f}return rm}var nm,dI;function IW(){if(dI)return nm;dI=1;var e=ut();nm=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 l=e.sortBy(i,function(d){return r.node(d).rank});return e.forEach(l,u),a}return nm}var im,hI;function PW(){if(hI)return im;hI=1;var e=ut();im=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),l=1;l<o.length;)l<<=1;var d=2*l-1;l-=1;var f=e.map(new Array(d),function(){return 0}),h=0;return e.forEach(u.forEach(function(p){var v=p.pos+l;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 im}var om,pI;function NW(){if(pI)return om;pI=1;var e=ut();om=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,l){var d=r.edge(l),f=r.node(l.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 om}var am,vI;function TW(){if(vI)return am;vI=1;var e=ut();am=t;function t(i,o){var a={};e.forEach(i,function(l,d){var f=a[l.v]={indegree:0,in:[],out:[],vs:[l.v],i:d};e.isUndefined(l.barycenter)||(f.barycenter=l.barycenter,f.weight=l.weight)}),e.forEach(o.edges(),function(l){var d=a[l.v],f=a[l.w];!e.isUndefined(d)&&!e.isUndefined(f)&&(f.indegree++,d.out.push(a[l.w]))});var u=e.filter(a,function(l){return!l.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 l=i.pop();o.push(l),e.forEach(l.in.reverse(),a(l)),e.forEach(l.out,u(l))}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 am}var sm,gI;function AW(){if(gI)return sm;gI=1;var e=ut(),t=Yt();sm=r;function r(o,a){var u=t.partition(o,function(y){return e.has(y,"barycenter")}),l=u.lhs,d=e.sortBy(u.rhs,function(y){return-y.i}),f=[],h=0,p=0,v=0;l.sort(i(!!a)),v=n(f,d,v),e.forEach(l,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 l;a.length&&(l=e.last(a)).i<=u;)a.pop(),o.push(l.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 sm}var um,mI;function MW(){if(mI)return um;mI=1;var e=ut(),t=NW(),r=TW(),n=AW();um=i;function i(u,l,d,f){var h=u.children(l),p=u.node(l),v=p?p.borderLeft:void 0,m=p?p.borderRight:void 0,y={};v&&(h=e.filter(h,function(S){return S!==v&&S!==m}));var x=t(u,h);e.forEach(x,function(S){if(u.children(S.v).length){var R=i(u,S.v,d,f);y[S.v]=R,e.has(R,"barycenter")&&a(S,R)}});var b=r(x,d);o(b,y);var w=n(b,f);if(v&&(w.vs=e.flatten([v,w.vs,m],!0),u.predecessors(v).length)){var E=u.node(u.predecessors(v)[0]),_=u.node(u.predecessors(m)[0]);e.has(w,"barycenter")||(w.barycenter=0,w.weight=0),w.barycenter=(w.barycenter*w.weight+E.order+_.order)/(w.weight+2),w.weight+=2}return w}function o(u,l){e.forEach(u,function(d){d.vs=e.flatten(d.vs.map(function(f){return l[f]?l[f].vs:f}),!0)})}function a(u,l){e.isUndefined(u.barycenter)?(u.barycenter=l.barycenter,u.weight=l.weight):(u.barycenter=(u.barycenter*u.weight+l.barycenter*l.weight)/(u.weight+l.weight),u.weight+=l.weight)}return um}var lm,yI;function DW(){if(yI)return lm;yI=1;var e=ut(),t=Fr().Graph;lm=r;function r(i,o,a){var u=n(i),l=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)&&(l.setNode(d),l.setParent(d,h||u),e.forEach(i[a](d),function(p){var v=p.v===d?p.w:p.v,m=l.edge(v,d),y=e.isUndefined(m)?0:m.weight;l.setEdge(v,d,{weight:i.edge(p).weight+y})}),e.has(f,"minRank")&&l.setNode(d,{borderLeft:f.borderLeft[o],borderRight:f.borderRight[o]}))}),l}function n(i){for(var o;i.hasNode(o=e.uniqueId("_root")););return o}return lm}var cm,bI;function jW(){if(bI)return cm;bI=1;var e=ut();cm=t;function t(r,n,i){var o={},a;e.forEach(i,function(u){for(var l=r.parent(u),d,f;l;){if(d=r.parent(l),d?(f=o[d],o[d]=l):(f=a,a=l),f&&f!==l){n.setEdge(f,l);return}l=d}})}return cm}var fm,xI;function qW(){if(xI)return fm;xI=1;var e=ut(),t=IW(),r=PW(),n=MW(),i=DW(),o=jW(),a=Fr().Graph,u=Yt();fm=l;function l(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"),x=t(p);h(p,x);for(var b=Number.POSITIVE_INFINITY,w,E=0,_=0;_<4;++E,++_){f(E%2?m:y,E%4>=2),x=u.buildLayerMatrix(p);var S=r(p,x);S<b&&(_=0,w=e.cloneDeep(x),b=S)}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 x=y.graph().root,b=n(y,x,m,v);e.forEach(b.vs,function(w,E){y.node(w).order=E}),o(y,m,b.vs)})}function h(p,v){e.forEach(v,function(m){e.forEach(m,function(y,x){p.node(y).order=x})})}return fm}var dm,wI;function kW(){if(wI)return dm;wI=1;var e=ut(),t=Fr().Graph,r=Yt();dm={positionX:m,findType1Conflicts:n,findType2Conflicts:i,addConflict:a,hasConflict:u,verticalAlignment:l,horizontalCompaction:d,alignCoordinates:p,findSmallestWidthAlignment:h,balance:v};function n(b,w){var E={};function _(S,R){var I=0,P=0,A=S.length,k=e.last(R);return e.forEach(R,function(L,$){var j=o(b,L),D=j?b.node(j).order:A;(j||L===k)&&(e.forEach(R.slice(P,$+1),function(G){e.forEach(b.predecessors(G),function(B){var Y=b.node(B),Z=Y.order;(Z<I||D<Z)&&!(Y.dummy&&b.node(G).dummy)&&a(E,B,G)})}),P=$+1,I=D)}),R}return e.reduce(w,_),E}function i(b,w){var E={};function _(R,I,P,A,k){var L;e.forEach(e.range(I,P),function($){L=R[$],b.node(L).dummy&&e.forEach(b.predecessors(L),function(j){var D=b.node(j);D.dummy&&(D.order<A||D.order>k)&&a(E,j,L)})})}function S(R,I){var P=-1,A,k=0;return e.forEach(I,function(L,$){if(b.node(L).dummy==="border"){var j=b.predecessors(L);j.length&&(A=b.node(j[0]).order,_(I,k,$,P,A),k=$,P=A)}_(I,k,I.length,A,R.length)}),I}return e.reduce(w,S),E}function o(b,w){if(b.node(w).dummy)return e.find(b.predecessors(w),function(E){return b.node(E).dummy})}function a(b,w,E){if(w>E){var _=w;w=E,E=_}var S=b[w];S||(b[w]=S={}),S[E]=!0}function u(b,w,E){if(w>E){var _=w;w=E,E=_}return e.has(b[w],E)}function l(b,w,E,_){var S={},R={},I={};return e.forEach(w,function(P){e.forEach(P,function(A,k){S[A]=A,R[A]=A,I[A]=k})}),e.forEach(w,function(P){var A=-1;e.forEach(P,function(k){var L=_(k);if(L.length){L=e.sortBy(L,function(B){return I[B]});for(var $=(L.length-1)/2,j=Math.floor($),D=Math.ceil($);j<=D;++j){var G=L[j];R[k]===k&&A<I[G]&&!u(E,k,G)&&(R[G]=k,R[k]=S[k]=S[G],A=I[G])}}})}),{root:S,align:R}}function d(b,w,E,_,S){var R={},I=f(b,w,E,S),P=S?"borderLeft":"borderRight";function A($,j){for(var D=I.nodes(),G=D.pop(),B={};G;)B[G]?$(G):(B[G]=!0,D.push(G),D=D.concat(j(G))),G=D.pop()}function k($){R[$]=I.inEdges($).reduce(function(j,D){return Math.max(j,R[D.v]+I.edge(D))},0)}function L($){var j=I.outEdges($).reduce(function(G,B){return Math.min(G,R[B.w]-I.edge(B))},Number.POSITIVE_INFINITY),D=b.node($);j!==Number.POSITIVE_INFINITY&&D.borderType!==P&&(R[$]=Math.max(R[$],j))}return A(k,I.predecessors.bind(I)),A(L,I.successors.bind(I)),e.forEach(_,function($){R[$]=R[E[$]]}),R}function f(b,w,E,_){var S=new t,R=b.graph(),I=y(R.nodesep,R.edgesep,_);return e.forEach(w,function(P){var A;e.forEach(P,function(k){var L=E[k];if(S.setNode(L),A){var $=E[A],j=S.edge($,L);S.setEdge($,L,Math.max(I(b,k,A),j||0))}A=k})}),S}function h(b,w){return e.minBy(e.values(w),function(E){var _=Number.NEGATIVE_INFINITY,S=Number.POSITIVE_INFINITY;return e.forIn(E,function(R,I){var P=x(b,I)/2;_=Math.max(R+P,_),S=Math.min(R-P,S)}),_-S})}function p(b,w){var E=e.values(w),_=e.min(E),S=e.max(E);e.forEach(["u","d"],function(R){e.forEach(["l","r"],function(I){var P=R+I,A=b[P],k;if(A!==w){var L=e.values(A);k=I==="l"?_-e.min(L):S-e.max(L),k&&(b[P]=e.mapValues(A,function($){return $+k}))}})})}function v(b,w){return e.mapValues(b.ul,function(E,_){if(w)return b[w.toLowerCase()][_];var S=e.sortBy(e.map(b,_));return(S[1]+S[2])/2})}function m(b){var w=r.buildLayerMatrix(b),E=e.merge(n(b,w),i(b,w)),_={},S;e.forEach(["u","d"],function(I){S=I==="u"?w:e.values(w).reverse(),e.forEach(["l","r"],function(P){P==="r"&&(S=e.map(S,function($){return e.values($).reverse()}));var A=(I==="u"?b.predecessors:b.successors).bind(b),k=l(b,S,E,A),L=d(b,S,k.root,k.align,P==="r");P==="r"&&(L=e.mapValues(L,function($){return-$})),_[I+P]=L})});var R=h(b,_);return p(_,R),v(_,b.graph().align)}function y(b,w,E){return function(_,S,R){var I=_.node(S),P=_.node(R),A=0,k;if(A+=I.width/2,e.has(I,"labelpos"))switch(I.labelpos.toLowerCase()){case"l":k=-I.width/2;break;case"r":k=I.width/2;break}if(k&&(A+=E?k:-k),k=0,A+=(I.dummy?w:b)/2,A+=(P.dummy?w:b)/2,A+=P.width/2,e.has(P,"labelpos"))switch(P.labelpos.toLowerCase()){case"l":k=P.width/2;break;case"r":k=-P.width/2;break}return k&&(A+=E?k:-k),k=0,A}}function x(b,w){return b.node(w).width}return dm}var hm,_I;function LW(){if(_I)return hm;_I=1;var e=ut(),t=Yt(),r=kW().positionX;hm=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,l=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=l+f/2}),l+=f+u})}return hm}var pm,EI;function BW(){if(EI)return pm;EI=1;var e=ut(),t=xW(),r=wW(),n=EW(),i=Yt().normalizeRanks,o=SW(),a=Yt().removeEmptyRanks,u=OW(),l=CW(),d=RW(),f=qW(),h=LW(),p=Yt(),v=Fr().Graph;pm=m;function m(F,W){var J=W&&W.debugTiming?p.time:p.notime;J("layout",function(){var H=J(" buildLayoutGraph",function(){return A(F)});J(" runLayout",function(){y(H,J)}),J(" updateInputGraph",function(){x(F,H)})})}function y(F,W){W(" makeSpaceForEdgeLabels",function(){k(F)}),W(" removeSelfEdges",function(){te(F)}),W(" acyclic",function(){t.run(F)}),W(" nestingGraph.run",function(){u.run(F)}),W(" rank",function(){n(p.asNonCompoundGraph(F))}),W(" injectEdgeLabelProxies",function(){L(F)}),W(" removeEmptyRanks",function(){a(F)}),W(" nestingGraph.cleanup",function(){u.cleanup(F)}),W(" normalizeRanks",function(){i(F)}),W(" assignRankMinMax",function(){$(F)}),W(" removeEdgeLabelProxies",function(){j(F)}),W(" normalize.run",function(){r.run(F)}),W(" parentDummyChains",function(){o(F)}),W(" addBorderSegments",function(){l(F)}),W(" order",function(){f(F)}),W(" insertSelfEdges",function(){U(F)}),W(" adjustCoordinateSystem",function(){d.adjust(F)}),W(" position",function(){h(F)}),W(" positionSelfEdges",function(){re(F)}),W(" removeBorderNodes",function(){Z(F)}),W(" normalize.undo",function(){r.undo(F)}),W(" fixupEdgeLabelCoords",function(){B(F)}),W(" undoCoordinateSystem",function(){d.undo(F)}),W(" translateGraph",function(){D(F)}),W(" assignNodeIntersects",function(){G(F)}),W(" reversePoints",function(){Y(F)}),W(" acyclic.undo",function(){t.undo(F)})}function x(F,W){e.forEach(F.nodes(),function(J){var H=F.node(J),K=W.node(J);H&&(H.x=K.x,H.y=K.y,W.children(J).length&&(H.width=K.width,H.height=K.height))}),e.forEach(F.edges(),function(J){var H=F.edge(J),K=W.edge(J);H.points=K.points,e.has(K,"x")&&(H.x=K.x,H.y=K.y)}),F.graph().width=W.graph().width,F.graph().height=W.graph().height}var b=["nodesep","edgesep","ranksep","marginx","marginy"],w={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},E=["acyclicer","ranker","rankdir","align"],_=["width","height"],S={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],I={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},P=["labelpos"];function A(F){var W=new v({multigraph:!0,compound:!0}),J=le(F.graph());return W.setGraph(e.merge({},w,ae(J,b),e.pick(J,E))),e.forEach(F.nodes(),function(H){var K=le(F.node(H));W.setNode(H,e.defaults(ae(K,_),S)),W.setParent(H,F.parent(H))}),e.forEach(F.edges(),function(H){var K=le(F.edge(H));W.setEdge(H,e.merge({},I,ae(K,R),e.pick(K,P)))}),W}function k(F){var W=F.graph();W.ranksep/=2,e.forEach(F.edges(),function(J){var H=F.edge(J);H.minlen*=2,H.labelpos.toLowerCase()!=="c"&&(W.rankdir==="TB"||W.rankdir==="BT"?H.width+=H.labeloffset:H.height+=H.labeloffset)})}function L(F){e.forEach(F.edges(),function(W){var J=F.edge(W);if(J.width&&J.height){var H=F.node(W.v),K=F.node(W.w),se={rank:(K.rank-H.rank)/2+H.rank,e:W};p.addDummyNode(F,"edge-proxy",se,"_ep")}})}function $(F){var W=0;e.forEach(F.nodes(),function(J){var H=F.node(J);H.borderTop&&(H.minRank=F.node(H.borderTop).rank,H.maxRank=F.node(H.borderBottom).rank,W=e.max(W,H.maxRank))}),F.graph().maxRank=W}function j(F){e.forEach(F.nodes(),function(W){var J=F.node(W);J.dummy==="edge-proxy"&&(F.edge(J.e).labelRank=J.rank,F.removeNode(W))})}function D(F){var W=Number.POSITIVE_INFINITY,J=0,H=Number.POSITIVE_INFINITY,K=0,se=F.graph(),oe=se.marginx||0,fe=se.marginy||0;function V(ee){var we=ee.x,be=ee.y,de=ee.width,ue=ee.height;W=Math.min(W,we-de/2),J=Math.max(J,we+de/2),H=Math.min(H,be-ue/2),K=Math.max(K,be+ue/2)}e.forEach(F.nodes(),function(ee){V(F.node(ee))}),e.forEach(F.edges(),function(ee){var we=F.edge(ee);e.has(we,"x")&&V(we)}),W-=oe,H-=fe,e.forEach(F.nodes(),function(ee){var we=F.node(ee);we.x-=W,we.y-=H}),e.forEach(F.edges(),function(ee){var we=F.edge(ee);e.forEach(we.points,function(be){be.x-=W,be.y-=H}),e.has(we,"x")&&(we.x-=W),e.has(we,"y")&&(we.y-=H)}),se.width=J-W+oe,se.height=K-H+fe}function G(F){e.forEach(F.edges(),function(W){var J=F.edge(W),H=F.node(W.v),K=F.node(W.w),se,oe;J.points?(se=J.points[0],oe=J.points[J.points.length-1]):(J.points=[],se=K,oe=H),J.points.unshift(p.intersectRect(H,se)),J.points.push(p.intersectRect(K,oe))})}function B(F){e.forEach(F.edges(),function(W){var J=F.edge(W);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 Y(F){e.forEach(F.edges(),function(W){var J=F.edge(W);J.reversed&&J.points.reverse()})}function Z(F){e.forEach(F.nodes(),function(W){if(F.children(W).length){var J=F.node(W),H=F.node(J.borderTop),K=F.node(J.borderBottom),se=F.node(e.last(J.borderLeft)),oe=F.node(e.last(J.borderRight));J.width=Math.abs(oe.x-se.x),J.height=Math.abs(K.y-H.y),J.x=se.x+J.width/2,J.y=H.y+J.height/2}}),e.forEach(F.nodes(),function(W){F.node(W).dummy==="border"&&F.removeNode(W)})}function te(F){e.forEach(F.edges(),function(W){if(W.v===W.w){var J=F.node(W.v);J.selfEdges||(J.selfEdges=[]),J.selfEdges.push({e:W,label:F.edge(W)}),F.removeEdge(W)}})}function U(F){var W=p.buildLayerMatrix(F);e.forEach(W,function(J){var H=0;e.forEach(J,function(K,se){var oe=F.node(K);oe.order=se+H,e.forEach(oe.selfEdges,function(fe){p.addDummyNode(F,"selfedge",{width:fe.label.width,height:fe.label.height,rank:oe.rank,order:se+ ++H,e:fe.e,label:fe.label},"_se")}),delete oe.selfEdges})})}function re(F){e.forEach(F.nodes(),function(W){var J=F.node(W);if(J.dummy==="selfedge"){var H=F.node(J.e.v),K=H.x+H.width/2,se=H.y,oe=J.x-K,fe=H.height/2;F.setEdge(J.e,J.label),F.removeNode(W),J.label.points=[{x:K+2*oe/3,y:se-fe},{x:K+5*oe/6,y:se-fe},{x:K+oe,y:se},{x:K+5*oe/6,y:se+fe},{x:K+2*oe/3,y:se+fe}],J.label.x=J.x,J.label.y=J.y}})}function ae(F,W){return e.mapValues(e.pick(F,W),Number)}function le(F){var W={};return e.forEach(F,function(J,H){W[H.toLowerCase()]=J}),W}return pm}var vm,SI;function FW(){if(SI)return vm;SI=1;var e=ut(),t=Yt(),r=Fr().Graph;vm={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,l){var d="layer"+l;a.setNode(d,{rank:"same"}),e.reduce(u,function(f,h){return a.setEdge(f,h,{style:"invis"}),h})}),a}return vm}var gm,OI;function $W(){return OI||(OI=1,gm="0.8.5"),gm}var mm,CI;function zW(){return CI||(CI=1,mm={graphlib:Fr(),layout:BW(),debug:FW(),util:{time:Yt().time,notime:Yt().notime},version:$W()}),mm}var HW=zW();const RI=Vn(HW);function VW(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)},l={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,l),l}const UW=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),II=UW?T.useEffect:T.useLayoutEffect;function WW(e){const t=typeof e=="function"?VW(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=T.useReducer(x=>x+1,0),a=t.getState(),u=T.useRef(a),l=T.useRef(n),d=T.useRef(i),f=T.useRef(!1),h=T.useRef();h.current===void 0&&(h.current=n(a));let p,v=!1;(u.current!==a||l.current!==n||d.current!==i||f.current)&&(p=n(a),v=!i(h.current,p)),II(()=>{v&&(h.current=p),u.current=a,l.current=n,d.current=i,f.current=!1});const m=T.useRef(a);II(()=>{const x=()=>{try{const w=t.getState(),E=l.current(w);d.current(h.current,E)||(u.current=w,h.current=E,o())}catch{f.current=!0,o()}},b=t.subscribe(x);return t.getState()!==m.current&&x(),b},[]);const y=v?p:h.current;return T.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 GW(){const e=T.createContext(void 0);return{Provider:({initialStore:i,createStore:o,children:a})=>{const u=T.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()),T.createElement(e.Provider,{value:u.current},a)},useStore:(i,o=Object.is)=>{const a=T.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=T.useContext(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return T.useMemo(()=>({getState:i.getState,setState:i.setState,subscribe:i.subscribe,destroy:i.destroy}),[i])}}}var KW={value:()=>{}};function Ll(){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 Au(r)}function Au(e){this._=e}function YW(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}})}Au.prototype=Ll.prototype={constructor:Au,on:function(e,t){var r=this._,n=YW(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=XW(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]=PI(r[i],e.name,t);else if(t==null)for(i in r)r[i]=PI(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 Au(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 XW(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function PI(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=KW,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Db="http://www.w3.org/1999/xhtml";const NI={svg:"http://www.w3.org/2000/svg",xhtml:Db,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Bl(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),NI.hasOwnProperty(t)?{space:NI[t],local:e}:e}function ZW(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Db&&t.documentElement.namespaceURI===Db?t.createElement(e):t.createElementNS(r,e)}}function JW(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Lj(e){var t=Bl(e);return(t.local?JW:ZW)(t)}function QW(){}function Tx(e){return e==null?QW:function(){return this.querySelector(e)}}function e6(e){typeof e!="function"&&(e=Tx(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),l,d,f=0;f<a;++f)(l=o[f])&&(d=e.call(l,l.__data__,f,o))&&("__data__"in l&&(d.__data__=l.__data__),u[f]=d);return new lr(n,this._parents)}function t6(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function r6(){return[]}function Bj(e){return e==null?r6:function(){return this.querySelectorAll(e)}}function n6(e){return function(){return t6(e.apply(this,arguments))}}function i6(e){typeof e=="function"?e=n6(e):e=Bj(e);for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],u=a.length,l,d=0;d<u;++d)(l=a[d])&&(n.push(e.call(l,l.__data__,d,a)),i.push(l));return new lr(n,i)}function Fj(e){return function(){return this.matches(e)}}function $j(e){return function(t){return t.matches(e)}}var o6=Array.prototype.find;function a6(e){return function(){return o6.call(this.children,e)}}function s6(){return this.firstElementChild}function u6(e){return this.select(e==null?s6:a6(typeof e=="function"?e:$j(e)))}var l6=Array.prototype.filter;function c6(){return Array.from(this.children)}function f6(e){return function(){return l6.call(this.children,e)}}function d6(e){return this.selectAll(e==null?c6:f6(typeof e=="function"?e:$j(e)))}function h6(e){typeof e!="function"&&(e=Fj(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]=[],l,d=0;d<a;++d)(l=o[d])&&e.call(l,l.__data__,d,o)&&u.push(l);return new lr(n,this._parents)}function zj(e){return new Array(e.length)}function p6(){return new lr(this._enter||this._groups.map(zj),this._parents)}function Hu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Hu.prototype={constructor:Hu,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 v6(e){return function(){return e}}function g6(e,t,r,n,i,o){for(var a=0,u,l=t.length,d=o.length;a<d;++a)(u=t[a])?(u.__data__=o[a],n[a]=u):r[a]=new Hu(e,o[a]);for(;a<l;++a)(u=t[a])&&(i[a]=u)}function m6(e,t,r,n,i,o,a){var u,l,d=new Map,f=t.length,h=o.length,p=new Array(f),v;for(u=0;u<f;++u)(l=t[u])&&(p[u]=v=a.call(l,l.__data__,u,t)+"",d.has(v)?i[u]=l:d.set(v,l));for(u=0;u<h;++u)v=a.call(e,o[u],u,o)+"",(l=d.get(v))?(n[u]=l,l.__data__=o[u],d.delete(v)):r[u]=new Hu(e,o[u]);for(u=0;u<f;++u)(l=t[u])&&d.get(p[u])===l&&(i[u]=l)}function y6(e){return e.__data__}function b6(e,t){if(!arguments.length)return Array.from(this,y6);var r=t?m6:g6,n=this._parents,i=this._groups;typeof e!="function"&&(e=v6(e));for(var o=i.length,a=new Array(o),u=new Array(o),l=new Array(o),d=0;d<o;++d){var f=n[d],h=i[d],p=h.length,v=x6(e.call(f,f&&f.__data__,d,n)),m=v.length,y=u[d]=new Array(m),x=a[d]=new Array(m),b=l[d]=new Array(p);r(f,h,y,x,b,v,t);for(var w=0,E=0,_,S;w<m;++w)if(_=y[w]){for(w>=E&&(E=w+1);!(S=x[E])&&++E<m;);_._next=S||null}}return a=new lr(a,n),a._enter=u,a._exit=l,a}function x6(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function w6(){return new lr(this._exit||this._groups.map(zj),this._parents)}function _6(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 E6(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),l=0;l<a;++l)for(var d=r[l],f=n[l],h=d.length,p=u[l]=new Array(h),v,m=0;m<h;++m)(v=d[m]||f[m])&&(p[m]=v);for(;l<i;++l)u[l]=r[l];return new lr(u,this._parents)}function S6(){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 O6(e){e||(e=C6);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,l=i[o]=new Array(u),d,f=0;f<u;++f)(d=a[f])&&(l[f]=d);l.sort(t)}return new lr(i,this._parents).order()}function C6(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function R6(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function I6(){return Array.from(this)}function P6(){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 N6(){let e=0;for(const t of this)++e;return e}function T6(){return!this.node()}function A6(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 M6(e){return function(){this.removeAttribute(e)}}function D6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function j6(e,t){return function(){this.setAttribute(e,t)}}function q6(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function k6(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function L6(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 B6(e,t){var r=Bl(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?D6:M6:typeof t=="function"?r.local?L6:k6:r.local?q6:j6)(r,t))}function Hj(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function F6(e){return function(){this.style.removeProperty(e)}}function $6(e,t,r){return function(){this.style.setProperty(e,t,r)}}function z6(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function H6(e,t,r){return arguments.length>1?this.each((t==null?F6:typeof t=="function"?z6:$6)(e,t,r??"")):_o(this.node(),e)}function _o(e,t){return e.style.getPropertyValue(t)||Hj(e).getComputedStyle(e,null).getPropertyValue(t)}function V6(e){return function(){delete this[e]}}function U6(e,t){return function(){this[e]=t}}function W6(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function G6(e,t){return arguments.length>1?this.each((t==null?V6:typeof t=="function"?W6:U6)(e,t)):this.node()[e]}function Vj(e){return e.trim().split(/^|\s+/)}function Ax(e){return e.classList||new Uj(e)}function Uj(e){this._node=e,this._names=Vj(e.getAttribute("class")||"")}Uj.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 Wj(e,t){for(var r=Ax(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Gj(e,t){for(var r=Ax(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function K6(e){return function(){Wj(this,e)}}function Y6(e){return function(){Gj(this,e)}}function X6(e,t){return function(){(t.apply(this,arguments)?Wj:Gj)(this,e)}}function Z6(e,t){var r=Vj(e+"");if(arguments.length<2){for(var n=Ax(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?X6:t?K6:Y6)(r,t))}function J6(){this.textContent=""}function Q6(e){return function(){this.textContent=e}}function e8(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function t8(e){return arguments.length?this.each(e==null?J6:(typeof e=="function"?e8:Q6)(e)):this.node().textContent}function r8(){this.innerHTML=""}function n8(e){return function(){this.innerHTML=e}}function i8(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function o8(e){return arguments.length?this.each(e==null?r8:(typeof e=="function"?i8:n8)(e)):this.node().innerHTML}function a8(){this.nextSibling&&this.parentNode.appendChild(this)}function s8(){return this.each(a8)}function u8(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function l8(){return this.each(u8)}function c8(e){var t=typeof e=="function"?e:Lj(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function f8(){return null}function d8(e,t){var r=typeof e=="function"?e:Lj(e),n=t==null?f8:typeof t=="function"?t:Tx(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function h8(){var e=this.parentNode;e&&e.removeChild(this)}function p8(){return this.each(h8)}function v8(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function g8(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function m8(e){return this.select(e?g8:v8)}function y8(e){return arguments.length?this.property("__data__",e):this.node().__data__}function b8(e){return function(t){e.call(this,t,this.__data__)}}function x8(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 w8(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 _8(e,t,r){return function(){var n=this.__on,i,o=b8(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 E8(e,t,r){var n=x8(e+""),i,o=n.length,a;if(arguments.length<2){var u=this.node().__on;if(u){for(var l=0,d=u.length,f;l<d;++l)for(i=0,f=u[l];i<o;++i)if((a=n[i]).type===f.type&&a.name===f.name)return f.value}return}for(u=t?_8:w8,i=0;i<o;++i)this.each(u(n[i],t,r));return this}function Kj(e,t,r){var n=Hj(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 S8(e,t){return function(){return Kj(this,e,t)}}function O8(e,t){return function(){return Kj(this,e,t.apply(this,arguments))}}function C8(e,t){return this.each((typeof t=="function"?O8:S8)(e,t))}function*R8(){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 Yj=[null];function lr(e,t){this._groups=e,this._parents=t}function ts(){return new lr([[document.documentElement]],Yj)}function I8(){return this}lr.prototype=ts.prototype={constructor:lr,select:e6,selectAll:i6,selectChild:u6,selectChildren:d6,filter:h6,data:b6,enter:p6,exit:w6,join:_6,merge:E6,selection:I8,order:S6,sort:O6,call:R6,nodes:I6,node:P6,size:N6,empty:T6,each:A6,attr:B6,style:H6,property:G6,classed:Z6,text:t8,html:o8,raise:s8,lower:l8,append:c8,insert:d8,remove:p8,clone:m8,datum:y8,on:E8,dispatch:C8,[Symbol.iterator]:R8};function qr(e){return typeof e=="string"?new lr([[document.querySelector(e)]],[document.documentElement]):new lr([[e]],Yj)}function P8(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Zr(e,t){if(e=P8(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 N8={passive:!1},Fa={capture:!0,passive:!1};function ym(e){e.stopImmediatePropagation()}function co(e){e.preventDefault(),e.stopImmediatePropagation()}function Xj(e){var t=e.document.documentElement,r=qr(e).on("dragstart.drag",co,Fa);"onselectstart"in t?r.on("selectstart.drag",co,Fa):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Zj(e,t){var r=e.document.documentElement,n=qr(e).on("dragstart.drag",null);t&&(n.on("click.drag",co,Fa),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 su=e=>()=>e;function jb(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:o,x:a,y:u,dx:l,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:l,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:f}})}jb.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function T8(e){return!e.ctrlKey&&!e.button}function A8(){return this.parentNode}function M8(e,t){return t??{x:e.x,y:e.y}}function D8(){return navigator.maxTouchPoints||"ontouchstart"in this}function j8(){var e=T8,t=A8,r=M8,n=D8,i={},o=Ll("start","drag","end"),a=0,u,l,d,f,h=0;function p(_){_.on("mousedown.drag",v).filter(n).on("touchstart.drag",x).on("touchmove.drag",b,N8).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(_,S){if(!(f||!e.call(this,_,S))){var R=E(this,t.call(this,_,S),_,S,"mouse");R&&(qr(_.view).on("mousemove.drag",m,Fa).on("mouseup.drag",y,Fa),Xj(_.view),ym(_),d=!1,u=_.clientX,l=_.clientY,R("start",_))}}function m(_){if(co(_),!d){var S=_.clientX-u,R=_.clientY-l;d=S*S+R*R>h}i.mouse("drag",_)}function y(_){qr(_.view).on("mousemove.drag mouseup.drag",null),Zj(_.view,d),co(_),i.mouse("end",_)}function x(_,S){if(e.call(this,_,S)){var R=_.changedTouches,I=t.call(this,_,S),P=R.length,A,k;for(A=0;A<P;++A)(k=E(this,I,_,S,R[A].identifier,R[A]))&&(ym(_),k("start",_,R[A]))}}function b(_){var S=_.changedTouches,R=S.length,I,P;for(I=0;I<R;++I)(P=i[S[I].identifier])&&(co(_),P("drag",_,S[I]))}function w(_){var S=_.changedTouches,R=S.length,I,P;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),I=0;I<R;++I)(P=i[S[I].identifier])&&(ym(_),P("end",_,S[I]))}function E(_,S,R,I,P,A){var k=o.copy(),L=Zr(A||R,S),$,j,D;if((D=r.call(_,new jb("beforestart",{sourceEvent:R,target:p,identifier:P,active:a,x:L[0],y:L[1],dx:0,dy:0,dispatch:k}),I))!=null)return $=D.x-L[0]||0,j=D.y-L[1]||0,function G(B,Y,Z){var te=L,U;switch(B){case"start":i[P]=G,U=a++;break;case"end":delete i[P],--a;case"drag":L=Zr(Z||Y,S),U=a;break}k.call(B,_,new jb(B,{sourceEvent:Y,subject:D,target:p,identifier:P,active:U,x:L[0]+$,y:L[1]+j,dx:L[0]-te[0],dy:L[1]-te[1],dispatch:k}),I)}}return p.filter=function(_){return arguments.length?(e=typeof _=="function"?_:su(!!_),p):e},p.container=function(_){return arguments.length?(t=typeof _=="function"?_:su(_),p):t},p.subject=function(_){return arguments.length?(r=typeof _=="function"?_:su(_),p):r},p.touchable=function(_){return arguments.length?(n=typeof _=="function"?_:su(!!_),p):n},p.on=function(){var _=o.on.apply(o,arguments);return _===o?p:_},p.clickDistance=function(_){return arguments.length?(h=(_=+_)*_,p):Math.sqrt(h)},p}function Mx(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Jj(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function rs(){}var $a=.7,Vu=1/$a,fo="\\s*([+-]?\\d+)\\s*",za="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",q8=/^#([0-9a-f]{3,8})$/,k8=new RegExp(`^rgb\\(${fo},${fo},${fo}\\)$`),L8=new RegExp(`^rgb\\(${tn},${tn},${tn}\\)$`),B8=new RegExp(`^rgba\\(${fo},${fo},${fo},${za}\\)$`),F8=new RegExp(`^rgba\\(${tn},${tn},${tn},${za}\\)$`),$8=new RegExp(`^hsl\\(${za},${tn},${tn}\\)$`),z8=new RegExp(`^hsla\\(${za},${tn},${tn},${za}\\)$`),TI={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};Mx(rs,Ha,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:AI,formatHex:AI,formatHex8:H8,formatHsl:V8,formatRgb:MI,toString:MI});function AI(){return this.rgb().formatHex()}function H8(){return this.rgb().formatHex8()}function V8(){return Qj(this).formatHsl()}function MI(){return this.rgb().formatRgb()}function Ha(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=q8.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?DI(t):r===3?new Wt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?uu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?uu(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=k8.exec(e))?new Wt(t[1],t[2],t[3],1):(t=L8.exec(e))?new Wt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=B8.exec(e))?uu(t[1],t[2],t[3],t[4]):(t=F8.exec(e))?uu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$8.exec(e))?kI(t[1],t[2]/100,t[3]/100,1):(t=z8.exec(e))?kI(t[1],t[2]/100,t[3]/100,t[4]):TI.hasOwnProperty(e)?DI(TI[e]):e==="transparent"?new Wt(NaN,NaN,NaN,0):null}function DI(e){return new Wt(e>>16&255,e>>8&255,e&255,1)}function uu(e,t,r,n){return n<=0&&(e=t=r=NaN),new Wt(e,t,r,n)}function U8(e){return e instanceof rs||(e=Ha(e)),e?(e=e.rgb(),new Wt(e.r,e.g,e.b,e.opacity)):new Wt}function qb(e,t,r,n){return arguments.length===1?U8(e):new Wt(e,t,r,n??1)}function Wt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Mx(Wt,qb,Jj(rs,{brighter(e){return e=e==null?Vu:Math.pow(Vu,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$a:Math.pow($a,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Wt(pi(this.r),pi(this.g),pi(this.b),Uu(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:jI,formatHex:jI,formatHex8:W8,formatRgb:qI,toString:qI}));function jI(){return`#${di(this.r)}${di(this.g)}${di(this.b)}`}function W8(){return`#${di(this.r)}${di(this.g)}${di(this.b)}${di((isNaN(this.opacity)?1:this.opacity)*255)}`}function qI(){const e=Uu(this.opacity);return`${e===1?"rgb(":"rgba("}${pi(this.r)}, ${pi(this.g)}, ${pi(this.b)}${e===1?")":`, ${e})`}`}function Uu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function di(e){return e=pi(e),(e<16?"0":"")+e.toString(16)}function kI(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new kr(e,t,r,n)}function Qj(e){if(e instanceof kr)return new kr(e.h,e.s,e.l,e.opacity);if(e instanceof rs||(e=Ha(e)),!e)return new kr;if(e instanceof kr)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,l=(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/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new kr(a,u,l,e.opacity)}function G8(e,t,r,n){return arguments.length===1?Qj(e):new kr(e,t,r,n??1)}function kr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Mx(kr,G8,Jj(rs,{brighter(e){return e=e==null?Vu:Math.pow(Vu,e),new kr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$a:Math.pow($a,e),new kr(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 Wt(bm(e>=240?e-240:e+120,i,n),bm(e,i,n),bm(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new kr(LI(this.h),lu(this.s),lu(this.l),Uu(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=Uu(this.opacity);return`${e===1?"hsl(":"hsla("}${LI(this.h)}, ${lu(this.s)*100}%, ${lu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function LI(e){return e=(e||0)%360,e<0?e+360:e}function lu(e){return Math.max(0,Math.min(1,e||0))}function bm(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 e2=e=>()=>e;function K8(e,t){return function(r){return e+r*t}}function Y8(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 X8(e){return(e=+e)==1?t2:function(t,r){return r-t?Y8(t,r,e):e2(isNaN(t)?r:t)}}function t2(e,t){var r=t-e;return r?K8(e,r):e2(isNaN(e)?t:e)}const BI=(function e(t){var r=X8(t);function n(i,o){var a=r((i=qb(i)).r,(o=qb(o)).r),u=r(i.g,o.g),l=r(i.b,o.b),d=t2(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=u(f),i.b=l(f),i.opacity=d(f),i+""}}return n.gamma=e,n})(1);function Bn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var kb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xm=new RegExp(kb.source,"g");function Z8(e){return function(){return e}}function J8(e){return function(t){return e(t)+""}}function Q8(e,t){var r=kb.lastIndex=xm.lastIndex=0,n,i,o,a=-1,u=[],l=[];for(e=e+"",t=t+"";(n=kb.exec(e))&&(i=xm.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,l.push({i:a,x:Bn(n,i)})),r=xm.lastIndex;return r<t.length&&(o=t.slice(r),u[a]?u[a]+=o:u[++a]=o),u.length<2?l[0]?J8(l[0].x):Z8(t):(t=l.length,function(d){for(var f=0,h;f<t;++f)u[(h=l[f]).i]=h.x(d);return u.join("")})}var FI=180/Math.PI,Lb={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function r2(e,t,r,n,i,o){var a,u,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(u=Math.sqrt(r*r+n*n))&&(r/=u,n/=u,l/=u),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*FI,skewX:Math.atan(l)*FI,scaleX:a,scaleY:u}}var cu;function eG(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Lb:r2(t.a,t.b,t.c,t.d,t.e,t.f)}function tG(e){return e==null||(cu||(cu=document.createElementNS("http://www.w3.org/2000/svg","g")),cu.setAttribute("transform",e),!(e=cu.transform.baseVal.consolidate()))?Lb:(e=e.matrix,r2(e.a,e.b,e.c,e.d,e.e,e.f))}function n2(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:Bn(d,h)},{i:y-2,x:Bn(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:Bn(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:Bn(d,f)}):f&&h.push(i(h)+"skewX("+f+n)}function l(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:Bn(d,h)},{i:y-2,x:Bn(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),l(d.scaleX,d.scaleY,f.scaleX,f.scaleY,h,p),d=f=null,function(v){for(var m=-1,y=p.length,x;++m<y;)h[(x=p[m]).i]=x.x(v);return h.join("")}}}var rG=n2(eG,"px, ","px)","deg)"),nG=n2(tG,", ",")",")"),iG=1e-12;function $I(e){return((e=Math.exp(e))+1/e)/2}function oG(e){return((e=Math.exp(e))-1/e)/2}function aG(e){return((e=Math.exp(2*e))-1)/(e+1)}const sG=(function e(t,r,n){function i(o,a){var u=o[0],l=o[1],d=o[2],f=a[0],h=a[1],p=a[2],v=f-u,m=h-l,y=v*v+m*m,x,b;if(y<iG)b=Math.log(p/d)/t,x=function(I){return[u+I*v,l+I*m,d*Math.exp(t*I*b)]};else{var w=Math.sqrt(y),E=(p*p-d*d+n*y)/(2*d*r*w),_=(p*p-d*d-n*y)/(2*p*r*w),S=Math.log(Math.sqrt(E*E+1)-E),R=Math.log(Math.sqrt(_*_+1)-_);b=(R-S)/t,x=function(I){var P=I*b,A=$I(S),k=d/(r*w)*(A*aG(t*P+S)-oG(S));return[u+k*v,l+k*m,d*A/$I(t*P+S)]}}return x.duration=b*1e3*t/Math.SQRT2,x}return i.rho=function(o){var a=Math.max(.001,+o),u=a*a,l=u*u;return e(a,u,l)},i})(Math.SQRT2,2,4);var Eo=0,Pa=0,aa=0,i2=1e3,Wu,Na,Gu=0,xi=0,Fl=0,Va=typeof performance=="object"&&performance.now?performance:Date,o2=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Dx(){return xi||(o2(uG),xi=Va.now()+Fl)}function uG(){xi=0}function Ku(){this._call=this._time=this._next=null}Ku.prototype=a2.prototype={constructor:Ku,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Dx():+r)+(t==null?0:+t),!this._next&&Na!==this&&(Na?Na._next=this:Wu=this,Na=this),this._call=e,this._time=r,Bb()},stop:function(){this._call&&(this._call=null,this._time=1/0,Bb())}};function a2(e,t,r){var n=new Ku;return n.restart(e,t,r),n}function lG(){Dx(),++Eo;for(var e=Wu,t;e;)(t=xi-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Eo}function zI(){xi=(Gu=Va.now())+Fl,Eo=Pa=0;try{lG()}finally{Eo=0,fG(),xi=0}}function cG(){var e=Va.now(),t=e-Gu;t>i2&&(Fl-=t,Gu=e)}function fG(){for(var e,t=Wu,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:Wu=r);Na=e,Bb(n)}function Bb(e){if(!Eo){Pa&&(Pa=clearTimeout(Pa));var t=e-xi;t>24?(e<1/0&&(Pa=setTimeout(zI,e-Va.now()-Fl)),aa&&(aa=clearInterval(aa))):(aa||(Gu=Va.now(),aa=setInterval(cG,i2)),Eo=1,o2(zI))}}function HI(e,t,r){var n=new Ku;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var dG=Ll("start","end","cancel","interrupt"),hG=[],s2=0,VI=1,Fb=2,Mu=3,UI=4,$b=5,Du=6;function $l(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;pG(e,r,{name:t,index:n,group:i,on:dG,tween:hG,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:s2})}function jx(e,t){var r=Vr(e,t);if(r.state>s2)throw new Error("too late; already scheduled");return r}function an(e,t){var r=Vr(e,t);if(r.state>Mu)throw new Error("too late; already running");return r}function Vr(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function pG(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=a2(o,0,r.time);function o(d){r.state=VI,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!==VI)return l();for(f in n)if(v=n[f],v.name===r.name){if(v.state===Mu)return HI(a);v.state===UI?(v.state=Du,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[f]):+f<t&&(v.state=Du,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[f])}if(HI(function(){r.state===Mu&&(r.state=UI,r.timer.restart(u,r.delay,r.time),u(d))}),r.state=Fb,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Fb){for(r.state=Mu,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(l),r.state=$b,1),h=-1,p=i.length;++h<p;)i[h].call(e,f);r.state===$b&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Du,r.timer.stop(),delete n[t];for(var d in n)return;delete e.__transition}}function ju(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>Fb&&n.state<$b,n.state=Du,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function vG(e){return this.each(function(){ju(this,e)})}function gG(e,t){var r,n;return function(){var i=an(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 mG(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=an(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var u={name:t,value:r},l=0,d=i.length;l<d;++l)if(i[l].name===t){i[l]=u;break}l===d&&i.push(u)}o.tween=i}}function yG(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Vr(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?gG:mG)(r,e,t))}function qx(e,t,r){var n=e._id;return e.each(function(){var i=an(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Vr(i,n).value[t]}}function u2(e,t){var r;return(typeof t=="number"?Bn:t instanceof Ha?BI:(r=Ha(t))?(t=r,BI):Q8)(e,t)}function bG(e){return function(){this.removeAttribute(e)}}function xG(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wG(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 _G(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 EG(e,t,r){var n,i,o;return function(){var a,u=r(this),l;return u==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=u+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,u)))}}function SG(e,t,r){var n,i,o;return function(){var a,u=r(this),l;return u==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=u+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,u)))}}function OG(e,t){var r=Bl(e),n=r==="transform"?nG:u2;return this.attrTween(e,typeof t=="function"?(r.local?SG:EG)(r,n,qx(this,"attr."+e,t)):t==null?(r.local?xG:bG)(r):(r.local?_G:wG)(r,n,t))}function CG(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function RG(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function IG(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&RG(e,o)),r}return i._value=t,i}function PG(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&CG(e,o)),r}return i._value=t,i}function NG(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=Bl(e);return this.tween(r,(n.local?IG:PG)(n,t))}function TG(e,t){return function(){jx(this,e).delay=+t.apply(this,arguments)}}function AG(e,t){return t=+t,function(){jx(this,e).delay=t}}function MG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?TG:AG)(t,e)):Vr(this.node(),t).delay}function DG(e,t){return function(){an(this,e).duration=+t.apply(this,arguments)}}function jG(e,t){return t=+t,function(){an(this,e).duration=t}}function qG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?DG:jG)(t,e)):Vr(this.node(),t).duration}function kG(e,t){if(typeof t!="function")throw new Error;return function(){an(this,e).ease=t}}function LG(e){var t=this._id;return arguments.length?this.each(kG(t,e)):Vr(this.node(),t).ease}function BG(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;an(this,e).ease=r}}function FG(e){if(typeof e!="function")throw new Error;return this.each(BG(this._id,e))}function $G(e){typeof e!="function"&&(e=Fj(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]=[],l,d=0;d<a;++d)(l=o[d])&&e.call(l,l.__data__,d,o)&&u.push(l);return new xn(n,this._parents,this._name,this._id)}function zG(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 l=t[u],d=r[u],f=l.length,h=a[u]=new Array(f),p,v=0;v<f;++v)(p=l[v]||d[v])&&(h[v]=p);for(;u<n;++u)a[u]=t[u];return new xn(a,this._parents,this._name,this._id)}function HG(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 VG(e,t,r){var n,i,o=HG(t)?jx:an;return function(){var a=o(this,e),u=a.on;u!==n&&(i=(n=u).copy()).on(t,r),a.on=i}}function UG(e,t){var r=this._id;return arguments.length<2?Vr(this.node(),r).on.on(e):this.each(VG(r,e,t))}function WG(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function GG(){return this.on("end.remove",WG(this._id))}function KG(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Tx(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var u=n[a],l=u.length,d=o[a]=new Array(l),f,h,p=0;p<l;++p)(f=u[p])&&(h=e.call(f,f.__data__,p,u))&&("__data__"in f&&(h.__data__=f.__data__),d[p]=h,$l(d[p],t,r,p,d,Vr(f,r)));return new xn(o,this._parents,t,r)}function YG(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Bj(e));for(var n=this._groups,i=n.length,o=[],a=[],u=0;u<i;++u)for(var l=n[u],d=l.length,f,h=0;h<d;++h)if(f=l[h]){for(var p=e.call(f,f.__data__,h,l),v,m=Vr(f,r),y=0,x=p.length;y<x;++y)(v=p[y])&&$l(v,t,r,y,p,m);o.push(p),a.push(f)}return new xn(o,a,t,r)}var XG=ts.prototype.constructor;function ZG(){return new XG(this._groups,this._parents)}function JG(e,t){var r,n,i;return function(){var o=_o(this,e),a=(this.style.removeProperty(e),_o(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function l2(e){return function(){this.style.removeProperty(e)}}function QG(e,t,r){var n,i=r+"",o;return function(){var a=_o(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function eK(e,t,r){var n,i,o;return function(){var a=_o(this,e),u=r(this),l=u+"";return u==null&&(l=u=(this.style.removeProperty(e),_o(this,e))),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,u))}}function tK(e,t){var r,n,i,o="style."+t,a="end."+o,u;return function(){var l=an(this,e),d=l.on,f=l.value[o]==null?u||(u=l2(t)):void 0;(d!==r||i!==f)&&(n=(r=d).copy()).on(a,i=f),l.on=n}}function rK(e,t,r){var n=(e+="")=="transform"?rG:u2;return t==null?this.styleTween(e,JG(e,n)).on("end.style."+e,l2(e)):typeof t=="function"?this.styleTween(e,eK(e,n,qx(this,"style."+e,t))).each(tK(this._id,e)):this.styleTween(e,QG(e,n,t),r).on("end.style."+e,null)}function nK(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function iK(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&nK(e,a,r)),n}return o._value=t,o}function oK(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,iK(e,t,r??""))}function aK(e){return function(){this.textContent=e}}function sK(e){return function(){var t=e(this);this.textContent=t??""}}function uK(e){return this.tween("text",typeof e=="function"?sK(qx(this,"text",e)):aK(e==null?"":e+""))}function lK(e){return function(t){this.textContent=e.call(this,t)}}function cK(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&lK(i)),t}return n._value=e,n}function fK(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,cK(e))}function dK(){for(var e=this._name,t=this._id,r=c2(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],u=a.length,l,d=0;d<u;++d)if(l=a[d]){var f=Vr(l,t);$l(l,e,r,d,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new xn(n,this._parents,e,r)}function hK(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var u={value:a},l={value:function(){--i===0&&o()}};r.each(function(){var d=an(this,n),f=d.on;f!==e&&(t=(e=f).copy(),t._.cancel.push(u),t._.interrupt.push(u),t._.end.push(l)),d.on=t}),i===0&&o()})}var pK=0;function xn(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function c2(){return++pK}var mn=ts.prototype;xn.prototype={constructor:xn,select:KG,selectAll:YG,selectChild:mn.selectChild,selectChildren:mn.selectChildren,filter:$G,merge:zG,selection:ZG,transition:dK,call:mn.call,nodes:mn.nodes,node:mn.node,size:mn.size,empty:mn.empty,each:mn.each,on:UG,attr:OG,attrTween:NG,style:rK,styleTween:oK,text:uK,textTween:fK,remove:GG,tween:yG,delay:MG,duration:qG,ease:LG,easeVarying:FG,end:hK,[Symbol.iterator]:mn[Symbol.iterator]};function vK(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var gK={time:null,delay:0,duration:250,ease:vK};function mK(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 yK(e){var t,r;e instanceof xn?(t=e._id,e=e._name):(t=c2(),(r=gK).time=Dx(),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,l,d=0;d<u;++d)(l=a[d])&&$l(l,e,t,d,a,r||mK(l,t));return new xn(n,this._parents,e,t)}ts.prototype.interrupt=vG;ts.prototype.transition=yK;const fu=e=>()=>e;function bK(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 yn(e,t,r){this.k=e,this.x=t,this.y=r}yn.prototype={constructor:yn,scale:function(e){return e===1?this:new yn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new yn(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 vi=new yn(1,0,0);yn.prototype;function wm(e){e.stopImmediatePropagation()}function sa(e){e.preventDefault(),e.stopImmediatePropagation()}function xK(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function wK(){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 WI(){return this.__zoom||vi}function _K(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function EK(){return navigator.maxTouchPoints||"ontouchstart"in this}function SK(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 OK(){var e=xK,t=wK,r=SK,n=_K,i=EK,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],u=250,l=sG,d=Ll("start","zoom","end"),f,h,p,v=500,m=150,y=0,x=10;function b(D){D.property("__zoom",WI).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",k).filter(i).on("touchstart.zoom",L).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",j).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(D,G,B,Y){var Z=D.selection?D.selection():D;Z.property("__zoom",WI),D!==Z?S(D,G,B,Y):Z.interrupt().each(function(){R(this,arguments).event(Y).start().zoom(null,typeof G=="function"?G.apply(this,arguments):G).end()})},b.scaleBy=function(D,G,B,Y){b.scaleTo(D,function(){var Z=this.__zoom.k,te=typeof G=="function"?G.apply(this,arguments):G;return Z*te},B,Y)},b.scaleTo=function(D,G,B,Y){b.transform(D,function(){var Z=t.apply(this,arguments),te=this.__zoom,U=B==null?_(Z):typeof B=="function"?B.apply(this,arguments):B,re=te.invert(U),ae=typeof G=="function"?G.apply(this,arguments):G;return r(E(w(te,ae),U,re),Z,a)},B,Y)},b.translateBy=function(D,G,B,Y){b.transform(D,function(){return r(this.__zoom.translate(typeof G=="function"?G.apply(this,arguments):G,typeof B=="function"?B.apply(this,arguments):B),t.apply(this,arguments),a)},null,Y)},b.translateTo=function(D,G,B,Y,Z){b.transform(D,function(){var te=t.apply(this,arguments),U=this.__zoom,re=Y==null?_(te):typeof Y=="function"?Y.apply(this,arguments):Y;return r(vi.translate(re[0],re[1]).scale(U.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof B=="function"?-B.apply(this,arguments):-B),te,a)},Y,Z)};function w(D,G){return G=Math.max(o[0],Math.min(o[1],G)),G===D.k?D:new yn(G,D.x,D.y)}function E(D,G,B){var Y=G[0]-B[0]*D.k,Z=G[1]-B[1]*D.k;return Y===D.x&&Z===D.y?D:new yn(D.k,Y,Z)}function _(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function S(D,G,B,Y){D.on("start.zoom",function(){R(this,arguments).event(Y).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(Y).end()}).tween("zoom",function(){var Z=this,te=arguments,U=R(Z,te).event(Y),re=t.apply(Z,te),ae=B==null?_(re):typeof B=="function"?B.apply(Z,te):B,le=Math.max(re[1][0]-re[0][0],re[1][1]-re[0][1]),F=Z.__zoom,W=typeof G=="function"?G.apply(Z,te):G,J=l(F.invert(ae).concat(le/F.k),W.invert(ae).concat(le/W.k));return function(H){if(H===1)H=W;else{var K=J(H),se=le/K[2];H=new yn(se,ae[0]-K[0]*se,ae[1]-K[1]*se)}U.zoom(null,H)}})}function R(D,G,B){return!B&&D.__zooming||new I(D,G)}function I(D,G){this.that=D,this.args=G,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,G),this.taps=0}I.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,G){return this.mouse&&D!=="mouse"&&(this.mouse[1]=G.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=G.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=G.invert(this.touch1[0])),this.that.__zoom=G,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var G=qr(this.that).datum();d.call(D,this.that,new bK(D,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:d}),G)}};function P(D,...G){if(!e.apply(this,arguments))return;var B=R(this,G).event(D),Y=this.__zoom,Z=Math.max(o[0],Math.min(o[1],Y.k*Math.pow(2,n.apply(this,arguments)))),te=Zr(D);if(B.wheel)(B.mouse[0][0]!==te[0]||B.mouse[0][1]!==te[1])&&(B.mouse[1]=Y.invert(B.mouse[0]=te)),clearTimeout(B.wheel);else{if(Y.k===Z)return;B.mouse=[te,Y.invert(te)],ju(this),B.start()}sa(D),B.wheel=setTimeout(U,m),B.zoom("mouse",r(E(w(Y,Z),B.mouse[0],B.mouse[1]),B.extent,a));function U(){B.wheel=null,B.end()}}function A(D,...G){if(p||!e.apply(this,arguments))return;var B=D.currentTarget,Y=R(this,G,!0).event(D),Z=qr(D.view).on("mousemove.zoom",ae,!0).on("mouseup.zoom",le,!0),te=Zr(D,B),U=D.clientX,re=D.clientY;Xj(D.view),wm(D),Y.mouse=[te,this.__zoom.invert(te)],ju(this),Y.start();function ae(F){if(sa(F),!Y.moved){var W=F.clientX-U,J=F.clientY-re;Y.moved=W*W+J*J>y}Y.event(F).zoom("mouse",r(E(Y.that.__zoom,Y.mouse[0]=Zr(F,B),Y.mouse[1]),Y.extent,a))}function le(F){Z.on("mousemove.zoom mouseup.zoom",null),Zj(F.view,Y.moved),sa(F),Y.event(F).end()}}function k(D,...G){if(e.apply(this,arguments)){var B=this.__zoom,Y=Zr(D.changedTouches?D.changedTouches[0]:D,this),Z=B.invert(Y),te=B.k*(D.shiftKey?.5:2),U=r(E(w(B,te),Y,Z),t.apply(this,G),a);sa(D),u>0?qr(this).transition().duration(u).call(S,U,Y,D):qr(this).call(b.transform,U,Y,D)}}function L(D,...G){if(e.apply(this,arguments)){var B=D.touches,Y=B.length,Z=R(this,G,D.changedTouches.length===Y).event(D),te,U,re,ae;for(wm(D),U=0;U<Y;++U)re=B[U],ae=Zr(re,this),ae=[ae,this.__zoom.invert(ae),re.identifier],Z.touch0?!Z.touch1&&Z.touch0[2]!==ae[2]&&(Z.touch1=ae,Z.taps=0):(Z.touch0=ae,te=!0,Z.taps=1+!!f);f&&(f=clearTimeout(f)),te&&(Z.taps<2&&(h=ae[0],f=setTimeout(function(){f=null},v)),ju(this),Z.start())}}function $(D,...G){if(this.__zooming){var B=R(this,G).event(D),Y=D.changedTouches,Z=Y.length,te,U,re,ae;for(sa(D),te=0;te<Z;++te)U=Y[te],re=Zr(U,this),B.touch0&&B.touch0[2]===U.identifier?B.touch0[0]=re:B.touch1&&B.touch1[2]===U.identifier&&(B.touch1[0]=re);if(U=B.that.__zoom,B.touch1){var le=B.touch0[0],F=B.touch0[1],W=B.touch1[0],J=B.touch1[1],H=(H=W[0]-le[0])*H+(H=W[1]-le[1])*H,K=(K=J[0]-F[0])*K+(K=J[1]-F[1])*K;U=w(U,Math.sqrt(H/K)),re=[(le[0]+W[0])/2,(le[1]+W[1])/2],ae=[(F[0]+J[0])/2,(F[1]+J[1])/2]}else if(B.touch0)re=B.touch0[0],ae=B.touch0[1];else return;B.zoom("touch",r(E(U,re,ae),B.extent,a))}}function j(D,...G){if(this.__zooming){var B=R(this,G).event(D),Y=D.changedTouches,Z=Y.length,te,U;for(wm(D),p&&clearTimeout(p),p=setTimeout(function(){p=null},v),te=0;te<Z;++te)U=Y[te],B.touch0&&B.touch0[2]===U.identifier?delete B.touch0:B.touch1&&B.touch1[2]===U.identifier&&delete B.touch1;if(B.touch1&&!B.touch0&&(B.touch0=B.touch1,delete B.touch1),B.touch0)B.touch0[1]=this.__zoom.invert(B.touch0[0]);else if(B.end(),B.taps===2&&(U=Zr(U,this),Math.hypot(h[0]-U[0],h[1]-U[1])<x)){var re=qr(this).on("dblclick.zoom");re&&re.apply(this,arguments)}}}return b.wheelDelta=function(D){return arguments.length?(n=typeof D=="function"?D:fu(+D),b):n},b.filter=function(D){return arguments.length?(e=typeof D=="function"?D:fu(!!D),b):e},b.touchable=function(D){return arguments.length?(i=typeof D=="function"?D:fu(!!D),b):i},b.extent=function(D){return arguments.length?(t=typeof D=="function"?D:fu([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),b):t},b.scaleExtent=function(D){return arguments.length?(o[0]=+D[0],o[1]=+D[1],b):[o[0],o[1]]},b.translateExtent=function(D){return arguments.length?(a[0][0]=+D[0][0],a[1][0]=+D[1][0],a[0][1]=+D[0][1],a[1][1]=+D[1][1],b):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},b.constrain=function(D){return arguments.length?(r=D,b):r},b.duration=function(D){return arguments.length?(u=+D,b):u},b.interpolate=function(D){return arguments.length?(l=D,b):l},b.on=function(){var D=d.on.apply(d,arguments);return D===d?b:D},b.clickDistance=function(D){return arguments.length?(y=(D=+D)*D,b):Math.sqrt(y)},b.tapDistance=function(D){return arguments.length?(x=+D,b):x},b}function He(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zb(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 f2(e,t){if(e){if(typeof e=="string")return zb(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 zb(e,t)}}function CK(e){if(Array.isArray(e))return e}function RK(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(l){o=!0,u=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw u}}return n}}function IK(){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 Le(e,t){return CK(e)||RK(e,t)||f2(e,t)||IK()}var So;(function(e){e.Strict="strict",e.Loose="loose"})(So||(So={}));var wi;(function(e){e.Lines="lines",e.Dots="dots"})(wi||(wi={}));var ho;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ho||(ho={}));var $n;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})($n||($n={}));var Yu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Yu||(Yu={}));var Se;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Se||(Se={}));var kx=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},po=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)},d2=function(t,r){return{x:po(t.x,r[0][0],r[1][0]),y:po(t.y,r[0][1],r[1][1])}},h2=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)},PK=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)}},Xu=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}},NK=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}},p2=function(t){return!isNaN(t)&&isFinite(t)},Nt=Symbol("internals");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 Ta(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){He(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}function KI(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=Ta({},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 l=Math.abs(t.position.y);r.position.y=r.position.y-l,r.style.height+=l,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function v2(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(l){return l.id===i.id});if(o)switch(o.type){case"select":return n.push(Ta(Ta({},i),{},{selected:o.selected})),n;case"position":{var a=Ta({},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&&KI(n,a),n.push(a),n}case"dimensions":{var u=Ta({},i);return typeof o.dimensions<"u"&&(u.width=o.dimensions.width,u.height=o.dimensions.height),u.expandParent&&KI(n,u),n.push(u),n}case"remove":return n}return n.push(i),n},r)}function g2(e,t){return v2(e,t)}function TK(e,t){return v2(e,t)}var Fn=function(t,r){return{id:t,type:"select",selected:r}};function so(e,t){return e.reduce(function(r,n){var i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(Fn(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Fn(n.id,!1))),r},[])}function YI(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 m2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var XI=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 l=u.getBoundingClientRect();return m2({id:u.getAttribute("data-handleid"),position:u.getAttribute("data-handlepos"),x:(l.left-a.left)/n,y:(l.top-a.top)/n},kx(u))})};function ua(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,m2({},i))}}function y2(e){var t=e.id,r=e.store,n=r.getState(),i=n.addSelectedNodes,o=n.unselectNodesAndEdges,a=n.multiSelectionActive,u=n.nodeInternals,l=u.get(t);r.setState({nodesSelectionActive:!1}),l.selected?l.selected&&a&&o({nodes:[l]}):i([t])}function ZI(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 ja(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var AK=function(t){return"id"in t&&"source"in t&&"target"in t},MK=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||"")},Hb=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("&"))},DK=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)})},jK=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 AK(t)?n=ja({},t):n=ja(ja({},t),{},{id:MK(t)}),DK(n,r)?r:r.concat(n)},b2=function(t,r,n,i){var o=t.x,a=t.y,u=Le(r,3),l=u[0],d=u[1],f=u[2],h=Le(i,2),p=h[0],v=h[1],m={x:(o-l)/f,y:(a-d)/f};return n?{x:p*Math.round(m.x/p),y:v*Math.round(m.y/v)}:m},Lx=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,l=i.height;return PK(n,Xu({x:o?o.x:a.x,y:o?o.y:a.y,width:u||0,height:l||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return NK(r)},x2=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],i=Le(n,3),o=i[0],a=i[1],u=i[2],l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,f=Xu({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,x=p.selectable,b=x===void 0?!0:x;if(d&&!b)return!1;var w=Xu(ja(ja({},v),{},{width:m||0,height:y||0})),E=Math.max(0,Math.min(f.x2,w.x2)-Math.max(f.x,w.x)),_=Math.max(0,Math.min(f.y2,w.y2)-Math.max(f.y,w.y)),S=Math.ceil(E*_),R=typeof m>"u"||typeof y>"u"||m===null||y===null,I=l&&S>0,P=(m||0)*(y||0),A=R||I||S>=P;A&&h.push(p)}),h},w2=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)})},_2=function(t,r,n,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:.1,u=r/(t.width*(1+a)),l=n/(t.height*(1+a)),d=Math.min(u,l),f=po(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]},ui=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};function JI(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 uo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E2(e,t,r,n){var i,o,a,u,l,d,f,h,p,v,m,y;if(!e.parentNode)return n;var x=t.get(e.parentNode);return E2(x,t,r,{x:((i=n.x)!==null&&i!==void 0?i:0)+((o=(a=x.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)+((l=(d=x.position)===null||d===void 0?void 0:d.y)!==null&&l!==void 0?l:0),z:((f=(h=x[Nt])===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=x[Nt])===null||m===void 0?void 0:m.z)!==null&&v!==void 0?v:0:(y=n.z)!==null&&y!==void 0?y:0})}function _m(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=p2(i.zIndex)?i.zIndex:i.selected?1e3:0,u=t.get(i.id),l=uo(uo({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&&(l.parentNode=i.parentNode,n[i.parentNode]=!0),Object.defineProperty(l,Nt,{enumerable:!1,value:{handleBounds:u==null||(o=u[Nt])===null||o===void 0?void 0:o.handleBounds,z:a}}),r.set(i.id,l)}),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=E2(i,r,n,uo(uo({},i.position),{},{z:(o=(a=i[Nt])===null||a===void 0?void 0:a.z)!==null&&o!==void 0?o:0})),l=u.x,d=u.y,f=u.z;i.positionAbsolute={x:l,y:d},i[Nt].z=f,n[i.id]&&(i[Nt].isParent=!0)}}),r}function S2(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,l=r.d3Zoom,d=r.d3Selection,f=r.fitViewOnInitDone,h=r.fitViewOnInit;if((t.initial&&!f&&h||!t.initial)&&l&&d){var p=Array.from(n.values()).filter(function(P){return t.includeHiddenNodes?P.width&&P.height:!P.hidden}),v=p.every(function(P){return P.width&&P.height});if(p.length>0&&v){var m,y,x,b=Lx(p),w=_2(b,i,o,(m=t.minZoom)!==null&&m!==void 0?m:a,(y=t.maxZoom)!==null&&y!==void 0?y:u,(x=t.padding)!==null&&x!==void 0?x:.1),E=Le(w,3),_=E[0],S=E[1],R=E[2],I=vi.translate(_,S).scale(R);return typeof t.duration=="number"&&t.duration>0?l.transform(ui(d,t.duration),I):l.transform(d,I),!0}}return!1}function qK(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,uo(uo({},n),{},(i={},He(i,Nt,n[Nt]),He(i,"selected",r.selected),i)))}}),new Map(t)}function kK(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 du(e){var t=e.changedNodes,r=e.changedEdges,n=e.get,i=e.set,o=n(),a=o.nodeInternals,u=o.edges,l=o.onNodesChange,d=o.onEdgesChange,f=o.hasDefaultNodes,h=o.hasDefaultEdges;t!=null&&t.length&&(f&&i({nodeInternals:qK(t,a)}),l==null||l(t)),r!=null&&r.length&&(h&&i({edges:kK(r,u)}),d==null||d(r))}var Vb=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],QI={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:Vb,nodeExtent:Vb,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:So.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 eP(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 Yr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Bx=GW(),LK=Bx.Provider,gt=Bx.useStore,Ft=Bx.useStoreApi,BK=function(){return WW(function(t,r){return Yr(Yr({},QI),{},{setNodes:function(i){t({nodeInternals:_m(i,r().nodeInternals)})},setEdges:function(i){var o=r(),a=o.defaultEdgeOptions,u=a===void 0?{}:a;t({edges:i.map(function(l){return Yr(Yr({},u),l)})})},setDefaultNodesAndEdges:function(i,o){var a=typeof i<"u",u=typeof o<"u",l=a?_m(i,new Map):new Map,d=u?o:[];t({nodeInternals:l,edges:d,hasDefaultNodes:a,hasDefaultEdges:u})},updateNodeDimensions:function(i){var o=r(),a=o.onNodesChange,u=o.nodeInternals,l=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,x=i.reduce(function(w,E){var _=u.get(E.id);if(_){var S=kx(E.nodeElement),R=!!(S.width&&S.height&&(_.width!==S.width||_.height!==S.height||E.forceUpdate));R&&(u.set(_.id,Yr(Yr({},_),{},He({},Nt,Yr(Yr({},_[Nt]),{},{handleBounds:{source:XI(".source",E.nodeElement,y),target:XI(".target",E.nodeElement,y)}})),S)),w.push({id:_.id,type:"dimensions",dimensions:S}))}return w},[]),b=d||l&&!d&&S2(r,Yr({initial:!0},f));t({nodeInternals:new Map(u),fitViewOnInitDone:b}),(x==null?void 0:x.length)>0&&(a==null||a(x))}},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(),l=u.onNodesChange,d=u.nodeInternals,f=u.hasDefaultNodes;if(f||l){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=g2(h,Array.from(d.values())),v=_m(p,d);t({nodeInternals:v})}l==null||l(h)}}},addSelectedNodes:function(i){var o=r(),a=o.multiSelectionActive,u=o.nodeInternals,l=o.edges,d,f=null;a?d=i.map(function(h){return Fn(h,!0)}):(d=so(Array.from(u.values()),i),f=so(l,[])),du({changedNodes:d,changedEdges:f,get:r,set:t})},addSelectedEdges:function(i){var o=r(),a=o.multiSelectionActive,u=o.edges,l=o.nodeInternals,d,f=null;a?d=i.map(function(h){return Fn(h,!0)}):(d=so(u,i),f=so(Array.from(l.values()),[])),du({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(),l=u.nodeInternals,d=u.edges,f=o||Array.from(l.values()),h=a||d,p=f.map(function(m){return m.selected=!1,Fn(m.id,!1)}),v=h.map(function(m){return Fn(m.id,!1)});du({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()),l=u.filter(function(f){return f.selected}).map(function(f){return Fn(f.id,!1)}),d=a.filter(function(f){return f.selected}).map(function(f){return Fn(f.id,!1)});du({changedNodes:l,changedEdges:d,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(u){u.positionAbsolute=d2(u.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(Yr({},QI))}})})};function cr(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=cr(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function Xt(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 FK(e){if(Array.isArray(e))return zb(e)}function $K(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zK(){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 gi(e){return FK(e)||$K(e)||f2(e)||zK()}var HK={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},VK=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},UK=function(){var t=Ft(),r=gt(VK,Xt),n=r.d3Zoom,i=r.d3Selection,o=T.useMemo(function(){return i&&n?{zoomIn:function(u){return n.scaleBy(ui(i,u==null?void 0:u.duration),1.2)},zoomOut:function(u){return n.scaleBy(ui(i,u==null?void 0:u.duration),1/1.2)},zoomTo:function(u,l){return n.scaleTo(ui(i,l==null?void 0:l.duration),u)},getZoom:function(){return t.getState().transform[2]},setViewport:function(u,l){var d,f,h,p=Le(t.getState().transform,3),v=p[0],m=p[1],y=p[2],x=vi.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(ui(i,l==null?void 0:l.duration),x)},getViewport:function(){var u=Le(t.getState().transform,3),l=u[0],d=u[1],f=u[2];return{x:l,y:d,zoom:f}},fitView:function(u){return S2(t.getState,u)},setCenter:function(u,l,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,x=p/2-l*m,b=vi.translate(y,x).scale(m);n.transform(ui(i,d==null?void 0:d.duration),b)},fitBounds:function(u,l){var d,f=t.getState(),h=f.width,p=f.height,v=f.minZoom,m=f.maxZoom,y=_2(u,h,p,v,m,(d=l==null?void 0:l.padding)!==null&&d!==void 0?d:.1),x=Le(y,3),b=x[0],w=x[1],E=x[2],_=vi.translate(b,w).scale(E);n.transform(ui(i,l==null?void 0:l.duration),_)},project:function(u){var l=t.getState(),d=l.transform,f=l.snapToGrid,h=l.snapGrid;return b2(u,d,f,h)},viewportInitialized:!0}:HK},[n,i]);return o};function tP(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 Ji(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O2(){var e=UK(),t=Ft(),r=T.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=Array.from(p.values());return v.map(function(m){return Ji({},m)})},[]),n=T.useCallback(function(h){var p=t.getState(),v=p.nodeInternals;return v.get(h)},[]),i=T.useCallback(function(){var h=t.getState(),p=h.edges,v=p===void 0?[]:p;return v.map(function(m){return Ji({},m)})},[]),o=T.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=T.useCallback(function(h){var p=t.getState(),v=p.nodeInternals,m=p.setNodes,y=p.hasDefaultNodes,x=p.onNodesChange,b=Array.from(v.values()),w=typeof h=="function"?h(b):h;if(y)m(w);else if(x){var E=w.length===0?b.map(function(_){return{type:"remove",id:_.id}}):w.map(function(_){return{item:_,type:"reset"}});x(E)}},[]),u=T.useCallback(function(h){var p=t.getState(),v=p.edges,m=v===void 0?[]:v,y=p.setEdges,x=p.hasDefaultEdges,b=p.onEdgesChange,w=typeof h=="function"?h(m):h;if(x)y(w);else if(b){var E=w.length===0?m.map(function(_){return{type:"remove",id:_.id}}):w.map(function(_){return{item:_,type:"reset"}});b(E)}},[]),l=T.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),m=v.nodeInternals,y=v.setNodes,x=v.hasDefaultNodes,b=v.onNodesChange;if(x){var w=Array.from(m.values()),E=[].concat(w,gi(p));y(E)}else if(b){var _=p.map(function(S){return{item:S,type:"add"}});b(_)}},[]),d=T.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),m=v.edges,y=m===void 0?[]:m,x=v.setEdges,b=v.hasDefaultEdges,w=v.onEdgesChange;if(b)x([].concat(gi(y),gi(p)));else if(w){var E=p.map(function(_){return{item:_,type:"add"}});w(E)}},[]),f=T.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=h.edges,m=v===void 0?[]:v,y=h.transform,x=Array.from(p.values()),b=Le(y,3),w=b[0],E=b[1],_=b[2];return{nodes:x.map(function(S){return Ji({},S)}),edges:m.map(function(S){return Ji({},S)}),viewport:{x:w,y:E,zoom:_}}},[]);return T.useMemo(function(){return Ji(Ji({},e),{},{getNodes:r,getNode:n,getEdges:i,getEdge:o,setNodes:a,setEdges:u,addNodes:l,addEdges:d,toObject:f})},[e,r,n,i,o,a,u,l,d,f])}function WK(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 zl(e,t){if(e==null)return{};var r=WK(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 GK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},T.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function KK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},T.createElement("path",{d:"M0 0h32v4.2H0z"}))}function YK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},T.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 XK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},T.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 ZK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},T.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 JK=["children","className"];function rP(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 QK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var hu=function(t){var r=t.children,n=t.className,i=zl(t,JK);return T.createElement("button",QK({type:"button",className:cr(["react-flow__controls-button",n])},i),r)},eY=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},tY=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,l=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,x=Ft(),b=T.useState(!1),w=Le(b,2),E=w[0],_=w[1],S=gt(eY),R=O2(),I=R.zoomIn,P=R.zoomOut,A=R.fitView;if(T.useEffect(function(){_(!0)},[]),!E)return null;var k=function(){I==null||I(),f==null||f()},L=function(){P==null||P(),h==null||h()},$=function(){A==null||A(d),p==null||p()},j=function(){x.setState({nodesDraggable:!S,nodesConnectable:!S,elementsSelectable:!S}),v==null||v(!S)};return T.createElement("div",{className:cr(["react-flow__controls",m]),style:r},i&&T.createElement(T.Fragment,null,T.createElement(hu,{onClick:k,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},T.createElement(GK,null)),T.createElement(hu,{onClick:L,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},T.createElement(KK,null))),a&&T.createElement(hu,{className:"react-flow__controls-fitview",onClick:$,title:"fit view","aria-label":"fit view"},T.createElement(YK,null)),l&&T.createElement(hu,{className:"react-flow__controls-interactive",onClick:j,title:"toggle interactivity","aria-label":"toggle interactivity"},S?T.createElement(ZK,null):T.createElement(XK,null)),y)};tY.displayName="Controls";var rY=function(t,r,n){return T.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},nY=function(t,r){return T.createElement("circle",{cx:t,cy:t,r:t,fill:r})},pu;function nP(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 iP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var iY=(pu={},He(pu,wi.Dots,"#81818a"),He(pu,wi.Lines,"#eee"),pu),oY=function(t){return t.transform},C2=function(t){var r=t.variant,n=r===void 0?wi.Dots:r,i=t.gap,o=i===void 0?15:i,a=t.size,u=a===void 0?.4:a,l=t.color,d=t.style,f=t.className,h=T.useRef(null),p=T.useState(null),v=Le(p,2),m=v[0],y=v[1],x=gt(oY),b=Le(x,3),w=b[0],E=b[1],_=b[2];T.useEffect(function(){var L=document.querySelectorAll(".react-flow__background"),$=Array.from(L).findIndex(function(j){return j===h.current});y("pattern-".concat($))},[]);var S=o*_||1,R=w%S,I=E%S,P=n===wi.Lines,A=l||iY[n],k=P?rY(S,u,A):nY(u*_,A);return T.createElement("svg",{className:cr(["react-flow__background","react-flow__container",f]),style:iP(iP({},d),{},{width:"100%",height:"100%"}),ref:h},m&&T.createElement(T.Fragment,null,T.createElement("pattern",{id:m,x:R,y:I,width:S,height:S,patternUnits:"userSpaceOnUse"},k),T.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(m,")")})))};C2.displayName="Background";var aY=T.memo(C2),sY=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function uY(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&sY.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var i="".concat(n).split("-");return T.createElement("div",{className:cr(["react-flow__attribution"].concat(gi(i))),"data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev/pricing"},T.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var lY=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function oP(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 cY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var fY=function(t){var r=t.x,n=t.y,i=t.label,o=t.labelStyle,a=o===void 0?{}:o,u=t.labelShowBg,l=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,x=t.className,b=zl(t,lY),w=T.useRef(null),E=T.useState({x:0,y:0,width:0,height:0}),_=Le(E,2),S=_[0],R=_[1],I=cr(["react-flow__edge-textwrapper",x]);return T.useEffect(function(){if(w.current){var P=w.current.getBBox();R({x:P.x,y:P.y,width:P.width,height:P.height})}},[i]),typeof i>"u"||!i?null:T.createElement("g",cY({transform:"translate(".concat(r-S.width/2," ").concat(n-S.height/2,")"),className:I},b),l&&T.createElement("rect",{width:S.width+2*p[0],x:-p[0],y:-p[1],height:S.height+2*p[1],className:"react-flow__edge-textbg",style:f,rx:m,ry:m}),T.createElement("text",{className:"react-flow__edge-text",y:S.height/2,dy:"0.3em",ref:w,style:a},i),y)},dY=T.memo(fY),Hl=(function(e){var t=e.path,r=e.centerX,n=e.centerY,i=e.label,o=e.labelStyle,a=e.labelShowBg,u=e.labelBgStyle,l=e.labelBgPadding,d=e.labelBgBorderRadius,f=e.style,h=e.markerEnd,p=e.markerStart,v=i?T.createElement(dY,{x:r,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:u,labelBgPadding:l,labelBgBorderRadius:d}):null;return T.createElement(T.Fragment,null,T.createElement("path",{style:f,d:t,className:"react-flow__edge-path",markerEnd:h,markerStart:p}),v)});function Zu(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a,u;switch(t){case Se.Left:case Se.Right:a=.5*(r+i),u=n;break;case Se.Top:case Se.Bottom:a=r,u=.5*(n+o);break}return[a,u]}function R2(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?Se.Top:u,d=Zu({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Le(d,2),h=f[0],p=f[1],v=Zu({pos:l,x1:o,y1:a,x2:t,y2:r}),m=Le(v,2),y=m[0],x=m[1];return"M".concat(t,",").concat(r," C").concat(h,",").concat(p," ").concat(y,",").concat(x," ").concat(o,",").concat(a)}function hY(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?Se.Top:u,d=Zu({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Le(d,2),h=f[0],p=f[1],v=Zu({pos:l,x1:o,y1:a,x2:t,y2:r}),m=Le(v,2),y=m[0],x=m[1],b=t*.125+h*.375+y*.375+o*.125,w=r*.125+p*.375+x*.375+a*.125,E=Math.abs(b-t),_=Math.abs(w-r);return[b,w,E,_]}var I2=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?Se.Bottom:o,u=e.targetPosition,l=u===void 0?Se.Top:u,d=e.label,f=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,m=e.labelBgBorderRadius,y=e.style,x=e.markerEnd,b=e.markerStart,w={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:l},E=R2(w),_=hY(w),S=Le(_,2),R=S[0],I=S[1];return T.createElement(Hl,{path:E,centerX:R,centerY:I,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:x,markerStart:b})});function aP(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 pY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var sP=[Se.Left,Se.Right],P2=function(t){var r=t.sourceX,n=t.sourceY,i=t.targetX,o=t.targetY,a=t.sourcePosition,u=a===void 0?Se.Bottom:a,l=t.targetPosition,d=l===void 0?Se.Top:l,f=sP.includes(u),h=sP.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),x=n<o?n+y:n-y;return[m,x,v,y]}var b=Math.abs(i-r)/2,w=i<r?i+b:i-b,E=Math.abs(o-n)/2,_=o<n?o+E:o-E;return[w,_,b,E]};function la(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,pY({},i))}}var Em=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},Sm=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},Om=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},Cm=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},Rm=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},Im=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},Pm=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},Nm=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function Ub(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?Se.Top:u,d=e.borderRadius,f=d===void 0?5:d,h=e.centerX,p=e.centerY,v=P2({sourceX:t,sourceY:r,targetX:o,targetY:a}),m=Le(v,4),y=m[0],x=m[1],b=m[2],w=m[3],E=Math.min(f,Math.abs(o-t)),_=Math.min(f,Math.abs(a-r)),S=Math.min(E,_,b,w),R=[Se.Left,Se.Right],I=typeof h<"u"?h:y,P=typeof p<"u"?p:x,A=null,k=null;return t<=o?(A=r<=a?Em(t,P,S):Im(t,P,S),k=r<=a?Nm(o,P,S):Cm(o,P,S)):(A=r<a?Om(t,P,S):Pm(t,P,S),k=r<a?Rm(o,P,S):Sm(o,P,S)),R.includes(i)&&R.includes(l)?t<=o?(A=r<=a?Nm(I,r,S):Cm(I,r,S),k=r<=a?Em(I,a,S):Im(I,a,S)):(i===Se.Right&&l===Se.Left||i===Se.Left&&l===Se.Right||i===Se.Left&&l===Se.Left)&&(A=r<=a?Rm(I,r,S):Sm(I,r,S),k=r<=a?Om(I,a,S):Pm(I,a,S)):R.includes(i)&&!R.includes(l)?(t<=o?A=r<=a?Nm(o,r,S):Cm(o,r,S):A=r<=a?Rm(o,r,S):Sm(o,r,S),k=""):!R.includes(i)&&R.includes(l)&&(t<=o?A=r<=a?Em(t,a,S):Im(t,a,S):A=r<=a?Om(t,a,S):Pm(t,a,S),k=""),"M ".concat(t,",").concat(r).concat(A).concat(k,"L ").concat(o,",").concat(a)}var Fx=T.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,l=e.labelBgStyle,d=e.labelBgPadding,f=e.labelBgBorderRadius,h=e.style,p=e.sourcePosition,v=p===void 0?Se.Bottom:p,m=e.targetPosition,y=m===void 0?Se.Top:m,x=e.markerEnd,b=e.markerStart,w=e.borderRadius,E=w===void 0?5:w,_=P2({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:v,targetPosition:y}),S=Le(_,2),R=S[0],I=S[1],P=Ub({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:i,targetPosition:y,borderRadius:E});return T.createElement(Hl,{path:P,centerX:R,centerY:I,label:o,labelStyle:a,labelShowBg:u,labelBgStyle:l,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:x,markerStart:b})});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 lP(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){He(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 N2=T.memo(function(e){return T.createElement(Fx,lP(lP({},e),{},{borderRadius:0}))}),T2=T.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,l=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,x=Math.abs(n-t)/2,b=n<t?n+x:n-x,w="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(i);return T.createElement(Hl,{path:w,centerX:b,centerY:y,label:o,labelStyle:a,labelShowBg:u,labelBgStyle:l,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:v})});function vu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ju(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a=e.c,u,l;switch(t){case Se.Left:u=r-vu(r-i,a),l=n;break;case Se.Right:u=r+vu(i-r,a),l=n;break;case Se.Top:u=r,l=n-vu(n-o,a);break;case Se.Bottom:u=r,l=n+vu(o-n,a);break}return[u,l]}function Vl(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?Se.Top:u,d=e.curvature,f=d===void 0?.25:d,h=Ju({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Le(h,2),v=p[0],m=p[1],y=Ju({pos:l,x1:o,y1:a,x2:t,y2:r,c:f}),x=Le(y,2),b=x[0],w=x[1];return"M".concat(t,",").concat(r," C").concat(v,",").concat(m," ").concat(b,",").concat(w," ").concat(o,",").concat(a)}function vY(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?Se.Top:u,d=e.curvature,f=d===void 0?.25:d,h=Ju({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Le(h,2),v=p[0],m=p[1],y=Ju({pos:l,x1:o,y1:a,x2:t,y2:r,c:f}),x=Le(y,2),b=x[0],w=x[1],E=t*.125+v*.375+b*.375+o*.125,_=r*.125+m*.375+w*.375+a*.125,S=Math.abs(E-t),R=Math.abs(_-r);return[E,_,S,R]}var Wb=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?Se.Bottom:o,u=e.targetPosition,l=u===void 0?Se.Top:u,d=e.label,f=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,m=e.labelBgBorderRadius,y=e.style,x=e.markerEnd,b=e.markerStart,w=e.curvature,E={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:l,curvature:w},_=Vl(E),S=vY(E),R=Le(S,2),I=R[0],P=R[1];return T.createElement(Hl,{path:_,centerX:I,centerY:P,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:x,markerStart:b})}),$x=T.createContext(null),gY=$x.Provider;$x.Consumer;function Gb(e,t,r,n,i,o,a){var u=a.elementFromPoint(e.clientX,e.clientY),l=(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&&(l||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===So.Strict?r&&d||!r&&l:!0;m&&(f.isValid=o(v))}return f}function Tm(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function A2(e){var t=e.event,r=e.handleId,n=e.nodeId,i=e.onConnect,o=e.isTarget,a=e.getState,u=e.setState,l=e.isValidConnection,d=e.elementEdgeUpdaterType,f=e.onEdgeUpdateEnd,h=t.target.closest(".react-flow"),p=h2(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 x=a(),b=x.onConnectStart,w=x.connectionMode,E=d||(m?"target":"source"),_=h.getBoundingClientRect(),S;u({connectionPosition:{x:t.clientX-_.left,y:t.clientY-_.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:E}),b==null||b(t,{nodeId:n,handleId:r,handleType:E});function R(P){u({connectionPosition:{x:P.clientX-_.left,y:P.clientY-_.top}});var A=Gb(P,w,o,n,r,l,p),k=A.connection,L=A.elementBelow,$=A.isValid,j=A.isHoveringHandle;if(!j)return Tm(S);k.source!==k.target&&L&&(Tm(S),S=L,L.classList.add("react-flow__handle-connecting"),L.classList.toggle("react-flow__handle-valid",$))}function I(P){var A=a(),k=A.onConnectStop,L=A.onConnectEnd,$=Gb(P,w,o,n,r,l,p),j=$.connection,D=$.isValid;k==null||k(P),D&&(i==null||i(j)),L==null||L(P),d&&f&&f(P),Tm(S),u({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),p.removeEventListener("mousemove",R),p.removeEventListener("mouseup",I)}p.addEventListener("mousemove",R),p.addEventListener("mouseup",I)}var mY=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];function cP(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 Am(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var yY=function(){return!0},bY=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},M2=T.forwardRef(function(e,t){var r=e.type,n=r===void 0?"source":r,i=e.position,o=i===void 0?Se.Top:i,a=e.isValidConnection,u=a===void 0?yY:a,l=e.isConnectable,d=l===void 0?!0:l,f=e.id,h=e.onConnect,p=e.children,v=e.className,m=e.onMouseDown,y=zl(e,mY),x=Ft(),b=T.useContext($x),w=gt(bY,Xt),E=w.connectionStartHandle,_=w.connectOnClick,S=f||null,R=n==="target",I=function(L){var $=x.getState(),j=$.defaultEdgeOptions,D=$.onConnect,G=$.hasDefaultEdges,B=Am(Am({},j),L);if(G){var Y=x.getState(),Z=Y.edges;x.setState({edges:jK(B,Z)})}D==null||D(B),h==null||h(B)},P=function(L){L.button===0&&A2({event:L,handleId:S,nodeId:b,onConnect:I,isTarget:R,getState:x.getState,setState:x.setState,isValidConnection:u}),m==null||m(L)},A=function(L){var $=x.getState(),j=$.onClickConnectStart,D=$.onClickConnectStop,G=$.onClickConnectEnd,B=$.connectionMode;if(!E){j==null||j(L,{nodeId:b,handleId:S,handleType:n}),x.setState({connectionStartHandle:{nodeId:b,type:n,handleId:S}});return}var Y=h2(L.target),Z=Gb(L,B,E.type==="target",E.nodeId,E.handleId||null,u,Y),te=Z.connection,U=Z.isValid;D==null||D(L),U&&I(te),G==null||G(L),x.setState({connectionStartHandle:null})};return T.createElement("div",Am({"data-handleid":S,"data-nodeid":b,"data-handlepos":o,className:cr(["react-flow__handle","react-flow__handle-".concat(o),"nodrag",v,{source:!R,target:R,connectable:d,connecting:(E==null?void 0:E.nodeId)===b&&(E==null?void 0:E.handleId)===S&&(E==null?void 0:E.type)===n}]),onMouseDown:P,onClick:_?A:void 0,ref:t},y),p)});M2.displayName="Handle";var Qu=T.memo(M2),D2=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Se.Top:i,a=t.sourcePosition,u=a===void 0?Se.Bottom:a;return T.createElement(T.Fragment,null,T.createElement(Qu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,T.createElement(Qu,{type:"source",position:u,isConnectable:n}))};D2.displayName="DefaultNode";var Kb=T.memo(D2),j2=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?Se.Bottom:i;return T.createElement(T.Fragment,null,r==null?void 0:r.label,T.createElement(Qu,{type:"source",position:o,isConnectable:n}))};j2.displayName="InputNode";var q2=T.memo(j2),k2=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Se.Top:i;return T.createElement(T.Fragment,null,T.createElement(Qu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};k2.displayName="OutputNode";var L2=T.memo(k2),xY=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},wY=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 Xt(n,i)&&Xt(o,a)};function _Y(e){var t=e.onSelectionChange,r=gt(xY,wY),n=r.selectedNodes,i=r.selectedEdges;return T.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var EY=T.memo(_Y),SY=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 qn(e,t){T.useEffect(function(){typeof e<"u"&&t(e)},[e])}function tt(e,t,r){T.useEffect(function(){typeof t<"u"&&r(He({},e,t))},[t])}var OY=function(t){var r=t.nodes,n=t.edges,i=t.defaultNodes,o=t.defaultEdges,a=t.onConnect,u=t.onConnectStart,l=t.onConnectStop,d=t.onConnectEnd,f=t.onClickConnectStart,h=t.onClickConnectStop,p=t.onClickConnectEnd,v=t.nodesDraggable,m=t.nodesConnectable,y=t.minZoom,x=t.maxZoom,b=t.nodeExtent,w=t.onNodesChange,E=t.onEdgesChange,_=t.elementsSelectable,S=t.connectionMode,R=t.snapGrid,I=t.snapToGrid,P=t.translateExtent,A=t.connectOnClick,k=t.defaultEdgeOptions,L=t.fitView,$=t.fitViewOptions,j=t.onNodesDelete,D=t.onEdgesDelete,G=t.onNodeDrag,B=t.onNodeDragStart,Y=t.onNodeDragStop,Z=t.onSelectionDrag,te=t.onSelectionDragStart,U=t.onSelectionDragStop,re=gt(SY,Xt),ae=re.setNodes,le=re.setEdges,F=re.setDefaultNodesAndEdges,W=re.setMinZoom,J=re.setMaxZoom,H=re.setTranslateExtent,K=re.setNodeExtent,se=re.reset,oe=Ft();return T.useEffect(function(){return F(i,o),function(){se()}},[]),tt("defaultEdgeOptions",k,oe.setState),tt("connectionMode",S,oe.setState),tt("onConnect",a,oe.setState),tt("onConnectStart",u,oe.setState),tt("onConnectStop",l,oe.setState),tt("onConnectEnd",d,oe.setState),tt("onClickConnectStart",f,oe.setState),tt("onClickConnectStop",h,oe.setState),tt("onClickConnectEnd",p,oe.setState),tt("nodesDraggable",v,oe.setState),tt("nodesConnectable",m,oe.setState),tt("elementsSelectable",_,oe.setState),tt("snapToGrid",I,oe.setState),tt("snapGrid",R,oe.setState),tt("onNodesChange",w,oe.setState),tt("onEdgesChange",E,oe.setState),tt("connectOnClick",A,oe.setState),tt("fitViewOnInit",L,oe.setState),tt("fitViewOnInitOptions",$,oe.setState),tt("onNodesDelete",j,oe.setState),tt("onEdgesDelete",D,oe.setState),tt("onNodeDrag",G,oe.setState),tt("onNodeDragStart",B,oe.setState),tt("onNodeDragStop",Y,oe.setState),tt("onSelectionDrag",Z,oe.setState),tt("onSelectionDragStart",te,oe.setState),tt("onSelectionDragStop",U,oe.setState),qn(r,ae),qn(n,le),qn(i,ae),qn(o,le),qn(y,W),qn(x,J),qn(P,H),qn(b,K),null},CY=".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%)}",RY=CY,IY=".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}",PY=IY,NY=function(t,r,n){return n===Se.Left?t-r:n===Se.Right?t+r:t},TY=function(t,r,n){return n===Se.Top?t-r:n===Se.Bottom?t+r:t},fP=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 T.createElement("circle",{className:cr(["react-flow__edgeupdater",r]),cx:NY(i,u,n),cy:TY(o,u,n),r:u,stroke:"transparent",fill:"transparent"})},Qi=(function(e){var t=function(n){var i=n.id,o=n.className,a=n.type,u=n.data,l=n.onClick,d=n.onEdgeDoubleClick,f=n.selected,h=n.animated,p=n.label,v=n.labelStyle,m=n.labelShowBg,y=n.labelBgStyle,x=n.labelBgPadding,b=n.labelBgBorderRadius,w=n.style,E=n.source,_=n.target,S=n.sourceX,R=n.sourceY,I=n.targetX,P=n.targetY,A=n.sourcePosition,k=n.targetPosition,L=n.elementsSelectable,$=n.hidden,j=n.sourceHandleId,D=n.targetHandleId,G=n.onContextMenu,B=n.onMouseEnter,Y=n.onMouseMove,Z=n.onMouseLeave,te=n.edgeUpdaterRadius,U=n.onEdgeUpdate,re=n.onEdgeUpdateStart,ae=n.onEdgeUpdateEnd,le=n.markerEnd,F=n.markerStart,W=n.rfId,J=T.useState(!1),H=Le(J,2),K=H[0],se=H[1],oe=Ft(),fe=function(rt){var bt=oe.getState(),Jt=bt.edges,fr=bt.addSelectedEdges,Dt=Jt.find(function(_t){return _t.id===i});L&&(oe.setState({nodesSelectionActive:!1}),fr([i])),l==null||l(rt,Dt)},V=la(i,oe.getState,d),ee=la(i,oe.getState,G),we=la(i,oe.getState,B),be=la(i,oe.getState,Y),de=la(i,oe.getState,Z),ue=function(rt,bt){var Jt=bt?_:E,fr=(bt?D:j)||null,Dt=bt?"target":"source",_t=function(){return!0},jt=bt,Ur=oe.getState().edges.find(function(dr){return dr.id===i});re==null||re(rt,Ur,Dt);var Yn=ae?function(dr){return ae(dr,Ur,Dt)}:void 0,Cn=function(Mi){return U==null?void 0:U(Ur,Mi)};A2({event:rt,handleId:fr,nodeId:Jt,onConnect:Cn,isTarget:jt,getState:oe.getState,setState:oe.setState,isValidConnection:_t,elementEdgeUpdaterType:Dt,onEdgeUpdateEnd:Yn})},Ee=function(rt){return ue(rt,!0)},Pe=function(rt){return ue(rt,!1)},Ze=function(){return se(!0)},ze=function(){return se(!1)},Fe=T.useMemo(function(){return"url(#".concat(Hb(F,W),")")},[F,W]),Ve=T.useMemo(function(){return"url(#".concat(Hb(le,W),")")},[le,W]);if($)return null;var lt=!L&&!l,ct=typeof U<"u",mt=cr(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:f,animated:h,inactive:lt,updating:K}]);return T.createElement("g",{className:mt,onClick:fe,onDoubleClick:V,onContextMenu:ee,onMouseEnter:we,onMouseMove:be,onMouseLeave:de},T.createElement(e,{id:i,source:E,target:_,selected:f,animated:h,label:p,labelStyle:v,labelShowBg:m,labelBgStyle:y,labelBgPadding:x,labelBgBorderRadius:b,data:u,style:w,sourceX:S,sourceY:R,targetX:I,targetY:P,sourcePosition:A,targetPosition:k,sourceHandleId:j,targetHandleId:D,markerStart:Fe,markerEnd:Ve,"data-testid":"rf__edge-".concat(i)}),ct&&T.createElement("g",{onMouseDown:Ee,onMouseEnter:Ze,onMouseOut:ze},T.createElement(fP,{position:A,centerX:S,centerY:R,radius:te})),ct&&T.createElement("g",{onMouseDown:Pe,onMouseEnter:Ze,onMouseOut:ze},T.createElement(fP,{position:k,centerX:I,centerY:P,radius:te})))};return t.displayName="EdgeWrapper",T.memo(t)});function dP(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 hP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AY(e){var t={default:Qi(e.default||Wb),straight:Qi(e.bezier||T2),step:Qi(e.step||N2),smoothstep:Qi(e.step||Fx),simplebezier:Qi(e.simplebezier||I2)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=Qi(e[o]||Wb),i},r);return hP(hP({},t),n)}function pP(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 Se.Top:return{x:n+o/2,y:i};case Se.Right:return{x:n+o,y:i+a/2};case Se.Bottom:return{x:n+o/2,y:i+a};case Se.Left:return{x:n,y:i+a/2}}}function vP(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 MY=function(t,r,n,i,o,a){var u=pP(n,t,r),l=pP(a,i,o);return{sourceX:u.x,sourceY:u.y,targetX:l.x,targetY:l.y}};function DY(e){var t=e.sourcePos,r=e.targetPos,n=e.sourceWidth,i=e.sourceHeight,o=e.targetWidth,a=e.targetHeight,u=e.width,l=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=Xu({x:(0-d[0])/d[2],y:(0-d[1])/d[2],width:u/d[2],height:l/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 gP(e,t){var r,n,i,o,a,u=e.get(t),l=(u==null||(r=u[Nt])===null||r===void 0?void 0:r.handleBounds)||null,d=!u||!l||!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},l,!d]}var jY=typeof document<"u"?document:null,el=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:jY},r=T.useState(!1),n=Le(r,2),i=n[0],o=n[1],a=T.useRef(new Set([])),u=T.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,gi(y))},[]);return[p,v]}return[[],[]]},[e]),l=Le(u,2),d=l[0],f=l[1];return T.useEffect(function(){if(e!==null){var h,p,v=function(b){if(bP(b))return!1;var w=yP(b.code,f);a.current.add(b[w]),mP(d,a.current,!1)&&(b.preventDefault(),o(!0))},m=function(b){if(bP(b))return!1;var w=yP(b.code,f);mP(d,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(b[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 x,b;t==null||(x=t.target)===null||x===void 0||x.removeEventListener("keydown",v),t==null||(b=t.target)===null||b===void 0||b.removeEventListener("keyup",m),window.removeEventListener("blur",y)}}},[e,o]),i});function mP(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 yP(e,t){return t.includes(e)?"code":"key"}function bP(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 qY=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},kY=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Ft(),i=gt(qY,Xt),o=i.onNodesChange,a=i.onEdgesChange,u=el(t),l=el(r);T.useEffect(function(){var d=n.getState(),f=d.nodeInternals,h=d.edges,p=d.hasDefaultNodes,v=d.hasDefaultEdges,m=d.onNodesDelete,y=d.onEdgesDelete,x=Array.from(f.values()),b=x.reduce(function(P,A){return(!A.selected&&A.parentNode&&P.find(function(k){return k.id===A.parentNode})||A.selected)&&P.push(A),P},[]),w=h.filter(function(P){return P.selected});if(u&&(b||w)){var E=w2(b,h),_=[].concat(gi(w),gi(E)),S=_.reduce(function(P,A){return P.includes(A.id)||P.push(A.id),P},[]);if((v||p)&&(v&&n.setState({edges:h.filter(function(P){return!S.includes(P.id)})}),p&&(b.forEach(function(P){f.delete(P.id)}),n.setState({nodeInternals:new Map(f)}))),S.length>0&&(y==null||y(_),a)){var R=S.map(function(P){return{id:P,type:"remove"}});a(R)}if(b.length>0&&(m==null||m(b),o)){var I=b.map(function(P){return{id:P.id,type:"remove"}});o(I)}n.setState({nodesSelectionActive:!1})}},[u,o,a]),T.useEffect(function(){n.setState({multiSelectionActive:l})},[l])});function LY(e){var t=Ft();T.useEffect(function(){var r,n=function(){if(e.current){var o=kx(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 BY=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},Mm=function(t){return{x:t.x,y:t.y,zoom:t.k}},gu=function(t,r){return t.target.closest(".".concat(r))},FY=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,l=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?ho.Free:v,y=t.zoomOnDoubleClick,x=y===void 0?!0:y,b=t.selectionKeyPressed,w=t.elementsSelectable,E=t.panOnDrag,_=E===void 0?!0:E,S=t.translateExtent,R=t.minZoom,I=t.maxZoom,P=t.defaultZoom,A=P===void 0?1:P,k=t.defaultPosition,L=k===void 0?[0,0]:k,$=t.zoomActivationKeyCode,j=t.preventScrolling,D=j===void 0?!0:j,G=t.children,B=t.noWheelClassName,Y=t.noPanClassName,Z=Ft(),te=T.useRef(!1),U=T.useRef(null),re=T.useRef({x:0,y:0,zoom:0}),ae=gt(FY,Xt),le=ae.d3Zoom,F=ae.d3Selection,W=ae.d3ZoomHandler,J=el($);return LY(U),T.useEffect(function(){if(U.current){var H,K=OK().scaleExtent([R,I]).translateExtent(S),se=qr(U.current).call(K),oe=po(L[0],S[0][0],S[1][0]),fe=po(L[1],S[0][1],S[1][1]),V=po(A,R,I),ee=vi.translate(oe,fe).scale(V);K.transform(se,ee),Z.setState({d3Zoom:K,d3Selection:se,d3ZoomHandler:se.on("wheel.zoom"),transform:[oe,fe,V],domNode:(H=se.node())===null||H===void 0?void 0:H.closest(".react-flow")})}},[]),T.useEffect(function(){F&&le&&(f&&!J?F.on("wheel",function(H){if(gu(H,B))return!1;H.preventDefault(),H.stopImmediatePropagation();var K=F.property("__zoom").k||1;if(H.ctrlKey&&l){var se=Zr(H),oe=-H.deltaY*(H.deltaMode===1?.05:H.deltaMode?1:.002)*10,fe=K*Math.pow(2,oe);le.scaleTo(F,fe,se);return}var V=H.deltaMode===1?20:1,ee=m===ho.Vertical?0:H.deltaX*V,we=m===ho.Horizontal?0:H.deltaY*V;le.translateBy(F,-(ee/K)*p,-(we/K)*p)}).on("wheel.zoom",null):typeof W<"u"&&F.on("wheel",function(H){if(!D||gu(H,B))return null;H.preventDefault()}).on("wheel.zoom",W))},[f,m,F,le,W,J,l,D,B]),T.useEffect(function(){le&&(b&&!te.current?le.on("zoom",null):b||le.on("zoom",function(H){if(Z.setState({transform:[H.transform.x,H.transform.y,H.transform.k]}),r){var K=Mm(H.transform);r(H.sourceEvent,K)}}))},[b,le,r]),T.useEffect(function(){le&&le.on("start",function(H){if(te.current=!0,n){var K=Mm(H.transform);re.current=K,n(H.sourceEvent,K)}})},[le,n]),T.useEffect(function(){le&&le.on("end",function(H){if(te.current=!1,i&&BY(re.current,H.transform)){var K=Mm(H.transform);re.current=K,i(H.sourceEvent,K)}})},[le,i]),T.useEffect(function(){le&&le.filter(function(H){var K=J||a,se=l&&H.ctrlKey;return!_&&!K&&!f&&!x&&!l||b||!x&&H.type==="dblclick"||gu(H,B)&&H.type==="wheel"||gu(H,Y)&&H.type!=="wheel"||!l&&H.ctrlKey&&H.type==="wheel"||!K&&!f&&!se&&H.type==="wheel"||!_&&(H.type==="mousedown"||H.type==="touchstart")?!1:(!H.ctrlKey||H.type==="wheel")&&!H.button})},[le,a,l,f,x,_,b,w,J]),T.createElement("div",{className:"react-flow__renderer react-flow__container",ref:U},G)};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 wP(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){He(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}function _P(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var zY=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},EP={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},HY=T.memo(function(e){var t=e.selectionKeyPressed,r=Ft(),n=T.useRef(0),i=T.useRef(0),o=T.useRef(),a=T.useState(EP),u=Le(a,2),l=u[0],d=u[1],f=gt(zY,Xt),h=f.userSelectionActive,p=f.elementsSelectable,v=h||t;if(!p||!v)return null;var m=function(){d(EP),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},y=function(_){var S=_.target.closest(".react-flow");o.current=S.getBoundingClientRect();var R=_P(_,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})},x=function(_){var S,R;if(!(!t||!l.draw||!o.current)){var I=_P(_,o.current),P=(S=l.startX)!==null&&S!==void 0?S:0,A=(R=l.startY)!==null&&R!==void 0?R:0,k=wP(wP({},l),{},{x:I.x<P?I.x:P,y:I.y<A?I.y:A,width:Math.abs(I.x-P),height:Math.abs(I.y-A)}),L=r.getState(),$=L.nodeInternals,j=L.edges,D=L.transform,G=L.onNodesChange,B=L.onEdgesChange,Y=Array.from($.values()),Z=x2($,k,D,!1,!0),te=w2(Z,j).map(function(le){return le.id}),U=Z.map(function(le){return le.id});if(n.current!==U.length){n.current=U.length;var re=so(Y,U);re.length&&(G==null||G(re))}if(i.current!==te.length){i.current=te.length;var ae=so(j,te);ae.length&&(B==null||B(ae))}d(k)}},b=function(){r.setState({nodesSelectionActive:n.current>0}),m()},w=function(){r.setState({nodesSelectionActive:!1}),m()};return T.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:y,onMouseMove:x,onMouseUp:b,onMouseLeave:w},l.draw&&T.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:l.width,height:l.height,transform:"translate(".concat(l.x,"px, ").concat(l.y,"px)")}}))});function SP(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 OP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B2(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:B2(r,t):!1}function CP(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 VY(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!B2(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 UY(e,t,r,n,i,o){var a=Le(n,2),u=a[0],l=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=l*Math.round(f.y/l)),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,x=i.get(e.parentNode),b=(p=x==null||(v=x.positionAbsolute)===null||v===void 0?void 0:v.x)!==null&&p!==void 0?p:0,w=(m=x==null||(y=x.positionAbsolute)===null||y===void 0?void 0:y.y)!==null&&m!==void 0?m:0;d=[[e.extent[0][0]+b,e.extent[0][1]+w],[e.extent[1][0]+b,e.extent[1][1]+w]]}var E={x:0,y:0};if(e.parentNode){var _,S,R,I,P=i.get(e.parentNode);E={x:(_=P==null||(S=P.positionAbsolute)===null||S===void 0?void 0:S.x)!==null&&_!==void 0?_:0,y:(R=P==null||(I=P.positionAbsolute)===null||I===void 0?void 0:I.y)!==null&&R!==void 0?R:0}}return e.positionAbsolute=d?d2(f,d):f,e.position={x:e.positionAbsolute.x-E.x,y:e.positionAbsolute.y-E.y},e}function Dm(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return OP(OP({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function jm(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function F2(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,l=e.selectNodesOnDrag,d=T.useState(!1),f=Le(d,2),h=f[0],p=f[1],v=Ft(),m=T.useRef(),y=T.useRef({x:null,y:null}),x=T.useCallback(function(b){var w=b.sourceEvent,E=v.getState(),_=E.transform,S=E.snapGrid,R=E.snapToGrid,I=w.touches?w.touches[0].clientX:w.clientX,P=w.touches?w.touches[0].clientY:w.clientY,A=b2({x:I,y:P},_,R,S);return A},[]);return T.useEffect(function(){if(t!=null&&t.current){var b=qr(t.current);if(n)b.on(".drag",null);else{var w=j8().on("start",function(E){var _=v.getState(),S=_.nodeInternals,R=_.multiSelectionActive,I=_.unselectNodesAndEdges,P=_.onNodeDragStart,A=_.onSelectionDragStart,k=a?P:jm(A);if(!l&&!R&&a){var L;(L=S.get(a))!==null&&L!==void 0&&L.selected||I()}a&&u&&l&&y2({id:a,store:v});var $=x(E);if(y.current=$,m.current=VY(S,$,a),k&&m.current){var j=Dm({nodeId:a,dragItems:m.current,nodeInternals:S}),D=Le(j,2),G=D[0],B=D[1];k(E.sourceEvent,G,B)}}).on("drag",function(E){var _=v.getState(),S=_.updateNodePositions,R=_.snapToGrid,I=_.snapGrid,P=_.nodeInternals,A=_.nodeExtent,k=_.onNodeDrag,L=_.onSelectionDrag,$=x(E);if((y.current.x!==$.x||y.current.y!==$.y)&&m.current){y.current=$,m.current=m.current.map(function(Z){return UY(Z,$,R,I,P,A)});var j=a?k:jm(L);if(S(m.current,!0,!0),p(!0),j){var D=Dm({nodeId:a,dragItems:m.current,nodeInternals:P}),G=Le(D,2),B=G[0],Y=G[1];j(E.sourceEvent,B,Y)}}E.on("end",function(Z){if(p(!1),m.current){var te=v.getState(),U=te.updateNodePositions,re=te.nodeInternals,ae=te.onNodeDragStop,le=te.onSelectionDragStop,F=a?ae:jm(le);if(U(m.current,!1,!1),F){var W=Dm({nodeId:a,dragItems:m.current,nodeInternals:re}),J=Le(W,2),H=J[0],K=J[1];F(Z.sourceEvent,H,K)}}})}).filter(function(E){var _=E.target,S=!E.button&&(!i||!CP(_,".".concat(i),t))&&(!o||CP(_,o,t));return S});return b.call(w),function(){b.on(".drag",null)}}}},[t,n,i,o,u,v,a,l,x]),h}function RP(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 WY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var GY=function(t){return WY({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},Lx(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},KY=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return Lx(r)};function YY(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Ft(),i=gt(GY,Xt),o=i.transformString,a=i.userSelectionActive,u=gt(KY,Xt),l=u.width,d=u.height,f=u.x,h=u.y,p=T.useRef(null);if(F2({nodeRef:p}),a||!l||!d)return null;var v=t?function(m){var y=Array.from(n.getState().nodeInternals.values()).filter(function(x){return x.selected});t(m,y)}:void 0;return T.createElement("div",{className:cr(["react-flow__nodesselection","react-flow__container",r]),style:{transform:o}},T.createElement("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:v,style:{width:l,height:d,top:h,left:f}}))}var XY=T.memo(YY),ZY=function(t){return t.nodesSelectionActive},$2=function(t){var r=t.children,n=t.onPaneClick,i=t.onPaneContextMenu,o=t.onPaneScroll,a=t.deleteKeyCode,u=t.onMove,l=t.onMoveStart,d=t.onMoveEnd,f=t.selectionKeyCode,h=t.multiSelectionKeyCode,p=t.zoomActivationKeyCode,v=t.elementsSelectable,m=t.zoomOnScroll,y=t.zoomOnPinch,x=t.panOnScroll,b=t.panOnScrollSpeed,w=t.panOnScrollMode,E=t.zoomOnDoubleClick,_=t.panOnDrag,S=t.translateExtent,R=t.minZoom,I=t.maxZoom,P=t.defaultZoom,A=t.defaultPosition,k=t.preventScrolling,L=t.onSelectionContextMenu,$=t.noWheelClassName,j=t.noPanClassName,D=Ft(),G=gt(ZY),B=el(f);kY({deleteKeyCode:a,multiSelectionKeyCode:h});var Y=function(re){n==null||n(re),D.getState().resetSelectedElements(),D.setState({nodesSelectionActive:!1})},Z=i?function(U){return i(U)}:void 0,te=o?function(U){return o(U)}:void 0;return T.createElement($Y,{onMove:u,onMoveStart:l,onMoveEnd:d,selectionKeyPressed:B,elementsSelectable:v,zoomOnScroll:m,zoomOnPinch:y,panOnScroll:x,panOnScrollSpeed:b,panOnScrollMode:w,zoomOnDoubleClick:E,panOnDrag:_,translateExtent:S,minZoom:R,maxZoom:I,defaultZoom:P,defaultPosition:A,zoomActivationKeyCode:p,preventScrolling:k,noWheelClassName:$,noPanClassName:j},r,T.createElement(HY,{selectionKeyPressed:B}),G&&T.createElement(XY,{onSelectionContextMenu:L,noPanClassName:j}),T.createElement("div",{className:"react-flow__pane react-flow__container",onClick:Y,onContextMenu:Z,onWheel:te}))};$2.displayName="FlowRenderer";var JY=T.memo($2);function QY(e){var t=gt(T.useCallback(function(r){return e?x2(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var e9=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},z2=function(t){var r=gt(e9,Xt),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,u=QY(t.onlyRenderVisibleElements),l=T.useRef(),d=T.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 l.current=f,f},[]);return T.useEffect(function(){return function(){var f;l==null||(f=l.current)===null||f===void 0||f.disconnect()}},[]),T.createElement("div",{className:"react-flow__nodes react-flow__container"},u.map(function(f){var h,p,v,m,y,x,b,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 E=t.nodeTypes[w]||t.nodeTypes.default,_=!!(f.draggable||n&&typeof f.draggable>"u"),S=!!(f.selectable||o&&typeof f.selectable>"u"),R=!!(f.connectable||i&&typeof f.connectable>"u");return T.createElement(E,{key:f.id,id:f.id,className:f.className,style:f.style,type:w,data:f.data,sourcePosition:f.sourcePosition||Se.Bottom,targetPosition:f.targetPosition||Se.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:_,isSelectable:S,isConnectable:R,resizeObserver:d,dragHandle:f.dragHandle,zIndex:(y=(x=f[Nt])===null||x===void 0?void 0:x.z)!==null&&y!==void 0?y:0,isParent:!!((b=f[Nt])!==null&&b!==void 0&&b.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!f.width&&!!f.height})}))};z2.displayName="NodeRenderer";var t9=T.memo(z2),eo;function IP(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 PP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var r9=(eo={},He(eo,Se.Left,Se.Right),He(eo,Se.Right,Se.Left),He(eo,Se.Top,Se.Bottom),He(eo,Se.Bottom,Se.Top),eo),n9=(function(e){var t,r,n,i,o,a=e.connectionNodeId,u=e.connectionHandleType,l=e.connectionLineStyle,d=e.connectionLineType,f=d===void 0?$n.Bezier:d,h=e.isConnectable,p=e.CustomConnectionLineComponent,v=gt(T.useCallback(function(te){return{fromNode:te.nodeInternals.get(a),handleId:te.connectionHandleId,toX:(te.connectionPosition.x-te.transform[0])/te.transform[2],toY:(te.connectionPosition.y-te.transform[1])/te.transform[2]}},[a]),Xt),m=v.fromNode,y=v.handleId,x=v.toX,b=v.toY,w=m==null||(t=m[Nt])===null||t===void 0?void 0:t.handleBounds;if(!m||!h||!(w!=null&&w[u]))return null;var E=w[u],_=y?E.find(function(te){return te.id===y}):E[0],S=_?_.x+_.width/2:((r=m==null?void 0:m.width)!==null&&r!==void 0?r:0)/2,R=_?_.y+_.height/2:(n=m==null?void 0:m.height)!==null&&n!==void 0?n:0,I=((m==null||(i=m.positionAbsolute)===null||i===void 0?void 0:i.x)||0)+S,P=((m==null||(o=m.positionAbsolute)===null||o===void 0?void 0:o.y)||0)+R,A=_==null?void 0:_.position;if(!A)return null;var k=r9[A],L,$,j,D,G,B;switch(u){case"source":L=I,$=P,j=A,D=x,G=b,B=k;break;case"target":L=x,$=b,j=k,D=I,G=P,B=A;break}if(p)return T.createElement("g",{className:"react-flow__connection"},T.createElement(p,{connectionLineType:f,connectionLineStyle:l,fromNode:m,fromHandle:_,fromX:I,fromY:P,toX:x,toY:b,fromPosition:A,toPosition:k,sourcePosition:j,targetPosition:B,sourceNode:m,sourceHandle:_,targetX:D,targetY:G,sourceX:L,sourceY:$}));var Y="",Z={sourceX:L,sourceY:$,sourcePosition:j,targetX:D,targetY:G,targetPosition:B};return f===$n.Bezier?Y=Vl(Z):f===$n.Step?Y=Ub(PP(PP({},Z),{},{borderRadius:0})):f===$n.SmoothStep?Y=Ub(Z):f===$n.SimpleBezier?Y=R2(Z):Y="M".concat(L,",").concat($," ").concat(D,",").concat(G),T.createElement("g",{className:"react-flow__connection"},T.createElement("path",{d:Y,className:"react-flow__connection-path",style:l}))});function Yb(e){"@babel/helpers - typeof";return Yb=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},Yb(e)}var mu,i9=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return T.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:"none",points:"-5,-4 0,0 -5,4"})},o9=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return T.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},NP=(mu={},He(mu,Yu.Arrow,i9),He(mu,Yu.ArrowClosed,o9),mu);function a9(e){var t=T.useMemo(function(){var r=NP.hasOwnProperty(e);return r?NP[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 TP(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 s9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var u9=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,l=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=a9(n);return T.createElement("marker",{className:"react-flow__arrowhead",id:r,markerWidth:"".concat(a),markerHeight:"".concat(l),viewBox:"-10 -10 20 20",markerUnits:f,orient:v,refX:"0",refY:"0"},T.createElement(m,{color:i,strokeWidth:h}))},l9=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(l){if(l&&Yb(l)==="object"){var d=Hb(l,n);o.includes(d)||(a.push(s9({id:d,color:l.color||r},l)),o.push(d))}}),a},[]).sort(function(a,u){return a.id.localeCompare(u.id)})}},H2=function(t){var r=t.defaultColor,n=t.rfId,i=gt(T.useCallback(l9({defaultColor:r,rfId:n}),[r,n]),function(o,a){return!(o.length!==a.length||o.some(function(u,l){return u.id!==a[l].id}))});return T.createElement("defs",null,i.map(function(o){return T.createElement(u9,{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})}))};H2.displayName="MarkerDefinitions";var c9=T.memo(H2),f9=[{level:0,isMaxLevel:!0,edges:[]}];function d9(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,u){var l=p2(u.zIndex),d=l?u.zIndex:0;if(r){var f,h,p,v;d=l?u.zIndex:Math.max(((f=t.get(u.source))===null||f===void 0||(h=f[Nt])===null||h===void 0?void 0:h.z)||0,((p=t.get(u.target))===null||p===void 0||(v=p[Nt])===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=Le(a,2),l=u[0],d=u[1],f=+l;return{edges:d,level:f,isMaxLevel:f===n}});return o.length===0?f9:o}function h9(e,t,r){var n=gt(T.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)&&DY({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 d9(n,t,r)}var p9=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}},V2=function(t){var r=gt(p9,Xt),n=r.connectionNodeId,i=r.connectionHandleType,o=r.nodesConnectable,a=r.elementsSelectable,u=r.width,l=r.height,d=r.connectionMode,f=r.nodeInternals,h=h9(t.onlyRenderVisibleElements,f,t.elevateEdgesOnSelect);if(!u)return null;var p=t.connectionLineType,v=t.defaultMarkerColor,m=t.connectionLineStyle,y=t.connectionLineComponent,x=t.connectionLineContainerStyle,b=n&&i;return T.createElement(T.Fragment,null,h.map(function(w){var E=w.level,_=w.edges,S=w.isMaxLevel;return T.createElement("svg",{key:E,style:{zIndex:E},width:u,height:l,className:"react-flow__edges react-flow__container"},S&&T.createElement(c9,{defaultColor:v,rfId:t.rfId}),T.createElement("g",null,_.map(function(R){var I=gP(f,R.source),P=Le(I,3),A=P[0],k=P[1],L=P[2],$=gP(f,R.target),j=Le($,3),D=j[0],G=j[1],B=j[2];if(!L||!B)return null;var Y=R.type||"default";t.edgeTypes[Y]||(console.warn('[React Flow]: Edge type "'.concat(Y,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),Y="default");var Z=t.edgeTypes[Y]||t.edgeTypes.default,te=d===So.Strict?G.target:G.target||G.source,U=vP(k.source,R.sourceHandle||null),re=vP(te,R.targetHandle||null),ae=(U==null?void 0:U.position)||Se.Bottom,le=(re==null?void 0:re.position)||Se.Top;if(!U)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(!re)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 F=MY(A,U,ae,D,re,le),W=F.sourceX,J=F.sourceY,H=F.targetX,K=F.targetY;return T.createElement(Z,{key:R.id,id:R.id,className:cr([R.className,t.noPanClassName]),type:Y,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:W,sourceY:J,targetX:H,targetY:K,sourcePosition:ae,targetPosition:le,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})})))}),b&&T.createElement("svg",{style:x,width:u,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},T.createElement(n9,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:m,connectionLineType:p,isConnectable:o,CustomConnectionLineComponent:y})))};V2.displayName="EdgeRenderer";var v9=T.memo(V2),g9=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function m9(e){var t=e.children,r=gt(g9);return T.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function y9(e){var t=O2(),r=T.useRef(!1);T.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var U2=function(t){var r=t.nodeTypes,n=t.edgeTypes,i=t.onMove,o=t.onMoveStart,a=t.onMoveEnd,u=t.onInit,l=t.onNodeClick,d=t.onEdgeClick,f=t.onNodeDoubleClick,h=t.onEdgeDoubleClick,p=t.onNodeMouseEnter,v=t.onNodeMouseMove,m=t.onNodeMouseLeave,y=t.onNodeContextMenu,x=t.onSelectionContextMenu,b=t.connectionLineType,w=t.connectionLineStyle,E=t.connectionLineComponent,_=t.connectionLineContainerStyle,S=t.selectionKeyCode,R=t.multiSelectionKeyCode,I=t.zoomActivationKeyCode,P=t.deleteKeyCode,A=t.onlyRenderVisibleElements,k=t.elementsSelectable,L=t.selectNodesOnDrag,$=t.translateExtent,j=t.minZoom,D=t.maxZoom,G=t.defaultZoom,B=t.defaultPosition,Y=t.preventScrolling,Z=t.defaultMarkerColor,te=t.zoomOnScroll,U=t.zoomOnPinch,re=t.panOnScroll,ae=t.panOnScrollSpeed,le=t.panOnScrollMode,F=t.zoomOnDoubleClick,W=t.panOnDrag,J=t.onPaneClick,H=t.onPaneScroll,K=t.onPaneContextMenu,se=t.onEdgeUpdate,oe=t.onEdgeContextMenu,fe=t.onEdgeMouseEnter,V=t.onEdgeMouseMove,ee=t.onEdgeMouseLeave,we=t.edgeUpdaterRadius,be=t.onEdgeUpdateStart,de=t.onEdgeUpdateEnd,ue=t.noDragClassName,Ee=t.noWheelClassName,Pe=t.noPanClassName,Ze=t.elevateEdgesOnSelect,ze=t.id;return y9(u),T.createElement(JY,{onPaneClick:J,onPaneContextMenu:K,onPaneScroll:H,deleteKeyCode:P,selectionKeyCode:S,multiSelectionKeyCode:R,zoomActivationKeyCode:I,elementsSelectable:k,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:te,zoomOnPinch:U,zoomOnDoubleClick:F,panOnScroll:re,panOnScrollSpeed:ae,panOnScrollMode:le,panOnDrag:W,translateExtent:$,minZoom:j,maxZoom:D,defaultZoom:G,defaultPosition:B,onSelectionContextMenu:x,preventScrolling:Y,noDragClassName:ue,noWheelClassName:Ee,noPanClassName:Pe},T.createElement(m9,null,T.createElement(v9,{edgeTypes:n,onEdgeClick:d,onEdgeDoubleClick:h,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:E,connectionLineContainerStyle:_,onEdgeUpdate:se,onlyRenderVisibleElements:A,onEdgeContextMenu:oe,onEdgeMouseEnter:fe,onEdgeMouseMove:V,onEdgeMouseLeave:ee,onEdgeUpdateStart:be,onEdgeUpdateEnd:de,edgeUpdaterRadius:we,defaultMarkerColor:Z,noPanClassName:Pe,elevateEdgesOnSelect:!!Ze,rfId:ze}),T.createElement(t9,{nodeTypes:r,onNodeClick:l,onNodeDoubleClick:f,onNodeMouseEnter:p,onNodeMouseMove:v,onNodeMouseLeave:m,onNodeContextMenu:y,selectNodesOnDrag:L,onlyRenderVisibleElements:A,noPanClassName:Pe,noDragClassName:ue})))};U2.displayName="GraphView";var b9=T.memo(U2),W2=function(){return null};W2.displayName="GroupNode";function AP(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 MP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ca=(function(e){var t=function(n){var i=n.id,o=n.type,a=n.data,u=n.xPos,l=n.yPos,d=n.selected,f=n.onClick,h=n.onMouseEnter,p=n.onMouseMove,v=n.onMouseLeave,m=n.onContextMenu,y=n.onDoubleClick,x=n.style,b=n.className,w=n.isDraggable,E=n.isSelectable,_=n.isConnectable,S=n.selectNodesOnDrag,R=n.sourcePosition,I=n.targetPosition,P=n.hidden,A=n.resizeObserver,k=n.dragHandle,L=n.zIndex,$=n.isParent,j=n.noPanClassName,D=n.noDragClassName,G=n.initialized,B=Ft(),Y=T.useRef(null),Z=T.useRef(R),te=T.useRef(I),U=T.useRef(o),re=E||w||f||h||p||v,ae=ua(i,B.getState,h),le=ua(i,B.getState,p),F=ua(i,B.getState,v),W=ua(i,B.getState,m),J=ua(i,B.getState,y),H=function(oe){if(E&&(!S||!w)&&y2({id:i,store:B}),f){var fe=B.getState().nodeInternals.get(i);f(oe,MP({},fe))}};T.useEffect(function(){if(Y.current&&!P){var se=Y.current;return A==null||A.observe(se),function(){return A==null?void 0:A.unobserve(se)}}},[P]),T.useEffect(function(){var se=U.current!==o,oe=Z.current!==R,fe=te.current!==I;Y.current&&(se||oe||fe)&&(se&&(U.current=o),oe&&(Z.current=R),fe&&(te.current=I),B.getState().updateNodeDimensions([{id:i,nodeElement:Y.current,forceUpdate:!0}]))},[i,o,R,I]);var K=F2({nodeRef:Y,disabled:P||!w,noDragClassName:D,handleSelector:k,nodeId:i,isSelectable:E,selectNodesOnDrag:S});return P?null:T.createElement("div",{className:cr(["react-flow__node","react-flow__node-".concat(o),j,b,{selected:d,selectable:E,parent:$}]),ref:Y,style:MP({zIndex:L,transform:"translate(".concat(u,"px,").concat(l,"px)"),pointerEvents:re?"all":"none",visibility:G?"visible":"hidden"},x),onMouseEnter:ae,onMouseMove:le,onMouseLeave:F,onContextMenu:W,onClick:H,onDoubleClick:J,"data-testid":"rf__node-".concat(i),"data-id":i},T.createElement(gY,{value:i},T.createElement(e,{id:i,data:a,type:o,xPos:u,yPos:l,selected:d,isConnectable:_,sourcePosition:R,targetPosition:I,dragging:K,dragHandle:k,zIndex:L})))};return t.displayName="NodeWrapper",T.memo(t)});function DP(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?DP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x9(e){var t={input:ca(e.input||q2),default:ca(e.default||Kb),output:ca(e.output||L2),group:ca(e.group||W2)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=ca(e[o]||Kb),i},r);return jP(jP({},t),n)}function qP(e,t){var r=T.useRef(null),n=T.useMemo(function(){if(process.env.NODE_ENV==="development"){var i=Object.keys(e);Xt(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 kP(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 G2=function(t){var r=t.children,n=!0;try{Ft()}catch{n=!1}return n?T.createElement(T.Fragment,null,r):T.createElement(LK,{createStore:BK},r)};G2.displayName="ReactFlowWrapper";var w9=["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 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 BP(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){He(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}kP(RY),kP(PY);var _9={input:q2,default:Kb,output:L2},E9={default:Wb,straight:T2,step:N2,smoothstep:Fx,simplebezier:I2},S9=[15,15],O9=[0,0],K2=T.forwardRef(function(e,t){var r=e.nodes,n=e.edges,i=e.defaultNodes,o=e.defaultEdges,a=e.className,u=e.nodeTypes,l=u===void 0?_9:u,d=e.edgeTypes,f=d===void 0?E9:d,h=e.onNodeClick,p=e.onEdgeClick,v=e.onInit,m=e.onMove,y=e.onMoveStart,x=e.onMoveEnd,b=e.onConnect,w=e.onConnectStart,E=e.onConnectStop,_=e.onConnectEnd,S=e.onClickConnectStart,R=e.onClickConnectStop,I=e.onClickConnectEnd,P=e.onNodeMouseEnter,A=e.onNodeMouseMove,k=e.onNodeMouseLeave,L=e.onNodeContextMenu,$=e.onNodeDoubleClick,j=e.onNodeDragStart,D=e.onNodeDrag,G=e.onNodeDragStop,B=e.onNodesDelete,Y=e.onEdgesDelete,Z=e.onSelectionChange,te=e.onSelectionDragStart,U=e.onSelectionDrag,re=e.onSelectionDragStop,ae=e.onSelectionContextMenu,le=e.connectionMode,F=le===void 0?So.Strict:le,W=e.connectionLineType,J=W===void 0?$n.Bezier:W,H=e.connectionLineStyle,K=e.connectionLineComponent,se=e.connectionLineContainerStyle,oe=e.deleteKeyCode,fe=oe===void 0?"Backspace":oe,V=e.selectionKeyCode,ee=V===void 0?"Shift":V,we=e.multiSelectionKeyCode,be=we===void 0?"Meta":we,de=e.zoomActivationKeyCode,ue=de===void 0?"Meta":de,Ee=e.snapToGrid,Pe=Ee===void 0?!1:Ee,Ze=e.snapGrid,ze=Ze===void 0?S9:Ze,Fe=e.onlyRenderVisibleElements,Ve=Fe===void 0?!1:Fe,lt=e.selectNodesOnDrag,ct=lt===void 0?!0:lt,mt=e.nodesDraggable,yt=e.nodesConnectable,rt=e.elementsSelectable,bt=e.minZoom,Jt=bt===void 0?.5:bt,fr=e.maxZoom,Dt=fr===void 0?2:fr,_t=e.defaultZoom,jt=_t===void 0?1:_t,Ur=e.defaultPosition,Yn=Ur===void 0?O9:Ur,Cn=e.translateExtent,dr=Cn===void 0?Vb:Cn,Mi=e.preventScrolling,vc=Mi===void 0?!0:Mi,gc=e.nodeExtent,ko=e.defaultMarkerColor,ls=ko===void 0?"#b1b1b7":ko,cs=e.zoomOnScroll,mc=cs===void 0?!0:cs,fs=e.zoomOnPinch,yc=fs===void 0?!0:fs,Lo=e.panOnScroll,bc=Lo===void 0?!1:Lo,ds=e.panOnScrollSpeed,xc=ds===void 0?.5:ds,Di=e.panOnScrollMode,wc=Di===void 0?ho.Free:Di,ji=e.zoomOnDoubleClick,_c=ji===void 0?!0:ji,hs=e.panOnDrag,Ec=hs===void 0?!0:hs,Sc=e.onPaneClick,Oc=e.onPaneScroll,ps=e.onPaneContextMenu,Cc=e.children,Rc=e.onEdgeUpdate,vs=e.onEdgeContextMenu,Ic=e.onEdgeDoubleClick,Pc=e.onEdgeMouseEnter,Nc=e.onEdgeMouseMove,Tc=e.onEdgeMouseLeave,Ac=e.onEdgeUpdateStart,Mc=e.onEdgeUpdateEnd,Xn=e.edgeUpdaterRadius,Dc=Xn===void 0?10:Xn,qi=e.onNodesChange,jc=e.onEdgesChange,gs=e.noDragClassName,qc=gs===void 0?"nodrag":gs,Bo=e.noWheelClassName,ms=Bo===void 0?"nowheel":Bo,Fo=e.noPanClassName,kc=Fo===void 0?"nopan":Fo,ys=e.fitView,Lc=ys===void 0?!1:ys,Bc=e.fitViewOptions,$o=e.connectOnClick,bs=$o===void 0?!0:$o,xs=e.attributionPosition,zo=e.proOptions,Fc=e.defaultEdgeOptions,Ho=e.elevateEdgesOnSelect,ki=Ho===void 0?!1:Ho,Zn=zl(e,w9),$c=qP(l,x9),ws=qP(f,AY);return T.createElement("div",BP(BP({},Zn),{},{ref:t,className:cr(["react-flow",a])}),T.createElement(G2,null,T.createElement(b9,{onInit:v,onMove:m,onMoveStart:y,onMoveEnd:x,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:P,onNodeMouseMove:A,onNodeMouseLeave:k,onNodeContextMenu:L,onNodeDoubleClick:$,nodeTypes:$c,edgeTypes:ws,connectionLineType:J,connectionLineStyle:H,connectionLineComponent:K,connectionLineContainerStyle:se,selectionKeyCode:ee,deleteKeyCode:fe,multiSelectionKeyCode:be,zoomActivationKeyCode:ue,onlyRenderVisibleElements:Ve,selectNodesOnDrag:ct,translateExtent:dr,minZoom:Jt,maxZoom:Dt,defaultZoom:jt,defaultPosition:Yn,preventScrolling:vc,zoomOnScroll:mc,zoomOnPinch:yc,zoomOnDoubleClick:_c,panOnScroll:bc,panOnScrollSpeed:xc,panOnScrollMode:wc,panOnDrag:Ec,onPaneClick:Sc,onPaneScroll:Oc,onPaneContextMenu:ps,onSelectionContextMenu:ae,onEdgeUpdate:Rc,onEdgeContextMenu:vs,onEdgeDoubleClick:Ic,onEdgeMouseEnter:Pc,onEdgeMouseMove:Nc,onEdgeMouseLeave:Tc,onEdgeUpdateStart:Ac,onEdgeUpdateEnd:Mc,edgeUpdaterRadius:Dc,defaultMarkerColor:ls,noDragClassName:qc,noWheelClassName:ms,noPanClassName:kc,elevateEdgesOnSelect:ki,id:Zn==null?void 0:Zn.id}),T.createElement(OY,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:b,onConnectStart:w,onConnectStop:E,onConnectEnd:_,onClickConnectStart:S,onClickConnectStop:R,onClickConnectEnd:I,nodesDraggable:mt,nodesConnectable:yt,elementsSelectable:rt,minZoom:Jt,maxZoom:Dt,nodeExtent:gc,onNodesChange:qi,onEdgesChange:jc,snapToGrid:Pe,snapGrid:ze,connectionMode:F,translateExtent:dr,connectOnClick:bs,defaultEdgeOptions:Fc,fitView:Lc,fitViewOptions:Bc,onNodesDelete:B,onEdgesDelete:Y,onNodeDragStart:j,onNodeDrag:D,onNodeDragStop:G,onSelectionDrag:U,onSelectionDragStart:te,onSelectionDragStop:re}),Z&&T.createElement(EY,{onSelectionChange:Z}),Cc,T.createElement(uY,{proOptions:zo,position:xs})))});K2.displayName="ReactFlow";function Y2(e){return function(t){var r=T.useState(t),n=Le(r,2),i=n[0],o=n[1],a=T.useCallback(function(u){return o(function(l){return e(u,l)})},[]);return[i,o,a]}}var C9=Y2(g2),R9=Y2(TK);function FP(e,t){const{width:r,height:n,positionAbsolute:i}=e,o=t.positionAbsolute,a=r/2,u=n/2,l=i.x+a,d=i.y+u,f=o.x+a,h=o.y+u,p=(f-l)/(2*a)-(h-d)/(2*u),v=(f-l)/(2*a)+(h-d)/(2*u),m=1/(Math.abs(p)+Math.abs(v)),y=m*p,x=m*v,b=a*(y+x)+l,w=u*(-y+x)+d;return{x:b,y:w}}function $P(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?Se.Left:o>=n+r.width-1?Se.Right:a<=i+1?Se.Top:a>=r.y+r.height-1?Se.Bottom:Se.Top}function X2(e,t){const r=FP(e,t),n=FP(t,e),i=$P(e,r),o=$P(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const I9=({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}=X2(i,o),l=Vl({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:l}),C.jsx("circle",{cx:e,cy:t,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})},P9=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=gt(T.useCallback(m=>m.nodeInternals.get(t),[t])),a=gt(T.useCallback(m=>m.nodeInternals.get(r),[r]));if(!o||!a)return null;const{sx:u,sy:l,tx:d,ty:f,sourcePos:h,targetPos:p}=X2(o,a),v=Vl({sourceX:u,sourceY:l,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})},zP=172,HP=36,N9={custom:P9},T9=(e,t,r="LR")=>{const n=new RI.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:zP,height:HP})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),RI.layout(n),e.forEach(o=>{const a=n.node(o.id);return o.targetPosition=i?Se.Left:Se.Top,o.sourcePosition=i?Se.Right:Se.Bottom,o.position={x:a.x-zP/2,y:a.y-HP/2},o}),{nodes:e,edges:t}},A9=()=>{},M9=({data:e,dict:t,onSelect:r=A9})=>{const{nodes:n,edges:i}=T9(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:Se.Right,targetPosition:Se.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]=C9(n),[l,d,f]=R9(i);return T.useEffect(()=>{a([...n]),d([...i])},[e]),C.jsx(K2,{nodes:o,edges:l,fitView:!0,onNodesChange:u,onEdgesChange:f,onNodeClick:(h,p)=>{r(p.id)},defaultZoom:.5,edgeTypes:N9,connectionLineComponent:I9,children:C.jsx(aY,{variant:wi.Dots,color:"#81818140",gap:18,size:1})})};var Z2=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(Z2||{});const J2=e=>{switch(e){case"entityCollection":return Q.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return Q.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return Q.ESubPermissionType.DS_METHOD;case"entity":return Q.ESubPermissionType.ENTITY_METHOD;default:return Q.EPermissionType.METHOD}},VP=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[Z2[r]])==null||i.forEach(a=>{if(`${o.name.toLowerCase()}.${a.name.toLowerCase()}`.includes(t)||!t){const l={applyTo:`${o.name}.${a.name}`,type:r};r===Q.EPermissionType.METHOD&&(l.subType=J2(a.applyTo)),n.push(l)}});return n},D9=(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:Q.EPermissionType.SINGLETON_METHOD})});return r};function zx(e,t=[],r=[],n=[]){const i=VP(r,e,Q.EPermissionType.ATTRIBUTE),o=VP(r,e,Q.EPermissionType.METHOD),a=D9(n,e),u=t.filter(h=>!e||`ds.${h.name.toLowerCase()}`.includes(e)).map(h=>({applyTo:`ds.${h.name}`,type:Q.ESubPermissionType.DS_METHOD})),l=[],d=[];return r.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{l.push({applyTo:h.name,type:Q.EPermissionType.DATACLASS})}),n.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{d.push({applyTo:h.name,type:Q.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:Q.EPermissionType.DATASTORE}].filter(h=>!e||`ds.${h.applyTo.toLowerCase()}`.includes(e)),...u,...l,...i,...o,...d,...a].reduce((h,p)=>{const v=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],[m,y]=p.applyTo.split("."),x=h.find(b=>b.prefix===m);return x?(x.resources=[...x.resources,p].sort((b,w)=>{const E=v.indexOf(b.type),_=v.indexOf(w.type);return E>_?1:-1}),x.type=y?x.type:p.type,[...h].sort((b,w)=>{const E=v.indexOf(b.type),_=v.indexOf(w.type);return E>_?1:-1})):[...h,{prefix:m,type:y?null:p.type,resources:[p]}]},[]).reduce((h,p)=>[...h,...p.resources],[])}const j9=(e=[],t=[],r=[])=>{const n=zx("",e,t,r),i={ds:{applyTo:"ds",type:Q.EPermissionType.DATASTORE,methods:[],dataClasses:[],singletons:[]}},o=(u,l)=>u.applyTo.localeCompare(l.applyTo);n.forEach(u=>{const[l,d]=u.applyTo.split(".");if(d||(u.type===Q.EPermissionType.DATACLASS?i.ds.dataClasses.push({applyTo:l,type:Q.EPermissionType.DATACLASS,methods:[],attributes:[]}):u.type===Q.EPermissionType.SINGLETON&&i.ds.singletons.push({applyTo:l,type:Q.EPermissionType.SINGLETON,methods:[],attributes:[]})),d){const f=(h,p,v)=>{h.forEach(m=>{m.applyTo===l&&m[p].push(v)})};[Q.ESubPermissionType.DS_METHOD,Q.ESubPermissionType.DATACLASS_METHOD,Q.ESubPermissionType.ENTITY_METHOD,Q.ESubPermissionType.ENTITY_SEL_METHOD].includes(u.type)?l==="ds"?i.ds.methods.push(u):f(i.ds.dataClasses,"methods",u):u.type===Q.EPermissionType.ATTRIBUTE?(f(i.ds.dataClasses,"attributes",u),f(i.ds.singletons,"attributes",u)):u.type===Q.EPermissionType.SINGLETON_METHOD&&f(i.ds.singletons,"methods",u)}});const a=u=>{u.forEach(l=>{l.methods&&l.methods.sort(o),l.attributes&&l.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},Q2=(e,t=[])=>{const r={};return Object.entries(e).forEach(([n,i])=>{r[n]={...i,resources:i.resources.map(o=>{var a,u,l;if(o.type===Q.EPermissionType.METHOD&&t.length){const[d,f]=o.resource.split("."),h=d==="ds"?"dataStore":((l=(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:l.applyTo)||"dataClass";return{...o,type:o.type,subType:J2(h)}}return o})}}),r},eq=(e,t)=>Object.entries(e).map(([r,n])=>{const i=n.resources.map(o=>{var d,f,h,p,v,m,y,x;const[a,u]=o.resource.split(".");let l=!0;switch(o.type){case Q.EPermissionType.DATASTORE:l=!!t;break;case Q.EPermissionType.METHOD:a==="ds"?l=!!t.methods.find(b=>b.name===u&&b.applyTo==="dataStore"):l=!!((f=(d=t.dataClasses[a])==null?void 0:d.methods)!=null&&f.find(b=>b.name===u));break;case Q.ESubPermissionType.DS_METHOD:l=!!t.methods.find(b=>b.name===u&&b.applyTo==="dataStore");break;case Q.EPermissionType.DATACLASS:l=!!t.dataClasses[a];break;case Q.EPermissionType.ATTRIBUTE:l=!!((p=(h=t.dataClasses[a])==null?void 0:h.attributes)!=null&&p.find(b=>b.name===u));break;case Q.ESubPermissionType.ENTITY_SEL_METHOD:l=!!((v=t.dataClasses[a])!=null&&v.methods.find(b=>b.name===u&&b.applyTo==="entityCollection"));break;case Q.ESubPermissionType.DATACLASS_METHOD:l=!!((m=t.dataClasses[a])!=null&&m.methods.find(b=>b.name===u&&b.applyTo==="dataClass"));break;case Q.ESubPermissionType.ENTITY_METHOD:l=!!((y=t.dataClasses[a])!=null&&y.methods.find(b=>b.name===u&&b.applyTo==="entity"));break;case Q.EPermissionType.SINGLETON_METHOD:l=!!((x=t.singletons[a])!=null&&x.methods.find(b=>b.name===u));break;case Q.EPermissionType.SINGLETON:l=!!t.singletons[a];break;default:l=!0}return{...o,exists:l}});return{[r]:{...n,resources:i}}}).reduce((r,n)=>({...r,...n}),{}),qm=({child:e,parent:t,status:r,onSelect:n,currentPrivilegeId:i})=>{const o=Q.useAppDispatch(),a=Q.useAppSelector(Q.selectPrivileges);function u(){const d=Q.addIn(t.id,e.id,a);o(Q.updatePrivileges(d))}function l(){const d=Q.removeFrom(t.id,e.id,a);o(Q.updatePrivileges(d))}return C.jsxs("div",{className:We("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:l,children:C.jsx("span",{className:"text-[13px]",children:C.jsx(xe.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(xe.FdPlus,{className:"text-white"})})})]})},q9=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:i})=>{const o=Object.values(t),a=Q.getPrivilegeById(e.id,t);let u=a?Q.populateShallow(a.includes,t):[],l=a?Q.populateShallow(Q.parents(a.id,t),t):[],d=a?Q.populateShallow(Q.allowed(a.id,t),t):[];return[u,l,d]=[u,l,d].map(f=>f.filter(h=>(h==null?void 0:h.privilege)!=="guest")),o.length<2&&u.length+l.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(Te.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-start justify-start gap-1",children:[u.map(f=>C.jsx(qm,{child:f,parent:e,status:"included",onSelect:r,currentPrivilegeId:f.id},f.id)),d.map(f=>C.jsx(qm,{child:f,parent:e,status:"available",onSelect:r,currentPrivilegeId:f.id},f.id)),l.map(f=>C.jsx(qm,{child:f,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:f.id},f.id))]})]})};function wr(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 tq(e,t=[]){let r=[];function n(o,a){const u=ve.createContext(a),l=r.length;r=[...r,a];const d=h=>{var b;const{scope:p,children:v,...m}=h,y=((b=p==null?void 0:p[e])==null?void 0:b[l])||u,x=ve.useMemo(()=>m,Object.values(m));return C.jsx(y.Provider,{value:x,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[l])||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 l=(u==null?void 0:u[e])||o;return ve.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return i.scopeName=e,[n,k9(i,...t)]}function k9(...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:l,scopeName:d})=>{const h=l(o)[`__scope${d}`];return{...u,...h}},{});return ve.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var _i=globalThis!=null&&globalThis.document?ve.useLayoutEffect:()=>{},L9=ve[" useInsertionEffect ".trim().toString()]||_i;function B9({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,a]=F9({defaultProp:t,onChange:r}),u=e!==void 0,l=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[l,d]}function F9({defaultProp:e,onChange:t}){const[r,n]=ve.useState(e),i=ve.useRef(r),o=ve.useRef(t);return L9(()=>{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 UP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function rq(...e){return t=>{let r=!1;const n=e.map(i=>{const o=UP(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():UP(e[i],null)}}}}function To(...e){return ve.useCallback(rq(...e),e)}const z9=["top","right","bottom","left"],zn=Math.min,ar=Math.max,tl=Math.round,yu=Math.floor,rn=e=>({x:e,y:e}),H9={left:"right",right:"left",bottom:"top",top:"bottom"};function Xb(e,t,r){return ar(e,zn(t,r))}function wn(e,t){return typeof e=="function"?e(t):e}function _n(e){return e.split("-")[0]}function Ao(e){return e.split("-")[1]}function Hx(e){return e==="x"?"y":"x"}function Vx(e){return e==="y"?"height":"width"}function Qr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ux(e){return Hx(Qr(e))}function V9(e,t,r){r===void 0&&(r=!1);const n=Ao(e),i=Ux(e),o=Vx(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=rl(a)),[a,rl(a)]}function U9(e){const t=rl(e);return[Zb(e),t,Zb(t)]}function Zb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const WP=["left","right"],GP=["right","left"],W9=["top","bottom"],G9=["bottom","top"];function K9(e,t,r){switch(e){case"top":case"bottom":return r?t?GP:WP:t?WP:GP;case"left":case"right":return t?W9:G9;default:return[]}}function Y9(e,t,r,n){const i=Ao(e);let o=K9(_n(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Zb)))),o}function rl(e){const t=_n(e);return H9[t]+e.slice(t.length)}function X9(e){return{top:0,right:0,bottom:0,left:0,...e}}function nq(e){return typeof e!="number"?X9(e):{top:e,right:e,bottom:e,left:e}}function nl(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 KP(e,t,r){let{reference:n,floating:i}=e;const o=Qr(t),a=Ux(t),u=Vx(a),l=_n(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(l){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(Ao(t)){case"start":v[a]-=p*(r&&d?-1:1);break;case"end":v[a]+=p*(r&&d?-1:1);break}return v}async function Z9(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:o,rects:a,elements:u,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:p=!1,padding:v=0}=wn(t,e),m=nq(v),x=u[p?h==="floating"?"reference":"floating":h],b=nl(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:d,rootBoundary:f,strategy:l})),w=h==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),_=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},S=nl(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:E,strategy:l}):w);return{top:(b.top-S.top+m.top)/_.y,bottom:(S.bottom-b.bottom+m.bottom)/_.y,left:(b.left-S.left+m.left)/_.x,right:(S.right-b.right+m.right)/_.x}}const J9=50,Q9=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=a.detectOverflow?a:{...a,detectOverflow:Z9},l=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=KP(d,n,l),p=n,v=0;const m={};for(let y=0;y<o.length;y++){const x=o[y];if(!x)continue;const{name:b,fn:w}=x,{x:E,y:_,data:S,reset:R}=await w({x:f,y:h,initialPlacement:n,placement:p,strategy:i,middlewareData:m,rects:d,platform:u,elements:{reference:e,floating:t}});f=E??f,h=_??h,m[b]={...m[b],...S},R&&v<J9&&(v++,typeof R=="object"&&(R.placement&&(p=R.placement),R.rects&&(d=R.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):R.rects),{x:f,y:h}=KP(d,p,l)),y=-1)}return{x:f,y:h,placement:p,strategy:i,middlewareData:m}},e7=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:o,platform:a,elements:u,middlewareData:l}=t,{element:d,padding:f=0}=wn(e,t)||{};if(d==null)return{};const h=nq(f),p={x:r,y:n},v=Ux(i),m=Vx(v),y=await a.getDimensions(d),x=v==="y",b=x?"top":"left",w=x?"bottom":"right",E=x?"clientHeight":"clientWidth",_=o.reference[m]+o.reference[v]-p[v]-o.floating[m],S=p[v]-o.reference[v],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let I=R?R[E]:0;(!I||!await(a.isElement==null?void 0:a.isElement(R)))&&(I=u.floating[E]||o.floating[m]);const P=_/2-S/2,A=I/2-y[m]/2-1,k=zn(h[b],A),L=zn(h[w],A),$=k,j=I-y[m]-L,D=I/2-y[m]/2+P,G=Xb($,D,j),B=!l.arrow&&Ao(i)!=null&&D!==G&&o.reference[m]/2-(D<$?k:L)-y[m]/2<0,Y=B?D<$?D-$:D-j:0;return{[v]:p[v]+Y,data:{[v]:G,centerOffset:D-G-Y,...B&&{alignmentOffset:Y}},reset:B}}}),t7=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:l,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...x}=wn(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const b=_n(i),w=Qr(u),E=_n(u)===u,_=await(l.isRTL==null?void 0:l.isRTL(d.floating)),S=p||(E||!y?[rl(u)]:U9(u)),R=m!=="none";!p&&R&&S.push(...Y9(u,y,m,_));const I=[u,...S],P=await l.detectOverflow(t,x),A=[];let k=((n=o.flip)==null?void 0:n.overflows)||[];if(f&&A.push(P[b]),h){const D=V9(i,a,_);A.push(P[D[0]],P[D[1]])}if(k=[...k,{placement:i,overflows:A}],!A.every(D=>D<=0)){var L,$;const D=(((L=o.flip)==null?void 0:L.index)||0)+1,G=I[D];if(G&&(!(h==="alignment"?w!==Qr(G):!1)||k.every(Z=>Qr(Z.placement)===w?Z.overflows[0]>0:!0)))return{data:{index:D,overflows:k},reset:{placement:G}};let B=($=k.filter(Y=>Y.overflows[0]<=0).sort((Y,Z)=>Y.overflows[1]-Z.overflows[1])[0])==null?void 0:$.placement;if(!B)switch(v){case"bestFit":{var j;const Y=(j=k.filter(Z=>{if(R){const te=Qr(Z.placement);return te===w||te==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(te=>te>0).reduce((te,U)=>te+U,0)]).sort((Z,te)=>Z[1]-te[1])[0])==null?void 0:j[0];Y&&(B=Y);break}case"initialPlacement":B=u;break}if(i!==B)return{reset:{placement:B}}}return{}}}};function YP(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function XP(e){return z9.some(t=>e[t]>=0)}const r7=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...o}=wn(e,t);switch(i){case"referenceHidden":{const a=await n.detectOverflow(t,{...o,elementContext:"reference"}),u=YP(a,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:XP(u)}}}case"escaped":{const a=await n.detectOverflow(t,{...o,altBoundary:!0}),u=YP(a,r.floating);return{data:{escapedOffsets:u,escaped:XP(u)}}}default:return{}}}}},iq=new Set(["left","top"]);async function n7(e,t){const{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=_n(r),u=Ao(r),l=Qr(r)==="y",d=iq.has(a)?-1:1,f=o&&l?-1:1,h=wn(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),l?{x:v*f,y:p*d}:{x:p*d,y:v*f}}const i7=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,l=await n7(t,e);return a===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},o7=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:u=!1,limiter:l={fn:b=>{let{x:w,y:E}=b;return{x:w,y:E}}},...d}=wn(e,t),f={x:r,y:n},h=await o.detectOverflow(t,d),p=Qr(_n(i)),v=Hx(p);let m=f[v],y=f[p];if(a){const b=v==="y"?"top":"left",w=v==="y"?"bottom":"right",E=m+h[b],_=m-h[w];m=Xb(E,m,_)}if(u){const b=p==="y"?"top":"left",w=p==="y"?"bottom":"right",E=y+h[b],_=y-h[w];y=Xb(E,y,_)}const x=l.fn({...t,[v]:m,[p]:y});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[v]:a,[p]:u}}}}}},a7=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:l=!0,crossAxis:d=!0}=wn(e,t),f={x:r,y:n},h=Qr(i),p=Hx(h);let v=f[p],m=f[h];const y=wn(u,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const E=p==="y"?"height":"width",_=o.reference[p]-o.floating[E]+x.mainAxis,S=o.reference[p]+o.reference[E]-x.mainAxis;v<_?v=_:v>S&&(v=S)}if(d){var b,w;const E=p==="y"?"width":"height",_=iq.has(_n(i)),S=o.reference[h]-o.floating[E]+(_&&((b=a.offset)==null?void 0:b[h])||0)+(_?0:x.crossAxis),R=o.reference[h]+o.reference[E]+(_?0:((w=a.offset)==null?void 0:w[h])||0)-(_?x.crossAxis:0);m<S?m=S:m>R&&(m=R)}return{[p]:v,[h]:m}}}},s7=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:l=()=>{},...d}=wn(e,t),f=await a.detectOverflow(t,d),h=_n(i),p=Ao(i),v=Qr(i)==="y",{width:m,height:y}=o.floating;let x,b;h==="top"||h==="bottom"?(x=h,b=p===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(b=h,x=p==="end"?"top":"bottom");const w=y-f.top-f.bottom,E=m-f.left-f.right,_=zn(y-f[x],w),S=zn(m-f[b],E),R=!t.middlewareData.shift;let I=_,P=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=E),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(I=w),R&&!p){const k=ar(f.left,0),L=ar(f.right,0),$=ar(f.top,0),j=ar(f.bottom,0);v?P=m-2*(k!==0||L!==0?k+L:ar(f.left,f.right)):I=y-2*($!==0||j!==0?$+j:ar(f.top,f.bottom))}await l({...t,availableWidth:P,availableHeight:I});const A=await a.getDimensions(u.floating);return m!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function Ul(){return typeof window<"u"}function Mo(e){return oq(e)?(e.nodeName||"").toLowerCase():"#document"}function sr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sn(e){var t;return(t=(oq(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function oq(e){return Ul()?e instanceof Node||e instanceof sr(e).Node:!1}function $r(e){return Ul()?e instanceof Element||e instanceof sr(e).Element:!1}function On(e){return Ul()?e instanceof HTMLElement||e instanceof sr(e).HTMLElement:!1}function ZP(e){return!Ul()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof sr(e).ShadowRoot}function ns(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=zr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function u7(e){return/^(table|td|th)$/.test(Mo(e))}function Wl(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const l7=/transform|translate|scale|rotate|perspective|filter/,c7=/paint|layout|strict|content/,si=e=>!!e&&e!=="none";let km;function Wx(e){const t=$r(e)?zr(e):e;return si(t.transform)||si(t.translate)||si(t.scale)||si(t.rotate)||si(t.perspective)||!Gx()&&(si(t.backdropFilter)||si(t.filter))||l7.test(t.willChange||"")||c7.test(t.contain||"")}function f7(e){let t=Hn(e);for(;On(t)&&!Oo(t);){if(Wx(t))return t;if(Wl(t))return null;t=Hn(t)}return null}function Gx(){return km==null&&(km=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),km}function Oo(e){return/^(html|body|#document)$/.test(Mo(e))}function zr(e){return sr(e).getComputedStyle(e)}function Gl(e){return $r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hn(e){if(Mo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ZP(e)&&e.host||sn(e);return ZP(t)?t.host:t}function aq(e){const t=Hn(e);return Oo(t)?e.ownerDocument?e.ownerDocument.body:e.body:On(t)&&ns(t)?t:aq(t)}function Ua(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=aq(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=sr(i);if(o){const u=Jb(a);return t.concat(a,a.visualViewport||[],ns(i)?i:[],u&&r?Ua(u):[])}else return t.concat(i,Ua(i,[],r))}function Jb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sq(e){const t=zr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=On(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,u=tl(r)!==o||tl(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function Kx(e){return $r(e)?e:e.contextElement}function vo(e){const t=Kx(e);if(!On(t))return rn(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=sq(t);let a=(o?tl(r.width):r.width)/n,u=(o?tl(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const d7=rn(0);function uq(e){const t=sr(e);return!Gx()||!t.visualViewport?d7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function h7(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==sr(e)?!1:t}function Ei(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=Kx(e);let a=rn(1);t&&(n?$r(n)&&(a=vo(n)):a=vo(e));const u=h7(o,r,n)?uq(o):rn(0);let l=(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=sr(o),v=n&&$r(n)?sr(n):n;let m=p,y=Jb(m);for(;y&&n&&v!==m;){const x=vo(y),b=y.getBoundingClientRect(),w=zr(y),E=b.left+(y.clientLeft+parseFloat(w.paddingLeft))*x.x,_=b.top+(y.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,d*=x.y,f*=x.x,h*=x.y,l+=E,d+=_,m=sr(y),y=Jb(m)}}return nl({width:f,height:h,x:l,y:d})}function Kl(e,t){const r=Gl(e).scrollLeft;return t?t.left+r:Ei(sn(e)).left+r}function lq(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Kl(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function p7(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o=i==="fixed",a=sn(n),u=t?Wl(t.floating):!1;if(n===a||u&&o)return r;let l={scrollLeft:0,scrollTop:0},d=rn(1);const f=rn(0),h=On(n);if((h||!h&&!o)&&((Mo(n)!=="body"||ns(a))&&(l=Gl(n)),h)){const v=Ei(n);d=vo(n),f.x=v.x+n.clientLeft,f.y=v.y+n.clientTop}const p=a&&!h&&!o?lq(a,l):rn(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-l.scrollLeft*d.x+f.x+p.x,y:r.y*d.y-l.scrollTop*d.y+f.y+p.y}}function v7(e){return Array.from(e.getClientRects())}function g7(e){const t=sn(e),r=Gl(e),n=e.ownerDocument.body,i=ar(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ar(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Kl(e);const u=-r.scrollTop;return zr(n).direction==="rtl"&&(a+=ar(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}const JP=25;function m7(e,t){const r=sr(e),n=sn(e),i=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,u=0,l=0;if(i){o=i.width,a=i.height;const f=Gx();(!f||f&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}const d=Kl(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<=JP&&(o-=m)}else d<=JP&&(o+=d);return{width:o,height:a,x:u,y:l}}function y7(e,t){const r=Ei(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=On(e)?vo(e):rn(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,l=i*o.x,d=n*o.y;return{width:a,height:u,x:l,y:d}}function QP(e,t,r){let n;if(t==="viewport")n=m7(e,r);else if(t==="document")n=g7(sn(e));else if($r(t))n=y7(t,r);else{const i=uq(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return nl(n)}function cq(e,t){const r=Hn(e);return r===t||!$r(r)||Oo(r)?!1:zr(r).position==="fixed"||cq(r,t)}function b7(e,t){const r=t.get(e);if(r)return r;let n=Ua(e,[],!1).filter(u=>$r(u)&&Mo(u)!=="body"),i=null;const o=zr(e).position==="fixed";let a=o?Hn(e):e;for(;$r(a)&&!Oo(a);){const u=zr(a),l=Wx(a);!l&&u.position==="fixed"&&(i=null),(o?!l&&!i:!l&&u.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||ns(a)&&!l&&cq(e,a))?n=n.filter(f=>f!==a):i=u,a=Hn(a)}return t.set(e,n),n}function x7(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const a=[...r==="clippingAncestors"?Wl(t)?[]:b7(t,this._c):[].concat(r),n],u=QP(t,a[0],i);let l=u.top,d=u.right,f=u.bottom,h=u.left;for(let p=1;p<a.length;p++){const v=QP(t,a[p],i);l=ar(v.top,l),d=zn(v.right,d),f=zn(v.bottom,f),h=ar(v.left,h)}return{width:d-h,height:f-l,x:h,y:l}}function w7(e){const{width:t,height:r}=sq(e);return{width:t,height:r}}function _7(e,t,r){const n=On(t),i=sn(t),o=r==="fixed",a=Ei(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const l=rn(0);function d(){l.x=Kl(i)}if(n||!n&&!o)if((Mo(t)!=="body"||ns(i))&&(u=Gl(t)),n){const v=Ei(t,!0,o,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else i&&d();o&&!n&&i&&d();const f=i&&!n&&!o?lq(i,u):rn(0),h=a.left+u.scrollLeft-l.x-f.x,p=a.top+u.scrollTop-l.y-f.y;return{x:h,y:p,width:a.width,height:a.height}}function Lm(e){return zr(e).position==="static"}function eN(e,t){if(!On(e)||zr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return sn(e)===r&&(r=r.ownerDocument.body),r}function fq(e,t){const r=sr(e);if(Wl(e))return r;if(!On(e)){let i=Hn(e);for(;i&&!Oo(i);){if($r(i)&&!Lm(i))return i;i=Hn(i)}return r}let n=eN(e,t);for(;n&&u7(n)&&Lm(n);)n=eN(n,t);return n&&Oo(n)&&Lm(n)&&!Wx(n)?r:n||f7(e)||r}const E7=async function(e){const t=this.getOffsetParent||fq,r=this.getDimensions,n=await r(e.floating);return{reference:_7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function S7(e){return zr(e).direction==="rtl"}const O7={convertOffsetParentRelativeRectToViewportRelativeRect:p7,getDocumentElement:sn,getClippingRect:x7,getOffsetParent:fq,getElementRects:E7,getClientRects:v7,getDimensions:w7,getScale:vo,isElement:$r,isRTL:S7};function dq(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function C7(e,t){let r=null,n;const i=sn(e);function o(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function a(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),o();const d=e.getBoundingClientRect(),{left:f,top:h,width:p,height:v}=d;if(u||t(),!p||!v)return;const m=yu(h),y=yu(i.clientWidth-(f+p)),x=yu(i.clientHeight-(h+v)),b=yu(f),E={rootMargin:-m+"px "+-y+"px "+-x+"px "+-b+"px",threshold:ar(0,zn(1,l))||1};let _=!0;function S(R){const I=R[0].intersectionRatio;if(I!==l){if(!_)return a();I?a(!1,I):n=setTimeout(()=>{a(!1,1e-7)},1e3)}I===1&&!dq(d,e.getBoundingClientRect())&&a(),_=!1}try{r=new IntersectionObserver(S,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,E)}r.observe(e)}return a(!0),o}function R7(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:l=!1}=n,d=Kx(e),f=i||o?[...d?Ua(d):[],...t?Ua(t):[]]:[];f.forEach(b=>{i&&b.addEventListener("scroll",r,{passive:!0}),o&&b.addEventListener("resize",r)});const h=d&&u?C7(d,r):null;let p=-1,v=null;a&&(v=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&v&&t&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var E;(E=v)==null||E.observe(t)})),r()}),d&&!l&&v.observe(d),t&&v.observe(t));let m,y=l?Ei(e):null;l&&x();function x(){const b=Ei(e);y&&!dq(y,b)&&r(),y=b,m=requestAnimationFrame(x)}return r(),()=>{var b;f.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),h==null||h(),(b=v)==null||b.disconnect(),v=null,l&&cancelAnimationFrame(m)}}const I7=i7,P7=o7,N7=t7,T7=s7,A7=r7,tN=e7,M7=a7,D7=(e,t,r)=>{const n=new Map,i={platform:O7,...r},o={...i.platform,_c:n};return Q9(e,t,{...i,platform:o})};var j7=typeof document<"u",q7=function(){},qu=j7?T.useLayoutEffect:q7;function il(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(!il(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)&&!il(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function hq(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rN(e,t){const r=hq(e);return Math.round(t*r)/r}function Bm(e){const t=ve.useRef(e);return qu(()=>{t.current=e}),t}function k7(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:l,open:d}=e,[f,h]=ve.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,v]=ve.useState(n);il(p,n)||v(n);const[m,y]=ve.useState(null),[x,b]=ve.useState(null),w=ve.useCallback(Z=>{Z!==R.current&&(R.current=Z,y(Z))},[]),E=ve.useCallback(Z=>{Z!==I.current&&(I.current=Z,b(Z))},[]),_=o||m,S=a||x,R=ve.useRef(null),I=ve.useRef(null),P=ve.useRef(f),A=l!=null,k=Bm(l),L=Bm(i),$=Bm(d),j=ve.useCallback(()=>{if(!R.current||!I.current)return;const Z={placement:t,strategy:r,middleware:p};L.current&&(Z.platform=L.current),D7(R.current,I.current,Z).then(te=>{const U={...te,isPositioned:$.current!==!1};D.current&&!il(P.current,U)&&(P.current=U,ix.flushSync(()=>{h(U)}))})},[p,t,r,L,$]);qu(()=>{d===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,h(Z=>({...Z,isPositioned:!1})))},[d]);const D=ve.useRef(!1);qu(()=>(D.current=!0,()=>{D.current=!1}),[]),qu(()=>{if(_&&(R.current=_),S&&(I.current=S),_&&S){if(k.current)return k.current(_,S,j);j()}},[_,S,j,k,A]);const G=ve.useMemo(()=>({reference:R,floating:I,setReference:w,setFloating:E}),[w,E]),B=ve.useMemo(()=>({reference:_,floating:S}),[_,S]),Y=ve.useMemo(()=>{const Z={position:r,left:0,top:0};if(!B.floating)return Z;const te=rN(B.floating,f.x),U=rN(B.floating,f.y);return u?{...Z,transform:"translate("+te+"px, "+U+"px)",...hq(B.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:te,top:U}},[r,u,B.floating,f.x,f.y]);return ve.useMemo(()=>({...f,update:j,refs:G,elements:B,floatingStyles:Y}),[f,j,G,B,Y])}const L7=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?tN({element:n.current,padding:i}).fn(r):{}:n?tN({element:n,padding:i}).fn(r):{}}}},B7=(e,t)=>{const r=I7(e);return{name:r.name,fn:r.fn,options:[e,t]}},F7=(e,t)=>{const r=P7(e);return{name:r.name,fn:r.fn,options:[e,t]}},$7=(e,t)=>({fn:M7(e).fn,options:[e,t]}),z7=(e,t)=>{const r=N7(e);return{name:r.name,fn:r.fn,options:[e,t]}},H7=(e,t)=>{const r=T7(e);return{name:r.name,fn:r.fn,options:[e,t]}},V7=(e,t)=>{const r=A7(e);return{name:r.name,fn:r.fn,options:[e,t]}},U7=(e,t)=>{const r=L7(e);return{name:r.name,fn:r.fn,options:[e,t]}};function W7(e){const t=G7(e),r=ve.forwardRef((n,i)=>{const{children:o,...a}=n,u=ve.Children.toArray(o),l=u.find(Y7);if(l){const d=l.props.children,f=u.map(h=>h===l?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 G7(e){const t=ve.forwardRef((r,n)=>{const{children:i,...o}=r;if(ve.isValidElement(i)){const a=Z7(i),u=X7(o,i.props);return i.type!==ve.Fragment&&(u.ref=n?rq(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 K7=Symbol("radix.slottable");function Y7(e){return ve.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===K7}function X7(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 l=o(...u);return i(...u),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function Z7(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 J7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pi=J7.reduce((e,t)=>{const r=W7(`Primitive.${t}`),n=ve.forwardRef((i,o)=>{const{asChild:a,...u}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Q7(e,t){e&&ix.flushSync(()=>e.dispatchEvent(t))}var eX="Arrow",pq=ve.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...o}=e;return C.jsx(Pi.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"})})});pq.displayName=eX;var tX=pq;function Yl(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 rX(e){const[t,r]=ve.useState(void 0);return _i(()=>{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 l=o.borderBoxSize,d=Array.isArray(l)?l[0]:l;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 Yx="Popper",[vq,gq]=tq(Yx),[nX,mq]=vq(Yx),yq=e=>{const{__scopePopper:t,children:r}=e,[n,i]=ve.useState(null);return C.jsx(nX,{scope:t,anchor:n,onAnchorChange:i,children:r})};yq.displayName=Yx;var bq="PopperAnchor",xq=ve.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,o=mq(bq,r),a=ve.useRef(null),u=To(t,a),l=ve.useRef(null);return ve.useEffect(()=>{const d=l.current;l.current=(n==null?void 0:n.current)||a.current,d!==l.current&&o.onAnchorChange(l.current)}),n?null:C.jsx(Pi.div,{...i,ref:u})});xq.displayName=bq;var Xx="PopperContent",[iX,oX]=vq(Xx),wq=ve.forwardRef((e,t)=>{var H,K,se,oe,fe,V;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:v="optimized",onPlaced:m,...y}=e,x=mq(Xx,r),[b,w]=ve.useState(null),E=To(t,ee=>w(ee)),[_,S]=ve.useState(null),R=rX(_),I=(R==null?void 0:R.width)??0,P=(R==null?void 0:R.height)??0,A=n+(o!=="center"?"-"+o:""),k=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(d)?d:[d],$=L.length>0,j={padding:k,boundary:L.filter(sX),altBoundary:$},{refs:D,floatingStyles:G,placement:B,isPositioned:Y,middlewareData:Z}=k7({strategy:"fixed",placement:A,whileElementsMounted:(...ee)=>R7(...ee,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[B7({mainAxis:i+P,alignmentAxis:a}),l&&F7({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?$7():void 0,...j}),l&&z7({...j}),H7({...j,apply:({elements:ee,rects:we,availableWidth:be,availableHeight:de})=>{const{width:ue,height:Ee}=we.reference,Pe=ee.floating.style;Pe.setProperty("--radix-popper-available-width",`${be}px`),Pe.setProperty("--radix-popper-available-height",`${de}px`),Pe.setProperty("--radix-popper-anchor-width",`${ue}px`),Pe.setProperty("--radix-popper-anchor-height",`${Ee}px`)}}),_&&U7({element:_,padding:u}),uX({arrowWidth:I,arrowHeight:P}),p&&V7({strategy:"referenceHidden",...j})]}),[te,U]=Sq(B),re=Yl(m);_i(()=>{Y&&(re==null||re())},[Y,re]);const ae=(H=Z.arrow)==null?void 0:H.x,le=(K=Z.arrow)==null?void 0:K.y,F=((se=Z.arrow)==null?void 0:se.centerOffset)!==0,[W,J]=ve.useState();return _i(()=>{b&&J(window.getComputedStyle(b).zIndex)},[b]),C.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:Y?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(oe=Z.transformOrigin)==null?void 0:oe.x,(fe=Z.transformOrigin)==null?void 0:fe.y].join(" "),...((V=Z.hide)==null?void 0:V.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(iX,{scope:r,placedSide:te,onArrowChange:S,arrowX:ae,arrowY:le,shouldHideArrow:F,children:C.jsx(Pi.div,{"data-side":te,"data-align":U,...y,ref:E,style:{...y.style,animation:Y?void 0:"none"}})})})});wq.displayName=Xx;var _q="PopperArrow",aX={top:"bottom",right:"left",bottom:"top",left:"right"},Eq=ve.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,o=oX(_q,n),a=aX[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(tX,{...i,ref:r,style:{...i.style,display:"block"}})})});Eq.displayName=_q;function sX(e){return e!==null}var uX=e=>({name:"transformOrigin",options:e,fn(t){var x,b,w;const{placement:r,rects:n,middlewareData:i}=t,a=((x=i.arrow)==null?void 0:x.centerOffset)!==0,u=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[d,f]=Sq(r),h={start:"0%",center:"50%",end:"100%"}[f],p=(((b=i.arrow)==null?void 0:b.x)??0)+u/2,v=(((w=i.arrow)==null?void 0:w.y)??0)+l/2;let m="",y="";return d==="bottom"?(m=a?h:`${p}px`,y=`${-l}px`):d==="top"?(m=a?h:`${p}px`,y=`${n.floating.height+l}px`):d==="right"?(m=`${-l}px`,y=a?h:`${v}px`):d==="left"&&(m=`${n.floating.width+l}px`,y=a?h:`${v}px`),{data:{x:m,y}}}});function Sq(e){const[t,r="center"]=e.split("-");return[t,r]}var lX=yq,cX=xq,fX=wq,dX=Eq,hX="Portal",Oq=ve.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=ve.useState(!1);_i(()=>o(!0),[]);const a=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?nx.createPortal(C.jsx(Pi.div,{...n,ref:t}),a):null});Oq.displayName=hX;function pX(e,t){return ve.useReducer((r,n)=>t[r][n]??r,e)}var Zx=e=>{const{present:t,children:r}=e,n=vX(t),i=typeof r=="function"?r({present:n.isPresent}):ve.Children.only(r),o=To(n.ref,gX(i));return typeof r=="function"||n.isPresent?ve.cloneElement(i,{ref:o}):null};Zx.displayName="Presence";function vX(e){const[t,r]=ve.useState(),n=ve.useRef(null),i=ve.useRef(e),o=ve.useRef("none"),a=e?"mounted":"unmounted",[u,l]=pX(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ve.useEffect(()=>{const d=bu(n.current);o.current=u==="mounted"?d:"none"},[u]),_i(()=>{const d=n.current,f=i.current;if(f!==e){const p=o.current,v=bu(d);e?l("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(f&&p!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),_i(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=v=>{const y=bu(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&y&&(l("ANIMATION_END"),!i.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=v=>{v.target===t&&(o.current=bu(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 l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:ve.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function bu(e){return(e==null?void 0:e.animationName)||"none"}function gX(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 mX(e,t=globalThis==null?void 0:globalThis.document){const r=Yl(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 yX="DismissableLayer",Qb="dismissableLayer.update",bX="dismissableLayer.pointerDownOutside",xX="dismissableLayer.focusOutside",nN,Cq=ve.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rq=ve.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...l}=e,d=ve.useContext(Cq),[f,h]=ve.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=ve.useState({}),m=To(t,I=>h(I)),y=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(x),w=f?y.indexOf(f):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,_=w>=b,S=EX(I=>{const P=I.target,A=[...d.branches].some(k=>k.contains(P));!_||A||(i==null||i(I),a==null||a(I),I.defaultPrevented||u==null||u())},p),R=SX(I=>{const P=I.target;[...d.branches].some(k=>k.contains(P))||(o==null||o(I),a==null||a(I),I.defaultPrevented||u==null||u())},p);return mX(I=>{w===d.layers.size-1&&(n==null||n(I),!I.defaultPrevented&&u&&(I.preventDefault(),u()))},p),ve.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(nN=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),iN(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=nN)}},[f,p,r,d]),ve.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),iN())},[f,d]),ve.useEffect(()=>{const I=()=>v({});return document.addEventListener(Qb,I),()=>document.removeEventListener(Qb,I)},[]),C.jsx(Pi.div,{...l,ref:m,style:{pointerEvents:E?_?"auto":"none":void 0,...e.style},onFocusCapture:wr(e.onFocusCapture,R.onFocusCapture),onBlurCapture:wr(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:wr(e.onPointerDownCapture,S.onPointerDownCapture)})});Rq.displayName=yX;var wX="DismissableLayerBranch",_X=ve.forwardRef((e,t)=>{const r=ve.useContext(Cq),n=ve.useRef(null),i=To(t,n);return ve.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),C.jsx(Pi.div,{...e,ref:i})});_X.displayName=wX;function EX(e,t=globalThis==null?void 0:globalThis.document){const r=Yl(e),n=ve.useRef(!1),i=ve.useRef(()=>{});return ve.useEffect(()=>{const o=u=>{if(u.target&&!n.current){let l=function(){Iq(bX,r,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}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 SX(e,t=globalThis==null?void 0:globalThis.document){const r=Yl(e),n=ve.useRef(!1);return ve.useEffect(()=>{const i=o=>{o.target&&!n.current&&Iq(xX,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 iN(){const e=new CustomEvent(Qb);document.dispatchEvent(e)}function Iq(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?Q7(i,o):i.dispatchEvent(o)}var Fm,Xl="HoverCard",[Pq]=tq(Xl,[gq]),Zl=gq(),[OX,Jl]=Pq(Xl),Nq=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:i,onOpenChange:o,openDelay:a=700,closeDelay:u=300}=e,l=Zl(t),d=ve.useRef(0),f=ve.useRef(0),h=ve.useRef(!1),p=ve.useRef(!1),[v,m]=B9({prop:n,defaultProp:i??!1,onChange:o,caller:Xl}),y=ve.useCallback(()=>{clearTimeout(f.current),d.current=window.setTimeout(()=>m(!0),a)},[a,m]),x=ve.useCallback(()=>{clearTimeout(d.current),!h.current&&!p.current&&(f.current=window.setTimeout(()=>m(!1),u))},[u,m]),b=ve.useCallback(()=>m(!1),[m]);return ve.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(f.current)},[]),C.jsx(OX,{scope:t,open:v,onOpenChange:m,onOpen:y,onClose:x,onDismiss:b,hasSelectionRef:h,isPointerDownOnContentRef:p,children:C.jsx(lX,{...l,children:r})})};Nq.displayName=Xl;var Tq="HoverCardTrigger",Aq=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Jl(Tq,r),o=Zl(r);return C.jsx(cX,{asChild:!0,...o,children:C.jsx(Pi.a,{"data-state":i.open?"open":"closed",...n,ref:t,onPointerEnter:wr(e.onPointerEnter,al(i.onOpen)),onPointerLeave:wr(e.onPointerLeave,al(i.onClose)),onFocus:wr(e.onFocus,i.onOpen),onBlur:wr(e.onBlur,i.onClose),onTouchStart:wr(e.onTouchStart,a=>a.preventDefault())})})});Aq.displayName=Tq;var Jx="HoverCardPortal",[CX,RX]=Pq(Jx,{forceMount:void 0}),Mq=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:i}=e,o=Jl(Jx,t);return C.jsx(CX,{scope:t,forceMount:r,children:C.jsx(Zx,{present:r||o.open,children:C.jsx(Oq,{asChild:!0,container:i,children:n})})})};Mq.displayName=Jx;var ol="HoverCardContent",Dq=ve.forwardRef((e,t)=>{const r=RX(ol,e.__scopeHoverCard),{forceMount:n=r.forceMount,...i}=e,o=Jl(ol,e.__scopeHoverCard);return C.jsx(Zx,{present:n||o.open,children:C.jsx(IX,{"data-state":o.open?"open":"closed",...i,onPointerEnter:wr(e.onPointerEnter,al(o.onOpen)),onPointerLeave:wr(e.onPointerLeave,al(o.onClose)),ref:t})})});Dq.displayName=ol;var IX=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,...u}=e,l=Jl(ol,r),d=Zl(r),f=ve.useRef(null),h=To(t,f),[p,v]=ve.useState(!1);return ve.useEffect(()=>{if(p){const m=document.body;return Fm=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=Fm,m.style.webkitUserSelect=Fm}}},[p]),ve.useEffect(()=>{if(f.current){const m=()=>{v(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var x;((x=document.getSelection())==null?void 0:x.toString())!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",m),()=>{document.removeEventListener("pointerup",m),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),ve.useEffect(()=>{f.current&&TX(f.current).forEach(y=>y.setAttribute("tabindex","-1"))}),C.jsx(Rq,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:wr(o,m=>{m.preventDefault()}),onDismiss:l.onDismiss,children:C.jsx(fX,{...d,...u,onPointerDown:wr(u.onPointerDown,m=>{m.currentTarget.contains(m.target)&&v(!0),l.hasSelectionRef.current=!1,l.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)"}})})}),PX="HoverCardArrow",NX=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Zl(r);return C.jsx(dX,{...i,...n,ref:t})});NX.displayName=PX;function al(e){return t=>t.pointerType==="touch"?void 0:e()}function TX(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 Qx=Nq,ew=Aq,Lr=Mq,Br=Dq;function to(e,t,r){let n=r.initialDeps??[],i,o=!0;function a(){var u,l,d;let f;r.key&&((u=r.debug)!=null&&u.call(r))&&(f=Date.now());const h=e();if(!(h.length!==n.length||h.some((m,y)=>n[y]!==m)))return i;n=h;let v;if(r.key&&((l=r.debug)!=null&&l.call(r))&&(v=Date.now()),i=t(...h),r.key&&((d=r.debug)!=null&&d.call(r))){const m=Math.round((Date.now()-f)*100)/100,y=Math.round((Date.now()-v)*100)/100,x=y/16,b=(w,E)=>{for(w=String(w);w.length<E;)w=" "+w;return w};console.info(`%c⏱ ${b(y,5)} /${b(m,5)} ms`,`
|
|
8
8
|
font-size: .6rem;
|
|
9
9
|
font-weight: bold;
|
|
10
|
-
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,r==null?void 0:r.key)}return r!=null&&r.onChange&&!(o&&r.skipInitialOnChange)&&r.onChange(i),o=!1,i}return a.updateDeps=u=>{n=u},a}function iN(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const CX=(e,t)=>Math.abs(e-t)<1.01,RX=(e,t,r)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),r)}},oN=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},IX=e=>e,PX=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let i=t;i<=r;i++)n.push(i);return n},NX=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const i=a=>{const{width:u,height:c}=a;t({width:Math.round(u),height:Math.round(c)})};if(i(oN(r)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const u=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const d=c.borderBoxSize[0];if(d){i({width:d.inlineSize,height:d.blockSize});return}}i(oN(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},aN={passive:!0},sN=typeof window>"u"?!0:"onscrollend"in window,TX=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let i=0;const o=e.options.useScrollendEvent&&sN?()=>{}:RX(n,()=>{t(i,!1)},e.options.isScrollingResetDelay),a=f=>()=>{const{horizontal:h,isRtl:p}=e.options;i=h?r.scrollLeft*(p&&-1||1):r.scrollTop,o(),t(i,f)},u=a(!0),c=a(!1);r.addEventListener("scroll",u,aN);const d=e.options.useScrollendEvent&&sN;return d&&r.addEventListener("scrollend",c,aN),()=>{r.removeEventListener("scroll",u),d&&r.removeEventListener("scrollend",c)}},AX=(e,t,r)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},MX=(e,{adjustments:t=0,behavior:r},n)=>{var i,o;const a=e+t;(o=(i=n.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[n.options.horizontal?"left":"top"]:a,behavior:r})};class DX{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var r,n,i;return((i=(n=(r=this.targetWindow)==null?void 0:r.performance)==null?void 0:n.now)==null?void 0:i.call(n))??Date.now()},this.observer=(()=>{let r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{const a=()=>{const u=o.target,c=this.indexFromElement(u);if(!u.isConnected){this.observer.unobserve(u);return}this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(u,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=n())==null||i.disconnect(),r=null},observe:i=>{var o;return(o=n())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=n())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,i])=>{typeof i>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:IX,rangeExtractor:PX,onChange:()=>{},measureElement:AX,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var n,i;(i=(n=this.options).onChange)==null||i.call(n,this,r)},this.maybeNotify=Qi(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{const i=new Map,o=new Map;for(let a=n-1;a>=0;a--){const u=r[a];if(i.has(u.lane))continue;const c=o.get(u.lane);if(c==null||u.end>c.end?o.set(u.lane,u):u.end<c.end&&i.set(u.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((a,u)=>a.end===u.end?a.index-u.index:a.end-u.end)[0]:void 0},this.getMeasurementOptions=Qi(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,n,i,o,a,u)=>(this.prevLanes!==void 0&&this.prevLanes!==u&&(this.lanesChangedFlag=!0),this.prevLanes=u,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:u}),{key:!1}),this.getMeasurements=Qi(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:u},c)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(const p of this.laneAssignments.keys())p>=r&&this.laneAssignments.delete(p);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const d=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const f=this.measurementsCache.slice(0,d),h=new Array(u).fill(void 0);for(let p=0;p<d;p++){const v=f[p];v&&(h[v.lane]=p)}for(let p=d;p<r;p++){const v=o(p),m=this.laneAssignments.get(p);let y,x;if(m!==void 0&&this.options.lanes>1){y=m;const _=h[y],S=_!==void 0?f[_]:void 0;x=S?S.end+this.options.gap:n+i}else{const _=this.options.lanes===1?f[p-1]:this.getFurthestMeasurement(f,p);x=_?_.end+this.options.gap:n+i,y=_?_.lane:p%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(p,y)}const b=c.get(v),w=typeof b=="number"?b:this.options.estimateSize(p),E=x+w;f[p]={index:p,start:x,size:w,end:E,key:v,lane:y},h[y]=p}return this.measurementsCache=f,f},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Qi(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,i,o)=>this.range=r.length>0&&n>0?jX({measurements:r,outerSize:n,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Qi(()=>{let r=null,n=null;const i=this.calculateRange();return i&&(r=i.startIndex,n=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,n]},(r,n,i,o,a)=>o===null||a===null?[]:r({startIndex:o,endIndex:a,overscan:n,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,i=r.getAttribute(n);return i?parseInt(i,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=r=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(i!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,i-o),u=Math.min(this.options.count-1,i+o);return r>=a&&r<=u}return!0},this.measureElement=r=>{if(!r){this.elementsCache.forEach((a,u)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(u))});return}const n=this.indexFromElement(r),i=this.options.getItemKey(n),o=this.elementsCache.get(i);o!==r&&(o&&this.observer.unobserve(o),this.observer.observe(r),this.elementsCache.set(i,r)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(r,void 0,this))},this.resizeItem=(r,n)=>{var i;const o=this.measurementsCache[r];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,u=n-a;u!==0&&(((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,u,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",u),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=u,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.getVirtualItems=Qi(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,n)=>{const i=[];for(let o=0,a=r.length;o<a;o++){const u=r[o],c=n[u];i.push(c)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return iN(n[Iq(0,n.length-1,i=>iN(n[i]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,n,i=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=r>=a+o?"end":"start"),n==="center"?r+=(i-o)/2:n==="end"&&(r-=o);const u=this.getMaxScrollOffset();return Math.max(Math.min(u,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const i=this.getSize(),o=this.getScrollOffset(),a=this.measurementsCache[r];if(!a)return;if(n==="auto")if(a.end>=o+i-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];if(n==="end"&&r===this.options.count-1)return[this.getMaxScrollOffset(),n];const u=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(u,n,a.size),n]},this.scrollToOffset=(r,{align:n="start",behavior:i="auto"}={})=>{const o=this.getOffsetForAlignment(r,n),a=this.now();this.scrollState={index:null,align:n,behavior:i,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(r,{align:n="auto",behavior:i="auto"}={})=>{r=Math.max(0,Math.min(r,this.options.count-1));const o=this.getOffsetForIndex(r,n);if(!o)return;const[a,u]=o,c=this.now();this.scrollState={index:r,align:u,behavior:i,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(r,{behavior:n="auto"}={})=>{const i=this.getScrollOffset()+r,o=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let i;if(n.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((r=n[n.length-1])==null?void 0:r.end)??0;else{const o=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&o.some(u=>u===null);){const u=n[a];o[u.lane]===null&&(o[u.lane]=u.end),a--}i=Math.max(...o.filter(u=>u!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:n,behavior:i})=>{this.options.scrollToFn(r,{behavior:i,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=n?n[0]:this.scrollState.lastTargetOffset,o=1,a=i!==this.scrollState.lastTargetOffset;if(!a&&CX(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.scrollState=null;return}}else this.scrollState.stableFrames=0,a&&(this.scrollState.lastTargetOffset=i,this.scrollState.behavior="auto",this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const Iq=(e,t,r,n)=>{for(;e<=t;){const i=(e+t)/2|0,o=r(i);if(o<n)e=i+1;else if(o>n)t=i-1;else return i}return e>0?e-1:0};function jX({measurements:e,outerSize:t,scrollOffset:r,lanes:n}){const i=e.length-1,o=c=>e[c].start;if(e.length<=n)return{startIndex:0,endIndex:i};let a=Iq(0,i,o,r),u=a;if(n===1)for(;u<i&&e[u].end<r+t;)u++;else if(n>1){const c=Array(n).fill(0);for(;u<i&&c.some(f=>f<r+t);){const f=e[u];c[f.lane]=f.end,u++}const d=Array(n).fill(r+t);for(;a>=0&&d.some(f=>f>=r);){const f=e[a];d[f.lane]=f.start,a--}a=Math.max(0,a-a%n),u=Math.min(i,u+(n-1-u%n))}return{startIndex:a,endIndex:u}}const uN=typeof document<"u"?pe.useLayoutEffect:pe.useEffect;function qX({useFlushSync:e=!0,...t}){const r=pe.useReducer(()=>({}),{})[1],n={...t,onChange:(o,a)=>{var u;e&&a?Qb.flushSync(r):r(),(u=t.onChange)==null||u.call(t,o,a)}},[i]=pe.useState(()=>new DX(n));return i.setOptions(n),uN(()=>i._didMount(),[]),uN(()=>i._willUpdate()),i}function kX(e){return qX({observeElementRect:NX,observeElementOffset:TX,scrollToFn:MX,...e})}var gu={exports:{}},mu={exports:{}},Ye={};/** @license React v16.13.1
|
|
10
|
+
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,r==null?void 0:r.key)}return r!=null&&r.onChange&&!(o&&r.skipInitialOnChange)&&r.onChange(i),o=!1,i}return a.updateDeps=u=>{n=u},a}function oN(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const AX=(e,t)=>Math.abs(e-t)<1.01,MX=(e,t,r)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),r)}},aN=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},DX=e=>e,jX=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let i=t;i<=r;i++)n.push(i);return n},qX=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const i=a=>{const{width:u,height:l}=a;t({width:Math.round(u),height:Math.round(l)})};if(i(aN(r)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const u=()=>{const l=a[0];if(l!=null&&l.borderBoxSize){const d=l.borderBoxSize[0];if(d){i({width:d.inlineSize,height:d.blockSize});return}}i(aN(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},sN={passive:!0},uN=typeof window>"u"?!0:"onscrollend"in window,kX=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let i=0;const o=e.options.useScrollendEvent&&uN?()=>{}:MX(n,()=>{t(i,!1)},e.options.isScrollingResetDelay),a=f=>()=>{const{horizontal:h,isRtl:p}=e.options;i=h?r.scrollLeft*(p&&-1||1):r.scrollTop,o(),t(i,f)},u=a(!0),l=a(!1);r.addEventListener("scroll",u,sN);const d=e.options.useScrollendEvent&&uN;return d&&r.addEventListener("scrollend",l,sN),()=>{r.removeEventListener("scroll",u),d&&r.removeEventListener("scrollend",l)}},LX=(e,t,r)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},BX=(e,{adjustments:t=0,behavior:r},n)=>{var i,o;const a=e+t;(o=(i=n.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[n.options.horizontal?"left":"top"]:a,behavior:r})};class FX{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var r,n,i;return((i=(n=(r=this.targetWindow)==null?void 0:r.performance)==null?void 0:n.now)==null?void 0:i.call(n))??Date.now()},this.observer=(()=>{let r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{const a=()=>{const u=o.target,l=this.indexFromElement(u);if(!u.isConnected){this.observer.unobserve(u);return}this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(u,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=n())==null||i.disconnect(),r=null},observe:i=>{var o;return(o=n())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=n())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,i])=>{typeof i>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:DX,rangeExtractor:jX,onChange:()=>{},measureElement:LX,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var n,i;(i=(n=this.options).onChange)==null||i.call(n,this,r)},this.maybeNotify=to(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{const i=new Map,o=new Map;for(let a=n-1;a>=0;a--){const u=r[a];if(i.has(u.lane))continue;const l=o.get(u.lane);if(l==null||u.end>l.end?o.set(u.lane,u):u.end<l.end&&i.set(u.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((a,u)=>a.end===u.end?a.index-u.index:a.end-u.end)[0]:void 0},this.getMeasurementOptions=to(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,n,i,o,a,u)=>(this.prevLanes!==void 0&&this.prevLanes!==u&&(this.lanesChangedFlag=!0),this.prevLanes=u,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:u}),{key:!1}),this.getMeasurements=to(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:u},l)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(const p of this.laneAssignments.keys())p>=r&&this.laneAssignments.delete(p);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const d=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const f=this.measurementsCache.slice(0,d),h=new Array(u).fill(void 0);for(let p=0;p<d;p++){const v=f[p];v&&(h[v.lane]=p)}for(let p=d;p<r;p++){const v=o(p),m=this.laneAssignments.get(p);let y,x;if(m!==void 0&&this.options.lanes>1){y=m;const _=h[y],S=_!==void 0?f[_]:void 0;x=S?S.end+this.options.gap:n+i}else{const _=this.options.lanes===1?f[p-1]:this.getFurthestMeasurement(f,p);x=_?_.end+this.options.gap:n+i,y=_?_.lane:p%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(p,y)}const b=l.get(v),w=typeof b=="number"?b:this.options.estimateSize(p),E=x+w;f[p]={index:p,start:x,size:w,end:E,key:v,lane:y},h[y]=p}return this.measurementsCache=f,f},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=to(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,i,o)=>this.range=r.length>0&&n>0?$X({measurements:r,outerSize:n,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=to(()=>{let r=null,n=null;const i=this.calculateRange();return i&&(r=i.startIndex,n=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,n]},(r,n,i,o,a)=>o===null||a===null?[]:r({startIndex:o,endIndex:a,overscan:n,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,i=r.getAttribute(n);return i?parseInt(i,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=r=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(i!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,i-o),u=Math.min(this.options.count-1,i+o);return r>=a&&r<=u}return!0},this.measureElement=r=>{if(!r){this.elementsCache.forEach((a,u)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(u))});return}const n=this.indexFromElement(r),i=this.options.getItemKey(n),o=this.elementsCache.get(i);o!==r&&(o&&this.observer.unobserve(o),this.observer.observe(r),this.elementsCache.set(i,r)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(r,void 0,this))},this.resizeItem=(r,n)=>{var i;const o=this.measurementsCache[r];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,u=n-a;u!==0&&(((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,u,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",u),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=u,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.getVirtualItems=to(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,n)=>{const i=[];for(let o=0,a=r.length;o<a;o++){const u=r[o],l=n[u];i.push(l)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return oN(n[jq(0,n.length-1,i=>oN(n[i]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,n,i=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=r>=a+o?"end":"start"),n==="center"?r+=(i-o)/2:n==="end"&&(r-=o);const u=this.getMaxScrollOffset();return Math.max(Math.min(u,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const i=this.getSize(),o=this.getScrollOffset(),a=this.measurementsCache[r];if(!a)return;if(n==="auto")if(a.end>=o+i-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];if(n==="end"&&r===this.options.count-1)return[this.getMaxScrollOffset(),n];const u=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(u,n,a.size),n]},this.scrollToOffset=(r,{align:n="start",behavior:i="auto"}={})=>{const o=this.getOffsetForAlignment(r,n),a=this.now();this.scrollState={index:null,align:n,behavior:i,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(r,{align:n="auto",behavior:i="auto"}={})=>{r=Math.max(0,Math.min(r,this.options.count-1));const o=this.getOffsetForIndex(r,n);if(!o)return;const[a,u]=o,l=this.now();this.scrollState={index:r,align:u,behavior:i,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(r,{behavior:n="auto"}={})=>{const i=this.getScrollOffset()+r,o=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let i;if(n.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((r=n[n.length-1])==null?void 0:r.end)??0;else{const o=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&o.some(u=>u===null);){const u=n[a];o[u.lane]===null&&(o[u.lane]=u.end),a--}i=Math.max(...o.filter(u=>u!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:n,behavior:i})=>{this.options.scrollToFn(r,{behavior:i,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=n?n[0]:this.scrollState.lastTargetOffset,o=1,a=i!==this.scrollState.lastTargetOffset;if(!a&&AX(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.scrollState=null;return}}else this.scrollState.stableFrames=0,a&&(this.scrollState.lastTargetOffset=i,this.scrollState.behavior="auto",this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const jq=(e,t,r,n)=>{for(;e<=t;){const i=(e+t)/2|0,o=r(i);if(o<n)e=i+1;else if(o>n)t=i-1;else return i}return e>0?e-1:0};function $X({measurements:e,outerSize:t,scrollOffset:r,lanes:n}){const i=e.length-1,o=l=>e[l].start;if(e.length<=n)return{startIndex:0,endIndex:i};let a=jq(0,i,o,r),u=a;if(n===1)for(;u<i&&e[u].end<r+t;)u++;else if(n>1){const l=Array(n).fill(0);for(;u<i&&l.some(f=>f<r+t);){const f=e[u];l[f.lane]=f.end,u++}const d=Array(n).fill(r+t);for(;a>=0&&d.some(f=>f>=r);){const f=e[a];d[f.lane]=f.start,a--}a=Math.max(0,a-a%n),u=Math.min(i,u+(n-1-u%n))}return{startIndex:a,endIndex:u}}const lN=typeof document<"u"?ve.useLayoutEffect:ve.useEffect;function zX({useFlushSync:e=!0,...t}){const r=ve.useReducer(()=>({}),{})[1],n={...t,onChange:(o,a)=>{var u;e&&a?nx.flushSync(r):r(),(u=t.onChange)==null||u.call(t,o,a)}},[i]=ve.useState(()=>new FX(n));return i.setOptions(n),lN(()=>i._didMount(),[]),lN(()=>i._willUpdate()),i}function Wa(e){return zX({observeElementRect:qX,observeElementOffset:kX,scrollToFn:BX,...e})}const HX=({item:e,depth:t})=>{const[r,n]=T.useState(!1),i=Q.useAppSelector(Q.selectPrivileges),o=Q.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(xe.FdRight,{className:We("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(qq,{depth:t+1,data:o})})]})},qq=({data:e,depth:t=0})=>e.map(r=>r.includes.length?C.jsx(HX,{item:r,depth:t},r.id):C.jsx("div",{className:We("py-1 text-xs text-white",{}),children:r.privilege},r.id)),Bt=()=>document.querySelector(`.${CD.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,Ql=({container:e,...t})=>C.jsx(Te.Portal,{...t,container:e||Bt()}),cN=Qx,fN=ew,dN=T.memo(function({privilege:t,selectedPrivilege:r,onSelect:n,privileges:i,isGuest:o=!1}){const a=Q.useAppDispatch(),u=Q.populateShallow(t.includes,i),[l,d]=T.useState(!1),[f,h]=T.useState(t.privilege),[p,v]=T.useState(null),m=Te.useOutsideClick(()=>{l&&b()});Te.useDidMountEffect(()=>{t.privilege!==f&&h(t.privilege)},[t.privilege]);function y(){d(!0),v(null)}function x(){d(!1),h(t.privilege)}function b(){v(null);try{Te.validateName(f);const _=Q.rename(f,t.id,i);a(Q.updatePrivileges(_)),d(!1)}catch(_){v(_.message)}}const w=async _=>{_.stopPropagation();const{confirmed:S}=await a(Q.openModal({title:"Delete Privilege",type:Te.ModalType.CONFIRM,color:Te.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"})).unwrap();if(S){const R=Q.remove(t.id,i);if((r==null?void 0:r.id)!==t.id){a(Q.updatePrivileges(R));return}const I=Object.keys(R).filter(P=>R[P].privilege!=="guest");if(I.length===0)n(null);else{const P=Object.keys(i).filter($=>i[$].privilege!=="guest"),A=P.indexOf(t.id),k=Math.max(0,A-1),L=P[k];A===0?n(R[I[0]]):R[L]?n(R[L]):n(R[I[0]])}a(Q.updatePrivileges(R))}},E=T.useMemo(()=>t.resources.some(_=>_.exists===!1),[t]);return C.jsxs(cN,{openDelay:0,closeDelay:0,children:[C.jsx(fN,{asChild:!0,children:C.jsxs("div",{className:We("rounded border bg-grey-300 p-2",{"border-grey-100":(r==null?void 0:r.id)!==t.id,"border-primary-dark":(r==null?void 0:r.id)===t.id,"border-red-400":E&&(r==null?void 0:r.id)!==t.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{n(t)},ref:m,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:o?C.jsx(xe.FdGuest,{className:"h-6 w-6"}):C.jsx(xe.FdGroup,{className:"h-6 w-6"})}),l?C.jsxs("div",{className:"relative h-6 flex-1 mr-2",children:[C.jsx("input",{autoFocus:!0,onKeyDown:_=>{_.key==="Enter"&&b(),_.key==="Escape"&&x()},type:"text",className:We("absolute inset-0 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:outline-none",{"border-b border-red-400 rounded-b-none":p,"focus:border-primary-dark":!p}),value:f,onChange:_=>h(_.target.value)}),p&&C.jsx("p",{className:"absolute top-5 mt-1 w-full rounded rounded-t-none bg-red-400 p-1 text-xs text-white shadow-md",children:p})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:f})]}),o?C.jsx("div",{className:"flex items-center justify-center",children:C.jsxs(cN,{openDelay:0,closeDelay:0,children:[C.jsx(fN,{asChild:!0,children:C.jsx("span",{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-grey-50"})})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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(xe.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:l?C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:x,children:C.jsx("span",{children:C.jsx(xe.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(xe.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:y,children:C.jsx("span",{children:C.jsx(xe.FdPen,{className:"h-4 w-4 text-grey-50"})})}),C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:w,children:C.jsx("span",{children:C.jsx(xe.FdTrash,{className:"h-4 w-4 text-grey-50"})})})]})})]}),u.length?C.jsx("div",{className:"ml-[43px]",children:C.jsx(qq,{data:u})}):null]})}),C.jsx(Lr,{container:Bt(),children:C.jsxs(Br,{hidden:!E,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(xe.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"This privilege uses non-existing resources"})]})})]})}),VX=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=Q.useAppSelector(Q.selectGuestPrivilege),i=Q.useAppSelector(Q.selectCatalog),o=T.useMemo(()=>{if(i===null||!n)return n;const d=Q2({guest:n},Object.values((i==null?void 0:i.dataClasses)??{}));return eq(d,i).guest},[e,i]),a=T.useMemo(()=>Object.entries(e).filter(([,d])=>d.privilege!=="guest").sort(([,d],[,f])=>Te.localeCompare(d.privilege,f.privilege)),[e]),u=T.useRef(null),l=Wa({count:a.length,getScrollElement:()=>u.current,estimateSize:()=>72,overscan:5});return C.jsxs("div",{ref:u,className:"flex flex-1 flex-col overflow-auto p-4 pb-10 pt-1",children:[o?C.jsx("div",{className:"mb-4",children:C.jsx(dN,{privilege:o,onSelect:t,selectedPrivilege:r,privileges:e,isGuest:!0})}):null,a.length?C.jsx("div",{style:{position:"relative",height:`${l.getTotalSize()}px`},children:l.getVirtualItems().map(d=>{const[f,h]=a[d.index];return C.jsx("div",{ref:l.measureElement,"data-index":d.index,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${d.start}px)`,paddingBottom:"16px"},children:C.jsx(dN,{privilege:h,onSelect:t,selectedPrivilege:r,privileges:e})},f)})}):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(xe.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(xe.FdPlus,{className:"ml-2 inline h-4 w-4 text-white"})]})]})})})]})};var xu={exports:{}},wu={exports:{}},Ye={};/** @license React v16.13.1
|
|
11
11
|
* react-is.production.min.js
|
|
12
12
|
*
|
|
13
13
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var hN;function UX(){if(hN)return Ye;hN=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,l=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,x=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function E(S){if(typeof S=="object"&&S!==null){var R=S.$$typeof;switch(R){case t:switch(S=S.type,S){case l:case d:case n:case o:case i:case h:return S;default:switch(S=S&&S.$$typeof,S){case u:case f:case m:case v:case a:return S;default:return R}}case r:return R}}}function _(S){return E(S)===d}return Ye.AsyncMode=l,Ye.ConcurrentMode=d,Ye.ContextConsumer=u,Ye.ContextProvider=a,Ye.Element=t,Ye.ForwardRef=f,Ye.Fragment=n,Ye.Lazy=m,Ye.Memo=v,Ye.Portal=r,Ye.Profiler=o,Ye.StrictMode=i,Ye.Suspense=h,Ye.isAsyncMode=function(S){return _(S)||E(S)===l},Ye.isConcurrentMode=_,Ye.isContextConsumer=function(S){return E(S)===u},Ye.isContextProvider=function(S){return E(S)===a},Ye.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Ye.isForwardRef=function(S){return E(S)===f},Ye.isFragment=function(S){return E(S)===n},Ye.isLazy=function(S){return E(S)===m},Ye.isMemo=function(S){return E(S)===v},Ye.isPortal=function(S){return E(S)===r},Ye.isProfiler=function(S){return E(S)===o},Ye.isStrictMode=function(S){return E(S)===i},Ye.isSuspense=function(S){return E(S)===h},Ye.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===d||S===o||S===i||S===h||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===m||S.$$typeof===v||S.$$typeof===a||S.$$typeof===u||S.$$typeof===f||S.$$typeof===x||S.$$typeof===b||S.$$typeof===w||S.$$typeof===y)},Ye.typeOf=E,Ye}var Xe={};/** @license React v16.13.1
|
|
18
18
|
* react-is.development.js
|
|
19
19
|
*
|
|
20
20
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
21
21
|
*
|
|
22
22
|
* This source code is licensed under the MIT license found in the
|
|
23
23
|
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/var
|
|
24
|
+
*/var pN;function WX(){return pN||(pN=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,l=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,x=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function E(V){return typeof V=="string"||typeof V=="function"||V===n||V===d||V===o||V===i||V===h||V===p||typeof V=="object"&&V!==null&&(V.$$typeof===m||V.$$typeof===v||V.$$typeof===a||V.$$typeof===u||V.$$typeof===f||V.$$typeof===x||V.$$typeof===b||V.$$typeof===w||V.$$typeof===y)}function _(V){if(typeof V=="object"&&V!==null){var ee=V.$$typeof;switch(ee){case t:var we=V.type;switch(we){case l:case d:case n:case o:case i:case h:return we;default:var be=we&&we.$$typeof;switch(be){case u:case f:case m:case v:case a:return be;default:return ee}}case r:return ee}}}var S=l,R=d,I=u,P=a,A=t,k=f,L=n,$=m,j=v,D=r,G=o,B=i,Y=h,Z=!1;function te(V){return Z||(Z=!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.")),U(V)||_(V)===l}function U(V){return _(V)===d}function re(V){return _(V)===u}function ae(V){return _(V)===a}function le(V){return typeof V=="object"&&V!==null&&V.$$typeof===t}function F(V){return _(V)===f}function W(V){return _(V)===n}function J(V){return _(V)===m}function H(V){return _(V)===v}function K(V){return _(V)===r}function se(V){return _(V)===o}function oe(V){return _(V)===i}function fe(V){return _(V)===h}Xe.AsyncMode=S,Xe.ConcurrentMode=R,Xe.ContextConsumer=I,Xe.ContextProvider=P,Xe.Element=A,Xe.ForwardRef=k,Xe.Fragment=L,Xe.Lazy=$,Xe.Memo=j,Xe.Portal=D,Xe.Profiler=G,Xe.StrictMode=B,Xe.Suspense=Y,Xe.isAsyncMode=te,Xe.isConcurrentMode=U,Xe.isContextConsumer=re,Xe.isContextProvider=ae,Xe.isElement=le,Xe.isForwardRef=F,Xe.isFragment=W,Xe.isLazy=J,Xe.isMemo=H,Xe.isPortal=K,Xe.isProfiler=se,Xe.isStrictMode=oe,Xe.isSuspense=fe,Xe.isValidElementType=E,Xe.typeOf=_})()),Xe}var vN;function kq(){return vN||(vN=1,process.env.NODE_ENV==="production"?wu.exports=UX():wu.exports=WX()),wu.exports}/*
|
|
25
25
|
object-assign
|
|
26
26
|
(c) Sindre Sorhus
|
|
27
27
|
@license MIT
|
|
28
|
-
*/var
|
|
29
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
28
|
+
*/var $m,gN;function GX(){if(gN)return $m;gN=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 l=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(l.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 $m=i()?Object.assign:function(o,a){for(var u,l=n(o),d,f=1;f<arguments.length;f++){u=Object(arguments[f]);for(var h in u)t.call(u,h)&&(l[h]=u[h]);if(e){d=e(u);for(var p=0;p<d.length;p++)r.call(u,d[p])&&(l[d[p]]=u[d[p]])}}return l},$m}var zm,mN;function tw(){if(mN)return zm;mN=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return zm=e,zm}var Hm,yN;function Lq(){return yN||(yN=1,Hm=Function.call.bind(Object.prototype.hasOwnProperty)),Hm}var Vm,bN;function KX(){if(bN)return Vm;bN=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=tw(),r={},n=Lq();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,u,l,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((l||"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,l,u,null,t)}catch(m){h=m}if(h&&!(h instanceof Error)&&e((l||"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={})},Vm=i,Vm}var Um,xN;function YX(){if(xN)return Um;xN=1;var e=kq(),t=GX(),r=tw(),n=Lq(),i=KX(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(u){var l="Warning: "+u;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Um=function(u,l){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(U){var re=U&&(d&&U[d]||U[f]);if(typeof re=="function")return re}var p="<<anonymous>>",v={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:w(),arrayOf:E,element:_(),elementType:S(),instanceOf:R,node:k(),objectOf:P,oneOf:I,oneOfType:A,shape:$,exact:j};function m(U,re){return U===re?U!==0||1/U===1/re:U!==U&&re!==re}function y(U,re){this.message=U,this.data=re&&typeof re=="object"?re:{},this.stack=""}y.prototype=Error.prototype;function x(U){if(process.env.NODE_ENV!=="production")var re={},ae=0;function le(W,J,H,K,se,oe,fe){if(K=K||p,oe=oe||H,fe!==r){if(l){var V=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 V.name="Invariant Violation",V}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ee=K+":"+H;!re[ee]&&ae<3&&(o("You are manually calling a React.PropTypes validation function for the `"+oe+"` 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."),re[ee]=!0,ae++)}}return J[H]==null?W?J[H]===null?new y("The "+se+" `"+oe+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new y("The "+se+" `"+oe+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:U(J,H,K,se,oe)}var F=le.bind(null,!1);return F.isRequired=le.bind(null,!0),F}function b(U){function re(ae,le,F,W,J,H){var K=ae[le],se=B(K);if(se!==U){var oe=Y(K);return new y("Invalid "+W+" `"+J+"` of type "+("`"+oe+"` supplied to `"+F+"`, expected ")+("`"+U+"`."),{expectedType:U})}return null}return x(re)}function w(){return x(a)}function E(U){function re(ae,le,F,W,J){if(typeof U!="function")return new y("Property `"+J+"` of component `"+F+"` has invalid PropType notation inside arrayOf.");var H=ae[le];if(!Array.isArray(H)){var K=B(H);return new y("Invalid "+W+" `"+J+"` of type "+("`"+K+"` supplied to `"+F+"`, expected an array."))}for(var se=0;se<H.length;se++){var oe=U(H,se,F,W,J+"["+se+"]",r);if(oe instanceof Error)return oe}return null}return x(re)}function _(){function U(re,ae,le,F,W){var J=re[ae];if(!u(J)){var H=B(J);return new y("Invalid "+F+" `"+W+"` of type "+("`"+H+"` supplied to `"+le+"`, expected a single ReactElement."))}return null}return x(U)}function S(){function U(re,ae,le,F,W){var J=re[ae];if(!e.isValidElementType(J)){var H=B(J);return new y("Invalid "+F+" `"+W+"` of type "+("`"+H+"` supplied to `"+le+"`, expected a single ReactElement type."))}return null}return x(U)}function R(U){function re(ae,le,F,W,J){if(!(ae[le]instanceof U)){var H=U.name||p,K=te(ae[le]);return new y("Invalid "+W+" `"+J+"` of type "+("`"+K+"` supplied to `"+F+"`, expected ")+("instance of `"+H+"`."))}return null}return x(re)}function I(U){if(!Array.isArray(U))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 re(ae,le,F,W,J){for(var H=ae[le],K=0;K<U.length;K++)if(m(H,U[K]))return null;var se=JSON.stringify(U,function(fe,V){var ee=Y(V);return ee==="symbol"?String(V):V});return new y("Invalid "+W+" `"+J+"` of value `"+String(H)+"` "+("supplied to `"+F+"`, expected one of "+se+"."))}return x(re)}function P(U){function re(ae,le,F,W,J){if(typeof U!="function")return new y("Property `"+J+"` of component `"+F+"` has invalid PropType notation inside objectOf.");var H=ae[le],K=B(H);if(K!=="object")return new y("Invalid "+W+" `"+J+"` of type "+("`"+K+"` supplied to `"+F+"`, expected an object."));for(var se in H)if(n(H,se)){var oe=U(H,se,F,W,J+"."+se,r);if(oe instanceof Error)return oe}return null}return x(re)}function A(U){if(!Array.isArray(U))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var re=0;re<U.length;re++){var ae=U[re];if(typeof ae!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(ae)+" at index "+re+"."),a}function le(F,W,J,H,K){for(var se=[],oe=0;oe<U.length;oe++){var fe=U[oe],V=fe(F,W,J,H,K,r);if(V==null)return null;V.data&&n(V.data,"expectedType")&&se.push(V.data.expectedType)}var ee=se.length>0?", expected one of type ["+se.join(", ")+"]":"";return new y("Invalid "+H+" `"+K+"` supplied to "+("`"+J+"`"+ee+"."))}return x(le)}function k(){function U(re,ae,le,F,W){return D(re[ae])?null:new y("Invalid "+F+" `"+W+"` supplied to "+("`"+le+"`, expected a ReactNode."))}return x(U)}function L(U,re,ae,le,F){return new y((U||"React class")+": "+re+" type `"+ae+"."+le+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+F+"`.")}function $(U){function re(ae,le,F,W,J){var H=ae[le],K=B(H);if(K!=="object")return new y("Invalid "+W+" `"+J+"` of type `"+K+"` "+("supplied to `"+F+"`, expected `object`."));for(var se in U){var oe=U[se];if(typeof oe!="function")return L(F,W,J,se,Y(oe));var fe=oe(H,se,F,W,J+"."+se,r);if(fe)return fe}return null}return x(re)}function j(U){function re(ae,le,F,W,J){var H=ae[le],K=B(H);if(K!=="object")return new y("Invalid "+W+" `"+J+"` of type `"+K+"` "+("supplied to `"+F+"`, expected `object`."));var se=t({},ae[le],U);for(var oe in se){var fe=U[oe];if(n(U,oe)&&typeof fe!="function")return L(F,W,J,oe,Y(fe));if(!fe)return new y("Invalid "+W+" `"+J+"` key `"+oe+"` supplied to `"+F+"`.\nBad object: "+JSON.stringify(ae[le],null," ")+`
|
|
29
|
+
Valid keys: `+JSON.stringify(Object.keys(U),null," "));var V=fe(H,oe,F,W,J+"."+oe,r);if(V)return V}return null}return x(re)}function D(U){switch(typeof U){case"number":case"string":case"undefined":return!0;case"boolean":return!U;case"object":if(Array.isArray(U))return U.every(D);if(U===null||u(U))return!0;var re=h(U);if(re){var ae=re.call(U),le;if(re!==U.entries){for(;!(le=ae.next()).done;)if(!D(le.value))return!1}else for(;!(le=ae.next()).done;){var F=le.value;if(F&&!D(F[1]))return!1}}else return!1;return!0;default:return!1}}function G(U,re){return U==="symbol"?!0:re?re["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&re instanceof Symbol:!1}function B(U){var re=typeof U;return Array.isArray(U)?"array":U instanceof RegExp?"object":G(re,U)?"symbol":re}function Y(U){if(typeof U>"u"||U===null)return""+U;var re=B(U);if(re==="object"){if(U instanceof Date)return"date";if(U instanceof RegExp)return"regexp"}return re}function Z(U){var re=Y(U);switch(re){case"array":case"object":return"an "+re;case"boolean":case"date":case"regexp":return"a "+re;default:return re}}function te(U){return!U.constructor||!U.constructor.name?p:U.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},Um}var Wm,wN;function XX(){if(wN)return Wm;wN=1;var e=tw();function t(){}function r(){}return r.resetWarningCache=t,Wm=function(){function n(a,u,l,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},Wm}var _N;function ZX(){if(_N)return xu.exports;if(_N=1,process.env.NODE_ENV!=="production"){var e=kq(),t=!0;xu.exports=YX()(e.isElement,t)}else xu.exports=XX()();return xu.exports}var JX=ZX();const he=Vn(JX);var _u={exports:{}},Je={};/** @license React v17.0.2
|
|
30
30
|
* react-is.production.min.js
|
|
31
31
|
*
|
|
32
32
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/var
|
|
36
|
+
*/var EN;function QX(){if(EN)return Je;EN=1;var e=60103,t=60106,r=60107,n=60108,i=60114,o=60109,a=60110,u=60112,l=60113,d=60120,f=60115,h=60116,p=60121,v=60122,m=60117,y=60129,x=60131;if(typeof Symbol=="function"&&Symbol.for){var b=Symbol.for;e=b("react.element"),t=b("react.portal"),r=b("react.fragment"),n=b("react.strict_mode"),i=b("react.profiler"),o=b("react.provider"),a=b("react.context"),u=b("react.forward_ref"),l=b("react.suspense"),d=b("react.suspense_list"),f=b("react.memo"),h=b("react.lazy"),p=b("react.block"),v=b("react.server.block"),m=b("react.fundamental"),y=b("react.debug_trace_mode"),x=b("react.legacy_hidden")}function w(j){if(typeof j=="object"&&j!==null){var D=j.$$typeof;switch(D){case e:switch(j=j.type,j){case r:case i:case n:case l:case d:return j;default:switch(j=j&&j.$$typeof,j){case a:case u:case h:case f:case o:return j;default:return D}}case t:return D}}}var E=o,_=e,S=u,R=r,I=h,P=f,A=t,k=i,L=n,$=l;return Je.ContextConsumer=a,Je.ContextProvider=E,Je.Element=_,Je.ForwardRef=S,Je.Fragment=R,Je.Lazy=I,Je.Memo=P,Je.Portal=A,Je.Profiler=k,Je.StrictMode=L,Je.Suspense=$,Je.isAsyncMode=function(){return!1},Je.isConcurrentMode=function(){return!1},Je.isContextConsumer=function(j){return w(j)===a},Je.isContextProvider=function(j){return w(j)===o},Je.isElement=function(j){return typeof j=="object"&&j!==null&&j.$$typeof===e},Je.isForwardRef=function(j){return w(j)===u},Je.isFragment=function(j){return w(j)===r},Je.isLazy=function(j){return w(j)===h},Je.isMemo=function(j){return w(j)===f},Je.isPortal=function(j){return w(j)===t},Je.isProfiler=function(j){return w(j)===i},Je.isStrictMode=function(j){return w(j)===n},Je.isSuspense=function(j){return w(j)===l},Je.isValidElementType=function(j){return typeof j=="string"||typeof j=="function"||j===r||j===i||j===y||j===n||j===l||j===d||j===x||typeof j=="object"&&j!==null&&(j.$$typeof===h||j.$$typeof===f||j.$$typeof===o||j.$$typeof===a||j.$$typeof===u||j.$$typeof===m||j.$$typeof===p||j[0]===v)},Je.typeOf=w,Je}var Qe={};/** @license React v17.0.2
|
|
37
37
|
* react-is.development.js
|
|
38
38
|
*
|
|
39
39
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
40
40
|
*
|
|
41
41
|
* This source code is licensed under the MIT license found in the
|
|
42
42
|
* LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/var xN;function GX(){return xN||(xN=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,x=60131;if(typeof Symbol=="function"&&Symbol.for){var b=Symbol.for;e=b("react.element"),t=b("react.portal"),r=b("react.fragment"),n=b("react.strict_mode"),i=b("react.profiler"),o=b("react.provider"),a=b("react.context"),u=b("react.forward_ref"),c=b("react.suspense"),d=b("react.suspense_list"),f=b("react.memo"),h=b("react.lazy"),p=b("react.block"),v=b("react.server.block"),m=b("react.fundamental"),b("react.scope"),b("react.opaque.id"),y=b("react.debug_trace_mode"),b("react.offscreen"),x=b("react.legacy_hidden")}var w=!1;function E(se){return!!(typeof se=="string"||typeof se=="function"||se===r||se===i||se===y||se===n||se===c||se===d||se===x||w||typeof se=="object"&&se!==null&&(se.$$typeof===h||se.$$typeof===f||se.$$typeof===o||se.$$typeof===a||se.$$typeof===u||se.$$typeof===m||se.$$typeof===p||se[0]===v))}function _(se){if(typeof se=="object"&&se!==null){var ce=se.$$typeof;switch(ce){case e:var be=se.type;switch(be){case r:case i:case n:case c:case d:return be;default:var Ce=be&&be.$$typeof;switch(Ce){case a:case u:case h:case f:case o:return Ce;default:return ce}}case t:return ce}}}var S=a,R=o,I=e,N=u,A=r,L=h,B=f,U=t,j=i,D=n,G=c,F=!1,X=!1;function Z(se){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Q(se){return X||(X=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function V(se){return _(se)===a}function ee(se){return _(se)===o}function oe(se){return typeof se=="object"&&se!==null&&se.$$typeof===e}function ae(se){return _(se)===u}function H(se){return _(se)===r}function K(se){return _(se)===h}function $(se){return _(se)===f}function k(se){return _(se)===t}function z(se){return _(se)===i}function re(se){return _(se)===n}function ie(se){return _(se)===c}Qe.ContextConsumer=S,Qe.ContextProvider=R,Qe.Element=I,Qe.ForwardRef=N,Qe.Fragment=A,Qe.Lazy=L,Qe.Memo=B,Qe.Portal=U,Qe.Profiler=j,Qe.StrictMode=D,Qe.Suspense=G,Qe.isAsyncMode=Z,Qe.isConcurrentMode=Q,Qe.isContextConsumer=V,Qe.isContextProvider=ee,Qe.isElement=oe,Qe.isForwardRef=ae,Qe.isFragment=H,Qe.isLazy=K,Qe.isMemo=$,Qe.isPortal=k,Qe.isProfiler=z,Qe.isStrictMode=re,Qe.isSuspense=ie,Qe.isValidElementType=E,Qe.typeOf=_})()),Qe}var wN;function KX(){return wN||(wN=1,process.env.NODE_ENV==="production"?yu.exports=VX():yu.exports=GX()),yu.exports}var _N=KX();function EN(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function SN(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function zm(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return SN(r.overflowY,t)||SN(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 bu(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 YX=function(e,t){var r=window,n=t.inline,i=t.boundary,o=t.skipOverflowHiddenElements,a=typeof i=="function"?i:function(ce){return ce!==i};if(!EN(e))throw new TypeError("Invalid target");for(var u,c,d=document.scrollingElement||document.documentElement,f=[],h=e;EN(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&&zm(h)&&!zm(document.documentElement)||h!=null&&zm(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,x=e.getBoundingClientRect(),b=x.height,w=x.width,E=x.top,_=x.right,S=x.bottom,R=x.left,I=E,N=n==="center"?R+w/2:n==="end"?_:R,A=[],L=0;L<f.length;L++){var B=f[L],U=B.getBoundingClientRect(),j=U.height,D=U.width,G=U.top,F=U.right,X=U.bottom,Z=U.left;if(E>=0&&R>=0&&S<=v&&_<=p&&E>=G&&S<=X&&R>=Z&&_<=F)return A;var Q=getComputedStyle(B),V=parseInt(Q.borderLeftWidth,10),ee=parseInt(Q.borderTopWidth,10),oe=parseInt(Q.borderRightWidth,10),ae=parseInt(Q.borderBottomWidth,10),H=0,K=0,$="offsetWidth"in B?B.offsetWidth-B.clientWidth-V-oe:0,k="offsetHeight"in B?B.offsetHeight-B.clientHeight-ee-ae:0,z="offsetWidth"in B?B.offsetWidth===0?0:D/B.offsetWidth:0,re="offsetHeight"in B?B.offsetHeight===0?0:j/B.offsetHeight:0;if(d===B)H=bu(y,y+v,v,ee,ae,y+I,y+I+b,b),K=n==="start"?N:n==="center"?N-p/2:n==="end"?N-p:bu(m,m+p,p,V,oe,m+N,m+N+w,w),H=Math.max(0,H+y),K=Math.max(0,K+m);else{H=bu(G,X,j,ee,ae+k,I,I+b,b),K=n==="start"?N-Z-V:n==="center"?N-(Z+D/2)+$/2:n==="end"?N-F+oe+$:bu(Z,F,D,V,oe+$,N,N+w,w);var ie=B.scrollLeft,se=B.scrollTop;I+=se-(H=Math.max(0,Math.min(se+H/re,B.scrollHeight-j/re+k))),N+=ie-(K=Math.max(0,Math.min(ie+K/z,B.scrollWidth-D/z+$)))}A.push({el:B,top:H,left:K})}return A},nc=function(){return nc=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},nc.apply(this,arguments)};let XX=0;function ON(e){return typeof e=="function"?e:xr}function xr(){}function Tq(e,t){if(!e)return;YX(e,{boundary:t}).forEach(n=>{let{el:i,top:o,left:a}=n;i.scrollTop=o,i.scrollLeft=a})}function CN(e,t,r){return e===t||t instanceof r.Node&&e.contains&&e.contains(t)}function Jx(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 Rt(){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 ci(){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 Aq(){return String(XX++)}function Mq(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 RN(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function Dq(e){return typeof e.type=="string"}function jq(e){return e.props}function ZX(e,t){console.error(`The property "${t}" is required in "${e}"`)}const JX=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function xu(e){e===void 0&&(e={});const t={};return JX.forEach(r=>{e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function ic(e,t){return Object.keys(e).reduce((r,n)=>(r[n]=oc(t,n)?t[n]:e[n],r),{})}function oc(e,t){return e[t]!==void 0}function Yb(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 fo(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=_i(e,a,r,n,i);return u===-1?t>=r?-1:t:u}function _i(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?_i(1,0,r,n,!1):_i(-1,r-1,r,n,!1):-1}function ac(e,t,r,n){return n===void 0&&(n=!0),t.some(i=>i&&(CN(i,e,r)||n&&CN(i,r.document.activeElement,r)))}let Qx=xr;process.env.NODE_ENV!=="production"&&(Qx=(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 eZ=Jx(e=>{kq(e).textContent=""},500);function qq(e,t){const r=kq(t);e&&(r.textContent=e,eZ(t))}function kq(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 Lq=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,Bq=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,Fq=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,Mu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Du=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,$q=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,zq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,Hq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Uq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,Wq=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,Vq=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Gq=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,Kq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,Xb=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,Yq=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Xq=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,Zq=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16;var tZ=Object.freeze({__proto__:null,unknown:Lq,mouseUp:Bq,itemMouseEnter:Fq,keyDownArrowUp:Mu,keyDownArrowDown:Du,keyDownEscape:$q,keyDownEnter:zq,keyDownHome:Hq,keyDownEnd:Uq,clickItem:Wq,blurInput:Vq,changeInput:Gq,keyDownSpaceButton:Kq,clickButton:Xb,blurButton:Yq,controlledPropUpdatedSelectedItem:Xq,touchEnd:Zq});const rZ=(()=>{class e extends T.Component{constructor(r){var n;super(r),n=this,this.id=this.props.id||`downshift-${Aq()}`,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=xu(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=xu(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={},x=typeof h=="function";return!x&&h.hasOwnProperty("inputValue")&&this.props.onInputValueChange(h.inputValue,{...this.getStateAndHelpers(),...h}),this.setState(b=>{b=this.getState(b);let w=x?h(b):h;w=this.props.stateReducer(b,w),v=w.hasOwnProperty("selectedItem");const E={};return v&&w.selectedItem!==b.selectedItem&&(m=w.selectedItem),w.type=w.type||Lq,Object.keys(w).forEach(_=>{b[_]!==w[_]&&(y[_]=w[_]),_!=="type"&&(w[_],oc(this.props,_)||(E[_]=w[_]))}),x&&w.hasOwnProperty("inputValue")&&this.props.onInputValueChange(w.inputValue,{...this.getStateAndHelpers(),...w}),E},()=>{ON(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:x=!1}=p===void 0?{}:p;n.getRootProps.called=!0,n.getRootProps.refKey=v,n.getRootProps.suppressRefError=x;const{isOpen:b}=n.getState();return{[v]:ci(m,n.rootRef),role:"combobox","aria-expanded":b,"aria-haspopup":"listbox","aria-owns":b?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:Du})}else this.internalSetState({isOpen:!0,type:Du},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=fo(1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:Du})}})},ArrowUp(h){if(h.preventDefault(),this.getState().isOpen){const p=h.shiftKey?-5:-1;this.moveHighlightedIndex(p,{type:Mu})}else this.internalSetState({isOpen:!0,type:Mu},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=fo(-1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:Mu})}})},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:zq})}},Escape(h){h.preventDefault(),this.reset({type:$q,...!this.state.isOpen&&{selectedItem:null,inputValue:""}})}},this.buttonKeyDownHandlers={...this.keyDownHandlers," "(h){h.preventDefault(),this.toggleMenu({type:Kq})}},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=_i(1,0,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:Hq})},End(h){const{isOpen:p}=this.getState();if(!p)return;h.preventDefault();const v=this.getItemCount();if(v<=0||!p)return;const m=_i(-1,v-1,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:Uq})}},this.getToggleButtonProps=function(h){let{onClick:p,onPress:v,onKeyDown:m,onKeyUp:y,onBlur:x,...b}=h===void 0?{}:h;const{isOpen:w}=n.getState(),E={onClick:Rt(p,n.buttonHandleClick),onKeyDown:Rt(m,n.buttonHandleKeyDown),onKeyUp:Rt(y,n.buttonHandleKeyUp),onBlur:Rt(x,n.buttonHandleBlur)},_=b.disabled?{}:E;return{type:"button",role:"button","aria-label":w?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0,..._,...b}},this.buttonHandleKeyUp=h=>{h.preventDefault()},this.buttonHandleKeyDown=h=>{const p=Yb(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:Xb}):this.internalSetTimeout(()=>this.toggleMenu({type:Xb}))},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:Yq})})},this.getLabelProps=h=>({htmlFor:this.inputId,id:this.labelId,...h}),this.getInputProps=function(h){let{onKeyDown:p,onBlur:v,onChange:m,onInput:y,onChangeText:x,...b}=h===void 0?{}:h,w,E={};w="onChange";const{inputValue:_,isOpen:S,highlightedIndex:R}=n.getState();return b.disabled||(E={[w]:Rt(m,y,n.inputHandleChange),onKeyDown:Rt(p,n.inputHandleKeyDown),onBlur:Rt(v,n.inputHandleBlur)}),{"aria-autocomplete":"list","aria-activedescendant":S&&typeof R=="number"&&R>=0?n.getItemId(R):null,"aria-controls":S?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:_,id:n.inputId,...E,...b}},this.inputHandleKeyDown=h=>{const p=Yb(h);p&&this.inputKeyDownHandlers[p]&&this.inputKeyDownHandlers[p].call(this,h)},this.inputHandleChange=h=>{this.internalSetState({type:Gq,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:Vq})})},this.menuRef=h=>{this._menuNode=h},this.getMenuProps=function(h,p){let{refKey:v="ref",ref:m,...y}=h===void 0?{}:h,{suppressRefError:x=!1}=p===void 0?{}:p;return n.getMenuProps.called=!0,n.getMenuProps.refKey=v,n.getMenuProps.suppressRefError=x,{[v]:ci(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:x,item:b=process.env.NODE_ENV==="production"?void 0:ZX("getItemProps","item"),...w}=h===void 0?{}:h;x===void 0?(n.items.push(b),x=n.items.indexOf(b)):n.items[x]=b;const E="onClick",_=m,S={onMouseMove:Rt(p,()=>{x!==n.getState().highlightedIndex&&(n.setHighlightedIndex(x,{type:Fq}),n.avoidScrolling=!0,n.internalSetTimeout(()=>n.avoidScrolling=!1,250))}),onMouseDown:Rt(v,I=>{I.preventDefault()}),[E]:Rt(_,()=>{n.selectItemAtIndex(x,{type:Wq})})},R=w.disabled?{onMouseDown:S.onMouseDown}:S;return{id:n.getItemId(x),role:"option","aria-selected":n.getState().highlightedIndex===x,...R,...w}},this.clearItems=()=>{this.items=[]},this.reset=function(h,p){h===void 0&&(h={}),h=xu(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=xu(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),ON(p)()})},this.openMenu=h=>{this.internalSetState({isOpen:!0},h)},this.closeMenu=h=>{this.internalSetState({isOpen:!1},h)},this.updateStatus=Jx(()=>{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,qq(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),ic(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=fo(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:x,selectItem:b,selectItemAtIndex:w,selectHighlightedItem:E,setHighlightedIndex:_,clearSelection:S,clearItems:R,reset:I,setItemCount:N,unsetItemCount:A,internalSetState:L}=this;return{getRootProps:c,getToggleButtonProps:d,getLabelProps:f,getMenuProps:h,getInputProps:p,getItemProps:v,reset:I,openMenu:m,closeMenu:y,toggleMenu:x,selectItem:b,selectItemAtIndex:w,selectHighlightedItem:E,setHighlightedIndex:_,clearSelection:S,clearItems:R,setItemCount:N,unsetItemCount:A,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&&IN(this._menuNode,this.getMenuProps);{const r=()=>{this.isMouseDown=!0},n=c=>{this.isMouseDown=!1,!ac(c.target,[this._rootNode,this._menuNode],this.props.environment)&&this.getState().isOpen&&this.reset({type:Bq},()=>this.props.onOuterClick(this.getStateAndHelpers()))},i=()=>{this.isTouchMove=!1},o=()=>{this.isTouchMove=!0},a=c=>{const d=ac(c.target,[this._rootNode,this._menuNode],this.props.environment,!1);!this.isTouchMove&&!d&&this.getState().isOpen&&this.reset({type:Zq},()=>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"&&(Qx(this.state,r,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&IN(this._menuNode,this.getMenuProps)),oc(this.props,"selectedItem")&&this.props.selectedItemChanged(r.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Xq,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(n,r)&&this.scrollHighlightedItemIntoView(),this.updateStatus()}componentWillUnmount(){this.cleanup()}render(){const r=RN(this.props.children,xr);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=RN(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&&nZ(n,this.getRootProps),n;if(Dq(n))return T.cloneElement(n,this.getRootProps(jq(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:Mq,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:xr,onInputValueChange:xr,onUserAction:xr,onChange:xr,onSelect:xr,onOuterClick:xr,selectedItemChanged:(t,r)=>t!==r,environment:typeof window>"u"?{}:window,stateReducer:(t,r)=>r,suppressRefError:!1,scrollIntoView:Tq},e.stateChangeTypes=tZ,e})();process.env.NODE_ENV!=="production"&&(rZ.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 IN(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 nZ(e,t){let{refKey:r}=t;const n=r!=="ref",i=!Dq(e);i&&!n&&!_N.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}"`),!_N.isForwardRef(e)&&!jq(e)[r]&&console.error(`downshift: You must apply the ref prop "${r}" from getRootProps onto your root element.`)}const Jq={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function iZ(e,t,r){const{props:n,type:i}=e,o={};Object.keys(t).forEach(a=>{oZ(a,e,t,r),r[a]!==t[a]&&(o[a]=r[a])}),n.onStateChange&&Object.keys(o).length&&n.onStateChange({type:i,...o})}function oZ(e,t,r,n){const{props:i,type:o}=t,a=`on${ew(e)}Change`;i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a]({type:o,...n})}function aZ(e,t){return t.changes}function sZ(e){const{selectedItem:t,itemToString:r}=e;return t?`${r(t)} has been selected.`:""}const uZ=Jx((e,t)=>{qq(e(),t)},200),cZ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?T.useLayoutEffect:T.useEffect;function lZ(e){let{id:t=`downshift-${Aq()}`,labelId:r,menuId:n,getItemId:i,toggleButtonId:o,inputId:a}=e;return T.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 fZ(e,t,r){return e!==void 0?e:r.length===0?-1:r.indexOf(t)}function dZ(e){return e?String(e):""}function ew(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function Qq(e){const t=T.useRef(e);return t.current=e,t}function hZ(e,t,r){const n=T.useRef(),i=T.useRef(),o=T.useCallback((h,p)=>{i.current=p,h=ic(h,p.props);const v=e(h,p);return p.props.stateReducer(h,{...p,changes:v})},[e]),[a,u]=T.useReducer(o,t),c=Qq(r),d=T.useCallback(h=>u({props:c.current,...h}),[c]),f=i.current;return T.useEffect(()=>{f&&n.current&&n.current!==a&&iZ(f,ic(n.current,f.props),a),n.current=a},[a,r,f]),[a,d]}const Ma={itemToString:dZ,stateReducer:aZ,getA11ySelectionMessage:sZ,scrollIntoView:Tq,circularNavigation:!1,environment:typeof window>"u"?{}:window};function Jr(e,t,r){r===void 0&&(r=Jq);const n=e[`default${ew(t)}`];return n!==void 0?n:r[t]}function wu(e,t,r){r===void 0&&(r=Jq);const n=e[t];if(n!==void 0)return n;const i=e[`initial${ew(t)}`];return i!==void 0?i:Jr(e,t,r)}function pZ(e){const t=wu(e,"selectedItem"),r=wu(e,"isOpen"),n=wu(e,"highlightedIndex"),i=wu(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.indexOf(t):n,isOpen:r,selectedItem:t,inputValue:i}}function sc(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):fo(r,i.indexOf(u),i.length,n,!1):r===0?-1:r<0?i.length-1:0}function vZ(e,t,r,n){const i=T.useRef({isMouseDown:!1,isTouchMove:!1});return T.useEffect(()=>{const o=()=>{i.current.isMouseDown=!0},a=f=>{i.current.isMouseDown=!1,e&&!ac(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&&!ac(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 ek=()=>xr;process.env.NODE_ENV!=="production"&&(ek=function(){const e=T.useRef(!0);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const i=T.useRef(r.reduce((a,u)=>(a[u]={},a),{}));return T.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}),T.useCallback((a,u,c,d)=>{i.current[a]={suppressRefError:u,refKey:c,elementRef:d}},[])});function PN(e,t,r){let{isInitialMount:n,highlightedIndex:i,items:o,environment:a,...u}=r;T.useEffect(()=>{n||uZ(()=>e({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length,...u}),a.document)},t)}function gZ(e){let{highlightedIndex:t,isOpen:r,itemRefs:n,getItemNodeFromIndex:i,menuElement:o,scrollIntoView:a}=e;const u=T.useRef(!0);return cZ(()=>{t<0||!r||!Object.keys(n.current).length||(u.current===!1?u.current=!0:a(i(t),o))},[t]),u}let tk=xr;process.env.NODE_ENV!=="production"&&(tk=e=>{let{isInitialMount:t,props:r,state:n}=e;const i=T.useRef(r);T.useEffect(()=>{t||(Qx(n,i.current,r),i.current=r)},[n,r,t])});function mZ(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:sc(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:sc(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:Jr(i,"highlightedIndex"),isOpen:Jr(i,"isOpen"),selectedItem:Jr(i,"selectedItem"),inputValue:Jr(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 yZ(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.":""}nc(nc({},Ma),{getA11yStatusMessage:yZ});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 tw=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,rw=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,nw=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,iw=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,ow=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,aw=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":5,sw=process.env.NODE_ENV!=="production"?"__input_change__":6,uc=process.env.NODE_ENV!=="production"?"__input_blur__":7,rk=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":8,nk=process.env.NODE_ENV!=="production"?"__item_mouse_move__":9,uw=process.env.NODE_ENV!=="production"?"__item_click__":10,ik=process.env.NODE_ENV!=="production"?"__togglebutton_click__":11,ok=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":12,ak=process.env.NODE_ENV!=="production"?"__function_open_menu__":13,sk=process.env.NODE_ENV!=="production"?"__function_close_menu__":14,uk=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":15,cw=process.env.NODE_ENV!=="production"?"__function_select_item__":16,ck=process.env.NODE_ENV!=="production"?"__function_set_input_value__":17,lk=process.env.NODE_ENV!=="production"?"__function_reset__":18,lw=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":19;var fk=Object.freeze({__proto__:null,InputKeyDownArrowDown:tw,InputKeyDownArrowUp:rw,InputKeyDownEscape:nw,InputKeyDownHome:iw,InputKeyDownEnd:ow,InputKeyDownEnter:aw,InputChange:sw,InputBlur:uc,MenuMouseLeave:rk,ItemMouseMove:nk,ItemClick:uw,ToggleButtonClick:ik,FunctionToggleMenu:ok,FunctionOpenMenu:ak,FunctionCloseMenu:sk,FunctionSetHighlightedIndex:uk,FunctionSelectItem:cw,FunctionSetInputValue:ck,FunctionReset:lk,ControlledPropUpdatedSelectedItem:lw});function bZ(e){const t=pZ(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 xZ={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 wZ(e,t,r){const n=T.useRef(),[i,o]=hZ(e,t,r);return T.useEffect(()=>{oc(r,"selectedItem")&&(n.current!==r.selectedItem&&o({type:lw,inputValue:r.itemToString(r.selectedItem)}),n.current=i.selectedItem===n.current?r.selectedItem:i.selectedItem)}),[ic(i,r),o]}let dk=xr;process.env.NODE_ENV!=="production"&&(dk=(e,t)=>{le.checkPropTypes(xZ,e,"prop",t.name)});const _Z={...Ma,getA11yStatusMessage:Mq,circularNavigation:!0};function EZ(e,t){const{type:r,props:n,shiftKey:i}=t;let o;switch(r){case uw:o={isOpen:Jr(n,"isOpen"),highlightedIndex:Jr(n,"highlightedIndex"),selectedItem:n.items[t.index],inputValue:n.itemToString(n.items[t.index])};break;case tw:e.isOpen?o={highlightedIndex:fo(i?5:1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:sc(n,e,1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case rw:e.isOpen?o={highlightedIndex:fo(i?-5:-1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:sc(n,e,-1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case aw:o={...e.isOpen&&e.highlightedIndex>=0&&{selectedItem:n.items[e.highlightedIndex],isOpen:Jr(n,"isOpen"),highlightedIndex:Jr(n,"highlightedIndex"),inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case nw:o={isOpen:!1,highlightedIndex:-1,...!e.isOpen&&{selectedItem:null,inputValue:""}};break;case iw:o={highlightedIndex:_i(1,0,n.items.length,t.getItemNodeFromIndex,!1)};break;case ow:o={highlightedIndex:_i(-1,n.items.length-1,n.items.length,t.getItemNodeFromIndex,!1)};break;case uc:o={isOpen:!1,highlightedIndex:-1,...e.highlightedIndex>=0&&t.selectItem&&{selectedItem:n.items[e.highlightedIndex],inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case sw:o={isOpen:!0,highlightedIndex:Jr(n,"highlightedIndex"),inputValue:t.inputValue};break;case cw:o={selectedItem:t.selectedItem,inputValue:n.itemToString(t.selectedItem)};break;case lw:o={inputValue:t.inputValue};break;default:return mZ(e,t,fk)}return{...e,...o}}oo.stateChangeTypes=fk;function oo(e){e===void 0&&(e={}),dk(e,oo);const t={..._Z,...e},{initialIsOpen:r,defaultIsOpen:n,items:i,scrollIntoView:o,environment:a,getA11yStatusMessage:u,getA11ySelectionMessage:c,itemToString:d}=t,f=bZ(t),[h,p]=wZ(EZ,f,t),{isOpen:v,highlightedIndex:m,selectedItem:y,inputValue:x}=h,b=T.useRef(null),w=T.useRef({}),E=T.useRef(null),_=T.useRef(null),S=T.useRef(null),R=T.useRef(!0),I=lZ(t),N=T.useRef(),A=Qq({state:h,props:t}),L=T.useCallback(z=>w.current[I.getItemId(z)],[I]);PN(u,[v,m,x,i],{isInitialMount:R.current,previousResultCount:N.current,items:i,environment:a,itemToString:d,...h}),PN(c,[y],{isInitialMount:R.current,previousResultCount:N.current,items:i,environment:a,itemToString:d,...h});const B=gZ({menuElement:b.current,highlightedIndex:m,isOpen:v,itemRefs:w,scrollIntoView:o,getItemNodeFromIndex:L});tk({isInitialMount:R.current,props:t,state:h}),T.useEffect(()=>{(r||n||v)&&E.current&&E.current.focus()},[]),T.useEffect(()=>{R.current||(N.current=i.length)});const U=vZ(v,[S,b,_],a,()=>{p({type:uc,selectItem:!1})}),j=ek("getInputProps","getComboboxProps","getMenuProps");T.useEffect(()=>{R.current=!1},[]),T.useEffect(()=>{v||(w.current={})},[v]);const D=T.useMemo(()=>({ArrowDown(z){z.preventDefault(),p({type:tw,shiftKey:z.shiftKey,getItemNodeFromIndex:L})},ArrowUp(z){z.preventDefault(),p({type:rw,shiftKey:z.shiftKey,getItemNodeFromIndex:L})},Home(z){A.current.state.isOpen&&(z.preventDefault(),p({type:iw,getItemNodeFromIndex:L}))},End(z){A.current.state.isOpen&&(z.preventDefault(),p({type:ow,getItemNodeFromIndex:L}))},Escape(z){const re=A.current.state;(re.isOpen||re.inputValue||re.selectedItem||re.highlightedIndex>-1)&&(z.preventDefault(),p({type:nw}))},Enter(z){const re=A.current.state;!re.isOpen||re.highlightedIndex<0||z.which===229||(z.preventDefault(),p({type:aw,getItemNodeFromIndex:L}))}}),[p,A,L]),G=T.useCallback(z=>({id:I.labelId,htmlFor:I.inputId,...z}),[I]),F=T.useCallback(function(z,re){let{onMouseLeave:ie,refKey:se="ref",ref:ce,...be}=z===void 0?{}:z,{suppressRefError:Ce=!1}=re===void 0?{}:re;return j("getMenuProps",Ce,se,b),{[se]:ci(ce,_e=>{b.current=_e}),id:I.menuId,role:"listbox","aria-labelledby":I.labelId,onMouseLeave:Rt(ie,()=>{p({type:rk})}),...be}},[p,j,I]),X=T.useCallback(function(z){let{item:re,index:ie,refKey:se="ref",ref:ce,onMouseMove:be,onMouseDown:Ce,onClick:_e,onPress:he,disabled:fe,...Ee}=z===void 0?{}:z;const{props:Pe,state:Ze}=A.current,ze=fZ(ie,re,Pe.items);if(ze<0)throw new Error("Pass either item or item index in getItemProps!");const Fe="onClick",Ue=_e,ct=()=>{ie!==Ze.highlightedIndex&&(B.current=!1,p({type:nk,index:ie,disabled:fe}))},lt=()=>{p({type:uw,index:ie})},mt=yt=>yt.preventDefault();return{[se]:ci(ce,yt=>{yt&&(w.current[I.getItemId(ze)]=yt)}),disabled:fe,role:"option","aria-selected":`${ze===Ze.highlightedIndex}`,id:I.getItemId(ze),...!fe&&{[Fe]:Rt(Ue,lt)},onMouseMove:Rt(be,ct),onMouseDown:Rt(Ce,mt),...Ee}},[p,A,B,I]),Z=T.useCallback(function(z){let{onClick:re,onPress:ie,refKey:se="ref",ref:ce,...be}=z===void 0?{}:z;const Ce=()=>{p({type:ik}),!A.current.state.isOpen&&E.current&&E.current.focus()};return{[se]:ci(ce,_e=>{_.current=_e}),id:I.toggleButtonId,tabIndex:-1,...!be.disabled&&{onClick:Rt(re,Ce)},...be}},[p,A,I]),Q=T.useCallback(function(z,re){let{onKeyDown:ie,onChange:se,onInput:ce,onBlur:be,onChangeText:Ce,refKey:_e="ref",ref:he,...fe}=z===void 0?{}:z,{suppressRefError:Ee=!1}=re===void 0?{}:re;j("getInputProps",Ee,_e,E);const Pe=A.current.state,Ze=lt=>{const mt=Yb(lt);mt&&D[mt]&&D[mt](lt)},ze=lt=>{p({type:sw,inputValue:lt.target.value})},Fe=()=>{Pe.isOpen&&!U.current.isMouseDown&&p({type:uc,selectItem:!0})},Ue="onChange";let ct={};return fe.disabled||(ct={[Ue]:Rt(se,ce,ze),onKeyDown:Rt(ie,Ze),onBlur:Rt(be,Fe)}),{[_e]:ci(he,lt=>{E.current=lt}),id:I.inputId,"aria-autocomplete":"list","aria-controls":I.menuId,...Pe.isOpen&&Pe.highlightedIndex>-1&&{"aria-activedescendant":I.getItemId(Pe.highlightedIndex)},"aria-labelledby":I.labelId,autoComplete:"off",value:Pe.inputValue,...ct,...fe}},[p,D,A,U,j,I]),V=T.useCallback(function(z,re){let{refKey:ie="ref",ref:se,...ce}=z===void 0?{}:z,{suppressRefError:be=!1}=re===void 0?{}:re;return j("getComboboxProps",be,ie,S),{[ie]:ci(se,Ce=>{S.current=Ce}),role:"combobox","aria-haspopup":"listbox","aria-owns":I.menuId,"aria-expanded":A.current.state.isOpen,...ce}},[A,j,I]),ee=T.useCallback(()=>{p({type:ok})},[p]),oe=T.useCallback(()=>{p({type:sk})},[p]),ae=T.useCallback(()=>{p({type:ak})},[p]),H=T.useCallback(z=>{p({type:uk,highlightedIndex:z})},[p]),K=T.useCallback(z=>{p({type:cw,selectedItem:z})},[p]),$=T.useCallback(z=>{p({type:ck,inputValue:z})},[p]),k=T.useCallback(()=>{p({type:lk})},[p]);return{getItemProps:X,getLabelProps:G,getMenuProps:F,getInputProps:Q,getComboboxProps:V,getToggleButtonProps:Z,toggleMenu:ee,openMenu:ae,closeMenu:oe,setHighlightedIndex:H,setInputValue:$,selectItem:K,reset:k,highlightedIndex:m,isOpen:v,selectedItem:y,inputValue:x}}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})});Ma.itemToString,Ma.stateReducer,Ma.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 Pa={exports:{}};/**
|
|
43
|
+
*/var SN;function eZ(){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,l=60113,d=60120,f=60115,h=60116,p=60121,v=60122,m=60117,y=60129,x=60131;if(typeof Symbol=="function"&&Symbol.for){var b=Symbol.for;e=b("react.element"),t=b("react.portal"),r=b("react.fragment"),n=b("react.strict_mode"),i=b("react.profiler"),o=b("react.provider"),a=b("react.context"),u=b("react.forward_ref"),l=b("react.suspense"),d=b("react.suspense_list"),f=b("react.memo"),h=b("react.lazy"),p=b("react.block"),v=b("react.server.block"),m=b("react.fundamental"),b("react.scope"),b("react.opaque.id"),y=b("react.debug_trace_mode"),b("react.offscreen"),x=b("react.legacy_hidden")}var w=!1;function E(fe){return!!(typeof fe=="string"||typeof fe=="function"||fe===r||fe===i||fe===y||fe===n||fe===l||fe===d||fe===x||w||typeof fe=="object"&&fe!==null&&(fe.$$typeof===h||fe.$$typeof===f||fe.$$typeof===o||fe.$$typeof===a||fe.$$typeof===u||fe.$$typeof===m||fe.$$typeof===p||fe[0]===v))}function _(fe){if(typeof fe=="object"&&fe!==null){var V=fe.$$typeof;switch(V){case e:var ee=fe.type;switch(ee){case r:case i:case n:case l:case d:return ee;default:var we=ee&&ee.$$typeof;switch(we){case a:case u:case h:case f:case o:return we;default:return V}}case t:return V}}}var S=a,R=o,I=e,P=u,A=r,k=h,L=f,$=t,j=i,D=n,G=l,B=!1,Y=!1;function Z(fe){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function te(fe){return Y||(Y=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function U(fe){return _(fe)===a}function re(fe){return _(fe)===o}function ae(fe){return typeof fe=="object"&&fe!==null&&fe.$$typeof===e}function le(fe){return _(fe)===u}function F(fe){return _(fe)===r}function W(fe){return _(fe)===h}function J(fe){return _(fe)===f}function H(fe){return _(fe)===t}function K(fe){return _(fe)===i}function se(fe){return _(fe)===n}function oe(fe){return _(fe)===l}Qe.ContextConsumer=S,Qe.ContextProvider=R,Qe.Element=I,Qe.ForwardRef=P,Qe.Fragment=A,Qe.Lazy=k,Qe.Memo=L,Qe.Portal=$,Qe.Profiler=j,Qe.StrictMode=D,Qe.Suspense=G,Qe.isAsyncMode=Z,Qe.isConcurrentMode=te,Qe.isContextConsumer=U,Qe.isContextProvider=re,Qe.isElement=ae,Qe.isForwardRef=le,Qe.isFragment=F,Qe.isLazy=W,Qe.isMemo=J,Qe.isPortal=H,Qe.isProfiler=K,Qe.isStrictMode=se,Qe.isSuspense=oe,Qe.isValidElementType=E,Qe.typeOf=_})()),Qe}var ON;function tZ(){return ON||(ON=1,process.env.NODE_ENV==="production"?_u.exports=QX():_u.exports=eZ()),_u.exports}var CN=tZ();function RN(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function IN(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function Gm(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return IN(r.overflowY,t)||IN(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 Eu(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 rZ=function(e,t){var r=window,n=t.inline,i=t.boundary,o=t.skipOverflowHiddenElements,a=typeof i=="function"?i:function(V){return V!==i};if(!RN(e))throw new TypeError("Invalid target");for(var u,l,d=document.scrollingElement||document.documentElement,f=[],h=e;RN(h)&&a(h);){if((h=(l=(u=h).parentElement)==null?u.getRootNode().host||null:l)===d){f.push(h);break}h!=null&&h===document.body&&Gm(h)&&!Gm(document.documentElement)||h!=null&&Gm(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,x=e.getBoundingClientRect(),b=x.height,w=x.width,E=x.top,_=x.right,S=x.bottom,R=x.left,I=E,P=n==="center"?R+w/2:n==="end"?_:R,A=[],k=0;k<f.length;k++){var L=f[k],$=L.getBoundingClientRect(),j=$.height,D=$.width,G=$.top,B=$.right,Y=$.bottom,Z=$.left;if(E>=0&&R>=0&&S<=v&&_<=p&&E>=G&&S<=Y&&R>=Z&&_<=B)return A;var te=getComputedStyle(L),U=parseInt(te.borderLeftWidth,10),re=parseInt(te.borderTopWidth,10),ae=parseInt(te.borderRightWidth,10),le=parseInt(te.borderBottomWidth,10),F=0,W=0,J="offsetWidth"in L?L.offsetWidth-L.clientWidth-U-ae:0,H="offsetHeight"in L?L.offsetHeight-L.clientHeight-re-le:0,K="offsetWidth"in L?L.offsetWidth===0?0:D/L.offsetWidth:0,se="offsetHeight"in L?L.offsetHeight===0?0:j/L.offsetHeight:0;if(d===L)F=Eu(y,y+v,v,re,le,y+I,y+I+b,b),W=n==="start"?P:n==="center"?P-p/2:n==="end"?P-p:Eu(m,m+p,p,U,ae,m+P,m+P+w,w),F=Math.max(0,F+y),W=Math.max(0,W+m);else{F=Eu(G,Y,j,re,le+H,I,I+b,b),W=n==="start"?P-Z-U:n==="center"?P-(Z+D/2)+J/2:n==="end"?P-B+ae+J:Eu(Z,B,D,U,ae+J,P,P+w,w);var oe=L.scrollLeft,fe=L.scrollTop;I+=fe-(F=Math.max(0,Math.min(fe+F/se,L.scrollHeight-j/se+H))),P+=oe-(W=Math.max(0,Math.min(oe+W/K,L.scrollWidth-D/K+J)))}A.push({el:L,top:F,left:W})}return A},sl=function(){return sl=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},sl.apply(this,arguments)};let nZ=0;function PN(e){return typeof e=="function"?e:xr}function xr(){}function Bq(e,t){if(!e)return;rZ(e,{boundary:t}).forEach(n=>{let{el:i,top:o,left:a}=n;i.scrollTop=o,i.scrollLeft=a})}function NN(e,t,r){return e===t||t instanceof r.Node&&e.contains&&e.contains(t)}function rw(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 Rt(){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 fi(){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 Fq(){return String(nZ++)}function $q(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 TN(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function zq(e){return typeof e.type=="string"}function Hq(e){return e.props}function iZ(e,t){console.error(`The property "${t}" is required in "${e}"`)}const oZ=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Su(e){e===void 0&&(e={});const t={};return oZ.forEach(r=>{e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function ul(e,t){return Object.keys(e).reduce((r,n)=>(r[n]=ll(t,n)?t[n]:e[n],r),{})}function ll(e,t){return e[t]!==void 0}function ex(e){const{key:t,keyCode:r}=e;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?`Arrow${t}`:t}function aZ(e){return Object.prototype.toString.call(e)==="[object Object]"}function go(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=Si(e,a,r,n,i);return u===-1?t>=r?-1:t:u}function Si(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?Si(1,0,r,n,!1):Si(-1,r-1,r,n,!1):-1}function cl(e,t,r,n){return n===void 0&&(n=!0),t.some(i=>i&&(NN(i,e,r)||n&&NN(i,r.document.activeElement,r)))}let nw=xr;process.env.NODE_ENV!=="production"&&(nw=(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 sZ=rw(e=>{Uq(e).textContent=""},500);function Vq(e,t){const r=Uq(t);e&&(r.textContent=e,sZ(t))}function Uq(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 Wq=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,Gq=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,Kq=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,ku=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Lu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,Yq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,Xq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,Zq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Jq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,Qq=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,ek=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,tk=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,rk=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,tx=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,nk=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,ik=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,ok=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16;var uZ=Object.freeze({__proto__:null,unknown:Wq,mouseUp:Gq,itemMouseEnter:Kq,keyDownArrowUp:ku,keyDownArrowDown:Lu,keyDownEscape:Yq,keyDownEnter:Xq,keyDownHome:Zq,keyDownEnd:Jq,clickItem:Qq,blurInput:ek,changeInput:tk,keyDownSpaceButton:rk,clickButton:tx,blurButton:nk,controlledPropUpdatedSelectedItem:ik,touchEnd:ok});const lZ=(()=>{class e extends T.Component{constructor(r){var n;super(r),n=this,this.id=this.props.id||`downshift-${Fq()}`,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=Su(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=Su(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={},x=typeof h=="function";return!x&&h.hasOwnProperty("inputValue")&&this.props.onInputValueChange(h.inputValue,{...this.getStateAndHelpers(),...h}),this.setState(b=>{b=this.getState(b);let w=x?h(b):h;w=this.props.stateReducer(b,w),v=w.hasOwnProperty("selectedItem");const E={};return v&&w.selectedItem!==b.selectedItem&&(m=w.selectedItem),w.type=w.type||Wq,Object.keys(w).forEach(_=>{b[_]!==w[_]&&(y[_]=w[_]),_!=="type"&&(w[_],ll(this.props,_)||(E[_]=w[_]))}),x&&w.hasOwnProperty("inputValue")&&this.props.onInputValueChange(w.inputValue,{...this.getStateAndHelpers(),...w}),E},()=>{PN(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:x=!1}=p===void 0?{}:p;n.getRootProps.called=!0,n.getRootProps.refKey=v,n.getRootProps.suppressRefError=x;const{isOpen:b}=n.getState();return{[v]:fi(m,n.rootRef),role:"combobox","aria-expanded":b,"aria-haspopup":"listbox","aria-owns":b?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:Lu})}else this.internalSetState({isOpen:!0,type:Lu},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=go(1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:Lu})}})},ArrowUp(h){if(h.preventDefault(),this.getState().isOpen){const p=h.shiftKey?-5:-1;this.moveHighlightedIndex(p,{type:ku})}else this.internalSetState({isOpen:!0,type:ku},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=go(-1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:ku})}})},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:Xq})}},Escape(h){h.preventDefault(),this.reset({type:Yq,...!this.state.isOpen&&{selectedItem:null,inputValue:""}})}},this.buttonKeyDownHandlers={...this.keyDownHandlers," "(h){h.preventDefault(),this.toggleMenu({type:rk})}},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=Si(1,0,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:Zq})},End(h){const{isOpen:p}=this.getState();if(!p)return;h.preventDefault();const v=this.getItemCount();if(v<=0||!p)return;const m=Si(-1,v-1,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:Jq})}},this.getToggleButtonProps=function(h){let{onClick:p,onPress:v,onKeyDown:m,onKeyUp:y,onBlur:x,...b}=h===void 0?{}:h;const{isOpen:w}=n.getState(),E={onClick:Rt(p,n.buttonHandleClick),onKeyDown:Rt(m,n.buttonHandleKeyDown),onKeyUp:Rt(y,n.buttonHandleKeyUp),onBlur:Rt(x,n.buttonHandleBlur)},_=b.disabled?{}:E;return{type:"button",role:"button","aria-label":w?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0,..._,...b}},this.buttonHandleKeyUp=h=>{h.preventDefault()},this.buttonHandleKeyDown=h=>{const p=ex(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:tx}):this.internalSetTimeout(()=>this.toggleMenu({type:tx}))},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:nk})})},this.getLabelProps=h=>({htmlFor:this.inputId,id:this.labelId,...h}),this.getInputProps=function(h){let{onKeyDown:p,onBlur:v,onChange:m,onInput:y,onChangeText:x,...b}=h===void 0?{}:h,w,E={};w="onChange";const{inputValue:_,isOpen:S,highlightedIndex:R}=n.getState();return b.disabled||(E={[w]:Rt(m,y,n.inputHandleChange),onKeyDown:Rt(p,n.inputHandleKeyDown),onBlur:Rt(v,n.inputHandleBlur)}),{"aria-autocomplete":"list","aria-activedescendant":S&&typeof R=="number"&&R>=0?n.getItemId(R):null,"aria-controls":S?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:_,id:n.inputId,...E,...b}},this.inputHandleKeyDown=h=>{const p=ex(h);p&&this.inputKeyDownHandlers[p]&&this.inputKeyDownHandlers[p].call(this,h)},this.inputHandleChange=h=>{this.internalSetState({type:tk,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:ek})})},this.menuRef=h=>{this._menuNode=h},this.getMenuProps=function(h,p){let{refKey:v="ref",ref:m,...y}=h===void 0?{}:h,{suppressRefError:x=!1}=p===void 0?{}:p;return n.getMenuProps.called=!0,n.getMenuProps.refKey=v,n.getMenuProps.suppressRefError=x,{[v]:fi(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:x,item:b=process.env.NODE_ENV==="production"?void 0:iZ("getItemProps","item"),...w}=h===void 0?{}:h;x===void 0?(n.items.push(b),x=n.items.indexOf(b)):n.items[x]=b;const E="onClick",_=m,S={onMouseMove:Rt(p,()=>{x!==n.getState().highlightedIndex&&(n.setHighlightedIndex(x,{type:Kq}),n.avoidScrolling=!0,n.internalSetTimeout(()=>n.avoidScrolling=!1,250))}),onMouseDown:Rt(v,I=>{I.preventDefault()}),[E]:Rt(_,()=>{n.selectItemAtIndex(x,{type:Qq})})},R=w.disabled?{onMouseDown:S.onMouseDown}:S;return{id:n.getItemId(x),role:"option","aria-selected":n.getState().highlightedIndex===x,...R,...w}},this.clearItems=()=>{this.items=[]},this.reset=function(h,p){h===void 0&&(h={}),h=Su(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=Su(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),PN(p)()})},this.openMenu=h=>{this.internalSetState({isOpen:!0},h)},this.closeMenu=h=>{this.internalSetState({isOpen:!1},h)},this.updateStatus=rw(()=>{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,Vq(m,this.props.environment.document)},200);const{defaultHighlightedIndex:i,initialHighlightedIndex:o=i,defaultIsOpen:a,initialIsOpen:u=a,initialInputValue:l="",initialSelectedItem:d=null}=this.props,f=this.getState({highlightedIndex:o,isOpen:u,inputValue:l,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),ul(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=go(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:l,getToggleButtonProps:d,getLabelProps:f,getMenuProps:h,getInputProps:p,getItemProps:v,openMenu:m,closeMenu:y,toggleMenu:x,selectItem:b,selectItemAtIndex:w,selectHighlightedItem:E,setHighlightedIndex:_,clearSelection:S,clearItems:R,reset:I,setItemCount:P,unsetItemCount:A,internalSetState:k}=this;return{getRootProps:l,getToggleButtonProps:d,getLabelProps:f,getMenuProps:h,getInputProps:p,getItemProps:v,reset:I,openMenu:m,closeMenu:y,toggleMenu:x,selectItem:b,selectItemAtIndex:w,selectHighlightedItem:E,setHighlightedIndex:_,clearSelection:S,clearItems:R,setItemCount:P,unsetItemCount:A,setState:k,itemToString:a,id:u,highlightedIndex:r,inputValue:n,isOpen:o,selectedItem:i}}componentDidMount(){process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&AN(this._menuNode,this.getMenuProps);{const r=()=>{this.isMouseDown=!0},n=l=>{this.isMouseDown=!1,!cl(l.target,[this._rootNode,this._menuNode],this.props.environment)&&this.getState().isOpen&&this.reset({type:Gq},()=>this.props.onOuterClick(this.getStateAndHelpers()))},i=()=>{this.isTouchMove=!1},o=()=>{this.isTouchMove=!0},a=l=>{const d=cl(l.target,[this._rootNode,this._menuNode],this.props.environment,!1);!this.isTouchMove&&!d&&this.getState().isOpen&&this.reset({type:ok},()=>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"&&(nw(this.state,r,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&AN(this._menuNode,this.getMenuProps)),ll(this.props,"selectedItem")&&this.props.selectedItemChanged(r.selectedItem,this.props.selectedItem)&&this.internalSetState({type:ik,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(n,r)&&this.scrollHighlightedItemIntoView(),this.updateStatus()}componentWillUnmount(){this.cleanup()}render(){const r=TN(this.props.children,xr);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=TN(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&&cZ(n,this.getRootProps),n;if(zq(n))return T.cloneElement(n,this.getRootProps(Hq(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:$q,itemToString:t=>t==null?"":(process.env.NODE_ENV!=="production"&&aZ(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:xr,onInputValueChange:xr,onUserAction:xr,onChange:xr,onSelect:xr,onOuterClick:xr,selectedItemChanged:(t,r)=>t!==r,environment:typeof window>"u"?{}:window,stateReducer:(t,r)=>r,suppressRefError:!1,scrollIntoView:Bq},e.stateChangeTypes=uZ,e})();process.env.NODE_ENV!=="production"&&(lZ.propTypes={children:he.func,defaultHighlightedIndex:he.number,defaultIsOpen:he.bool,initialHighlightedIndex:he.number,initialSelectedItem:he.any,initialInputValue:he.string,initialIsOpen:he.bool,getA11yStatusMessage:he.func,itemToString:he.func,onChange:he.func,onSelect:he.func,onStateChange:he.func,onInputValueChange:he.func,onUserAction:he.func,onOuterClick:he.func,selectedItemChanged:he.func,stateReducer:he.func,itemCount:he.number,id:he.string,environment:he.shape({addEventListener:he.func,removeEventListener:he.func,document:he.shape({getElementById:he.func,activeElement:he.any,body:he.any})}),suppressRefError:he.bool,scrollIntoView:he.func,selectedItem:he.any,isOpen:he.bool,inputValue:he.string,highlightedIndex:he.number,labelId:he.string,inputId:he.string,menuId:he.string,getItemId:he.func});function AN(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 cZ(e,t){let{refKey:r}=t;const n=r!=="ref",i=!zq(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)&&!Hq(e)[r]&&console.error(`downshift: You must apply the ref prop "${r}" from getRootProps onto your root element.`)}const ak={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function fZ(e,t,r){const{props:n,type:i}=e,o={};Object.keys(t).forEach(a=>{dZ(a,e,t,r),r[a]!==t[a]&&(o[a]=r[a])}),n.onStateChange&&Object.keys(o).length&&n.onStateChange({type:i,...o})}function dZ(e,t,r,n){const{props:i,type:o}=t,a=`on${iw(e)}Change`;i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a]({type:o,...n})}function hZ(e,t){return t.changes}function pZ(e){const{selectedItem:t,itemToString:r}=e;return t?`${r(t)} has been selected.`:""}const vZ=rw((e,t)=>{Vq(e(),t)},200),gZ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?T.useLayoutEffect:T.useEffect;function mZ(e){let{id:t=`downshift-${Fq()}`,labelId:r,menuId:n,getItemId:i,toggleButtonId:o,inputId:a}=e;return T.useRef({labelId:r||`${t}-label`,menuId:n||`${t}-menu`,getItemId:i||(l=>`${t}-item-${l}`),toggleButtonId:o||`${t}-toggle-button`,inputId:a||`${t}-input`}).current}function yZ(e,t,r){return e!==void 0?e:r.length===0?-1:r.indexOf(t)}function bZ(e){return e?String(e):""}function iw(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function sk(e){const t=T.useRef(e);return t.current=e,t}function xZ(e,t,r){const n=T.useRef(),i=T.useRef(),o=T.useCallback((h,p)=>{i.current=p,h=ul(h,p.props);const v=e(h,p);return p.props.stateReducer(h,{...p,changes:v})},[e]),[a,u]=T.useReducer(o,t),l=sk(r),d=T.useCallback(h=>u({props:l.current,...h}),[l]),f=i.current;return T.useEffect(()=>{f&&n.current&&n.current!==a&&fZ(f,ul(n.current,f.props),a),n.current=a},[a,r,f]),[a,d]}const qa={itemToString:bZ,stateReducer:hZ,getA11ySelectionMessage:pZ,scrollIntoView:Bq,circularNavigation:!1,environment:typeof window>"u"?{}:window};function Jr(e,t,r){r===void 0&&(r=ak);const n=e[`default${iw(t)}`];return n!==void 0?n:r[t]}function Ou(e,t,r){r===void 0&&(r=ak);const n=e[t];if(n!==void 0)return n;const i=e[`initial${iw(t)}`];return i!==void 0?i:Jr(e,t,r)}function wZ(e){const t=Ou(e,"selectedItem"),r=Ou(e,"isOpen"),n=Ou(e,"highlightedIndex"),i=Ou(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.indexOf(t):n,isOpen:r,selectedItem:t,inputValue:i}}function fl(e,t,r,n){const{items:i,initialHighlightedIndex:o,defaultHighlightedIndex:a}=e,{selectedItem:u,highlightedIndex:l}=t;return i.length===0?-1:o!==void 0&&l===o?o:a!==void 0?a:u?r===0?i.indexOf(u):go(r,i.indexOf(u),i.length,n,!1):r===0?-1:r<0?i.length-1:0}function _Z(e,t,r,n){const i=T.useRef({isMouseDown:!1,isTouchMove:!1});return T.useEffect(()=>{const o=()=>{i.current.isMouseDown=!0},a=f=>{i.current.isMouseDown=!1,e&&!cl(f.target,t.map(h=>h.current),r)&&n()},u=()=>{i.current.isTouchMove=!1},l=()=>{i.current.isTouchMove=!0},d=f=>{e&&!i.current.isTouchMove&&!cl(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",l),r.addEventListener("touchend",d),function(){r.removeEventListener("mousedown",o),r.removeEventListener("mouseup",a),r.removeEventListener("touchstart",u),r.removeEventListener("touchmove",l),r.removeEventListener("touchend",d)}},[e,r]),i}let uk=()=>xr;process.env.NODE_ENV!=="production"&&(uk=function(){const e=T.useRef(!0);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const i=T.useRef(r.reduce((a,u)=>(a[u]={},a),{}));return T.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:l,refKey:d,elementRef:f}=u;(!f||!f.current)&&!l&&console.error(`downshift: The ref prop "${d}" from ${a} was not applied correctly on your element.`)}),e.current=!1}),T.useCallback((a,u,l,d)=>{i.current[a]={suppressRefError:u,refKey:l,elementRef:d}},[])});function MN(e,t,r){let{isInitialMount:n,highlightedIndex:i,items:o,environment:a,...u}=r;T.useEffect(()=>{n||vZ(()=>e({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length,...u}),a.document)},t)}function EZ(e){let{highlightedIndex:t,isOpen:r,itemRefs:n,getItemNodeFromIndex:i,menuElement:o,scrollIntoView:a}=e;const u=T.useRef(!0);return gZ(()=>{t<0||!r||!Object.keys(n.current).length||(u.current===!1?u.current=!0:a(i(t),o))},[t]),u}let lk=xr;process.env.NODE_ENV!=="production"&&(lk=e=>{let{isInitialMount:t,props:r,state:n}=e;const i=T.useRef(r);T.useEffect(()=>{t||(nw(n,i.current,r),i.current=r)},[n,r,t])});function SZ(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:fl(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:fl(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:Jr(i,"highlightedIndex"),isOpen:Jr(i,"isOpen"),selectedItem:Jr(i,"selectedItem"),inputValue:Jr(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...o}}he.array.isRequired,he.func,he.func,he.func,he.bool,he.number,he.number,he.number,he.bool,he.bool,he.bool,he.any,he.any,he.any,he.string,he.string,he.string,he.func,he.string,he.func,he.func,he.func,he.func,he.func,he.shape({addEventListener:he.func,removeEventListener:he.func,document:he.shape({getElementById:he.func,activeElement:he.any,body:he.any})});function OZ(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.":""}sl(sl({},qa),{getA11yStatusMessage:OZ});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 ow=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,aw=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,sw=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,uw=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,lw=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,cw=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":5,fw=process.env.NODE_ENV!=="production"?"__input_change__":6,dl=process.env.NODE_ENV!=="production"?"__input_blur__":7,ck=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":8,fk=process.env.NODE_ENV!=="production"?"__item_mouse_move__":9,dw=process.env.NODE_ENV!=="production"?"__item_click__":10,dk=process.env.NODE_ENV!=="production"?"__togglebutton_click__":11,hk=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":12,pk=process.env.NODE_ENV!=="production"?"__function_open_menu__":13,vk=process.env.NODE_ENV!=="production"?"__function_close_menu__":14,gk=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":15,hw=process.env.NODE_ENV!=="production"?"__function_select_item__":16,mk=process.env.NODE_ENV!=="production"?"__function_set_input_value__":17,yk=process.env.NODE_ENV!=="production"?"__function_reset__":18,pw=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":19;var bk=Object.freeze({__proto__:null,InputKeyDownArrowDown:ow,InputKeyDownArrowUp:aw,InputKeyDownEscape:sw,InputKeyDownHome:uw,InputKeyDownEnd:lw,InputKeyDownEnter:cw,InputChange:fw,InputBlur:dl,MenuMouseLeave:ck,ItemMouseMove:fk,ItemClick:dw,ToggleButtonClick:dk,FunctionToggleMenu:hk,FunctionOpenMenu:pk,FunctionCloseMenu:vk,FunctionSetHighlightedIndex:gk,FunctionSelectItem:hw,FunctionSetInputValue:mk,FunctionReset:yk,ControlledPropUpdatedSelectedItem:pw});function CZ(e){const t=wZ(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 RZ={items:he.array.isRequired,itemToString:he.func,getA11yStatusMessage:he.func,getA11ySelectionMessage:he.func,circularNavigation:he.bool,highlightedIndex:he.number,defaultHighlightedIndex:he.number,initialHighlightedIndex:he.number,isOpen:he.bool,defaultIsOpen:he.bool,initialIsOpen:he.bool,selectedItem:he.any,initialSelectedItem:he.any,defaultSelectedItem:he.any,inputValue:he.string,defaultInputValue:he.string,initialInputValue:he.string,id:he.string,labelId:he.string,menuId:he.string,getItemId:he.func,inputId:he.string,toggleButtonId:he.string,stateReducer:he.func,onSelectedItemChange:he.func,onHighlightedIndexChange:he.func,onStateChange:he.func,onIsOpenChange:he.func,onInputValueChange:he.func,environment:he.shape({addEventListener:he.func,removeEventListener:he.func,document:he.shape({getElementById:he.func,activeElement:he.any,body:he.any})})};function IZ(e,t,r){const n=T.useRef(),[i,o]=xZ(e,t,r);return T.useEffect(()=>{ll(r,"selectedItem")&&(n.current!==r.selectedItem&&o({type:pw,inputValue:r.itemToString(r.selectedItem)}),n.current=i.selectedItem===n.current?r.selectedItem:i.selectedItem)}),[ul(i,r),o]}let xk=xr;process.env.NODE_ENV!=="production"&&(xk=(e,t)=>{he.checkPropTypes(RZ,e,"prop",t.name)});const PZ={...qa,getA11yStatusMessage:$q,circularNavigation:!0};function NZ(e,t){const{type:r,props:n,shiftKey:i}=t;let o;switch(r){case dw:o={isOpen:Jr(n,"isOpen"),highlightedIndex:Jr(n,"highlightedIndex"),selectedItem:n.items[t.index],inputValue:n.itemToString(n.items[t.index])};break;case ow:e.isOpen?o={highlightedIndex:go(i?5:1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:fl(n,e,1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case aw:e.isOpen?o={highlightedIndex:go(i?-5:-1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:fl(n,e,-1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case cw:o={...e.isOpen&&e.highlightedIndex>=0&&{selectedItem:n.items[e.highlightedIndex],isOpen:Jr(n,"isOpen"),highlightedIndex:Jr(n,"highlightedIndex"),inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case sw:o={isOpen:!1,highlightedIndex:-1,...!e.isOpen&&{selectedItem:null,inputValue:""}};break;case uw:o={highlightedIndex:Si(1,0,n.items.length,t.getItemNodeFromIndex,!1)};break;case lw:o={highlightedIndex:Si(-1,n.items.length-1,n.items.length,t.getItemNodeFromIndex,!1)};break;case dl:o={isOpen:!1,highlightedIndex:-1,...e.highlightedIndex>=0&&t.selectItem&&{selectedItem:n.items[e.highlightedIndex],inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case fw:o={isOpen:!0,highlightedIndex:Jr(n,"highlightedIndex"),inputValue:t.inputValue};break;case hw:o={selectedItem:t.selectedItem,inputValue:n.itemToString(t.selectedItem)};break;case pw:o={inputValue:t.inputValue};break;default:return SZ(e,t,bk)}return{...e,...o}}lo.stateChangeTypes=bk;function lo(e){e===void 0&&(e={}),xk(e,lo);const t={...PZ,...e},{initialIsOpen:r,defaultIsOpen:n,items:i,scrollIntoView:o,environment:a,getA11yStatusMessage:u,getA11ySelectionMessage:l,itemToString:d}=t,f=CZ(t),[h,p]=IZ(NZ,f,t),{isOpen:v,highlightedIndex:m,selectedItem:y,inputValue:x}=h,b=T.useRef(null),w=T.useRef({}),E=T.useRef(null),_=T.useRef(null),S=T.useRef(null),R=T.useRef(!0),I=mZ(t),P=T.useRef(),A=sk({state:h,props:t}),k=T.useCallback(K=>w.current[I.getItemId(K)],[I]);MN(u,[v,m,x,i],{isInitialMount:R.current,previousResultCount:P.current,items:i,environment:a,itemToString:d,...h}),MN(l,[y],{isInitialMount:R.current,previousResultCount:P.current,items:i,environment:a,itemToString:d,...h});const L=EZ({menuElement:b.current,highlightedIndex:m,isOpen:v,itemRefs:w,scrollIntoView:o,getItemNodeFromIndex:k});lk({isInitialMount:R.current,props:t,state:h}),T.useEffect(()=>{(r||n||v)&&E.current&&E.current.focus()},[]),T.useEffect(()=>{R.current||(P.current=i.length)});const $=_Z(v,[S,b,_],a,()=>{p({type:dl,selectItem:!1})}),j=uk("getInputProps","getComboboxProps","getMenuProps");T.useEffect(()=>{R.current=!1},[]),T.useEffect(()=>{v||(w.current={})},[v]);const D=T.useMemo(()=>({ArrowDown(K){K.preventDefault(),p({type:ow,shiftKey:K.shiftKey,getItemNodeFromIndex:k})},ArrowUp(K){K.preventDefault(),p({type:aw,shiftKey:K.shiftKey,getItemNodeFromIndex:k})},Home(K){A.current.state.isOpen&&(K.preventDefault(),p({type:uw,getItemNodeFromIndex:k}))},End(K){A.current.state.isOpen&&(K.preventDefault(),p({type:lw,getItemNodeFromIndex:k}))},Escape(K){const se=A.current.state;(se.isOpen||se.inputValue||se.selectedItem||se.highlightedIndex>-1)&&(K.preventDefault(),p({type:sw}))},Enter(K){const se=A.current.state;!se.isOpen||se.highlightedIndex<0||K.which===229||(K.preventDefault(),p({type:cw,getItemNodeFromIndex:k}))}}),[p,A,k]),G=T.useCallback(K=>({id:I.labelId,htmlFor:I.inputId,...K}),[I]),B=T.useCallback(function(K,se){let{onMouseLeave:oe,refKey:fe="ref",ref:V,...ee}=K===void 0?{}:K,{suppressRefError:we=!1}=se===void 0?{}:se;return j("getMenuProps",we,fe,b),{[fe]:fi(V,be=>{b.current=be}),id:I.menuId,role:"listbox","aria-labelledby":I.labelId,onMouseLeave:Rt(oe,()=>{p({type:ck})}),...ee}},[p,j,I]),Y=T.useCallback(function(K){let{item:se,index:oe,refKey:fe="ref",ref:V,onMouseMove:ee,onMouseDown:we,onClick:be,onPress:de,disabled:ue,...Ee}=K===void 0?{}:K;const{props:Pe,state:Ze}=A.current,ze=yZ(oe,se,Pe.items);if(ze<0)throw new Error("Pass either item or item index in getItemProps!");const Fe="onClick",Ve=be,lt=()=>{oe!==Ze.highlightedIndex&&(L.current=!1,p({type:fk,index:oe,disabled:ue}))},ct=()=>{p({type:dw,index:oe})},mt=yt=>yt.preventDefault();return{[fe]:fi(V,yt=>{yt&&(w.current[I.getItemId(ze)]=yt)}),disabled:ue,role:"option","aria-selected":`${ze===Ze.highlightedIndex}`,id:I.getItemId(ze),...!ue&&{[Fe]:Rt(Ve,ct)},onMouseMove:Rt(ee,lt),onMouseDown:Rt(we,mt),...Ee}},[p,A,L,I]),Z=T.useCallback(function(K){let{onClick:se,onPress:oe,refKey:fe="ref",ref:V,...ee}=K===void 0?{}:K;const we=()=>{p({type:dk}),!A.current.state.isOpen&&E.current&&E.current.focus()};return{[fe]:fi(V,be=>{_.current=be}),id:I.toggleButtonId,tabIndex:-1,...!ee.disabled&&{onClick:Rt(se,we)},...ee}},[p,A,I]),te=T.useCallback(function(K,se){let{onKeyDown:oe,onChange:fe,onInput:V,onBlur:ee,onChangeText:we,refKey:be="ref",ref:de,...ue}=K===void 0?{}:K,{suppressRefError:Ee=!1}=se===void 0?{}:se;j("getInputProps",Ee,be,E);const Pe=A.current.state,Ze=ct=>{const mt=ex(ct);mt&&D[mt]&&D[mt](ct)},ze=ct=>{p({type:fw,inputValue:ct.target.value})},Fe=()=>{Pe.isOpen&&!$.current.isMouseDown&&p({type:dl,selectItem:!0})},Ve="onChange";let lt={};return ue.disabled||(lt={[Ve]:Rt(fe,V,ze),onKeyDown:Rt(oe,Ze),onBlur:Rt(ee,Fe)}),{[be]:fi(de,ct=>{E.current=ct}),id:I.inputId,"aria-autocomplete":"list","aria-controls":I.menuId,...Pe.isOpen&&Pe.highlightedIndex>-1&&{"aria-activedescendant":I.getItemId(Pe.highlightedIndex)},"aria-labelledby":I.labelId,autoComplete:"off",value:Pe.inputValue,...lt,...ue}},[p,D,A,$,j,I]),U=T.useCallback(function(K,se){let{refKey:oe="ref",ref:fe,...V}=K===void 0?{}:K,{suppressRefError:ee=!1}=se===void 0?{}:se;return j("getComboboxProps",ee,oe,S),{[oe]:fi(fe,we=>{S.current=we}),role:"combobox","aria-haspopup":"listbox","aria-owns":I.menuId,"aria-expanded":A.current.state.isOpen,...V}},[A,j,I]),re=T.useCallback(()=>{p({type:hk})},[p]),ae=T.useCallback(()=>{p({type:vk})},[p]),le=T.useCallback(()=>{p({type:pk})},[p]),F=T.useCallback(K=>{p({type:gk,highlightedIndex:K})},[p]),W=T.useCallback(K=>{p({type:hw,selectedItem:K})},[p]),J=T.useCallback(K=>{p({type:mk,inputValue:K})},[p]),H=T.useCallback(()=>{p({type:yk})},[p]);return{getItemProps:Y,getLabelProps:G,getMenuProps:B,getInputProps:te,getComboboxProps:U,getToggleButtonProps:Z,toggleMenu:re,openMenu:le,closeMenu:ae,setHighlightedIndex:F,setInputValue:J,selectItem:W,reset:H,highlightedIndex:m,isOpen:v,selectedItem:y,inputValue:x}}he.array,he.array,he.array,he.func,he.func,he.func,he.number,he.number,he.number,he.func,he.func,he.string,he.string,he.shape({addEventListener:he.func,removeEventListener:he.func,document:he.shape({getElementById:he.func,activeElement:he.any,body:he.any})});qa.itemToString,qa.stateReducer,qa.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 Aa={exports:{}};/**
|
|
44
44
|
* @license
|
|
45
45
|
* Lodash <https://lodash.com/>
|
|
46
46
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
47
47
|
* Released under MIT license <https://lodash.com/license>
|
|
48
48
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
49
49
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
50
|
-
*/var SZ=Pa.exports,NN;function OZ(){return NN||(NN=1,(function(e,t){(function(){var r,n="4.18.1",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="Invalid `imports` option passed into `_.template`",d="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",p=1,v=2,m=4,y=1,x=2,b=1,w=2,E=4,_=8,S=16,R=32,I=64,N=128,A=256,L=512,B=30,U="...",j=800,D=16,G=1,F=2,X=3,Z=1/0,Q=9007199254740991,V=17976931348623157e292,ee=NaN,oe=4294967295,ae=oe-1,H=oe>>>1,K=[["ary",N],["bind",b],["bindKey",w],["curry",_],["curryRight",S],["flip",L],["partial",R],["partialRight",I],["rearg",A]],$="[object Arguments]",k="[object Array]",z="[object AsyncFunction]",re="[object Boolean]",ie="[object Date]",se="[object DOMException]",ce="[object Error]",be="[object Function]",Ce="[object GeneratorFunction]",_e="[object Map]",he="[object Number]",fe="[object Null]",Ee="[object Object]",Pe="[object Promise]",Ze="[object Proxy]",ze="[object RegExp]",Fe="[object Set]",Ue="[object String]",ct="[object Symbol]",lt="[object Undefined]",mt="[object WeakMap]",yt="[object WeakSet]",rt="[object ArrayBuffer]",bt="[object DataView]",Jt="[object Float32Array]",fr="[object Float64Array]",Dt="[object Int8Array]",_t="[object Int16Array]",jt="[object Int32Array]",Wr="[object Uint8Array]",Yn="[object Uint8ClampedArray]",Cn="[object Uint16Array]",dr="[object Uint32Array]",Ti=/\b__p \+= '';/g,ll=/\b(__p \+=) '' \+/g,fl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Do=/&(?:amp|lt|gt|quot|#39);/g,os=/[&<>"']/g,as=RegExp(Do.source),dl=RegExp(os.source),ss=/<%-([\s\S]+?)%>/g,hl=/<%([\s\S]+?)%>/g,jo=/<%=([\s\S]+?)%>/g,pl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,us=/^\w*$/,vl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ai=/[\\^$.*+?()[\]{}|]/g,gl=RegExp(Ai.source),Mi=/^\s+/,ml=/\s/,cs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,yl=/\{\n\/\* \[wrapped with (.+)\] \*/,bl=/,? & /,xl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ls=/[()=,{}\[\]\/\s]/,wl=/\\(\\)?/g,_l=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fs=/\w*$/,El=/^[-+]0x[0-9a-f]+$/i,Sl=/^0b[01]+$/i,Ol=/^\[object .+?Constructor\]$/,Cl=/^0o[0-7]+$/i,Rl=/^(?:0|[1-9]\d*)$/,Il=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xn=/($^)/,Pl=/['\n\r\u2028\u2029\\]/g,Di="\\ud800-\\udfff",Nl="\\u0300-\\u036f",ds="\\ufe20-\\ufe2f",Tl="\\u20d0-\\u20ff",qo=Nl+ds+Tl,hs="\\u2700-\\u27bf",ko="a-z\\xdf-\\xf6\\xf8-\\xff",Al="\\xac\\xb1\\xd7\\xf7",ps="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ml="\\u2000-\\u206f",Dl=" \\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",Lo="A-Z\\xc0-\\xd6\\xd8-\\xde",vs="\\ufe0e\\ufe0f",gs=Al+ps+Ml+Dl,Bo="['’]",jl="["+Di+"]",Fo="["+gs+"]",ji="["+qo+"]",Zn="\\d+",ql="["+hs+"]",ms="["+ko+"]",Rw="[^"+Di+gs+Zn+hs+ko+Lo+"]",kl="\\ud83c[\\udffb-\\udfff]",cL="(?:"+ji+"|"+kl+")",Iw="[^"+Di+"]",Ll="(?:\\ud83c[\\udde6-\\uddff]){2}",Bl="[\\ud800-\\udbff][\\udc00-\\udfff]",qi="["+Lo+"]",Pw="\\u200d",Nw="(?:"+ms+"|"+Rw+")",lL="(?:"+qi+"|"+Rw+")",Tw="(?:"+Bo+"(?:d|ll|m|re|s|t|ve))?",Aw="(?:"+Bo+"(?:D|LL|M|RE|S|T|VE))?",Mw=cL+"?",Dw="["+vs+"]?",fL="(?:"+Pw+"(?:"+[Iw,Ll,Bl].join("|")+")"+Dw+Mw+")*",dL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",hL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",jw=Dw+Mw+fL,pL="(?:"+[ql,Ll,Bl].join("|")+")"+jw,vL="(?:"+[Iw+ji+"?",ji,Ll,Bl,jl].join("|")+")",gL=RegExp(Bo,"g"),mL=RegExp(ji,"g"),Fl=RegExp(kl+"(?="+kl+")|"+vL+jw,"g"),yL=RegExp([qi+"?"+ms+"+"+Tw+"(?="+[Fo,qi,"$"].join("|")+")",lL+"+"+Aw+"(?="+[Fo,qi+Nw,"$"].join("|")+")",qi+"?"+Nw+"+"+Tw,qi+"+"+Aw,hL,dL,Zn,pL].join("|"),"g"),bL=RegExp("["+Pw+Di+qo+vs+"]"),xL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,wL=["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"],_L=-1,at={};at[Jt]=at[fr]=at[Dt]=at[_t]=at[jt]=at[Wr]=at[Yn]=at[Cn]=at[dr]=!0,at[$]=at[k]=at[rt]=at[re]=at[bt]=at[ie]=at[ce]=at[be]=at[_e]=at[he]=at[Ee]=at[ze]=at[Fe]=at[Ue]=at[mt]=!1;var nt={};nt[$]=nt[k]=nt[rt]=nt[bt]=nt[re]=nt[ie]=nt[Jt]=nt[fr]=nt[Dt]=nt[_t]=nt[jt]=nt[_e]=nt[he]=nt[Ee]=nt[ze]=nt[Fe]=nt[Ue]=nt[ct]=nt[Wr]=nt[Yn]=nt[Cn]=nt[dr]=!0,nt[ce]=nt[be]=nt[mt]=!1;var EL={À:"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"},SL={"&":"&","<":"<",">":">",'"':""","'":"'"},OL={"&":"&","<":"<",">":">",""":'"',"'":"'"},CL={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},RL=parseFloat,IL=parseInt,qw=typeof ht=="object"&&ht&&ht.Object===Object&&ht,PL=typeof self=="object"&&self&&self.Object===Object&&self,It=qw||PL||Function("return this")(),$l=t&&!t.nodeType&&t,Jn=$l&&!0&&e&&!e.nodeType&&e,kw=Jn&&Jn.exports===$l,zl=kw&&qw.process,hr=(function(){try{var te=Jn&&Jn.require&&Jn.require("util").types;return te||zl&&zl.binding&&zl.binding("util")}catch{}})(),Lw=hr&&hr.isArrayBuffer,Bw=hr&&hr.isDate,Fw=hr&&hr.isMap,$w=hr&&hr.isRegExp,zw=hr&&hr.isSet,Hw=hr&&hr.isTypedArray;function Qt(te,de,ue){switch(ue.length){case 0:return te.call(de);case 1:return te.call(de,ue[0]);case 2:return te.call(de,ue[0],ue[1]);case 3:return te.call(de,ue[0],ue[1],ue[2])}return te.apply(de,ue)}function NL(te,de,ue,Se){for(var Ae=-1,We=te==null?0:te.length;++Ae<We;){var Et=te[Ae];de(Se,Et,ue(Et),te)}return Se}function er(te,de){for(var ue=-1,Se=te==null?0:te.length;++ue<Se&&de(te[ue],ue,te)!==!1;);return te}function TL(te,de){for(var ue=te==null?0:te.length;ue--&&de(te[ue],ue,te)!==!1;);return te}function Uw(te,de){for(var ue=-1,Se=te==null?0:te.length;++ue<Se;)if(!de(te[ue],ue,te))return!1;return!0}function Rn(te,de){for(var ue=-1,Se=te==null?0:te.length,Ae=0,We=[];++ue<Se;){var Et=te[ue];de(Et,ue,te)&&(We[Ae++]=Et)}return We}function ys(te,de){var ue=te==null?0:te.length;return!!ue&&ki(te,de,0)>-1}function Hl(te,de,ue){for(var Se=-1,Ae=te==null?0:te.length;++Se<Ae;)if(ue(de,te[Se]))return!0;return!1}function st(te,de){for(var ue=-1,Se=te==null?0:te.length,Ae=Array(Se);++ue<Se;)Ae[ue]=de(te[ue],ue,te);return Ae}function In(te,de){for(var ue=-1,Se=de.length,Ae=te.length;++ue<Se;)te[Ae+ue]=de[ue];return te}function Ul(te,de,ue,Se){var Ae=-1,We=te==null?0:te.length;for(Se&&We&&(ue=te[++Ae]);++Ae<We;)ue=de(ue,te[Ae],Ae,te);return ue}function AL(te,de,ue,Se){var Ae=te==null?0:te.length;for(Se&&Ae&&(ue=te[--Ae]);Ae--;)ue=de(ue,te[Ae],Ae,te);return ue}function Wl(te,de){for(var ue=-1,Se=te==null?0:te.length;++ue<Se;)if(de(te[ue],ue,te))return!0;return!1}var ML=Vl("length");function DL(te){return te.split("")}function jL(te){return te.match(xl)||[]}function Ww(te,de,ue){var Se;return ue(te,function(Ae,We,Et){if(de(Ae,We,Et))return Se=We,!1}),Se}function bs(te,de,ue,Se){for(var Ae=te.length,We=ue+(Se?1:-1);Se?We--:++We<Ae;)if(de(te[We],We,te))return We;return-1}function ki(te,de,ue){return de===de?GL(te,de,ue):bs(te,Vw,ue)}function qL(te,de,ue,Se){for(var Ae=ue-1,We=te.length;++Ae<We;)if(Se(te[Ae],de))return Ae;return-1}function Vw(te){return te!==te}function Gw(te,de){var ue=te==null?0:te.length;return ue?Kl(te,de)/ue:ee}function Vl(te){return function(de){return de==null?r:de[te]}}function Gl(te){return function(de){return te==null?r:te[de]}}function Kw(te,de,ue,Se,Ae){return Ae(te,function(We,Et,et){ue=Se?(Se=!1,We):de(ue,We,Et,et)}),ue}function kL(te,de){var ue=te.length;for(te.sort(de);ue--;)te[ue]=te[ue].value;return te}function Kl(te,de){for(var ue,Se=-1,Ae=te.length;++Se<Ae;){var We=de(te[Se]);We!==r&&(ue=ue===r?We:ue+We)}return ue}function Yl(te,de){for(var ue=-1,Se=Array(te);++ue<te;)Se[ue]=de(ue);return Se}function LL(te,de){return st(de,function(ue){return[ue,te[ue]]})}function Yw(te){return te&&te.slice(0,Qw(te)+1).replace(Mi,"")}function tr(te){return function(de){return te(de)}}function Xl(te,de){return st(de,function(ue){return te[ue]})}function $o(te,de){return te.has(de)}function Xw(te,de){for(var ue=-1,Se=te.length;++ue<Se&&ki(de,te[ue],0)>-1;);return ue}function Zw(te,de){for(var ue=te.length;ue--&&ki(de,te[ue],0)>-1;);return ue}function BL(te,de){for(var ue=te.length,Se=0;ue--;)te[ue]===de&&++Se;return Se}var FL=Gl(EL),$L=Gl(SL);function zL(te){return"\\"+CL[te]}function HL(te,de){return te==null?r:te[de]}function Li(te){return bL.test(te)}function UL(te){return xL.test(te)}function WL(te){for(var de,ue=[];!(de=te.next()).done;)ue.push(de.value);return ue}function Zl(te){var de=-1,ue=Array(te.size);return te.forEach(function(Se,Ae){ue[++de]=[Ae,Se]}),ue}function Jw(te,de){return function(ue){return te(de(ue))}}function Pn(te,de){for(var ue=-1,Se=te.length,Ae=0,We=[];++ue<Se;){var Et=te[ue];(Et===de||Et===h)&&(te[ue]=h,We[Ae++]=ue)}return We}function xs(te){var de=-1,ue=Array(te.size);return te.forEach(function(Se){ue[++de]=Se}),ue}function VL(te){var de=-1,ue=Array(te.size);return te.forEach(function(Se){ue[++de]=[Se,Se]}),ue}function GL(te,de,ue){for(var Se=ue-1,Ae=te.length;++Se<Ae;)if(te[Se]===de)return Se;return-1}function KL(te,de,ue){for(var Se=ue+1;Se--;)if(te[Se]===de)return Se;return Se}function Bi(te){return Li(te)?XL(te):ML(te)}function Tr(te){return Li(te)?ZL(te):DL(te)}function Qw(te){for(var de=te.length;de--&&ml.test(te.charAt(de)););return de}var YL=Gl(OL);function XL(te){for(var de=Fl.lastIndex=0;Fl.test(te);)++de;return de}function ZL(te){return te.match(Fl)||[]}function JL(te){return te.match(yL)||[]}var QL=(function te(de){de=de==null?It:Fi.defaults(It.Object(),de,Fi.pick(It,wL));var ue=de.Array,Se=de.Date,Ae=de.Error,We=de.Function,Et=de.Math,et=de.Object,Jl=de.RegExp,eB=de.String,pr=de.TypeError,ws=ue.prototype,tB=We.prototype,$i=et.prototype,_s=de["__core-js_shared__"],Es=tB.toString,Ge=$i.hasOwnProperty,rB=0,e_=(function(){var s=/[^.]+$/.exec(_s&&_s.keys&&_s.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})(),Ss=$i.toString,nB=Es.call(et),iB=It._,oB=Jl("^"+Es.call(Ge).replace(Ai,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Os=kw?de.Buffer:r,Nn=de.Symbol,Cs=de.Uint8Array,t_=Os?Os.allocUnsafe:r,Rs=Jw(et.getPrototypeOf,et),r_=et.create,n_=$i.propertyIsEnumerable,Is=ws.splice,i_=Nn?Nn.isConcatSpreadable:r,zo=Nn?Nn.iterator:r,Qn=Nn?Nn.toStringTag:r,Ps=(function(){try{var s=ii(et,"defineProperty");return s({},"",{}),s}catch{}})(),aB=de.clearTimeout!==It.clearTimeout&&de.clearTimeout,sB=Se&&Se.now!==It.Date.now&&Se.now,uB=de.setTimeout!==It.setTimeout&&de.setTimeout,Ns=Et.ceil,Ts=Et.floor,Ql=et.getOwnPropertySymbols,cB=Os?Os.isBuffer:r,o_=de.isFinite,lB=ws.join,fB=Jw(et.keys,et),St=Et.max,At=Et.min,dB=Se.now,hB=de.parseInt,a_=Et.random,pB=ws.reverse,ef=ii(de,"DataView"),Ho=ii(de,"Map"),tf=ii(de,"Promise"),zi=ii(de,"Set"),Uo=ii(de,"WeakMap"),Wo=ii(et,"create"),As=Uo&&new Uo,Hi={},vB=oi(ef),gB=oi(Ho),mB=oi(tf),yB=oi(zi),bB=oi(Uo),Ms=Nn?Nn.prototype:r,Vo=Ms?Ms.valueOf:r,s_=Ms?Ms.toString:r;function M(s){if(dt(s)&&!Me(s)&&!(s instanceof Be)){if(s instanceof vr)return s;if(Ge.call(s,"__wrapped__"))return u1(s)}return new vr(s)}var Ui=(function(){function s(){}return function(l){if(!ft(l))return{};if(r_)return r_(l);s.prototype=l;var g=new s;return s.prototype=r,g}})();function Ds(){}function vr(s,l){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}M.templateSettings={escape:ss,evaluate:hl,interpolate:jo,variable:"",imports:{_:M}},M.prototype=Ds.prototype,M.prototype.constructor=M,vr.prototype=Ui(Ds.prototype),vr.prototype.constructor=vr;function Be(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=oe,this.__views__=[]}function xB(){var s=new Be(this.__wrapped__);return s.__actions__=zt(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=zt(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=zt(this.__views__),s}function wB(){if(this.__filtered__){var s=new Be(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function _B(){var s=this.__wrapped__.value(),l=this.__dir__,g=Me(s),O=l<0,P=g?s.length:0,q=DF(0,P,this.__views__),W=q.start,Y=q.end,ne=Y-W,ve=O?Y:W-1,ge=this.__iteratees__,me=ge.length,xe=0,Oe=At(ne,this.__takeCount__);if(!g||!O&&P==ne&&Oe==ne)return T_(s,this.__actions__);var Ne=[];e:for(;ne--&&xe<Oe;){ve+=l;for(var je=-1,Re=s[ve];++je<me;){var ke=ge[je],$e=ke.iteratee,ir=ke.type,Lt=$e(Re);if(ir==F)Re=Lt;else if(!Lt){if(ir==G)continue e;break e}}Ne[xe++]=Re}return Ne}Be.prototype=Ui(Ds.prototype),Be.prototype.constructor=Be;function ei(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 EB(){this.__data__=Wo?Wo(null):{},this.size=0}function SB(s){var l=this.has(s)&&delete this.__data__[s];return this.size-=l?1:0,l}function OB(s){var l=this.__data__;if(Wo){var g=l[s];return g===d?r:g}return Ge.call(l,s)?l[s]:r}function CB(s){var l=this.__data__;return Wo?l[s]!==r:Ge.call(l,s)}function RB(s,l){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Wo&&l===r?d:l,this}ei.prototype.clear=EB,ei.prototype.delete=SB,ei.prototype.get=OB,ei.prototype.has=CB,ei.prototype.set=RB;function cn(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 IB(){this.__data__=[],this.size=0}function PB(s){var l=this.__data__,g=js(l,s);if(g<0)return!1;var O=l.length-1;return g==O?l.pop():Is.call(l,g,1),--this.size,!0}function NB(s){var l=this.__data__,g=js(l,s);return g<0?r:l[g][1]}function TB(s){return js(this.__data__,s)>-1}function AB(s,l){var g=this.__data__,O=js(g,s);return O<0?(++this.size,g.push([s,l])):g[O][1]=l,this}cn.prototype.clear=IB,cn.prototype.delete=PB,cn.prototype.get=NB,cn.prototype.has=TB,cn.prototype.set=AB;function ln(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 MB(){this.size=0,this.__data__={hash:new ei,map:new(Ho||cn),string:new ei}}function DB(s){var l=Gs(this,s).delete(s);return this.size-=l?1:0,l}function jB(s){return Gs(this,s).get(s)}function qB(s){return Gs(this,s).has(s)}function kB(s,l){var g=Gs(this,s),O=g.size;return g.set(s,l),this.size+=g.size==O?0:1,this}ln.prototype.clear=MB,ln.prototype.delete=DB,ln.prototype.get=jB,ln.prototype.has=qB,ln.prototype.set=kB;function ti(s){var l=-1,g=s==null?0:s.length;for(this.__data__=new ln;++l<g;)this.add(s[l])}function LB(s){return this.__data__.set(s,d),this}function BB(s){return this.__data__.has(s)}ti.prototype.add=ti.prototype.push=LB,ti.prototype.has=BB;function Ar(s){var l=this.__data__=new cn(s);this.size=l.size}function FB(){this.__data__=new cn,this.size=0}function $B(s){var l=this.__data__,g=l.delete(s);return this.size=l.size,g}function zB(s){return this.__data__.get(s)}function HB(s){return this.__data__.has(s)}function UB(s,l){var g=this.__data__;if(g instanceof cn){var O=g.__data__;if(!Ho||O.length<i-1)return O.push([s,l]),this.size=++g.size,this;g=this.__data__=new ln(O)}return g.set(s,l),this.size=g.size,this}Ar.prototype.clear=FB,Ar.prototype.delete=$B,Ar.prototype.get=zB,Ar.prototype.has=HB,Ar.prototype.set=UB;function u_(s,l){var g=Me(s),O=!g&&ai(s),P=!g&&!O&&jn(s),q=!g&&!O&&!P&&Ki(s),W=g||O||P||q,Y=W?Yl(s.length,eB):[],ne=Y.length;for(var ve in s)(l||Ge.call(s,ve))&&!(W&&(ve=="length"||P&&(ve=="offset"||ve=="parent")||q&&(ve=="buffer"||ve=="byteLength"||ve=="byteOffset")||hn(ve,ne)))&&Y.push(ve);return Y}function c_(s){var l=s.length;return l?s[hf(0,l-1)]:r}function WB(s,l){return Ks(zt(s),ri(l,0,s.length))}function VB(s){return Ks(zt(s))}function rf(s,l,g){(g!==r&&!Dr(s[l],g)||g===r&&!(l in s))&&Vr(s,l,g)}function Go(s,l,g){var O=s[l];(!(Ge.call(s,l)&&Dr(O,g))||g===r&&!(l in s))&&Vr(s,l,g)}function js(s,l){for(var g=s.length;g--;)if(Dr(s[g][0],l))return g;return-1}function GB(s,l,g,O){return Tn(s,function(P,q,W){l(O,P,g(P),W)}),O}function l_(s,l){return s&&Kr(l,Ct(l),s)}function KB(s,l){return s&&Kr(l,Ut(l),s)}function Vr(s,l,g){l=="__proto__"&&Ps?Ps(s,l,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[l]=g}function nf(s,l){for(var g=-1,O=l.length,P=ue(O),q=s==null;++g<O;)P[g]=q?r:Bf(s,l[g]);return P}function ri(s,l,g){return s===s&&(g!==r&&(s=s<=g?s:g),l!==r&&(s=s>=l?s:l)),s}function gr(s,l,g,O,P,q){var W,Y=l&p,ne=l&v,ve=l&m;if(g&&(W=P?g(s,O,P,q):g(s)),W!==r)return W;if(!ft(s))return s;var ge=Me(s);if(ge){if(W=qF(s),!Y)return zt(s,W)}else{var me=Mt(s),xe=me==be||me==Ce;if(jn(s))return D_(s,Y);if(me==Ee||me==$||xe&&!P){if(W=ne||xe?{}:Q_(s),!Y)return ne?OF(s,KB(W,s)):SF(s,l_(W,s))}else{if(!nt[me])return P?s:{};W=kF(s,me,Y)}}q||(q=new Ar);var Oe=q.get(s);if(Oe)return Oe;q.set(s,W),I1(s)?s.forEach(function(Re){W.add(gr(Re,l,g,Re,s,q))}):C1(s)&&s.forEach(function(Re,ke){W.set(ke,gr(Re,l,g,ke,s,q))});var Ne=ve?ne?Sf:Ef:ne?Ut:Ct,je=ge?r:Ne(s);return er(je||s,function(Re,ke){je&&(ke=Re,Re=s[ke]),Go(W,ke,gr(Re,l,g,ke,s,q))}),W}function YB(s){var l=Ct(s);return function(g){return f_(g,s,l)}}function f_(s,l,g){var O=g.length;if(s==null)return!O;for(s=et(s);O--;){var P=g[O],q=l[P],W=s[P];if(W===r&&!(P in s)||!q(W))return!1}return!0}function d_(s,l,g){if(typeof s!="function")throw new pr(a);return ea(function(){s.apply(r,g)},l)}function Ko(s,l,g,O){var P=-1,q=ys,W=!0,Y=s.length,ne=[],ve=l.length;if(!Y)return ne;g&&(l=st(l,tr(g))),O?(q=Hl,W=!1):l.length>=i&&(q=$o,W=!1,l=new ti(l));e:for(;++P<Y;){var ge=s[P],me=g==null?ge:g(ge);if(ge=O||ge!==0?ge:0,W&&me===me){for(var xe=ve;xe--;)if(l[xe]===me)continue e;ne.push(ge)}else q(l,me,O)||ne.push(ge)}return ne}var Tn=B_(Gr),h_=B_(af,!0);function XB(s,l){var g=!0;return Tn(s,function(O,P,q){return g=!!l(O,P,q),g}),g}function qs(s,l,g){for(var O=-1,P=s.length;++O<P;){var q=s[O],W=l(q);if(W!=null&&(Y===r?W===W&&!nr(W):g(W,Y)))var Y=W,ne=q}return ne}function ZB(s,l,g,O){var P=s.length;for(g=De(g),g<0&&(g=-g>P?0:P+g),O=O===r||O>P?P:De(O),O<0&&(O+=P),O=g>O?0:N1(O);g<O;)s[g++]=l;return s}function p_(s,l){var g=[];return Tn(s,function(O,P,q){l(O,P,q)&&g.push(O)}),g}function Pt(s,l,g,O,P){var q=-1,W=s.length;for(g||(g=BF),P||(P=[]);++q<W;){var Y=s[q];l>0&&g(Y)?l>1?Pt(Y,l-1,g,O,P):In(P,Y):O||(P[P.length]=Y)}return P}var of=F_(),v_=F_(!0);function Gr(s,l){return s&&of(s,l,Ct)}function af(s,l){return s&&v_(s,l,Ct)}function ks(s,l){return Rn(l,function(g){return pn(s[g])})}function ni(s,l){l=Mn(l,s);for(var g=0,O=l.length;s!=null&&g<O;)s=s[Mr(l[g++])];return g&&g==O?s:r}function g_(s,l,g){var O=l(s);return Me(s)?O:In(O,g(s))}function qt(s){return s==null?s===r?lt:fe:Qn&&Qn in et(s)?MF(s):VF(s)}function sf(s,l){return s>l}function JB(s,l){return s!=null&&Ge.call(s,l)}function QB(s,l){return s!=null&&l in et(s)}function eF(s,l,g){return s>=At(l,g)&&s<St(l,g)}function uf(s,l,g){for(var O=g?Hl:ys,P=s[0].length,q=s.length,W=q,Y=ue(q),ne=1/0,ve=[];W--;){var ge=s[W];W&&l&&(ge=st(ge,tr(l))),ne=At(ge.length,ne),Y[W]=!g&&(l||P>=120&&ge.length>=120)?new ti(W&&ge):r}ge=s[0];var me=-1,xe=Y[0];e:for(;++me<P&&ve.length<ne;){var Oe=ge[me],Ne=l?l(Oe):Oe;if(Oe=g||Oe!==0?Oe:0,!(xe?$o(xe,Ne):O(ve,Ne,g))){for(W=q;--W;){var je=Y[W];if(!(je?$o(je,Ne):O(s[W],Ne,g)))continue e}xe&&xe.push(Ne),ve.push(Oe)}}return ve}function tF(s,l,g,O){return Gr(s,function(P,q,W){l(O,g(P),q,W)}),O}function Yo(s,l,g){l=Mn(l,s),s=n1(s,l);var O=s==null?s:s[Mr(yr(l))];return O==null?r:Qt(O,s,g)}function m_(s){return dt(s)&&qt(s)==$}function rF(s){return dt(s)&&qt(s)==rt}function nF(s){return dt(s)&&qt(s)==ie}function Xo(s,l,g,O,P){return s===l?!0:s==null||l==null||!dt(s)&&!dt(l)?s!==s&&l!==l:iF(s,l,g,O,Xo,P)}function iF(s,l,g,O,P,q){var W=Me(s),Y=Me(l),ne=W?k:Mt(s),ve=Y?k:Mt(l);ne=ne==$?Ee:ne,ve=ve==$?Ee:ve;var ge=ne==Ee,me=ve==Ee,xe=ne==ve;if(xe&&jn(s)){if(!jn(l))return!1;W=!0,ge=!1}if(xe&&!ge)return q||(q=new Ar),W||Ki(s)?X_(s,l,g,O,P,q):TF(s,l,ne,g,O,P,q);if(!(g&y)){var Oe=ge&&Ge.call(s,"__wrapped__"),Ne=me&&Ge.call(l,"__wrapped__");if(Oe||Ne){var je=Oe?s.value():s,Re=Ne?l.value():l;return q||(q=new Ar),P(je,Re,g,O,q)}}return xe?(q||(q=new Ar),AF(s,l,g,O,P,q)):!1}function oF(s){return dt(s)&&Mt(s)==_e}function cf(s,l,g,O){var P=g.length,q=P,W=!O;if(s==null)return!q;for(s=et(s);P--;){var Y=g[P];if(W&&Y[2]?Y[1]!==s[Y[0]]:!(Y[0]in s))return!1}for(;++P<q;){Y=g[P];var ne=Y[0],ve=s[ne],ge=Y[1];if(W&&Y[2]){if(ve===r&&!(ne in s))return!1}else{var me=new Ar;if(O)var xe=O(ve,ge,ne,s,l,me);if(!(xe===r?Xo(ge,ve,y|x,O,me):xe))return!1}}return!0}function y_(s){if(!ft(s)||$F(s))return!1;var l=pn(s)?oB:Ol;return l.test(oi(s))}function aF(s){return dt(s)&&qt(s)==ze}function sF(s){return dt(s)&&Mt(s)==Fe}function uF(s){return dt(s)&&eu(s.length)&&!!at[qt(s)]}function b_(s){return typeof s=="function"?s:s==null?Wt:typeof s=="object"?Me(s)?__(s[0],s[1]):w_(s):z1(s)}function lf(s){if(!Qo(s))return fB(s);var l=[];for(var g in et(s))Ge.call(s,g)&&g!="constructor"&&l.push(g);return l}function cF(s){if(!ft(s))return WF(s);var l=Qo(s),g=[];for(var O in s)O=="constructor"&&(l||!Ge.call(s,O))||g.push(O);return g}function ff(s,l){return s<l}function x_(s,l){var g=-1,O=Ht(s)?ue(s.length):[];return Tn(s,function(P,q,W){O[++g]=l(P,q,W)}),O}function w_(s){var l=Cf(s);return l.length==1&&l[0][2]?t1(l[0][0],l[0][1]):function(g){return g===s||cf(g,s,l)}}function __(s,l){return If(s)&&e1(l)?t1(Mr(s),l):function(g){var O=Bf(g,s);return O===r&&O===l?Ff(g,s):Xo(l,O,y|x)}}function Ls(s,l,g,O,P){s!==l&&of(l,function(q,W){if(P||(P=new Ar),ft(q))lF(s,l,W,g,Ls,O,P);else{var Y=O?O(Nf(s,W),q,W+"",s,l,P):r;Y===r&&(Y=q),rf(s,W,Y)}},Ut)}function lF(s,l,g,O,P,q,W){var Y=Nf(s,g),ne=Nf(l,g),ve=W.get(ne);if(ve){rf(s,g,ve);return}var ge=q?q(Y,ne,g+"",s,l,W):r,me=ge===r;if(me){var xe=Me(ne),Oe=!xe&&jn(ne),Ne=!xe&&!Oe&&Ki(ne);ge=ne,xe||Oe||Ne?Me(Y)?ge=Y:pt(Y)?ge=zt(Y):Oe?(me=!1,ge=D_(ne,!0)):Ne?(me=!1,ge=j_(ne,!0)):ge=[]:ta(ne)||ai(ne)?(ge=Y,ai(Y)?ge=T1(Y):(!ft(Y)||pn(Y))&&(ge=Q_(ne))):me=!1}me&&(W.set(ne,ge),P(ge,ne,O,q,W),W.delete(ne)),rf(s,g,ge)}function E_(s,l){var g=s.length;if(g)return l+=l<0?g:0,hn(l,g)?s[l]:r}function S_(s,l,g){l.length?l=st(l,function(q){return Me(q)?function(W){return ni(W,q.length===1?q[0]:q)}:q}):l=[Wt];var O=-1;l=st(l,tr(Ie()));var P=x_(s,function(q,W,Y){var ne=st(l,function(ve){return ve(q)});return{criteria:ne,index:++O,value:q}});return kL(P,function(q,W){return EF(q,W,g)})}function fF(s,l){return O_(s,l,function(g,O){return Ff(s,O)})}function O_(s,l,g){for(var O=-1,P=l.length,q={};++O<P;){var W=l[O],Y=ni(s,W);g(Y,W)&&Zo(q,Mn(W,s),Y)}return q}function dF(s){return function(l){return ni(l,s)}}function df(s,l,g,O){var P=O?qL:ki,q=-1,W=l.length,Y=s;for(s===l&&(l=zt(l)),g&&(Y=st(s,tr(g)));++q<W;)for(var ne=0,ve=l[q],ge=g?g(ve):ve;(ne=P(Y,ge,ne,O))>-1;)Y!==s&&Is.call(Y,ne,1),Is.call(s,ne,1);return s}function C_(s,l){for(var g=s?l.length:0,O=g-1;g--;){var P=l[g];if(g==O||P!==q){var q=P;hn(P)?Is.call(s,P,1):gf(s,P)}}return s}function hf(s,l){return s+Ts(a_()*(l-s+1))}function hF(s,l,g,O){for(var P=-1,q=St(Ns((l-s)/(g||1)),0),W=ue(q);q--;)W[O?q:++P]=s,s+=g;return W}function pf(s,l){var g="";if(!s||l<1||l>Q)return g;do l%2&&(g+=s),l=Ts(l/2),l&&(s+=s);while(l);return g}function qe(s,l){return Tf(r1(s,l,Wt),s+"")}function pF(s){return c_(Yi(s))}function vF(s,l){var g=Yi(s);return Ks(g,ri(l,0,g.length))}function Zo(s,l,g,O){if(!ft(s))return s;l=Mn(l,s);for(var P=-1,q=l.length,W=q-1,Y=s;Y!=null&&++P<q;){var ne=Mr(l[P]),ve=g;if(ne==="__proto__"||ne==="constructor"||ne==="prototype")return s;if(P!=W){var ge=Y[ne];ve=O?O(ge,ne,Y):r,ve===r&&(ve=ft(ge)?ge:hn(l[P+1])?[]:{})}Go(Y,ne,ve),Y=Y[ne]}return s}var R_=As?function(s,l){return As.set(s,l),s}:Wt,gF=Ps?function(s,l){return Ps(s,"toString",{configurable:!0,enumerable:!1,value:zf(l),writable:!0})}:Wt;function mF(s){return Ks(Yi(s))}function mr(s,l,g){var O=-1,P=s.length;l<0&&(l=-l>P?0:P+l),g=g>P?P:g,g<0&&(g+=P),P=l>g?0:g-l>>>0,l>>>=0;for(var q=ue(P);++O<P;)q[O]=s[O+l];return q}function yF(s,l){var g;return Tn(s,function(O,P,q){return g=l(O,P,q),!g}),!!g}function Bs(s,l,g){var O=0,P=s==null?O:s.length;if(typeof l=="number"&&l===l&&P<=H){for(;O<P;){var q=O+P>>>1,W=s[q];W!==null&&!nr(W)&&(g?W<=l:W<l)?O=q+1:P=q}return P}return vf(s,l,Wt,g)}function vf(s,l,g,O){var P=0,q=s==null?0:s.length;if(q===0)return 0;l=g(l);for(var W=l!==l,Y=l===null,ne=nr(l),ve=l===r;P<q;){var ge=Ts((P+q)/2),me=g(s[ge]),xe=me!==r,Oe=me===null,Ne=me===me,je=nr(me);if(W)var Re=O||Ne;else ve?Re=Ne&&(O||xe):Y?Re=Ne&&xe&&(O||!Oe):ne?Re=Ne&&xe&&!Oe&&(O||!je):Oe||je?Re=!1:Re=O?me<=l:me<l;Re?P=ge+1:q=ge}return At(q,ae)}function I_(s,l){for(var g=-1,O=s.length,P=0,q=[];++g<O;){var W=s[g],Y=l?l(W):W;if(!g||!Dr(Y,ne)){var ne=Y;q[P++]=W===0?0:W}}return q}function P_(s){return typeof s=="number"?s:nr(s)?ee:+s}function rr(s){if(typeof s=="string")return s;if(Me(s))return st(s,rr)+"";if(nr(s))return s_?s_.call(s):"";var l=s+"";return l=="0"&&1/s==-Z?"-0":l}function An(s,l,g){var O=-1,P=ys,q=s.length,W=!0,Y=[],ne=Y;if(g)W=!1,P=Hl;else if(q>=i){var ve=l?null:PF(s);if(ve)return xs(ve);W=!1,P=$o,ne=new ti}else ne=l?[]:Y;e:for(;++O<q;){var ge=s[O],me=l?l(ge):ge;if(ge=g||ge!==0?ge:0,W&&me===me){for(var xe=ne.length;xe--;)if(ne[xe]===me)continue e;l&&ne.push(me),Y.push(ge)}else P(ne,me,g)||(ne!==Y&&ne.push(me),Y.push(ge))}return Y}function gf(s,l){l=Mn(l,s);var g=-1,O=l.length;if(!O)return!0;for(;++g<O;){var P=Mr(l[g]);if(P==="__proto__"&&!Ge.call(s,"__proto__")||(P==="constructor"||P==="prototype")&&g<O-1)return!1}var q=n1(s,l);return q==null||delete q[Mr(yr(l))]}function N_(s,l,g,O){return Zo(s,l,g(ni(s,l)),O)}function Fs(s,l,g,O){for(var P=s.length,q=O?P:-1;(O?q--:++q<P)&&l(s[q],q,s););return g?mr(s,O?0:q,O?q+1:P):mr(s,O?q+1:0,O?P:q)}function T_(s,l){var g=s;return g instanceof Be&&(g=g.value()),Ul(l,function(O,P){return P.func.apply(P.thisArg,In([O],P.args))},g)}function mf(s,l,g){var O=s.length;if(O<2)return O?An(s[0]):[];for(var P=-1,q=ue(O);++P<O;)for(var W=s[P],Y=-1;++Y<O;)Y!=P&&(q[P]=Ko(q[P]||W,s[Y],l,g));return An(Pt(q,1),l,g)}function A_(s,l,g){for(var O=-1,P=s.length,q=l.length,W={};++O<P;){var Y=O<q?l[O]:r;g(W,s[O],Y)}return W}function yf(s){return pt(s)?s:[]}function bf(s){return typeof s=="function"?s:Wt}function Mn(s,l){return Me(s)?s:If(s,l)?[s]:s1(Ke(s))}var bF=qe;function Dn(s,l,g){var O=s.length;return g=g===r?O:g,!l&&g>=O?s:mr(s,l,g)}var M_=aB||function(s){return It.clearTimeout(s)};function D_(s,l){if(l)return s.slice();var g=s.length,O=t_?t_(g):new s.constructor(g);return s.copy(O),O}function xf(s){var l=new s.constructor(s.byteLength);return new Cs(l).set(new Cs(s)),l}function xF(s,l){var g=l?xf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function wF(s){var l=new s.constructor(s.source,fs.exec(s));return l.lastIndex=s.lastIndex,l}function _F(s){return Vo?et(Vo.call(s)):{}}function j_(s,l){var g=l?xf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function q_(s,l){if(s!==l){var g=s!==r,O=s===null,P=s===s,q=nr(s),W=l!==r,Y=l===null,ne=l===l,ve=nr(l);if(!Y&&!ve&&!q&&s>l||q&&W&&ne&&!Y&&!ve||O&&W&&ne||!g&&ne||!P)return 1;if(!O&&!q&&!ve&&s<l||ve&&g&&P&&!O&&!q||Y&&g&&P||!W&&P||!ne)return-1}return 0}function EF(s,l,g){for(var O=-1,P=s.criteria,q=l.criteria,W=P.length,Y=g.length;++O<W;){var ne=q_(P[O],q[O]);if(ne){if(O>=Y)return ne;var ve=g[O];return ne*(ve=="desc"?-1:1)}}return s.index-l.index}function k_(s,l,g,O){for(var P=-1,q=s.length,W=g.length,Y=-1,ne=l.length,ve=St(q-W,0),ge=ue(ne+ve),me=!O;++Y<ne;)ge[Y]=l[Y];for(;++P<W;)(me||P<q)&&(ge[g[P]]=s[P]);for(;ve--;)ge[Y++]=s[P++];return ge}function L_(s,l,g,O){for(var P=-1,q=s.length,W=-1,Y=g.length,ne=-1,ve=l.length,ge=St(q-Y,0),me=ue(ge+ve),xe=!O;++P<ge;)me[P]=s[P];for(var Oe=P;++ne<ve;)me[Oe+ne]=l[ne];for(;++W<Y;)(xe||P<q)&&(me[Oe+g[W]]=s[P++]);return me}function zt(s,l){var g=-1,O=s.length;for(l||(l=ue(O));++g<O;)l[g]=s[g];return l}function Kr(s,l,g,O){var P=!g;g||(g={});for(var q=-1,W=l.length;++q<W;){var Y=l[q],ne=O?O(g[Y],s[Y],Y,g,s):r;ne===r&&(ne=s[Y]),P?Vr(g,Y,ne):Go(g,Y,ne)}return g}function SF(s,l){return Kr(s,Rf(s),l)}function OF(s,l){return Kr(s,Z_(s),l)}function $s(s,l){return function(g,O){var P=Me(g)?NL:GB,q=l?l():{};return P(g,s,Ie(O,2),q)}}function Wi(s){return qe(function(l,g){var O=-1,P=g.length,q=P>1?g[P-1]:r,W=P>2?g[2]:r;for(q=s.length>3&&typeof q=="function"?(P--,q):r,W&&kt(g[0],g[1],W)&&(q=P<3?r:q,P=1),l=et(l);++O<P;){var Y=g[O];Y&&s(l,Y,O,q)}return l})}function B_(s,l){return function(g,O){if(g==null)return g;if(!Ht(g))return s(g,O);for(var P=g.length,q=l?P:-1,W=et(g);(l?q--:++q<P)&&O(W[q],q,W)!==!1;);return g}}function F_(s){return function(l,g,O){for(var P=-1,q=et(l),W=O(l),Y=W.length;Y--;){var ne=W[s?Y:++P];if(g(q[ne],ne,q)===!1)break}return l}}function CF(s,l,g){var O=l&b,P=Jo(s);function q(){var W=this&&this!==It&&this instanceof q?P:s;return W.apply(O?g:this,arguments)}return q}function $_(s){return function(l){l=Ke(l);var g=Li(l)?Tr(l):r,O=g?g[0]:l.charAt(0),P=g?Dn(g,1).join(""):l.slice(1);return O[s]()+P}}function Vi(s){return function(l){return Ul(F1(B1(l).replace(gL,"")),s,"")}}function Jo(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=Ui(s.prototype),O=s.apply(g,l);return ft(O)?O:g}}function RF(s,l,g){var O=Jo(s);function P(){for(var q=arguments.length,W=ue(q),Y=q,ne=Gi(P);Y--;)W[Y]=arguments[Y];var ve=q<3&&W[0]!==ne&&W[q-1]!==ne?[]:Pn(W,ne);if(q-=ve.length,q<g)return V_(s,l,zs,P.placeholder,r,W,ve,r,r,g-q);var ge=this&&this!==It&&this instanceof P?O:s;return Qt(ge,this,W)}return P}function z_(s){return function(l,g,O){var P=et(l);if(!Ht(l)){var q=Ie(g,3);l=Ct(l),g=function(Y){return q(P[Y],Y,P)}}var W=s(l,g,O);return W>-1?P[q?l[W]:W]:r}}function H_(s){return dn(function(l){var g=l.length,O=g,P=vr.prototype.thru;for(s&&l.reverse();O--;){var q=l[O];if(typeof q!="function")throw new pr(a);if(P&&!W&&Vs(q)=="wrapper")var W=new vr([],!0)}for(O=W?O:g;++O<g;){q=l[O];var Y=Vs(q),ne=Y=="wrapper"?Of(q):r;ne&&Pf(ne[0])&&ne[1]==(N|_|R|A)&&!ne[4].length&&ne[9]==1?W=W[Vs(ne[0])].apply(W,ne[3]):W=q.length==1&&Pf(q)?W[Y]():W.thru(q)}return function(){var ve=arguments,ge=ve[0];if(W&&ve.length==1&&Me(ge))return W.plant(ge).value();for(var me=0,xe=g?l[me].apply(this,ve):ge;++me<g;)xe=l[me].call(this,xe);return xe}})}function zs(s,l,g,O,P,q,W,Y,ne,ve){var ge=l&N,me=l&b,xe=l&w,Oe=l&(_|S),Ne=l&L,je=xe?r:Jo(s);function Re(){for(var ke=arguments.length,$e=ue(ke),ir=ke;ir--;)$e[ir]=arguments[ir];if(Oe)var Lt=Gi(Re),or=BL($e,Lt);if(O&&($e=k_($e,O,P,Oe)),q&&($e=L_($e,q,W,Oe)),ke-=or,Oe&&ke<ve){var vt=Pn($e,Lt);return V_(s,l,zs,Re.placeholder,g,$e,vt,Y,ne,ve-ke)}var jr=me?g:this,gn=xe?jr[s]:s;return ke=$e.length,Y?$e=GF($e,Y):Ne&&ke>1&&$e.reverse(),ge&&ne<ke&&($e.length=ne),this&&this!==It&&this instanceof Re&&(gn=je||Jo(gn)),gn.apply(jr,$e)}return Re}function U_(s,l){return function(g,O){return tF(g,s,l(O),{})}}function Hs(s,l){return function(g,O){var P;if(g===r&&O===r)return l;if(g!==r&&(P=g),O!==r){if(P===r)return O;typeof g=="string"||typeof O=="string"?(g=rr(g),O=rr(O)):(g=P_(g),O=P_(O)),P=s(g,O)}return P}}function wf(s){return dn(function(l){return l=st(l,tr(Ie())),qe(function(g){var O=this;return s(l,function(P){return Qt(P,O,g)})})})}function Us(s,l){l=l===r?" ":rr(l);var g=l.length;if(g<2)return g?pf(l,s):l;var O=pf(l,Ns(s/Bi(l)));return Li(l)?Dn(Tr(O),0,s).join(""):O.slice(0,s)}function IF(s,l,g,O){var P=l&b,q=Jo(s);function W(){for(var Y=-1,ne=arguments.length,ve=-1,ge=O.length,me=ue(ge+ne),xe=this&&this!==It&&this instanceof W?q:s;++ve<ge;)me[ve]=O[ve];for(;ne--;)me[ve++]=arguments[++Y];return Qt(xe,P?g:this,me)}return W}function W_(s){return function(l,g,O){return O&&typeof O!="number"&&kt(l,g,O)&&(g=O=r),l=vn(l),g===r?(g=l,l=0):g=vn(g),O=O===r?l<g?1:-1:vn(O),hF(l,g,O,s)}}function Ws(s){return function(l,g){return typeof l=="string"&&typeof g=="string"||(l=br(l),g=br(g)),s(l,g)}}function V_(s,l,g,O,P,q,W,Y,ne,ve){var ge=l&_,me=ge?W:r,xe=ge?r:W,Oe=ge?q:r,Ne=ge?r:q;l|=ge?R:I,l&=~(ge?I:R),l&E||(l&=-4);var je=[s,l,P,Oe,me,Ne,xe,Y,ne,ve],Re=g.apply(r,je);return Pf(s)&&i1(Re,je),Re.placeholder=O,o1(Re,s,l)}function _f(s){var l=Et[s];return function(g,O){if(g=br(g),O=O==null?0:At(De(O),292),O&&o_(g)){var P=(Ke(g)+"e").split("e"),q=l(P[0]+"e"+(+P[1]+O));return P=(Ke(q)+"e").split("e"),+(P[0]+"e"+(+P[1]-O))}return l(g)}}var PF=zi&&1/xs(new zi([,-0]))[1]==Z?function(s){return new zi(s)}:Wf;function G_(s){return function(l){var g=Mt(l);return g==_e?Zl(l):g==Fe?VL(l):LL(l,s(l))}}function fn(s,l,g,O,P,q,W,Y){var ne=l&w;if(!ne&&typeof s!="function")throw new pr(a);var ve=O?O.length:0;if(ve||(l&=-97,O=P=r),W=W===r?W:St(De(W),0),Y=Y===r?Y:De(Y),ve-=P?P.length:0,l&I){var ge=O,me=P;O=P=r}var xe=ne?r:Of(s),Oe=[s,l,g,O,P,ge,me,q,W,Y];if(xe&&UF(Oe,xe),s=Oe[0],l=Oe[1],g=Oe[2],O=Oe[3],P=Oe[4],Y=Oe[9]=Oe[9]===r?ne?0:s.length:St(Oe[9]-ve,0),!Y&&l&(_|S)&&(l&=-25),!l||l==b)var Ne=CF(s,l,g);else l==_||l==S?Ne=RF(s,l,Y):(l==R||l==(b|R))&&!P.length?Ne=IF(s,l,g,O):Ne=zs.apply(r,Oe);var je=xe?R_:i1;return o1(je(Ne,Oe),s,l)}function K_(s,l,g,O){return s===r||Dr(s,$i[g])&&!Ge.call(O,g)?l:s}function Y_(s,l,g,O,P,q){return ft(s)&&ft(l)&&(q.set(l,s),Ls(s,l,r,Y_,q),q.delete(l)),s}function NF(s){return ta(s)?r:s}function X_(s,l,g,O,P,q){var W=g&y,Y=s.length,ne=l.length;if(Y!=ne&&!(W&&ne>Y))return!1;var ve=q.get(s),ge=q.get(l);if(ve&&ge)return ve==l&&ge==s;var me=-1,xe=!0,Oe=g&x?new ti:r;for(q.set(s,l),q.set(l,s);++me<Y;){var Ne=s[me],je=l[me];if(O)var Re=W?O(je,Ne,me,l,s,q):O(Ne,je,me,s,l,q);if(Re!==r){if(Re)continue;xe=!1;break}if(Oe){if(!Wl(l,function(ke,$e){if(!$o(Oe,$e)&&(Ne===ke||P(Ne,ke,g,O,q)))return Oe.push($e)})){xe=!1;break}}else if(!(Ne===je||P(Ne,je,g,O,q))){xe=!1;break}}return q.delete(s),q.delete(l),xe}function TF(s,l,g,O,P,q,W){switch(g){case bt:if(s.byteLength!=l.byteLength||s.byteOffset!=l.byteOffset)return!1;s=s.buffer,l=l.buffer;case rt:return!(s.byteLength!=l.byteLength||!q(new Cs(s),new Cs(l)));case re:case ie:case he:return Dr(+s,+l);case ce:return s.name==l.name&&s.message==l.message;case ze:case Ue:return s==l+"";case _e:var Y=Zl;case Fe:var ne=O&y;if(Y||(Y=xs),s.size!=l.size&&!ne)return!1;var ve=W.get(s);if(ve)return ve==l;O|=x,W.set(s,l);var ge=X_(Y(s),Y(l),O,P,q,W);return W.delete(s),ge;case ct:if(Vo)return Vo.call(s)==Vo.call(l)}return!1}function AF(s,l,g,O,P,q){var W=g&y,Y=Ef(s),ne=Y.length,ve=Ef(l),ge=ve.length;if(ne!=ge&&!W)return!1;for(var me=ne;me--;){var xe=Y[me];if(!(W?xe in l:Ge.call(l,xe)))return!1}var Oe=q.get(s),Ne=q.get(l);if(Oe&&Ne)return Oe==l&&Ne==s;var je=!0;q.set(s,l),q.set(l,s);for(var Re=W;++me<ne;){xe=Y[me];var ke=s[xe],$e=l[xe];if(O)var ir=W?O($e,ke,xe,l,s,q):O(ke,$e,xe,s,l,q);if(!(ir===r?ke===$e||P(ke,$e,g,O,q):ir)){je=!1;break}Re||(Re=xe=="constructor")}if(je&&!Re){var Lt=s.constructor,or=l.constructor;Lt!=or&&"constructor"in s&&"constructor"in l&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof or=="function"&&or instanceof or)&&(je=!1)}return q.delete(s),q.delete(l),je}function dn(s){return Tf(r1(s,r,f1),s+"")}function Ef(s){return g_(s,Ct,Rf)}function Sf(s){return g_(s,Ut,Z_)}var Of=As?function(s){return As.get(s)}:Wf;function Vs(s){for(var l=s.name+"",g=Hi[l],O=Ge.call(Hi,l)?g.length:0;O--;){var P=g[O],q=P.func;if(q==null||q==s)return P.name}return l}function Gi(s){var l=Ge.call(M,"placeholder")?M:s;return l.placeholder}function Ie(){var s=M.iteratee||Hf;return s=s===Hf?b_:s,arguments.length?s(arguments[0],arguments[1]):s}function Gs(s,l){var g=s.__data__;return FF(l)?g[typeof l=="string"?"string":"hash"]:g.map}function Cf(s){for(var l=Ct(s),g=l.length;g--;){var O=l[g],P=s[O];l[g]=[O,P,e1(P)]}return l}function ii(s,l){var g=HL(s,l);return y_(g)?g:r}function MF(s){var l=Ge.call(s,Qn),g=s[Qn];try{s[Qn]=r;var O=!0}catch{}var P=Ss.call(s);return O&&(l?s[Qn]=g:delete s[Qn]),P}var Rf=Ql?function(s){return s==null?[]:(s=et(s),Rn(Ql(s),function(l){return n_.call(s,l)}))}:Vf,Z_=Ql?function(s){for(var l=[];s;)In(l,Rf(s)),s=Rs(s);return l}:Vf,Mt=qt;(ef&&Mt(new ef(new ArrayBuffer(1)))!=bt||Ho&&Mt(new Ho)!=_e||tf&&Mt(tf.resolve())!=Pe||zi&&Mt(new zi)!=Fe||Uo&&Mt(new Uo)!=mt)&&(Mt=function(s){var l=qt(s),g=l==Ee?s.constructor:r,O=g?oi(g):"";if(O)switch(O){case vB:return bt;case gB:return _e;case mB:return Pe;case yB:return Fe;case bB:return mt}return l});function DF(s,l,g){for(var O=-1,P=g.length;++O<P;){var q=g[O],W=q.size;switch(q.type){case"drop":s+=W;break;case"dropRight":l-=W;break;case"take":l=At(l,s+W);break;case"takeRight":s=St(s,l-W);break}}return{start:s,end:l}}function jF(s){var l=s.match(yl);return l?l[1].split(bl):[]}function J_(s,l,g){l=Mn(l,s);for(var O=-1,P=l.length,q=!1;++O<P;){var W=Mr(l[O]);if(!(q=s!=null&&g(s,W)))break;s=s[W]}return q||++O!=P?q:(P=s==null?0:s.length,!!P&&eu(P)&&hn(W,P)&&(Me(s)||ai(s)))}function qF(s){var l=s.length,g=new s.constructor(l);return l&&typeof s[0]=="string"&&Ge.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function Q_(s){return typeof s.constructor=="function"&&!Qo(s)?Ui(Rs(s)):{}}function kF(s,l,g){var O=s.constructor;switch(l){case rt:return xf(s);case re:case ie:return new O(+s);case bt:return xF(s,g);case Jt:case fr:case Dt:case _t:case jt:case Wr:case Yn:case Cn:case dr:return j_(s,g);case _e:return new O;case he:case Ue:return new O(s);case ze:return wF(s);case Fe:return new O;case ct:return _F(s)}}function LF(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(cs,`{
|
|
51
|
-
/* [wrapped with `+
|
|
52
|
-
`)}function BF(s){return Me(s)||ai(s)||!!(i_&&s&&s[i_])}function hn(s,l){var g=typeof s;return l=l??Q,!!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"?Ht(g)&&hn(l,g.length):O=="string"&&l in g)?Dr(g[l],s):!1}function If(s,l){if(Me(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||nr(s)?!0:us.test(s)||!pl.test(s)||l!=null&&s in et(l)}function FF(s){var l=typeof s;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?s!=="__proto__":s===null}function Pf(s){var l=Vs(s),g=M[l];if(typeof g!="function"||!(l in Be.prototype))return!1;if(s===g)return!0;var O=Of(g);return!!O&&s===O[0]}function $F(s){return!!e_&&e_ in s}var zF=_s?pn:Gf;function Qo(s){var l=s&&s.constructor,g=typeof l=="function"&&l.prototype||$i;return s===g}function e1(s){return s===s&&!ft(s)}function t1(s,l){return function(g){return g==null?!1:g[s]===l&&(l!==r||s in et(g))}}function HF(s){var l=Js(s,function(O){return g.size===f&&g.clear(),O}),g=l.cache;return l}function UF(s,l){var g=s[1],O=l[1],P=g|O,q=P<(b|w|N),W=O==N&&g==_||O==N&&g==A&&s[7].length<=l[8]||O==(N|A)&&l[7].length<=l[8]&&g==_;if(!(q||W))return s;O&b&&(s[2]=l[2],P|=g&b?0:E);var Y=l[3];if(Y){var ne=s[3];s[3]=ne?k_(ne,Y,l[4]):Y,s[4]=ne?Pn(s[3],h):l[4]}return Y=l[5],Y&&(ne=s[5],s[5]=ne?L_(ne,Y,l[6]):Y,s[6]=ne?Pn(s[5],h):l[6]),Y=l[7],Y&&(s[7]=Y),O&N&&(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]=P,s}function WF(s){var l=[];if(s!=null)for(var g in et(s))l.push(g);return l}function VF(s){return Ss.call(s)}function r1(s,l,g){return l=St(l===r?s.length-1:l,0),function(){for(var O=arguments,P=-1,q=St(O.length-l,0),W=ue(q);++P<q;)W[P]=O[l+P];P=-1;for(var Y=ue(l+1);++P<l;)Y[P]=O[P];return Y[l]=g(W),Qt(s,this,Y)}}function n1(s,l){return l.length<2?s:ni(s,mr(l,0,-1))}function GF(s,l){for(var g=s.length,O=At(l.length,g),P=zt(s);O--;){var q=l[O];s[O]=hn(q,g)?P[q]:r}return s}function Nf(s,l){if(!(l==="constructor"&&typeof s[l]=="function")&&l!="__proto__")return s[l]}var i1=a1(R_),ea=uB||function(s,l){return It.setTimeout(s,l)},Tf=a1(gF);function o1(s,l,g){var O=l+"";return Tf(s,LF(O,KF(jF(O),g)))}function a1(s){var l=0,g=0;return function(){var O=dB(),P=D-(O-g);if(g=O,P>0){if(++l>=j)return arguments[0]}else l=0;return s.apply(r,arguments)}}function Ks(s,l){var g=-1,O=s.length,P=O-1;for(l=l===r?O:l;++g<l;){var q=hf(g,P),W=s[q];s[q]=s[g],s[g]=W}return s.length=l,s}var s1=HF(function(s){var l=[];return s.charCodeAt(0)===46&&l.push(""),s.replace(vl,function(g,O,P,q){l.push(P?q.replace(wl,"$1"):O||g)}),l});function Mr(s){if(typeof s=="string"||nr(s))return s;var l=s+"";return l=="0"&&1/s==-Z?"-0":l}function oi(s){if(s!=null){try{return Es.call(s)}catch{}try{return s+""}catch{}}return""}function KF(s,l){return er(K,function(g){var O="_."+g[0];l&g[1]&&!ys(s,O)&&s.push(O)}),s.sort()}function u1(s){if(s instanceof Be)return s.clone();var l=new vr(s.__wrapped__,s.__chain__);return l.__actions__=zt(s.__actions__),l.__index__=s.__index__,l.__values__=s.__values__,l}function YF(s,l,g){(g?kt(s,l,g):l===r)?l=1:l=St(De(l),0);var O=s==null?0:s.length;if(!O||l<1)return[];for(var P=0,q=0,W=ue(Ns(O/l));P<O;)W[q++]=mr(s,P,P+=l);return W}function XF(s){for(var l=-1,g=s==null?0:s.length,O=0,P=[];++l<g;){var q=s[l];q&&(P[O++]=q)}return P}function ZF(){var s=arguments.length;if(!s)return[];for(var l=ue(s-1),g=arguments[0],O=s;O--;)l[O-1]=arguments[O];return In(Me(g)?zt(g):[g],Pt(l,1))}var JF=qe(function(s,l){return pt(s)?Ko(s,Pt(l,1,pt,!0)):[]}),QF=qe(function(s,l){var g=yr(l);return pt(g)&&(g=r),pt(s)?Ko(s,Pt(l,1,pt,!0),Ie(g,2)):[]}),e$=qe(function(s,l){var g=yr(l);return pt(g)&&(g=r),pt(s)?Ko(s,Pt(l,1,pt,!0),r,g):[]});function t$(s,l,g){var O=s==null?0:s.length;return O?(l=g||l===r?1:De(l),mr(s,l<0?0:l,O)):[]}function r$(s,l,g){var O=s==null?0:s.length;return O?(l=g||l===r?1:De(l),l=O-l,mr(s,0,l<0?0:l)):[]}function n$(s,l){return s&&s.length?Fs(s,Ie(l,3),!0,!0):[]}function i$(s,l){return s&&s.length?Fs(s,Ie(l,3),!0):[]}function o$(s,l,g,O){var P=s==null?0:s.length;return P?(g&&typeof g!="number"&&kt(s,l,g)&&(g=0,O=P),ZB(s,l,g,O)):[]}function c1(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var P=g==null?0:De(g);return P<0&&(P=St(O+P,0)),bs(s,Ie(l,3),P)}function l1(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var P=O-1;return g!==r&&(P=De(g),P=g<0?St(O+P,0):At(P,O-1)),bs(s,Ie(l,3),P,!0)}function f1(s){var l=s==null?0:s.length;return l?Pt(s,1):[]}function a$(s){var l=s==null?0:s.length;return l?Pt(s,Z):[]}function s$(s,l){var g=s==null?0:s.length;return g?(l=l===r?1:De(l),Pt(s,l)):[]}function u$(s){for(var l=-1,g=s==null?0:s.length,O={};++l<g;){var P=s[l];Vr(O,P[0],P[1])}return O}function d1(s){return s&&s.length?s[0]:r}function c$(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var P=g==null?0:De(g);return P<0&&(P=St(O+P,0)),ki(s,l,P)}function l$(s){var l=s==null?0:s.length;return l?mr(s,0,-1):[]}var f$=qe(function(s){var l=st(s,yf);return l.length&&l[0]===s[0]?uf(l):[]}),d$=qe(function(s){var l=yr(s),g=st(s,yf);return l===yr(g)?l=r:g.pop(),g.length&&g[0]===s[0]?uf(g,Ie(l,2)):[]}),h$=qe(function(s){var l=yr(s),g=st(s,yf);return l=typeof l=="function"?l:r,l&&g.pop(),g.length&&g[0]===s[0]?uf(g,r,l):[]});function p$(s,l){return s==null?"":lB.call(s,l)}function yr(s){var l=s==null?0:s.length;return l?s[l-1]:r}function v$(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var P=O;return g!==r&&(P=De(g),P=P<0?St(O+P,0):At(P,O-1)),l===l?KL(s,l,P):bs(s,Vw,P,!0)}function g$(s,l){return s&&s.length?E_(s,De(l)):r}var m$=qe(h1);function h1(s,l){return s&&s.length&&l&&l.length?df(s,l):s}function y$(s,l,g){return s&&s.length&&l&&l.length?df(s,l,Ie(g,2)):s}function b$(s,l,g){return s&&s.length&&l&&l.length?df(s,l,r,g):s}var x$=dn(function(s,l){var g=s==null?0:s.length,O=nf(s,l);return C_(s,st(l,function(P){return hn(P,g)?+P:P}).sort(q_)),O});function w$(s,l){var g=[];if(!(s&&s.length))return g;var O=-1,P=[],q=s.length;for(l=Ie(l,3);++O<q;){var W=s[O];l(W,O,s)&&(g.push(W),P.push(O))}return C_(s,P),g}function Af(s){return s==null?s:pB.call(s)}function _$(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:De(l),g=g===r?O:De(g)),mr(s,l,g)):[]}function E$(s,l){return Bs(s,l)}function S$(s,l,g){return vf(s,l,Ie(g,2))}function O$(s,l){var g=s==null?0:s.length;if(g){var O=Bs(s,l);if(O<g&&Dr(s[O],l))return O}return-1}function C$(s,l){return Bs(s,l,!0)}function R$(s,l,g){return vf(s,l,Ie(g,2),!0)}function I$(s,l){var g=s==null?0:s.length;if(g){var O=Bs(s,l,!0)-1;if(Dr(s[O],l))return O}return-1}function P$(s){return s&&s.length?I_(s):[]}function N$(s,l){return s&&s.length?I_(s,Ie(l,2)):[]}function T$(s){var l=s==null?0:s.length;return l?mr(s,1,l):[]}function A$(s,l,g){return s&&s.length?(l=g||l===r?1:De(l),mr(s,0,l<0?0:l)):[]}function M$(s,l,g){var O=s==null?0:s.length;return O?(l=g||l===r?1:De(l),l=O-l,mr(s,l<0?0:l,O)):[]}function D$(s,l){return s&&s.length?Fs(s,Ie(l,3),!1,!0):[]}function j$(s,l){return s&&s.length?Fs(s,Ie(l,3)):[]}var q$=qe(function(s){return An(Pt(s,1,pt,!0))}),k$=qe(function(s){var l=yr(s);return pt(l)&&(l=r),An(Pt(s,1,pt,!0),Ie(l,2))}),L$=qe(function(s){var l=yr(s);return l=typeof l=="function"?l:r,An(Pt(s,1,pt,!0),r,l)});function B$(s){return s&&s.length?An(s):[]}function F$(s,l){return s&&s.length?An(s,Ie(l,2)):[]}function $$(s,l){return l=typeof l=="function"?l:r,s&&s.length?An(s,r,l):[]}function Mf(s){if(!(s&&s.length))return[];var l=0;return s=Rn(s,function(g){if(pt(g))return l=St(g.length,l),!0}),Yl(l,function(g){return st(s,Vl(g))})}function p1(s,l){if(!(s&&s.length))return[];var g=Mf(s);return l==null?g:st(g,function(O){return Qt(l,r,O)})}var z$=qe(function(s,l){return pt(s)?Ko(s,l):[]}),H$=qe(function(s){return mf(Rn(s,pt))}),U$=qe(function(s){var l=yr(s);return pt(l)&&(l=r),mf(Rn(s,pt),Ie(l,2))}),W$=qe(function(s){var l=yr(s);return l=typeof l=="function"?l:r,mf(Rn(s,pt),r,l)}),V$=qe(Mf);function G$(s,l){return A_(s||[],l||[],Go)}function K$(s,l){return A_(s||[],l||[],Zo)}var Y$=qe(function(s){var l=s.length,g=l>1?s[l-1]:r;return g=typeof g=="function"?(s.pop(),g):r,p1(s,g)});function v1(s){var l=M(s);return l.__chain__=!0,l}function X$(s,l){return l(s),s}function Ys(s,l){return l(s)}var Z$=dn(function(s){var l=s.length,g=l?s[0]:0,O=this.__wrapped__,P=function(q){return nf(q,s)};return l>1||this.__actions__.length||!(O instanceof Be)||!hn(g)?this.thru(P):(O=O.slice(g,+g+(l?1:0)),O.__actions__.push({func:Ys,args:[P],thisArg:r}),new vr(O,this.__chain__).thru(function(q){return l&&!q.length&&q.push(r),q}))});function J$(){return v1(this)}function Q$(){return new vr(this.value(),this.__chain__)}function e3(){this.__values__===r&&(this.__values__=P1(this.value()));var s=this.__index__>=this.__values__.length,l=s?r:this.__values__[this.__index__++];return{done:s,value:l}}function t3(){return this}function r3(s){for(var l,g=this;g instanceof Ds;){var O=u1(g);O.__index__=0,O.__values__=r,l?P.__wrapped__=O:l=O;var P=O;g=g.__wrapped__}return P.__wrapped__=s,l}function n3(){var s=this.__wrapped__;if(s instanceof Be){var l=s;return this.__actions__.length&&(l=new Be(this)),l=l.reverse(),l.__actions__.push({func:Ys,args:[Af],thisArg:r}),new vr(l,this.__chain__)}return this.thru(Af)}function i3(){return T_(this.__wrapped__,this.__actions__)}var o3=$s(function(s,l,g){Ge.call(s,g)?++s[g]:Vr(s,g,1)});function a3(s,l,g){var O=Me(s)?Uw:XB;return g&&kt(s,l,g)&&(l=r),O(s,Ie(l,3))}function s3(s,l){var g=Me(s)?Rn:p_;return g(s,Ie(l,3))}var u3=z_(c1),c3=z_(l1);function l3(s,l){return Pt(Xs(s,l),1)}function f3(s,l){return Pt(Xs(s,l),Z)}function d3(s,l,g){return g=g===r?1:De(g),Pt(Xs(s,l),g)}function g1(s,l){var g=Me(s)?er:Tn;return g(s,Ie(l,3))}function m1(s,l){var g=Me(s)?TL:h_;return g(s,Ie(l,3))}var h3=$s(function(s,l,g){Ge.call(s,g)?s[g].push(l):Vr(s,g,[l])});function p3(s,l,g,O){s=Ht(s)?s:Yi(s),g=g&&!O?De(g):0;var P=s.length;return g<0&&(g=St(P+g,0)),tu(s)?g<=P&&s.indexOf(l,g)>-1:!!P&&ki(s,l,g)>-1}var v3=qe(function(s,l,g){var O=-1,P=typeof l=="function",q=Ht(s)?ue(s.length):[];return Tn(s,function(W){q[++O]=P?Qt(l,W,g):Yo(W,l,g)}),q}),g3=$s(function(s,l,g){Vr(s,g,l)});function Xs(s,l){var g=Me(s)?st:x_;return g(s,Ie(l,3))}function m3(s,l,g,O){return s==null?[]:(Me(l)||(l=l==null?[]:[l]),g=O?r:g,Me(g)||(g=g==null?[]:[g]),S_(s,l,g))}var y3=$s(function(s,l,g){s[g?0:1].push(l)},function(){return[[],[]]});function b3(s,l,g){var O=Me(s)?Ul:Kw,P=arguments.length<3;return O(s,Ie(l,4),g,P,Tn)}function x3(s,l,g){var O=Me(s)?AL:Kw,P=arguments.length<3;return O(s,Ie(l,4),g,P,h_)}function w3(s,l){var g=Me(s)?Rn:p_;return g(s,Qs(Ie(l,3)))}function _3(s){var l=Me(s)?c_:pF;return l(s)}function E3(s,l,g){(g?kt(s,l,g):l===r)?l=1:l=De(l);var O=Me(s)?WB:vF;return O(s,l)}function S3(s){var l=Me(s)?VB:mF;return l(s)}function O3(s){if(s==null)return 0;if(Ht(s))return tu(s)?Bi(s):s.length;var l=Mt(s);return l==_e||l==Fe?s.size:lf(s).length}function C3(s,l,g){var O=Me(s)?Wl:yF;return g&&kt(s,l,g)&&(l=r),O(s,Ie(l,3))}var R3=qe(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]]),S_(s,Pt(l,1),[])}),Zs=sB||function(){return It.Date.now()};function I3(s,l){if(typeof l!="function")throw new pr(a);return s=De(s),function(){if(--s<1)return l.apply(this,arguments)}}function y1(s,l,g){return l=g?r:l,l=s&&l==null?s.length:l,fn(s,N,r,r,r,r,l)}function b1(s,l){var g;if(typeof l!="function")throw new pr(a);return s=De(s),function(){return--s>0&&(g=l.apply(this,arguments)),s<=1&&(l=r),g}}var Df=qe(function(s,l,g){var O=b;if(g.length){var P=Pn(g,Gi(Df));O|=R}return fn(s,O,l,g,P)}),x1=qe(function(s,l,g){var O=b|w;if(g.length){var P=Pn(g,Gi(x1));O|=R}return fn(l,O,s,g,P)});function w1(s,l,g){l=g?r:l;var O=fn(s,_,r,r,r,r,r,l);return O.placeholder=w1.placeholder,O}function _1(s,l,g){l=g?r:l;var O=fn(s,S,r,r,r,r,r,l);return O.placeholder=_1.placeholder,O}function E1(s,l,g){var O,P,q,W,Y,ne,ve=0,ge=!1,me=!1,xe=!0;if(typeof s!="function")throw new pr(a);l=br(l)||0,ft(g)&&(ge=!!g.leading,me="maxWait"in g,q=me?St(br(g.maxWait)||0,l):q,xe="trailing"in g?!!g.trailing:xe);function Oe(vt){var jr=O,gn=P;return O=P=r,ve=vt,W=s.apply(gn,jr),W}function Ne(vt){return ve=vt,Y=ea(ke,l),ge?Oe(vt):W}function je(vt){var jr=vt-ne,gn=vt-ve,H1=l-jr;return me?At(H1,q-gn):H1}function Re(vt){var jr=vt-ne,gn=vt-ve;return ne===r||jr>=l||jr<0||me&&gn>=q}function ke(){var vt=Zs();if(Re(vt))return $e(vt);Y=ea(ke,je(vt))}function $e(vt){return Y=r,xe&&O?Oe(vt):(O=P=r,W)}function ir(){Y!==r&&M_(Y),ve=0,O=ne=P=Y=r}function Lt(){return Y===r?W:$e(Zs())}function or(){var vt=Zs(),jr=Re(vt);if(O=arguments,P=this,ne=vt,jr){if(Y===r)return Ne(ne);if(me)return M_(Y),Y=ea(ke,l),Oe(ne)}return Y===r&&(Y=ea(ke,l)),W}return or.cancel=ir,or.flush=Lt,or}var P3=qe(function(s,l){return d_(s,1,l)}),N3=qe(function(s,l,g){return d_(s,br(l)||0,g)});function T3(s){return fn(s,L)}function Js(s,l){if(typeof s!="function"||l!=null&&typeof l!="function")throw new pr(a);var g=function(){var O=arguments,P=l?l.apply(this,O):O[0],q=g.cache;if(q.has(P))return q.get(P);var W=s.apply(this,O);return g.cache=q.set(P,W)||q,W};return g.cache=new(Js.Cache||ln),g}Js.Cache=ln;function Qs(s){if(typeof s!="function")throw new pr(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 A3(s){return b1(2,s)}var M3=bF(function(s,l){l=l.length==1&&Me(l[0])?st(l[0],tr(Ie())):st(Pt(l,1),tr(Ie()));var g=l.length;return qe(function(O){for(var P=-1,q=At(O.length,g);++P<q;)O[P]=l[P].call(this,O[P]);return Qt(s,this,O)})}),jf=qe(function(s,l){var g=Pn(l,Gi(jf));return fn(s,R,r,l,g)}),S1=qe(function(s,l){var g=Pn(l,Gi(S1));return fn(s,I,r,l,g)}),D3=dn(function(s,l){return fn(s,A,r,r,r,l)});function j3(s,l){if(typeof s!="function")throw new pr(a);return l=l===r?l:De(l),qe(s,l)}function q3(s,l){if(typeof s!="function")throw new pr(a);return l=l==null?0:St(De(l),0),qe(function(g){var O=g[l],P=Dn(g,0,l);return O&&In(P,O),Qt(s,this,P)})}function k3(s,l,g){var O=!0,P=!0;if(typeof s!="function")throw new pr(a);return ft(g)&&(O="leading"in g?!!g.leading:O,P="trailing"in g?!!g.trailing:P),E1(s,l,{leading:O,maxWait:l,trailing:P})}function L3(s){return y1(s,1)}function B3(s,l){return jf(bf(l),s)}function F3(){if(!arguments.length)return[];var s=arguments[0];return Me(s)?s:[s]}function $3(s){return gr(s,m)}function z3(s,l){return l=typeof l=="function"?l:r,gr(s,m,l)}function H3(s){return gr(s,p|m)}function U3(s,l){return l=typeof l=="function"?l:r,gr(s,p|m,l)}function W3(s,l){return l==null||f_(s,l,Ct(l))}function Dr(s,l){return s===l||s!==s&&l!==l}var V3=Ws(sf),G3=Ws(function(s,l){return s>=l}),ai=m_((function(){return arguments})())?m_:function(s){return dt(s)&&Ge.call(s,"callee")&&!n_.call(s,"callee")},Me=ue.isArray,K3=Lw?tr(Lw):rF;function Ht(s){return s!=null&&eu(s.length)&&!pn(s)}function pt(s){return dt(s)&&Ht(s)}function Y3(s){return s===!0||s===!1||dt(s)&&qt(s)==re}var jn=cB||Gf,X3=Bw?tr(Bw):nF;function Z3(s){return dt(s)&&s.nodeType===1&&!ta(s)}function J3(s){if(s==null)return!0;if(Ht(s)&&(Me(s)||typeof s=="string"||typeof s.splice=="function"||jn(s)||Ki(s)||ai(s)))return!s.length;var l=Mt(s);if(l==_e||l==Fe)return!s.size;if(Qo(s))return!lf(s).length;for(var g in s)if(Ge.call(s,g))return!1;return!0}function Q3(s,l){return Xo(s,l)}function ez(s,l,g){g=typeof g=="function"?g:r;var O=g?g(s,l):r;return O===r?Xo(s,l,r,g):!!O}function qf(s){if(!dt(s))return!1;var l=qt(s);return l==ce||l==se||typeof s.message=="string"&&typeof s.name=="string"&&!ta(s)}function tz(s){return typeof s=="number"&&o_(s)}function pn(s){if(!ft(s))return!1;var l=qt(s);return l==be||l==Ce||l==z||l==Ze}function O1(s){return typeof s=="number"&&s==De(s)}function eu(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Q}function ft(s){var l=typeof s;return s!=null&&(l=="object"||l=="function")}function dt(s){return s!=null&&typeof s=="object"}var C1=Fw?tr(Fw):oF;function rz(s,l){return s===l||cf(s,l,Cf(l))}function nz(s,l,g){return g=typeof g=="function"?g:r,cf(s,l,Cf(l),g)}function iz(s){return R1(s)&&s!=+s}function oz(s){if(zF(s))throw new Ae(o);return y_(s)}function az(s){return s===null}function sz(s){return s==null}function R1(s){return typeof s=="number"||dt(s)&&qt(s)==he}function ta(s){if(!dt(s)||qt(s)!=Ee)return!1;var l=Rs(s);if(l===null)return!0;var g=Ge.call(l,"constructor")&&l.constructor;return typeof g=="function"&&g instanceof g&&Es.call(g)==nB}var kf=$w?tr($w):aF;function uz(s){return O1(s)&&s>=-Q&&s<=Q}var I1=zw?tr(zw):sF;function tu(s){return typeof s=="string"||!Me(s)&&dt(s)&&qt(s)==Ue}function nr(s){return typeof s=="symbol"||dt(s)&&qt(s)==ct}var Ki=Hw?tr(Hw):uF;function cz(s){return s===r}function lz(s){return dt(s)&&Mt(s)==mt}function fz(s){return dt(s)&&qt(s)==yt}var dz=Ws(ff),hz=Ws(function(s,l){return s<=l});function P1(s){if(!s)return[];if(Ht(s))return tu(s)?Tr(s):zt(s);if(zo&&s[zo])return WL(s[zo]());var l=Mt(s),g=l==_e?Zl:l==Fe?xs:Yi;return g(s)}function vn(s){if(!s)return s===0?s:0;if(s=br(s),s===Z||s===-Z){var l=s<0?-1:1;return l*V}return s===s?s:0}function De(s){var l=vn(s),g=l%1;return l===l?g?l-g:l:0}function N1(s){return s?ri(De(s),0,oe):0}function br(s){if(typeof s=="number")return s;if(nr(s))return ee;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=Yw(s);var g=Sl.test(s);return g||Cl.test(s)?IL(s.slice(2),g?2:8):El.test(s)?ee:+s}function T1(s){return Kr(s,Ut(s))}function pz(s){return s?ri(De(s),-Q,Q):s===0?s:0}function Ke(s){return s==null?"":rr(s)}var vz=Wi(function(s,l){if(Qo(l)||Ht(l)){Kr(l,Ct(l),s);return}for(var g in l)Ge.call(l,g)&&Go(s,g,l[g])}),A1=Wi(function(s,l){Kr(l,Ut(l),s)}),M1=Wi(function(s,l,g,O){Kr(l,Ut(l),s,O)}),Lf=Wi(function(s,l,g,O){Kr(l,Ct(l),s,O)}),gz=dn(nf);function mz(s,l){var g=Ui(s);return l==null?g:l_(g,l)}var yz=qe(function(s,l){s=et(s);var g=-1,O=l.length,P=O>2?l[2]:r;for(P&&kt(l[0],l[1],P)&&(O=1);++g<O;)for(var q=l[g],W=Ut(q),Y=-1,ne=W.length;++Y<ne;){var ve=W[Y],ge=s[ve];(ge===r||Dr(ge,$i[ve])&&!Ge.call(s,ve))&&(s[ve]=q[ve])}return s}),bz=qe(function(s){return s.push(r,Y_),Qt(D1,r,s)});function xz(s,l){return Ww(s,Ie(l,3),Gr)}function wz(s,l){return Ww(s,Ie(l,3),af)}function _z(s,l){return s==null?s:of(s,Ie(l,3),Ut)}function Ez(s,l){return s==null?s:v_(s,Ie(l,3),Ut)}function Sz(s,l){return s&&Gr(s,Ie(l,3))}function Oz(s,l){return s&&af(s,Ie(l,3))}function Cz(s){return s==null?[]:ks(s,Ct(s))}function Rz(s){return s==null?[]:ks(s,Ut(s))}function Bf(s,l,g){var O=s==null?r:ni(s,l);return O===r?g:O}function Iz(s,l){return s!=null&&J_(s,l,JB)}function Ff(s,l){return s!=null&&J_(s,l,QB)}var Pz=U_(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=Ss.call(l)),s[l]=g},zf(Wt)),Nz=U_(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=Ss.call(l)),Ge.call(s,l)?s[l].push(g):s[l]=[g]},Ie),Tz=qe(Yo);function Ct(s){return Ht(s)?u_(s):lf(s)}function Ut(s){return Ht(s)?u_(s,!0):cF(s)}function Az(s,l){var g={};return l=Ie(l,3),Gr(s,function(O,P,q){Vr(g,l(O,P,q),O)}),g}function Mz(s,l){var g={};return l=Ie(l,3),Gr(s,function(O,P,q){Vr(g,P,l(O,P,q))}),g}var Dz=Wi(function(s,l,g){Ls(s,l,g)}),D1=Wi(function(s,l,g,O){Ls(s,l,g,O)}),jz=dn(function(s,l){var g={};if(s==null)return g;var O=!1;l=st(l,function(q){return q=Mn(q,s),O||(O=q.length>1),q}),Kr(s,Sf(s),g),O&&(g=gr(g,p|v|m,NF));for(var P=l.length;P--;)gf(g,l[P]);return g});function qz(s,l){return j1(s,Qs(Ie(l)))}var kz=dn(function(s,l){return s==null?{}:fF(s,l)});function j1(s,l){if(s==null)return{};var g=st(Sf(s),function(O){return[O]});return l=Ie(l),O_(s,g,function(O,P){return l(O,P[0])})}function Lz(s,l,g){l=Mn(l,s);var O=-1,P=l.length;for(P||(P=1,s=r);++O<P;){var q=s==null?r:s[Mr(l[O])];q===r&&(O=P,q=g),s=pn(q)?q.call(s):q}return s}function Bz(s,l,g){return s==null?s:Zo(s,l,g)}function Fz(s,l,g,O){return O=typeof O=="function"?O:r,s==null?s:Zo(s,l,g,O)}var q1=G_(Ct),k1=G_(Ut);function $z(s,l,g){var O=Me(s),P=O||jn(s)||Ki(s);if(l=Ie(l,4),g==null){var q=s&&s.constructor;P?g=O?new q:[]:ft(s)?g=pn(q)?Ui(Rs(s)):{}:g={}}return(P?er:Gr)(s,function(W,Y,ne){return l(g,W,Y,ne)}),g}function zz(s,l){return s==null?!0:gf(s,l)}function Hz(s,l,g){return s==null?s:N_(s,l,bf(g))}function Uz(s,l,g,O){return O=typeof O=="function"?O:r,s==null?s:N_(s,l,bf(g),O)}function Yi(s){return s==null?[]:Xl(s,Ct(s))}function Wz(s){return s==null?[]:Xl(s,Ut(s))}function Vz(s,l,g){return g===r&&(g=l,l=r),g!==r&&(g=br(g),g=g===g?g:0),l!==r&&(l=br(l),l=l===l?l:0),ri(br(s),l,g)}function Gz(s,l,g){return l=vn(l),g===r?(g=l,l=0):g=vn(g),s=br(s),eF(s,l,g)}function Kz(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=vn(s),l===r?(l=s,s=0):l=vn(l)),s>l){var O=s;s=l,l=O}if(g||s%1||l%1){var P=a_();return At(s+P*(l-s+RL("1e-"+((P+"").length-1))),l)}return hf(s,l)}var Yz=Vi(function(s,l,g){return l=l.toLowerCase(),s+(g?L1(l):l)});function L1(s){return $f(Ke(s).toLowerCase())}function B1(s){return s=Ke(s),s&&s.replace(Il,FL).replace(mL,"")}function Xz(s,l,g){s=Ke(s),l=rr(l);var O=s.length;g=g===r?O:ri(De(g),0,O);var P=g;return g-=l.length,g>=0&&s.slice(g,P)==l}function Zz(s){return s=Ke(s),s&&dl.test(s)?s.replace(os,$L):s}function Jz(s){return s=Ke(s),s&&gl.test(s)?s.replace(Ai,"\\$&"):s}var Qz=Vi(function(s,l,g){return s+(g?"-":"")+l.toLowerCase()}),e5=Vi(function(s,l,g){return s+(g?" ":"")+l.toLowerCase()}),t5=$_("toLowerCase");function r5(s,l,g){s=Ke(s),l=De(l);var O=l?Bi(s):0;if(!l||O>=l)return s;var P=(l-O)/2;return Us(Ts(P),g)+s+Us(Ns(P),g)}function n5(s,l,g){s=Ke(s),l=De(l);var O=l?Bi(s):0;return l&&O<l?s+Us(l-O,g):s}function i5(s,l,g){s=Ke(s),l=De(l);var O=l?Bi(s):0;return l&&O<l?Us(l-O,g)+s:s}function o5(s,l,g){return g||l==null?l=0:l&&(l=+l),hB(Ke(s).replace(Mi,""),l||0)}function a5(s,l,g){return(g?kt(s,l,g):l===r)?l=1:l=De(l),pf(Ke(s),l)}function s5(){var s=arguments,l=Ke(s[0]);return s.length<3?l:l.replace(s[1],s[2])}var u5=Vi(function(s,l,g){return s+(g?"_":"")+l.toLowerCase()});function c5(s,l,g){return g&&typeof g!="number"&&kt(s,l,g)&&(l=g=r),g=g===r?oe:g>>>0,g?(s=Ke(s),s&&(typeof l=="string"||l!=null&&!kf(l))&&(l=rr(l),!l&&Li(s))?Dn(Tr(s),0,g):s.split(l,g)):[]}var l5=Vi(function(s,l,g){return s+(g?" ":"")+$f(l)});function f5(s,l,g){return s=Ke(s),g=g==null?0:ri(De(g),0,s.length),l=rr(l),s.slice(g,g+l.length)==l}function d5(s,l,g){var O=M.templateSettings;g&&kt(s,l,g)&&(l=r),s=Ke(s),l=Lf({},l,O,K_);var P=Lf({},l.imports,O.imports,K_),q=Ct(P),W=Xl(P,q);er(q,function(Re){if(ls.test(Re))throw new Ae(c)});var Y,ne,ve=0,ge=l.interpolate||Xn,me="__p += '",xe=Jl((l.escape||Xn).source+"|"+ge.source+"|"+(ge===jo?_l:Xn).source+"|"+(l.evaluate||Xn).source+"|$","g"),Oe="//# sourceURL="+(Ge.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++_L+"]")+`
|
|
53
|
-
`;s.replace(
|
|
50
|
+
*/var TZ=Aa.exports,DN;function AZ(){return DN||(DN=1,(function(e,t){(function(){var r,n="4.18.1",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`",l="Invalid `imports` option passed into `_.template`",d="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",p=1,v=2,m=4,y=1,x=2,b=1,w=2,E=4,_=8,S=16,R=32,I=64,P=128,A=256,k=512,L=30,$="...",j=800,D=16,G=1,B=2,Y=3,Z=1/0,te=9007199254740991,U=17976931348623157e292,re=NaN,ae=4294967295,le=ae-1,F=ae>>>1,W=[["ary",P],["bind",b],["bindKey",w],["curry",_],["curryRight",S],["flip",k],["partial",R],["partialRight",I],["rearg",A]],J="[object Arguments]",H="[object Array]",K="[object AsyncFunction]",se="[object Boolean]",oe="[object Date]",fe="[object DOMException]",V="[object Error]",ee="[object Function]",we="[object GeneratorFunction]",be="[object Map]",de="[object Number]",ue="[object Null]",Ee="[object Object]",Pe="[object Promise]",Ze="[object Proxy]",ze="[object RegExp]",Fe="[object Set]",Ve="[object String]",lt="[object Symbol]",ct="[object Undefined]",mt="[object WeakMap]",yt="[object WeakSet]",rt="[object ArrayBuffer]",bt="[object DataView]",Jt="[object Float32Array]",fr="[object Float64Array]",Dt="[object Int8Array]",_t="[object Int16Array]",jt="[object Int32Array]",Ur="[object Uint8Array]",Yn="[object Uint8ClampedArray]",Cn="[object Uint16Array]",dr="[object Uint32Array]",Mi=/\b__p \+= '';/g,vc=/\b(__p \+=) '' \+/g,gc=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ko=/&(?:amp|lt|gt|quot|#39);/g,ls=/[&<>"']/g,cs=RegExp(ko.source),mc=RegExp(ls.source),fs=/<%-([\s\S]+?)%>/g,yc=/<%([\s\S]+?)%>/g,Lo=/<%=([\s\S]+?)%>/g,bc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ds=/^\w*$/,xc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Di=/[\\^$.*+?()[\]{}|]/g,wc=RegExp(Di.source),ji=/^\s+/,_c=/\s/,hs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ec=/\{\n\/\* \[wrapped with (.+)\] \*/,Sc=/,? & /,Oc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ps=/[()=,{}\[\]\/\s]/,Cc=/\\(\\)?/g,Rc=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vs=/\w*$/,Ic=/^[-+]0x[0-9a-f]+$/i,Pc=/^0b[01]+$/i,Nc=/^\[object .+?Constructor\]$/,Tc=/^0o[0-7]+$/i,Ac=/^(?:0|[1-9]\d*)$/,Mc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xn=/($^)/,Dc=/['\n\r\u2028\u2029\\]/g,qi="\\ud800-\\udfff",jc="\\u0300-\\u036f",gs="\\ufe20-\\ufe2f",qc="\\u20d0-\\u20ff",Bo=jc+gs+qc,ms="\\u2700-\\u27bf",Fo="a-z\\xdf-\\xf6\\xf8-\\xff",kc="\\xac\\xb1\\xd7\\xf7",ys="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Lc="\\u2000-\\u206f",Bc=" \\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",$o="A-Z\\xc0-\\xd6\\xd8-\\xde",bs="\\ufe0e\\ufe0f",xs=kc+ys+Lc+Bc,zo="['’]",Fc="["+qi+"]",Ho="["+xs+"]",ki="["+Bo+"]",Zn="\\d+",$c="["+ms+"]",ws="["+Fo+"]",Tw="[^"+qi+xs+Zn+ms+Fo+$o+"]",zc="\\ud83c[\\udffb-\\udfff]",mL="(?:"+ki+"|"+zc+")",Aw="[^"+qi+"]",Hc="(?:\\ud83c[\\udde6-\\uddff]){2}",Vc="[\\ud800-\\udbff][\\udc00-\\udfff]",Li="["+$o+"]",Mw="\\u200d",Dw="(?:"+ws+"|"+Tw+")",yL="(?:"+Li+"|"+Tw+")",jw="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",qw="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",kw=mL+"?",Lw="["+bs+"]?",bL="(?:"+Mw+"(?:"+[Aw,Hc,Vc].join("|")+")"+Lw+kw+")*",xL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Bw=Lw+kw+bL,_L="(?:"+[$c,Hc,Vc].join("|")+")"+Bw,EL="(?:"+[Aw+ki+"?",ki,Hc,Vc,Fc].join("|")+")",SL=RegExp(zo,"g"),OL=RegExp(ki,"g"),Uc=RegExp(zc+"(?="+zc+")|"+EL+Bw,"g"),CL=RegExp([Li+"?"+ws+"+"+jw+"(?="+[Ho,Li,"$"].join("|")+")",yL+"+"+qw+"(?="+[Ho,Li+Dw,"$"].join("|")+")",Li+"?"+Dw+"+"+jw,Li+"+"+qw,wL,xL,Zn,_L].join("|"),"g"),RL=RegExp("["+Mw+qi+Bo+bs+"]"),IL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,PL=["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"],NL=-1,at={};at[Jt]=at[fr]=at[Dt]=at[_t]=at[jt]=at[Ur]=at[Yn]=at[Cn]=at[dr]=!0,at[J]=at[H]=at[rt]=at[se]=at[bt]=at[oe]=at[V]=at[ee]=at[be]=at[de]=at[Ee]=at[ze]=at[Fe]=at[Ve]=at[mt]=!1;var nt={};nt[J]=nt[H]=nt[rt]=nt[bt]=nt[se]=nt[oe]=nt[Jt]=nt[fr]=nt[Dt]=nt[_t]=nt[jt]=nt[be]=nt[de]=nt[Ee]=nt[ze]=nt[Fe]=nt[Ve]=nt[lt]=nt[Ur]=nt[Yn]=nt[Cn]=nt[dr]=!0,nt[V]=nt[ee]=nt[mt]=!1;var TL={À:"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"},AL={"&":"&","<":"<",">":">",'"':""","'":"'"},ML={"&":"&","<":"<",">":">",""":'"',"'":"'"},DL={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jL=parseFloat,qL=parseInt,Fw=typeof ht=="object"&&ht&&ht.Object===Object&&ht,kL=typeof self=="object"&&self&&self.Object===Object&&self,It=Fw||kL||Function("return this")(),Wc=t&&!t.nodeType&&t,Jn=Wc&&!0&&e&&!e.nodeType&&e,$w=Jn&&Jn.exports===Wc,Gc=$w&&Fw.process,hr=(function(){try{var ne=Jn&&Jn.require&&Jn.require("util").types;return ne||Gc&&Gc.binding&&Gc.binding("util")}catch{}})(),zw=hr&&hr.isArrayBuffer,Hw=hr&&hr.isDate,Vw=hr&&hr.isMap,Uw=hr&&hr.isRegExp,Ww=hr&&hr.isSet,Gw=hr&&hr.isTypedArray;function Qt(ne,pe,ce){switch(ce.length){case 0:return ne.call(pe);case 1:return ne.call(pe,ce[0]);case 2:return ne.call(pe,ce[0],ce[1]);case 3:return ne.call(pe,ce[0],ce[1],ce[2])}return ne.apply(pe,ce)}function LL(ne,pe,ce,Oe){for(var Ae=-1,Ue=ne==null?0:ne.length;++Ae<Ue;){var Et=ne[Ae];pe(Oe,Et,ce(Et),ne)}return Oe}function er(ne,pe){for(var ce=-1,Oe=ne==null?0:ne.length;++ce<Oe&&pe(ne[ce],ce,ne)!==!1;);return ne}function BL(ne,pe){for(var ce=ne==null?0:ne.length;ce--&&pe(ne[ce],ce,ne)!==!1;);return ne}function Kw(ne,pe){for(var ce=-1,Oe=ne==null?0:ne.length;++ce<Oe;)if(!pe(ne[ce],ce,ne))return!1;return!0}function Rn(ne,pe){for(var ce=-1,Oe=ne==null?0:ne.length,Ae=0,Ue=[];++ce<Oe;){var Et=ne[ce];pe(Et,ce,ne)&&(Ue[Ae++]=Et)}return Ue}function _s(ne,pe){var ce=ne==null?0:ne.length;return!!ce&&Bi(ne,pe,0)>-1}function Kc(ne,pe,ce){for(var Oe=-1,Ae=ne==null?0:ne.length;++Oe<Ae;)if(ce(pe,ne[Oe]))return!0;return!1}function st(ne,pe){for(var ce=-1,Oe=ne==null?0:ne.length,Ae=Array(Oe);++ce<Oe;)Ae[ce]=pe(ne[ce],ce,ne);return Ae}function In(ne,pe){for(var ce=-1,Oe=pe.length,Ae=ne.length;++ce<Oe;)ne[Ae+ce]=pe[ce];return ne}function Yc(ne,pe,ce,Oe){var Ae=-1,Ue=ne==null?0:ne.length;for(Oe&&Ue&&(ce=ne[++Ae]);++Ae<Ue;)ce=pe(ce,ne[Ae],Ae,ne);return ce}function FL(ne,pe,ce,Oe){var Ae=ne==null?0:ne.length;for(Oe&&Ae&&(ce=ne[--Ae]);Ae--;)ce=pe(ce,ne[Ae],Ae,ne);return ce}function Xc(ne,pe){for(var ce=-1,Oe=ne==null?0:ne.length;++ce<Oe;)if(pe(ne[ce],ce,ne))return!0;return!1}var $L=Zc("length");function zL(ne){return ne.split("")}function HL(ne){return ne.match(Oc)||[]}function Yw(ne,pe,ce){var Oe;return ce(ne,function(Ae,Ue,Et){if(pe(Ae,Ue,Et))return Oe=Ue,!1}),Oe}function Es(ne,pe,ce,Oe){for(var Ae=ne.length,Ue=ce+(Oe?1:-1);Oe?Ue--:++Ue<Ae;)if(pe(ne[Ue],Ue,ne))return Ue;return-1}function Bi(ne,pe,ce){return pe===pe?tB(ne,pe,ce):Es(ne,Xw,ce)}function VL(ne,pe,ce,Oe){for(var Ae=ce-1,Ue=ne.length;++Ae<Ue;)if(Oe(ne[Ae],pe))return Ae;return-1}function Xw(ne){return ne!==ne}function Zw(ne,pe){var ce=ne==null?0:ne.length;return ce?Qc(ne,pe)/ce:re}function Zc(ne){return function(pe){return pe==null?r:pe[ne]}}function Jc(ne){return function(pe){return ne==null?r:ne[pe]}}function Jw(ne,pe,ce,Oe,Ae){return Ae(ne,function(Ue,Et,et){ce=Oe?(Oe=!1,Ue):pe(ce,Ue,Et,et)}),ce}function UL(ne,pe){var ce=ne.length;for(ne.sort(pe);ce--;)ne[ce]=ne[ce].value;return ne}function Qc(ne,pe){for(var ce,Oe=-1,Ae=ne.length;++Oe<Ae;){var Ue=pe(ne[Oe]);Ue!==r&&(ce=ce===r?Ue:ce+Ue)}return ce}function ef(ne,pe){for(var ce=-1,Oe=Array(ne);++ce<ne;)Oe[ce]=pe(ce);return Oe}function WL(ne,pe){return st(pe,function(ce){return[ce,ne[ce]]})}function Qw(ne){return ne&&ne.slice(0,n_(ne)+1).replace(ji,"")}function tr(ne){return function(pe){return ne(pe)}}function tf(ne,pe){return st(pe,function(ce){return ne[ce]})}function Vo(ne,pe){return ne.has(pe)}function e_(ne,pe){for(var ce=-1,Oe=ne.length;++ce<Oe&&Bi(pe,ne[ce],0)>-1;);return ce}function t_(ne,pe){for(var ce=ne.length;ce--&&Bi(pe,ne[ce],0)>-1;);return ce}function GL(ne,pe){for(var ce=ne.length,Oe=0;ce--;)ne[ce]===pe&&++Oe;return Oe}var KL=Jc(TL),YL=Jc(AL);function XL(ne){return"\\"+DL[ne]}function ZL(ne,pe){return ne==null?r:ne[pe]}function Fi(ne){return RL.test(ne)}function JL(ne){return IL.test(ne)}function QL(ne){for(var pe,ce=[];!(pe=ne.next()).done;)ce.push(pe.value);return ce}function rf(ne){var pe=-1,ce=Array(ne.size);return ne.forEach(function(Oe,Ae){ce[++pe]=[Ae,Oe]}),ce}function r_(ne,pe){return function(ce){return ne(pe(ce))}}function Pn(ne,pe){for(var ce=-1,Oe=ne.length,Ae=0,Ue=[];++ce<Oe;){var Et=ne[ce];(Et===pe||Et===h)&&(ne[ce]=h,Ue[Ae++]=ce)}return Ue}function Ss(ne){var pe=-1,ce=Array(ne.size);return ne.forEach(function(Oe){ce[++pe]=Oe}),ce}function eB(ne){var pe=-1,ce=Array(ne.size);return ne.forEach(function(Oe){ce[++pe]=[Oe,Oe]}),ce}function tB(ne,pe,ce){for(var Oe=ce-1,Ae=ne.length;++Oe<Ae;)if(ne[Oe]===pe)return Oe;return-1}function rB(ne,pe,ce){for(var Oe=ce+1;Oe--;)if(ne[Oe]===pe)return Oe;return Oe}function $i(ne){return Fi(ne)?iB(ne):$L(ne)}function Tr(ne){return Fi(ne)?oB(ne):zL(ne)}function n_(ne){for(var pe=ne.length;pe--&&_c.test(ne.charAt(pe)););return pe}var nB=Jc(ML);function iB(ne){for(var pe=Uc.lastIndex=0;Uc.test(ne);)++pe;return pe}function oB(ne){return ne.match(Uc)||[]}function aB(ne){return ne.match(CL)||[]}var sB=(function ne(pe){pe=pe==null?It:zi.defaults(It.Object(),pe,zi.pick(It,PL));var ce=pe.Array,Oe=pe.Date,Ae=pe.Error,Ue=pe.Function,Et=pe.Math,et=pe.Object,nf=pe.RegExp,uB=pe.String,pr=pe.TypeError,Os=ce.prototype,lB=Ue.prototype,Hi=et.prototype,Cs=pe["__core-js_shared__"],Rs=lB.toString,Ge=Hi.hasOwnProperty,cB=0,i_=(function(){var s=/[^.]+$/.exec(Cs&&Cs.keys&&Cs.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})(),Is=Hi.toString,fB=Rs.call(et),dB=It._,hB=nf("^"+Rs.call(Ge).replace(Di,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ps=$w?pe.Buffer:r,Nn=pe.Symbol,Ns=pe.Uint8Array,o_=Ps?Ps.allocUnsafe:r,Ts=r_(et.getPrototypeOf,et),a_=et.create,s_=Hi.propertyIsEnumerable,As=Os.splice,u_=Nn?Nn.isConcatSpreadable:r,Uo=Nn?Nn.iterator:r,Qn=Nn?Nn.toStringTag:r,Ms=(function(){try{var s=ii(et,"defineProperty");return s({},"",{}),s}catch{}})(),pB=pe.clearTimeout!==It.clearTimeout&&pe.clearTimeout,vB=Oe&&Oe.now!==It.Date.now&&Oe.now,gB=pe.setTimeout!==It.setTimeout&&pe.setTimeout,Ds=Et.ceil,js=Et.floor,of=et.getOwnPropertySymbols,mB=Ps?Ps.isBuffer:r,l_=pe.isFinite,yB=Os.join,bB=r_(et.keys,et),St=Et.max,At=Et.min,xB=Oe.now,wB=pe.parseInt,c_=Et.random,_B=Os.reverse,af=ii(pe,"DataView"),Wo=ii(pe,"Map"),sf=ii(pe,"Promise"),Vi=ii(pe,"Set"),Go=ii(pe,"WeakMap"),Ko=ii(et,"create"),qs=Go&&new Go,Ui={},EB=oi(af),SB=oi(Wo),OB=oi(sf),CB=oi(Vi),RB=oi(Go),ks=Nn?Nn.prototype:r,Yo=ks?ks.valueOf:r,f_=ks?ks.toString:r;function M(s){if(dt(s)&&!Me(s)&&!(s instanceof Be)){if(s instanceof vr)return s;if(Ge.call(s,"__wrapped__"))return d1(s)}return new vr(s)}var Wi=(function(){function s(){}return function(c){if(!ft(c))return{};if(a_)return a_(c);s.prototype=c;var g=new s;return s.prototype=r,g}})();function Ls(){}function vr(s,c){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=r}M.templateSettings={escape:fs,evaluate:yc,interpolate:Lo,variable:"",imports:{_:M}},M.prototype=Ls.prototype,M.prototype.constructor=M,vr.prototype=Wi(Ls.prototype),vr.prototype.constructor=vr;function Be(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ae,this.__views__=[]}function IB(){var s=new Be(this.__wrapped__);return s.__actions__=zt(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=zt(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=zt(this.__views__),s}function PB(){if(this.__filtered__){var s=new Be(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function NB(){var s=this.__wrapped__.value(),c=this.__dir__,g=Me(s),O=c<0,N=g?s.length:0,q=zF(0,N,this.__views__),z=q.start,X=q.end,ie=X-z,ge=O?X:z-1,me=this.__iteratees__,ye=me.length,_e=0,Ce=At(ie,this.__takeCount__);if(!g||!O&&N==ie&&Ce==ie)return j_(s,this.__actions__);var Ne=[];e:for(;ie--&&_e<Ce;){ge+=c;for(var je=-1,Re=s[ge];++je<ye;){var ke=me[je],$e=ke.iteratee,ir=ke.type,Lt=$e(Re);if(ir==B)Re=Lt;else if(!Lt){if(ir==G)continue e;break e}}Ne[_e++]=Re}return Ne}Be.prototype=Wi(Ls.prototype),Be.prototype.constructor=Be;function ei(s){var c=-1,g=s==null?0:s.length;for(this.clear();++c<g;){var O=s[c];this.set(O[0],O[1])}}function TB(){this.__data__=Ko?Ko(null):{},this.size=0}function AB(s){var c=this.has(s)&&delete this.__data__[s];return this.size-=c?1:0,c}function MB(s){var c=this.__data__;if(Ko){var g=c[s];return g===d?r:g}return Ge.call(c,s)?c[s]:r}function DB(s){var c=this.__data__;return Ko?c[s]!==r:Ge.call(c,s)}function jB(s,c){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Ko&&c===r?d:c,this}ei.prototype.clear=TB,ei.prototype.delete=AB,ei.prototype.get=MB,ei.prototype.has=DB,ei.prototype.set=jB;function ln(s){var c=-1,g=s==null?0:s.length;for(this.clear();++c<g;){var O=s[c];this.set(O[0],O[1])}}function qB(){this.__data__=[],this.size=0}function kB(s){var c=this.__data__,g=Bs(c,s);if(g<0)return!1;var O=c.length-1;return g==O?c.pop():As.call(c,g,1),--this.size,!0}function LB(s){var c=this.__data__,g=Bs(c,s);return g<0?r:c[g][1]}function BB(s){return Bs(this.__data__,s)>-1}function FB(s,c){var g=this.__data__,O=Bs(g,s);return O<0?(++this.size,g.push([s,c])):g[O][1]=c,this}ln.prototype.clear=qB,ln.prototype.delete=kB,ln.prototype.get=LB,ln.prototype.has=BB,ln.prototype.set=FB;function cn(s){var c=-1,g=s==null?0:s.length;for(this.clear();++c<g;){var O=s[c];this.set(O[0],O[1])}}function $B(){this.size=0,this.__data__={hash:new ei,map:new(Wo||ln),string:new ei}}function zB(s){var c=Zs(this,s).delete(s);return this.size-=c?1:0,c}function HB(s){return Zs(this,s).get(s)}function VB(s){return Zs(this,s).has(s)}function UB(s,c){var g=Zs(this,s),O=g.size;return g.set(s,c),this.size+=g.size==O?0:1,this}cn.prototype.clear=$B,cn.prototype.delete=zB,cn.prototype.get=HB,cn.prototype.has=VB,cn.prototype.set=UB;function ti(s){var c=-1,g=s==null?0:s.length;for(this.__data__=new cn;++c<g;)this.add(s[c])}function WB(s){return this.__data__.set(s,d),this}function GB(s){return this.__data__.has(s)}ti.prototype.add=ti.prototype.push=WB,ti.prototype.has=GB;function Ar(s){var c=this.__data__=new ln(s);this.size=c.size}function KB(){this.__data__=new ln,this.size=0}function YB(s){var c=this.__data__,g=c.delete(s);return this.size=c.size,g}function XB(s){return this.__data__.get(s)}function ZB(s){return this.__data__.has(s)}function JB(s,c){var g=this.__data__;if(g instanceof ln){var O=g.__data__;if(!Wo||O.length<i-1)return O.push([s,c]),this.size=++g.size,this;g=this.__data__=new cn(O)}return g.set(s,c),this.size=g.size,this}Ar.prototype.clear=KB,Ar.prototype.delete=YB,Ar.prototype.get=XB,Ar.prototype.has=ZB,Ar.prototype.set=JB;function d_(s,c){var g=Me(s),O=!g&&ai(s),N=!g&&!O&&jn(s),q=!g&&!O&&!N&&Xi(s),z=g||O||N||q,X=z?ef(s.length,uB):[],ie=X.length;for(var ge in s)(c||Ge.call(s,ge))&&!(z&&(ge=="length"||N&&(ge=="offset"||ge=="parent")||q&&(ge=="buffer"||ge=="byteLength"||ge=="byteOffset")||hn(ge,ie)))&&X.push(ge);return X}function h_(s){var c=s.length;return c?s[yf(0,c-1)]:r}function QB(s,c){return Js(zt(s),ri(c,0,s.length))}function eF(s){return Js(zt(s))}function uf(s,c,g){(g!==r&&!Dr(s[c],g)||g===r&&!(c in s))&&Wr(s,c,g)}function Xo(s,c,g){var O=s[c];(!(Ge.call(s,c)&&Dr(O,g))||g===r&&!(c in s))&&Wr(s,c,g)}function Bs(s,c){for(var g=s.length;g--;)if(Dr(s[g][0],c))return g;return-1}function tF(s,c,g,O){return Tn(s,function(N,q,z){c(O,N,g(N),z)}),O}function p_(s,c){return s&&Kr(c,Ct(c),s)}function rF(s,c){return s&&Kr(c,Vt(c),s)}function Wr(s,c,g){c=="__proto__"&&Ms?Ms(s,c,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[c]=g}function lf(s,c){for(var g=-1,O=c.length,N=ce(O),q=s==null;++g<O;)N[g]=q?r:Vf(s,c[g]);return N}function ri(s,c,g){return s===s&&(g!==r&&(s=s<=g?s:g),c!==r&&(s=s>=c?s:c)),s}function gr(s,c,g,O,N,q){var z,X=c&p,ie=c&v,ge=c&m;if(g&&(z=N?g(s,O,N,q):g(s)),z!==r)return z;if(!ft(s))return s;var me=Me(s);if(me){if(z=VF(s),!X)return zt(s,z)}else{var ye=Mt(s),_e=ye==ee||ye==we;if(jn(s))return L_(s,X);if(ye==Ee||ye==J||_e&&!N){if(z=ie||_e?{}:n1(s),!X)return ie?MF(s,rF(z,s)):AF(s,p_(z,s))}else{if(!nt[ye])return N?s:{};z=UF(s,ye,X)}}q||(q=new Ar);var Ce=q.get(s);if(Ce)return Ce;q.set(s,z),A1(s)?s.forEach(function(Re){z.add(gr(Re,c,g,Re,s,q))}):N1(s)&&s.forEach(function(Re,ke){z.set(ke,gr(Re,c,g,ke,s,q))});var Ne=ge?ie?Pf:If:ie?Vt:Ct,je=me?r:Ne(s);return er(je||s,function(Re,ke){je&&(ke=Re,Re=s[ke]),Xo(z,ke,gr(Re,c,g,ke,s,q))}),z}function nF(s){var c=Ct(s);return function(g){return v_(g,s,c)}}function v_(s,c,g){var O=g.length;if(s==null)return!O;for(s=et(s);O--;){var N=g[O],q=c[N],z=s[N];if(z===r&&!(N in s)||!q(z))return!1}return!0}function g_(s,c,g){if(typeof s!="function")throw new pr(a);return na(function(){s.apply(r,g)},c)}function Zo(s,c,g,O){var N=-1,q=_s,z=!0,X=s.length,ie=[],ge=c.length;if(!X)return ie;g&&(c=st(c,tr(g))),O?(q=Kc,z=!1):c.length>=i&&(q=Vo,z=!1,c=new ti(c));e:for(;++N<X;){var me=s[N],ye=g==null?me:g(me);if(me=O||me!==0?me:0,z&&ye===ye){for(var _e=ge;_e--;)if(c[_e]===ye)continue e;ie.push(me)}else q(c,ye,O)||ie.push(me)}return ie}var Tn=H_(Gr),m_=H_(ff,!0);function iF(s,c){var g=!0;return Tn(s,function(O,N,q){return g=!!c(O,N,q),g}),g}function Fs(s,c,g){for(var O=-1,N=s.length;++O<N;){var q=s[O],z=c(q);if(z!=null&&(X===r?z===z&&!nr(z):g(z,X)))var X=z,ie=q}return ie}function oF(s,c,g,O){var N=s.length;for(g=De(g),g<0&&(g=-g>N?0:N+g),O=O===r||O>N?N:De(O),O<0&&(O+=N),O=g>O?0:D1(O);g<O;)s[g++]=c;return s}function y_(s,c){var g=[];return Tn(s,function(O,N,q){c(O,N,q)&&g.push(O)}),g}function Pt(s,c,g,O,N){var q=-1,z=s.length;for(g||(g=GF),N||(N=[]);++q<z;){var X=s[q];c>0&&g(X)?c>1?Pt(X,c-1,g,O,N):In(N,X):O||(N[N.length]=X)}return N}var cf=V_(),b_=V_(!0);function Gr(s,c){return s&&cf(s,c,Ct)}function ff(s,c){return s&&b_(s,c,Ct)}function $s(s,c){return Rn(c,function(g){return pn(s[g])})}function ni(s,c){c=Mn(c,s);for(var g=0,O=c.length;s!=null&&g<O;)s=s[Mr(c[g++])];return g&&g==O?s:r}function x_(s,c,g){var O=c(s);return Me(s)?O:In(O,g(s))}function qt(s){return s==null?s===r?ct:ue:Qn&&Qn in et(s)?$F(s):e$(s)}function df(s,c){return s>c}function aF(s,c){return s!=null&&Ge.call(s,c)}function sF(s,c){return s!=null&&c in et(s)}function uF(s,c,g){return s>=At(c,g)&&s<St(c,g)}function hf(s,c,g){for(var O=g?Kc:_s,N=s[0].length,q=s.length,z=q,X=ce(q),ie=1/0,ge=[];z--;){var me=s[z];z&&c&&(me=st(me,tr(c))),ie=At(me.length,ie),X[z]=!g&&(c||N>=120&&me.length>=120)?new ti(z&&me):r}me=s[0];var ye=-1,_e=X[0];e:for(;++ye<N&&ge.length<ie;){var Ce=me[ye],Ne=c?c(Ce):Ce;if(Ce=g||Ce!==0?Ce:0,!(_e?Vo(_e,Ne):O(ge,Ne,g))){for(z=q;--z;){var je=X[z];if(!(je?Vo(je,Ne):O(s[z],Ne,g)))continue e}_e&&_e.push(Ne),ge.push(Ce)}}return ge}function lF(s,c,g,O){return Gr(s,function(N,q,z){c(O,g(N),q,z)}),O}function Jo(s,c,g){c=Mn(c,s),s=s1(s,c);var O=s==null?s:s[Mr(yr(c))];return O==null?r:Qt(O,s,g)}function w_(s){return dt(s)&&qt(s)==J}function cF(s){return dt(s)&&qt(s)==rt}function fF(s){return dt(s)&&qt(s)==oe}function Qo(s,c,g,O,N){return s===c?!0:s==null||c==null||!dt(s)&&!dt(c)?s!==s&&c!==c:dF(s,c,g,O,Qo,N)}function dF(s,c,g,O,N,q){var z=Me(s),X=Me(c),ie=z?H:Mt(s),ge=X?H:Mt(c);ie=ie==J?Ee:ie,ge=ge==J?Ee:ge;var me=ie==Ee,ye=ge==Ee,_e=ie==ge;if(_e&&jn(s)){if(!jn(c))return!1;z=!0,me=!1}if(_e&&!me)return q||(q=new Ar),z||Xi(s)?e1(s,c,g,O,N,q):BF(s,c,ie,g,O,N,q);if(!(g&y)){var Ce=me&&Ge.call(s,"__wrapped__"),Ne=ye&&Ge.call(c,"__wrapped__");if(Ce||Ne){var je=Ce?s.value():s,Re=Ne?c.value():c;return q||(q=new Ar),N(je,Re,g,O,q)}}return _e?(q||(q=new Ar),FF(s,c,g,O,N,q)):!1}function hF(s){return dt(s)&&Mt(s)==be}function pf(s,c,g,O){var N=g.length,q=N,z=!O;if(s==null)return!q;for(s=et(s);N--;){var X=g[N];if(z&&X[2]?X[1]!==s[X[0]]:!(X[0]in s))return!1}for(;++N<q;){X=g[N];var ie=X[0],ge=s[ie],me=X[1];if(z&&X[2]){if(ge===r&&!(ie in s))return!1}else{var ye=new Ar;if(O)var _e=O(ge,me,ie,s,c,ye);if(!(_e===r?Qo(me,ge,y|x,O,ye):_e))return!1}}return!0}function __(s){if(!ft(s)||YF(s))return!1;var c=pn(s)?hB:Nc;return c.test(oi(s))}function pF(s){return dt(s)&&qt(s)==ze}function vF(s){return dt(s)&&Mt(s)==Fe}function gF(s){return dt(s)&&iu(s.length)&&!!at[qt(s)]}function E_(s){return typeof s=="function"?s:s==null?Ut:typeof s=="object"?Me(s)?C_(s[0],s[1]):O_(s):W1(s)}function vf(s){if(!ra(s))return bB(s);var c=[];for(var g in et(s))Ge.call(s,g)&&g!="constructor"&&c.push(g);return c}function mF(s){if(!ft(s))return QF(s);var c=ra(s),g=[];for(var O in s)O=="constructor"&&(c||!Ge.call(s,O))||g.push(O);return g}function gf(s,c){return s<c}function S_(s,c){var g=-1,O=Ht(s)?ce(s.length):[];return Tn(s,function(N,q,z){O[++g]=c(N,q,z)}),O}function O_(s){var c=Tf(s);return c.length==1&&c[0][2]?o1(c[0][0],c[0][1]):function(g){return g===s||pf(g,s,c)}}function C_(s,c){return Mf(s)&&i1(c)?o1(Mr(s),c):function(g){var O=Vf(g,s);return O===r&&O===c?Uf(g,s):Qo(c,O,y|x)}}function zs(s,c,g,O,N){s!==c&&cf(c,function(q,z){if(N||(N=new Ar),ft(q))yF(s,c,z,g,zs,O,N);else{var X=O?O(jf(s,z),q,z+"",s,c,N):r;X===r&&(X=q),uf(s,z,X)}},Vt)}function yF(s,c,g,O,N,q,z){var X=jf(s,g),ie=jf(c,g),ge=z.get(ie);if(ge){uf(s,g,ge);return}var me=q?q(X,ie,g+"",s,c,z):r,ye=me===r;if(ye){var _e=Me(ie),Ce=!_e&&jn(ie),Ne=!_e&&!Ce&&Xi(ie);me=ie,_e||Ce||Ne?Me(X)?me=X:pt(X)?me=zt(X):Ce?(ye=!1,me=L_(ie,!0)):Ne?(ye=!1,me=B_(ie,!0)):me=[]:ia(ie)||ai(ie)?(me=X,ai(X)?me=j1(X):(!ft(X)||pn(X))&&(me=n1(ie))):ye=!1}ye&&(z.set(ie,me),N(me,ie,O,q,z),z.delete(ie)),uf(s,g,me)}function R_(s,c){var g=s.length;if(g)return c+=c<0?g:0,hn(c,g)?s[c]:r}function I_(s,c,g){c.length?c=st(c,function(q){return Me(q)?function(z){return ni(z,q.length===1?q[0]:q)}:q}):c=[Ut];var O=-1;c=st(c,tr(Ie()));var N=S_(s,function(q,z,X){var ie=st(c,function(ge){return ge(q)});return{criteria:ie,index:++O,value:q}});return UL(N,function(q,z){return TF(q,z,g)})}function bF(s,c){return P_(s,c,function(g,O){return Uf(s,O)})}function P_(s,c,g){for(var O=-1,N=c.length,q={};++O<N;){var z=c[O],X=ni(s,z);g(X,z)&&ea(q,Mn(z,s),X)}return q}function xF(s){return function(c){return ni(c,s)}}function mf(s,c,g,O){var N=O?VL:Bi,q=-1,z=c.length,X=s;for(s===c&&(c=zt(c)),g&&(X=st(s,tr(g)));++q<z;)for(var ie=0,ge=c[q],me=g?g(ge):ge;(ie=N(X,me,ie,O))>-1;)X!==s&&As.call(X,ie,1),As.call(s,ie,1);return s}function N_(s,c){for(var g=s?c.length:0,O=g-1;g--;){var N=c[g];if(g==O||N!==q){var q=N;hn(N)?As.call(s,N,1):wf(s,N)}}return s}function yf(s,c){return s+js(c_()*(c-s+1))}function wF(s,c,g,O){for(var N=-1,q=St(Ds((c-s)/(g||1)),0),z=ce(q);q--;)z[O?q:++N]=s,s+=g;return z}function bf(s,c){var g="";if(!s||c<1||c>te)return g;do c%2&&(g+=s),c=js(c/2),c&&(s+=s);while(c);return g}function qe(s,c){return qf(a1(s,c,Ut),s+"")}function _F(s){return h_(Zi(s))}function EF(s,c){var g=Zi(s);return Js(g,ri(c,0,g.length))}function ea(s,c,g,O){if(!ft(s))return s;c=Mn(c,s);for(var N=-1,q=c.length,z=q-1,X=s;X!=null&&++N<q;){var ie=Mr(c[N]),ge=g;if(ie==="__proto__"||ie==="constructor"||ie==="prototype")return s;if(N!=z){var me=X[ie];ge=O?O(me,ie,X):r,ge===r&&(ge=ft(me)?me:hn(c[N+1])?[]:{})}Xo(X,ie,ge),X=X[ie]}return s}var T_=qs?function(s,c){return qs.set(s,c),s}:Ut,SF=Ms?function(s,c){return Ms(s,"toString",{configurable:!0,enumerable:!1,value:Gf(c),writable:!0})}:Ut;function OF(s){return Js(Zi(s))}function mr(s,c,g){var O=-1,N=s.length;c<0&&(c=-c>N?0:N+c),g=g>N?N:g,g<0&&(g+=N),N=c>g?0:g-c>>>0,c>>>=0;for(var q=ce(N);++O<N;)q[O]=s[O+c];return q}function CF(s,c){var g;return Tn(s,function(O,N,q){return g=c(O,N,q),!g}),!!g}function Hs(s,c,g){var O=0,N=s==null?O:s.length;if(typeof c=="number"&&c===c&&N<=F){for(;O<N;){var q=O+N>>>1,z=s[q];z!==null&&!nr(z)&&(g?z<=c:z<c)?O=q+1:N=q}return N}return xf(s,c,Ut,g)}function xf(s,c,g,O){var N=0,q=s==null?0:s.length;if(q===0)return 0;c=g(c);for(var z=c!==c,X=c===null,ie=nr(c),ge=c===r;N<q;){var me=js((N+q)/2),ye=g(s[me]),_e=ye!==r,Ce=ye===null,Ne=ye===ye,je=nr(ye);if(z)var Re=O||Ne;else ge?Re=Ne&&(O||_e):X?Re=Ne&&_e&&(O||!Ce):ie?Re=Ne&&_e&&!Ce&&(O||!je):Ce||je?Re=!1:Re=O?ye<=c:ye<c;Re?N=me+1:q=me}return At(q,le)}function A_(s,c){for(var g=-1,O=s.length,N=0,q=[];++g<O;){var z=s[g],X=c?c(z):z;if(!g||!Dr(X,ie)){var ie=X;q[N++]=z===0?0:z}}return q}function M_(s){return typeof s=="number"?s:nr(s)?re:+s}function rr(s){if(typeof s=="string")return s;if(Me(s))return st(s,rr)+"";if(nr(s))return f_?f_.call(s):"";var c=s+"";return c=="0"&&1/s==-Z?"-0":c}function An(s,c,g){var O=-1,N=_s,q=s.length,z=!0,X=[],ie=X;if(g)z=!1,N=Kc;else if(q>=i){var ge=c?null:kF(s);if(ge)return Ss(ge);z=!1,N=Vo,ie=new ti}else ie=c?[]:X;e:for(;++O<q;){var me=s[O],ye=c?c(me):me;if(me=g||me!==0?me:0,z&&ye===ye){for(var _e=ie.length;_e--;)if(ie[_e]===ye)continue e;c&&ie.push(ye),X.push(me)}else N(ie,ye,g)||(ie!==X&&ie.push(ye),X.push(me))}return X}function wf(s,c){c=Mn(c,s);var g=-1,O=c.length;if(!O)return!0;for(;++g<O;){var N=Mr(c[g]);if(N==="__proto__"&&!Ge.call(s,"__proto__")||(N==="constructor"||N==="prototype")&&g<O-1)return!1}var q=s1(s,c);return q==null||delete q[Mr(yr(c))]}function D_(s,c,g,O){return ea(s,c,g(ni(s,c)),O)}function Vs(s,c,g,O){for(var N=s.length,q=O?N:-1;(O?q--:++q<N)&&c(s[q],q,s););return g?mr(s,O?0:q,O?q+1:N):mr(s,O?q+1:0,O?N:q)}function j_(s,c){var g=s;return g instanceof Be&&(g=g.value()),Yc(c,function(O,N){return N.func.apply(N.thisArg,In([O],N.args))},g)}function _f(s,c,g){var O=s.length;if(O<2)return O?An(s[0]):[];for(var N=-1,q=ce(O);++N<O;)for(var z=s[N],X=-1;++X<O;)X!=N&&(q[N]=Zo(q[N]||z,s[X],c,g));return An(Pt(q,1),c,g)}function q_(s,c,g){for(var O=-1,N=s.length,q=c.length,z={};++O<N;){var X=O<q?c[O]:r;g(z,s[O],X)}return z}function Ef(s){return pt(s)?s:[]}function Sf(s){return typeof s=="function"?s:Ut}function Mn(s,c){return Me(s)?s:Mf(s,c)?[s]:f1(Ke(s))}var RF=qe;function Dn(s,c,g){var O=s.length;return g=g===r?O:g,!c&&g>=O?s:mr(s,c,g)}var k_=pB||function(s){return It.clearTimeout(s)};function L_(s,c){if(c)return s.slice();var g=s.length,O=o_?o_(g):new s.constructor(g);return s.copy(O),O}function Of(s){var c=new s.constructor(s.byteLength);return new Ns(c).set(new Ns(s)),c}function IF(s,c){var g=c?Of(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function PF(s){var c=new s.constructor(s.source,vs.exec(s));return c.lastIndex=s.lastIndex,c}function NF(s){return Yo?et(Yo.call(s)):{}}function B_(s,c){var g=c?Of(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function F_(s,c){if(s!==c){var g=s!==r,O=s===null,N=s===s,q=nr(s),z=c!==r,X=c===null,ie=c===c,ge=nr(c);if(!X&&!ge&&!q&&s>c||q&&z&&ie&&!X&&!ge||O&&z&&ie||!g&&ie||!N)return 1;if(!O&&!q&&!ge&&s<c||ge&&g&&N&&!O&&!q||X&&g&&N||!z&&N||!ie)return-1}return 0}function TF(s,c,g){for(var O=-1,N=s.criteria,q=c.criteria,z=N.length,X=g.length;++O<z;){var ie=F_(N[O],q[O]);if(ie){if(O>=X)return ie;var ge=g[O];return ie*(ge=="desc"?-1:1)}}return s.index-c.index}function $_(s,c,g,O){for(var N=-1,q=s.length,z=g.length,X=-1,ie=c.length,ge=St(q-z,0),me=ce(ie+ge),ye=!O;++X<ie;)me[X]=c[X];for(;++N<z;)(ye||N<q)&&(me[g[N]]=s[N]);for(;ge--;)me[X++]=s[N++];return me}function z_(s,c,g,O){for(var N=-1,q=s.length,z=-1,X=g.length,ie=-1,ge=c.length,me=St(q-X,0),ye=ce(me+ge),_e=!O;++N<me;)ye[N]=s[N];for(var Ce=N;++ie<ge;)ye[Ce+ie]=c[ie];for(;++z<X;)(_e||N<q)&&(ye[Ce+g[z]]=s[N++]);return ye}function zt(s,c){var g=-1,O=s.length;for(c||(c=ce(O));++g<O;)c[g]=s[g];return c}function Kr(s,c,g,O){var N=!g;g||(g={});for(var q=-1,z=c.length;++q<z;){var X=c[q],ie=O?O(g[X],s[X],X,g,s):r;ie===r&&(ie=s[X]),N?Wr(g,X,ie):Xo(g,X,ie)}return g}function AF(s,c){return Kr(s,Af(s),c)}function MF(s,c){return Kr(s,t1(s),c)}function Us(s,c){return function(g,O){var N=Me(g)?LL:tF,q=c?c():{};return N(g,s,Ie(O,2),q)}}function Gi(s){return qe(function(c,g){var O=-1,N=g.length,q=N>1?g[N-1]:r,z=N>2?g[2]:r;for(q=s.length>3&&typeof q=="function"?(N--,q):r,z&&kt(g[0],g[1],z)&&(q=N<3?r:q,N=1),c=et(c);++O<N;){var X=g[O];X&&s(c,X,O,q)}return c})}function H_(s,c){return function(g,O){if(g==null)return g;if(!Ht(g))return s(g,O);for(var N=g.length,q=c?N:-1,z=et(g);(c?q--:++q<N)&&O(z[q],q,z)!==!1;);return g}}function V_(s){return function(c,g,O){for(var N=-1,q=et(c),z=O(c),X=z.length;X--;){var ie=z[s?X:++N];if(g(q[ie],ie,q)===!1)break}return c}}function DF(s,c,g){var O=c&b,N=ta(s);function q(){var z=this&&this!==It&&this instanceof q?N:s;return z.apply(O?g:this,arguments)}return q}function U_(s){return function(c){c=Ke(c);var g=Fi(c)?Tr(c):r,O=g?g[0]:c.charAt(0),N=g?Dn(g,1).join(""):c.slice(1);return O[s]()+N}}function Ki(s){return function(c){return Yc(V1(H1(c).replace(SL,"")),s,"")}}function ta(s){return function(){var c=arguments;switch(c.length){case 0:return new s;case 1:return new s(c[0]);case 2:return new s(c[0],c[1]);case 3:return new s(c[0],c[1],c[2]);case 4:return new s(c[0],c[1],c[2],c[3]);case 5:return new s(c[0],c[1],c[2],c[3],c[4]);case 6:return new s(c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return new s(c[0],c[1],c[2],c[3],c[4],c[5],c[6])}var g=Wi(s.prototype),O=s.apply(g,c);return ft(O)?O:g}}function jF(s,c,g){var O=ta(s);function N(){for(var q=arguments.length,z=ce(q),X=q,ie=Yi(N);X--;)z[X]=arguments[X];var ge=q<3&&z[0]!==ie&&z[q-1]!==ie?[]:Pn(z,ie);if(q-=ge.length,q<g)return X_(s,c,Ws,N.placeholder,r,z,ge,r,r,g-q);var me=this&&this!==It&&this instanceof N?O:s;return Qt(me,this,z)}return N}function W_(s){return function(c,g,O){var N=et(c);if(!Ht(c)){var q=Ie(g,3);c=Ct(c),g=function(X){return q(N[X],X,N)}}var z=s(c,g,O);return z>-1?N[q?c[z]:z]:r}}function G_(s){return dn(function(c){var g=c.length,O=g,N=vr.prototype.thru;for(s&&c.reverse();O--;){var q=c[O];if(typeof q!="function")throw new pr(a);if(N&&!z&&Xs(q)=="wrapper")var z=new vr([],!0)}for(O=z?O:g;++O<g;){q=c[O];var X=Xs(q),ie=X=="wrapper"?Nf(q):r;ie&&Df(ie[0])&&ie[1]==(P|_|R|A)&&!ie[4].length&&ie[9]==1?z=z[Xs(ie[0])].apply(z,ie[3]):z=q.length==1&&Df(q)?z[X]():z.thru(q)}return function(){var ge=arguments,me=ge[0];if(z&&ge.length==1&&Me(me))return z.plant(me).value();for(var ye=0,_e=g?c[ye].apply(this,ge):me;++ye<g;)_e=c[ye].call(this,_e);return _e}})}function Ws(s,c,g,O,N,q,z,X,ie,ge){var me=c&P,ye=c&b,_e=c&w,Ce=c&(_|S),Ne=c&k,je=_e?r:ta(s);function Re(){for(var ke=arguments.length,$e=ce(ke),ir=ke;ir--;)$e[ir]=arguments[ir];if(Ce)var Lt=Yi(Re),or=GL($e,Lt);if(O&&($e=$_($e,O,N,Ce)),q&&($e=z_($e,q,z,Ce)),ke-=or,Ce&&ke<ge){var vt=Pn($e,Lt);return X_(s,c,Ws,Re.placeholder,g,$e,vt,X,ie,ge-ke)}var jr=ye?g:this,gn=_e?jr[s]:s;return ke=$e.length,X?$e=t$($e,X):Ne&&ke>1&&$e.reverse(),me&&ie<ke&&($e.length=ie),this&&this!==It&&this instanceof Re&&(gn=je||ta(gn)),gn.apply(jr,$e)}return Re}function K_(s,c){return function(g,O){return lF(g,s,c(O),{})}}function Gs(s,c){return function(g,O){var N;if(g===r&&O===r)return c;if(g!==r&&(N=g),O!==r){if(N===r)return O;typeof g=="string"||typeof O=="string"?(g=rr(g),O=rr(O)):(g=M_(g),O=M_(O)),N=s(g,O)}return N}}function Cf(s){return dn(function(c){return c=st(c,tr(Ie())),qe(function(g){var O=this;return s(c,function(N){return Qt(N,O,g)})})})}function Ks(s,c){c=c===r?" ":rr(c);var g=c.length;if(g<2)return g?bf(c,s):c;var O=bf(c,Ds(s/$i(c)));return Fi(c)?Dn(Tr(O),0,s).join(""):O.slice(0,s)}function qF(s,c,g,O){var N=c&b,q=ta(s);function z(){for(var X=-1,ie=arguments.length,ge=-1,me=O.length,ye=ce(me+ie),_e=this&&this!==It&&this instanceof z?q:s;++ge<me;)ye[ge]=O[ge];for(;ie--;)ye[ge++]=arguments[++X];return Qt(_e,N?g:this,ye)}return z}function Y_(s){return function(c,g,O){return O&&typeof O!="number"&&kt(c,g,O)&&(g=O=r),c=vn(c),g===r?(g=c,c=0):g=vn(g),O=O===r?c<g?1:-1:vn(O),wF(c,g,O,s)}}function Ys(s){return function(c,g){return typeof c=="string"&&typeof g=="string"||(c=br(c),g=br(g)),s(c,g)}}function X_(s,c,g,O,N,q,z,X,ie,ge){var me=c&_,ye=me?z:r,_e=me?r:z,Ce=me?q:r,Ne=me?r:q;c|=me?R:I,c&=~(me?I:R),c&E||(c&=-4);var je=[s,c,N,Ce,ye,Ne,_e,X,ie,ge],Re=g.apply(r,je);return Df(s)&&u1(Re,je),Re.placeholder=O,l1(Re,s,c)}function Rf(s){var c=Et[s];return function(g,O){if(g=br(g),O=O==null?0:At(De(O),292),O&&l_(g)){var N=(Ke(g)+"e").split("e"),q=c(N[0]+"e"+(+N[1]+O));return N=(Ke(q)+"e").split("e"),+(N[0]+"e"+(+N[1]-O))}return c(g)}}var kF=Vi&&1/Ss(new Vi([,-0]))[1]==Z?function(s){return new Vi(s)}:Xf;function Z_(s){return function(c){var g=Mt(c);return g==be?rf(c):g==Fe?eB(c):WL(c,s(c))}}function fn(s,c,g,O,N,q,z,X){var ie=c&w;if(!ie&&typeof s!="function")throw new pr(a);var ge=O?O.length:0;if(ge||(c&=-97,O=N=r),z=z===r?z:St(De(z),0),X=X===r?X:De(X),ge-=N?N.length:0,c&I){var me=O,ye=N;O=N=r}var _e=ie?r:Nf(s),Ce=[s,c,g,O,N,me,ye,q,z,X];if(_e&&JF(Ce,_e),s=Ce[0],c=Ce[1],g=Ce[2],O=Ce[3],N=Ce[4],X=Ce[9]=Ce[9]===r?ie?0:s.length:St(Ce[9]-ge,0),!X&&c&(_|S)&&(c&=-25),!c||c==b)var Ne=DF(s,c,g);else c==_||c==S?Ne=jF(s,c,X):(c==R||c==(b|R))&&!N.length?Ne=qF(s,c,g,O):Ne=Ws.apply(r,Ce);var je=_e?T_:u1;return l1(je(Ne,Ce),s,c)}function J_(s,c,g,O){return s===r||Dr(s,Hi[g])&&!Ge.call(O,g)?c:s}function Q_(s,c,g,O,N,q){return ft(s)&&ft(c)&&(q.set(c,s),zs(s,c,r,Q_,q),q.delete(c)),s}function LF(s){return ia(s)?r:s}function e1(s,c,g,O,N,q){var z=g&y,X=s.length,ie=c.length;if(X!=ie&&!(z&&ie>X))return!1;var ge=q.get(s),me=q.get(c);if(ge&&me)return ge==c&&me==s;var ye=-1,_e=!0,Ce=g&x?new ti:r;for(q.set(s,c),q.set(c,s);++ye<X;){var Ne=s[ye],je=c[ye];if(O)var Re=z?O(je,Ne,ye,c,s,q):O(Ne,je,ye,s,c,q);if(Re!==r){if(Re)continue;_e=!1;break}if(Ce){if(!Xc(c,function(ke,$e){if(!Vo(Ce,$e)&&(Ne===ke||N(Ne,ke,g,O,q)))return Ce.push($e)})){_e=!1;break}}else if(!(Ne===je||N(Ne,je,g,O,q))){_e=!1;break}}return q.delete(s),q.delete(c),_e}function BF(s,c,g,O,N,q,z){switch(g){case bt:if(s.byteLength!=c.byteLength||s.byteOffset!=c.byteOffset)return!1;s=s.buffer,c=c.buffer;case rt:return!(s.byteLength!=c.byteLength||!q(new Ns(s),new Ns(c)));case se:case oe:case de:return Dr(+s,+c);case V:return s.name==c.name&&s.message==c.message;case ze:case Ve:return s==c+"";case be:var X=rf;case Fe:var ie=O&y;if(X||(X=Ss),s.size!=c.size&&!ie)return!1;var ge=z.get(s);if(ge)return ge==c;O|=x,z.set(s,c);var me=e1(X(s),X(c),O,N,q,z);return z.delete(s),me;case lt:if(Yo)return Yo.call(s)==Yo.call(c)}return!1}function FF(s,c,g,O,N,q){var z=g&y,X=If(s),ie=X.length,ge=If(c),me=ge.length;if(ie!=me&&!z)return!1;for(var ye=ie;ye--;){var _e=X[ye];if(!(z?_e in c:Ge.call(c,_e)))return!1}var Ce=q.get(s),Ne=q.get(c);if(Ce&&Ne)return Ce==c&&Ne==s;var je=!0;q.set(s,c),q.set(c,s);for(var Re=z;++ye<ie;){_e=X[ye];var ke=s[_e],$e=c[_e];if(O)var ir=z?O($e,ke,_e,c,s,q):O(ke,$e,_e,s,c,q);if(!(ir===r?ke===$e||N(ke,$e,g,O,q):ir)){je=!1;break}Re||(Re=_e=="constructor")}if(je&&!Re){var Lt=s.constructor,or=c.constructor;Lt!=or&&"constructor"in s&&"constructor"in c&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof or=="function"&&or instanceof or)&&(je=!1)}return q.delete(s),q.delete(c),je}function dn(s){return qf(a1(s,r,v1),s+"")}function If(s){return x_(s,Ct,Af)}function Pf(s){return x_(s,Vt,t1)}var Nf=qs?function(s){return qs.get(s)}:Xf;function Xs(s){for(var c=s.name+"",g=Ui[c],O=Ge.call(Ui,c)?g.length:0;O--;){var N=g[O],q=N.func;if(q==null||q==s)return N.name}return c}function Yi(s){var c=Ge.call(M,"placeholder")?M:s;return c.placeholder}function Ie(){var s=M.iteratee||Kf;return s=s===Kf?E_:s,arguments.length?s(arguments[0],arguments[1]):s}function Zs(s,c){var g=s.__data__;return KF(c)?g[typeof c=="string"?"string":"hash"]:g.map}function Tf(s){for(var c=Ct(s),g=c.length;g--;){var O=c[g],N=s[O];c[g]=[O,N,i1(N)]}return c}function ii(s,c){var g=ZL(s,c);return __(g)?g:r}function $F(s){var c=Ge.call(s,Qn),g=s[Qn];try{s[Qn]=r;var O=!0}catch{}var N=Is.call(s);return O&&(c?s[Qn]=g:delete s[Qn]),N}var Af=of?function(s){return s==null?[]:(s=et(s),Rn(of(s),function(c){return s_.call(s,c)}))}:Zf,t1=of?function(s){for(var c=[];s;)In(c,Af(s)),s=Ts(s);return c}:Zf,Mt=qt;(af&&Mt(new af(new ArrayBuffer(1)))!=bt||Wo&&Mt(new Wo)!=be||sf&&Mt(sf.resolve())!=Pe||Vi&&Mt(new Vi)!=Fe||Go&&Mt(new Go)!=mt)&&(Mt=function(s){var c=qt(s),g=c==Ee?s.constructor:r,O=g?oi(g):"";if(O)switch(O){case EB:return bt;case SB:return be;case OB:return Pe;case CB:return Fe;case RB:return mt}return c});function zF(s,c,g){for(var O=-1,N=g.length;++O<N;){var q=g[O],z=q.size;switch(q.type){case"drop":s+=z;break;case"dropRight":c-=z;break;case"take":c=At(c,s+z);break;case"takeRight":s=St(s,c-z);break}}return{start:s,end:c}}function HF(s){var c=s.match(Ec);return c?c[1].split(Sc):[]}function r1(s,c,g){c=Mn(c,s);for(var O=-1,N=c.length,q=!1;++O<N;){var z=Mr(c[O]);if(!(q=s!=null&&g(s,z)))break;s=s[z]}return q||++O!=N?q:(N=s==null?0:s.length,!!N&&iu(N)&&hn(z,N)&&(Me(s)||ai(s)))}function VF(s){var c=s.length,g=new s.constructor(c);return c&&typeof s[0]=="string"&&Ge.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function n1(s){return typeof s.constructor=="function"&&!ra(s)?Wi(Ts(s)):{}}function UF(s,c,g){var O=s.constructor;switch(c){case rt:return Of(s);case se:case oe:return new O(+s);case bt:return IF(s,g);case Jt:case fr:case Dt:case _t:case jt:case Ur:case Yn:case Cn:case dr:return B_(s,g);case be:return new O;case de:case Ve:return new O(s);case ze:return PF(s);case Fe:return new O;case lt:return NF(s)}}function WF(s,c){var g=c.length;if(!g)return s;var O=g-1;return c[O]=(g>1?"& ":"")+c[O],c=c.join(g>2?", ":" "),s.replace(hs,`{
|
|
51
|
+
/* [wrapped with `+c+`] */
|
|
52
|
+
`)}function GF(s){return Me(s)||ai(s)||!!(u_&&s&&s[u_])}function hn(s,c){var g=typeof s;return c=c??te,!!c&&(g=="number"||g!="symbol"&&Ac.test(s))&&s>-1&&s%1==0&&s<c}function kt(s,c,g){if(!ft(g))return!1;var O=typeof c;return(O=="number"?Ht(g)&&hn(c,g.length):O=="string"&&c in g)?Dr(g[c],s):!1}function Mf(s,c){if(Me(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||nr(s)?!0:ds.test(s)||!bc.test(s)||c!=null&&s in et(c)}function KF(s){var c=typeof s;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?s!=="__proto__":s===null}function Df(s){var c=Xs(s),g=M[c];if(typeof g!="function"||!(c in Be.prototype))return!1;if(s===g)return!0;var O=Nf(g);return!!O&&s===O[0]}function YF(s){return!!i_&&i_ in s}var XF=Cs?pn:Jf;function ra(s){var c=s&&s.constructor,g=typeof c=="function"&&c.prototype||Hi;return s===g}function i1(s){return s===s&&!ft(s)}function o1(s,c){return function(g){return g==null?!1:g[s]===c&&(c!==r||s in et(g))}}function ZF(s){var c=ru(s,function(O){return g.size===f&&g.clear(),O}),g=c.cache;return c}function JF(s,c){var g=s[1],O=c[1],N=g|O,q=N<(b|w|P),z=O==P&&g==_||O==P&&g==A&&s[7].length<=c[8]||O==(P|A)&&c[7].length<=c[8]&&g==_;if(!(q||z))return s;O&b&&(s[2]=c[2],N|=g&b?0:E);var X=c[3];if(X){var ie=s[3];s[3]=ie?$_(ie,X,c[4]):X,s[4]=ie?Pn(s[3],h):c[4]}return X=c[5],X&&(ie=s[5],s[5]=ie?z_(ie,X,c[6]):X,s[6]=ie?Pn(s[5],h):c[6]),X=c[7],X&&(s[7]=X),O&P&&(s[8]=s[8]==null?c[8]:At(s[8],c[8])),s[9]==null&&(s[9]=c[9]),s[0]=c[0],s[1]=N,s}function QF(s){var c=[];if(s!=null)for(var g in et(s))c.push(g);return c}function e$(s){return Is.call(s)}function a1(s,c,g){return c=St(c===r?s.length-1:c,0),function(){for(var O=arguments,N=-1,q=St(O.length-c,0),z=ce(q);++N<q;)z[N]=O[c+N];N=-1;for(var X=ce(c+1);++N<c;)X[N]=O[N];return X[c]=g(z),Qt(s,this,X)}}function s1(s,c){return c.length<2?s:ni(s,mr(c,0,-1))}function t$(s,c){for(var g=s.length,O=At(c.length,g),N=zt(s);O--;){var q=c[O];s[O]=hn(q,g)?N[q]:r}return s}function jf(s,c){if(!(c==="constructor"&&typeof s[c]=="function")&&c!="__proto__")return s[c]}var u1=c1(T_),na=gB||function(s,c){return It.setTimeout(s,c)},qf=c1(SF);function l1(s,c,g){var O=c+"";return qf(s,WF(O,r$(HF(O),g)))}function c1(s){var c=0,g=0;return function(){var O=xB(),N=D-(O-g);if(g=O,N>0){if(++c>=j)return arguments[0]}else c=0;return s.apply(r,arguments)}}function Js(s,c){var g=-1,O=s.length,N=O-1;for(c=c===r?O:c;++g<c;){var q=yf(g,N),z=s[q];s[q]=s[g],s[g]=z}return s.length=c,s}var f1=ZF(function(s){var c=[];return s.charCodeAt(0)===46&&c.push(""),s.replace(xc,function(g,O,N,q){c.push(N?q.replace(Cc,"$1"):O||g)}),c});function Mr(s){if(typeof s=="string"||nr(s))return s;var c=s+"";return c=="0"&&1/s==-Z?"-0":c}function oi(s){if(s!=null){try{return Rs.call(s)}catch{}try{return s+""}catch{}}return""}function r$(s,c){return er(W,function(g){var O="_."+g[0];c&g[1]&&!_s(s,O)&&s.push(O)}),s.sort()}function d1(s){if(s instanceof Be)return s.clone();var c=new vr(s.__wrapped__,s.__chain__);return c.__actions__=zt(s.__actions__),c.__index__=s.__index__,c.__values__=s.__values__,c}function n$(s,c,g){(g?kt(s,c,g):c===r)?c=1:c=St(De(c),0);var O=s==null?0:s.length;if(!O||c<1)return[];for(var N=0,q=0,z=ce(Ds(O/c));N<O;)z[q++]=mr(s,N,N+=c);return z}function i$(s){for(var c=-1,g=s==null?0:s.length,O=0,N=[];++c<g;){var q=s[c];q&&(N[O++]=q)}return N}function o$(){var s=arguments.length;if(!s)return[];for(var c=ce(s-1),g=arguments[0],O=s;O--;)c[O-1]=arguments[O];return In(Me(g)?zt(g):[g],Pt(c,1))}var a$=qe(function(s,c){return pt(s)?Zo(s,Pt(c,1,pt,!0)):[]}),s$=qe(function(s,c){var g=yr(c);return pt(g)&&(g=r),pt(s)?Zo(s,Pt(c,1,pt,!0),Ie(g,2)):[]}),u$=qe(function(s,c){var g=yr(c);return pt(g)&&(g=r),pt(s)?Zo(s,Pt(c,1,pt,!0),r,g):[]});function l$(s,c,g){var O=s==null?0:s.length;return O?(c=g||c===r?1:De(c),mr(s,c<0?0:c,O)):[]}function c$(s,c,g){var O=s==null?0:s.length;return O?(c=g||c===r?1:De(c),c=O-c,mr(s,0,c<0?0:c)):[]}function f$(s,c){return s&&s.length?Vs(s,Ie(c,3),!0,!0):[]}function d$(s,c){return s&&s.length?Vs(s,Ie(c,3),!0):[]}function h$(s,c,g,O){var N=s==null?0:s.length;return N?(g&&typeof g!="number"&&kt(s,c,g)&&(g=0,O=N),oF(s,c,g,O)):[]}function h1(s,c,g){var O=s==null?0:s.length;if(!O)return-1;var N=g==null?0:De(g);return N<0&&(N=St(O+N,0)),Es(s,Ie(c,3),N)}function p1(s,c,g){var O=s==null?0:s.length;if(!O)return-1;var N=O-1;return g!==r&&(N=De(g),N=g<0?St(O+N,0):At(N,O-1)),Es(s,Ie(c,3),N,!0)}function v1(s){var c=s==null?0:s.length;return c?Pt(s,1):[]}function p$(s){var c=s==null?0:s.length;return c?Pt(s,Z):[]}function v$(s,c){var g=s==null?0:s.length;return g?(c=c===r?1:De(c),Pt(s,c)):[]}function g$(s){for(var c=-1,g=s==null?0:s.length,O={};++c<g;){var N=s[c];Wr(O,N[0],N[1])}return O}function g1(s){return s&&s.length?s[0]:r}function m$(s,c,g){var O=s==null?0:s.length;if(!O)return-1;var N=g==null?0:De(g);return N<0&&(N=St(O+N,0)),Bi(s,c,N)}function y$(s){var c=s==null?0:s.length;return c?mr(s,0,-1):[]}var b$=qe(function(s){var c=st(s,Ef);return c.length&&c[0]===s[0]?hf(c):[]}),x$=qe(function(s){var c=yr(s),g=st(s,Ef);return c===yr(g)?c=r:g.pop(),g.length&&g[0]===s[0]?hf(g,Ie(c,2)):[]}),w$=qe(function(s){var c=yr(s),g=st(s,Ef);return c=typeof c=="function"?c:r,c&&g.pop(),g.length&&g[0]===s[0]?hf(g,r,c):[]});function _$(s,c){return s==null?"":yB.call(s,c)}function yr(s){var c=s==null?0:s.length;return c?s[c-1]:r}function E$(s,c,g){var O=s==null?0:s.length;if(!O)return-1;var N=O;return g!==r&&(N=De(g),N=N<0?St(O+N,0):At(N,O-1)),c===c?rB(s,c,N):Es(s,Xw,N,!0)}function S$(s,c){return s&&s.length?R_(s,De(c)):r}var O$=qe(m1);function m1(s,c){return s&&s.length&&c&&c.length?mf(s,c):s}function C$(s,c,g){return s&&s.length&&c&&c.length?mf(s,c,Ie(g,2)):s}function R$(s,c,g){return s&&s.length&&c&&c.length?mf(s,c,r,g):s}var I$=dn(function(s,c){var g=s==null?0:s.length,O=lf(s,c);return N_(s,st(c,function(N){return hn(N,g)?+N:N}).sort(F_)),O});function P$(s,c){var g=[];if(!(s&&s.length))return g;var O=-1,N=[],q=s.length;for(c=Ie(c,3);++O<q;){var z=s[O];c(z,O,s)&&(g.push(z),N.push(O))}return N_(s,N),g}function kf(s){return s==null?s:_B.call(s)}function N$(s,c,g){var O=s==null?0:s.length;return O?(g&&typeof g!="number"&&kt(s,c,g)?(c=0,g=O):(c=c==null?0:De(c),g=g===r?O:De(g)),mr(s,c,g)):[]}function T$(s,c){return Hs(s,c)}function A$(s,c,g){return xf(s,c,Ie(g,2))}function M$(s,c){var g=s==null?0:s.length;if(g){var O=Hs(s,c);if(O<g&&Dr(s[O],c))return O}return-1}function D$(s,c){return Hs(s,c,!0)}function j$(s,c,g){return xf(s,c,Ie(g,2),!0)}function q$(s,c){var g=s==null?0:s.length;if(g){var O=Hs(s,c,!0)-1;if(Dr(s[O],c))return O}return-1}function k$(s){return s&&s.length?A_(s):[]}function L$(s,c){return s&&s.length?A_(s,Ie(c,2)):[]}function B$(s){var c=s==null?0:s.length;return c?mr(s,1,c):[]}function F$(s,c,g){return s&&s.length?(c=g||c===r?1:De(c),mr(s,0,c<0?0:c)):[]}function $$(s,c,g){var O=s==null?0:s.length;return O?(c=g||c===r?1:De(c),c=O-c,mr(s,c<0?0:c,O)):[]}function z$(s,c){return s&&s.length?Vs(s,Ie(c,3),!1,!0):[]}function H$(s,c){return s&&s.length?Vs(s,Ie(c,3)):[]}var V$=qe(function(s){return An(Pt(s,1,pt,!0))}),U$=qe(function(s){var c=yr(s);return pt(c)&&(c=r),An(Pt(s,1,pt,!0),Ie(c,2))}),W$=qe(function(s){var c=yr(s);return c=typeof c=="function"?c:r,An(Pt(s,1,pt,!0),r,c)});function G$(s){return s&&s.length?An(s):[]}function K$(s,c){return s&&s.length?An(s,Ie(c,2)):[]}function Y$(s,c){return c=typeof c=="function"?c:r,s&&s.length?An(s,r,c):[]}function Lf(s){if(!(s&&s.length))return[];var c=0;return s=Rn(s,function(g){if(pt(g))return c=St(g.length,c),!0}),ef(c,function(g){return st(s,Zc(g))})}function y1(s,c){if(!(s&&s.length))return[];var g=Lf(s);return c==null?g:st(g,function(O){return Qt(c,r,O)})}var X$=qe(function(s,c){return pt(s)?Zo(s,c):[]}),Z$=qe(function(s){return _f(Rn(s,pt))}),J$=qe(function(s){var c=yr(s);return pt(c)&&(c=r),_f(Rn(s,pt),Ie(c,2))}),Q$=qe(function(s){var c=yr(s);return c=typeof c=="function"?c:r,_f(Rn(s,pt),r,c)}),ez=qe(Lf);function tz(s,c){return q_(s||[],c||[],Xo)}function rz(s,c){return q_(s||[],c||[],ea)}var nz=qe(function(s){var c=s.length,g=c>1?s[c-1]:r;return g=typeof g=="function"?(s.pop(),g):r,y1(s,g)});function b1(s){var c=M(s);return c.__chain__=!0,c}function iz(s,c){return c(s),s}function Qs(s,c){return c(s)}var oz=dn(function(s){var c=s.length,g=c?s[0]:0,O=this.__wrapped__,N=function(q){return lf(q,s)};return c>1||this.__actions__.length||!(O instanceof Be)||!hn(g)?this.thru(N):(O=O.slice(g,+g+(c?1:0)),O.__actions__.push({func:Qs,args:[N],thisArg:r}),new vr(O,this.__chain__).thru(function(q){return c&&!q.length&&q.push(r),q}))});function az(){return b1(this)}function sz(){return new vr(this.value(),this.__chain__)}function uz(){this.__values__===r&&(this.__values__=M1(this.value()));var s=this.__index__>=this.__values__.length,c=s?r:this.__values__[this.__index__++];return{done:s,value:c}}function lz(){return this}function cz(s){for(var c,g=this;g instanceof Ls;){var O=d1(g);O.__index__=0,O.__values__=r,c?N.__wrapped__=O:c=O;var N=O;g=g.__wrapped__}return N.__wrapped__=s,c}function fz(){var s=this.__wrapped__;if(s instanceof Be){var c=s;return this.__actions__.length&&(c=new Be(this)),c=c.reverse(),c.__actions__.push({func:Qs,args:[kf],thisArg:r}),new vr(c,this.__chain__)}return this.thru(kf)}function dz(){return j_(this.__wrapped__,this.__actions__)}var hz=Us(function(s,c,g){Ge.call(s,g)?++s[g]:Wr(s,g,1)});function pz(s,c,g){var O=Me(s)?Kw:iF;return g&&kt(s,c,g)&&(c=r),O(s,Ie(c,3))}function vz(s,c){var g=Me(s)?Rn:y_;return g(s,Ie(c,3))}var gz=W_(h1),mz=W_(p1);function yz(s,c){return Pt(eu(s,c),1)}function bz(s,c){return Pt(eu(s,c),Z)}function xz(s,c,g){return g=g===r?1:De(g),Pt(eu(s,c),g)}function x1(s,c){var g=Me(s)?er:Tn;return g(s,Ie(c,3))}function w1(s,c){var g=Me(s)?BL:m_;return g(s,Ie(c,3))}var wz=Us(function(s,c,g){Ge.call(s,g)?s[g].push(c):Wr(s,g,[c])});function _z(s,c,g,O){s=Ht(s)?s:Zi(s),g=g&&!O?De(g):0;var N=s.length;return g<0&&(g=St(N+g,0)),ou(s)?g<=N&&s.indexOf(c,g)>-1:!!N&&Bi(s,c,g)>-1}var Ez=qe(function(s,c,g){var O=-1,N=typeof c=="function",q=Ht(s)?ce(s.length):[];return Tn(s,function(z){q[++O]=N?Qt(c,z,g):Jo(z,c,g)}),q}),Sz=Us(function(s,c,g){Wr(s,g,c)});function eu(s,c){var g=Me(s)?st:S_;return g(s,Ie(c,3))}function Oz(s,c,g,O){return s==null?[]:(Me(c)||(c=c==null?[]:[c]),g=O?r:g,Me(g)||(g=g==null?[]:[g]),I_(s,c,g))}var Cz=Us(function(s,c,g){s[g?0:1].push(c)},function(){return[[],[]]});function Rz(s,c,g){var O=Me(s)?Yc:Jw,N=arguments.length<3;return O(s,Ie(c,4),g,N,Tn)}function Iz(s,c,g){var O=Me(s)?FL:Jw,N=arguments.length<3;return O(s,Ie(c,4),g,N,m_)}function Pz(s,c){var g=Me(s)?Rn:y_;return g(s,nu(Ie(c,3)))}function Nz(s){var c=Me(s)?h_:_F;return c(s)}function Tz(s,c,g){(g?kt(s,c,g):c===r)?c=1:c=De(c);var O=Me(s)?QB:EF;return O(s,c)}function Az(s){var c=Me(s)?eF:OF;return c(s)}function Mz(s){if(s==null)return 0;if(Ht(s))return ou(s)?$i(s):s.length;var c=Mt(s);return c==be||c==Fe?s.size:vf(s).length}function Dz(s,c,g){var O=Me(s)?Xc:CF;return g&&kt(s,c,g)&&(c=r),O(s,Ie(c,3))}var jz=qe(function(s,c){if(s==null)return[];var g=c.length;return g>1&&kt(s,c[0],c[1])?c=[]:g>2&&kt(c[0],c[1],c[2])&&(c=[c[0]]),I_(s,Pt(c,1),[])}),tu=vB||function(){return It.Date.now()};function qz(s,c){if(typeof c!="function")throw new pr(a);return s=De(s),function(){if(--s<1)return c.apply(this,arguments)}}function _1(s,c,g){return c=g?r:c,c=s&&c==null?s.length:c,fn(s,P,r,r,r,r,c)}function E1(s,c){var g;if(typeof c!="function")throw new pr(a);return s=De(s),function(){return--s>0&&(g=c.apply(this,arguments)),s<=1&&(c=r),g}}var Bf=qe(function(s,c,g){var O=b;if(g.length){var N=Pn(g,Yi(Bf));O|=R}return fn(s,O,c,g,N)}),S1=qe(function(s,c,g){var O=b|w;if(g.length){var N=Pn(g,Yi(S1));O|=R}return fn(c,O,s,g,N)});function O1(s,c,g){c=g?r:c;var O=fn(s,_,r,r,r,r,r,c);return O.placeholder=O1.placeholder,O}function C1(s,c,g){c=g?r:c;var O=fn(s,S,r,r,r,r,r,c);return O.placeholder=C1.placeholder,O}function R1(s,c,g){var O,N,q,z,X,ie,ge=0,me=!1,ye=!1,_e=!0;if(typeof s!="function")throw new pr(a);c=br(c)||0,ft(g)&&(me=!!g.leading,ye="maxWait"in g,q=ye?St(br(g.maxWait)||0,c):q,_e="trailing"in g?!!g.trailing:_e);function Ce(vt){var jr=O,gn=N;return O=N=r,ge=vt,z=s.apply(gn,jr),z}function Ne(vt){return ge=vt,X=na(ke,c),me?Ce(vt):z}function je(vt){var jr=vt-ie,gn=vt-ge,G1=c-jr;return ye?At(G1,q-gn):G1}function Re(vt){var jr=vt-ie,gn=vt-ge;return ie===r||jr>=c||jr<0||ye&&gn>=q}function ke(){var vt=tu();if(Re(vt))return $e(vt);X=na(ke,je(vt))}function $e(vt){return X=r,_e&&O?Ce(vt):(O=N=r,z)}function ir(){X!==r&&k_(X),ge=0,O=ie=N=X=r}function Lt(){return X===r?z:$e(tu())}function or(){var vt=tu(),jr=Re(vt);if(O=arguments,N=this,ie=vt,jr){if(X===r)return Ne(ie);if(ye)return k_(X),X=na(ke,c),Ce(ie)}return X===r&&(X=na(ke,c)),z}return or.cancel=ir,or.flush=Lt,or}var kz=qe(function(s,c){return g_(s,1,c)}),Lz=qe(function(s,c,g){return g_(s,br(c)||0,g)});function Bz(s){return fn(s,k)}function ru(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new pr(a);var g=function(){var O=arguments,N=c?c.apply(this,O):O[0],q=g.cache;if(q.has(N))return q.get(N);var z=s.apply(this,O);return g.cache=q.set(N,z)||q,z};return g.cache=new(ru.Cache||cn),g}ru.Cache=cn;function nu(s){if(typeof s!="function")throw new pr(a);return function(){var c=arguments;switch(c.length){case 0:return!s.call(this);case 1:return!s.call(this,c[0]);case 2:return!s.call(this,c[0],c[1]);case 3:return!s.call(this,c[0],c[1],c[2])}return!s.apply(this,c)}}function Fz(s){return E1(2,s)}var $z=RF(function(s,c){c=c.length==1&&Me(c[0])?st(c[0],tr(Ie())):st(Pt(c,1),tr(Ie()));var g=c.length;return qe(function(O){for(var N=-1,q=At(O.length,g);++N<q;)O[N]=c[N].call(this,O[N]);return Qt(s,this,O)})}),Ff=qe(function(s,c){var g=Pn(c,Yi(Ff));return fn(s,R,r,c,g)}),I1=qe(function(s,c){var g=Pn(c,Yi(I1));return fn(s,I,r,c,g)}),zz=dn(function(s,c){return fn(s,A,r,r,r,c)});function Hz(s,c){if(typeof s!="function")throw new pr(a);return c=c===r?c:De(c),qe(s,c)}function Vz(s,c){if(typeof s!="function")throw new pr(a);return c=c==null?0:St(De(c),0),qe(function(g){var O=g[c],N=Dn(g,0,c);return O&&In(N,O),Qt(s,this,N)})}function Uz(s,c,g){var O=!0,N=!0;if(typeof s!="function")throw new pr(a);return ft(g)&&(O="leading"in g?!!g.leading:O,N="trailing"in g?!!g.trailing:N),R1(s,c,{leading:O,maxWait:c,trailing:N})}function Wz(s){return _1(s,1)}function Gz(s,c){return Ff(Sf(c),s)}function Kz(){if(!arguments.length)return[];var s=arguments[0];return Me(s)?s:[s]}function Yz(s){return gr(s,m)}function Xz(s,c){return c=typeof c=="function"?c:r,gr(s,m,c)}function Zz(s){return gr(s,p|m)}function Jz(s,c){return c=typeof c=="function"?c:r,gr(s,p|m,c)}function Qz(s,c){return c==null||v_(s,c,Ct(c))}function Dr(s,c){return s===c||s!==s&&c!==c}var e3=Ys(df),t3=Ys(function(s,c){return s>=c}),ai=w_((function(){return arguments})())?w_:function(s){return dt(s)&&Ge.call(s,"callee")&&!s_.call(s,"callee")},Me=ce.isArray,r3=zw?tr(zw):cF;function Ht(s){return s!=null&&iu(s.length)&&!pn(s)}function pt(s){return dt(s)&&Ht(s)}function n3(s){return s===!0||s===!1||dt(s)&&qt(s)==se}var jn=mB||Jf,i3=Hw?tr(Hw):fF;function o3(s){return dt(s)&&s.nodeType===1&&!ia(s)}function a3(s){if(s==null)return!0;if(Ht(s)&&(Me(s)||typeof s=="string"||typeof s.splice=="function"||jn(s)||Xi(s)||ai(s)))return!s.length;var c=Mt(s);if(c==be||c==Fe)return!s.size;if(ra(s))return!vf(s).length;for(var g in s)if(Ge.call(s,g))return!1;return!0}function s3(s,c){return Qo(s,c)}function u3(s,c,g){g=typeof g=="function"?g:r;var O=g?g(s,c):r;return O===r?Qo(s,c,r,g):!!O}function $f(s){if(!dt(s))return!1;var c=qt(s);return c==V||c==fe||typeof s.message=="string"&&typeof s.name=="string"&&!ia(s)}function l3(s){return typeof s=="number"&&l_(s)}function pn(s){if(!ft(s))return!1;var c=qt(s);return c==ee||c==we||c==K||c==Ze}function P1(s){return typeof s=="number"&&s==De(s)}function iu(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=te}function ft(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}function dt(s){return s!=null&&typeof s=="object"}var N1=Vw?tr(Vw):hF;function c3(s,c){return s===c||pf(s,c,Tf(c))}function f3(s,c,g){return g=typeof g=="function"?g:r,pf(s,c,Tf(c),g)}function d3(s){return T1(s)&&s!=+s}function h3(s){if(XF(s))throw new Ae(o);return __(s)}function p3(s){return s===null}function v3(s){return s==null}function T1(s){return typeof s=="number"||dt(s)&&qt(s)==de}function ia(s){if(!dt(s)||qt(s)!=Ee)return!1;var c=Ts(s);if(c===null)return!0;var g=Ge.call(c,"constructor")&&c.constructor;return typeof g=="function"&&g instanceof g&&Rs.call(g)==fB}var zf=Uw?tr(Uw):pF;function g3(s){return P1(s)&&s>=-te&&s<=te}var A1=Ww?tr(Ww):vF;function ou(s){return typeof s=="string"||!Me(s)&&dt(s)&&qt(s)==Ve}function nr(s){return typeof s=="symbol"||dt(s)&&qt(s)==lt}var Xi=Gw?tr(Gw):gF;function m3(s){return s===r}function y3(s){return dt(s)&&Mt(s)==mt}function b3(s){return dt(s)&&qt(s)==yt}var x3=Ys(gf),w3=Ys(function(s,c){return s<=c});function M1(s){if(!s)return[];if(Ht(s))return ou(s)?Tr(s):zt(s);if(Uo&&s[Uo])return QL(s[Uo]());var c=Mt(s),g=c==be?rf:c==Fe?Ss:Zi;return g(s)}function vn(s){if(!s)return s===0?s:0;if(s=br(s),s===Z||s===-Z){var c=s<0?-1:1;return c*U}return s===s?s:0}function De(s){var c=vn(s),g=c%1;return c===c?g?c-g:c:0}function D1(s){return s?ri(De(s),0,ae):0}function br(s){if(typeof s=="number")return s;if(nr(s))return re;if(ft(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=ft(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=Qw(s);var g=Pc.test(s);return g||Tc.test(s)?qL(s.slice(2),g?2:8):Ic.test(s)?re:+s}function j1(s){return Kr(s,Vt(s))}function _3(s){return s?ri(De(s),-te,te):s===0?s:0}function Ke(s){return s==null?"":rr(s)}var E3=Gi(function(s,c){if(ra(c)||Ht(c)){Kr(c,Ct(c),s);return}for(var g in c)Ge.call(c,g)&&Xo(s,g,c[g])}),q1=Gi(function(s,c){Kr(c,Vt(c),s)}),k1=Gi(function(s,c,g,O){Kr(c,Vt(c),s,O)}),Hf=Gi(function(s,c,g,O){Kr(c,Ct(c),s,O)}),S3=dn(lf);function O3(s,c){var g=Wi(s);return c==null?g:p_(g,c)}var C3=qe(function(s,c){s=et(s);var g=-1,O=c.length,N=O>2?c[2]:r;for(N&&kt(c[0],c[1],N)&&(O=1);++g<O;)for(var q=c[g],z=Vt(q),X=-1,ie=z.length;++X<ie;){var ge=z[X],me=s[ge];(me===r||Dr(me,Hi[ge])&&!Ge.call(s,ge))&&(s[ge]=q[ge])}return s}),R3=qe(function(s){return s.push(r,Q_),Qt(L1,r,s)});function I3(s,c){return Yw(s,Ie(c,3),Gr)}function P3(s,c){return Yw(s,Ie(c,3),ff)}function N3(s,c){return s==null?s:cf(s,Ie(c,3),Vt)}function T3(s,c){return s==null?s:b_(s,Ie(c,3),Vt)}function A3(s,c){return s&&Gr(s,Ie(c,3))}function M3(s,c){return s&&ff(s,Ie(c,3))}function D3(s){return s==null?[]:$s(s,Ct(s))}function j3(s){return s==null?[]:$s(s,Vt(s))}function Vf(s,c,g){var O=s==null?r:ni(s,c);return O===r?g:O}function q3(s,c){return s!=null&&r1(s,c,aF)}function Uf(s,c){return s!=null&&r1(s,c,sF)}var k3=K_(function(s,c,g){c!=null&&typeof c.toString!="function"&&(c=Is.call(c)),s[c]=g},Gf(Ut)),L3=K_(function(s,c,g){c!=null&&typeof c.toString!="function"&&(c=Is.call(c)),Ge.call(s,c)?s[c].push(g):s[c]=[g]},Ie),B3=qe(Jo);function Ct(s){return Ht(s)?d_(s):vf(s)}function Vt(s){return Ht(s)?d_(s,!0):mF(s)}function F3(s,c){var g={};return c=Ie(c,3),Gr(s,function(O,N,q){Wr(g,c(O,N,q),O)}),g}function $3(s,c){var g={};return c=Ie(c,3),Gr(s,function(O,N,q){Wr(g,N,c(O,N,q))}),g}var z3=Gi(function(s,c,g){zs(s,c,g)}),L1=Gi(function(s,c,g,O){zs(s,c,g,O)}),H3=dn(function(s,c){var g={};if(s==null)return g;var O=!1;c=st(c,function(q){return q=Mn(q,s),O||(O=q.length>1),q}),Kr(s,Pf(s),g),O&&(g=gr(g,p|v|m,LF));for(var N=c.length;N--;)wf(g,c[N]);return g});function V3(s,c){return B1(s,nu(Ie(c)))}var U3=dn(function(s,c){return s==null?{}:bF(s,c)});function B1(s,c){if(s==null)return{};var g=st(Pf(s),function(O){return[O]});return c=Ie(c),P_(s,g,function(O,N){return c(O,N[0])})}function W3(s,c,g){c=Mn(c,s);var O=-1,N=c.length;for(N||(N=1,s=r);++O<N;){var q=s==null?r:s[Mr(c[O])];q===r&&(O=N,q=g),s=pn(q)?q.call(s):q}return s}function G3(s,c,g){return s==null?s:ea(s,c,g)}function K3(s,c,g,O){return O=typeof O=="function"?O:r,s==null?s:ea(s,c,g,O)}var F1=Z_(Ct),$1=Z_(Vt);function Y3(s,c,g){var O=Me(s),N=O||jn(s)||Xi(s);if(c=Ie(c,4),g==null){var q=s&&s.constructor;N?g=O?new q:[]:ft(s)?g=pn(q)?Wi(Ts(s)):{}:g={}}return(N?er:Gr)(s,function(z,X,ie){return c(g,z,X,ie)}),g}function X3(s,c){return s==null?!0:wf(s,c)}function Z3(s,c,g){return s==null?s:D_(s,c,Sf(g))}function J3(s,c,g,O){return O=typeof O=="function"?O:r,s==null?s:D_(s,c,Sf(g),O)}function Zi(s){return s==null?[]:tf(s,Ct(s))}function Q3(s){return s==null?[]:tf(s,Vt(s))}function e5(s,c,g){return g===r&&(g=c,c=r),g!==r&&(g=br(g),g=g===g?g:0),c!==r&&(c=br(c),c=c===c?c:0),ri(br(s),c,g)}function t5(s,c,g){return c=vn(c),g===r?(g=c,c=0):g=vn(g),s=br(s),uF(s,c,g)}function r5(s,c,g){if(g&&typeof g!="boolean"&&kt(s,c,g)&&(c=g=r),g===r&&(typeof c=="boolean"?(g=c,c=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&c===r?(s=0,c=1):(s=vn(s),c===r?(c=s,s=0):c=vn(c)),s>c){var O=s;s=c,c=O}if(g||s%1||c%1){var N=c_();return At(s+N*(c-s+jL("1e-"+((N+"").length-1))),c)}return yf(s,c)}var n5=Ki(function(s,c,g){return c=c.toLowerCase(),s+(g?z1(c):c)});function z1(s){return Wf(Ke(s).toLowerCase())}function H1(s){return s=Ke(s),s&&s.replace(Mc,KL).replace(OL,"")}function i5(s,c,g){s=Ke(s),c=rr(c);var O=s.length;g=g===r?O:ri(De(g),0,O);var N=g;return g-=c.length,g>=0&&s.slice(g,N)==c}function o5(s){return s=Ke(s),s&&mc.test(s)?s.replace(ls,YL):s}function a5(s){return s=Ke(s),s&&wc.test(s)?s.replace(Di,"\\$&"):s}var s5=Ki(function(s,c,g){return s+(g?"-":"")+c.toLowerCase()}),u5=Ki(function(s,c,g){return s+(g?" ":"")+c.toLowerCase()}),l5=U_("toLowerCase");function c5(s,c,g){s=Ke(s),c=De(c);var O=c?$i(s):0;if(!c||O>=c)return s;var N=(c-O)/2;return Ks(js(N),g)+s+Ks(Ds(N),g)}function f5(s,c,g){s=Ke(s),c=De(c);var O=c?$i(s):0;return c&&O<c?s+Ks(c-O,g):s}function d5(s,c,g){s=Ke(s),c=De(c);var O=c?$i(s):0;return c&&O<c?Ks(c-O,g)+s:s}function h5(s,c,g){return g||c==null?c=0:c&&(c=+c),wB(Ke(s).replace(ji,""),c||0)}function p5(s,c,g){return(g?kt(s,c,g):c===r)?c=1:c=De(c),bf(Ke(s),c)}function v5(){var s=arguments,c=Ke(s[0]);return s.length<3?c:c.replace(s[1],s[2])}var g5=Ki(function(s,c,g){return s+(g?"_":"")+c.toLowerCase()});function m5(s,c,g){return g&&typeof g!="number"&&kt(s,c,g)&&(c=g=r),g=g===r?ae:g>>>0,g?(s=Ke(s),s&&(typeof c=="string"||c!=null&&!zf(c))&&(c=rr(c),!c&&Fi(s))?Dn(Tr(s),0,g):s.split(c,g)):[]}var y5=Ki(function(s,c,g){return s+(g?" ":"")+Wf(c)});function b5(s,c,g){return s=Ke(s),g=g==null?0:ri(De(g),0,s.length),c=rr(c),s.slice(g,g+c.length)==c}function x5(s,c,g){var O=M.templateSettings;g&&kt(s,c,g)&&(c=r),s=Ke(s),c=Hf({},c,O,J_);var N=Hf({},c.imports,O.imports,J_),q=Ct(N),z=tf(N,q);er(q,function(Re){if(ps.test(Re))throw new Ae(l)});var X,ie,ge=0,me=c.interpolate||Xn,ye="__p += '",_e=nf((c.escape||Xn).source+"|"+me.source+"|"+(me===Lo?Rc:Xn).source+"|"+(c.evaluate||Xn).source+"|$","g"),Ce="//# sourceURL="+(Ge.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++NL+"]")+`
|
|
53
|
+
`;s.replace(_e,function(Re,ke,$e,ir,Lt,or){return $e||($e=ir),ye+=s.slice(ge,or).replace(Dc,XL),ke&&(X=!0,ye+=`' +
|
|
54
54
|
__e(`+ke+`) +
|
|
55
|
-
'`),Lt&&(
|
|
55
|
+
'`),Lt&&(ie=!0,ye+=`';
|
|
56
56
|
`+Lt+`;
|
|
57
|
-
__p += '`),$e&&(
|
|
57
|
+
__p += '`),$e&&(ye+=`' +
|
|
58
58
|
((__t = (`+$e+`)) == null ? '' : __t) +
|
|
59
|
-
'`),
|
|
60
|
-
`;var Ne=Ge.call(
|
|
61
|
-
`+
|
|
59
|
+
'`),ge=or+Re.length,Re}),ye+=`';
|
|
60
|
+
`;var Ne=Ge.call(c,"variable")&&c.variable;if(!Ne)ye=`with (obj) {
|
|
61
|
+
`+ye+`
|
|
62
62
|
}
|
|
63
|
-
`;else if(
|
|
63
|
+
`;else if(ps.test(Ne))throw new Ae(u);ye=(ie?ye.replace(Mi,""):ye).replace(vc,"$1").replace(gc,"$1;"),ye="function("+(Ne||"obj")+`) {
|
|
64
64
|
`+(Ne?"":`obj || (obj = {});
|
|
65
|
-
`)+"var __t, __p = ''"+(
|
|
65
|
+
`)+"var __t, __p = ''"+(X?", __e = _.escape":"")+(ie?`, __j = Array.prototype.join;
|
|
66
66
|
function print() { __p += __j.call(arguments, '') }
|
|
67
67
|
`:`;
|
|
68
|
-
`)+
|
|
69
|
-
}`;var je=$1(function(){return We(q,Oe+"return "+me).apply(r,W)});if(je.source=me,qf(je))throw je;return je}function h5(s){return Ke(s).toLowerCase()}function p5(s){return Ke(s).toUpperCase()}function v5(s,l,g){if(s=Ke(s),s&&(g||l===r))return Yw(s);if(!s||!(l=rr(l)))return s;var O=Tr(s),P=Tr(l),q=Xw(O,P),W=Zw(O,P)+1;return Dn(O,q,W).join("")}function g5(s,l,g){if(s=Ke(s),s&&(g||l===r))return s.slice(0,Qw(s)+1);if(!s||!(l=rr(l)))return s;var O=Tr(s),P=Zw(O,Tr(l))+1;return Dn(O,0,P).join("")}function m5(s,l,g){if(s=Ke(s),s&&(g||l===r))return s.replace(Mi,"");if(!s||!(l=rr(l)))return s;var O=Tr(s),P=Xw(O,Tr(l));return Dn(O,P).join("")}function y5(s,l){var g=B,O=U;if(ft(l)){var P="separator"in l?l.separator:P;g="length"in l?De(l.length):g,O="omission"in l?rr(l.omission):O}s=Ke(s);var q=s.length;if(Li(s)){var W=Tr(s);q=W.length}if(g>=q)return s;var Y=g-Bi(O);if(Y<1)return O;var ne=W?Dn(W,0,Y).join(""):s.slice(0,Y);if(P===r)return ne+O;if(W&&(Y+=ne.length-Y),kf(P)){if(s.slice(Y).search(P)){var ve,ge=ne;for(P.global||(P=Jl(P.source,Ke(fs.exec(P))+"g")),P.lastIndex=0;ve=P.exec(ge);)var me=ve.index;ne=ne.slice(0,me===r?Y:me)}}else if(s.indexOf(rr(P),Y)!=Y){var xe=ne.lastIndexOf(P);xe>-1&&(ne=ne.slice(0,xe))}return ne+O}function b5(s){return s=Ke(s),s&&as.test(s)?s.replace(Do,YL):s}var x5=Vi(function(s,l,g){return s+(g?" ":"")+l.toUpperCase()}),$f=$_("toUpperCase");function F1(s,l,g){return s=Ke(s),l=g?r:l,l===r?UL(s)?JL(s):jL(s):s.match(l)||[]}var $1=qe(function(s,l){try{return Qt(s,r,l)}catch(g){return qf(g)?g:new Ae(g)}}),w5=dn(function(s,l){return er(l,function(g){g=Mr(g),Vr(s,g,Df(s[g],s))}),s});function _5(s){var l=s==null?0:s.length,g=Ie();return s=l?st(s,function(O){if(typeof O[1]!="function")throw new pr(a);return[g(O[0]),O[1]]}):[],qe(function(O){for(var P=-1;++P<l;){var q=s[P];if(Qt(q[0],this,O))return Qt(q[1],this,O)}})}function E5(s){return YB(gr(s,p))}function zf(s){return function(){return s}}function S5(s,l){return s==null||s!==s?l:s}var O5=H_(),C5=H_(!0);function Wt(s){return s}function Hf(s){return b_(typeof s=="function"?s:gr(s,p))}function R5(s){return w_(gr(s,p))}function I5(s,l){return __(s,gr(l,p))}var P5=qe(function(s,l){return function(g){return Yo(g,s,l)}}),N5=qe(function(s,l){return function(g){return Yo(s,g,l)}});function Uf(s,l,g){var O=Ct(l),P=ks(l,O);g==null&&!(ft(l)&&(P.length||!O.length))&&(g=l,l=s,s=this,P=ks(l,Ct(l)));var q=!(ft(g)&&"chain"in g)||!!g.chain,W=pn(s);return er(P,function(Y){var ne=l[Y];s[Y]=ne,W&&(s.prototype[Y]=function(){var ve=this.__chain__;if(q||ve){var ge=s(this.__wrapped__),me=ge.__actions__=zt(this.__actions__);return me.push({func:ne,args:arguments,thisArg:s}),ge.__chain__=ve,ge}return ne.apply(s,In([this.value()],arguments))})}),s}function T5(){return It._===this&&(It._=iB),this}function Wf(){}function A5(s){return s=De(s),qe(function(l){return E_(l,s)})}var M5=wf(st),D5=wf(Uw),j5=wf(Wl);function z1(s){return If(s)?Vl(Mr(s)):dF(s)}function q5(s){return function(l){return s==null?r:ni(s,l)}}var k5=W_(),L5=W_(!0);function Vf(){return[]}function Gf(){return!1}function B5(){return{}}function F5(){return""}function $5(){return!0}function z5(s,l){if(s=De(s),s<1||s>Q)return[];var g=oe,O=At(s,oe);l=Ie(l),s-=oe;for(var P=Yl(O,l);++g<s;)l(g);return P}function H5(s){return Me(s)?st(s,Mr):nr(s)?[s]:zt(s1(Ke(s)))}function U5(s){var l=++rB;return Ke(s)+l}var W5=Hs(function(s,l){return s+l},0),V5=_f("ceil"),G5=Hs(function(s,l){return s/l},1),K5=_f("floor");function Y5(s){return s&&s.length?qs(s,Wt,sf):r}function X5(s,l){return s&&s.length?qs(s,Ie(l,2),sf):r}function Z5(s){return Gw(s,Wt)}function J5(s,l){return Gw(s,Ie(l,2))}function Q5(s){return s&&s.length?qs(s,Wt,ff):r}function eH(s,l){return s&&s.length?qs(s,Ie(l,2),ff):r}var tH=Hs(function(s,l){return s*l},1),rH=_f("round"),nH=Hs(function(s,l){return s-l},0);function iH(s){return s&&s.length?Kl(s,Wt):0}function oH(s,l){return s&&s.length?Kl(s,Ie(l,2)):0}return M.after=I3,M.ary=y1,M.assign=vz,M.assignIn=A1,M.assignInWith=M1,M.assignWith=Lf,M.at=gz,M.before=b1,M.bind=Df,M.bindAll=w5,M.bindKey=x1,M.castArray=F3,M.chain=v1,M.chunk=YF,M.compact=XF,M.concat=ZF,M.cond=_5,M.conforms=E5,M.constant=zf,M.countBy=o3,M.create=mz,M.curry=w1,M.curryRight=_1,M.debounce=E1,M.defaults=yz,M.defaultsDeep=bz,M.defer=P3,M.delay=N3,M.difference=JF,M.differenceBy=QF,M.differenceWith=e$,M.drop=t$,M.dropRight=r$,M.dropRightWhile=n$,M.dropWhile=i$,M.fill=o$,M.filter=s3,M.flatMap=l3,M.flatMapDeep=f3,M.flatMapDepth=d3,M.flatten=f1,M.flattenDeep=a$,M.flattenDepth=s$,M.flip=T3,M.flow=O5,M.flowRight=C5,M.fromPairs=u$,M.functions=Cz,M.functionsIn=Rz,M.groupBy=h3,M.initial=l$,M.intersection=f$,M.intersectionBy=d$,M.intersectionWith=h$,M.invert=Pz,M.invertBy=Nz,M.invokeMap=v3,M.iteratee=Hf,M.keyBy=g3,M.keys=Ct,M.keysIn=Ut,M.map=Xs,M.mapKeys=Az,M.mapValues=Mz,M.matches=R5,M.matchesProperty=I5,M.memoize=Js,M.merge=Dz,M.mergeWith=D1,M.method=P5,M.methodOf=N5,M.mixin=Uf,M.negate=Qs,M.nthArg=A5,M.omit=jz,M.omitBy=qz,M.once=A3,M.orderBy=m3,M.over=M5,M.overArgs=M3,M.overEvery=D5,M.overSome=j5,M.partial=jf,M.partialRight=S1,M.partition=y3,M.pick=kz,M.pickBy=j1,M.property=z1,M.propertyOf=q5,M.pull=m$,M.pullAll=h1,M.pullAllBy=y$,M.pullAllWith=b$,M.pullAt=x$,M.range=k5,M.rangeRight=L5,M.rearg=D3,M.reject=w3,M.remove=w$,M.rest=j3,M.reverse=Af,M.sampleSize=E3,M.set=Bz,M.setWith=Fz,M.shuffle=S3,M.slice=_$,M.sortBy=R3,M.sortedUniq=P$,M.sortedUniqBy=N$,M.split=c5,M.spread=q3,M.tail=T$,M.take=A$,M.takeRight=M$,M.takeRightWhile=D$,M.takeWhile=j$,M.tap=X$,M.throttle=k3,M.thru=Ys,M.toArray=P1,M.toPairs=q1,M.toPairsIn=k1,M.toPath=H5,M.toPlainObject=T1,M.transform=$z,M.unary=L3,M.union=q$,M.unionBy=k$,M.unionWith=L$,M.uniq=B$,M.uniqBy=F$,M.uniqWith=$$,M.unset=zz,M.unzip=Mf,M.unzipWith=p1,M.update=Hz,M.updateWith=Uz,M.values=Yi,M.valuesIn=Wz,M.without=z$,M.words=F1,M.wrap=B3,M.xor=H$,M.xorBy=U$,M.xorWith=W$,M.zip=V$,M.zipObject=G$,M.zipObjectDeep=K$,M.zipWith=Y$,M.entries=q1,M.entriesIn=k1,M.extend=A1,M.extendWith=M1,Uf(M,M),M.add=W5,M.attempt=$1,M.camelCase=Yz,M.capitalize=L1,M.ceil=V5,M.clamp=Vz,M.clone=$3,M.cloneDeep=H3,M.cloneDeepWith=U3,M.cloneWith=z3,M.conformsTo=W3,M.deburr=B1,M.defaultTo=S5,M.divide=G5,M.endsWith=Xz,M.eq=Dr,M.escape=Zz,M.escapeRegExp=Jz,M.every=a3,M.find=u3,M.findIndex=c1,M.findKey=xz,M.findLast=c3,M.findLastIndex=l1,M.findLastKey=wz,M.floor=K5,M.forEach=g1,M.forEachRight=m1,M.forIn=_z,M.forInRight=Ez,M.forOwn=Sz,M.forOwnRight=Oz,M.get=Bf,M.gt=V3,M.gte=G3,M.has=Iz,M.hasIn=Ff,M.head=d1,M.identity=Wt,M.includes=p3,M.indexOf=c$,M.inRange=Gz,M.invoke=Tz,M.isArguments=ai,M.isArray=Me,M.isArrayBuffer=K3,M.isArrayLike=Ht,M.isArrayLikeObject=pt,M.isBoolean=Y3,M.isBuffer=jn,M.isDate=X3,M.isElement=Z3,M.isEmpty=J3,M.isEqual=Q3,M.isEqualWith=ez,M.isError=qf,M.isFinite=tz,M.isFunction=pn,M.isInteger=O1,M.isLength=eu,M.isMap=C1,M.isMatch=rz,M.isMatchWith=nz,M.isNaN=iz,M.isNative=oz,M.isNil=sz,M.isNull=az,M.isNumber=R1,M.isObject=ft,M.isObjectLike=dt,M.isPlainObject=ta,M.isRegExp=kf,M.isSafeInteger=uz,M.isSet=I1,M.isString=tu,M.isSymbol=nr,M.isTypedArray=Ki,M.isUndefined=cz,M.isWeakMap=lz,M.isWeakSet=fz,M.join=p$,M.kebabCase=Qz,M.last=yr,M.lastIndexOf=v$,M.lowerCase=e5,M.lowerFirst=t5,M.lt=dz,M.lte=hz,M.max=Y5,M.maxBy=X5,M.mean=Z5,M.meanBy=J5,M.min=Q5,M.minBy=eH,M.stubArray=Vf,M.stubFalse=Gf,M.stubObject=B5,M.stubString=F5,M.stubTrue=$5,M.multiply=tH,M.nth=g$,M.noConflict=T5,M.noop=Wf,M.now=Zs,M.pad=r5,M.padEnd=n5,M.padStart=i5,M.parseInt=o5,M.random=Kz,M.reduce=b3,M.reduceRight=x3,M.repeat=a5,M.replace=s5,M.result=Lz,M.round=rH,M.runInContext=te,M.sample=_3,M.size=O3,M.snakeCase=u5,M.some=C3,M.sortedIndex=E$,M.sortedIndexBy=S$,M.sortedIndexOf=O$,M.sortedLastIndex=C$,M.sortedLastIndexBy=R$,M.sortedLastIndexOf=I$,M.startCase=l5,M.startsWith=f5,M.subtract=nH,M.sum=iH,M.sumBy=oH,M.template=d5,M.times=z5,M.toFinite=vn,M.toInteger=De,M.toLength=N1,M.toLower=h5,M.toNumber=br,M.toSafeInteger=pz,M.toString=Ke,M.toUpper=p5,M.trim=v5,M.trimEnd=g5,M.trimStart=m5,M.truncate=y5,M.unescape=b5,M.uniqueId=U5,M.upperCase=x5,M.upperFirst=$f,M.each=g1,M.eachRight=m1,M.first=d1,Uf(M,(function(){var s={};return Gr(M,function(l,g){Ge.call(M.prototype,g)||(s[g]=l)}),s})(),{chain:!1}),M.VERSION=n,er(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){M[s].placeholder=M}),er(["drop","take"],function(s,l){Be.prototype[s]=function(g){g=g===r?1:St(De(g),0);var O=this.__filtered__&&!l?new Be(this):this.clone();return O.__filtered__?O.__takeCount__=At(g,O.__takeCount__):O.__views__.push({size:At(g,oe),type:s+(O.__dir__<0?"Right":"")}),O},Be.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),er(["filter","map","takeWhile"],function(s,l){var g=l+1,O=g==G||g==X;Be.prototype[s]=function(P){var q=this.clone();return q.__iteratees__.push({iteratee:Ie(P,3),type:g}),q.__filtered__=q.__filtered__||O,q}}),er(["head","last"],function(s,l){var g="take"+(l?"Right":"");Be.prototype[s]=function(){return this[g](1).value()[0]}}),er(["initial","tail"],function(s,l){var g="drop"+(l?"":"Right");Be.prototype[s]=function(){return this.__filtered__?new Be(this):this[g](1)}}),Be.prototype.compact=function(){return this.filter(Wt)},Be.prototype.find=function(s){return this.filter(s).head()},Be.prototype.findLast=function(s){return this.reverse().find(s)},Be.prototype.invokeMap=qe(function(s,l){return typeof s=="function"?new Be(this):this.map(function(g){return Yo(g,s,l)})}),Be.prototype.reject=function(s){return this.filter(Qs(Ie(s)))},Be.prototype.slice=function(s,l){s=De(s);var g=this;return g.__filtered__&&(s>0||l<0)?new Be(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),l!==r&&(l=De(l),g=l<0?g.dropRight(-l):g.take(l-s)),g)},Be.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Be.prototype.toArray=function(){return this.take(oe)},Gr(Be.prototype,function(s,l){var g=/^(?:filter|find|map|reject)|While$/.test(l),O=/^(?:head|last)$/.test(l),P=M[O?"take"+(l=="last"?"Right":""):l],q=O||/^find/.test(l);P&&(M.prototype[l]=function(){var W=this.__wrapped__,Y=O?[1]:arguments,ne=W instanceof Be,ve=Y[0],ge=ne||Me(W),me=function(ke){var $e=P.apply(M,In([ke],Y));return O&&xe?$e[0]:$e};ge&&g&&typeof ve=="function"&&ve.length!=1&&(ne=ge=!1);var xe=this.__chain__,Oe=!!this.__actions__.length,Ne=q&&!xe,je=ne&&!Oe;if(!q&&ge){W=je?W:new Be(this);var Re=s.apply(W,Y);return Re.__actions__.push({func:Ys,args:[me],thisArg:r}),new vr(Re,xe)}return Ne&&je?s.apply(this,Y):(Re=this.thru(me),Ne?O?Re.value()[0]:Re.value():Re)})}),er(["pop","push","shift","sort","splice","unshift"],function(s){var l=ws[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",O=/^(?:pop|shift)$/.test(s);M.prototype[s]=function(){var P=arguments;if(O&&!this.__chain__){var q=this.value();return l.apply(Me(q)?q:[],P)}return this[g](function(W){return l.apply(Me(W)?W:[],P)})}}),Gr(Be.prototype,function(s,l){var g=M[l];if(g){var O=g.name+"";Ge.call(Hi,O)||(Hi[O]=[]),Hi[O].push({name:l,func:g})}}),Hi[zs(r,w).name]=[{name:"wrapper",func:r}],Be.prototype.clone=xB,Be.prototype.reverse=wB,Be.prototype.value=_B,M.prototype.at=Z$,M.prototype.chain=J$,M.prototype.commit=Q$,M.prototype.next=e3,M.prototype.plant=r3,M.prototype.reverse=n3,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=i3,M.prototype.first=M.prototype.head,zo&&(M.prototype[zo]=t3),M}),Fi=QL();Jn?((Jn.exports=Fi)._=Fi,$l._=Fi):It._=Fi}).call(SZ)})(Pa,Pa.exports)),Pa.exports}var cc=OZ(),TN={},ua,AN;function wt(){if(AN)return ua;AN=1;var e=function(t){return t&&t.Math===Math&&t};return ua=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof ht=="object"&&ht)||e(typeof ua=="object"&&ua)||(function(){return this})()||Function("return this")(),ua}var Hm={},Um,MN;function it(){return MN||(MN=1,Um=function(e){try{return!!e()}catch{return!0}}),Um}var Wm,DN;function Ir(){if(DN)return Wm;DN=1;var e=it();return Wm=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Wm}var Vm,jN;function Yc(){if(jN)return Vm;jN=1;var e=it();return Vm=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Vm}var Gm,qN;function Zt(){if(qN)return Gm;qN=1;var e=Yc(),t=Function.prototype.call;return Gm=e?t.bind(t):function(){return t.apply(t,arguments)},Gm}var Km={},kN;function hk(){if(kN)return Km;kN=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Km.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,Km}var Ym,LN;function Xc(){return LN||(LN=1,Ym=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),Ym}var Xm,BN;function ot(){if(BN)return Xm;BN=1;var e=Yc(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Xm=e?n:function(i){return function(){return r.apply(i,arguments)}},Xm}var Zm,FN;function Gn(){if(FN)return Zm;FN=1;var e=ot(),t=e({}.toString),r=e("".slice);return Zm=function(n){return r(t(n),8,-1)},Zm}var Jm,$N;function Zc(){if($N)return Jm;$N=1;var e=ot(),t=it(),r=Gn(),n=Object,i=e("".split);return Jm=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,Jm}var Qm,zN;function es(){return zN||(zN=1,Qm=function(e){return e==null}),Qm}var ey,HN;function Ii(){if(HN)return ey;HN=1;var e=es(),t=TypeError;return ey=function(r){if(e(r))throw new t("Can't call method on "+r);return r},ey}var ty,UN;function To(){if(UN)return ty;UN=1;var e=Zc(),t=Ii();return ty=function(r){return e(t(r))},ty}var ry,WN;function Ot(){if(WN)return ry;WN=1;var e=typeof document=="object"&&document.all;return ry=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},ry}var ny,VN;function Tt(){if(VN)return ny;VN=1;var e=Ot();return ny=function(t){return typeof t=="object"?t!==null:e(t)},ny}var iy,GN;function Jc(){if(GN)return iy;GN=1;var e=wt(),t=Ot(),r=function(n){return t(n)?n:void 0};return iy=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},iy}var oy,KN;function Qc(){if(KN)return oy;KN=1;var e=ot();return oy=e({}.isPrototypeOf),oy}var ay,YN;function pk(){if(YN)return ay;YN=1;var e=wt(),t=e.navigator,r=t&&t.userAgent;return ay=r?String(r):"",ay}var sy,XN;function fw(){if(XN)return sy;XN=1;var e=wt(),t=pk(),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]))),sy=u,sy}var uy,ZN;function vk(){if(ZN)return uy;ZN=1;var e=fw(),t=it(),r=wt(),n=r.String;return uy=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),uy}var cy,JN;function gk(){if(JN)return cy;JN=1;var e=vk();return cy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",cy}var ly,QN;function mk(){if(QN)return ly;QN=1;var e=Jc(),t=Ot(),r=Qc(),n=gk(),i=Object;return ly=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},ly}var fy,eT;function dw(){if(eT)return fy;eT=1;var e=String;return fy=function(t){try{return e(t)}catch{return"Object"}},fy}var dy,tT;function ts(){if(tT)return dy;tT=1;var e=Ot(),t=dw(),r=TypeError;return dy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},dy}var hy,rT;function rs(){if(rT)return hy;rT=1;var e=ts(),t=es();return hy=function(r,n){var i=r[n];return t(i)?void 0:e(i)},hy}var py,nT;function CZ(){if(nT)return py;nT=1;var e=Zt(),t=Ot(),r=Tt(),n=TypeError;return py=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")},py}var vy={exports:{}},gy,iT;function el(){return iT||(iT=1,gy=!1),gy}var my,oT;function hw(){if(oT)return my;oT=1;var e=wt(),t=Object.defineProperty;return my=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},my}var aT;function pw(){if(aT)return vy.exports;aT=1;var e=el(),t=wt(),r=hw(),n="__core-js_shared__",i=vy.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),vy.exports}var yy,sT;function vw(){if(sT)return yy;sT=1;var e=pw();return yy=function(t,r){return e[t]||(e[t]=r||{})},yy}var by,uT;function Ao(){if(uT)return by;uT=1;var e=Ii(),t=Object;return by=function(r){return t(e(r))},by}var xy,cT;function Pr(){if(cT)return xy;cT=1;var e=ot(),t=Ao(),r=e({}.hasOwnProperty);return xy=Object.hasOwn||function(i,o){return r(t(i),o)},xy}var wy,lT;function gw(){if(lT)return wy;lT=1;var e=ot(),t=0,r=Math.random(),n=e(1.1.toString);return wy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},wy}var _y,fT;function $t(){if(fT)return _y;fT=1;var e=wt(),t=vw(),r=Pr(),n=gw(),i=vk(),o=gk(),a=e.Symbol,u=t("wks"),c=o?a.for||a:a&&a.withoutSetter||n;return _y=function(d){return r(u,d)||(u[d]=i&&r(a,d)?a[d]:c("Symbol."+d)),u[d]},_y}var Ey,dT;function RZ(){if(dT)return Ey;dT=1;var e=Zt(),t=Tt(),r=mk(),n=rs(),i=CZ(),o=$t(),a=TypeError,u=o("toPrimitive");return Ey=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)},Ey}var Sy,hT;function yk(){if(hT)return Sy;hT=1;var e=RZ(),t=mk();return Sy=function(r){var n=e(r,"string");return t(n)?n:n+""},Sy}var Oy,pT;function mw(){if(pT)return Oy;pT=1;var e=wt(),t=Tt(),r=e.document,n=t(r)&&t(r.createElement);return Oy=function(i){return n?r.createElement(i):{}},Oy}var Cy,vT;function bk(){if(vT)return Cy;vT=1;var e=Ir(),t=it(),r=mw();return Cy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Cy}var gT;function xk(){if(gT)return Hm;gT=1;var e=Ir(),t=Zt(),r=hk(),n=Xc(),i=To(),o=yk(),a=Pr(),u=bk(),c=Object.getOwnPropertyDescriptor;return Hm.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])},Hm}var Ry={},Iy,mT;function wk(){if(mT)return Iy;mT=1;var e=Ir(),t=it();return Iy=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Iy}var Py,yT;function Nr(){if(yT)return Py;yT=1;var e=Tt(),t=String,r=TypeError;return Py=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Py}var bT;function un(){if(bT)return Ry;bT=1;var e=Ir(),t=bk(),r=wk(),n=Nr(),i=yk(),o=TypeError,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c="enumerable",d="configurable",f="writable";return Ry.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},Ry}var Ny,xT;function ns(){if(xT)return Ny;xT=1;var e=Ir(),t=un(),r=Xc();return Ny=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},Ny}var Ty={exports:{}},Ay,wT;function yw(){if(wT)return Ay;wT=1;var e=Ir(),t=Pr(),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 Ay={EXISTS:i,PROPER:o,CONFIGURABLE:a},Ay}var My,_T;function _k(){if(_T)return My;_T=1;var e=ot(),t=Ot(),r=pw(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),My=r.inspectSource,My}var Dy,ET;function Ek(){if(ET)return Dy;ET=1;var e=wt(),t=Ot(),r=e.WeakMap;return Dy=t(r)&&/native code/.test(String(r)),Dy}var jy,ST;function bw(){if(ST)return jy;ST=1;var e=vw(),t=gw(),r=e("keys");return jy=function(n){return r[n]||(r[n]=t(n))},jy}var qy,OT;function tl(){return OT||(OT=1,qy={}),qy}var ky,CT;function Mo(){if(CT)return ky;CT=1;var e=Ek(),t=wt(),r=Tt(),n=ns(),i=Pr(),o=pw(),a=bw(),u=tl(),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(E){var _;if(!r(E)||(_=p(E)).type!==w)throw new d("Incompatible receiver, "+w+" required");return _}};if(e||o.state){var x=o.state||(o.state=new f);x.get=x.get,x.has=x.has,x.set=x.set,h=function(w,E){if(x.has(w))throw new d(c);return E.facade=w,x.set(w,E),E},p=function(w){return x.get(w)||{}},v=function(w){return x.has(w)}}else{var b=a("state");u[b]=!0,h=function(w,E){if(i(w,b))throw new d(c);return E.facade=w,n(w,b,E),E},p=function(w){return i(w,b)?w[b]:{}},v=function(w){return i(w,b)}}return ky={set:h,get:p,has:v,enforce:m,getterFor:y},ky}var RT;function Sk(){if(RT)return Ty.exports;RT=1;var e=ot(),t=it(),r=Ot(),n=Pr(),i=Ir(),o=yw().CONFIGURABLE,a=_k(),u=Mo(),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}),x=String(String).split("String"),b=Ty.exports=function(w,E,_){p(f(E),0,7)==="Symbol("&&(E="["+v(f(E),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),_&&_.getter&&(E="get "+E),_&&_.setter&&(E="set "+E),(!n(w,"name")||o&&w.name!==E)&&(i?h(w,"name",{value:E,configurable:!0}):w.name=E),y&&_&&n(_,"arity")&&w.length!==_.arity&&h(w,"length",{value:_.arity});try{_&&n(_,"constructor")&&_.constructor?i&&h(w,"prototype",{writable:!1}):w.prototype&&(w.prototype=void 0)}catch{}var S=c(w);return n(S,"source")||(S.source=m(x,typeof E=="string"?E:"")),w};return Function.prototype.toString=b(function(){return r(this)&&d(this).source||a(this)},"toString"),Ty.exports}var Ly,IT;function Pi(){if(IT)return Ly;IT=1;var e=Ot(),t=un(),r=Sk(),n=hw();return Ly=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},Ly}var By={},Fy,PT;function IZ(){if(PT)return Fy;PT=1;var e=Math.ceil,t=Math.floor;return Fy=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},Fy}var $y,NT;function rl(){if(NT)return $y;NT=1;var e=IZ();return $y=function(t){var r=+t;return r!==r||r===0?0:e(r)},$y}var zy,TT;function PZ(){if(TT)return zy;TT=1;var e=rl(),t=Math.max,r=Math.min;return zy=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},zy}var Hy,AT;function xw(){if(AT)return Hy;AT=1;var e=rl(),t=Math.min;return Hy=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},Hy}var Uy,MT;function nl(){if(MT)return Uy;MT=1;var e=xw();return Uy=function(t){return e(t.length)},Uy}var Wy,DT;function NZ(){if(DT)return Wy;DT=1;var e=To(),t=PZ(),r=nl(),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 Wy={includes:n(!0),indexOf:n(!1)},Wy}var Vy,jT;function Ok(){if(jT)return Vy;jT=1;var e=ot(),t=Pr(),r=To(),n=NZ().indexOf,i=tl(),o=e([].push);return Vy=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},Vy}var Gy,qT;function ww(){return qT||(qT=1,Gy=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Gy}var kT;function _w(){if(kT)return By;kT=1;var e=Ok(),t=ww(),r=t.concat("length","prototype");return By.f=Object.getOwnPropertyNames||function(i){return e(i,r)},By}var Ky={},LT;function Ck(){return LT||(LT=1,Ky.f=Object.getOwnPropertySymbols),Ky}var Yy,BT;function TZ(){if(BT)return Yy;BT=1;var e=Jc(),t=ot(),r=_w(),n=Ck(),i=Nr(),o=t([].concat);return Yy=e("Reflect","ownKeys")||function(u){var c=r.f(i(u)),d=n.f;return d?o(c,d(u)):c},Yy}var Xy,FT;function AZ(){if(FT)return Xy;FT=1;var e=Pr(),t=TZ(),r=xk(),n=un();return Xy=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))}},Xy}var Zy,$T;function Rk(){if($T)return Zy;$T=1;var e=it(),t=Ot(),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 Zy=n,Zy}var Jy,zT;function Kn(){if(zT)return Jy;zT=1;var e=wt(),t=xk().f,r=ns(),n=Pi(),i=hw(),o=AZ(),a=Rk();return Jy=function(u,c){var d=u.target,f=u.global,h=u.stat,p,v,m,y,x,b;if(f?v=e:h?v=e[d]||i(d,{}):v=e[d]&&e[d].prototype,v)for(m in c){if(x=c[m],u.dontCallGetSet?(b=t(v,m),y=b&&b.value):y=v[m],p=a(f?m:d+(h?".":"#")+m,u.forced),!p&&y!==void 0){if(typeof x==typeof y)continue;o(x,y)}(u.sham||y&&y.sham)&&r(x,"sham",!0),n(v,m,x,u)}},Jy}var Qy,HT;function Ew(){if(HT)return Qy;HT=1;var e=$t(),t=e("toStringTag"),r={};return r[t]="z",Qy=String(r)==="[object z]",Qy}var e0,UT;function il(){if(UT)return e0;UT=1;var e=Ew(),t=Ot(),r=Gn(),n=$t(),i=n("toStringTag"),o=Object,a=r((function(){return arguments})())==="Arguments",u=function(c,d){try{return c[d]}catch{}};return e0=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},e0}var t0,WT;function Ni(){if(WT)return t0;WT=1;var e=il(),t=String;return t0=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},t0}var r0,VT;function Ik(){return VT||(VT=1,r0=`
|
|
70
|
-
\v\f\r \u2028\u2029\uFEFF`),r0}var n0,GT;function MZ(){if(GT)return n0;GT=1;var e=ot(),t=Ii(),r=Ni(),n=Ik(),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 n0={start:u(1),end:u(2),trim:u(3)},n0}var i0,KT;function DZ(){if(KT)return i0;KT=1;var e=wt(),t=it(),r=ot(),n=Ni(),i=MZ().trim,o=Ik(),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 i0=h?function(v,m){var y=i(n(v));return a(y,m>>>0||(f(d,y)?16:10))}:a,i0}var YT;function jZ(){if(YT)return TN;YT=1;var e=Kn(),t=DZ();return e({global:!0,forced:parseInt!==t},{parseInt:t}),TN}jZ();var XT={},o0,ZT;function Pk(){if(ZT)return o0;ZT=1;var e=Ok(),t=ww();return o0=Object.keys||function(n){return e(n,t)},o0}var a0,JT;function qZ(){if(JT)return a0;JT=1;var e=Ir(),t=ot(),r=Zt(),n=it(),i=Pk(),o=Ck(),a=hk(),u=Ao(),c=Zc(),d=Object.assign,f=Object.defineProperty,h=t([].concat);return a0=!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(x){v[x]=x}),d({},p)[m]!==7||i(d({},v)).join("")!==y})?function(v,m){for(var y=u(v),x=arguments.length,b=1,w=o.f,E=a.f;x>b;)for(var _=c(arguments[b++]),S=w?h(i(_),w(_)):i(_),R=S.length,I=0,N;R>I;)N=S[I++],(!e||r(E,_,N))&&(y[N]=_[N]);return y}:d,a0}var QT;function kZ(){if(QT)return XT;QT=1;var e=Kn(),t=qZ();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),XT}kZ();var eA={},s0,tA;function LZ(){if(tA)return s0;tA=1;var e=Gn(),t=ot();return s0=function(r){if(e(r)==="Function")return t(r)},s0}var u0,rA;function Nk(){if(rA)return u0;rA=1;var e=LZ(),t=ts(),r=Yc(),n=e(e.bind);return u0=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},u0}var c0,nA;function BZ(){if(nA)return c0;nA=1;var e=Gn();return c0=Array.isArray||function(r){return e(r)==="Array"},c0}var l0,iA;function FZ(){if(iA)return l0;iA=1;var e=ot(),t=it(),r=Ot(),n=il(),i=Jc(),o=_k(),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,l0=!u||t(function(){var v;return h(h.call)||!h(Object)||!h(function(){v=!0})||v})?p:h,l0}var f0,oA;function $Z(){if(oA)return f0;oA=1;var e=BZ(),t=FZ(),r=Tt(),n=$t(),i=n("species"),o=Array;return f0=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},f0}var d0,aA;function zZ(){if(aA)return d0;aA=1;var e=$Z();return d0=function(t,r){return new(e(t))(r===0?0:r)},d0}var h0,sA;function HZ(){if(sA)return h0;sA=1;var e=Ir(),t=un(),r=Xc();return h0=function(n,i,o){e?t.f(n,i,r(0,o)):n[i]=o},h0}var p0,uA;function Tk(){if(uA)return p0;uA=1;var e=Nk(),t=Zc(),r=Ao(),n=nl(),i=zZ(),o=HZ(),a=function(u){var c=u===1,d=u===2,f=u===3,h=u===4,p=u===6,v=u===7,m=u===5||p;return function(y,x,b){for(var w=r(y),E=t(w),_=n(E),S=e(x,b),R=0,I=0,N=c?i(y,_):d||v?i(y,0):void 0,A,L;_>R;R++)if((m||R in E)&&(A=E[R],L=S(A,R,w),u))if(c)o(N,R,L);else if(L)switch(u){case 3:return!0;case 5:return A;case 6:return R;case 2:o(N,I++,A)}else switch(u){case 4:return!1;case 7:o(N,I++,A)}return p?-1:f||h?h:N}};return p0={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},p0}var v0,cA;function UZ(){if(cA)return v0;cA=1;var e=it(),t=$t(),r=fw(),n=t("species");return v0=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},v0}var lA;function WZ(){if(lA)return eA;lA=1;var e=Kn(),t=Tk().filter,r=UZ(),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)}}),eA}WZ();var fA={},g0,dA;function VZ(){if(dA)return g0;dA=1;var e=Ew(),t=il();return g0=e?{}.toString:function(){return"[object "+t(this)+"]"},g0}var hA;function GZ(){if(hA)return fA;hA=1;var e=Ew(),t=Pi(),r=VZ();return e||t(Object.prototype,"toString",r,{unsafe:!0}),fA}GZ();var m0={},pA;function KZ(){if(pA)return m0;pA=1;var e=Ir(),t=wk(),r=un(),n=Nr(),i=To(),o=Pk();return m0.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},m0}var y0,vA;function YZ(){if(vA)return y0;vA=1;var e=Jc();return y0=e("document","documentElement"),y0}var b0,gA;function ol(){if(gA)return b0;gA=1;var e=Nr(),t=KZ(),r=ww(),n=tl(),i=YZ(),o=mw(),a=bw(),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 E=w.parentWindow.Object;return w=null,E},y=function(){var w=o("iframe"),E="java"+f+":",_;return w.style.display="none",i.appendChild(w),w.src=String(E),_=w.contentWindow.document,_.open(),_.write(v("document.F=Object")),_.close(),_.F},x,b=function(){try{x=new ActiveXObject("htmlfile")}catch{}b=typeof document<"u"?document.domain&&x?m(x):y():m(x);for(var w=r.length;w--;)delete b[d][r[w]];return b()};return n[h]=!0,b0=Object.create||function(E,_){var S;return E!==null?(p[d]=e(E),S=new p,p[d]=null,S[h]=E):S=b(),_===void 0?S:t.f(S,_)},b0}var x0,mA;function XZ(){if(mA)return x0;mA=1;var e=$t(),t=ol(),r=un().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),x0=function(o){i[n][o]=!0},x0}var w0,yA;function is(){return yA||(yA=1,w0={}),w0}var _0,bA;function ZZ(){if(bA)return _0;bA=1;var e=it();return _0=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),_0}var E0,xA;function Ak(){if(xA)return E0;xA=1;var e=Pr(),t=Ot(),r=Ao(),n=bw(),i=ZZ(),o=n("IE_PROTO"),a=Object,u=a.prototype;return E0=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},E0}var S0,wA;function Mk(){if(wA)return S0;wA=1;var e=it(),t=Ot(),r=Tt(),n=ol(),i=Ak(),o=Pi(),a=$t(),u=el(),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}),S0={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:d},S0}var O0,_A;function al(){if(_A)return O0;_A=1;var e=un().f,t=Pr(),r=$t(),n=r("toStringTag");return O0=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},O0}var C0,EA;function JZ(){if(EA)return C0;EA=1;var e=Mk().IteratorPrototype,t=ol(),r=Xc(),n=al(),i=is(),o=function(){return this};return C0=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},C0}var R0,SA;function QZ(){if(SA)return R0;SA=1;var e=ot(),t=ts();return R0=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},R0}var I0,OA;function eJ(){if(OA)return I0;OA=1;var e=Tt();return I0=function(t){return e(t)||t===null},I0}var P0,CA;function tJ(){if(CA)return P0;CA=1;var e=eJ(),t=String,r=TypeError;return P0=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},P0}var N0,RA;function Dk(){if(RA)return N0;RA=1;var e=QZ(),t=Tt(),r=Ii(),n=tJ();return N0=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),N0}var T0,IA;function jk(){if(IA)return T0;IA=1;var e=Kn(),t=Zt(),r=el(),n=yw(),i=Ot(),o=JZ(),a=Ak(),u=Dk(),c=al(),d=ns(),f=Pi(),h=$t(),p=is(),v=Mk(),m=n.PROPER,y=n.CONFIGURABLE,x=v.IteratorPrototype,b=v.BUGGY_SAFARI_ITERATORS,w=h("iterator"),E="keys",_="values",S="entries",R=function(){return this};return T0=function(I,N,A,L,B,U,j){o(A,N,L);var D=function(H){if(H===B&&Q)return Q;if(!b&&H&&H in X)return X[H];switch(H){case E:return function(){return new A(this,H)};case _:return function(){return new A(this,H)};case S:return function(){return new A(this,H)}}return function(){return new A(this)}},G=N+" Iterator",F=!1,X=I.prototype,Z=X[w]||X["@@iterator"]||B&&X[B],Q=!b&&Z||D(B),V=N==="Array"&&X.entries||Z,ee,oe,ae;if(V&&(ee=a(V.call(new I)),ee!==Object.prototype&&ee.next&&(!r&&a(ee)!==x&&(u?u(ee,x):i(ee[w])||f(ee,w,R)),c(ee,G,!0,!0),r&&(p[G]=R))),m&&B===_&&Z&&Z.name!==_&&(!r&&y?d(X,"name",_):(F=!0,Q=function(){return t(Z,this)})),B)if(oe={values:D(_),keys:U?Q:D(E),entries:D(S)},j)for(ae in oe)(b||F||!(ae in X))&&f(X,ae,oe[ae]);else e({target:N,proto:!0,forced:b||F},oe);return(!r||j)&&X[w]!==Q&&f(X,w,Q,{name:B}),p[N]=Q,oe},T0}var A0,PA;function qk(){return PA||(PA=1,A0=function(e,t){return{value:e,done:t}}),A0}var M0,NA;function kk(){if(NA)return M0;NA=1;var e=To(),t=XZ(),r=is(),n=Mo(),i=un().f,o=jk(),a=qk(),u=el(),c=Ir(),d="Array Iterator",f=n.set,h=n.getterFor(d);M0=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 M0}kk();var TA={},D0,AA;function Lk(){if(AA)return D0;AA=1;var e=ot(),t=rl(),r=Ni(),n=Ii(),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 D0={codeAt:u(!1),charAt:u(!0)},D0}var MA;function rJ(){if(MA)return TA;MA=1;var e=Lk().charAt,t=Ni(),r=Mo(),n=jk(),i=qk(),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))}),TA}rJ();var DA={},jA={},j0,qA;function Bk(){if(qA)return j0;qA=1;var e=it();return j0=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),j0}var q0,kA;function Fk(){if(kA)return q0;kA=1;var e=Pi();return q0=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},q0}var k0={exports:{}},L0={},B0,LA;function nJ(){if(LA)return B0;LA=1;var e=ot();return B0=e([].slice),B0}var BA;function iJ(){if(BA)return L0;BA=1;var e=Gn(),t=To(),r=_w().f,n=nJ(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return L0.f=function(u){return i&&e(u)==="Window"?o(u):r(t(u))},L0}var F0,FA;function oJ(){if(FA)return F0;FA=1;var e=it();return F0=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),F0}var $0,$A;function aJ(){if($A)return $0;$A=1;var e=it(),t=Tt(),r=Gn(),n=oJ(),i=Object.isExtensible,o=e(function(){});return $0=o||n?function(u){return!t(u)||n&&r(u)==="ArrayBuffer"?!1:i?i(u):!0}:i,$0}var zA;function Sw(){if(zA)return k0.exports;zA=1;var e=Kn(),t=ot(),r=tl(),n=Tt(),i=Pr(),o=un().f,a=_w(),u=iJ(),c=aJ(),d=gw(),f=Bk(),h=!1,p=d("meta"),v=0,m=function(_){o(_,p,{value:{objectID:"O"+v++,weakData:{}}})},y=function(_,S){if(!n(_))return typeof _=="symbol"?_:(typeof _=="string"?"S":"P")+_;if(!i(_,p)){if(!c(_))return"F";if(!S)return"E";m(_)}return _[p].objectID},x=function(_,S){if(!i(_,p)){if(!c(_))return!0;if(!S)return!1;m(_)}return _[p].weakData},b=function(_){return f&&h&&c(_)&&!i(_,p)&&m(_),_},w=function(){E.enable=function(){},h=!0;var _=a.f,S=t([].splice),R={};R[p]=1,_(R).length&&(a.f=function(I){for(var N=_(I),A=0,L=N.length;A<L;A++)if(N[A]===p){S(N,A,1);break}return N},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},E=k0.exports={enable:w,fastKey:y,getWeakData:x,onFreeze:b};return r[p]=!0,k0.exports}var z0,HA;function sJ(){if(HA)return z0;HA=1;var e=$t(),t=is(),r=e("iterator"),n=Array.prototype;return z0=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},z0}var H0,UA;function $k(){if(UA)return H0;UA=1;var e=il(),t=rs(),r=es(),n=is(),i=$t(),o=i("iterator");return H0=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},H0}var U0,WA;function uJ(){if(WA)return U0;WA=1;var e=Zt(),t=ts(),r=Nr(),n=dw(),i=$k(),o=TypeError;return U0=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")},U0}var W0,VA;function cJ(){if(VA)return W0;VA=1;var e=Zt(),t=Nr(),r=rs();return W0=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},W0}var V0,GA;function zk(){if(GA)return V0;GA=1;var e=Nk(),t=Zt(),r=Nr(),n=dw(),i=sJ(),o=nl(),a=Qc(),u=uJ(),c=$k(),d=cJ(),f=TypeError,h=function(v,m){this.stopped=v,this.result=m},p=h.prototype;return V0=function(v,m,y){var x=y&&y.that,b=!!(y&&y.AS_ENTRIES),w=!!(y&&y.IS_RECORD),E=!!(y&&y.IS_ITERATOR),_=!!(y&&y.INTERRUPTED),S=e(m,x),R,I,N,A,L,B,U,j=function(F){var X=R;return R=void 0,X&&d(X,"normal"),new h(!0,F)},D=function(F){return b?(r(F),_?S(F[0],F[1],j):S(F[0],F[1])):_?S(F,j):S(F)};if(w)R=v.iterator;else if(E)R=v;else{if(I=c(v),!I)throw new f(n(v)+" is not iterable");if(i(I)){for(N=0,A=o(v);A>N;N++)if(L=D(v[N]),L&&a(p,L))return L;return new h(!1)}R=u(v,I)}for(B=w?v.next:R.next;!(U=t(B,R)).done;){var G=U.value;try{L=D(G)}catch(F){if(R)d(R,"throw",F);else throw F}if(typeof L=="object"&&L&&a(p,L))return L}return new h(!1)},V0}var G0,KA;function Hk(){if(KA)return G0;KA=1;var e=Qc(),t=TypeError;return G0=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},G0}var K0,YA;function lJ(){if(YA)return K0;YA=1;var e=$t(),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 K0=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},K0}var Y0,XA;function fJ(){if(XA)return Y0;XA=1;var e=Ot(),t=Tt(),r=Dk();return Y0=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},Y0}var X0,ZA;function dJ(){if(ZA)return X0;ZA=1;var e=Kn(),t=wt(),r=ot(),n=Rk(),i=Pi(),o=Sw(),a=zk(),u=Hk(),c=Ot(),d=es(),f=Tt(),h=it(),p=lJ(),v=al(),m=fJ();return X0=function(y,x,b){var w=y.indexOf("Map")!==-1,E=y.indexOf("Weak")!==-1,_=w?"set":"add",S=t[y],R=S&&S.prototype,I=S,N={},A=function(F){var X=r(R[F]);i(R,F,F==="add"?function(Q){return X(this,Q===0?0:Q),this}:F==="delete"?function(Z){return E&&!f(Z)?!1:X(this,Z===0?0:Z)}:F==="get"?function(Q){return E&&!f(Q)?void 0:X(this,Q===0?0:Q)}:F==="has"?function(Q){return E&&!f(Q)?!1:X(this,Q===0?0:Q)}:function(Q,V){return X(this,Q===0?0:Q,V),this})},L=n(y,!c(S)||!(E||R.forEach&&!h(function(){new S().entries().next()})));if(L)I=b.getConstructor(x,y,w,_),o.enable();else if(n(y,!0)){var B=new I,U=B[_](E?{}:-0,1)!==B,j=h(function(){B.has(1)}),D=p(function(F){new S(F)}),G=!E&&h(function(){for(var F=new S,X=5;X--;)F[_](X,X);return!F.has(-0)});D||(I=x(function(F,X){u(F,R);var Z=m(new S,F,I);return d(X)||a(X,Z[_],{that:Z,AS_ENTRIES:w}),Z}),I.prototype=R,R.constructor=I),(j||G)&&(A("delete"),A("has"),w&&A("get")),(G||U)&&A(_),E&&R.clear&&delete R.clear}return N[y]=I,e({global:!0,constructor:!0,forced:I!==S},N),v(I,y),E||b.setStrong(I,y,w),I},X0}var Z0,JA;function hJ(){if(JA)return Z0;JA=1;var e=ot(),t=Fk(),r=Sw().getWeakData,n=Hk(),i=Nr(),o=es(),a=Tt(),u=zk(),c=Tk(),d=Pr(),f=Mo(),h=f.set,p=f.getterFor,v=c.find,m=c.findIndex,y=e([].splice),x=0,b=function(_){return _.frozen||(_.frozen=new w)},w=function(){this.entries=[]},E=function(_,S){return v(_.entries,function(R){return R[0]===S})};return w.prototype={get:function(_){var S=E(this,_);if(S)return S[1]},has:function(_){return!!E(this,_)},set:function(_,S){var R=E(this,_);R?R[1]=S:this.entries.push([_,S])},delete:function(_){var S=m(this.entries,function(R){return R[0]===_});return~S&&y(this.entries,S,1),!!~S}},Z0={getConstructor:function(_,S,R,I){var N=_(function(U,j){n(U,A),h(U,{type:S,id:x++,frozen:null}),o(j)||u(j,U[I],{that:U,AS_ENTRIES:R})}),A=N.prototype,L=p(S),B=function(U,j,D){var G=L(U),F=r(i(j),!0);return F===!0?b(G).set(j,D):F[G.id]=D,U};return t(A,{delete:function(U){var j=L(this);if(!a(U))return!1;var D=r(U);return D===!0?b(j).delete(U):D&&d(D,j.id)&&delete D[j.id]},has:function(j){var D=L(this);if(!a(j))return!1;var G=r(j);return G===!0?b(D).has(j):G&&d(G,D.id)}}),t(A,R?{get:function(j){var D=L(this);if(a(j)){var G=r(j);if(G===!0)return b(D).get(j);if(G)return G[D.id]}},set:function(j,D){return B(this,j,D)}}:{add:function(j){return B(this,j,!0)}}),N}},Z0}var QA;function pJ(){if(QA)return jA;QA=1;var e=Bk(),t=wt(),r=ot(),n=Fk(),i=Sw(),o=dJ(),a=hJ(),u=Tt(),c=Mo().enforce,d=it(),f=Ek(),h=Object,p=Array.isArray,v=h.isExtensible,m=h.isFrozen,y=h.isSealed,x=h.freeze,b=h.seal,w=!t.ActiveXObject&&"ActiveXObject"in t,E,_=function(U){return function(){return U(this,arguments.length?arguments[0]:void 0)}},S=o("WeakMap",_,a),R=S.prototype,I=r(R.set),N=function(){return e&&d(function(){var U=x([]);return I(new S,U,1),!m(U)})};if(f)if(w){E=a.getConstructor(_,"WeakMap",!0),i.enable();var A=r(R.delete),L=r(R.has),B=r(R.get);n(R,{delete:function(U){if(u(U)&&!v(U)){var j=c(this);return j.frozen||(j.frozen=new E),A(this,U)||j.frozen.delete(U)}return A(this,U)},has:function(j){if(u(j)&&!v(j)){var D=c(this);return D.frozen||(D.frozen=new E),L(this,j)||D.frozen.has(j)}return L(this,j)},get:function(j){if(u(j)&&!v(j)){var D=c(this);return D.frozen||(D.frozen=new E),L(this,j)?B(this,j):D.frozen.get(j)}return B(this,j)},set:function(j,D){if(u(j)&&!v(j)){var G=c(this);G.frozen||(G.frozen=new E),L(this,j)?I(this,j,D):G.frozen.set(j,D)}else I(this,j,D);return this}})}else N()&&n(R,{set:function(j,D){var G;return p(j)&&(m(j)?G=x:y(j)&&(G=b)),I(this,j,D),G&&G(j),this}});return jA}var eM;function vJ(){return eM||(eM=1,pJ()),DA}vJ();var tM={},J0,rM;function gJ(){return rM||(rM=1,J0={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}),J0}var Q0,nM;function mJ(){if(nM)return Q0;nM=1;var e=mw(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return Q0=r===Object.prototype?void 0:r,Q0}var iM;function yJ(){if(iM)return tM;iM=1;var e=wt(),t=gJ(),r=mJ(),n=kk(),i=ns(),o=al(),a=$t(),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"),tM}yJ();var eb,oM;function bJ(){if(oM)return eb;oM=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 x(R,I,N){var A,L,B,U,j,D,G=0,F=!1,X=!1,Z=!0;if(typeof R!="function")throw new TypeError(e);I=S(I)||0,w(N)&&(F=!!N.leading,X="maxWait"in N,B=X?v(S(N.maxWait)||0,I):B,Z="trailing"in N?!!N.trailing:Z);function Q(z){var re=A,ie=L;return A=L=void 0,G=z,U=R.apply(ie,re),U}function V(z){return G=z,j=setTimeout(ae,I),F?Q(z):U}function ee(z){var re=z-D,ie=z-G,se=I-re;return X?m(se,B-ie):se}function oe(z){var re=z-D,ie=z-G;return D===void 0||re>=I||re<0||X&&ie>=B}function ae(){var z=y();if(oe(z))return H(z);j=setTimeout(ae,ee(z))}function H(z){return j=void 0,Z&&A?Q(z):(A=L=void 0,U)}function K(){j!==void 0&&clearTimeout(j),G=0,A=D=L=j=void 0}function $(){return j===void 0?U:H(y())}function k(){var z=y(),re=oe(z);if(A=arguments,L=this,D=z,re){if(j===void 0)return V(D);if(X)return j=setTimeout(ae,I),Q(D)}return j===void 0&&(j=setTimeout(ae,I)),U}return k.cancel=K,k.flush=$,k}function b(R,I,N){var A=!0,L=!0;if(typeof R!="function")throw new TypeError(e);return w(N)&&(A="leading"in N?!!N.leading:A,L="trailing"in N?!!N.trailing:L),x(R,I,{leading:A,maxWait:I,trailing:L})}function w(R){var I=typeof R;return!!R&&(I=="object"||I=="function")}function E(R){return!!R&&typeof R=="object"}function _(R){return typeof R=="symbol"||E(R)&&p.call(R)==r}function S(R){if(typeof R=="number")return R;if(_(R))return t;if(w(R)){var I=typeof R.valueOf=="function"?R.valueOf():R;R=w(I)?I+"":I}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 eb=b,eb}var xJ=bJ();const aM=Un(xJ);var tb,sM;function wJ(){if(sM)return tb;sM=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 x(S,R,I){var N,A,L,B,U,j,D=0,G=!1,F=!1,X=!0;if(typeof S!="function")throw new TypeError(e);R=_(R)||0,b(I)&&(G=!!I.leading,F="maxWait"in I,L=F?v(_(I.maxWait)||0,R):L,X="trailing"in I?!!I.trailing:X);function Z(k){var z=N,re=A;return N=A=void 0,D=k,B=S.apply(re,z),B}function Q(k){return D=k,U=setTimeout(oe,R),G?Z(k):B}function V(k){var z=k-j,re=k-D,ie=R-z;return F?m(ie,L-re):ie}function ee(k){var z=k-j,re=k-D;return j===void 0||z>=R||z<0||F&&re>=L}function oe(){var k=y();if(ee(k))return ae(k);U=setTimeout(oe,V(k))}function ae(k){return U=void 0,X&&N?Z(k):(N=A=void 0,B)}function H(){U!==void 0&&clearTimeout(U),D=0,N=j=A=U=void 0}function K(){return U===void 0?B:ae(y())}function $(){var k=y(),z=ee(k);if(N=arguments,A=this,j=k,z){if(U===void 0)return Q(j);if(F)return U=setTimeout(oe,R),Z(j)}return U===void 0&&(U=setTimeout(oe,R)),B}return $.cancel=H,$.flush=K,$}function b(S){var R=typeof S;return!!S&&(R=="object"||R=="function")}function w(S){return!!S&&typeof S=="object"}function E(S){return typeof S=="symbol"||w(S)&&p.call(S)==r}function _(S){if(typeof S=="number")return S;if(E(S))return t;if(b(S)){var R=typeof S.valueOf=="function"?S.valueOf():S;S=b(R)?R+"":R}if(typeof S!="string")return S===0?S:+S;S=S.replace(n,"");var I=o.test(S);return I||a.test(S)?u(S.slice(2),I?2:8):i.test(S)?t:+S}return tb=x,tb}var _J=wJ();const uM=Un(_J);var rb,cM;function EJ(){if(cM)return rb;cM=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,fe){return he==null?void 0:he[fe]}function f(he){var fe=!1;if(he!=null&&typeof he.toString!="function")try{fe=!!(he+"")}catch{}return fe}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:""})(),x=p.toString,b=v.hasOwnProperty,w=v.toString,E=RegExp("^"+x.call(b).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_=h.splice,S=z(c,"Map"),R=z(Object,"create");function I(he){var fe=-1,Ee=he?he.length:0;for(this.clear();++fe<Ee;){var Pe=he[fe];this.set(Pe[0],Pe[1])}}function N(){this.__data__=R?R(null):{}}function A(he){return this.has(he)&&delete this.__data__[he]}function L(he){var fe=this.__data__;if(R){var Ee=fe[he];return Ee===t?void 0:Ee}return b.call(fe,he)?fe[he]:void 0}function B(he){var fe=this.__data__;return R?fe[he]!==void 0:b.call(fe,he)}function U(he,fe){var Ee=this.__data__;return Ee[he]=R&&fe===void 0?t:fe,this}I.prototype.clear=N,I.prototype.delete=A,I.prototype.get=L,I.prototype.has=B,I.prototype.set=U;function j(he){var fe=-1,Ee=he?he.length:0;for(this.clear();++fe<Ee;){var Pe=he[fe];this.set(Pe[0],Pe[1])}}function D(){this.__data__=[]}function G(he){var fe=this.__data__,Ee=K(fe,he);if(Ee<0)return!1;var Pe=fe.length-1;return Ee==Pe?fe.pop():_.call(fe,Ee,1),!0}function F(he){var fe=this.__data__,Ee=K(fe,he);return Ee<0?void 0:fe[Ee][1]}function X(he){return K(this.__data__,he)>-1}function Z(he,fe){var Ee=this.__data__,Pe=K(Ee,he);return Pe<0?Ee.push([he,fe]):Ee[Pe][1]=fe,this}j.prototype.clear=D,j.prototype.delete=G,j.prototype.get=F,j.prototype.has=X,j.prototype.set=Z;function Q(he){var fe=-1,Ee=he?he.length:0;for(this.clear();++fe<Ee;){var Pe=he[fe];this.set(Pe[0],Pe[1])}}function V(){this.__data__={hash:new I,map:new(S||j),string:new I}}function ee(he){return k(this,he).delete(he)}function oe(he){return k(this,he).get(he)}function ae(he){return k(this,he).has(he)}function H(he,fe){return k(this,he).set(he,fe),this}Q.prototype.clear=V,Q.prototype.delete=ee,Q.prototype.get=oe,Q.prototype.has=ae,Q.prototype.set=H;function K(he,fe){for(var Ee=he.length;Ee--;)if(be(he[Ee][0],fe))return Ee;return-1}function $(he){if(!_e(he)||ie(he))return!1;var fe=Ce(he)||f(he)?E:o;return fe.test(se(he))}function k(he,fe){var Ee=he.__data__;return re(fe)?Ee[typeof fe=="string"?"string":"hash"]:Ee.map}function z(he,fe){var Ee=d(he,fe);return $(Ee)?Ee:void 0}function re(he){var fe=typeof he;return fe=="string"||fe=="number"||fe=="symbol"||fe=="boolean"?he!=="__proto__":he===null}function ie(he){return!!y&&y in he}function se(he){if(he!=null){try{return x.call(he)}catch{}try{return he+""}catch{}}return""}function ce(he,fe){if(typeof he!="function"||fe&&typeof fe!="function")throw new TypeError(e);var Ee=function(){var Pe=arguments,Ze=fe?fe.apply(this,Pe):Pe[0],ze=Ee.cache;if(ze.has(Ze))return ze.get(Ze);var Fe=he.apply(this,Pe);return Ee.cache=ze.set(Ze,Fe),Fe};return Ee.cache=new(ce.Cache||Q),Ee}ce.Cache=Q;function be(he,fe){return he===fe||he!==he&&fe!==fe}function Ce(he){var fe=_e(he)?w.call(he):"";return fe==r||fe==n}function _e(he){var fe=typeof he;return!!he&&(fe=="object"||fe=="function")}return rb=ce,rb}var SJ=EJ();const OJ=Un(SJ);var vi=[],CJ=function(){return vi.some(function(e){return e.activeTargets.length>0})},RJ=function(){return vi.some(function(e){return e.skippedTargets.length>0})},lM="ResizeObserver loop completed with undelivered notifications.",IJ=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:lM}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=lM),window.dispatchEvent(e)},Ha;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ha||(Ha={}));var gi=function(e){return Object.freeze(e)},PJ=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,gi(this)}return e})(),Uk=(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,gi(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})(),Ow=function(e){return e instanceof SVGElement&&"getBBox"in e},Wk=function(e){if(Ow(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)},fM=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)},NJ=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},Da=typeof window<"u"?window:{},_u=new WeakMap,dM=/auto|scroll/,TJ=/^tb|vertical/,AJ=/msie|trident/i.test(Da.navigator&&Da.navigator.userAgent),Xr=function(e){return parseFloat(e||"0")},ho=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new PJ((r?t:e)||0,(r?e:t)||0)},hM=gi({devicePixelContentBoxSize:ho(),borderBoxSize:ho(),contentBoxSize:ho(),contentRect:new Uk(0,0,0,0)}),Vk=function(e,t){if(t===void 0&&(t=!1),_u.has(e)&&!t)return _u.get(e);if(Wk(e))return _u.set(e,hM),hM;var r=getComputedStyle(e),n=Ow(e)&&e.ownerSVGElement&&e.getBBox(),i=!AJ&&r.boxSizing==="border-box",o=TJ.test(r.writingMode||""),a=!n&&dM.test(r.overflowY||""),u=!n&&dM.test(r.overflowX||""),c=n?0:Xr(r.paddingTop),d=n?0:Xr(r.paddingRight),f=n?0:Xr(r.paddingBottom),h=n?0:Xr(r.paddingLeft),p=n?0:Xr(r.borderTopWidth),v=n?0:Xr(r.borderRightWidth),m=n?0:Xr(r.borderBottomWidth),y=n?0:Xr(r.borderLeftWidth),x=h+d,b=c+f,w=y+v,E=p+m,_=u?e.offsetHeight-E-e.clientHeight:0,S=a?e.offsetWidth-w-e.clientWidth:0,R=i?x+w:0,I=i?b+E:0,N=n?n.width:Xr(r.width)-R-S,A=n?n.height:Xr(r.height)-I-_,L=N+x+S+w,B=A+b+_+E,U=gi({devicePixelContentBoxSize:ho(Math.round(N*devicePixelRatio),Math.round(A*devicePixelRatio),o),borderBoxSize:ho(L,B,o),contentBoxSize:ho(N,A,o),contentRect:new Uk(h,c,N,A)});return _u.set(e,U),U},Gk=function(e,t,r){var n=Vk(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case Ha.DEVICE_PIXEL_CONTENT_BOX:return a;case Ha.BORDER_BOX:return i;default:return o}},MJ=(function(){function e(t){var r=Vk(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=gi([r.borderBoxSize]),this.contentBoxSize=gi([r.contentBoxSize]),this.devicePixelContentBoxSize=gi([r.devicePixelContentBoxSize])}return e})(),Kk=function(e){if(Wk(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},DJ=function(){var e=1/0,t=[];vi.forEach(function(a){if(a.activeTargets.length!==0){var u=[];a.activeTargets.forEach(function(d){var f=new MJ(d.target),h=Kk(d.target);u.push(f),d.lastReportedSize=Gk(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},pM=function(e){vi.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(Kk(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},jJ=function(){var e=0;for(pM(e);CJ();)e=DJ(),pM(e);return RJ()&&IJ(),e>0},nb,Yk=[],qJ=function(){return Yk.splice(0).forEach(function(e){return e()})},kJ=function(e){if(!nb){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return qJ()}).observe(r,n),nb=function(){r.textContent="".concat(t?t--:t++)}}Yk.push(e),nb()},LJ=function(e){kJ(function(){requestAnimationFrame(e)})},ju=0,BJ=function(){return!!ju},FJ=250,$J={attributes:!0,characterData:!0,childList:!0,subtree:!0},vM=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],gM=function(e){return e===void 0&&(e=0),Date.now()+e},ib=!1,zJ=(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=FJ),!ib){ib=!0;var n=gM(t);LJ(function(){var i=!1;try{i=jJ()}finally{if(ib=!1,t=n-gM(),!BJ())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,$J)};document.body?r():Da.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),vM.forEach(function(r){return Da.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),vM.forEach(function(r){return Da.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),Zb=new zJ,mM=function(e){!ju&&e>0&&Zb.start(),ju+=e,!ju&&Zb.stop()},HJ=function(e){return!Ow(e)&&!NJ(e)&&getComputedStyle(e).display==="inline"},UJ=(function(){function e(t,r){this.target=t,this.observedBox=r||Ha.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Gk(this.target,this.observedBox,!0);return HJ(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),WJ=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Eu=new WeakMap,yM=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Su=(function(){function e(){}return e.connect=function(t,r){var n=new WJ(t,r);Eu.set(t,n)},e.observe=function(t,r,n){var i=Eu.get(t),o=i.observationTargets.length===0;yM(i.observationTargets,r)<0&&(o&&vi.push(i),i.observationTargets.push(new UJ(r,n&&n.box)),mM(1),Zb.schedule())},e.unobserve=function(t,r){var n=Eu.get(t),i=yM(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&vi.splice(vi.indexOf(n),1),n.observationTargets.splice(i,1),mM(-1))},e.disconnect=function(t){var r=this,n=Eu.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),VJ=(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.");Su.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(!fM(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Su.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(!fM(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Su.unobserve(this,t)},e.prototype.disconnect=function(){Su.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),ob,bM;function GJ(){if(bM)return ob;bM=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return ob=e,ob}var KJ=GJ();const Xk=Un(KJ);var xM={},ab,wM;function YJ(){if(wM)return ab;wM=1;var e=ts(),t=Ao(),r=Zc(),n=nl(),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,x=u?-1:1;if(f<2)for(;;){if(y in v){h=v[y],y+=x;break}if(y+=x,u?y<0:m<=y)throw new i(o)}for(;u?y>=0:m>y;y+=x)y in v&&(h=d(h,v[y],y,p));return h}};return ab={left:a(!1),right:a(!0)},ab}var sb,_M;function XJ(){if(_M)return sb;_M=1;var e=it();return sb=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},sb}var ub,EM;function ZJ(){if(EM)return ub;EM=1;var e=wt(),t=pk(),r=Gn(),n=function(i){return t.slice(0,i.length)===i};return ub=(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"})(),ub}var cb,SM;function JJ(){if(SM)return cb;SM=1;var e=ZJ();return cb=e==="NODE",cb}var OM;function QJ(){if(OM)return xM;OM=1;var e=Kn(),t=YJ().left,r=XJ(),n=fw(),i=JJ(),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)}}),xM}QJ();var CM={},lb,RM;function Zk(){if(RM)return lb;RM=1;var e=Nr();return lb=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},lb}var fb,IM;function eQ(){if(IM)return fb;IM=1;var e=it(),t=wt(),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 fb={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},fb}var db,PM;function tQ(){if(PM)return db;PM=1;var e=it(),t=wt(),r=t.RegExp;return db=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
|
|
71
|
-
`)&&n.flags==="s")}),
|
|
72
|
-
`&&ee!=="\r"&&ee!=="\u2028"&&ee!=="\u2029")&&(Z="(?: (?:"+Z+"))",V=" "+V,Q++),j=new RegExp("^(?:"+Z+")",X)}E&&(j=new RegExp("^"+Z+"$(?!\\s)",X)),b&&(D=N.lastIndex);var oe=e(h,F?j:N,V);return F?oe?(oe.input=L,oe[0]=x(oe[0],Q),oe.index=N.lastIndex,N.lastIndex+=oe[0].length):N.lastIndex=0:b&&oe&&(N.lastIndex=N.global?oe.index+oe[0].length:D),E&&oe&&oe.length>1&&e(f,oe[0],j,function(){for(var ae=1;ae<arguments.length-2;ae++)arguments[ae]===void 0&&(oe[ae]=void 0)}),oe&&G&&S(oe,G),oe}),pb=p,pb}var AM;function Jk(){if(AM)return CM;AM=1;var e=Kn(),t=Cw();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),CM}Jk();var MM={},vb,DM;function Qk(){if(DM)return vb;DM=1,Jk();var e=Zt(),t=Pi(),r=Cw(),n=it(),i=$t(),o=ns(),a=i("species"),u=RegExp.prototype;return vb=function(c,d,f,h){var p=i(c),v=!n(function(){var b={};return b[p]=function(){return 7},""[c](b)!==7}),m=v&&!n(function(){var b=!1,w=/a/;if(c==="split"){var E={};E[a]=function(){return w},w={constructor:E,flags:""},w[p]=/./[p]}return w.exec=function(){return b=!0,null},w[p](""),!b});if(!v||!m||f){var y=/./[p],x=d(p,""[c],function(b,w,E,_,S){var R=w.exec;return R===r||R===u.exec?v&&!S?{done:!0,value:e(y,w,E,_)}:{done:!0,value:e(b,E,w,_)}:{done:!1}});t(String.prototype,c,x[0]),t(u,p,x[1])}h&&o(u[p],"sham",!0)},vb}var gb,jM;function eL(){if(jM)return gb;jM=1;var e=Lk().charAt;return gb=function(t,r,n){return r+(n&&e(t,r).length||1)},gb}var mb,qM;function nQ(){if(qM)return mb;qM=1;var e=wt(),t=it(),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 mb={correct:n},mb}var yb,kM;function tL(){if(kM)return yb;kM=1;var e=Zt(),t=Pr(),r=Qc(),n=nQ(),i=Zk(),o=RegExp.prototype;return yb=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},yb}var bb,LM;function rL(){if(LM)return bb;LM=1;var e=Zt(),t=Nr(),r=Ot(),n=Gn(),i=Cw(),o=TypeError;return bb=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")},bb}var BM;function iQ(){if(BM)return MM;BM=1;var e=Zt(),t=ot(),r=Qk(),n=Nr(),i=Tt(),o=xw(),a=Ni(),u=Ii(),c=rs(),d=eL(),f=tL(),h=rL(),p=t("".indexOf);return r("match",function(v,m,y){return[function(b){var w=u(this),E=i(b)?c(b,v):void 0;return E?e(E,b,w):new RegExp(b)[v](a(w))},function(x){var b=n(this),w=a(x),E=y(m,b,w);if(E.done)return E.value;var _=a(f(b));if(!~p(_,"g"))return h(b,w);var S=!!~p(_,"u")||!!~p(_,"v");b.lastIndex=0;for(var R=[],I=0,N;(N=h(b,w))!==null;){var A=a(N[0]);R[I]=A,A===""&&(b.lastIndex=d(w,o(b.lastIndex),S)),I++}return I===0?null:R}]}),MM}iQ();var FM={},xb,$M;function oQ(){if($M)return xb;$M=1;var e=Sk(),t=un();return xb=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)},xb}var zM;function aQ(){if(zM)return FM;zM=1;var e=Ir(),t=yw().EXISTS,r=ot(),n=oQ(),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""}}}),FM}aQ();var HM={},wb,UM;function sQ(){if(UM)return wb;UM=1;var e=Yc(),t=Function.prototype,r=t.apply,n=t.call;return wb=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),wb}var _b,WM;function uQ(){if(WM)return _b;WM=1;var e=ot(),t=Ao(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;return _b=function(c,d,f,h,p,v){var m=f+c.length,y=h.length,x=u;return p!==void 0&&(p=t(p),x=a),i(v,x,function(b,w){var E;switch(n(w,0)){case"$":return"$";case"&":return c;case"`":return o(d,0,f);case"'":return o(d,m);case"<":E=p[o(w,1,-1)];break;default:var _=+w;if(_===0)return b;if(_>y){var S=r(_/10);return S===0?b:S<=y?h[S-1]===void 0?n(w,1):h[S-1]+n(w,1):b}E=h[_-1]}return E===void 0?"":E})},_b}var VM;function cQ(){if(VM)return HM;VM=1;var e=sQ(),t=Zt(),r=ot(),n=Qk(),i=it(),o=Nr(),a=Ot(),u=Tt(),c=rl(),d=xw(),f=Ni(),h=Ii(),p=eL(),v=rs(),m=uQ(),y=tL(),x=rL(),b=$t(),w=b("replace"),E=Math.max,_=Math.min,S=r([].concat),R=r([].push),I=r("".indexOf),N=r("".slice),A=function(j){return j===void 0?j:String(j)},L=(function(){return"a".replace(/./,"$0")==="$0"})(),B=(function(){return/./[w]?/./[w]("a","$0")==="":!1})(),U=!i(function(){var j=/./;return j.exec=function(){var D=[];return D.groups={a:"7"},D},"".replace(j,"$<a>")!=="7"});return n("replace",function(j,D,G){var F=B?"$":"$0";return[function(Z,Q){var V=h(this),ee=u(Z)?v(Z,w):void 0;return ee?t(ee,Z,V,Q):t(D,f(V),Z,Q)},function(X,Z){var Q=o(this),V=f(X),ee=a(Z);ee||(Z=f(Z));var oe=f(y(Q));if(typeof Z=="string"&&!~I(Z,F)&&!~I(Z,"$<")&&!~I(oe,"y")){var ae=G(D,Q,V,Z);if(ae.done)return ae.value}var H=!!~I(oe,"g"),K;H&&(K=!!~I(oe,"u")||!!~I(oe,"v"),Q.lastIndex=0);for(var $=[],k;k=x(Q,V),!(k===null||(R($,k),!H));){var z=f(k[0]);z===""&&(Q.lastIndex=p(V,d(Q.lastIndex),K))}for(var re="",ie=0,se=0;se<$.length;se++){k=$[se];for(var ce=f(k[0]),be=E(_(c(k.index),V.length),0),Ce=[],_e,he=1;he<k.length;he++)R(Ce,A(k[he]));var fe=k.groups;if(ee){var Ee=S([ce],Ce,be,V);fe!==void 0&&R(Ee,fe),_e=f(e(Z,void 0,Ee))}else _e=m(ce,V,be,Ce,fe,Z);be>=ie&&(re+=N(V,ie,be)+_e,ie=be+ce.length)}return re+N(V,ie)}]},!U||!L||B),HM}cQ();function kn(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function qu(e){return!e||!e.ownerDocument?document:e.ownerDocument}var ro=null,GM=null;Xk&&window.addEventListener("resize",function(){GM!==window.devicePixelRatio&&(GM=window.devicePixelRatio,ro=null)});function KM(e){if(ro===null){var t=qu(e);if(typeof t>"u")return ro=0,ro;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),ro=i}return ro}var lc=(function(){function e(r,n){var i=this;this.onScroll=function(){var o=kn(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=qu(i.el),u=kn(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=aM(this.recalculate.bind(this),64),this.onMouseMove=aM(this.onMouseMove.bind(this),64),this.hideScrollbars=uM(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=uM(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=OJ(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=qu(n),a=kn(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),Xk&&(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=kn(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||VJ;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=kn(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=qu(this.el),a=kn(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=kn(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 x;f-=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((x={},x[o.axis[i].offsetAttr]=f,x)),a.requestAnimationFrame(y)}}else if(f<v){var b;f+=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((b={},b[o.axis[i].offsetAttr]=f,b)),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:KM(this.el)}catch{return KM(this.el)}},t.removeListeners=function(){var n=this,i=kn(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})();lc.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};lc.instances=new WeakMap;function YM(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 Ou(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YM(Object(r),!0).forEach(function(n){lQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lQ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fc(){return fc=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},fc.apply(this,arguments)}function fQ(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 dQ(e,t){if(e==null)return{};var r=fQ(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 hQ=["children","scrollableNodeProps","tag"],pQ=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},sl=T.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=dQ(e,hQ),c=a,d,f=T.useRef(),h=T.useRef(),p=T.useRef(),v={},m={},y=[];return Object.keys(u).forEach(function(x){Object.prototype.hasOwnProperty.call(lc.defaultOptions,x)?v[x]=u[x]:x.match(/data-simplebar-(.+)/)&&x!=="data-simplebar-direction"?y.push({name:x,value:u[x]}):m[x]=u[x]}),y.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
|
|
68
|
+
`)+ye+`return __p
|
|
69
|
+
}`;var je=U1(function(){return Ue(q,Ce+"return "+ye).apply(r,z)});if(je.source=ye,$f(je))throw je;return je}function w5(s){return Ke(s).toLowerCase()}function _5(s){return Ke(s).toUpperCase()}function E5(s,c,g){if(s=Ke(s),s&&(g||c===r))return Qw(s);if(!s||!(c=rr(c)))return s;var O=Tr(s),N=Tr(c),q=e_(O,N),z=t_(O,N)+1;return Dn(O,q,z).join("")}function S5(s,c,g){if(s=Ke(s),s&&(g||c===r))return s.slice(0,n_(s)+1);if(!s||!(c=rr(c)))return s;var O=Tr(s),N=t_(O,Tr(c))+1;return Dn(O,0,N).join("")}function O5(s,c,g){if(s=Ke(s),s&&(g||c===r))return s.replace(ji,"");if(!s||!(c=rr(c)))return s;var O=Tr(s),N=e_(O,Tr(c));return Dn(O,N).join("")}function C5(s,c){var g=L,O=$;if(ft(c)){var N="separator"in c?c.separator:N;g="length"in c?De(c.length):g,O="omission"in c?rr(c.omission):O}s=Ke(s);var q=s.length;if(Fi(s)){var z=Tr(s);q=z.length}if(g>=q)return s;var X=g-$i(O);if(X<1)return O;var ie=z?Dn(z,0,X).join(""):s.slice(0,X);if(N===r)return ie+O;if(z&&(X+=ie.length-X),zf(N)){if(s.slice(X).search(N)){var ge,me=ie;for(N.global||(N=nf(N.source,Ke(vs.exec(N))+"g")),N.lastIndex=0;ge=N.exec(me);)var ye=ge.index;ie=ie.slice(0,ye===r?X:ye)}}else if(s.indexOf(rr(N),X)!=X){var _e=ie.lastIndexOf(N);_e>-1&&(ie=ie.slice(0,_e))}return ie+O}function R5(s){return s=Ke(s),s&&cs.test(s)?s.replace(ko,nB):s}var I5=Ki(function(s,c,g){return s+(g?" ":"")+c.toUpperCase()}),Wf=U_("toUpperCase");function V1(s,c,g){return s=Ke(s),c=g?r:c,c===r?JL(s)?aB(s):HL(s):s.match(c)||[]}var U1=qe(function(s,c){try{return Qt(s,r,c)}catch(g){return $f(g)?g:new Ae(g)}}),P5=dn(function(s,c){return er(c,function(g){g=Mr(g),Wr(s,g,Bf(s[g],s))}),s});function N5(s){var c=s==null?0:s.length,g=Ie();return s=c?st(s,function(O){if(typeof O[1]!="function")throw new pr(a);return[g(O[0]),O[1]]}):[],qe(function(O){for(var N=-1;++N<c;){var q=s[N];if(Qt(q[0],this,O))return Qt(q[1],this,O)}})}function T5(s){return nF(gr(s,p))}function Gf(s){return function(){return s}}function A5(s,c){return s==null||s!==s?c:s}var M5=G_(),D5=G_(!0);function Ut(s){return s}function Kf(s){return E_(typeof s=="function"?s:gr(s,p))}function j5(s){return O_(gr(s,p))}function q5(s,c){return C_(s,gr(c,p))}var k5=qe(function(s,c){return function(g){return Jo(g,s,c)}}),L5=qe(function(s,c){return function(g){return Jo(s,g,c)}});function Yf(s,c,g){var O=Ct(c),N=$s(c,O);g==null&&!(ft(c)&&(N.length||!O.length))&&(g=c,c=s,s=this,N=$s(c,Ct(c)));var q=!(ft(g)&&"chain"in g)||!!g.chain,z=pn(s);return er(N,function(X){var ie=c[X];s[X]=ie,z&&(s.prototype[X]=function(){var ge=this.__chain__;if(q||ge){var me=s(this.__wrapped__),ye=me.__actions__=zt(this.__actions__);return ye.push({func:ie,args:arguments,thisArg:s}),me.__chain__=ge,me}return ie.apply(s,In([this.value()],arguments))})}),s}function B5(){return It._===this&&(It._=dB),this}function Xf(){}function F5(s){return s=De(s),qe(function(c){return R_(c,s)})}var $5=Cf(st),z5=Cf(Kw),H5=Cf(Xc);function W1(s){return Mf(s)?Zc(Mr(s)):xF(s)}function V5(s){return function(c){return s==null?r:ni(s,c)}}var U5=Y_(),W5=Y_(!0);function Zf(){return[]}function Jf(){return!1}function G5(){return{}}function K5(){return""}function Y5(){return!0}function X5(s,c){if(s=De(s),s<1||s>te)return[];var g=ae,O=At(s,ae);c=Ie(c),s-=ae;for(var N=ef(O,c);++g<s;)c(g);return N}function Z5(s){return Me(s)?st(s,Mr):nr(s)?[s]:zt(f1(Ke(s)))}function J5(s){var c=++cB;return Ke(s)+c}var Q5=Gs(function(s,c){return s+c},0),eH=Rf("ceil"),tH=Gs(function(s,c){return s/c},1),rH=Rf("floor");function nH(s){return s&&s.length?Fs(s,Ut,df):r}function iH(s,c){return s&&s.length?Fs(s,Ie(c,2),df):r}function oH(s){return Zw(s,Ut)}function aH(s,c){return Zw(s,Ie(c,2))}function sH(s){return s&&s.length?Fs(s,Ut,gf):r}function uH(s,c){return s&&s.length?Fs(s,Ie(c,2),gf):r}var lH=Gs(function(s,c){return s*c},1),cH=Rf("round"),fH=Gs(function(s,c){return s-c},0);function dH(s){return s&&s.length?Qc(s,Ut):0}function hH(s,c){return s&&s.length?Qc(s,Ie(c,2)):0}return M.after=qz,M.ary=_1,M.assign=E3,M.assignIn=q1,M.assignInWith=k1,M.assignWith=Hf,M.at=S3,M.before=E1,M.bind=Bf,M.bindAll=P5,M.bindKey=S1,M.castArray=Kz,M.chain=b1,M.chunk=n$,M.compact=i$,M.concat=o$,M.cond=N5,M.conforms=T5,M.constant=Gf,M.countBy=hz,M.create=O3,M.curry=O1,M.curryRight=C1,M.debounce=R1,M.defaults=C3,M.defaultsDeep=R3,M.defer=kz,M.delay=Lz,M.difference=a$,M.differenceBy=s$,M.differenceWith=u$,M.drop=l$,M.dropRight=c$,M.dropRightWhile=f$,M.dropWhile=d$,M.fill=h$,M.filter=vz,M.flatMap=yz,M.flatMapDeep=bz,M.flatMapDepth=xz,M.flatten=v1,M.flattenDeep=p$,M.flattenDepth=v$,M.flip=Bz,M.flow=M5,M.flowRight=D5,M.fromPairs=g$,M.functions=D3,M.functionsIn=j3,M.groupBy=wz,M.initial=y$,M.intersection=b$,M.intersectionBy=x$,M.intersectionWith=w$,M.invert=k3,M.invertBy=L3,M.invokeMap=Ez,M.iteratee=Kf,M.keyBy=Sz,M.keys=Ct,M.keysIn=Vt,M.map=eu,M.mapKeys=F3,M.mapValues=$3,M.matches=j5,M.matchesProperty=q5,M.memoize=ru,M.merge=z3,M.mergeWith=L1,M.method=k5,M.methodOf=L5,M.mixin=Yf,M.negate=nu,M.nthArg=F5,M.omit=H3,M.omitBy=V3,M.once=Fz,M.orderBy=Oz,M.over=$5,M.overArgs=$z,M.overEvery=z5,M.overSome=H5,M.partial=Ff,M.partialRight=I1,M.partition=Cz,M.pick=U3,M.pickBy=B1,M.property=W1,M.propertyOf=V5,M.pull=O$,M.pullAll=m1,M.pullAllBy=C$,M.pullAllWith=R$,M.pullAt=I$,M.range=U5,M.rangeRight=W5,M.rearg=zz,M.reject=Pz,M.remove=P$,M.rest=Hz,M.reverse=kf,M.sampleSize=Tz,M.set=G3,M.setWith=K3,M.shuffle=Az,M.slice=N$,M.sortBy=jz,M.sortedUniq=k$,M.sortedUniqBy=L$,M.split=m5,M.spread=Vz,M.tail=B$,M.take=F$,M.takeRight=$$,M.takeRightWhile=z$,M.takeWhile=H$,M.tap=iz,M.throttle=Uz,M.thru=Qs,M.toArray=M1,M.toPairs=F1,M.toPairsIn=$1,M.toPath=Z5,M.toPlainObject=j1,M.transform=Y3,M.unary=Wz,M.union=V$,M.unionBy=U$,M.unionWith=W$,M.uniq=G$,M.uniqBy=K$,M.uniqWith=Y$,M.unset=X3,M.unzip=Lf,M.unzipWith=y1,M.update=Z3,M.updateWith=J3,M.values=Zi,M.valuesIn=Q3,M.without=X$,M.words=V1,M.wrap=Gz,M.xor=Z$,M.xorBy=J$,M.xorWith=Q$,M.zip=ez,M.zipObject=tz,M.zipObjectDeep=rz,M.zipWith=nz,M.entries=F1,M.entriesIn=$1,M.extend=q1,M.extendWith=k1,Yf(M,M),M.add=Q5,M.attempt=U1,M.camelCase=n5,M.capitalize=z1,M.ceil=eH,M.clamp=e5,M.clone=Yz,M.cloneDeep=Zz,M.cloneDeepWith=Jz,M.cloneWith=Xz,M.conformsTo=Qz,M.deburr=H1,M.defaultTo=A5,M.divide=tH,M.endsWith=i5,M.eq=Dr,M.escape=o5,M.escapeRegExp=a5,M.every=pz,M.find=gz,M.findIndex=h1,M.findKey=I3,M.findLast=mz,M.findLastIndex=p1,M.findLastKey=P3,M.floor=rH,M.forEach=x1,M.forEachRight=w1,M.forIn=N3,M.forInRight=T3,M.forOwn=A3,M.forOwnRight=M3,M.get=Vf,M.gt=e3,M.gte=t3,M.has=q3,M.hasIn=Uf,M.head=g1,M.identity=Ut,M.includes=_z,M.indexOf=m$,M.inRange=t5,M.invoke=B3,M.isArguments=ai,M.isArray=Me,M.isArrayBuffer=r3,M.isArrayLike=Ht,M.isArrayLikeObject=pt,M.isBoolean=n3,M.isBuffer=jn,M.isDate=i3,M.isElement=o3,M.isEmpty=a3,M.isEqual=s3,M.isEqualWith=u3,M.isError=$f,M.isFinite=l3,M.isFunction=pn,M.isInteger=P1,M.isLength=iu,M.isMap=N1,M.isMatch=c3,M.isMatchWith=f3,M.isNaN=d3,M.isNative=h3,M.isNil=v3,M.isNull=p3,M.isNumber=T1,M.isObject=ft,M.isObjectLike=dt,M.isPlainObject=ia,M.isRegExp=zf,M.isSafeInteger=g3,M.isSet=A1,M.isString=ou,M.isSymbol=nr,M.isTypedArray=Xi,M.isUndefined=m3,M.isWeakMap=y3,M.isWeakSet=b3,M.join=_$,M.kebabCase=s5,M.last=yr,M.lastIndexOf=E$,M.lowerCase=u5,M.lowerFirst=l5,M.lt=x3,M.lte=w3,M.max=nH,M.maxBy=iH,M.mean=oH,M.meanBy=aH,M.min=sH,M.minBy=uH,M.stubArray=Zf,M.stubFalse=Jf,M.stubObject=G5,M.stubString=K5,M.stubTrue=Y5,M.multiply=lH,M.nth=S$,M.noConflict=B5,M.noop=Xf,M.now=tu,M.pad=c5,M.padEnd=f5,M.padStart=d5,M.parseInt=h5,M.random=r5,M.reduce=Rz,M.reduceRight=Iz,M.repeat=p5,M.replace=v5,M.result=W3,M.round=cH,M.runInContext=ne,M.sample=Nz,M.size=Mz,M.snakeCase=g5,M.some=Dz,M.sortedIndex=T$,M.sortedIndexBy=A$,M.sortedIndexOf=M$,M.sortedLastIndex=D$,M.sortedLastIndexBy=j$,M.sortedLastIndexOf=q$,M.startCase=y5,M.startsWith=b5,M.subtract=fH,M.sum=dH,M.sumBy=hH,M.template=x5,M.times=X5,M.toFinite=vn,M.toInteger=De,M.toLength=D1,M.toLower=w5,M.toNumber=br,M.toSafeInteger=_3,M.toString=Ke,M.toUpper=_5,M.trim=E5,M.trimEnd=S5,M.trimStart=O5,M.truncate=C5,M.unescape=R5,M.uniqueId=J5,M.upperCase=I5,M.upperFirst=Wf,M.each=x1,M.eachRight=w1,M.first=g1,Yf(M,(function(){var s={};return Gr(M,function(c,g){Ge.call(M.prototype,g)||(s[g]=c)}),s})(),{chain:!1}),M.VERSION=n,er(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){M[s].placeholder=M}),er(["drop","take"],function(s,c){Be.prototype[s]=function(g){g=g===r?1:St(De(g),0);var O=this.__filtered__&&!c?new Be(this):this.clone();return O.__filtered__?O.__takeCount__=At(g,O.__takeCount__):O.__views__.push({size:At(g,ae),type:s+(O.__dir__<0?"Right":"")}),O},Be.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),er(["filter","map","takeWhile"],function(s,c){var g=c+1,O=g==G||g==Y;Be.prototype[s]=function(N){var q=this.clone();return q.__iteratees__.push({iteratee:Ie(N,3),type:g}),q.__filtered__=q.__filtered__||O,q}}),er(["head","last"],function(s,c){var g="take"+(c?"Right":"");Be.prototype[s]=function(){return this[g](1).value()[0]}}),er(["initial","tail"],function(s,c){var g="drop"+(c?"":"Right");Be.prototype[s]=function(){return this.__filtered__?new Be(this):this[g](1)}}),Be.prototype.compact=function(){return this.filter(Ut)},Be.prototype.find=function(s){return this.filter(s).head()},Be.prototype.findLast=function(s){return this.reverse().find(s)},Be.prototype.invokeMap=qe(function(s,c){return typeof s=="function"?new Be(this):this.map(function(g){return Jo(g,s,c)})}),Be.prototype.reject=function(s){return this.filter(nu(Ie(s)))},Be.prototype.slice=function(s,c){s=De(s);var g=this;return g.__filtered__&&(s>0||c<0)?new Be(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),c!==r&&(c=De(c),g=c<0?g.dropRight(-c):g.take(c-s)),g)},Be.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Be.prototype.toArray=function(){return this.take(ae)},Gr(Be.prototype,function(s,c){var g=/^(?:filter|find|map|reject)|While$/.test(c),O=/^(?:head|last)$/.test(c),N=M[O?"take"+(c=="last"?"Right":""):c],q=O||/^find/.test(c);N&&(M.prototype[c]=function(){var z=this.__wrapped__,X=O?[1]:arguments,ie=z instanceof Be,ge=X[0],me=ie||Me(z),ye=function(ke){var $e=N.apply(M,In([ke],X));return O&&_e?$e[0]:$e};me&&g&&typeof ge=="function"&&ge.length!=1&&(ie=me=!1);var _e=this.__chain__,Ce=!!this.__actions__.length,Ne=q&&!_e,je=ie&&!Ce;if(!q&&me){z=je?z:new Be(this);var Re=s.apply(z,X);return Re.__actions__.push({func:Qs,args:[ye],thisArg:r}),new vr(Re,_e)}return Ne&&je?s.apply(this,X):(Re=this.thru(ye),Ne?O?Re.value()[0]:Re.value():Re)})}),er(["pop","push","shift","sort","splice","unshift"],function(s){var c=Os[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",O=/^(?:pop|shift)$/.test(s);M.prototype[s]=function(){var N=arguments;if(O&&!this.__chain__){var q=this.value();return c.apply(Me(q)?q:[],N)}return this[g](function(z){return c.apply(Me(z)?z:[],N)})}}),Gr(Be.prototype,function(s,c){var g=M[c];if(g){var O=g.name+"";Ge.call(Ui,O)||(Ui[O]=[]),Ui[O].push({name:c,func:g})}}),Ui[Ws(r,w).name]=[{name:"wrapper",func:r}],Be.prototype.clone=IB,Be.prototype.reverse=PB,Be.prototype.value=NB,M.prototype.at=oz,M.prototype.chain=az,M.prototype.commit=sz,M.prototype.next=uz,M.prototype.plant=cz,M.prototype.reverse=fz,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=dz,M.prototype.first=M.prototype.head,Uo&&(M.prototype[Uo]=lz),M}),zi=sB();Jn?((Jn.exports=zi)._=zi,Wc._=zi):It._=zi}).call(TZ)})(Aa,Aa.exports)),Aa.exports}var hl=AZ(),jN={},fa,qN;function wt(){if(qN)return fa;qN=1;var e=function(t){return t&&t.Math===Math&&t};return fa=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof ht=="object"&&ht)||e(typeof fa=="object"&&fa)||(function(){return this})()||Function("return this")(),fa}var Km={},Ym,kN;function it(){return kN||(kN=1,Ym=function(e){try{return!!e()}catch{return!0}}),Ym}var Xm,LN;function Ir(){if(LN)return Xm;LN=1;var e=it();return Xm=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Xm}var Zm,BN;function ec(){if(BN)return Zm;BN=1;var e=it();return Zm=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Zm}var Jm,FN;function Zt(){if(FN)return Jm;FN=1;var e=ec(),t=Function.prototype.call;return Jm=e?t.bind(t):function(){return t.apply(t,arguments)},Jm}var Qm={},$N;function wk(){if($N)return Qm;$N=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Qm.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,Qm}var ey,zN;function tc(){return zN||(zN=1,ey=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),ey}var ty,HN;function ot(){if(HN)return ty;HN=1;var e=ec(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return ty=e?n:function(i){return function(){return r.apply(i,arguments)}},ty}var ry,VN;function Gn(){if(VN)return ry;VN=1;var e=ot(),t=e({}.toString),r=e("".slice);return ry=function(n){return r(t(n),8,-1)},ry}var ny,UN;function rc(){if(UN)return ny;UN=1;var e=ot(),t=it(),r=Gn(),n=Object,i=e("".split);return ny=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,ny}var iy,WN;function is(){return WN||(WN=1,iy=function(e){return e==null}),iy}var oy,GN;function Ni(){if(GN)return oy;GN=1;var e=is(),t=TypeError;return oy=function(r){if(e(r))throw new t("Can't call method on "+r);return r},oy}var ay,KN;function Do(){if(KN)return ay;KN=1;var e=rc(),t=Ni();return ay=function(r){return e(t(r))},ay}var sy,YN;function Ot(){if(YN)return sy;YN=1;var e=typeof document=="object"&&document.all;return sy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},sy}var uy,XN;function Tt(){if(XN)return uy;XN=1;var e=Ot();return uy=function(t){return typeof t=="object"?t!==null:e(t)},uy}var ly,ZN;function nc(){if(ZN)return ly;ZN=1;var e=wt(),t=Ot(),r=function(n){return t(n)?n:void 0};return ly=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},ly}var cy,JN;function ic(){if(JN)return cy;JN=1;var e=ot();return cy=e({}.isPrototypeOf),cy}var fy,QN;function _k(){if(QN)return fy;QN=1;var e=wt(),t=e.navigator,r=t&&t.userAgent;return fy=r?String(r):"",fy}var dy,eT;function vw(){if(eT)return dy;eT=1;var e=wt(),t=_k(),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]))),dy=u,dy}var hy,tT;function Ek(){if(tT)return hy;tT=1;var e=vw(),t=it(),r=wt(),n=r.String;return hy=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),hy}var py,rT;function Sk(){if(rT)return py;rT=1;var e=Ek();return py=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",py}var vy,nT;function Ok(){if(nT)return vy;nT=1;var e=nc(),t=Ot(),r=ic(),n=Sk(),i=Object;return vy=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},vy}var gy,iT;function gw(){if(iT)return gy;iT=1;var e=String;return gy=function(t){try{return e(t)}catch{return"Object"}},gy}var my,oT;function os(){if(oT)return my;oT=1;var e=Ot(),t=gw(),r=TypeError;return my=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},my}var yy,aT;function as(){if(aT)return yy;aT=1;var e=os(),t=is();return yy=function(r,n){var i=r[n];return t(i)?void 0:e(i)},yy}var by,sT;function MZ(){if(sT)return by;sT=1;var e=Zt(),t=Ot(),r=Tt(),n=TypeError;return by=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")},by}var xy={exports:{}},wy,uT;function oc(){return uT||(uT=1,wy=!1),wy}var _y,lT;function mw(){if(lT)return _y;lT=1;var e=wt(),t=Object.defineProperty;return _y=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},_y}var cT;function yw(){if(cT)return xy.exports;cT=1;var e=oc(),t=wt(),r=mw(),n="__core-js_shared__",i=xy.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),xy.exports}var Ey,fT;function bw(){if(fT)return Ey;fT=1;var e=yw();return Ey=function(t,r){return e[t]||(e[t]=r||{})},Ey}var Sy,dT;function jo(){if(dT)return Sy;dT=1;var e=Ni(),t=Object;return Sy=function(r){return t(e(r))},Sy}var Oy,hT;function Pr(){if(hT)return Oy;hT=1;var e=ot(),t=jo(),r=e({}.hasOwnProperty);return Oy=Object.hasOwn||function(i,o){return r(t(i),o)},Oy}var Cy,pT;function xw(){if(pT)return Cy;pT=1;var e=ot(),t=0,r=Math.random(),n=e(1.1.toString);return Cy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},Cy}var Ry,vT;function $t(){if(vT)return Ry;vT=1;var e=wt(),t=bw(),r=Pr(),n=xw(),i=Ek(),o=Sk(),a=e.Symbol,u=t("wks"),l=o?a.for||a:a&&a.withoutSetter||n;return Ry=function(d){return r(u,d)||(u[d]=i&&r(a,d)?a[d]:l("Symbol."+d)),u[d]},Ry}var Iy,gT;function DZ(){if(gT)return Iy;gT=1;var e=Zt(),t=Tt(),r=Ok(),n=as(),i=MZ(),o=$t(),a=TypeError,u=o("toPrimitive");return Iy=function(l,d){if(!t(l)||r(l))return l;var f=n(l,u),h;if(f){if(d===void 0&&(d="default"),h=e(f,l,d),!t(h)||r(h))return h;throw new a("Can't convert object to primitive value")}return d===void 0&&(d="number"),i(l,d)},Iy}var Py,mT;function Ck(){if(mT)return Py;mT=1;var e=DZ(),t=Ok();return Py=function(r){var n=e(r,"string");return t(n)?n:n+""},Py}var Ny,yT;function ww(){if(yT)return Ny;yT=1;var e=wt(),t=Tt(),r=e.document,n=t(r)&&t(r.createElement);return Ny=function(i){return n?r.createElement(i):{}},Ny}var Ty,bT;function Rk(){if(bT)return Ty;bT=1;var e=Ir(),t=it(),r=ww();return Ty=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Ty}var xT;function Ik(){if(xT)return Km;xT=1;var e=Ir(),t=Zt(),r=wk(),n=tc(),i=Do(),o=Ck(),a=Pr(),u=Rk(),l=Object.getOwnPropertyDescriptor;return Km.f=e?l:function(f,h){if(f=i(f),h=o(h),u)try{return l(f,h)}catch{}if(a(f,h))return n(!t(r.f,f,h),f[h])},Km}var Ay={},My,wT;function Pk(){if(wT)return My;wT=1;var e=Ir(),t=it();return My=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),My}var Dy,_T;function Nr(){if(_T)return Dy;_T=1;var e=Tt(),t=String,r=TypeError;return Dy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Dy}var ET;function un(){if(ET)return Ay;ET=1;var e=Ir(),t=Rk(),r=Pk(),n=Nr(),i=Ck(),o=TypeError,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,l="enumerable",d="configurable",f="writable";return Ay.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:l in m?m[l]:y[l],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},Ay}var jy,ST;function ss(){if(ST)return jy;ST=1;var e=Ir(),t=un(),r=tc();return jy=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},jy}var qy={exports:{}},ky,OT;function _w(){if(OT)return ky;OT=1;var e=Ir(),t=Pr(),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 ky={EXISTS:i,PROPER:o,CONFIGURABLE:a},ky}var Ly,CT;function Nk(){if(CT)return Ly;CT=1;var e=ot(),t=Ot(),r=yw(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),Ly=r.inspectSource,Ly}var By,RT;function Tk(){if(RT)return By;RT=1;var e=wt(),t=Ot(),r=e.WeakMap;return By=t(r)&&/native code/.test(String(r)),By}var Fy,IT;function Ew(){if(IT)return Fy;IT=1;var e=bw(),t=xw(),r=e("keys");return Fy=function(n){return r[n]||(r[n]=t(n))},Fy}var $y,PT;function ac(){return PT||(PT=1,$y={}),$y}var zy,NT;function qo(){if(NT)return zy;NT=1;var e=Tk(),t=wt(),r=Tt(),n=ss(),i=Pr(),o=yw(),a=Ew(),u=ac(),l="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(E){var _;if(!r(E)||(_=p(E)).type!==w)throw new d("Incompatible receiver, "+w+" required");return _}};if(e||o.state){var x=o.state||(o.state=new f);x.get=x.get,x.has=x.has,x.set=x.set,h=function(w,E){if(x.has(w))throw new d(l);return E.facade=w,x.set(w,E),E},p=function(w){return x.get(w)||{}},v=function(w){return x.has(w)}}else{var b=a("state");u[b]=!0,h=function(w,E){if(i(w,b))throw new d(l);return E.facade=w,n(w,b,E),E},p=function(w){return i(w,b)?w[b]:{}},v=function(w){return i(w,b)}}return zy={set:h,get:p,has:v,enforce:m,getterFor:y},zy}var TT;function Ak(){if(TT)return qy.exports;TT=1;var e=ot(),t=it(),r=Ot(),n=Pr(),i=Ir(),o=_w().CONFIGURABLE,a=Nk(),u=qo(),l=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}),x=String(String).split("String"),b=qy.exports=function(w,E,_){p(f(E),0,7)==="Symbol("&&(E="["+v(f(E),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),_&&_.getter&&(E="get "+E),_&&_.setter&&(E="set "+E),(!n(w,"name")||o&&w.name!==E)&&(i?h(w,"name",{value:E,configurable:!0}):w.name=E),y&&_&&n(_,"arity")&&w.length!==_.arity&&h(w,"length",{value:_.arity});try{_&&n(_,"constructor")&&_.constructor?i&&h(w,"prototype",{writable:!1}):w.prototype&&(w.prototype=void 0)}catch{}var S=l(w);return n(S,"source")||(S.source=m(x,typeof E=="string"?E:"")),w};return Function.prototype.toString=b(function(){return r(this)&&d(this).source||a(this)},"toString"),qy.exports}var Hy,AT;function Ti(){if(AT)return Hy;AT=1;var e=Ot(),t=un(),r=Ak(),n=mw();return Hy=function(i,o,a,u){u||(u={});var l=u.enumerable,d=u.name!==void 0?u.name:o;if(e(a)&&r(a,d,u),u.global)l?i[o]=a:n(o,a);else{try{u.unsafe?i[o]&&(l=!0):delete i[o]}catch{}l?i[o]=a:t.f(i,o,{value:a,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return i},Hy}var Vy={},Uy,MT;function jZ(){if(MT)return Uy;MT=1;var e=Math.ceil,t=Math.floor;return Uy=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},Uy}var Wy,DT;function sc(){if(DT)return Wy;DT=1;var e=jZ();return Wy=function(t){var r=+t;return r!==r||r===0?0:e(r)},Wy}var Gy,jT;function qZ(){if(jT)return Gy;jT=1;var e=sc(),t=Math.max,r=Math.min;return Gy=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},Gy}var Ky,qT;function Sw(){if(qT)return Ky;qT=1;var e=sc(),t=Math.min;return Ky=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},Ky}var Yy,kT;function uc(){if(kT)return Yy;kT=1;var e=Sw();return Yy=function(t){return e(t.length)},Yy}var Xy,LT;function kZ(){if(LT)return Xy;LT=1;var e=Do(),t=qZ(),r=uc(),n=function(i){return function(o,a,u){var l=e(o),d=r(l);if(d===0)return!i&&-1;var f=t(u,d),h;if(i&&a!==a){for(;d>f;)if(h=l[f++],h!==h)return!0}else for(;d>f;f++)if((i||f in l)&&l[f]===a)return i||f||0;return!i&&-1}};return Xy={includes:n(!0),indexOf:n(!1)},Xy}var Zy,BT;function Mk(){if(BT)return Zy;BT=1;var e=ot(),t=Pr(),r=Do(),n=kZ().indexOf,i=ac(),o=e([].push);return Zy=function(a,u){var l=r(a),d=0,f=[],h;for(h in l)!t(i,h)&&t(l,h)&&o(f,h);for(;u.length>d;)t(l,h=u[d++])&&(~n(f,h)||o(f,h));return f},Zy}var Jy,FT;function Ow(){return FT||(FT=1,Jy=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Jy}var $T;function Cw(){if($T)return Vy;$T=1;var e=Mk(),t=Ow(),r=t.concat("length","prototype");return Vy.f=Object.getOwnPropertyNames||function(i){return e(i,r)},Vy}var Qy={},zT;function Dk(){return zT||(zT=1,Qy.f=Object.getOwnPropertySymbols),Qy}var e0,HT;function LZ(){if(HT)return e0;HT=1;var e=nc(),t=ot(),r=Cw(),n=Dk(),i=Nr(),o=t([].concat);return e0=e("Reflect","ownKeys")||function(u){var l=r.f(i(u)),d=n.f;return d?o(l,d(u)):l},e0}var t0,VT;function BZ(){if(VT)return t0;VT=1;var e=Pr(),t=LZ(),r=Ik(),n=un();return t0=function(i,o,a){for(var u=t(o),l=n.f,d=r.f,f=0;f<u.length;f++){var h=u[f];!e(i,h)&&!(a&&e(a,h))&&l(i,h,d(o,h))}},t0}var r0,UT;function jk(){if(UT)return r0;UT=1;var e=it(),t=Ot(),r=/#|\.prototype\./,n=function(l,d){var f=o[i(l)];return f===u?!0:f===a?!1:t(d)?e(d):!!d},i=n.normalize=function(l){return String(l).replace(r,".").toLowerCase()},o=n.data={},a=n.NATIVE="N",u=n.POLYFILL="P";return r0=n,r0}var n0,WT;function Kn(){if(WT)return n0;WT=1;var e=wt(),t=Ik().f,r=ss(),n=Ti(),i=mw(),o=BZ(),a=jk();return n0=function(u,l){var d=u.target,f=u.global,h=u.stat,p,v,m,y,x,b;if(f?v=e:h?v=e[d]||i(d,{}):v=e[d]&&e[d].prototype,v)for(m in l){if(x=l[m],u.dontCallGetSet?(b=t(v,m),y=b&&b.value):y=v[m],p=a(f?m:d+(h?".":"#")+m,u.forced),!p&&y!==void 0){if(typeof x==typeof y)continue;o(x,y)}(u.sham||y&&y.sham)&&r(x,"sham",!0),n(v,m,x,u)}},n0}var i0,GT;function Rw(){if(GT)return i0;GT=1;var e=$t(),t=e("toStringTag"),r={};return r[t]="z",i0=String(r)==="[object z]",i0}var o0,KT;function lc(){if(KT)return o0;KT=1;var e=Rw(),t=Ot(),r=Gn(),n=$t(),i=n("toStringTag"),o=Object,a=r((function(){return arguments})())==="Arguments",u=function(l,d){try{return l[d]}catch{}};return o0=e?r:function(l){var d,f,h;return l===void 0?"Undefined":l===null?"Null":typeof(f=u(d=o(l),i))=="string"?f:a?r(d):(h=r(d))==="Object"&&t(d.callee)?"Arguments":h},o0}var a0,YT;function Ai(){if(YT)return a0;YT=1;var e=lc(),t=String;return a0=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},a0}var s0,XT;function qk(){return XT||(XT=1,s0=`
|
|
70
|
+
\v\f\r \u2028\u2029\uFEFF`),s0}var u0,ZT;function FZ(){if(ZT)return u0;ZT=1;var e=ot(),t=Ni(),r=Ai(),n=qk(),i=e("".replace),o=RegExp("^["+n+"]+"),a=RegExp("(^|[^"+n+"])["+n+"]+$"),u=function(l){return function(d){var f=r(t(d));return l&1&&(f=i(f,o,"")),l&2&&(f=i(f,a,"$1")),f}};return u0={start:u(1),end:u(2),trim:u(3)},u0}var l0,JT;function $Z(){if(JT)return l0;JT=1;var e=wt(),t=it(),r=ot(),n=Ai(),i=FZ().trim,o=qk(),a=e.parseInt,u=e.Symbol,l=u&&u.iterator,d=/^[+-]?0x/i,f=r(d.exec),h=a(o+"08")!==8||a(o+"0x16")!==22||l&&!t(function(){a(Object(l))});return l0=h?function(v,m){var y=i(n(v));return a(y,m>>>0||(f(d,y)?16:10))}:a,l0}var QT;function zZ(){if(QT)return jN;QT=1;var e=Kn(),t=$Z();return e({global:!0,forced:parseInt!==t},{parseInt:t}),jN}zZ();var eA={},c0,tA;function kk(){if(tA)return c0;tA=1;var e=Mk(),t=Ow();return c0=Object.keys||function(n){return e(n,t)},c0}var f0,rA;function HZ(){if(rA)return f0;rA=1;var e=Ir(),t=ot(),r=Zt(),n=it(),i=kk(),o=Dk(),a=wk(),u=jo(),l=rc(),d=Object.assign,f=Object.defineProperty,h=t([].concat);return f0=!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(x){v[x]=x}),d({},p)[m]!==7||i(d({},v)).join("")!==y})?function(v,m){for(var y=u(v),x=arguments.length,b=1,w=o.f,E=a.f;x>b;)for(var _=l(arguments[b++]),S=w?h(i(_),w(_)):i(_),R=S.length,I=0,P;R>I;)P=S[I++],(!e||r(E,_,P))&&(y[P]=_[P]);return y}:d,f0}var nA;function VZ(){if(nA)return eA;nA=1;var e=Kn(),t=HZ();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),eA}VZ();var iA={},d0,oA;function UZ(){if(oA)return d0;oA=1;var e=Gn(),t=ot();return d0=function(r){if(e(r)==="Function")return t(r)},d0}var h0,aA;function Lk(){if(aA)return h0;aA=1;var e=UZ(),t=os(),r=ec(),n=e(e.bind);return h0=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},h0}var p0,sA;function WZ(){if(sA)return p0;sA=1;var e=Gn();return p0=Array.isArray||function(r){return e(r)==="Array"},p0}var v0,uA;function GZ(){if(uA)return v0;uA=1;var e=ot(),t=it(),r=Ot(),n=lc(),i=nc(),o=Nk(),a=function(){},u=i("Reflect","construct"),l=/^\s*(?:class|function)\b/,d=e(l.exec),f=!l.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(l,o(m))}catch{return!0}};return p.sham=!0,v0=!u||t(function(){var v;return h(h.call)||!h(Object)||!h(function(){v=!0})||v})?p:h,v0}var g0,lA;function KZ(){if(lA)return g0;lA=1;var e=WZ(),t=GZ(),r=Tt(),n=$t(),i=n("species"),o=Array;return g0=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},g0}var m0,cA;function YZ(){if(cA)return m0;cA=1;var e=KZ();return m0=function(t,r){return new(e(t))(r===0?0:r)},m0}var y0,fA;function XZ(){if(fA)return y0;fA=1;var e=Ir(),t=un(),r=tc();return y0=function(n,i,o){e?t.f(n,i,r(0,o)):n[i]=o},y0}var b0,dA;function Bk(){if(dA)return b0;dA=1;var e=Lk(),t=rc(),r=jo(),n=uc(),i=YZ(),o=XZ(),a=function(u){var l=u===1,d=u===2,f=u===3,h=u===4,p=u===6,v=u===7,m=u===5||p;return function(y,x,b){for(var w=r(y),E=t(w),_=n(E),S=e(x,b),R=0,I=0,P=l?i(y,_):d||v?i(y,0):void 0,A,k;_>R;R++)if((m||R in E)&&(A=E[R],k=S(A,R,w),u))if(l)o(P,R,k);else if(k)switch(u){case 3:return!0;case 5:return A;case 6:return R;case 2:o(P,I++,A)}else switch(u){case 4:return!1;case 7:o(P,I++,A)}return p?-1:f||h?h:P}};return b0={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},b0}var x0,hA;function ZZ(){if(hA)return x0;hA=1;var e=it(),t=$t(),r=vw(),n=t("species");return x0=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},x0}var pA;function JZ(){if(pA)return iA;pA=1;var e=Kn(),t=Bk().filter,r=ZZ(),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)}}),iA}JZ();var vA={},w0,gA;function QZ(){if(gA)return w0;gA=1;var e=Rw(),t=lc();return w0=e?{}.toString:function(){return"[object "+t(this)+"]"},w0}var mA;function eJ(){if(mA)return vA;mA=1;var e=Rw(),t=Ti(),r=QZ();return e||t(Object.prototype,"toString",r,{unsafe:!0}),vA}eJ();var _0={},yA;function tJ(){if(yA)return _0;yA=1;var e=Ir(),t=Pk(),r=un(),n=Nr(),i=Do(),o=kk();return _0.f=e&&!t?Object.defineProperties:function(u,l){n(u);for(var d=i(l),f=o(l),h=f.length,p=0,v;h>p;)r.f(u,v=f[p++],d[v]);return u},_0}var E0,bA;function rJ(){if(bA)return E0;bA=1;var e=nc();return E0=e("document","documentElement"),E0}var S0,xA;function cc(){if(xA)return S0;xA=1;var e=Nr(),t=tJ(),r=Ow(),n=ac(),i=rJ(),o=ww(),a=Ew(),u=">",l="<",d="prototype",f="script",h=a("IE_PROTO"),p=function(){},v=function(w){return l+f+u+w+l+"/"+f+u},m=function(w){w.write(v("")),w.close();var E=w.parentWindow.Object;return w=null,E},y=function(){var w=o("iframe"),E="java"+f+":",_;return w.style.display="none",i.appendChild(w),w.src=String(E),_=w.contentWindow.document,_.open(),_.write(v("document.F=Object")),_.close(),_.F},x,b=function(){try{x=new ActiveXObject("htmlfile")}catch{}b=typeof document<"u"?document.domain&&x?m(x):y():m(x);for(var w=r.length;w--;)delete b[d][r[w]];return b()};return n[h]=!0,S0=Object.create||function(E,_){var S;return E!==null?(p[d]=e(E),S=new p,p[d]=null,S[h]=E):S=b(),_===void 0?S:t.f(S,_)},S0}var O0,wA;function nJ(){if(wA)return O0;wA=1;var e=$t(),t=cc(),r=un().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),O0=function(o){i[n][o]=!0},O0}var C0,_A;function us(){return _A||(_A=1,C0={}),C0}var R0,EA;function iJ(){if(EA)return R0;EA=1;var e=it();return R0=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),R0}var I0,SA;function Fk(){if(SA)return I0;SA=1;var e=Pr(),t=Ot(),r=jo(),n=Ew(),i=iJ(),o=n("IE_PROTO"),a=Object,u=a.prototype;return I0=i?a.getPrototypeOf:function(l){var d=r(l);if(e(d,o))return d[o];var f=d.constructor;return t(f)&&d instanceof f?f.prototype:d instanceof a?u:null},I0}var P0,OA;function $k(){if(OA)return P0;OA=1;var e=it(),t=Ot(),r=Tt(),n=cc(),i=Fk(),o=Ti(),a=$t(),u=oc(),l=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[l].call(m)!==m});return v?f={}:u&&(f=n(f)),t(f[l])||o(f,l,function(){return this}),P0={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:d},P0}var N0,CA;function fc(){if(CA)return N0;CA=1;var e=un().f,t=Pr(),r=$t(),n=r("toStringTag");return N0=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},N0}var T0,RA;function oJ(){if(RA)return T0;RA=1;var e=$k().IteratorPrototype,t=cc(),r=tc(),n=fc(),i=us(),o=function(){return this};return T0=function(a,u,l,d){var f=u+" Iterator";return a.prototype=t(e,{next:r(+!d,l)}),n(a,f,!1,!0),i[f]=o,a},T0}var A0,IA;function aJ(){if(IA)return A0;IA=1;var e=ot(),t=os();return A0=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},A0}var M0,PA;function sJ(){if(PA)return M0;PA=1;var e=Tt();return M0=function(t){return e(t)||t===null},M0}var D0,NA;function uJ(){if(NA)return D0;NA=1;var e=sJ(),t=String,r=TypeError;return D0=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},D0}var j0,TA;function zk(){if(TA)return j0;TA=1;var e=aJ(),t=Tt(),r=Ni(),n=uJ();return j0=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(l,d){return r(l),n(d),t(l)&&(i?a(l,d):l.__proto__=d),l}})():void 0),j0}var q0,AA;function Hk(){if(AA)return q0;AA=1;var e=Kn(),t=Zt(),r=oc(),n=_w(),i=Ot(),o=oJ(),a=Fk(),u=zk(),l=fc(),d=ss(),f=Ti(),h=$t(),p=us(),v=$k(),m=n.PROPER,y=n.CONFIGURABLE,x=v.IteratorPrototype,b=v.BUGGY_SAFARI_ITERATORS,w=h("iterator"),E="keys",_="values",S="entries",R=function(){return this};return q0=function(I,P,A,k,L,$,j){o(A,P,k);var D=function(F){if(F===L&&te)return te;if(!b&&F&&F in Y)return Y[F];switch(F){case E:return function(){return new A(this,F)};case _:return function(){return new A(this,F)};case S:return function(){return new A(this,F)}}return function(){return new A(this)}},G=P+" Iterator",B=!1,Y=I.prototype,Z=Y[w]||Y["@@iterator"]||L&&Y[L],te=!b&&Z||D(L),U=P==="Array"&&Y.entries||Z,re,ae,le;if(U&&(re=a(U.call(new I)),re!==Object.prototype&&re.next&&(!r&&a(re)!==x&&(u?u(re,x):i(re[w])||f(re,w,R)),l(re,G,!0,!0),r&&(p[G]=R))),m&&L===_&&Z&&Z.name!==_&&(!r&&y?d(Y,"name",_):(B=!0,te=function(){return t(Z,this)})),L)if(ae={values:D(_),keys:$?te:D(E),entries:D(S)},j)for(le in ae)(b||B||!(le in Y))&&f(Y,le,ae[le]);else e({target:P,proto:!0,forced:b||B},ae);return(!r||j)&&Y[w]!==te&&f(Y,w,te,{name:L}),p[P]=te,ae},q0}var k0,MA;function Vk(){return MA||(MA=1,k0=function(e,t){return{value:e,done:t}}),k0}var L0,DA;function Uk(){if(DA)return L0;DA=1;var e=Do(),t=nJ(),r=us(),n=qo(),i=un().f,o=Hk(),a=Vk(),u=oc(),l=Ir(),d="Array Iterator",f=n.set,h=n.getterFor(d);L0=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&&l&&p.name!=="values")try{i(p,"name",{value:"values"})}catch{}return L0}Uk();var jA={},B0,qA;function Wk(){if(qA)return B0;qA=1;var e=ot(),t=sc(),r=Ai(),n=Ni(),i=e("".charAt),o=e("".charCodeAt),a=e("".slice),u=function(l){return function(d,f){var h=r(n(d)),p=t(f),v=h.length,m,y;return p<0||p>=v?l?"":void 0:(m=o(h,p),m<55296||m>56319||p+1===v||(y=o(h,p+1))<56320||y>57343?l?i(h,p):m:l?a(h,p,p+2):(m-55296<<10)+(y-56320)+65536)}};return B0={codeAt:u(!1),charAt:u(!0)},B0}var kA;function lJ(){if(kA)return jA;kA=1;var e=Wk().charAt,t=Ai(),r=qo(),n=Hk(),i=Vk(),o="String Iterator",a=r.set,u=r.getterFor(o);return n(String,"String",function(l){a(this,{type:o,string:t(l),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))}),jA}lJ();var LA={},BA={},F0,FA;function Gk(){if(FA)return F0;FA=1;var e=it();return F0=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),F0}var $0,$A;function Kk(){if($A)return $0;$A=1;var e=Ti();return $0=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},$0}var z0={exports:{}},H0={},V0,zA;function cJ(){if(zA)return V0;zA=1;var e=ot();return V0=e([].slice),V0}var HA;function fJ(){if(HA)return H0;HA=1;var e=Gn(),t=Do(),r=Cw().f,n=cJ(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return H0.f=function(u){return i&&e(u)==="Window"?o(u):r(t(u))},H0}var U0,VA;function dJ(){if(VA)return U0;VA=1;var e=it();return U0=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),U0}var W0,UA;function hJ(){if(UA)return W0;UA=1;var e=it(),t=Tt(),r=Gn(),n=dJ(),i=Object.isExtensible,o=e(function(){});return W0=o||n?function(u){return!t(u)||n&&r(u)==="ArrayBuffer"?!1:i?i(u):!0}:i,W0}var WA;function Iw(){if(WA)return z0.exports;WA=1;var e=Kn(),t=ot(),r=ac(),n=Tt(),i=Pr(),o=un().f,a=Cw(),u=fJ(),l=hJ(),d=xw(),f=Gk(),h=!1,p=d("meta"),v=0,m=function(_){o(_,p,{value:{objectID:"O"+v++,weakData:{}}})},y=function(_,S){if(!n(_))return typeof _=="symbol"?_:(typeof _=="string"?"S":"P")+_;if(!i(_,p)){if(!l(_))return"F";if(!S)return"E";m(_)}return _[p].objectID},x=function(_,S){if(!i(_,p)){if(!l(_))return!0;if(!S)return!1;m(_)}return _[p].weakData},b=function(_){return f&&h&&l(_)&&!i(_,p)&&m(_),_},w=function(){E.enable=function(){},h=!0;var _=a.f,S=t([].splice),R={};R[p]=1,_(R).length&&(a.f=function(I){for(var P=_(I),A=0,k=P.length;A<k;A++)if(P[A]===p){S(P,A,1);break}return P},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},E=z0.exports={enable:w,fastKey:y,getWeakData:x,onFreeze:b};return r[p]=!0,z0.exports}var G0,GA;function pJ(){if(GA)return G0;GA=1;var e=$t(),t=us(),r=e("iterator"),n=Array.prototype;return G0=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},G0}var K0,KA;function Yk(){if(KA)return K0;KA=1;var e=lc(),t=as(),r=is(),n=us(),i=$t(),o=i("iterator");return K0=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},K0}var Y0,YA;function vJ(){if(YA)return Y0;YA=1;var e=Zt(),t=os(),r=Nr(),n=gw(),i=Yk(),o=TypeError;return Y0=function(a,u){var l=arguments.length<2?i(a):u;if(t(l))return r(e(l,a));throw new o(n(a)+" is not iterable")},Y0}var X0,XA;function gJ(){if(XA)return X0;XA=1;var e=Zt(),t=Nr(),r=as();return X0=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(l){u=!0,a=l}if(i==="throw")throw o;if(u)throw a;return t(a),o},X0}var Z0,ZA;function Xk(){if(ZA)return Z0;ZA=1;var e=Lk(),t=Zt(),r=Nr(),n=gw(),i=pJ(),o=uc(),a=ic(),u=vJ(),l=Yk(),d=gJ(),f=TypeError,h=function(v,m){this.stopped=v,this.result=m},p=h.prototype;return Z0=function(v,m,y){var x=y&&y.that,b=!!(y&&y.AS_ENTRIES),w=!!(y&&y.IS_RECORD),E=!!(y&&y.IS_ITERATOR),_=!!(y&&y.INTERRUPTED),S=e(m,x),R,I,P,A,k,L,$,j=function(B){var Y=R;return R=void 0,Y&&d(Y,"normal"),new h(!0,B)},D=function(B){return b?(r(B),_?S(B[0],B[1],j):S(B[0],B[1])):_?S(B,j):S(B)};if(w)R=v.iterator;else if(E)R=v;else{if(I=l(v),!I)throw new f(n(v)+" is not iterable");if(i(I)){for(P=0,A=o(v);A>P;P++)if(k=D(v[P]),k&&a(p,k))return k;return new h(!1)}R=u(v,I)}for(L=w?v.next:R.next;!($=t(L,R)).done;){var G=$.value;try{k=D(G)}catch(B){if(R)d(R,"throw",B);else throw B}if(typeof k=="object"&&k&&a(p,k))return k}return new h(!1)},Z0}var J0,JA;function Zk(){if(JA)return J0;JA=1;var e=ic(),t=TypeError;return J0=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},J0}var Q0,QA;function mJ(){if(QA)return Q0;QA=1;var e=$t(),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 Q0=function(o,a){try{if(!a&&!r)return!1}catch{return!1}var u=!1;try{var l={};l[t]=function(){return{next:function(){return{done:u=!0}}}},o(l)}catch{}return u},Q0}var eb,eM;function yJ(){if(eM)return eb;eM=1;var e=Ot(),t=Tt(),r=zk();return eb=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},eb}var tb,tM;function bJ(){if(tM)return tb;tM=1;var e=Kn(),t=wt(),r=ot(),n=jk(),i=Ti(),o=Iw(),a=Xk(),u=Zk(),l=Ot(),d=is(),f=Tt(),h=it(),p=mJ(),v=fc(),m=yJ();return tb=function(y,x,b){var w=y.indexOf("Map")!==-1,E=y.indexOf("Weak")!==-1,_=w?"set":"add",S=t[y],R=S&&S.prototype,I=S,P={},A=function(B){var Y=r(R[B]);i(R,B,B==="add"?function(te){return Y(this,te===0?0:te),this}:B==="delete"?function(Z){return E&&!f(Z)?!1:Y(this,Z===0?0:Z)}:B==="get"?function(te){return E&&!f(te)?void 0:Y(this,te===0?0:te)}:B==="has"?function(te){return E&&!f(te)?!1:Y(this,te===0?0:te)}:function(te,U){return Y(this,te===0?0:te,U),this})},k=n(y,!l(S)||!(E||R.forEach&&!h(function(){new S().entries().next()})));if(k)I=b.getConstructor(x,y,w,_),o.enable();else if(n(y,!0)){var L=new I,$=L[_](E?{}:-0,1)!==L,j=h(function(){L.has(1)}),D=p(function(B){new S(B)}),G=!E&&h(function(){for(var B=new S,Y=5;Y--;)B[_](Y,Y);return!B.has(-0)});D||(I=x(function(B,Y){u(B,R);var Z=m(new S,B,I);return d(Y)||a(Y,Z[_],{that:Z,AS_ENTRIES:w}),Z}),I.prototype=R,R.constructor=I),(j||G)&&(A("delete"),A("has"),w&&A("get")),(G||$)&&A(_),E&&R.clear&&delete R.clear}return P[y]=I,e({global:!0,constructor:!0,forced:I!==S},P),v(I,y),E||b.setStrong(I,y,w),I},tb}var rb,rM;function xJ(){if(rM)return rb;rM=1;var e=ot(),t=Kk(),r=Iw().getWeakData,n=Zk(),i=Nr(),o=is(),a=Tt(),u=Xk(),l=Bk(),d=Pr(),f=qo(),h=f.set,p=f.getterFor,v=l.find,m=l.findIndex,y=e([].splice),x=0,b=function(_){return _.frozen||(_.frozen=new w)},w=function(){this.entries=[]},E=function(_,S){return v(_.entries,function(R){return R[0]===S})};return w.prototype={get:function(_){var S=E(this,_);if(S)return S[1]},has:function(_){return!!E(this,_)},set:function(_,S){var R=E(this,_);R?R[1]=S:this.entries.push([_,S])},delete:function(_){var S=m(this.entries,function(R){return R[0]===_});return~S&&y(this.entries,S,1),!!~S}},rb={getConstructor:function(_,S,R,I){var P=_(function($,j){n($,A),h($,{type:S,id:x++,frozen:null}),o(j)||u(j,$[I],{that:$,AS_ENTRIES:R})}),A=P.prototype,k=p(S),L=function($,j,D){var G=k($),B=r(i(j),!0);return B===!0?b(G).set(j,D):B[G.id]=D,$};return t(A,{delete:function($){var j=k(this);if(!a($))return!1;var D=r($);return D===!0?b(j).delete($):D&&d(D,j.id)&&delete D[j.id]},has:function(j){var D=k(this);if(!a(j))return!1;var G=r(j);return G===!0?b(D).has(j):G&&d(G,D.id)}}),t(A,R?{get:function(j){var D=k(this);if(a(j)){var G=r(j);if(G===!0)return b(D).get(j);if(G)return G[D.id]}},set:function(j,D){return L(this,j,D)}}:{add:function(j){return L(this,j,!0)}}),P}},rb}var nM;function wJ(){if(nM)return BA;nM=1;var e=Gk(),t=wt(),r=ot(),n=Kk(),i=Iw(),o=bJ(),a=xJ(),u=Tt(),l=qo().enforce,d=it(),f=Tk(),h=Object,p=Array.isArray,v=h.isExtensible,m=h.isFrozen,y=h.isSealed,x=h.freeze,b=h.seal,w=!t.ActiveXObject&&"ActiveXObject"in t,E,_=function($){return function(){return $(this,arguments.length?arguments[0]:void 0)}},S=o("WeakMap",_,a),R=S.prototype,I=r(R.set),P=function(){return e&&d(function(){var $=x([]);return I(new S,$,1),!m($)})};if(f)if(w){E=a.getConstructor(_,"WeakMap",!0),i.enable();var A=r(R.delete),k=r(R.has),L=r(R.get);n(R,{delete:function($){if(u($)&&!v($)){var j=l(this);return j.frozen||(j.frozen=new E),A(this,$)||j.frozen.delete($)}return A(this,$)},has:function(j){if(u(j)&&!v(j)){var D=l(this);return D.frozen||(D.frozen=new E),k(this,j)||D.frozen.has(j)}return k(this,j)},get:function(j){if(u(j)&&!v(j)){var D=l(this);return D.frozen||(D.frozen=new E),k(this,j)?L(this,j):D.frozen.get(j)}return L(this,j)},set:function(j,D){if(u(j)&&!v(j)){var G=l(this);G.frozen||(G.frozen=new E),k(this,j)?I(this,j,D):G.frozen.set(j,D)}else I(this,j,D);return this}})}else P()&&n(R,{set:function(j,D){var G;return p(j)&&(m(j)?G=x:y(j)&&(G=b)),I(this,j,D),G&&G(j),this}});return BA}var iM;function _J(){return iM||(iM=1,wJ()),LA}_J();var oM={},nb,aM;function EJ(){return aM||(aM=1,nb={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}),nb}var ib,sM;function SJ(){if(sM)return ib;sM=1;var e=ww(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return ib=r===Object.prototype?void 0:r,ib}var uM;function OJ(){if(uM)return oM;uM=1;var e=wt(),t=EJ(),r=SJ(),n=Uk(),i=ss(),o=fc(),a=$t(),u=a("iterator"),l=n.values,d=function(h,p){if(h){if(h[u]!==l)try{i(h,u,l)}catch{h[u]=l}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"),oM}OJ();var ob,lM;function CJ(){if(lM)return ob;lM=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,l=typeof ht=="object"&&ht&&ht.Object===Object&&ht,d=typeof self=="object"&&self&&self.Object===Object&&self,f=l||d||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,m=Math.min,y=function(){return f.Date.now()};function x(R,I,P){var A,k,L,$,j,D,G=0,B=!1,Y=!1,Z=!0;if(typeof R!="function")throw new TypeError(e);I=S(I)||0,w(P)&&(B=!!P.leading,Y="maxWait"in P,L=Y?v(S(P.maxWait)||0,I):L,Z="trailing"in P?!!P.trailing:Z);function te(K){var se=A,oe=k;return A=k=void 0,G=K,$=R.apply(oe,se),$}function U(K){return G=K,j=setTimeout(le,I),B?te(K):$}function re(K){var se=K-D,oe=K-G,fe=I-se;return Y?m(fe,L-oe):fe}function ae(K){var se=K-D,oe=K-G;return D===void 0||se>=I||se<0||Y&&oe>=L}function le(){var K=y();if(ae(K))return F(K);j=setTimeout(le,re(K))}function F(K){return j=void 0,Z&&A?te(K):(A=k=void 0,$)}function W(){j!==void 0&&clearTimeout(j),G=0,A=D=k=j=void 0}function J(){return j===void 0?$:F(y())}function H(){var K=y(),se=ae(K);if(A=arguments,k=this,D=K,se){if(j===void 0)return U(D);if(Y)return j=setTimeout(le,I),te(D)}return j===void 0&&(j=setTimeout(le,I)),$}return H.cancel=W,H.flush=J,H}function b(R,I,P){var A=!0,k=!0;if(typeof R!="function")throw new TypeError(e);return w(P)&&(A="leading"in P?!!P.leading:A,k="trailing"in P?!!P.trailing:k),x(R,I,{leading:A,maxWait:I,trailing:k})}function w(R){var I=typeof R;return!!R&&(I=="object"||I=="function")}function E(R){return!!R&&typeof R=="object"}function _(R){return typeof R=="symbol"||E(R)&&p.call(R)==r}function S(R){if(typeof R=="number")return R;if(_(R))return t;if(w(R)){var I=typeof R.valueOf=="function"?R.valueOf():R;R=w(I)?I+"":I}if(typeof R!="string")return R===0?R:+R;R=R.replace(n,"");var P=o.test(R);return P||a.test(R)?u(R.slice(2),P?2:8):i.test(R)?t:+R}return ob=b,ob}var RJ=CJ();const cM=Vn(RJ);var ab,fM;function IJ(){if(fM)return ab;fM=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,l=typeof ht=="object"&&ht&&ht.Object===Object&&ht,d=typeof self=="object"&&self&&self.Object===Object&&self,f=l||d||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,m=Math.min,y=function(){return f.Date.now()};function x(S,R,I){var P,A,k,L,$,j,D=0,G=!1,B=!1,Y=!0;if(typeof S!="function")throw new TypeError(e);R=_(R)||0,b(I)&&(G=!!I.leading,B="maxWait"in I,k=B?v(_(I.maxWait)||0,R):k,Y="trailing"in I?!!I.trailing:Y);function Z(H){var K=P,se=A;return P=A=void 0,D=H,L=S.apply(se,K),L}function te(H){return D=H,$=setTimeout(ae,R),G?Z(H):L}function U(H){var K=H-j,se=H-D,oe=R-K;return B?m(oe,k-se):oe}function re(H){var K=H-j,se=H-D;return j===void 0||K>=R||K<0||B&&se>=k}function ae(){var H=y();if(re(H))return le(H);$=setTimeout(ae,U(H))}function le(H){return $=void 0,Y&&P?Z(H):(P=A=void 0,L)}function F(){$!==void 0&&clearTimeout($),D=0,P=j=A=$=void 0}function W(){return $===void 0?L:le(y())}function J(){var H=y(),K=re(H);if(P=arguments,A=this,j=H,K){if($===void 0)return te(j);if(B)return $=setTimeout(ae,R),Z(j)}return $===void 0&&($=setTimeout(ae,R)),L}return J.cancel=F,J.flush=W,J}function b(S){var R=typeof S;return!!S&&(R=="object"||R=="function")}function w(S){return!!S&&typeof S=="object"}function E(S){return typeof S=="symbol"||w(S)&&p.call(S)==r}function _(S){if(typeof S=="number")return S;if(E(S))return t;if(b(S)){var R=typeof S.valueOf=="function"?S.valueOf():S;S=b(R)?R+"":R}if(typeof S!="string")return S===0?S:+S;S=S.replace(n,"");var I=o.test(S);return I||a.test(S)?u(S.slice(2),I?2:8):i.test(S)?t:+S}return ab=x,ab}var PJ=IJ();const dM=Vn(PJ);var sb,hM;function NJ(){if(hM)return sb;hM=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,l=a||u||Function("return this")();function d(de,ue){return de==null?void 0:de[ue]}function f(de){var ue=!1;if(de!=null&&typeof de.toString!="function")try{ue=!!(de+"")}catch{}return ue}var h=Array.prototype,p=Function.prototype,v=Object.prototype,m=l["__core-js_shared__"],y=(function(){var de=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||"");return de?"Symbol(src)_1."+de:""})(),x=p.toString,b=v.hasOwnProperty,w=v.toString,E=RegExp("^"+x.call(b).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_=h.splice,S=K(l,"Map"),R=K(Object,"create");function I(de){var ue=-1,Ee=de?de.length:0;for(this.clear();++ue<Ee;){var Pe=de[ue];this.set(Pe[0],Pe[1])}}function P(){this.__data__=R?R(null):{}}function A(de){return this.has(de)&&delete this.__data__[de]}function k(de){var ue=this.__data__;if(R){var Ee=ue[de];return Ee===t?void 0:Ee}return b.call(ue,de)?ue[de]:void 0}function L(de){var ue=this.__data__;return R?ue[de]!==void 0:b.call(ue,de)}function $(de,ue){var Ee=this.__data__;return Ee[de]=R&&ue===void 0?t:ue,this}I.prototype.clear=P,I.prototype.delete=A,I.prototype.get=k,I.prototype.has=L,I.prototype.set=$;function j(de){var ue=-1,Ee=de?de.length:0;for(this.clear();++ue<Ee;){var Pe=de[ue];this.set(Pe[0],Pe[1])}}function D(){this.__data__=[]}function G(de){var ue=this.__data__,Ee=W(ue,de);if(Ee<0)return!1;var Pe=ue.length-1;return Ee==Pe?ue.pop():_.call(ue,Ee,1),!0}function B(de){var ue=this.__data__,Ee=W(ue,de);return Ee<0?void 0:ue[Ee][1]}function Y(de){return W(this.__data__,de)>-1}function Z(de,ue){var Ee=this.__data__,Pe=W(Ee,de);return Pe<0?Ee.push([de,ue]):Ee[Pe][1]=ue,this}j.prototype.clear=D,j.prototype.delete=G,j.prototype.get=B,j.prototype.has=Y,j.prototype.set=Z;function te(de){var ue=-1,Ee=de?de.length:0;for(this.clear();++ue<Ee;){var Pe=de[ue];this.set(Pe[0],Pe[1])}}function U(){this.__data__={hash:new I,map:new(S||j),string:new I}}function re(de){return H(this,de).delete(de)}function ae(de){return H(this,de).get(de)}function le(de){return H(this,de).has(de)}function F(de,ue){return H(this,de).set(de,ue),this}te.prototype.clear=U,te.prototype.delete=re,te.prototype.get=ae,te.prototype.has=le,te.prototype.set=F;function W(de,ue){for(var Ee=de.length;Ee--;)if(ee(de[Ee][0],ue))return Ee;return-1}function J(de){if(!be(de)||oe(de))return!1;var ue=we(de)||f(de)?E:o;return ue.test(fe(de))}function H(de,ue){var Ee=de.__data__;return se(ue)?Ee[typeof ue=="string"?"string":"hash"]:Ee.map}function K(de,ue){var Ee=d(de,ue);return J(Ee)?Ee:void 0}function se(de){var ue=typeof de;return ue=="string"||ue=="number"||ue=="symbol"||ue=="boolean"?de!=="__proto__":de===null}function oe(de){return!!y&&y in de}function fe(de){if(de!=null){try{return x.call(de)}catch{}try{return de+""}catch{}}return""}function V(de,ue){if(typeof de!="function"||ue&&typeof ue!="function")throw new TypeError(e);var Ee=function(){var Pe=arguments,Ze=ue?ue.apply(this,Pe):Pe[0],ze=Ee.cache;if(ze.has(Ze))return ze.get(Ze);var Fe=de.apply(this,Pe);return Ee.cache=ze.set(Ze,Fe),Fe};return Ee.cache=new(V.Cache||te),Ee}V.Cache=te;function ee(de,ue){return de===ue||de!==de&&ue!==ue}function we(de){var ue=be(de)?w.call(de):"";return ue==r||ue==n}function be(de){var ue=typeof de;return!!de&&(ue=="object"||ue=="function")}return sb=V,sb}var TJ=NJ();const AJ=Vn(TJ);var mi=[],MJ=function(){return mi.some(function(e){return e.activeTargets.length>0})},DJ=function(){return mi.some(function(e){return e.skippedTargets.length>0})},pM="ResizeObserver loop completed with undelivered notifications.",jJ=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:pM}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=pM),window.dispatchEvent(e)},Ga;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ga||(Ga={}));var yi=function(e){return Object.freeze(e)},qJ=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,yi(this)}return e})(),Jk=(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,yi(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,l=t.width,d=t.height;return{x:r,y:n,top:i,right:o,bottom:a,left:u,width:l,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),Pw=function(e){return e instanceof SVGElement&&"getBBox"in e},Qk=function(e){if(Pw(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)},vM=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)},kJ=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},ka=typeof window<"u"?window:{},Cu=new WeakMap,gM=/auto|scroll/,LJ=/^tb|vertical/,BJ=/msie|trident/i.test(ka.navigator&&ka.navigator.userAgent),Xr=function(e){return parseFloat(e||"0")},mo=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new qJ((r?t:e)||0,(r?e:t)||0)},mM=yi({devicePixelContentBoxSize:mo(),borderBoxSize:mo(),contentBoxSize:mo(),contentRect:new Jk(0,0,0,0)}),eL=function(e,t){if(t===void 0&&(t=!1),Cu.has(e)&&!t)return Cu.get(e);if(Qk(e))return Cu.set(e,mM),mM;var r=getComputedStyle(e),n=Pw(e)&&e.ownerSVGElement&&e.getBBox(),i=!BJ&&r.boxSizing==="border-box",o=LJ.test(r.writingMode||""),a=!n&&gM.test(r.overflowY||""),u=!n&&gM.test(r.overflowX||""),l=n?0:Xr(r.paddingTop),d=n?0:Xr(r.paddingRight),f=n?0:Xr(r.paddingBottom),h=n?0:Xr(r.paddingLeft),p=n?0:Xr(r.borderTopWidth),v=n?0:Xr(r.borderRightWidth),m=n?0:Xr(r.borderBottomWidth),y=n?0:Xr(r.borderLeftWidth),x=h+d,b=l+f,w=y+v,E=p+m,_=u?e.offsetHeight-E-e.clientHeight:0,S=a?e.offsetWidth-w-e.clientWidth:0,R=i?x+w:0,I=i?b+E:0,P=n?n.width:Xr(r.width)-R-S,A=n?n.height:Xr(r.height)-I-_,k=P+x+S+w,L=A+b+_+E,$=yi({devicePixelContentBoxSize:mo(Math.round(P*devicePixelRatio),Math.round(A*devicePixelRatio),o),borderBoxSize:mo(k,L,o),contentBoxSize:mo(P,A,o),contentRect:new Jk(h,l,P,A)});return Cu.set(e,$),$},tL=function(e,t,r){var n=eL(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case Ga.DEVICE_PIXEL_CONTENT_BOX:return a;case Ga.BORDER_BOX:return i;default:return o}},FJ=(function(){function e(t){var r=eL(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=yi([r.borderBoxSize]),this.contentBoxSize=yi([r.contentBoxSize]),this.devicePixelContentBoxSize=yi([r.devicePixelContentBoxSize])}return e})(),rL=function(e){if(Qk(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},$J=function(){var e=1/0,t=[];mi.forEach(function(a){if(a.activeTargets.length!==0){var u=[];a.activeTargets.forEach(function(d){var f=new FJ(d.target),h=rL(d.target);u.push(f),d.lastReportedSize=tL(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},yM=function(e){mi.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(rL(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},zJ=function(){var e=0;for(yM(e);MJ();)e=$J(),yM(e);return DJ()&&jJ(),e>0},ub,nL=[],HJ=function(){return nL.splice(0).forEach(function(e){return e()})},VJ=function(e){if(!ub){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return HJ()}).observe(r,n),ub=function(){r.textContent="".concat(t?t--:t++)}}nL.push(e),ub()},UJ=function(e){VJ(function(){requestAnimationFrame(e)})},Bu=0,WJ=function(){return!!Bu},GJ=250,KJ={attributes:!0,characterData:!0,childList:!0,subtree:!0},bM=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],xM=function(e){return e===void 0&&(e=0),Date.now()+e},lb=!1,YJ=(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=GJ),!lb){lb=!0;var n=xM(t);UJ(function(){var i=!1;try{i=zJ()}finally{if(lb=!1,t=n-xM(),!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,KJ)};document.body?r():ka.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),bM.forEach(function(r){return ka.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),bM.forEach(function(r){return ka.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),rx=new YJ,wM=function(e){!Bu&&e>0&&rx.start(),Bu+=e,!Bu&&rx.stop()},XJ=function(e){return!Pw(e)&&!kJ(e)&&getComputedStyle(e).display==="inline"},ZJ=(function(){function e(t,r){this.target=t,this.observedBox=r||Ga.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=tL(this.target,this.observedBox,!0);return XJ(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),JJ=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Ru=new WeakMap,_M=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 JJ(t,r);Ru.set(t,n)},e.observe=function(t,r,n){var i=Ru.get(t),o=i.observationTargets.length===0;_M(i.observationTargets,r)<0&&(o&&mi.push(i),i.observationTargets.push(new ZJ(r,n&&n.box)),wM(1),rx.schedule())},e.unobserve=function(t,r){var n=Ru.get(t),i=_M(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&mi.splice(mi.indexOf(n),1),n.observationTargets.splice(i,1),wM(-1))},e.disconnect=function(t){var r=this,n=Ru.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),QJ=(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(!vM(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(!vM(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})(),cb,EM;function eQ(){if(EM)return cb;EM=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return cb=e,cb}var tQ=eQ();const iL=Vn(tQ);var SM={},fb,OM;function rQ(){if(OM)return fb;OM=1;var e=os(),t=jo(),r=rc(),n=uc(),i=TypeError,o="Reduce of empty array with no initial value",a=function(u){return function(l,d,f,h){var p=t(l),v=r(p),m=n(p);if(e(d),m===0&&f<2)throw new i(o);var y=u?m-1:0,x=u?-1:1;if(f<2)for(;;){if(y in v){h=v[y],y+=x;break}if(y+=x,u?y<0:m<=y)throw new i(o)}for(;u?y>=0:m>y;y+=x)y in v&&(h=d(h,v[y],y,p));return h}};return fb={left:a(!1),right:a(!0)},fb}var db,CM;function nQ(){if(CM)return db;CM=1;var e=it();return db=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},db}var hb,RM;function iQ(){if(RM)return hb;RM=1;var e=wt(),t=_k(),r=Gn(),n=function(i){return t.slice(0,i.length)===i};return hb=(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"})(),hb}var pb,IM;function oQ(){if(IM)return pb;IM=1;var e=iQ();return pb=e==="NODE",pb}var PM;function aQ(){if(PM)return SM;PM=1;var e=Kn(),t=rQ().left,r=nQ(),n=vw(),i=oQ(),o=!i&&n>79&&n<83,a=o||!r("reduce");return e({target:"Array",proto:!0,forced:a},{reduce:function(l){var d=arguments.length;return t(this,l,d,d>1?arguments[1]:void 0)}}),SM}aQ();var NM={},vb,TM;function oL(){if(TM)return vb;TM=1;var e=Nr();return vb=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},vb}var gb,AM;function sQ(){if(AM)return gb;AM=1;var e=it(),t=wt(),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 gb={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},gb}var mb,MM;function uQ(){if(MM)return mb;MM=1;var e=it(),t=wt(),r=t.RegExp;return mb=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
|
|
71
|
+
`)&&n.flags==="s")}),mb}var yb,DM;function lQ(){if(DM)return yb;DM=1;var e=it(),t=wt(),r=t.RegExp;return yb=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),yb}var bb,jM;function Nw(){if(jM)return bb;jM=1;var e=Zt(),t=ot(),r=Ai(),n=oL(),i=sQ(),o=bw(),a=cc(),u=qo().get,l=uQ(),d=lQ(),f=o("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,v=t("".charAt),m=t("".indexOf),y=t("".replace),x=t("".slice),b=(function(){var R=/a/,I=/b*/g;return e(h,R,"a"),e(h,I,"a"),R.lastIndex!==0||I.lastIndex!==0})(),w=i.BROKEN_CARET,E=/()??/.exec("")[1]!==void 0,_=b||E||w||l||d,S=function(R,I){for(var P=R.groups=a(null),A=0;A<I.length;A++){var k=I[A];P[k[0]]=R[k[1]]}};return _&&(p=function(I){var P=this,A=u(P),k=r(I),L=A.raw,$,j,D;if(L)return L.lastIndex=P.lastIndex,$=e(p,L,k),P.lastIndex=L.lastIndex,$&&A.groups&&S($,A.groups),$;var G=A.groups,B=w&&P.sticky,Y=e(n,P),Z=P.source,te=0,U=k;if(B){Y=y(Y,"y",""),m(Y,"g")===-1&&(Y+="g"),U=x(k,P.lastIndex);var re=P.lastIndex>0&&v(k,P.lastIndex-1);P.lastIndex>0&&(!P.multiline||P.multiline&&re!==`
|
|
72
|
+
`&&re!=="\r"&&re!=="\u2028"&&re!=="\u2029")&&(Z="(?: (?:"+Z+"))",U=" "+U,te++),j=new RegExp("^(?:"+Z+")",Y)}E&&(j=new RegExp("^"+Z+"$(?!\\s)",Y)),b&&(D=P.lastIndex);var ae=e(h,B?j:P,U);return B?ae?(ae.input=k,ae[0]=x(ae[0],te),ae.index=P.lastIndex,P.lastIndex+=ae[0].length):P.lastIndex=0:b&&ae&&(P.lastIndex=P.global?ae.index+ae[0].length:D),E&&ae&&ae.length>1&&e(f,ae[0],j,function(){for(var le=1;le<arguments.length-2;le++)arguments[le]===void 0&&(ae[le]=void 0)}),ae&&G&&S(ae,G),ae}),bb=p,bb}var qM;function aL(){if(qM)return NM;qM=1;var e=Kn(),t=Nw();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),NM}aL();var kM={},xb,LM;function sL(){if(LM)return xb;LM=1,aL();var e=Zt(),t=Ti(),r=Nw(),n=it(),i=$t(),o=ss(),a=i("species"),u=RegExp.prototype;return xb=function(l,d,f,h){var p=i(l),v=!n(function(){var b={};return b[p]=function(){return 7},""[l](b)!==7}),m=v&&!n(function(){var b=!1,w=/a/;if(l==="split"){var E={};E[a]=function(){return w},w={constructor:E,flags:""},w[p]=/./[p]}return w.exec=function(){return b=!0,null},w[p](""),!b});if(!v||!m||f){var y=/./[p],x=d(p,""[l],function(b,w,E,_,S){var R=w.exec;return R===r||R===u.exec?v&&!S?{done:!0,value:e(y,w,E,_)}:{done:!0,value:e(b,E,w,_)}:{done:!1}});t(String.prototype,l,x[0]),t(u,p,x[1])}h&&o(u[p],"sham",!0)},xb}var wb,BM;function uL(){if(BM)return wb;BM=1;var e=Wk().charAt;return wb=function(t,r,n){return r+(n&&e(t,r).length||1)},wb}var _b,FM;function cQ(){if(FM)return _b;FM=1;var e=wt(),t=it(),r=e.RegExp,n=!t(function(){var i=!0;try{r(".","d")}catch{i=!1}var o={},a="",u=i?"dgimsy":"gimsy",l=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)l(f,d[f]);var h=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(o);return h!==u||a!==u});return _b={correct:n},_b}var Eb,$M;function lL(){if($M)return Eb;$M=1;var e=Zt(),t=Pr(),r=ic(),n=cQ(),i=oL(),o=RegExp.prototype;return Eb=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},Eb}var Sb,zM;function cL(){if(zM)return Sb;zM=1;var e=Zt(),t=Nr(),r=Ot(),n=Gn(),i=Nw(),o=TypeError;return Sb=function(a,u){var l=a.exec;if(r(l)){var d=e(l,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")},Sb}var HM;function fQ(){if(HM)return kM;HM=1;var e=Zt(),t=ot(),r=sL(),n=Nr(),i=Tt(),o=Sw(),a=Ai(),u=Ni(),l=as(),d=uL(),f=lL(),h=cL(),p=t("".indexOf);return r("match",function(v,m,y){return[function(b){var w=u(this),E=i(b)?l(b,v):void 0;return E?e(E,b,w):new RegExp(b)[v](a(w))},function(x){var b=n(this),w=a(x),E=y(m,b,w);if(E.done)return E.value;var _=a(f(b));if(!~p(_,"g"))return h(b,w);var S=!!~p(_,"u")||!!~p(_,"v");b.lastIndex=0;for(var R=[],I=0,P;(P=h(b,w))!==null;){var A=a(P[0]);R[I]=A,A===""&&(b.lastIndex=d(w,o(b.lastIndex),S)),I++}return I===0?null:R}]}),kM}fQ();var VM={},Ob,UM;function dQ(){if(UM)return Ob;UM=1;var e=Ak(),t=un();return Ob=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)},Ob}var WM;function hQ(){if(WM)return VM;WM=1;var e=Ir(),t=_w().EXISTS,r=ot(),n=dQ(),i=Function.prototype,o=r(i.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=r(a.exec),l="name";return e&&!t&&n(i,l,{configurable:!0,get:function(){try{return u(a,o(this))[1]}catch{return""}}}),VM}hQ();var GM={},Cb,KM;function pQ(){if(KM)return Cb;KM=1;var e=ec(),t=Function.prototype,r=t.apply,n=t.call;return Cb=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),Cb}var Rb,YM;function vQ(){if(YM)return Rb;YM=1;var e=ot(),t=jo(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;return Rb=function(l,d,f,h,p,v){var m=f+l.length,y=h.length,x=u;return p!==void 0&&(p=t(p),x=a),i(v,x,function(b,w){var E;switch(n(w,0)){case"$":return"$";case"&":return l;case"`":return o(d,0,f);case"'":return o(d,m);case"<":E=p[o(w,1,-1)];break;default:var _=+w;if(_===0)return b;if(_>y){var S=r(_/10);return S===0?b:S<=y?h[S-1]===void 0?n(w,1):h[S-1]+n(w,1):b}E=h[_-1]}return E===void 0?"":E})},Rb}var XM;function gQ(){if(XM)return GM;XM=1;var e=pQ(),t=Zt(),r=ot(),n=sL(),i=it(),o=Nr(),a=Ot(),u=Tt(),l=sc(),d=Sw(),f=Ai(),h=Ni(),p=uL(),v=as(),m=vQ(),y=lL(),x=cL(),b=$t(),w=b("replace"),E=Math.max,_=Math.min,S=r([].concat),R=r([].push),I=r("".indexOf),P=r("".slice),A=function(j){return j===void 0?j:String(j)},k=(function(){return"a".replace(/./,"$0")==="$0"})(),L=(function(){return/./[w]?/./[w]("a","$0")==="":!1})(),$=!i(function(){var j=/./;return j.exec=function(){var D=[];return D.groups={a:"7"},D},"".replace(j,"$<a>")!=="7"});return n("replace",function(j,D,G){var B=L?"$":"$0";return[function(Z,te){var U=h(this),re=u(Z)?v(Z,w):void 0;return re?t(re,Z,U,te):t(D,f(U),Z,te)},function(Y,Z){var te=o(this),U=f(Y),re=a(Z);re||(Z=f(Z));var ae=f(y(te));if(typeof Z=="string"&&!~I(Z,B)&&!~I(Z,"$<")&&!~I(ae,"y")){var le=G(D,te,U,Z);if(le.done)return le.value}var F=!!~I(ae,"g"),W;F&&(W=!!~I(ae,"u")||!!~I(ae,"v"),te.lastIndex=0);for(var J=[],H;H=x(te,U),!(H===null||(R(J,H),!F));){var K=f(H[0]);K===""&&(te.lastIndex=p(U,d(te.lastIndex),W))}for(var se="",oe=0,fe=0;fe<J.length;fe++){H=J[fe];for(var V=f(H[0]),ee=E(_(l(H.index),U.length),0),we=[],be,de=1;de<H.length;de++)R(we,A(H[de]));var ue=H.groups;if(re){var Ee=S([V],we,ee,U);ue!==void 0&&R(Ee,ue),be=f(e(Z,void 0,Ee))}else be=m(V,U,ee,we,ue,Z);ee>=oe&&(se+=P(U,oe,ee)+be,oe=ee+V.length)}return se+P(U,oe)}]},!$||!k||L),GM}gQ();function kn(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function Fu(e){return!e||!e.ownerDocument?document:e.ownerDocument}var ao=null,ZM=null;iL&&window.addEventListener("resize",function(){ZM!==window.devicePixelRatio&&(ZM=window.devicePixelRatio,ao=null)});function JM(e){if(ao===null){var t=Fu(e);if(typeof t>"u")return ao=0,ao;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),ao=i}return ao}var pl=(function(){function e(r,n){var i=this;this.onScroll=function(){var o=kn(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,l=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/(l-d.size),m=v*(f-h);i.draggedAxis==="x"&&(m=i.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?m-(l+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=Fu(i.el),u=kn(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=cM(this.recalculate.bind(this),64),this.onMouseMove=cM(this.onMouseMove.bind(this),64),this.hideScrollbars=dM(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=dM(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=AJ(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 l=e.getOffset(o);return{isRtlScrollingInverted:a.left!==u.left&&u.left-l.left!==0,isRtlScrollbarInverted:a.left!==u.left}},e.getOffset=function(n){var i=n.getBoundingClientRect(),o=Fu(n),a=kn(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),iL&&(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=kn(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(l){n.el.addEventListener(l,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(l){n.el.addEventListener(l,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||QJ;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=kn(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,l=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=l==="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,l=this.contentWrapperEl[this.axis[n].scrollOffsetAttr];l=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-l:l;var d=l/(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=Fu(this.el),a=kn(this.el),u=this.axis[i].scrollbar,l=i==="y"?n.pageY:n.pageX;this.axis[i].dragOffset=l-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=kn(this.el);this.axis[i].scrollbar.rect=this.axis[i].scrollbar.el.getBoundingClientRect();var u=this.axis[i].scrollbar,l=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-l:this.mouseX-l,p=h<0?-1:1,v=p===-1?f-d:f+d,m=function y(){if(p===-1){if(f>v){var x;f-=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((x={},x[o.axis[i].offsetAttr]=f,x)),a.requestAnimationFrame(y)}}else if(f<v){var b;f+=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((b={},b[o.axis[i].offsetAttr]=f,b)),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=kn(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})();pl.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};pl.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 Pu(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){mQ(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 mQ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vl(){return vl=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},vl.apply(this,arguments)}function yQ(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 bQ(e,t){if(e==null)return{};var r=yQ(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 xQ=["children","scrollableNodeProps","tag"],wQ=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,l){return l.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},dc=T.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=bQ(e,xQ),l=a,d,f=T.useRef(),h=T.useRef(),p=T.useRef(),v={},m={},y=[];return Object.keys(u).forEach(function(x){Object.prototype.hasOwnProperty.call(pl.defaultOptions,x)?v[x]=u[x]:x.match(/data-simplebar-(.+)/)&&x!=="data-simplebar-direction"?y.push({name:x,value:u[x]}):m[x]=u[x]}),y.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
|
|
73
73
|
'data-simplebar-auto-hide="false"' —> 'autoHide="false"'
|
|
74
|
-
`),T.useEffect(function(){return f=i.ref||f,h.current&&(d=new lc(h.current,Ou(Ou(Ou(Ou({},pQ(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)}},[]),T.createElement(c,fc({ref:h,"data-simplebar":!0},m),T.createElement("div",{className:"simplebar-wrapper"},T.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},T.createElement("div",{className:"simplebar-height-auto-observer"})),T.createElement("div",{className:"simplebar-mask"},T.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:f,contentNodeRef:p}):T.createElement("div",fc({},i,{className:"simplebar-content-wrapper".concat(i.className?" ".concat(i.className):"")}),T.createElement("div",{className:"simplebar-content"},r)))),T.createElement("div",{className:"simplebar-placeholder"})),T.createElement("div",{className:"simplebar-track simplebar-horizontal"},T.createElement("div",{className:"simplebar-scrollbar"})),T.createElement("div",{className:"simplebar-track simplebar-vertical"},T.createElement("div",{className:"simplebar-scrollbar"})))});sl.displayName="SimpleBar";sl.propTypes={children:le.oneOfType([le.node,le.func]),scrollableNodeProps:le.object,tag:le.string};const dc=Yx,hc=Xx,nL=e=>{switch(e){case J.EPermissionType.DATACLASS:return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"});case J.EPermissionType.SINGLETON:return C.jsx(ye.FdSingleton,{className:"h-6 w-6"});case J.EPermissionType.DATASTORE:return C.jsx(ye.FdModel3,{className:"h-6 w-6"});case J.EPermissionType.ATTRIBUTE:return C.jsx(ye.FdTableColumn,{className:"h-6 w-6"});case J.EPermissionType.METHOD:return C.jsx(ye.FdCode,{className:"h-6 w-6"});case J.EPermissionType.SINGLETON_METHOD:return C.jsx(ye.FdFunctionSingleton,{className:"h-6 w-6"});case J.ESubPermissionType.ENTITY_SEL_METHOD:return C.jsx(ye.FdFunctionSelection,{className:"h-6 w-6"});case J.ESubPermissionType.ENTITY_METHOD:return C.jsx(ye.FdFunctionEntity,{className:"h-6 w-6"});case J.ESubPermissionType.DS_METHOD:return C.jsx(ye.FdFunctionDatastore,{className:"h-6 w-6"});case J.ESubPermissionType.DATACLASS_METHOD:return C.jsx(ye.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"})}},XM=({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 vQ(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(Te.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 gQ(e){return C.jsx(Te.Checkbox,{icon:C.jsx(vQ,{}),...e})}const eo=({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(Te.Checkbox,{isChecked:c.checked,onChange:()=>r&&r(c),isInvalid:u===!1}):C.jsx(gQ,{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(dc,{openDelay:0,closeDelay:0,children:[C.jsx(hc,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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},d))})]})]}):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(dc,{openDelay:0,closeDelay:0,children:[C.jsx(hc,{children:C.jsx(ye.FdCrown,{className:"h-3 w-3 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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},d))]})]})})})})]})]})]}):null},mQ=({privilegeId:e,privileges:t})=>{const r=J.useAppSelector(J.selectCatalogMethods),n=J.useAppSelector(J.selectDataclasses),i=J.useAppSelector(J.selectSingletons),o=J.useAppDispatch(),[a,u]=T.useState([]),[c,d]=T.useState("");T.useEffect(()=>{d("")},[e]);const{isOpen:f,getMenuProps:h,getInputProps:p,getComboboxProps:v,highlightedIndex:m,getItemProps:y,selectedItem:x,openMenu:b}=oo({onInputValueChange(){u([])},items:[],itemToString(R){return R?R.applyTo:""},defaultHighlightedIndex:0,stateReducer:(R,I)=>{const{changes:N,type:A}=I;switch(A){case oo.stateChangeTypes.InputKeyDownArrowDown:return{...N,isOpen:!0,highlightedIndex:R.highlightedIndex<=a.length?R.highlightedIndex+1:0};case oo.stateChangeTypes.InputKeyDownArrowUp:return{...N,isOpen:!0,highlightedIndex:R.highlightedIndex>=0?R.highlightedIndex-1:a.length};case oo.stateChangeTypes.InputKeyDownEnter:{const L=a[R.highlightedIndex];if(!L)return N;const B=J.addPermission(e,L,t);return o(J.updatePrivileges(B)),{...N,isOpen:!0,highlightedIndex:0}}}return N}});T.useEffect(()=>{const R=J.getInheritedResources(e,t).map(({resource:N,type:A,subType:L})=>({applyTo:N,type:A,subType:L})),I=Lx(c.toLowerCase(),r,Object.values(n),Object.values(i));u(I.filter(({applyTo:N,type:A,subType:L})=>!cc.find(R,{applyTo:N,type:A,subType:L})))},[c,e,t,r,n,i]);const w=h({},{suppressRefError:!0}),E=T.useRef(null),_=T.useRef(null),S=kX({count:a.length,getScrollElement:()=>_.current,estimateSize:()=>32,overscan:5});return T.useEffect(()=>{m!==-1&&S.scrollToIndex(m)},[m,S]),T.useEffect(()=>{f&&E.current&&E.current.focus()},[f]),C.jsxs("div",{className:"relative w-56 text-white group",...v(),children:[C.jsx("div",{...v(),children:C.jsx("input",{...p({},{suppressRefError:!0}),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:c,onChange:({target:{value:R}})=>d(R),onFocus:()=>{b()}})}),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:R=>R.preventDefault(),onClick:()=>b()})}),f&&C.jsx("ul",{...w,ref:_,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:C.jsx("li",{style:{height:`${S.getTotalSize()}px`,width:"100%",position:"relative"},children:S.getVirtualItems().map(R=>{const I=a[R.index];return C.jsxs("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${R.size}px`,transform:`translateY(${R.start}px)`},className:Ve(x===I&&"font-bold","flex min-w-fit cursor-pointer items-center space-x-2 px-3 py-2 text-xs shadow-sm",{"bg-primary-hover":m===R.index,"font-bold":x===I}),...y({item:I,index:R.index}),onClick:()=>{const N=J.addPermission(e,I,t);o(J.updatePrivileges(N))},children:[nL(I.type),C.jsx("span",{children:I.applyTo})]},R.key)})})})]})};function yQ(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 bQ=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n})=>{const[i,o]=T.useState(null),[a,u]=T.useState(null),{styles:c,attributes:d}=vc(i,a,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),[f,h]=T.useState([]),[p,v]=T.useState(""),m=J.useAppDispatch(),{id:y}=e,x=T.useMemo(()=>J.getInheritedResources(y,n),[y,n[y].includes,n[y].resources]),b=T.useMemo(()=>J.getPromotions(y,n),[n[y]]),w={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},E=Object.values(w).flat(),_=($,k)=>k.length>0&&k.every(z=>$.includes(z)),S=($,k)=>k.some(z=>$.includes(z)),R=($,k)=>Array.from(new Set([...$,...k])),I=($,k)=>$.filter(z=>!k.includes(z)),N=$=>{h([...$])},A=$=>{h(k=>_(k,$)?I(k,$):R(k,$))},L=$=>{A(w[$])},B=_(f,E),U=f.length>0&&!B,j=_(f,w.functions),D=!j&&S(f,w.functions),G=()=>N(E),F=()=>N([]),X=async $=>{const{confirmed:k}=await m(J.openModal({title:"Delete Permission",type:Te.ModalType.CONFIRM,color:Te.ModalColor.DANGER,message:"Are you sure you want to remove this Permission?",icon:"FdWarningDanger"})).unwrap();if(k){const z=J.removePermission(e.id,$,n);m(J.updatePrivileges(z))}},Z=async()=>{const{confirmed:$}=await m(J.openModal({title:"Reset Permissions",type:Te.ModalType.CONFIRM,color:Te.ModalColor.DANGER,message:"Are you sure you want to reset permissions for this Privilege?",icon:"FdWarningDanger"})).unwrap();if($){const k=J.resetResources(e.id,n);m(J.updatePrivileges(k))}},V=(f.length>0?x.filter($=>f.includes($.type)):x).filter(({resource:$})=>p?new RegExp(cc.escapeRegExp(p),"i").test($):!0),ee=yQ(V),oe=ee.filter($=>{const k=$.permissions.every(z=>!z.checked)&&$.permissions.some(z=>z.from.length>0);return r||!k}),ae=($,k)=>{const z=J.togglePermission(e.id,$,k,n);m(J.updatePrivileges(z))},H=T.useMemo(()=>oe.some($=>$.exists===!1),[oe]),K=async()=>{const{confirmed:$}=await m(J.openModal({title:"Delete Privilege",type:Te.ModalType.CONFIRM,color:Te.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(),k=Object.entries(n).map(([z,re])=>{const ie=re.resources.filter(se=>!se.exists);return{[z]:ie.map(se=>({applyTo:se.resource,type:se.type}))}}).reduce((z,re)=>({...z,...re}),{});if($){const z=J.removeMultiplePermissions(k,n);m(J.updatePrivileges(z))}};return C.jsxs(sl,{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 border-collapse",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(_r.Popover,{className:"flex items-center",children:({open:$})=>C.jsxs(C.Fragment,{children:[C.jsx(_r.Popover.Button,{ref:o,children:C.jsx(ye.FdAdjust,{className:"h-4 w-4"})}),$&&C.jsx(Kc,{children:C.jsxs(_r.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.jsxs("label",{className:"mb-2 flex cursor-pointer items-center",children:[C.jsx(Te.Checkbox,{isChecked:B,isIndeterminate:U,onChange:()=>B?F():G()}),C.jsx("h5",{className:"text-sm font-semibold",children:"Filter"})]}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:_(f,w.dataclass),onChange:()=>L("dataclass"),label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:_(f,w.singleton),onChange:()=>L("singleton"),label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:j,isIndeterminate:D,onChange:()=>L("functions"),label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:_(f,w.attribute),onChange:()=>L("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:$=>v($.target.value)})]}),C.jsx(mQ,{privilegeId:y,privileges:n}),C.jsx("div",{children:C.jsxs(dc,{openDelay:0,closeDelay:0,children:[C.jsx(hc,{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:Z,children:C.jsx(ye.FdReload,{})})}),C.jsx(Lr,{container:Bt(),children:C.jsxs(Br,{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(dc,{openDelay:0,closeDelay:0,children:[C.jsx(hc,{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:K,disabled:!H,children:C.jsx(ye.FdClean,{className:"h-4 w-4"})})}),C.jsx(Lr,{container:Bt(),children:C.jsxs(Br,{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"})]})}),oe.length?C.jsx("tbody",{children:oe.map(($,k)=>{const z=$.permissions.some(re=>re.from.length>0);return C.jsxs("tr",{className:Ve("group even:bg-grey-600 hover:bg-grey-300",{"opacity-60":$.exists===!1}),children:[C.jsxs("td",{className:Ve("group flex items-center gap-3 py-2 text-xs",$.exists===!1?"text-negative-400":"text-white",{"border-b-[0.5px] border-grey-300":!1}),children:[nL($.type),$.resource,C.jsx(Te.Tooltip,{placement:"top",label:"Remove Permission",isDisabled:z,container:Bt(),children:C.jsx("button",{onClick:()=>{z?Te.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** Inherited permissions can't be removed",customIcon:ye.FdInfoBold}):X({applyTo:$.resource,type:$.type})},className:Ve("flex flex-shrink-0 items-center justify-center rounded p-1 opacity-0 group-hover:opacity-100",z?"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",children:C.jsx(eo,{permissions:$.permissions,showIncluded:r,label:"read",onToggle:re=>ae($,re),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(eo,{permissions:$.permissions,showIncluded:r,label:"create",onToggle:re=>ae($,re),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(eo,{permissions:$.permissions,showIncluded:r,label:"update",onToggle:re=>ae($,re),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(eo,{permissions:$.permissions,showIncluded:r,label:"drop",onToggle:re=>ae($,re),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(eo,{promoted:b[$.resource],permissions:$.permissions,showIncluded:r,label:"execute",onToggle:re=>ae($,re),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(eo,{permissions:$.permissions,showIncluded:r,label:"promote",onToggle:re=>ae($,re),onSelect:t,privileges:n,exists:$.exists})})]},`${$.resource}-${k}`)})}):null]}),!ee.length&&p?C.jsx(XM,{children:"The Permission you're looking for can't be found "}):null,!ee.length&&!p?C.jsxs(XM,{children:["This Privilege has no Permissions configured yet ",C.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},xQ=({onCreate:e})=>{const t=J.useAppSelector(J.selectPrivileges),r=J.useAppDispatch(),[n,i]=T.useState(null),[o,a]=T.useState(null),[u,c]=T.useState(""),[d,f]=T.useState(null),{styles:h,attributes:p}=vc(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});return T.useEffect(()=>{c(""),f(null)},[o]),C.jsx(_r.Popover,{children:({open:v,close:m})=>C.jsxs(C.Fragment,{children:[C.jsx(_r.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(Kc,{children:C.jsxs(_r.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 x=J.create(u,t),b=r(J.updatePrivileges(x)),w=Object.values(b.payload).find(E=>E.privilege===u);w&&(e(w),m())}catch(x){f(x.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=J.create(u,t),x=r(J.updatePrivileges(y)),b=Object.values(x.payload).find(w=>w.privilege===u);b&&e(b),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"})]})]})})]})})},wQ=()=>{const e=J.useAppSelector(J.selectCatalog),t=J.useAppSelector(J.selectPrivileges),r=T.useMemo(()=>{if(e===null)return t;const c=W2(t,Object.values((e==null?void 0:e.dataClasses)??{}));return V2(c,e)},[t,e]),[n,i]=T.useState(null),o=T.useMemo(()=>Object.keys(r),[r]);T.useEffect(()=>{n&&r[n.id]||!o.length||i(r[o[0]])},[r]),T.useEffect(()=>{o.length<2&&u(!0)},[o.length]);const[a,u]=T.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(xQ,{onCreate:c=>{i(c)}})]}),C.jsx(OX,{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(I9,{privileges:r,selectedPrivilege:n,onSelect:c=>i(t[c]),setShowIncluded:u,showIncluded:a}):null,C.jsx(bQ,{privileges:r,selectedPrivilege:n,onSelect:c=>i(t[c]),showIncluded:a})]}),C.jsx(_Q,{privileges:r,selectedPrivilege:n,setSelectedPrivilege:i})]}):C.jsx(ND,{tab:"Privilege"})]})},_Q=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=T.useState(!1);return C.jsx(Te.Panel,{path:Te.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(O9,{dict:e,data:J.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})};var Eb={},ca={},Cu={},ZM;function iL(){if(ZM)return Cu;ZM=1,Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.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 Cu}var to={},la={},fa={},JM;function EQ(){if(JM)return fa;JM=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.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 fa.default=e,fa}var QM;function ul(){if(QM)return la;QM=1,Object.defineProperty(la,"__esModule",{value:!0}),la.default=void 0;var e=t(EQ());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 la.default=n,la}var eD;function cl(){if(eD)return to;eD=1,Object.defineProperty(to,"__esModule",{value:!0}),to.default=void 0,to.unsafeStringify=n;var e=t(ul());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 to.default=o,to}var tD;function SQ(){if(tD)return ca;tD=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.default=void 0;var e=r(iL()),t=cl();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 S=d.random||(d.rng||e.default)();m==null&&(m=n=[S[0]|1,S[1],S[2],S[3],S[4],S[5]]),y==null&&(y=i=(S[6]<<8|S[7])&16383)}let x=d.msecs!==void 0?d.msecs:Date.now(),b=d.nsecs!==void 0?d.nsecs:a+1;const w=x-o+(b-a)/1e4;if(w<0&&d.clockseq===void 0&&(y=y+1&16383),(w<0||x>o)&&d.nsecs===void 0&&(b=0),b>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=x,a=b,i=y,x+=122192928e5;const E=((x&268435455)*1e4+b)%4294967296;v[p++]=E>>>24&255,v[p++]=E>>>16&255,v[p++]=E>>>8&255,v[p++]=E&255;const _=x/4294967296*1e4&268435455;v[p++]=_>>>8&255,v[p++]=_&255,v[p++]=_>>>24&15|16,v[p++]=_>>>16&255,v[p++]=y>>>8|128,v[p++]=y&255;for(let S=0;S<6;++S)v[p+S]=m[S];return f||(0,t.unsafeStringify)(v)}var c=u;return ca.default=c,ca}var da={},Ln={},ha={},rD;function oL(){if(rD)return ha;rD=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.default=void 0;var e=t(ul());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 ha.default=n,ha}var nD;function aL(){if(nD)return Ln;nD=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.URL=Ln.DNS=void 0,Ln.default=a;var e=cl(),t=r(oL());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";Ln.DNS=i;const o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Ln.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 x=new Uint8Array(16+h.length);if(x.set(p),x.set(h,p.length),x=d(x),x[6]=x[6]&15|c,x[8]=x[8]&63|128,v){m=m||0;for(let b=0;b<16;++b)v[m+b]=x[b];return v}return(0,e.unsafeStringify)(x)}try{f.name=u}catch{}return f.DNS=i,f.URL=o,f}return Ln}var pa={},iD;function OQ(){if(iD)return pa;iD=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.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,x="0123456789abcdef";for(let b=0;b<y;b+=8){const w=v[b>>5]>>>b%32&255,E=parseInt(x.charAt(w>>>4&15)+x.charAt(w&15),16);m.push(E)}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,x=-271733879,b=-1732584194,w=271733878;for(let E=0;E<v.length;E+=16){const _=y,S=x,R=b,I=w;y=c(y,x,b,w,v[E],7,-680876936),w=c(w,y,x,b,v[E+1],12,-389564586),b=c(b,w,y,x,v[E+2],17,606105819),x=c(x,b,w,y,v[E+3],22,-1044525330),y=c(y,x,b,w,v[E+4],7,-176418897),w=c(w,y,x,b,v[E+5],12,1200080426),b=c(b,w,y,x,v[E+6],17,-1473231341),x=c(x,b,w,y,v[E+7],22,-45705983),y=c(y,x,b,w,v[E+8],7,1770035416),w=c(w,y,x,b,v[E+9],12,-1958414417),b=c(b,w,y,x,v[E+10],17,-42063),x=c(x,b,w,y,v[E+11],22,-1990404162),y=c(y,x,b,w,v[E+12],7,1804603682),w=c(w,y,x,b,v[E+13],12,-40341101),b=c(b,w,y,x,v[E+14],17,-1502002290),x=c(x,b,w,y,v[E+15],22,1236535329),y=d(y,x,b,w,v[E+1],5,-165796510),w=d(w,y,x,b,v[E+6],9,-1069501632),b=d(b,w,y,x,v[E+11],14,643717713),x=d(x,b,w,y,v[E],20,-373897302),y=d(y,x,b,w,v[E+5],5,-701558691),w=d(w,y,x,b,v[E+10],9,38016083),b=d(b,w,y,x,v[E+15],14,-660478335),x=d(x,b,w,y,v[E+4],20,-405537848),y=d(y,x,b,w,v[E+9],5,568446438),w=d(w,y,x,b,v[E+14],9,-1019803690),b=d(b,w,y,x,v[E+3],14,-187363961),x=d(x,b,w,y,v[E+8],20,1163531501),y=d(y,x,b,w,v[E+13],5,-1444681467),w=d(w,y,x,b,v[E+2],9,-51403784),b=d(b,w,y,x,v[E+7],14,1735328473),x=d(x,b,w,y,v[E+12],20,-1926607734),y=f(y,x,b,w,v[E+5],4,-378558),w=f(w,y,x,b,v[E+8],11,-2022574463),b=f(b,w,y,x,v[E+11],16,1839030562),x=f(x,b,w,y,v[E+14],23,-35309556),y=f(y,x,b,w,v[E+1],4,-1530992060),w=f(w,y,x,b,v[E+4],11,1272893353),b=f(b,w,y,x,v[E+7],16,-155497632),x=f(x,b,w,y,v[E+10],23,-1094730640),y=f(y,x,b,w,v[E+13],4,681279174),w=f(w,y,x,b,v[E],11,-358537222),b=f(b,w,y,x,v[E+3],16,-722521979),x=f(x,b,w,y,v[E+6],23,76029189),y=f(y,x,b,w,v[E+9],4,-640364487),w=f(w,y,x,b,v[E+12],11,-421815835),b=f(b,w,y,x,v[E+15],16,530742520),x=f(x,b,w,y,v[E+2],23,-995338651),y=h(y,x,b,w,v[E],6,-198630844),w=h(w,y,x,b,v[E+7],10,1126891415),b=h(b,w,y,x,v[E+14],15,-1416354905),x=h(x,b,w,y,v[E+5],21,-57434055),y=h(y,x,b,w,v[E+12],6,1700485571),w=h(w,y,x,b,v[E+3],10,-1894986606),b=h(b,w,y,x,v[E+10],15,-1051523),x=h(x,b,w,y,v[E+1],21,-2054922799),y=h(y,x,b,w,v[E+8],6,1873313359),w=h(w,y,x,b,v[E+15],10,-30611744),b=h(b,w,y,x,v[E+6],15,-1560198380),x=h(x,b,w,y,v[E+13],21,1309151649),y=h(y,x,b,w,v[E+4],6,-145523070),w=h(w,y,x,b,v[E+11],10,-1120210379),b=h(b,w,y,x,v[E+2],15,718787259),x=h(x,b,w,y,v[E+9],21,-343485551),y=o(y,_),x=o(x,S),b=o(b,R),w=o(w,I)}return[y,x,b,w]}function i(v){if(v.length===0)return[];const m=v.length*8,y=new Uint32Array(r(m));for(let x=0;x<m;x+=8)y[x>>5]|=(v[x/8]&255)<<x%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,x,b,w){return o(a(o(o(m,v),o(x,w)),b),y)}function c(v,m,y,x,b,w,E){return u(m&y|~m&x,v,m,b,w,E)}function d(v,m,y,x,b,w,E){return u(m&x|y&~x,v,m,b,w,E)}function f(v,m,y,x,b,w,E){return u(m^y^x,v,m,b,w,E)}function h(v,m,y,x,b,w,E){return u(y^(m|~x),v,m,b,w,E)}var p=e;return pa.default=p,pa}var oD;function CQ(){if(oD)return da;oD=1,Object.defineProperty(da,"__esModule",{value:!0}),da.default=void 0;var e=r(aL()),t=r(OQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return da.default=i,da}var va={},ga={},aD;function RQ(){if(aD)return ga;aD=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return ga.default=t,ga}var sD;function IQ(){if(sD)return va;sD=1,Object.defineProperty(va,"__esModule",{value:!0}),va.default=void 0;var e=n(RQ()),t=n(iL()),r=cl();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 va.default=o,va}var ma={},ya={},uD;function PQ(){if(uD)return ya;uD=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.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 b=0;b<16;++b)h[b]=d[f][b];for(let b=16;b<80;++b)h[b]=t(h[b-3]^h[b-8]^h[b-14]^h[b-16],1);let p=a[0],v=a[1],m=a[2],y=a[3],x=a[4];for(let b=0;b<80;++b){const w=Math.floor(b/20),E=t(p,5)+e(w,v,m,y)+x+o[w]+h[b]>>>0;x=y,y=m,m=t(v,30)>>>0,v=p,p=E}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]+x>>>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 ya.default=n,ya}var cD;function NQ(){if(cD)return ma;cD=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.default=void 0;var e=r(aL()),t=r(PQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return ma.default=i,ma}var ba={},lD;function TQ(){if(lD)return ba;lD=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.default=void 0;var e="00000000-0000-0000-0000-000000000000";return ba.default=e,ba}var xa={},fD;function AQ(){if(fD)return xa;fD=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.default=void 0;var e=t(ul());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 xa.default=n,xa}var dD;function MQ(){return dD||(dD=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(SQ()),r=f(CQ()),n=f(IQ()),i=f(NQ()),o=f(TQ()),a=f(AQ()),u=f(ul()),c=f(cl()),d=f(oL());function f(h){return h&&h.__esModule?h:{default:h}}})(Eb)),Eb}var Sb,hD;function DQ(){if(hD)return Sb;hD=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},Sb=e,Sb}var Ob,pD;function jQ(){if(pD)return Ob;pD=1;var e=DQ();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",Ob=t,Ob}var Cb,vD;function qQ(){if(vD)return Cb;vD=1;const{v4:e,validate:t}=MQ(),r=jQ(),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 Cb=(()=>{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]},x=r(r.HEX,p),b=r(p,r.HEX),w=()=>a(e(),x,y),_={alphabet:p,fromUUID:S=>a(S,x,y),maxLength:m,generate:w,new:w,toUUID:S=>u(S,b),uuid:e,validate:(S,R=!1)=>{if(!S||typeof S!="string")return!1;const I=v.consistentLength?S.length===m:S.length<=m,N=S.split("").every(A=>p.includes(A));return R===!1?I&&N:I&&N&&t(u(S,b))}};return Object.freeze(_),_};return d.constants=n,d.uuid=e,d.generate=()=>(o||(o=d(n.flickrBase58).generate),o()),d})(),Cb}var kQ=qQ();const LQ=({role:e})=>{var R;const[t,r]=T.useState(e),[n,i]=T.useState(e.role),[o,a]=T.useState(null),u=J.useAppSelector(J.selectPrivileges),c=((R=t.privileges)==null?void 0:R.filter(I=>u[I]&&u[I].privilege!=="guest").length)||0,d=J.useAppSelector(J.selectRoles),f=J.useAppDispatch(),{selectedRole:h,selectRole:p}=tx(),[v,m]=T.useState(!1),y=Te.useOutsideClick(()=>{v&&b()});Te.useDidMountEffect(()=>{n!==e.role&&i(e.role)},[e.role]),T.useEffect(()=>{e.role||m(!0)},[]),T.useEffect(()=>{r(e)},[e]);const x=()=>{a(null),m(!0)},b=()=>{a(null),e.role&&e.role===n&&m(!1);try{const I=J.saveRole({...t,role:n},d);f(J.updateRoles(I)),m(!1)}catch(I){a(I.message)}},w=J.useAppDispatch(),E=async I=>{I.stopPropagation();const{confirmed:N}=await w(J.openModal({title:"Delete Role",type:Te.ModalType.CONFIRM,color:Te.ModalColor.DANGER,message:"Are you sure you want to remove this Role?",icon:"FdWarningDanger"})).unwrap();N&&_()},_=()=>{const I=J.removeRole(t.id,d),N=Object.keys(I);if(h!==t.id){f(J.updateRoles(I));return}if(N.length===0)p(null);else{const A=Object.keys(d),L=A.indexOf(t.id),B=Math.max(0,L-1),U=A[B];L===0?p(N[0]):I[U]?p(U):p(N[0])}f(J.updateRoles(I))},S=(I=null)=>{if(I&&I.stopPropagation(),!e.role){_();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 mr-2",children:[C.jsx("input",{type:"text",value:n,onChange:({target:{value:I}})=>{i(I)},onKeyDown:I=>{I.key==="Enter"&&b(),I.key==="Escape"&&S()},className:Ve("absolute inset-0 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:outline-none",{"border-b border-red-400 rounded-b-none":o,"focus:border-primary-dark":!o}),placeholder:"role",autoComplete:"off",autoFocus:!0}),o&&C.jsx("p",{className:"absolute top-5 mt-1 w-full rounded rounded-t-none 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:b,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:S,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:x,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:I=>E(I),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":""]})]})})},sL=(e,t)=>e?t[e]:null,gD=(e,t,r)=>{const n=sL(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},BQ=()=>{const e=J.useAppSelector(J.selectPrivileges),t=J.useAppSelector(J.selectRoles),r=J.useAppDispatch(),{selectedRole:n}=tx(),i=sL(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=gD(i.id,a.id,t);r(J.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=gD(i.id,a.id,t);r(J.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))]})]})},FQ=({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})]})})}),Jb=(e,t,r,n=!1)=>{const i=e.applyTo,o=e.type===J.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=Jb(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))&&![J.EPermissionType.DATASTORE,J.EPermissionType.SINGLETON].includes(e.type)){const h={applyTo:o,type:e.type===J.EPermissionType.DATACLASS?J.EPermissionType.DATASTORE:e.type===J.EPermissionType.SINGLETON_METHOD?J.EPermissionType.SINGLETON:J.EPermissionType.DATACLASS},p=Jb(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}},$Q=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"})}},wa=Yx,_a=Xx,po=({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=T.useMemo(()=>Jb(t,e.otherPrivs,e.rolePrivs,d),[e,t,d]);return C.jsxs("tr",{className:Ve("group even:bg-grey-600 hover:bg-grey-300",o),children:[C.jsxs("td",{className:Ve("flex h-full w-full items-stretch p-0 text-xs group-hover:rounded-l",{"px-1":a}),children:[Array(n).fill("").map((m,y)=>C.jsx("div",{className:Ve("ml-1.5 mr-1 w-[2px] bg-grey-100",{"mr-0.5":i})},y)),C.jsxs("div",{className:"flex items-center gap-3 py-2",children:[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"})}),$Q(t.type),a?t.applyTo:p||h]})]}),C.jsx("td",{className:"py-2 text-center",children:[J.EPermissionType.ATTRIBUTE,J.EPermissionType.DATASTORE,J.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(wa,{openDelay:0,closeDelay:0,children:[C.jsx(_a,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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",children:[J.EPermissionType.ATTRIBUTE,J.EPermissionType.DATASTORE,J.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(wa,{openDelay:0,closeDelay:0,children:[C.jsx(_a,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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",children:[J.EPermissionType.ATTRIBUTE,J.EPermissionType.DATASTORE,J.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(wa,{openDelay:0,closeDelay:0,children:[C.jsx(_a,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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",children:[J.EPermissionType.ATTRIBUTE,J.EPermissionType.DATASTORE,J.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(wa,{openDelay:0,closeDelay:0,children:[C.jsx(_a,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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",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(wa,{openDelay:0,closeDelay:0,children:[C.jsx(_a,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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})})})]}):""})]})})]})},mD=({depth:e,permission:t,privileges:r,childCollapsed:n,didChildCollapsed:i,toastMessageCallback:o})=>{const[a,u]=T.useState(n),c=J.useAppSelector(J.selectRestrictedByDefault),d=J.useAppSelector(J.selectPrivileges);return T.useEffect(()=>{n===!0&&u(!0)},[n]),C.jsxs(C.Fragment,{children:[C.jsx(po,{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(po,{privileges:r,permission:f,depth:e+1,isRestrictedByDefault:c,allPrivileges:d,toastMessageCallback:o},`${f.type}-${h}`)),t.methods.map((f,h)=>C.jsx(po,{privileges:r,permission:f,depth:e+1,isRestrictedByDefault:c,allPrivileges:d,toastMessageCallback:o},`${f.type}-${h}`))]})]})},zQ=({selectedRole:e})=>{const[t,r]=T.useState(null),[n,i]=T.useState(null),{styles:o,attributes:a}=vc(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),u=J.useAppSelector(J.selectRestrictedByDefault),c=J.useAppSelector(J.selectPrivileges),[d,f]=T.useState([]),[h,p]=T.useState(""),v=J.useAppSelector(J.selectCatalogMethods),m=J.useAppSelector(J.selectDataclasses),y=J.useAppSelector(J.selectSingletons),[x,b]=T.useState({}),[w,E]=T.useState([]);T.useEffect(()=>{const k=R9(v,Object.values(m),Object.values(y));b(k)},[e,v,m,y]);function _(k){const z=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"];return k.sort((re,ie)=>{const se=z.indexOf(re.type),ce=z.indexOf(ie.type);return se!==ce?se-ce:re.applyTo.toLowerCase()>ie.applyTo.toLowerCase()?1:-1})}T.useEffect(()=>{E(_(Lx(h,v,Object.values(m),Object.values(y)).filter(k=>d.length?d.includes(k.type):!0)))},[d,h,v,m,y]);const[S,R]=T.useState(!1),I={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},N=Object.values(I).flat(),A=(k,z)=>z.length>0&&z.every(re=>k.includes(re)),L=(k,z)=>Array.from(new Set([...k,...z])),B=(k,z)=>k.filter(re=>!z.includes(re)),U=k=>f([...k]),j=k=>{f(z=>A(z,k)?B(z,k):L(z,k))},D=k=>j(I[k]),G=N.every(k=>d.includes(k)),F=d.length>0&&!G,X=A(d,I.functions),Z=()=>U(N),Q=()=>U([]),V=J.useAppSelector(J.selectRoles),ee={toggleAllCollapsed:k=>{k.allCollapsed=!k.allCollapsed},toggleChildCollapsed:k=>{k.childCollapsed=!k.childCollapsed},setAllCollapsed:(k,z)=>{k.allCollapsed=z},setChildCollapsed:(k,z)=>{k.childCollapsed=z}},oe=T.useMemo(()=>{const k=Object.values(c).find(ce=>ce.privilege==="guest"),z=V[e],re=z?Object.fromEntries(z.privileges.map(ce=>[ce,c[ce]]).filter(([,ce])=>!!ce)):{};if(u)return{rolePrivs:re,otherPrivs:k?{[k.id]:k}:{}};const ie=k?{[k.id]:{...k,active:!0}}:{},se=Object.fromEntries(Object.entries(c).filter(([ce])=>ce!==(k==null?void 0:k.id)&&!(z!=null&&z.privileges.includes(ce))).map(([ce,be])=>[ce,{...be,active:!1}]));return{rolePrivs:re,otherPrivs:{...ie,...se}}},[c,V,e,u]),{state:{allCollapsed:ae,childCollapsed:H},dispatch:K}=Te.useEnhancedState({allCollapsed:!1,childCollapsed:!1},ee,"Table Collapse Store"),$=()=>{Te.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** You can add or modify permissions only in the Privilege section.",customIcon:ye.FdInfoCircle})};return C.jsxs(sl,{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 border-collapse",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(Te.Tooltip,{label:"Collapse All",placement:"top",container:Bt(),children:C.jsx("button",{onClick:()=>{H?(K.setAllCollapsed(!0),R(!0)):K.setChildCollapsed(!0)},className:Ve("cursor-pointer rounded-md p-1 hover:bg-primary-hover focus:outline-none",{"pointer-events-none text-grey-200":ae,"text-white":!ae}),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(_r.Popover,{className:"flex items-center",children:({open:k})=>C.jsxs(C.Fragment,{children:[C.jsx(_r.Popover.Button,{ref:r,children:C.jsx(ye.FdAdjust,{className:"h-4 w-4"})}),k&&C.jsx(Kc,{children:C.jsxs(_r.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.jsxs("label",{className:"mb-2 flex cursor-pointer items-center",children:[C.jsx(Te.Checkbox,{isChecked:G,isIndeterminate:F,onChange:()=>G?Q():Z()}),C.jsx("h5",{className:"text-sm font-semibold",children:"Filter"})]}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:A(d,I.datastore),onChange:()=>D("datastore"),label:"Datastore"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:A(d,I.dataclass),onChange:()=>D("dataclass"),label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:A(d,I.singleton),onChange:()=>D("singleton"),label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:X,onChange:()=>D("functions"),label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:A(d,I.attribute),onChange:()=>D("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:k=>{p(k.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((k,z)=>C.jsx(po,{privileges:oe,permission:k,depth:0,inSearch:!0,isRestrictedByDefault:u,allPrivileges:c,toastMessageCallback:$},`${k.type}-${z}`)):Object.values(x).map((k,z)=>C.jsxs(T.Fragment,{children:[C.jsx(po,{privileges:oe,permission:k,isRestrictedByDefault:u,allPrivileges:c,hasChild:!0,depth:0,toggleCollapse:()=>{const re=!S;R(re),K.setAllCollapsed(!re&&ae?!1:ae)},collapsed:S,toastMessageCallback:$}),k.type==="datastore"&&!S?C.jsxs(C.Fragment,{children:[k.methods.map((re,ie)=>C.jsx(po,{privileges:oe,isRestrictedByDefault:u,allPrivileges:c,permission:re,depth:1,collapsed:ae||!1,toastMessageCallback:$},`${re.type}-${ie}`)),k.dataClasses.map((re,ie)=>C.jsx(mD,{depth:1,privileges:oe,permission:re,childCollapsed:H,didChildCollapsed:se=>{K.setChildCollapsed(se?H:!1)},toastMessageCallback:$},`${re.type}-${ie}`))]}):null,k.singletons.map((re,ie)=>C.jsx(mD,{depth:0,privileges:oe,permission:re,childCollapsed:ae,didChildCollapsed:se=>{K.setAllCollapsed(se?ae:!1)},toastMessageCallback:$},`${re.type}-${ie}`))]},`${k.type}-${z}`))})]}),(h||d.length)&&!w.length?C.jsx(FQ,{children:"The Permission you're looking for can't be found "}):null]})},HQ=()=>{const e=J.useAppSelector(J.selectRoles),t=J.useAppDispatch(),[r,n]=T.useState(null),[i,o]=T.useState(null),[a,u]=T.useState(""),[c,d]=T.useState(null),{styles:f,attributes:h}=vc(r,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});T.useEffect(()=>{u(""),d(null)},[i]);const p=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(e).find(x=>x.role.toLowerCase()===a.toLowerCase()))throw new Error(`A role with the name ${a} already exists`);const m=kQ.generate(),y=J.createRole(m,a,e);t(J.updateRoles(y))};return C.jsx(_r.Popover,{children:({open:v,close:m})=>{const y=()=>{d(null);try{Te.validateName(a),p(),m()}catch(x){d(x.message)}};return C.jsxs(C.Fragment,{children:[C.jsx(_r.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(Kc,{children:C.jsxs(_r.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:x=>u(x.target.value),onKeyDown:x=>{x.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"})]})]})})]})}})},UQ=()=>{const e=J.useAppSelector(J.selectRoles),{selectedRole:t}=tx();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(HQ,{})]}),C.jsx("div",{className:"flex-1 space-y-4 overflow-auto p-4 pb-10 pt-1",children:Object.values(e).length>0?Object.values(e).sort((r,n)=>Te.localeCompare(r.role,n.role)).map((r,n)=>C.jsx(LQ,{role:r},n)):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 roles"}),C.jsxs("div",{className:"flex items-center text-sm",children:["Create a new role by clicking on the"," ",C.jsx(ye.FdPlus,{className:"ml-2 inline h-4 w-4 text-white"})]})]})})})})]}),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(BQ,{}),C.jsx(zQ,{selectedRole:t})]}):C.jsx(ND,{tab:"Role"})})})]})},uL=()=>{const e=J.useAppSelector(J.selectQodly),t=J.useAppSelector(J.selectSelectedTab),r=J.useAppSelector(J.selectForceLogin),n=J.useAppSelector(J.selectRestrictedByDefault),i=T.useRef(),o=J.useAppDispatch();return 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(uH,{activeTab:t,forceLogin:r,restrictedByDefault:n,onTabChange:a=>{o(J.toggleTab(a))},onForceLoginChange:a=>{o(J.toggleForceLogin(a))},onRestrictedByDefaultChange:a=>{o(J.toggleRestrictedByDefault(a))},qodly:e}),t==="roles"?C.jsx(cH,{children:C.jsx(UQ,{})}):C.jsx(wQ,{})]})})})},WQ=()=>{const e=J.useAppSelector(J.selectModals),t=J.useAppDispatch();return C.jsx(C.Fragment,{children:e.map((r,n)=>C.jsx(Te.Modal,{hasOverlay:n===0,...r,onClose:i=>t(J.closeModal(i)),onEdit:i=>t(J.editModal(i)),container:Bt()},r.id))})},VQ=({initialValue:e,onChange:t,...r})=>{const n=J.useAppSelector(J.selectRolesFlags),i=J.useAppSelector(J.selectRolesAndPrivileges,(a,u)=>cc.isEqual(a,u)),o=J.useAppDispatch();return T.useEffect(()=>{if(e)try{const a=JSON.parse(e);if(cc.isEqual(a,i))return;o(J.setRolesContent({content:a,flags:{touched:!1}}))}catch(a){console.error("[Roles Editor Standalone] Error while parsing the initial value:",a)}},[e]),Te.useDidMountEffect(()=>{if(n.touched&&t)try{const a=JSON.stringify(i,null,2);t(a)}catch(a){console.error("[Roles Editor Standalone] Error on value stringify:",a)}},[i]),C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"relative z-10 overflow-hidden",style:{height:"100vh"},children:C.jsx(uL,{...r})}),C.jsx(WQ,{})]})},GQ=e=>C.jsx(J.ReduxProvider,{store:J.getStore(),children:C.jsx(Te.TipsProvider,{children:C.jsx(VQ,{...e})})});exports.ROLES_EDITOR_SCOPE_CLASS=yD.ROLES_EDITOR_SCOPE_CLASS;exports.Roles=uL;exports.Standalone=GQ;
|
|
74
|
+
`),T.useEffect(function(){return f=i.ref||f,h.current&&(d=new pl(h.current,Pu(Pu(Pu(Pu({},wQ(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)}},[]),T.createElement(l,vl({ref:h,"data-simplebar":!0},m),T.createElement("div",{className:"simplebar-wrapper"},T.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},T.createElement("div",{className:"simplebar-height-auto-observer"})),T.createElement("div",{className:"simplebar-mask"},T.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:f,contentNodeRef:p}):T.createElement("div",vl({},i,{className:"simplebar-content-wrapper".concat(i.className?" ".concat(i.className):"")}),T.createElement("div",{className:"simplebar-content"},r)))),T.createElement("div",{className:"simplebar-placeholder"})),T.createElement("div",{className:"simplebar-track simplebar-horizontal"},T.createElement("div",{className:"simplebar-scrollbar"})),T.createElement("div",{className:"simplebar-track simplebar-vertical"},T.createElement("div",{className:"simplebar-scrollbar"})))});dc.displayName="SimpleBar";dc.propTypes={children:he.oneOfType([he.node,he.func]),scrollableNodeProps:he.object,tag:he.string};const gl=Qx,ml=ew,fL=e=>{switch(e){case Q.EPermissionType.DATACLASS:return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"});case Q.EPermissionType.SINGLETON:return C.jsx(xe.FdSingleton,{className:"h-6 w-6"});case Q.EPermissionType.DATASTORE:return C.jsx(xe.FdModel3,{className:"h-6 w-6"});case Q.EPermissionType.ATTRIBUTE:return C.jsx(xe.FdTableColumn,{className:"h-6 w-6"});case Q.EPermissionType.METHOD:return C.jsx(xe.FdCode,{className:"h-6 w-6"});case Q.EPermissionType.SINGLETON_METHOD:return C.jsx(xe.FdFunctionSingleton,{className:"h-6 w-6"});case Q.ESubPermissionType.ENTITY_SEL_METHOD:return C.jsx(xe.FdFunctionSelection,{className:"h-6 w-6"});case Q.ESubPermissionType.ENTITY_METHOD:return C.jsx(xe.FdFunctionEntity,{className:"h-6 w-6"});case Q.ESubPermissionType.DS_METHOD:return C.jsx(xe.FdFunctionDatastore,{className:"h-6 w-6"});case Q.ESubPermissionType.DATACLASS_METHOD:return C.jsx(xe.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"})}},eD=({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(xe.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})});function _Q(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(Te.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 EQ(e){return C.jsx(Te.Checkbox,{icon:C.jsx(_Q,{}),...e})}const ro=({permissions:e,label:t,onToggle:r,onSelect:n,promoted:i,showIncluded:o,privileges:a,exists:u,optimisticChecked:l})=>{const d=e.find(h=>h.name===t);if(!d)return null;const f=l!==void 0?l:d.checked;return C.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[f||d.from.length===0||t==="promote"?C.jsx(Te.Checkbox,{isChecked:f,onChange:()=>r&&r(d),isInvalid:u===!1}):C.jsx(EQ,{isIndeterminate:o&&d.from.length>0,onChange:()=>r&&r(d),isInvalid:u===!1}),C.jsxs("div",{className:"absolute left-5 top-0 flex cursor-pointer items-center space-x-1",children:[t!=="promote"&&(d.checked&&(d.info||d.from.length>0)||!d.checked&&d.from.length>0)&&C.jsx(C.Fragment,{children:C.jsxs(gl,{openDelay:0,closeDelay:0,children:[C.jsx(ml,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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:[d.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.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:d.from.map(h=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[h].id),children:a[h].privilege},h))})]})]}):null,d.info&&C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"})," ",d.info]})]})})})]})}),(d.checked||d.from.length>0)&&["execute"].includes(t)&&!!(i!=null&&i.length)&&C.jsxs(gl,{openDelay:0,closeDelay:0,children:[C.jsx(ml,{children:C.jsx(xe.FdCrown,{className:"h-3 w-3 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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(xe.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(h=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[h].id),children:a[h].privilege},h))]})]})})})})]})]})]})},SQ=({privilegeId:e,privileges:t})=>{const r=Q.useAppSelector(Q.selectCatalogMethods),n=Q.useAppSelector(Q.selectDataclasses),i=Q.useAppSelector(Q.selectSingletons),o=Q.useAppDispatch(),[a,u]=T.useState([]),[l,d]=T.useState("");T.useEffect(()=>{d("")},[e]);const{isOpen:f,getMenuProps:h,getInputProps:p,getComboboxProps:v,highlightedIndex:m,getItemProps:y,selectedItem:x,openMenu:b}=lo({onInputValueChange(){u([])},items:[],itemToString(R){return R?R.applyTo:""},defaultHighlightedIndex:0,stateReducer:(R,I)=>{const{changes:P,type:A}=I;switch(A){case lo.stateChangeTypes.InputKeyDownArrowDown:return{...P,isOpen:!0,highlightedIndex:R.highlightedIndex<=a.length?R.highlightedIndex+1:0};case lo.stateChangeTypes.InputKeyDownArrowUp:return{...P,isOpen:!0,highlightedIndex:R.highlightedIndex>=0?R.highlightedIndex-1:a.length};case lo.stateChangeTypes.InputKeyDownEnter:{const k=a[R.highlightedIndex];if(!k)return P;const L=Q.addPermission(e,k,t);return o(Q.updatePrivileges(L)),{...P,isOpen:!0,highlightedIndex:0}}}return P}});T.useEffect(()=>{const R=Q.getInheritedResources(e,t).map(({resource:P,type:A,subType:k})=>({applyTo:P,type:A,subType:k})),I=zx(l.toLowerCase(),r,Object.values(n),Object.values(i));u(I.filter(({applyTo:P,type:A,subType:k})=>!hl.find(R,{applyTo:P,type:A,subType:k})))},[l,e,t,r,n,i]);const w=h({},{suppressRefError:!0}),E=T.useRef(null),_=T.useRef(null),S=Wa({count:a.length,getScrollElement:()=>_.current,estimateSize:()=>32,overscan:5});return T.useEffect(()=>{m!==-1&&S.scrollToIndex(m)},[m,S]),T.useEffect(()=>{f&&E.current&&E.current.focus()},[f]),C.jsxs("div",{className:"relative w-56 text-white group",...v(),children:[C.jsx("div",{...v(),children:C.jsx("input",{...p({},{suppressRefError:!0}),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:l,onChange:({target:{value:R}})=>d(R),onFocus:()=>{b()}})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-1",children:C.jsx(xe.FdDown,{className:"h-4 w-4 cursor-pointer",onMouseDown:R=>R.preventDefault(),onClick:()=>b()})}),f&&C.jsx("ul",{...w,ref:_,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:C.jsx("li",{style:{height:`${S.getTotalSize()}px`,width:"100%",position:"relative"},children:S.getVirtualItems().map(R=>{const I=a[R.index];return C.jsxs("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${R.size}px`,transform:`translateY(${R.start}px)`},className:We(x===I&&"font-bold","flex min-w-fit cursor-pointer items-center space-x-2 px-3 py-2 text-xs shadow-sm",{"bg-primary-hover":m===R.index,"font-bold":x===I}),...y({item:I,index:R.index}),onClick:()=>{const P=Q.addPermission(e,I,t);o(Q.updatePrivileges(P))},children:[fL(I.type),C.jsx("span",{children:I.applyTo})]},R.key)})})})]})};function OQ(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 li={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},tD=Object.values(li).flat();function no(e,t){return t.length>0&&t.every(r=>e.includes(r))}function CQ(e,t){return t.some(r=>e.includes(r))}function RQ(e,t){return Array.from(new Set([...e,...t]))}function IQ(e,t){return e.filter(r=>!t.includes(r))}const PQ=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n,rawPrivileges:i})=>{var oe,fe;const[o,a]=T.useState(null),[u,l]=T.useState(null),{styles:d,attributes:f}=xl(o,u,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),[h,p]=T.useState([]),[v,m]=T.useState([]),[y,x]=T.useState(""),[b,w]=T.useState(""),[E,_]=T.useState({}),S=Q.useAppDispatch(),R=i??n;T.useEffect(()=>{const V=setTimeout(()=>m(h),0);return()=>clearTimeout(V)},[h]),T.useEffect(()=>{_({})},[R]);const{id:I}=e,P=T.useMemo(()=>Q.getInheritedResources(I,R),[I,(oe=R[I])==null?void 0:oe.includes,(fe=R[I])==null?void 0:fe.resources]),A=T.useMemo(()=>Q.getPromotions(I,R),[R[I]]),k=V=>{p([...V])},L=V=>{p(ee=>no(ee,V)?IQ(ee,V):RQ(ee,V))},$=V=>{L(li[V])},j=no(h,tD),D=h.length>0&&!j,G=no(h,li.functions),B=!G&&CQ(h,li.functions),Y=()=>k(tD),Z=()=>k([]),te=T.useCallback(async V=>{const{confirmed:ee}=await S(Q.openModal({title:"Delete Permission",type:Te.ModalType.CONFIRM,color:Te.ModalColor.DANGER,message:"Are you sure you want to remove this Permission?",icon:"FdWarningDanger"})).unwrap();if(ee){const we=Q.removePermission(e.id,V,R);S(Q.updatePrivileges(we))}},[S,e.id,R]),U=T.useCallback(async()=>{const{confirmed:V}=await S(Q.openModal({title:"Reset Permissions",type:Te.ModalType.CONFIRM,color:Te.ModalColor.DANGER,message:"Are you sure you want to reset permissions for this Privilege?",icon:"FdWarningDanger"})).unwrap();if(V){const ee=Q.resetResources(e.id,R);S(Q.updatePrivileges(ee))}},[S,e.id,R]),re=T.useMemo(()=>v.length>0?P.filter(V=>v.includes(V.type)):P,[P,v]),ae=T.useMemo(()=>re.filter(({resource:V})=>b?new RegExp(hl.escapeRegExp(b),"i").test(V):!0),[re,b]),le=T.useMemo(()=>OQ(ae),[ae]),F=T.useMemo(()=>le.filter(V=>{const ee=V.permissions.every(we=>!we.checked)&&V.permissions.some(we=>we.from.length>0);return r||!ee}),[le,r]),W=T.useCallback((V,ee)=>{const we=`${V.resource}|${V.type}|${ee.name}`;_(de=>({...de,[we]:!ee.checked}));const be=R;setTimeout(()=>{const de=Q.togglePermission(e.id,V,ee,be);S(Q.updatePrivileges(de))},0)},[S,e.id,R]),J=T.useMemo(()=>F.some(V=>V.exists===!1),[F]),H=T.useCallback(async()=>{const{confirmed:V}=await S(Q.openModal({title:"Delete Privilege",type:Te.ModalType.CONFIRM,color:Te.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(),ee=Object.entries(R).map(([we,be])=>{const de=be.resources.filter(ue=>!ue.exists);return{[we]:de.map(ue=>({applyTo:ue.resource,type:ue.type}))}}).reduce((we,be)=>({...we,...be}),{});if(V){const we=Q.removeMultiplePermissions(ee,R);S(Q.updatePrivileges(we))}},[S,R]),K=T.useRef(null),se=Wa({count:F.length,getScrollElement:()=>{var V;return((V=K.current)==null?void 0:V.getScrollElement())??null},estimateSize:()=>36,overscan:5});return T.useEffect(()=>{var V,ee;(ee=(V=K.current)==null?void 0:V.getScrollElement())==null||ee.scrollTo({top:0})},[I]),C.jsxs(dc,{ref:K,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 border-collapse",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(xe.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(_r.Popover,{className:"flex items-center",children:({open:V})=>C.jsxs(C.Fragment,{children:[C.jsx(_r.Popover.Button,{ref:a,children:C.jsx(xe.FdAdjust,{className:"h-4 w-4"})}),V&&C.jsx(Ql,{children:C.jsxs(_r.Popover.Panel,{ref:l,style:d.popper,...f.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.jsxs("label",{className:"mb-2 flex cursor-pointer items-center",children:[C.jsx(Te.Checkbox,{isChecked:j,isIndeterminate:D,onChange:()=>j?Z():Y()}),C.jsx("h5",{className:"text-sm font-semibold",children:"Filter"})]}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:no(h,li.dataclass),onChange:()=>$("dataclass"),label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:no(h,li.singleton),onChange:()=>$("singleton"),label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:G,isIndeterminate:B,onChange:()=>$("functions"),label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:no(h,li.attribute),onChange:()=>$("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:y,onChange:V=>{const ee=V.target.value;x(ee),setTimeout(()=>w(ee),0)}})]}),C.jsx(SQ,{privilegeId:I,privileges:R}),C.jsx("div",{children:C.jsxs(gl,{openDelay:0,closeDelay:0,children:[C.jsx(ml,{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:U,children:C.jsx(xe.FdReload,{})})}),C.jsx(Lr,{container:Bt(),children:C.jsxs(Br,{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(xe.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(gl,{openDelay:0,closeDelay:0,children:[C.jsx(ml,{children:C.jsx("button",{className:We("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:H,disabled:!J,children:C.jsx(xe.FdClean,{className:"h-4 w-4"})})}),C.jsx(Lr,{container:Bt(),children:C.jsxs(Br,{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(xe.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"})]})}),F.length?C.jsxs("tbody",{children:[se.getVirtualItems().length>0?C.jsx("tr",{style:{height:`${se.getVirtualItems()[0].start}px`},children:C.jsx("td",{colSpan:7})}):null,se.getVirtualItems().map(V=>{const ee=F[V.index],we=ee.permissions.some(be=>be.from.length>0);return C.jsxs("tr",{className:We("group hover:bg-grey-300",{"bg-grey-600":V.index%2!==0,"opacity-60":ee.exists===!1}),children:[C.jsxs("td",{className:We("group flex items-center gap-3 py-2 text-xs",ee.exists===!1?"text-negative-400":"text-white",{"border-b-[0.5px] border-grey-300":!1}),children:[fL(ee.type),ee.resource,C.jsx(Te.Tooltip,{placement:"top",label:"Remove Permission",isDisabled:we,container:Bt(),children:C.jsx("button",{onClick:()=>{we?Te.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** Inherited permissions can't be removed",customIcon:xe.FdInfoBold}):te({applyTo:ee.resource,type:ee.type})},className:We("flex flex-shrink-0 items-center justify-center rounded p-1 opacity-0 group-hover:opacity-100",we?"hover:bg-grey-300 group-hover:opacity-70":"hover:bg-primary-hover"),children:C.jsx(xe.FdPlus,{className:"h-4 w-4 rotate-45 transform text-white"})})})]}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(ro,{permissions:ee.permissions,showIncluded:r,label:"read",onToggle:be=>W(ee,be),onSelect:t,privileges:n,exists:ee.exists,optimisticChecked:E[`${ee.resource}|${ee.type}|read`]})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(ro,{permissions:ee.permissions,showIncluded:r,label:"create",onToggle:be=>W(ee,be),onSelect:t,privileges:n,exists:ee.exists,optimisticChecked:E[`${ee.resource}|${ee.type}|create`]})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(ro,{permissions:ee.permissions,showIncluded:r,label:"update",onToggle:be=>W(ee,be),onSelect:t,privileges:n,exists:ee.exists,optimisticChecked:E[`${ee.resource}|${ee.type}|update`]})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(ro,{permissions:ee.permissions,showIncluded:r,label:"drop",onToggle:be=>W(ee,be),onSelect:t,privileges:n,exists:ee.exists,optimisticChecked:E[`${ee.resource}|${ee.type}|drop`]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(ro,{promoted:A[ee.resource],permissions:ee.permissions,showIncluded:r,label:"execute",onToggle:be=>W(ee,be),onSelect:t,privileges:n,exists:ee.exists,optimisticChecked:E[`${ee.resource}|${ee.type}|execute`]})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(ro,{permissions:ee.permissions,showIncluded:r,label:"promote",onToggle:be=>W(ee,be),onSelect:t,privileges:n,exists:ee.exists,optimisticChecked:E[`${ee.resource}|${ee.type}|promote`]})})]},`${ee.resource}-${V.index}`)}),(()=>{const V=se.getVirtualItems();if(!V.length)return null;const ee=se.getTotalSize()-V[V.length-1].end;return ee>0?C.jsx("tr",{style:{height:`${ee}px`},children:C.jsx("td",{colSpan:7})}):null})()]}):null]}),!le.length&&b?C.jsx(eD,{children:"The Permission you're looking for can't be found "}):null,!le.length&&!b?C.jsxs(eD,{children:["This Privilege has no Permissions configured yet ",C.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},NQ=({onCreate:e})=>{const t=Q.useAppSelector(Q.selectPrivileges),r=Q.useAppDispatch(),[n,i]=T.useState(null),[o,a]=T.useState(null),[u,l]=T.useState(""),[d,f]=T.useState(null),{styles:h,attributes:p}=xl(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});return T.useEffect(()=>{l(""),f(null)},[o]),C.jsx(_r.Popover,{children:({open:v,close:m})=>C.jsxs(C.Fragment,{children:[C.jsx(_r.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:i,children:C.jsx("span",{children:C.jsx(xe.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(Ql,{children:C.jsxs(_r.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=>l(y.target.value),onKeyDown:y=>{if(y.key==="Enter"){f(null);try{const x=Q.create(u,t),b=r(Q.updatePrivileges(x)),w=Object.values(b.payload).find(E=>E.privilege===u);w&&(e(w),m())}catch(x){f(x.message)}}},type:"text",className:We("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=Q.create(u,t),x=r(Q.updatePrivileges(y)),b=Object.values(x.payload).find(w=>w.privilege===u);b&&e(b),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"})]})]})})]})})},TQ=()=>{const e=Q.useAppSelector(Q.selectCatalog),t=Q.useAppSelector(Q.selectPrivileges),[r,n]=T.useState(t);T.useEffect(()=>{const v=setTimeout(()=>n(t),0);return()=>clearTimeout(v)},[t]);const i=T.useMemo(()=>{if(e===null)return r;const v=Q2(r,Object.values((e==null?void 0:e.dataClasses)??{}));return eq(v,e)},[r,e]),[o,a]=T.useState(null),[u,l]=T.useState(null),d=v=>{a(v),setTimeout(()=>l(v),0)},f=T.useMemo(()=>Object.keys(i),[i]);T.useEffect(()=>{if(o&&i[o.id]||!f.length)return;const v=i[f[0]];a(v),l(v)},[i]),T.useEffect(()=>{f.length<2&&p(!0)},[f.length]);const[h,p]=T.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(xe.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),C.jsx(NQ,{onCreate:v=>{a(v),l(v)}})]}),C.jsx(VX,{privileges:i,selectedPrivilege:o,selectPrivilege:d})]}),o&&i[o.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:[(u??o).privilege!=="guest"?C.jsx(q9,{privileges:i,selectedPrivilege:u??o,onSelect:v=>a(t[v]),setShowIncluded:p,showIncluded:h}):null,C.jsx(PQ,{privileges:i,rawPrivileges:t,selectedPrivilege:u??o,onSelect:v=>a(t[v]),showIncluded:h})]}),C.jsx(AQ,{privileges:i,selectedPrivilege:u??o,setSelectedPrivilege:a})]}):C.jsx(LD,{tab:"Privilege"})]})},AQ=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=T.useState(!1);return C.jsx(Te.Panel,{path:Te.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(M9,{dict:e,data:Q.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})};var Ib={},da={},Nu={},rD;function dL(){if(rD)return Nu;rD=1,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.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 Nu}var io={},ha={},pa={},nD;function MQ(){if(nD)return pa;nD=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.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 pa.default=e,pa}var iD;function hc(){if(iD)return ha;iD=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.default=void 0;var e=t(MQ());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 ha.default=n,ha}var oD;function pc(){if(oD)return io;oD=1,Object.defineProperty(io,"__esModule",{value:!0}),io.default=void 0,io.unsafeStringify=n;var e=t(hc());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 l=n(a,u);if(!(0,e.default)(l))throw TypeError("Stringified UUID is invalid");return l}var o=i;return io.default=o,io}var aD;function DQ(){if(aD)return da;aD=1,Object.defineProperty(da,"__esModule",{value:!0}),da.default=void 0;var e=r(dL()),t=pc();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 S=d.random||(d.rng||e.default)();m==null&&(m=n=[S[0]|1,S[1],S[2],S[3],S[4],S[5]]),y==null&&(y=i=(S[6]<<8|S[7])&16383)}let x=d.msecs!==void 0?d.msecs:Date.now(),b=d.nsecs!==void 0?d.nsecs:a+1;const w=x-o+(b-a)/1e4;if(w<0&&d.clockseq===void 0&&(y=y+1&16383),(w<0||x>o)&&d.nsecs===void 0&&(b=0),b>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=x,a=b,i=y,x+=122192928e5;const E=((x&268435455)*1e4+b)%4294967296;v[p++]=E>>>24&255,v[p++]=E>>>16&255,v[p++]=E>>>8&255,v[p++]=E&255;const _=x/4294967296*1e4&268435455;v[p++]=_>>>8&255,v[p++]=_&255,v[p++]=_>>>24&15|16,v[p++]=_>>>16&255,v[p++]=y>>>8|128,v[p++]=y&255;for(let S=0;S<6;++S)v[p+S]=m[S];return f||(0,t.unsafeStringify)(v)}var l=u;return da.default=l,da}var va={},Ln={},ga={},sD;function hL(){if(sD)return ga;sD=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.default=void 0;var e=t(hc());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 ga.default=n,ga}var uD;function pL(){if(uD)return Ln;uD=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.URL=Ln.DNS=void 0,Ln.default=a;var e=pc(),t=r(hL());function r(u){return u&&u.__esModule?u:{default:u}}function n(u){u=unescape(encodeURIComponent(u));const l=[];for(let d=0;d<u.length;++d)l.push(u.charCodeAt(d));return l}const i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Ln.DNS=i;const o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Ln.URL=o;function a(u,l,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 x=new Uint8Array(16+h.length);if(x.set(p),x.set(h,p.length),x=d(x),x[6]=x[6]&15|l,x[8]=x[8]&63|128,v){m=m||0;for(let b=0;b<16;++b)v[m+b]=x[b];return v}return(0,e.unsafeStringify)(x)}try{f.name=u}catch{}return f.DNS=i,f.URL=o,f}return Ln}var ma={},lD;function jQ(){if(lD)return ma;lD=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.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,x="0123456789abcdef";for(let b=0;b<y;b+=8){const w=v[b>>5]>>>b%32&255,E=parseInt(x.charAt(w>>>4&15)+x.charAt(w&15),16);m.push(E)}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,x=-271733879,b=-1732584194,w=271733878;for(let E=0;E<v.length;E+=16){const _=y,S=x,R=b,I=w;y=l(y,x,b,w,v[E],7,-680876936),w=l(w,y,x,b,v[E+1],12,-389564586),b=l(b,w,y,x,v[E+2],17,606105819),x=l(x,b,w,y,v[E+3],22,-1044525330),y=l(y,x,b,w,v[E+4],7,-176418897),w=l(w,y,x,b,v[E+5],12,1200080426),b=l(b,w,y,x,v[E+6],17,-1473231341),x=l(x,b,w,y,v[E+7],22,-45705983),y=l(y,x,b,w,v[E+8],7,1770035416),w=l(w,y,x,b,v[E+9],12,-1958414417),b=l(b,w,y,x,v[E+10],17,-42063),x=l(x,b,w,y,v[E+11],22,-1990404162),y=l(y,x,b,w,v[E+12],7,1804603682),w=l(w,y,x,b,v[E+13],12,-40341101),b=l(b,w,y,x,v[E+14],17,-1502002290),x=l(x,b,w,y,v[E+15],22,1236535329),y=d(y,x,b,w,v[E+1],5,-165796510),w=d(w,y,x,b,v[E+6],9,-1069501632),b=d(b,w,y,x,v[E+11],14,643717713),x=d(x,b,w,y,v[E],20,-373897302),y=d(y,x,b,w,v[E+5],5,-701558691),w=d(w,y,x,b,v[E+10],9,38016083),b=d(b,w,y,x,v[E+15],14,-660478335),x=d(x,b,w,y,v[E+4],20,-405537848),y=d(y,x,b,w,v[E+9],5,568446438),w=d(w,y,x,b,v[E+14],9,-1019803690),b=d(b,w,y,x,v[E+3],14,-187363961),x=d(x,b,w,y,v[E+8],20,1163531501),y=d(y,x,b,w,v[E+13],5,-1444681467),w=d(w,y,x,b,v[E+2],9,-51403784),b=d(b,w,y,x,v[E+7],14,1735328473),x=d(x,b,w,y,v[E+12],20,-1926607734),y=f(y,x,b,w,v[E+5],4,-378558),w=f(w,y,x,b,v[E+8],11,-2022574463),b=f(b,w,y,x,v[E+11],16,1839030562),x=f(x,b,w,y,v[E+14],23,-35309556),y=f(y,x,b,w,v[E+1],4,-1530992060),w=f(w,y,x,b,v[E+4],11,1272893353),b=f(b,w,y,x,v[E+7],16,-155497632),x=f(x,b,w,y,v[E+10],23,-1094730640),y=f(y,x,b,w,v[E+13],4,681279174),w=f(w,y,x,b,v[E],11,-358537222),b=f(b,w,y,x,v[E+3],16,-722521979),x=f(x,b,w,y,v[E+6],23,76029189),y=f(y,x,b,w,v[E+9],4,-640364487),w=f(w,y,x,b,v[E+12],11,-421815835),b=f(b,w,y,x,v[E+15],16,530742520),x=f(x,b,w,y,v[E+2],23,-995338651),y=h(y,x,b,w,v[E],6,-198630844),w=h(w,y,x,b,v[E+7],10,1126891415),b=h(b,w,y,x,v[E+14],15,-1416354905),x=h(x,b,w,y,v[E+5],21,-57434055),y=h(y,x,b,w,v[E+12],6,1700485571),w=h(w,y,x,b,v[E+3],10,-1894986606),b=h(b,w,y,x,v[E+10],15,-1051523),x=h(x,b,w,y,v[E+1],21,-2054922799),y=h(y,x,b,w,v[E+8],6,1873313359),w=h(w,y,x,b,v[E+15],10,-30611744),b=h(b,w,y,x,v[E+6],15,-1560198380),x=h(x,b,w,y,v[E+13],21,1309151649),y=h(y,x,b,w,v[E+4],6,-145523070),w=h(w,y,x,b,v[E+11],10,-1120210379),b=h(b,w,y,x,v[E+2],15,718787259),x=h(x,b,w,y,v[E+9],21,-343485551),y=o(y,_),x=o(x,S),b=o(b,R),w=o(w,I)}return[y,x,b,w]}function i(v){if(v.length===0)return[];const m=v.length*8,y=new Uint32Array(r(m));for(let x=0;x<m;x+=8)y[x>>5]|=(v[x/8]&255)<<x%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,x,b,w){return o(a(o(o(m,v),o(x,w)),b),y)}function l(v,m,y,x,b,w,E){return u(m&y|~m&x,v,m,b,w,E)}function d(v,m,y,x,b,w,E){return u(m&x|y&~x,v,m,b,w,E)}function f(v,m,y,x,b,w,E){return u(m^y^x,v,m,b,w,E)}function h(v,m,y,x,b,w,E){return u(y^(m|~x),v,m,b,w,E)}var p=e;return ma.default=p,ma}var cD;function qQ(){if(cD)return va;cD=1,Object.defineProperty(va,"__esModule",{value:!0}),va.default=void 0;var e=r(pL()),t=r(jQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return va.default=i,va}var ya={},ba={},fD;function kQ(){if(fD)return ba;fD=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return ba.default=t,ba}var dD;function LQ(){if(dD)return ya;dD=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.default=void 0;var e=n(kQ()),t=n(dL()),r=pc();function n(a){return a&&a.__esModule?a:{default:a}}function i(a,u,l){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){l=l||0;for(let f=0;f<16;++f)u[l+f]=d[f];return u}return(0,r.unsafeStringify)(d)}var o=i;return ya.default=o,ya}var xa={},wa={},hD;function BQ(){if(hD)return wa;hD=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.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,l=Math.ceil(u/16),d=new Array(l);for(let f=0;f<l;++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[l-1][14]=(i.length-1)*8/Math.pow(2,32),d[l-1][14]=Math.floor(d[l-1][14]),d[l-1][15]=(i.length-1)*8&4294967295;for(let f=0;f<l;++f){const h=new Uint32Array(80);for(let b=0;b<16;++b)h[b]=d[f][b];for(let b=16;b<80;++b)h[b]=t(h[b-3]^h[b-8]^h[b-14]^h[b-16],1);let p=a[0],v=a[1],m=a[2],y=a[3],x=a[4];for(let b=0;b<80;++b){const w=Math.floor(b/20),E=t(p,5)+e(w,v,m,y)+x+o[w]+h[b]>>>0;x=y,y=m,m=t(v,30)>>>0,v=p,p=E}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]+x>>>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 wa.default=n,wa}var pD;function FQ(){if(pD)return xa;pD=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.default=void 0;var e=r(pL()),t=r(BQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return xa.default=i,xa}var _a={},vD;function $Q(){if(vD)return _a;vD=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.default=void 0;var e="00000000-0000-0000-0000-000000000000";return _a.default=e,_a}var Ea={},gD;function zQ(){if(gD)return Ea;gD=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.default=void 0;var e=t(hc());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 Ea.default=n,Ea}var mD;function HQ(){return mD||(mD=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 l.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(DQ()),r=f(qQ()),n=f(LQ()),i=f(FQ()),o=f($Q()),a=f(zQ()),u=f(hc()),l=f(pc()),d=f(hL());function f(h){return h&&h.__esModule?h:{default:h}}})(Ib)),Ib}var Pb,yD;function VQ(){if(yD)return Pb;yD=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,l=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<l;r++)o[r]=this.srcAlphabet.indexOf(t[r]);do{for(n=0,i=0,r=0;r<l;r++)n=n*a+o[r],n>=u?(o[i++]=parseInt(n/u,10),n=n%u):i>0&&(o[i++]=0);l=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},Pb=e,Pb}var Nb,bD;function UQ(){if(bD)return Nb;bD=1;var e=VQ();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",Nb=t,Nb}var Tb,xD;function WQ(){if(xD)return Tb;xD=1;const{v4:e,validate:t}=HQ(),r=UQ(),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("-")},l=d=>Math.ceil(Math.log(2**128)/Math.log(d));return Tb=(()=>{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=l(p.length),y={shortIdLength:m,consistentLength:v.consistentLength,paddingChar:p[0]},x=r(r.HEX,p),b=r(p,r.HEX),w=()=>a(e(),x,y),_={alphabet:p,fromUUID:S=>a(S,x,y),maxLength:m,generate:w,new:w,toUUID:S=>u(S,b),uuid:e,validate:(S,R=!1)=>{if(!S||typeof S!="string")return!1;const I=v.consistentLength?S.length===m:S.length<=m,P=S.split("").every(A=>p.includes(A));return R===!1?I&&P:I&&P&&t(u(S,b))}};return Object.freeze(_),_};return d.constants=n,d.uuid=e,d.generate=()=>(o||(o=d(n.flickrBase58).generate),o()),d})(),Tb}var GQ=WQ();const KQ=T.memo(function({role:t,privileges:r}){var I;const[n,i]=T.useState(t),[o,a]=T.useState(t.role),[u,l]=T.useState(null),d=((I=n.privileges)==null?void 0:I.filter(P=>r[P]&&r[P].privilege!=="guest").length)||0,f=Q.useAppSelector(Q.selectRoles),h=Q.useAppDispatch(),{selectedRole:p,selectRole:v}=ox(),[m,y]=T.useState(!1),x=Te.useOutsideClick(()=>{m&&w()});Te.useDidMountEffect(()=>{o!==t.role&&a(t.role)},[t.role]),T.useEffect(()=>{t.role||y(!0)},[]),T.useEffect(()=>{i(t)},[t]);const b=()=>{l(null),y(!0)},w=()=>{l(null),t.role&&t.role===o&&y(!1);try{const P=Q.saveRole({...n,role:o},f);h(Q.updateRoles(P)),y(!1)}catch(P){l(P.message)}},E=Q.useAppDispatch(),_=async P=>{P.stopPropagation();const{confirmed:A}=await E(Q.openModal({title:"Delete Role",type:Te.ModalType.CONFIRM,color:Te.ModalColor.DANGER,message:"Are you sure you want to remove this Role?",icon:"FdWarningDanger"})).unwrap();A&&S()},S=()=>{const P=Q.removeRole(n.id,f),A=Object.keys(P);if(p!==n.id){h(Q.updateRoles(P));return}if(A.length===0)v(null);else{const k=Object.keys(f),L=k.indexOf(n.id),$=Math.max(0,L-1),j=k[$];L===0?v(A[0]):P[j]?v(j):v(A[0])}h(Q.updateRoles(P))},R=(P=null)=>{if(P&&P.stopPropagation(),!t.role){S();return}y(!1),a(t.role)};return C.jsx(C.Fragment,{children:C.jsxs("div",{className:We("rounded border bg-grey-300 p-2",{"border-grey-100":p!==n.id,"border-primary-dark":p===n.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{v(n.id)},ref:x,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(xe.FdGroup,{className:"h-6 w-6"})}),m?C.jsxs("div",{className:"relative h-6 flex-1 mr-2",children:[C.jsx("input",{type:"text",value:o,onChange:({target:{value:P}})=>{a(P)},onKeyDown:P=>{P.key==="Enter"&&w(),P.key==="Escape"&&R()},className:We("absolute inset-0 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:outline-none",{"border-b border-red-400 rounded-b-none":u,"focus:border-primary-dark":!u}),placeholder:"role",autoComplete:"off",autoFocus:!0}),u&&C.jsx("p",{className:"absolute top-5 mt-1 w-full rounded rounded-t-none bg-red-400 p-1 text-xs text-white shadow-md",children:u})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",title:o,children:n.role}),C.jsx("div",{className:We("justify-betwee ml-auto flex w-fit items-center gap-x-2"),children:m?C.jsxs(C.Fragment,{children:[C.jsx("button",{onClick:w,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdSave,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:R,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.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(xe.FdPen,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:P=>_(P),className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdTrash,{className:"h-4 w-4 text-grey-50"})})]})})]})}),C.jsxs("span",{className:We("ml-[43px] py-1 text-xs text-white"),children:[d," Privilege",d>1?"s":""]})]})})}),vL=(e,t)=>e?t[e]:null,wD=(e,t,r)=>{const n=vL(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},YQ=()=>{const e=Q.useAppSelector(Q.selectPrivileges),t=Q.useAppSelector(Q.selectRoles),r=Q.useAppDispatch(),{selectedRole:n}=ox(),i=vL(n,t),o=(l,d)=>d&&d.privileges.includes(l.id),a=T.useMemo(()=>Object.values(e).filter(l=>o(l,i)&&l.privilege!=="guest"),[e,i]),u=T.useMemo(()=>Object.values(e).filter(l=>!o(l,i)&&l.privilege!=="guest"),[e,i]);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:We("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"}),a.map((l,d)=>C.jsxs("div",{"data-cy":"item=>Permisions",className:We("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":o(l,i),"bg-grey-300 text-grey-100":!o(l,i)}),onClick:()=>{const f=wD(i.id,l.id,t);r(Q.updateRoles(f))},children:[C.jsx("span",{className:"text-xs",children:l.privilege}),C.jsx("button",{className:"focus:outline-none",children:o(l,i)?C.jsx(xe.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(xe.FdPlus,{className:"h-[14px] w-[14px]"})})]},d)),u.map((l,d)=>C.jsxs("div",{"data-cy":"item=>Permisions",className:We("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":o(l,i),"bg-grey-300 text-grey-100":!o(l,i)}),onClick:()=>{const f=wD(i.id,l.id,t);r(Q.updateRoles(f))},children:[C.jsx("span",{className:"text-xs",children:l.privilege}),C.jsx("button",{className:"text-white focus:outline-none",children:o(l,i)?C.jsx(xe.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(xe.FdPlus,{className:"h-[14px] w-[14px]"})})]},d))]})]})},yl=(e,t,r,n=!1)=>{const i=e.applyTo,o=e.type===Q.EPermissionType.DATACLASS?"ds":i.split(".")[0],a={...t,...r},u=()=>({value:!n,inherited:!1,from:[],explicitly:!1}),l={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=yl(e,t,{[p]:a[p]},n);Object.values(v.permissions).forEach(y=>{l[y.name].explicitly||(!l[y.name].from.includes(a[p].privilege)&&y.checked&&l[y.name].from.push(a[p].privilege),l[y.name].inherited=l[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&&(l[v.name].explicitly=!0,n&&(l[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&&(l[v.name].explicitly=!0,n&&(l[v.name].value=!0))}):Object.values(p.permissions).forEach(v=>{!l[v.name].explicitly&&v.checked&&(n?l[v.name].value=!0:l[v.name].value=!1)}))})}),(n?Object.entries(l).some(([h,p])=>h!=="promote"&&!p.value&&!p.explicitly):Object.entries(l).some(([h,p])=>h!=="promote"&&p.value&&!p.explicitly))&&![Q.EPermissionType.DATASTORE,Q.EPermissionType.SINGLETON].includes(e.type)){const h={applyTo:o,type:e.type===Q.EPermissionType.DATACLASS?Q.EPermissionType.DATASTORE:e.type===Q.EPermissionType.SINGLETON_METHOD?Q.EPermissionType.SINGLETON:Q.EPermissionType.DATACLASS},p=yl(h,t,r,n),v=m=>{let y=l[m].value;return n?!l[m].value&&!l[m].explicitly&&(y=p[m].value):l[m].value&&!l[m].explicitly&&(y=p[m].value),{value:y,inherited:l[m].inherited||p[m].inherited,from:l[m].from.length>0?l[m].from:p[m].from,explicitly:l[m].explicitly}};return{read:v("read"),create:v("create"),update:v("update"),drop:v("drop"),execute:v("execute"),promote:v("promote")}}return{read:l.read,create:l.create,update:l.update,drop:l.drop,execute:l.execute,promote:l.promote}},XQ=({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(xe.FdInfoBold,{className:"absolute -right-full h-10 w-10 translate-x-1"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})}),ZQ=e=>{switch(e){case"dataclass":return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"});case"singleton":return C.jsx(xe.FdSingleton,{className:"h-6 w-6"});case"datastore":return C.jsx(xe.FdModel3,{className:"h-6 w-6"});case"attribute":return C.jsx(xe.FdTableColumn,{className:"h-6 w-6"});case"method":return C.jsx(xe.FdCode,{className:"h-6 w-6"});case"singletonMethod":return C.jsx(xe.FdFunctionSingleton,{className:"h-6 w-6"});case"entityselMethod":return C.jsx(xe.FdFunctionSelection,{className:"h-6 w-6"});case"entityMethod":return C.jsx(xe.FdFunctionEntity,{className:"h-6 w-6"});case"dsMethod":return C.jsx(xe.FdFunctionDatastore,{className:"h-6 w-6"});case"dataclassMethod":return C.jsx(xe.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"})}},Sa=Qx,Oa=ew,_D=({privileges:e,permission:t,hasChild:r,depth:n,isChild:i=!1,className:o,inSearch:a,toggleCollapse:u,collapsed:l,isRestrictedByDefault:d,toastMessageCallback:f,computedInherited:h})=>{const[p,v]=t.applyTo.split("."),m=T.useMemo(()=>h||yl(t,e.otherPrivs,e.rolePrivs,d),[h,e,t,d]);return C.jsxs("tr",{className:We("group even:bg-grey-600 hover:bg-grey-300",o),children:[C.jsxs("td",{className:We("flex h-full w-full items-stretch p-0 text-xs group-hover:rounded-l",{"px-1":a}),children:[Array(n).fill("").map((y,x)=>C.jsx("div",{className:We("ml-1.5 mr-1 w-[2px] bg-grey-100",{"mr-0.5":i})},x)),C.jsxs("div",{className:"flex items-center gap-3 py-2",children:[r&&C.jsx("button",{onClick:u,className:"w-3",children:l?C.jsx(xe.FdRight,{className:"inline h-4 w-4"}):C.jsx(xe.FdDown,{className:"inline h-4 w-4"})}),ZQ(t.type),a?t.applyTo:v||p]})]}),C.jsx("td",{className:"py-2 text-center",children:[Q.EPermissionType.ATTRIBUTE,Q.EPermissionType.DATASTORE,Q.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:We("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":m.read.value||m.read.inherited}),onClick:f,children:(m.read.value||m.read.inherited)&&C.jsx(xe.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:!m.read.value&&m.read.inherited?C.jsxs(Sa,{openDelay:0,closeDelay:0,children:[C.jsx(Oa,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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:m.read.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.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:m.read.from.map((y,x)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center",children:[Q.EPermissionType.ATTRIBUTE,Q.EPermissionType.DATASTORE,Q.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:We("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":m.create.value||m.create.inherited}),onClick:f,children:(m.create.value||m.create.inherited)&&C.jsx(xe.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:!m.create.value&&m.create.inherited?C.jsxs(Sa,{openDelay:0,closeDelay:0,children:[C.jsx(Oa,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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:m.create.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.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:m.create.from.map((y,x)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center",children:[Q.EPermissionType.ATTRIBUTE,Q.EPermissionType.DATASTORE,Q.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:We("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":m.update.value||m.update.inherited}),onClick:f,children:(m.update.value||m.update.inherited)&&C.jsx(xe.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:!m.update.value&&m.update.inherited?C.jsxs(Sa,{openDelay:0,closeDelay:0,children:[C.jsx(Oa,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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:m.update.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.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:m.update.from.map((y,x)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center",children:[Q.EPermissionType.ATTRIBUTE,Q.EPermissionType.DATASTORE,Q.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:We("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":m.drop.value||m.drop.inherited}),onClick:f,children:(m.drop.value||m.drop.inherited)&&C.jsx(xe.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:!m.drop.value&&m.drop.inherited?C.jsxs(Sa,{openDelay:0,closeDelay:0,children:[C.jsx(Oa,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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:m.drop.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.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:m.drop.from.map((y,x)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center",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:We("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":m.execute.value||m.execute.inherited}),onClick:f,children:(m.execute.value||m.execute.inherited)&&C.jsx(xe.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:!m.execute.value&&m.execute.inherited?C.jsxs(Sa,{openDelay:0,closeDelay:0,children:[C.jsx(Oa,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{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:m.execute.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.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:m.execute.from.map((y,x)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})})]})};function ED(e,t,r){const n=[],i=(a,u,l)=>n.push({id:a,permission:u,depth:l,hasChild:!1,isChild:!1}),o=(a,u,l,d,f,h)=>{n.push({id:a,permission:u,depth:l,hasChild:!0,isChild:d,toggleId:a,isCollapsed:f}),f||h()};for(const a of Object.values(e)){o("ds-group",{applyTo:a.applyTo,type:a.type},0,!1,t,()=>{for(const u of a.methods)i(`dsm-${u.applyTo}`,u,1);for(const u of a.dataClasses){const l=`dc-${u.applyTo}`;o(l,{applyTo:u.applyTo,type:u.type},1,!0,r[l]??!1,()=>{for(const d of u.attributes)i(`dca-${d.applyTo}`,d,2);for(const d of u.methods)i(`dcm-${d.applyTo}`,d,2)})}});for(const u of a.singletons){const l=`sing-${u.applyTo}`;o(l,{applyTo:u.applyTo,type:u.type},0,!0,r[l]??!1,()=>{for(const d of u.attributes)i(`singa-${d.applyTo}`,d,1);for(const d of u.methods)i(`singm-${d.applyTo}`,d,1)})}}return n}const SD=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],ci={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},OD=Object.values(ci).flat();function oo(e,t){return t.length>0&&t.every(r=>e.includes(r))}function JQ(e,t){return Array.from(new Set([...e,...t]))}function QQ(e,t){return e.filter(r=>!t.includes(r))}const eee=({selectedRole:e})=>{const[t,r]=T.useState(null),[n,i]=T.useState(null),{styles:o,attributes:a}=xl(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),u=Q.useAppSelector(Q.selectRestrictedByDefault),l=Q.useAppSelector(Q.selectPrivileges),[d,f]=T.useState([]),[h,p]=T.useState([]),[v,m]=T.useState(""),[y,x]=T.useState("");T.useEffect(()=>{const V=setTimeout(()=>p(d),0);return()=>clearTimeout(V)},[d]);const b=Q.useAppSelector(Q.selectCatalogMethods),w=Q.useAppSelector(Q.selectDataclasses),E=Q.useAppSelector(Q.selectSingletons),_=T.useMemo(()=>j9(b,Object.values(w),Object.values(E)),[b,w,E]),S=T.useMemo(()=>!h.length&&!y?[]:[...zx(y,b,Object.values(w),Object.values(E))].filter(V=>h.length?h.includes(V.type):!0).sort((V,ee)=>{const we=SD.indexOf(V.type),be=SD.indexOf(ee.type);return we!==be?we-be:V.applyTo.toLowerCase()>ee.applyTo.toLowerCase()?1:-1}),[y,h,b,w,E]),R=V=>f([...V]),I=V=>{f(ee=>oo(ee,V)?QQ(ee,V):JQ(ee,V))},P=V=>I(ci[V]),A=OD.every(V=>d.includes(V)),k=d.length>0&&!A,L=oo(d,ci.functions),$=()=>R(OD),j=()=>R([]),D=Q.useAppSelector(Q.selectRoles),[G,B]=T.useState(D);T.useEffect(()=>{const V=setTimeout(()=>B(D),0);return()=>clearTimeout(V)},[D]);const Y=T.useRef(null);T.useEffect(()=>{var V,ee;(ee=(V=Y.current)==null?void 0:V.getScrollElement())==null||ee.scrollTo({top:0})},[e]);const Z=Wa({count:S.length,getScrollElement:()=>{var V;return((V=Y.current)==null?void 0:V.getScrollElement())??null},estimateSize:()=>36,overscan:5}),te=T.useMemo(()=>{const V=Object.values(l).find(ue=>ue.privilege==="guest"),ee=G[e],we=ee?Object.fromEntries(ee.privileges.map(ue=>[ue,l[ue]]).filter(([,ue])=>!!ue)):{};if(u)return{rolePrivs:we,otherPrivs:V?{[V.id]:V}:{}};const be=V?{[V.id]:{...V,active:!0}}:{},de=Object.fromEntries(Object.entries(l).filter(([ue])=>ue!==(V==null?void 0:V.id)&&!(ee!=null&&ee.privileges.includes(ue))).map(([ue,Ee])=>[ue,{...Ee,active:!1}]));return{rolePrivs:we,otherPrivs:{...be,...de}}},[l,G,e,u]),[U,re]=T.useState(!1),[ae,le]=T.useState({}),F=T.useMemo(()=>{const V=[];for(const ee of Object.values(_)){for(const we of ee.dataClasses)V.push(`dc-${we.applyTo}`);for(const we of ee.singletons)V.push(`sing-${we.applyTo}`)}return V},[_]),W=F.length>0&&F.every(V=>ae[V]===!0),J=T.useCallback(()=>{const V={};for(const ee of F)V[ee]=!0;le(V)},[F]),H=T.useCallback(V=>{V==="ds-group"?re(ee=>!ee):le(ee=>({...ee,[V]:!ee[V]}))},[]),K=T.useMemo(()=>{const V=new Map;for(const{permission:ee}of ED(_,!1,{}))V.set(`${ee.applyTo}|${ee.type}`,yl(ee,te.otherPrivs,te.rolePrivs,u));return V},[te,u,_]),se=T.useMemo(()=>ED(_,U,ae),[_,U,ae]),oe=Wa({count:se.length,getScrollElement:()=>{var V;return((V=Y.current)==null?void 0:V.getScrollElement())??null},estimateSize:()=>36,overscan:8}),fe=T.useCallback(()=>{Te.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** You can add or modify permissions only in the Privilege section.",customIcon:xe.FdInfoCircle})},[]);return C.jsxs(dc,{ref:Y,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 border-collapse",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(Te.Tooltip,{label:"Collapse All",placement:"top",container:Bt(),children:C.jsx("button",{onClick:()=>{W?(J(),re(!0)):J()},className:We("cursor-pointer rounded-md p-1 hover:bg-primary-hover focus:outline-none",{"pointer-events-none text-grey-200":U&&W,"text-white":!(U&&W)}),children:C.jsx(xe.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(xe.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(_r.Popover,{className:"flex items-center",children:({open:V})=>C.jsxs(C.Fragment,{children:[C.jsx(_r.Popover.Button,{ref:r,children:C.jsx(xe.FdAdjust,{className:"h-4 w-4"})}),V&&C.jsx(Ql,{children:C.jsxs(_r.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.jsxs("label",{className:"mb-2 flex cursor-pointer items-center",children:[C.jsx(Te.Checkbox,{isChecked:A,isIndeterminate:k,onChange:()=>A?j():$()}),C.jsx("h5",{className:"text-sm font-semibold",children:"Filter"})]}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:oo(d,ci.datastore),onChange:()=>P("datastore"),label:"Datastore"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:oo(d,ci.dataclass),onChange:()=>P("dataclass"),label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:oo(d,ci.singleton),onChange:()=>P("singleton"),label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:L,onChange:()=>P("functions"),label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:oo(d,ci.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:v,onChange:V=>{const ee=V.target.value;m(ee),setTimeout(()=>x(ee),0)}})]})]})}),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:h.length||y?C.jsxs(C.Fragment,{children:[Z.getVirtualItems().length>0?C.jsx("tr",{style:{height:`${Z.getVirtualItems()[0].start}px`},children:C.jsx("td",{colSpan:6})}):null,Z.getVirtualItems().map(V=>{const ee=S[V.index];return C.jsx(_D,{privileges:te,permission:ee,depth:0,inSearch:!0,isRestrictedByDefault:u,allPrivileges:l,toastMessageCallback:fe,computedInherited:K.get(`${ee.applyTo}|${ee.type}`)},`${ee.type}-${V.index}`)}),(()=>{const V=Z.getVirtualItems();if(!V.length)return null;const ee=Z.getTotalSize()-V[V.length-1].end;return ee>0?C.jsx("tr",{style:{height:`${ee}px`},children:C.jsx("td",{colSpan:6})}):null})()]}):C.jsxs(C.Fragment,{children:[oe.getVirtualItems().length>0?C.jsx("tr",{style:{height:`${oe.getVirtualItems()[0].start}px`},children:C.jsx("td",{colSpan:6})}):null,oe.getVirtualItems().map(V=>{const ee=se[V.index];return C.jsx(_D,{privileges:te,permission:ee.permission,depth:ee.depth,hasChild:ee.hasChild,isChild:ee.isChild,collapsed:ee.isCollapsed,toggleCollapse:ee.toggleId?()=>H(ee.toggleId):void 0,isRestrictedByDefault:u,allPrivileges:l,toastMessageCallback:fe,computedInherited:K.get(`${ee.permission.applyTo}|${ee.permission.type}`)},ee.id)}),(()=>{const V=oe.getVirtualItems();if(!V.length)return null;const ee=oe.getTotalSize()-V[V.length-1].end;return ee>0?C.jsx("tr",{style:{height:`${ee}px`},children:C.jsx("td",{colSpan:6})}):null})()]})})]}),(y||h.length)&&!S.length?C.jsx(XQ,{children:"The Permission you're looking for can't be found "}):null]})},tee=()=>C.jsx("div",{className:"flex flex-1 items-center justify-center",children:C.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-grey-200 border-t-primary-dark"})}),ree=()=>{const e=Q.useAppSelector(Q.selectRoles),t=Q.useAppDispatch(),[r,n]=T.useState(null),[i,o]=T.useState(null),[a,u]=T.useState(""),[l,d]=T.useState(null),{styles:f,attributes:h}=xl(r,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});T.useEffect(()=>{u(""),d(null)},[i]);const p=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(e).find(x=>x.role.toLowerCase()===a.toLowerCase()))throw new Error(`A role with the name ${a} already exists`);const m=GQ.generate(),y=Q.createRole(m,a,e);t(Q.updateRoles(y))};return C.jsx(_r.Popover,{children:({open:v,close:m})=>{const y=()=>{d(null);try{Te.validateName(a),p(),m()}catch(x){d(x.message)}};return C.jsxs(C.Fragment,{children:[C.jsx(_r.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:n,children:C.jsx("span",{children:C.jsx(xe.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(Ql,{children:C.jsxs(_r.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:x=>u(x.target.value),onKeyDown:x=>{x.key==="Enter"&&y()},type:"text",className:We("w-full rounded border bg-grey-300 p-1 focus:outline-none",{"border-grey-100":!l,"border-red-400":l})})]}),l&&C.jsx("p",{className:"mt-1 text-xs text-red-400",children:l})]}),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"})]})]})})]})}})},nee=()=>{const e=Q.useAppSelector(Q.selectRoles),t=Q.useAppSelector(Q.selectPrivileges),{selectedRole:r,deferredSelectedRole:n}=ox(),i=T.useMemo(()=>Object.values(e).sort((o,a)=>Te.localeCompare(o.role,a.role)),[e]);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(xe.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),C.jsx(ree,{})]}),C.jsx("div",{className:"flex-1 overflow-auto p-4 pb-10 pt-1",children:i.length>0?C.jsx("div",{className:"flex flex-col gap-4",children:i.map(o=>C.jsx(KQ,{role:o,privileges:t},o.id))}):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(xe.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"font-semibold",children:"There are no roles"}),C.jsxs("div",{className:"flex items-center text-sm",children:["Create a new role by clicking on the"," ",C.jsx(xe.FdPlus,{className:"ml-2 inline h-4 w-4 text-white"})]})]})})})})]}),C.jsx("div",{className:We("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":r}),children:C.jsx("div",{className:"flex h-full w-full select-none flex-col bg-grey-800",children:r?C.jsxs(C.Fragment,{children:[C.jsx(YQ,{}),n?C.jsx(eee,{selectedRole:n}):C.jsx(tee,{})]}):C.jsx(LD,{tab:"Role"})})})]})},gL=()=>{const e=Q.useAppSelector(Q.selectQodly),t=Q.useAppSelector(Q.selectSelectedTab),r=Q.useAppSelector(Q.selectForceLogin),n=Q.useAppSelector(Q.selectRestrictedByDefault),i=T.useRef(),o=Q.useAppDispatch();return 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(gH,{activeTab:t,forceLogin:r,restrictedByDefault:n,onTabChange:a=>{o(Q.toggleTab(a))},onForceLoginChange:a=>{o(Q.toggleForceLogin(a))},onRestrictedByDefaultChange:a=>{o(Q.toggleRestrictedByDefault(a))},qodly:e}),C.jsx("div",{className:t==="roles"?"flex flex-1 overflow-hidden":"hidden",children:C.jsx(mH,{children:C.jsx(nee,{})})}),C.jsx("div",{className:t==="privileges"?"flex flex-1 overflow-hidden":"hidden",children:C.jsx(TQ,{})})]})})})},iee=()=>{const e=Q.useAppSelector(Q.selectModals),t=Q.useAppDispatch();return C.jsx(C.Fragment,{children:e.map((r,n)=>C.jsx(Te.Modal,{hasOverlay:n===0,...r,onClose:i=>t(Q.closeModal(i)),onEdit:i=>t(Q.editModal(i)),container:Bt()},r.id))})},oee=({initialValue:e,onChange:t,...r})=>{const n=Q.useAppSelector(Q.selectRolesFlags),i=Q.useAppSelector(Q.selectRolesAndPrivileges,(a,u)=>hl.isEqual(a,u)),o=Q.useAppDispatch();return T.useEffect(()=>{if(e)try{const a=JSON.parse(e);if(hl.isEqual(a,i))return;o(Q.setRolesContent({content:a,flags:{touched:!1}}))}catch(a){console.error("[Roles Editor Standalone] Error while parsing the initial value:",a)}},[e]),Te.useDidMountEffect(()=>{if(n.touched&&t)try{const a=JSON.stringify(i,null,2);t(a)}catch(a){console.error("[Roles Editor Standalone] Error on value stringify:",a)}},[i]),C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"relative z-10 overflow-hidden",style:{height:"100vh"},children:C.jsx(gL,{...r})}),C.jsx(iee,{})]})},aee=e=>C.jsx(Q.ReduxProvider,{store:Q.getStore(),children:C.jsx(Te.TipsProvider,{children:C.jsx(oee,{...e})})});exports.ROLES_EDITOR_SCOPE_CLASS=CD.ROLES_EDITOR_SCOPE_CLASS;exports.Roles=gL;exports.Standalone=aee;
|
|
75
75
|
//# sourceMappingURL=index.cjs.js.map
|