@ws-ui/roles-editor 1.11.12-rc8 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,114 +1,72 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),C=require("react"),fe=require("@ws-ui/shared"),si=require("react-dom"),cn=require("@headlessui/react"),_e=require("@ws-ui/icons"),Je=require("@ws-ui/store"),x2=require("./common.cjs.js");function w2(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 Et=w2(C),CW=w2(si);(function(){try{const e=document.createElement("style");e.setAttribute("data-vite-dev-id","ui-components.css"),e.textContent=`/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}:root:not(#\\#),:host:not(#\\#){--color-green-500:oklch(72.3% .219 149.579);--color-blue-500:oklch(62.3% .214 259.815);--color-pink-500:oklch(65.6% .241 354.308);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-800:oklch(27.8% .033 256.848);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--text-xs:.65rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-xs:.125rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-bounce:bounce 1s infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--color-grey-50:var(--ws-grey-50);--color-grey-100:var(--ws-grey-100);--color-grey-200:var(--ws-grey-200);--color-grey-300:var(--ws-grey-300);--color-grey-400:var(--ws-grey-400);--color-grey-500:var(--ws-grey-500);--color-grey-600:var(--ws-grey-600);--color-grey-700:var(--ws-grey-700);--color-grey-800:var(--ws-grey-800);--color-primary-500:var(--ws-primary-500);--color-primary-600:var(--ws-primary-600);--color-primary-700:var(--ws-primary-700);--color-positive-200:var(--ws-positive-200);--color-positive-400:var(--ws-positive-400);--color-positive-500:var(--ws-positive-500);--color-positive-600:var(--ws-positive-600);--color-warning-500:var(--ws-warning-500);--color-negative-400:var(--ws-negative-400);--color-negative-500:var(--ws-negative-500);--text-xxs:.55rem;--text-s:.75rem;--min-height-6:1.5rem;--color-canvas-default:var(--ws-bg-default);--color-canvas-subtle:var(--ws-grey-100);--color-panel:var(--ws-grey-300);--color-panel-subtle:var(--ws-grey-200);--color-card:var(--ws-card-bg);--color-card-border:var(--ws-card-border);--color-body:var(--ws-bg-foreground);--color-body-bg:var(--ws-bg-default);--color-body-light:var(--ws-grey-100);--color-muted:var(--ws-text-muted);--color-neutral:var(--ws-grey-200);--color-button-text:var(--ws-button-fg);--color-primary:var(--ws-primary-default);--color-primary-hover:var(--ws-primary-hover);--color-primary-light:var(--ws-primary-light);--color-primary-dark:var(--ws-primary-dark);--color-positive:var(--ws-positive-500);--color-positive-hover:var(--ws-positive-hover);--color-positive-text:var(--ws-positive-text);--color-positive-bg:var(--ws-positive-bg);--color-positive-light:var(--ws-positive-light);--color-positive-dark:var(--ws-positive-dark);--color-negative:var(--ws-negative-500);--color-negative-hover:var(--ws-negative-hover);--color-negative-text:var(--ws-negative-text);--color-negative-bg:var(--ws-negative-bg);--color-negative-light:var(--ws-negative-light);--color-negative-dark:var(--ws-negative-dark);--color-warning:var(--ws-warning-500);--color-warning-hover:var(--ws-warning-hover);--color-warning-text:var(--ws-warning-text);--color-warning-bg:var(--ws-warning-bg);--color-warning-light:var(--ws-warning-light);--color-warning-dark:var(--ws-warning-dark);--color-input-bg:var(--ws-input-bg);--color-input-border:var(--ws-input-border);--color-input-text:var(--ws-input-text);--color-input-placeholder:var(--ws-input-placeholder);--color-input-focus-border:var(--ws-input-focus-border);--color-select-border:var(--ws-select-border);--color-select-text:var(--ws-select-text);--color-select-list-bg:var(--ws-select-list-bg);--color-input-option-hover-bg:var(--ws-input-option-hover-bg);--color-input-option-active-bg:var(--ws-input-option-active-bg);--color-input-option-active-text:var(--ws-input-option-active-text);--color-input-error-border:var(--ws-input-error-border);--color-input-error-bg:var(--ws-input-error-bg);--color-input-warning-border:var(--ws-input-warning-border);--color-input-warning-bg:var(--ws-input-warning-bg);--color-input-message-bg:var(--ws-input-message-bg);--color-input-message-text:var(--ws-input-message-text);--color-input-disable:var(--ws-disable-input);--color-inactive-text:var(--ws-inactive-text);--color-panel-0:var(--ws-panel-0);--color-panel-1:var(--ws-panel-1);--color-panel-2:var(--ws-panel-2);--color-panel-3:var(--ws-panel-3);--color-panel-4:var(--ws-panel-4);--color-panel-5:var(--ws-panel-5);--color-panel-border-subtle:var(--ws-panel-border-subtle);--color-tab-bg-default:var(--ws-tab-bg-default);--color-tab-border:var(--ws-tab-border);--color-tab-active-bg:var(--ws-tab-active-bg);--color-tab-active-fg:var(--ws-tab-active-fg);--color-tab-inactive-bg:var(--ws-tab-inactive-bg);--color-tab-inactive-fg:var(--ws-tab-inactive-fg);--color-panel-border:var(--ws-panel-border)}.pointer-events-auto:not(#\\#){pointer-events:auto}.pointer-events-none:not(#\\#){pointer-events:none}.collapse:not(#\\#){visibility:collapse}.visible:not(#\\#){visibility:visible}.sr-only:not(#\\#){clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute:not(#\\#){position:absolute}.fixed:not(#\\#){position:fixed}.relative:not(#\\#){position:relative}.static:not(#\\#){position:static}.inset-0:not(#\\#){inset:calc(var(--spacing)*0)}.-top-1\\/5:not(#\\#){top:-20%}.top-0:not(#\\#){top:calc(var(--spacing)*0)}.top-1:not(#\\#){top:calc(var(--spacing)*1)}.top-full:not(#\\#){top:100%}.-right-12:not(#\\#){right:calc(var(--spacing)*-12)}.right-0:not(#\\#){right:calc(var(--spacing)*0)}.right-1:not(#\\#){right:calc(var(--spacing)*1)}.bottom-0:not(#\\#){bottom:calc(var(--spacing)*0)}.bottom-full:not(#\\#){bottom:100%}.left-0:not(#\\#){left:calc(var(--spacing)*0)}.left-0\\.5:not(#\\#){left:calc(var(--spacing)*.5)}.left-1\\/2:not(#\\#){left:50%}.left-3\\.5:not(#\\#){left:calc(var(--spacing)*3.5)}.left-4:not(#\\#){left:calc(var(--spacing)*4)}.left-4\\.5:not(#\\#){left:calc(var(--spacing)*4.5)}.left-5\\.5:not(#\\#){left:calc(var(--spacing)*5.5)}.left-full:not(#\\#){left:100%}.z-1:not(#\\#){z-index:1}.z-2:not(#\\#){z-index:2}.z-10:not(#\\#){z-index:10}.z-40:not(#\\#){z-index:40}.z-50:not(#\\#){z-index:50}.z-60:not(#\\#){z-index:60}.z-9999:not(#\\#){z-index:9999}.container:not(#\\#){width:100%}@media(min-width:40rem){.container:not(#\\#){max-width:40rem}}@media(min-width:48rem){.container:not(#\\#){max-width:48rem}}@media(min-width:64rem){.container:not(#\\#){max-width:64rem}}@media(min-width:80rem){.container:not(#\\#){max-width:80rem}}@media(min-width:96rem){.container:not(#\\#){max-width:96rem}}.m-0:not(#\\#){margin:calc(var(--spacing)*0)}.m-0\\.5:not(#\\#){margin:calc(var(--spacing)*.5)}.m-px:not(#\\#){margin:1px}.mx-1:not(#\\#){margin-inline:calc(var(--spacing)*1)}.-my-1:not(#\\#){margin-block:calc(var(--spacing)*-1)}.mt-1:not(#\\#){margin-top:calc(var(--spacing)*1)}.mt-2:not(#\\#){margin-top:calc(var(--spacing)*2)}.mt-4:not(#\\#){margin-top:calc(var(--spacing)*4)}.mt-8:not(#\\#){margin-top:calc(var(--spacing)*8)}.mr-1:not(#\\#){margin-right:calc(var(--spacing)*1)}.mr-2:not(#\\#){margin-right:calc(var(--spacing)*2)}.mb-1:not(#\\#){margin-bottom:calc(var(--spacing)*1)}.mb-2:not(#\\#){margin-bottom:calc(var(--spacing)*2)}.mb-4:not(#\\#){margin-bottom:calc(var(--spacing)*4)}.ml-1:not(#\\#){margin-left:calc(var(--spacing)*1)}.ml-1\\.5:not(#\\#){margin-left:calc(var(--spacing)*1.5)}.ml-2:not(#\\#){margin-left:calc(var(--spacing)*2)}.box-border:not(#\\#){box-sizing:border-box}.block:not(#\\#){display:block}.flex:not(#\\#){display:flex}.grid:not(#\\#){display:grid}.hidden:not(#\\#){display:none}.inline:not(#\\#){display:inline}.inline-block:not(#\\#){display:inline-block}.inline-flex:not(#\\#){display:inline-flex}.table:not(#\\#){display:table}.size-1\\.5:not(#\\#){width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.size-1\\.75:not(#\\#){width:calc(var(--spacing)*1.75);height:calc(var(--spacing)*1.75)}.size-2:not(#\\#){width:calc(var(--spacing)*2);height:calc(var(--spacing)*2)}.size-2\\.5:not(#\\#){width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-3:not(#\\#){width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.size-3\\.5:not(#\\#){width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-3\\.25:not(#\\#){width:calc(var(--spacing)*3.25);height:calc(var(--spacing)*3.25)}.size-4:not(#\\#){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5:not(#\\#){width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6:not(#\\#){width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-fit:not(#\\#){width:fit-content;height:fit-content}.h-2:not(#\\#){height:calc(var(--spacing)*2)}.h-3:not(#\\#){height:calc(var(--spacing)*3)}.h-3\\.5:not(#\\#){height:calc(var(--spacing)*3.5)}.h-4:not(#\\#){height:calc(var(--spacing)*4)}.h-4\\.5:not(#\\#){height:calc(var(--spacing)*4.5)}.h-5:not(#\\#){height:calc(var(--spacing)*5)}.h-5\\.5:not(#\\#){height:calc(var(--spacing)*5.5)}.h-6:not(#\\#){height:calc(var(--spacing)*6)}.h-7:not(#\\#){height:calc(var(--spacing)*7)}.h-7\\.5:not(#\\#){height:calc(var(--spacing)*7.5)}.h-8:not(#\\#){height:calc(var(--spacing)*8)}.h-10:not(#\\#){height:calc(var(--spacing)*10)}.h-14:not(#\\#){height:calc(var(--spacing)*14)}.h-20:not(#\\#){height:calc(var(--spacing)*20)}.h-100:not(#\\#){height:calc(var(--spacing)*100)}.h-\\[120px\\]:not(#\\#){height:120px}.h-fit:not(#\\#){height:fit-content}.h-full:not(#\\#){height:100%}.max-h-\\[400px\\]:not(#\\#){max-height:400px}.max-h-full:not(#\\#){max-height:100%}.min-h-5:not(#\\#){min-height:calc(var(--spacing)*5)}.min-h-6:not(#\\#){min-height:var(--min-height-6)}.min-h-7:not(#\\#){min-height:calc(var(--spacing)*7)}.min-h-\\[100px\\]:not(#\\#){min-height:100px}.min-h-fit:not(#\\#){min-height:fit-content}.min-h-screen:not(#\\#){min-height:100vh}.w-0\\.5:not(#\\#){width:calc(var(--spacing)*.5)}.w-1\\/2:not(#\\#){width:50%}.w-3:not(#\\#){width:calc(var(--spacing)*3)}.w-3\\.5:not(#\\#){width:calc(var(--spacing)*3.5)}.w-4:not(#\\#){width:calc(var(--spacing)*4)}.w-5:not(#\\#){width:calc(var(--spacing)*5)}.w-6:not(#\\#){width:calc(var(--spacing)*6)}.w-7:not(#\\#){width:calc(var(--spacing)*7)}.w-8:not(#\\#){width:calc(var(--spacing)*8)}.w-9:not(#\\#){width:calc(var(--spacing)*9)}.w-11:not(#\\#){width:calc(var(--spacing)*11)}.w-16:not(#\\#){width:calc(var(--spacing)*16)}.w-20:not(#\\#){width:calc(var(--spacing)*20)}.w-32:not(#\\#){width:calc(var(--spacing)*32)}.w-48:not(#\\#){width:calc(var(--spacing)*48)}.w-52:not(#\\#){width:calc(var(--spacing)*52)}.w-60:not(#\\#){width:calc(var(--spacing)*60)}.w-64:not(#\\#){width:calc(var(--spacing)*64)}.w-80:not(#\\#){width:calc(var(--spacing)*80)}.w-96:not(#\\#){width:calc(var(--spacing)*96)}.w-fit:not(#\\#){width:fit-content}.w-full:not(#\\#){width:100%}.w-px:not(#\\#){width:1px}.max-w-100:not(#\\#){max-width:calc(var(--spacing)*100)}.max-w-\\[300px\\]:not(#\\#){max-width:300px}.max-w-md:not(#\\#){max-width:var(--container-md)}.min-w-0:not(#\\#){min-width:calc(var(--spacing)*0)}.min-w-3\\.5:not(#\\#){min-width:calc(var(--spacing)*3.5)}.min-w-4\\.5:not(#\\#){min-width:calc(var(--spacing)*4.5)}.min-w-5:not(#\\#){min-width:calc(var(--spacing)*5)}.min-w-7\\.5:not(#\\#){min-width:calc(var(--spacing)*7.5)}.min-w-50:not(#\\#){min-width:calc(var(--spacing)*50)}.min-w-\\[150px\\]:not(#\\#){min-width:150px}.min-w-fit:not(#\\#){min-width:fit-content}.min-w-full:not(#\\#){min-width:100%}.flex-1:not(#\\#){flex:1}.flex-3:not(#\\#){flex:3}.flex-none:not(#\\#){flex:none}.shrink-0:not(#\\#){flex-shrink:0}.origin-top-right:not(#\\#){transform-origin:100% 0}.-translate-x-1\\/2:not(#\\#){--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full:not(#\\#){--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0:not(#\\#){--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full:not(#\\#){--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-full:not(#\\#){--tw-translate-y:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0:not(#\\#){--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-1\\/2:not(#\\#){--tw-translate-y: 50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-full:not(#\\#){--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-0:not(#\\#){--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95:not(#\\#){--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100:not(#\\#){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-110:not(#\\#){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.-rotate-45:not(#\\#){rotate:-45deg}.rotate-45:not(#\\#){rotate:45deg}.rotate-90:not(#\\#){rotate:90deg}.rotate-180:not(#\\#){rotate:180deg}.transform:not(#\\#){transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-bounce:not(#\\#){animation:var(--animate-bounce)}.cursor-auto:not(#\\#){cursor:auto}.cursor-not-allowed:not(#\\#){cursor:not-allowed}.cursor-pointer:not(#\\#){cursor:pointer}.cursor-se-resize:not(#\\#){cursor:se-resize}.resize:not(#\\#){resize:both}.resize-none:not(#\\#){resize:none}.list-disc:not(#\\#){list-style-type:disc}.appearance-none:not(#\\#){-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-2:not(#\\#){grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3:not(#\\#){grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col:not(#\\#){flex-direction:column}.flex-row:not(#\\#){flex-direction:row}.flex-wrap:not(#\\#){flex-wrap:wrap}.place-content-center:not(#\\#){place-content:center}.place-items-center:not(#\\#){place-items:center}.items-center:not(#\\#){align-items:center}.items-end:not(#\\#){align-items:flex-end}.items-start:not(#\\#){align-items:flex-start}.justify-around:not(#\\#){justify-content:space-around}.justify-between:not(#\\#){justify-content:space-between}.justify-center:not(#\\#){justify-content:center}.gap-0\\.5:not(#\\#){gap:calc(var(--spacing)*.5)}.gap-1:not(#\\#){gap:calc(var(--spacing)*1)}.gap-1\\.5:not(#\\#){gap:calc(var(--spacing)*1.5)}.gap-2:not(#\\#){gap:calc(var(--spacing)*2)}.gap-2\\.5:not(#\\#){gap:calc(var(--spacing)*2.5)}.gap-3:not(#\\#){gap:calc(var(--spacing)*3)}.gap-4:not(#\\#){gap:calc(var(--spacing)*4)}.gap-6:not(#\\#){gap:calc(var(--spacing)*6)}.gap-8:not(#\\#){gap:calc(var(--spacing)*8)}.gap-10:not(#\\#){gap:calc(var(--spacing)*10)}.gap-14:not(#\\#){gap:calc(var(--spacing)*14)}:where(.space-y-1>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-1:not(#\\#){column-gap:calc(var(--spacing)*1)}.gap-x-2:not(#\\#){column-gap:calc(var(--spacing)*2)}.gap-x-3:not(#\\#){column-gap:calc(var(--spacing)*3)}.gap-x-4:not(#\\#){column-gap:calc(var(--spacing)*4)}.gap-x-20:not(#\\#){column-gap:calc(var(--spacing)*20)}:where(.space-x-4>:not(:last-child)):not(#\\#){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.truncate:not(#\\#){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden:not(#\\#){overflow:hidden}.overflow-y-auto:not(#\\#){overflow-y:auto}.rounded:not(#\\#){border-radius:.25rem}.rounded-full:not(#\\#){border-radius:3.40282e38px}.rounded-lg:not(#\\#){border-radius:var(--radius-lg)}.rounded-md:not(#\\#){border-radius:var(--radius-md)}.rounded-xs:not(#\\#){border-radius:var(--radius-xs)}.rounded-t:not(#\\#){border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-none:not(#\\#){border-top-left-radius:0;border-top-right-radius:0}.rounded-b-none:not(#\\#){border-bottom-right-radius:0;border-bottom-left-radius:0}.border:not(#\\#){border-style:var(--tw-border-style);border-width:1px}.border-0:not(#\\#){border-style:var(--tw-border-style);border-width:0}.border-2:not(#\\#){border-style:var(--tw-border-style);border-width:2px}.border-px:not(#\\#){border-width:1px}.divide:not(#\\#){border-width:.5px}.border-t:not(#\\#){border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0:not(#\\#){border-top-style:var(--tw-border-style);border-top-width:0}.border-r:not(#\\#){border-right-style:var(--tw-border-style);border-right-width:1px}.border-b:not(#\\#){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0:not(#\\#){border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed:not(#\\#){--tw-border-style:dashed;border-style:dashed}.border-body:not(#\\#){border-color:var(--color-body)}.border-body-light:not(#\\#){border-color:var(--color-body-light)}.border-canvas-default:not(#\\#){border-color:var(--color-canvas-default)}.border-card-border:not(#\\#){border-color:var(--color-card-border)}.border-grey-100:not(#\\#){border-color:var(--color-grey-100)}.border-grey-200:not(#\\#){border-color:var(--color-grey-200)}.border-input-border:not(#\\#){border-color:var(--color-input-border)}.border-input-disable:not(#\\#){border-color:var(--color-input-disable)}.border-input-error-border:not(#\\#){border-color:var(--color-input-error-border)}.border-input-focus-border:not(#\\#){border-color:var(--color-input-focus-border)}.border-input-warning-border:not(#\\#){border-color:var(--color-input-warning-border)}.border-negative:not(#\\#){border-color:var(--color-negative)}.border-negative-500:not(#\\#){border-color:var(--color-negative-500)}.border-neutral:not(#\\#){border-color:var(--color-neutral)}.border-panel:not(#\\#){border-color:var(--color-panel)}.border-panel-border:not(#\\#){border-color:var(--color-panel-border)}.border-panel-border-subtle:not(#\\#){border-color:var(--color-panel-border-subtle)}.border-panel-subtle:not(#\\#){border-color:var(--color-panel-subtle)}.border-positive:not(#\\#){border-color:var(--color-positive)}.border-positive-text:not(#\\#){border-color:var(--color-positive-text)}.border-primary:not(#\\#){border-color:var(--color-primary)}.border-primary-700:not(#\\#){border-color:var(--color-primary-700)}.border-primary-hover:not(#\\#){border-color:var(--color-primary-hover)}.border-select-border:not(#\\#){border-color:var(--color-select-border)}.border-tab-border:not(#\\#){border-color:var(--color-tab-border)}.border-transparent:not(#\\#){border-color:#0000}.border-warning:not(#\\#){border-color:var(--color-warning)}.border-warning-bg:not(#\\#){border-color:var(--color-warning-bg)}.border-white:not(#\\#){border-color:var(--color-white)}.bg-blue-500:not(#\\#){background-color:var(--color-blue-500)}.bg-body:not(#\\#){background-color:var(--color-body)}.bg-body-bg:not(#\\#){background-color:var(--color-body-bg)}.bg-canvas-default:not(#\\#){background-color:var(--color-canvas-default)}.bg-canvas-subtle:not(#\\#){background-color:var(--color-canvas-subtle)}.bg-card:not(#\\#){background-color:var(--color-card)}.bg-gray-100:not(#\\#){background-color:var(--color-gray-100)}.bg-grey-50:not(#\\#){background-color:var(--color-grey-50)}.bg-grey-200:not(#\\#){background-color:var(--color-grey-200)}.bg-grey-300:not(#\\#){background-color:var(--color-grey-300)}.bg-grey-400:not(#\\#){background-color:var(--color-grey-400)}.bg-grey-500:not(#\\#){background-color:var(--color-grey-500)}.bg-grey-600:not(#\\#){background-color:var(--color-grey-600)}.bg-grey-700:not(#\\#){background-color:var(--color-grey-700)}.bg-grey-800:not(#\\#){background-color:var(--color-grey-800)}.bg-input-bg:not(#\\#){background-color:var(--color-input-bg)}.bg-input-border:not(#\\#){background-color:var(--color-input-border)}.bg-input-disable:not(#\\#){background-color:var(--color-input-disable)}.bg-input-error-bg:not(#\\#){background-color:var(--color-input-error-bg)}.bg-input-message-bg:not(#\\#){background-color:var(--color-input-message-bg)}.bg-input-option-active-bg:not(#\\#){background-color:var(--color-input-option-active-bg)}.bg-input-option-hover-bg:not(#\\#){background-color:var(--color-input-option-hover-bg)}.bg-input-text:not(#\\#){background-color:var(--color-input-text)}.bg-input-warning-bg:not(#\\#){background-color:var(--color-input-warning-bg)}.bg-negative:not(#\\#){background-color:var(--color-negative)}.bg-negative-400:not(#\\#){background-color:var(--color-negative-400)}.bg-negative-500:not(#\\#){background-color:var(--color-negative-500)}.bg-negative-bg:not(#\\#){background-color:var(--color-negative-bg)}.bg-negative-hover:not(#\\#){background-color:var(--color-negative-hover)}.bg-negative-light:not(#\\#){background-color:var(--color-negative-light)}.bg-panel:not(#\\#){background-color:var(--color-panel)}.bg-panel-0:not(#\\#){background-color:var(--color-panel-0)}.bg-panel-1:not(#\\#){background-color:var(--color-panel-1)}.bg-panel-2:not(#\\#){background-color:var(--color-panel-2)}.bg-panel-3:not(#\\#){background-color:var(--color-panel-3)}.bg-panel-4:not(#\\#){background-color:var(--color-panel-4)}.bg-panel-5:not(#\\#){background-color:var(--color-panel-5)}.bg-panel-subtle:not(#\\#){background-color:var(--color-panel-subtle)}.bg-positive:not(#\\#){background-color:var(--color-positive)}.bg-positive-200:not(#\\#){background-color:var(--color-positive-200)}.bg-positive-500:not(#\\#){background-color:var(--color-positive-500)}.bg-positive-bg:not(#\\#){background-color:var(--color-positive-bg)}.bg-positive-hover:not(#\\#){background-color:var(--color-positive-hover)}.bg-positive-light:not(#\\#){background-color:var(--color-positive-light)}.bg-primary:not(#\\#){background-color:var(--color-primary)}.bg-primary-500:not(#\\#){background-color:var(--color-primary-500)}.bg-primary-600:not(#\\#){background-color:var(--color-primary-600)}.bg-primary-hover:not(#\\#){background-color:var(--color-primary-hover)}.bg-primary-light:not(#\\#){background-color:var(--color-primary-light)}.bg-primary\\/30:not(#\\#){background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/30:not(#\\#){background-color:color-mix(in oklab,var(--color-primary)30%,transparent)}}.bg-select-list-bg:not(#\\#){background-color:var(--color-select-list-bg)}.bg-tab-active-bg:not(#\\#){background-color:var(--color-tab-active-bg)}.bg-tab-bg-default:not(#\\#){background-color:var(--color-tab-bg-default)}.bg-tab-inactive-bg:not(#\\#){background-color:var(--color-tab-inactive-bg)}.bg-transparent:not(#\\#){background-color:#0000}.bg-warning:not(#\\#){background-color:var(--color-warning)}.bg-warning-500:not(#\\#){background-color:var(--color-warning-500)}.bg-warning-bg:not(#\\#){background-color:var(--color-warning-bg)}.bg-warning-hover:not(#\\#){background-color:var(--color-warning-hover)}.bg-warning-light:not(#\\#){background-color:var(--color-warning-light)}.bg-white:not(#\\#){background-color:var(--color-white)}.bg-linear-to-r:not(#\\#){--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-r:not(#\\#){--tw-gradient-position:to right in oklab}}.bg-linear-to-r:not(#\\#){background-image:linear-gradient(var(--tw-gradient-stops))}.from-green-500:not(#\\#){--tw-gradient-from:var(--color-green-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-primary:not(#\\#){--tw-gradient-from:var(--color-primary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-blue-500:not(#\\#){--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-pink-500:not(#\\#){--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.stroke-current:not(#\\#){stroke:currentColor}.p-0:not(#\\#){padding:calc(var(--spacing)*0)}.p-0\\.5:not(#\\#){padding:calc(var(--spacing)*.5)}.p-1:not(#\\#){padding:calc(var(--spacing)*1)}.p-1\\!{padding:calc(var(--spacing)*1)!important}.p-1\\.5:not(#\\#){padding:calc(var(--spacing)*1.5)}.p-2:not(#\\#){padding:calc(var(--spacing)*2)}.p-2\\.5:not(#\\#){padding:calc(var(--spacing)*2.5)}.p-3:not(#\\#){padding:calc(var(--spacing)*3)}.p-4:not(#\\#){padding:calc(var(--spacing)*4)}.p-6:not(#\\#){padding:calc(var(--spacing)*6)}.p-8:not(#\\#){padding:calc(var(--spacing)*8)}.p-10:not(#\\#){padding:calc(var(--spacing)*10)}.p-50:not(#\\#){padding:calc(var(--spacing)*50)}.p-px:not(#\\#){padding:1px}.px-0\\.5:not(#\\#){padding-inline:calc(var(--spacing)*.5)}.px-1:not(#\\#){padding-inline:calc(var(--spacing)*1)}.px-1\\.5:not(#\\#){padding-inline:calc(var(--spacing)*1.5)}.px-2:not(#\\#){padding-inline:calc(var(--spacing)*2)}.px-3:not(#\\#){padding-inline:calc(var(--spacing)*3)}.px-4:not(#\\#){padding-inline:calc(var(--spacing)*4)}.px-6:not(#\\#){padding-inline:calc(var(--spacing)*6)}.px-7:not(#\\#){padding-inline:calc(var(--spacing)*7)}.px-8:not(#\\#){padding-inline:calc(var(--spacing)*8)}.py-0\\.5:not(#\\#){padding-block:calc(var(--spacing)*.5)}.py-1:not(#\\#){padding-block:calc(var(--spacing)*1)}.py-1\\.5:not(#\\#){padding-block:calc(var(--spacing)*1.5)}.py-2:not(#\\#){padding-block:calc(var(--spacing)*2)}.py-3:not(#\\#){padding-block:calc(var(--spacing)*3)}.pt-0\\.5:not(#\\#){padding-top:calc(var(--spacing)*.5)}.pt-1:not(#\\#){padding-top:calc(var(--spacing)*1)}.pt-1\\.5:not(#\\#){padding-top:calc(var(--spacing)*1.5)}.pt-2:not(#\\#){padding-top:calc(var(--spacing)*2)}.pl-1:not(#\\#){padding-left:calc(var(--spacing)*1)}.pl-4:not(#\\#){padding-left:calc(var(--spacing)*4)}.text-center:not(#\\#){text-align:center}.text-left:not(#\\#){text-align:left}.text-2xl:not(#\\#){font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl:not(#\\#){font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl:not(#\\#){font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl:not(#\\#){font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-6xl:not(#\\#){font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-7xl:not(#\\#){font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}.text-8xl:not(#\\#){font-size:var(--text-8xl);line-height:var(--tw-leading,var(--text-8xl--line-height))}.text-9xl:not(#\\#){font-size:var(--text-9xl);line-height:var(--tw-leading,var(--text-9xl--line-height))}.text-base:not(#\\#){font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg:not(#\\#){font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm:not(#\\#){font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl:not(#\\#){font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs:not(#\\#){font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-s:not(#\\#){font-size:var(--text-s)}.text-xxs:not(#\\#){font-size:var(--text-xxs)}.leading-3:not(#\\#){--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}.leading-4:not(#\\#){--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-5:not(#\\#){--tw-leading:calc(var(--spacing)*5);line-height:calc(var(--spacing)*5)}.leading-none:not(#\\#){--tw-leading:1;line-height:1}.font-bold:not(#\\#){--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium:not(#\\#){--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold:not(#\\#){--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-thin:not(#\\#){--tw-font-weight:var(--font-weight-thin);font-weight:var(--font-weight-thin)}.whitespace-nowrap:not(#\\#){white-space:nowrap}.text-body:not(#\\#){color:var(--color-body)}.text-button-text:not(#\\#){color:var(--color-button-text)}.text-gray-50:not(#\\#){color:var(--color-gray-50)}.text-gray-400:not(#\\#){color:var(--color-gray-400)}.text-gray-500:not(#\\#){color:var(--color-gray-500)}.text-gray-800:not(#\\#){color:var(--color-gray-800)}.text-grey-100:not(#\\#){color:var(--color-grey-100)}.text-grey-200:not(#\\#){color:var(--color-grey-200)}.text-grey-300:not(#\\#){color:var(--color-grey-300)}.text-grey-700:not(#\\#){color:var(--color-grey-700)}.text-inactive-text:not(#\\#){color:var(--color-inactive-text)}.text-inherit:not(#\\#){color:inherit}.text-input-disable:not(#\\#){color:var(--color-input-disable)}.text-input-message-text:not(#\\#){color:var(--color-input-message-text)}.text-input-option-active-text:not(#\\#){color:var(--color-input-option-active-text)}.text-input-placeholder:not(#\\#){color:var(--color-input-placeholder)}.text-input-text:not(#\\#){color:var(--color-input-text)}.text-muted:not(#\\#){color:var(--color-muted)}.text-negative:not(#\\#){color:var(--color-negative)}.text-negative-500:not(#\\#){color:var(--color-negative-500)}.text-negative-dark:not(#\\#){color:var(--color-negative-dark)}.text-negative-text:not(#\\#){color:var(--color-negative-text)}.text-panel-subtle:not(#\\#){color:var(--color-panel-subtle)}.text-positive:not(#\\#){color:var(--color-positive)}.text-positive-500:not(#\\#){color:var(--color-positive-500)}.text-positive-600:not(#\\#){color:var(--color-positive-600)}.text-positive-dark:not(#\\#){color:var(--color-positive-dark)}.text-positive-text:not(#\\#),.text-positive-text\\/70:not(#\\#){color:var(--color-positive-text)}@supports (color:color-mix(in lab,red,red)){.text-positive-text\\/70:not(#\\#){color:color-mix(in oklab,var(--color-positive-text)70%,transparent)}}.text-primary:not(#\\#){color:var(--color-primary)}.text-primary-dark:not(#\\#){color:var(--color-primary-dark)}.text-primary-hover:not(#\\#){color:var(--color-primary-hover)}.text-select-text:not(#\\#){color:var(--color-select-text)}.text-tab-active-fg:not(#\\#){color:var(--color-tab-active-fg)}.text-tab-inactive-fg:not(#\\#){color:var(--color-tab-inactive-fg)}.text-warning:not(#\\#){color:var(--color-warning)}.text-warning-dark:not(#\\#){color:var(--color-warning-dark)}.text-warning-text:not(#\\#){color:var(--color-warning-text)}.capitalize:not(#\\#){text-transform:capitalize}.lowercase:not(#\\#){text-transform:lowercase}.uppercase:not(#\\#){text-transform:uppercase}.italic:not(#\\#){font-style:italic}.underline:not(#\\#){text-decoration-line:underline}.decoration-transparent:not(#\\#){text-decoration-color:#0000}.opacity-0:not(#\\#){opacity:0}.opacity-50:not(#\\#){opacity:.5}.opacity-60:not(#\\#){opacity:.6}.opacity-80:not(#\\#){opacity:.8}.opacity-100:not(#\\#){opacity:1}.shadow:not(#\\#){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner:not(#\\#){--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg:not(#\\#){--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md:not(#\\#){--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs:not(#\\#){--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-input-error-border:not(#\\#){--tw-ring-color:var(--color-input-error-border)}.ring-input-focus-border:not(#\\#){--tw-ring-color:var(--color-input-focus-border)}.ring-input-warning-border:not(#\\#){--tw-ring-color:var(--color-input-warning-border)}.ring-positive:not(#\\#){--tw-ring-color:var(--color-positive)}.outline-hidden:not(#\\#){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden:not(#\\#){outline-offset:2px;outline:2px solid #0000}}.outline:not(#\\#),.outline-1:not(#\\#){outline-style:var(--tw-outline-style);outline-width:1px}.outline-s:not(#\\#){outline-width:.5px}.outline-xs:not(#\\#){outline-width:.3px}.outline-xxs:not(#\\#){outline-width:.1px}.outline-canvas-default:not(#\\#){outline-color:var(--color-canvas-default)}.outline-primary:not(#\\#){outline-color:var(--color-primary)}.blur:not(#\\#){--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter:not(#\\#){filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition:not(#\\#){transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all:not(#\\#){transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors:not(#\\#){transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity:not(#\\#){transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform:not(#\\#){transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150:not(#\\#){--tw-duration:.15s;transition-duration:.15s}.duration-200:not(#\\#){--tw-duration:.2s;transition-duration:.2s}.duration-300:not(#\\#){--tw-duration:.3s;transition-duration:.3s}.ease-in-out:not(#\\#){--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out:not(#\\#){--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-solid:not(#\\#){--tw-outline-style:solid;outline-style:solid}.select-none:not(#\\#){-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:flex:is(:where(.group):hover *):not(#\\#){display:flex}.group-hover\\:grid:is(:where(.group):hover *):not(#\\#){display:grid}.group-hover\\:border-body:is(:where(.group):hover *):not(#\\#){border-color:var(--color-body)}.group-hover\\:border-negative-text:is(:where(.group):hover *):not(#\\#){border-color:var(--color-negative-text)}.group-hover\\:border-positive-text:is(:where(.group):hover *):not(#\\#){border-color:var(--color-positive-text)}.group-hover\\:border-warning-text:is(:where(.group):hover *):not(#\\#){border-color:var(--color-warning-text)}.group-hover\\:bg-grey-400:is(:where(.group):hover *):not(#\\#){background-color:var(--color-grey-400)}.group-hover\\:bg-negative-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-negative-hover)}.group-hover\\:bg-negative-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-negative-light)}.group-hover\\:bg-positive-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-positive-hover)}.group-hover\\:bg-positive-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-positive-light)}.group-hover\\:bg-primary-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-primary-hover)}.group-hover\\:bg-primary-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-primary-light)}.group-hover\\:bg-warning-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-warning-hover)}.group-hover\\:bg-warning-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-warning-light)}.group-hover\\:opacity-100:is(:where(.group):hover *):not(#\\#){opacity:1}}.placeholder\\:text-sm:not(#\\#)::placeholder{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.placeholder\\:text-xs:not(#\\#)::placeholder{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.placeholder\\:text-s:not(#\\#)::placeholder{font-size:var(--text-s)}.placeholder\\:text-input-placeholder:not(#\\#)::placeholder{color:var(--color-input-placeholder)}.placeholder\\:opacity-60:not(#\\#)::placeholder{opacity:.6}.first\\:bottom-full:first-child:not(#\\#){bottom:100%}.first\\:-ml-1\\.5:first-child:not(#\\#){margin-left:calc(var(--spacing)*-1.5)}.first\\:rounded-t:first-child:not(#\\#){border-top-left-radius:.25rem;border-top-right-radius:.25rem}.first\\:rounded-l:first-child:not(#\\#){border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.last\\:top-full:last-child:not(#\\#){top:100%}.last\\:-mr-1\\.5:last-child:not(#\\#){margin-right:calc(var(--spacing)*-1.5)}.last\\:rounded-r:last-child:not(#\\#){border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.last\\:rounded-b:last-child:not(#\\#){border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.only\\:top-full:only-child:not(#\\#){top:100%}.only\\:-mx-0\\.5:only-child:not(#\\#){margin-inline:calc(var(--spacing)*-.5)}.only\\:rounded:only-child:not(#\\#){border-radius:.25rem}.only\\:ring-1:only-child:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\\:border-input-error-border:focus-within:not(#\\#){border-color:var(--color-input-error-border)}.focus-within\\:border-input-focus-border:focus-within:not(#\\#){border-color:var(--color-input-focus-border)}.focus-within\\:border-input-warning-border:focus-within:not(#\\#){border-color:var(--color-input-warning-border)}.focus-within\\:border-positive:focus-within:not(#\\#){border-color:var(--color-positive)}@media(hover:hover){.hover\\:border-black:hover:not(#\\#){border-color:var(--color-black)}.hover\\:border-canvas-subtle:hover:not(#\\#){border-color:var(--color-canvas-subtle)}.hover\\:border-negative-hover:hover:not(#\\#){border-color:var(--color-negative-hover)}.hover\\:border-positive-hover:hover:not(#\\#){border-color:var(--color-positive-hover)}.hover\\:border-primary-hover:hover:not(#\\#){border-color:var(--color-primary-hover)}.hover\\:border-warning-hover:hover:not(#\\#){border-color:var(--color-warning-hover)}.hover\\:bg-canvas-subtle:hover:not(#\\#){background-color:var(--color-canvas-subtle)}.hover\\:bg-grey-500:hover:not(#\\#){background-color:var(--color-grey-500)}.hover\\:bg-grey-700:hover:not(#\\#){background-color:var(--color-grey-700)}.hover\\:bg-input-option-hover-bg:hover:not(#\\#){background-color:var(--color-input-option-hover-bg)}.hover\\:bg-negative:hover:not(#\\#){background-color:var(--color-negative)}.hover\\:bg-negative-hover:hover:not(#\\#){background-color:var(--color-negative-hover)}.hover\\:bg-positive:hover:not(#\\#){background-color:var(--color-positive)}.hover\\:bg-positive-hover:hover:not(#\\#){background-color:var(--color-positive-hover)}.hover\\:bg-primary-600:hover:not(#\\#){background-color:var(--color-primary-600)}.hover\\:bg-primary-hover:hover:not(#\\#){background-color:var(--color-primary-hover)}.hover\\:bg-primary\\/20:hover:not(#\\#){background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/20:hover:not(#\\#){background-color:color-mix(in oklab,var(--color-primary)20%,transparent)}}.hover\\:bg-transparent:hover:not(#\\#){background-color:#0000}.hover\\:bg-warning:hover:not(#\\#){background-color:var(--color-warning)}.hover\\:bg-warning-hover:hover:not(#\\#){background-color:var(--color-warning-hover)}.hover\\:text-body:hover:not(#\\#){color:var(--color-body)}.hover\\:text-button-text:hover:not(#\\#){color:var(--color-button-text)}.hover\\:text-grey-200:hover:not(#\\#){color:var(--color-grey-200)}.hover\\:text-negative-400:hover:not(#\\#){color:var(--color-negative-400)}.hover\\:text-negative-hover:hover:not(#\\#){color:var(--color-negative-hover)}.hover\\:text-positive-400:hover:not(#\\#){color:var(--color-positive-400)}.hover\\:text-positive-hover:hover:not(#\\#){color:var(--color-positive-hover)}.hover\\:text-positive-text:hover:not(#\\#){color:var(--color-positive-text)}.hover\\:text-primary-hover:hover:not(#\\#){color:var(--color-primary-hover)}.hover\\:text-tab-active-fg:hover:not(#\\#){color:var(--color-tab-active-fg)}.hover\\:text-warning-hover:hover:not(#\\#){color:var(--color-warning-hover)}.hover\\:decoration-current:hover:not(#\\#){text-decoration-color:currentColor}}.focus\\:bg-transparent:focus:not(#\\#){background-color:#0000}.focus\\:ring-2:focus:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-negative:focus:not(#\\#){--tw-ring-color:var(--color-negative)}.focus\\:ring-positive:focus:not(#\\#){--tw-ring-color:var(--color-positive)}.focus\\:ring-primary:focus:not(#\\#){--tw-ring-color:var(--color-primary)}.focus\\:ring-warning:focus:not(#\\#){--tw-ring-color:var(--color-warning)}.focus\\:ring-offset-0:focus:not(#\\#){--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:ring-offset-2:focus:not(#\\#){--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:outline-hidden:focus:not(#\\#){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\\:outline-hidden:focus:not(#\\#){outline-offset:2px;outline:2px solid #0000}}.focus-visible\\:ring-2:focus-visible:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-primary:focus-visible:not(#\\#){--tw-ring-color:var(--color-primary)}.focus-visible\\:ring-offset-2:focus-visible:not(#\\#){--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}:root:not(#\\#){--ws-primary-50:#f2ddff;--ws-primary-100:#edd0ff;--ws-primary-300:#d0acef;--ws-primary-400:#c190ea;--ws-primary-600:#935ebf;--ws-primary-800:#563374;--ws-primary-900:#381e4f;--ws-primary-950:#29133c;--ws-positive-50:#ecf9f2;--ws-positive-100:#d9f2e6;--ws-positive-300:#8ed9b3;--ws-positive-400:#68cd99;--ws-positive-700:#28734d;--ws-positive-800:#28734d;--ws-positive-900:#0d261a;--ws-positive-950:#07130d;--ws-warning-50:#fff7e6;--ws-warning-100:#ffefcc;--ws-warning-300:#fed066;--ws-warning-400:#fdc133;--ws-warning-700:#986a00;--ws-warning-800:#654700;--ws-warning-900:#332300;--ws-warning-950:#191200;--ws-negative-50:#feeeee;--ws-negative-100:#fcdcdc;--ws-negative-300:#f69797;--ws-negative-400:#f37575;--ws-negative-700:#9a3232;--ws-negative-800:#6e2222;--ws-negative-900:#431212;--ws-negative-950:#2e0a0a;--ws-grey-300:#535353;--ws-grey-400:#484848;--ws-grey-600:#3f3f3f;--ws-palette-primary-200:#e0c7f5;--ws-palette-primary-500:#b174e5;--ws-palette-primary-700:#75499a;--ws-button-bg:var(--vscode-button-background,var(--theia-button-background,var(--ws-palette-primary-500)));--ws-button-fg:var(--vscode-button-foreground,var(--theia-button-foreground,var(--ws-palette-white)));--ws-primary-default:var(--ws-button-bg);--ws-button-text:var(--ws-button-fg);--ws-primary-hover:var(--vscode-button-hoverBackground,var(--theia-button-hoverBackground,var(--ws-palette-primary-700)));--ws-primary-light:var(--vscode-editorInfo-foreground,var(--theia-button-secondaryForeground,var(--ws-palette-primary-200)));--ws-primary-dark:var(--vscode-editor-lineHighlightBackground,var(--theia-button-secondaryBackground,var(--ws-palette-primary-700)));--ws-primary-200:var(--ws-primary-light);--ws-primary-500:var(--ws-primary-default);--ws-primary-700:var(--ws-primary-hover);--ws-palette-positive-200:#b3e6cc;--ws-palette-positive-500:#42c080;--ws-palette-positive-600:#359a66;--ws-positive-dark:var(--vscode-gitDecoration-addedResourceForeground,var(--ws-palette-positive-600));--ws-positive-hover:var(--ws-positive-dark);--ws-positive-bg:var(--ws-palette-positive-100);--ws-positive-light:var(--ws-palette-positive-200);--ws-positive-border:var(--ws-positive-500);--ws-positive-text:var(--ws-positive-500);--ws-positive-500:var(--vscode-testing-iconPassed,var(--ws-palette-positive-500));--ws-positive-200:var(--ws-positive-light);--ws-positive-600:var(--ws-positive-dark);--ws-palette-warning-200:#fee099;--ws-palette-warning-500:#fdb100;--ws-palette-warning-600:#ca8e00;--ws-warning-hover:var(--ws-warning-600);--ws-warning-text:var(--ws-warning-500);--ws-warning-border:var(--ws-warning-500);--ws-warning-500:var(--vscode-list-warningForeground,var(--ws-palette-warning-500));--ws-warning-bg:var(--vscode-inputValidation-warningBackground,var(--ws-palette-warning-500));--ws-warning-light:var(--vscode-inputValidation-warningBackground,var(--ws-palette-warning-200));--ws-warning-dark:var(--vscode-inputValidation-warningBackground,var(--ws-palette-warning-600));--ws-warning-200:var(--ws-warning-light);--ws-warning-600:var(--ws-warning-dark);--ws-palette-negative-200:#f9baba;--ws-palette-negative-500:#f05252;--ws-palette-negative-600:#c54242;--ws-negative-hover:var(--ws-negative-600);--ws-negative-text:var(--ws-negative-500);--ws-negative-500:var(--vscode-errorForeground,var(--ws-palette-negative-500));--ws-negative-light:var(--vscode-inputValidation-errorBackground,var(--ws-palette-negative-200));--ws-negative-dark:var(--vscode-inputValidation-errorBackground,var(--ws-palette-negative-600));--ws-negative-200:var(--ws-negative-light);--ws-negative-600:var(--ws-negative-dark);--ws-palette-white:#fff;--ws-palette-grey-50:#f1f5f9;--ws-palette-grey-100:#ccc;--ws-palette-grey-200:#888;--ws-palette-grey-300:#535353;--ws-palette-grey-400:#484848;--ws-palette-grey-500:#444;--ws-palette-grey-600:#3f3f3f;--ws-palette-grey-700:#393939;--ws-palette-grey-800:#383838;--ws-palette-grey-900:#262626;--ws-palette-grey-950:#151515;--ws-bg-default:var(--vscode-editor-background,var(--theia-editor-background,var(--ws-palette-white)));--ws-bg-foreground:var(--vscode-editor-foreground,var(--theia-editor-foreground,var(--ws-palette-grey-50)));--ws-grey-50:var(--ws-bg-foreground);--ws-grey-100:var(--vscode-panel-background,var(--theia-panel-background,var(--ws-palette-grey-100)));--ws-grey-200:var(--vscode-editor-background,var(--theia-editor-background,var(--ws-palette-grey-200)));--ws-grey-950:var(--vscode-panel-border,var(--theia-border-color,var(--ws-palette-grey-950)));--ws-grey-500:var(--vscode-descriptionForeground,var(--ws-palette-grey-500));--ws-grey-800:var(--vscode-descriptionForeground,var(--ws-palette-grey-800));--ws-card-bg:var(--vscode-editorGroupHeader-tabsBackground,var(--theia-editorGroupHeader-tabsBackground,var(--ws-palette-grey-900)));--ws-card-border:var(--vscode-editorGroupHeader-tabsBorder,var(--theia-editorGroupHeader-tabsBorder,var(--ws-palette-grey-50)));--ws-palette-input-bg:var(--ws-palette-grey-300);--ws-palette-input-border:var(--ws-palette-grey-300);--ws-palette-input-text:var(--ws-palette-grey-50);--ws-palette-input-placeholder:var(--ws-palette-grey-200);--ws-palette-input-focus-border:var(--ws-palette-grey-50);--ws-input-bg:var(--vscode-input-background,var(--vscode-editorWidget-background,var(--theia-input-background,var(--ws-palette-input-bg))));--ws-input-border:var(--vscode-input-border,var(--vscode-panel-border,var(--theia-input-border,var(--ws-palette-input-border))));--ws-input-text:var(--vscode-input-foreground,var(--vscode-editor-foreground,var(--theia-input-foreground,var(--ws-palette-input-text))));--ws-input-placeholder:var(--vscode-input-placeholderForeground,var(--vscode-editor-foreground,var(--theia-input-placeholderForeground,var(--ws-palette-input-placeholder))));--ws-input-focus-border:var(--vscode-focusBorder,var(--vscode-button-background,var(--theia-focusBorder,var(--ws-palette-primary-500))));--ws-select-bg:var(--vscode-dropdown-background,var(--vscode-editorWidget-background,var(--theia-dropdown-background,var(--ws-input-bg))));--ws-select-border:var(--vscode-dropdown-border,var(--vscode-panel-border,var(--theia-dropdown-border,var(--ws-input-border))));--ws-select-text:var(--vscode-dropdown-foreground,var(--vscode-editor-foreground,var(--theia-dropdown-foreground,var(--ws-input-text))));--ws-select-list-bg:var(--vscode-dropdown-listBackground,var(--vscode-editorWidget-background,var(--theia-editorWidget-background,var(--ws-palette-grey-900))));--ws-input-option-hover-bg:var(--vscode-list-hoverBackground,var(--vscode-button-hoverBackground,var(--theia-list-hoverBackground,var(--ws-palette-primary-700))));--ws-input-option-active-bg:var(--vscode-list-activeSelectionBackground,var(--theia-list-activeSelectionBackground,var(--ws-palette-primary-500)));--ws-input-option-active-text:var(--vscode-list-activeSelectionForeground,var(--theia-list-activeSelectionForeground,var(--ws-palette-white)));--ws-input-error-border:var(--vscode-inputValidation-errorBorder,var(--theia-inputValidation-errorBorder,var(--ws-palette-negative-500)));--ws-input-error-bg:var(--vscode-inputValidation-errorBackground,var(--theia-inputValidation-errorBackground,var(--ws-palette-negative-200)));--ws-input-warning-border:var(--vscode-inputValidation-warningBorder,var(--theia-inputValidation-warningBorder,var(--ws-palette-warning-500)));--ws-input-warning-bg:var(--vscode-inputValidation-warningBackground,var(--theia-inputValidation-warningBackground,var(--ws-palette-warning-200)));--ws-input-info-bg:var(--vscode-panel-background,var(--theia-inputValidation-infoBackground,var(--ws-palette-primary-200)));--ws-input-message-bg:var(--vscode-editor-lineHighlightBackground,var(--vscode-editorWidget-background,var(--theia-inputValidation-infoBackground,var(--ws-palette-primary-200))));--ws-input-message-text:var(--vscode-editorInfo-foreground,var(--vscode-editor-foreground,var(--theia-inputValidation-infoForeground,var(--ws-palette-primary-500))));--ws-inactive-text:var(--vscode-disabledForeground,var(--theia-disabled-foreground,var(--ws-palette-grey-200)));--ws-text-muted:var(--vscode-descriptionForeground,var(--vscode-editor-foreground,var(--theia-descriptionForeground,var(--ws-palette-grey-100))));--ws-disable-bg:var(--vscode-button-disabledBackground,var(--theia-button-disabledBackground,var(--ws-palette-grey-300)));--ws-disable-input:var(--vscode-button-disabledBackground,var(--theia-button-disabledBackground,var(--ws-palette-grey-200)));--ws-panel-0:var(--vscode-editor-background,var(--theia-editor-background,var(--ws-palette-grey-900)));--ws-panel-1:var(--vscode-sideBar-background,var(--vscode-panel-background,var(--theia-sideBar-background,var(--ws-palette-grey-700))));--ws-panel-2:var(--vscode-panel-background,var(--vscode-editor-background,var(--theia-panel-background,var(--ws-palette-grey-900))));--ws-panel-3:var(--vscode-editorGroupHeader-tabsBackground,var(--vscode-editorWidget-background,var(--theia-editorGroupHeader-tabsBackground,var(--ws-palette-grey-900))));--ws-panel-4:var(--vscode-editorWidget-background,var(--theia-editorWidget-background,var(--ws-palette-grey-300)));--ws-panel-5:var(--vscode-editorWidget-background,var(--theia-editorWidget-background,var(--ws-palette-grey-950)));--ws-panel-border-subtle:var(--vscode-panel-border,var(--vscode-tab-border,var(--theia-border-color,var(--ws-palette-grey-100))));--ws-panel-border-strong:var(--vscode-contrastBorder,var(--vscode-focusBorder,var(--theia-contrastBorder,var(--ws-palette-grey-300))));--ws-tab-bg-default:var(--vscode-editorGroupHeader-tabsBackground,var(--vscode-editorWidget-background,var(--ws-palette-grey-900)));--ws-tab-border:var(--vscode-tab-border,var(--vscode-editorGroupHeader-tabsBorder,var(--ws-palette-grey-950)));--ws-tab-active-bg:var(--vscode-tab-activeBackground,var(--ws-palette-grey-800));--ws-tab-active-fg:var(--vscode-tab-activeForeground,var(--vscode-editor-foreground,var(--ws-bg-foreground)));--ws-tab-inactive-bg:var(--vscode-tab-inactiveBackground,var(--ws-palette-grey-900));--ws-tab-inactive-fg:var(--vscode-tab-inactiveForeground,var(--vscode-descriptionForeground,var(--ws-palette-grey-200)));--ws-tab-hover-bg:var(--vscode-tab-hoverBackground,var(--vscode-toolbar-hoverBackground,var(--ws-palette-grey-700)));--ws-panel-header-bg:var(--vscode-sideBarSectionHeader-background,var(--vscode-editorGroupHeader-tabsBackground,var(--ws-palette-grey-800)));--ws-panel-header-fg:var(--vscode-sideBarSectionHeader-foreground,var(--vscode-editor-foreground,var(--ws-bg-foreground)));--ws-panel-bg:var(--vscode-panel-background,var(--vscode-editor-background,var(--ws-bg-default)));--ws-panel-border:var(--vscode-panel-border,var(--vscode-tab-border,var(--ws-palette-grey-950)));--ws-panel-title-active-border:var(--vscode-panelTitle-activeBorder,var(--vscode-focusBorder,var(--ws-palette-primary-500)));--ws-panel-title-active-fg:var(--vscode-panelTitle-activeForeground,var(--vscode-editor-foreground,var(--ws-bg-foreground)));--ws-panel-title-inactive-fg:var(--vscode-panelTitle-inactiveForeground,var(--vscode-descriptionForeground,var(--ws-palette-grey-100)))}.center-absolute:not(#\\#){--tw-translate-x: -50% ;--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y);transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,);position:absolute;top:50%;left:50%}.ws-group:hover .ws-checkbox-hover-target{opacity:1!important}.simplebar-scrollbar:not(#\\#):before{background-color:#ccc}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}[data-simplebar]{position:relative;flex-direction:column;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start}.simplebar-wrapper{overflow:hidden;width:inherit;height:inherit;max-width:inherit;max-height:inherit}.simplebar-mask{direction:inherit;position:absolute;overflow:hidden;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto!important;height:auto!important;z-index:0}.simplebar-offset{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.simplebar-content-wrapper{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:auto;max-width:100%;max-height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.simplebar-content-wrapper::-webkit-scrollbar,.simplebar-hide-scrollbar::-webkit-scrollbar{display:none;width:0;height:0}.simplebar-content:after,.simplebar-content:before{content:" ";display:table}.simplebar-placeholder{max-height:100%;max-width:100%;width:100%;pointer-events:none}.simplebar-height-auto-observer-wrapper{box-sizing:inherit!important;height:100%;width:100%;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;flex-grow:inherit;flex-shrink:0;flex-basis:0}.simplebar-height-auto-observer{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:1000%;width:1000%;min-height:1px;min-width:1px;overflow:hidden;pointer-events:none;z-index:-1}.simplebar-track{z-index:1;position:absolute;right:0;bottom:0;pointer-events:none;overflow:hidden}[data-simplebar].simplebar-dragging,[data-simplebar].simplebar-dragging .simplebar-content{pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[data-simplebar].simplebar-dragging .simplebar-track{pointer-events:all}.simplebar-scrollbar{position:absolute;left:0;right:0;min-height:10px}.simplebar-scrollbar:before{position:absolute;content:"";background:#000;border-radius:7px;left:2px;right:2px;opacity:0;transition:opacity .2s .5s linear}.simplebar-scrollbar.simplebar-visible:before{opacity:.5;transition-delay:0s;transition-duration:0s}.simplebar-track.simplebar-vertical{top:0;width:11px}.simplebar-scrollbar:before{top:2px;bottom:2px;left:2px;right:2px}.simplebar-track.simplebar-horizontal{left:0;height:11px}.simplebar-track.simplebar-horizontal .simplebar-scrollbar{right:auto;left:0;top:0;bottom:0;min-height:0;min-width:10px;width:auto}[data-simplebar-direction=rtl] .simplebar-track.simplebar-vertical{right:auto;left:0}.simplebar-dummy-scrollbar-size{direction:rtl;position:fixed;opacity:0;visibility:hidden;height:500px;width:500px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:scrollbar!important}.simplebar-dummy-scrollbar-size>div{width:200%;height:200%;margin:10px 0}.simplebar-hide-scrollbar{position:fixed;left:0;visibility:hidden;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}
2
- `,document.head.appendChild(e)}catch(e){console.error("vite-plugin-inject-css: failed to inject css",e)}})();const IW=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M21.66 6.28a.5.5 0 0 0 0-.697l-.967-.993a.5.5 0 0 0-.716 0L8.499 16.373 4.023 11.78a.5.5 0 0 0-.716 0l-.967.993a.5.5 0 0 0 0 .697l5.889 6.046.014-.014a.377.377 0 0 0 .54 0L21.66 6.28Z",fill:"currentColor"})}),RW=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M10.84 2.714c0-.394.346-.714.773-.714h.774c.427 0 .773.32.773.714V9.5h5.025c.427 0 .773.32.773.714v3.572H5.042v-3.572c0-.394.346-.714.773-.714h5.025V2.714ZM5.042 14.5h13.916l1.034 6.685c.067.43-.295.815-.765.815h-2.1l-.681-5.929L15.764 22h-3.236l-.721-2.143L11.086 22h-2.85l-.682-3.929L6.872 22H4.773c-.47 0-.832-.385-.765-.815L5.042 14.5Z",fill:"currentColor"})}),Wu=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M4.497 5.361a.5.5 0 0 0 0 .707L10.429 12l-5.932 5.932a.5.5 0 0 0 0 .707l.864.864a.5.5 0 0 0 .707 0L12 13.571l5.932 5.932a.5.5 0 0 0 .707 0l.864-.864a.5.5 0 0 0 0-.707L13.571 12l5.932-5.932a.5.5 0 0 0 0-.707l-.864-.864a.5.5 0 0 0-.707 0L12 10.429 6.068 4.497a.5.5 0 0 0-.707 0l-.864.864Z",fill:"currentColor"})}),NW=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M11.701 18.797c.206.195.52.195.726 0l2.487-2.349-.008-.007 6.973-6.585a.58.58 0 0 0 0-.835l-2.045-1.932a.524.524 0 0 0-.726 0l-7.052 6.66-7.051-6.66a.524.524 0 0 0-.726 0L2.234 9.021a.58.58 0 0 0 0 .835l9.467 8.941Z",fill:"currentColor"})}),TW=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M20.673 5.133c.136.24.053.55-.185.69l-16.25 9.623a.487.487 0 0 1-.676-.18l-.497-.884a.513.513 0 0 1 .185-.69L19.5 4.069c.238-.141.54-.06.676.18l.497.884ZM20.938 9.657c.136.24.053.55-.185.69L7.925 17.944a.487.487 0 0 1-.676-.181l-.497-.884a.513.513 0 0 1 .185-.69l12.829-7.597c.237-.14.54-.06.675.181l.497.884ZM20.16 15.376c.237-.14.32-.45.184-.69l-.497-.884a.487.487 0 0 0-.676-.18l-7.695 4.556a.513.513 0 0 0-.185.69l.498.884c.135.24.437.322.675.181l7.695-4.557Z",fill:"currentColor"})}),PW=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},kW=(e,t)=>({classGroupId:e,validator:t}),_2=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),fu="-",pO=[],MW="arbitrary..",AW=e=>{const t=jW(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return DW(i);const o=i.split(fu),a=o[0]===""&&o.length>1?1:0;return E2(o,a,t)},getConflictingClassGroupIds:(i,o)=>{if(o){const a=n[i],s=r[i];return a?s?PW(s,a):a:s||pO}return r[i]||pO}}},E2=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],i=r.nextPart.get(n);if(i){const c=E2(e,t+1,i);if(c)return c}const o=r.validators;if(o===null)return;const a=t===0?e.join(fu):e.slice(t).join(fu),s=o.length;for(let c=0;c<s;c++){const u=o[c];if(u.validator(a))return u.classGroupId}},DW=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?MW+n:void 0})(),jW=e=>{const{theme:t,classGroups:r}=e;return qW(r,t)},qW=(e,t)=>{const r=_2();for(const n in e){const i=e[n];Vw(i,r,n,t)}return r},Vw=(e,t,r,n)=>{const i=e.length;for(let o=0;o<i;o++){const a=e[o];LW(a,t,r,n)}},LW=(e,t,r,n)=>{if(typeof e=="string"){zW(e,t,r);return}if(typeof e=="function"){BW(e,t,r,n);return}FW(e,t,r,n)},zW=(e,t,r)=>{const n=e===""?t:S2(t,e);n.classGroupId=r},BW=(e,t,r,n)=>{if($W(e)){Vw(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(kW(r,e))},FW=(e,t,r,n)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[s,c]=i[a];Vw(c,S2(t,s),r,n)}},S2=(e,t)=>{let r=e;const n=t.split(fu),i=n.length;for(let o=0;o<i;o++){const a=n[o];let s=r.nextPart.get(a);s||(s=_2(),r.nextPart.set(a,s)),r=s}return r},$W=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,VW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(o,a)=>{r[o]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(o){let a=r[o];if(a!==void 0)return a;if((a=n[o])!==void 0)return i(o,a),a},set(o,a){o in r?r[o]=a:i(o,a)}}},lw="!",hO=":",HW=[],vO=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),WW=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const o=[];let a=0,s=0,c=0,u;const d=i.length;for(let b=0;b<d;b++){const m=i[b];if(a===0&&s===0){if(m===hO){o.push(i.slice(c,b)),c=b+1;continue}if(m==="/"){u=b;continue}}m==="["?a++:m==="]"?a--:m==="("?s++:m===")"&&s--}const p=o.length===0?i:i.slice(c);let v=p,h=!1;p.endsWith(lw)?(v=p.slice(0,-1),h=!0):p.startsWith(lw)&&(v=p.slice(1),h=!0);const x=u&&u>c?u-c:void 0;return vO(o,h,v,x)};if(t){const i=t+hO,o=n;n=a=>a.startsWith(i)?o(a.slice(i.length)):vO(HW,!1,a,void 0,!0)}if(r){const i=n;n=o=>r({className:o,parseClassName:i})}return n},UW=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let o=0;o<r.length;o++){const a=r[o],s=a[0]==="[",c=t.has(a);s||c?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(a)):i.push(a)}return i.length>0&&(i.sort(),n.push(...i)),n}},GW=e=>({cache:VW(e.cacheSize),parseClassName:WW(e),sortModifiers:UW(e),...AW(e)}),KW=/\s+/,YW=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],s=e.trim().split(KW);let c="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{isExternal:p,modifiers:v,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:b}=r(d);if(p){c=d+(c.length>0?" "+c:c);continue}let m=!!b,w=n(m?x.substring(0,b):x);if(!w){if(!m){c=d+(c.length>0?" "+c:c);continue}if(w=n(x),!w){c=d+(c.length>0?" "+c:c);continue}m=!1}const y=v.length===0?"":v.length===1?v[0]:o(v).join(":"),_=h?y+lw:y,S=_+w;if(a.indexOf(S)>-1)continue;a.push(S);const E=i(w,m);for(let I=0;I<E.length;++I){const N=E[I];a.push(_+N)}c=d+(c.length>0?" "+c:c)}return c},XW=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=O2(r))&&(i&&(i+=" "),i+=n);return i},O2=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=O2(e[n]))&&(r&&(r+=" "),r+=t);return r},gO=(e,...t)=>{let r,n,i,o;const a=c=>{const u=t.reduce((d,p)=>p(d),e());return r=GW(u),n=r.cache.get,i=r.cache.set,o=s,s(c)},s=c=>{const u=n(c);if(u)return u;const d=YW(c,r);return i(c,d),d};return o=a,(...c)=>o(XW(...c))},ZW=[],Gt=e=>{const t=r=>r[e]||ZW;return t.isThemeGetter=!0,t},C2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,I2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,JW=/^\d+\/\d+$/,QW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,e8=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,t8=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,r8=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,n8=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lo=e=>JW.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),Si=e=>!!e&&Number.isInteger(Number(e)),gp=e=>e.endsWith("%")&&We(e.slice(0,-1)),ii=e=>QW.test(e),i8=()=>!0,o8=e=>e8.test(e)&&!t8.test(e),R2=()=>!1,a8=e=>r8.test(e),s8=e=>n8.test(e),l8=e=>!Ce(e)&&!Ie(e),c8=e=>ha(e,P2,R2),Ce=e=>C2.test(e),Qi=e=>ha(e,k2,o8),mp=e=>ha(e,h8,We),mO=e=>ha(e,N2,R2),u8=e=>ha(e,T2,s8),pc=e=>ha(e,M2,a8),Ie=e=>I2.test(e),Ua=e=>va(e,k2),d8=e=>va(e,v8),bO=e=>va(e,N2),f8=e=>va(e,P2),p8=e=>va(e,T2),hc=e=>va(e,M2,!0),ha=(e,t,r)=>{const n=C2.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},va=(e,t,r=!1)=>{const n=I2.exec(e);return n?n[1]?t(n[1]):r:!1},N2=e=>e==="position"||e==="percentage",T2=e=>e==="image"||e==="url",P2=e=>e==="length"||e==="size"||e==="bg-size",k2=e=>e==="length",h8=e=>e==="number",v8=e=>e==="family-name",M2=e=>e==="shadow",yO=()=>{const e=Gt("color"),t=Gt("font"),r=Gt("text"),n=Gt("font-weight"),i=Gt("tracking"),o=Gt("leading"),a=Gt("breakpoint"),s=Gt("container"),c=Gt("spacing"),u=Gt("radius"),d=Gt("shadow"),p=Gt("inset-shadow"),v=Gt("text-shadow"),h=Gt("drop-shadow"),x=Gt("blur"),b=Gt("perspective"),m=Gt("aspect"),w=Gt("ease"),y=Gt("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...S(),Ie,Ce],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],T=()=>[Ie,Ce,c],k=()=>[Lo,"full","auto",...T()],L=()=>[Si,"none","subgrid",Ie,Ce],B=()=>["auto",{span:["full",Si,Ie,Ce]},Si,Ie,Ce],A=()=>[Si,"auto",Ie,Ce],z=()=>["auto","min","max","fr",Ie,Ce],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...T()],Y=()=>[Lo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],U=()=>[e,Ie,Ce],Z=()=>[...S(),bO,mO,{position:[Ie,Ce]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",f8,c8,{size:[Ie,Ce]}],Q=()=>[gp,Ua,Qi],ee=()=>["","none","full",u,Ie,Ce],j=()=>["",We,Ua,Qi],F=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[We,gp,bO,mO],X=()=>["","none",x,Ie,Ce],te=()=>["none",We,Ie,Ce],ne=()=>["none",We,Ie,Ce],de=()=>[We,Ie,Ce],re=()=>[Lo,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ii],breakpoint:[ii],color:[i8],container:[ii],"drop-shadow":[ii],ease:["in","out","in-out"],font:[l8],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ii],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ii],shadow:[ii],spacing:["px",We],text:[ii],"text-shadow":[ii],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lo,Ce,Ie,m]}],container:["container"],columns:[{columns:[We,Ce,Ie,s]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Si,"auto",Ie,Ce]}],basis:[{basis:[Lo,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,Lo,"auto","initial","none",Ce]}],grow:[{grow:["",We,Ie,Ce]}],shrink:[{shrink:["",We,Ie,Ce]}],order:[{order:[Si,"first","last","none",Ie,Ce]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],w:[{w:[s,"screen",...Y()]}],"min-w":[{"min-w":[s,"screen","none",...Y()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",r,Ua,Qi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Ie,mp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gp,Ce]}],"font-family":[{font:[d8,Ce,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ie,Ce]}],"line-clamp":[{"line-clamp":[We,"none",Ie,mp]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",Ie,Ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ie,Ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Ie,Qi]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[We,"auto",Ie,Ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie,Ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ie,Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:D()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Si,Ie,Ce],radial:["",Ie,Ce],conic:[Si,Ie,Ce]},p8,u8]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:j()}],"border-w-x":[{"border-x":j()}],"border-w-y":[{"border-y":j()}],"border-w-s":[{"border-s":j()}],"border-w-e":[{"border-e":j()}],"border-w-t":[{"border-t":j()}],"border-w-r":[{"border-r":j()}],"border-w-b":[{"border-b":j()}],"border-w-l":[{"border-l":j()}],"divide-x":[{"divide-x":j()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":j()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Ie,Ce]}],"outline-w":[{outline:["",We,Ua,Qi]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",d,hc,pc]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",p,hc,pc]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[We,Qi]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":j()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",v,hc,pc]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[We,Ie,Ce]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[Ie,Ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:D()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ie,Ce]}],filter:[{filter:["","none",Ie,Ce]}],blur:[{blur:X()}],brightness:[{brightness:[We,Ie,Ce]}],contrast:[{contrast:[We,Ie,Ce]}],"drop-shadow":[{"drop-shadow":["","none",h,hc,pc]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",We,Ie,Ce]}],"hue-rotate":[{"hue-rotate":[We,Ie,Ce]}],invert:[{invert:["",We,Ie,Ce]}],saturate:[{saturate:[We,Ie,Ce]}],sepia:[{sepia:["",We,Ie,Ce]}],"backdrop-filter":[{"backdrop-filter":["","none",Ie,Ce]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[We,Ie,Ce]}],"backdrop-contrast":[{"backdrop-contrast":[We,Ie,Ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,Ie,Ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,Ie,Ce]}],"backdrop-invert":[{"backdrop-invert":["",We,Ie,Ce]}],"backdrop-opacity":[{"backdrop-opacity":[We,Ie,Ce]}],"backdrop-saturate":[{"backdrop-saturate":[We,Ie,Ce]}],"backdrop-sepia":[{"backdrop-sepia":["",We,Ie,Ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ie,Ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",Ie,Ce]}],ease:[{ease:["linear","initial",w,Ie,Ce]}],delay:[{delay:[We,Ie,Ce]}],animate:[{animate:["none",y,Ie,Ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,Ie,Ce]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[Ie,Ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ie,Ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ie,Ce]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[We,Ua,Qi,mp]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},g8=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:i={},override:o={}})=>(vs(e,"cacheSize",t),vs(e,"prefix",r),vs(e,"experimentalParseClassName",n),vc(e.theme,o.theme),vc(e.classGroups,o.classGroups),vc(e.conflictingClassGroups,o.conflictingClassGroups),vc(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),vs(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),gc(e.theme,i.theme),gc(e.classGroups,i.classGroups),gc(e.conflictingClassGroups,i.conflictingClassGroups),gc(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),A2(e,i,"orderSensitiveModifiers"),e),vs=(e,t,r)=>{r!==void 0&&(e[t]=r)},vc=(e,t)=>{if(t)for(const r in t)vs(e,r,t[r])},gc=(e,t)=>{if(t)for(const r in t)A2(e,t,r)},A2=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},m8=(e,...t)=>typeof e=="function"?gO(yO,e,...t):gO(()=>g8(yO(),e),...t);function D2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xO={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),J=require("@ws-ui/store"),A=require("react"),Te=require("@ws-ui/shared"),wr=require("@headlessui/react"),aD=require("react-dom"),ye=require("@ws-ui/icons"),sD=require("./common.cjs.js");function uD(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=uD(A),Yb=uD(aD);var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Un(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wf={exports:{}};/*!
3
2
  Copyright (c) 2018 Jed Watson.
4
3
  Licensed under the MIT License (MIT), see
5
4
  http://jedwatson.github.io/classnames
6
- */var wO;function b8(){return wO||(wO=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(o=i(o,n(s)))}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 s in o)t.call(o,s)&&o[s]&&(a=i(a,s));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})()})(xO)),xO.exports}var y8=b8();const x8=D2(y8),w8=m8({extend:{classGroups:{"font-size":["text-xxs","text-xs","text-s","text-sm","text-base","text-lg","text-xl","text-2xl","text-3xl","text-4xl","text-5xl","text-6xl","text-7xl","text-8xl","text-9xl"],"text-color":["text-body","text-muted","text-inactive-text","text-button-text","text-positive-text","text-negative-text","text-negative","text-warning-text","text-input-text","text-select-text","text-input-message-text","text-placeholder"]}}});function me(...e){return w8(x8(e))}const Ws={sm:{checkbox:"size-4",hoverSquare:"size-2.5",text:"text-xs",spacing:"gap-1",icon:"size-3.25"},md:{checkbox:"size-5",hoverSquare:"size-3.5",text:"text-sm",spacing:"gap-1.5",icon:"size-4"},lg:{checkbox:"size-6",hoverSquare:"size-4",text:"text-base",spacing:"gap-2",icon:"size-5"}},sn={primary:{checked:"bg-primary border-primary",unchecked:"border border-body bg-transparent",checkedHover:"hover:bg-primary-hover hover:border-primary-hover",hoverSquare:"bg-primary-hover",focus:"focus:ring-primary",label:"text-body"},positive:{checked:"bg-positive border-positive",unchecked:"border border-positive bg-transparent",checkedHover:"hover:bg-positive-hover hover:border-positive-hover",hoverSquare:"bg-positive-hover",focus:"focus:ring-positive",label:"text-positive"},warning:{checked:"bg-warning border-warning",unchecked:"border border-warning bg-transparent",checkedHover:"hover:bg-warning-hover hover:border-warning-hover",hoverSquare:"bg-warning-hover",focus:"focus:ring-warning",label:"text-warning"},negative:{checked:"bg-negative border-negative",unchecked:"border border-negative bg-transparent",checkedHover:"hover:bg-negative-hover hover:border-negative-hover",hoverSquare:"bg-negative-hover",focus:"focus:ring-negative",label:"text-negative"}},_8=`
7
- appearance-none border rounded transition-all duration-200
8
- focus:ring-2 focus:ring-offset-2 focus:outline-hidden
9
- relative
10
- `,E8=(e,t,r)=>{const{isChecked:n,isIndeterminate:i,isDisabled:o,isInvalid:a}=r,s=n||i;return me(_8,Ws[e].checkbox,{"cursor-pointer":!o},a?{[sn.negative.checked]:s,[sn.negative.unchecked]:!s,[sn.negative.checkedHover]:!o&&s,[sn.negative.focus]:!o,"border-input-disable":o}:{[sn[t].checked]:s&&!o,[sn[t].unchecked]:!s&&!o,[sn[t].checkedHover]:!o&&s,[sn[t].focus]:!o,"border-input-disable":o,"bg-input-disable text-muted":o&&s})},S8=(e,t,r)=>{const{isDisabled:n,isInvalid:i}=r;return me(Ws[e].text,i?{[sn.negative.label]:i}:{"text-input-disable":n,[sn[t].label]:!n,"cursor-pointer":!n})},O8=e=>me("inline-flex items-center ws-group",Ws[e].spacing),C8=(e,t,r)=>me("center-absolute rounded-xs transition-all duration-200 opacity-0 ws-checkbox-hover-target",Ws[e].hoverSquare,{[sn.negative.hoverSquare]:r,[sn[t].hoverSquare]:!r}),I8=e=>`${Ws[e].icon}`,R8=e=>O.jsx("svg",{className:`absolute inset-0 ${e.className}`,fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",fill:"none"})}),ir=C.forwardRef(({label:e,isDisabled:t=!1,isInvalid:r=!1,isRequired:n=!1,size:i="md",color:o="primary",onChange:a,onFocus:s,onBlur:c,value:u,defaultValue:d,name:p,id:v,...h},x)=>{const[b,m]=C.useState(d),w=u===!0||b===!0,y=u===null,_=w||y,S={isChecked:w,isIndeterminate:y,isDisabled:t,isInvalid:r},E=E8(i,o,S),I=S8(i,o,S),N=O8(i),T=C8(i,o,r),k=I8(i);return O.jsxs("label",{"data-qui":"Checkbox",className:N,children:[O.jsxs("div",{className:E,children:[O.jsx("input",{ref:x,type:"checkbox",className:"sr-only",checked:w,disabled:t,required:n,onChange:L=>{u===void 0&&m(L.target.checked),a==null||a(L)},onFocus:s,onBlur:c,name:p,id:v,...h}),_&&O.jsx("div",{className:"center-absolute",children:y?O.jsx(R8,{className:k}):O.jsx(IW,{className:k})}),!_&&!t&&O.jsx("div",{className:T})]}),e&&O.jsxs("span",{className:I,children:[e,n&&O.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});ir.displayName="Checkbox";const Us={sm:{container:"gap-2",radio:"size-3",label:"text-xs",dot:"size-2",hoverDot:"size-1.5"},md:{container:"gap-2.5",radio:"size-4",label:"text-sm",dot:"size-2.5",hoverDot:"size-2"},lg:{container:"gap-3",radio:"size-6",label:"text-base",dot:"size-4",hoverDot:"size-3"}},Ps={primary:{radio:"border-body-light group-hover:border-body",radioInvalid:"border-negative",dot:"bg-primary group-hover:bg-primary-hover",hoverDot:"bg-primary-hover",label:"text-body"},positive:{radio:"border-positive group-hover:border-positive-text",radioInvalid:"border-negative",dot:"bg-positive group-hover:bg-positive-hover",hoverDot:"bg-positive-bg",label:"text-positive-text"},warning:{radio:"border-warning group-hover:border-warning-text",radioInvalid:"border-negative",dot:"bg-warning group-hover:bg-warning-hover",hoverDot:"bg-warning-bg",label:"text-warning-text"},negative:{radio:"border-negative group-hover:border-negative-text",radioInvalid:"border-negative",dot:"bg-negative group-hover:bg-negative-hover",hoverDot:"bg-negative-bg",label:"text-negative"}},N8=`
11
- relative rounded-full border transition-all duration-200 ease-in-out bg-transparent
12
- focus:outline-hidden focus:ring-2 focus:ring-offset-0
13
- cursor-pointer peer
14
- `,T8=(e,t,r)=>{const{isDisabled:n,isInvalid:i}=r;return me(N8,Us[e].radio,i?Ps[t].radioInvalid:{[Ps[t].radio]:!n,"cursor-not-allowed opacity-60":n})},P8=(e,t,r)=>{const{checked:n,isDisabled:i,isInvalid:o}=r;return me("center-absolute rounded-full transition-all duration-200 ease-in-out",Us[e].dot,o?"bg-negative":{[Ps[t].dot]:!i,"border-neutral":i,"opacity-0 scale-0":!n,"opacity-100 scale-100":n&&!i})},k8=(e,t,r)=>me("center-absolute rounded-full transition-all duration-200 opacity-0 group-hover:opacity-100",Us[e].hoverDot,{[Ps[t].hoverDot]:!r,"bg-negative-bg":r}),M8=e=>me("cursor-pointer select-none transition-colors duration-200",Us[e].label),A8=(e,t,r,n)=>{const{isDisabled:i,isInvalid:o}=r;return me("inline-flex items-center group",Us[e].container,o?{"text-negative":o}:{[Ps[t].label]:!i,"text-muted":i},n)},D8=C.createContext(null),j8=()=>{const e=C.useContext(D8);if(!e)throw new Error("Radio.Item must be used within Radio.Group");return e},q8=C.forwardRef(({value:e,label:t,size:r,color:n,isDisabled:i,isInvalid:o,isRequired:a,className:s,...c},u)=>{const d=j8(),p=r??d.size,v=n??d.color,h=i??d.isDisabled,x=o??d.isInvalid,b=a??d.isRequired,m=d.value===e,w={checked:m,isDisabled:h,isInvalid:x},y=T8(p,v,w),_=P8(p,v,w),S=k8(p,v,x),E=M8(p),I=A8(p,v,w,s),N=()=>{h||d.onChange(e)};return O.jsxs("label",{"data-qui":"RadioItem",className:I,children:[O.jsxs("div",{className:me("relative",{hidden:d.hideIndicator}),children:[O.jsx("input",{ref:u,type:"radio",value:e,checked:m,disabled:h,required:b,"aria-invalid":x,"aria-label":t?void 0:c["aria-label"],name:d.name,onChange:N,className:"sr-only",...c}),O.jsxs("div",{className:y,children:[O.jsx("div",{className:_}),!m&&!h&&O.jsx("div",{className:S})]})]}),t&&O.jsxs("span",{className:E,children:[t,b&&O.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});q8.displayName="RadioItem";const j2={sm:{container:"h-4.5 p-1 rounded",text:"text-xxs"},md:{container:"h-6 p-1 rounded",text:"text-s"},lg:{container:"h-7 p-1 rounded",text:"text-sm"},xl:{container:"h-7.5 p-1 rounded",text:"text-lg"}},L8={primary:{bg:{solid:"bg-primary",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-primary",ghost:"text-primary"},border:{solid:"border-primary",outline:"border-primary",ghost:"border-transparent"},hover:{solid:"hover:bg-primary-hover hover:border-primary-hover",outline:"hover:border-black hover:text-primary-hover",ghost:"hover:bg-primary-hover hover:text-body"}},white:{bg:{solid:"bg-white",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-primary",outline:"text-body",ghost:"text-body"},border:{solid:"border-white",outline:"border-white",ghost:"border-transparent"},hover:{solid:"hover:bg-canvas-subtle hover:border-canvas-subtle",outline:"hover:border-canvas hover:text-canvas",ghost:"hover:bg-primary-hover hover:text-body"}},positive:{bg:{solid:"bg-positive",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-positive-text",ghost:"text-positive-text"},border:{solid:"border-positive",outline:"border-positive",ghost:"border-transparent"},hover:{solid:"hover:bg-positive-hover hover:border-positive-hover",outline:"hover:border-positive-hover hover:text-positive-hover",ghost:"hover:bg-positive-hover hover:text-body"}},warning:{bg:{solid:"bg-warning",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-warning-text",ghost:"text-warning-text"},border:{solid:"border-warning",outline:"border-warning",ghost:"border-transparent"},hover:{solid:"hover:bg-warning-hover hover:border-warning-hover",outline:"hover:border-warning-hover hover:text-warning-hover",ghost:"hover:bg-warning-hover hover:text-body"}},negative:{bg:{solid:"bg-negative",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-negative",ghost:"text-negative"},border:{solid:"border-negative",outline:"border-negative",ghost:"border-transparent"},hover:{solid:"hover:bg-negative-hover hover:border-negative-hover",outline:"hover:border-negative-hover hover:text-negative-hover",ghost:"hover:bg-negative-hover hover:text-body"}}},z8=(e,t,r,n)=>{const i=j2[e],o=L8[r],a=me("inline-flex items-center justify-center font-medium transition-colors duration-200 focus:outline-hidden border",{"cursor-pointer":!n},i.container);return n?me(a,"text-inactive-text",{"border-panel":t!=="ghost"&&t==="solid","border-panel-subtle":t==="outline","bg-panel":t==="solid","bg-transparent ":t==="outline"||t==="ghost","border-transparent":t==="ghost"}):me(a,o.bg[t],o.text[t],o.hover[t],o.border[t])},B8=e=>me("flex items-center justify-center gap-1",j2[e].text),wr=C.forwardRef(({size:e="md",variant:t="solid",color:r="primary",className:n,children:i,disabled:o,...a},s)=>O.jsx("button",{"data-qui":"Button",ref:s,type:"button",className:me(z8(e,t,r,o),B8(e),n),disabled:o,...a,children:i}));wr.displayName="Button";const q2=C.createContext(null),Gs=()=>{const e=C.useContext(q2);if(!e)throw new Error("Input components must be used within Input.Root");return e},ga={sm:{group:"h-5 min-h-fit",input:"text-xxs",message:"text-xxs p-1.5",icon:"text-sm"},md:{group:"h-6 min-h-fit",input:"text-xs",message:"text-xs p-2",icon:"text-base"},lg:{group:"h-7 min-h-fit",input:"text-s",message:"text-s p-2.5",icon:"text-lg"}},ci={primary:{border:"border border-input-border focus-within:border-input-focus-border",borderInvalid:"ring-input-error-border",borderMessage:"ring-input-focus-border",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-input-message-text",messageBackground:"bg-input-message-bg",icon:"text-input-text",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"},positive:{border:"border border-input-border focus-within:border-positive",borderInvalid:"ring-input-error-border",borderMessage:"ring-positive",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-positive-dark",messageBackground:"bg-positive-light",icon:"text-positive-text",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"},warning:{border:"border border-input-border focus-within:border-input-warning-border",borderInvalid:"ring-input-error-border",borderMessage:"ring-input-warning-border",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-warning-dark",messageBackground:"bg-input-warning-bg",icon:"text-warning-text",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"},negative:{border:"border border-input-border focus-within:border-input-error-border",borderInvalid:"ring-input-error-border",borderMessage:"ring-input-error-border",text:"text-negative",placeholder:"placeholder:text-input-placeholder",messageText:"text-negative-dark",messageBackground:"bg-input-error-bg",icon:"text-negative",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"}},F8=()=>me("flex flex-col relative"),$8=({size:e,color:t,isDisabled:r,isReadOnly:n,hasMessage:i,hasArea:o,isInvalid:a})=>{const s=ci[a?"negative":t];return me("bg-input-bg flex gap-1 relative px-1 transition-all duration-200 ease-in-out only:rounded first:rounded-t last:rounded-b",s.text,i?s.borderMessage:!n&&s.border,ga[e].group,{"ring-1":i,"opacity-60":r,"items-center":!o})},V8=({size:e,color:t})=>me("bg-transparent ring-0 w-full","focus:outline-hidden",[ga[e].input],ci[t].placeholder),_O=({size:e,color:t})=>me("bg-transparent ring-0 w-full h-fit resize-none py-0.5","focus:outline-hidden",ga[e].input,ci[t].placeholder),H8=({size:e,color:t,isDisabled:r,isAction:n})=>me("transition-colors duration-200 rounded max-h-full h-fit",ga[e].icon,e==="sm"?"m-px":"m-0.5",r?"text-muted opacity-60 pointer-events-none":n?ci[t].action:ci[t].icon,{"cursor-pointer p-0.5":n&&!r,[ci[t].actionHover]:n&&!r,"pointer-events-none":!n}),W8=({size:e,color:t,isDisabled:r})=>me("absolute left-0 right-0 z-10","flex items-start gap-x-2 ring-1","first:bottom-full first:rounded-t first:ring-b-0","last:top-full last:rounded-b last:ring-t-0","only:top-full only:rounded only:ring-1",r?"text-muted":ci[t].messageText,ci[t].borderMessage,ci[t].messageBackground,ga[e].message,{"opacity-60":r}),U8=({size:e})=>me(ga[e].icon);function pu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var G8=typeof global=="object"&&global&&global.Object===Object&&global,K8=typeof self=="object"&&self&&self.Object===Object&&self,L2=G8||K8||Function("return this")(),bp=function(){return L2.Date.now()},Y8=/\s/;function X8(e){for(var t=e.length;t--&&Y8.test(e.charAt(t)););return t}var Z8=/^\s+/;function J8(e){return e&&e.slice(0,X8(e)+1).replace(Z8,"")}var hu=L2.Symbol,z2=Object.prototype,Q8=z2.hasOwnProperty,eU=z2.toString,Ga=hu?hu.toStringTag:void 0;function tU(e){var t=Q8.call(e,Ga),r=e[Ga];try{e[Ga]=void 0;var n=!0}catch{}var i=eU.call(e);return n&&(t?e[Ga]=r:delete e[Ga]),i}var rU=Object.prototype,nU=rU.toString;function iU(e){return nU.call(e)}var oU="[object Null]",aU="[object Undefined]",EO=hu?hu.toStringTag:void 0;function sU(e){return e==null?e===void 0?aU:oU:EO&&EO in Object(e)?tU(e):iU(e)}function lU(e){return e!=null&&typeof e=="object"}var cU="[object Symbol]";function uU(e){return typeof e=="symbol"||lU(e)&&sU(e)==cU}var SO=NaN,dU=/^[-+]0x[0-9a-f]+$/i,fU=/^0b[01]+$/i,pU=/^0o[0-7]+$/i,hU=parseInt;function OO(e){if(typeof e=="number")return e;if(uU(e))return SO;if(pu(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=pu(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=J8(e);var r=fU.test(e);return r||pU.test(e)?hU(e.slice(2),r?2:8):dU.test(e)?SO:+e}var vU="Expected a function",gU=Math.max,mU=Math.min;function Kc(e,t,r){var n,i,o,a,s,c,u=0,d=!1,p=!1,v=!0;if(typeof e!="function")throw new TypeError(vU);t=OO(t)||0,pu(r)&&(d=!!r.leading,p="maxWait"in r,o=p?gU(OO(r.maxWait)||0,t):o,v="trailing"in r?!!r.trailing:v);function h(I){var N=n,T=i;return n=i=void 0,u=I,a=e.apply(T,N),a}function x(I){return u=I,s=setTimeout(w,t),d?h(I):a}function b(I){var N=I-c,T=I-u,k=t-N;return p?mU(k,o-T):k}function m(I){var N=I-c,T=I-u;return c===void 0||N>=t||N<0||p&&T>=o}function w(){var I=bp();if(m(I))return y(I);s=setTimeout(w,b(I))}function y(I){return s=void 0,v&&n?h(I):(n=i=void 0,a)}function _(){s!==void 0&&clearTimeout(s),u=0,n=c=i=s=void 0}function S(){return s===void 0?a:y(bp())}function E(){var I=bp(),N=m(I);if(n=arguments,i=this,c=I,N){if(s===void 0)return x(c);if(p)return clearTimeout(s),s=setTimeout(w,t),h(c)}return s===void 0&&(s=setTimeout(w,t)),a}return E.cancel=_,E.flush=S,E}var bU="Expected a function";function yU(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(bU);return pu(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Kc(e,t,{leading:n,maxWait:t,trailing:i})}var Ko=function(){return Ko=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ko.apply(this,arguments)};function B2(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function F2(e){return!e||!e.ownerDocument?document:e.ownerDocument}var $2=function(e){var t={},r=Array.prototype.reduce.call(e,function(n,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var a=o[1].replace(/\W+(.)/g,function(s,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},t);return r};function V2(e,t){var r;e&&(r=e.classList).add.apply(r,t.split(" "))}function H2(e,t){e&&t.split(" ").forEach(function(r){e.classList.remove(r)})}function W2(e){return".".concat(e.split(" ").join("."))}var Hw=!!(typeof window<"u"&&window.document&&window.document.createElement),xU=Object.freeze({__proto__:null,addClasses:V2,canUseDOM:Hw,classNamesToQuery:W2,getElementDocument:F2,getElementWindow:B2,getOptions:$2,removeClasses:H2}),Uo=null,CO=null;Hw&&window.addEventListener("resize",function(){CO!==window.devicePixelRatio&&(CO=window.devicePixelRatio,Uo=null)});function IO(){if(Uo===null){if(typeof document>"u")return Uo=0,Uo;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var r=t.getBoundingClientRect().right;e.removeChild(t),Uo=r}return Uo}var Oi=B2,yp=F2,wU=$2,Ci=V2,Ii=H2,Pr=W2,Ka=(function(){function e(t,r){r===void 0&&(r={});var n=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var i=Oi(n.el);n.scrollXTicking||(i.requestAnimationFrame(n.scrollX),n.scrollXTicking=!0),n.scrollYTicking||(i.requestAnimationFrame(n.scrollY),n.scrollYTicking=!0),n.isScrolling||(n.isScrolling=!0,Ci(n.el,n.classNames.scrolling)),n.showScrollbar("x"),n.showScrollbar("y"),n.onStopScrolling()},this.scrollX=function(){n.axis.x.isOverflowing&&n.positionScrollbar("x"),n.scrollXTicking=!1},this.scrollY=function(){n.axis.y.isOverflowing&&n.positionScrollbar("y"),n.scrollYTicking=!1},this._onStopScrolling=function(){Ii(n.el,n.classNames.scrolling),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isScrolling=!1},this.onMouseEnter=function(){n.isMouseEntering||(Ci(n.el,n.classNames.mouseEntered),n.showScrollbar("x"),n.showScrollbar("y"),n.isMouseEntering=!0),n.onMouseEntered()},this._onMouseEntered=function(){Ii(n.el,n.classNames.mouseEntered),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isMouseEntering=!1},this._onMouseMove=function(i){n.mouseX=i.clientX,n.mouseY=i.clientY,(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseMoveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseMoveForAxis("y")},this.onMouseLeave=function(){n.onMouseMove.cancel(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseLeaveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseLeaveForAxis("y"),n.mouseX=-1,n.mouseY=-1},this._onWindowResize=function(){n.scrollbarWidth=n.getScrollbarWidth(),n.hideNativeScrollbar()},this.onPointerEvent=function(i){if(!(!n.axis.x.track.el||!n.axis.y.track.el||!n.axis.x.scrollbar.el||!n.axis.y.scrollbar.el)){var o,a;n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&(o=n.isWithinBounds(n.axis.x.track.rect)),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&(a=n.isWithinBounds(n.axis.y.track.rect)),(o||a)&&(i.stopPropagation(),i.type==="pointerdown"&&i.pointerType!=="touch"&&(o&&(n.axis.x.scrollbar.rect=n.axis.x.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.x.scrollbar.rect)?n.onDragStart(i,"x"):n.onTrackClick(i,"x")),a&&(n.axis.y.scrollbar.rect=n.axis.y.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.scrollbar.rect)?n.onDragStart(i,"y"):n.onTrackClick(i,"y"))))}},this.drag=function(i){var o,a,s,c,u,d,p,v,h,x,b;if(!(!n.draggedAxis||!n.contentWrapperEl)){var m,w=n.axis[n.draggedAxis].track,y=(a=(o=w.rect)===null||o===void 0?void 0:o[n.axis[n.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,_=n.axis[n.draggedAxis].scrollbar,S=(c=(s=n.contentWrapperEl)===null||s===void 0?void 0:s[n.axis[n.draggedAxis].scrollSizeAttr])!==null&&c!==void 0?c:0,E=parseInt((d=(u=n.elStyles)===null||u===void 0?void 0:u[n.axis[n.draggedAxis].sizeAttr])!==null&&d!==void 0?d:"0px",10);i.preventDefault(),i.stopPropagation(),n.draggedAxis==="y"?m=i.pageY:m=i.pageX;var I=m-((v=(p=w.rect)===null||p===void 0?void 0:p[n.axis[n.draggedAxis].offsetAttr])!==null&&v!==void 0?v:0)-n.axis[n.draggedAxis].dragOffset;I=n.draggedAxis==="x"&&n.isRtl?((x=(h=w.rect)===null||h===void 0?void 0:h[n.axis[n.draggedAxis].sizeAttr])!==null&&x!==void 0?x:0)-_.size-I:I;var N=I/(y-_.size),T=N*(S-E);n.draggedAxis==="x"&&n.isRtl&&(T=!((b=e.getRtlHelpers())===null||b===void 0)&&b.isScrollingToNegative?-T:T),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=T}},this.onEndDrag=function(i){n.isDragging=!1;var o=yp(n.el),a=Oi(n.el);i.preventDefault(),i.stopPropagation(),Ii(n.el,n.classNames.dragging),n.onStopScrolling(),o.removeEventListener("mousemove",n.drag,!0),o.removeEventListener("mouseup",n.onEndDrag,!0),n.removePreventClickId=a.setTimeout(function(){o.removeEventListener("click",n.preventClick,!0),o.removeEventListener("dblclick",n.preventClick,!0),n.removePreventClickId=null})},this.preventClick=function(i){i.preventDefault(),i.stopPropagation()},this.el=t,this.options=Ko(Ko({},e.defaultOptions),r),this.classNames=Ko(Ko({},e.defaultOptions.classNames),r.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=yU(this._onMouseMove,64),this.onWindowResize=Kc(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=Kc(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=Kc(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var r=t.firstElementChild,n=r==null?void 0:r.firstElementChild;if(!n)return null;document.body.appendChild(r),r.scrollLeft=0;var i=e.getOffset(r),o=e.getOffset(n);r.scrollLeft=-999;var a=e.getOffset(n);return document.body.removeChild(r),e.rtlHelpers={isScrollOriginAtZero:i.left!==o.left,isScrollingToNegative:o.left!==a.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:IO()}catch{return IO()}},e.getOffset=function(t){var r=t.getBoundingClientRect(),n=yp(t),i=Oi(t);return{top:r.top+(i.pageYOffset||n.documentElement.scrollTop),left:r.left+(i.pageXOffset||n.documentElement.scrollLeft)}},e.prototype.init=function(){Hw&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,r;this.wrapperEl=this.el.querySelector(Pr(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(Pr(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(Pr(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(Pr(this.classNames.offset)),this.maskEl=this.el.querySelector(Pr(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,Pr(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(Pr(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(Pr(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(Pr(this.classNames.track)).concat(Pr(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(Pr(this.classNames.track)).concat(Pr(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(Pr(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(Pr(this.classNames.scrollbar)))||null,this.options.autoHide||(Ci(this.axis.x.scrollbar.el,this.classNames.visible),Ci(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,r,n=Oi(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(r=this.contentWrapperEl)===null||r===void 0||r.addEventListener("scroll",this.onScroll),n.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var i=!1,o=n.ResizeObserver||ResizeObserver;this.resizeObserver=new o(function(){i&&n.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),n.requestAnimationFrame(function(){i=!0})}this.mutationObserver=new n.MutationObserver(function(){n.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=Oi(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,n=this.heightAutoObserverEl.offsetHeight<=1,i=this.heightAutoObserverEl.offsetWidth<=1||r>0,o=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var c=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=n?"auto":"100%",this.placeholderEl.style.width=i?"".concat(r||u,"px"):"auto",this.placeholderEl.style.height="".concat(c,"px");var d=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r!==0&&u>r,this.axis.y.isOverflowing=c>d,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=s==="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 p=this.axis.x.isOverflowing?this.scrollbarWidth:0,v=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>o-v,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&c>d-p,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var r,n;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var i=this.contentEl[this.axis[t].scrollSizeAttr],o=(n=(r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])!==null&&n!==void 0?n:0,a=o/i,s;return s=Math.max(~~(a*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(s=Math.min(s,this.options.scrollbarMaxSize)),s},e.prototype.positionScrollbar=function(t){var r,n,i;t===void 0&&(t="y");var o=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!o.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[t].scrollSizeAttr],s=((r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])||0,c=parseInt(this.elStyles[this.axis[t].sizeAttr],10),u=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];u=t==="x"&&this.isRtl&&!((n=e.getRtlHelpers())===null||n===void 0)&&n.isScrollOriginAtZero?-u:u,t==="x"&&this.isRtl&&(u=!((i=e.getRtlHelpers())===null||i===void 0)&&i.isScrollingToNegative?u:-u);var d=u/(a-c),p=~~((s-o.size)*d);p=t==="x"&&this.isRtl?-p+(s-o.size):p,o.el.style.transform=t==="x"?"translate3d(".concat(p,"px, 0, 0)"):"translate3d(0, ".concat(p,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var r=this.axis[t].track.el,n=this.axis[t].scrollbar.el;!r||!n||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(r.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(r.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?n.style.display="block":n.style.display="none")},e.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(Ci(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(Ii(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var r=this.axis[t];!r.track.el||!r.scrollbar.el||(r.track.rect=r.track.el.getBoundingClientRect(),r.scrollbar.rect=r.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(r.track.rect)?(this.showScrollbar(t),Ci(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?Ci(r.scrollbar.el,this.classNames.hover):Ii(r.scrollbar.el,this.classNames.hover)):(Ii(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),Ii(this.axis[t].track.el,this.classNames.hover),Ii(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,r){var n;r===void 0&&(r="y"),this.isDragging=!0;var i=yp(this.el),o=Oi(this.el),a=this.axis[r].scrollbar,s=r==="y"?t.pageY:t.pageX;this.axis[r].dragOffset=s-(((n=a.rect)===null||n===void 0?void 0:n[this.axis[r].offsetAttr])||0),this.draggedAxis=r,Ci(this.el,this.classNames.dragging),i.addEventListener("mousemove",this.drag,!0),i.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(o.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,r){var n=this,i,o,a,s;r===void 0&&(r="y");var c=this.axis[r];if(!(!this.options.clickOnTrack||!c.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var u=Oi(this.el);this.axis[r].scrollbar.rect=c.scrollbar.el.getBoundingClientRect();var d=this.axis[r].scrollbar,p=(o=(i=d.rect)===null||i===void 0?void 0:i[this.axis[r].offsetAttr])!==null&&o!==void 0?o:0,v=parseInt((s=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[r].sizeAttr])!==null&&s!==void 0?s:"0px",10),h=this.contentWrapperEl[this.axis[r].scrollOffsetAttr],x=r==="y"?this.mouseY-p:this.mouseX-p,b=x<0?-1:1,m=b===-1?h-v:h+v,w=40,y=function(){n.contentWrapperEl&&(b===-1?h>m&&(h-=w,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=h,u.requestAnimationFrame(y)):h<m&&(h+=w,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=h,u.requestAnimationFrame(y)))};y()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=Oi(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,r){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(i){return n.call(i,r)})[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,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",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=wU,e.helpers=xU,e})(),Ur=function(){return Ur=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ur.apply(this,arguments)};function _U(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}var Ww=Et.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=_U(e,["children","scrollableNodeProps"]),a=Et.useRef(),s=Et.useRef(),c=Et.useRef(),u={},d={};Object.keys(o).forEach(function(h){Object.prototype.hasOwnProperty.call(Ka.defaultOptions,h)?u[h]=o[h]:d[h]=o[h]});var p=Ur(Ur({},Ka.defaultOptions.classNames),u.classNames),v=Ur(Ur({},i),{className:"".concat(p.contentWrapper).concat(i.className?" ".concat(i.className):""),tabIndex:u.tabIndex||Ka.defaultOptions.tabIndex,role:"region","aria-label":u.ariaLabel||Ka.defaultOptions.ariaLabel});return Et.useEffect(function(){var h;return s.current=v.ref?v.ref.current:s.current,a.current&&(h=new Ka(a.current,Ur(Ur(Ur({},u),s.current&&{scrollableNode:s.current}),c.current&&{contentNode:c.current})),typeof t=="function"?t(h):t&&(t.current=h)),function(){h==null||h.unMount(),h=null,typeof t=="function"&&t(null)}},[]),Et.createElement("div",Ur({"data-simplebar":"init",ref:a},d),Et.createElement("div",{className:p.wrapper},Et.createElement("div",{className:p.heightAutoObserverWrapperEl},Et.createElement("div",{className:p.heightAutoObserverEl})),Et.createElement("div",{className:p.mask},Et.createElement("div",{className:p.offset},typeof r=="function"?r({scrollableNodeRef:s,scrollableNodeProps:Ur(Ur({},v),{ref:s}),contentNodeRef:c,contentNodeProps:{className:p.contentEl,ref:c}}):Et.createElement("div",Ur({},v),Et.createElement("div",{className:p.contentEl},r)))),Et.createElement("div",{className:p.placeholder})),Et.createElement("div",{className:"".concat(p.track," ").concat(p.horizontal)},Et.createElement("div",{className:p.scrollbar})),Et.createElement("div",{className:"".concat(p.track," ").concat(p.vertical)},Et.createElement("div",{className:p.scrollbar})))});Ww.displayName="SimpleBar";const U2=C.forwardRef(({size:e="md",color:t="primary",isInvalid:r=!1,isDisabled:n=!1,isReadOnly:i=!1,className:o,children:a,...s},c)=>{const[u,d]=C.useState(!1),[p,v]=C.useState(!1),h={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,isReadOnly:i,hasMessage:u,setHasMessage:d,hasArea:p,setHasArea:v};return O.jsx(q2.Provider,{value:h,children:O.jsx("div",{ref:c,"data-qui":"Input",className:me(F8(),o),...s,children:a})})}),G2=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:u,isInvalid:d}=Gs();return O.jsx("div",{ref:n,"data-qui":"InputGroup",className:me($8({size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:u,isInvalid:d}),e),...r,children:t})}),K2=C.forwardRef(({className:e,...t},r)=>{const{size:n,color:i,isInvalid:o,isDisabled:a,isReadOnly:s}=Gs(),{isDisabled:c,isReadOnly:u,...d}=t;return O.jsx("input",{ref:r,disabled:a||c,readOnly:u||s||!1,"aria-invalid":o,className:me(V8({size:n,color:i}),e),...d})}),EU=C.forwardRef(({className:e,autoHeight:t,...r},n)=>{const{size:i,color:o,isInvalid:a,isDisabled:s,setHasArea:c}=Gs(),u=C.useRef(null),d=n||u,p=C.useRef(null);C.useEffect(()=>(c(!0),()=>{c(!1)}),[c]);const v=C.useCallback(()=>{if(u.current){const y=u.current;y.style.height="auto",y.style.height=`${y.scrollHeight}px`}},[]),h=y=>{var _;v(),(_=r.onInput)==null||_.call(r,y)};C.useEffect(()=>{v()},[v,r.value]),C.useEffect(()=>{t&&p.current&&p.current.style.removeProperty("height")},[t]);const x=y=>{y.preventDefault();const _=p.current;if(!_)return;const S=y.clientY,E=_.offsetHeight,I=T=>{const k=E+(T.clientY-S);k>30&&(_.style.height=k+"px")},N=()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",N)};document.addEventListener("mousemove",I),document.addEventListener("mouseup",N)},{isDisabled:b,isReadOnly:m,...w}=r;return O.jsxs("div",{ref:p,className:me("w-full relative",!t&&"h-[120px]"),children:[t?O.jsx("textarea",{ref:d,rows:1,className:me(_O({size:i,color:o}),e),disabled:s||b,onInput:h,readOnly:m||!1,"aria-invalid":a,style:{overflow:"hidden"},...w}):O.jsx(Ww,{style:{height:"100%"},children:O.jsx("textarea",{ref:d,rows:1,className:me(_O({size:i,color:o}),e),disabled:s||b,onInput:h,readOnly:m||!1,"aria-invalid":a,style:{height:"auto",overflow:"hidden",width:"100%"},...w})}),!t&&O.jsx("div",{className:"absolute right-0 bottom-0 -translate-x-full -translate-y-full size-1.75 text-sm cursor-se-resize z-10",onMouseDown:x,children:O.jsx(TW,{})})]})}),Y2=C.forwardRef(({isAction:e=!1,className:t,isDisabled:r=!1,style:n,children:i,...o},a)=>{const{size:s,color:c,isDisabled:u}=Gs(),d=r||u,p=H8({size:s,color:c,isDisabled:d,isAction:e});return O.jsx("div",{ref:a,"data-qui":"InputIcon",className:me(p,t),style:n,role:e||o.onClick?"button":void 0,tabIndex:(e||o.onClick)&&!d?0:void 0,"aria-disabled":d,...o,children:i})}),X2=C.forwardRef(({icon:e,className:t,children:r,...n},i)=>{const{size:o,color:a,setHasMessage:s,isDisabled:c}=Gs();return C.useEffect(()=>(s(!0),()=>{s(!1)}),[s]),O.jsxs("div",{ref:i,"data-qui":"InputMessage",role:"alert",className:me(W8({size:o,color:a,isDisabled:c}),t),...n,children:[e!==void 0&&O.jsx("div",{className:me(U8({size:o}),t),children:e}),O.jsx("p",{children:r})]})});U2.displayName="InputRoot";G2.displayName="InputGroup";K2.displayName="InputField";EU.displayName="InputArea";Y2.displayName="InputIcon";X2.displayName="InputMessage";const xt={Root:U2,Group:G2,Field:K2,Icon:Y2,Message:X2},ks={primary:{container:"bg-primary-light",text:"text-primary-dark",icon:"text-primary-dark",button:"hover:bg-primary-hover hover:text-body"},positive:{container:"bg-positive-light",text:"text-positive-dark",icon:"text-positive-dark",button:"hover:bg-positive hover:text-body"},negative:{container:"bg-negative-light",text:"text-negative-dark",icon:"text-negative-dark",button:"hover:bg-negative hover:text-body"},warning:{container:"bg-warning-light",text:"text-warning-dark",icon:"text-warning-dark",button:"hover:bg-warning hover:text-body"}},SU=({color:e})=>me("min-h-6 absolute py-0.5 px-1 rounded whitespace-nowrap flex items-center gap-1",ks[e].container,ks[e].icon),OU=({color:e})=>me("text-xs font-medium leading-3",ks[e].text),CU=({color:e})=>me("p-0.5 rounded cursor-pointer",ks[e].button,ks[e].icon),Gr=({label:e,color:t="primary",position:r="up",showCloseButton:n=!1,icon:i,children:o,delay:a=0,trigger:s="hover",className:c,container:u,isHidden:d=!1})=>{const[p,v]=C.useState(!1),[h,x]=C.useState(!1),[b,m]=C.useState({position:r,transform:""}),w=C.useRef(null),y=C.useRef(null),_=C.useRef(null);C.useEffect(()=>{d&&p&&(v(!1),_.current&&clearTimeout(_.current))},[d,p]);const S=C.useCallback(()=>{if(!w.current||!y.current)return;const A=w.current.getBoundingClientRect(),z=y.current.getBoundingClientRect(),P=window.innerWidth,K=window.innerHeight,$=window.scrollX,Y=window.scrollY,U=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth,P),Z=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,K),D=4;let W=r,Q={position:W,transform:""};const ee=q=>{const{top:X,left:te,width:ne,height:de}=A,re=X+Y,ge=te+$;switch(q){case"up":return{top:`${re-z.height-D}px`,left:`${ge+ne/2}px`,transform:"translateX(-50%)"};case"up-start":return{top:`${re-z.height-D}px`,left:`${ge}px`,transform:"translateX(0)"};case"up-end":return{top:`${re-z.height-D}px`,left:`${ge+ne-z.width}px`,transform:"translateX(0)"};case"down":return{top:`${re+de+D}px`,left:`${ge+ne/2}px`,transform:"translateX(-50%)"};case"down-start":return{top:`${re+de+D}px`,left:`${ge}px`,transform:"translateX(0)"};case"down-end":return{top:`${re+de+D}px`,left:`${ge+ne-z.width}px`,transform:"translateX(0)"};case"left":return{top:`${re+de/2}px`,left:`${ge-z.width-D}px`,transform:"translateY(-50%)"};case"left-start":return{top:`${re}px`,left:`${ge-z.width-D}px`,transform:"translateY(0)"};case"left-end":return{top:`${re+de-z.height}px`,left:`${ge-z.width-D}px`,transform:"translateY(0)"};case"right":return{top:`${re+de/2}px`,left:`${ge+ne+D}px`,transform:"translateY(-50%)"};case"right-start":return{top:`${re}px`,left:`${ge+ne+D}px`,transform:"translateY(0)"};case"right-end":return{top:`${re+de-z.height}px`,left:`${ge+ne+D}px`,transform:"translateY(0)"};default:return{}}},j={up:{fits:A.top-z.height-D>=0},"up-start":{fits:A.top-z.height-D>=0&&A.left+z.width<=P},"up-end":{fits:A.top-z.height-D>=0&&A.right-z.width>=0},down:{fits:A.bottom+z.height+D<=K&&A.bottom+z.height+D<=Z},"down-start":{fits:A.bottom+z.height+D<=K&&A.bottom+z.height+D<=Z&&A.left+z.width<=P},"down-end":{fits:A.bottom+z.height+D<=K&&A.bottom+z.height+D<=Z&&A.right-z.width>=0},left:{fits:A.left-z.width-D>=0},"left-start":{fits:A.left-z.width-D>=0&&A.top+z.height<=K},"left-end":{fits:A.left-z.width-D>=0&&A.bottom-z.height>=0},right:{fits:A.right+z.width+D<=P&&A.right+z.width+D<=U},"right-start":{fits:A.right+z.width+D<=P&&A.right+z.width+D<=U&&A.top+z.height<=K},"right-end":{fits:A.right+z.width+D<=P&&A.right+z.width+D<=U&&A.bottom-z.height>=0}},F=A.left+A.width/2-z.width/2,G=A.left+A.width/2+z.width/2;if((r==="up"||r==="down")&&(F<0||G>P)&&(j[r].fits=!1),j[r].fits){const q=ee(r);Q={position:r,...q,transform:q.transform||""}}else{const q=["up","up-start","up-end","down","down-start","down-end","right","right-start","right-end","left","left-start","left-end"].find(X=>j[X].fits);if(q){W=q;const X=ee(q);Q={position:W,...X,transform:X.transform||""}}else{const X={up:A.top,"up-start":A.top,"up-end":A.top,down:Math.min(K-A.bottom,Z-A.bottom),"down-start":Math.min(K-A.bottom,Z-A.bottom),"down-end":Math.min(K-A.bottom,Z-A.bottom),left:A.left,"left-start":A.left,"left-end":A.left,right:Math.min(P-A.right,U-A.right),"right-start":Math.min(P-A.right,U-A.right),"right-end":Math.min(P-A.right,U-A.right)},te=Object.entries(X).reduce((de,[re,ge])=>ge>de.space?{position:re,space:ge}:de,{position:"up",space:0}).position;W=te;const ne=ee(te);Q={position:W,...ne,transform:ne.transform||""}}}m(Q)},[r]),E=()=>{s!=="click"||d||(v(!0),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{h||v(!1)},a))},I=A=>{A.stopPropagation(),v(!1),_.current&&clearTimeout(_.current)},N=()=>{x(!0),_.current&&clearTimeout(_.current)},T=()=>{x(!1),p&&(_.current=setTimeout(()=>{v(!1)},a))},k=()=>{s==="hover"&&!d&&(v(!0),_.current&&clearTimeout(_.current))},L=()=>{s==="hover"&&(_.current=setTimeout(()=>{v(!1)},a))};C.useEffect(()=>{if(p){const A=requestAnimationFrame(()=>{S()});return()=>cancelAnimationFrame(A)}},[p,e,S]),C.useEffect(()=>{if(p){const A=setTimeout(()=>S(),0);return()=>clearTimeout(A)}},[p,S]),C.useEffect(()=>{const A=()=>{p&&S()},z=()=>{p&&S()};return window.addEventListener("resize",A),window.addEventListener("scroll",z,!0),()=>{window.removeEventListener("resize",A),window.removeEventListener("scroll",z,!0),_.current&&clearTimeout(_.current)}},[p,S]);const B=u||(typeof document<"u"?document.body:null);return B?O.jsxs(O.Fragment,{children:[O.jsx("div",{"data-qui":"Tooltip",ref:w,onClick:E,onMouseEnter:k,onMouseLeave:L,className:me("relative inline-flex items-center",c),children:o}),p&&!!e&&si.createPortal(O.jsxs("div",{ref:y,role:"tooltip",className:SU({color:t}),style:{position:"absolute",left:b.left??0,top:b.top??0,transform:b.transform,zIndex:1e3,visibility:b.left?"visible":"hidden"},onMouseEnter:N,onMouseLeave:T,children:[i&&O.jsx("span",{"data-testid":"tooltip-icon",children:i}),O.jsx("div",{className:OU({color:t}),children:e}),n&&O.jsx("div",{onClick:I,className:CU({color:t}),role:"button",children:O.jsx(Wu,{})})]}),B)]}):null};function IU(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return C.useMemo(()=>n=>{t.forEach(i=>i(n))},t)}const Uu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ma(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Uw(e){return"nodeType"in e}function _r(e){var t,r;return e?ma(e)?e:Uw(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function Gw(e){const{Document:t}=_r(e);return e instanceof t}function Ks(e){return ma(e)?!1:e instanceof _r(e).HTMLElement}function Z2(e){return e instanceof _r(e).SVGElement}function ba(e){return e?ma(e)?e.document:Uw(e)?Gw(e)?e:Ks(e)||Z2(e)?e.ownerDocument:document:document:document}const In=Uu?C.useLayoutEffect:C.useEffect;function Gu(e){const t=C.useRef(e);return In(()=>{t.current=e}),C.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}function RU(){const e=C.useRef(null),t=C.useCallback((n,i)=>{e.current=setInterval(n,i)},[]),r=C.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Ms(e,t){t===void 0&&(t=[e]);const r=C.useRef(e);return In(()=>{r.current!==e&&(r.current=e)},t),r}function Ys(e,t){const r=C.useRef();return C.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function vu(e){const t=Gu(e),r=C.useRef(null),n=C.useCallback(i=>{i!==r.current&&(t==null||t(i,r.current)),r.current=i},[]);return[r,n]}function gu(e){const t=C.useRef();return C.useEffect(()=>{t.current=e},[e]),t.current}let xp={};function Xs(e,t){return C.useMemo(()=>{if(t)return t;const r=xp[e]==null?0:xp[e]+1;return xp[e]=r,e+"-"+r},[e,t])}function J2(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((o,a)=>{const s=Object.entries(a);for(const[c,u]of s){const d=o[c];d!=null&&(o[c]=d+e*u)}return o},{...t})}}const Jo=J2(1),mu=J2(-1);function NU(e){return"clientX"in e&&"clientY"in e}function Ku(e){if(!e)return!1;const{KeyboardEvent:t}=_r(e.target);return t&&e instanceof t}function TU(e){if(!e)return!1;const{TouchEvent:t}=_r(e.target);return t&&e instanceof t}function bu(e){if(TU(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return NU(e)?{x:e.clientX,y:e.clientY}:null}const Di=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[Di.Translate.toString(e),Di.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),RO="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function PU(e){return e.matches(RO)?e:e.querySelector(RO)}const kU={display:"none"};function MU(e){let{id:t,value:r}=e;return C.createElement("div",{id:t,style:kU},r)}function AU(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return C.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function DU(){const[e,t]=C.useState("");return{announce:C.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Q2=C.createContext(null);function jU(e){const t=C.useContext(Q2);C.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function qU(){const[e]=C.useState(()=>new Set),t=C.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[C.useCallback(r=>{let{type:n,event:i}=r;e.forEach(o=>{var a;return(a=o[n])==null?void 0:a.call(o,i)})},[e]),t]}const LU={draggable:`
15
- To pick up a draggable item, press the space bar.
16
- While dragging, use the arrow keys to move the item.
17
- Press space again to drop the item in its new position, or press escape to cancel.
18
- `},zU={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function BU(e){let{announcements:t=zU,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=LU}=e;const{announce:o,announcement:a}=DU(),s=Xs("DndLiveRegion"),[c,u]=C.useState(!1);if(C.useEffect(()=>{u(!0)},[]),jU(C.useMemo(()=>({onDragStart(p){let{active:v}=p;o(t.onDragStart({active:v}))},onDragMove(p){let{active:v,over:h}=p;t.onDragMove&&o(t.onDragMove({active:v,over:h}))},onDragOver(p){let{active:v,over:h}=p;o(t.onDragOver({active:v,over:h}))},onDragEnd(p){let{active:v,over:h}=p;o(t.onDragEnd({active:v,over:h}))},onDragCancel(p){let{active:v,over:h}=p;o(t.onDragCancel({active:v,over:h}))}}),[o,t])),!c)return null;const d=C.createElement(C.Fragment,null,C.createElement(MU,{id:n,value:i.draggable}),C.createElement(AU,{id:s,announcement:a}));return r?si.createPortal(d,r):d}var Kt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Kt||(Kt={}));function yu(){}function FU(e,t){return C.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function $U(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return C.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Rn=Object.freeze({x:0,y:0});function VU(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function HU(e,t){const r=bu(e);if(!r)return"0 0";const n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function WU(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function UU(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function GU(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function NO(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const KU=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=NO(t,t.left,t.top),o=[];for(const a of n){const{id:s}=a,c=r.get(s);if(c){const u=VU(NO(c),i);o.push({id:s,data:{droppableContainer:a,value:u}})}}return o.sort(WU)};function YU(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-n,s=o-r;if(n<i&&r<o){const c=t.width*t.height,u=e.width*e.height,d=a*s,p=d/(c+u-d);return Number(p.toFixed(4))}return 0}const XU=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const o of n){const{id:a}=o,s=r.get(a);if(s){const c=YU(s,t);c>0&&i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(UU)};function ZU(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function eq(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Rn}function JU(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((o,a)=>({...o,top:o.top+e*a.y,bottom:o.bottom+e*a.y,left:o.left+e*a.x,right:o.right+e*a.x}),{...t})}}const QU=JU(1);function tq(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function eG(e,t,r){const n=tq(t);if(!n)return e;const{scaleX:i,scaleY:o,x:a,y:s}=n,c=e.left-a-(1-i)*parseFloat(r),u=e.top-s-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),d=i?e.width/i:e.width,p=o?e.height/o:e.height;return{width:d,height:p,top:u,right:c+d,bottom:u+p,left:c}}const tG={ignoreTransform:!1};function ya(e,t){t===void 0&&(t=tG);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=_r(e).getComputedStyle(e);u&&(r=eG(r,u,d))}const{top:n,left:i,width:o,height:a,bottom:s,right:c}=r;return{top:n,left:i,width:o,height:a,bottom:s,right:c}}function TO(e){return ya(e,{ignoreTransform:!0})}function rG(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function nG(e,t){return t===void 0&&(t=_r(e).getComputedStyle(e)),t.position==="fixed"}function iG(e,t){t===void 0&&(t=_r(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(n=>{const i=t[n];return typeof i=="string"?r.test(i):!1})}function Kw(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(Gw(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!Ks(i)||Z2(i)||r.includes(i))return r;const o=_r(e).getComputedStyle(i);return i!==e&&iG(i,o)&&r.push(i),nG(i,o)?r:n(i.parentNode)}return e?n(e):r}function rq(e){const[t]=Kw(e,1);return t??null}function wp(e){return!Uu||!e?null:ma(e)?e:Uw(e)?Gw(e)||e===ba(e).scrollingElement?window:Ks(e)?e:null:null}function nq(e){return ma(e)?e.scrollX:e.scrollLeft}function iq(e){return ma(e)?e.scrollY:e.scrollTop}function cw(e){return{x:nq(e),y:iq(e)}}var Jt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Jt||(Jt={}));function oq(e){return!Uu||!e?!1:e===document.scrollingElement}function aq(e){const t={x:0,y:0},r=oq(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:n,minScroll:t}}const oG={x:.2,y:.2};function aG(e,t,r,n,i){let{top:o,left:a,right:s,bottom:c}=r;n===void 0&&(n=10),i===void 0&&(i=oG);const{isTop:u,isBottom:d,isLeft:p,isRight:v}=aq(e),h={x:0,y:0},x={x:0,y:0},b={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+b.height?(h.y=Jt.Backward,x.y=n*Math.abs((t.top+b.height-o)/b.height)):!d&&c>=t.bottom-b.height&&(h.y=Jt.Forward,x.y=n*Math.abs((t.bottom-b.height-c)/b.height)),!v&&s>=t.right-b.width?(h.x=Jt.Forward,x.x=n*Math.abs((t.right-b.width-s)/b.width)):!p&&a<=t.left+b.width&&(h.x=Jt.Backward,x.x=n*Math.abs((t.left+b.width-a)/b.width)),{direction:h,speed:x}}function sG(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function sq(e){return e.reduce((t,r)=>Jo(t,cw(r)),Rn)}function lG(e){return e.reduce((t,r)=>t+nq(r),0)}function cG(e){return e.reduce((t,r)=>t+iq(r),0)}function lq(e,t){if(t===void 0&&(t=ya),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);rq(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const uG=[["x",["left","right"],lG],["y",["top","bottom"],cG]];class Yw{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Kw(r),i=sq(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of uG)for(const c of a)Object.defineProperty(this,c,{get:()=>{const u=s(n),d=i[o]-u;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Es{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var i;(i=this.target)==null||i.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function dG(e){const{EventTarget:t}=_r(e);return e instanceof t?e:ba(e)}function _p(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var ln;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ln||(ln={}));function PO(e){e.preventDefault()}function fG(e){e.stopPropagation()}var rt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(rt||(rt={}));const cq={start:[rt.Space,rt.Enter],cancel:[rt.Esc],end:[rt.Space,rt.Enter,rt.Tab]},pG=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case rt.Right:return{...r,x:r.x+25};case rt.Left:return{...r,x:r.x-25};case rt.Down:return{...r,y:r.y+25};case rt.Up:return{...r,y:r.y-25}}};class uq{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Es(ba(r)),this.windowListeners=new Es(_r(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ln.Resize,this.handleCancel),this.windowListeners.add(ln.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ln.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&lq(n),r(Rn)}handleKeyDown(t){if(Ku(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=cq,coordinateGetter:a=pG,scrollBehavior:s="smooth"}=i,{code:c}=t;if(o.end.includes(c)){this.handleEnd(t);return}if(o.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=n.current,d=u?{x:u.left,y:u.top}:Rn;this.referenceCoordinates||(this.referenceCoordinates=d);const p=a(t,{active:r,context:n.current,currentCoordinates:d});if(p){const v=mu(p,d),h={x:0,y:0},{scrollableAncestors:x}=n.current;for(const b of x){const m=t.code,{isTop:w,isRight:y,isLeft:_,isBottom:S,maxScroll:E,minScroll:I}=aq(b),N=sG(b),T={x:Math.min(m===rt.Right?N.right-N.width/2:N.right,Math.max(m===rt.Right?N.left:N.left+N.width/2,p.x)),y:Math.min(m===rt.Down?N.bottom-N.height/2:N.bottom,Math.max(m===rt.Down?N.top:N.top+N.height/2,p.y))},k=m===rt.Right&&!y||m===rt.Left&&!_,L=m===rt.Down&&!S||m===rt.Up&&!w;if(k&&T.x!==p.x){const B=b.scrollLeft+v.x,A=m===rt.Right&&B<=E.x||m===rt.Left&&B>=I.x;if(A&&!v.y){b.scrollTo({left:B,behavior:s});return}A?h.x=b.scrollLeft-B:h.x=m===rt.Right?b.scrollLeft-E.x:b.scrollLeft-I.x,h.x&&b.scrollBy({left:-h.x,behavior:s});break}else if(L&&T.y!==p.y){const B=b.scrollTop+v.y,A=m===rt.Down&&B<=E.y||m===rt.Up&&B>=I.y;if(A&&!v.x){b.scrollTo({top:B,behavior:s});return}A?h.y=b.scrollTop-B:h.y=m===rt.Down?b.scrollTop-E.y:b.scrollTop-I.y,h.y&&b.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,Jo(mu(p,this.referenceCoordinates),h))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}uq.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=cq,onActivation:i}=t,{active:o}=r;const{code:a}=e.nativeEvent;if(n.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function kO(e){return!!(e&&"distance"in e)}function MO(e){return!!(e&&"delay"in e)}class Xw{constructor(t,r,n){var i;n===void 0&&(n=dG(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:o}=t,{target:a}=o;this.props=t,this.events=r,this.document=ba(a),this.documentListeners=new Es(this.document),this.listeners=new Es(n),this.windowListeners=new Es(_r(a)),this.initialCoordinates=(i=bu(o))!=null?i:Rn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(ln.Resize,this.handleCancel),this.windowListeners.add(ln.DragStart,PO),this.windowListeners.add(ln.VisibilityChange,this.handleCancel),this.windowListeners.add(ln.ContextMenu,PO),this.documentListeners.add(ln.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(MO(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(kO(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:i}=this.props;i(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(ln.Click,fG,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ln.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const c=(r=bu(t))!=null?r:Rn,u=mu(i,c);if(!n&&s){if(kO(s)){if(s.tolerance!=null&&_p(u,s.tolerance))return this.handleCancel();if(_p(u,s.distance))return this.handleStart()}if(MO(s)&&_p(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===rt.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const hG={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Zw extends Xw{constructor(t){const{event:r}=t,n=ba(r.target);super(t,hG,n)}}Zw.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const vG={move:{name:"mousemove"},end:{name:"mouseup"}};var uw;(function(e){e[e.RightClick=2]="RightClick"})(uw||(uw={}));class gG extends Xw{constructor(t){super(t,vG,ba(t.event.target))}}gG.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===uw.RightClick?!1:(n==null||n({event:r}),!0)}}];const Ep={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class mG extends Xw{constructor(t){super(t,Ep)}static setup(){return window.addEventListener(Ep.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Ep.move.name,t)};function t(){}}}mG.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:i}=r;return i.length>1?!1:(n==null||n({event:r}),!0)}}];var Ss;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ss||(Ss={}));var xu;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(xu||(xu={}));function bG(e){let{acceleration:t,activator:r=Ss.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=xu.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:p,threshold:v}=e;const h=xG({delta:p,disabled:!o}),[x,b]=RU(),m=C.useRef({x:0,y:0}),w=C.useRef({x:0,y:0}),y=C.useMemo(()=>{switch(r){case Ss.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Ss.DraggableRect:return i}},[r,i,c]),_=C.useRef(null),S=C.useCallback(()=>{const I=_.current;if(!I)return;const N=m.current.x*w.current.x,T=m.current.y*w.current.y;I.scrollBy(N,T)},[]),E=C.useMemo(()=>s===xu.TreeOrder?[...u].reverse():u,[s,u]);C.useEffect(()=>{if(!o||!u.length||!y){b();return}for(const I of E){if((n==null?void 0:n(I))===!1)continue;const N=u.indexOf(I),T=d[N];if(!T)continue;const{direction:k,speed:L}=aG(I,T,y,t,v);for(const B of["x","y"])h[B][k[B]]||(L[B]=0,k[B]=0);if(L.x>0||L.y>0){b(),_.current=I,x(S,a),m.current=L,w.current=k;return}}m.current={x:0,y:0},w.current={x:0,y:0},b()},[t,S,n,b,o,a,JSON.stringify(y),JSON.stringify(h),x,u,E,d,JSON.stringify(v)])}const yG={x:{[Jt.Backward]:!1,[Jt.Forward]:!1},y:{[Jt.Backward]:!1,[Jt.Forward]:!1}};function xG(e){let{delta:t,disabled:r}=e;const n=gu(t);return Ys(i=>{if(r||!n||!i)return yG;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Jt.Backward]:i.x[Jt.Backward]||o.x===-1,[Jt.Forward]:i.x[Jt.Forward]||o.x===1},y:{[Jt.Backward]:i.y[Jt.Backward]||o.y===-1,[Jt.Forward]:i.y[Jt.Forward]||o.y===1}}},[r,t,n])}function wG(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return Ys(i=>{var o;return t==null?null:(o=n??i)!=null?o:null},[n,t])}function _G(e,t){return C.useMemo(()=>e.reduce((r,n)=>{const{sensor:i}=n,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,n)}));return[...r,...o]},[]),[e,t])}var As;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(As||(As={}));var dw;(function(e){e.Optimized="optimized"})(dw||(dw={}));const AO=new Map;function EG(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,a]=C.useState(null),{frequency:s,measure:c,strategy:u}=i,d=C.useRef(e),p=m(),v=Ms(p),h=C.useCallback(function(w){w===void 0&&(w=[]),!v.current&&a(y=>y===null?w:y.concat(w.filter(_=>!y.includes(_))))},[v]),x=C.useRef(null),b=Ys(w=>{if(p&&!r)return AO;if(!w||w===AO||d.current!==e||o!=null){const y=new Map;for(let _ of e){if(!_)continue;if(o&&o.length>0&&!o.includes(_.id)&&_.rect.current){y.set(_.id,_.rect.current);continue}const S=_.node.current,E=S?new Yw(c(S),S):null;_.rect.current=E,E&&y.set(_.id,E)}return y}return w},[e,o,r,p,c]);return C.useEffect(()=>{d.current=e},[e]),C.useEffect(()=>{p||h()},[r,p]),C.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),C.useEffect(()=>{p||typeof s!="number"||x.current!==null||(x.current=setTimeout(()=>{h(),x.current=null},s))},[s,p,h,...n]),{droppableRects:b,measureDroppableContainers:h,measuringScheduled:o!=null};function m(){switch(u){case As.Always:return!1;case As.BeforeDragging:return r;default:return!r}}}function Jw(e,t){return Ys(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function SG(e,t){return Jw(e,t)}function OG(e){let{callback:t,disabled:r}=e;const n=Gu(t),i=C.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(n)},[n,r]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Yu(e){let{callback:t,disabled:r}=e;const n=Gu(t),i=C.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(n)},[r]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function CG(e){return new Yw(ya(e),e)}function DO(e,t,r){t===void 0&&(t=CG);const[n,i]=C.useState(null);function o(){i(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??r)!=null?u:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d})}const a=OG({callback(c){if(e)for(const u of c){const{type:d,target:p}=u;if(d==="childList"&&p instanceof HTMLElement&&p.contains(e)){o();break}}}}),s=Yu({callback:o});return In(()=>{o(),e?(s==null||s.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),a==null||a.disconnect())},[e]),n}function IG(e){const t=Jw(e);return eq(e,t)}const jO=[];function RG(e){const t=C.useRef(e),r=Ys(n=>e?n&&n!==jO&&e&&t.current&&e.parentNode===t.current.parentNode?n:Kw(e):jO,[e]);return C.useEffect(()=>{t.current=e},[e]),r}function NG(e){const[t,r]=C.useState(null),n=C.useRef(e),i=C.useCallback(o=>{const a=wp(o.target);a&&r(s=>s?(s.set(a,cw(a)),new Map(s)):null)},[]);return C.useEffect(()=>{const o=n.current;if(e!==o){a(o);const s=e.map(c=>{const u=wp(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,cw(u)]):null}).filter(c=>c!=null);r(s.length?new Map(s):null),n.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(c=>{const u=wp(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),C.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>Jo(o,a),Rn):sq(e):Rn,[e,t])}function qO(e,t){t===void 0&&(t=[]);const r=C.useRef(null);return C.useEffect(()=>{r.current=null},t),C.useEffect(()=>{const n=e!==Rn;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?mu(e,r.current):Rn}function TG(e){C.useEffect(()=>{if(!Uu)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function PG(e,t){return C.useMemo(()=>e.reduce((r,n)=>{let{eventName:i,handler:o}=n;return r[i]=a=>{o(a,t)},r},{}),[e,t])}function dq(e){return C.useMemo(()=>e?rG(e):null,[e])}const LO=[];function kG(e,t){t===void 0&&(t=ya);const[r]=e,n=dq(r?_r(r):null),[i,o]=C.useState(LO);function a(){o(()=>e.length?e.map(c=>oq(c)?n:new Yw(t(c),c)):LO)}const s=Yu({callback:a});return In(()=>{s==null||s.disconnect(),a(),e.forEach(c=>s==null?void 0:s.observe(c))},[e]),i}function fq(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ks(t)?t:e}function MG(e){let{measure:t}=e;const[r,n]=C.useState(null),i=C.useCallback(u=>{for(const{target:d}of u)if(Ks(d)){n(p=>{const v=t(d);return p?{...p,width:v.width,height:v.height}:v});break}},[t]),o=Yu({callback:i}),a=C.useCallback(u=>{const d=fq(u);o==null||o.disconnect(),d&&(o==null||o.observe(d)),n(d?t(d):null)},[t,o]),[s,c]=vu(a);return C.useMemo(()=>({nodeRef:s,rect:r,setRef:c}),[r,s,c])}const AG=[{sensor:Zw,options:{}},{sensor:uq,options:{}}],DG={current:{}},Yc={draggable:{measure:TO},droppable:{measure:TO,strategy:As.WhileDragging,frequency:dw.Optimized},dragOverlay:{measure:ya}};let Os=class extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}};const jG={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Os,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:yu},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Yc,measureDroppableContainers:yu,windowRect:null,measuringScheduled:!1},pq={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:yu,draggableNodes:new Map,over:null,measureDroppableContainers:yu},Zs=C.createContext(pq),hq=C.createContext(jG);function qG(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Os}}}function LG(e,t){switch(t.type){case Kt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Kt.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Kt.DragEnd:case Kt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Kt.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Os(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case Kt.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const a=new Os(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Kt.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Os(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function zG(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=C.useContext(Zs),o=gu(n),a=gu(r==null?void 0:r.id);return C.useEffect(()=>{if(!t&&!n&&o&&a!=null){if(!Ku(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[c.current,u.current]){if(!d)continue;const p=PU(d);if(p){p.focus();break}}})}},[n,t,i,a,o]),null}function vq(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function BG(e){return C.useMemo(()=>({draggable:{...Yc.draggable,...e==null?void 0:e.draggable},droppable:{...Yc.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Yc.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function FG(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const o=C.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;In(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!n)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const u=r(c),d=eq(u,n);if(a||(d.x=0),s||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=rq(c);p&&p.scrollBy({top:d.y,left:d.x})}},[t,a,s,n,r])}const Xu=C.createContext({...Rn,scaleX:1,scaleY:1});var Pi;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Pi||(Pi={}));const $G=C.memo(function(e){var t,r,n,i;let{id:o,accessibility:a,autoScroll:s=!0,children:c,sensors:u=AG,collisionDetection:d=XU,measuring:p,modifiers:v,...h}=e;const x=C.useReducer(LG,void 0,qG),[b,m]=x,[w,y]=qU(),[_,S]=C.useState(Pi.Uninitialized),E=_===Pi.Initialized,{draggable:{active:I,nodes:N,translate:T},droppable:{containers:k}}=b,L=I!=null?N.get(I):null,B=C.useRef({initial:null,translated:null}),A=C.useMemo(()=>{var Ct;return I!=null?{id:I,data:(Ct=L==null?void 0:L.data)!=null?Ct:DG,rect:B}:null},[I,L]),z=C.useRef(null),[P,K]=C.useState(null),[$,Y]=C.useState(null),U=Ms(h,Object.values(h)),Z=Xs("DndDescribedBy",o),D=C.useMemo(()=>k.getEnabled(),[k]),W=BG(p),{droppableRects:Q,measureDroppableContainers:ee,measuringScheduled:j}=EG(D,{dragging:E,dependencies:[T.x,T.y],config:W.droppable}),F=wG(N,I),G=C.useMemo(()=>$?bu($):null,[$]),q=mn(),X=SG(F,W.draggable.measure);FG({activeNode:I!=null?N.get(I):null,config:q.layoutShiftCompensation,initialRect:X,measure:W.draggable.measure});const te=DO(F,W.draggable.measure,X),ne=DO(F?F.parentElement:null),de=C.useRef({activatorEvent:null,active:null,activeNode:F,collisionRect:null,collisions:null,droppableRects:Q,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),re=k.getNodeFor((t=de.current.over)==null?void 0:t.id),ge=MG({measure:W.dragOverlay.measure}),ue=(r=ge.nodeRef.current)!=null?r:F,xe=E?(n=ge.rect)!=null?n:te:null,le=!!(ge.nodeRef.current&&ge.rect),se=IG(le?null:te),we=dq(ue?_r(ue):null),Re=RG(E?re??F:null),Te=kG(Re),je=vq(v,{transform:{x:T.x-se.x,y:T.y-se.y,scaleX:1,scaleY:1},activatorEvent:$,active:A,activeNodeRect:te,containerNodeRect:ne,draggingNodeRect:xe,over:de.current.over,overlayNodeRect:ge.rect,scrollableAncestors:Re,scrollableAncestorRects:Te,windowRect:we}),Ke=G?Jo(G,T):null,qe=NG(Re),et=qO(qe),ht=qO(qe,[te]),St=Jo(je,et),Ve=xe?QU(xe,je):null,De=A&&Ve?d({active:A,collisionRect:Ve,droppableRects:Q,droppableContainers:D,pointerCoordinates:Ke}):null,it=GU(De,"id"),[ot,Qt]=C.useState(null),Bt=le?je:Jo(je,ht),Tt=ZU(Bt,(i=ot==null?void 0:ot.rect)!=null?i:null,te),Le=C.useRef(null),Ye=C.useCallback((Ct,It)=>{let{sensor:Pt,options:er}=It;if(z.current==null)return;const sr=N.get(z.current);if(!sr)return;const Xt=Ct.nativeEvent,pr=new Pt({active:z.current,activeNode:sr,event:Xt,options:er,context:de,onAbort(Dt){if(!N.get(Dt))return;const{onDragAbort:tr}=U.current,hr={id:Dt};tr==null||tr(hr),w({type:"onDragAbort",event:hr})},onPending(Dt,tr,hr,bn){if(!N.get(Dt))return;const{onDragPending:Cr}=U.current,zr={id:Dt,constraint:tr,initialCoordinates:hr,offset:bn};Cr==null||Cr(zr),w({type:"onDragPending",event:zr})},onStart(Dt){const tr=z.current;if(tr==null)return;const hr=N.get(tr);if(!hr)return;const{onDragStart:bn}=U.current,Cr={activatorEvent:Xt,active:{id:tr,data:hr.data,rect:B}};si.unstable_batchedUpdates(()=>{bn==null||bn(Cr),S(Pi.Initializing),m({type:Kt.DragStart,initialCoordinates:Dt,active:tr}),w({type:"onDragStart",event:Cr}),K(Le.current),Y(Xt)})},onMove(Dt){m({type:Kt.DragMove,coordinates:Dt})},onEnd:Mn(Kt.DragEnd),onCancel:Mn(Kt.DragCancel)});Le.current=pr;function Mn(Dt){return async function(){const{active:tr,collisions:hr,over:bn,scrollAdjustedTranslate:Cr}=de.current;let zr=null;if(tr&&Cr){const{cancelDrop:Kn}=U.current;zr={activatorEvent:Xt,active:tr,collisions:hr,delta:Cr,over:bn},Dt===Kt.DragEnd&&typeof Kn=="function"&&await Promise.resolve(Kn(zr))&&(Dt=Kt.DragCancel)}z.current=null,si.unstable_batchedUpdates(()=>{m({type:Dt}),S(Pi.Uninitialized),Qt(null),K(null),Y(null),Le.current=null;const Kn=Dt===Kt.DragEnd?"onDragEnd":"onDragCancel";if(zr){const $i=U.current[Kn];$i==null||$i(zr),w({type:Kn,event:zr})}})}}},[N]),bt=C.useCallback((Ct,It)=>(Pt,er)=>{const sr=Pt.nativeEvent,Xt=N.get(er);if(z.current!==null||!Xt||sr.dndKit||sr.defaultPrevented)return;const pr={active:Xt};Ct(Pt,It.options,pr)===!0&&(sr.dndKit={capturedBy:It.sensor},z.current=er,Ye(Pt,It))},[N,Ye]),Ot=_G(u,bt);TG(u),In(()=>{te&&_===Pi.Initializing&&S(Pi.Initialized)},[te,_]),C.useEffect(()=>{const{onDragMove:Ct}=U.current,{active:It,activatorEvent:Pt,collisions:er,over:sr}=de.current;if(!It||!Pt)return;const Xt={active:It,activatorEvent:Pt,collisions:er,delta:{x:St.x,y:St.y},over:sr};si.unstable_batchedUpdates(()=>{Ct==null||Ct(Xt),w({type:"onDragMove",event:Xt})})},[St.x,St.y]),C.useEffect(()=>{const{active:Ct,activatorEvent:It,collisions:Pt,droppableContainers:er,scrollAdjustedTranslate:sr}=de.current;if(!Ct||z.current==null||!It||!sr)return;const{onDragOver:Xt}=U.current,pr=er.get(it),Mn=pr&&pr.rect.current?{id:pr.id,rect:pr.rect.current,data:pr.data,disabled:pr.disabled}:null,Dt={active:Ct,activatorEvent:It,collisions:Pt,delta:{x:sr.x,y:sr.y},over:Mn};si.unstable_batchedUpdates(()=>{Qt(Mn),Xt==null||Xt(Dt),w({type:"onDragOver",event:Dt})})},[it]),In(()=>{de.current={activatorEvent:$,active:A,activeNode:F,collisionRect:Ve,collisions:De,droppableRects:Q,draggableNodes:N,draggingNode:ue,draggingNodeRect:xe,droppableContainers:k,over:ot,scrollableAncestors:Re,scrollAdjustedTranslate:St},B.current={initial:xe,translated:Ve}},[A,F,De,Ve,N,ue,xe,Q,k,ot,Re,St]),bG({...q,delta:T,draggingRect:Ve,pointerCoordinates:Ke,scrollableAncestors:Re,scrollableAncestorRects:Te});const Ht=C.useMemo(()=>({active:A,activeNode:F,activeNodeRect:te,activatorEvent:$,collisions:De,containerNodeRect:ne,dragOverlay:ge,draggableNodes:N,droppableContainers:k,droppableRects:Q,over:ot,measureDroppableContainers:ee,scrollableAncestors:Re,scrollableAncestorRects:Te,measuringConfiguration:W,measuringScheduled:j,windowRect:we}),[A,F,te,$,De,ne,ge,N,k,Q,ot,ee,Re,Te,W,j,we]),Lr=C.useMemo(()=>({activatorEvent:$,activators:Ot,active:A,activeNodeRect:te,ariaDescribedById:{draggable:Z},dispatch:m,draggableNodes:N,over:ot,measureDroppableContainers:ee}),[$,Ot,A,te,m,Z,N,ot,ee]);return C.createElement(Q2.Provider,{value:y},C.createElement(Zs.Provider,{value:Lr},C.createElement(hq.Provider,{value:Ht},C.createElement(Xu.Provider,{value:Tt},c)),C.createElement(zG,{disabled:(a==null?void 0:a.restoreFocus)===!1})),C.createElement(BU,{...a,hiddenTextDescribedById:Z}));function mn(){const Ct=(P==null?void 0:P.autoScrollEnabled)===!1,It=typeof s=="object"?s.enabled===!1:s===!1,Pt=E&&!Ct&&!It;return typeof s=="object"?{...s,enabled:Pt}:{enabled:Pt}}}),VG=C.createContext(null),zO="button",HG="Draggable";function WG(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=Xs(HG),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:p,over:v}=C.useContext(Zs),{role:h=zO,roleDescription:x="draggable",tabIndex:b=0}=i??{},m=(c==null?void 0:c.id)===t,w=C.useContext(m?Xu:VG),[y,_]=vu(),[S,E]=vu(),I=PG(a,t),N=Ms(r);In(()=>(p.set(t,{id:t,key:o,node:y,activatorNode:S,data:N}),()=>{const k=p.get(t);k&&k.key===o&&p.delete(t)}),[p,t]);const T=C.useMemo(()=>({role:h,tabIndex:b,"aria-disabled":n,"aria-pressed":m&&h===zO?!0:void 0,"aria-roledescription":x,"aria-describedby":d.draggable}),[n,h,b,m,x,d.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:T,isDragging:m,listeners:n?void 0:I,node:y,over:v,setNodeRef:_,setActivatorNodeRef:E,transform:w}}function gq(){return C.useContext(hq)}const UG="Droppable",GG={timeout:25};function KG(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=Xs(UG),{active:a,dispatch:s,over:c,measureDroppableContainers:u}=C.useContext(Zs),d=C.useRef({disabled:r}),p=C.useRef(!1),v=C.useRef(null),h=C.useRef(null),{disabled:x,updateMeasurementsFor:b,timeout:m}={...GG,...i},w=Ms(b??n),y=C.useCallback(()=>{if(!p.current){p.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(w.current)?w.current:[w.current]),h.current=null},m)},[m]),_=Yu({callback:y,disabled:x||!a}),S=C.useCallback((T,k)=>{_&&(k&&(_.unobserve(k),p.current=!1),T&&_.observe(T))},[_]),[E,I]=vu(S),N=Ms(t);return C.useEffect(()=>{!_||!E.current||(_.disconnect(),p.current=!1,_.observe(E.current))},[E,_]),C.useEffect(()=>(s({type:Kt.RegisterDroppable,element:{id:n,key:o,disabled:r,node:E,rect:v,data:N}}),()=>s({type:Kt.UnregisterDroppable,key:o,id:n})),[n]),C.useEffect(()=>{r!==d.current.disabled&&(s({type:Kt.SetDroppableDisabled,id:n,key:o,disabled:r}),d.current.disabled=r)},[n,o,r,s]),{active:a,rect:v,isOver:(c==null?void 0:c.id)===n,node:E,over:c,setNodeRef:I}}function YG(e){let{animation:t,children:r}=e;const[n,i]=C.useState(null),[o,a]=C.useState(null),s=gu(r);return!r&&!n&&s&&i(s),In(()=>{if(!o)return;const c=n==null?void 0:n.key,u=n==null?void 0:n.props.id;if(c==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,n,o]),C.createElement(C.Fragment,null,r,n?C.cloneElement(n,{ref:a}):null)}const XG={x:0,y:0,scaleX:1,scaleY:1};function ZG(e){let{children:t}=e;return C.createElement(Zs.Provider,{value:pq},C.createElement(Xu.Provider,{value:XG},t))}const JG={position:"fixed",touchAction:"none"},QG=e=>Ku(e)?"transform 250ms ease":void 0,e7=C.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:i,children:o,className:a,rect:s,style:c,transform:u,transition:d=QG}=e;if(!s)return null;const p=i?u:{...u,scaleX:1,scaleY:1},v={...JG,width:s.width,height:s.height,top:s.top,left:s.left,transform:Di.Transform.toString(p),transformOrigin:i&&n?HU(n,s):void 0,transition:typeof d=="function"?d(n):d,...c};return C.createElement(r,{className:a,style:v,ref:t},o)}),t7=e=>t=>{let{active:r,dragOverlay:n}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,c]of Object.entries(o.active))c!==void 0&&(i[s]=r.node.style.getPropertyValue(s),r.node.style.setProperty(s,c));if(o!=null&&o.dragOverlay)for(const[s,c]of Object.entries(o.dragOverlay))c!==void 0&&n.node.style.setProperty(s,c);return a!=null&&a.active&&r.node.classList.add(a.active),a!=null&&a.dragOverlay&&n.node.classList.add(a.dragOverlay),function(){for(const[s,c]of Object.entries(i))r.node.style.setProperty(s,c);a!=null&&a.active&&r.node.classList.remove(a.active)}},r7=e=>{let{transform:{initial:t,final:r}}=e;return[{transform:Di.Transform.toString(t)},{transform:Di.Transform.toString(r)}]},n7={duration:250,easing:"ease",keyframes:r7,sideEffects:t7({styles:{active:{opacity:"0"}}})};function i7(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:i}=e;return Gu((o,a)=>{if(t===null)return;const s=r.get(o);if(!s)return;const c=s.node.current;if(!c)return;const u=fq(a);if(!u)return;const{transform:d}=_r(a).getComputedStyle(a),p=tq(d);if(!p)return;const v=typeof t=="function"?t:o7(t);return lq(c,i.draggable.measure),v({active:{id:o,data:s.data,node:c,rect:i.draggable.measure(c)},draggableNodes:r,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:n,measuringConfiguration:i,transform:p})})}function o7(e){const{duration:t,easing:r,sideEffects:n,keyframes:i}={...n7,...e};return o=>{let{active:a,dragOverlay:s,transform:c,...u}=o;if(!t)return;const d={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},p={scaleX:c.scaleX!==1?a.rect.width*c.scaleX/s.rect.width:1,scaleY:c.scaleY!==1?a.rect.height*c.scaleY/s.rect.height:1},v={x:c.x-d.x,y:c.y-d.y,...p},h=i({...u,active:a,dragOverlay:s,transform:{initial:c,final:v}}),[x]=h,b=h[h.length-1];if(JSON.stringify(x)===JSON.stringify(b))return;const m=n==null?void 0:n({active:a,dragOverlay:s,...u}),w=s.node.animate(h,{duration:t,easing:r,fill:"forwards"});return new Promise(y=>{w.onfinish=()=>{m==null||m(),y()}})}}let BO=0;function a7(e){return C.useMemo(()=>{if(e!=null)return BO++,BO},[e])}const s7=C.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:n,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:c,zIndex:u=999}=e;const{activatorEvent:d,active:p,activeNodeRect:v,containerNodeRect:h,draggableNodes:x,droppableContainers:b,dragOverlay:m,over:w,measuringConfiguration:y,scrollableAncestors:_,scrollableAncestorRects:S,windowRect:E}=gq(),I=C.useContext(Xu),N=a7(p==null?void 0:p.id),T=vq(a,{activatorEvent:d,active:p,activeNodeRect:v,containerNodeRect:h,draggingNodeRect:m.rect,over:w,overlayNodeRect:m.rect,scrollableAncestors:_,scrollableAncestorRects:S,transform:I,windowRect:E}),k=Jw(v),L=i7({config:n,draggableNodes:x,droppableContainers:b,measuringConfiguration:y}),B=k?m.setRef:void 0;return C.createElement(ZG,null,C.createElement(YG,{animation:L},p&&N?C.createElement(e7,{key:N,id:p.id,ref:B,as:s,activatorEvent:d,adjustScale:t,className:c,transition:o,rect:k,style:{zIndex:u,...i},transform:T},r):null))});function Qw(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function l7(e,t){return e.reduce((r,n,i)=>{const o=t.get(n);return o&&(r[i]=o),r},Array(e.length))}function mc(e){return e!==null&&e>=0}function c7(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function u7(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const bc={scaleX:1,scaleY:1},d7=e=>{var t;let{rects:r,activeNodeRect:n,activeIndex:i,overIndex:o,index:a}=e;const s=(t=r[i])!=null?t:n;if(!s)return null;const c=f7(r,a,i);if(a===i){const u=r[o];return u?{x:i<o?u.left+u.width-(s.left+s.width):u.left-s.left,y:0,...bc}:null}return a>i&&a<=o?{x:-s.width-c,y:0,...bc}:a<i&&a>=o?{x:s.width+c,y:0,...bc}:{x:0,y:0,...bc}};function f7(e,t,r){const n=e[t],i=e[t-1],o=e[t+1];return!n||!i&&!o?0:r<t?i?n.left-(i.left+i.width):o.left-(n.left+n.width):o?o.left-(n.left+n.width):n.left-(i.left+i.width)}const mq=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const o=Qw(t,n,r),a=t[i],s=o[i];return!s||!a?null:{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}},bq="Sortable",yq=C.createContext({activeIndex:-1,containerId:bq,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:mq,disabled:{draggable:!1,droppable:!1}});function p7(e){let{children:t,id:r,items:n,strategy:i=mq,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:c,over:u,measureDroppableContainers:d}=gq(),p=Xs(bq,r),v=s.rect!==null,h=C.useMemo(()=>n.map(I=>typeof I=="object"&&"id"in I?I.id:I),[n]),x=a!=null,b=a?h.indexOf(a.id):-1,m=u?h.indexOf(u.id):-1,w=C.useRef(h),y=!c7(h,w.current),_=m!==-1&&b===-1||y,S=u7(o);In(()=>{y&&x&&d(h)},[y,h,x,d]),C.useEffect(()=>{w.current=h},[h]);const E=C.useMemo(()=>({activeIndex:b,containerId:p,disabled:S,disableTransforms:_,items:h,overIndex:m,useDragOverlay:v,sortedRects:l7(h,c),strategy:i}),[b,p,S.draggable,S.droppable,_,h,m,c,v,i]);return C.createElement(yq.Provider,{value:E},t)}const h7=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return Qw(r,n,i).indexOf(t)},v7=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:c,transition:u}=e;return!u||!n||s!==o&&i===a?!1:r?!0:a!==i&&t===c},g7={duration:200,easing:"ease"},xq="transform",m7=Di.Transition.toString({property:xq,duration:0,easing:"linear"}),b7={roleDescription:"sortable"};function y7(e){let{disabled:t,index:r,node:n,rect:i}=e;const[o,a]=C.useState(null),s=C.useRef(r);return In(()=>{if(!t&&r!==s.current&&n.current){const c=i.current;if(c){const u=ya(n.current,{ignoreTransform:!0}),d={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(d.x||d.y)&&a(d)}}r!==s.current&&(s.current=r)},[t,r,n,i]),C.useEffect(()=>{o&&a(null)},[o]),o}function x7(e){let{animateLayoutChanges:t=v7,attributes:r,disabled:n,data:i,getNewIndex:o=h7,id:a,strategy:s,resizeObserverConfig:c,transition:u=g7}=e;const{items:d,containerId:p,activeIndex:v,disabled:h,disableTransforms:x,sortedRects:b,overIndex:m,useDragOverlay:w,strategy:y}=C.useContext(yq),_=w7(n,h),S=d.indexOf(a),E=C.useMemo(()=>({sortable:{containerId:p,index:S,items:d},...i}),[p,i,S,d]),I=C.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:N,node:T,isOver:k,setNodeRef:L}=KG({id:a,data:E,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...c}}),{active:B,activatorEvent:A,activeNodeRect:z,attributes:P,setNodeRef:K,listeners:$,isDragging:Y,over:U,setActivatorNodeRef:Z,transform:D}=WG({id:a,data:E,attributes:{...b7,...r},disabled:_.draggable}),W=IU(L,K),Q=!!B,ee=Q&&!x&&mc(v)&&mc(m),j=!w&&Y,F=j&&ee?D:null,G=ee?F??(s??y)({rects:b,activeNodeRect:z,activeIndex:v,overIndex:m,index:S}):null,q=mc(v)&&mc(m)?o({id:a,items:d,activeIndex:v,overIndex:m}):S,X=B==null?void 0:B.id,te=C.useRef({activeId:X,items:d,newIndex:q,containerId:p}),ne=d!==te.current.items,de=t({active:B,containerId:p,isDragging:Y,isSorting:Q,id:a,index:S,items:d,newIndex:te.current.newIndex,previousItems:te.current.items,previousContainerId:te.current.containerId,transition:u,wasDragging:te.current.activeId!=null}),re=y7({disabled:!de,index:S,node:T,rect:N});return C.useEffect(()=>{Q&&te.current.newIndex!==q&&(te.current.newIndex=q),p!==te.current.containerId&&(te.current.containerId=p),d!==te.current.items&&(te.current.items=d)},[Q,q,p,d]),C.useEffect(()=>{if(X===te.current.activeId)return;if(X!=null&&te.current.activeId==null){te.current.activeId=X;return}const ue=setTimeout(()=>{te.current.activeId=X},50);return()=>clearTimeout(ue)},[X]),{active:B,activeIndex:v,attributes:P,data:E,rect:N,index:S,newIndex:q,items:d,isOver:k,isSorting:Q,isDragging:Y,listeners:$,node:T,overIndex:m,over:U,setNodeRef:W,setActivatorNodeRef:Z,setDroppableNodeRef:L,setDraggableNodeRef:K,transform:re??G,transition:ge()};function ge(){if(re||ne&&te.current.newIndex===S)return m7;if(!(j&&!Ku(A)||!u)&&(Q||de))return Di.Transition.toString({...u,property:xq})}}function w7(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}rt.Down,rt.Right,rt.Up,rt.Left;const _7=e=>{let{transform:t}=e;return{...t,y:0}};function E7(e,t,r){const n={...e};return t.top+e.y<=r.top?n.y=r.top-t.top:t.bottom+e.y>=r.top+r.height&&(n.y=r.top+r.height-t.bottom),t.left+e.x<=r.left?n.x=r.left-t.left:t.right+e.x>=r.left+r.width&&(n.x=r.left+r.width-t.right),n}const S7=e=>{let{draggingNodeRect:t,transform:r,scrollableAncestorRects:n}=e;const i=n[0];return!t||!i?r:E7(r,t,i)},FO=({tab:e,value:t,isActive:r,onTabClick:n,dragOverlay:i=!1})=>{const{onClose:o,renderTab:a}=e,{attributes:s,listeners:c,setNodeRef:u,transform:d,transition:p,isDragging:v}=x7({id:t}),h={transform:Di.Transform.toString(d),transition:p||"transform 200ms cubic-bezier(0.2, 0, 0, 1) 0s",opacity:v&&!i?.5:1,cursor:"pointer"},x=()=>{n(t)},b=m=>{m==null||m.stopPropagation(),o&&o(t)};return a?O.jsx("div",{ref:u,style:h,...s,...c,className:"flex h-full shrink-0 select-none focus:outline-hidden","aria-roledescription":"sortable",children:a({tab:e,isActive:r,onClick:x,onClose:o?b:void 0})}):null},wq={sm:{padding:"px-4 py-0.5",text:"text-xxs",icon:"w-3 h-3",gap:"gap-0.5",badge:"min-w-3.5 h-3.5 text-2"},md:{padding:"px-6 py-1",text:"text-s",icon:"w-4 h-4",gap:"gap-1",badge:"min-w-4.5 h-4.5 text-xxs"},lg:{padding:"px-8 py-1.5",text:"text-base",icon:"w-5 h-5",gap:"gap-1.5",badge:"min-w-5 h-5 text-xs"}},O7={primary:{active:{bg:"bg-primary",text:"text-button-text",border:"border-primary"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-primary-hover",text:"hover:text-button-text"}},positive:{active:{bg:"bg-positive",text:"text-button-text",border:"border-positive"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-positive-hover",text:"hover:text-body"}},warning:{active:{bg:"bg-warning",text:"text-warning-text",border:"border-warning"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-warning-hover",text:"hover:text-body"}},negative:{active:{bg:"bg-negative",text:"text-button-text",border:"border-negative"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-negative-hover",text:"hover:text-body"}}},$O=()=>me("inline-flex items-center rounded overflow-hidden"),_q=(e,t,r,n)=>{const i=O7[e],o=wq[t],a="relative inline-flex items-center font-medium cursor-pointer transition-all duration-200";return n?me(a,o.padding,o.text,o.gap,"pointer-events-none cursor-not-allowed opacity-50","bg-card","text-inactive-text"):r?me(a,o.padding,o.text,o.gap,i.active.bg,i.active.text,"shadow-xs"):me(a,o.padding,o.text,o.gap,i.inactive.bg,i.inactive.text,i.hover.bg,i.hover.text)},Eq=(e,t)=>me("flex items-center justify-center",wq[e].icon,{"opacity-50":t}),Sq=()=>me("whitespace-nowrap"),Sp=()=>me("min-w-full flex h-8 bg-tab-bg-default pt-0.5"),Oq=(e,t)=>{const r=me("group flex items-center justify-between space-x-4","rounded-t px-2 text-xs","focus:outline-hidden");return e&&!t?me(r,"z-2 border border-b-0 border-tab-border","bg-tab-active-bg font-semibold text-tab-active-fg"):t&&!e?me(r,"border border-transparent bg-tab-inactive-bg text-inactive-text"):me(r,"border border-transparent bg-tab-inactive-bg text-tab-inactive-fg","hover:text-tab-active-fg")},fw=C.createContext(void 0),Cq=C.forwardRef(({value:e,label:t,icon:r,disabled:n,children:i,className:o,onClick:a,active:s,content:c,...u},d)=>{const p=C.useContext(fw);if(!p)return null;const{activeTab:v,onTabChange:h,variant:x,color:b,size:m,showIcons:w,disabled:y}=p,_=s!==void 0?s:v===e,S=n||y,E=I=>{S||(h(e),a==null||a(I))};return x==="file"?O.jsx("div",{"data-qui":"FileTabItem",className:me(Oq(_,!1),"cursor-pointer",o),onClick:I=>!S&&E(I),children:i||O.jsx(O.Fragment,{children:O.jsxs("span",{className:"flex items-center gap-2",children:[r,O.jsx("span",{children:t})]})})}):O.jsxs("button",{ref:d,"data-qui":"TabItem",type:"button",role:"tab","aria-selected":_,"aria-disabled":S,className:me(_q(b,m,_,S||!1),o),onClick:E,disabled:S,...u,children:[w&&r&&O.jsx("span",{className:Eq(m,S||!1),children:r}),O.jsx("span",{className:Sq(),children:i||t})]})});Cq.displayName="TabItem";const C7=({tab:e,value:t,label:r,isActive:n,color:i="primary",size:o="md",showIcons:a,onTabClick:s})=>{const{icon:c,disabled:u=!1,onClose:d,renderTab:p}=e,v=()=>{u||s(t)},h=x=>{x==null||x.stopPropagation(),!u&&d&&d(t)};return p?O.jsx(O.Fragment,{children:p({tab:e,isActive:n,onClick:v,onClose:d?h:void 0})}):O.jsxs("button",{"data-qui":"TabItem",type:"button",role:"tab","aria-selected":n,"aria-disabled":u,className:_q(i,o,n,u),onClick:v,disabled:u,children:[a&&c&&O.jsx("span",{className:Eq(o,u),children:c}),O.jsx("span",{className:Sq(),children:r})]})},I7=({tab:e,value:t,isActive:r,onTabClick:n})=>{const{onClose:i,renderTab:o}=e,a=()=>{n(t)},s=c=>{c==null||c.stopPropagation(),i&&i(t)};return o?O.jsx("div",{"data-qui":"FileTabItem",className:"flex h-full shrink-0 select-none focus:outline-hidden",children:o({tab:e,isActive:r,onClick:a,onClose:i?s:void 0})}):null},R7=[],e1=({tabs:e=R7,valueKey:t="value",labelKey:r="label",activeTab:n,defaultValue:i,variant:o="default",color:a="primary",size:s="md",draggable:c=!1,showIcons:u=!0,disabled:d=!1,className:p,tabListClassName:v,onTabChange:h,onReorder:x,renderTab:b,children:m})=>{const w=U=>{const Z=U[t]??U.value??U.key;return Z!==void 0?String(Z):""},y=U=>U[r]??U.label,_=i||(e[0]?w(e[0]):""),[S,E]=C.useState(_),[I,N]=C.useState(null),[T,k]=C.useState(e),L=n!==void 0?n:S,B=T,A=$U(FU(Zw,{activationConstraint:{distance:10}})),z=U=>{n===void 0&&E(U),h==null||h(U)},P=U=>B.findIndex(Z=>w(Z)===U),K=I?P(I):-1;C.useEffect(()=>{k(e)},[e]);const $={activeTab:L,onTabChange:z,variant:o,color:a,size:s,showIcons:u,disabled:d};if(m)return O.jsxs(fw.Provider,{value:$,children:[O.jsx("div",{"data-qui":"Tabs",role:"tablist",className:me(o==="file"?Sp():$O(),p,v),children:m}),o==="file"&&O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]});const Y=o==="file"&&c?O.jsxs("div",{className:"relative h-full w-full",children:[O.jsxs($G,{collisionDetection:KU,modifiers:[_7,S7],sensors:A,onDragStart:({active:U})=>{U&&N(U.id)},onDragEnd:({over:U})=>{if(N(null),U){const Z=P(U.id);if(K!==Z&&K!==-1){const D=Qw(B,K,Z);k(D),x&&x(D,D[Z]),z(w(D[Z]))}}},onDragCancel:()=>{N(null)},children:[O.jsx(p7,{items:B.map(U=>w(U)),strategy:d7,children:O.jsx("div",{role:"tablist",className:me(Sp(),v),children:B.map(U=>{const Z=w(U);return O.jsx(FO,{value:Z,tab:{...U,renderTab:U.renderTab||b},isActive:L===Z,onTabClick:z,className:p},Z)})})}),O.jsx(s7,{children:I&&K!==-1?O.jsx(FO,{value:w(B[K]),tab:{...B[K],renderTab:B[K].renderTab||b},isActive:L===w(B[K]),onTabClick:z,dragOverlay:!0,className:p}):null})]}),O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):o==="file"?O.jsxs("div",{className:"relative",children:[O.jsx("div",{role:"tablist",className:me(Sp(),v),children:e.map(U=>{const Z=w(U);return O.jsx(I7,{value:Z,tab:{...U,renderTab:U.renderTab||b},isActive:L===Z,onTabClick:z},Z)})}),O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):O.jsx("div",{role:"tablist",className:me($O(),v),children:e.map(U=>{const Z=w(U);return O.jsx(C7,{value:Z,label:y(U),tab:{...U,renderTab:U.renderTab||b},isActive:L===Z,color:a,size:s,showIcons:u,onTabClick:z},Z)})});return O.jsx(fw.Provider,{value:$,children:O.jsx("div",{"data-qui":"Tabs",className:p,children:Y})})},N7=C.forwardRef(({isActive:e=!1,isDesactive:t=!1,children:r,...n},i)=>O.jsx("div",{"data-qui":"TabNavContainer",className:Oq(e,t),ref:i,...n,children:r}));N7.displayName="TabNavContainer";e1.displayName="Tabs";e1.Item=Cq;const Op=e1;var Ft=function(){return Ft=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ft.apply(this,arguments)},VO={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},HO={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},yc={width:"20px",height:"20px",position:"absolute",zIndex:1},T7={top:Ft(Ft({},VO),{top:"-5px"}),right:Ft(Ft({},HO),{left:void 0,right:"-5px"}),bottom:Ft(Ft({},VO),{top:void 0,bottom:"-5px"}),left:Ft(Ft({},HO),{left:"-5px"}),topRight:Ft(Ft({},yc),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Ft(Ft({},yc),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Ft(Ft({},yc),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Ft(Ft({},yc),{left:"-10px",top:"-10px",cursor:"nw-resize"})},P7=C.memo(function(e){var t=e.onResizeStart,r=e.direction,n=e.children,i=e.replaceStyles,o=e.className,a=C.useCallback(function(u){t(u,r)},[t,r]),s=C.useCallback(function(u){t(u,r)},[t,r]),c=C.useMemo(function(){return Ft(Ft({position:"absolute",userSelect:"none"},T7[r]),i??{})},[i,r]);return O.jsx("div",{className:o||void 0,style:c,onMouseDown:a,onTouchStart:s,children:n})}),k7=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),zn=function(){return zn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},zn.apply(this,arguments)},M7={width:"auto",height:"auto"},xc=function(e,t,r){return Math.max(Math.min(e,r),t)},WO=function(e,t,r){var n=Math.round(e/t);return n*t+r*(n-1)},zo=function(e,t){return new RegExp(e,"i").test(t)},wc=function(e){return!!(e.touches&&e.touches.length)},A7=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},UO=function(e,t,r){r===void 0&&(r=0);var n=t.reduce(function(o,a,s){return Math.abs(a-e)<Math.abs(t[o]-e)?s:o},0),i=Math.abs(t[n]-e);return r===0||i<r?t[n]:e},Cp=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},_c=function(e,t,r,n){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return r*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return n*i}}return e},D7=function(e,t,r,n,i,o,a){return n=_c(n,e.width,t,r),i=_c(i,e.height,t,r),o=_c(o,e.width,t,r),a=_c(a,e.height,t,r),{maxWidth:typeof n>"u"?void 0:Number(n),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},j7=function(e){return Array.isArray(e)?e:[e,e]},q7=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],GO="__resizable_base__",L7=(function(e){k7(t,e);function t(r){var n,i,o,a,s=e.call(this,r)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var c=s.parentNode;if(!c)return null;var u=s.window.document.createElement("div");return u.style.width="100%",u.style.height="100%",u.style.position="absolute",u.style.transform="scale(0, 0)",u.style.left="0",u.style.flex="0 0 100%",u.classList?u.classList.add(GO):u.className+=GO,c.appendChild(u),u},s.removeBase=function(c){var u=s.parentNode;u&&u.removeChild(c)},s.state={isResizing:!1,width:(i=(n=s.propsSize)===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:"auto",height:(a=(o=s.propsSize)===null||o===void 0?void 0:o.height)!==null&&a!==void 0?a:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||M7},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var r=0,n=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),r=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:r,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var r=this,n=this.props.size,i=function(s){var c;if(typeof r.state[s]>"u"||r.state[s]==="auto")return"auto";if(r.propsSize&&r.propsSize[s]&&!((c=r.propsSize[s])===null||c===void 0)&&c.toString().endsWith("%")){if(r.state[s].toString().endsWith("%"))return r.state[s].toString();var u=r.getParentSize(),d=Number(r.state[s].toString().replace("px","")),p=d/u[s]*100;return"".concat(p,"%")}return Cp(r.state[s])},o=n&&typeof n.width<"u"&&!this.state.isResizing?Cp(n.width):i("width"),a=n&&typeof n.height<"u"&&!this.state.isResizing?Cp(n.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var r=this.appendBase();if(!r)return{width:0,height:0};var n=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),r.style.position="relative",r.style.minWidth="100%",r.style.minHeight="100%";var o={width:r.offsetWidth,height:r.offsetHeight};return n&&(this.parentNode.style.flexWrap=i),this.removeBase(r),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var r=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:r.flexBasis!=="auto"?r.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(r,n){var i=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===r&&(typeof i>"u"||i==="auto")?"auto":r},t.prototype.calculateNewMaxFromBoundary=function(r,n){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&zo("left",o),s=i&&zo("top",o),c,u;if(this.props.bounds==="parent"){var d=this.parentNode;d&&(c=a?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:d.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(c=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(c=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return c&&Number.isFinite(c)&&(r=r&&r<c?r:c),u&&Number.isFinite(u)&&(n=n&&n<u?n:u),{maxWidth:r,maxHeight:n}},t.prototype.calculateNewSizeFromDirection=function(r,n){var i=this.props.scale||1,o=j7(this.props.resizeRatio||1),a=o[0],s=o[1],c=this.state,u=c.direction,d=c.original,p=this.props,v=p.lockAspectRatio,h=p.lockAspectRatioExtraHeight,x=p.lockAspectRatioExtraWidth,b=d.width,m=d.height,w=h||0,y=x||0;return zo("right",u)&&(b=d.width+(r-d.x)*a/i,v&&(m=(b-y)/this.ratio+w)),zo("left",u)&&(b=d.width-(r-d.x)*a/i,v&&(m=(b-y)/this.ratio+w)),zo("bottom",u)&&(m=d.height+(n-d.y)*s/i,v&&(b=(m-w)*this.ratio+y)),zo("top",u)&&(m=d.height-(n-d.y)*s/i,v&&(b=(m-w)*this.ratio+y)),{newWidth:b,newHeight:m}},t.prototype.calculateNewSizeFromAspectRatio=function(r,n,i,o){var a=this.props,s=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=typeof o.width>"u"?10:o.width,p=typeof i.width>"u"||i.width<0?r:i.width,v=typeof o.height>"u"?10:o.height,h=typeof i.height>"u"||i.height<0?n:i.height,x=c||0,b=u||0;if(s){var m=(v-x)*this.ratio+b,w=(h-x)*this.ratio+b,y=(d-b)/this.ratio+x,_=(p-b)/this.ratio+x,S=Math.max(d,m),E=Math.min(p,w),I=Math.max(v,y),N=Math.min(h,_);r=xc(r,S,E),n=xc(n,I,N)}else r=xc(r,d,p),n=xc(n,v,h);return{newWidth:r,newHeight:n}},t.prototype.setBoundingClientRect=function(){var r=1/(this.props.scale||1);if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var i=n.getBoundingClientRect();this.parentLeft=i.left*r,this.parentTop=i.top*r}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left*r,this.targetTop=o.top*r}if(this.resizable){var a=this.resizable.getBoundingClientRect(),s=a.left,c=a.top,u=a.right,d=a.bottom;this.resizableLeft=s*r,this.resizableRight=u*r,this.resizableTop=c*r,this.resizableBottom=d*r}},t.prototype.onResizeStart=function(r,n){if(!(!this.resizable||!this.window)){var i=0,o=0;if(r.nativeEvent&&A7(r.nativeEvent)?(i=r.nativeEvent.clientX,o=r.nativeEvent.clientY):r.nativeEvent&&wc(r.nativeEvent)&&(i=r.nativeEvent.touches[0].clientX,o=r.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(r,n,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,c=this.window.getComputedStyle(this.resizable);if(c.flexBasis!=="auto"){var u=this.parentNode;if(u){var d=this.window.getComputedStyle(u).flexDirection;this.flexDir=d.startsWith("row")?"row":"column",s=c.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:zn(zn({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(r.target).cursor||"auto"}),direction:n,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(r){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&wc(r))try{r.preventDefault(),r.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,c=i.minHeight,u=wc(r)?r.touches[0].clientX:r.clientX,d=wc(r)?r.touches[0].clientY:r.clientY,p=this.state,v=p.direction,h=p.original,x=p.width,b=p.height,m=this.getParentSize(),w=D7(m,this.window.innerWidth,this.window.innerHeight,o,a,s,c);o=w.maxWidth,a=w.maxHeight,s=w.minWidth,c=w.minHeight;var y=this.calculateNewSizeFromDirection(u,d),_=y.newHeight,S=y.newWidth,E=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(S=UO(S,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(_=UO(_,this.props.snap.y,this.props.snapGap));var I=this.calculateNewSizeFromAspectRatio(S,_,{width:E.maxWidth,height:E.maxHeight},{width:s,height:c});if(S=I.newWidth,_=I.newHeight,this.props.grid){var N=WO(S,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),T=WO(_,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),k=this.props.snapGap||0,L=k===0||Math.abs(N-S)<=k?N:S,B=k===0||Math.abs(T-_)<=k?T:_;S=L,_=B}var A={width:S-h.width,height:_-h.height};if(this.delta=A,x&&typeof x=="string"){if(x.endsWith("%")){var z=S/m.width*100;S="".concat(z,"%")}else if(x.endsWith("vw")){var P=S/this.window.innerWidth*100;S="".concat(P,"vw")}else if(x.endsWith("vh")){var K=S/this.window.innerHeight*100;S="".concat(K,"vh")}}if(b&&typeof b=="string"){if(b.endsWith("%")){var z=_/m.height*100;_="".concat(z,"%")}else if(b.endsWith("vw")){var P=_/this.window.innerWidth*100;_="".concat(P,"vw")}else if(b.endsWith("vh")){var K=_/this.window.innerHeight*100;_="".concat(K,"vh")}}var $={width:this.createSizeForCssProperty(S,"width"),height:this.createSizeForCssProperty(_,"height")};this.flexDir==="row"?$.flexBasis=$.width:this.flexDir==="column"&&($.flexBasis=$.height);var Y=this.state.width!==$.width,U=this.state.height!==$.height,Z=this.state.flexBasis!==$.flexBasis,D=Y||U||Z;D&&si.flushSync(function(){n.setState($)}),this.props.onResize&&D&&this.props.onResize(r,v,this.resizable,A)}},t.prototype.onMouseUp=function(r){var n,i,o=this.state,a=o.isResizing,s=o.direction;o.original,!(!a||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(r,s,this.resizable,this.delta),this.props.size&&this.setState({width:(n=this.props.size.width)!==null&&n!==void 0?n:"auto",height:(i=this.props.size.height)!==null&&i!==void 0?i:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:zn(zn({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(r){var n,i;this.setState({width:(n=r.width)!==null&&n!==void 0?n:"auto",height:(i=r.height)!==null&&i!==void 0?i:"auto"})},t.prototype.renderResizer=function(){var r=this,n=this.props,i=n.enable,o=n.handleStyles,a=n.handleClasses,s=n.handleWrapperStyle,c=n.handleWrapperClass,u=n.handleComponent;if(!i)return null;var d=Object.keys(i).map(function(p){return i[p]!==!1?O.jsx(P7,{direction:p,onResizeStart:r.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return O.jsx("div",{className:c,style:s,children:d})},t.prototype.render=function(){var r=this,n=Object.keys(this.props).reduce(function(a,s){return q7.indexOf(s)!==-1||(a[s]=r.props[s]),a},{}),i=zn(zn(zn({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return O.jsxs(o,zn({style:i,className:this.props.className},n,{ref:function(a){a&&(r.resizable=a)},children:[this.state.isResizing&&O.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t})(C.PureComponent);const z7={0:"bg-panel-0",1:"bg-panel-1",2:"bg-panel-2",3:"bg-panel-3",4:"bg-panel-4",5:"bg-panel-5"},B7={tabs:"border-tab-border",primary:"border-primary",negative:"border-input-error-border",positive:"border-positive",light:"border-panel-border-subtle",default:"border-panel-border"},Iq=({depth:e=0,className:t,borderType:r,disabled:n})=>me("transition-colors duration-200",{"text-body":!n,"text-inactive-text":n},r?B7[r]:"border-panel-border",z7[e],t),F7=e=>{if(!e)return{};const t={},r=e.match(/min-w-\[(\d+)px\]/);r&&(t.minWidth=parseInt(r[1],10));const n=e.match(/max-w-\[(\d+)px\]/);n&&(t.maxWidth=parseInt(n[1],10));const i=e.match(/min-h-\[(\d+)px\]/);i&&(t.minHeight=parseInt(i[1],10));const o=e.match(/max-h-\[(\d+)px\]/);return o&&(t.maxHeight=parseInt(o[1],10)),t},$7=C.forwardRef(({children:e,width:t,height:r,minWidth:n=10,minHeight:i=10,maxWidth:o,maxHeight:a,defaultWidth:s,defaultHeight:c,defaultSize:u,size:d,grid:p,snap:v,lockAspectRatio:h=!1,enable:x,handleStyles:b={},handleClasses:m={},handleComponent:w={},style:y={},className:_,onResizeStart:S,onResize:E,onResizeStop:I,scale:N=1,bounds:T,snapGap:k,as:L="div",depth:B,disabled:A},z)=>{const P=Iq({depth:B,className:_,disabled:A}),K=F7(_),$=d?{size:d}:t!==void 0||r!==void 0?{size:{width:t??"auto",height:r??"auto"}}:{},Y=u?{defaultSize:u}:s!==void 0||c!==void 0?{defaultSize:{width:s??"auto",height:c??"auto"}}:{},U=C.useRef(null);return C.useImperativeHandle(z,()=>{var Z;return(Z=U.current)==null?void 0:Z.resizable}),O.jsx(L7,{"data-qui":"Resizable",ref:U,...$,...Y,minWidth:n??K.minWidth,minHeight:i??K.minHeight,maxWidth:o??K.maxWidth,maxHeight:a??K.maxHeight,grid:p,snap:v,lockAspectRatio:h,enable:x,handleStyles:b,handleClasses:m,handleComponent:w,style:y,className:me("relative box-border",P),onResizeStart:S,onResize:E,onResizeStop:I,scale:N,bounds:T,snapGap:k,as:L,children:e})});$7.displayName="Resizable";const Bo={sm:{track:"h-4 w-7",thumb:"size-3",thumbUnchecked:"left-0.5",thumbChecked:"left-3.5",label:"text-xs",gap:"gap-2"},md:{track:"h-5 w-9",thumb:"size-4",thumbUnchecked:"left-0.5",thumbChecked:"left-4.5",label:"text-sm",gap:"gap-2.5"},lg:{track:"h-6 w-11",thumb:"size-5",thumbUnchecked:"left-0.5",thumbChecked:"left-5.5",label:"text-base",gap:"gap-3"}},Ec={primary:{bg:"bg-primary",thumb:"group-hover:bg-primary-light",icon:"text-primary"},positive:{bg:"bg-positive",thumb:"group-hover:bg-positive-light",icon:"text-positive"},warning:{bg:"bg-warning",thumb:"group-hover:bg-warning-light",icon:"text-warning"},negative:{bg:"bg-negative",thumb:"group-hover:bg-negative-light",icon:"text-negative"}},V7=(e,t,r,n,i,o)=>({container:me("inline-flex items-center",Bo[e].gap,o),track:me("relative inline-flex items-center shrink-0 group","transition-colors duration-200 ease-in-out","focus:outline-hidden focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2","border border-input-border rounded-full justify-between px-0.5",Bo[e].track,{[Ec[t].bg]:r&&!n&&!i,"bg-input-bg":!r&&!n||i,"bg-panel cursor-not-allowed":n,"cursor-pointer":!n}),thumb:me("bg-input-text pointer-events-none inline-flex items-center justify-center shadow-xs","transition-all duration-200 ease-in-out","rounded-full absolute",Bo[e].thumb,r?Bo[e].thumbChecked:Bo[e].thumbUnchecked,{[Ec[t].thumb]:!n,"bg-canvas-subtle":n}),iconLeft:me("flex items-center justify-center z-10 w-1/2 p-0.5",{[Ec[t].icon]:!r&&!n,"text-panel-subtle":n||r}),iconRight:me("flex items-center justify-center z-10 w-1/2 p-0.5",{[Ec[t].icon]:r&&!n,"text-panel-subtle":n||!r}),label:me("font-medium text-body",Bo[e].label,{"cursor-pointer":!n,"cursor-not-allowed text-muted":n})}),wu=C.forwardRef(({label:e,checked:t,defaultChecked:r=!1,disabled:n=!1,size:i="md",color:o="primary",icons:a,onChange:s,className:c,id:u,name:d,...p},v)=>{const[h,x]=C.useState(r),b=t!==void 0,m=b?t:h,w=()=>{const _=!m;b||x(_),s==null||s(_)},y=V7(i,o,m,n,!!a,c);return O.jsxs("div",{"data-qui":"Toggle",className:y.container,children:[e&&O.jsx("label",{htmlFor:u,className:y.label,children:e}),O.jsxs("button",{ref:v,...p,type:"button",role:"switch","aria-checked":m,"aria-label":e,disabled:n,onClick:w,name:d,id:u,className:y.track,children:[a&&O.jsx("span",{className:y.iconLeft,children:a.unchecked}),O.jsx("span",{className:y.thumb,"aria-hidden":"true"}),a&&O.jsx("span",{className:y.iconRight,children:a.checked})]})]})});wu.displayName="Toggle";C.createContext(null);const ur=C.forwardRef(({depth:e=0,className:t,children:r,borderType:n,disabled:i,...o},a)=>{const s=Iq({depth:e,className:t,borderType:n,disabled:i});return O.jsx("div",{"data-qui":"Panel",ref:a,className:s,"aria-disabled":i,...o,children:r})});ur.displayName="Panel";const Ds={sm:{container:"h-5 px-0.5 gap-1 rounded",text:"text-xxs leading-3",icon:"text-s",iconButton:"text-s p-0.5 cursor-pointer"},md:{container:"h-5.5 px-1 gap-1 rounded",text:"text-xs leading-4",icon:"text-sm",iconButton:" text-sm p-0.5 cursor-pointer"},lg:{container:"h-6 px-1.5 gap-1.5 rounded",text:"text-s leading-none",icon:"text-base",iconButton:"text-base p-0.5 cursor-pointer"}},Xc={primary:{bg:"bg-primary",text:"text-button-text",border:"border-primary",buttonHover:"hover:bg-primary-hover"},white:{bg:"bg-canvas-default",text:"text-primary",border:"border-canvas-default",buttonHover:"hover:bg-primary-hover hover:text-button-text"},positive:{bg:"bg-positive",text:"text-button-text",border:"border-positive",buttonHover:"hover:bg-positive-hover"},warning:{bg:"bg-warning",text:"text-button-text",border:"border-warning",buttonHover:"hover:bg-warning-hover"},negative:{bg:"bg-negative",text:"text-button-text",border:"border-negative",buttonHover:"hover:bg-negative-hover"},dark:{bg:"bg-input-bg",text:"text-input-text",border:"border-input-border",buttonHover:"hover:bg-primary-hover hover:text-button-text"}},H7=(e,t,r,n)=>me("inline-flex items-center justify-center font-medium border",Ds[e].container,Xc[t].bg,Xc[t].text,Xc[t].border,Ds[e].text,{"opacity-60 pointer-events-none":r,"cursor-pointer hover:bg-opacity-90 transition-opacity":n&&!r}),W7=(e,t,r)=>me({[Ds[e].icon]:!r,"bg-canvas-default outline-canvas-default text-primary":r&&t!=="white"||r,"bg-primary outline-primary text-button-text":r&&t==="white"&&!r,"outline-solid outline-1 h-full py-0.5 grid place-items-center -my-1 only:-mx-0.5 first:-ml-1.5 last:-mr-1.5 only:rounded first:rounded-l last:rounded-r":r||r}),U7=e=>me(Ds[e].text),Rq=(e,t,r)=>me("inline-flex items-center justify-center rounded transition-colors duration-200 focus:outline-hidden ",Ds[e].iconButton,Xc[t].buttonHover,{"pointer-events-none":r}),Nq=C.createContext(null),Zu=()=>{const e=C.useContext(Nq);if(!e)throw new Error("Pill components must be used within a Pill.Root");return e},t1=C.forwardRef(({size:e="md",color:t="primary",className:r,children:n,disabled:i=!1,onClick:o,...a},s)=>{const c={size:e,color:t,disabled:i},u=!!o;return O.jsx(Nq.Provider,{value:c,children:O.jsx("div",{"data-qui":"Pill",ref:s,onClick:o,className:me(H7(e,t,i,u),r),...a,children:n})})});t1.displayName="Pill.Root";const r1=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i}=Zu();return O.jsx("span",{ref:n,className:me(U7(i),e),...r,children:t})});r1.displayName="Pill.Text";const n1=C.forwardRef(({className:e,children:t,label:r,position:n,...i},o)=>{const{size:a,color:s,disabled:c}=Zu(),u=!!r,d=O.jsx("span",{ref:o,className:me(W7(a,s,u),e,{"opacity-60":c}),...i,children:t});return u&&!c?O.jsx(Gr,{label:r||"",position:n||"up",children:d}):d});n1.displayName="Pill.Icon";const Tq=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,disabled:a}=Zu();return O.jsx("button",{ref:n,type:"button",disabled:a,className:me(Rq(i,o,a),e),...r,children:t})});Tq.displayName="Pill.Button";const i1=C.forwardRef(({className:e,onClose:t,"aria-label":r="Remove pill",children:n,...i},o)=>{const{size:a,color:s,disabled:c}=Zu();return O.jsx("button",{ref:o,type:"button",disabled:c,className:me(Rq(a,s,c),e),onClick:t,"aria-label":r,...i,children:n||O.jsx(Wu,{})})});i1.displayName="Pill.Close";const Pq=C.forwardRef(({size:e="md",color:t="primary",label:r,icon:n,onClose:i,closable:o=!1,className:a,children:s,disabled:c=!1,...u},d)=>O.jsxs(t1,{ref:d,size:e,color:t,className:a,disabled:c,...u,children:[n&&O.jsx(n1,{children:n}),s||r&&O.jsx(r1,{children:r}),o&&O.jsx(i1,{onClose:i})]}));Pq.displayName="Pill";const Zc=Object.assign(Pq,{Root:t1,Text:r1,Icon:n1,Button:Tq,Close:i1}),kq=C.createContext(null),Er=()=>{const e=C.useContext(kq);if(!e)throw new Error("Select compound components must be used within Select.Root");return e},dr={sm:{trigger:"h-5 min-h-fit",control:"min-h-5 p-0.5 gap-1",input:"text-xs h-3.5",placeholder:"placeholder:text-xs text-xs",singleValue:"text-xs",multiValue:"h-3.5 px-0.5 gap-1 text-xxs",multiValueLabel:"text-xxs",multiValueRemove:"w-3 h-3",indicatorsContainer:"gap-1",clearIndicator:"p-0.5 size-3",dropdownIndicator:"p-0.5 size-3",indicatorSeparator:"h-3",loadingIndicator:"w-3 h-3",menu:"m-0",menuList:"py-1",option:"px-1 py-0.5 text-xs",group:"pt-1",groupHeading:"px-2 py-0.5 text-xxs",noOptionsMessage:"px-2 py-1 text-xxs",loadingMessage:"px-2 py-1 text-xxs",message:"text-xxs p-1.5",icon:"text-sm"},md:{trigger:"h-6 min-h-fit",control:"min-h-6 p-1 gap-1.5",input:"text-s h-4",placeholder:"placeholder:text-s text-s",singleValue:"text-s",multiValue:"h-4 p-1 gap-1 text-xs",multiValueLabel:"text-xs",multiValueRemove:"w-3.5 h-3.5",indicatorsContainer:"gap-1",clearIndicator:"p-0.5 size-4",dropdownIndicator:"p-0.5 size-4",indicatorSeparator:"h-4",loadingIndicator:"w-4 h-4",menu:"m-0",menuList:"py-1",option:"px-2 py-1 text-s",group:"pt-1.5",groupHeading:"px-3 py-1 text-xs",noOptionsMessage:"px-2 py-1.5 text-xs",loadingMessage:"px-3 py-1.5 text-xs",message:"text-xs p-2",icon:"text-base"},lg:{trigger:"h-7 min-h-fit",control:"min-h-7 p-1.5 gap-2",input:"text-sm h-5",placeholder:"placeholder:text-sm text-sm",singleValue:"text-sm",multiValue:"h-5 px-1.5 gap-1.5 text-s",multiValueLabel:"text-xs",multiValueRemove:"w-4 h-4",indicatorsContainer:"gap-1.5",clearIndicator:"p-0.5 size-5",dropdownIndicator:"p-1 size-5",indicatorSeparator:"h-5",loadingIndicator:"w-5 h-5",menu:"m-0",menuList:"py-1.5",option:"px-3 py-2 text-sm",group:"pt-2",groupHeading:"px-4 py-1.5 text-s",noOptionsMessage:"px-4 py-2 text-s",loadingMessage:"px-4 py-2 text-s",message:"text-s p-2.5",icon:"text-lg"}},Lt={primary:{control:"cursor-pointer bg-input-bg text-select-text",controlFocused:"border-input-focus-border",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-select-text",placeholder:"placeholder:text-input-placeholder text-input-placeholder placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-primary",menu:"bg-select-list-bg border-input-focus-border shadow-lg",menuList:"scrollbar-thin scrollbar-thumb-input-border scrollbar-track-transparent",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-primary-dark",messageBackground:"bg-input-message-bg",messageBorder:"ring-input-info-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"},positive:{control:"cursor-pointer bg-input-bg text-select-text",controlFocused:"border-positive",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-select-text",placeholder:"placeholder:text-input-placeholder text-input-placeholder placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-positive",menu:"bg-select-list-bg border-positive shadow-lg",menuList:"scrollbar-thin scrollbar-thumb-input-border scrollbar-track-transparent",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-positive-dark",messageBackground:"bg-positive-light",messageBorder:"ring-positive",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"},warning:{control:"cursor-pointer bg-input-bg text-select-text",controlFocused:"border-input-warning-border",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-select-text",placeholder:"placeholder:text-input-placeholder text-input-placeholder placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-warning",menu:"bg-select-list-bg border-input-warning-border shadow-lg",menuList:"scrollbar-thin scrollbar-thumb-input-border scrollbar-track-transparent",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-warning-dark",messageBackground:"bg-input-warning-bg",messageBorder:"ring-input-warning-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"},negative:{control:"cursor-pointer bg-input-bg text-negative",controlFocused:"border-input-error-border",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-negative",placeholder:"placeholder:text-input-placeholder text-input-placeholder placeholder:opacity-60",singleValue:"text-negative",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-negative",menu:"bg-select-list-bg border-input-error-border shadow-lg",menuList:"scrollbar-thin scrollbar-thumb-input-border scrollbar-track-transparent",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-negative-dark",messageBackground:"bg-input-error-bg",messageBorder:"ring-input-error-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"}},G7=()=>me("flex flex-col relative"),K7=({size:e,color:t,isDisabled:r,isFocused:n,isInvalid:i,hasMessage:o})=>{const a=Lt[i?"negative":t];return me("flex items-center justify-between only:rounded first:rounded-t last:rounded-b",dr[e].control,a.control,o?["ring-1",a.messageBorder]:["border",r?"border-input-border":n?a.controlFocused:`border-select-border
19
- focus-within:${a.controlFocused}`],{[a.controlDisabled]:r})},Y7=({isMulti:e})=>me("flex items-center gap-1 flex-1 min-w-0 overflow-hidden",{"flex-wrap":e,"px-0.5":!e}),X7=({size:e,color:t})=>me("bg-transparent border-0 outline-hidden flex-1 min-w-7.5 px-1 text-input-text",dr[e].input,Lt[t].placeholder),Z7=({size:e,color:t})=>me("select-none truncate",dr[e].placeholder,Lt[t].placeholder),J7=({size:e,color:t,isDisabled:r})=>me("truncate",dr[e].singleValue,r?Lt[t].singleValueDisabled:Lt[t].singleValue),Q7=({size:e,color:t,isDisabled:r,isFocused:n})=>me("inline-flex items-center rounded-xs",dr[e].multiValue,r?Lt[t].multiValueDisabled:Lt[t].multiValue,{"border border-white":n&&!r}),eK=({size:e})=>me("truncate",dr[e].multiValueLabel),tK=({size:e,color:t,isDisabled:r})=>me("flex items-center justify-center cursor-pointer transition-colors",dr[e].multiValueRemove,Lt[t].multiValueRemove),Mq=({size:e,color:t,isDisabled:r})=>me("flex items-center justify-center transition-colors rounded",dr[e].clearIndicator,r?"hidden":[Lt[t].clearIndicator,Lt[t].clearIndicatorHover]),rK=({size:e,color:t,isDisabled:r})=>me("flex items-center justify-center transition-colors rounded",dr[e].dropdownIndicator,r?"text-grey-200":[Lt[t].dropdownIndicator,Lt[t].dropdownIndicatorHover]),nK=({size:e,placement:t,hasMessage:r,color:n})=>{const i={auto:"top-full rounded-t-none",bottom:"top-full rounded-t-none",top:"bottom-full rounded-b-none"};return me("absolute w-full z-50 rounded overflow-hidden border border-t-0",Lt[n].menu,{[Lt[n].messageBorder]:r},i[t||"auto"],dr[e].menu)},iK=({size:e})=>me("overflow-y-auto",dr[e].menuList,Lt.primary.menuList),oK=({size:e,color:t,isDisabled:r,isFocused:n,isSelected:i})=>me("transition-colors duration-150 cursor-pointer mx-1 rounded flex items-center gap-2",dr[e].option,{[Lt[t].optionDisabled]:r,[Lt[t].optionSelected]:i&&!r,[Lt[t].optionFocused]:n&&!i&&!r,[Lt[t].option]:!i&&!n&&!r}),aK=({size:e})=>me(dr[e].group),sK=({size:e,color:t})=>me(dr[e].groupHeading,Lt[t].groupHeading),lK=({size:e})=>me("text-grey-100",dr[e].loadingMessage),cK=({size:e})=>me(dr[e].noOptionsMessage,Lt.primary.noOptionsMessage),Aq=e=>{const t=e[0];return e.length>0&&typeof t=="object"&&t!==null&&"options"in t&&Array.isArray(t.options)},uK=e=>Aq(e)?e.reduce((t,r)=>[...t,...r.options],[]):e;function yr(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ke(){return ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ke.apply(null,arguments)}function pw(e,t){return pw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},pw(e,t)}function dK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,pw(e,t)}var Sc={exports:{}},Ip={exports:{}},st={};/** @license React v16.13.1
5
+ */var L1;function Yz(){return L1||(L1=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})()})(Wf)),Wf.exports}var Xz=Yz();const Ve=Un(Xz);function Zz({qodly:e,activeTab:t,forceLogin:r,onTabChange:n,restrictedByDefault:i,onRestrictedByDefaultChange:o,onForceLoginChange:a}){return C.jsx(C.Fragment,{children:C.jsx("nav",{className:"relative mb-0 flex h-auto flex-wrap items-center justify-between border-b border-grey-900 bg-grey-800 px-4 py-3",children:C.jsx("div",{className:"flex w-full flex-wrap items-center justify-between",children:C.jsxs("div",{className:"relative flex w-full justify-between",children:[C.jsx("span",{className:"inline-block whitespace-nowrap text-sm leading-relaxed text-white",children:C.jsxs("div",{className:"flex items-center justify-center",children:[C.jsx("button",{"data-cy":"roles_btn_navbar",className:Ve(" min-w-[110px] rounded-l px-4 py-2 text-xs text-white outline-none transition-all duration-150 ease-linear focus:bg-primary-dark focus:text-white focus:outline-none",t==="roles"?"bg-primary-dark font-bold":"bg-grey-300 hover:bg-primary-hover hover:text-white"),type:"button",onClick:()=>n("roles"),children:"Roles"}),C.jsx("button",{"data-cy":"privileges_btn_navbar",className:Ve(" min-w-[110px] rounded-r px-4 py-2 text-xs text-white outline-none transition-all duration-150 ease-linear focus:bg-primary-dark focus:text-white focus:outline-none",t==="privileges"?"bg-primary-dark font-bold":"bg-grey-300 hover:bg-primary-hover hover:text-white"),type:"button",onClick:()=>n("privileges"),children:"Privileges"})]})}),C.jsxs("div",{className:"flex gap-2 justify-between",children:[C.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[C.jsx(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 cD=A.createContext(void 0),Jz=({children:e})=>{const[t,r]=A.useState(null);function n(o){r(o)}const i={selectedRole:t,selectRole:n};return C.jsx(cD.Provider,{value:i,children:e})};function Xb(){const e=A.useContext(cD);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var B1=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},F1=typeof window<"u"&&window.document&&window.document.createElement?ve.useLayoutEffect:ve.useEffect,Gt="top",Er="bottom",Sr="right",Kt="left",Zb="auto",Fa=[Gt,Er,Sr,Kt],lo="start",Na="end",Qz="clippingParents",lD="viewport",Zo="popper",eH="reference",$1=Fa.reduce(function(e,t){return e.concat([t+"-"+lo,t+"-"+Na])},[]),fD=[].concat(Fa,[Zb]).reduce(function(e,t){return e.concat([t,t+"-"+lo,t+"-"+Na])},[]),tH="beforeRead",rH="read",nH="afterRead",iH="beforeMain",oH="main",aH="afterMain",sH="beforeWrite",uH="write",cH="afterWrite",lH=[tH,rH,nH,iH,oH,aH,sH,uH,cH];function rn(e){return e?(e.nodeName||"").toLowerCase():null}function sr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function vi(e){var t=sr(e).Element;return e instanceof t||e instanceof Element}function _r(e){var t=sr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Jb(e){if(typeof ShadowRoot>"u")return!1;var t=sr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function fH(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!_r(o)||!rn(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var u=i[a];u===!1?o.removeAttribute(a):o.setAttribute(a,u===!0?"":u)}))})}function dH(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},a=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),u=a.reduce(function(c,d){return c[d]="",c},{});!_r(i)||!rn(i)||(Object.assign(i.style,u),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const hH={name:"applyStyles",enabled:!0,phase:"write",fn:fH,effect:dH,requires:["computeStyles"]};function Qr(e){return e.split("-")[0]}var ci=Math.max,Hu=Math.min,fo=Math.round;function Eb(){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 dD(){return!/^((?!chrome|android).)*safari/i.test(Eb())}function ho(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&_r(e)&&(i=e.offsetWidth>0&&fo(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&fo(n.height)/e.offsetHeight||1);var a=vi(e)?sr(e):window,u=a.visualViewport,c=!dD()&&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 Qb(e){var t=ho(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 hD(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Jb(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 sr(e).getComputedStyle(e)}function pH(e){return["table","td","th"].indexOf(rn(e))>=0}function Vn(e){return((vi(e)?e.ownerDocument:e.document)||window.document).documentElement}function xc(e){return rn(e)==="html"?e:e.assignedSlot||e.parentNode||(Jb(e)?e.host:null)||Vn(e)}function z1(e){return!_r(e)||bn(e).position==="fixed"?null:e.offsetParent}function vH(e){var t=/firefox/i.test(Eb()),r=/Trident/i.test(Eb());if(r&&_r(e)){var n=bn(e);if(n.position==="fixed")return null}var i=xc(e);for(Jb(i)&&(i=i.host);_r(i)&&["html","body"].indexOf(rn(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 $a(e){for(var t=sr(e),r=z1(e);r&&pH(r)&&bn(r).position==="static";)r=z1(r);return r&&(rn(r)==="html"||rn(r)==="body"&&bn(r).position==="static")?t:r||vH(e)||t}function ex(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Oa(e,t,r){return ci(e,Hu(t,r))}function gH(e,t,r){var n=Oa(e,t,r);return n>r?r:n}function pD(){return{top:0,right:0,bottom:0,left:0}}function vD(e){return Object.assign({},pD(),e)}function gD(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var mH=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,vD(typeof t!="number"?t:gD(t,Fa))};function yH(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,u=Qr(r.placement),c=ex(u),d=[Kt,Sr].indexOf(u)>=0,f=d?"height":"width";if(!(!o||!a)){var h=mH(i.padding,r),p=Qb(o),v=c==="y"?Gt:Kt,m=c==="y"?Er:Sr,y=r.rects.reference[f]+r.rects.reference[c]-a[c]-r.rects.popper[f],x=a[c]-r.rects.reference[c],b=$a(o),w=b?c==="y"?b.clientHeight||0:b.clientWidth||0:0,S=y/2-x/2,E=h[v],_=w-p[f]-h[m],R=w/2-p[f]/2+S,I=Oa(E,R,_),N=c;r.modifiersData[n]=(t={},t[N]=I,t.centerOffset=I-R,t)}}function bH(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||hD(t.elements.popper,i)&&(t.elements.arrow=i))}const xH={name:"arrow",enabled:!0,phase:"main",fn:yH,effect:bH,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function po(e){return e.split("-")[1]}var wH={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _H(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:fo(r*i)/i||0,y:fo(n*i)/i||0}}function H1(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"),S=Kt,E=Gt,_=window;if(d){var R=$a(r),I="clientHeight",N="clientWidth";if(R===sr(r)&&(R=Vn(r),bn(R).position!=="static"&&u==="absolute"&&(I="scrollHeight",N="scrollWidth")),R=R,i===Gt||(i===Kt||i===Sr)&&o===Na){E=Er;var D=h&&R===_&&_.visualViewport?_.visualViewport.height:R[I];y-=D-n.height,y*=c?1:-1}if(i===Kt||(i===Gt||i===Er)&&o===Na){S=Sr;var L=h&&R===_&&_.visualViewport?_.visualViewport.width:R[N];v-=L-n.width,v*=c?1:-1}}var B=Object.assign({position:u},d&&wH),U=f===!0?_H({x:v,y},sr(r)):{x:v,y};if(v=U.x,y=U.y,c){var j;return Object.assign({},B,(j={},j[E]=w?"0":"",j[S]=b?"0":"",j.transform=(_.devicePixelRatio||1)<=1?"translate("+v+"px, "+y+"px)":"translate3d("+v+"px, "+y+"px, 0)",j))}return Object.assign({},B,(t={},t[E]=w?y+"px":"",t[S]=b?v+"px":"",t.transform="",t))}function EH(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,a=o===void 0?!0:o,u=r.roundOffsets,c=u===void 0?!0:u,d={placement:Qr(t.placement),variation:po(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,H1(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,H1(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const SH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:EH,data:{}};var uu={passive:!0};function OH(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,u=a===void 0?!0:a,c=sr(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",r.update,uu)}),u&&c.addEventListener("resize",r.update,uu),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",r.update,uu)}),u&&c.removeEventListener("resize",r.update,uu)}}const CH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:OH,data:{}};var RH={left:"right",right:"left",bottom:"top",top:"bottom"};function Mu(e){return e.replace(/left|right|bottom|top/g,function(t){return RH[t]})}var IH={start:"end",end:"start"};function U1(e){return e.replace(/start|end/g,function(t){return IH[t]})}function tx(e){var t=sr(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function rx(e){return ho(Vn(e)).left+tx(e).scrollLeft}function PH(e,t){var r=sr(e),n=Vn(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;var d=dD();(d||!d&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:u+rx(e),y:c}}function NH(e){var t,r=Vn(e),n=tx(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=ci(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=ci(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-n.scrollLeft+rx(e),c=-n.scrollTop;return bn(i||r).direction==="rtl"&&(u+=ci(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:c}}function nx(e){var t=bn(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function mD(e){return["html","body","#document"].indexOf(rn(e))>=0?e.ownerDocument.body:_r(e)&&nx(e)?e:mD(xc(e))}function Ca(e,t){var r;t===void 0&&(t=[]);var n=mD(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=sr(n),a=i?[o].concat(o.visualViewport||[],nx(n)?n:[]):n,u=t.concat(a);return i?u:u.concat(Ca(xc(a)))}function Sb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function TH(e,t){var r=ho(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 V1(e,t,r){return t===lD?Sb(PH(e,r)):vi(t)?TH(t,r):Sb(NH(Vn(e)))}function AH(e){var t=Ca(xc(e)),r=["absolute","fixed"].indexOf(bn(e).position)>=0,n=r&&_r(e)?$a(e):e;return vi(n)?t.filter(function(i){return vi(i)&&hD(i,n)&&rn(i)!=="body"}):[]}function MH(e,t,r,n){var i=t==="clippingParents"?AH(e):[].concat(t),o=[].concat(i,[r]),a=o[0],u=o.reduce(function(c,d){var f=V1(e,d,n);return c.top=ci(f.top,c.top),c.right=Hu(f.right,c.right),c.bottom=Hu(f.bottom,c.bottom),c.left=ci(f.left,c.left),c},V1(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 yD(e){var t=e.reference,r=e.element,n=e.placement,i=n?Qr(n):null,o=n?po(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 Er:c={x:a,y:t.y+t.height};break;case Sr: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?ex(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case lo:c[d]=c[d]-(t[f]/2-r[f]/2);break;case Na:c[d]=c[d]+(t[f]/2-r[f]/2);break}}return c}function Ta(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.strategy,a=o===void 0?e.strategy:o,u=r.boundary,c=u===void 0?Qz:u,d=r.rootBoundary,f=d===void 0?lD:d,h=r.elementContext,p=h===void 0?Zo:h,v=r.altBoundary,m=v===void 0?!1:v,y=r.padding,x=y===void 0?0:y,b=vD(typeof x!="number"?x:gD(x,Fa)),w=p===Zo?eH:Zo,S=e.rects.popper,E=e.elements[m?w:p],_=MH(vi(E)?E:E.contextElement||Vn(e.elements.popper),c,f,a),R=ho(e.elements.reference),I=yD({reference:R,element:S,placement:i}),N=Sb(Object.assign({},S,I)),D=p===Zo?N:R,L={top:_.top-D.top+b.top,bottom:D.bottom-_.bottom+b.bottom,left:_.left-D.left+b.left,right:D.right-_.right+b.right},B=e.modifiersData.offset;if(p===Zo&&B){var U=B[i];Object.keys(L).forEach(function(j){var T=[Sr,Er].indexOf(j)>=0?1:-1,G=[Gt,Er].indexOf(j)>=0?"y":"x";L[j]+=U[G]*T})}return L}function DH(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,u=r.flipVariations,c=r.allowedAutoPlacements,d=c===void 0?fD:c,f=po(n),h=f?u?$1:$1.filter(function(m){return po(m)===f}):Fa,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]=Ta(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[Qr(y)],m},{});return Object.keys(v).sort(function(m,y){return v[m]-v[y]})}function jH(e){if(Qr(e)===Zb)return[];var t=Mu(e);return[U1(e),t,U1(t)]}function qH(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,u=a===void 0?!0:a,c=r.fallbackPlacements,d=r.padding,f=r.boundary,h=r.rootBoundary,p=r.altBoundary,v=r.flipVariations,m=v===void 0?!0:v,y=r.allowedAutoPlacements,x=t.options.placement,b=Qr(x),w=b===x,S=c||(w||!m?[Mu(x)]:jH(x)),E=[x].concat(S).reduce(function(H,K){return H.concat(Qr(K)===Zb?DH(t,{placement:K,boundary:f,rootBoundary:h,padding:d,flipVariations:m,allowedAutoPlacements:y}):K)},[]),_=t.rects.reference,R=t.rects.popper,I=new Map,N=!0,D=E[0],L=0;L<E.length;L++){var B=E[L],U=Qr(B),j=po(B)===lo,T=[Gt,Er].indexOf(U)>=0,G=T?"width":"height",z=Ta(t,{placement:B,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),X=T?j?Sr:Kt:j?Er:Gt;_[G]>R[G]&&(X=Mu(X));var Z=Mu(X),re=[];if(o&&re.push(z[U]<=0),u&&re.push(z[X]<=0,z[Z]<=0),re.every(function(H){return H})){D=B,N=!1;break}I.set(B,re)}if(N)for(var W=m?3:1,Q=function(K){var $=E.find(function(k){var F=I.get(k);if(F)return F.slice(0,K).every(function(te){return te})});if($)return D=$,"break"},ue=W;ue>0;ue--){var oe=Q(ue);if(oe==="break")break}t.placement!==D&&(t.modifiersData[n]._skip=!0,t.placement=D,t.reset=!0)}}const kH={name:"flip",enabled:!0,phase:"main",fn:qH,requiresIfExists:["offset"],data:{_skip:!1}};function W1(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 G1(e){return[Gt,Sr,Er,Kt].some(function(t){return e[t]>=0})}function LH(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ta(t,{elementContext:"reference"}),u=Ta(t,{altBoundary:!0}),c=W1(a,n),d=W1(u,i,o),f=G1(c),h=G1(d);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const BH={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:LH};function FH(e,t,r){var n=Qr(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,Sr].indexOf(n)>=0?{x:u,y:a}:{x:a,y:u}}function $H(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=fD.reduce(function(f,h){return f[h]=FH(h,t.rects,o),f},{}),u=a[t.placement],c=u.x,d=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[n]=a}const zH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:$H};function HH(e){var t=e.state,r=e.name;t.modifiersData[r]=yD({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const UH={name:"popperOffsets",enabled:!0,phase:"read",fn:HH,data:{}};function VH(e){return e==="x"?"y":"x"}function WH(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,u=a===void 0?!1:a,c=r.boundary,d=r.rootBoundary,f=r.altBoundary,h=r.padding,p=r.tether,v=p===void 0?!0:p,m=r.tetherOffset,y=m===void 0?0:m,x=Ta(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),b=Qr(t.placement),w=po(t.placement),S=!w,E=ex(b),_=VH(E),R=t.modifiersData.popperOffsets,I=t.rects.reference,N=t.rects.popper,D=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,L=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,U={x:0,y:0};if(R){if(o){var j,T=E==="y"?Gt:Kt,G=E==="y"?Er:Sr,z=E==="y"?"height":"width",X=R[E],Z=X+x[T],re=X-x[G],W=v?-N[z]/2:0,Q=w===lo?I[z]:N[z],ue=w===lo?-N[z]:-I[z],oe=t.elements.arrow,H=v&&oe?Qb(oe):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:pD(),$=K[T],k=K[G],F=Oa(0,I[z],H[z]),te=S?I[z]/2-W-F-$-L.mainAxis:Q-F-$-L.mainAxis,ie=S?-I[z]/2+W+F+k+L.mainAxis:ue+F+k+L.mainAxis,ae=t.elements.arrow&&$a(t.elements.arrow),ce=ae?E==="y"?ae.clientTop||0:ae.clientLeft||0:0,we=(j=B==null?void 0:B[E])!=null?j:0,Se=X+te-we-ce,_e=X+ie-we,he=Oa(v?Hu(Z,Se):Z,X,v?ci(re,_e):re);R[E]=he,U[E]=he-X}if(u){var le,Oe=E==="x"?Gt:Kt,Ne=E==="x"?Er:Sr,He=R[_],qe=_==="y"?"height":"width",Xe=He+x[Oe],We=He-x[Ne],mt=[Gt,Kt].indexOf(b)!==-1,et=(le=B==null?void 0:B[_])!=null?le:0,Tt=mt?Xe:He-I[qe]-N[qe]-et+L.altAxis,ut=mt?He+I[qe]+N[qe]-et-L.altAxis:We,tt=v&&mt?gH(Tt,He,ut):Oa(v?Tt:Xe,He,v?ut:We);R[_]=tt,U[_]=tt-He}t.modifiersData[n]=U}}const GH={name:"preventOverflow",enabled:!0,phase:"main",fn:WH,requiresIfExists:["offset"]};function KH(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function YH(e){return e===sr(e)||!_r(e)?tx(e):KH(e)}function XH(e){var t=e.getBoundingClientRect(),r=fo(t.width)/e.offsetWidth||1,n=fo(t.height)/e.offsetHeight||1;return r!==1||n!==1}function ZH(e,t,r){r===void 0&&(r=!1);var n=_r(t),i=_r(t)&&XH(t),o=Vn(t),a=ho(e,i,r),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((rn(t)!=="body"||nx(o))&&(u=YH(t)),_r(t)?(c=ho(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=rx(o))),{x:a.left+u.scrollLeft-c.x,y:a.top+u.scrollTop-c.y,width:a.width,height:a.height}}function JH(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(u){if(!r.has(u)){var c=t.get(u);c&&i(c)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function QH(e){var t=JH(e);return lH.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function e4(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function t4(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var K1={placement:"bottom",modifiers:[],strategy:"absolute"};function Y1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function r4(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?K1:i;return function(u,c,d){d===void 0&&(d=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},K1,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:vi(u)?Ca(u):u.contextElement?Ca(u.contextElement):[],popper:Ca(c)};var S=QH(t4([].concat(n,f.options.modifiers)));return f.orderedModifiers=S.filter(function(E){return E.enabled}),m(),v.update()},forceUpdate:function(){if(!p){var b=f.elements,w=b.reference,S=b.popper;if(Y1(w,S)){f.rects={reference:ZH(w,$a(S),f.options.strategy==="fixed"),popper:Qb(S)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(L){return f.modifiersData[L.name]=Object.assign({},L.data)});for(var E=0;E<f.orderedModifiers.length;E++){if(f.reset===!0){f.reset=!1,E=-1;continue}var _=f.orderedModifiers[E],R=_.fn,I=_.options,N=I===void 0?{}:I,D=_.name;typeof R=="function"&&(f=R({state:f,options:N,name:D,instance:v})||f)}}}},update:e4(function(){return new Promise(function(x){v.forceUpdate(),x(f)})}),destroy:function(){y(),p=!0}};if(!Y1(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,S=w===void 0?{}:w,E=x.effect;if(typeof E=="function"){var _=E({state:f,name:b,instance:v,options:S}),R=function(){};h.push(_||R)}})}function y(){h.forEach(function(x){return x()}),h=[]}return v}}var n4=[CH,UH,SH,hH,zH,kH,GH,xH,BH],i4=r4({defaultModifiers:n4}),Gf,X1;function o4(){if(X1)return Gf;X1=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 Gf=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}},Gf}var a4=o4();const s4=Un(a4);var u4=[],wc=function(t,r,n){n===void 0&&(n={});var i=ve.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||u4},a=ve.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),u=a[0],c=a[1],d=ve.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(v){var m=v.state,y=Object.keys(m.elements);Yb.flushSync(function(){c({styles:B1(y.map(function(x){return[x,m.styles[x]||{}]})),attributes:B1(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 s4(i.current,p)?i.current||p:(i.current=p,p)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,d]),h=ve.useRef();return F1(function(){h.current&&h.current.setOptions(f)},[f]),F1(function(){if(!(t==null||r==null)){var p=n.createPopper||i4,v=p(t,r,f);return h.current=v,function(){v.destroy(),h.current=null}}},[t,r,n.createPopper]),{state:h.current?h.current.state:null,styles:u.styles,attributes:u.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}};const bD=({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 ix(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 Kf,Z1;function c4(){if(Z1)return Kf;Z1=1;function e(){this.__data__=[],this.size=0}return Kf=e,Kf}var Yf,J1;function bo(){if(J1)return Yf;J1=1;function e(t,r){return t===r||t!==t&&r!==r}return Yf=e,Yf}var Xf,Q1;function _c(){if(Q1)return Xf;Q1=1;var e=bo();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Xf=t,Xf}var Zf,eE;function l4(){if(eE)return Zf;eE=1;var e=_c(),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 Zf=n,Zf}var Jf,tE;function f4(){if(tE)return Jf;tE=1;var e=_c();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return Jf=t,Jf}var Qf,rE;function d4(){if(rE)return Qf;rE=1;var e=_c();function t(r){return e(this.__data__,r)>-1}return Qf=t,Qf}var ed,nE;function h4(){if(nE)return ed;nE=1;var e=_c();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 ed=t,ed}var td,iE;function Ec(){if(iE)return td;iE=1;var e=c4(),t=l4(),r=f4(),n=d4(),i=h4();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var d=a[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,td=o,td}var rd,oE;function p4(){if(oE)return rd;oE=1;var e=Ec();function t(){this.__data__=new e,this.size=0}return rd=t,rd}var nd,aE;function v4(){if(aE)return nd;aE=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return nd=e,nd}var id,sE;function g4(){if(sE)return id;sE=1;function e(t){return this.__data__.get(t)}return id=e,id}var od,uE;function m4(){if(uE)return od;uE=1;function e(t){return this.__data__.has(t)}return od=e,od}var ad,cE;function xD(){if(cE)return ad;cE=1;var e=typeof ht=="object"&&ht&&ht.Object===Object&&ht;return ad=e,ad}var sd,lE;function Fr(){if(lE)return sd;lE=1;var e=xD(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return sd=r,sd}var ud,fE;function xo(){if(fE)return ud;fE=1;var e=Fr(),t=e.Symbol;return ud=t,ud}var cd,dE;function y4(){if(dE)return cd;dE=1;var e=xo(),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 cd=o,cd}var ld,hE;function b4(){if(hE)return ld;hE=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return ld=r,ld}var fd,pE;function wi(){if(pE)return fd;pE=1;var e=xo(),t=y4(),r=b4(),n="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(u){return u==null?u===void 0?i:n:o&&o in Object(u)?t(u):r(u)}return fd=a,fd}var dd,vE;function Or(){if(vE)return dd;vE=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return dd=e,dd}var hd,gE;function za(){if(gE)return hd;gE=1;var e=wi(),t=Or(),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 hd=a,hd}var pd,mE;function x4(){if(mE)return pd;mE=1;var e=Fr(),t=e["__core-js_shared__"];return pd=t,pd}var vd,yE;function w4(){if(yE)return vd;yE=1;var e=x4(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return vd=r,vd}var gd,bE;function wD(){if(bE)return gd;bE=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 gd=r,gd}var md,xE;function _4(){if(xE)return md;xE=1;var e=za(),t=w4(),r=Or(),n=wD(),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 md=h,md}var yd,wE;function E4(){if(wE)return yd;wE=1;function e(t,r){return t==null?void 0:t[r]}return yd=e,yd}var bd,_E;function _i(){if(_E)return bd;_E=1;var e=_4(),t=E4();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return bd=r,bd}var xd,EE;function ox(){if(EE)return xd;EE=1;var e=_i(),t=Fr(),r=e(t,"Map");return xd=r,xd}var wd,SE;function Sc(){if(SE)return wd;SE=1;var e=_i(),t=e(Object,"create");return wd=t,wd}var _d,OE;function S4(){if(OE)return _d;OE=1;var e=Sc();function t(){this.__data__=e?e(null):{},this.size=0}return _d=t,_d}var Ed,CE;function O4(){if(CE)return Ed;CE=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Ed=e,Ed}var Sd,RE;function C4(){if(RE)return Sd;RE=1;var e=Sc(),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 Sd=i,Sd}var Od,IE;function R4(){if(IE)return Od;IE=1;var e=Sc(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return Od=n,Od}var Cd,PE;function I4(){if(PE)return Cd;PE=1;var e=Sc(),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 Cd=r,Cd}var Rd,NE;function P4(){if(NE)return Rd;NE=1;var e=S4(),t=O4(),r=C4(),n=R4(),i=I4();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,Rd=o,Rd}var Id,TE;function N4(){if(TE)return Id;TE=1;var e=P4(),t=Ec(),r=ox();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Id=n,Id}var Pd,AE;function T4(){if(AE)return Pd;AE=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Pd=e,Pd}var Nd,ME;function Oc(){if(ME)return Nd;ME=1;var e=T4();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Nd=t,Nd}var Td,DE;function A4(){if(DE)return Td;DE=1;var e=Oc();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Td=t,Td}var Ad,jE;function M4(){if(jE)return Ad;jE=1;var e=Oc();function t(r){return e(this,r).get(r)}return Ad=t,Ad}var Md,qE;function D4(){if(qE)return Md;qE=1;var e=Oc();function t(r){return e(this,r).has(r)}return Md=t,Md}var Dd,kE;function j4(){if(kE)return Dd;kE=1;var e=Oc();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 Dd=t,Dd}var jd,LE;function ax(){if(LE)return jd;LE=1;var e=N4(),t=A4(),r=M4(),n=D4(),i=j4();function o(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var d=a[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,jd=o,jd}var qd,BE;function q4(){if(BE)return qd;BE=1;var e=Ec(),t=ox(),r=ax(),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 qd=i,qd}var kd,FE;function Cc(){if(FE)return kd;FE=1;var e=Ec(),t=p4(),r=v4(),n=g4(),i=m4(),o=q4();function a(u){var c=this.__data__=new e(u);this.size=c.size}return a.prototype.clear=t,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=i,a.prototype.set=o,kd=a,kd}var Ld,$E;function sx(){if($E)return Ld;$E=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 Ld=e,Ld}var Bd,zE;function _D(){if(zE)return Bd;zE=1;var e=_i(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Bd=t,Bd}var Fd,HE;function Rc(){if(HE)return Fd;HE=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 Fd=t,Fd}var $d,UE;function Ic(){if(UE)return $d;UE=1;var e=Rc(),t=bo(),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 $d=i,$d}var zd,VE;function Ha(){if(VE)return zd;VE=1;var e=Ic(),t=Rc();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 zd=r,zd}var Hd,WE;function k4(){if(WE)return Hd;WE=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Hd=e,Hd}var Ud,GE;function on(){if(GE)return Ud;GE=1;function e(t){return t!=null&&typeof t=="object"}return Ud=e,Ud}var Vd,KE;function L4(){if(KE)return Vd;KE=1;var e=wi(),t=on(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Vd=n,Vd}var Wd,YE;function Ua(){if(YE)return Wd;YE=1;var e=L4(),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 Wd=o,Wd}var Gd,XE;function yt(){if(XE)return Gd;XE=1;var e=Array.isArray;return Gd=e,Gd}var ya={exports:{}},Kd,ZE;function B4(){if(ZE)return Kd;ZE=1;function e(){return!1}return Kd=e,Kd}ya.exports;var JE;function wo(){return JE||(JE=1,(function(e,t){var r=Fr(),n=B4(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,u=a?r.Buffer:void 0,c=u?u.isBuffer:void 0,d=c||n;e.exports=d})(ya,ya.exports)),ya.exports}var Yd,QE;function Pc(){if(QE)return Yd;QE=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 Yd=r,Yd}var Xd,eS;function ux(){if(eS)return Xd;eS=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Xd=t,Xd}var Zd,tS;function F4(){if(tS)return Zd;tS=1;var e=wi(),t=ux(),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]",S="[object Float64Array]",E="[object Int8Array]",_="[object Int16Array]",R="[object Int32Array]",I="[object Uint8Array]",N="[object Uint8ClampedArray]",D="[object Uint16Array]",L="[object Uint32Array]",B={};B[w]=B[S]=B[E]=B[_]=B[R]=B[I]=B[N]=B[D]=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 Zd=U,Zd}var Jd,rS;function Nc(){if(rS)return Jd;rS=1;function e(t){return function(r){return t(r)}}return Jd=e,Jd}var ba={exports:{}};ba.exports;var nS;function cx(){return nS||(nS=1,(function(e,t){var r=xD(),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})(ba,ba.exports)),ba.exports}var Qd,iS;function Va(){if(iS)return Qd;iS=1;var e=F4(),t=Nc(),r=cx(),n=r&&r.isTypedArray,i=n?t(n):e;return Qd=i,Qd}var eh,oS;function ED(){if(oS)return eh;oS=1;var e=k4(),t=Ua(),r=yt(),n=wo(),i=Pc(),o=Va(),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 eh=c,eh}var th,aS;function Tc(){if(aS)return th;aS=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return th=t,th}var rh,sS;function SD(){if(sS)return rh;sS=1;function e(t,r){return function(n){return t(r(n))}}return rh=e,rh}var nh,uS;function $4(){if(uS)return nh;uS=1;var e=SD(),t=e(Object.keys,Object);return nh=t,nh}var ih,cS;function lx(){if(cS)return ih;cS=1;var e=Tc(),t=$4(),r=Object.prototype,n=r.hasOwnProperty;function i(o){if(!e(o))return t(o);var a=[];for(var u in Object(o))n.call(o,u)&&u!="constructor"&&a.push(u);return a}return ih=i,ih}var oh,lS;function En(){if(lS)return oh;lS=1;var e=za(),t=ux();function r(n){return n!=null&&t(n.length)&&!e(n)}return oh=r,oh}var ah,fS;function Wn(){if(fS)return ah;fS=1;var e=ED(),t=lx(),r=En();function n(i){return r(i)?e(i):t(i)}return ah=n,ah}var sh,dS;function z4(){if(dS)return sh;dS=1;var e=Ha(),t=Wn();function r(n,i){return n&&e(i,t(i),n)}return sh=r,sh}var uh,hS;function H4(){if(hS)return uh;hS=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return uh=e,uh}var ch,pS;function U4(){if(pS)return ch;pS=1;var e=Or(),t=Tc(),r=H4(),n=Object.prototype,i=n.hasOwnProperty;function o(a){if(!e(a))return r(a);var u=t(a),c=[];for(var d in a)d=="constructor"&&(u||!i.call(a,d))||c.push(d);return c}return ch=o,ch}var lh,vS;function Ei(){if(vS)return lh;vS=1;var e=ED(),t=U4(),r=En();function n(i){return r(i)?e(i,!0):t(i)}return lh=n,lh}var fh,gS;function V4(){if(gS)return fh;gS=1;var e=Ha(),t=Ei();function r(n,i){return n&&e(i,t(i),n)}return fh=r,fh}var xa={exports:{}};xa.exports;var mS;function OD(){return mS||(mS=1,(function(e,t){var r=Fr(),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})(xa,xa.exports)),xa.exports}var dh,yS;function CD(){if(yS)return dh;yS=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 dh=e,dh}var hh,bS;function RD(){if(bS)return hh;bS=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 hh=e,hh}var ph,xS;function ID(){if(xS)return ph;xS=1;function e(){return[]}return ph=e,ph}var vh,wS;function fx(){if(wS)return vh;wS=1;var e=RD(),t=ID(),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 vh=o,vh}var gh,_S;function W4(){if(_S)return gh;_S=1;var e=Ha(),t=fx();function r(n,i){return e(n,t(n),i)}return gh=r,gh}var mh,ES;function dx(){if(ES)return mh;ES=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 mh=e,mh}var yh,SS;function Ac(){if(SS)return yh;SS=1;var e=SD(),t=e(Object.getPrototypeOf,Object);return yh=t,yh}var bh,OS;function PD(){if(OS)return bh;OS=1;var e=dx(),t=Ac(),r=fx(),n=ID(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var u=[];a;)e(u,r(a)),a=t(a);return u}:n;return bh=o,bh}var xh,CS;function G4(){if(CS)return xh;CS=1;var e=Ha(),t=PD();function r(n,i){return e(n,t(n),i)}return xh=r,xh}var wh,RS;function ND(){if(RS)return wh;RS=1;var e=dx(),t=yt();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return wh=r,wh}var _h,IS;function TD(){if(IS)return _h;IS=1;var e=ND(),t=fx(),r=Wn();function n(i){return e(i,r,t)}return _h=n,_h}var Eh,PS;function K4(){if(PS)return Eh;PS=1;var e=ND(),t=PD(),r=Ei();function n(i){return e(i,r,t)}return Eh=n,Eh}var Sh,NS;function Y4(){if(NS)return Sh;NS=1;var e=_i(),t=Fr(),r=e(t,"DataView");return Sh=r,Sh}var Oh,TS;function X4(){if(TS)return Oh;TS=1;var e=_i(),t=Fr(),r=e(t,"Promise");return Oh=r,Oh}var Ch,AS;function AD(){if(AS)return Ch;AS=1;var e=_i(),t=Fr(),r=e(t,"Set");return Ch=r,Ch}var Rh,MS;function Z4(){if(MS)return Rh;MS=1;var e=_i(),t=Fr(),r=e(t,"WeakMap");return Rh=r,Rh}var Ih,DS;function _o(){if(DS)return Ih;DS=1;var e=Y4(),t=ox(),r=X4(),n=AD(),i=Z4(),o=wi(),a=wD(),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(S){var E=o(S),_=E==c?S.constructor:void 0,R=_?a(_):"";if(R)switch(R){case v:return p;case m:return u;case y:return d;case x:return f;case b:return h}return E}),Ih=w,Ih}var Ph,jS;function J4(){if(jS)return Ph;jS=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n){var i=n.length,o=new n.constructor(i);return i&&typeof n[0]=="string"&&t.call(n,"index")&&(o.index=n.index,o.input=n.input),o}return Ph=r,Ph}var Nh,qS;function MD(){if(qS)return Nh;qS=1;var e=Fr(),t=e.Uint8Array;return Nh=t,Nh}var Th,kS;function hx(){if(kS)return Th;kS=1;var e=MD();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return Th=t,Th}var Ah,LS;function Q4(){if(LS)return Ah;LS=1;var e=hx();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return Ah=t,Ah}var Mh,BS;function eU(){if(BS)return Mh;BS=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return Mh=t,Mh}var Dh,FS;function tU(){if(FS)return Dh;FS=1;var e=xo(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return Dh=n,Dh}var jh,$S;function DD(){if($S)return jh;$S=1;var e=hx();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return jh=t,jh}var qh,zS;function rU(){if(zS)return qh;zS=1;var e=hx(),t=Q4(),r=eU(),n=tU(),i=DD(),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]",S="[object Int32Array]",E="[object Uint8Array]",_="[object Uint8ClampedArray]",R="[object Uint16Array]",I="[object Uint32Array]";function N(D,L,B){var U=D.constructor;switch(L){case v:return e(D);case o:case a:return new U(+D);case m:return t(D,B);case y:case x:case b:case w:case S:case E:case _:case R:case I:return i(D,B);case u:return new U;case c:case h:return new U(D);case d:return r(D);case f:return new U;case p:return n(D)}}return qh=N,qh}var kh,HS;function jD(){if(HS)return kh;HS=1;var e=Or(),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 kh=r,kh}var Lh,US;function qD(){if(US)return Lh;US=1;var e=jD(),t=Ac(),r=Tc();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Lh=n,Lh}var Bh,VS;function nU(){if(VS)return Bh;VS=1;var e=_o(),t=on(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Bh=n,Bh}var Fh,WS;function iU(){if(WS)return Fh;WS=1;var e=nU(),t=Nc(),r=cx(),n=r&&r.isMap,i=n?t(n):e;return Fh=i,Fh}var $h,GS;function oU(){if(GS)return $h;GS=1;var e=_o(),t=on(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return $h=n,$h}var zh,KS;function aU(){if(KS)return zh;KS=1;var e=oU(),t=Nc(),r=cx(),n=r&&r.isSet,i=n?t(n):e;return zh=i,zh}var Hh,YS;function kD(){if(YS)return Hh;YS=1;var e=Cc(),t=sx(),r=Ic(),n=z4(),i=V4(),o=OD(),a=CD(),u=W4(),c=G4(),d=TD(),f=K4(),h=_o(),p=J4(),v=rU(),m=qD(),y=yt(),x=wo(),b=iU(),w=Or(),S=aU(),E=Wn(),_=Ei(),R=1,I=2,N=4,D="[object Arguments]",L="[object Array]",B="[object Boolean]",U="[object Date]",j="[object Error]",T="[object Function]",G="[object GeneratorFunction]",z="[object Map]",X="[object Number]",Z="[object Object]",re="[object RegExp]",W="[object Set]",Q="[object String]",ue="[object Symbol]",oe="[object WeakMap]",H="[object ArrayBuffer]",K="[object DataView]",$="[object Float32Array]",k="[object Float64Array]",F="[object Int8Array]",te="[object Int16Array]",ie="[object Int32Array]",ae="[object Uint8Array]",ce="[object Uint8ClampedArray]",we="[object Uint16Array]",Se="[object Uint32Array]",_e={};_e[D]=_e[L]=_e[H]=_e[K]=_e[B]=_e[U]=_e[$]=_e[k]=_e[F]=_e[te]=_e[ie]=_e[z]=_e[X]=_e[Z]=_e[re]=_e[W]=_e[Q]=_e[ue]=_e[ae]=_e[ce]=_e[we]=_e[Se]=!0,_e[j]=_e[T]=_e[oe]=!1;function he(le,Oe,Ne,He,qe,Xe){var We,mt=Oe&R,et=Oe&I,Tt=Oe&N;if(Ne&&(We=qe?Ne(le,He,qe,Xe):Ne(le)),We!==void 0)return We;if(!w(le))return le;var ut=y(le);if(ut){if(We=p(le),!mt)return a(le,We)}else{var tt=h(le),Ct=tt==T||tt==G;if(x(le))return o(le,mt);if(tt==Z||tt==D||Ct&&!qe){if(We=et||Ct?{}:m(le),!mt)return et?c(le,i(We,le)):u(le,n(We,le))}else{if(!_e[tt])return qe?le:{};We=v(le,tt,mt)}}Xe||(Xe=new e);var Jt=Xe.get(le);if(Jt)return Jt;Xe.set(le,We),S(le)?le.forEach(function(xt){We.add(he(xt,Oe,Ne,xt,le,Xe))}):b(le)&&le.forEach(function(xt,jt){We.set(jt,he(xt,Oe,Ne,jt,le,Xe))});var lr=Tt?et?f:d:et?_:E,Dt=ut?void 0:lr(le);return t(Dt||le,function(xt,jt){Dt&&(jt=xt,xt=le[jt]),r(We,jt,he(xt,Oe,Ne,jt,le,Xe))}),We}return Hh=he,Hh}var Uh,XS;function sU(){if(XS)return Uh;XS=1;var e=kD(),t=4;function r(n){return e(n,t)}return Uh=r,Uh}var Vh,ZS;function px(){if(ZS)return Vh;ZS=1;function e(t){return function(){return t}}return Vh=e,Vh}var Wh,JS;function uU(){if(JS)return Wh;JS=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 Wh=e,Wh}var Gh,QS;function vx(){if(QS)return Gh;QS=1;var e=uU(),t=e();return Gh=t,Gh}var Kh,eO;function gx(){if(eO)return Kh;eO=1;var e=vx(),t=Wn();function r(n,i){return n&&e(n,i,t)}return Kh=r,Kh}var Yh,tO;function cU(){if(tO)return Yh;tO=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 Yh=t,Yh}var Xh,rO;function Mc(){if(rO)return Xh;rO=1;var e=gx(),t=cU(),r=t(e);return Xh=r,Xh}var Zh,nO;function Si(){if(nO)return Zh;nO=1;function e(t){return t}return Zh=e,Zh}var Jh,iO;function LD(){if(iO)return Jh;iO=1;var e=Si();function t(r){return typeof r=="function"?r:e}return Jh=t,Jh}var Qh,oO;function BD(){if(oO)return Qh;oO=1;var e=sx(),t=Mc(),r=LD(),n=yt();function i(o,a){var u=n(o)?e:t;return u(o,r(a))}return Qh=i,Qh}var ep,aO;function FD(){return aO||(aO=1,ep=BD()),ep}var tp,sO;function lU(){if(sO)return tp;sO=1;var e=Mc();function t(r,n){var i=[];return e(r,function(o,a,u){n(o,a,u)&&i.push(o)}),i}return tp=t,tp}var rp,uO;function fU(){if(uO)return rp;uO=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return rp=t,rp}var np,cO;function dU(){if(cO)return np;cO=1;function e(t){return this.__data__.has(t)}return np=e,np}var ip,lO;function $D(){if(lO)return ip;lO=1;var e=ax(),t=fU(),r=dU();function n(i){var o=-1,a=i==null?0:i.length;for(this.__data__=new e;++o<a;)this.add(i[o])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,ip=n,ip}var op,fO;function hU(){if(fO)return op;fO=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 op=e,op}var ap,dO;function zD(){if(dO)return ap;dO=1;function e(t,r){return t.has(r)}return ap=e,ap}var sp,hO;function HD(){if(hO)return sp;hO=1;var e=$D(),t=hU(),r=zD(),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,S=c&i?new e:void 0;for(h.set(a,u),h.set(u,a);++b<v;){var E=a[b],_=u[b];if(d)var R=p?d(_,E,b,u,a,h):d(E,_,b,a,u,h);if(R!==void 0){if(R)continue;w=!1;break}if(S){if(!t(u,function(I,N){if(!r(S,N)&&(E===I||f(E,I,c,d,h)))return S.push(N)})){w=!1;break}}else if(!(E===_||f(E,_,c,d,h))){w=!1;break}}return h.delete(a),h.delete(u),w}return sp=o,sp}var up,pO;function pU(){if(pO)return up;pO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return up=e,up}var cp,vO;function mx(){if(vO)return cp;vO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return cp=e,cp}var lp,gO;function vU(){if(gO)return lp;gO=1;var e=xo(),t=MD(),r=bo(),n=HD(),i=pU(),o=mx(),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]",S=e?e.prototype:void 0,E=S?S.valueOf:void 0;function _(R,I,N,D,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 T=D&a;if(j||(j=o),R.size!=I.size&&!T)return!1;var G=U.get(R);if(G)return G==I;D|=u,U.set(R,I);var z=n(j(R),j(I),D,L,B,U);return U.delete(R),z;case x:if(E)return E.call(R)==E.call(I)}return!1}return lp=_,lp}var fp,mO;function gU(){if(mO)return fp;mO=1;var e=TD(),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),S=f.get(a);if(w&&S)return w==a&&S==o;var E=!0;f.set(o,a),f.set(a,o);for(var _=h;++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)){E=!1;break}_||(_=b=="constructor")}if(E&&!_){var D=o.constructor,L=a.constructor;D!=L&&"constructor"in o&&"constructor"in a&&!(typeof D=="function"&&D instanceof D&&typeof L=="function"&&L instanceof L)&&(E=!1)}return f.delete(o),f.delete(a),E}return fp=i,fp}var dp,yO;function mU(){if(yO)return dp;yO=1;var e=Cc(),t=HD(),r=vU(),n=gU(),i=_o(),o=yt(),a=wo(),u=Va(),c=1,d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype,v=p.hasOwnProperty;function m(y,x,b,w,S,E){var _=o(y),R=o(x),I=_?f:i(y),N=R?f:i(x);I=I==d?h:I,N=N==d?h:N;var D=I==h,L=N==h,B=I==N;if(B&&a(y)){if(!a(x))return!1;_=!0,D=!1}if(B&&!D)return E||(E=new e),_||u(y)?t(y,x,b,w,S,E):r(y,x,I,b,w,S,E);if(!(b&c)){var U=D&&v.call(y,"__wrapped__"),j=L&&v.call(x,"__wrapped__");if(U||j){var T=U?y.value():y,G=j?x.value():x;return E||(E=new e),S(T,G,b,w,E)}}return B?(E||(E=new e),n(y,x,b,w,S,E)):!1}return dp=m,dp}var hp,bO;function UD(){if(bO)return hp;bO=1;var e=mU(),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 hp=r,hp}var pp,xO;function yU(){if(xO)return pp;xO=1;var e=Cc(),t=UD(),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 pp=i,pp}var vp,wO;function VD(){if(wO)return vp;wO=1;var e=Or();function t(r){return r===r&&!e(r)}return vp=t,vp}var gp,_O;function bU(){if(_O)return gp;_O=1;var e=VD(),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 gp=r,gp}var mp,EO;function WD(){if(EO)return mp;EO=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return mp=e,mp}var yp,SO;function xU(){if(SO)return yp;SO=1;var e=yU(),t=bU(),r=WD();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 yp=n,yp}var bp,OO;function Eo(){if(OO)return bp;OO=1;var e=wi(),t=on(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return bp=n,bp}var xp,CO;function yx(){if(CO)return xp;CO=1;var e=yt(),t=Eo(),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 xp=i,xp}var wp,RO;function wU(){if(RO)return wp;RO=1;var e=ax(),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,wp=r,wp}var _p,IO;function _U(){if(IO)return _p;IO=1;var e=wU(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return _p=r,_p}var Ep,PO;function EU(){if(PO)return Ep;PO=1;var e=_U(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(a,u,c,d){o.push(c?d.replace(r,"$1"):u||a)}),o});return Ep=n,Ep}var Sp,NO;function Dc(){if(NO)return Sp;NO=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 Sp=e,Sp}var Op,TO;function SU(){if(TO)return Op;TO=1;var e=xo(),t=Dc(),r=yt(),n=Eo(),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 Op=a,Op}var Cp,AO;function GD(){if(AO)return Cp;AO=1;var e=SU();function t(r){return r==null?"":e(r)}return Cp=t,Cp}var Rp,MO;function jc(){if(MO)return Rp;MO=1;var e=yt(),t=yx(),r=EU(),n=GD();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return Rp=i,Rp}var Ip,DO;function Wa(){if(DO)return Ip;DO=1;var e=Eo();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Ip=t,Ip}var Pp,jO;function qc(){if(jO)return Pp;jO=1;var e=jc(),t=Wa();function r(n,i){i=e(i,n);for(var o=0,a=i.length;n!=null&&o<a;)n=n[t(i[o++])];return o&&o==a?n:void 0}return Pp=r,Pp}var Np,qO;function OU(){if(qO)return Np;qO=1;var e=qc();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return Np=t,Np}var Tp,kO;function CU(){if(kO)return Tp;kO=1;function e(t,r){return t!=null&&r in Object(t)}return Tp=e,Tp}var Ap,LO;function KD(){if(LO)return Ap;LO=1;var e=jc(),t=Ua(),r=yt(),n=Pc(),i=ux(),o=Wa();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 Ap=a,Ap}var Mp,BO;function YD(){if(BO)return Mp;BO=1;var e=CU(),t=KD();function r(n,i){return n!=null&&t(n,i,e)}return Mp=r,Mp}var Dp,FO;function RU(){if(FO)return Dp;FO=1;var e=UD(),t=OU(),r=YD(),n=yx(),i=VD(),o=WD(),a=Wa(),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 Dp=d,Dp}var jp,$O;function XD(){if($O)return jp;$O=1;function e(t){return function(r){return r==null?void 0:r[t]}}return jp=e,jp}var qp,zO;function IU(){if(zO)return qp;zO=1;var e=qc();function t(r){return function(n){return e(n,r)}}return qp=t,qp}var kp,HO;function PU(){if(HO)return kp;HO=1;var e=XD(),t=IU(),r=yx(),n=Wa();function i(o){return r(o)?e(n(o)):t(o)}return kp=i,kp}var Lp,UO;function Sn(){if(UO)return Lp;UO=1;var e=xU(),t=RU(),r=Si(),n=yt(),i=PU();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 Lp=o,Lp}var Bp,VO;function ZD(){if(VO)return Bp;VO=1;var e=RD(),t=lU(),r=Sn(),n=yt();function i(o,a){var u=n(o)?e:t;return u(o,r(a,3))}return Bp=i,Bp}var Fp,WO;function NU(){if(WO)return Fp;WO=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return Fp=r,Fp}var $p,GO;function JD(){if(GO)return $p;GO=1;var e=NU(),t=KD();function r(n,i){return n!=null&&t(n,i,e)}return $p=r,$p}var zp,KO;function TU(){if(KO)return zp;KO=1;var e=lx(),t=_o(),r=Ua(),n=yt(),i=En(),o=wo(),a=Tc(),u=Va(),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 zp=p,zp}var Hp,YO;function QD(){if(YO)return Hp;YO=1;function e(t){return t===void 0}return Hp=e,Hp}var Up,XO;function ej(){if(XO)return Up;XO=1;var e=Mc(),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 Up=r,Up}var Vp,ZO;function tj(){if(ZO)return Vp;ZO=1;var e=Dc(),t=Sn(),r=ej(),n=yt();function i(o,a){var u=n(o)?e:r;return u(o,t(a,3))}return Vp=i,Vp}var Wp,JO;function AU(){if(JO)return Wp;JO=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 Wp=e,Wp}var Gp,QO;function MU(){if(QO)return Gp;QO=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 Gp=e,Gp}var Kp,eC;function rj(){if(eC)return Kp;eC=1;var e=AU(),t=Mc(),r=Sn(),n=MU(),i=yt();function o(a,u,c){var d=i(a)?e:n,f=arguments.length<3;return d(a,r(u,4),c,f,t)}return Kp=o,Kp}var Yp,tC;function DU(){if(tC)return Yp;tC=1;var e=wi(),t=yt(),r=on(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return Yp=i,Yp}var Xp,rC;function jU(){if(rC)return Xp;rC=1;var e=XD(),t=e("length");return Xp=t,Xp}var Zp,nC;function qU(){if(nC)return Zp;nC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="\\u200d",u=RegExp("["+a+e+i+o+"]");function c(d){return u.test(d)}return Zp=c,Zp}var Jp,iC;function kU(){if(iC)return Jp;iC=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("|")+")",S=RegExp(c+"(?="+c+")|"+w+b,"g");function E(_){for(var R=S.lastIndex=0;S.test(_);)++R;return R}return Jp=E,Jp}var Qp,oC;function LU(){if(oC)return Qp;oC=1;var e=jU(),t=qU(),r=kU();function n(i){return t(i)?r(i):e(i)}return Qp=n,Qp}var ev,aC;function BU(){if(aC)return ev;aC=1;var e=lx(),t=_o(),r=En(),n=DU(),i=LU(),o="[object Map]",a="[object Set]";function u(c){if(c==null)return 0;if(r(c))return n(c)?i(c):c.length;var d=t(c);return d==o||d==a?c.size:e(c).length}return ev=u,ev}var tv,sC;function FU(){if(sC)return tv;sC=1;var e=sx(),t=jD(),r=gx(),n=Sn(),i=Ac(),o=yt(),a=wo(),u=za(),c=Or(),d=Va();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,S){return p(v,b,w,S)}),v}return tv=f,tv}var rv,uC;function $U(){if(uC)return rv;uC=1;var e=xo(),t=Ua(),r=yt(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return rv=i,rv}var nv,cC;function bx(){if(cC)return nv;cC=1;var e=dx(),t=$U();function r(n,i,o,a,u){var c=-1,d=n.length;for(o||(o=t),u||(u=[]);++c<d;){var f=n[c];i>0&&o(f)?i>1?r(f,i-1,o,a,u):e(u,f):a||(u[u.length]=f)}return u}return nv=r,nv}var iv,lC;function zU(){if(lC)return iv;lC=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 iv=e,iv}var ov,fC;function nj(){if(fC)return ov;fC=1;var e=zU(),t=Math.max;function r(n,i,o){return i=t(i===void 0?n.length-1:i,0),function(){for(var a=arguments,u=-1,c=t(a.length-i,0),d=Array(c);++u<c;)d[u]=a[i+u];u=-1;for(var f=Array(i+1);++u<i;)f[u]=a[u];return f[i]=o(d),e(n,this,f)}}return ov=r,ov}var av,dC;function HU(){if(dC)return av;dC=1;var e=px(),t=_D(),r=Si(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return av=n,av}var sv,hC;function UU(){if(hC)return sv;hC=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 sv=n,sv}var uv,pC;function ij(){if(pC)return uv;pC=1;var e=HU(),t=UU(),r=t(e);return uv=r,uv}var cv,vC;function kc(){if(vC)return cv;vC=1;var e=Si(),t=nj(),r=ij();function n(i,o){return r(t(i,o,e),i+"")}return cv=n,cv}var lv,gC;function oj(){if(gC)return lv;gC=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 lv=e,lv}var fv,mC;function VU(){if(mC)return fv;mC=1;function e(t){return t!==t}return fv=e,fv}var dv,yC;function WU(){if(yC)return dv;yC=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 dv=e,dv}var hv,bC;function GU(){if(bC)return hv;bC=1;var e=oj(),t=VU(),r=WU();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return hv=n,hv}var pv,xC;function KU(){if(xC)return pv;xC=1;var e=GU();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return pv=t,pv}var vv,wC;function YU(){if(wC)return vv;wC=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 vv=e,vv}var gv,_C;function XU(){if(_C)return gv;_C=1;function e(){}return gv=e,gv}var mv,EC;function ZU(){if(EC)return mv;EC=1;var e=AD(),t=XU(),r=mx(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return mv=i,mv}var yv,SC;function JU(){if(SC)return yv;SC=1;var e=$D(),t=KU(),r=YU(),n=zD(),i=ZU(),o=mx(),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],S=d?d(w):w;if(w=f||w!==0?w:0,m&&S===S){for(var E=x.length;E--;)if(x[E]===S)continue e;d&&x.push(S),y.push(w)}else p(x,S,f)||(x!==y&&x.push(S),y.push(w))}return y}return yv=u,yv}var bv,OC;function aj(){if(OC)return bv;OC=1;var e=En(),t=on();function r(n){return t(n)&&e(n)}return bv=r,bv}var xv,CC;function QU(){if(CC)return xv;CC=1;var e=bx(),t=kc(),r=JU(),n=aj(),i=t(function(o){return r(e(o,1,n,!0))});return xv=i,xv}var wv,RC;function eV(){if(RC)return wv;RC=1;var e=Dc();function t(r,n){return e(n,function(i){return r[i]})}return wv=t,wv}var _v,IC;function sj(){if(IC)return _v;IC=1;var e=eV(),t=Wn();function r(n){return n==null?[]:e(n,t(n))}return _v=r,_v}var Ev,PC;function Cr(){if(PC)return Ev;PC=1;var e;if(typeof ix=="function")try{e={clone:sU(),constant:px(),each:FD(),filter:ZD(),has:JD(),isArray:yt(),isEmpty:TU(),isFunction:za(),isUndefined:QD(),keys:Wn(),map:tj(),reduce:rj(),size:BU(),transform:FU(),union:QU(),values:sj()}}catch{}return e||(e=window._),Ev=e,Ev}var Sv,NC;function xx(){if(NC)return Sv;NC=1;var e=Cr();Sv=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 Sv}var Ov,TC;function tV(){return TC||(TC=1,Ov="2.1.8"),Ov}var Cv,AC;function rV(){return AC||(AC=1,Cv={Graph:xx(),version:tV()}),Cv}var Rv,MC;function nV(){if(MC)return Rv;MC=1;var e=Cr(),t=xx();Rv={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 Rv}var Iv,DC;function iV(){if(DC)return Iv;DC=1;var e=Cr();Iv=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 Iv}var Pv,jC;function uj(){if(jC)return Pv;jC=1;var e=Cr();Pv=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(r){return r.key})},t.prototype.has=function(r){return e.has(this._keyIndices,r)},t.prototype.priority=function(r){var n=this._keyIndices[r];if(n!==void 0)return this._arr[n].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(r,n){var i=this._keyIndices;if(r=String(r),!e.has(i,r)){var o=this._arr,a=o.length;return i[r]=a,o.push({key:r,priority:n}),this._decrease(a),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},t.prototype.decrease=function(r,n){var i=this._keyIndices[r];if(n>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[i].priority+" New: "+n);this._arr[i].priority=n,this._decrease(i)},t.prototype._heapify=function(r){var n=this._arr,i=2*r,o=i+1,a=r;i<n.length&&(a=n[i].priority<n[a].priority?i:a,o<n.length&&(a=n[o].priority<n[a].priority?o:a),a!==r&&(this._swap(r,a),this._heapify(a)))},t.prototype._decrease=function(r){for(var n=this._arr,i=n[r].priority,o;r!==0&&(o=r>>1,!(n[o].priority<i));)this._swap(r,o),r=o},t.prototype._swap=function(r,n){var i=this._arr,o=this._keyIndices,a=i[r],u=i[n];i[r]=u,i[n]=a,o[u.key]=r,o[a.key]=n},Pv}var Nv,qC;function cj(){if(qC)return Nv;qC=1;var e=Cr(),t=uj();Nv=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 Nv}var Tv,kC;function oV(){if(kC)return Tv;kC=1;var e=cj(),t=Cr();Tv=r;function r(n,i,o){return t.transform(n.nodes(),function(a,u){a[u]=e(n,u,i,o)},{})}return Tv}var Av,LC;function lj(){if(LC)return Av;LC=1;var e=Cr();Av=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 Av}var Mv,BC;function aV(){if(BC)return Mv;BC=1;var e=Cr(),t=lj();Mv=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 Mv}var Dv,FC;function sV(){if(FC)return Dv;FC=1;var e=Cr();Dv=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 Dv}var jv,$C;function fj(){if($C)return jv;$C=1;var e=Cr();jv=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,jv}var qv,zC;function uV(){if(zC)return qv;zC=1;var e=fj();qv=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return qv}var kv,HC;function dj(){if(HC)return kv;HC=1;var e=Cr();kv=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 kv}var Lv,UC;function cV(){if(UC)return Lv;UC=1;var e=dj();Lv=t;function t(r,n){return e(r,n,"post")}return Lv}var Bv,VC;function lV(){if(VC)return Bv;VC=1;var e=dj();Bv=t;function t(r,n){return e(r,n,"pre")}return Bv}var Fv,WC;function fV(){if(WC)return Fv;WC=1;var e=Cr(),t=xx(),r=uj();Fv=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 Fv}var $v,GC;function dV(){return GC||(GC=1,$v={components:iV(),dijkstra:cj(),dijkstraAll:oV(),findCycles:aV(),floydWarshall:sV(),isAcyclic:uV(),postorder:cV(),preorder:lV(),prim:fV(),tarjan:lj(),topsort:fj()}),$v}var zv,KC;function hV(){if(KC)return zv;KC=1;var e=rV();return zv={Graph:e.Graph,json:nV(),alg:dV(),version:e.version},zv}var Hv,YC;function kr(){if(YC)return Hv;YC=1;var e;if(typeof ix=="function")try{e=hV()}catch{}return e||(e=window.graphlib),Hv=e,Hv}var Uv,XC;function pV(){if(XC)return Uv;XC=1;var e=kD(),t=1,r=4;function n(i){return e(i,t|r)}return Uv=n,Uv}var Vv,ZC;function Lc(){if(ZC)return Vv;ZC=1;var e=bo(),t=En(),r=Pc(),n=Or();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 Vv=i,Vv}var Wv,JC;function vV(){if(JC)return Wv;JC=1;var e=kc(),t=bo(),r=Lc(),n=Ei(),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 Wv=a,Wv}var Gv,QC;function gV(){if(QC)return Gv;QC=1;var e=Sn(),t=En(),r=Wn();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 Gv=n,Gv}var Kv,eR;function mV(){if(eR)return Kv;eR=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Kv=t,Kv}var Yv,tR;function yV(){if(tR)return Yv;tR=1;var e=mV(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Yv=r,Yv}var Xv,rR;function bV(){if(rR)return Xv;rR=1;var e=yV(),t=Or(),r=Eo(),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 Xv=c,Xv}var Zv,nR;function hj(){if(nR)return Zv;nR=1;var e=bV(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*r}return i===i?i:0}return Zv=n,Zv}var Jv,iR;function xV(){if(iR)return Jv;iR=1;var e=hj();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return Jv=t,Jv}var Qv,oR;function wV(){if(oR)return Qv;oR=1;var e=oj(),t=Sn(),r=xV(),n=Math.max;function i(o,a,u){var c=o==null?0:o.length;if(!c)return-1;var d=u==null?0:r(u);return d<0&&(d=n(c+d,0)),e(o,t(a,3),d)}return Qv=i,Qv}var eg,aR;function _V(){if(aR)return eg;aR=1;var e=gV(),t=wV(),r=e(t);return eg=r,eg}var tg,sR;function pj(){if(sR)return tg;sR=1;var e=bx();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return tg=t,tg}var rg,uR;function EV(){if(uR)return rg;uR=1;var e=vx(),t=LD(),r=Ei();function n(i,o){return i==null?i:e(i,t(o),r)}return rg=n,rg}var ng,cR;function SV(){if(cR)return ng;cR=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return ng=e,ng}var ig,lR;function OV(){if(lR)return ig;lR=1;var e=Rc(),t=gx(),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 ig=n,ig}var og,fR;function wx(){if(fR)return og;fR=1;var e=Eo();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 og=t,og}var ag,dR;function CV(){if(dR)return ag;dR=1;function e(t,r){return t>r}return ag=e,ag}var sg,hR;function RV(){if(hR)return sg;hR=1;var e=wx(),t=CV(),r=Si();function n(i){return i&&i.length?e(i,r,t):void 0}return sg=n,sg}var ug,pR;function vj(){if(pR)return ug;pR=1;var e=Rc(),t=bo();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return ug=r,ug}var cg,vR;function IV(){if(vR)return cg;vR=1;var e=wi(),t=Ac(),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 cg=d,cg}var lg,gR;function gj(){if(gR)return lg;gR=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return lg=e,lg}var fg,mR;function PV(){if(mR)return fg;mR=1;var e=Ha(),t=Ei();function r(n){return e(n,t(n))}return fg=r,fg}var dg,yR;function NV(){if(yR)return dg;yR=1;var e=vj(),t=OD(),r=DD(),n=CD(),i=qD(),o=Ua(),a=yt(),u=aj(),c=wo(),d=za(),f=Or(),h=IV(),p=Va(),v=gj(),m=PV();function y(x,b,w,S,E,_,R){var I=v(x,w),N=v(b,w),D=R.get(N);if(D){e(x,w,D);return}var L=_?_(I,N,w+"",x,b,R):void 0,B=L===void 0;if(B){var U=a(N),j=!U&&c(N),T=!U&&!j&&p(N);L=N,U||j||T?a(I)?L=I:u(I)?L=n(I):j?(B=!1,L=t(N,!0)):T?(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),E(L,N,S,_,R),R.delete(N)),e(x,w,L)}return dg=y,dg}var hg,bR;function TV(){if(bR)return hg;bR=1;var e=Cc(),t=vj(),r=vx(),n=NV(),i=Or(),o=Ei(),a=gj();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 hg=u,hg}var pg,xR;function AV(){if(xR)return pg;xR=1;var e=kc(),t=Lc();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 pg=r,pg}var vg,wR;function MV(){if(wR)return vg;wR=1;var e=TV(),t=AV(),r=t(function(n,i,o){e(n,i,o)});return vg=r,vg}var gg,_R;function mj(){if(_R)return gg;_R=1;function e(t,r){return t<r}return gg=e,gg}var mg,ER;function DV(){if(ER)return mg;ER=1;var e=wx(),t=mj(),r=Si();function n(i){return i&&i.length?e(i,r,t):void 0}return mg=n,mg}var yg,SR;function jV(){if(SR)return yg;SR=1;var e=wx(),t=Sn(),r=mj();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return yg=n,yg}var bg,OR;function qV(){if(OR)return bg;OR=1;var e=Fr(),t=function(){return e.Date.now()};return bg=t,bg}var xg,CR;function kV(){if(CR)return xg;CR=1;var e=Ic(),t=jc(),r=Pc(),n=Or(),i=Wa();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 xg=o,xg}var wg,RR;function LV(){if(RR)return wg;RR=1;var e=qc(),t=kV(),r=jc();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 wg=n,wg}var _g,IR;function BV(){if(IR)return _g;IR=1;var e=LV(),t=YD();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return _g=r,_g}var Eg,PR;function FV(){if(PR)return Eg;PR=1;var e=pj(),t=nj(),r=ij();function n(i){return r(t(i,void 0,e),i+"")}return Eg=n,Eg}var Sg,NR;function $V(){if(NR)return Sg;NR=1;var e=BV(),t=FV(),r=t(function(n,i){return n==null?{}:e(n,i)});return Sg=r,Sg}var Og,TR;function zV(){if(TR)return Og;TR=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 Og=r,Og}var Cg,AR;function HV(){if(AR)return Cg;AR=1;var e=zV(),t=Lc(),r=hj();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 Cg=n,Cg}var Rg,MR;function UV(){if(MR)return Rg;MR=1;var e=HV(),t=e();return Rg=t,Rg}var Ig,DR;function VV(){if(DR)return Ig;DR=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Ig=e,Ig}var Pg,jR;function WV(){if(jR)return Pg;jR=1;var e=Eo();function t(r,n){if(r!==n){var i=r!==void 0,o=r===null,a=r===r,u=e(r),c=n!==void 0,d=n===null,f=n===n,h=e(n);if(!d&&!h&&!u&&r>n||u&&c&&f&&!d&&!h||o&&c&&f||!i&&f||!a)return 1;if(!o&&!u&&!h&&r<n||h&&i&&a&&!o&&!u||d&&i&&a||!c&&a||!f)return-1}return 0}return Pg=t,Pg}var Ng,qR;function GV(){if(qR)return Ng;qR=1;var e=WV();function t(r,n,i){for(var o=-1,a=r.criteria,u=n.criteria,c=a.length,d=i.length;++o<c;){var f=e(a[o],u[o]);if(f){if(o>=d)return f;var h=i[o];return f*(h=="desc"?-1:1)}}return r.index-n.index}return Ng=t,Ng}var Tg,kR;function KV(){if(kR)return Tg;kR=1;var e=Dc(),t=qc(),r=Sn(),n=ej(),i=VV(),o=Nc(),a=GV(),u=Si(),c=yt();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(S){return S(y)});return{criteria:w,index:++v,value:y}});return i(m,function(y,x){return a(y,x,p)})}return Tg=d,Tg}var Ag,LR;function YV(){if(LR)return Ag;LR=1;var e=bx(),t=KV(),r=kc(),n=Lc(),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 Ag=i,Ag}var Mg,BR;function XV(){if(BR)return Mg;BR=1;var e=GD(),t=0;function r(n){var i=++t;return e(n)+i}return Mg=r,Mg}var Dg,FR;function ZV(){if(FR)return Dg;FR=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 Dg=e,Dg}var jg,$R;function JV(){if($R)return jg;$R=1;var e=Ic(),t=ZV();function r(n,i){return t(n||[],i||[],e)}return jg=r,jg}var qg,zR;function lt(){if(zR)return qg;zR=1;var e;if(typeof ix=="function")try{e={cloneDeep:pV(),constant:px(),defaults:vV(),each:FD(),filter:ZD(),find:_V(),flatten:pj(),forEach:BD(),forIn:EV(),has:JD(),isUndefined:QD(),last:SV(),map:tj(),mapValues:OV(),max:RV(),merge:MV(),min:DV(),minBy:jV(),now:qV(),pick:$V(),range:UV(),reduce:rj(),sortBy:YV(),uniqueId:XV(),values:sj(),zipObject:JV()}}catch{}return e||(e=window._),qg=e,qg}var kg,HR;function QV(){if(HR)return kg;HR=1,kg=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 kg}var Lg,UR;function eW(){if(UR)return Lg;UR=1;var e=lt(),t=kr().Graph,r=QV();Lg=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),S=b+w;h.setEdge(x.v,x.w,S),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 Lg}var Bg,VR;function tW(){if(VR)return Bg;VR=1;var e=lt(),t=eW();Bg={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 Bg}var Fg,WR;function Yt(){if(WR)return Fg;WR=1;var e=lt(),t=kr().Graph;Fg={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,S){var E;do E=e.uniqueId(S);while(x.hasNode(E));return w.dummy=b,x.setNode(E,w),E}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 S=b.edge(w.v,w.w)||{weight:0,minlen:1},E=x.edge(w);b.setEdge(w.v,w.w,{weight:S.weight+E.weight,minlen:Math.max(S.minlen,E.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 S={};return e.forEach(x.outEdges(w),function(E){S[E.w]=(S[E.w]||0)+x.edge(E).weight}),S});return e.zipObject(x.nodes(),b)}function a(x){var b=e.map(x.nodes(),function(w){var S={};return e.forEach(x.inEdges(w),function(E){S[E.v]=(S[E.v]||0)+x.edge(E).weight}),S});return e.zipObject(x.nodes(),b)}function u(x,b){var w=x.x,S=x.y,E=b.x-w,_=b.y-S,R=x.width/2,I=x.height/2;if(!E&&!_)throw new Error("Not possible to find intersection inside of the rectangle");var N,D;return Math.abs(_)*R>Math.abs(E)*I?(_<0&&(I=-I),N=I*E/_,D=I):(E<0&&(R=-R),N=R,D=R*_/E),{x:w+N,y:S+D}}function c(x){var b=e.map(e.range(p(x)+1),function(){return[]});return e.forEach(x.nodes(),function(w){var S=x.node(w),E=S.rank;e.isUndefined(E)||(b[E][S.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 S=x.node(w);e.has(S,"rank")&&(S.rank-=b)})}function f(x){var b=e.min(e.map(x.nodes(),function(_){return x.node(_).rank})),w=[];e.forEach(x.nodes(),function(_){var R=x.node(_).rank-b;w[R]||(w[R]=[]),w[R].push(_)});var S=0,E=x.graph().nodeRankFactor;e.forEach(w,function(_,R){e.isUndefined(_)&&R%E!==0?--S:S&&e.forEach(_,function(I){x.node(I).rank+=S})})}function h(x,b,w,S){var E={width:0,height:0};return arguments.length>=4&&(E.rank=w,E.order=S),r(x,"border",E,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(S){b(S)?w.lhs.push(S):w.rhs.push(S)}),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 Fg}var $g,GR;function rW(){if(GR)return $g;GR=1;var e=lt(),t=Yt();$g={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 $g}var zg,KR;function Uu(){if(KR)return zg;KR=1;var e=lt();zg={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 zg}var Hg,YR;function yj(){if(YR)return Hg;YR=1;var e=lt(),t=kr().Graph,r=Uu().slack;Hg=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 Hg}var Ug,XR;function nW(){if(XR)return Ug;XR=1;var e=lt(),t=yj(),r=Uu().slack,n=Uu().longestPath,i=kr().alg.preorder,o=kr().alg.postorder,a=Yt().simplify;Ug=u,u.initLowLimValues=h,u.initCutValues=c,u.calcCutValue=f,u.leaveEdge=v,u.enterEdge=m,u.exchangeEdges=y;function u(S){S=a(S),n(S);var E=t(S);h(E),c(E,S);for(var _,R;_=v(E);)R=m(E,S,_),y(E,S,_,R)}function c(S,E){var _=o(S,S.nodes());_=_.slice(0,_.length-1),e.forEach(_,function(R){d(S,E,R)})}function d(S,E,_){var R=S.node(_),I=R.parent;S.edge(_,I).cutvalue=f(S,E,_)}function f(S,E,_){var R=S.node(_),I=R.parent,N=!0,D=E.edge(_,I),L=0;return D||(N=!1,D=E.edge(I,_)),L=D.weight,e.forEach(E.nodeEdges(_),function(B){var U=B.v===_,j=U?B.w:B.v;if(j!==I){var T=U===N,G=E.edge(B).weight;if(L+=T?G:-G,b(S,_,j)){var z=S.edge(_,j).cutvalue;L+=T?-z:z}}}),L}function h(S,E){arguments.length<2&&(E=S.nodes()[0]),p(S,{},1,E)}function p(S,E,_,R,I){var N=_,D=S.node(R);return E[R]=!0,e.forEach(S.neighbors(R),function(L){e.has(E,L)||(_=p(S,E,_,L,R))}),D.low=N,D.lim=_++,I?D.parent=I:delete D.parent,_}function v(S){return e.find(S.edges(),function(E){return S.edge(E).cutvalue<0})}function m(S,E,_){var R=_.v,I=_.w;E.hasEdge(R,I)||(R=_.w,I=_.v);var N=S.node(R),D=S.node(I),L=N,B=!1;N.lim>D.lim&&(L=D,B=!0);var U=e.filter(E.edges(),function(j){return B===w(S,S.node(j.v),L)&&B!==w(S,S.node(j.w),L)});return e.minBy(U,function(j){return r(E,j)})}function y(S,E,_,R){var I=_.v,N=_.w;S.removeEdge(I,N),S.setEdge(R.v,R.w,{}),h(S),c(S,E),x(S,E)}function x(S,E){var _=e.find(S.nodes(),function(I){return!E.node(I).parent}),R=i(S,_);R=R.slice(1),e.forEach(R,function(I){var N=S.node(I).parent,D=E.edge(I,N),L=!1;D||(D=E.edge(N,I),L=!0),E.node(I).rank=E.node(N).rank+(L?D.minlen:-D.minlen)})}function b(S,E,_){return S.hasEdge(E,_)}function w(S,E,_){return _.low<=E.lim&&E.lim<=_.lim}return Ug}var Vg,ZR;function iW(){if(ZR)return Vg;ZR=1;var e=Uu(),t=e.longestPath,r=yj(),n=nW();Vg=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 Vg}var Wg,JR;function oW(){if(JR)return Wg;JR=1;var e=lt();Wg=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 Wg}var Gg,QR;function aW(){if(QR)return Gg;QR=1;var e=lt(),t=Yt();Gg={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 S=u.node(w),E=S.borderTop?S.borderTop:w,_=S.borderBottom?S.borderBottom:w,R=S.borderTop?f:2*f,I=E!==_?1:h-p[v]+1;u.setEdge(y,E,{weight:R,minlen:I,nestingEdge:!0}),u.setEdge(_,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 Gg}var Kg,eI;function sW(){if(eI)return Kg;eI=1;var e=lt(),t=Yt();Kg=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 Kg}var Yg,tI;function uW(){if(tI)return Yg;tI=1;var e=lt();Yg={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 Yg}var Xg,rI;function cW(){if(rI)return Xg;rI=1;var e=lt();Xg=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 Xg}var Zg,nI;function lW(){if(nI)return Zg;nI=1;var e=lt();Zg=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 Zg}var Jg,iI;function fW(){if(iI)return Jg;iI=1;var e=lt();Jg=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 Jg}var Qg,oI;function dW(){if(oI)return Qg;oI=1;var e=lt();Qg=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 Qg}var em,aI;function hW(){if(aI)return em;aI=1;var e=lt(),t=Yt();em=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 em}var tm,sI;function pW(){if(sI)return tm;sI=1;var e=lt(),t=fW(),r=dW(),n=hW();tm=i;function i(u,c,d,f){var h=u.children(c),p=u.node(c),v=p?p.borderLeft:void 0,m=p?p.borderRight:void 0,y={};v&&(h=e.filter(h,function(_){return _!==v&&_!==m}));var x=t(u,h);e.forEach(x,function(_){if(u.children(_.v).length){var R=i(u,_.v,d,f);y[_.v]=R,e.has(R,"barycenter")&&a(_,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 S=u.node(u.predecessors(v)[0]),E=u.node(u.predecessors(m)[0]);e.has(w,"barycenter")||(w.barycenter=0,w.weight=0),w.barycenter=(w.barycenter*w.weight+S.order+E.order)/(w.weight+2),w.weight+=2}return w}function o(u,c){e.forEach(u,function(d){d.vs=e.flatten(d.vs.map(function(f){return c[f]?c[f].vs:f}),!0)})}function a(u,c){e.isUndefined(u.barycenter)?(u.barycenter=c.barycenter,u.weight=c.weight):(u.barycenter=(u.barycenter*u.weight+c.barycenter*c.weight)/(u.weight+c.weight),u.weight+=c.weight)}return tm}var rm,uI;function vW(){if(uI)return rm;uI=1;var e=lt(),t=kr().Graph;rm=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 rm}var nm,cI;function gW(){if(cI)return nm;cI=1;var e=lt();nm=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 nm}var im,lI;function mW(){if(lI)return im;lI=1;var e=lt(),t=cW(),r=lW(),n=pW(),i=vW(),o=gW(),a=kr().Graph,u=Yt();im=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,S=0,E=0;E<4;++S,++E){f(S%2?m:y,S%4>=2),x=u.buildLayerMatrix(p);var _=r(p,x);_<b&&(E=0,w=e.cloneDeep(x),b=_)}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,S){y.node(w).order=S}),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 im}var om,fI;function yW(){if(fI)return om;fI=1;var e=lt(),t=kr().Graph,r=Yt();om={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 S={};function E(_,R){var I=0,N=0,D=_.length,L=e.last(R);return e.forEach(R,function(B,U){var j=o(b,B),T=j?b.node(j).order:D;(j||B===L)&&(e.forEach(R.slice(N,U+1),function(G){e.forEach(b.predecessors(G),function(z){var X=b.node(z),Z=X.order;(Z<I||T<Z)&&!(X.dummy&&b.node(G).dummy)&&a(S,z,G)})}),N=U+1,I=T)}),R}return e.reduce(w,E),S}function i(b,w){var S={};function E(R,I,N,D,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 T=b.node(j);T.dummy&&(T.order<D||T.order>L)&&a(S,j,B)})})}function _(R,I){var N=-1,D,L=0;return e.forEach(I,function(B,U){if(b.node(B).dummy==="border"){var j=b.predecessors(B);j.length&&(D=b.node(j[0]).order,E(I,L,U,N,D),L=U,N=D)}E(I,L,I.length,D,R.length)}),I}return e.reduce(w,_),S}function o(b,w){if(b.node(w).dummy)return e.find(b.predecessors(w),function(S){return b.node(S).dummy})}function a(b,w,S){if(w>S){var E=w;w=S,S=E}var _=b[w];_||(b[w]=_={}),_[S]=!0}function u(b,w,S){if(w>S){var E=w;w=S,S=E}return e.has(b[w],S)}function c(b,w,S,E){var _={},R={},I={};return e.forEach(w,function(N){e.forEach(N,function(D,L){_[D]=D,R[D]=D,I[D]=L})}),e.forEach(w,function(N){var D=-1;e.forEach(N,function(L){var B=E(L);if(B.length){B=e.sortBy(B,function(z){return I[z]});for(var U=(B.length-1)/2,j=Math.floor(U),T=Math.ceil(U);j<=T;++j){var G=B[j];R[L]===L&&D<I[G]&&!u(S,L,G)&&(R[G]=L,R[L]=_[L]=_[G],D=I[G])}}})}),{root:_,align:R}}function d(b,w,S,E,_){var R={},I=f(b,w,S,_),N=_?"borderLeft":"borderRight";function D(U,j){for(var T=I.nodes(),G=T.pop(),z={};G;)z[G]?U(G):(z[G]=!0,T.push(G),T=T.concat(j(G))),G=T.pop()}function L(U){R[U]=I.inEdges(U).reduce(function(j,T){return Math.max(j,R[T.v]+I.edge(T))},0)}function B(U){var j=I.outEdges(U).reduce(function(G,z){return Math.min(G,R[z.w]-I.edge(z))},Number.POSITIVE_INFINITY),T=b.node(U);j!==Number.POSITIVE_INFINITY&&T.borderType!==N&&(R[U]=Math.max(R[U],j))}return D(L,I.predecessors.bind(I)),D(B,I.successors.bind(I)),e.forEach(E,function(U){R[U]=R[S[U]]}),R}function f(b,w,S,E){var _=new t,R=b.graph(),I=y(R.nodesep,R.edgesep,E);return e.forEach(w,function(N){var D;e.forEach(N,function(L){var B=S[L];if(_.setNode(B),D){var U=S[D],j=_.edge(U,B);_.setEdge(U,B,Math.max(I(b,L,D),j||0))}D=L})}),_}function h(b,w){return e.minBy(e.values(w),function(S){var E=Number.NEGATIVE_INFINITY,_=Number.POSITIVE_INFINITY;return e.forIn(S,function(R,I){var N=x(b,I)/2;E=Math.max(R+N,E),_=Math.min(R-N,_)}),E-_})}function p(b,w){var S=e.values(w),E=e.min(S),_=e.max(S);e.forEach(["u","d"],function(R){e.forEach(["l","r"],function(I){var N=R+I,D=b[N],L;if(D!==w){var B=e.values(D);L=I==="l"?E-e.min(B):_-e.max(B),L&&(b[N]=e.mapValues(D,function(U){return U+L}))}})})}function v(b,w){return e.mapValues(b.ul,function(S,E){if(w)return b[w.toLowerCase()][E];var _=e.sortBy(e.map(b,E));return(_[1]+_[2])/2})}function m(b){var w=r.buildLayerMatrix(b),S=e.merge(n(b,w),i(b,w)),E={},_;e.forEach(["u","d"],function(I){_=I==="u"?w:e.values(w).reverse(),e.forEach(["l","r"],function(N){N==="r"&&(_=e.map(_,function(U){return e.values(U).reverse()}));var D=(I==="u"?b.predecessors:b.successors).bind(b),L=c(b,_,S,D),B=d(b,_,L.root,L.align,N==="r");N==="r"&&(B=e.mapValues(B,function(U){return-U})),E[I+N]=B})});var R=h(b,E);return p(E,R),v(E,b.graph().align)}function y(b,w,S){return function(E,_,R){var I=E.node(_),N=E.node(R),D=0,L;if(D+=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&&(D+=S?L:-L),L=0,D+=(I.dummy?w:b)/2,D+=(N.dummy?w:b)/2,D+=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&&(D+=S?L:-L),L=0,D}}function x(b,w){return b.node(w).width}return om}var am,dI;function bW(){if(dI)return am;dI=1;var e=lt(),t=Yt(),r=yW().positionX;am=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 am}var sm,hI;function xW(){if(hI)return sm;hI=1;var e=lt(),t=tW(),r=rW(),n=iW(),i=Yt().normalizeRanks,o=oW(),a=Yt().removeEmptyRanks,u=aW(),c=sW(),d=uW(),f=mW(),h=bW(),p=Yt(),v=kr().Graph;sm=m;function m(H,K){var $=K&&K.debugTiming?p.time:p.notime;$("layout",function(){var k=$(" buildLayoutGraph",function(){return D(H)});$(" runLayout",function(){y(k,$)}),$(" updateInputGraph",function(){x(H,k)})})}function y(H,K){K(" makeSpaceForEdgeLabels",function(){L(H)}),K(" removeSelfEdges",function(){re(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(){W(H)}),K(" adjustCoordinateSystem",function(){d.adjust(H)}),K(" position",function(){h(H)}),K(" positionSelfEdges",function(){Q(H)}),K(" removeBorderNodes",function(){Z(H)}),K(" normalize.undo",function(){r.undo(H)}),K(" fixupEdgeLabelCoords",function(){z(H)}),K(" undoCoordinateSystem",function(){d.undo(H)}),K(" translateGraph",function(){T(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($),F=K.node($);k&&(k.x=F.x,k.y=F.y,K.children($).length&&(k.width=F.width,k.height=F.height))}),e.forEach(H.edges(),function($){var k=H.edge($),F=K.edge($);k.points=F.points,e.has(F,"x")&&(k.x=F.x,k.y=F.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"},S=["acyclicer","ranker","rankdir","align"],E=["width","height"],_={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 D(H){var K=new v({multigraph:!0,compound:!0}),$=oe(H.graph());return K.setGraph(e.merge({},w,ue($,b),e.pick($,S))),e.forEach(H.nodes(),function(k){var F=oe(H.node(k));K.setNode(k,e.defaults(ue(F,E),_)),K.setParent(k,H.parent(k))}),e.forEach(H.edges(),function(k){var F=oe(H.edge(k));K.setEdge(k,e.merge({},I,ue(F,R),e.pick(F,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),F=H.node(K.w),te={rank:(F.rank-k.rank)/2+k.rank,e:K};p.addDummyNode(H,"edge-proxy",te,"_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 T(H){var K=Number.POSITIVE_INFINITY,$=0,k=Number.POSITIVE_INFINITY,F=0,te=H.graph(),ie=te.marginx||0,ae=te.marginy||0;function ce(we){var Se=we.x,_e=we.y,he=we.width,le=we.height;K=Math.min(K,Se-he/2),$=Math.max($,Se+he/2),k=Math.min(k,_e-le/2),F=Math.max(F,_e+le/2)}e.forEach(H.nodes(),function(we){ce(H.node(we))}),e.forEach(H.edges(),function(we){var Se=H.edge(we);e.has(Se,"x")&&ce(Se)}),K-=ie,k-=ae,e.forEach(H.nodes(),function(we){var Se=H.node(we);Se.x-=K,Se.y-=k}),e.forEach(H.edges(),function(we){var Se=H.edge(we);e.forEach(Se.points,function(_e){_e.x-=K,_e.y-=k}),e.has(Se,"x")&&(Se.x-=K),e.has(Se,"y")&&(Se.y-=k)}),te.width=$-K+ie,te.height=F-k+ae}function G(H){e.forEach(H.edges(),function(K){var $=H.edge(K),k=H.node(K.v),F=H.node(K.w),te,ie;$.points?(te=$.points[0],ie=$.points[$.points.length-1]):($.points=[],te=F,ie=k),$.points.unshift(p.intersectRect(k,te)),$.points.push(p.intersectRect(F,ie))})}function z(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),F=H.node($.borderBottom),te=H.node(e.last($.borderLeft)),ie=H.node(e.last($.borderRight));$.width=Math.abs(ie.x-te.x),$.height=Math.abs(F.y-k.y),$.x=te.x+$.width/2,$.y=k.y+$.height/2}}),e.forEach(H.nodes(),function(K){H.node(K).dummy==="border"&&H.removeNode(K)})}function re(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 W(H){var K=p.buildLayerMatrix(H);e.forEach(K,function($){var k=0;e.forEach($,function(F,te){var ie=H.node(F);ie.order=te+k,e.forEach(ie.selfEdges,function(ae){p.addDummyNode(H,"selfedge",{width:ae.label.width,height:ae.label.height,rank:ie.rank,order:te+ ++k,e:ae.e,label:ae.label},"_se")}),delete ie.selfEdges})})}function Q(H){e.forEach(H.nodes(),function(K){var $=H.node(K);if($.dummy==="selfedge"){var k=H.node($.e.v),F=k.x+k.width/2,te=k.y,ie=$.x-F,ae=k.height/2;H.setEdge($.e,$.label),H.removeNode(K),$.label.points=[{x:F+2*ie/3,y:te-ae},{x:F+5*ie/6,y:te-ae},{x:F+ie,y:te},{x:F+5*ie/6,y:te+ae},{x:F+2*ie/3,y:te+ae}],$.label.x=$.x,$.label.y=$.y}})}function ue(H,K){return e.mapValues(e.pick(H,K),Number)}function oe(H){var K={};return e.forEach(H,function($,k){K[k.toLowerCase()]=$}),K}return sm}var um,pI;function wW(){if(pI)return um;pI=1;var e=lt(),t=Yt(),r=kr().Graph;um={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 um}var cm,vI;function _W(){return vI||(vI=1,cm="0.8.5"),cm}var lm,gI;function EW(){return gI||(gI=1,lm={graphlib:kr(),layout:xW(),debug:wW(),util:{time:Yt().time,notime:Yt().notime},version:_W()}),lm}var SW=EW();const mI=Un(SW);function OW(e){let t;const r=new Set,n=(d,f)=>{const h=typeof d=="function"?d(t):d;if(h!==t){const p=t;t=f?h:Object.assign({},t,h),r.forEach(v=>v(t,p))}},i=()=>t,o=(d,f=i,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=f(t);function v(){const m=f(t);if(!h(p,m)){const y=p;d(p=m,y)}}return r.add(v),()=>r.delete(v)},c={setState:n,getState:i,subscribe:(d,f,h)=>f||h?o(d,f,h):(r.add(d),()=>r.delete(d)),destroy:()=>r.clear()};return t=e(n,i,c),c}const CW=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),yI=CW?A.useEffect:A.useLayoutEffect;function RW(e){const t=typeof e=="function"?OW(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=A.useReducer(x=>x+1,0),a=t.getState(),u=A.useRef(a),c=A.useRef(n),d=A.useRef(i),f=A.useRef(!1),h=A.useRef();h.current===void 0&&(h.current=n(a));let p,v=!1;(u.current!==a||c.current!==n||d.current!==i||f.current)&&(p=n(a),v=!i(h.current,p)),yI(()=>{v&&(h.current=p),u.current=a,c.current=n,d.current=i,f.current=!1});const m=A.useRef(a);yI(()=>{const x=()=>{try{const w=t.getState(),S=c.current(w);d.current(h.current,S)||(u.current=w,h.current=S,o())}catch{f.current=!0,o()}},b=t.subscribe(x);return t.getState()!==m.current&&x(),b},[]);const y=v?p:h.current;return A.useDebugValue(y),y};return Object.assign(r,t),r[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[r,t];return{next(){const i=n.length<=0;return{value:n.shift(),done:i}}}},r}function IW(){const e=A.createContext(void 0);return{Provider:({initialStore:i,createStore:o,children:a})=>{const u=A.useRef();return u.current||(i&&(console.warn("Provider initialStore is deprecated and will be removed in the next version."),o||(o=()=>i)),u.current=o()),A.createElement(e.Provider,{value:u.current},a)},useStore:(i,o=Object.is)=>{const a=A.useContext(e);if(!a)throw new Error("Seems like you have not used zustand provider as an ancestor.");return a(i,o)},useStoreApi:()=>{const i=A.useContext(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return A.useMemo(()=>({getState:i.getState,setState:i.setState,subscribe:i.subscribe,destroy:i.destroy}),[i])}}}var PW={value:()=>{}};function Bc(){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 Du(r)}function Du(e){this._=e}function NW(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Du.prototype=Bc.prototype={constructor:Du,on:function(e,t){var r=this._,n=NW(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=TW(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=bI(r[i],e.name,t);else if(t==null)for(i in r)r[i]=bI(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 Du(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};function TW(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function bI(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=PW,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ob="http://www.w3.org/1999/xhtml";const xI={svg:"http://www.w3.org/2000/svg",xhtml:Ob,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Fc(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),xI.hasOwnProperty(t)?{space:xI[t],local:e}:e}function AW(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ob&&t.documentElement.namespaceURI===Ob?t.createElement(e):t.createElementNS(r,e)}}function MW(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function bj(e){var t=Fc(e);return(t.local?MW:AW)(t)}function DW(){}function _x(e){return e==null?DW:function(){return this.querySelector(e)}}function jW(e){typeof e!="function"&&(e=_x(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 ur(n,this._parents)}function qW(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function kW(){return[]}function xj(e){return e==null?kW:function(){return this.querySelectorAll(e)}}function LW(e){return function(){return qW(e.apply(this,arguments))}}function BW(e){typeof e=="function"?e=LW(e):e=xj(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 ur(n,i)}function wj(e){return function(){return this.matches(e)}}function _j(e){return function(t){return t.matches(e)}}var FW=Array.prototype.find;function $W(e){return function(){return FW.call(this.children,e)}}function zW(){return this.firstElementChild}function HW(e){return this.select(e==null?zW:$W(typeof e=="function"?e:_j(e)))}var UW=Array.prototype.filter;function VW(){return Array.from(this.children)}function WW(e){return function(){return UW.call(this.children,e)}}function GW(e){return this.selectAll(e==null?VW:WW(typeof e=="function"?e:_j(e)))}function KW(e){typeof e!="function"&&(e=wj(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 ur(n,this._parents)}function Ej(e){return new Array(e.length)}function YW(){return new ur(this._enter||this._groups.map(Ej),this._parents)}function Vu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Vu.prototype={constructor:Vu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function XW(e){return function(){return e}}function ZW(e,t,r,n,i,o){for(var a=0,u,c=t.length,d=o.length;a<d;++a)(u=t[a])?(u.__data__=o[a],n[a]=u):r[a]=new Vu(e,o[a]);for(;a<c;++a)(u=t[a])&&(i[a]=u)}function JW(e,t,r,n,i,o,a){var u,c,d=new Map,f=t.length,h=o.length,p=new Array(f),v;for(u=0;u<f;++u)(c=t[u])&&(p[u]=v=a.call(c,c.__data__,u,t)+"",d.has(v)?i[u]=c:d.set(v,c));for(u=0;u<h;++u)v=a.call(e,o[u],u,o)+"",(c=d.get(v))?(n[u]=c,c.__data__=o[u],d.delete(v)):r[u]=new Vu(e,o[u]);for(u=0;u<f;++u)(c=t[u])&&d.get(p[u])===c&&(i[u]=c)}function QW(e){return e.__data__}function e6(e,t){if(!arguments.length)return Array.from(this,QW);var r=t?JW:ZW,n=this._parents,i=this._groups;typeof e!="function"&&(e=XW(e));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),d=0;d<o;++d){var f=n[d],h=i[d],p=h.length,v=t6(e.call(f,f&&f.__data__,d,n)),m=v.length,y=u[d]=new Array(m),x=a[d]=new Array(m),b=c[d]=new Array(p);r(f,h,y,x,b,v,t);for(var w=0,S=0,E,_;w<m;++w)if(E=y[w]){for(w>=S&&(S=w+1);!(_=x[S])&&++S<m;);E._next=_||null}}return a=new ur(a,n),a._enter=u,a._exit=c,a}function t6(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function r6(){return new ur(this._exit||this._groups.map(Ej),this._parents)}function n6(e,t,r){var n=this.enter(),i=this,o=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function i6(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,o=n.length,a=Math.min(i,o),u=new Array(i),c=0;c<a;++c)for(var d=r[c],f=n[c],h=d.length,p=u[c]=new Array(h),v,m=0;m<h;++m)(v=d[m]||f[m])&&(p[m]=v);for(;c<i;++c)u[c]=r[c];return new ur(u,this._parents)}function o6(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function a6(e){e||(e=s6);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],u=a.length,c=i[o]=new Array(u),d,f=0;f<u;++f)(d=a[f])&&(c[f]=d);c.sort(t)}return new ur(i,this._parents).order()}function s6(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function u6(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function c6(){return Array.from(this)}function l6(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}function f6(){let e=0;for(const t of this)++e;return e}function d6(){return!this.node()}function h6(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,u;o<a;++o)(u=i[o])&&e.call(u,u.__data__,o,i);return this}function p6(e){return function(){this.removeAttribute(e)}}function v6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function g6(e,t){return function(){this.setAttribute(e,t)}}function m6(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function y6(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function b6(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function x6(e,t){var r=Fc(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?v6:p6:typeof t=="function"?r.local?b6:y6:r.local?m6:g6)(r,t))}function Sj(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function w6(e){return function(){this.style.removeProperty(e)}}function _6(e,t,r){return function(){this.style.setProperty(e,t,r)}}function E6(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function S6(e,t,r){return arguments.length>1?this.each((t==null?w6:typeof t=="function"?E6:_6)(e,t,r??"")):vo(this.node(),e)}function vo(e,t){return e.style.getPropertyValue(t)||Sj(e).getComputedStyle(e,null).getPropertyValue(t)}function O6(e){return function(){delete this[e]}}function C6(e,t){return function(){this[e]=t}}function R6(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function I6(e,t){return arguments.length>1?this.each((t==null?O6:typeof t=="function"?R6:C6)(e,t)):this.node()[e]}function Oj(e){return e.trim().split(/^|\s+/)}function Ex(e){return e.classList||new Cj(e)}function Cj(e){this._node=e,this._names=Oj(e.getAttribute("class")||"")}Cj.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 Rj(e,t){for(var r=Ex(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Ij(e,t){for(var r=Ex(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function P6(e){return function(){Rj(this,e)}}function N6(e){return function(){Ij(this,e)}}function T6(e,t){return function(){(t.apply(this,arguments)?Rj:Ij)(this,e)}}function A6(e,t){var r=Oj(e+"");if(arguments.length<2){for(var n=Ex(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?T6:t?P6:N6)(r,t))}function M6(){this.textContent=""}function D6(e){return function(){this.textContent=e}}function j6(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function q6(e){return arguments.length?this.each(e==null?M6:(typeof e=="function"?j6:D6)(e)):this.node().textContent}function k6(){this.innerHTML=""}function L6(e){return function(){this.innerHTML=e}}function B6(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function F6(e){return arguments.length?this.each(e==null?k6:(typeof e=="function"?B6:L6)(e)):this.node().innerHTML}function $6(){this.nextSibling&&this.parentNode.appendChild(this)}function z6(){return this.each($6)}function H6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function U6(){return this.each(H6)}function V6(e){var t=typeof e=="function"?e:bj(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function W6(){return null}function G6(e,t){var r=typeof e=="function"?e:bj(e),n=t==null?W6:typeof t=="function"?t:_x(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function K6(){var e=this.parentNode;e&&e.removeChild(this)}function Y6(){return this.each(K6)}function X6(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Z6(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function J6(e){return this.select(e?Z6:X6)}function Q6(e){return arguments.length?this.property("__data__",e):this.node().__data__}function e8(e){return function(t){e.call(this,t,this.__data__)}}function t8(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function r8(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++n]=o;++n?t.length=n:delete this.__on}}}function n8(e,t,r){return function(){var n=this.__on,i,o=e8(t);if(n){for(var a=0,u=n.length;a<u;++a)if((i=n[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=r),i.value=t;return}}this.addEventListener(e.type,o,r),i={type:e.type,name:e.name,value:t,listener:o,options:r},n?n.push(i):this.__on=[i]}}function i8(e,t,r){var n=t8(e+""),i,o=n.length,a;if(arguments.length<2){var u=this.node().__on;if(u){for(var c=0,d=u.length,f;c<d;++c)for(i=0,f=u[c];i<o;++i)if((a=n[i]).type===f.type&&a.name===f.name)return f.value}return}for(u=t?n8:r8,i=0;i<o;++i)this.each(u(n[i],t,r));return this}function Pj(e,t,r){var n=Sj(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function o8(e,t){return function(){return Pj(this,e,t)}}function a8(e,t){return function(){return Pj(this,e,t.apply(this,arguments))}}function s8(e,t){return this.each((typeof t=="function"?a8:o8)(e,t))}function*u8(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length,a;i<o;++i)(a=n[i])&&(yield a)}var Nj=[null];function ur(e,t){this._groups=e,this._parents=t}function Ga(){return new ur([[document.documentElement]],Nj)}function c8(){return this}ur.prototype=Ga.prototype={constructor:ur,select:jW,selectAll:BW,selectChild:HW,selectChildren:GW,filter:KW,data:e6,enter:YW,exit:r6,join:n6,merge:i6,selection:c8,order:o6,sort:a6,call:u6,nodes:c6,node:l6,size:f6,empty:d6,each:h6,attr:x6,style:S6,property:I6,classed:A6,text:q6,html:F6,raise:z6,lower:U6,append:V6,insert:G6,remove:Y6,clone:J6,datum:Q6,on:i8,dispatch:s8,[Symbol.iterator]:u8};function Mr(e){return typeof e=="string"?new ur([[document.querySelector(e)]],[document.documentElement]):new ur([[e]],Nj)}function l8(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Xr(e,t){if(e=l8(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const f8={passive:!1},Aa={capture:!0,passive:!1};function fm(e){e.stopImmediatePropagation()}function ro(e){e.preventDefault(),e.stopImmediatePropagation()}function Tj(e){var t=e.document.documentElement,r=Mr(e).on("dragstart.drag",ro,Aa);"onselectstart"in t?r.on("selectstart.drag",ro,Aa):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Aj(e,t){var r=e.document.documentElement,n=Mr(e).on("dragstart.drag",null);t&&(n.on("click.drag",ro,Aa),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 cu=e=>()=>e;function Cb(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}})}Cb.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function d8(e){return!e.ctrlKey&&!e.button}function h8(){return this.parentNode}function p8(e,t){return t??{x:e.x,y:e.y}}function v8(){return navigator.maxTouchPoints||"ontouchstart"in this}function g8(){var e=d8,t=h8,r=p8,n=v8,i={},o=Bc("start","drag","end"),a=0,u,c,d,f,h=0;function p(E){E.on("mousedown.drag",v).filter(n).on("touchstart.drag",x).on("touchmove.drag",b,f8).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(E,_){if(!(f||!e.call(this,E,_))){var R=S(this,t.call(this,E,_),E,_,"mouse");R&&(Mr(E.view).on("mousemove.drag",m,Aa).on("mouseup.drag",y,Aa),Tj(E.view),fm(E),d=!1,u=E.clientX,c=E.clientY,R("start",E))}}function m(E){if(ro(E),!d){var _=E.clientX-u,R=E.clientY-c;d=_*_+R*R>h}i.mouse("drag",E)}function y(E){Mr(E.view).on("mousemove.drag mouseup.drag",null),Aj(E.view,d),ro(E),i.mouse("end",E)}function x(E,_){if(e.call(this,E,_)){var R=E.changedTouches,I=t.call(this,E,_),N=R.length,D,L;for(D=0;D<N;++D)(L=S(this,I,E,_,R[D].identifier,R[D]))&&(fm(E),L("start",E,R[D]))}}function b(E){var _=E.changedTouches,R=_.length,I,N;for(I=0;I<R;++I)(N=i[_[I].identifier])&&(ro(E),N("drag",E,_[I]))}function w(E){var _=E.changedTouches,R=_.length,I,N;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),I=0;I<R;++I)(N=i[_[I].identifier])&&(fm(E),N("end",E,_[I]))}function S(E,_,R,I,N,D){var L=o.copy(),B=Xr(D||R,_),U,j,T;if((T=r.call(E,new Cb("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=T.x-B[0]||0,j=T.y-B[1]||0,function G(z,X,Z){var re=B,W;switch(z){case"start":i[N]=G,W=a++;break;case"end":delete i[N],--a;case"drag":B=Xr(Z||X,_),W=a;break}L.call(z,E,new Cb(z,{sourceEvent:X,subject:T,target:p,identifier:N,active:W,x:B[0]+U,y:B[1]+j,dx:B[0]-re[0],dy:B[1]-re[1],dispatch:L}),I)}}return p.filter=function(E){return arguments.length?(e=typeof E=="function"?E:cu(!!E),p):e},p.container=function(E){return arguments.length?(t=typeof E=="function"?E:cu(E),p):t},p.subject=function(E){return arguments.length?(r=typeof E=="function"?E:cu(E),p):r},p.touchable=function(E){return arguments.length?(n=typeof E=="function"?E:cu(!!E),p):n},p.on=function(){var E=o.on.apply(o,arguments);return E===o?p:E},p.clickDistance=function(E){return arguments.length?(h=(E=+E)*E,p):Math.sqrt(h)},p}function Sx(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Mj(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ka(){}var Ma=.7,Wu=1/Ma,no="\\s*([+-]?\\d+)\\s*",Da="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",en="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",m8=/^#([0-9a-f]{3,8})$/,y8=new RegExp(`^rgb\\(${no},${no},${no}\\)$`),b8=new RegExp(`^rgb\\(${en},${en},${en}\\)$`),x8=new RegExp(`^rgba\\(${no},${no},${no},${Da}\\)$`),w8=new RegExp(`^rgba\\(${en},${en},${en},${Da}\\)$`),_8=new RegExp(`^hsl\\(${Da},${en},${en}\\)$`),E8=new RegExp(`^hsla\\(${Da},${en},${en},${Da}\\)$`),wI={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};Sx(Ka,ja,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_I,formatHex:_I,formatHex8:S8,formatHsl:O8,formatRgb:EI,toString:EI});function _I(){return this.rgb().formatHex()}function S8(){return this.rgb().formatHex8()}function O8(){return Dj(this).formatHsl()}function EI(){return this.rgb().formatRgb()}function ja(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=m8.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?SI(t):r===3?new Wt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?lu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?lu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=y8.exec(e))?new Wt(t[1],t[2],t[3],1):(t=b8.exec(e))?new Wt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=x8.exec(e))?lu(t[1],t[2],t[3],t[4]):(t=w8.exec(e))?lu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=_8.exec(e))?RI(t[1],t[2]/100,t[3]/100,1):(t=E8.exec(e))?RI(t[1],t[2]/100,t[3]/100,t[4]):wI.hasOwnProperty(e)?SI(wI[e]):e==="transparent"?new Wt(NaN,NaN,NaN,0):null}function SI(e){return new Wt(e>>16&255,e>>8&255,e&255,1)}function lu(e,t,r,n){return n<=0&&(e=t=r=NaN),new Wt(e,t,r,n)}function C8(e){return e instanceof Ka||(e=ja(e)),e?(e=e.rgb(),new Wt(e.r,e.g,e.b,e.opacity)):new Wt}function Rb(e,t,r,n){return arguments.length===1?C8(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}Sx(Wt,Rb,Mj(Ka,{brighter(e){return e=e==null?Wu:Math.pow(Wu,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ma:Math.pow(Ma,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Wt(li(this.r),li(this.g),li(this.b),Gu(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:OI,formatHex:OI,formatHex8:R8,formatRgb:CI,toString:CI}));function OI(){return`#${ui(this.r)}${ui(this.g)}${ui(this.b)}`}function R8(){return`#${ui(this.r)}${ui(this.g)}${ui(this.b)}${ui((isNaN(this.opacity)?1:this.opacity)*255)}`}function CI(){const e=Gu(this.opacity);return`${e===1?"rgb(":"rgba("}${li(this.r)}, ${li(this.g)}, ${li(this.b)}${e===1?")":`, ${e})`}`}function Gu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function li(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ui(e){return e=li(e),(e<16?"0":"")+e.toString(16)}function RI(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Dr(e,t,r,n)}function Dj(e){if(e instanceof Dr)return new Dr(e.h,e.s,e.l,e.opacity);if(e instanceof Ka||(e=ja(e)),!e)return new Dr;if(e instanceof Dr)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 Dr(a,u,c,e.opacity)}function I8(e,t,r,n){return arguments.length===1?Dj(e):new Dr(e,t,r,n??1)}function Dr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Sx(Dr,I8,Mj(Ka,{brighter(e){return e=e==null?Wu:Math.pow(Wu,e),new Dr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ma:Math.pow(Ma,e),new Dr(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(dm(e>=240?e-240:e+120,i,n),dm(e,i,n),dm(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Dr(II(this.h),fu(this.s),fu(this.l),Gu(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=Gu(this.opacity);return`${e===1?"hsl(":"hsla("}${II(this.h)}, ${fu(this.s)*100}%, ${fu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function II(e){return e=(e||0)%360,e<0?e+360:e}function fu(e){return Math.max(0,Math.min(1,e||0))}function dm(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 jj=e=>()=>e;function P8(e,t){return function(r){return e+r*t}}function N8(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function T8(e){return(e=+e)==1?qj:function(t,r){return r-t?N8(t,r,e):jj(isNaN(t)?r:t)}}function qj(e,t){var r=t-e;return r?P8(e,r):jj(isNaN(e)?t:e)}const PI=(function e(t){var r=T8(t);function n(i,o){var a=r((i=Rb(i)).r,(o=Rb(o)).r),u=r(i.g,o.g),c=r(i.b,o.b),d=qj(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 Ib=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hm=new RegExp(Ib.source,"g");function A8(e){return function(){return e}}function M8(e){return function(t){return e(t)+""}}function D8(e,t){var r=Ib.lastIndex=hm.lastIndex=0,n,i,o,a=-1,u=[],c=[];for(e=e+"",t=t+"";(n=Ib.exec(e))&&(i=hm.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=hm.lastIndex;return r<t.length&&(o=t.slice(r),u[a]?u[a]+=o:u[++a]=o),u.length<2?c[0]?M8(c[0].x):A8(t):(t=c.length,function(d){for(var f=0,h;f<t;++f)u[(h=c[f]).i]=h.x(d);return u.join("")})}var NI=180/Math.PI,Pb={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)*NI,skewX:Math.atan(c)*NI,scaleX:a,scaleY:u}}var du;function j8(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Pb:kj(t.a,t.b,t.c,t.d,t.e,t.f)}function q8(e){return e==null||(du||(du=document.createElementNS("http://www.w3.org/2000/svg","g")),du.setAttribute("transform",e),!(e=du.transform.baseVal.consolidate()))?Pb:(e=e.matrix,kj(e.a,e.b,e.c,e.d,e.e,e.f))}function Lj(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=Lj(j8,"px, ","px)","deg)"),L8=Lj(q8,", ",")",")"),B8=1e-12;function TI(e){return((e=Math.exp(e))+1/e)/2}function F8(e){return((e=Math.exp(e))-1/e)/2}function $8(e){return((e=Math.exp(2*e))-1)/(e+1)}const z8=(function e(t,r,n){function i(o,a){var u=o[0],c=o[1],d=o[2],f=a[0],h=a[1],p=a[2],v=f-u,m=h-c,y=v*v+m*m,x,b;if(y<B8)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),S=(p*p-d*d+n*y)/(2*d*r*w),E=(p*p-d*d-n*y)/(2*p*r*w),_=Math.log(Math.sqrt(S*S+1)-S),R=Math.log(Math.sqrt(E*E+1)-E);b=(R-_)/t,x=function(I){var N=I*b,D=TI(_),L=d/(r*w)*(D*$8(t*N+_)-F8(_));return[u+L*v,c+L*m,d*D/TI(t*N+_)]}}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 go=0,wa=0,Jo=0,Bj=1e3,Ku,_a,Yu=0,gi=0,$c=0,qa=typeof performance=="object"&&performance.now?performance:Date,Fj=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ox(){return gi||(Fj(H8),gi=qa.now()+$c)}function H8(){gi=0}function Xu(){this._call=this._time=this._next=null}Xu.prototype=$j.prototype={constructor:Xu,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Ox():+r)+(t==null?0:+t),!this._next&&_a!==this&&(_a?_a._next=this:Ku=this,_a=this),this._call=e,this._time=r,Nb()},stop:function(){this._call&&(this._call=null,this._time=1/0,Nb())}};function $j(e,t,r){var n=new Xu;return n.restart(e,t,r),n}function U8(){Ox(),++go;for(var e=Ku,t;e;)(t=gi-e._time)>=0&&e._call.call(void 0,t),e=e._next;--go}function AI(){gi=(Yu=qa.now())+$c,go=wa=0;try{U8()}finally{go=0,W8(),gi=0}}function V8(){var e=qa.now(),t=e-Yu;t>Bj&&($c-=t,Yu=e)}function W8(){for(var e,t=Ku,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:Ku=r);_a=e,Nb(n)}function Nb(e){if(!go){wa&&(wa=clearTimeout(wa));var t=e-gi;t>24?(e<1/0&&(wa=setTimeout(AI,e-qa.now()-$c)),Jo&&(Jo=clearInterval(Jo))):(Jo||(Yu=qa.now(),Jo=setInterval(V8,Bj)),go=1,Fj(AI))}}function MI(e,t,r){var n=new Xu;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var G8=Bc("start","end","cancel","interrupt"),K8=[],zj=0,DI=1,Tb=2,ju=3,jI=4,Ab=5,qu=6;function zc(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Y8(e,r,{name:t,index:n,group:i,on:G8,tween:K8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:zj})}function Cx(e,t){var r=$r(e,t);if(r.state>zj)throw new Error("too late; already scheduled");return r}function an(e,t){var r=$r(e,t);if(r.state>ju)throw new Error("too late; already running");return r}function $r(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Y8(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=$j(o,0,r.time);function o(d){r.state=DI,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!==DI)return c();for(f in n)if(v=n[f],v.name===r.name){if(v.state===ju)return MI(a);v.state===jI?(v.state=qu,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[f]):+f<t&&(v.state=qu,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[f])}if(MI(function(){r.state===ju&&(r.state=jI,r.timer.restart(u,r.delay,r.time),u(d))}),r.state=Tb,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Tb){for(r.state=ju,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=Ab,1),h=-1,p=i.length;++h<p;)i[h].call(e,f);r.state===Ab&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=qu,r.timer.stop(),delete n[t];for(var d in n)return;delete e.__transition}}function ku(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>Tb&&n.state<Ab,n.state=qu,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function X8(e){return this.each(function(){ku(this,e)})}function Z8(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 J8(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 Q8(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=$r(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?Z8:J8)(r,e,t))}function Rx(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 $r(i,n).value[t]}}function Hj(e,t){var r;return(typeof t=="number"?Bn:t instanceof ja?PI:(r=ja(t))?(t=r,PI):D8)(e,t)}function eG(e){return function(){this.removeAttribute(e)}}function tG(e){return function(){this.removeAttributeNS(e.space,e.local)}}function rG(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===n?o:o=t(n=a,r)}}function nG(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?o:o=t(n=a,r)}}function iG(e,t,r){var n,i,o;return function(){var a,u=r(this),c;return u==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=u+"",a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,u)))}}function oG(e,t,r){var n,i,o;return function(){var a,u=r(this),c;return u==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=u+"",a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,u)))}}function aG(e,t){var r=Fc(e),n=r==="transform"?L8:Hj;return this.attrTween(e,typeof t=="function"?(r.local?oG:iG)(r,n,Rx(this,"attr."+e,t)):t==null?(r.local?tG:eG)(r):(r.local?nG:rG)(r,n,t))}function sG(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function uG(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function cG(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&uG(e,o)),r}return i._value=t,i}function lG(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&sG(e,o)),r}return i._value=t,i}function fG(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=Fc(e);return this.tween(r,(n.local?cG:lG)(n,t))}function dG(e,t){return function(){Cx(this,e).delay=+t.apply(this,arguments)}}function hG(e,t){return t=+t,function(){Cx(this,e).delay=t}}function pG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?dG:hG)(t,e)):$r(this.node(),t).delay}function vG(e,t){return function(){an(this,e).duration=+t.apply(this,arguments)}}function gG(e,t){return t=+t,function(){an(this,e).duration=t}}function mG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?vG:gG)(t,e)):$r(this.node(),t).duration}function yG(e,t){if(typeof t!="function")throw new Error;return function(){an(this,e).ease=t}}function bG(e){var t=this._id;return arguments.length?this.each(yG(t,e)):$r(this.node(),t).ease}function xG(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;an(this,e).ease=r}}function wG(e){if(typeof e!="function")throw new Error;return this.each(xG(this._id,e))}function _G(e){typeof e!="function"&&(e=wj(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 EG(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),u=0;u<o;++u)for(var c=t[u],d=r[u],f=c.length,h=a[u]=new Array(f),p,v=0;v<f;++v)(p=c[v]||d[v])&&(h[v]=p);for(;u<n;++u)a[u]=t[u];return new xn(a,this._parents,this._name,this._id)}function SG(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function OG(e,t,r){var n,i,o=SG(t)?Cx:an;return function(){var a=o(this,e),u=a.on;u!==n&&(i=(n=u).copy()).on(t,r),a.on=i}}function CG(e,t){var r=this._id;return arguments.length<2?$r(this.node(),r).on.on(e):this.each(OG(r,e,t))}function RG(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function IG(){return this.on("end.remove",RG(this._id))}function PG(e){var t=this._name,r=this._id;typeof e!="function"&&(e=_x(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,zc(d[p],t,r,p,d,$r(f,r)));return new xn(o,this._parents,t,r)}function NG(e){var t=this._name,r=this._id;typeof e!="function"&&(e=xj(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=$r(f,r),y=0,x=p.length;y<x;++y)(v=p[y])&&zc(v,t,r,y,p,m);o.push(p),a.push(f)}return new xn(o,a,t,r)}var TG=Ga.prototype.constructor;function AG(){return new TG(this._groups,this._parents)}function MG(e,t){var r,n,i;return function(){var o=vo(this,e),a=(this.style.removeProperty(e),vo(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function Uj(e){return function(){this.style.removeProperty(e)}}function DG(e,t,r){var n,i=r+"",o;return function(){var a=vo(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function jG(e,t,r){var n,i,o;return function(){var a=vo(this,e),u=r(this),c=u+"";return u==null&&(c=u=(this.style.removeProperty(e),vo(this,e))),a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,u))}}function qG(e,t){var r,n,i,o="style."+t,a="end."+o,u;return function(){var c=an(this,e),d=c.on,f=c.value[o]==null?u||(u=Uj(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:Hj;return t==null?this.styleTween(e,MG(e,n)).on("end.style."+e,Uj(e)):typeof t=="function"?this.styleTween(e,jG(e,n,Rx(this,"style."+e,t))).each(qG(this._id,e)):this.styleTween(e,DG(e,n,t),r).on("end.style."+e,null)}function LG(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function BG(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&LG(e,a,r)),n}return o._value=t,o}function FG(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,BG(e,t,r??""))}function $G(e){return function(){this.textContent=e}}function zG(e){return function(){var t=e(this);this.textContent=t??""}}function HG(e){return this.tween("text",typeof e=="function"?zG(Rx(this,"text",e)):$G(e==null?"":e+""))}function UG(e){return function(t){this.textContent=e.call(this,t)}}function VG(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&UG(i)),t}return n._value=e,n}function WG(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,VG(e))}function GG(){for(var e=this._name,t=this._id,r=Vj(),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=$r(c,t);zc(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 KG(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var u={value:a},c={value:function(){--i===0&&o()}};r.each(function(){var d=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 YG=0;function xn(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Vj(){return++YG}var mn=Ga.prototype;xn.prototype={constructor:xn,select:PG,selectAll:NG,selectChild:mn.selectChild,selectChildren:mn.selectChildren,filter:_G,merge:EG,selection:AG,transition:GG,call:mn.call,nodes:mn.nodes,node:mn.node,size:mn.size,empty:mn.empty,each:mn.each,on:CG,attr:aG,attrTween:fG,style:kG,styleTween:FG,text:HG,textTween:WG,remove:IG,tween:Q8,delay:pG,duration:mG,ease:bG,easeVarying:wG,end:KG,[Symbol.iterator]:mn[Symbol.iterator]};function XG(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ZG={time:null,delay:0,duration:250,ease:XG};function JG(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function QG(e){var t,r;e instanceof xn?(t=e._id,e=e._name):(t=Vj(),(r=ZG).time=Ox(),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])&&zc(c,e,t,d,a,r||JG(c,t));return new xn(n,this._parents,e,t)}Ga.prototype.interrupt=X8;Ga.prototype.transition=QG;const hu=e=>()=>e;function eK(e,{sourceEvent:t,target:r,transform:n,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:i}})}function 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 fi=new yn(1,0,0);yn.prototype;function pm(e){e.stopImmediatePropagation()}function Qo(e){e.preventDefault(),e.stopImmediatePropagation()}function tK(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function rK(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function qI(){return this.__zoom||fi}function nK(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function iK(){return navigator.maxTouchPoints||"ontouchstart"in this}function oK(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function aK(){var e=tK,t=rK,r=oK,n=nK,i=iK,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],u=250,c=z8,d=Bc("start","zoom","end"),f,h,p,v=500,m=150,y=0,x=10;function b(T){T.property("__zoom",qI).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",D).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(T,G,z,X){var Z=T.selection?T.selection():T;Z.property("__zoom",qI),T!==Z?_(T,G,z,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(T,G,z,X){b.scaleTo(T,function(){var Z=this.__zoom.k,re=typeof G=="function"?G.apply(this,arguments):G;return Z*re},z,X)},b.scaleTo=function(T,G,z,X){b.transform(T,function(){var Z=t.apply(this,arguments),re=this.__zoom,W=z==null?E(Z):typeof z=="function"?z.apply(this,arguments):z,Q=re.invert(W),ue=typeof G=="function"?G.apply(this,arguments):G;return r(S(w(re,ue),W,Q),Z,a)},z,X)},b.translateBy=function(T,G,z,X){b.transform(T,function(){return r(this.__zoom.translate(typeof G=="function"?G.apply(this,arguments):G,typeof z=="function"?z.apply(this,arguments):z),t.apply(this,arguments),a)},null,X)},b.translateTo=function(T,G,z,X,Z){b.transform(T,function(){var re=t.apply(this,arguments),W=this.__zoom,Q=X==null?E(re):typeof X=="function"?X.apply(this,arguments):X;return r(fi.translate(Q[0],Q[1]).scale(W.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof z=="function"?-z.apply(this,arguments):-z),re,a)},X,Z)};function w(T,G){return G=Math.max(o[0],Math.min(o[1],G)),G===T.k?T:new yn(G,T.x,T.y)}function S(T,G,z){var X=G[0]-z[0]*T.k,Z=G[1]-z[1]*T.k;return X===T.x&&Z===T.y?T:new yn(T.k,X,Z)}function E(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function _(T,G,z,X){T.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,re=arguments,W=R(Z,re).event(X),Q=t.apply(Z,re),ue=z==null?E(Q):typeof z=="function"?z.apply(Z,re):z,oe=Math.max(Q[1][0]-Q[0][0],Q[1][1]-Q[0][1]),H=Z.__zoom,K=typeof G=="function"?G.apply(Z,re):G,$=c(H.invert(ue).concat(oe/H.k),K.invert(ue).concat(oe/K.k));return function(k){if(k===1)k=K;else{var F=$(k),te=oe/F[2];k=new yn(te,ue[0]-F[0]*te,ue[1]-F[1]*te)}W.zoom(null,k)}})}function R(T,G,z){return!z&&T.__zooming||new I(T,G)}function I(T,G){this.that=T,this.args=G,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,G),this.taps=0}I.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,G){return this.mouse&&T!=="mouse"&&(this.mouse[1]=G.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=G.invert(this.touch0[0])),this.touch1&&T!=="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(T){var G=Mr(this.that).datum();d.call(T,this.that,new eK(T,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:d}),G)}};function N(T,...G){if(!e.apply(this,arguments))return;var z=R(this,G).event(T),X=this.__zoom,Z=Math.max(o[0],Math.min(o[1],X.k*Math.pow(2,n.apply(this,arguments)))),re=Xr(T);if(z.wheel)(z.mouse[0][0]!==re[0]||z.mouse[0][1]!==re[1])&&(z.mouse[1]=X.invert(z.mouse[0]=re)),clearTimeout(z.wheel);else{if(X.k===Z)return;z.mouse=[re,X.invert(re)],ku(this),z.start()}Qo(T),z.wheel=setTimeout(W,m),z.zoom("mouse",r(S(w(X,Z),z.mouse[0],z.mouse[1]),z.extent,a));function W(){z.wheel=null,z.end()}}function D(T,...G){if(p||!e.apply(this,arguments))return;var z=T.currentTarget,X=R(this,G,!0).event(T),Z=Mr(T.view).on("mousemove.zoom",ue,!0).on("mouseup.zoom",oe,!0),re=Xr(T,z),W=T.clientX,Q=T.clientY;Tj(T.view),pm(T),X.mouse=[re,this.__zoom.invert(re)],ku(this),X.start();function ue(H){if(Qo(H),!X.moved){var K=H.clientX-W,$=H.clientY-Q;X.moved=K*K+$*$>y}X.event(H).zoom("mouse",r(S(X.that.__zoom,X.mouse[0]=Xr(H,z),X.mouse[1]),X.extent,a))}function oe(H){Z.on("mousemove.zoom mouseup.zoom",null),Aj(H.view,X.moved),Qo(H),X.event(H).end()}}function L(T,...G){if(e.apply(this,arguments)){var z=this.__zoom,X=Xr(T.changedTouches?T.changedTouches[0]:T,this),Z=z.invert(X),re=z.k*(T.shiftKey?.5:2),W=r(S(w(z,re),X,Z),t.apply(this,G),a);Qo(T),u>0?Mr(this).transition().duration(u).call(_,W,X,T):Mr(this).call(b.transform,W,X,T)}}function B(T,...G){if(e.apply(this,arguments)){var z=T.touches,X=z.length,Z=R(this,G,T.changedTouches.length===X).event(T),re,W,Q,ue;for(pm(T),W=0;W<X;++W)Q=z[W],ue=Xr(Q,this),ue=[ue,this.__zoom.invert(ue),Q.identifier],Z.touch0?!Z.touch1&&Z.touch0[2]!==ue[2]&&(Z.touch1=ue,Z.taps=0):(Z.touch0=ue,re=!0,Z.taps=1+!!f);f&&(f=clearTimeout(f)),re&&(Z.taps<2&&(h=ue[0],f=setTimeout(function(){f=null},v)),ku(this),Z.start())}}function U(T,...G){if(this.__zooming){var z=R(this,G).event(T),X=T.changedTouches,Z=X.length,re,W,Q,ue;for(Qo(T),re=0;re<Z;++re)W=X[re],Q=Xr(W,this),z.touch0&&z.touch0[2]===W.identifier?z.touch0[0]=Q:z.touch1&&z.touch1[2]===W.identifier&&(z.touch1[0]=Q);if(W=z.that.__zoom,z.touch1){var oe=z.touch0[0],H=z.touch0[1],K=z.touch1[0],$=z.touch1[1],k=(k=K[0]-oe[0])*k+(k=K[1]-oe[1])*k,F=(F=$[0]-H[0])*F+(F=$[1]-H[1])*F;W=w(W,Math.sqrt(k/F)),Q=[(oe[0]+K[0])/2,(oe[1]+K[1])/2],ue=[(H[0]+$[0])/2,(H[1]+$[1])/2]}else if(z.touch0)Q=z.touch0[0],ue=z.touch0[1];else return;z.zoom("touch",r(S(W,Q,ue),z.extent,a))}}function j(T,...G){if(this.__zooming){var z=R(this,G).event(T),X=T.changedTouches,Z=X.length,re,W;for(pm(T),p&&clearTimeout(p),p=setTimeout(function(){p=null},v),re=0;re<Z;++re)W=X[re],z.touch0&&z.touch0[2]===W.identifier?delete z.touch0:z.touch1&&z.touch1[2]===W.identifier&&delete z.touch1;if(z.touch1&&!z.touch0&&(z.touch0=z.touch1,delete z.touch1),z.touch0)z.touch0[1]=this.__zoom.invert(z.touch0[0]);else if(z.end(),z.taps===2&&(W=Xr(W,this),Math.hypot(h[0]-W[0],h[1]-W[1])<x)){var Q=Mr(this).on("dblclick.zoom");Q&&Q.apply(this,arguments)}}}return b.wheelDelta=function(T){return arguments.length?(n=typeof T=="function"?T:hu(+T),b):n},b.filter=function(T){return arguments.length?(e=typeof T=="function"?T:hu(!!T),b):e},b.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:hu(!!T),b):i},b.extent=function(T){return arguments.length?(t=typeof T=="function"?T:hu([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),b):t},b.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],b):[o[0],o[1]]},b.translateExtent=function(T){return arguments.length?(a[0][0]=+T[0][0],a[1][0]=+T[1][0],a[0][1]=+T[0][1],a[1][1]=+T[1][1],b):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},b.constrain=function(T){return arguments.length?(r=T,b):r},b.duration=function(T){return arguments.length?(u=+T,b):u},b.interpolate=function(T){return arguments.length?(c=T,b):c},b.on=function(){var T=d.on.apply(d,arguments);return T===d?b:T},b.clickDistance=function(T){return arguments.length?(y=(T=+T)*T,b):Math.sqrt(y)},b.tapDistance=function(T){return arguments.length?(x=+T,b):x},b}function ze(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mb(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 Wj(e,t){if(e){if(typeof e=="string")return Mb(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 Mb(e,t)}}function sK(e){if(Array.isArray(e))return e}function uK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,u;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,u=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw u}}return n}}function cK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
6
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Be(e,t){return sK(e)||uK(e,t)||Wj(e,t)||cK()}var mo;(function(e){e.Strict="strict",e.Loose="loose"})(mo||(mo={}));var mi;(function(e){e.Lines="lines",e.Dots="dots"})(mi||(mi={}));var io;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(io||(io={}));var $n;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})($n||($n={}));var Zu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Zu||(Zu={}));var xe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(xe||(xe={}));var Ix=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},oo=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)},Gj=function(t,r){return{x:oo(t.x,r[0][0],r[1][0]),y:oo(t.y,r[0][1],r[1][1])}},Kj=function(t){var r,n;return((r=t.getRootNode)===null||r===void 0?void 0:r.call(t))||((n=window)===null||n===void 0?void 0:n.document)},lK=function(t,r){return{x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x2,r.x2),y2:Math.max(t.y2,r.y2)}},Ju=function(t){var r=t.x,n=t.y,i=t.width,o=t.height;return{x:r,y:n,x2:r+i,y2:n+o}},fK=function(t){var r=t.x,n=t.y,i=t.x2,o=t.y2;return{x:r,y:n,width:i-r,height:o-n}},Yj=function(t){return!isNaN(t)&&isFinite(t)},Pt=Symbol("internals");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 Ea(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){ze(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 LI(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=Ea({},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 Xj(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(Ea(Ea({},i),{},{selected:o.selected})),n;case"position":{var a=Ea({},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&&LI(n,a),n.push(a),n}case"dimensions":{var u=Ea({},i);return typeof o.dimensions<"u"&&(u.width=o.dimensions.width,u.height=o.dimensions.height),u.expandParent&&LI(n,u),n.push(u),n}case"remove":return n}return n.push(i),n},r)}function Zj(e,t){return Xj(e,t)}function dK(e,t){return Xj(e,t)}var Fn=function(t,r){return{id:t,type:"select",selected:r}};function Qi(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 BI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var FI=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 Jj({id:u.getAttribute("data-handleid"),position:u.getAttribute("data-handlepos"),x:(c.left-a.left)/n,y:(c.top-a.top)/n},Ix(u))})};function ea(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,Jj({},i))}}function Qj(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 $I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ra(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$I(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$I(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var hK=function(t){return"id"in t&&"source"in t&&"target"in t},pK=function(t){var r=t.source,n=t.sourceHandle,i=t.target,o=t.targetHandle;return"reactflow__edge-".concat(r).concat(n||"","-").concat(i).concat(o||"")},Db=function(t,r){if(typeof t>"u")return"";if(typeof t=="string")return t;var n=r?"".concat(r,"__"):"";return"".concat(n).concat(Object.keys(t).sort().map(function(i){return"".concat(i,"=").concat(t[i])}).join("&"))},vK=function(t,r){return r.some(function(n){return n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle)})},gK=function(t,r){if(!t.source||!t.target)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Can't create edge. An edge needs a source and a target. Help: https://reactflow.dev/error#600"),r;var n;return hK(t)?n=Ra({},t):n=Ra(Ra({},t),{},{id:pK(t)}),vK(n,r)?r:r.concat(n)},eq=function(t,r,n,i){var o=t.x,a=t.y,u=Be(r,3),c=u[0],d=u[1],f=u[2],h=Be(i,2),p=h[0],v=h[1],m={x:(o-c)/f,y:(a-d)/f};return n?{x:p*Math.round(m.x/p),y:v*Math.round(m.y/v)}:m},Px=function(t){if(t.length===0)return{x:0,y:0,width:0,height:0};var r=t.reduce(function(n,i){var o=i.positionAbsolute,a=i.position,u=i.width,c=i.height;return lK(n,Ju({x:o?o.x:a.x,y:o?o.y:a.y,width:u||0,height:c||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return fK(r)},tq=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],i=Be(n,3),o=i[0],a=i[1],u=i[2],c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,f=Ju({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=Ju(Ra(Ra({},v),{},{width:m||0,height:y||0})),S=Math.max(0,Math.min(f.x2,w.x2)-Math.max(f.x,w.x)),E=Math.max(0,Math.min(f.y2,w.y2)-Math.max(f.y,w.y)),_=Math.ceil(S*E),R=typeof m>"u"||typeof y>"u"||m===null||y===null,I=c&&_>0,N=(m||0)*(y||0),D=R||I||_>=N;D&&h.push(p)}),h},rq=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)})},nq=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=oo(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]},ai=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};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 eo(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){ze(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 iq(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 iq(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[Pt])===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[Pt])===null||m===void 0?void 0:m.z)!==null&&v!==void 0?v:0:(y=n.z)!==null&&y!==void 0?y:0})}function vm(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=Yj(i.zIndex)?i.zIndex:i.selected?1e3:0,u=t.get(i.id),c=eo(eo({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,Pt,{enumerable:!1,value:{handleBounds:u==null||(o=u[Pt])===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=iq(i,r,n,eo(eo({},i.position),{},{z:(o=(a=i[Pt])===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[Pt].z=f,n[i.id]&&(i[Pt].isParent=!0)}}),r}function oq(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=Px(p),w=nq(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),S=Be(w,3),E=S[0],_=S[1],R=S[2],I=fi.translate(E,_).scale(R);return typeof t.duration=="number"&&t.duration>0?c.transform(ai(d,t.duration),I):c.transform(d,I),!0}}return!1}function mK(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,eo(eo({},n),{},(i={},ze(i,Pt,n[Pt]),ze(i,"selected",r.selected),i)))}}),new Map(t)}function yK(e,t){return t.map(function(r){var n=e.find(function(i){return i.id===r.id});return n&&(r.selected=n.selected),r})}function pu(e){var t=e.changedNodes,r=e.changedEdges,n=e.get,i=e.set,o=n(),a=o.nodeInternals,u=o.edges,c=o.onNodesChange,d=o.onEdgesChange,f=o.hasDefaultNodes,h=o.hasDefaultEdges;t!=null&&t.length&&(f&&i({nodeInternals:mK(t,a)}),c==null||c(t)),r!=null&&r.length&&(h&&i({edges:yK(r,u)}),d==null||d(r))}var jb=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],HI={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:jb,nodeExtent:jb,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:mo.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 UI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Nx=IW(),bK=Nx.Provider,gt=Nx.useStore,Ft=Nx.useStoreApi,xK=function(){return RW(function(t,r){return Kr(Kr({},HI),{},{setNodes:function(i){t({nodeInternals:vm(i,r().nodeInternals)})},setEdges:function(i){var o=r(),a=o.defaultEdgeOptions,u=a===void 0?{}:a;t({edges:i.map(function(c){return Kr(Kr({},u),c)})})},setDefaultNodesAndEdges:function(i,o){var a=typeof i<"u",u=typeof o<"u",c=a?vm(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,S){var E=u.get(S.id);if(E){var _=Ix(S.nodeElement),R=!!(_.width&&_.height&&(E.width!==_.width||E.height!==_.height||S.forceUpdate));R&&(u.set(E.id,Kr(Kr({},E),{},ze({},Pt,Kr(Kr({},E[Pt]),{},{handleBounds:{source:FI(".source",S.nodeElement,y),target:FI(".target",S.nodeElement,y)}})),_)),w.push({id:E.id,type:"dimensions",dimensions:_}))}return w},[]),b=d||c&&!d&&oq(r,Kr({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=Zj(h,Array.from(d.values())),v=vm(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=Qi(Array.from(u.values()),i),f=Qi(c,[])),pu({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=Qi(u,i),f=Qi(Array.from(c.values()),[])),pu({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)});pu({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)});pu({changedNodes:c,changedEdges:d,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(u){u.positionAbsolute=Gj(u.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(Kr({},HI))}})})};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 wK(e){if(Array.isArray(e))return Mb(e)}function _K(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
7
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function di(e){return wK(e)||_K(e)||Wj(e)||EK()}var SK={zoomIn:function(){},zoomOut:function(){},zoomTo:function(t){},getZoom:function(){return 1},setViewport:function(t){},getViewport:function(){return{x:0,y:0,zoom:1}},fitView:function(){},setCenter:function(t,r){},fitBounds:function(t){},project:function(t){return t},viewportInitialized:!1},OK=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},CK=function(){var t=Ft(),r=gt(OK,Xt),n=r.d3Zoom,i=r.d3Selection,o=A.useMemo(function(){return i&&n?{zoomIn:function(u){return n.scaleBy(ai(i,u==null?void 0:u.duration),1.2)},zoomOut:function(u){return n.scaleBy(ai(i,u==null?void 0:u.duration),1/1.2)},zoomTo:function(u,c){return n.scaleTo(ai(i,c==null?void 0:c.duration),u)},getZoom:function(){return t.getState().transform[2]},setViewport:function(u,c){var d,f,h,p=Be(t.getState().transform,3),v=p[0],m=p[1],y=p[2],x=fi.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(ai(i,c==null?void 0:c.duration),x)},getViewport:function(){var u=Be(t.getState().transform,3),c=u[0],d=u[1],f=u[2];return{x:c,y:d,zoom:f}},fitView:function(u){return oq(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=fi.translate(y,x).scale(m);n.transform(ai(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=nq(u,h,p,v,m,(d=c==null?void 0:c.padding)!==null&&d!==void 0?d:.1),x=Be(y,3),b=x[0],w=x[1],S=x[2],E=fi.translate(b,w).scale(S);n.transform(ai(i,c==null?void 0:c.duration),E)},project:function(u){var c=t.getState(),d=c.transform,f=c.snapToGrid,h=c.snapGrid;return eq(u,d,f,h)},viewportInitialized:!0}:SK},[n,i]);return o};function VI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aq(){var e=CK(),t=Ft(),r=A.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=Array.from(p.values());return v.map(function(m){return Gi({},m)})},[]),n=A.useCallback(function(h){var p=t.getState(),v=p.nodeInternals;return v.get(h)},[]),i=A.useCallback(function(){var h=t.getState(),p=h.edges,v=p===void 0?[]:p;return v.map(function(m){return Gi({},m)})},[]),o=A.useCallback(function(h){var p=t.getState(),v=p.edges,m=v===void 0?[]:v;return m.find(function(y){return y.id===h})},[]),a=A.useCallback(function(h){var p=t.getState(),v=p.nodeInternals,m=p.setNodes,y=p.hasDefaultNodes,x=p.onNodesChange,b=Array.from(v.values()),w=typeof h=="function"?h(b):h;if(y)m(w);else if(x){var S=w.length===0?b.map(function(E){return{type:"remove",id:E.id}}):w.map(function(E){return{item:E,type:"reset"}});x(S)}},[]),u=A.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 S=w.length===0?m.map(function(E){return{type:"remove",id:E.id}}):w.map(function(E){return{item:E,type:"reset"}});b(S)}},[]),c=A.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()),S=[].concat(w,di(p));y(S)}else if(b){var E=p.map(function(_){return{item:_,type:"add"}});b(E)}},[]),d=A.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(di(y),di(p)));else if(w){var S=p.map(function(E){return{item:E,type:"add"}});w(S)}},[]),f=A.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=h.edges,m=v===void 0?[]:v,y=h.transform,x=Array.from(p.values()),b=Be(y,3),w=b[0],S=b[1],E=b[2];return{nodes:x.map(function(_){return Gi({},_)}),edges:m.map(function(_){return Gi({},_)}),viewport:{x:w,y:S,zoom:E}}},[]);return A.useMemo(function(){return Gi(Gi({},e),{},{getNodes:r,getNode:n,getEdges:i,getEdge:o,setNodes:a,setEdges:u,addNodes:c,addEdges:d,toObject:f})},[e,r,n,i,o,a,u,c,d,f])}function RK(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Hc(e,t){if(e==null)return{};var r=RK(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function IK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},A.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function PK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},A.createElement("path",{d:"M0 0h32v4.2H0z"}))}function NK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},A.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function TK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},A.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function AK(){return A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},A.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}var MK=["children","className"];function 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 DK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var vu=function(t){var r=t.children,n=t.className,i=Hc(t,MK);return A.createElement("button",DK({type:"button",className:cr(["react-flow__controls-button",n])},i),r)},jK=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},qK=function(t){var r=t.style,n=t.showZoom,i=n===void 0?!0:n,o=t.showFitView,a=o===void 0?!0:o,u=t.showInteractive,c=u===void 0?!0:u,d=t.fitViewOptions,f=t.onZoomIn,h=t.onZoomOut,p=t.onFitView,v=t.onInteractiveChange,m=t.className,y=t.children,x=Ft(),b=A.useState(!1),w=Be(b,2),S=w[0],E=w[1],_=gt(jK),R=aq(),I=R.zoomIn,N=R.zoomOut,D=R.fitView;if(A.useEffect(function(){E(!0)},[]),!S)return null;var L=function(){I==null||I(),f==null||f()},B=function(){N==null||N(),h==null||h()},U=function(){D==null||D(d),p==null||p()},j=function(){x.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),v==null||v(!_)};return A.createElement("div",{className:cr(["react-flow__controls",m]),style:r},i&&A.createElement(A.Fragment,null,A.createElement(vu,{onClick:L,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},A.createElement(IK,null)),A.createElement(vu,{onClick:B,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},A.createElement(PK,null))),a&&A.createElement(vu,{className:"react-flow__controls-fitview",onClick:U,title:"fit view","aria-label":"fit view"},A.createElement(NK,null)),c&&A.createElement(vu,{className:"react-flow__controls-interactive",onClick:j,title:"toggle interactivity","aria-label":"toggle interactivity"},_?A.createElement(AK,null):A.createElement(TK,null)),y)};qK.displayName="Controls";var kK=function(t,r,n){return A.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},LK=function(t,r){return A.createElement("circle",{cx:t,cy:t,r:t,fill:r})},gu;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 KI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var BK=(gu={},ze(gu,mi.Dots,"#81818a"),ze(gu,mi.Lines,"#eee"),gu),FK=function(t){return t.transform},sq=function(t){var r=t.variant,n=r===void 0?mi.Dots:r,i=t.gap,o=i===void 0?15:i,a=t.size,u=a===void 0?.4:a,c=t.color,d=t.style,f=t.className,h=A.useRef(null),p=A.useState(null),v=Be(p,2),m=v[0],y=v[1],x=gt(FK),b=Be(x,3),w=b[0],S=b[1],E=b[2];A.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 _=o*E||1,R=w%_,I=S%_,N=n===mi.Lines,D=c||BK[n],L=N?kK(_,u,D):LK(u*E,D);return A.createElement("svg",{className:cr(["react-flow__background","react-flow__container",f]),style:KI(KI({},d),{},{width:"100%",height:"100%"}),ref:h},m&&A.createElement(A.Fragment,null,A.createElement("pattern",{id:m,x:R,y:I,width:_,height:_,patternUnits:"userSpaceOnUse"},L),A.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(m,")")})))};sq.displayName="Background";var $K=A.memo(sq),zK=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function HK(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&zK.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var i="".concat(n).split("-");return A.createElement("div",{className:cr(["react-flow__attribution"].concat(di(i))),"data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev/pricing"},A.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var UK=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function 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 VK(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){ze(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 WK=function(t){var r=t.x,n=t.y,i=t.label,o=t.labelStyle,a=o===void 0?{}:o,u=t.labelShowBg,c=u===void 0?!0:u,d=t.labelBgStyle,f=d===void 0?{}:d,h=t.labelBgPadding,p=h===void 0?[2,4]:h,v=t.labelBgBorderRadius,m=v===void 0?2:v,y=t.children,x=t.className,b=Hc(t,UK),w=A.useRef(null),S=A.useState({x:0,y:0,width:0,height:0}),E=Be(S,2),_=E[0],R=E[1],I=cr(["react-flow__edge-textwrapper",x]);return A.useEffect(function(){if(w.current){var N=w.current.getBBox();R({x:N.x,y:N.y,width:N.width,height:N.height})}},[i]),typeof i>"u"||!i?null:A.createElement("g",VK({transform:"translate(".concat(r-_.width/2," ").concat(n-_.height/2,")"),className:I},b),c&&A.createElement("rect",{width:_.width+2*p[0],x:-p[0],y:-p[1],height:_.height+2*p[1],className:"react-flow__edge-textbg",style:f,rx:m,ry:m}),A.createElement("text",{className:"react-flow__edge-text",y:_.height/2,dy:"0.3em",ref:w,style:a},i),y)},GK=A.memo(WK),Uc=(function(e){var t=e.path,r=e.centerX,n=e.centerY,i=e.label,o=e.labelStyle,a=e.labelShowBg,u=e.labelBgStyle,c=e.labelBgPadding,d=e.labelBgBorderRadius,f=e.style,h=e.markerEnd,p=e.markerStart,v=i?A.createElement(GK,{x:r,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d}):null;return A.createElement(A.Fragment,null,A.createElement("path",{style:f,d:t,className:"react-flow__edge-path",markerEnd:h,markerStart:p}),v)});function Qu(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a,u;switch(t){case xe.Left:case xe.Right:a=.5*(r+i),u=n;break;case xe.Top:case xe.Bottom:a=r,u=.5*(n+o);break}return[a,u]}function uq(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=Qu({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Be(d,2),h=f[0],p=f[1],v=Qu({pos:c,x1:o,y1:a,x2:t,y2:r}),m=Be(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 KK(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=Qu({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Be(d,2),h=f[0],p=f[1],v=Qu({pos:c,x1:o,y1:a,x2:t,y2:r}),m=Be(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,S=Math.abs(b-t),E=Math.abs(w-r);return[b,w,S,E]}var cq=A.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?xe.Bottom:o,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.label,f=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,m=e.labelBgBorderRadius,y=e.style,x=e.markerEnd,b=e.markerStart,w={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c},S=uq(w),E=KK(w),_=Be(E,2),R=_[0],I=_[1];return A.createElement(Uc,{path:S,centerX:R,centerY:I,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:x,markerStart:b})});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 YK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XI(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ZI=[xe.Left,xe.Right],lq=function(t){var r=t.sourceX,n=t.sourceY,i=t.targetX,o=t.targetY,a=t.sourcePosition,u=a===void 0?xe.Bottom:a,c=t.targetPosition,d=c===void 0?xe.Top:c,f=ZI.includes(u),h=ZI.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,S=Math.abs(o-n)/2,E=o<n?o+S:o-S;return[w,E,b,S]};function ta(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,YK({},i))}}var gm=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},mm=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},ym=function(t,r,n){return"L ".concat(t,",").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+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},wm=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},_m=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},Em=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function qb(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.borderRadius,f=d===void 0?5:d,h=e.centerX,p=e.centerY,v=lq({sourceX:t,sourceY:r,targetX:o,targetY:a}),m=Be(v,4),y=m[0],x=m[1],b=m[2],w=m[3],S=Math.min(f,Math.abs(o-t)),E=Math.min(f,Math.abs(a-r)),_=Math.min(S,E,b,w),R=[xe.Left,xe.Right],I=typeof h<"u"?h:y,N=typeof p<"u"?p:x,D=null,L=null;return t<=o?(D=r<=a?gm(t,N,_):wm(t,N,_),L=r<=a?Em(o,N,_):bm(o,N,_)):(D=r<a?ym(t,N,_):_m(t,N,_),L=r<a?xm(o,N,_):mm(o,N,_)),R.includes(i)&&R.includes(c)?t<=o?(D=r<=a?Em(I,r,_):bm(I,r,_),L=r<=a?gm(I,a,_):wm(I,a,_)):(i===xe.Right&&c===xe.Left||i===xe.Left&&c===xe.Right||i===xe.Left&&c===xe.Left)&&(D=r<=a?xm(I,r,_):mm(I,r,_),L=r<=a?ym(I,a,_):_m(I,a,_)):R.includes(i)&&!R.includes(c)?(t<=o?D=r<=a?Em(o,r,_):bm(o,r,_):D=r<=a?xm(o,r,_):mm(o,r,_),L=""):!R.includes(i)&&R.includes(c)&&(t<=o?D=r<=a?gm(t,a,_):wm(t,a,_):D=r<=a?ym(t,a,_):_m(t,a,_),L=""),"M ".concat(t,",").concat(r).concat(D).concat(L,"L ").concat(o,",").concat(a)}var Tx=A.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,u=e.labelShowBg,c=e.labelBgStyle,d=e.labelBgPadding,f=e.labelBgBorderRadius,h=e.style,p=e.sourcePosition,v=p===void 0?xe.Bottom:p,m=e.targetPosition,y=m===void 0?xe.Top:m,x=e.markerEnd,b=e.markerStart,w=e.borderRadius,S=w===void 0?5:w,E=lq({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:v,targetPosition:y}),_=Be(E,2),R=_[0],I=_[1],N=qb({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:i,targetPosition:y,borderRadius:S});return A.createElement(Uc,{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 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 QI(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){ze(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 fq=A.memo(function(e){return A.createElement(Tx,QI(QI({},e),{},{borderRadius:0}))}),dq=A.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,u=e.labelShowBg,c=e.labelBgStyle,d=e.labelBgPadding,f=e.labelBgBorderRadius,h=e.style,p=e.markerEnd,v=e.markerStart,m=Math.abs(i-r)/2,y=i<r?i+m:i-m,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 A.createElement(Uc,{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 mu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function ec(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a=e.c,u,c;switch(t){case xe.Left:u=r-mu(r-i,a),c=n;break;case xe.Right:u=r+mu(i-r,a),c=n;break;case xe.Top:u=r,c=n-mu(n-o,a);break;case xe.Bottom:u=r,c=n+mu(o-n,a);break}return[u,c]}function Vc(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.curvature,f=d===void 0?.25:d,h=ec({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Be(h,2),v=p[0],m=p[1],y=ec({pos:c,x1:o,y1:a,x2:t,y2:r,c:f}),x=Be(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 XK(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?xe.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.curvature,f=d===void 0?.25:d,h=ec({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Be(h,2),v=p[0],m=p[1],y=ec({pos:c,x1:o,y1:a,x2:t,y2:r,c:f}),x=Be(y,2),b=x[0],w=x[1],S=t*.125+v*.375+b*.375+o*.125,E=r*.125+m*.375+w*.375+a*.125,_=Math.abs(S-t),R=Math.abs(E-r);return[S,E,_,R]}var kb=A.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?xe.Bottom:o,u=e.targetPosition,c=u===void 0?xe.Top:u,d=e.label,f=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,m=e.labelBgBorderRadius,y=e.style,x=e.markerEnd,b=e.markerStart,w=e.curvature,S={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c,curvature:w},E=Vc(S),_=XK(S),R=Be(_,2),I=R[0],N=R[1];return A.createElement(Uc,{path:E,centerX:I,centerY:N,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:x,markerStart:b})}),Ax=A.createContext(null),ZK=Ax.Provider;Ax.Consumer;function Lb(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===mo.Strict?r&&d||!r&&c:!0;m&&(f.isValid=o(v))}return f}function Sm(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function hq(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=Kj(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,S=d||(m?"target":"source"),E=h.getBoundingClientRect(),_;u({connectionPosition:{x:t.clientX-E.left,y:t.clientY-E.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:S}),b==null||b(t,{nodeId:n,handleId:r,handleType:S});function R(N){u({connectionPosition:{x:N.clientX-E.left,y:N.clientY-E.top}});var D=Lb(N,w,o,n,r,c,p),L=D.connection,B=D.elementBelow,U=D.isValid,j=D.isHoveringHandle;if(!j)return Sm(_);L.source!==L.target&&B&&(Sm(_),_=B,B.classList.add("react-flow__handle-connecting"),B.classList.toggle("react-flow__handle-valid",U))}function I(N){var D=a(),L=D.onConnectStop,B=D.onConnectEnd,U=Lb(N,w,o,n,r,c,p),j=U.connection,T=U.isValid;L==null||L(N),T&&(i==null||i(j)),B==null||B(N),d&&f&&f(N),Sm(_),u({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),p.removeEventListener("mousemove",R),p.removeEventListener("mouseup",I)}p.addEventListener("mousemove",R),p.addEventListener("mouseup",I)}var JK=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];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 Om(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){ze(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 QK=function(){return!0},eY=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},pq=A.forwardRef(function(e,t){var r=e.type,n=r===void 0?"source":r,i=e.position,o=i===void 0?xe.Top:i,a=e.isValidConnection,u=a===void 0?QK:a,c=e.isConnectable,d=c===void 0?!0:c,f=e.id,h=e.onConnect,p=e.children,v=e.className,m=e.onMouseDown,y=Hc(e,JK),x=Ft(),b=A.useContext(Ax),w=gt(eY,Xt),S=w.connectionStartHandle,E=w.connectOnClick,_=f||null,R=n==="target",I=function(B){var U=x.getState(),j=U.defaultEdgeOptions,T=U.onConnect,G=U.hasDefaultEdges,z=Om(Om({},j),B);if(G){var X=x.getState(),Z=X.edges;x.setState({edges:gK(z,Z)})}T==null||T(z),h==null||h(z)},N=function(B){B.button===0&&hq({event:B,handleId:_,nodeId:b,onConnect:I,isTarget:R,getState:x.getState,setState:x.setState,isValidConnection:u}),m==null||m(B)},D=function(B){var U=x.getState(),j=U.onClickConnectStart,T=U.onClickConnectStop,G=U.onClickConnectEnd,z=U.connectionMode;if(!S){j==null||j(B,{nodeId:b,handleId:_,handleType:n}),x.setState({connectionStartHandle:{nodeId:b,type:n,handleId:_}});return}var X=Kj(B.target),Z=Lb(B,z,S.type==="target",S.nodeId,S.handleId||null,u,X),re=Z.connection,W=Z.isValid;T==null||T(B),W&&I(re),G==null||G(B),x.setState({connectionStartHandle:null})};return A.createElement("div",Om({"data-handleid":_,"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:(S==null?void 0:S.nodeId)===b&&(S==null?void 0:S.handleId)===_&&(S==null?void 0:S.type)===n}]),onMouseDown:N,onClick:E?D:void 0,ref:t},y),p)});pq.displayName="Handle";var tc=A.memo(pq),vq=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?xe.Top:i,a=t.sourcePosition,u=a===void 0?xe.Bottom:a;return A.createElement(A.Fragment,null,A.createElement(tc,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,A.createElement(tc,{type:"source",position:u,isConnectable:n}))};vq.displayName="DefaultNode";var Bb=A.memo(vq),gq=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?xe.Bottom:i;return A.createElement(A.Fragment,null,r==null?void 0:r.label,A.createElement(tc,{type:"source",position:o,isConnectable:n}))};gq.displayName="InputNode";var mq=A.memo(gq),yq=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?xe.Top:i;return A.createElement(A.Fragment,null,A.createElement(tc,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};yq.displayName="OutputNode";var bq=A.memo(yq),tY=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},rY=function(t,r){var n=t.selectedNodes.map(function(u){return u.id}),i=r.selectedNodes.map(function(u){return u.id}),o=t.selectedEdges.map(function(u){return u.id}),a=r.selectedEdges.map(function(u){return u.id});return Xt(n,i)&&Xt(o,a)};function nY(e){var t=e.onSelectionChange,r=gt(tY,rY),n=r.selectedNodes,i=r.selectedEdges;return A.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var iY=A.memo(nY),oY=function(t){return{setNodes:t.setNodes,setEdges:t.setEdges,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset}};function qn(e,t){A.useEffect(function(){typeof e<"u"&&t(e)},[e])}function nt(e,t,r){A.useEffect(function(){typeof t<"u"&&r(ze({},e,t))},[t])}var aY=function(t){var r=t.nodes,n=t.edges,i=t.defaultNodes,o=t.defaultEdges,a=t.onConnect,u=t.onConnectStart,c=t.onConnectStop,d=t.onConnectEnd,f=t.onClickConnectStart,h=t.onClickConnectStop,p=t.onClickConnectEnd,v=t.nodesDraggable,m=t.nodesConnectable,y=t.minZoom,x=t.maxZoom,b=t.nodeExtent,w=t.onNodesChange,S=t.onEdgesChange,E=t.elementsSelectable,_=t.connectionMode,R=t.snapGrid,I=t.snapToGrid,N=t.translateExtent,D=t.connectOnClick,L=t.defaultEdgeOptions,B=t.fitView,U=t.fitViewOptions,j=t.onNodesDelete,T=t.onEdgesDelete,G=t.onNodeDrag,z=t.onNodeDragStart,X=t.onNodeDragStop,Z=t.onSelectionDrag,re=t.onSelectionDragStart,W=t.onSelectionDragStop,Q=gt(oY,Xt),ue=Q.setNodes,oe=Q.setEdges,H=Q.setDefaultNodesAndEdges,K=Q.setMinZoom,$=Q.setMaxZoom,k=Q.setTranslateExtent,F=Q.setNodeExtent,te=Q.reset,ie=Ft();return A.useEffect(function(){return H(i,o),function(){te()}},[]),nt("defaultEdgeOptions",L,ie.setState),nt("connectionMode",_,ie.setState),nt("onConnect",a,ie.setState),nt("onConnectStart",u,ie.setState),nt("onConnectStop",c,ie.setState),nt("onConnectEnd",d,ie.setState),nt("onClickConnectStart",f,ie.setState),nt("onClickConnectStop",h,ie.setState),nt("onClickConnectEnd",p,ie.setState),nt("nodesDraggable",v,ie.setState),nt("nodesConnectable",m,ie.setState),nt("elementsSelectable",E,ie.setState),nt("snapToGrid",I,ie.setState),nt("snapGrid",R,ie.setState),nt("onNodesChange",w,ie.setState),nt("onEdgesChange",S,ie.setState),nt("connectOnClick",D,ie.setState),nt("fitViewOnInit",B,ie.setState),nt("fitViewOnInitOptions",U,ie.setState),nt("onNodesDelete",j,ie.setState),nt("onEdgesDelete",T,ie.setState),nt("onNodeDrag",G,ie.setState),nt("onNodeDragStart",z,ie.setState),nt("onNodeDragStop",X,ie.setState),nt("onSelectionDrag",Z,ie.setState),nt("onSelectionDragStart",re,ie.setState),nt("onSelectionDragStop",W,ie.setState),qn(r,ue),qn(n,oe),qn(i,ue),qn(o,oe),qn(y,K),qn(x,$),qn(N,k),qn(b,F),null},sY=".react-flow{height:100%;overflow:hidden;position:relative;width:100%}.react-flow__container{height:100%;left:0;position:absolute;top:0;width:100%}.react-flow__pane{z-index:1}.react-flow__viewport{pointer-events:none;transform-origin:0 0;z-index:2}.react-flow__renderer{z-index:4}.react-flow__selectionpane{z-index:5}.react-flow .react-flow__edges{overflow:visible;pointer-events:none}.react-flow .react-flow__connectionline{z-index:1001}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.inactive{pointer-events:none}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edge-path{fill:none}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connection-path{fill:none}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{box-sizing:border-box;pointer-events:all;position:absolute;transform-origin:0 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__nodesselection{pointer-events:none;transform-origin:left top;z-index:3}.react-flow__nodesselection-rect{cursor:-webkit-grab;cursor:grab;pointer-events:all;position:absolute}.react-flow__handle{pointer-events:none;position:absolute}.react-flow__handle.connectable{pointer-events:all}.react-flow__handle-bottom{bottom:-4px;left:50%;top:auto;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{left:-4px;top:50%;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__controls{bottom:20px;left:15px;position:absolute;z-index:5}.react-flow__controls-button{border:none;height:24px;width:24px}.react-flow__controls-button svg{width:100%}.react-flow__minimap{bottom:20px;position:absolute;right:15px;z-index:5}.react-flow__attribution{background:hsla(0,0%,100%,.5);color:#999;font-size:10px;padding:2px 3px;position:absolute;z-index:1000}.react-flow__attribution a{color:#555;text-decoration:none}.react-flow__attribution.top{top:0}.react-flow__attribution.bottom{bottom:0}.react-flow__attribution.left{left:0}.react-flow__attribution.right{right:0}.react-flow__attribution.center{left:50%;transform:translateX(-50%)}",uY=sY,cY=".react-flow__edge.selected .react-flow__edge-path{stroke:#555}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-path{stroke:#b1b1b7;stroke-width:1}.react-flow__edge-text{font-size:10px}.react-flow__edge-textbg{fill:#fff}.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1}.react-flow__node{cursor:-webkit-grab;cursor:grab}.react-flow__node-default,.react-flow__node-group,.react-flow__node-input,.react-flow__node-output{background:#fff;border:1px solid #1a192b;border-radius:3px;color:#222;font-size:12px;padding:10px;text-align:center;width:150px}.react-flow__node-default.selected,.react-flow__node-group.selected,.react-flow__node-input.selected,.react-flow__node-output.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-default .react-flow__handle,.react-flow__node-group .react-flow__handle,.react-flow__node-input .react-flow__handle,.react-flow__node-output .react-flow__handle{background:#1a192b}.react-flow__node-default.selectable:hover,.react-flow__node-group.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px rgba(0,0,0,.08)}.react-flow__node-default.selectable.selected,.react-flow__node-group.selectable.selected,.react-flow__node-input.selectable.selected,.react-flow__node-output.selectable.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background:hsla(0,0%,94%,.25);border-color:#1a192b}.react-flow__nodesselection-rect,.react-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__handle{background:#555;border:1px solid #fff;border-radius:100%;height:6px;width:6px}.react-flow__handle.connectable{cursor:crosshair}.react-flow__minimap{background-color:#fff}.react-flow__controls{box-shadow:0 0 2px 1px rgba(0,0,0,.08)}.react-flow__controls-button{align-items:center;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;cursor:pointer;display:flex;height:16px;justify-content:center;padding:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:16px}.react-flow__controls-button svg{max-height:12px;max-width:12px}.react-flow__controls-button:hover{background:#f4f4f4}",lY=cY,fY=function(t,r,n){return n===xe.Left?t-r:n===xe.Right?t+r:t},dY=function(t,r,n){return n===xe.Top?t-r:n===xe.Bottom?t+r:t},tP=function(t){var r=t.className,n=t.position,i=t.centerX,o=t.centerY,a=t.radius,u=a===void 0?10:a;return A.createElement("circle",{className:cr(["react-flow__edgeupdater",r]),cx:fY(i,u,n),cy:dY(o,u,n),r:u,stroke:"transparent",fill:"transparent"})},Ki=(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,S=n.source,E=n.target,_=n.sourceX,R=n.sourceY,I=n.targetX,N=n.targetY,D=n.sourcePosition,L=n.targetPosition,B=n.elementsSelectable,U=n.hidden,j=n.sourceHandleId,T=n.targetHandleId,G=n.onContextMenu,z=n.onMouseEnter,X=n.onMouseMove,Z=n.onMouseLeave,re=n.edgeUpdaterRadius,W=n.onEdgeUpdate,Q=n.onEdgeUpdateStart,ue=n.onEdgeUpdateEnd,oe=n.markerEnd,H=n.markerStart,K=n.rfId,$=A.useState(!1),k=Be($,2),F=k[0],te=k[1],ie=Ft(),ae=function(tt){var Ct=ie.getState(),Jt=Ct.edges,lr=Ct.addSelectedEdges,Dt=Jt.find(function(xt){return xt.id===i});B&&(ie.setState({nodesSelectionActive:!1}),lr([i])),c==null||c(tt,Dt)},ce=ta(i,ie.getState,d),we=ta(i,ie.getState,G),Se=ta(i,ie.getState,z),_e=ta(i,ie.getState,X),he=ta(i,ie.getState,Z),le=function(tt,Ct){var Jt=Ct?E:S,lr=(Ct?T:j)||null,Dt=Ct?"target":"source",xt=function(){return!0},jt=Ct,Hr=ie.getState().edges.find(function(Ur){return Ur.id===i});Q==null||Q(tt,Hr,Dt);var Yn=ue?function(Ur){return ue(Ur,Hr,Dt)}:void 0,Cn=function(Pi){return W==null?void 0:W(Hr,Pi)};hq({event:tt,handleId:lr,nodeId:Jt,onConnect:Cn,isTarget:jt,getState:ie.getState,setState:ie.setState,isValidConnection:xt,elementEdgeUpdaterType:Dt,onEdgeUpdateEnd:Yn})},Oe=function(tt){return le(tt,!0)},Ne=function(tt){return le(tt,!1)},He=function(){return te(!0)},qe=function(){return te(!1)},Xe=A.useMemo(function(){return"url(#".concat(Db(H,K),")")},[H,K]),We=A.useMemo(function(){return"url(#".concat(Db(oe,K),")")},[oe,K]);if(U)return null;var mt=!B&&!c,et=typeof W<"u",Tt=cr(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:f,animated:h,inactive:mt,updating:F}]);return A.createElement("g",{className:Tt,onClick:ae,onDoubleClick:ce,onContextMenu:we,onMouseEnter:Se,onMouseMove:_e,onMouseLeave:he},A.createElement(e,{id:i,source:S,target:E,selected:f,animated:h,label:p,labelStyle:v,labelShowBg:m,labelBgStyle:y,labelBgPadding:x,labelBgBorderRadius:b,data:u,style:w,sourceX:_,sourceY:R,targetX:I,targetY:N,sourcePosition:D,targetPosition:L,sourceHandleId:j,targetHandleId:T,markerStart:Xe,markerEnd:We,"data-testid":"rf__edge-".concat(i)}),et&&A.createElement("g",{onMouseDown:Oe,onMouseEnter:He,onMouseOut:qe},A.createElement(tP,{position:D,centerX:_,centerY:R,radius:re})),et&&A.createElement("g",{onMouseDown:Ne,onMouseEnter:He,onMouseOut:qe},A.createElement(tP,{position:L,centerX:I,centerY:N,radius:re})))};return t.displayName="EdgeWrapper",A.memo(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 nP(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){ze(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}function hY(e){var t={default:Ki(e.default||kb),straight:Ki(e.bezier||dq),step:Ki(e.step||fq),smoothstep:Ki(e.step||Tx),simplebezier:Ki(e.simplebezier||cq)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=Ki(e[o]||kb),i},r);return nP(nP({},t),n)}function iP(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=((r==null?void 0:r.x)||0)+t.x,i=((r==null?void 0:r.y)||0)+t.y,o=(r==null?void 0:r.width)||t.width,a=(r==null?void 0:r.height)||t.height;switch(e){case xe.Top:return{x:n+o/2,y:i};case xe.Right:return{x:n+o,y:i+a/2};case xe.Bottom:return{x:n+o/2,y:i+a};case xe.Left:return{x:n,y:i+a/2}}}function oP(e,t){if(!e)return null;var r=null;return e.length===1||!t?r=e[0]:t&&(r=e.find(function(n){return n.id===t})),typeof r>"u"?null:r}var pY=function(t,r,n,i,o,a){var u=iP(n,t,r),c=iP(a,i,o);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y}};function vY(e){var t=e.sourcePos,r=e.targetPos,n=e.sourceWidth,i=e.sourceHeight,o=e.targetWidth,a=e.targetHeight,u=e.width,c=e.height,d=e.transform,f={x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x+n,r.x+o),y2:Math.max(t.y+i,r.y+a)};f.x===f.x2&&(f.x2+=1),f.y===f.y2&&(f.y2+=1);var h=Ju({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 aP(e,t){var r,n,i,o,a,u=e.get(t),c=(u==null||(r=u[Pt])===null||r===void 0?void 0:r.handleBounds)||null,d=!u||!c||!u.width||!u.height||typeof((n=u.positionAbsolute)===null||n===void 0?void 0:n.x)>"u"||typeof((i=u.positionAbsolute)===null||i===void 0?void 0:i.y)>"u";return[{x:(u==null||(o=u.positionAbsolute)===null||o===void 0?void 0:o.x)||0,y:(u==null||(a=u.positionAbsolute)===null||a===void 0?void 0:a.y)||0,width:(u==null?void 0:u.width)||0,height:(u==null?void 0:u.height)||0},c,!d]}var gY=typeof document<"u"?document:null,rc=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:gY},r=A.useState(!1),n=Be(r,2),i=n[0],o=n[1],a=A.useRef(new Set([])),u=A.useMemo(function(){if(e!==null){var h=Array.isArray(e)?e:[e],p=h.filter(function(m){return typeof m=="string"}).map(function(m){return m.split("+")}),v=p.reduce(function(m,y){return m.concat.apply(m,di(y))},[]);return[p,v]}return[[],[]]},[e]),c=Be(u,2),d=c[0],f=c[1];return A.useEffect(function(){if(e!==null){var h,p,v=function(b){if(cP(b))return!1;var w=uP(b.code,f);a.current.add(b[w]),sP(d,a.current,!1)&&(b.preventDefault(),o(!0))},m=function(b){if(cP(b))return!1;var w=uP(b.code,f);sP(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 sP(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 uP(e,t){return t.includes(e)?"code":"key"}function cP(e){var t,r=((t=e.composedPath)===null||t===void 0?void 0:t.call(e)[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(r==null?void 0:r.nodeName)||(r==null?void 0:r.hasAttribute("contenteditable"))}var mY=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},yY=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Ft(),i=gt(mY,Xt),o=i.onNodesChange,a=i.onEdgesChange,u=rc(t),c=rc(r);A.useEffect(function(){var d=n.getState(),f=d.nodeInternals,h=d.edges,p=d.hasDefaultNodes,v=d.hasDefaultEdges,m=d.onNodesDelete,y=d.onEdgesDelete,x=Array.from(f.values()),b=x.reduce(function(N,D){return(!D.selected&&D.parentNode&&N.find(function(L){return L.id===D.parentNode})||D.selected)&&N.push(D),N},[]),w=h.filter(function(N){return N.selected});if(u&&(b||w)){var S=rq(b,h),E=[].concat(di(w),di(S)),_=E.reduce(function(N,D){return N.includes(D.id)||N.push(D.id),N},[]);if((v||p)&&(v&&n.setState({edges:h.filter(function(N){return!_.includes(N.id)})}),p&&(b.forEach(function(N){f.delete(N.id)}),n.setState({nodeInternals:new Map(f)}))),_.length>0&&(y==null||y(E),a)){var R=_.map(function(N){return{id:N,type:"remove"}});a(R)}if(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]),A.useEffect(function(){n.setState({multiSelectionActive:c})},[c])});function bY(e){var t=Ft();A.useEffect(function(){var r,n=function(){if(e.current){var o=Ix(e.current);process.env.NODE_ENV==="development"&&(o.height===0||o.width===0)&&console.warn("[React Flow]: The React Flow parent container needs a width and a height to render the graph. Help: https://reactflow.dev/error#400"),t.setState({width:o.width||500,height:o.height||500})}};return n(),window.onresize=n,e.current&&(r=new ResizeObserver(function(){return n()}),r.observe(e.current)),function(){window.onresize=null,r&&e.current&&r.unobserve(e.current)}},[])}var xY=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},Cm=function(t){return{x:t.x,y:t.y,zoom:t.k}},yu=function(t,r){return t.target.closest(".".concat(r))},wY=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},_Y=function(t){var r=t.onMove,n=t.onMoveStart,i=t.onMoveEnd,o=t.zoomOnScroll,a=o===void 0?!0:o,u=t.zoomOnPinch,c=u===void 0?!0:u,d=t.panOnScroll,f=d===void 0?!1:d,h=t.panOnScrollSpeed,p=h===void 0?.5:h,v=t.panOnScrollMode,m=v===void 0?io.Free:v,y=t.zoomOnDoubleClick,x=y===void 0?!0:y,b=t.selectionKeyPressed,w=t.elementsSelectable,S=t.panOnDrag,E=S===void 0?!0:S,_=t.translateExtent,R=t.minZoom,I=t.maxZoom,N=t.defaultZoom,D=N===void 0?1:N,L=t.defaultPosition,B=L===void 0?[0,0]:L,U=t.zoomActivationKeyCode,j=t.preventScrolling,T=j===void 0?!0:j,G=t.children,z=t.noWheelClassName,X=t.noPanClassName,Z=Ft(),re=A.useRef(!1),W=A.useRef(null),Q=A.useRef({x:0,y:0,zoom:0}),ue=gt(wY,Xt),oe=ue.d3Zoom,H=ue.d3Selection,K=ue.d3ZoomHandler,$=rc(U);return bY(W),A.useEffect(function(){if(W.current){var k,F=aK().scaleExtent([R,I]).translateExtent(_),te=Mr(W.current).call(F),ie=oo(B[0],_[0][0],_[1][0]),ae=oo(B[1],_[0][1],_[1][1]),ce=oo(D,R,I),we=fi.translate(ie,ae).scale(ce);F.transform(te,we),Z.setState({d3Zoom:F,d3Selection:te,d3ZoomHandler:te.on("wheel.zoom"),transform:[ie,ae,ce],domNode:(k=te.node())===null||k===void 0?void 0:k.closest(".react-flow")})}},[]),A.useEffect(function(){H&&oe&&(f&&!$?H.on("wheel",function(k){if(yu(k,z))return!1;k.preventDefault(),k.stopImmediatePropagation();var F=H.property("__zoom").k||1;if(k.ctrlKey&&c){var te=Xr(k),ie=-k.deltaY*(k.deltaMode===1?.05:k.deltaMode?1:.002)*10,ae=F*Math.pow(2,ie);oe.scaleTo(H,ae,te);return}var ce=k.deltaMode===1?20:1,we=m===io.Vertical?0:k.deltaX*ce,Se=m===io.Horizontal?0:k.deltaY*ce;oe.translateBy(H,-(we/F)*p,-(Se/F)*p)}).on("wheel.zoom",null):typeof K<"u"&&H.on("wheel",function(k){if(!T||yu(k,z))return null;k.preventDefault()}).on("wheel.zoom",K))},[f,m,H,oe,K,$,c,T,z]),A.useEffect(function(){oe&&(b&&!re.current?oe.on("zoom",null):b||oe.on("zoom",function(k){if(Z.setState({transform:[k.transform.x,k.transform.y,k.transform.k]}),r){var F=Cm(k.transform);r(k.sourceEvent,F)}}))},[b,oe,r]),A.useEffect(function(){oe&&oe.on("start",function(k){if(re.current=!0,n){var F=Cm(k.transform);Q.current=F,n(k.sourceEvent,F)}})},[oe,n]),A.useEffect(function(){oe&&oe.on("end",function(k){if(re.current=!1,i&&xY(Q.current,k.transform)){var F=Cm(k.transform);Q.current=F,i(k.sourceEvent,F)}})},[oe,i]),A.useEffect(function(){oe&&oe.filter(function(k){var F=$||a,te=c&&k.ctrlKey;return!E&&!F&&!f&&!x&&!c||b||!x&&k.type==="dblclick"||yu(k,z)&&k.type==="wheel"||yu(k,X)&&k.type!=="wheel"||!c&&k.ctrlKey&&k.type==="wheel"||!F&&!f&&!te&&k.type==="wheel"||!E&&(k.type==="mousedown"||k.type==="touchstart")?!1:(!k.ctrlKey||k.type==="wheel")&&!k.button})},[oe,a,c,f,x,E,b,w,$]),A.createElement("div",{className:"react-flow__renderer react-flow__container",ref:W},G)};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 fP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dP(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var EY=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},hP={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},SY=A.memo(function(e){var t=e.selectionKeyPressed,r=Ft(),n=A.useRef(0),i=A.useRef(0),o=A.useRef(),a=A.useState(hP),u=Be(a,2),c=u[0],d=u[1],f=gt(EY,Xt),h=f.userSelectionActive,p=f.elementsSelectable,v=h||t;if(!p||!v)return null;var m=function(){d(hP),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},y=function(E){var _=E.target.closest(".react-flow");o.current=_.getBoundingClientRect();var R=dP(E,o.current);d({width:0,height:0,startX:R.x,startY:R.y,x:R.x,y:R.y,draw:!0}),r.setState({userSelectionActive:!0,nodesSelectionActive:!1})},x=function(E){var _,R;if(!(!t||!c.draw||!o.current)){var I=dP(E,o.current),N=(_=c.startX)!==null&&_!==void 0?_:0,D=(R=c.startY)!==null&&R!==void 0?R:0,L=fP(fP({},c),{},{x:I.x<N?I.x:N,y:I.y<D?I.y:D,width:Math.abs(I.x-N),height:Math.abs(I.y-D)}),B=r.getState(),U=B.nodeInternals,j=B.edges,T=B.transform,G=B.onNodesChange,z=B.onEdgesChange,X=Array.from(U.values()),Z=tq(U,L,T,!1,!0),re=rq(Z,j).map(function(oe){return oe.id}),W=Z.map(function(oe){return oe.id});if(n.current!==W.length){n.current=W.length;var Q=Qi(X,W);Q.length&&(G==null||G(Q))}if(i.current!==re.length){i.current=re.length;var ue=Qi(j,re);ue.length&&(z==null||z(ue))}d(L)}},b=function(){r.setState({nodesSelectionActive:n.current>0}),m()},w=function(){r.setState({nodesSelectionActive:!1}),m()};return A.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:y,onMouseMove:x,onMouseUp:b,onMouseLeave:w},c.draw&&A.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:c.width,height:c.height,transform:"translate(".concat(c.x,"px, ").concat(c.y,"px)")}}))});function pP(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 vP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xq(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:xq(r,t):!1}function gP(e,t,r){var n=e;do{var i;if((i=n)!==null&&i!==void 0&&i.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function OY(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!xq(n,e))}).map(function(n){var i,o,a,u;return{id:n.id,position:n.position||{x:0,y:0},positionAbsolute:n.positionAbsolute||{x:0,y:0},distance:{x:t.x-((i=(o=n.positionAbsolute)===null||o===void 0?void 0:o.x)!==null&&i!==void 0?i:0),y:t.y-((a=(u=n.positionAbsolute)===null||u===void 0?void 0:u.y)!==null&&a!==void 0?a:0)},delta:{x:0,y:0},extent:n.extent,parentNode:n.parentNode,width:n.width,height:n.height}})}function CY(e,t,r,n,i,o){var a=Be(n,2),u=a[0],c=a[1],d=e.extent||o,f={x:t.x-e.distance.x,y:t.y-e.distance.y};if(r&&(f.x=u*Math.round(f.x/u),f.y=c*Math.round(f.y/c)),e.extent==="parent")if(e.parentNode&&e.width&&e.height){var h=i.get(e.parentNode);d=h!=null&&h.positionAbsolute&&h!==null&&h!==void 0&&h.width&&h!==null&&h!==void 0&&h.height?[[h.positionAbsolute.x,h.positionAbsolute.y],[h.positionAbsolute.x+h.width-e.width,h.positionAbsolute.y+h.height-e.height]]:d}else process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Only child nodes can use a parent extent. Help: https://reactflow.dev/error#500"),d=o;else if(e.extent&&e.parentNode){var p,v,m,y,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 S={x:0,y:0};if(e.parentNode){var E,_,R,I,N=i.get(e.parentNode);S={x:(E=N==null||(_=N.positionAbsolute)===null||_===void 0?void 0:_.x)!==null&&E!==void 0?E:0,y:(R=N==null||(I=N.positionAbsolute)===null||I===void 0?void 0:I.y)!==null&&R!==void 0?R:0}}return e.positionAbsolute=d?Gj(f,d):f,e.position={x:e.positionAbsolute.x-S.x,y:e.positionAbsolute.y-S.y},e}function Rm(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return vP(vP({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function Im(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function wq(e){var t=e.nodeRef,r=e.disabled,n=r===void 0?!1:r,i=e.noDragClassName,o=e.handleSelector,a=e.nodeId,u=e.isSelectable,c=e.selectNodesOnDrag,d=A.useState(!1),f=Be(d,2),h=f[0],p=f[1],v=Ft(),m=A.useRef(),y=A.useRef({x:null,y:null}),x=A.useCallback(function(b){var w=b.sourceEvent,S=v.getState(),E=S.transform,_=S.snapGrid,R=S.snapToGrid,I=w.touches?w.touches[0].clientX:w.clientX,N=w.touches?w.touches[0].clientY:w.clientY,D=eq({x:I,y:N},E,R,_);return D},[]);return A.useEffect(function(){if(t!=null&&t.current){var b=Mr(t.current);if(n)b.on(".drag",null);else{var w=g8().on("start",function(S){var E=v.getState(),_=E.nodeInternals,R=E.multiSelectionActive,I=E.unselectNodesAndEdges,N=E.onNodeDragStart,D=E.onSelectionDragStart,L=a?N:Im(D);if(!c&&!R&&a){var B;(B=_.get(a))!==null&&B!==void 0&&B.selected||I()}a&&u&&c&&Qj({id:a,store:v});var U=x(S);if(y.current=U,m.current=OY(_,U,a),L&&m.current){var j=Rm({nodeId:a,dragItems:m.current,nodeInternals:_}),T=Be(j,2),G=T[0],z=T[1];L(S.sourceEvent,G,z)}}).on("drag",function(S){var E=v.getState(),_=E.updateNodePositions,R=E.snapToGrid,I=E.snapGrid,N=E.nodeInternals,D=E.nodeExtent,L=E.onNodeDrag,B=E.onSelectionDrag,U=x(S);if((y.current.x!==U.x||y.current.y!==U.y)&&m.current){y.current=U,m.current=m.current.map(function(Z){return CY(Z,U,R,I,N,D)});var j=a?L:Im(B);if(_(m.current,!0,!0),p(!0),j){var T=Rm({nodeId:a,dragItems:m.current,nodeInternals:N}),G=Be(T,2),z=G[0],X=G[1];j(S.sourceEvent,z,X)}}S.on("end",function(Z){if(p(!1),m.current){var re=v.getState(),W=re.updateNodePositions,Q=re.nodeInternals,ue=re.onNodeDragStop,oe=re.onSelectionDragStop,H=a?ue:Im(oe);if(W(m.current,!1,!1),H){var K=Rm({nodeId:a,dragItems:m.current,nodeInternals:Q}),$=Be(K,2),k=$[0],F=$[1];H(Z.sourceEvent,k,F)}}})}).filter(function(S){var E=S.target,_=!S.button&&(!i||!gP(E,".".concat(i),t))&&(!o||gP(E,o,t));return _});return b.call(w),function(){b.on(".drag",null)}}}},[t,n,i,o,u,v,a,c,x]),h}function mP(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?mP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var IY=function(t){return RY({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},Px(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},PY=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return Px(r)};function NY(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Ft(),i=gt(IY,Xt),o=i.transformString,a=i.userSelectionActive,u=gt(PY,Xt),c=u.width,d=u.height,f=u.x,h=u.y,p=A.useRef(null);if(wq({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 A.createElement("div",{className:cr(["react-flow__nodesselection","react-flow__container",r]),style:{transform:o}},A.createElement("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:v,style:{width:c,height:d,top:h,left:f}}))}var TY=A.memo(NY),AY=function(t){return t.nodesSelectionActive},_q=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,S=t.zoomOnDoubleClick,E=t.panOnDrag,_=t.translateExtent,R=t.minZoom,I=t.maxZoom,N=t.defaultZoom,D=t.defaultPosition,L=t.preventScrolling,B=t.onSelectionContextMenu,U=t.noWheelClassName,j=t.noPanClassName,T=Ft(),G=gt(AY),z=rc(f);yY({deleteKeyCode:a,multiSelectionKeyCode:h});var X=function(Q){n==null||n(Q),T.getState().resetSelectedElements(),T.setState({nodesSelectionActive:!1})},Z=i?function(W){return i(W)}:void 0,re=o?function(W){return o(W)}:void 0;return A.createElement(_Y,{onMove:u,onMoveStart:c,onMoveEnd:d,selectionKeyPressed:z,elementsSelectable:v,zoomOnScroll:m,zoomOnPinch:y,panOnScroll:x,panOnScrollSpeed:b,panOnScrollMode:w,zoomOnDoubleClick:S,panOnDrag:E,translateExtent:_,minZoom:R,maxZoom:I,defaultZoom:N,defaultPosition:D,zoomActivationKeyCode:p,preventScrolling:L,noWheelClassName:U,noPanClassName:j},r,A.createElement(SY,{selectionKeyPressed:z}),G&&A.createElement(TY,{onSelectionContextMenu:B,noPanClassName:j}),A.createElement("div",{className:"react-flow__pane react-flow__container",onClick:X,onContextMenu:Z,onWheel:re}))};_q.displayName="FlowRenderer";var MY=A.memo(_q);function DY(e){var t=gt(A.useCallback(function(r){return e?tq(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var jY=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},Eq=function(t){var r=gt(jY,Xt),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,u=DY(t.onlyRenderVisibleElements),c=A.useRef(),d=A.useMemo(function(){if(typeof ResizeObserver>"u")return null;var f=new ResizeObserver(function(h){var p=h.map(function(v){return{id:v.target.getAttribute("data-id"),nodeElement:v.target,forceUpdate:!0}});a(p)});return c.current=f,f},[]);return A.useEffect(function(){return function(){var f;c==null||(f=c.current)===null||f===void 0||f.disconnect()}},[]),A.createElement("div",{className:"react-flow__nodes react-flow__container"},u.map(function(f){var h,p,v,m,y,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 S=t.nodeTypes[w]||t.nodeTypes.default,E=!!(f.draggable||n&&typeof f.draggable>"u"),_=!!(f.selectable||o&&typeof f.selectable>"u"),R=!!(f.connectable||i&&typeof f.connectable>"u");return A.createElement(S,{key:f.id,id:f.id,className:f.className,style:f.style,type:w,data:f.data,sourcePosition:f.sourcePosition||xe.Bottom,targetPosition:f.targetPosition||xe.Top,hidden:f.hidden,xPos:(h=(p=f.positionAbsolute)===null||p===void 0?void 0:p.x)!==null&&h!==void 0?h:0,yPos:(v=(m=f.positionAbsolute)===null||m===void 0?void 0:m.y)!==null&&v!==void 0?v:0,selectNodesOnDrag:t.selectNodesOnDrag,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,selected:!!f.selected,isDraggable:E,isSelectable:_,isConnectable:R,resizeObserver:d,dragHandle:f.dragHandle,zIndex:(y=(x=f[Pt])===null||x===void 0?void 0:x.z)!==null&&y!==void 0?y:0,isParent:!!((b=f[Pt])!==null&&b!==void 0&&b.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!f.width&&!!f.height})}))};Eq.displayName="NodeRenderer";var qY=A.memo(Eq),Yi;function yP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var kY=(Yi={},ze(Yi,xe.Left,xe.Right),ze(Yi,xe.Right,xe.Left),ze(Yi,xe.Top,xe.Bottom),ze(Yi,xe.Bottom,xe.Top),Yi),LY=(function(e){var t,r,n,i,o,a=e.connectionNodeId,u=e.connectionHandleType,c=e.connectionLineStyle,d=e.connectionLineType,f=d===void 0?$n.Bezier:d,h=e.isConnectable,p=e.CustomConnectionLineComponent,v=gt(A.useCallback(function(re){return{fromNode:re.nodeInternals.get(a),handleId:re.connectionHandleId,toX:(re.connectionPosition.x-re.transform[0])/re.transform[2],toY:(re.connectionPosition.y-re.transform[1])/re.transform[2]}},[a]),Xt),m=v.fromNode,y=v.handleId,x=v.toX,b=v.toY,w=m==null||(t=m[Pt])===null||t===void 0?void 0:t.handleBounds;if(!m||!h||!(w!=null&&w[u]))return null;var S=w[u],E=y?S.find(function(re){return re.id===y}):S[0],_=E?E.x+E.width/2:((r=m==null?void 0:m.width)!==null&&r!==void 0?r:0)/2,R=E?E.y+E.height/2:(n=m==null?void 0:m.height)!==null&&n!==void 0?n:0,I=((m==null||(i=m.positionAbsolute)===null||i===void 0?void 0:i.x)||0)+_,N=((m==null||(o=m.positionAbsolute)===null||o===void 0?void 0:o.y)||0)+R,D=E==null?void 0:E.position;if(!D)return null;var L=kY[D],B,U,j,T,G,z;switch(u){case"source":B=I,U=N,j=D,T=x,G=b,z=L;break;case"target":B=x,U=b,j=L,T=I,G=N,z=D;break}if(p)return A.createElement("g",{className:"react-flow__connection"},A.createElement(p,{connectionLineType:f,connectionLineStyle:c,fromNode:m,fromHandle:E,fromX:I,fromY:N,toX:x,toY:b,fromPosition:D,toPosition:L,sourcePosition:j,targetPosition:z,sourceNode:m,sourceHandle:E,targetX:T,targetY:G,sourceX:B,sourceY:U}));var X="",Z={sourceX:B,sourceY:U,sourcePosition:j,targetX:T,targetY:G,targetPosition:z};return f===$n.Bezier?X=Vc(Z):f===$n.Step?X=qb(bP(bP({},Z),{},{borderRadius:0})):f===$n.SmoothStep?X=qb(Z):f===$n.SimpleBezier?X=uq(Z):X="M".concat(B,",").concat(U," ").concat(T,",").concat(G),A.createElement("g",{className:"react-flow__connection"},A.createElement("path",{d:X,className:"react-flow__connection-path",style:c}))});function Fb(e){"@babel/helpers - typeof";return Fb=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},Fb(e)}var bu,BY=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return A.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:"none",points:"-5,-4 0,0 -5,4"})},FY=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return A.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},xP=(bu={},ze(bu,Zu.Arrow,BY),ze(bu,Zu.ArrowClosed,FY),bu);function $Y(e){var t=A.useMemo(function(){var r=xP.hasOwnProperty(e);return r?xP[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 wP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wP(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var HY=function(t){var r=t.id,n=t.type,i=t.color,o=t.width,a=o===void 0?12.5:o,u=t.height,c=u===void 0?12.5:u,d=t.markerUnits,f=d===void 0?"strokeWidth":d,h=t.strokeWidth,p=t.orient,v=p===void 0?"auto":p,m=$Y(n);return A.createElement("marker",{className:"react-flow__arrowhead",id:r,markerWidth:"".concat(a),markerHeight:"".concat(c),viewBox:"-10 -10 20 20",markerUnits:f,orient:v,refX:"0",refY:"0"},A.createElement(m,{color:i,strokeWidth:h}))},UY=function(t){var r=t.defaultColor,n=t.rfId;return function(i){var o=[];return i.edges.reduce(function(a,u){return[u.markerStart,u.markerEnd].forEach(function(c){if(c&&Fb(c)==="object"){var d=Db(c,n);o.includes(d)||(a.push(zY({id:d,color:c.color||r},c)),o.push(d))}}),a},[]).sort(function(a,u){return a.id.localeCompare(u.id)})}},Sq=function(t){var r=t.defaultColor,n=t.rfId,i=gt(A.useCallback(UY({defaultColor:r,rfId:n}),[r,n]),function(o,a){return!(o.length!==a.length||o.some(function(u,c){return u.id!==a[c].id}))});return A.createElement("defs",null,i.map(function(o){return A.createElement(HY,{id:o.id,key:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient})}))};Sq.displayName="MarkerDefinitions";var VY=A.memo(Sq),WY=[{level:0,isMaxLevel:!0,edges:[]}];function GY(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,u){var c=Yj(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[Pt])===null||h===void 0?void 0:h.z)||0,((p=t.get(u.target))===null||p===void 0||(v=p[Pt])===null||v===void 0?void 0:v.z)||0)}return a[d]?a[d].push(u):a[d]=[u],n=d>n?d:n,a},{}),o=Object.entries(i).map(function(a){var u=Be(a,2),c=u[0],d=u[1],f=+c;return{edges:d,level:f,isMaxLevel:f===n}});return o.length===0?WY:o}function KY(e,t,r){var n=gt(A.useCallback(function(i){return e?i.edges.filter(function(o){var a=t.get(o.source),u=t.get(o.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(u==null?void 0:u.width)&&(u==null?void 0:u.height)&&vY({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:u.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:u.width,targetHeight:u.height,width:i.width,height:i.height,transform:i.transform})}):i.edges},[e,t]));return GY(n,t,r)}var YY=function(t){return{connectionNodeId:t.connectionNodeId,connectionHandleType:t.connectionHandleType,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,width:t.width,height:t.height,connectionMode:t.connectionMode,nodeInternals:t.nodeInternals}},Oq=function(t){var r=gt(YY,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=KY(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 A.createElement(A.Fragment,null,h.map(function(w){var S=w.level,E=w.edges,_=w.isMaxLevel;return A.createElement("svg",{key:S,style:{zIndex:S},width:u,height:c,className:"react-flow__edges react-flow__container"},_&&A.createElement(VY,{defaultColor:v,rfId:t.rfId}),A.createElement("g",null,E.map(function(R){var I=aP(f,R.source),N=Be(I,3),D=N[0],L=N[1],B=N[2],U=aP(f,R.target),j=Be(U,3),T=j[0],G=j[1],z=j[2];if(!B||!z)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,re=d===mo.Strict?G.target:G.target||G.source,W=oP(L.source,R.sourceHandle||null),Q=oP(re,R.targetHandle||null),ue=(W==null?void 0:W.position)||xe.Bottom,oe=(Q==null?void 0:Q.position)||xe.Top;if(!W)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for source handle id: ".concat(R.sourceHandle,"; edge id: ").concat(R.id,". Help: https://reactflow.dev/error#800")),null;if(!Q)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for target handle id: ".concat(R.targetHandle,"; edge id: ").concat(R.id,". Help: https://reactflow.dev/error#800")),null;var H=pY(D,W,ue,T,Q,oe),K=H.sourceX,$=H.sourceY,k=H.targetX,F=H.targetY;return A.createElement(Z,{key:R.id,id:R.id,className:cr([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:F,sourcePosition:ue,targetPosition:oe,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&&A.createElement("svg",{style:x,width:u,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},A.createElement(LY,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:m,connectionLineType:p,isConnectable:o,CustomConnectionLineComponent:y})))};Oq.displayName="EdgeRenderer";var XY=A.memo(Oq),ZY=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function JY(e){var t=e.children,r=gt(ZY);return A.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function QY(e){var t=aq(),r=A.useRef(!1);A.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var Cq=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,S=t.connectionLineComponent,E=t.connectionLineContainerStyle,_=t.selectionKeyCode,R=t.multiSelectionKeyCode,I=t.zoomActivationKeyCode,N=t.deleteKeyCode,D=t.onlyRenderVisibleElements,L=t.elementsSelectable,B=t.selectNodesOnDrag,U=t.translateExtent,j=t.minZoom,T=t.maxZoom,G=t.defaultZoom,z=t.defaultPosition,X=t.preventScrolling,Z=t.defaultMarkerColor,re=t.zoomOnScroll,W=t.zoomOnPinch,Q=t.panOnScroll,ue=t.panOnScrollSpeed,oe=t.panOnScrollMode,H=t.zoomOnDoubleClick,K=t.panOnDrag,$=t.onPaneClick,k=t.onPaneScroll,F=t.onPaneContextMenu,te=t.onEdgeUpdate,ie=t.onEdgeContextMenu,ae=t.onEdgeMouseEnter,ce=t.onEdgeMouseMove,we=t.onEdgeMouseLeave,Se=t.edgeUpdaterRadius,_e=t.onEdgeUpdateStart,he=t.onEdgeUpdateEnd,le=t.noDragClassName,Oe=t.noWheelClassName,Ne=t.noPanClassName,He=t.elevateEdgesOnSelect,qe=t.id;return QY(u),A.createElement(MY,{onPaneClick:$,onPaneContextMenu:F,onPaneScroll:k,deleteKeyCode:N,selectionKeyCode:_,multiSelectionKeyCode:R,zoomActivationKeyCode:I,elementsSelectable:L,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:re,zoomOnPinch:W,zoomOnDoubleClick:H,panOnScroll:Q,panOnScrollSpeed:ue,panOnScrollMode:oe,panOnDrag:K,translateExtent:U,minZoom:j,maxZoom:T,defaultZoom:G,defaultPosition:z,onSelectionContextMenu:x,preventScrolling:X,noDragClassName:le,noWheelClassName:Oe,noPanClassName:Ne},A.createElement(JY,null,A.createElement(XY,{edgeTypes:n,onEdgeClick:d,onEdgeDoubleClick:h,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:S,connectionLineContainerStyle:E,onEdgeUpdate:te,onlyRenderVisibleElements:D,onEdgeContextMenu:ie,onEdgeMouseEnter:ae,onEdgeMouseMove:ce,onEdgeMouseLeave:we,onEdgeUpdateStart:_e,onEdgeUpdateEnd:he,edgeUpdaterRadius:Se,defaultMarkerColor:Z,noPanClassName:Ne,elevateEdgesOnSelect:!!He,rfId:qe}),A.createElement(qY,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:f,onNodeMouseEnter:p,onNodeMouseMove:v,onNodeMouseLeave:m,onNodeContextMenu:y,selectNodesOnDrag:B,onlyRenderVisibleElements:D,noPanClassName:Ne,noDragClassName:le})))};Cq.displayName="GraphView";var e9=A.memo(Cq),Rq=function(){return null};Rq.displayName="GroupNode";function _P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_P(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_P(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ra=(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,S=n.isSelectable,E=n.isConnectable,_=n.selectNodesOnDrag,R=n.sourcePosition,I=n.targetPosition,N=n.hidden,D=n.resizeObserver,L=n.dragHandle,B=n.zIndex,U=n.isParent,j=n.noPanClassName,T=n.noDragClassName,G=n.initialized,z=Ft(),X=A.useRef(null),Z=A.useRef(R),re=A.useRef(I),W=A.useRef(o),Q=S||w||f||h||p||v,ue=ea(i,z.getState,h),oe=ea(i,z.getState,p),H=ea(i,z.getState,v),K=ea(i,z.getState,m),$=ea(i,z.getState,y),k=function(ie){if(S&&(!_||!w)&&Qj({id:i,store:z}),f){var ae=z.getState().nodeInternals.get(i);f(ie,EP({},ae))}};A.useEffect(function(){if(X.current&&!N){var te=X.current;return D==null||D.observe(te),function(){return D==null?void 0:D.unobserve(te)}}},[N]),A.useEffect(function(){var te=W.current!==o,ie=Z.current!==R,ae=re.current!==I;X.current&&(te||ie||ae)&&(te&&(W.current=o),ie&&(Z.current=R),ae&&(re.current=I),z.getState().updateNodeDimensions([{id:i,nodeElement:X.current,forceUpdate:!0}]))},[i,o,R,I]);var F=wq({nodeRef:X,disabled:N||!w,noDragClassName:T,handleSelector:L,nodeId:i,isSelectable:S,selectNodesOnDrag:_});return N?null:A.createElement("div",{className:cr(["react-flow__node","react-flow__node-".concat(o),j,b,{selected:d,selectable:S,parent:U}]),ref:X,style:EP({zIndex:B,transform:"translate(".concat(u,"px,").concat(c,"px)"),pointerEvents:Q?"all":"none",visibility:G?"visible":"hidden"},x),onMouseEnter:ue,onMouseMove:oe,onMouseLeave:H,onContextMenu:K,onClick:k,onDoubleClick:$,"data-testid":"rf__node-".concat(i),"data-id":i},A.createElement(ZK,{value:i},A.createElement(e,{id:i,data:a,type:o,xPos:u,yPos:c,selected:d,isConnectable:E,sourcePosition:R,targetPosition:I,dragging:F,dragHandle:L,zIndex:B})))};return t.displayName="NodeWrapper",A.memo(t)});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){ze(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 t9(e){var t={input:ra(e.input||mq),default:ra(e.default||Bb),output:ra(e.output||bq),group:ra(e.group||Rq)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=ra(e[o]||Bb),i},r);return OP(OP({},t),n)}function CP(e,t){var r=A.useRef(null),n=A.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 RP(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 Iq=function(t){var r=t.children,n=!0;try{Ft()}catch{n=!1}return n?A.createElement(A.Fragment,null,r):A.createElement(bK,{createStore:xK},r)};Iq.displayName="ReactFlowWrapper";var r9=["nodes","edges","defaultNodes","defaultEdges","className","nodeTypes","edgeTypes","onNodeClick","onEdgeClick","onInit","onMove","onMoveStart","onMoveEnd","onConnect","onConnectStart","onConnectStop","onConnectEnd","onClickConnectStart","onClickConnectStop","onClickConnectEnd","onNodeMouseEnter","onNodeMouseMove","onNodeMouseLeave","onNodeContextMenu","onNodeDoubleClick","onNodeDragStart","onNodeDrag","onNodeDragStop","onNodesDelete","onEdgesDelete","onSelectionChange","onSelectionDragStart","onSelectionDrag","onSelectionDragStop","onSelectionContextMenu","connectionMode","connectionLineType","connectionLineStyle","connectionLineComponent","connectionLineContainerStyle","deleteKeyCode","selectionKeyCode","multiSelectionKeyCode","zoomActivationKeyCode","snapToGrid","snapGrid","onlyRenderVisibleElements","selectNodesOnDrag","nodesDraggable","nodesConnectable","elementsSelectable","minZoom","maxZoom","defaultZoom","defaultPosition","translateExtent","preventScrolling","nodeExtent","defaultMarkerColor","zoomOnScroll","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnScrollMode","zoomOnDoubleClick","panOnDrag","onPaneClick","onPaneScroll","onPaneContextMenu","children","onEdgeUpdate","onEdgeContextMenu","onEdgeDoubleClick","onEdgeMouseEnter","onEdgeMouseMove","onEdgeMouseLeave","onEdgeUpdateStart","onEdgeUpdateEnd","edgeUpdaterRadius","onNodesChange","onEdgesChange","noDragClassName","noWheelClassName","noPanClassName","fitView","fitViewOptions","connectOnClick","attributionPosition","proOptions","defaultEdgeOptions","elevateEdgesOnSelect"];function 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){ze(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}RP(uY),RP(lY);var n9={input:mq,default:Bb,output:bq},i9={default:kb,straight:dq,step:fq,smoothstep:Tx,simplebezier:cq},o9=[15,15],a9=[0,0],Pq=A.forwardRef(function(e,t){var r=e.nodes,n=e.edges,i=e.defaultNodes,o=e.defaultEdges,a=e.className,u=e.nodeTypes,c=u===void 0?n9:u,d=e.edgeTypes,f=d===void 0?i9:d,h=e.onNodeClick,p=e.onEdgeClick,v=e.onInit,m=e.onMove,y=e.onMoveStart,x=e.onMoveEnd,b=e.onConnect,w=e.onConnectStart,S=e.onConnectStop,E=e.onConnectEnd,_=e.onClickConnectStart,R=e.onClickConnectStop,I=e.onClickConnectEnd,N=e.onNodeMouseEnter,D=e.onNodeMouseMove,L=e.onNodeMouseLeave,B=e.onNodeContextMenu,U=e.onNodeDoubleClick,j=e.onNodeDragStart,T=e.onNodeDrag,G=e.onNodeDragStop,z=e.onNodesDelete,X=e.onEdgesDelete,Z=e.onSelectionChange,re=e.onSelectionDragStart,W=e.onSelectionDrag,Q=e.onSelectionDragStop,ue=e.onSelectionContextMenu,oe=e.connectionMode,H=oe===void 0?mo.Strict:oe,K=e.connectionLineType,$=K===void 0?$n.Bezier:K,k=e.connectionLineStyle,F=e.connectionLineComponent,te=e.connectionLineContainerStyle,ie=e.deleteKeyCode,ae=ie===void 0?"Backspace":ie,ce=e.selectionKeyCode,we=ce===void 0?"Shift":ce,Se=e.multiSelectionKeyCode,_e=Se===void 0?"Meta":Se,he=e.zoomActivationKeyCode,le=he===void 0?"Meta":he,Oe=e.snapToGrid,Ne=Oe===void 0?!1:Oe,He=e.snapGrid,qe=He===void 0?o9:He,Xe=e.onlyRenderVisibleElements,We=Xe===void 0?!1:Xe,mt=e.selectNodesOnDrag,et=mt===void 0?!0:mt,Tt=e.nodesDraggable,ut=e.nodesConnectable,tt=e.elementsSelectable,Ct=e.minZoom,Jt=Ct===void 0?.5:Ct,lr=e.maxZoom,Dt=lr===void 0?2:lr,xt=e.defaultZoom,jt=xt===void 0?1:xt,Hr=e.defaultPosition,Yn=Hr===void 0?a9:Hr,Cn=e.translateExtent,Ur=Cn===void 0?jb:Cn,Pi=e.preventScrolling,vl=Pi===void 0?!0:Pi,ts=e.nodeExtent,No=e.defaultMarkerColor,gl=No===void 0?"#b1b1b7":No,rs=e.zoomOnScroll,ml=rs===void 0?!0:rs,ns=e.zoomOnPinch,is=ns===void 0?!0:ns,os=e.panOnScroll,yl=os===void 0?!1:os,as=e.panOnScrollSpeed,To=as===void 0?.5:as,ss=e.panOnScrollMode,Ao=ss===void 0?io.Free:ss,us=e.zoomOnDoubleClick,bl=us===void 0?!0:us,cs=e.panOnDrag,xl=cs===void 0?!0:cs,wl=e.onPaneClick,_l=e.onPaneScroll,El=e.onPaneContextMenu,Sl=e.children,ls=e.onEdgeUpdate,Ol=e.onEdgeContextMenu,Cl=e.onEdgeDoubleClick,Rl=e.onEdgeMouseEnter,Il=e.onEdgeMouseMove,Pl=e.onEdgeMouseLeave,Nl=e.onEdgeUpdateStart,Ni=e.onEdgeUpdateEnd,fs=e.edgeUpdaterRadius,Ti=fs===void 0?10:fs,Tl=e.onNodesChange,Al=e.onEdgesChange,ds=e.noDragClassName,hs=ds===void 0?"nodrag":ds,Mo=e.noWheelClassName,ps=Mo===void 0?"nowheel":Mo,vs=e.noPanClassName,Ml=vs===void 0?"nopan":vs,gs=e.fitView,Dl=gs===void 0?!1:gs,ms=e.fitViewOptions,Do=e.connectOnClick,ys=Do===void 0?!0:Do,jo=e.attributionPosition,jl=e.proOptions,bs=e.defaultEdgeOptions,Xn=e.elevateEdgesOnSelect,xs=Xn===void 0?!1:Xn,Ai=Hc(e,r9),ws=CP(c,t9),_s=CP(f,hY);return A.createElement("div",PP(PP({},Ai),{},{ref:t,className:cr(["react-flow",a])}),A.createElement(Iq,null,A.createElement(e9,{onInit:v,onMove:m,onMoveStart:y,onMoveEnd:x,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:N,onNodeMouseMove:D,onNodeMouseLeave:L,onNodeContextMenu:B,onNodeDoubleClick:U,nodeTypes:ws,edgeTypes:_s,connectionLineType:$,connectionLineStyle:k,connectionLineComponent:F,connectionLineContainerStyle:te,selectionKeyCode:we,deleteKeyCode:ae,multiSelectionKeyCode:_e,zoomActivationKeyCode:le,onlyRenderVisibleElements:We,selectNodesOnDrag:et,translateExtent:Ur,minZoom:Jt,maxZoom:Dt,defaultZoom:jt,defaultPosition:Yn,preventScrolling:vl,zoomOnScroll:ml,zoomOnPinch:is,zoomOnDoubleClick:bl,panOnScroll:yl,panOnScrollSpeed:To,panOnScrollMode:Ao,panOnDrag:xl,onPaneClick:wl,onPaneScroll:_l,onPaneContextMenu:El,onSelectionContextMenu:ue,onEdgeUpdate:ls,onEdgeContextMenu:Ol,onEdgeDoubleClick:Cl,onEdgeMouseEnter:Rl,onEdgeMouseMove:Il,onEdgeMouseLeave:Pl,onEdgeUpdateStart:Nl,onEdgeUpdateEnd:Ni,edgeUpdaterRadius:Ti,defaultMarkerColor:gl,noDragClassName:hs,noWheelClassName:ps,noPanClassName:Ml,elevateEdgesOnSelect:xs,id:Ai==null?void 0:Ai.id}),A.createElement(aY,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:b,onConnectStart:w,onConnectStop:S,onConnectEnd:E,onClickConnectStart:_,onClickConnectStop:R,onClickConnectEnd:I,nodesDraggable:Tt,nodesConnectable:ut,elementsSelectable:tt,minZoom:Jt,maxZoom:Dt,nodeExtent:ts,onNodesChange:Tl,onEdgesChange:Al,snapToGrid:Ne,snapGrid:qe,connectionMode:H,translateExtent:Ur,connectOnClick:ys,defaultEdgeOptions:bs,fitView:Dl,fitViewOptions:ms,onNodesDelete:z,onEdgesDelete:X,onNodeDragStart:j,onNodeDrag:T,onNodeDragStop:G,onSelectionDrag:W,onSelectionDragStart:re,onSelectionDragStop:Q}),Z&&A.createElement(iY,{onSelectionChange:Z}),Sl,A.createElement(HK,{proOptions:jl,position:jo})))});Pq.displayName="ReactFlow";function Nq(e){return function(t){var r=A.useState(t),n=Be(r,2),i=n[0],o=n[1],a=A.useCallback(function(u){return o(function(c){return e(u,c)})},[]);return[i,o,a]}}var s9=Nq(Zj),u9=Nq(dK);function NP(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 TP(e,t){const r={...e.positionAbsolute,...e},n=Math.round(r.x),i=Math.round(r.y),o=Math.round(t.x),a=Math.round(t.y);return o<=n+1?xe.Left:o>=n+r.width-1?xe.Right:a<=i+1?xe.Top:a>=r.y+r.height-1?xe.Bottom:xe.Top}function Tq(e,t){const r=NP(e,t),n=NP(t,e),i=TP(e,r),o=TP(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const c9=({targetX:e,targetY:t,sourcePosition:r,targetPosition:n,sourceNode:i})=>{if(!i)return null;const o={id:"connection-target",width:1,height:1,position:{x:e,y:t}},{sx:a,sy:u}=Tq(i,o),c=Vc({sourceX:a,sourceY:u,sourcePosition:r,targetPosition:n,targetX:e,targetY:t});return C.jsxs("g",{children:[C.jsx("path",{fill:"none",stroke:"#222",strokeWidth:1.5,className:"animated",d:c}),C.jsx("circle",{cx:e,cy:t,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})},l9=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=gt(A.useCallback(m=>m.nodeInternals.get(t),[t])),a=gt(A.useCallback(m=>m.nodeInternals.get(r),[r]));if(!o||!a)return null;const{sx:u,sy:c,tx:d,ty:f,sourcePos:h,targetPos:p}=Tq(o,a),v=Vc({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})},AP=172,MP=36,f9={custom:l9},d9=(e,t,r="LR")=>{const n=new mI.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:AP,height:MP})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),mI.layout(n),e.forEach(o=>{const a=n.node(o.id);return o.targetPosition=i?xe.Left:xe.Top,o.sourcePosition=i?xe.Right:xe.Bottom,o.position={x:a.x-AP/2,y:a.y-MP/2},o}),{nodes:e,edges:t}},h9=()=>{},p9=({data:e,dict:t,onSelect:r=h9})=>{const{nodes:n,edges:i}=d9(Object.values(t).filter(h=>h.id===e.selected||e.parents.flat().includes(h.id)||e.children.flat().includes(h.id)).map(h=>({id:h.id,type:h.parents.length===0?"input":h.includes.length===0?"output":"default",sourcePosition:xe.Right,targetPosition:xe.Left,data:{label:h.privilege},position:{x:0,y:0},className:h.id===e.selected?"highlighted":"",selected:h.id===e.selected})),e.links.map(({source:h,target:p})=>({id:`e${h}-${p}`,source:h,target:p}))),[o,a,u]=s9(n),[c,d,f]=u9(i);return A.useEffect(()=>{a([...n]),d([...i])},[e]),C.jsx(Pq,{nodes:o,edges:c,fitView:!0,onNodesChange:u,onEdgesChange:f,onNodeClick:(h,p)=>{r(p.id)},defaultZoom:.5,edgeTypes:f9,connectionLineComponent:c9,children:C.jsx($K,{variant:mi.Dots,color:"#81818140",gap:18,size:1})})};var Aq=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(Aq||{});const Mq=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}},DP=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[Aq[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=Mq(a.applyTo)),n.push(c)}});return n},v9=(e=[],t)=>{var n;const r=[];for(const i of e)(n=i.methods)==null||n.forEach(o=>{(`${i.name.toLowerCase()}.${o.name.toLowerCase()}`.includes(t)||!t)&&r.push({applyTo:`${i.name}.${o.name}`,type:J.EPermissionType.SINGLETON_METHOD})});return r};function Mx(e,t=[],r=[],n=[]){const i=DP(r,e,J.EPermissionType.ATTRIBUTE),o=DP(r,e,J.EPermissionType.METHOD),a=v9(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 S=v.indexOf(b.type),E=v.indexOf(w.type);return S>E?1:-1}),x.type=y?x.type:p.type,[...h].sort((b,w)=>{const S=v.indexOf(b.type),E=v.indexOf(w.type);return S>E?1:-1})):[...h,{prefix:m,type:y?null:p.type,resources:[p]}]},[]).reduce((h,p)=>[...h,...p.resources],[])}const g9=(e=[],t=[],r=[])=>{const n=Mx("",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},Dq=(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:Mq(h)}}return o})}}),r},jq=(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}),{}),Pm=({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"})})})]})},m9=({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(Pm,{child:f,parent:e,status:"included",onSelect:r,currentPrivilegeId:f.id},f.id)),d.map(f=>C.jsx(Pm,{child:f,parent:e,status:"available",onSelect:r,currentPrivilegeId:f.id},f.id)),c.map(f=>C.jsx(Pm,{child:f,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:f.id},f.id))]})]})};function xr(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 qq(e,t=[]){let r=[];function n(o,a){const u=ve.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=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[c])||u,m=ve.useContext(v);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[d,f]}const i=()=>{const o=r.map(a=>ve.createContext(a));return function(u){const c=(u==null?void 0:u[e])||o;return ve.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return i.scopeName=e,[n,y9(i,...t)]}function y9(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=n.reduce((u,{useScope:c,scopeName:d})=>{const h=c(o)[`__scope${d}`];return{...u,...h}},{});return ve.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var yi=globalThis!=null&&globalThis.document?ve.useLayoutEffect:()=>{},b9=ve[" useInsertionEffect ".trim().toString()]||yi;function x9({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,a]=w9({defaultProp:t,onChange:r}),u=e!==void 0,c=u?e:i;{const f=ve.useRef(e!==void 0);ve.useEffect(()=>{const h=f.current;h!==u&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=u},[u,n])}const d=ve.useCallback(f=>{var h;if(u){const p=_9(f)?f(e):f;p!==e&&((h=a.current)==null||h.call(a,p))}else o(f)},[u,e,o,a]);return[c,d]}function w9({defaultProp:e,onChange:t}){const[r,n]=ve.useState(e),i=ve.useRef(r),o=ve.useRef(t);return b9(()=>{o.current=t},[t]),ve.useEffect(()=>{var a;i.current!==r&&((a=o.current)==null||a.call(o,r),i.current=r)},[r,i]),[r,n,o]}function _9(e){return typeof e=="function"}function jP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function kq(...e){return t=>{let r=!1;const n=e.map(i=>{const o=jP(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():jP(e[i],null)}}}}function So(...e){return ve.useCallback(kq(...e),e)}const E9=["top","right","bottom","left"],zn=Math.min,or=Math.max,nc=Math.round,xu=Math.floor,tn=e=>({x:e,y:e}),S9={left:"right",right:"left",bottom:"top",top:"bottom"},O9={start:"end",end:"start"};function $b(e,t,r){return or(e,zn(t,r))}function wn(e,t){return typeof e=="function"?e(t):e}function _n(e){return e.split("-")[0]}function Oo(e){return e.split("-")[1]}function Dx(e){return e==="x"?"y":"x"}function jx(e){return e==="y"?"height":"width"}const C9=new Set(["top","bottom"]);function Jr(e){return C9.has(_n(e))?"y":"x"}function qx(e){return Dx(Jr(e))}function R9(e,t,r){r===void 0&&(r=!1);const n=Oo(e),i=qx(e),o=jx(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ic(a)),[a,ic(a)]}function I9(e){const t=ic(e);return[zb(e),t,zb(t)]}function zb(e){return e.replace(/start|end/g,t=>O9[t])}const qP=["left","right"],kP=["right","left"],P9=["top","bottom"],N9=["bottom","top"];function T9(e,t,r){switch(e){case"top":case"bottom":return r?t?kP:qP:t?qP:kP;case"left":case"right":return t?P9:N9;default:return[]}}function A9(e,t,r,n){const i=Oo(e);let o=T9(_n(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(zb)))),o}function ic(e){return e.replace(/left|right|bottom|top/g,t=>S9[t])}function M9(e){return{top:0,right:0,bottom:0,left:0,...e}}function Lq(e){return typeof e!="number"?M9(e):{top:e,right:e,bottom:e,left:e}}function oc(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 LP(e,t,r){let{reference:n,floating:i}=e;const o=Jr(t),a=qx(t),u=jx(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(Oo(t)){case"start":v[a]-=p*(r&&d?-1:1);break;case"end":v[a]+=p*(r&&d?-1:1);break}return v}const D9=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=LP(d,n,c),p=n,v={},m=0;for(let y=0;y<u.length;y++){const{name:x,fn:b}=u[y],{x:w,y:S,data:E,reset:_}=await b({x:f,y:h,initialPlacement:n,placement:p,strategy:i,middlewareData:v,rects:d,platform:a,elements:{reference:e,floating:t}});f=w??f,h=S??h,v={...v,[x]:{...v[x],...E}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(d=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:f,y:h}=LP(d,p,c)),y=-1)}return{x:f,y:h,placement:p,strategy:i,middlewareData:v}};async function ka(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=Lq(v),x=u[p?h==="floating"?"reference":"floating":h],b=oc(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,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),E=await(o.isElement==null?void 0:o.isElement(S))?await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1}:{x:1,y:1},_=oc(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:S,strategy:c}):w);return{top:(b.top-_.top+m.top)/E.y,bottom:(_.bottom-b.bottom+m.bottom)/E.y,left:(b.left-_.left+m.left)/E.x,right:(_.right-b.right+m.right)/E.x}}const j9=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:d,padding:f=0}=wn(e,t)||{};if(d==null)return{};const h=Lq(f),p={x:r,y:n},v=qx(i),m=jx(v),y=await a.getDimensions(d),x=v==="y",b=x?"top":"left",w=x?"bottom":"right",S=x?"clientHeight":"clientWidth",E=o.reference[m]+o.reference[v]-p[v]-o.floating[m],_=p[v]-o.reference[v],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let I=R?R[S]:0;(!I||!await(a.isElement==null?void 0:a.isElement(R)))&&(I=u.floating[S]||o.floating[m]);const N=E/2-_/2,D=I/2-y[m]/2-1,L=zn(h[b],D),B=zn(h[w],D),U=L,j=I-y[m]-B,T=I/2-y[m]/2+N,G=$b(U,T,j),z=!c.arrow&&Oo(i)!=null&&T!==G&&o.reference[m]/2-(T<U?L:B)-y[m]/2<0,X=z?T<U?T-U:T-j:0;return{[v]:p[v]+X,data:{[v]:G,centerOffset:T-G-X,...z&&{alignmentOffset:X}},reset:z}}}),q9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...x}=wn(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const b=_n(i),w=Jr(u),S=_n(u)===u,E=await(c.isRTL==null?void 0:c.isRTL(d.floating)),_=p||(S||!y?[ic(u)]:I9(u)),R=m!=="none";!p&&R&&_.push(...A9(u,y,m,E));const I=[u,..._],N=await ka(t,x),D=[];let L=((n=o.flip)==null?void 0:n.overflows)||[];if(f&&D.push(N[b]),h){const T=R9(i,a,E);D.push(N[T[0]],N[T[1]])}if(L=[...L,{placement:i,overflows:D}],!D.every(T=>T<=0)){var B,U;const T=(((B=o.flip)==null?void 0:B.index)||0)+1,G=I[T];if(G&&(!(h==="alignment"?w!==Jr(G):!1)||L.every(Z=>Jr(Z.placement)===w?Z.overflows[0]>0:!0)))return{data:{index:T,overflows:L},reset:{placement:G}};let z=(U=L.filter(X=>X.overflows[0]<=0).sort((X,Z)=>X.overflows[1]-Z.overflows[1])[0])==null?void 0:U.placement;if(!z)switch(v){case"bestFit":{var j;const X=(j=L.filter(Z=>{if(R){const re=Jr(Z.placement);return re===w||re==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(re=>re>0).reduce((re,W)=>re+W,0)]).sort((Z,re)=>Z[1]-re[1])[0])==null?void 0:j[0];X&&(z=X);break}case"initialPlacement":z=u;break}if(i!==z)return{reset:{placement:z}}}return{}}}};function BP(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function FP(e){return E9.some(t=>e[t]>=0)}const k9=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=wn(e,t);switch(n){case"referenceHidden":{const o=await ka(t,{...i,elementContext:"reference"}),a=BP(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:FP(a)}}}case"escaped":{const o=await ka(t,{...i,altBoundary:!0}),a=BP(o,r.floating);return{data:{escapedOffsets:a,escaped:FP(a)}}}default:return{}}}}},Bq=new Set(["left","top"]);async function L9(e,t){const{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=_n(r),u=Oo(r),c=Jr(r)==="y",d=Bq.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 B9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:o,placement:a,middlewareData:u}=t,c=await L9(t,e);return a===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},F9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:x=>{let{x:b,y:w}=x;return{x:b,y:w}}},...c}=wn(e,t),d={x:r,y:n},f=await ka(t,c),h=Jr(_n(i)),p=Dx(h);let v=d[p],m=d[h];if(o){const x=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=v+f[x],S=v-f[b];v=$b(w,v,S)}if(a){const x=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=m+f[x],S=m-f[b];m=$b(w,m,S)}const y=u.fn({...t,[p]:v,[h]:m});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[p]:o,[h]:a}}}}}},$9=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:c=!0,crossAxis:d=!0}=wn(e,t),f={x:r,y:n},h=Jr(i),p=Dx(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 S=p==="y"?"height":"width",E=o.reference[p]-o.floating[S]+x.mainAxis,_=o.reference[p]+o.reference[S]-x.mainAxis;v<E?v=E:v>_&&(v=_)}if(d){var b,w;const S=p==="y"?"width":"height",E=Bq.has(_n(i)),_=o.reference[h]-o.floating[S]+(E&&((b=a.offset)==null?void 0:b[h])||0)+(E?0:x.crossAxis),R=o.reference[h]+o.reference[S]+(E?0:((w=a.offset)==null?void 0:w[h])||0)-(E?x.crossAxis:0);m<_?m=_:m>R&&(m=R)}return{[p]:v,[h]:m}}}},z9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:o,platform:a,elements:u}=t,{apply:c=()=>{},...d}=wn(e,t),f=await ka(t,d),h=_n(i),p=Oo(i),v=Jr(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,S=m-f.left-f.right,E=zn(y-f[x],w),_=zn(m-f[b],S),R=!t.middlewareData.shift;let I=E,N=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=S),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(I=w),R&&!p){const L=or(f.left,0),B=or(f.right,0),U=or(f.top,0),j=or(f.bottom,0);v?N=m-2*(L!==0||B!==0?L+B:or(f.left,f.right)):I=y-2*(U!==0||j!==0?U+j:or(f.top,f.bottom))}await c({...t,availableWidth:N,availableHeight:I});const D=await a.getDimensions(u.floating);return m!==D.width||y!==D.height?{reset:{rects:!0}}:{}}}};function Wc(){return typeof window<"u"}function Co(e){return Fq(e)?(e.nodeName||"").toLowerCase():"#document"}function ar(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sn(e){var t;return(t=(Fq(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fq(e){return Wc()?e instanceof Node||e instanceof ar(e).Node:!1}function Lr(e){return Wc()?e instanceof Element||e instanceof ar(e).Element:!1}function nn(e){return Wc()?e instanceof HTMLElement||e instanceof ar(e).HTMLElement:!1}function $P(e){return!Wc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ar(e).ShadowRoot}const H9=new Set(["inline","contents"]);function Ya(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Br(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!H9.has(i)}const U9=new Set(["table","td","th"]);function V9(e){return U9.has(Co(e))}const W9=[":popover-open",":modal"];function Gc(e){return W9.some(t=>{try{return e.matches(t)}catch{return!1}})}const G9=["transform","translate","scale","rotate","perspective"],K9=["transform","translate","scale","rotate","perspective","filter"],Y9=["paint","layout","strict","content"];function kx(e){const t=Lx(),r=Lr(e)?Br(e):e;return G9.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||K9.some(n=>(r.willChange||"").includes(n))||Y9.some(n=>(r.contain||"").includes(n))}function X9(e){let t=Hn(e);for(;nn(t)&&!yo(t);){if(kx(t))return t;if(Gc(t))return null;t=Hn(t)}return null}function Lx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Z9=new Set(["html","body","#document"]);function yo(e){return Z9.has(Co(e))}function Br(e){return ar(e).getComputedStyle(e)}function Kc(e){return Lr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hn(e){if(Co(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$P(e)&&e.host||sn(e);return $P(t)?t.host:t}function $q(e){const t=Hn(e);return yo(t)?e.ownerDocument?e.ownerDocument.body:e.body:nn(t)&&Ya(t)?t:$q(t)}function La(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=$q(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=ar(i);if(o){const u=Hb(a);return t.concat(a,a.visualViewport||[],Ya(i)?i:[],u&&r?La(u):[])}return t.concat(i,La(i,[],r))}function Hb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zq(e){const t=Br(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=nn(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,u=nc(r)!==o||nc(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function Bx(e){return Lr(e)?e:e.contextElement}function ao(e){const t=Bx(e);if(!nn(t))return tn(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=zq(t);let a=(o?nc(r.width):r.width)/n,u=(o?nc(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const J9=tn(0);function Hq(e){const t=ar(e);return!Lx()||!t.visualViewport?J9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Q9(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ar(e)?!1:t}function bi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=Bx(e);let a=tn(1);t&&(n?Lr(n)&&(a=ao(n)):a=ao(e));const u=Q9(o,r,n)?Hq(o):tn(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=ar(o),v=n&&Lr(n)?ar(n):n;let m=p,y=Hb(m);for(;y&&n&&v!==m;){const x=ao(y),b=y.getBoundingClientRect(),w=Br(y),S=b.left+(y.clientLeft+parseFloat(w.paddingLeft))*x.x,E=b.top+(y.clientTop+parseFloat(w.paddingTop))*x.y;c*=x.x,d*=x.y,f*=x.x,h*=x.y,c+=S,d+=E,m=ar(y),y=Hb(m)}}return oc({width:f,height:h,x:c,y:d})}function Yc(e,t){const r=Kc(e).scrollLeft;return t?t.left+r:bi(sn(e)).left+r}function Uq(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Yc(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function e7(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o=i==="fixed",a=sn(n),u=t?Gc(t.floating):!1;if(n===a||u&&o)return r;let c={scrollLeft:0,scrollTop:0},d=tn(1);const f=tn(0),h=nn(n);if((h||!h&&!o)&&((Co(n)!=="body"||Ya(a))&&(c=Kc(n)),nn(n))){const v=bi(n);d=ao(n),f.x=v.x+n.clientLeft,f.y=v.y+n.clientTop}const p=a&&!h&&!o?Uq(a,c):tn(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+f.x+p.x,y:r.y*d.y-c.scrollTop*d.y+f.y+p.y}}function t7(e){return Array.from(e.getClientRects())}function r7(e){const t=sn(e),r=Kc(e),n=e.ownerDocument.body,i=or(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=or(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Yc(e);const u=-r.scrollTop;return Br(n).direction==="rtl"&&(a+=or(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}const zP=25;function n7(e,t){const r=ar(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=Lx();(!f||f&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const d=Yc(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<=zP&&(o-=m)}else d<=zP&&(o+=d);return{width:o,height:a,x:u,y:c}}const i7=new Set(["absolute","fixed"]);function o7(e,t){const r=bi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=nn(e)?ao(e):tn(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 HP(e,t,r){let n;if(t==="viewport")n=n7(e,r);else if(t==="document")n=r7(sn(e));else if(Lr(t))n=o7(t,r);else{const i=Hq(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return oc(n)}function Vq(e,t){const r=Hn(e);return r===t||!Lr(r)||yo(r)?!1:Br(r).position==="fixed"||Vq(r,t)}function a7(e,t){const r=t.get(e);if(r)return r;let n=La(e,[],!1).filter(u=>Lr(u)&&Co(u)!=="body"),i=null;const o=Br(e).position==="fixed";let a=o?Hn(e):e;for(;Lr(a)&&!yo(a);){const u=Br(a),c=kx(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&i7.has(i.position)||Ya(a)&&!c&&Vq(e,a))?n=n.filter(f=>f!==a):i=u,a=Hn(a)}return t.set(e,n),n}function s7(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const a=[...r==="clippingAncestors"?Gc(t)?[]:a7(t,this._c):[].concat(r),n],u=a[0],c=a.reduce((d,f)=>{const h=HP(t,f,i);return d.top=or(h.top,d.top),d.right=zn(h.right,d.right),d.bottom=zn(h.bottom,d.bottom),d.left=or(h.left,d.left),d},HP(t,u,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function u7(e){const{width:t,height:r}=zq(e);return{width:t,height:r}}function c7(e,t,r){const n=nn(t),i=sn(t),o=r==="fixed",a=bi(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=tn(0);function d(){c.x=Yc(i)}if(n||!n&&!o)if((Co(t)!=="body"||Ya(i))&&(u=Kc(t)),n){const v=bi(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?Uq(i,u):tn(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 Nm(e){return Br(e).position==="static"}function UP(e,t){if(!nn(e)||Br(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return sn(e)===r&&(r=r.ownerDocument.body),r}function Wq(e,t){const r=ar(e);if(Gc(e))return r;if(!nn(e)){let i=Hn(e);for(;i&&!yo(i);){if(Lr(i)&&!Nm(i))return i;i=Hn(i)}return r}let n=UP(e,t);for(;n&&V9(n)&&Nm(n);)n=UP(n,t);return n&&yo(n)&&Nm(n)&&!kx(n)?r:n||X9(e)||r}const l7=async function(e){const t=this.getOffsetParent||Wq,r=this.getDimensions,n=await r(e.floating);return{reference:c7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function f7(e){return Br(e).direction==="rtl"}const d7={convertOffsetParentRelativeRectToViewportRelativeRect:e7,getDocumentElement:sn,getClippingRect:s7,getOffsetParent:Wq,getElementRects:l7,getClientRects:t7,getDimensions:u7,getScale:ao,isElement:Lr,isRTL:f7};function Gq(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function h7(e,t){let r=null,n;const i=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=xu(h),y=xu(i.clientWidth-(f+p)),x=xu(i.clientHeight-(h+v)),b=xu(f),S={rootMargin:-m+"px "+-y+"px "+-x+"px "+-b+"px",threshold:or(0,zn(1,c))||1};let E=!0;function _(R){const I=R[0].intersectionRatio;if(I!==c){if(!E)return a();I?a(!1,I):n=setTimeout(()=>{a(!1,1e-7)},1e3)}I===1&&!Gq(d,e.getBoundingClientRect())&&a(),E=!1}try{r=new IntersectionObserver(_,{...S,root:i.ownerDocument})}catch{r=new IntersectionObserver(_,S)}r.observe(e)}return a(!0),o}function p7(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=Bx(e),f=i||o?[...d?La(d):[],...La(t)]:[];f.forEach(b=>{i&&b.addEventListener("scroll",r,{passive:!0}),o&&b.addEventListener("resize",r)});const h=d&&u?h7(d,r):null;let p=-1,v=null;a&&(v=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=v)==null||S.observe(t)})),r()}),d&&!c&&v.observe(d),v.observe(t));let m,y=c?bi(e):null;c&&x();function x(){const b=bi(e);y&&!Gq(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 v7=B9,g7=F9,m7=q9,y7=z9,b7=k9,VP=j9,x7=$9,w7=(e,t,r)=>{const n=new Map,i={platform:d7,...r},o={...i.platform,_c:n};return D9(e,t,{...i,platform:o})};var _7=typeof document<"u",E7=function(){},Lu=_7?A.useLayoutEffect:E7;function ac(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(!ac(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)&&!ac(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Kq(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function WP(e,t){const r=Kq(e);return Math.round(t*r)/r}function Tm(e){const t=ve.useRef(e);return Lu(()=>{t.current=e}),t}function S7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:c,open:d}=e,[f,h]=ve.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,v]=ve.useState(n);ac(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))},[]),S=ve.useCallback(Z=>{Z!==I.current&&(I.current=Z,b(Z))},[]),E=o||m,_=a||x,R=ve.useRef(null),I=ve.useRef(null),N=ve.useRef(f),D=c!=null,L=Tm(c),B=Tm(i),U=Tm(d),j=ve.useCallback(()=>{if(!R.current||!I.current)return;const Z={placement:t,strategy:r,middleware:p};B.current&&(Z.platform=B.current),w7(R.current,I.current,Z).then(re=>{const W={...re,isPositioned:U.current!==!1};T.current&&!ac(N.current,W)&&(N.current=W,Yb.flushSync(()=>{h(W)}))})},[p,t,r,B,U]);Lu(()=>{d===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(Z=>({...Z,isPositioned:!1})))},[d]);const T=ve.useRef(!1);Lu(()=>(T.current=!0,()=>{T.current=!1}),[]),Lu(()=>{if(E&&(R.current=E),_&&(I.current=_),E&&_){if(L.current)return L.current(E,_,j);j()}},[E,_,j,L,D]);const G=ve.useMemo(()=>({reference:R,floating:I,setReference:w,setFloating:S}),[w,S]),z=ve.useMemo(()=>({reference:E,floating:_}),[E,_]),X=ve.useMemo(()=>{const Z={position:r,left:0,top:0};if(!z.floating)return Z;const re=WP(z.floating,f.x),W=WP(z.floating,f.y);return u?{...Z,transform:"translate("+re+"px, "+W+"px)",...Kq(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:re,top:W}},[r,u,z.floating,f.x,f.y]);return ve.useMemo(()=>({...f,update:j,refs:G,elements:z,floatingStyles:X}),[f,j,G,z,X])}const O7=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?VP({element:n.current,padding:i}).fn(r):{}:n?VP({element:n,padding:i}).fn(r):{}}}},C7=(e,t)=>({...v7(e),options:[e,t]}),R7=(e,t)=>({...g7(e),options:[e,t]}),I7=(e,t)=>({...x7(e),options:[e,t]}),P7=(e,t)=>({...m7(e),options:[e,t]}),N7=(e,t)=>({...y7(e),options:[e,t]}),T7=(e,t)=>({...b7(e),options:[e,t]}),A7=(e,t)=>({...O7(e),options:[e,t]});function M7(e){const t=D7(e),r=ve.forwardRef((n,i)=>{const{children:o,...a}=n,u=ve.Children.toArray(o),c=u.find(q7);if(c){const d=c.props.children,f=u.map(h=>h===c?ve.Children.count(d)>1?ve.Children.only(null):ve.isValidElement(d)?d.props.children:null:h);return C.jsx(t,{...a,ref:i,children:ve.isValidElement(d)?ve.cloneElement(d,void 0,f):null})}return C.jsx(t,{...a,ref:i,children:o})});return r.displayName=`${e}.Slot`,r}function D7(e){const t=ve.forwardRef((r,n)=>{const{children:i,...o}=r;if(ve.isValidElement(i)){const a=L7(i),u=k7(o,i.props);return i.type!==ve.Fragment&&(u.ref=n?kq(n,a):a),ve.cloneElement(i,u)}return ve.Children.count(i)>1?ve.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var j7=Symbol("radix.slottable");function q7(e){return ve.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===j7}function k7(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...u)=>{const c=o(...u);return i(...u),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function L7(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var B7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Oi=B7.reduce((e,t)=>{const r=M7(`Primitive.${t}`),n=ve.forwardRef((i,o)=>{const{asChild:a,...u}=i,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(c,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function F7(e,t){e&&Yb.flushSync(()=>e.dispatchEvent(t))}var $7="Arrow",Yq=ve.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...o}=e;return C.jsx(Oi.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"})})});Yq.displayName=$7;var z7=Yq;function Xc(e){const t=ve.useRef(e);return ve.useEffect(()=>{t.current=e}),ve.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function H7(e){const[t,r]=ve.useState(void 0);return yi(()=>{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 Fx="Popper",[Xq,Zq]=qq(Fx),[U7,Jq]=Xq(Fx),Qq=e=>{const{__scopePopper:t,children:r}=e,[n,i]=ve.useState(null);return C.jsx(U7,{scope:t,anchor:n,onAnchorChange:i,children:r})};Qq.displayName=Fx;var e2="PopperAnchor",t2=ve.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,o=Jq(e2,r),a=ve.useRef(null),u=So(t,a),c=ve.useRef(null);return ve.useEffect(()=>{const d=c.current;c.current=(n==null?void 0:n.current)||a.current,d!==c.current&&o.onAnchorChange(c.current)}),n?null:C.jsx(Oi.div,{...i,ref:u})});t2.displayName=e2;var $x="PopperContent",[V7,W7]=Xq($x),r2=ve.forwardRef((e,t)=>{var k,F,te,ie,ae,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=Jq($x,r),[b,w]=ve.useState(null),S=So(t,we=>w(we)),[E,_]=ve.useState(null),R=H7(E),I=(R==null?void 0:R.width)??0,N=(R==null?void 0:R.height)??0,D=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(K7),altBoundary:U},{refs:T,floatingStyles:G,placement:z,isPositioned:X,middlewareData:Z}=S7({strategy:"fixed",placement:D,whileElementsMounted:(...we)=>p7(...we,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[C7({mainAxis:i+N,alignmentAxis:a}),c&&R7({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?I7():void 0,...j}),c&&P7({...j}),N7({...j,apply:({elements:we,rects:Se,availableWidth:_e,availableHeight:he})=>{const{width:le,height:Oe}=Se.reference,Ne=we.floating.style;Ne.setProperty("--radix-popper-available-width",`${_e}px`),Ne.setProperty("--radix-popper-available-height",`${he}px`),Ne.setProperty("--radix-popper-anchor-width",`${le}px`),Ne.setProperty("--radix-popper-anchor-height",`${Oe}px`)}}),E&&A7({element:E,padding:u}),Y7({arrowWidth:I,arrowHeight:N}),p&&T7({strategy:"referenceHidden",...j})]}),[re,W]=o2(z),Q=Xc(m);yi(()=>{X&&(Q==null||Q())},[X,Q]);const ue=(k=Z.arrow)==null?void 0:k.x,oe=(F=Z.arrow)==null?void 0:F.y,H=((te=Z.arrow)==null?void 0:te.centerOffset)!==0,[K,$]=ve.useState();return yi(()=>{b&&$(window.getComputedStyle(b).zIndex)},[b]),C.jsx("div",{ref:T.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,(ae=Z.transformOrigin)==null?void 0:ae.y].join(" "),...((ce=Z.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(V7,{scope:r,placedSide:re,onArrowChange:_,arrowX:ue,arrowY:oe,shouldHideArrow:H,children:C.jsx(Oi.div,{"data-side":re,"data-align":W,...y,ref:S,style:{...y.style,animation:X?void 0:"none"}})})})});r2.displayName=$x;var n2="PopperArrow",G7={top:"bottom",right:"left",bottom:"top",left:"right"},i2=ve.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,o=W7(n2,n),a=G7[o.placedSide];return C.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:C.jsx(z7,{...i,ref:r,style:{...i.style,display:"block"}})})});i2.displayName=n2;function K7(e){return e!==null}var Y7=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]=o2(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 o2(e){const[t,r="center"]=e.split("-");return[t,r]}var X7=Qq,Z7=t2,J7=r2,Q7=i2,eX="Portal",a2=ve.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=ve.useState(!1);yi(()=>o(!0),[]);const a=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?aD.createPortal(C.jsx(Oi.div,{...n,ref:t}),a):null});a2.displayName=eX;function tX(e,t){return ve.useReducer((r,n)=>t[r][n]??r,e)}var zx=e=>{const{present:t,children:r}=e,n=rX(t),i=typeof r=="function"?r({present:n.isPresent}):ve.Children.only(r),o=So(n.ref,nX(i));return typeof r=="function"||n.isPresent?ve.cloneElement(i,{ref:o}):null};zx.displayName="Presence";function rX(e){const[t,r]=ve.useState(),n=ve.useRef(null),i=ve.useRef(e),o=ve.useRef("none"),a=e?"mounted":"unmounted",[u,c]=tX(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ve.useEffect(()=>{const d=wu(n.current);o.current=u==="mounted"?d:"none"},[u]),yi(()=>{const d=n.current,f=i.current;if(f!==e){const p=o.current,v=wu(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]),yi(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=v=>{const y=wu(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=wu(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:ve.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function wu(e){return(e==null?void 0:e.animationName)||"none"}function nX(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function iX(e,t=globalThis==null?void 0:globalThis.document){const r=Xc(e);ve.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var oX="DismissableLayer",Ub="dismissableLayer.update",aX="dismissableLayer.pointerDownOutside",sX="dismissableLayer.focusOutside",GP,s2=ve.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),u2=ve.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...c}=e,d=ve.useContext(s2),[f,h]=ve.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=ve.useState({}),m=So(t,I=>h(I)),y=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(x),w=f?y.indexOf(f):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,E=w>=b,_=lX(I=>{const N=I.target,D=[...d.branches].some(L=>L.contains(N));!E||D||(i==null||i(I),a==null||a(I),I.defaultPrevented||u==null||u())},p),R=fX(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 iX(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&&(GP=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),KP(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=GP)}},[f,p,r,d]),ve.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),KP())},[f,d]),ve.useEffect(()=>{const I=()=>v({});return document.addEventListener(Ub,I),()=>document.removeEventListener(Ub,I)},[]),C.jsx(Oi.div,{...c,ref:m,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:xr(e.onFocusCapture,R.onFocusCapture),onBlurCapture:xr(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:xr(e.onPointerDownCapture,_.onPointerDownCapture)})});u2.displayName=oX;var uX="DismissableLayerBranch",cX=ve.forwardRef((e,t)=>{const r=ve.useContext(s2),n=ve.useRef(null),i=So(t,n);return ve.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),C.jsx(Oi.div,{...e,ref:i})});cX.displayName=uX;function lX(e,t=globalThis==null?void 0:globalThis.document){const r=Xc(e),n=ve.useRef(!1),i=ve.useRef(()=>{});return ve.useEffect(()=>{const o=u=>{if(u.target&&!n.current){let c=function(){c2(aX,r,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function fX(e,t=globalThis==null?void 0:globalThis.document){const r=Xc(e),n=ve.useRef(!1);return ve.useEffect(()=>{const i=o=>{o.target&&!n.current&&c2(sX,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function KP(){const e=new CustomEvent(Ub);document.dispatchEvent(e)}function c2(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?F7(i,o):i.dispatchEvent(o)}var Am,Zc="HoverCard",[l2]=qq(Zc,[Zq]),Jc=Zq(),[dX,Qc]=l2(Zc),f2=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:i,onOpenChange:o,openDelay:a=700,closeDelay:u=300}=e,c=Jc(t),d=ve.useRef(0),f=ve.useRef(0),h=ve.useRef(!1),p=ve.useRef(!1),[v,m]=x9({prop:n,defaultProp:i??!1,onChange:o,caller:Zc}),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(dX,{scope:t,open:v,onOpenChange:m,onOpen:y,onClose:x,onDismiss:b,hasSelectionRef:h,isPointerDownOnContentRef:p,children:C.jsx(X7,{...c,children:r})})};f2.displayName=Zc;var d2="HoverCardTrigger",h2=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Qc(d2,r),o=Jc(r);return C.jsx(Z7,{asChild:!0,...o,children:C.jsx(Oi.a,{"data-state":i.open?"open":"closed",...n,ref:t,onPointerEnter:xr(e.onPointerEnter,uc(i.onOpen)),onPointerLeave:xr(e.onPointerLeave,uc(i.onClose)),onFocus:xr(e.onFocus,i.onOpen),onBlur:xr(e.onBlur,i.onClose),onTouchStart:xr(e.onTouchStart,a=>a.preventDefault())})})});h2.displayName=d2;var Hx="HoverCardPortal",[hX,pX]=l2(Hx,{forceMount:void 0}),p2=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:i}=e,o=Qc(Hx,t);return C.jsx(hX,{scope:t,forceMount:r,children:C.jsx(zx,{present:r||o.open,children:C.jsx(a2,{asChild:!0,container:i,children:n})})})};p2.displayName=Hx;var sc="HoverCardContent",v2=ve.forwardRef((e,t)=>{const r=pX(sc,e.__scopeHoverCard),{forceMount:n=r.forceMount,...i}=e,o=Qc(sc,e.__scopeHoverCard);return C.jsx(zx,{present:n||o.open,children:C.jsx(vX,{"data-state":o.open?"open":"closed",...i,onPointerEnter:xr(e.onPointerEnter,uc(o.onOpen)),onPointerLeave:xr(e.onPointerLeave,uc(o.onClose)),ref:t})})});v2.displayName=sc;var vX=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,...u}=e,c=Qc(sc,r),d=Jc(r),f=ve.useRef(null),h=So(t,f),[p,v]=ve.useState(!1);return ve.useEffect(()=>{if(p){const m=document.body;return Am=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=Am,m.style.webkitUserSelect=Am}}},[p]),ve.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]),ve.useEffect(()=>{f.current&&yX(f.current).forEach(y=>y.setAttribute("tabindex","-1"))}),C.jsx(u2,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:xr(o,m=>{m.preventDefault()}),onDismiss:c.onDismiss,children:C.jsx(J7,{...d,...u,onPointerDown:xr(u.onPointerDown,m=>{m.currentTarget.contains(m.target)&&v(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:h,style:{...u.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),gX="HoverCardArrow",mX=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Jc(r);return C.jsx(Q7,{...i,...n,ref:t})});mX.displayName=gX;function uc(e){return t=>t.pointerType==="touch"?void 0:e()}function yX(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}var Ux=f2,Vx=h2,jr=p2,qr=v2;const bX=({item:e,depth:t})=>{const[r,n]=A.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(g2,{depth:t+1,data:o})})]})},g2=({data:e,depth:t=0})=>e.map(r=>r.includes.length?C.jsx(bX,{item:r,depth:t},r.id):C.jsx("div",{className:Ve("py-1 text-xs text-white",{}),children:r.privilege},r.id)),Bt=()=>document.querySelector(`.${sD.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,el=({container:e,...t})=>C.jsx(Te.Portal,{...t,container:e||Bt()}),YP=Ux,XP=Vx,ZP=({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]=A.useState(!1),[d,f]=A.useState(e.privilege),[h,p]=A.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 S=J.rename(d,e.id,o);i(J.updatePrivileges(S)),c(!1)}catch(S){p(S.message)}}const b=async S=>{S.stopPropagation();const{confirmed:E}=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(E){const _=J.remove(e.id,o);if((t==null?void 0:t.id)!==e.id){i(J.updatePrivileges(_));return}const R=Object.keys(_).filter(I=>_[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),D=Math.max(0,N-1),L=I[D];N===0?r(_[R[0]]):_[L]?r(_[L]):r(_[R[0]])}i(J.updatePrivileges(_))}},w=A.useMemo(()=>e.resources.some(S=>S.exists===!1),[e]);return C.jsxs(YP,{openDelay:0,closeDelay:0,children:[C.jsx(XP,{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:S=>{S.key==="Enter"&&x(),S.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:S=>f(S.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(YP,{openDelay:0,closeDelay:0,children:[C.jsx(XP,{asChild:!0,children:C.jsx("span",{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-grey-50"})})}),C.jsx(jr,{container:Bt(),children:C.jsx(qr,{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(g2,{data:a})}):null]})}),C.jsx(jr,{container:Bt(),children:C.jsxs(qr,{hidden:!w,style:{zIndex:50},avoidCollisions:!0,side:"top",className:"text-red-500 mb-1 flex max-w-xs items-center gap-x-1 rounded bg-negative-200 px-2 py-2 text-s font-semibold",children:[C.jsx(ye.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"This privilege uses non-existing resources"})]})})]})},xX=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=J.useAppSelector(J.selectGuestPrivilege),i=J.useAppSelector(J.selectCatalog),o=A.useMemo(()=>{if(i===null||!n)return n;const a=Dq({guest:n},Object.values((i==null?void 0:i.dataClasses)??{}));return jq(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(ZP,{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(ZP,{privilege:u,onSelect:t,selectedPrivilege:r},a)):C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsx("div",{className:"flex flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"font-semibold",children:"There are no privileges"}),C.jsxs("div",{className:"flex items-center text-sm",children:["Create a new Privilege by clicking on the"," ",C.jsx(ye.FdPlus,{className:"ml-2 inline h-4 w-4 text-white"})]})]})})})]})};var _u={exports:{}},Eu={exports:{}},Ke={};/** @license React v16.13.1
20
8
  * react-is.production.min.js
21
9
  *
22
10
  * Copyright (c) Facebook, Inc. and its affiliates.
23
11
  *
24
12
  * This source code is licensed under the MIT license found in the
25
13
  * LICENSE file in the root directory of this source tree.
26
- */var KO;function fK(){if(KO)return st;KO=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,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case c:case u:case n:case o:case i:case p:return E;default:switch(E=E&&E.$$typeof,E){case s:case d:case x:case h:case a:return E;default:return I}}case r:return I}}}function S(E){return _(E)===u}return st.AsyncMode=c,st.ConcurrentMode=u,st.ContextConsumer=s,st.ContextProvider=a,st.Element=t,st.ForwardRef=d,st.Fragment=n,st.Lazy=x,st.Memo=h,st.Portal=r,st.Profiler=o,st.StrictMode=i,st.Suspense=p,st.isAsyncMode=function(E){return S(E)||_(E)===c},st.isConcurrentMode=S,st.isContextConsumer=function(E){return _(E)===s},st.isContextProvider=function(E){return _(E)===a},st.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},st.isForwardRef=function(E){return _(E)===d},st.isFragment=function(E){return _(E)===n},st.isLazy=function(E){return _(E)===x},st.isMemo=function(E){return _(E)===h},st.isPortal=function(E){return _(E)===r},st.isProfiler=function(E){return _(E)===o},st.isStrictMode=function(E){return _(E)===i},st.isSuspense=function(E){return _(E)===p},st.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===u||E===o||E===i||E===p||E===v||typeof E=="object"&&E!==null&&(E.$$typeof===x||E.$$typeof===h||E.$$typeof===a||E.$$typeof===s||E.$$typeof===d||E.$$typeof===m||E.$$typeof===w||E.$$typeof===y||E.$$typeof===b)},st.typeOf=_,st}var ft={};/** @license React v16.13.1
14
+ */var JP;function wX(){if(JP)return Ke;JP=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function S(_){if(typeof _=="object"&&_!==null){var R=_.$$typeof;switch(R){case t:switch(_=_.type,_){case c:case d:case n:case o:case i:case h:return _;default:switch(_=_&&_.$$typeof,_){case u:case f:case m:case v:case a:return _;default:return R}}case r:return R}}}function E(_){return S(_)===d}return Ke.AsyncMode=c,Ke.ConcurrentMode=d,Ke.ContextConsumer=u,Ke.ContextProvider=a,Ke.Element=t,Ke.ForwardRef=f,Ke.Fragment=n,Ke.Lazy=m,Ke.Memo=v,Ke.Portal=r,Ke.Profiler=o,Ke.StrictMode=i,Ke.Suspense=h,Ke.isAsyncMode=function(_){return E(_)||S(_)===c},Ke.isConcurrentMode=E,Ke.isContextConsumer=function(_){return S(_)===u},Ke.isContextProvider=function(_){return S(_)===a},Ke.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},Ke.isForwardRef=function(_){return S(_)===f},Ke.isFragment=function(_){return S(_)===n},Ke.isLazy=function(_){return S(_)===m},Ke.isMemo=function(_){return S(_)===v},Ke.isPortal=function(_){return S(_)===r},Ke.isProfiler=function(_){return S(_)===o},Ke.isStrictMode=function(_){return S(_)===i},Ke.isSuspense=function(_){return S(_)===h},Ke.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===d||_===o||_===i||_===h||_===p||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===v||_.$$typeof===a||_.$$typeof===u||_.$$typeof===f||_.$$typeof===x||_.$$typeof===b||_.$$typeof===w||_.$$typeof===y)},Ke.typeOf=S,Ke}var Ye={};/** @license React v16.13.1
27
15
  * react-is.development.js
28
16
  *
29
17
  * Copyright (c) Facebook, Inc. and its affiliates.
30
18
  *
31
19
  * This source code is licensed under the MIT license found in the
32
20
  * LICENSE file in the root directory of this source tree.
33
- */var YO;function pK(){return YO||(YO=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,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(re){return typeof re=="string"||typeof re=="function"||re===n||re===u||re===o||re===i||re===p||re===v||typeof re=="object"&&re!==null&&(re.$$typeof===x||re.$$typeof===h||re.$$typeof===a||re.$$typeof===s||re.$$typeof===d||re.$$typeof===m||re.$$typeof===w||re.$$typeof===y||re.$$typeof===b)}function S(re){if(typeof re=="object"&&re!==null){var ge=re.$$typeof;switch(ge){case t:var ue=re.type;switch(ue){case c:case u:case n:case o:case i:case p:return ue;default:var xe=ue&&ue.$$typeof;switch(xe){case s:case d:case x:case h:case a:return xe;default:return ge}}case r:return ge}}}var E=c,I=u,N=s,T=a,k=t,L=d,B=n,A=x,z=h,P=r,K=o,$=i,Y=p,U=!1;function Z(re){return U||(U=!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.")),D(re)||S(re)===c}function D(re){return S(re)===u}function W(re){return S(re)===s}function Q(re){return S(re)===a}function ee(re){return typeof re=="object"&&re!==null&&re.$$typeof===t}function j(re){return S(re)===d}function F(re){return S(re)===n}function G(re){return S(re)===x}function q(re){return S(re)===h}function X(re){return S(re)===r}function te(re){return S(re)===o}function ne(re){return S(re)===i}function de(re){return S(re)===p}ft.AsyncMode=E,ft.ConcurrentMode=I,ft.ContextConsumer=N,ft.ContextProvider=T,ft.Element=k,ft.ForwardRef=L,ft.Fragment=B,ft.Lazy=A,ft.Memo=z,ft.Portal=P,ft.Profiler=K,ft.StrictMode=$,ft.Suspense=Y,ft.isAsyncMode=Z,ft.isConcurrentMode=D,ft.isContextConsumer=W,ft.isContextProvider=Q,ft.isElement=ee,ft.isForwardRef=j,ft.isFragment=F,ft.isLazy=G,ft.isMemo=q,ft.isPortal=X,ft.isProfiler=te,ft.isStrictMode=ne,ft.isSuspense=de,ft.isValidElementType=_,ft.typeOf=S})()),ft}var XO;function Dq(){return XO||(XO=1,process.env.NODE_ENV==="production"?Ip.exports=fK():Ip.exports=pK()),Ip.exports}/*
21
+ */var QP;function _X(){return QP||(QP=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function S(ce){return typeof ce=="string"||typeof ce=="function"||ce===n||ce===d||ce===o||ce===i||ce===h||ce===p||typeof ce=="object"&&ce!==null&&(ce.$$typeof===m||ce.$$typeof===v||ce.$$typeof===a||ce.$$typeof===u||ce.$$typeof===f||ce.$$typeof===x||ce.$$typeof===b||ce.$$typeof===w||ce.$$typeof===y)}function E(ce){if(typeof ce=="object"&&ce!==null){var we=ce.$$typeof;switch(we){case t:var Se=ce.type;switch(Se){case c:case d:case n:case o:case i:case h:return Se;default:var _e=Se&&Se.$$typeof;switch(_e){case u:case f:case m:case v:case a:return _e;default:return we}}case r:return we}}}var _=c,R=d,I=u,N=a,D=t,L=f,B=n,U=m,j=v,T=r,G=o,z=i,X=h,Z=!1;function re(ce){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.")),W(ce)||E(ce)===c}function W(ce){return E(ce)===d}function Q(ce){return E(ce)===u}function ue(ce){return E(ce)===a}function oe(ce){return typeof ce=="object"&&ce!==null&&ce.$$typeof===t}function H(ce){return E(ce)===f}function K(ce){return E(ce)===n}function $(ce){return E(ce)===m}function k(ce){return E(ce)===v}function F(ce){return E(ce)===r}function te(ce){return E(ce)===o}function ie(ce){return E(ce)===i}function ae(ce){return E(ce)===h}Ye.AsyncMode=_,Ye.ConcurrentMode=R,Ye.ContextConsumer=I,Ye.ContextProvider=N,Ye.Element=D,Ye.ForwardRef=L,Ye.Fragment=B,Ye.Lazy=U,Ye.Memo=j,Ye.Portal=T,Ye.Profiler=G,Ye.StrictMode=z,Ye.Suspense=X,Ye.isAsyncMode=re,Ye.isConcurrentMode=W,Ye.isContextConsumer=Q,Ye.isContextProvider=ue,Ye.isElement=oe,Ye.isForwardRef=H,Ye.isFragment=K,Ye.isLazy=$,Ye.isMemo=k,Ye.isPortal=F,Ye.isProfiler=te,Ye.isStrictMode=ie,Ye.isSuspense=ae,Ye.isValidElementType=S,Ye.typeOf=E})()),Ye}var eN;function m2(){return eN||(eN=1,process.env.NODE_ENV==="production"?Eu.exports=wX():Eu.exports=_X()),Eu.exports}/*
34
22
  object-assign
35
23
  (c) Sindre Sorhus
36
24
  @license MIT
37
- */var Rp,ZO;function hK(){if(ZO)return Rp;ZO=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={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Rp=i()?Object.assign:function(o,a){for(var s,c=n(o),u,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var p in s)t.call(s,p)&&(c[p]=s[p]);if(e){u=e(s);for(var v=0;v<u.length;v++)r.call(s,u[v])&&(c[u[v]]=s[u[v]])}}return c},Rp}var Np,JO;function o1(){if(JO)return Np;JO=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Np=e,Np}var QO,eC;function jq(){return eC||(eC=1,QO=Function.call.bind(Object.prototype.hasOwnProperty)),QO}var Tp,tC;function vK(){if(tC)return Tp;tC=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=o1(),r={},n=jq();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,c,u){if(process.env.NODE_ENV!=="production"){for(var d in o)if(n(o,d)){var p;try{if(typeof o[d]!="function"){var v=Error((c||"React class")+": "+s+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}p=o[d](a,d,c,s,null,t)}catch(x){p=x}if(p&&!(p instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in r)){r[p.message]=!0;var h=u?u():"";e("Failed "+s+" type: "+p.message+(h??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Tp=i,Tp}var Pp,rC;function gK(){if(rC)return Pp;rC=1;var e=Dq(),t=hK(),r=o1(),n=jq(),i=vK(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return Pp=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function p(D){var W=D&&(u&&D[u]||D[d]);if(typeof W=="function")return W}var v="<<anonymous>>",h={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:y(),arrayOf:_,element:S(),elementType:E(),instanceOf:I,node:L(),objectOf:T,oneOf:N,oneOfType:k,shape:A,exact:z};function x(D,W){return D===W?D!==0||1/D===1/W:D!==D&&W!==W}function b(D,W){this.message=D,this.data=W&&typeof W=="object"?W:{},this.stack=""}b.prototype=Error.prototype;function m(D){if(process.env.NODE_ENV!=="production")var W={},Q=0;function ee(F,G,q,X,te,ne,de){if(X=X||v,ne=ne||q,de!==r){if(c){var re=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 re.name="Invariant Violation",re}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ge=X+":"+q;!W[ge]&&Q<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+X+"`. 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."),W[ge]=!0,Q++)}}return G[q]==null?F?G[q]===null?new b("The "+te+" `"+ne+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new b("The "+te+" `"+ne+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:D(G,q,X,te,ne)}var j=ee.bind(null,!1);return j.isRequired=ee.bind(null,!0),j}function w(D){function W(Q,ee,j,F,G,q){var X=Q[ee],te=$(X);if(te!==D){var ne=Y(X);return new b("Invalid "+F+" `"+G+"` of type "+("`"+ne+"` supplied to `"+j+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return m(W)}function y(){return m(a)}function _(D){function W(Q,ee,j,F,G){if(typeof D!="function")return new b("Property `"+G+"` of component `"+j+"` has invalid PropType notation inside arrayOf.");var q=Q[ee];if(!Array.isArray(q)){var X=$(q);return new b("Invalid "+F+" `"+G+"` of type "+("`"+X+"` supplied to `"+j+"`, expected an array."))}for(var te=0;te<q.length;te++){var ne=D(q,te,j,F,G+"["+te+"]",r);if(ne instanceof Error)return ne}return null}return m(W)}function S(){function D(W,Q,ee,j,F){var G=W[Q];if(!s(G)){var q=$(G);return new b("Invalid "+j+" `"+F+"` of type "+("`"+q+"` supplied to `"+ee+"`, expected a single ReactElement."))}return null}return m(D)}function E(){function D(W,Q,ee,j,F){var G=W[Q];if(!e.isValidElementType(G)){var q=$(G);return new b("Invalid "+j+" `"+F+"` of type "+("`"+q+"` supplied to `"+ee+"`, expected a single ReactElement type."))}return null}return m(D)}function I(D){function W(Q,ee,j,F,G){if(!(Q[ee]instanceof D)){var q=D.name||v,X=Z(Q[ee]);return new b("Invalid "+F+" `"+G+"` of type "+("`"+X+"` supplied to `"+j+"`, expected ")+("instance of `"+q+"`."))}return null}return m(W)}function N(D){if(!Array.isArray(D))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 W(Q,ee,j,F,G){for(var q=Q[ee],X=0;X<D.length;X++)if(x(q,D[X]))return null;var te=JSON.stringify(D,function(ne,de){var re=Y(de);return re==="symbol"?String(de):de});return new b("Invalid "+F+" `"+G+"` of value `"+String(q)+"` "+("supplied to `"+j+"`, expected one of "+te+"."))}return m(W)}function T(D){function W(Q,ee,j,F,G){if(typeof D!="function")return new b("Property `"+G+"` of component `"+j+"` has invalid PropType notation inside objectOf.");var q=Q[ee],X=$(q);if(X!=="object")return new b("Invalid "+F+" `"+G+"` of type "+("`"+X+"` supplied to `"+j+"`, expected an object."));for(var te in q)if(n(q,te)){var ne=D(q,te,j,F,G+"."+te,r);if(ne instanceof Error)return ne}return null}return m(W)}function k(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var W=0;W<D.length;W++){var Q=D[W];if(typeof Q!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(Q)+" at index "+W+"."),a}function ee(j,F,G,q,X){for(var te=[],ne=0;ne<D.length;ne++){var de=D[ne],re=de(j,F,G,q,X,r);if(re==null)return null;re.data&&n(re.data,"expectedType")&&te.push(re.data.expectedType)}var ge=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new b("Invalid "+q+" `"+X+"` supplied to "+("`"+G+"`"+ge+"."))}return m(ee)}function L(){function D(W,Q,ee,j,F){return P(W[Q])?null:new b("Invalid "+j+" `"+F+"` supplied to "+("`"+ee+"`, expected a ReactNode."))}return m(D)}function B(D,W,Q,ee,j){return new b((D||"React class")+": "+W+" type `"+Q+"."+ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+j+"`.")}function A(D){function W(Q,ee,j,F,G){var q=Q[ee],X=$(q);if(X!=="object")return new b("Invalid "+F+" `"+G+"` of type `"+X+"` "+("supplied to `"+j+"`, expected `object`."));for(var te in D){var ne=D[te];if(typeof ne!="function")return B(j,F,G,te,Y(ne));var de=ne(q,te,j,F,G+"."+te,r);if(de)return de}return null}return m(W)}function z(D){function W(Q,ee,j,F,G){var q=Q[ee],X=$(q);if(X!=="object")return new b("Invalid "+F+" `"+G+"` of type `"+X+"` "+("supplied to `"+j+"`, expected `object`."));var te=t({},Q[ee],D);for(var ne in te){var de=D[ne];if(n(D,ne)&&typeof de!="function")return B(j,F,G,ne,Y(de));if(!de)return new b("Invalid "+F+" `"+G+"` key `"+ne+"` supplied to `"+j+"`.\nBad object: "+JSON.stringify(Q[ee],null," ")+`
38
- Valid keys: `+JSON.stringify(Object.keys(D),null," "));var re=de(q,ne,j,F,G+"."+ne,r);if(re)return re}return null}return m(W)}function P(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(P);if(D===null||s(D))return!0;var W=p(D);if(W){var Q=W.call(D),ee;if(W!==D.entries){for(;!(ee=Q.next()).done;)if(!P(ee.value))return!1}else for(;!(ee=Q.next()).done;){var j=ee.value;if(j&&!P(j[1]))return!1}}else return!1;return!0;default:return!1}}function K(D,W){return D==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function $(D){var W=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":K(W,D)?"symbol":W}function Y(D){if(typeof D>"u"||D===null)return""+D;var W=$(D);if(W==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return W}function U(D){var W=Y(D);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function Z(D){return!D.constructor||!D.constructor.name?v:D.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},Pp}var kp,nC;function mK(){if(nC)return kp;nC=1;var e=o1();function t(){}function r(){}return r.resetWarningCache=t,kp=function(){function n(a,s,c,u,d,p){if(p!==e){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}}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},kp}var iC;function bK(){if(iC)return Sc.exports;if(iC=1,process.env.NODE_ENV!=="production"){var e=Dq(),t=!0;Sc.exports=gK()(e.isElement,t)}else Sc.exports=mK()();return Sc.exports}var yK=bK();const ye=D2(yK);var Mp={exports:{}},lt={};/**
39
- * @license React
25
+ */var Mm,tN;function EX(){if(tN)return Mm;tN=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},u=0;u<10;u++)a["_"+String.fromCharCode(u)]=u;var c=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Mm=i()?Object.assign:function(o,a){for(var u,c=n(o),d,f=1;f<arguments.length;f++){u=Object(arguments[f]);for(var h in u)t.call(u,h)&&(c[h]=u[h]);if(e){d=e(u);for(var p=0;p<d.length;p++)r.call(u,d[p])&&(c[d[p]]=u[d[p]])}}return c},Mm}var Dm,rN;function Wx(){if(rN)return Dm;rN=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Dm=e,Dm}var jm,nN;function y2(){return nN||(nN=1,jm=Function.call.bind(Object.prototype.hasOwnProperty)),jm}var qm,iN;function SX(){if(iN)return qm;iN=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Wx(),r={},n=y2();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,u,c,d){if(process.env.NODE_ENV!=="production"){for(var f in o)if(n(o,f)){var h;try{if(typeof o[f]!="function"){var p=Error((c||"React class")+": "+u+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=o[f](a,f,c,u,null,t)}catch(m){h=m}if(h&&!(h instanceof Error)&&e((c||"React class")+": type specification of "+u+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var v=d?d():"";e("Failed "+u+" type: "+h.message+(v??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},qm=i,qm}var km,oN;function OX(){if(oN)return km;oN=1;var e=m2(),t=EX(),r=Wx(),n=y2(),i=SX(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(u){var c="Warning: "+u;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return km=function(u,c){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(W){var Q=W&&(d&&W[d]||W[f]);if(typeof Q=="function")return Q}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:S,element:E(),elementType:_(),instanceOf:R,node:L(),objectOf:N,oneOf:I,oneOfType:D,shape:U,exact:j};function m(W,Q){return W===Q?W!==0||1/W===1/Q:W!==W&&Q!==Q}function y(W,Q){this.message=W,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}y.prototype=Error.prototype;function x(W){if(process.env.NODE_ENV!=="production")var Q={},ue=0;function oe(K,$,k,F,te,ie,ae){if(F=F||p,ie=ie||k,ae!==r){if(c){var ce=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 ce.name="Invariant Violation",ce}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var we=F+":"+k;!Q[we]&&ue<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ie+"` prop on `"+F+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),Q[we]=!0,ue++)}}return $[k]==null?K?$[k]===null?new y("The "+te+" `"+ie+"` is marked as required "+("in `"+F+"`, but its value is `null`.")):new y("The "+te+" `"+ie+"` is marked as required in "+("`"+F+"`, but its value is `undefined`.")):null:W($,k,F,te,ie)}var H=oe.bind(null,!1);return H.isRequired=oe.bind(null,!0),H}function b(W){function Q(ue,oe,H,K,$,k){var F=ue[oe],te=z(F);if(te!==W){var ie=X(F);return new y("Invalid "+K+" `"+$+"` of type "+("`"+ie+"` supplied to `"+H+"`, expected ")+("`"+W+"`."),{expectedType:W})}return null}return x(Q)}function w(){return x(a)}function S(W){function Q(ue,oe,H,K,$){if(typeof W!="function")return new y("Property `"+$+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var k=ue[oe];if(!Array.isArray(k)){var F=z(k);return new y("Invalid "+K+" `"+$+"` of type "+("`"+F+"` supplied to `"+H+"`, expected an array."))}for(var te=0;te<k.length;te++){var ie=W(k,te,H,K,$+"["+te+"]",r);if(ie instanceof Error)return ie}return null}return x(Q)}function E(){function W(Q,ue,oe,H,K){var $=Q[ue];if(!u($)){var k=z($);return new y("Invalid "+H+" `"+K+"` of type "+("`"+k+"` supplied to `"+oe+"`, expected a single ReactElement."))}return null}return x(W)}function _(){function W(Q,ue,oe,H,K){var $=Q[ue];if(!e.isValidElementType($)){var k=z($);return new y("Invalid "+H+" `"+K+"` of type "+("`"+k+"` supplied to `"+oe+"`, expected a single ReactElement type."))}return null}return x(W)}function R(W){function Q(ue,oe,H,K,$){if(!(ue[oe]instanceof W)){var k=W.name||p,F=re(ue[oe]);return new y("Invalid "+K+" `"+$+"` of type "+("`"+F+"` supplied to `"+H+"`, expected ")+("instance of `"+k+"`."))}return null}return x(Q)}function I(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function Q(ue,oe,H,K,$){for(var k=ue[oe],F=0;F<W.length;F++)if(m(k,W[F]))return null;var te=JSON.stringify(W,function(ae,ce){var we=X(ce);return we==="symbol"?String(ce):ce});return new y("Invalid "+K+" `"+$+"` of value `"+String(k)+"` "+("supplied to `"+H+"`, expected one of "+te+"."))}return x(Q)}function N(W){function Q(ue,oe,H,K,$){if(typeof W!="function")return new y("Property `"+$+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var k=ue[oe],F=z(k);if(F!=="object")return new y("Invalid "+K+" `"+$+"` of type "+("`"+F+"` supplied to `"+H+"`, expected an object."));for(var te in k)if(n(k,te)){var ie=W(k,te,H,K,$+"."+te,r);if(ie instanceof Error)return ie}return null}return x(Q)}function D(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var Q=0;Q<W.length;Q++){var ue=W[Q];if(typeof ue!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(ue)+" at index "+Q+"."),a}function oe(H,K,$,k,F){for(var te=[],ie=0;ie<W.length;ie++){var ae=W[ie],ce=ae(H,K,$,k,F,r);if(ce==null)return null;ce.data&&n(ce.data,"expectedType")&&te.push(ce.data.expectedType)}var we=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new y("Invalid "+k+" `"+F+"` supplied to "+("`"+$+"`"+we+"."))}return x(oe)}function L(){function W(Q,ue,oe,H,K){return T(Q[ue])?null:new y("Invalid "+H+" `"+K+"` supplied to "+("`"+oe+"`, expected a ReactNode."))}return x(W)}function B(W,Q,ue,oe,H){return new y((W||"React class")+": "+Q+" type `"+ue+"."+oe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function U(W){function Q(ue,oe,H,K,$){var k=ue[oe],F=z(k);if(F!=="object")return new y("Invalid "+K+" `"+$+"` of type `"+F+"` "+("supplied to `"+H+"`, expected `object`."));for(var te in W){var ie=W[te];if(typeof ie!="function")return B(H,K,$,te,X(ie));var ae=ie(k,te,H,K,$+"."+te,r);if(ae)return ae}return null}return x(Q)}function j(W){function Q(ue,oe,H,K,$){var k=ue[oe],F=z(k);if(F!=="object")return new y("Invalid "+K+" `"+$+"` of type `"+F+"` "+("supplied to `"+H+"`, expected `object`."));var te=t({},ue[oe],W);for(var ie in te){var ae=W[ie];if(n(W,ie)&&typeof ae!="function")return B(H,K,$,ie,X(ae));if(!ae)return new y("Invalid "+K+" `"+$+"` key `"+ie+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(ue[oe],null," ")+`
26
+ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var ce=ae(k,ie,H,K,$+"."+ie,r);if(ce)return ce}return null}return x(Q)}function T(W){switch(typeof W){case"number":case"string":case"undefined":return!0;case"boolean":return!W;case"object":if(Array.isArray(W))return W.every(T);if(W===null||u(W))return!0;var Q=h(W);if(Q){var ue=Q.call(W),oe;if(Q!==W.entries){for(;!(oe=ue.next()).done;)if(!T(oe.value))return!1}else for(;!(oe=ue.next()).done;){var H=oe.value;if(H&&!T(H[1]))return!1}}else return!1;return!0;default:return!1}}function G(W,Q){return W==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function z(W){var Q=typeof W;return Array.isArray(W)?"array":W instanceof RegExp?"object":G(Q,W)?"symbol":Q}function X(W){if(typeof W>"u"||W===null)return""+W;var Q=z(W);if(Q==="object"){if(W instanceof Date)return"date";if(W instanceof RegExp)return"regexp"}return Q}function Z(W){var Q=X(W);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function re(W){return!W.constructor||!W.constructor.name?p:W.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},km}var Lm,aN;function CX(){if(aN)return Lm;aN=1;var e=Wx();function t(){}function r(){}return r.resetWarningCache=t,Lm=function(){function n(a,u,c,d,f,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},Lm}var sN;function RX(){if(sN)return _u.exports;if(sN=1,process.env.NODE_ENV!=="production"){var e=m2(),t=!0;_u.exports=OX()(e.isElement,t)}else _u.exports=CX()();return _u.exports}var IX=RX();const fe=Un(IX);var Su={exports:{}},Je={};/** @license React v17.0.2
40
27
  * react-is.production.min.js
41
28
  *
42
29
  * Copyright (c) Facebook, Inc. and its affiliates.
43
30
  *
44
31
  * This source code is licensed under the MIT license found in the
45
32
  * LICENSE file in the root directory of this source tree.
46
- */var oC;function xK(){if(oC)return lt;oC=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),x;x=Symbol.for("react.module.reference");function b(m){if(typeof m=="object"&&m!==null){var w=m.$$typeof;switch(w){case e:switch(m=m.type,m){case r:case i:case n:case u:case d:return m;default:switch(m=m&&m.$$typeof,m){case s:case a:case c:case v:case p:case o:return m;default:return w}}case t:return w}}}return lt.ContextConsumer=a,lt.ContextProvider=o,lt.Element=e,lt.ForwardRef=c,lt.Fragment=r,lt.Lazy=v,lt.Memo=p,lt.Portal=t,lt.Profiler=i,lt.StrictMode=n,lt.Suspense=u,lt.SuspenseList=d,lt.isAsyncMode=function(){return!1},lt.isConcurrentMode=function(){return!1},lt.isContextConsumer=function(m){return b(m)===a},lt.isContextProvider=function(m){return b(m)===o},lt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},lt.isForwardRef=function(m){return b(m)===c},lt.isFragment=function(m){return b(m)===r},lt.isLazy=function(m){return b(m)===v},lt.isMemo=function(m){return b(m)===p},lt.isPortal=function(m){return b(m)===t},lt.isProfiler=function(m){return b(m)===i},lt.isStrictMode=function(m){return b(m)===n},lt.isSuspense=function(m){return b(m)===u},lt.isSuspenseList=function(m){return b(m)===d},lt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===i||m===n||m===u||m===d||m===h||typeof m=="object"&&m!==null&&(m.$$typeof===v||m.$$typeof===p||m.$$typeof===o||m.$$typeof===a||m.$$typeof===c||m.$$typeof===x||m.getModuleId!==void 0)},lt.typeOf=b,lt}var pt={};/**
47
- * @license React
33
+ */var uN;function PX(){if(uN)return Je;uN=1;var e=60103,t=60106,r=60107,n=60108,i=60114,o=60109,a=60110,u=60112,c=60113,d=60120,f=60115,h=60116,p=60121,v=60122,m=60117,y=60129,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"),y=b("react.debug_trace_mode"),x=b("react.legacy_hidden")}function w(j){if(typeof j=="object"&&j!==null){var T=j.$$typeof;switch(T){case e:switch(j=j.type,j){case r:case i:case n:case c: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 T}}case t:return T}}}var S=o,E=e,_=u,R=r,I=h,N=f,D=t,L=i,B=n,U=c;return Je.ContextConsumer=a,Je.ContextProvider=S,Je.Element=E,Je.ForwardRef=_,Je.Fragment=R,Je.Lazy=I,Je.Memo=N,Je.Portal=D,Je.Profiler=L,Je.StrictMode=B,Je.Suspense=U,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)===c},Je.isValidElementType=function(j){return typeof j=="string"||typeof j=="function"||j===r||j===i||j===y||j===n||j===c||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
48
34
  * react-is.development.js
49
35
  *
50
36
  * Copyright (c) Facebook, Inc. and its affiliates.
51
37
  *
52
38
  * This source code is licensed under the MIT license found in the
53
39
  * LICENSE file in the root directory of this source tree.
54
- */var aC;function wK(){return aC||(aC=1,process.env.NODE_ENV!=="production"&&(function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),x=!1,b=!1,m=!1,w=!1,y=!1,_;_=Symbol.for("react.module.reference");function S(ue){return!!(typeof ue=="string"||typeof ue=="function"||ue===r||ue===i||y||ue===n||ue===u||ue===d||w||ue===h||x||b||m||typeof ue=="object"&&ue!==null&&(ue.$$typeof===v||ue.$$typeof===p||ue.$$typeof===o||ue.$$typeof===a||ue.$$typeof===c||ue.$$typeof===_||ue.getModuleId!==void 0))}function E(ue){if(typeof ue=="object"&&ue!==null){var xe=ue.$$typeof;switch(xe){case e:var le=ue.type;switch(le){case r:case i:case n:case u:case d:return le;default:var se=le&&le.$$typeof;switch(se){case s:case a:case c:case v:case p:case o:return se;default:return xe}}case t:return xe}}}var I=a,N=o,T=e,k=c,L=r,B=v,A=p,z=t,P=i,K=n,$=u,Y=d,U=!1,Z=!1;function D(ue){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(ue){return Z||(Z=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Q(ue){return E(ue)===a}function ee(ue){return E(ue)===o}function j(ue){return typeof ue=="object"&&ue!==null&&ue.$$typeof===e}function F(ue){return E(ue)===c}function G(ue){return E(ue)===r}function q(ue){return E(ue)===v}function X(ue){return E(ue)===p}function te(ue){return E(ue)===t}function ne(ue){return E(ue)===i}function de(ue){return E(ue)===n}function re(ue){return E(ue)===u}function ge(ue){return E(ue)===d}pt.ContextConsumer=I,pt.ContextProvider=N,pt.Element=T,pt.ForwardRef=k,pt.Fragment=L,pt.Lazy=B,pt.Memo=A,pt.Portal=z,pt.Profiler=P,pt.StrictMode=K,pt.Suspense=$,pt.SuspenseList=Y,pt.isAsyncMode=D,pt.isConcurrentMode=W,pt.isContextConsumer=Q,pt.isContextProvider=ee,pt.isElement=j,pt.isForwardRef=F,pt.isFragment=G,pt.isLazy=q,pt.isMemo=X,pt.isPortal=te,pt.isProfiler=ne,pt.isStrictMode=de,pt.isSuspense=re,pt.isSuspenseList=ge,pt.isValidElementType=S,pt.typeOf=E})()),pt}var sC;function _K(){return sC||(sC=1,process.env.NODE_ENV==="production"?Mp.exports=xK():Mp.exports=wK()),Mp.exports}var lC=_K();const cC=e=>typeof e=="object"&&e!=null&&e.nodeType===1,uC=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Oc=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return uC(r.overflowY,t)||uC(r.overflowX,t)||(n=>{const i=(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},Cc=(e,t,r,n,i,o,a,s)=>o<e&&a>t||o>e&&a<t?0:o<=e&&s<=r||a>=t&&s>=r?o-e-n:a>t&&s<r||o<e&&s>r?a-t+i:0,EK=e=>e.parentElement??(e.getRootNode().host||null),SK=(e,t)=>{var r,n,i,o;if(typeof document>"u")return[];const{inline:a,boundary:s,skipOverflowHiddenElements:c}=t,u=typeof s=="function"?s:z=>z!==s;if(!cC(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,p=[];let v=e;for(;cC(v)&&u(v);){if(v=EK(v),v===d){p.push(v);break}v!=null&&v===document.body&&Oc(v)&&!Oc(document.documentElement)||v!=null&&Oc(v,c)&&p.push(v)}const h=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,x=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:b,scrollY:m}=window,{height:w,width:y,top:_,right:S,bottom:E,left:I}=e.getBoundingClientRect(),{top:N,right:T,left:k}=(z=>{const P=window.getComputedStyle(z);return{top:parseFloat(P.scrollMarginTop)||0,right:parseFloat(P.scrollMarginRight)||0,bottom:parseFloat(P.scrollMarginBottom)||0,left:parseFloat(P.scrollMarginLeft)||0}})(e);let L=_-N,B=a==="center"?I+y/2-k+T:a==="end"?S+T:I-k;const A=[];for(let z=0;z<p.length;z++){const P=p[z],{height:K,width:$,top:Y,right:U,bottom:Z,left:D}=P.getBoundingClientRect();if(_>=0&&I>=0&&E<=x&&S<=h&&(P===d&&!Oc(P)||_>=Y&&E<=Z&&I>=D&&S<=U))return A;const W=getComputedStyle(P),Q=parseInt(W.borderLeftWidth,10),ee=parseInt(W.borderTopWidth,10),j=parseInt(W.borderRightWidth,10),F=parseInt(W.borderBottomWidth,10);let G=0,q=0;const X="offsetWidth"in P?P.offsetWidth-P.clientWidth-Q-j:0,te="offsetHeight"in P?P.offsetHeight-P.clientHeight-ee-F:0,ne="offsetWidth"in P?P.offsetWidth===0?0:$/P.offsetWidth:0,de="offsetHeight"in P?P.offsetHeight===0?0:K/P.offsetHeight:0;if(d===P)G=Cc(m,m+x,x,ee,F,m+L,m+L+w,w),q=a==="start"?B:a==="center"?B-h/2:a==="end"?B-h:Cc(b,b+h,h,Q,j,b+B,b+B+y,y),G=Math.max(0,G+m),q=Math.max(0,q+b);else{G=Cc(Y,Z,K,ee,F+te,L,L+w,w),q=a==="start"?B-D-Q:a==="center"?B-(D+$/2)+X/2:a==="end"?B-U+j+X:Cc(D,U,$,Q,j+X,B,B+y,y);const{scrollLeft:re,scrollTop:ge}=P;G=de===0?0:Math.max(0,Math.min(ge+G/de,P.scrollHeight-K/de+te)),q=ne===0?0:Math.max(0,Math.min(re+q/ne,P.scrollWidth-$/ne+X)),L+=ge-G,B+=re-q}A.push({el:P,top:G,left:q})}return A};var oa=function(){return oa=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},oa.apply(this,arguments)},OK=0;function dC(e){return typeof e=="function"?e:br}function br(){}function qq(e,t){if(e){var r=SK(e,{boundary:t});r.forEach(function(n){var i=n.el,o=n.top,a=n.left;i.scrollTop=o,i.scrollLeft=a})}}function fC(e,t,r){var n=e===t||t instanceof r.Node&&e.contains&&e.contains(t);return n}function Ju(e,t){var r;function n(){r&&clearTimeout(r)}function i(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];n(),r=setTimeout(function(){r=null,e.apply(void 0,a)},t)}return i.cancel=n,i}function nt(){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(function(s){return s&&s.apply(void 0,[n].concat(o)),n.preventDownshiftDefault||n.hasOwnProperty("nativeEvent")&&n.nativeEvent.preventDownshiftDefault})}}function On(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){t.forEach(function(i){typeof i=="function"?i(n):i&&(i.current=n)})}}function Lq(){return String(OK++)}function CK(e){var t=e.isOpen,r=e.resultCount,n=e.previousResultCount;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 pC(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function zq(e){return typeof e.type=="string"}function Bq(e){return e.props}function IK(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var RK=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Ic(e){e===void 0&&(e={});var t={};return RK.forEach(function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function js(e,t){return!e||!t?e:Object.keys(e).reduce(function(r,n){return r[n]=_u(t,n)?t[n]:e[n],r},{})}function _u(e,t){return e[t]!==void 0}function aa(e){var t=e.key,r=e.keyCode;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function NK(e){return Object.prototype.toString.call(e)==="[object Object]"}function Cn(e,t,r,n,i){i===void 0&&(i=!1);var o=r.length;if(o===0)return-1;var a=o-1;(typeof e!="number"||e<0||e>a)&&(e=t>0?-1:a+1);var s=e+t;s<0?s=i?a:0:s>a&&(s=i?0:a);var c=ji(s,t<0,r,n,i);return c===-1?e>=o?-1:e:c}function ji(e,t,r,n,i){i===void 0&&(i=!1);var o=r.length;if(t){for(var a=e;a>=0;a--)if(!n(r[a],a))return a}else for(var s=e;s<o;s++)if(!n(r[s],s))return s;return i?ji(t?o-1:0,t,r,n):-1}function Eu(e,t,r,n){return n===void 0&&(n=!0),r&&t.some(function(i){return i&&(fC(i,e,r)||n&&fC(i,r.document.activeElement,r))})}var a1=br;process.env.NODE_ENV!=="production"&&(a1=function(e,t,r){var 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(function(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)})});var TK=Ju(function(e){Fq(e).textContent=""},500);function Fq(e){var 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)}function $q(e,t){if(!(!e||!t)){var r=Fq(t);r.textContent=e,TK(t)}}function PK(e){var t=e==null?void 0:e.getElementById("a11y-status-message");t&&t.remove()}var Vq=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,Hq=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,Wq=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,Jc=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Qc=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,Uq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,Gq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,Kq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Yq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,Xq=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,Zq=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Jq=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,Qq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,hw=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,eL=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,tL=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,rL=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,kK=Object.freeze({__proto__:null,blurButton:eL,blurInput:Zq,changeInput:Jq,clickButton:hw,clickItem:Xq,controlledPropUpdatedSelectedItem:tL,itemMouseEnter:Wq,keyDownArrowDown:Qc,keyDownArrowUp:Jc,keyDownEnd:Yq,keyDownEnter:Gq,keyDownEscape:Uq,keyDownHome:Kq,keyDownSpaceButton:Qq,mouseUp:Hq,touchEnd:rL,unknown:Vq}),MK=["refKey","ref"],AK=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],DK=["onKeyDown","onBlur","onChange","onInput","onChangeText"],jK=["refKey","ref"],qK=["onMouseMove","onMouseDown","onClick","onPress","index","item"],LK=(function(){var e=(function(t){function r(i){var o;o=t.call(this,i)||this,o.id=o.props.id||"downshift-"+Lq(),o.menuId=o.props.menuId||o.id+"-menu",o.labelId=o.props.labelId||o.id+"-label",o.inputId=o.props.inputId||o.id+"-input",o.getItemId=o.props.getItemId||function(y){return o.id+"-item-"+y},o.items=[],o.itemCount=null,o.previousResultCount=0,o.timeoutIds=[],o.internalSetTimeout=function(y,_){var S=setTimeout(function(){o.timeoutIds=o.timeoutIds.filter(function(E){return E!==S}),y()},_);o.timeoutIds.push(S)},o.setItemCount=function(y){o.itemCount=y},o.unsetItemCount=function(){o.itemCount=null},o.isItemDisabled=function(y,_){var S=o.getItemNodeFromIndex(_);return S&&S.hasAttribute("disabled")},o.setHighlightedIndex=function(y,_){y===void 0&&(y=o.props.defaultHighlightedIndex),_===void 0&&(_={}),_=Ic(_),o.internalSetState(ke({highlightedIndex:y},_))},o.clearSelection=function(y){o.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:o.props.defaultHighlightedIndex,isOpen:o.props.defaultIsOpen},y)},o.selectItem=function(y,_,S){_=Ic(_),o.internalSetState(ke({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,selectedItem:y,inputValue:o.props.itemToString(y)},_),S)},o.selectItemAtIndex=function(y,_,S){var E=o.items[y];E!=null&&o.selectItem(E,_,S)},o.selectHighlightedItem=function(y,_){return o.selectItemAtIndex(o.getState().highlightedIndex,y,_)},o.internalSetState=function(y,_){var S,E,I={},N=typeof y=="function";return!N&&y.hasOwnProperty("inputValue")&&o.props.onInputValueChange(y.inputValue,ke({},o.getStateAndHelpers(),y)),o.setState(function(T){var k;T=o.getState(T);var L=N?y(T):y;L=o.props.stateReducer(T,L),S=L.hasOwnProperty("selectedItem");var B={};return S&&L.selectedItem!==T.selectedItem&&(E=L.selectedItem),(k=L).type||(k.type=Vq),Object.keys(L).forEach(function(A){T[A]!==L[A]&&(I[A]=L[A]),A!=="type"&&(L[A],_u(o.props,A)||(B[A]=L[A]))}),N&&L.hasOwnProperty("inputValue")&&o.props.onInputValueChange(L.inputValue,ke({},o.getStateAndHelpers(),L)),B},function(){dC(_)();var T=Object.keys(I).length>1;T&&o.props.onStateChange(I,o.getStateAndHelpers()),S&&o.props.onSelect(y.selectedItem,o.getStateAndHelpers()),E!==void 0&&o.props.onChange(E,o.getStateAndHelpers()),o.props.onUserAction(I,o.getStateAndHelpers())})},o.rootRef=function(y){return o._rootNode=y},o.getRootProps=function(y,_){var S,E=y===void 0?{}:y,I=E.refKey,N=I===void 0?"ref":I,T=E.ref,k=yr(E,MK),L=_===void 0?{}:_,B=L.suppressRefError,A=B===void 0?!1:B;o.getRootProps.called=!0,o.getRootProps.refKey=N,o.getRootProps.suppressRefError=A;var z=o.getState(),P=z.isOpen;return ke((S={},S[N]=On(T,o.rootRef),S.role="combobox",S["aria-expanded"]=P,S["aria-haspopup"]="listbox",S["aria-owns"]=P?o.menuId:void 0,S["aria-labelledby"]=o.labelId,S),k)},o.keyDownHandlers={ArrowDown:function(y){var _=this;if(y.preventDefault(),this.getState().isOpen){var S=y.shiftKey?5:1;this.moveHighlightedIndex(S,{type:Qc})}else this.internalSetState({isOpen:!0,type:Qc},function(){var E=_.getItemCount();if(E>0){var I=_.getState(),N=I.highlightedIndex,T=Cn(N,1,{length:E},_.isItemDisabled,!0);_.setHighlightedIndex(T,{type:Qc})}})},ArrowUp:function(y){var _=this;if(y.preventDefault(),this.getState().isOpen){var S=y.shiftKey?-5:-1;this.moveHighlightedIndex(S,{type:Jc})}else this.internalSetState({isOpen:!0,type:Jc},function(){var E=_.getItemCount();if(E>0){var I=_.getState(),N=I.highlightedIndex,T=Cn(N,-1,{length:E},_.isItemDisabled,!0);_.setHighlightedIndex(T,{type:Jc})}})},Enter:function(y){if(y.which!==229){var _=this.getState(),S=_.isOpen,E=_.highlightedIndex;if(S&&E!=null){y.preventDefault();var I=this.items[E],N=this.getItemNodeFromIndex(E);if(I==null||N&&N.hasAttribute("disabled"))return;this.selectHighlightedItem({type:Gq})}}},Escape:function(y){y.preventDefault(),this.reset(ke({type:Uq},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},o.buttonKeyDownHandlers=ke({},o.keyDownHandlers,{" ":function(y){y.preventDefault(),this.toggleMenu({type:Qq})}}),o.inputKeyDownHandlers=ke({},o.keyDownHandlers,{Home:function(y){var _=this.getState(),S=_.isOpen;if(S){y.preventDefault();var E=this.getItemCount();if(!(E<=0||!S)){var I=ji(0,!1,{length:E},this.isItemDisabled);this.setHighlightedIndex(I,{type:Kq})}}},End:function(y){var _=this.getState(),S=_.isOpen;if(S){y.preventDefault();var E=this.getItemCount();if(!(E<=0||!S)){var I=ji(E-1,!0,{length:E},this.isItemDisabled);this.setHighlightedIndex(I,{type:Yq})}}}}),o.getToggleButtonProps=function(y){var _=y===void 0?{}:y,S=_.onClick;_.onPress;var E=_.onKeyDown,I=_.onKeyUp,N=_.onBlur,T=yr(_,AK),k=o.getState(),L=k.isOpen,B={onClick:nt(S,o.buttonHandleClick),onKeyDown:nt(E,o.buttonHandleKeyDown),onKeyUp:nt(I,o.buttonHandleKeyUp),onBlur:nt(N,o.buttonHandleBlur)},A=T.disabled?{}:B;return ke({type:"button",role:"button","aria-label":L?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},A,T)},o.buttonHandleKeyUp=function(y){y.preventDefault()},o.buttonHandleKeyDown=function(y){var _=aa(y);o.buttonKeyDownHandlers[_]&&o.buttonKeyDownHandlers[_].call(o,y)},o.buttonHandleClick=function(y){if(y.preventDefault(),o.props.environment){var _=o.props.environment.document,S=_.body,E=_.activeElement;S&&S===E&&y.target.focus()}process.env.NODE_ENV==="test"?o.toggleMenu({type:hw}):o.internalSetTimeout(function(){return o.toggleMenu({type:hw})})},o.buttonHandleBlur=function(y){var _=y.target;o.internalSetTimeout(function(){if(!(o.isMouseDown||!o.props.environment)){var S=o.props.environment.document.activeElement;(S==null||S.id!==o.inputId)&&S!==_&&o.reset({type:eL})}})},o.getLabelProps=function(y){return ke({htmlFor:o.inputId,id:o.labelId},y)},o.getInputProps=function(y){var _=y===void 0?{}:y,S=_.onKeyDown,E=_.onBlur,I=_.onChange,N=_.onInput;_.onChangeText;var T=yr(_,DK),k,L={};k="onChange";var B=o.getState(),A=B.inputValue,z=B.isOpen,P=B.highlightedIndex;if(!T.disabled){var K;L=(K={},K[k]=nt(I,N,o.inputHandleChange),K.onKeyDown=nt(S,o.inputHandleKeyDown),K.onBlur=nt(E,o.inputHandleBlur),K)}return ke({"aria-autocomplete":"list","aria-activedescendant":z&&typeof P=="number"&&P>=0?o.getItemId(P):void 0,"aria-controls":z?o.menuId:void 0,"aria-labelledby":T&&T["aria-label"]?void 0:o.labelId,autoComplete:"off",value:A,id:o.inputId},L,T)},o.inputHandleKeyDown=function(y){var _=aa(y);_&&o.inputKeyDownHandlers[_]&&o.inputKeyDownHandlers[_].call(o,y)},o.inputHandleChange=function(y){o.internalSetState({type:Jq,isOpen:!0,inputValue:y.target.value,highlightedIndex:o.props.defaultHighlightedIndex})},o.inputHandleBlur=function(){o.internalSetTimeout(function(){var y;if(!(o.isMouseDown||!o.props.environment)){var _=o.props.environment.document.activeElement,S=(_==null||(y=_.dataset)==null?void 0:y.toggle)&&o._rootNode&&o._rootNode.contains(_);S||o.reset({type:Zq})}})},o.menuRef=function(y){o._menuNode=y},o.getMenuProps=function(y,_){var S,E=y===void 0?{}:y,I=E.refKey,N=I===void 0?"ref":I,T=E.ref,k=yr(E,jK),L=_===void 0?{}:_,B=L.suppressRefError,A=B===void 0?!1:B;return o.getMenuProps.called=!0,o.getMenuProps.refKey=N,o.getMenuProps.suppressRefError=A,ke((S={},S[N]=On(T,o.menuRef),S.role="listbox",S["aria-labelledby"]=k&&k["aria-label"]?void 0:o.labelId,S.id=o.menuId,S),k)},o.getItemProps=function(y){var _,S=y===void 0?{}:y,E=S.onMouseMove,I=S.onMouseDown,N=S.onClick;S.onPress;var T=S.index,k=S.item,L=k===void 0?process.env.NODE_ENV==="production"?void 0:IK("getItemProps","item"):k,B=yr(S,qK);T===void 0?(o.items.push(L),T=o.items.indexOf(L)):o.items[T]=L;var A="onClick",z=N,P=(_={onMouseMove:nt(E,function(){T!==o.getState().highlightedIndex&&(o.setHighlightedIndex(T,{type:Wq}),o.avoidScrolling=!0,o.internalSetTimeout(function(){return o.avoidScrolling=!1},250))}),onMouseDown:nt(I,function($){$.preventDefault()})},_[A]=nt(z,function(){o.selectItemAtIndex(T,{type:Xq})}),_),K=B.disabled?{onMouseDown:P.onMouseDown}:P;return ke({id:o.getItemId(T),role:"option","aria-selected":o.getState().highlightedIndex===T},K,B)},o.clearItems=function(){o.items=[]},o.reset=function(y,_){y===void 0&&(y={}),y=Ic(y),o.internalSetState(function(S){var E=S.selectedItem;return ke({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,inputValue:o.props.itemToString(E)},y)},_)},o.toggleMenu=function(y,_){y===void 0&&(y={}),y=Ic(y),o.internalSetState(function(S){var E=S.isOpen;return ke({isOpen:!E},E&&{highlightedIndex:o.props.defaultHighlightedIndex},y)},function(){var S=o.getState(),E=S.isOpen,I=S.highlightedIndex;E&&o.getItemCount()>0&&typeof I=="number"&&o.setHighlightedIndex(I,y),dC(_)()})},o.openMenu=function(y){o.internalSetState({isOpen:!0},y)},o.closeMenu=function(y){o.internalSetState({isOpen:!1},y)},o.updateStatus=Ju(function(){var y;if((y=o.props)!=null&&(y=y.environment)!=null&&y.document){var _=o.getState(),S=o.items[_.highlightedIndex],E=o.getItemCount(),I=o.props.getA11yStatusMessage(ke({itemToString:o.props.itemToString,previousResultCount:o.previousResultCount,resultCount:E,highlightedItem:S},_));o.previousResultCount=E,$q(I,o.props.environment.document)}},200);var a=o.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=c===void 0?s:c,d=a.defaultIsOpen,p=a.initialIsOpen,v=p===void 0?d:p,h=a.initialInputValue,x=h===void 0?"":h,b=a.initialSelectedItem,m=b===void 0?null:b,w=o.getState({highlightedIndex:u,isOpen:v,inputValue:x,selectedItem:m});return w.selectedItem!=null&&o.props.initialInputValue===void 0&&(w.inputValue=o.props.itemToString(w.selectedItem)),o.state=w,o}dK(r,t);var n=r.prototype;return n.internalClearTimeouts=function(){this.timeoutIds.forEach(function(i){clearTimeout(i)}),this.timeoutIds=[]},n.getState=function(i){return i===void 0&&(i=this.state),js(i,this.props)},n.getItemCount=function(){var i=this.items.length;return this.itemCount!=null?i=this.itemCount:this.props.itemCount!==void 0&&(i=this.props.itemCount),i},n.getItemNodeFromIndex=function(i){return this.props.environment?this.props.environment.document.getElementById(this.getItemId(i)):null},n.scrollHighlightedItemIntoView=function(){{var i=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(i,this._menuNode)}},n.moveHighlightedIndex=function(i,o){var a=this.getItemCount(),s=this.getState(),c=s.highlightedIndex;if(a>0){var u=Cn(c,i,{length:a},this.isItemDisabled,!0);this.setHighlightedIndex(u,o)}},n.getStateAndHelpers=function(){var i=this.getState(),o=i.highlightedIndex,a=i.inputValue,s=i.selectedItem,c=i.isOpen,u=this.props.itemToString,d=this.id,p=this.getRootProps,v=this.getToggleButtonProps,h=this.getLabelProps,x=this.getMenuProps,b=this.getInputProps,m=this.getItemProps,w=this.openMenu,y=this.closeMenu,_=this.toggleMenu,S=this.selectItem,E=this.selectItemAtIndex,I=this.selectHighlightedItem,N=this.setHighlightedIndex,T=this.clearSelection,k=this.clearItems,L=this.reset,B=this.setItemCount,A=this.unsetItemCount,z=this.internalSetState;return{getRootProps:p,getToggleButtonProps:v,getLabelProps:h,getMenuProps:x,getInputProps:b,getItemProps:m,reset:L,openMenu:w,closeMenu:y,toggleMenu:_,selectItem:S,selectItemAtIndex:E,selectHighlightedItem:I,setHighlightedIndex:N,clearSelection:T,clearItems:k,setItemCount:B,unsetItemCount:A,setState:z,itemToString:u,id:d,highlightedIndex:o,inputValue:a,isOpen:c,selectedItem:s}},n.componentDidMount=function(){var i=this;if(process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&hC(this._menuNode,this.getMenuProps),!this.props.environment)this.cleanup=function(){i.internalClearTimeouts()};else{var o=function(){i.isMouseDown=!0},a=function(p){i.isMouseDown=!1;var v=Eu(p.target,[i._rootNode,i._menuNode],i.props.environment);!v&&i.getState().isOpen&&i.reset({type:Hq},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},s=function(){i.isTouchMove=!1},c=function(){i.isTouchMove=!0},u=function(p){var v=Eu(p.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!v&&i.getState().isOpen&&i.reset({type:rL},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},d=this.props.environment;d.addEventListener("mousedown",o),d.addEventListener("mouseup",a),d.addEventListener("touchstart",s),d.addEventListener("touchmove",c),d.addEventListener("touchend",u),this.cleanup=function(){i.internalClearTimeouts(),i.updateStatus.cancel(),d.removeEventListener("mousedown",o),d.removeEventListener("mouseup",a),d.removeEventListener("touchstart",s),d.removeEventListener("touchmove",c),d.removeEventListener("touchend",u)}}},n.shouldScroll=function(i,o){var a=this.props.highlightedIndex===void 0?this.getState():this.props,s=a.highlightedIndex,c=o.highlightedIndex===void 0?i:o,u=c.highlightedIndex,d=s&&this.getState().isOpen&&!i.isOpen,p=s!==u;return d||p},n.componentDidUpdate=function(i,o){process.env.NODE_ENV!=="production"&&(a1(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&hC(this._menuNode,this.getMenuProps)),_u(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:tL,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(o,i)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},n.componentWillUnmount=function(){this.cleanup()},n.render=function(){var i=pC(this.props.children,br);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;var o=pC(i(this.getStateAndHelpers()));if(!o)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&zK(o,this.getRootProps),o;if(zq(o))return C.cloneElement(o,this.getRootProps(Bq(o)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},r})(C.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:CK,itemToString:function(t){return t==null?"":(process.env.NODE_ENV!=="production"&&NK(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:br,onInputValueChange:br,onUserAction:br,onChange:br,onSelect:br,onOuterClick:br,selectedItemChanged:function(t,r){return t!==r},environment:typeof window>"u"?void 0:window,stateReducer:function(t,r){return r},suppressRefError:!1,scrollIntoView:qq},e.stateChangeTypes=kK,e})();process.env.NODE_ENV!=="production"&&(LK.propTypes={children:ye.func,defaultHighlightedIndex:ye.number,defaultIsOpen:ye.bool,initialHighlightedIndex:ye.number,initialSelectedItem:ye.any,initialInputValue:ye.string,initialIsOpen:ye.bool,getA11yStatusMessage:ye.func,itemToString:ye.func,onChange:ye.func,onSelect:ye.func,onStateChange:ye.func,onInputValueChange:ye.func,onUserAction:ye.func,onOuterClick:ye.func,selectedItemChanged:ye.func,stateReducer:ye.func,itemCount:ye.number,id:ye.string,environment:ye.shape({addEventListener:ye.func.isRequired,removeEventListener:ye.func.isRequired,document:ye.shape({createElement:ye.func.isRequired,getElementById:ye.func.isRequired,activeElement:ye.any.isRequired,body:ye.any.isRequired}).isRequired,Node:ye.func.isRequired}),suppressRefError:ye.bool,scrollIntoView:ye.func,selectedItem:ye.any,isOpen:ye.bool,inputValue:ye.string,highlightedIndex:ye.number,labelId:ye.string,inputId:ye.string,menuId:ye.string,getItemId:ye.func});function hC(e,t){var r=t.refKey;e||console.error('downshift: The ref prop "'+r+'" from getMenuProps was not applied correctly on your menu element.')}function zK(e,t){var r=t.refKey,n=r!=="ref",i=!zq(e);i&&!n&&!lC.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+'"'),!lC.isForwardRef(e)&&!Bq(e)[r]&&console.error('downshift: You must apply the ref prop "'+r+'" from getRootProps onto your root element.')}var nL={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function BK(e,t,r){var n=e.props,i=e.type,o={};Object.keys(t).forEach(function(a){FK(a,e,t,r),r[a]!==t[a]&&(o[a]=r[a])}),n.onStateChange&&Object.keys(o).length&&n.onStateChange(ke({type:i},o))}function FK(e,t,r,n){var i=t.props,o=t.type,a="on"+l1(e)+"Change";i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a](ke({type:o},n))}function $K(e,t){return t.changes}var vC=Ju(function(e,t){$q(e,t)},200),VK=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.useLayoutEffect:C.useEffect,iL="useId"in C?function(e){var t=e.id,r=e.labelId,n=e.menuId,i=e.getItemId,o=e.toggleButtonId,a=e.inputId,s="downshift-"+C.useId();t||(t=s);var c=C.useMemo(function(){return{labelId:r||t+"-label",menuId:n||t+"-menu",getItemId:i||function(u){return t+"-item-"+u},toggleButtonId:o||t+"-toggle-button",inputId:a||t+"-input"}},[i,t,a,r,n,o]);return c}:function(e){var t=e.id,r=t===void 0?"downshift-"+Lq():t,n=e.labelId,i=e.menuId,o=e.getItemId,a=e.toggleButtonId,s=e.inputId,c=C.useMemo(function(){return{labelId:n||r+"-label",menuId:i||r+"-menu",getItemId:o||function(u){return r+"-item-"+u},toggleButtonId:a||r+"-toggle-button",inputId:s||r+"-input"}},[o,r,s,n,i,a]);return c};function s1(e,t,r,n){var i,o;if(e===void 0){if(t===void 0)throw new Error(n);i=r[t],o=t}else o=t===void 0?r.indexOf(e):t,i=e;return[i,o]}function HK(e){return/^\S{1}$/.test(e)}function l1(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Qu(e){var t=C.useRef(e);return t.current=e,t}function oL(e,t,r,n){var i=C.useRef(),o=C.useRef(),a=C.useCallback(function(h,x){o.current=x,h=js(h,x.props);var b=e(h,x),m=x.props.stateReducer(h,ke({},x,{changes:b}));return m},[e]),s=C.useReducer(a,t,r),c=s[0],u=s[1],d=Qu(t),p=C.useCallback(function(h){return u(ke({props:d.current},h))},[d]),v=o.current;return C.useEffect(function(){var h=js(i.current,v==null?void 0:v.props),x=v&&i.current&&!n(h,c);x&&BK(v,h,c),i.current=c},[c,v,n]),[c,p]}function aL(e,t,r,n){var i=oL(e,t,r,n),o=i[0],a=i[1];return[js(o,t),a]}var Cs={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:$K,scrollIntoView:qq,environment:typeof window>"u"?void 0:window};function Fn(e,t,r){r===void 0&&(r=nL);var n=e["default"+l1(t)];return n!==void 0?n:r[t]}function ro(e,t,r){r===void 0&&(r=nL);var n=e[t];if(n!==void 0)return n;var i=e["initial"+l1(t)];return i!==void 0?i:Fn(e,t,r)}function sL(e){var t=ro(e,"selectedItem"),r=ro(e,"isOpen"),n=WK(e),i=ro(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.findIndex(function(o){return e.itemToKey(o)===e.itemToKey(t)}):n,isOpen:r,selectedItem:t,inputValue:i}}function no(e,t,r){var n=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,a=e.isItemDisabled,s=e.itemToKey,c=t.selectedItem,u=t.highlightedIndex;return n.length===0?-1:i!==void 0&&u===i&&!a(n[i],i)?i:o!==void 0&&!a(n[o],o)?o:c?n.findIndex(function(d){return s(c)===s(d)}):r<0&&!a(n[n.length-1],n.length-1)?n.length-1:r>0&&!a(n[0],0)?0:-1}function lL(e,t,r){var n=C.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),i=C.useCallback(function(){return r.map(function(o){return o.current})},[r]);return C.useEffect(function(){if(!e)return br;function o(){n.current.isTouchEnd=!1,n.current.isMouseDown=!0}function a(d){n.current.isMouseDown=!1,Eu(d.target,i(),e)||t()}function s(){n.current.isTouchEnd=!1,n.current.isTouchMove=!1}function c(){n.current.isTouchMove=!0}function u(d){n.current.isTouchEnd=!0,!n.current.isTouchMove&&!Eu(d.target,i(),e,!1)&&t()}return e.addEventListener("mousedown",o),e.addEventListener("mouseup",a),e.addEventListener("touchstart",s),e.addEventListener("touchmove",c),e.addEventListener("touchend",u),function(){e.removeEventListener("mousedown",o),e.removeEventListener("mouseup",a),e.removeEventListener("touchstart",s),e.removeEventListener("touchmove",c),e.removeEventListener("touchend",u)}},[e,i,t]),n.current}var ed=function(){return br};process.env.NODE_ENV!=="production"&&(ed=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=C.useRef(t.reduce(function(o,a){return o[a]={},o},{}));C.useEffect(function(){Object.keys(n.current).forEach(function(o){var a=n.current[o];if(!Object.keys(a).length){console.error("downshift: You forgot to call the "+o+" getter function on your component / element.");return}var s=a.suppressRefError,c=a.refKey,u=a.elementRef;s||u!=null&&u.current||console.error('downshift: The ref prop "'+c+'" from '+o+" was not applied correctly on your element.")})},[]);var i=C.useCallback(function(o,a,s,c){n.current[o]={suppressRefError:a,refKey:s,elementRef:c}},[]);return i});function c1(e,t,r,n){n===void 0&&(n={});var i=n.document,o=Js();C.useEffect(function(){if(!(!e||o||!i)){var a=e(t);vC(a,i)}},r),C.useEffect(function(){return function(){vC.cancel(),PK(i)}},[i])}function cL(e){var t=e.highlightedIndex,r=e.isOpen,n=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,a=e.scrollIntoView,s=C.useRef(!0);return VK(function(){t<0||!r||!Object.keys(n.current).length||(s.current===!1?s.current=!0:a(i(t),o))},[t]),s}var td=br;process.env.NODE_ENV!=="production"&&(td=function(e){var t=e.props,r=e.state,n=C.useRef(t),i=Js();C.useEffect(function(){i||(a1(r,n.current,t),n.current=t)},[r,t,i])});function Su(e,t,r){var n;r===void 0&&(r=!0);var i=((n=e.items)==null?void 0:n.length)&&t>=0;return ke({isOpen:!1,highlightedIndex:-1},i&&ke({selectedItem:e.items[t],isOpen:Fn(e,"isOpen"),highlightedIndex:Fn(e,"highlightedIndex")},r&&{inputValue:e.itemToString(e.items[t])}))}function uL(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Js(){var e=C.useRef(!0);return C.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function Ou(e){var t=Fn(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function WK(e){var t=ro(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}var eu={environment:ye.shape({addEventListener:ye.func.isRequired,removeEventListener:ye.func.isRequired,document:ye.shape({createElement:ye.func.isRequired,getElementById:ye.func.isRequired,activeElement:ye.any.isRequired,body:ye.any.isRequired}).isRequired,Node:ye.func.isRequired}),itemToString:ye.func,itemToKey:ye.func,stateReducer:ye.func},dL=ke({},eu,{getA11yStatusMessage:ye.func,highlightedIndex:ye.number,defaultHighlightedIndex:ye.number,initialHighlightedIndex:ye.number,isOpen:ye.bool,defaultIsOpen:ye.bool,initialIsOpen:ye.bool,selectedItem:ye.any,initialSelectedItem:ye.any,defaultSelectedItem:ye.any,id:ye.string,labelId:ye.string,menuId:ye.string,getItemId:ye.func,toggleButtonId:ye.string,onSelectedItemChange:ye.func,onHighlightedIndexChange:ye.func,onStateChange:ye.func,onIsOpenChange:ye.func,scrollIntoView:ye.func});function fL(e,t,r){var n=t.type,i=t.props,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:no(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:no(i,e,0)};break;case r.FunctionCloseMenu:o={isOpen:!1};break;case r.FunctionSetHighlightedIndex:o={highlightedIndex:i.isItemDisabled(i.items[t.highlightedIndex],t.highlightedIndex)?-1:t.highlightedIndex};break;case r.FunctionSetInputValue:o={inputValue:t.inputValue};break;case r.FunctionReset:o={highlightedIndex:Ou(i),isOpen:Fn(i,"isOpen"),selectedItem:Fn(i,"selectedItem"),inputValue:Fn(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ke({},e,o)}function UK(e){for(var t=e.keysSoFar,r=e.highlightedIndex,n=e.items,i=e.itemToString,o=e.isItemDisabled,a=t.toLowerCase(),s=0;s<n.length;s++){var c=(s+r+(t.length<2?1:0))%n.length,u=n[c];if(u!==void 0&&i(u).toLowerCase().startsWith(a)&&!o(u,c))return c}return r}var GK=oa(oa({},dL),{items:ye.array.isRequired,isItemDisabled:ye.func}),KK=oa(oa({},Cs),{isItemDisabled:function(){return!1}}),pL=br;process.env.NODE_ENV!=="production"&&(pL=function(e,t){ye.checkPropTypes(GK,e,"prop",t.name)});var tu=process.env.NODE_ENV!=="production"?"__togglebutton_click__":0,u1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_down__":1,d1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_up__":2,Cu=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_character__":3,f1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_escape__":4,p1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_home__":5,h1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_end__":6,v1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_enter__":7,g1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_space_button__":8,m1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_up__":9,b1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_down__":10,Iu=process.env.NODE_ENV!=="production"?"__togglebutton_blur__":11,hL=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":12,vL=process.env.NODE_ENV!=="production"?"__item_mouse_move__":13,y1=process.env.NODE_ENV!=="production"?"__item_click__":14,gL=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,mL=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,bL=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,yL=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,x1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,vw=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,xL=process.env.NODE_ENV!=="production"?"__function_reset__":21,wL=Object.freeze({__proto__:null,FunctionCloseMenu:bL,FunctionOpenMenu:mL,FunctionReset:xL,FunctionSelectItem:x1,FunctionSetHighlightedIndex:yL,FunctionSetInputValue:vw,FunctionToggleMenu:gL,ItemClick:y1,ItemMouseMove:vL,MenuMouseLeave:hL,ToggleButtonBlur:Iu,ToggleButtonClick:tu,ToggleButtonKeyDownArrowDown:u1,ToggleButtonKeyDownArrowUp:d1,ToggleButtonKeyDownCharacter:Cu,ToggleButtonKeyDownEnd:h1,ToggleButtonKeyDownEnter:v1,ToggleButtonKeyDownEscape:f1,ToggleButtonKeyDownHome:p1,ToggleButtonKeyDownPageDown:b1,ToggleButtonKeyDownPageUp:m1,ToggleButtonKeyDownSpaceButton:g1});function YK(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case y1:a={isOpen:Fn(i,"isOpen"),highlightedIndex:Ou(i),selectedItem:i.items[t.index]};break;case Cu:{var s=t.key,c=""+e.inputValue+s,u=!e.isOpen&&e.selectedItem?i.items.findIndex(function(h){return i.itemToKey(h)===i.itemToKey(e.selectedItem)}):e.highlightedIndex,d=UK({keysSoFar:c,highlightedIndex:u,items:i.items,itemToString:i.itemToString,isItemDisabled:i.isItemDisabled});a={inputValue:c,highlightedIndex:d,isOpen:!0}}break;case u1:{var p=e.isOpen?Cn(e.highlightedIndex,1,i.items,i.isItemDisabled):o&&e.selectedItem==null?-1:no(i,e,1);a={highlightedIndex:p,isOpen:!0}}break;case d1:if(e.isOpen&&o)a=Su(i,e.highlightedIndex,!1);else{var v=e.isOpen?Cn(e.highlightedIndex,-1,i.items,i.isItemDisabled):no(i,e,-1);a={highlightedIndex:v,isOpen:!0}}break;case v1:case g1:a=Su(i,e.highlightedIndex,!1);break;case p1:a={highlightedIndex:ji(0,!1,i.items,i.isItemDisabled),isOpen:!0};break;case h1:a={highlightedIndex:ji(i.items.length-1,!0,i.items,i.isItemDisabled),isOpen:!0};break;case m1:a={highlightedIndex:Cn(e.highlightedIndex,-10,i.items,i.isItemDisabled)};break;case b1:a={highlightedIndex:Cn(e.highlightedIndex,10,i.items,i.isItemDisabled)};break;case f1:a={isOpen:!1,highlightedIndex:-1};break;case Iu:a=ke({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((r=i.items)==null?void 0:r.length)&&{selectedItem:i.items[e.highlightedIndex]});break;case x1:a={selectedItem:t.selectedItem};break;default:return fL(e,t,wL)}return ke({},e,a)}var XK=["onClick"],ZK=["onMouseLeave","refKey","ref"],JK=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],QK=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];Yo.stateChangeTypes=wL;function Yo(e){e===void 0&&(e={}),pL(e,Yo);var t=ke({},KK,e),r=t.scrollIntoView,n=t.environment,i=t.getA11yStatusMessage,o=aL(YK,t,sL,uL),a=o[0],s=o[1],c=a.isOpen,u=a.highlightedIndex,d=a.selectedItem,p=a.inputValue,v=C.useRef(null),h=C.useRef(null),x=C.useRef({}),b=C.useRef(null),m=iL(t),w=Qu({state:a,props:t}),y=C.useCallback(function(D){return x.current[m.getItemId(D)]},[m]);c1(i,a,[c,u,d,p],n);var _=cL({menuElement:h.current,highlightedIndex:u,isOpen:c,itemRefs:x,scrollIntoView:r,getItemNodeFromIndex:y});C.useEffect(function(){return b.current=Ju(function(D){D({type:vw,inputValue:""})},500),function(){b.current.cancel()}},[]),C.useEffect(function(){p&&b.current(s)},[s,p]),td({props:t,state:a}),C.useEffect(function(){var D=ro(t,"isOpen");D&&v.current&&v.current.focus()},[]);var S=C.useCallback(function(){w.current.state.isOpen&&s({type:Iu})},[s,w]),E=C.useMemo(function(){return[h,v]},[]),I=lL(n,S,E),N=ed("getMenuProps","getToggleButtonProps");C.useEffect(function(){c||(x.current={})},[c]);var T=C.useMemo(function(){return{ArrowDown:function(D){D.preventDefault(),s({type:u1,altKey:D.altKey})},ArrowUp:function(D){D.preventDefault(),s({type:d1,altKey:D.altKey})},Home:function(D){D.preventDefault(),s({type:p1})},End:function(D){D.preventDefault(),s({type:h1})},Escape:function(){w.current.state.isOpen&&s({type:f1})},Enter:function(D){D.preventDefault(),s({type:w.current.state.isOpen?v1:tu})},PageUp:function(D){w.current.state.isOpen&&(D.preventDefault(),s({type:m1}))},PageDown:function(D){w.current.state.isOpen&&(D.preventDefault(),s({type:b1}))}," ":function(D){D.preventDefault();var W=w.current.state;if(!W.isOpen){s({type:tu});return}W.inputValue?s({type:Cu,key:" "}):s({type:g1})}}},[s,w]),k=C.useCallback(function(){s({type:gL})},[s]),L=C.useCallback(function(){s({type:bL})},[s]),B=C.useCallback(function(){s({type:mL})},[s]),A=C.useCallback(function(D){s({type:yL,highlightedIndex:D})},[s]),z=C.useCallback(function(D){s({type:x1,selectedItem:D})},[s]),P=C.useCallback(function(){s({type:xL})},[s]),K=C.useCallback(function(D){s({type:vw,inputValue:D})},[s]),$=C.useCallback(function(D){var W=D===void 0?{}:D,Q=W.onClick,ee=yr(W,XK),j=function(){var F;(F=v.current)==null||F.focus()};return ke({id:m.labelId,htmlFor:m.toggleButtonId,onClick:nt(Q,j)},ee)},[m]),Y=C.useCallback(function(D,W){var Q,ee=D===void 0?{}:D,j=ee.onMouseLeave,F=ee.refKey,G=F===void 0?"ref":F,q=ee.ref,X=yr(ee,ZK),te=W===void 0?{}:W,ne=te.suppressRefError,de=ne===void 0?!1:ne,re=function(){s({type:hL})};return N("getMenuProps",de,G,h),ke((Q={},Q[G]=On(q,function(ge){h.current=ge}),Q.id=m.menuId,Q.role="listbox",Q["aria-labelledby"]=X&&X["aria-label"]?void 0:""+m.labelId,Q.onMouseLeave=nt(j,re),Q),X)},[s,N,m]),U=C.useCallback(function(D,W){var Q,ee=D===void 0?{}:D,j=ee.onBlur,F=ee.onClick;ee.onPress;var G=ee.onKeyDown,q=ee.refKey,X=q===void 0?"ref":q,te=ee.ref,ne=yr(ee,JK),de=W===void 0?{}:W,re=de.suppressRefError,ge=re===void 0?!1:re,ue=w.current.state,xe=function(){s({type:tu})},le=function(){ue.isOpen&&!I.isMouseDown&&s({type:Iu})},se=function(Re){var Te=aa(Re);Te&&T[Te]?T[Te](Re):HK(Te)&&s({type:Cu,key:Te})},we=ke((Q={},Q[X]=On(te,function(Re){v.current=Re}),Q["aria-activedescendant"]=ue.isOpen&&ue.highlightedIndex>-1?m.getItemId(ue.highlightedIndex):"",Q["aria-controls"]=m.menuId,Q["aria-expanded"]=w.current.state.isOpen,Q["aria-haspopup"]="listbox",Q["aria-labelledby"]=ne&&ne["aria-label"]?void 0:""+m.labelId,Q.id=m.toggleButtonId,Q.role="combobox",Q.tabIndex=0,Q.onBlur=nt(j,le),Q),ne);return ne.disabled||(we.onClick=nt(F,xe),we.onKeyDown=nt(G,se)),N("getToggleButtonProps",ge,X,v),we},[s,m,w,I,N,T]),Z=C.useCallback(function(D){var W,Q=D===void 0?{}:D,ee=Q.item,j=Q.index,F=Q.onMouseMove,G=Q.onClick,q=Q.onMouseDown;Q.onPress;var X=Q.refKey,te=X===void 0?"ref":X,ne=Q.disabled,de=Q.ref,re=yr(Q,QK);ne!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var ge=w.current,ue=ge.state,xe=ge.props,le=s1(ee,j,xe.items,"Pass either item or index to getItemProps!"),se=le[0],we=le[1],Re=xe.isItemDisabled(se,we),Te=function(){I.isTouchEnd||we===ue.highlightedIndex||(_.current=!1,s({type:vL,index:we,disabled:Re}))},je=function(){s({type:y1,index:we})},Ke=function(et){return et.preventDefault()},qe=ke((W={},W[te]=On(de,function(et){et&&(x.current[m.getItemId(we)]=et)}),W["aria-disabled"]=Re,W["aria-selected"]=se===ue.selectedItem,W.id=m.getItemId(we),W.role="option",W),re);return Re||(qe.onClick=nt(G,je)),qe.onMouseMove=nt(F,Te),qe.onMouseDown=nt(q,Ke),qe},[w,m,I,_,s]);return{getToggleButtonProps:U,getLabelProps:$,getMenuProps:Y,getItemProps:Z,toggleMenu:k,openMenu:B,closeMenu:L,setHighlightedIndex:A,selectItem:z,reset:P,setInputValue:K,highlightedIndex:u,isOpen:c,selectedItem:d,inputValue:p}}var w1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,_1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,E1=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,S1=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,O1=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,C1=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,I1=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,R1=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,N1=process.env.NODE_ENV!=="production"?"__input_change__":8,Ru=process.env.NODE_ENV!=="production"?"__input_blur__":9,T1=process.env.NODE_ENV!=="production"?"__input_click__":10,_L=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,EL=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,P1=process.env.NODE_ENV!=="production"?"__item_click__":13,SL=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,OL=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,CL=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,IL=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,RL=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,k1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,NL=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,TL=process.env.NODE_ENV!=="production"?"__function_reset__":21,M1=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,PL=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:M1,FunctionCloseMenu:IL,FunctionOpenMenu:CL,FunctionReset:TL,FunctionSelectItem:k1,FunctionSetHighlightedIndex:RL,FunctionSetInputValue:NL,FunctionToggleMenu:OL,InputBlur:Ru,InputChange:N1,InputClick:T1,InputKeyDownArrowDown:w1,InputKeyDownArrowUp:_1,InputKeyDownEnd:O1,InputKeyDownEnter:R1,InputKeyDownEscape:E1,InputKeyDownHome:S1,InputKeyDownPageDown:I1,InputKeyDownPageUp:C1,ItemClick:P1,ItemMouseMove:EL,MenuMouseLeave:_L,ToggleButtonClick:SL});function e9(e){var t=sL(e),r=t.selectedItem,n=t.inputValue;return n===""&&r&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(n=e.itemToString(r)),ke({},t,{inputValue:n})}var t9=ke({},dL,{items:ye.array.isRequired,isItemDisabled:ye.func,inputValue:ye.string,defaultInputValue:ye.string,initialInputValue:ye.string,inputId:ye.string,onInputValueChange:ye.func});function r9(e,t,r,n){var i=C.useRef(),o=oL(e,t,r,n),a=o[0],s=o[1],c=Js();return C.useEffect(function(){if(_u(t,"selectedItem")){if(!c){var u=t.itemToKey(t.selectedItem)!==t.itemToKey(i.current);u&&s({type:M1,inputValue:t.itemToString(t.selectedItem)})}i.current=a.selectedItem===i.current?t.selectedItem:a.selectedItem}},[a.selectedItem,t.selectedItem]),[js(a,t),s]}var kL=br;process.env.NODE_ENV!=="production"&&(kL=function(e,t){ye.checkPropTypes(t9,e,"prop",t.name)});var n9=ke({},Cs,{isItemDisabled:function(){return!1}});function i9(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case P1:a={isOpen:Fn(i,"isOpen"),highlightedIndex:Ou(i),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case w1:e.isOpen?a={highlightedIndex:Cn(e.highlightedIndex,1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:o&&e.selectedItem==null?-1:no(i,e,1),isOpen:i.items.length>=0};break;case _1:e.isOpen?o?a=Su(i,e.highlightedIndex):a={highlightedIndex:Cn(e.highlightedIndex,-1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:no(i,e,-1),isOpen:i.items.length>=0};break;case R1:a=Su(i,e.highlightedIndex);break;case E1:a=ke({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case C1:a={highlightedIndex:Cn(e.highlightedIndex,-10,i.items,i.isItemDisabled,!0)};break;case I1:a={highlightedIndex:Cn(e.highlightedIndex,10,i.items,i.isItemDisabled,!0)};break;case S1:a={highlightedIndex:ji(0,!1,i.items,i.isItemDisabled)};break;case O1:a={highlightedIndex:ji(i.items.length-1,!0,i.items,i.isItemDisabled)};break;case Ru:a=ke({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((r=i.items)==null?void 0:r.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case N1:a={isOpen:!0,highlightedIndex:Ou(i),inputValue:t.inputValue};break;case T1:a={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:no(i,e,0)};break;case k1:a={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case M1:a={inputValue:t.inputValue};break;default:return fL(e,t,PL)}return ke({},e,a)}var o9=["onMouseLeave","refKey","ref"],a9=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],s9=["onClick","onPress","refKey","ref"],l9=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];ai.stateChangeTypes=PL;function ai(e){e===void 0&&(e={}),kL(e,ai);var t=ke({},n9,e),r=t.items,n=t.scrollIntoView,i=t.environment,o=t.getA11yStatusMessage,a=r9(i9,t,e9,uL),s=a[0],c=a[1],u=s.isOpen,d=s.highlightedIndex,p=s.selectedItem,v=s.inputValue,h=C.useRef(null),x=C.useRef({}),b=C.useRef(null),m=C.useRef(null),w=Js(),y=iL(t),_=C.useRef(),S=Qu({state:s,props:t}),E=C.useCallback(function(j){return x.current[y.getItemId(j)]},[y]);c1(o,s,[u,d,p,v],i);var I=cL({menuElement:h.current,highlightedIndex:d,isOpen:u,itemRefs:x,scrollIntoView:n,getItemNodeFromIndex:E});td({props:t,state:s}),C.useEffect(function(){var j=ro(t,"isOpen");j&&b.current&&b.current.focus()},[]),C.useEffect(function(){w||(_.current=r.length)});var N=C.useCallback(function(){S.current.state.isOpen&&c({type:Ru})},[c,S]),T=C.useMemo(function(){return[h,m,b]},[]),k=lL(i,N,T),L=ed("getInputProps","getMenuProps");C.useEffect(function(){u||(x.current={})},[u]),C.useEffect(function(){var j;!u||!(i!=null&&i.document)||!(b!=null&&(j=b.current)!=null&&j.focus)||i.document.activeElement!==b.current&&b.current.focus()},[u,i]);var B=C.useMemo(function(){return{ArrowDown:function(j){j.preventDefault(),c({type:w1,altKey:j.altKey})},ArrowUp:function(j){j.preventDefault(),c({type:_1,altKey:j.altKey})},Home:function(j){S.current.state.isOpen&&(j.preventDefault(),c({type:S1}))},End:function(j){S.current.state.isOpen&&(j.preventDefault(),c({type:O1}))},Escape:function(j){var F=S.current.state;(F.isOpen||F.inputValue||F.selectedItem||F.highlightedIndex>-1)&&(j.preventDefault(),c({type:E1}))},Enter:function(j){var F=S.current.state;!F.isOpen||j.which===229||(j.preventDefault(),c({type:R1}))},PageUp:function(j){S.current.state.isOpen&&(j.preventDefault(),c({type:C1}))},PageDown:function(j){S.current.state.isOpen&&(j.preventDefault(),c({type:I1}))}}},[c,S]),A=C.useCallback(function(j){return ke({id:y.labelId,htmlFor:y.inputId},j)},[y]),z=C.useCallback(function(j,F){var G,q=j===void 0?{}:j,X=q.onMouseLeave,te=q.refKey,ne=te===void 0?"ref":te,de=q.ref,re=yr(q,o9),ge=F===void 0?{}:F,ue=ge.suppressRefError,xe=ue===void 0?!1:ue;return L("getMenuProps",xe,ne,h),ke((G={},G[ne]=On(de,function(le){h.current=le}),G.id=y.menuId,G.role="listbox",G["aria-labelledby"]=re&&re["aria-label"]?void 0:""+y.labelId,G.onMouseLeave=nt(X,function(){c({type:_L})}),G),re)},[c,L,y]),P=C.useCallback(function(j){var F,G,q=j===void 0?{}:j,X=q.item,te=q.index,ne=q.refKey,de=ne===void 0?"ref":ne,re=q.ref,ge=q.onMouseMove,ue=q.onMouseDown,xe=q.onClick;q.onPress;var le=q.disabled,se=yr(q,a9);le!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var we=S.current,Re=we.props,Te=we.state,je=s1(X,te,Re.items,"Pass either item or index to getItemProps!"),Ke=je[0],qe=je[1],et=Re.isItemDisabled(Ke,qe),ht="onClick",St=xe,Ve=function(){k.isTouchEnd||qe===Te.highlightedIndex||(I.current=!1,c({type:EL,index:qe,disabled:et}))},De=function(){c({type:P1,index:qe})},it=function(ot){return ot.preventDefault()};return ke((F={},F[de]=On(re,function(ot){ot&&(x.current[y.getItemId(qe)]=ot)}),F["aria-disabled"]=et,F["aria-selected"]=qe===Te.highlightedIndex,F.id=y.getItemId(qe),F.role="option",F),!et&&(G={},G[ht]=nt(St,De),G),{onMouseMove:nt(ge,Ve),onMouseDown:nt(ue,it)},se)},[c,y,S,k,I]),K=C.useCallback(function(j){var F,G=j===void 0?{}:j,q=G.onClick;G.onPress;var X=G.refKey,te=X===void 0?"ref":X,ne=G.ref,de=yr(G,s9),re=S.current.state,ge=function(){c({type:SL})};return ke((F={},F[te]=On(ne,function(ue){m.current=ue}),F["aria-controls"]=y.menuId,F["aria-expanded"]=re.isOpen,F.id=y.toggleButtonId,F.tabIndex=-1,F),!de.disabled&&ke({},{onClick:nt(q,ge)}),de)},[c,S,y]),$=C.useCallback(function(j,F){var G,q=j===void 0?{}:j,X=q.onKeyDown,te=q.onChange,ne=q.onInput,de=q.onBlur;q.onChangeText;var re=q.onClick,ge=q.refKey,ue=ge===void 0?"ref":ge,xe=q.ref,le=yr(q,l9),se=F===void 0?{}:F,we=se.suppressRefError,Re=we===void 0?!1:we;L("getInputProps",Re,ue,b);var Te=S.current.state,je=function(De){var it=aa(De);it&&B[it]&&B[it](De)},Ke=function(De){c({type:N1,inputValue:De.target.value})},qe=function(De){if(i!=null&&i.document&&Te.isOpen&&!k.isMouseDown){var it=De.relatedTarget===null&&i.document.activeElement!==i.document.body;c({type:Ru,selectItem:!it})}},et=function(){c({type:T1})},ht="onChange",St={};if(!le.disabled){var Ve;St=(Ve={},Ve[ht]=nt(te,ne,Ke),Ve.onKeyDown=nt(X,je),Ve.onBlur=nt(de,qe),Ve.onClick=nt(re,et),Ve)}return ke((G={},G[ue]=On(xe,function(De){b.current=De}),G["aria-activedescendant"]=Te.isOpen&&Te.highlightedIndex>-1?y.getItemId(Te.highlightedIndex):"",G["aria-autocomplete"]="list",G["aria-controls"]=y.menuId,G["aria-expanded"]=Te.isOpen,G["aria-labelledby"]=le&&le["aria-label"]?void 0:y.labelId,G.autoComplete="off",G.id=y.inputId,G.role="combobox",G.value=Te.inputValue,G),St,le)},[c,y,i,B,S,k,L]),Y=C.useCallback(function(){c({type:OL})},[c]),U=C.useCallback(function(){c({type:IL})},[c]),Z=C.useCallback(function(){c({type:CL})},[c]),D=C.useCallback(function(j){c({type:RL,highlightedIndex:j})},[c]),W=C.useCallback(function(j){c({type:k1,selectedItem:j})},[c]),Q=C.useCallback(function(j){c({type:NL,inputValue:j})},[c]),ee=C.useCallback(function(){c({type:TL})},[c]);return{getItemProps:P,getLabelProps:A,getMenuProps:z,getInputProps:$,getToggleButtonProps:K,toggleMenu:Y,openMenu:Z,closeMenu:U,setHighlightedIndex:D,setInputValue:Q,selectItem:W,reset:ee,highlightedIndex:d,isOpen:u,selectedItem:p,inputValue:v}}var ML={activeIndex:-1,selectedItems:[]};function gC(e,t){return ro(e,t,ML)}function mC(e,t){return Fn(e,t,ML)}function c9(e){var t=gC(e,"activeIndex"),r=gC(e,"selectedItems");return{activeIndex:t,selectedItems:r}}function bC(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function u9(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var d9={stateReducer:eu.stateReducer,itemToKey:eu.itemToKey,environment:eu.environment,selectedItems:ye.array,initialSelectedItems:ye.array,defaultSelectedItems:ye.array,getA11yStatusMessage:ye.func,activeIndex:ye.number,initialActiveIndex:ye.number,defaultActiveIndex:ye.number,onActiveIndexChange:ye.func,onSelectedItemsChange:ye.func,keyNavigationNext:ye.string,keyNavigationPrevious:ye.string},f9={itemToKey:Cs.itemToKey,stateReducer:Cs.stateReducer,environment:Cs.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},AL=br;process.env.NODE_ENV!=="production"&&(AL=function(e,t){ye.checkPropTypes(d9,e,"prop",t.name)});var A1=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,D1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,j1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,q1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,L1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,z1=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,B1=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,F1=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,$1=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,V1=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,H1=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,W1=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,U1=process.env.NODE_ENV!=="production"?"__function_reset__":12,p9=Object.freeze({__proto__:null,DropdownClick:F1,DropdownKeyDownBackspace:B1,DropdownKeyDownNavigationPrevious:z1,FunctionAddSelectedItem:$1,FunctionRemoveSelectedItem:V1,FunctionReset:U1,FunctionSetActiveIndex:W1,FunctionSetSelectedItems:H1,SelectedItemClick:A1,SelectedItemKeyDownBackspace:j1,SelectedItemKeyDownDelete:D1,SelectedItemKeyDownNavigationNext:q1,SelectedItemKeyDownNavigationPrevious:L1});function h9(e,t){var r=t.type,n=t.index,i=t.props,o=t.selectedItem,a=e.activeIndex,s=e.selectedItems,c;switch(r){case A1:c={activeIndex:n};break;case L1:c={activeIndex:a-1<0?0:a-1};break;case q1:c={activeIndex:a+1>=s.length?-1:a+1};break;case j1:case D1:{if(a<0)break;var u=a;s.length===1?u=-1:a===s.length-1&&(u=s.length-2),c=ke({selectedItems:[].concat(s.slice(0,a),s.slice(a+1))},{activeIndex:u});break}case z1:c={activeIndex:s.length-1};break;case B1:c={selectedItems:s.slice(0,s.length-1)};break;case $1:c={selectedItems:[].concat(s,[o])};break;case F1:c={activeIndex:-1};break;case V1:{var d=a,p=s.findIndex(function(x){return i.itemToKey(x)===i.itemToKey(o)});if(p<0)break;s.length===1?d=-1:p===s.length-1&&(d=s.length-2),c={selectedItems:[].concat(s.slice(0,p),s.slice(p+1)),activeIndex:d};break}case H1:{var v=t.selectedItems;c={selectedItems:v};break}case W1:{var h=t.activeIndex;c={activeIndex:h};break}case U1:c={activeIndex:mC(i,"activeIndex"),selectedItems:mC(i,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ke({},e,c)}var v9=["refKey","ref","onClick","onKeyDown","selectedItem","index"],g9=["refKey","ref","onKeyDown","onClick","preventKeyAction"];G1.stateChangeTypes=p9;function G1(e){e===void 0&&(e={}),AL(e,G1);var t=ke({},f9,e),r=t.getA11yStatusMessage,n=t.environment,i=t.keyNavigationNext,o=t.keyNavigationPrevious,a=aL(h9,t,c9,u9),s=a[0],c=a[1],u=s.activeIndex,d=s.selectedItems,p=Js(),v=C.useRef(null),h=C.useRef();h.current=[];var x=Qu({state:s,props:t});c1(r,s,[u,d],n),C.useEffect(function(){p||(u===-1&&v.current?v.current.focus():h.current[u]&&h.current[u].focus())},[u]),td({props:t,state:s});var b=ed("getDropdownProps"),m=C.useMemo(function(){var k;return k={},k[o]=function(){c({type:L1})},k[i]=function(){c({type:q1})},k.Delete=function(){c({type:D1})},k.Backspace=function(){c({type:j1})},k},[c,i,o]),w=C.useMemo(function(){var k;return k={},k[o]=function(L){bC(L)&&c({type:z1})},k.Backspace=function(L){bC(L)&&c({type:B1})},k},[c,o]),y=C.useCallback(function(k){var L,B=k===void 0?{}:k,A=B.refKey,z=A===void 0?"ref":A,P=B.ref,K=B.onClick,$=B.onKeyDown,Y=B.selectedItem,U=B.index,Z=yr(B,v9),D=x.current.state,W=s1(Y,U,D.selectedItems,"Pass either item or index to getSelectedItemProps!"),Q=W[1],ee=Q>-1&&Q===D.activeIndex,j=function(){c({type:A1,index:Q})},F=function(G){var q=aa(G);q&&m[q]&&m[q](G)};return ke((L={},L[z]=On(P,function(G){G&&h.current.push(G)}),L.tabIndex=ee?0:-1,L.onClick=nt(K,j),L.onKeyDown=nt($,F),L),Z)},[c,x,m]),_=C.useCallback(function(k,L){var B,A=k===void 0?{}:k,z=A.refKey,P=z===void 0?"ref":z,K=A.ref,$=A.onKeyDown,Y=A.onClick,U=A.preventKeyAction,Z=U===void 0?!1:U,D=yr(A,g9),W=L===void 0?{}:L,Q=W.suppressRefError,ee=Q===void 0?!1:Q;b("getDropdownProps",ee,P,v);var j=function(G){var q=aa(G);q&&w[q]&&w[q](G)},F=function(){c({type:F1})};return ke((B={},B[P]=On(K,function(G){G&&(v.current=G)}),B),!Z&&{onKeyDown:nt($,j),onClick:nt(Y,F)},D)},[c,w,b]),S=C.useCallback(function(k){c({type:$1,selectedItem:k})},[c]),E=C.useCallback(function(k){c({type:V1,selectedItem:k})},[c]),I=C.useCallback(function(k){c({type:H1,selectedItems:k})},[c]),N=C.useCallback(function(k){c({type:W1,activeIndex:k})},[c]),T=C.useCallback(function(){c({type:U1})},[c]);return{getSelectedItemProps:y,getDropdownProps:_,addSelectedItem:S,removeSelectedItem:E,setSelectedItems:I,setActiveIndex:N,reset:T,selectedItems:d,activeIndex:u}}const m9=e=>{const{items:t=[],isMulti:r=!1,isSearchable:n=!1,value:i,defaultValue:o,inputValue:a,onChange:s,onInputChange:c,getOptionLabel:u=F=>(F==null?void 0:F.label)||"",getOptionValue:d=F=>(F==null?void 0:F.value)||"",isOpen:p,onOpenChange:v,customOptionGenerator:h,disableInternalFiltering:x=!1,stateReducer:b}=e,m=C.useCallback(F=>{const G=u(F);if(typeof G=="string")return G;if(typeof G=="number")return String(G);const q=F;if(typeof q=="object"&&q!==null){if(typeof q.label=="string")return q.label;if(typeof q.name=="string")return q.name}return String(d(F))},[u,d]),w=F=>F?Array.isArray(F)?F:[F]:[],y=o!==void 0?o:i!==void 0?i:null,[_,S]=C.useState(()=>w(y)),[E,I]=C.useState(a||""),[N,T]=C.useState(()=>p!==void 0?p:!1),k=i!==void 0?w(i):_,L=a!==void 0?a:E,B=p!==void 0?p:N,A=C.useCallback(F=>{p===void 0&&T(F),v==null||v(F)},[p,v]),z=C.useCallback(F=>{i===void 0&&S(F);const G=r?F:F[0]||null;s==null||s(G)},[i,r,s]),P=C.useCallback(F=>{a===void 0&&I(F),c==null||c(F)},[a,c]),K=C.useMemo(()=>h?h(L,t):x||!n||!L?t:t.filter(F=>m(F).toLowerCase().includes(L.toLowerCase())),[t,L,h,x,n,m]),$=G1({selectedItems:k,onSelectedItemsChange:F=>{const G=F.selectedItems||[];z(G)}}),Y={items:K,itemToString:F=>F?m(F):"",isOpen:B,onIsOpenChange:({isOpen:F})=>{F!==void 0&&A(F)},selectedItem:r?null:k[0]||null,onSelectedItemChange:F=>{!r&&F.selectedItem&&z([F.selectedItem])}},U=F=>(G,q)=>{const X=(()=>{const{changes:te,type:ne}=q;return r&&te.selectedItem&&(F===ai?[ai.stateChangeTypes.InputKeyDownEnter,ai.stateChangeTypes.ItemClick]:[Yo.stateChangeTypes.ToggleButtonKeyDownEnter,Yo.stateChangeTypes.ItemClick]).includes(ne)?(!k.some(de=>d(de)===d(te.selectedItem))&&te.selectedItem&&$.addSelectedItem(te.selectedItem),{...te,isOpen:!0,highlightedIndex:G.highlightedIndex,...n&&{inputValue:""}}):ne===ai.stateChangeTypes.InputBlur&&!r&&k.length>0?{...te,inputValue:m(k[0])}:te})();return b?b(G,{...q,changes:X}):X},Z=n?ai({...Y,inputValue:L,onInputValueChange:({inputValue:F,type:G})=>{!F&&G===ai.stateChangeTypes.InputChange&&z([]),P(F||"")},stateReducer:U(ai),initialIsOpen:p!==void 0?p:!1,defaultIsOpen:!1}):Yo({...Y,stateReducer:U(Yo),initialIsOpen:p!==void 0?p:!1,defaultIsOpen:!1}),D=()=>{A(!B),"toggleMenu"in Z&&Z.toggleMenu()},W=C.useCallback(()=>{A(!0),"openMenu"in Z&&Z.openMenu()},[A,Z]),Q=C.useCallback(()=>{A(!1),"closeMenu"in Z&&Z.closeMenu()},[A,Z]),ee=C.useCallback(()=>{z([]),P(""),r&&$.reset()},[z,P,r,$]),j=C.useCallback(F=>{r&&$.removeSelectedItem(F)},[r,$]);return{isOpen:Z.isOpen,selectedItem:Z.selectedItem,highlightedIndex:Z.highlightedIndex,inputValue:L,getToggleButtonProps:Z.getToggleButtonProps,getMenuProps:Z.getMenuProps,getItemProps:Z.getItemProps,getInputProps:"getInputProps"in Z?Z.getInputProps:void 0,selectedItems:k,filteredItems:K,setInputValue:P,setIsOpen:A,toggleMenu:D,openMenu:W,closeMenu:Q,clearSelection:ee,removeItem:j,multipleSelection:$,isMulti:r,isSearchable:n}},DL=({size:e="md",color:t="primary",isInvalid:r=!1,isDisabled:n=!1,className:i,children:o,options:a=[],value:s,defaultValue:c,onChange:u,isMulti:d,inputValue:p,onInputChange:v,isSearchable:h,isOpen:x,onOpenChange:b,customOptionGenerator:m,disableInternalFiltering:w,getOptionLabel:y=T=>typeof T=="string"||typeof T=="number"?String(T):(T==null?void 0:T.label)||(T==null?void 0:T.name)||String(T),getOptionValue:_=T=>typeof T=="string"||typeof T=="number"?String(T):(T==null?void 0:T.value)||(T==null?void 0:T.id)||(T==null?void 0:T.name)||String(T),isOptionDisabled:S=T=>(T==null?void 0:T.isDisabled)||!1,formatOptionLabel:E,stateReducer:I,...N})=>{const[T,k]=C.useState(!1),L=C.useMemo(()=>uK(a),[a]),B=m9({items:L,value:s,defaultValue:c,onChange:u,isMulti:d,inputValue:p,onInputChange:v,isSearchable:h,isOpen:x,onOpenChange:b,getOptionLabel:y,getOptionValue:_,customOptionGenerator:m,disableInternalFiltering:w,stateReducer:I}),A={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,hasMessage:T,setHasMessage:k,downshift:B,options:a,getOptionLabel:y,getOptionValue:_,isOptionDisabled:S,formatOptionLabel:E};return O.jsx(kq.Provider,{value:A,children:O.jsx("div",{"data-qui":"Select",className:me(G7(),i),...N,children:o})})},jL=C.forwardRef(({className:e,children:t,isFocused:r,isDisabled:n,...i},o)=>{const{size:a,color:s,isDisabled:c,hasMessage:u,downshift:d,isInvalid:p}=Er(),v=n??c,h=r??d.isOpen;return O.jsx("div",{ref:o,className:me(K7({size:a,color:s,isDisabled:v,isFocused:!!h,isInvalid:p&&!d.isOpen,hasMessage:u}),e),"aria-disabled":v,"aria-invalid":p,role:"combobox",tabIndex:v?-1:0,...i,children:t})}),qL=({className:e,children:t,isMulti:r})=>O.jsx("div",{className:me(Y7({isMulti:r}),e),children:t}),ru=C.forwardRef(({isHidden:e,inputClassName:t,...r},n)=>{const{size:i,color:o}=Er();return e?O.jsx("input",{ref:n,type:"text",style:{position:"absolute",top:0,left:0,opacity:0,width:"100%",height:"100%",pointerEvents:"none"},tabIndex:-1,...r}):O.jsx("input",{ref:n,type:"text",className:me(X7({size:i,color:o}),t),...r})}),LL=({className:e,children:t})=>{const{size:r,color:n}=Er();return O.jsx("div",{className:me(Z7({size:r,color:n}),e),children:t})},zL=({className:e,children:t,data:r,isDisabled:n})=>{const{size:i,color:o,getOptionLabel:a,formatOptionLabel:s}=Er();return O.jsx("div",{className:me(J7({size:i,color:o,isDisabled:n}),e),children:t||(s?s(r):a(r))})},BL=({className:e,children:t,data:r,isDisabled:n,isFocused:i,onRemove:o})=>{const{size:a,color:s,downshift:c,getOptionLabel:u,formatOptionLabel:d}=Er(),p=()=>{o?o(r):c.removeItem(r)};return O.jsxs("div",{className:me(Q7({size:a,color:s,isDisabled:n,isFocused:i}),e),children:[O.jsx("div",{className:eK({size:a}),children:t||(d?d(r):u(r))}),!n&&O.jsx("div",{className:tK({size:a,color:s,isDisabled:!1}),onClick:p,children:O.jsx(Wu,{className:"w-3 h-3"})})]})},FL=({color:e,className:t,children:r,onClick:n,isDisabled:i,...o})=>{const{size:a,color:s,isDisabled:c,downshift:u}=Er(),d=i??c,p=u.selectedItems.length>0;if(d||!p)return null;const v=h=>{h.stopPropagation(),n?n(h):u.clearSelection()};return O.jsx("div",{className:me(Mq({size:a,color:e||s,isDisabled:d}),t),onClick:v,role:"button",tabIndex:0,"aria-label":"Clear selection",...o,children:r||O.jsx(RW,{})})},b9=({className:e,children:t,onClick:r,isDisabled:n,...i})=>{const{size:o,color:a,isDisabled:s,downshift:c}=Er(),u=n??s,d=c.inputValue.length>0&&c.isSearchable;if(u||!d)return null;const p=v=>{v.stopPropagation(),r?r(v):c.setInputValue("")};return O.jsx("div",{className:me(Mq({size:o,color:a,isDisabled:u}),e),onClick:p,role:"button",tabIndex:0,"aria-label":"Clear selection",...i,children:t||O.jsx(Wu,{})})},$L=({color:e,className:t,children:r,onClick:n,isDisabled:i,...o})=>{const{size:a,color:s,isDisabled:c,downshift:u}=Er(),d=i??c,p=u.isOpen,v=h=>{h.stopPropagation(),d||(n?n(h):u.toggleMenu())};return O.jsx("div",{className:me(rK({size:a,color:e||s,isDisabled:d}),"cursor-pointer",t),onClick:v,role:"button",tabIndex:d?-1:0,"aria-label":p?"Close menu":"Open menu","aria-expanded":p,"aria-disabled":d,onMouseDown:h=>{h.preventDefault()},...o,children:r||O.jsx(NW,{className:me("transition-transform duration-200",{"rotate-180":p})})})},VL=C.forwardRef(({className:e,children:t,placement:r,...n},i)=>{const{size:o,hasMessage:a,color:s}=Er();return O.jsx("div",{"data-qui":"SelectMenu",ref:i,className:me(nK({size:o,placement:r,hasMessage:a,color:s}),e),...n,children:t})}),HL=C.forwardRef(({className:e,children:t,maxHeight:r=300,...n},i)=>{const{size:o}=Er();return O.jsx(Ww,{scrollableNodeProps:{ref:i},className:me(iK({size:o}),e),style:{maxHeight:r},...n,children:t})}),gw=({className:e,children:t,data:r,isDisabled:n,isFocused:i,isSelected:o,innerProps:a,...s})=>{const{size:c,color:u,getOptionLabel:d,formatOptionLabel:p}=Er();return O.jsx("div",{"data-qui":"SelectOption",className:me(oK({size:c,color:u,isDisabled:n,isFocused:i,isSelected:o}),e),...a,...s,children:t||(p?p(r):d(r))})},WL=({className:e,children:t,data:r,label:n})=>{const{size:i}=Er();return O.jsxs("div",{"data-qui":"SelectGroup",className:me(aK({size:i}),e),children:[O.jsx(UL,{children:n||r.label}),t]})},UL=({className:e,children:t})=>{const{size:r,color:n}=Er();return O.jsx("div",{className:me(sK({size:r,color:n}),e),children:t})},nu=({className:e,children:t,inputValue:r})=>{const{size:n}=Er();return O.jsx("div",{className:me(cK({size:n}),e),children:t||`No options found${r?` for "${r}"`:""}`})},y9=({isOpen:e,usePortal:t,controlRef:r,children:n})=>{const[i,o]=C.useState(null);return C.useLayoutEffect(()=>{if(t&&e&&r.current){const a=()=>{var s;const c=(s=r.current)==null?void 0:s.getBoundingClientRect();c&&o({top:c.top+window.scrollY,left:c.left+window.scrollX,width:c.width,height:c.height})};return a(),window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0)}}},[e,t,r]),e?t&&i?si.createPortal(O.jsx("div",{className:"absolute z-50",style:{top:i.top,left:i.left,width:i.width,height:i.height,pointerEvents:"none"},children:O.jsx("div",{className:"relative w-full h-full",children:O.jsx("div",{style:{pointerEvents:"auto"},children:n})})}),document.body):O.jsx(O.Fragment,{children:n}):null},x9=e=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&"current"in r&&(r.current=t)})},GL=C.forwardRef(({placeholder:e,noOptionsMessage:t="",hideNoOptions:r=!1,loadingMessage:n="Loading...",isClearable:i=!1,isSearchClearable:o=!1,isLoading:a=!1,isRequired:s=!1,hideIndicators:c=!1,hideDropdownIndicator:u=!1,searchPlacement:d="trigger",hideSelectedOptions:p=!1,onFocus:v,onBlur:h,renderMenuHeader:x,formatOptionLabel:b,displayFormattedOption:m=!1,renderMultiValue:w,renderOption:y,inputRef:_,controlShouldRenderValue:S=!0,name:E,id:I,onSelectionComplete:N,"aria-label":T,"aria-labelledby":k,"aria-describedby":L,children:B,usePortal:A=!1,...z},P)=>{const{size:K,isInvalid:$,isDisabled:Y,downshift:U,options:Z=[],getOptionLabel:D,getOptionValue:W,isOptionDisabled:Q}=Er(),ee=C.useRef(null),j=_||ee,F=C.useRef(null),{isOpen:G,openMenu:q,selectedItem:X,inputValue:te,highlightedIndex:ne,getToggleButtonProps:de,getMenuProps:re,getInputProps:ge,getItemProps:ue,isMulti:xe,isSearchable:le}=U,se=xe?U.selectedItems??[]:X?[X]:[],we=se.length>0,Re=o&&!Y&&!c,Te=i&&we&&!Y&&!c,je=!u&&!c,Ke=!we&&(!le||!te)||!S,qe={},et={};Object.entries(z).forEach(([Le,Ye])=>{Le.startsWith("data-")||Le.startsWith("aria-")||Le==="role"?qe[Le]=Ye:et[Le]=Ye});const ht=C.useMemo(()=>x9([F,P]),[P]),St=(ge==null?void 0:ge({ref:j,disabled:Y,required:s,name:E,id:I,"aria-label":T,"aria-labelledby":k,"aria-describedby":L,"aria-invalid":$,onFocus:v,onBlur:h,...et}))??{},{ref:Ve,...De}=St,it=Le=>se.some(Ye=>W(Ye)===W(Le)),ot=Le=>p?Le.filter(Ye=>!it(Ye)):Le,Qt=Le=>p?Le.map(Ye=>({...Ye,options:ot(Ye.options)})).filter(Ye=>Ye.options.length>0):Le,Bt=Le=>{N==null||N(W(Le),Le)},Tt=le?{}:de({disabled:Y,ref:ht});return O.jsxs("div",{className:"relative",children:[O.jsxs(jL,{...le?{ref:ht}:Tt,...qe,isFocused:G,isDisabled:Y,onClick:Le=>{Le.stopPropagation(),le?q():le||U.toggleMenu()},children:[B||O.jsxs(qL,{isMulti:xe,children:[xe&&S&&se.map((Le,Ye)=>w?w({data:Le,index:Ye,isDisabled:Y,onRemove:bt=>U.removeItem(bt)}):O.jsx(BL,{data:Le,index:Ye,isDisabled:Y},W(Le))),!xe&&we&&S&&!le&&O.jsx("div",{className:"flex items-center gap-2",children:O.jsx(zL,{data:se[0],isDisabled:Y,children:b&&m?b(se[0]):D(se[0])})}),le&&d==="trigger"?O.jsx(ru,{ref:Ve,...De,placeholder:e}):O.jsxs(O.Fragment,{children:[O.jsx(ru,{ref:Ve,...De,isHidden:!0,value:se.map(Le=>W(Le)).join(",")}),Ke&&O.jsx(LL,{children:e})]})]}),O.jsxs("div",{className:me("flex items-center size-fit gap-1",{hidden:!Te&&!je}),children:[Re&&O.jsx(b9,{}),Te&&O.jsx(FL,{}),je&&O.jsx($L,{...le?de({disabled:Y,"aria-label":G?"Close menu":"Open menu"}):{}})]})]}),O.jsx(y9,{isOpen:G,usePortal:A,controlRef:F,children:(()=>{const Le=re({},{suppressRefError:!0});return r&&U.filteredItems.length===0?O.jsx("div",{...Le,style:{display:"none"},"aria-hidden":"true"}):O.jsxs(VL,{...Le,children:[x&&x(U),le&&d==="menu"&&O.jsx("div",{className:"p-2",children:O.jsx(ru,{ref:Ve,...De,autoFocus:!0,placeholder:e,onClick:Ye=>Ye.stopPropagation()})}),O.jsx(HL,{children:a?O.jsx("div",{className:lK({size:K}),children:n}):U.filteredItems.length===0?O.jsx(nu,{inputValue:te,children:typeof t=="function"?t(te):t}):Aq(Z)?(()=>{const Ye=Qt(Z);return Ye.length===0?O.jsx(nu,{inputValue:te,children:typeof t=="function"?t(te):t}):Ye.map(bt=>O.jsx(WL,{data:bt,label:bt.label,options:bt.options,children:bt.options.map(Ot=>{const Ht=W(Ot),Lr=se.some(er=>W(er)===Ht),mn=U.filteredItems.findIndex(er=>W(er)===Ht),Ct=ne===mn,It=Q(Ot),Pt=ue({item:Ot,index:mn,onClick:()=>Bt(Ot)});return O.jsx(gw,{...Pt,data:Ot,isDisabled:It,isFocused:Ct,isSelected:Lr,children:b?b(Ot):D(Ot)},Ht)})},bt.label))})():(()=>{const Ye=ot(U.filteredItems);return Ye.length===0?O.jsx(nu,{inputValue:te,children:typeof t=="function"?t(te):t}):Ye.map(bt=>{const Ot=W(bt),Ht=se.some(Pt=>W(Pt)===Ot),Lr=U.filteredItems.findIndex(Pt=>W(Pt)===Ot),mn=ne===Lr,Ct=Q(bt),It=ue({item:bt,index:Lr,onClick:()=>Bt(bt)});return y?O.jsx(C.Fragment,{children:y({...It,data:bt,isDisabled:Ct,isFocused:mn,isSelected:Ht})},Ot):O.jsx(gw,{...It,data:bt,isDisabled:Ct,isFocused:mn,isSelected:Ht,children:b?b(bt):D(bt)},Ot)})})()})]})})()})]})});DL.displayName="Select.Root";jL.displayName="Select.Control";qL.displayName="Select.ValueContainer";ru.displayName="Select.Input";LL.displayName="Select.Placeholder";zL.displayName="Select.SingleValue";BL.displayName="Select.MultiValue";FL.displayName="Select.ClearIndicator";$L.displayName="Select.DropdownIndicator";VL.displayName="Select.Menu";HL.displayName="Select.MenuList";gw.displayName="Select.Option";WL.displayName="Select.Group";UL.displayName="Select.GroupHeading";nu.displayName="Select.NoOptionsMessage";const w9=GL;w9.displayName="Select.Field";const yC={Root:DL,Field:GL};C.createContext(void 0);const _9=({active:e,disabled:t,error:r,isOpen:n,className:i})=>me("flex w-full items-center justify-between text-left leading-5 transition-colors duration-200",{"cursor-pointer":!t,"text-inactive-text":t,"bg-primary hover:bg-primary-hover text-tab-active-fg":e&&!t,"text-negative":r&&!e&&!t,"bg-primary":n&&!e&&!t,"text-tab-inactive-fg":!e&&!t&&!r,"hover:bg-primary-hover hover:text-tab-active-fg":!t&&!e},i),E9=C.forwardRef(({active:e,disabled:t,error:r,isOpen:n,className:i,children:o,as:a="div",...s},c)=>{const u=_9({active:e,disabled:t,error:r,isOpen:n,className:i});return O.jsx(a,{"data-qui":"ListItem",ref:c,className:u,"aria-disabled":t,"aria-selected":e,"aria-invalid":r,"aria-expanded":n,role:s.onClick?"button":"listitem",...s,children:o})});E9.displayName="ListItem";function S9({qodly:e,activeTab:t,forceLogin:r,onTabChange:n,restrictedByDefault:i,onRestrictedByDefaultChange:o,onForceLoginChange:a}){return O.jsx(O.Fragment,{children:O.jsx(ur,{depth:1,className:"relative mb-0 flex h-auto flex-wrap items-center justify-between border-b px-4 py-3",children:O.jsx("div",{className:"flex w-full flex-wrap items-center justify-between",children:O.jsxs("div",{className:"relative flex w-full justify-between",children:[O.jsxs(Op,{defaultValue:t,onTabChange:s=>n(s),children:[O.jsx(Op.Item,{label:"Roles",value:"roles","data-cy":"roles_btn_navbar"}),O.jsx(Op.Item,{label:"Privileges",value:"privileges","data-cy":"privileges_btn_navbar"})]}),O.jsxs("div",{className:"flex gap-2 justify-between",children:[O.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[O.jsx(wu,{checked:i||!1,onChange:s=>{o(s)}}),O.jsx("span",{className:"px-1 text-xs",children:"Restrict Access By Default"}),O.jsx(fe.Tip,{tipKey:"editors:roles:toolbar:restrictedByDefault",alwaysOn:!0,side:"left"})]}),e===!1&&O.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[O.jsx(wu,{checked:r||!1,onChange:s=>{a(s)}}),O.jsx("span",{className:"px-1 text-xs",children:"Force login"}),O.jsx(fe.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const KL=C.createContext(void 0),O9=({children:e})=>{const[t,r]=C.useState(null);function n(o){r(o)}const i={selectedRole:t,selectRole:n};return O.jsx(KL.Provider,{value:i,children:e})};function K1(){const e=C.useContext(KL);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var xC=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},wC=typeof window<"u"&&window.document&&window.document.createElement?Et.useLayoutEffect:Et.useEffect,Mr="top",dn="bottom",fn="right",Ar="left",Y1="auto",Qs=[Mr,dn,fn,Ar],sa="start",qs="end",C9="clippingParents",YL="viewport",Ya="popper",I9="reference",_C=Qs.reduce(function(e,t){return e.concat([t+"-"+sa,t+"-"+qs])},[]),XL=[].concat(Qs,[Y1]).reduce(function(e,t){return e.concat([t,t+"-"+sa,t+"-"+qs])},[]),R9="beforeRead",N9="read",T9="afterRead",P9="beforeMain",k9="main",M9="afterMain",A9="beforeWrite",D9="write",j9="afterWrite",q9=[R9,N9,T9,P9,k9,M9,A9,D9,j9];function Wn(e){return e?(e.nodeName||"").toLowerCase():null}function Yr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function uo(e){var t=Yr(e).Element;return e instanceof t||e instanceof Element}function un(e){var t=Yr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function X1(e){if(typeof ShadowRoot>"u")return!1;var t=Yr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function L9(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];!un(o)||!Wn(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function z9(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]),s=a.reduce(function(c,u){return c[u]="",c},{});!un(i)||!Wn(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const B9={name:"applyStyles",enabled:!0,phase:"write",fn:L9,effect:z9,requires:["computeStyles"]};function $n(e){return e.split("-")[0]}var io=Math.max,Nu=Math.min,la=Math.round;function mw(){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 ZL(){return!/^((?!chrome|android).)*safari/i.test(mw())}function ca(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&un(e)&&(i=e.offsetWidth>0&&la(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&la(n.height)/e.offsetHeight||1);var a=uo(e)?Yr(e):window,s=a.visualViewport,c=!ZL()&&r,u=(n.left+(c&&s?s.offsetLeft:0))/i,d=(n.top+(c&&s?s.offsetTop:0))/o,p=n.width/i,v=n.height/o;return{width:p,height:v,top:d,right:u+p,bottom:d+v,left:u,x:u,y:d}}function Z1(e){var t=ca(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 JL(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&X1(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ui(e){return Yr(e).getComputedStyle(e)}function F9(e){return["table","td","th"].indexOf(Wn(e))>=0}function qi(e){return((uo(e)?e.ownerDocument:e.document)||window.document).documentElement}function rd(e){return Wn(e)==="html"?e:e.assignedSlot||e.parentNode||(X1(e)?e.host:null)||qi(e)}function EC(e){return!un(e)||ui(e).position==="fixed"?null:e.offsetParent}function $9(e){var t=/firefox/i.test(mw()),r=/Trident/i.test(mw());if(r&&un(e)){var n=ui(e);if(n.position==="fixed")return null}var i=rd(e);for(X1(i)&&(i=i.host);un(i)&&["html","body"].indexOf(Wn(i))<0;){var o=ui(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 el(e){for(var t=Yr(e),r=EC(e);r&&F9(r)&&ui(r).position==="static";)r=EC(r);return r&&(Wn(r)==="html"||Wn(r)==="body"&&ui(r).position==="static")?t:r||$9(e)||t}function J1(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Is(e,t,r){return io(e,Nu(t,r))}function V9(e,t,r){var n=Is(e,t,r);return n>r?r:n}function QL(){return{top:0,right:0,bottom:0,left:0}}function ez(e){return Object.assign({},QL(),e)}function tz(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var H9=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,ez(typeof t!="number"?t:tz(t,Qs))};function W9(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=$n(r.placement),c=J1(s),u=[Ar,fn].indexOf(s)>=0,d=u?"height":"width";if(!(!o||!a)){var p=H9(i.padding,r),v=Z1(o),h=c==="y"?Mr:Ar,x=c==="y"?dn:fn,b=r.rects.reference[d]+r.rects.reference[c]-a[c]-r.rects.popper[d],m=a[c]-r.rects.reference[c],w=el(o),y=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,_=b/2-m/2,S=p[h],E=y-v[d]-p[x],I=y/2-v[d]/2+_,N=Is(S,I,E),T=c;r.modifiersData[n]=(t={},t[T]=N,t.centerOffset=N-I,t)}}function U9(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)||JL(t.elements.popper,i)&&(t.elements.arrow=i))}const G9={name:"arrow",enabled:!0,phase:"main",fn:W9,effect:U9,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ua(e){return e.split("-")[1]}var K9={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Y9(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:la(r*i)/i||0,y:la(n*i)/i||0}}function SC(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,p=e.isFixed,v=a.x,h=v===void 0?0:v,x=a.y,b=x===void 0?0:x,m=typeof d=="function"?d({x:h,y:b}):{x:h,y:b};h=m.x,b=m.y;var w=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),_=Ar,S=Mr,E=window;if(u){var I=el(r),N="clientHeight",T="clientWidth";if(I===Yr(r)&&(I=qi(r),ui(I).position!=="static"&&s==="absolute"&&(N="scrollHeight",T="scrollWidth")),I=I,i===Mr||(i===Ar||i===fn)&&o===qs){S=dn;var k=p&&I===E&&E.visualViewport?E.visualViewport.height:I[N];b-=k-n.height,b*=c?1:-1}if(i===Ar||(i===Mr||i===dn)&&o===qs){_=fn;var L=p&&I===E&&E.visualViewport?E.visualViewport.width:I[T];h-=L-n.width,h*=c?1:-1}}var B=Object.assign({position:s},u&&K9),A=d===!0?Y9({x:h,y:b},Yr(r)):{x:h,y:b};if(h=A.x,b=A.y,c){var z;return Object.assign({},B,(z={},z[S]=y?"0":"",z[_]=w?"0":"",z.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+b+"px)":"translate3d("+h+"px, "+b+"px, 0)",z))}return Object.assign({},B,(t={},t[S]=y?b+"px":"",t[_]=w?h+"px":"",t.transform="",t))}function X9(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,s=r.roundOffsets,c=s===void 0?!0:s,u={placement:$n(t.placement),variation:ua(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,SC(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,SC(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Z9={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:X9,data:{}};var Rc={passive:!0};function J9(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,s=a===void 0?!0:a,c=Yr(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",r.update,Rc)}),s&&c.addEventListener("resize",r.update,Rc),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",r.update,Rc)}),s&&c.removeEventListener("resize",r.update,Rc)}}const Q9={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:J9,data:{}};var eY={left:"right",right:"left",bottom:"top",top:"bottom"};function iu(e){return e.replace(/left|right|bottom|top/g,function(t){return eY[t]})}var tY={start:"end",end:"start"};function OC(e){return e.replace(/start|end/g,function(t){return tY[t]})}function Q1(e){var t=Yr(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function e_(e){return ca(qi(e)).left+Q1(e).scrollLeft}function rY(e,t){var r=Yr(e),n=qi(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var u=ZL();(u||!u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+e_(e),y:c}}function nY(e){var t,r=qi(e),n=Q1(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=io(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=io(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+e_(e),c=-n.scrollTop;return ui(i||r).direction==="rtl"&&(s+=io(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}function t_(e){var t=ui(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function rz(e){return["html","body","#document"].indexOf(Wn(e))>=0?e.ownerDocument.body:un(e)&&t_(e)?e:rz(rd(e))}function Rs(e,t){var r;t===void 0&&(t=[]);var n=rz(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Yr(n),a=i?[o].concat(o.visualViewport||[],t_(n)?n:[]):n,s=t.concat(a);return i?s:s.concat(Rs(rd(a)))}function bw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function iY(e,t){var r=ca(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 CC(e,t,r){return t===YL?bw(rY(e,r)):uo(t)?iY(t,r):bw(nY(qi(e)))}function oY(e){var t=Rs(rd(e)),r=["absolute","fixed"].indexOf(ui(e).position)>=0,n=r&&un(e)?el(e):e;return uo(n)?t.filter(function(i){return uo(i)&&JL(i,n)&&Wn(i)!=="body"}):[]}function aY(e,t,r,n){var i=t==="clippingParents"?oY(e):[].concat(t),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(c,u){var d=CC(e,u,n);return c.top=io(d.top,c.top),c.right=Nu(d.right,c.right),c.bottom=Nu(d.bottom,c.bottom),c.left=io(d.left,c.left),c},CC(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function nz(e){var t=e.reference,r=e.element,n=e.placement,i=n?$n(n):null,o=n?ua(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,c;switch(i){case Mr:c={x:a,y:t.y-r.height};break;case dn:c={x:a,y:t.y+t.height};break;case fn:c={x:t.x+t.width,y:s};break;case Ar:c={x:t.x-r.width,y:s};break;default:c={x:t.x,y:t.y}}var u=i?J1(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case sa:c[u]=c[u]-(t[d]/2-r[d]/2);break;case qs:c[u]=c[u]+(t[d]/2-r[d]/2);break}}return c}function Ls(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,s=r.boundary,c=s===void 0?C9:s,u=r.rootBoundary,d=u===void 0?YL:u,p=r.elementContext,v=p===void 0?Ya:p,h=r.altBoundary,x=h===void 0?!1:h,b=r.padding,m=b===void 0?0:b,w=ez(typeof m!="number"?m:tz(m,Qs)),y=v===Ya?I9:Ya,_=e.rects.popper,S=e.elements[x?y:v],E=aY(uo(S)?S:S.contextElement||qi(e.elements.popper),c,d,a),I=ca(e.elements.reference),N=nz({reference:I,element:_,placement:i}),T=bw(Object.assign({},_,N)),k=v===Ya?T:I,L={top:E.top-k.top+w.top,bottom:k.bottom-E.bottom+w.bottom,left:E.left-k.left+w.left,right:k.right-E.right+w.right},B=e.modifiersData.offset;if(v===Ya&&B){var A=B[i];Object.keys(L).forEach(function(z){var P=[fn,dn].indexOf(z)>=0?1:-1,K=[Mr,dn].indexOf(z)>=0?"y":"x";L[z]+=A[K]*P})}return L}function sY(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?XL:c,d=ua(n),p=d?s?_C:_C.filter(function(x){return ua(x)===d}):Qs,v=p.filter(function(x){return u.indexOf(x)>=0});v.length===0&&(v=p);var h=v.reduce(function(x,b){return x[b]=Ls(e,{placement:b,boundary:i,rootBoundary:o,padding:a})[$n(b)],x},{});return Object.keys(h).sort(function(x,b){return h[x]-h[b]})}function lY(e){if($n(e)===Y1)return[];var t=iu(e);return[OC(e),t,OC(t)]}function cY(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,s=a===void 0?!0:a,c=r.fallbackPlacements,u=r.padding,d=r.boundary,p=r.rootBoundary,v=r.altBoundary,h=r.flipVariations,x=h===void 0?!0:h,b=r.allowedAutoPlacements,m=t.options.placement,w=$n(m),y=w===m,_=c||(y||!x?[iu(m)]:lY(m)),S=[m].concat(_).reduce(function(j,F){return j.concat($n(F)===Y1?sY(t,{placement:F,boundary:d,rootBoundary:p,padding:u,flipVariations:x,allowedAutoPlacements:b}):F)},[]),E=t.rects.reference,I=t.rects.popper,N=new Map,T=!0,k=S[0],L=0;L<S.length;L++){var B=S[L],A=$n(B),z=ua(B)===sa,P=[Mr,dn].indexOf(A)>=0,K=P?"width":"height",$=Ls(t,{placement:B,boundary:d,rootBoundary:p,altBoundary:v,padding:u}),Y=P?z?fn:Ar:z?dn:Mr;E[K]>I[K]&&(Y=iu(Y));var U=iu(Y),Z=[];if(o&&Z.push($[A]<=0),s&&Z.push($[Y]<=0,$[U]<=0),Z.every(function(j){return j})){k=B,T=!1;break}N.set(B,Z)}if(T)for(var D=x?3:1,W=function(F){var G=S.find(function(q){var X=N.get(q);if(X)return X.slice(0,F).every(function(te){return te})});if(G)return k=G,"break"},Q=D;Q>0;Q--){var ee=W(Q);if(ee==="break")break}t.placement!==k&&(t.modifiersData[n]._skip=!0,t.placement=k,t.reset=!0)}}const uY={name:"flip",enabled:!0,phase:"main",fn:cY,requiresIfExists:["offset"],data:{_skip:!1}};function IC(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 RC(e){return[Mr,fn,dn,Ar].some(function(t){return e[t]>=0})}function dY(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ls(t,{elementContext:"reference"}),s=Ls(t,{altBoundary:!0}),c=IC(a,n),u=IC(s,i,o),d=RC(c),p=RC(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const fY={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dY};function pY(e,t,r){var n=$n(e),i=[Ar,Mr].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Ar,fn].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function hY(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=XL.reduce(function(d,p){return d[p]=pY(p,t.rects,o),d},{}),s=a[t.placement],c=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=a}const vY={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:hY};function gY(e){var t=e.state,r=e.name;t.modifiersData[r]=nz({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const mY={name:"popperOffsets",enabled:!0,phase:"read",fn:gY,data:{}};function bY(e){return e==="x"?"y":"x"}function yY(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!1:a,c=r.boundary,u=r.rootBoundary,d=r.altBoundary,p=r.padding,v=r.tether,h=v===void 0?!0:v,x=r.tetherOffset,b=x===void 0?0:x,m=Ls(t,{boundary:c,rootBoundary:u,padding:p,altBoundary:d}),w=$n(t.placement),y=ua(t.placement),_=!y,S=J1(w),E=bY(S),I=t.modifiersData.popperOffsets,N=t.rects.reference,T=t.rects.popper,k=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,L=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(I){if(o){var z,P=S==="y"?Mr:Ar,K=S==="y"?dn:fn,$=S==="y"?"height":"width",Y=I[S],U=Y+m[P],Z=Y-m[K],D=h?-T[$]/2:0,W=y===sa?N[$]:T[$],Q=y===sa?-T[$]:-N[$],ee=t.elements.arrow,j=h&&ee?Z1(ee):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:QL(),G=F[P],q=F[K],X=Is(0,N[$],j[$]),te=_?N[$]/2-D-X-G-L.mainAxis:W-X-G-L.mainAxis,ne=_?-N[$]/2+D+X+q+L.mainAxis:Q+X+q+L.mainAxis,de=t.elements.arrow&&el(t.elements.arrow),re=de?S==="y"?de.clientTop||0:de.clientLeft||0:0,ge=(z=B==null?void 0:B[S])!=null?z:0,ue=Y+te-ge-re,xe=Y+ne-ge,le=Is(h?Nu(U,ue):U,Y,h?io(Z,xe):Z);I[S]=le,A[S]=le-Y}if(s){var se,we=S==="x"?Mr:Ar,Re=S==="x"?dn:fn,Te=I[E],je=E==="y"?"height":"width",Ke=Te+m[we],qe=Te-m[Re],et=[Mr,Ar].indexOf(w)!==-1,ht=(se=B==null?void 0:B[E])!=null?se:0,St=et?Ke:Te-N[je]-T[je]-ht+L.altAxis,Ve=et?Te+N[je]+T[je]-ht-L.altAxis:qe,De=h&&et?V9(St,Te,Ve):Is(h?St:Ke,Te,h?Ve:qe);I[E]=De,A[E]=De-Te}t.modifiersData[n]=A}}const xY={name:"preventOverflow",enabled:!0,phase:"main",fn:yY,requiresIfExists:["offset"]};function wY(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function _Y(e){return e===Yr(e)||!un(e)?Q1(e):wY(e)}function EY(e){var t=e.getBoundingClientRect(),r=la(t.width)/e.offsetWidth||1,n=la(t.height)/e.offsetHeight||1;return r!==1||n!==1}function SY(e,t,r){r===void 0&&(r=!1);var n=un(t),i=un(t)&&EY(t),o=qi(t),a=ca(e,i,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Wn(t)!=="body"||t_(o))&&(s=_Y(t)),un(t)?(c=ca(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=e_(o))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function OY(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(s){if(!r.has(s)){var c=t.get(s);c&&i(c)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function CY(e){var t=OY(e);return q9.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function IY(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function RY(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 NC={placement:"bottom",modifiers:[],strategy:"absolute"};function TC(){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 NY(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?NC:i;return function(s,c,u){u===void 0&&(u=o);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},NC,o),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},p=[],v=!1,h={state:d,setOptions:function(w){var y=typeof w=="function"?w(d.options):w;b(),d.options=Object.assign({},o,d.options,y),d.scrollParents={reference:uo(s)?Rs(s):s.contextElement?Rs(s.contextElement):[],popper:Rs(c)};var _=CY(RY([].concat(n,d.options.modifiers)));return d.orderedModifiers=_.filter(function(S){return S.enabled}),x(),h.update()},forceUpdate:function(){if(!v){var w=d.elements,y=w.reference,_=w.popper;if(TC(y,_)){d.rects={reference:SY(y,el(_),d.options.strategy==="fixed"),popper:Z1(_)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(L){return d.modifiersData[L.name]=Object.assign({},L.data)});for(var S=0;S<d.orderedModifiers.length;S++){if(d.reset===!0){d.reset=!1,S=-1;continue}var E=d.orderedModifiers[S],I=E.fn,N=E.options,T=N===void 0?{}:N,k=E.name;typeof I=="function"&&(d=I({state:d,options:T,name:k,instance:h})||d)}}}},update:IY(function(){return new Promise(function(m){h.forceUpdate(),m(d)})}),destroy:function(){b(),v=!0}};if(!TC(s,c))return h;h.setOptions(u).then(function(m){!v&&u.onFirstUpdate&&u.onFirstUpdate(m)});function x(){d.orderedModifiers.forEach(function(m){var w=m.name,y=m.options,_=y===void 0?{}:y,S=m.effect;if(typeof S=="function"){var E=S({state:d,name:w,instance:h,options:_}),I=function(){};p.push(E||I)}})}function b(){p.forEach(function(m){return m()}),p=[]}return h}}var TY=[Q9,mY,Z9,B9,vY,uY,xY,G9,fY],PY=NY({defaultModifiers:TY}),At=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Li(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ap,PC;function kY(){if(PC)return Ap;PC=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 s,c,u;if(Array.isArray(o)){if(s=o.length,s!=a.length)return!1;for(c=s;c--!==0;)if(!i(o[c],a[c]))return!1;return!0}var d;if(t&&o instanceof Map&&a instanceof Map){if(o.size!==a.size)return!1;for(d=o.entries();!(c=d.next()).done;)if(!a.has(c.value[0]))return!1;for(d=o.entries();!(c=d.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(d=o.entries();!(c=d.next()).done;)if(!a.has(c.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(a)){if(s=o.length,s!=a.length)return!1;for(c=s;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(u=Object.keys(o),s=u.length,s!==Object.keys(a).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(a,u[c]))return!1;if(e&&o instanceof Element)return!1;for(c=s;c--!==0;)if(!((u[c]==="_owner"||u[c]==="__v"||u[c]==="__o")&&o.$$typeof)&&!i(o[u[c]],a[u[c]]))return!1;return!0}return o!==o&&a!==a}return Ap=function(a,s){try{return i(a,s)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},Ap}var MY=kY();const AY=Li(MY);var DY=[],nd=function(t,r,n){n===void 0&&(n={});var i=Et.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||DY},a=Et.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],c=a[1],u=Et.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(h){var x=h.state,b=Object.keys(x.elements);CW.flushSync(function(){c({styles:xC(b.map(function(m){return[m,x.styles[m]||{}]})),attributes:xC(b.map(function(m){return[m,x.attributes[m]]}))})})},requires:["computeStyles"]}},[]),d=Et.useMemo(function(){var v={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[u,{name:"applyStyles",enabled:!1}])};return AY(i.current,v)?i.current||v:(i.current=v,v)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,u]),p=Et.useRef();return wC(function(){p.current&&p.current.setOptions(d)},[d]),wC(function(){if(!(t==null||r==null)){var v=n.createPopper||PY,h=v(t,r,d);return p.current=h,function(){h.destroy(),p.current=null}}},[t,r,n.createPopper]),{state:p.current?p.current.state:null,styles:s.styles,attributes:s.attributes,update:p.current?p.current.update:null,forceUpdate:p.current?p.current.forceUpdate:null}};const iz=({tab:e})=>O.jsx(ur,{depth:1,className:"flex flex-1 items-center justify-center border-l-[0.5px]",children:O.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-inactive-text",children:[O.jsx(_e.FdInfoBold,{className:"h-10 w-10"}),O.jsxs("div",{className:"font-semibold",children:["No ",e," Selected"]}),O.jsxs("div",{className:"text-sm",children:["Click on a ",e," in the Sidebar to select it."]})]})});function r_(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 Dp,kC;function jY(){if(kC)return Dp;kC=1;function e(){this.__data__=[],this.size=0}return Dp=e,Dp}var jp,MC;function xa(){if(MC)return jp;MC=1;function e(t,r){return t===r||t!==t&&r!==r}return jp=e,jp}var qp,AC;function id(){if(AC)return qp;AC=1;var e=xa();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return qp=t,qp}var Lp,DC;function qY(){if(DC)return Lp;DC=1;var e=id(),t=Array.prototype,r=t.splice;function n(i){var o=this.__data__,a=e(o,i);if(a<0)return!1;var s=o.length-1;return a==s?o.pop():r.call(o,a,1),--this.size,!0}return Lp=n,Lp}var zp,jC;function LY(){if(jC)return zp;jC=1;var e=id();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return zp=t,zp}var Bp,qC;function zY(){if(qC)return Bp;qC=1;var e=id();function t(r){return e(this.__data__,r)>-1}return Bp=t,Bp}var Fp,LC;function BY(){if(LC)return Fp;LC=1;var e=id();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 Fp=t,Fp}var $p,zC;function od(){if(zC)return $p;zC=1;var e=jY(),t=qY(),r=LY(),n=zY(),i=BY();function o(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,$p=o,$p}var Vp,BC;function FY(){if(BC)return Vp;BC=1;var e=od();function t(){this.__data__=new e,this.size=0}return Vp=t,Vp}var Hp,FC;function $Y(){if(FC)return Hp;FC=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Hp=e,Hp}var Wp,$C;function VY(){if($C)return Wp;$C=1;function e(t){return this.__data__.get(t)}return Wp=e,Wp}var Up,VC;function HY(){if(VC)return Up;VC=1;function e(t){return this.__data__.has(t)}return Up=e,Up}var Gp,HC;function oz(){if(HC)return Gp;HC=1;var e=typeof At=="object"&&At&&At.Object===Object&&At;return Gp=e,Gp}var Kp,WC;function Tn(){if(WC)return Kp;WC=1;var e=oz(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Kp=r,Kp}var Yp,UC;function wa(){if(UC)return Yp;UC=1;var e=Tn(),t=e.Symbol;return Yp=t,Yp}var Xp,GC;function WY(){if(GC)return Xp;GC=1;var e=wa(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function o(a){var s=r.call(a,i),c=a[i];try{a[i]=void 0;var u=!0}catch{}var d=n.call(a);return u&&(s?a[i]=c:delete a[i]),d}return Xp=o,Xp}var Zp,KC;function UY(){if(KC)return Zp;KC=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Zp=r,Zp}var Jp,YC;function ho(){if(YC)return Jp;YC=1;var e=wa(),t=WY(),r=UY(),n="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?i:n:o&&o in Object(s)?t(s):r(s)}return Jp=a,Jp}var Qp,XC;function pn(){if(XC)return Qp;XC=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Qp=e,Qp}var eh,ZC;function tl(){if(ZC)return eh;ZC=1;var e=ho(),t=pn(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function a(s){if(!t(s))return!1;var c=e(s);return c==n||c==i||c==r||c==o}return eh=a,eh}var th,JC;function GY(){if(JC)return th;JC=1;var e=Tn(),t=e["__core-js_shared__"];return th=t,th}var rh,QC;function KY(){if(QC)return rh;QC=1;var e=GY(),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 rh=r,rh}var nh,eI;function az(){if(eI)return nh;eI=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 nh=r,nh}var ih,tI;function YY(){if(tI)return ih;tI=1;var e=tl(),t=KY(),r=pn(),n=az(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,d=RegExp("^"+c.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(v){if(!r(v)||t(v))return!1;var h=e(v)?d:o;return h.test(n(v))}return ih=p,ih}var oh,rI;function XY(){if(rI)return oh;rI=1;function e(t,r){return t==null?void 0:t[r]}return oh=e,oh}var ah,nI;function vo(){if(nI)return ah;nI=1;var e=YY(),t=XY();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return ah=r,ah}var sh,iI;function n_(){if(iI)return sh;iI=1;var e=vo(),t=Tn(),r=e(t,"Map");return sh=r,sh}var lh,oI;function ad(){if(oI)return lh;oI=1;var e=vo(),t=e(Object,"create");return lh=t,lh}var ch,aI;function ZY(){if(aI)return ch;aI=1;var e=ad();function t(){this.__data__=e?e(null):{},this.size=0}return ch=t,ch}var uh,sI;function JY(){if(sI)return uh;sI=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return uh=e,uh}var dh,lI;function QY(){if(lI)return dh;lI=1;var e=ad(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(o){var a=this.__data__;if(e){var s=a[o];return s===t?void 0:s}return n.call(a,o)?a[o]:void 0}return dh=i,dh}var fh,cI;function eX(){if(cI)return fh;cI=1;var e=ad(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return fh=n,fh}var ph,uI;function tX(){if(uI)return ph;uI=1;var e=ad(),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 ph=r,ph}var hh,dI;function rX(){if(dI)return hh;dI=1;var e=ZY(),t=JY(),r=QY(),n=eX(),i=tX();function o(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,hh=o,hh}var vh,fI;function nX(){if(fI)return vh;fI=1;var e=rX(),t=od(),r=n_();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return vh=n,vh}var gh,pI;function iX(){if(pI)return gh;pI=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return gh=e,gh}var mh,hI;function sd(){if(hI)return mh;hI=1;var e=iX();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return mh=t,mh}var bh,vI;function oX(){if(vI)return bh;vI=1;var e=sd();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return bh=t,bh}var yh,gI;function aX(){if(gI)return yh;gI=1;var e=sd();function t(r){return e(this,r).get(r)}return yh=t,yh}var xh,mI;function sX(){if(mI)return xh;mI=1;var e=sd();function t(r){return e(this,r).has(r)}return xh=t,xh}var wh,bI;function lX(){if(bI)return wh;bI=1;var e=sd();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 wh=t,wh}var _h,yI;function i_(){if(yI)return _h;yI=1;var e=nX(),t=oX(),r=aX(),n=sX(),i=lX();function o(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,_h=o,_h}var Eh,xI;function cX(){if(xI)return Eh;xI=1;var e=od(),t=n_(),r=i_(),n=200;function i(o,a){var s=this.__data__;if(s instanceof e){var c=s.__data__;if(!t||c.length<n-1)return c.push([o,a]),this.size=++s.size,this;s=this.__data__=new r(c)}return s.set(o,a),this.size=s.size,this}return Eh=i,Eh}var Sh,wI;function ld(){if(wI)return Sh;wI=1;var e=od(),t=FY(),r=$Y(),n=VY(),i=HY(),o=cX();function a(s){var c=this.__data__=new e(s);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,Sh=a,Sh}var Oh,_I;function o_(){if(_I)return Oh;_I=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 Oh=e,Oh}var Ch,EI;function sz(){if(EI)return Ch;EI=1;var e=vo(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Ch=t,Ch}var Ih,SI;function cd(){if(SI)return Ih;SI=1;var e=sz();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Ih=t,Ih}var Rh,OI;function ud(){if(OI)return Rh;OI=1;var e=cd(),t=xa(),r=Object.prototype,n=r.hasOwnProperty;function i(o,a,s){var c=o[a];(!(n.call(o,a)&&t(c,s))||s===void 0&&!(a in o))&&e(o,a,s)}return Rh=i,Rh}var Nh,CI;function rl(){if(CI)return Nh;CI=1;var e=ud(),t=cd();function r(n,i,o,a){var s=!o;o||(o={});for(var c=-1,u=i.length;++c<u;){var d=i[c],p=a?a(o[d],n[d],d,o,n):void 0;p===void 0&&(p=n[d]),s?t(o,d,p):e(o,d,p)}return o}return Nh=r,Nh}var Th,II;function uX(){if(II)return Th;II=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Th=e,Th}var Ph,RI;function Un(){if(RI)return Ph;RI=1;function e(t){return t!=null&&typeof t=="object"}return Ph=e,Ph}var kh,NI;function dX(){if(NI)return kh;NI=1;var e=ho(),t=Un(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return kh=n,kh}var Mh,TI;function nl(){if(TI)return Mh;TI=1;var e=dX(),t=Un(),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 Mh=o,Mh}var Ah,PI;function $t(){if(PI)return Ah;PI=1;var e=Array.isArray;return Ah=e,Ah}var gs={exports:{}},Dh,kI;function fX(){if(kI)return Dh;kI=1;function e(){return!1}return Dh=e,Dh}gs.exports;var MI;function _a(){return MI||(MI=1,(function(e,t){var r=Tn(),n=fX(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?r.Buffer:void 0,c=s?s.isBuffer:void 0,u=c||n;e.exports=u})(gs,gs.exports)),gs.exports}var jh,AI;function dd(){if(AI)return jh;AI=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 jh=r,jh}var qh,DI;function a_(){if(DI)return qh;DI=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return qh=t,qh}var Lh,jI;function pX(){if(jI)return Lh;jI=1;var e=ho(),t=a_(),r=Un(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",s="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",p="[object Object]",v="[object RegExp]",h="[object Set]",x="[object String]",b="[object WeakMap]",m="[object ArrayBuffer]",w="[object DataView]",y="[object Float32Array]",_="[object Float64Array]",S="[object Int8Array]",E="[object Int16Array]",I="[object Int32Array]",N="[object Uint8Array]",T="[object Uint8ClampedArray]",k="[object Uint16Array]",L="[object Uint32Array]",B={};B[y]=B[_]=B[S]=B[E]=B[I]=B[N]=B[T]=B[k]=B[L]=!0,B[n]=B[i]=B[m]=B[o]=B[w]=B[a]=B[s]=B[c]=B[u]=B[d]=B[p]=B[v]=B[h]=B[x]=B[b]=!1;function A(z){return r(z)&&t(z.length)&&!!B[e(z)]}return Lh=A,Lh}var zh,qI;function fd(){if(qI)return zh;qI=1;function e(t){return function(r){return t(r)}}return zh=e,zh}var ms={exports:{}};ms.exports;var LI;function s_(){return LI||(LI=1,(function(e,t){var r=oz(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,s=(function(){try{var c=i&&i.require&&i.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();e.exports=s})(ms,ms.exports)),ms.exports}var Bh,zI;function il(){if(zI)return Bh;zI=1;var e=pX(),t=fd(),r=s_(),n=r&&r.isTypedArray,i=n?t(n):e;return Bh=i,Bh}var Fh,BI;function lz(){if(BI)return Fh;BI=1;var e=uX(),t=nl(),r=$t(),n=_a(),i=dd(),o=il(),a=Object.prototype,s=a.hasOwnProperty;function c(u,d){var p=r(u),v=!p&&t(u),h=!p&&!v&&n(u),x=!p&&!v&&!h&&o(u),b=p||v||h||x,m=b?e(u.length,String):[],w=m.length;for(var y in u)(d||s.call(u,y))&&!(b&&(y=="length"||h&&(y=="offset"||y=="parent")||x&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||i(y,w)))&&m.push(y);return m}return Fh=c,Fh}var $h,FI;function pd(){if(FI)return $h;FI=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return $h=t,$h}var Vh,$I;function cz(){if($I)return Vh;$I=1;function e(t,r){return function(n){return t(r(n))}}return Vh=e,Vh}var Hh,VI;function hX(){if(VI)return Hh;VI=1;var e=cz(),t=e(Object.keys,Object);return Hh=t,Hh}var Wh,HI;function l_(){if(HI)return Wh;HI=1;var e=pd(),t=hX(),r=Object.prototype,n=r.hasOwnProperty;function i(o){if(!e(o))return t(o);var a=[];for(var s in Object(o))n.call(o,s)&&s!="constructor"&&a.push(s);return a}return Wh=i,Wh}var Uh,WI;function fi(){if(WI)return Uh;WI=1;var e=tl(),t=a_();function r(n){return n!=null&&t(n.length)&&!e(n)}return Uh=r,Uh}var Gh,UI;function zi(){if(UI)return Gh;UI=1;var e=lz(),t=l_(),r=fi();function n(i){return r(i)?e(i):t(i)}return Gh=n,Gh}var Kh,GI;function vX(){if(GI)return Kh;GI=1;var e=rl(),t=zi();function r(n,i){return n&&e(i,t(i),n)}return Kh=r,Kh}var Yh,KI;function gX(){if(KI)return Yh;KI=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return Yh=e,Yh}var Xh,YI;function mX(){if(YI)return Xh;YI=1;var e=pn(),t=pd(),r=gX(),n=Object.prototype,i=n.hasOwnProperty;function o(a){if(!e(a))return r(a);var s=t(a),c=[];for(var u in a)u=="constructor"&&(s||!i.call(a,u))||c.push(u);return c}return Xh=o,Xh}var Zh,XI;function go(){if(XI)return Zh;XI=1;var e=lz(),t=mX(),r=fi();function n(i){return r(i)?e(i,!0):t(i)}return Zh=n,Zh}var Jh,ZI;function bX(){if(ZI)return Jh;ZI=1;var e=rl(),t=go();function r(n,i){return n&&e(i,t(i),n)}return Jh=r,Jh}var bs={exports:{}};bs.exports;var JI;function uz(){return JI||(JI=1,(function(e,t){var r=Tn(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;function c(u,d){if(d)return u.slice();var p=u.length,v=s?s(p):new u.constructor(p);return u.copy(v),v}e.exports=c})(bs,bs.exports)),bs.exports}var Qh,QI;function dz(){if(QI)return Qh;QI=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 Qh=e,Qh}var ev,eR;function fz(){if(eR)return ev;eR=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=0,a=[];++n<i;){var s=t[n];r(s,n,t)&&(a[o++]=s)}return a}return ev=e,ev}var tv,tR;function pz(){if(tR)return tv;tR=1;function e(){return[]}return tv=e,tv}var rv,rR;function c_(){if(rR)return rv;rR=1;var e=fz(),t=pz(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(a){return a==null?[]:(a=Object(a),e(i(a),function(s){return n.call(a,s)}))}:t;return rv=o,rv}var nv,nR;function yX(){if(nR)return nv;nR=1;var e=rl(),t=c_();function r(n,i){return e(n,t(n),i)}return nv=r,nv}var iv,iR;function u_(){if(iR)return iv;iR=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 iv=e,iv}var ov,oR;function hd(){if(oR)return ov;oR=1;var e=cz(),t=e(Object.getPrototypeOf,Object);return ov=t,ov}var av,aR;function hz(){if(aR)return av;aR=1;var e=u_(),t=hd(),r=c_(),n=pz(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var s=[];a;)e(s,r(a)),a=t(a);return s}:n;return av=o,av}var sv,sR;function xX(){if(sR)return sv;sR=1;var e=rl(),t=hz();function r(n,i){return e(n,t(n),i)}return sv=r,sv}var lv,lR;function vz(){if(lR)return lv;lR=1;var e=u_(),t=$t();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return lv=r,lv}var cv,cR;function gz(){if(cR)return cv;cR=1;var e=vz(),t=c_(),r=zi();function n(i){return e(i,r,t)}return cv=n,cv}var uv,uR;function wX(){if(uR)return uv;uR=1;var e=vz(),t=hz(),r=go();function n(i){return e(i,r,t)}return uv=n,uv}var dv,dR;function _X(){if(dR)return dv;dR=1;var e=vo(),t=Tn(),r=e(t,"DataView");return dv=r,dv}var fv,fR;function EX(){if(fR)return fv;fR=1;var e=vo(),t=Tn(),r=e(t,"Promise");return fv=r,fv}var pv,pR;function mz(){if(pR)return pv;pR=1;var e=vo(),t=Tn(),r=e(t,"Set");return pv=r,pv}var hv,hR;function SX(){if(hR)return hv;hR=1;var e=vo(),t=Tn(),r=e(t,"WeakMap");return hv=r,hv}var vv,vR;function Ea(){if(vR)return vv;vR=1;var e=_X(),t=n_(),r=EX(),n=mz(),i=SX(),o=ho(),a=az(),s="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",p="[object WeakMap]",v="[object DataView]",h=a(e),x=a(t),b=a(r),m=a(n),w=a(i),y=o;return(e&&y(new e(new ArrayBuffer(1)))!=v||t&&y(new t)!=s||r&&y(r.resolve())!=u||n&&y(new n)!=d||i&&y(new i)!=p)&&(y=function(_){var S=o(_),E=S==c?_.constructor:void 0,I=E?a(E):"";if(I)switch(I){case h:return v;case x:return s;case b:return u;case m:return d;case w:return p}return S}),vv=y,vv}var gv,gR;function OX(){if(gR)return gv;gR=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 gv=r,gv}var mv,mR;function bz(){if(mR)return mv;mR=1;var e=Tn(),t=e.Uint8Array;return mv=t,mv}var bv,bR;function d_(){if(bR)return bv;bR=1;var e=bz();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return bv=t,bv}var yv,yR;function CX(){if(yR)return yv;yR=1;var e=d_();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return yv=t,yv}var xv,xR;function IX(){if(xR)return xv;xR=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return xv=t,xv}var wv,wR;function RX(){if(wR)return wv;wR=1;var e=wa(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return wv=n,wv}var _v,_R;function yz(){if(_R)return _v;_R=1;var e=d_();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return _v=t,_v}var Ev,ER;function NX(){if(ER)return Ev;ER=1;var e=d_(),t=CX(),r=IX(),n=RX(),i=yz(),o="[object Boolean]",a="[object Date]",s="[object Map]",c="[object Number]",u="[object RegExp]",d="[object Set]",p="[object String]",v="[object Symbol]",h="[object ArrayBuffer]",x="[object DataView]",b="[object Float32Array]",m="[object Float64Array]",w="[object Int8Array]",y="[object Int16Array]",_="[object Int32Array]",S="[object Uint8Array]",E="[object Uint8ClampedArray]",I="[object Uint16Array]",N="[object Uint32Array]";function T(k,L,B){var A=k.constructor;switch(L){case h:return e(k);case o:case a:return new A(+k);case x:return t(k,B);case b:case m:case w:case y:case _:case S:case E:case I:case N:return i(k,B);case s:return new A;case c:case p:return new A(k);case u:return r(k);case d:return new A;case v:return n(k)}}return Ev=T,Ev}var Sv,SR;function xz(){if(SR)return Sv;SR=1;var e=pn(),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 Sv=r,Sv}var Ov,OR;function wz(){if(OR)return Ov;OR=1;var e=xz(),t=hd(),r=pd();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Ov=n,Ov}var Cv,CR;function TX(){if(CR)return Cv;CR=1;var e=Ea(),t=Un(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Cv=n,Cv}var Iv,IR;function PX(){if(IR)return Iv;IR=1;var e=TX(),t=fd(),r=s_(),n=r&&r.isMap,i=n?t(n):e;return Iv=i,Iv}var Rv,RR;function kX(){if(RR)return Rv;RR=1;var e=Ea(),t=Un(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return Rv=n,Rv}var Nv,NR;function MX(){if(NR)return Nv;NR=1;var e=kX(),t=fd(),r=s_(),n=r&&r.isSet,i=n?t(n):e;return Nv=i,Nv}var Tv,TR;function _z(){if(TR)return Tv;TR=1;var e=ld(),t=o_(),r=ud(),n=vX(),i=bX(),o=uz(),a=dz(),s=yX(),c=xX(),u=gz(),d=wX(),p=Ea(),v=OX(),h=NX(),x=wz(),b=$t(),m=_a(),w=PX(),y=pn(),_=MX(),S=zi(),E=go(),I=1,N=2,T=4,k="[object Arguments]",L="[object Array]",B="[object Boolean]",A="[object Date]",z="[object Error]",P="[object Function]",K="[object GeneratorFunction]",$="[object Map]",Y="[object Number]",U="[object Object]",Z="[object RegExp]",D="[object Set]",W="[object String]",Q="[object Symbol]",ee="[object WeakMap]",j="[object ArrayBuffer]",F="[object DataView]",G="[object Float32Array]",q="[object Float64Array]",X="[object Int8Array]",te="[object Int16Array]",ne="[object Int32Array]",de="[object Uint8Array]",re="[object Uint8ClampedArray]",ge="[object Uint16Array]",ue="[object Uint32Array]",xe={};xe[k]=xe[L]=xe[j]=xe[F]=xe[B]=xe[A]=xe[G]=xe[q]=xe[X]=xe[te]=xe[ne]=xe[$]=xe[Y]=xe[U]=xe[Z]=xe[D]=xe[W]=xe[Q]=xe[de]=xe[re]=xe[ge]=xe[ue]=!0,xe[z]=xe[P]=xe[ee]=!1;function le(se,we,Re,Te,je,Ke){var qe,et=we&I,ht=we&N,St=we&T;if(Re&&(qe=je?Re(se,Te,je,Ke):Re(se)),qe!==void 0)return qe;if(!y(se))return se;var Ve=b(se);if(Ve){if(qe=v(se),!et)return a(se,qe)}else{var De=p(se),it=De==P||De==K;if(m(se))return o(se,et);if(De==U||De==k||it&&!je){if(qe=ht||it?{}:x(se),!et)return ht?c(se,i(qe,se)):s(se,n(qe,se))}else{if(!xe[De])return je?se:{};qe=h(se,De,et)}}Ke||(Ke=new e);var ot=Ke.get(se);if(ot)return ot;Ke.set(se,qe),_(se)?se.forEach(function(Tt){qe.add(le(Tt,we,Re,Tt,se,Ke))}):w(se)&&se.forEach(function(Tt,Le){qe.set(Le,le(Tt,we,Re,Le,se,Ke))});var Qt=St?ht?d:u:ht?E:S,Bt=Ve?void 0:Qt(se);return t(Bt||se,function(Tt,Le){Bt&&(Le=Tt,Tt=se[Le]),r(qe,Le,le(Tt,we,Re,Le,se,Ke))}),qe}return Tv=le,Tv}var Pv,PR;function AX(){if(PR)return Pv;PR=1;var e=_z(),t=4;function r(n){return e(n,t)}return Pv=r,Pv}var kv,kR;function f_(){if(kR)return kv;kR=1;function e(t){return function(){return t}}return kv=e,kv}var Mv,MR;function DX(){if(MR)return Mv;MR=1;function e(t){return function(r,n,i){for(var o=-1,a=Object(r),s=i(r),c=s.length;c--;){var u=s[t?c:++o];if(n(a[u],u,a)===!1)break}return r}}return Mv=e,Mv}var Av,AR;function p_(){if(AR)return Av;AR=1;var e=DX(),t=e();return Av=t,Av}var Dv,DR;function h_(){if(DR)return Dv;DR=1;var e=p_(),t=zi();function r(n,i){return n&&e(n,i,t)}return Dv=r,Dv}var jv,jR;function jX(){if(jR)return jv;jR=1;var e=fi();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,s=n?a:-1,c=Object(i);(n?s--:++s<a)&&o(c[s],s,c)!==!1;);return i}}return jv=t,jv}var qv,qR;function vd(){if(qR)return qv;qR=1;var e=h_(),t=jX(),r=t(e);return qv=r,qv}var Lv,LR;function mo(){if(LR)return Lv;LR=1;function e(t){return t}return Lv=e,Lv}var zv,zR;function Ez(){if(zR)return zv;zR=1;var e=mo();function t(r){return typeof r=="function"?r:e}return zv=t,zv}var Bv,BR;function Sz(){if(BR)return Bv;BR=1;var e=o_(),t=vd(),r=Ez(),n=$t();function i(o,a){var s=n(o)?e:t;return s(o,r(a))}return Bv=i,Bv}var Fv,FR;function Oz(){return FR||(FR=1,Fv=Sz()),Fv}var $v,$R;function qX(){if($R)return $v;$R=1;var e=vd();function t(r,n){var i=[];return e(r,function(o,a,s){n(o,a,s)&&i.push(o)}),i}return $v=t,$v}var Vv,VR;function LX(){if(VR)return Vv;VR=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Vv=t,Vv}var Hv,HR;function zX(){if(HR)return Hv;HR=1;function e(t){return this.__data__.has(t)}return Hv=e,Hv}var Wv,WR;function Cz(){if(WR)return Wv;WR=1;var e=i_(),t=LX(),r=zX();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,Wv=n,Wv}var Uv,UR;function BX(){if(UR)return Uv;UR=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 Uv=e,Uv}var Gv,GR;function Iz(){if(GR)return Gv;GR=1;function e(t,r){return t.has(r)}return Gv=e,Gv}var Kv,KR;function Rz(){if(KR)return Kv;KR=1;var e=Cz(),t=BX(),r=Iz(),n=1,i=2;function o(a,s,c,u,d,p){var v=c&n,h=a.length,x=s.length;if(h!=x&&!(v&&x>h))return!1;var b=p.get(a),m=p.get(s);if(b&&m)return b==s&&m==a;var w=-1,y=!0,_=c&i?new e:void 0;for(p.set(a,s),p.set(s,a);++w<h;){var S=a[w],E=s[w];if(u)var I=v?u(E,S,w,s,a,p):u(S,E,w,a,s,p);if(I!==void 0){if(I)continue;y=!1;break}if(_){if(!t(s,function(N,T){if(!r(_,T)&&(S===N||d(S,N,c,u,p)))return _.push(T)})){y=!1;break}}else if(!(S===E||d(S,E,c,u,p))){y=!1;break}}return p.delete(a),p.delete(s),y}return Kv=o,Kv}var Yv,YR;function FX(){if(YR)return Yv;YR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return Yv=e,Yv}var Xv,XR;function v_(){if(XR)return Xv;XR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return Xv=e,Xv}var Zv,ZR;function $X(){if(ZR)return Zv;ZR=1;var e=wa(),t=bz(),r=xa(),n=Rz(),i=FX(),o=v_(),a=1,s=2,c="[object Boolean]",u="[object Date]",d="[object Error]",p="[object Map]",v="[object Number]",h="[object RegExp]",x="[object Set]",b="[object String]",m="[object Symbol]",w="[object ArrayBuffer]",y="[object DataView]",_=e?e.prototype:void 0,S=_?_.valueOf:void 0;function E(I,N,T,k,L,B,A){switch(T){case y:if(I.byteLength!=N.byteLength||I.byteOffset!=N.byteOffset)return!1;I=I.buffer,N=N.buffer;case w:return!(I.byteLength!=N.byteLength||!B(new t(I),new t(N)));case c:case u:case v:return r(+I,+N);case d:return I.name==N.name&&I.message==N.message;case h:case b:return I==N+"";case p:var z=i;case x:var P=k&a;if(z||(z=o),I.size!=N.size&&!P)return!1;var K=A.get(I);if(K)return K==N;k|=s,A.set(I,N);var $=n(z(I),z(N),k,L,B,A);return A.delete(I),$;case m:if(S)return S.call(I)==S.call(N)}return!1}return Zv=E,Zv}var Jv,JR;function VX(){if(JR)return Jv;JR=1;var e=gz(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(o,a,s,c,u,d){var p=s&t,v=e(o),h=v.length,x=e(a),b=x.length;if(h!=b&&!p)return!1;for(var m=h;m--;){var w=v[m];if(!(p?w in a:n.call(a,w)))return!1}var y=d.get(o),_=d.get(a);if(y&&_)return y==a&&_==o;var S=!0;d.set(o,a),d.set(a,o);for(var E=p;++m<h;){w=v[m];var I=o[w],N=a[w];if(c)var T=p?c(N,I,w,a,o,d):c(I,N,w,o,a,d);if(!(T===void 0?I===N||u(I,N,s,c,d):T)){S=!1;break}E||(E=w=="constructor")}if(S&&!E){var k=o.constructor,L=a.constructor;k!=L&&"constructor"in o&&"constructor"in a&&!(typeof k=="function"&&k instanceof k&&typeof L=="function"&&L instanceof L)&&(S=!1)}return d.delete(o),d.delete(a),S}return Jv=i,Jv}var Qv,QR;function HX(){if(QR)return Qv;QR=1;var e=ld(),t=Rz(),r=$X(),n=VX(),i=Ea(),o=$t(),a=_a(),s=il(),c=1,u="[object Arguments]",d="[object Array]",p="[object Object]",v=Object.prototype,h=v.hasOwnProperty;function x(b,m,w,y,_,S){var E=o(b),I=o(m),N=E?d:i(b),T=I?d:i(m);N=N==u?p:N,T=T==u?p:T;var k=N==p,L=T==p,B=N==T;if(B&&a(b)){if(!a(m))return!1;E=!0,k=!1}if(B&&!k)return S||(S=new e),E||s(b)?t(b,m,w,y,_,S):r(b,m,N,w,y,_,S);if(!(w&c)){var A=k&&h.call(b,"__wrapped__"),z=L&&h.call(m,"__wrapped__");if(A||z){var P=A?b.value():b,K=z?m.value():m;return S||(S=new e),_(P,K,w,y,S)}}return B?(S||(S=new e),n(b,m,w,y,_,S)):!1}return Qv=x,Qv}var eg,eN;function Nz(){if(eN)return eg;eN=1;var e=HX(),t=Un();function r(n,i,o,a,s){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,o,a,r,s)}return eg=r,eg}var tg,tN;function WX(){if(tN)return tg;tN=1;var e=ld(),t=Nz(),r=1,n=2;function i(o,a,s,c){var u=s.length,d=u,p=!c;if(o==null)return!d;for(o=Object(o);u--;){var v=s[u];if(p&&v[2]?v[1]!==o[v[0]]:!(v[0]in o))return!1}for(;++u<d;){v=s[u];var h=v[0],x=o[h],b=v[1];if(p&&v[2]){if(x===void 0&&!(h in o))return!1}else{var m=new e;if(c)var w=c(x,b,h,o,a,m);if(!(w===void 0?t(b,x,r|n,c,m):w))return!1}}return!0}return tg=i,tg}var rg,rN;function Tz(){if(rN)return rg;rN=1;var e=pn();function t(r){return r===r&&!e(r)}return rg=t,rg}var ng,nN;function UX(){if(nN)return ng;nN=1;var e=Tz(),t=zi();function r(n){for(var i=t(n),o=i.length;o--;){var a=i[o],s=n[a];i[o]=[a,s,e(s)]}return i}return ng=r,ng}var ig,iN;function Pz(){if(iN)return ig;iN=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return ig=e,ig}var og,oN;function GX(){if(oN)return og;oN=1;var e=WX(),t=UX(),r=Pz();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 og=n,og}var ag,aN;function Sa(){if(aN)return ag;aN=1;var e=ho(),t=Un(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return ag=n,ag}var sg,sN;function g_(){if(sN)return sg;sN=1;var e=$t(),t=Sa(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,a){if(e(o))return!1;var s=typeof o;return s=="number"||s=="symbol"||s=="boolean"||o==null||t(o)?!0:n.test(o)||!r.test(o)||a!=null&&o in Object(a)}return sg=i,sg}var lg,lN;function KX(){if(lN)return lg;lN=1;var e=i_(),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,s=i?i.apply(this,a):a[0],c=o.cache;if(c.has(s))return c.get(s);var u=n.apply(this,a);return o.cache=c.set(s,u)||c,u};return o.cache=new(r.Cache||e),o}return r.Cache=e,lg=r,lg}var cg,cN;function YX(){if(cN)return cg;cN=1;var e=KX(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return cg=r,cg}var ug,uN;function XX(){if(uN)return ug;uN=1;var e=YX(),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,s,c,u){o.push(c?u.replace(r,"$1"):s||a)}),o});return ug=n,ug}var dg,dN;function gd(){if(dN)return dg;dN=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 dg=e,dg}var fg,fN;function ZX(){if(fN)return fg;fN=1;var e=wa(),t=gd(),r=$t(),n=Sa(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function a(s){if(typeof s=="string")return s;if(r(s))return t(s,a)+"";if(n(s))return o?o.call(s):"";var c=s+"";return c=="0"&&1/s==-1/0?"-0":c}return fg=a,fg}var pg,pN;function kz(){if(pN)return pg;pN=1;var e=ZX();function t(r){return r==null?"":e(r)}return pg=t,pg}var hg,hN;function md(){if(hN)return hg;hN=1;var e=$t(),t=g_(),r=XX(),n=kz();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return hg=i,hg}var vg,vN;function ol(){if(vN)return vg;vN=1;var e=Sa();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return vg=t,vg}var gg,gN;function bd(){if(gN)return gg;gN=1;var e=md(),t=ol();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 gg=r,gg}var mg,mN;function JX(){if(mN)return mg;mN=1;var e=bd();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return mg=t,mg}var bg,bN;function QX(){if(bN)return bg;bN=1;function e(t,r){return t!=null&&r in Object(t)}return bg=e,bg}var yg,yN;function Mz(){if(yN)return yg;yN=1;var e=md(),t=nl(),r=$t(),n=dd(),i=a_(),o=ol();function a(s,c,u){c=e(c,s);for(var d=-1,p=c.length,v=!1;++d<p;){var h=o(c[d]);if(!(v=s!=null&&u(s,h)))break;s=s[h]}return v||++d!=p?v:(p=s==null?0:s.length,!!p&&i(p)&&n(h,p)&&(r(s)||t(s)))}return yg=a,yg}var xg,xN;function Az(){if(xN)return xg;xN=1;var e=QX(),t=Mz();function r(n,i){return n!=null&&t(n,i,e)}return xg=r,xg}var wg,wN;function eZ(){if(wN)return wg;wN=1;var e=Nz(),t=JX(),r=Az(),n=g_(),i=Tz(),o=Pz(),a=ol(),s=1,c=2;function u(d,p){return n(d)&&i(p)?o(a(d),p):function(v){var h=t(v,d);return h===void 0&&h===p?r(v,d):e(p,h,s|c)}}return wg=u,wg}var _g,_N;function Dz(){if(_N)return _g;_N=1;function e(t){return function(r){return r==null?void 0:r[t]}}return _g=e,_g}var Eg,EN;function tZ(){if(EN)return Eg;EN=1;var e=bd();function t(r){return function(n){return e(n,r)}}return Eg=t,Eg}var Sg,SN;function rZ(){if(SN)return Sg;SN=1;var e=Dz(),t=tZ(),r=g_(),n=ol();function i(o){return r(o)?e(n(o)):t(o)}return Sg=i,Sg}var Og,ON;function pi(){if(ON)return Og;ON=1;var e=GX(),t=eZ(),r=mo(),n=$t(),i=rZ();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 Og=o,Og}var Cg,CN;function jz(){if(CN)return Cg;CN=1;var e=fz(),t=qX(),r=pi(),n=$t();function i(o,a){var s=n(o)?e:t;return s(o,r(a,3))}return Cg=i,Cg}var Ig,IN;function nZ(){if(IN)return Ig;IN=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return Ig=r,Ig}var Rg,RN;function qz(){if(RN)return Rg;RN=1;var e=nZ(),t=Mz();function r(n,i){return n!=null&&t(n,i,e)}return Rg=r,Rg}var Ng,NN;function iZ(){if(NN)return Ng;NN=1;var e=l_(),t=Ea(),r=nl(),n=$t(),i=fi(),o=_a(),a=pd(),s=il(),c="[object Map]",u="[object Set]",d=Object.prototype,p=d.hasOwnProperty;function v(h){if(h==null)return!0;if(i(h)&&(n(h)||typeof h=="string"||typeof h.splice=="function"||o(h)||s(h)||r(h)))return!h.length;var x=t(h);if(x==c||x==u)return!h.size;if(a(h))return!e(h).length;for(var b in h)if(p.call(h,b))return!1;return!0}return Ng=v,Ng}var Tg,TN;function Lz(){if(TN)return Tg;TN=1;function e(t){return t===void 0}return Tg=e,Tg}var Pg,PN;function zz(){if(PN)return Pg;PN=1;var e=vd(),t=fi();function r(n,i){var o=-1,a=t(n)?Array(n.length):[];return e(n,function(s,c,u){a[++o]=i(s,c,u)}),a}return Pg=r,Pg}var kg,kN;function Bz(){if(kN)return kg;kN=1;var e=gd(),t=pi(),r=zz(),n=$t();function i(o,a){var s=n(o)?e:r;return s(o,t(a,3))}return kg=i,kg}var Mg,MN;function oZ(){if(MN)return Mg;MN=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 Mg=e,Mg}var Ag,AN;function aZ(){if(AN)return Ag;AN=1;function e(t,r,n,i,o){return o(t,function(a,s,c){n=i?(i=!1,a):r(n,a,s,c)}),n}return Ag=e,Ag}var Dg,DN;function Fz(){if(DN)return Dg;DN=1;var e=oZ(),t=vd(),r=pi(),n=aZ(),i=$t();function o(a,s,c){var u=i(a)?e:n,d=arguments.length<3;return u(a,r(s,4),c,d,t)}return Dg=o,Dg}var jg,jN;function sZ(){if(jN)return jg;jN=1;var e=ho(),t=$t(),r=Un(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return jg=i,jg}var qg,qN;function lZ(){if(qN)return qg;qN=1;var e=Dz(),t=e("length");return qg=t,qg}var Lg,LN;function cZ(){if(LN)return Lg;LN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+i+o+"]");function c(u){return s.test(u)}return Lg=c,Lg}var zg,zN;function uZ(){if(zN)return zg;zN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="["+e+"]",s="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+s+"|"+c+")",d="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",v="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",x=u+"?",b="["+o+"]?",m="(?:"+h+"(?:"+[d,p,v].join("|")+")"+b+x+")*",w=b+x+m,y="(?:"+[d+s+"?",s,p,v,a].join("|")+")",_=RegExp(c+"(?="+c+")|"+y+w,"g");function S(E){for(var I=_.lastIndex=0;_.test(E);)++I;return I}return zg=S,zg}var Bg,BN;function dZ(){if(BN)return Bg;BN=1;var e=lZ(),t=cZ(),r=uZ();function n(i){return t(i)?r(i):e(i)}return Bg=n,Bg}var Fg,FN;function fZ(){if(FN)return Fg;FN=1;var e=l_(),t=Ea(),r=fi(),n=sZ(),i=dZ(),o="[object Map]",a="[object Set]";function s(c){if(c==null)return 0;if(r(c))return n(c)?i(c):c.length;var u=t(c);return u==o||u==a?c.size:e(c).length}return Fg=s,Fg}var $g,$N;function pZ(){if($N)return $g;$N=1;var e=o_(),t=xz(),r=h_(),n=pi(),i=hd(),o=$t(),a=_a(),s=tl(),c=pn(),u=il();function d(p,v,h){var x=o(p),b=x||a(p)||u(p);if(v=n(v,4),h==null){var m=p&&p.constructor;b?h=x?new m:[]:c(p)?h=s(m)?t(i(p)):{}:h={}}return(b?e:r)(p,function(w,y,_){return v(h,w,y,_)}),h}return $g=d,$g}var Vg,VN;function hZ(){if(VN)return Vg;VN=1;var e=wa(),t=nl(),r=$t(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return Vg=i,Vg}var Hg,HN;function m_(){if(HN)return Hg;HN=1;var e=u_(),t=hZ();function r(n,i,o,a,s){var c=-1,u=n.length;for(o||(o=t),s||(s=[]);++c<u;){var d=n[c];i>0&&o(d)?i>1?r(d,i-1,o,a,s):e(s,d):a||(s[s.length]=d)}return s}return Hg=r,Hg}var Wg,WN;function vZ(){if(WN)return Wg;WN=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 Wg=e,Wg}var Ug,UN;function $z(){if(UN)return Ug;UN=1;var e=vZ(),t=Math.max;function r(n,i,o){return i=t(i===void 0?n.length-1:i,0),function(){for(var a=arguments,s=-1,c=t(a.length-i,0),u=Array(c);++s<c;)u[s]=a[i+s];s=-1;for(var d=Array(i+1);++s<i;)d[s]=a[s];return d[i]=o(u),e(n,this,d)}}return Ug=r,Ug}var Gg,GN;function gZ(){if(GN)return Gg;GN=1;var e=f_(),t=sz(),r=mo(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return Gg=n,Gg}var Kg,KN;function mZ(){if(KN)return Kg;KN=1;var e=800,t=16,r=Date.now;function n(i){var o=0,a=0;return function(){var s=r(),c=t-(s-a);if(a=s,c>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return Kg=n,Kg}var Yg,YN;function Vz(){if(YN)return Yg;YN=1;var e=gZ(),t=mZ(),r=t(e);return Yg=r,Yg}var Xg,XN;function yd(){if(XN)return Xg;XN=1;var e=mo(),t=$z(),r=Vz();function n(i,o){return r(t(i,o,e),i+"")}return Xg=n,Xg}var Zg,ZN;function Hz(){if(ZN)return Zg;ZN=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 Zg=e,Zg}var Jg,JN;function bZ(){if(JN)return Jg;JN=1;function e(t){return t!==t}return Jg=e,Jg}var Qg,QN;function yZ(){if(QN)return Qg;QN=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 Qg=e,Qg}var em,eT;function xZ(){if(eT)return em;eT=1;var e=Hz(),t=bZ(),r=yZ();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return em=n,em}var tm,tT;function wZ(){if(tT)return tm;tT=1;var e=xZ();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return tm=t,tm}var rm,rT;function _Z(){if(rT)return rm;rT=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 rm=e,rm}var nm,nT;function EZ(){if(nT)return nm;nT=1;function e(){}return nm=e,nm}var im,iT;function SZ(){if(iT)return im;iT=1;var e=mz(),t=EZ(),r=v_(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return im=i,im}var om,oT;function OZ(){if(oT)return om;oT=1;var e=Cz(),t=wZ(),r=_Z(),n=Iz(),i=SZ(),o=v_(),a=200;function s(c,u,d){var p=-1,v=t,h=c.length,x=!0,b=[],m=b;if(d)x=!1,v=r;else if(h>=a){var w=u?null:i(c);if(w)return o(w);x=!1,v=n,m=new e}else m=u?[]:b;e:for(;++p<h;){var y=c[p],_=u?u(y):y;if(y=d||y!==0?y:0,x&&_===_){for(var S=m.length;S--;)if(m[S]===_)continue e;u&&m.push(_),b.push(y)}else v(m,_,d)||(m!==b&&m.push(_),b.push(y))}return b}return om=s,om}var am,aT;function Wz(){if(aT)return am;aT=1;var e=fi(),t=Un();function r(n){return t(n)&&e(n)}return am=r,am}var sm,sT;function CZ(){if(sT)return sm;sT=1;var e=m_(),t=yd(),r=OZ(),n=Wz(),i=t(function(o){return r(e(o,1,n,!0))});return sm=i,sm}var lm,lT;function IZ(){if(lT)return lm;lT=1;var e=gd();function t(r,n){return e(n,function(i){return r[i]})}return lm=t,lm}var cm,cT;function Uz(){if(cT)return cm;cT=1;var e=IZ(),t=zi();function r(n){return n==null?[]:e(n,t(n))}return cm=r,cm}var um,uT;function hn(){if(uT)return um;uT=1;var e;if(typeof r_=="function")try{e={clone:AX(),constant:f_(),each:Oz(),filter:jz(),has:qz(),isArray:$t(),isEmpty:iZ(),isFunction:tl(),isUndefined:Lz(),keys:zi(),map:Bz(),reduce:Fz(),size:fZ(),transform:pZ(),union:CZ(),values:Uz()}}catch{}return e||(e=window._),um=e,um}var dm,dT;function b_(){if(dT)return dm;dT=1;var e=hn();dm=i;var t="\0",r="\0",n="";function i(d){this._isDirected=e.has(d,"directed")?d.directed:!0,this._isMultigraph=e.has(d,"multigraph")?d.multigraph:!1,this._isCompound=e.has(d,"compound")?d.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(d){return this._label=d,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultNodeLabelFn=d,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var d=this;return e.filter(this.nodes(),function(p){return e.isEmpty(d._in[p])})},i.prototype.sinks=function(){var d=this;return e.filter(this.nodes(),function(p){return e.isEmpty(d._out[p])})},i.prototype.setNodes=function(d,p){var v=arguments,h=this;return e.each(d,function(x){v.length>1?h.setNode(x,p):h.setNode(x)}),this},i.prototype.setNode=function(d,p){return e.has(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=p),this):(this._nodes[d]=arguments.length>1?p:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=r,this._children[d]={},this._children[r][d]=!0),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)},i.prototype.node=function(d){return this._nodes[d]},i.prototype.hasNode=function(d){return e.has(this._nodes,d)},i.prototype.removeNode=function(d){var p=this;if(e.has(this._nodes,d)){var v=function(h){p.removeEdge(p._edgeObjs[h])};delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],e.each(this.children(d),function(h){p.setParent(h)}),delete this._children[d]),e.each(e.keys(this._in[d]),v),delete this._in[d],delete this._preds[d],e.each(e.keys(this._out[d]),v),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this},i.prototype.setParent=function(d,p){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(p))p=r;else{p+="";for(var v=p;!e.isUndefined(v);v=this.parent(v))if(v===d)throw new Error("Setting "+p+" as parent of "+d+" would create a cycle");this.setNode(p)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=p,this._children[p][d]=!0,this},i.prototype._removeFromParentsChildList=function(d){delete this._children[this._parent[d]][d]},i.prototype.parent=function(d){if(this._isCompound){var p=this._parent[d];if(p!==r)return p}},i.prototype.children=function(d){if(e.isUndefined(d)&&(d=r),this._isCompound){var p=this._children[d];if(p)return e.keys(p)}else{if(d===r)return this.nodes();if(this.hasNode(d))return[]}},i.prototype.predecessors=function(d){var p=this._preds[d];if(p)return e.keys(p)},i.prototype.successors=function(d){var p=this._sucs[d];if(p)return e.keys(p)},i.prototype.neighbors=function(d){var p=this.predecessors(d);if(p)return e.union(p,this.successors(d))},i.prototype.isLeaf=function(d){var p;return this.isDirected()?p=this.successors(d):p=this.neighbors(d),p.length===0},i.prototype.filterNodes=function(d){var p=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});p.setGraph(this.graph());var v=this;e.each(this._nodes,function(b,m){d(m)&&p.setNode(m,b)}),e.each(this._edgeObjs,function(b){p.hasNode(b.v)&&p.hasNode(b.w)&&p.setEdge(b,v.edge(b))});var h={};function x(b){var m=v.parent(b);return m===void 0||p.hasNode(m)?(h[b]=m,m):m in h?h[m]:x(m)}return this._isCompound&&e.each(p.nodes(),function(b){p.setParent(b,x(b))}),p},i.prototype.setDefaultEdgeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultEdgeLabelFn=d,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(d,p){var v=this,h=arguments;return e.reduce(d,function(x,b){return h.length>1?v.setEdge(x,b,p):v.setEdge(x,b),b}),this},i.prototype.setEdge=function(){var d,p,v,h,x=!1,b=arguments[0];typeof b=="object"&&b!==null&&"v"in b?(d=b.v,p=b.w,v=b.name,arguments.length===2&&(h=arguments[1],x=!0)):(d=b,p=arguments[1],v=arguments[3],arguments.length>2&&(h=arguments[2],x=!0)),d=""+d,p=""+p,e.isUndefined(v)||(v=""+v);var m=s(this._isDirected,d,p,v);if(e.has(this._edgeLabels,m))return x&&(this._edgeLabels[m]=h),this;if(!e.isUndefined(v)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(p),this._edgeLabels[m]=x?h:this._defaultEdgeLabelFn(d,p,v);var w=c(this._isDirected,d,p,v);return d=w.v,p=w.w,Object.freeze(w),this._edgeObjs[m]=w,o(this._preds[p],d),o(this._sucs[d],p),this._in[p][m]=w,this._out[d][m]=w,this._edgeCount++,this},i.prototype.edge=function(d,p,v){var h=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,p,v);return this._edgeLabels[h]},i.prototype.hasEdge=function(d,p,v){var h=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,p,v);return e.has(this._edgeLabels,h)},i.prototype.removeEdge=function(d,p,v){var h=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,p,v),x=this._edgeObjs[h];return x&&(d=x.v,p=x.w,delete this._edgeLabels[h],delete this._edgeObjs[h],a(this._preds[p],d),a(this._sucs[d],p),delete this._in[p][h],delete this._out[d][h],this._edgeCount--),this},i.prototype.inEdges=function(d,p){var v=this._in[d];if(v){var h=e.values(v);return p?e.filter(h,function(x){return x.v===p}):h}},i.prototype.outEdges=function(d,p){var v=this._out[d];if(v){var h=e.values(v);return p?e.filter(h,function(x){return x.w===p}):h}},i.prototype.nodeEdges=function(d,p){var v=this.inEdges(d,p);if(v)return v.concat(this.outEdges(d,p))};function o(d,p){d[p]?d[p]++:d[p]=1}function a(d,p){--d[p]||delete d[p]}function s(d,p,v,h){var x=""+p,b=""+v;if(!d&&x>b){var m=x;x=b,b=m}return x+n+b+n+(e.isUndefined(h)?t:h)}function c(d,p,v,h){var x=""+p,b=""+v;if(!d&&x>b){var m=x;x=b,b=m}var w={v:x,w:b};return h&&(w.name=h),w}function u(d,p){return s(d,p.v,p.w,p.name)}return dm}var fm,fT;function RZ(){return fT||(fT=1,fm="2.1.8"),fm}var pm,pT;function NZ(){return pT||(pT=1,pm={Graph:b_(),version:RZ()}),pm}var hm,hT;function TZ(){if(hT)return hm;hT=1;var e=hn(),t=b_();hm={write:r,read:o};function r(a){var s={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:i(a)};return e.isUndefined(a.graph())||(s.value=e.clone(a.graph())),s}function n(a){return e.map(a.nodes(),function(s){var c=a.node(s),u=a.parent(s),d={v:s};return e.isUndefined(c)||(d.value=c),e.isUndefined(u)||(d.parent=u),d})}function i(a){return e.map(a.edges(),function(s){var c=a.edge(s),u={v:s.v,w:s.w};return e.isUndefined(s.name)||(u.name=s.name),e.isUndefined(c)||(u.value=c),u})}function o(a){var s=new t(a.options).setGraph(a.value);return e.each(a.nodes,function(c){s.setNode(c.v,c.value),c.parent&&s.setParent(c.v,c.parent)}),e.each(a.edges,function(c){s.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),s}return hm}var vm,vT;function PZ(){if(vT)return vm;vT=1;var e=hn();vm=t;function t(r){var n={},i=[],o;function a(s){e.has(n,s)||(n[s]=!0,o.push(s),e.each(r.successors(s),a),e.each(r.predecessors(s),a))}return e.each(r.nodes(),function(s){o=[],a(s),o.length&&i.push(o)}),i}return vm}var gm,gT;function Gz(){if(gT)return gm;gT=1;var e=hn();gm=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],s=i[n];i[r]=s,i[n]=a,o[s.key]=r,o[a.key]=n},gm}var mm,mT;function Kz(){if(mT)return mm;mT=1;var e=hn(),t=Gz();mm=n;var r=e.constant(1);function n(o,a,s,c){return i(o,String(a),s||r,c||function(u){return o.outEdges(u)})}function i(o,a,s,c){var u={},d=new t,p,v,h=function(x){var b=x.v!==p?x.v:x.w,m=u[b],w=s(x),y=v.distance+w;if(w<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+x+" Weight: "+w);y<m.distance&&(m.distance=y,m.predecessor=p,d.decrease(b,y))};for(o.nodes().forEach(function(x){var b=x===a?0:Number.POSITIVE_INFINITY;u[x]={distance:b},d.add(x,b)});d.size()>0&&(p=d.removeMin(),v=u[p],v.distance!==Number.POSITIVE_INFINITY);)c(p).forEach(h);return u}return mm}var bm,bT;function kZ(){if(bT)return bm;bT=1;var e=Kz(),t=hn();bm=r;function r(n,i,o){return t.transform(n.nodes(),function(a,s){a[s]=e(n,s,i,o)},{})}return bm}var ym,yT;function Yz(){if(yT)return ym;yT=1;var e=hn();ym=t;function t(r){var n=0,i=[],o={},a=[];function s(c){var u=o[c]={onStack:!0,lowlink:n,index:n++};if(i.push(c),r.successors(c).forEach(function(v){e.has(o,v)?o[v].onStack&&(u.lowlink=Math.min(u.lowlink,o[v].index)):(s(v),u.lowlink=Math.min(u.lowlink,o[v].lowlink))}),u.lowlink===u.index){var d=[],p;do p=i.pop(),o[p].onStack=!1,d.push(p);while(c!==p);a.push(d)}}return r.nodes().forEach(function(c){e.has(o,c)||s(c)}),a}return ym}var xm,xT;function MZ(){if(xT)return xm;xT=1;var e=hn(),t=Yz();xm=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 xm}var wm,wT;function AZ(){if(wT)return wm;wT=1;var e=hn();wm=r;var t=e.constant(1);function r(i,o,a){return n(i,o||t,a||function(s){return i.outEdges(s)})}function n(i,o,a){var s={},c=i.nodes();return c.forEach(function(u){s[u]={},s[u][u]={distance:0},c.forEach(function(d){u!==d&&(s[u][d]={distance:Number.POSITIVE_INFINITY})}),a(u).forEach(function(d){var p=d.v===u?d.w:d.v,v=o(d);s[u][p]={distance:v,predecessor:u}})}),c.forEach(function(u){var d=s[u];c.forEach(function(p){var v=s[p];c.forEach(function(h){var x=v[u],b=d[h],m=v[h],w=x.distance+b.distance;w<m.distance&&(m.distance=w,m.predecessor=b.predecessor)})})}),s}return wm}var _m,_T;function Xz(){if(_T)return _m;_T=1;var e=hn();_m=t,t.CycleException=r;function t(n){var i={},o={},a=[];function s(c){if(e.has(o,c))throw new r;e.has(i,c)||(o[c]=!0,i[c]=!0,e.each(n.predecessors(c),s),delete o[c],a.push(c))}if(e.each(n.sinks(),s),e.size(i)!==n.nodeCount())throw new r;return a}function r(){}return r.prototype=new Error,_m}var Em,ET;function DZ(){if(ET)return Em;ET=1;var e=Xz();Em=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return Em}var Sm,ST;function Zz(){if(ST)return Sm;ST=1;var e=hn();Sm=t;function t(n,i,o){e.isArray(i)||(i=[i]);var a=(n.isDirected()?n.successors:n.neighbors).bind(n),s=[],c={};return e.each(i,function(u){if(!n.hasNode(u))throw new Error("Graph does not have node: "+u);r(n,u,o==="post",c,a,s)}),s}function r(n,i,o,a,s,c){e.has(a,i)||(a[i]=!0,o||c.push(i),e.each(s(i),function(u){r(n,u,o,a,s,c)}),o&&c.push(i))}return Sm}var Om,OT;function jZ(){if(OT)return Om;OT=1;var e=Zz();Om=t;function t(r,n){return e(r,n,"post")}return Om}var Cm,CT;function qZ(){if(CT)return Cm;CT=1;var e=Zz();Cm=t;function t(r,n){return e(r,n,"pre")}return Cm}var Im,IT;function LZ(){if(IT)return Im;IT=1;var e=hn(),t=b_(),r=Gz();Im=n;function n(i,o){var a=new t,s={},c=new r,u;function d(v){var h=v.v===u?v.w:v.v,x=c.priority(h);if(x!==void 0){var b=o(v);b<x&&(s[h]=u,c.decrease(h,b))}}if(i.nodeCount()===0)return a;e.each(i.nodes(),function(v){c.add(v,Number.POSITIVE_INFINITY),a.setNode(v)}),c.decrease(i.nodes()[0],0);for(var p=!1;c.size()>0;){if(u=c.removeMin(),e.has(s,u))a.setEdge(u,s[u]);else{if(p)throw new Error("Input graph is not connected: "+i);p=!0}i.nodeEdges(u).forEach(d)}return a}return Im}var Rm,RT;function zZ(){return RT||(RT=1,Rm={components:PZ(),dijkstra:Kz(),dijkstraAll:kZ(),findCycles:MZ(),floydWarshall:AZ(),isAcyclic:DZ(),postorder:jZ(),preorder:qZ(),prim:LZ(),tarjan:Yz(),topsort:Xz()}),Rm}var Nm,NT;function BZ(){if(NT)return Nm;NT=1;var e=NZ();return Nm={Graph:e.Graph,json:TZ(),alg:zZ(),version:e.version},Nm}var Tm,TT;function Nn(){if(TT)return Tm;TT=1;var e;if(typeof r_=="function")try{e=BZ()}catch{}return e||(e=window.graphlib),Tm=e,Tm}var Pm,PT;function FZ(){if(PT)return Pm;PT=1;var e=_z(),t=1,r=4;function n(i){return e(i,t|r)}return Pm=n,Pm}var km,kT;function xd(){if(kT)return km;kT=1;var e=xa(),t=fi(),r=dd(),n=pn();function i(o,a,s){if(!n(s))return!1;var c=typeof a;return(c=="number"?t(s)&&r(a,s.length):c=="string"&&a in s)?e(s[a],o):!1}return km=i,km}var Mm,MT;function $Z(){if(MT)return Mm;MT=1;var e=yd(),t=xa(),r=xd(),n=go(),i=Object.prototype,o=i.hasOwnProperty,a=e(function(s,c){s=Object(s);var u=-1,d=c.length,p=d>2?c[2]:void 0;for(p&&r(c[0],c[1],p)&&(d=1);++u<d;)for(var v=c[u],h=n(v),x=-1,b=h.length;++x<b;){var m=h[x],w=s[m];(w===void 0||t(w,i[m])&&!o.call(s,m))&&(s[m]=v[m])}return s});return Mm=a,Mm}var Am,AT;function VZ(){if(AT)return Am;AT=1;var e=pi(),t=fi(),r=zi();function n(i){return function(o,a,s){var c=Object(o);if(!t(o)){var u=e(a,3);o=r(o),a=function(p){return u(c[p],p,c)}}var d=i(o,a,s);return d>-1?c[u?o[d]:d]:void 0}}return Am=n,Am}var Dm,DT;function HZ(){if(DT)return Dm;DT=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Dm=t,Dm}var jm,jT;function WZ(){if(jT)return jm;jT=1;var e=HZ(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return jm=r,jm}var qm,qT;function UZ(){if(qT)return qm;qT=1;var e=WZ(),t=pn(),r=Sa(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function c(u){if(typeof u=="number")return u;if(r(u))return n;if(t(u)){var d=typeof u.valueOf=="function"?u.valueOf():u;u=t(d)?d+"":d}if(typeof u!="string")return u===0?u:+u;u=e(u);var p=o.test(u);return p||a.test(u)?s(u.slice(2),p?2:8):i.test(u)?n:+u}return qm=c,qm}var Lm,LT;function Jz(){if(LT)return Lm;LT=1;var e=UZ(),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 Lm=n,Lm}var zm,zT;function GZ(){if(zT)return zm;zT=1;var e=Jz();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return zm=t,zm}var Bm,BT;function KZ(){if(BT)return Bm;BT=1;var e=Hz(),t=pi(),r=GZ(),n=Math.max;function i(o,a,s){var c=o==null?0:o.length;if(!c)return-1;var u=s==null?0:r(s);return u<0&&(u=n(c+u,0)),e(o,t(a,3),u)}return Bm=i,Bm}var Fm,FT;function YZ(){if(FT)return Fm;FT=1;var e=VZ(),t=KZ(),r=e(t);return Fm=r,Fm}var $m,$T;function Qz(){if($T)return $m;$T=1;var e=m_();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return $m=t,$m}var Vm,VT;function XZ(){if(VT)return Vm;VT=1;var e=p_(),t=Ez(),r=go();function n(i,o){return i==null?i:e(i,t(o),r)}return Vm=n,Vm}var Hm,HT;function ZZ(){if(HT)return Hm;HT=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return Hm=e,Hm}var Wm,WT;function JZ(){if(WT)return Wm;WT=1;var e=cd(),t=h_(),r=pi();function n(i,o){var a={};return o=r(o,3),t(i,function(s,c,u){e(a,c,o(s,c,u))}),a}return Wm=n,Wm}var Um,UT;function y_(){if(UT)return Um;UT=1;var e=Sa();function t(r,n,i){for(var o=-1,a=r.length;++o<a;){var s=r[o],c=n(s);if(c!=null&&(u===void 0?c===c&&!e(c):i(c,u)))var u=c,d=s}return d}return Um=t,Um}var Gm,GT;function QZ(){if(GT)return Gm;GT=1;function e(t,r){return t>r}return Gm=e,Gm}var Km,KT;function eJ(){if(KT)return Km;KT=1;var e=y_(),t=QZ(),r=mo();function n(i){return i&&i.length?e(i,r,t):void 0}return Km=n,Km}var Ym,YT;function e5(){if(YT)return Ym;YT=1;var e=cd(),t=xa();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return Ym=r,Ym}var Xm,XT;function tJ(){if(XT)return Xm;XT=1;var e=ho(),t=hd(),r=Un(),n="[object Object]",i=Function.prototype,o=Object.prototype,a=i.toString,s=o.hasOwnProperty,c=a.call(Object);function u(d){if(!r(d)||e(d)!=n)return!1;var p=t(d);if(p===null)return!0;var v=s.call(p,"constructor")&&p.constructor;return typeof v=="function"&&v instanceof v&&a.call(v)==c}return Xm=u,Xm}var Zm,ZT;function t5(){if(ZT)return Zm;ZT=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return Zm=e,Zm}var Jm,JT;function rJ(){if(JT)return Jm;JT=1;var e=rl(),t=go();function r(n){return e(n,t(n))}return Jm=r,Jm}var Qm,QT;function nJ(){if(QT)return Qm;QT=1;var e=e5(),t=uz(),r=yz(),n=dz(),i=wz(),o=nl(),a=$t(),s=Wz(),c=_a(),u=tl(),d=pn(),p=tJ(),v=il(),h=t5(),x=rJ();function b(m,w,y,_,S,E,I){var N=h(m,y),T=h(w,y),k=I.get(T);if(k){e(m,y,k);return}var L=E?E(N,T,y+"",m,w,I):void 0,B=L===void 0;if(B){var A=a(T),z=!A&&c(T),P=!A&&!z&&v(T);L=T,A||z||P?a(N)?L=N:s(N)?L=n(N):z?(B=!1,L=t(T,!0)):P?(B=!1,L=r(T,!0)):L=[]:p(T)||o(T)?(L=N,o(N)?L=x(N):(!d(N)||u(N))&&(L=i(T))):B=!1}B&&(I.set(T,L),S(L,T,_,E,I),I.delete(T)),e(m,y,L)}return Qm=b,Qm}var eb,eP;function iJ(){if(eP)return eb;eP=1;var e=ld(),t=e5(),r=p_(),n=nJ(),i=pn(),o=go(),a=t5();function s(c,u,d,p,v){c!==u&&r(u,function(h,x){if(v||(v=new e),i(h))n(c,u,x,d,s,p,v);else{var b=p?p(a(c,x),h,x+"",c,u,v):void 0;b===void 0&&(b=h),t(c,x,b)}},o)}return eb=s,eb}var tb,tP;function oJ(){if(tP)return tb;tP=1;var e=yd(),t=xd();function r(n){return e(function(i,o){var a=-1,s=o.length,c=s>1?o[s-1]:void 0,u=s>2?o[2]:void 0;for(c=n.length>3&&typeof c=="function"?(s--,c):void 0,u&&t(o[0],o[1],u)&&(c=s<3?void 0:c,s=1),i=Object(i);++a<s;){var d=o[a];d&&n(i,d,a,c)}return i})}return tb=r,tb}var rb,rP;function aJ(){if(rP)return rb;rP=1;var e=iJ(),t=oJ(),r=t(function(n,i,o){e(n,i,o)});return rb=r,rb}var nb,nP;function r5(){if(nP)return nb;nP=1;function e(t,r){return t<r}return nb=e,nb}var ib,iP;function sJ(){if(iP)return ib;iP=1;var e=y_(),t=r5(),r=mo();function n(i){return i&&i.length?e(i,r,t):void 0}return ib=n,ib}var ob,oP;function lJ(){if(oP)return ob;oP=1;var e=y_(),t=pi(),r=r5();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return ob=n,ob}var ab,aP;function cJ(){if(aP)return ab;aP=1;var e=Tn(),t=function(){return e.Date.now()};return ab=t,ab}var sb,sP;function uJ(){if(sP)return sb;sP=1;var e=ud(),t=md(),r=dd(),n=pn(),i=ol();function o(a,s,c,u){if(!n(a))return a;s=t(s,a);for(var d=-1,p=s.length,v=p-1,h=a;h!=null&&++d<p;){var x=i(s[d]),b=c;if(x==="__proto__"||x==="constructor"||x==="prototype")return a;if(d!=v){var m=h[x];b=u?u(m,x,h):void 0,b===void 0&&(b=n(m)?m:r(s[d+1])?[]:{})}e(h,x,b),h=h[x]}return a}return sb=o,sb}var lb,lP;function dJ(){if(lP)return lb;lP=1;var e=bd(),t=uJ(),r=md();function n(i,o,a){for(var s=-1,c=o.length,u={};++s<c;){var d=o[s],p=e(i,d);a(p,d)&&t(u,r(d,i),p)}return u}return lb=n,lb}var cb,cP;function fJ(){if(cP)return cb;cP=1;var e=dJ(),t=Az();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return cb=r,cb}var ub,uP;function pJ(){if(uP)return ub;uP=1;var e=Qz(),t=$z(),r=Vz();function n(i){return r(t(i,void 0,e),i+"")}return ub=n,ub}var db,dP;function hJ(){if(dP)return db;dP=1;var e=fJ(),t=pJ(),r=t(function(n,i){return n==null?{}:e(n,i)});return db=r,db}var fb,fP;function vJ(){if(fP)return fb;fP=1;var e=Math.ceil,t=Math.max;function r(n,i,o,a){for(var s=-1,c=t(e((i-n)/(o||1)),0),u=Array(c);c--;)u[a?c:++s]=n,n+=o;return u}return fb=r,fb}var pb,pP;function gJ(){if(pP)return pb;pP=1;var e=vJ(),t=xd(),r=Jz();function n(i){return function(o,a,s){return s&&typeof s!="number"&&t(o,a,s)&&(a=s=void 0),o=r(o),a===void 0?(a=o,o=0):a=r(a),s=s===void 0?o<a?1:-1:r(s),e(o,a,s,i)}}return pb=n,pb}var hb,hP;function mJ(){if(hP)return hb;hP=1;var e=gJ(),t=e();return hb=t,hb}var vb,vP;function bJ(){if(vP)return vb;vP=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return vb=e,vb}var gb,gP;function yJ(){if(gP)return gb;gP=1;var e=Sa();function t(r,n){if(r!==n){var i=r!==void 0,o=r===null,a=r===r,s=e(r),c=n!==void 0,u=n===null,d=n===n,p=e(n);if(!u&&!p&&!s&&r>n||s&&c&&d&&!u&&!p||o&&c&&d||!i&&d||!a)return 1;if(!o&&!s&&!p&&r<n||p&&i&&a&&!o&&!s||u&&i&&a||!c&&a||!d)return-1}return 0}return gb=t,gb}var mb,mP;function xJ(){if(mP)return mb;mP=1;var e=yJ();function t(r,n,i){for(var o=-1,a=r.criteria,s=n.criteria,c=a.length,u=i.length;++o<c;){var d=e(a[o],s[o]);if(d){if(o>=u)return d;var p=i[o];return d*(p=="desc"?-1:1)}}return r.index-n.index}return mb=t,mb}var bb,bP;function wJ(){if(bP)return bb;bP=1;var e=gd(),t=bd(),r=pi(),n=zz(),i=bJ(),o=fd(),a=xJ(),s=mo(),c=$t();function u(d,p,v){p.length?p=e(p,function(b){return c(b)?function(m){return t(m,b.length===1?b[0]:b)}:b}):p=[s];var h=-1;p=e(p,o(r));var x=n(d,function(b,m,w){var y=e(p,function(_){return _(b)});return{criteria:y,index:++h,value:b}});return i(x,function(b,m){return a(b,m,v)})}return bb=u,bb}var yb,yP;function _J(){if(yP)return yb;yP=1;var e=m_(),t=wJ(),r=yd(),n=xd(),i=r(function(o,a){if(o==null)return[];var s=a.length;return s>1&&n(o,a[0],a[1])?a=[]:s>2&&n(a[0],a[1],a[2])&&(a=[a[0]]),t(o,e(a,1),[])});return yb=i,yb}var xb,xP;function EJ(){if(xP)return xb;xP=1;var e=kz(),t=0;function r(n){var i=++t;return e(n)+i}return xb=r,xb}var wb,wP;function SJ(){if(wP)return wb;wP=1;function e(t,r,n){for(var i=-1,o=t.length,a=r.length,s={};++i<o;){var c=i<a?r[i]:void 0;n(s,t[i],c)}return s}return wb=e,wb}var _b,_P;function OJ(){if(_P)return _b;_P=1;var e=ud(),t=SJ();function r(n,i){return t(n||[],i||[],e)}return _b=r,_b}var Eb,EP;function Nt(){if(EP)return Eb;EP=1;var e;if(typeof r_=="function")try{e={cloneDeep:FZ(),constant:f_(),defaults:$Z(),each:Oz(),filter:jz(),find:YZ(),flatten:Qz(),forEach:Sz(),forIn:XZ(),has:qz(),isUndefined:Lz(),last:ZZ(),map:Bz(),mapValues:JZ(),max:eJ(),merge:aJ(),min:sJ(),minBy:lJ(),now:cJ(),pick:hJ(),range:mJ(),reduce:Fz(),sortBy:_J(),uniqueId:EJ(),values:Uz(),zipObject:OJ()}}catch{}return e||(e=window._),Eb=e,Eb}var Sb,SP;function CJ(){if(SP)return Sb;SP=1,Sb=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 Sb}var Ob,OP;function IJ(){if(OP)return Ob;OP=1;var e=Nt(),t=Nn().Graph,r=CJ();Ob=i;var n=e.constant(1);function i(u,d){if(u.nodeCount()<=1)return[];var p=s(u,d||n),v=o(p.graph,p.buckets,p.zeroIdx);return e.flatten(e.map(v,function(h){return u.outEdges(h.v,h.w)}),!0)}function o(u,d,p){for(var v=[],h=d[d.length-1],x=d[0],b;u.nodeCount();){for(;b=x.dequeue();)a(u,d,p,b);for(;b=h.dequeue();)a(u,d,p,b);if(u.nodeCount()){for(var m=d.length-2;m>0;--m)if(b=d[m].dequeue(),b){v=v.concat(a(u,d,p,b,!0));break}}}return v}function a(u,d,p,v,h){var x=h?[]:void 0;return e.forEach(u.inEdges(v.v),function(b){var m=u.edge(b),w=u.node(b.v);h&&x.push({v:b.v,w:b.w}),w.out-=m,c(d,p,w)}),e.forEach(u.outEdges(v.v),function(b){var m=u.edge(b),w=b.w,y=u.node(w);y.in-=m,c(d,p,y)}),u.removeNode(v.v),x}function s(u,d){var p=new t,v=0,h=0;e.forEach(u.nodes(),function(m){p.setNode(m,{v:m,in:0,out:0})}),e.forEach(u.edges(),function(m){var w=p.edge(m.v,m.w)||0,y=d(m),_=w+y;p.setEdge(m.v,m.w,_),h=Math.max(h,p.node(m.v).out+=y),v=Math.max(v,p.node(m.w).in+=y)});var x=e.range(h+v+3).map(function(){return new r}),b=v+1;return e.forEach(p.nodes(),function(m){c(x,b,p.node(m))}),{graph:p,buckets:x,zeroIdx:b}}function c(u,d,p){p.out?p.in?u[p.out-p.in+d].enqueue(p):u[u.length-1].enqueue(p):u[0].enqueue(p)}return Ob}var Cb,CP;function RJ(){if(CP)return Cb;CP=1;var e=Nt(),t=IJ();Cb={run:r,undo:i};function r(o){var a=o.graph().acyclicer==="greedy"?t(o,s(o)):n(o);e.forEach(a,function(c){var u=o.edge(c);o.removeEdge(c),u.forwardName=c.name,u.reversed=!0,o.setEdge(c.w,c.v,u,e.uniqueId("rev"))});function s(c){return function(u){return c.edge(u).weight}}}function n(o){var a=[],s={},c={};function u(d){e.has(c,d)||(c[d]=!0,s[d]=!0,e.forEach(o.outEdges(d),function(p){e.has(s,p.w)?a.push(p):u(p.w)}),delete s[d])}return e.forEach(o.nodes(),u),a}function i(o){e.forEach(o.edges(),function(a){var s=o.edge(a);if(s.reversed){o.removeEdge(a);var c=s.forwardName;delete s.reversed,delete s.forwardName,o.setEdge(a.w,a.v,s,c)}})}return Cb}var Ib,IP;function Dr(){if(IP)return Ib;IP=1;var e=Nt(),t=Nn().Graph;Ib={addDummyNode:r,simplify:n,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:a,intersectRect:s,buildLayerMatrix:c,normalizeRanks:u,removeEmptyRanks:d,addBorderNode:p,maxRank:v,partition:h,time:x,notime:b};function r(m,w,y,_){var S;do S=e.uniqueId(_);while(m.hasNode(S));return y.dummy=w,m.setNode(S,y),S}function n(m){var w=new t().setGraph(m.graph());return e.forEach(m.nodes(),function(y){w.setNode(y,m.node(y))}),e.forEach(m.edges(),function(y){var _=w.edge(y.v,y.w)||{weight:0,minlen:1},S=m.edge(y);w.setEdge(y.v,y.w,{weight:_.weight+S.weight,minlen:Math.max(_.minlen,S.minlen)})}),w}function i(m){var w=new t({multigraph:m.isMultigraph()}).setGraph(m.graph());return e.forEach(m.nodes(),function(y){m.children(y).length||w.setNode(y,m.node(y))}),e.forEach(m.edges(),function(y){w.setEdge(y,m.edge(y))}),w}function o(m){var w=e.map(m.nodes(),function(y){var _={};return e.forEach(m.outEdges(y),function(S){_[S.w]=(_[S.w]||0)+m.edge(S).weight}),_});return e.zipObject(m.nodes(),w)}function a(m){var w=e.map(m.nodes(),function(y){var _={};return e.forEach(m.inEdges(y),function(S){_[S.v]=(_[S.v]||0)+m.edge(S).weight}),_});return e.zipObject(m.nodes(),w)}function s(m,w){var y=m.x,_=m.y,S=w.x-y,E=w.y-_,I=m.width/2,N=m.height/2;if(!S&&!E)throw new Error("Not possible to find intersection inside of the rectangle");var T,k;return Math.abs(E)*I>Math.abs(S)*N?(E<0&&(N=-N),T=N*S/E,k=N):(S<0&&(I=-I),T=I,k=I*E/S),{x:y+T,y:_+k}}function c(m){var w=e.map(e.range(v(m)+1),function(){return[]});return e.forEach(m.nodes(),function(y){var _=m.node(y),S=_.rank;e.isUndefined(S)||(w[S][_.order]=y)}),w}function u(m){var w=e.min(e.map(m.nodes(),function(y){return m.node(y).rank}));e.forEach(m.nodes(),function(y){var _=m.node(y);e.has(_,"rank")&&(_.rank-=w)})}function d(m){var w=e.min(e.map(m.nodes(),function(E){return m.node(E).rank})),y=[];e.forEach(m.nodes(),function(E){var I=m.node(E).rank-w;y[I]||(y[I]=[]),y[I].push(E)});var _=0,S=m.graph().nodeRankFactor;e.forEach(y,function(E,I){e.isUndefined(E)&&I%S!==0?--_:_&&e.forEach(E,function(N){m.node(N).rank+=_})})}function p(m,w,y,_){var S={width:0,height:0};return arguments.length>=4&&(S.rank=y,S.order=_),r(m,"border",S,w)}function v(m){return e.max(e.map(m.nodes(),function(w){var y=m.node(w).rank;if(!e.isUndefined(y))return y}))}function h(m,w){var y={lhs:[],rhs:[]};return e.forEach(m,function(_){w(_)?y.lhs.push(_):y.rhs.push(_)}),y}function x(m,w){var y=e.now();try{return w()}finally{console.log(m+" time: "+(e.now()-y)+"ms")}}function b(m,w){return w()}return Ib}var Rb,RP;function NJ(){if(RP)return Rb;RP=1;var e=Nt(),t=Dr();Rb={run:r,undo:i};function r(o){o.graph().dummyChains=[],e.forEach(o.edges(),function(a){n(o,a)})}function n(o,a){var s=a.v,c=o.node(s).rank,u=a.w,d=o.node(u).rank,p=a.name,v=o.edge(a),h=v.labelRank;if(d!==c+1){o.removeEdge(a);var x,b,m;for(m=0,++c;c<d;++m,++c)v.points=[],b={width:0,height:0,edgeLabel:v,edgeObj:a,rank:c},x=t.addDummyNode(o,"edge",b,"_d"),c===h&&(b.width=v.width,b.height=v.height,b.dummy="edge-label",b.labelpos=v.labelpos),o.setEdge(s,x,{weight:v.weight},p),m===0&&o.graph().dummyChains.push(x),s=x;o.setEdge(s,u,{weight:v.weight},p)}}function i(o){e.forEach(o.graph().dummyChains,function(a){var s=o.node(a),c=s.edgeLabel,u;for(o.setEdge(s.edgeObj,c);s.dummy;)u=o.successors(a)[0],o.removeNode(a),c.points.push({x:s.x,y:s.y}),s.dummy==="edge-label"&&(c.x=s.x,c.y=s.y,c.width=s.width,c.height=s.height),a=u,s=o.node(a)})}return Rb}var Nb,NP;function Tu(){if(NP)return Nb;NP=1;var e=Nt();Nb={longestPath:t,slack:r};function t(n){var i={};function o(a){var s=n.node(a);if(e.has(i,a))return s.rank;i[a]=!0;var c=e.min(e.map(n.outEdges(a),function(u){return o(u.w)-n.edge(u).minlen}));return(c===Number.POSITIVE_INFINITY||c===void 0||c===null)&&(c=0),s.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 Nb}var Tb,TP;function n5(){if(TP)return Tb;TP=1;var e=Nt(),t=Nn().Graph,r=Tu().slack;Tb=n;function n(s){var c=new t({directed:!1}),u=s.nodes()[0],d=s.nodeCount();c.setNode(u,{});for(var p,v;i(c,s)<d;)p=o(c,s),v=c.hasNode(p.v)?r(s,p):-r(s,p),a(c,s,v);return c}function i(s,c){function u(d){e.forEach(c.nodeEdges(d),function(p){var v=p.v,h=d===v?p.w:v;!s.hasNode(h)&&!r(c,p)&&(s.setNode(h,{}),s.setEdge(d,h,{}),u(h))})}return e.forEach(s.nodes(),u),s.nodeCount()}function o(s,c){return e.minBy(c.edges(),function(u){if(s.hasNode(u.v)!==s.hasNode(u.w))return r(c,u)})}function a(s,c,u){e.forEach(s.nodes(),function(d){c.node(d).rank+=u})}return Tb}var Pb,PP;function TJ(){if(PP)return Pb;PP=1;var e=Nt(),t=n5(),r=Tu().slack,n=Tu().longestPath,i=Nn().alg.preorder,o=Nn().alg.postorder,a=Dr().simplify;Pb=s,s.initLowLimValues=p,s.initCutValues=c,s.calcCutValue=d,s.leaveEdge=h,s.enterEdge=x,s.exchangeEdges=b;function s(_){_=a(_),n(_);var S=t(_);p(S),c(S,_);for(var E,I;E=h(S);)I=x(S,_,E),b(S,_,E,I)}function c(_,S){var E=o(_,_.nodes());E=E.slice(0,E.length-1),e.forEach(E,function(I){u(_,S,I)})}function u(_,S,E){var I=_.node(E),N=I.parent;_.edge(E,N).cutvalue=d(_,S,E)}function d(_,S,E){var I=_.node(E),N=I.parent,T=!0,k=S.edge(E,N),L=0;return k||(T=!1,k=S.edge(N,E)),L=k.weight,e.forEach(S.nodeEdges(E),function(B){var A=B.v===E,z=A?B.w:B.v;if(z!==N){var P=A===T,K=S.edge(B).weight;if(L+=P?K:-K,w(_,E,z)){var $=_.edge(E,z).cutvalue;L+=P?-$:$}}}),L}function p(_,S){arguments.length<2&&(S=_.nodes()[0]),v(_,{},1,S)}function v(_,S,E,I,N){var T=E,k=_.node(I);return S[I]=!0,e.forEach(_.neighbors(I),function(L){e.has(S,L)||(E=v(_,S,E,L,I))}),k.low=T,k.lim=E++,N?k.parent=N:delete k.parent,E}function h(_){return e.find(_.edges(),function(S){return _.edge(S).cutvalue<0})}function x(_,S,E){var I=E.v,N=E.w;S.hasEdge(I,N)||(I=E.w,N=E.v);var T=_.node(I),k=_.node(N),L=T,B=!1;T.lim>k.lim&&(L=k,B=!0);var A=e.filter(S.edges(),function(z){return B===y(_,_.node(z.v),L)&&B!==y(_,_.node(z.w),L)});return e.minBy(A,function(z){return r(S,z)})}function b(_,S,E,I){var N=E.v,T=E.w;_.removeEdge(N,T),_.setEdge(I.v,I.w,{}),p(_),c(_,S),m(_,S)}function m(_,S){var E=e.find(_.nodes(),function(N){return!S.node(N).parent}),I=i(_,E);I=I.slice(1),e.forEach(I,function(N){var T=_.node(N).parent,k=S.edge(N,T),L=!1;k||(k=S.edge(T,N),L=!0),S.node(N).rank=S.node(T).rank+(L?k.minlen:-k.minlen)})}function w(_,S,E){return _.hasEdge(S,E)}function y(_,S,E){return E.low<=S.lim&&S.lim<=E.lim}return Pb}var kb,kP;function PJ(){if(kP)return kb;kP=1;var e=Tu(),t=e.longestPath,r=n5(),n=TJ();kb=i;function i(c){switch(c.graph().ranker){case"network-simplex":s(c);break;case"tight-tree":a(c);break;case"longest-path":o(c);break;default:s(c)}}var o=t;function a(c){t(c),r(c)}function s(c){n(c)}return kb}var Mb,MP;function kJ(){if(MP)return Mb;MP=1;var e=Nt();Mb=t;function t(i){var o=n(i);e.forEach(i.graph().dummyChains,function(a){for(var s=i.node(a),c=s.edgeObj,u=r(i,o,c.v,c.w),d=u.path,p=u.lca,v=0,h=d[v],x=!0;a!==c.w;){if(s=i.node(a),x){for(;(h=d[v])!==p&&i.node(h).maxRank<s.rank;)v++;h===p&&(x=!1)}if(!x){for(;v<d.length-1&&i.node(h=d[v+1]).minRank<=s.rank;)v++;h=d[v]}i.setParent(a,h),a=i.successors(a)[0]}})}function r(i,o,a,s){var c=[],u=[],d=Math.min(o[a].low,o[s].low),p=Math.max(o[a].lim,o[s].lim),v,h;v=a;do v=i.parent(v),c.push(v);while(v&&(o[v].low>d||p>o[v].lim));for(h=v,v=s;(v=i.parent(v))!==h;)u.push(v);return{path:c.concat(u.reverse()),lca:h}}function n(i){var o={},a=0;function s(c){var u=a;e.forEach(i.children(c),s),o[c]={low:u,lim:a++}}return e.forEach(i.children(),s),o}return Mb}var Ab,AP;function MJ(){if(AP)return Ab;AP=1;var e=Nt(),t=Dr();Ab={run:r,cleanup:a};function r(s){var c=t.addDummyNode(s,"root",{},"_root"),u=i(s),d=e.max(e.values(u))-1,p=2*d+1;s.graph().nestingRoot=c,e.forEach(s.edges(),function(h){s.edge(h).minlen*=p});var v=o(s)+1;e.forEach(s.children(),function(h){n(s,c,p,v,d,u,h)}),s.graph().nodeRankFactor=p}function n(s,c,u,d,p,v,h){var x=s.children(h);if(!x.length){h!==c&&s.setEdge(c,h,{weight:0,minlen:u});return}var b=t.addBorderNode(s,"_bt"),m=t.addBorderNode(s,"_bb"),w=s.node(h);s.setParent(b,h),w.borderTop=b,s.setParent(m,h),w.borderBottom=m,e.forEach(x,function(y){n(s,c,u,d,p,v,y);var _=s.node(y),S=_.borderTop?_.borderTop:y,E=_.borderBottom?_.borderBottom:y,I=_.borderTop?d:2*d,N=S!==E?1:p-v[h]+1;s.setEdge(b,S,{weight:I,minlen:N,nestingEdge:!0}),s.setEdge(E,m,{weight:I,minlen:N,nestingEdge:!0})}),s.parent(h)||s.setEdge(c,b,{weight:0,minlen:p+v[h]})}function i(s){var c={};function u(d,p){var v=s.children(d);v&&v.length&&e.forEach(v,function(h){u(h,p+1)}),c[d]=p}return e.forEach(s.children(),function(d){u(d,1)}),c}function o(s){return e.reduce(s.edges(),function(c,u){return c+s.edge(u).weight},0)}function a(s){var c=s.graph();s.removeNode(c.nestingRoot),delete c.nestingRoot,e.forEach(s.edges(),function(u){var d=s.edge(u);d.nestingEdge&&s.removeEdge(u)})}return Ab}var Db,DP;function AJ(){if(DP)return Db;DP=1;var e=Nt(),t=Dr();Db=r;function r(i){function o(a){var s=i.children(a),c=i.node(a);if(s.length&&e.forEach(s,o),e.has(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(var u=c.minRank,d=c.maxRank+1;u<d;++u)n(i,"borderLeft","_bl",a,c,u),n(i,"borderRight","_br",a,c,u)}}e.forEach(i.children(),o)}function n(i,o,a,s,c,u){var d={width:0,height:0,rank:u,borderType:o},p=c[o][u-1],v=t.addDummyNode(i,"border",d,a);c[o][u]=v,i.setParent(v,s),p&&i.setEdge(p,v,{weight:1})}return Db}var jb,jP;function DJ(){if(jP)return jb;jP=1;var e=Nt();jb={adjust:t,undo:r};function t(u){var d=u.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&n(u)}function r(u){var d=u.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&o(u),(d==="lr"||d==="rl")&&(s(u),n(u))}function n(u){e.forEach(u.nodes(),function(d){i(u.node(d))}),e.forEach(u.edges(),function(d){i(u.edge(d))})}function i(u){var d=u.width;u.width=u.height,u.height=d}function o(u){e.forEach(u.nodes(),function(d){a(u.node(d))}),e.forEach(u.edges(),function(d){var p=u.edge(d);e.forEach(p.points,a),e.has(p,"y")&&a(p)})}function a(u){u.y=-u.y}function s(u){e.forEach(u.nodes(),function(d){c(u.node(d))}),e.forEach(u.edges(),function(d){var p=u.edge(d);e.forEach(p.points,c),e.has(p,"x")&&c(p)})}function c(u){var d=u.x;u.x=u.y,u.y=d}return jb}var qb,qP;function jJ(){if(qP)return qb;qP=1;var e=Nt();qb=t;function t(r){var n={},i=e.filter(r.nodes(),function(u){return!r.children(u).length}),o=e.max(e.map(i,function(u){return r.node(u).rank})),a=e.map(e.range(o+1),function(){return[]});function s(u){if(!e.has(n,u)){n[u]=!0;var d=r.node(u);a[d.rank].push(u),e.forEach(r.successors(u),s)}}var c=e.sortBy(i,function(u){return r.node(u).rank});return e.forEach(c,s),a}return qb}var Lb,LP;function qJ(){if(LP)return Lb;LP=1;var e=Nt();Lb=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(v,h){return h})),s=e.flatten(e.map(i,function(v){return e.sortBy(e.map(n.outEdges(v),function(h){return{pos:a[h.w],weight:n.edge(h).weight}}),"pos")}),!0),c=1;c<o.length;)c<<=1;var u=2*c-1;c-=1;var d=e.map(new Array(u),function(){return 0}),p=0;return e.forEach(s.forEach(function(v){var h=v.pos+c;d[h]+=v.weight;for(var x=0;h>0;)h%2&&(x+=d[h+1]),h=h-1>>1,d[h]+=v.weight;p+=v.weight*x})),p}return Lb}var zb,zP;function LJ(){if(zP)return zb;zP=1;var e=Nt();zb=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(s,c){var u=r.edge(c),d=r.node(c.v);return{sum:s.sum+u.weight*d.order,weight:s.weight+u.weight}},{sum:0,weight:0});return{v:i,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:i}})}return zb}var Bb,BP;function zJ(){if(BP)return Bb;BP=1;var e=Nt();Bb=t;function t(i,o){var a={};e.forEach(i,function(c,u){var d=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:u};e.isUndefined(c.barycenter)||(d.barycenter=c.barycenter,d.weight=c.weight)}),e.forEach(o.edges(),function(c){var u=a[c.v],d=a[c.w];!e.isUndefined(u)&&!e.isUndefined(d)&&(d.indegree++,u.out.push(a[c.w]))});var s=e.filter(a,function(c){return!c.indegree});return r(s)}function r(i){var o=[];function a(u){return function(d){d.merged||(e.isUndefined(d.barycenter)||e.isUndefined(u.barycenter)||d.barycenter>=u.barycenter)&&n(u,d)}}function s(u){return function(d){d.in.push(u),--d.indegree===0&&i.push(d)}}for(;i.length;){var c=i.pop();o.push(c),e.forEach(c.in.reverse(),a(c)),e.forEach(c.out,s(c))}return e.map(e.filter(o,function(u){return!u.merged}),function(u){return e.pick(u,["vs","i","barycenter","weight"])})}function n(i,o){var a=0,s=0;i.weight&&(a+=i.barycenter*i.weight,s+=i.weight),o.weight&&(a+=o.barycenter*o.weight,s+=o.weight),i.vs=o.vs.concat(i.vs),i.barycenter=a/s,i.weight=s,i.i=Math.min(o.i,i.i),o.merged=!0}return Bb}var Fb,FP;function BJ(){if(FP)return Fb;FP=1;var e=Nt(),t=Dr();Fb=r;function r(o,a){var s=t.partition(o,function(b){return e.has(b,"barycenter")}),c=s.lhs,u=e.sortBy(s.rhs,function(b){return-b.i}),d=[],p=0,v=0,h=0;c.sort(i(!!a)),h=n(d,u,h),e.forEach(c,function(b){h+=b.vs.length,d.push(b.vs),p+=b.barycenter*b.weight,v+=b.weight,h=n(d,u,h)});var x={vs:e.flatten(d,!0)};return v&&(x.barycenter=p/v,x.weight=v),x}function n(o,a,s){for(var c;a.length&&(c=e.last(a)).i<=s;)a.pop(),o.push(c.vs),s++;return s}function i(o){return function(a,s){return a.barycenter<s.barycenter?-1:a.barycenter>s.barycenter?1:o?s.i-a.i:a.i-s.i}}return Fb}var $b,$P;function FJ(){if($P)return $b;$P=1;var e=Nt(),t=LJ(),r=zJ(),n=BJ();$b=i;function i(s,c,u,d){var p=s.children(c),v=s.node(c),h=v?v.borderLeft:void 0,x=v?v.borderRight:void 0,b={};h&&(p=e.filter(p,function(E){return E!==h&&E!==x}));var m=t(s,p);e.forEach(m,function(E){if(s.children(E.v).length){var I=i(s,E.v,u,d);b[E.v]=I,e.has(I,"barycenter")&&a(E,I)}});var w=r(m,u);o(w,b);var y=n(w,d);if(h&&(y.vs=e.flatten([h,y.vs,x],!0),s.predecessors(h).length)){var _=s.node(s.predecessors(h)[0]),S=s.node(s.predecessors(x)[0]);e.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+_.order+S.order)/(y.weight+2),y.weight+=2}return y}function o(s,c){e.forEach(s,function(u){u.vs=e.flatten(u.vs.map(function(d){return c[d]?c[d].vs:d}),!0)})}function a(s,c){e.isUndefined(s.barycenter)?(s.barycenter=c.barycenter,s.weight=c.weight):(s.barycenter=(s.barycenter*s.weight+c.barycenter*c.weight)/(s.weight+c.weight),s.weight+=c.weight)}return $b}var Vb,VP;function $J(){if(VP)return Vb;VP=1;var e=Nt(),t=Nn().Graph;Vb=r;function r(i,o,a){var s=n(i),c=new t({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(u){return i.node(u)});return e.forEach(i.nodes(),function(u){var d=i.node(u),p=i.parent(u);(d.rank===o||d.minRank<=o&&o<=d.maxRank)&&(c.setNode(u),c.setParent(u,p||s),e.forEach(i[a](u),function(v){var h=v.v===u?v.w:v.v,x=c.edge(h,u),b=e.isUndefined(x)?0:x.weight;c.setEdge(h,u,{weight:i.edge(v).weight+b})}),e.has(d,"minRank")&&c.setNode(u,{borderLeft:d.borderLeft[o],borderRight:d.borderRight[o]}))}),c}function n(i){for(var o;i.hasNode(o=e.uniqueId("_root")););return o}return Vb}var Hb,HP;function VJ(){if(HP)return Hb;HP=1;var e=Nt();Hb=t;function t(r,n,i){var o={},a;e.forEach(i,function(s){for(var c=r.parent(s),u,d;c;){if(u=r.parent(c),u?(d=o[u],o[u]=c):(d=a,a=c),d&&d!==c){n.setEdge(d,c);return}c=u}})}return Hb}var Wb,WP;function HJ(){if(WP)return Wb;WP=1;var e=Nt(),t=jJ(),r=qJ(),n=FJ(),i=$J(),o=VJ(),a=Nn().Graph,s=Dr();Wb=c;function c(v){var h=s.maxRank(v),x=u(v,e.range(1,h+1),"inEdges"),b=u(v,e.range(h-1,-1,-1),"outEdges"),m=t(v);p(v,m);for(var w=Number.POSITIVE_INFINITY,y,_=0,S=0;S<4;++_,++S){d(_%2?x:b,_%4>=2),m=s.buildLayerMatrix(v);var E=r(v,m);E<w&&(S=0,y=e.cloneDeep(m),w=E)}p(v,y)}function u(v,h,x){return e.map(h,function(b){return i(v,b,x)})}function d(v,h){var x=new a;e.forEach(v,function(b){var m=b.graph().root,w=n(b,m,x,h);e.forEach(w.vs,function(y,_){b.node(y).order=_}),o(b,x,w.vs)})}function p(v,h){e.forEach(h,function(x){e.forEach(x,function(b,m){v.node(b).order=m})})}return Wb}var Ub,UP;function WJ(){if(UP)return Ub;UP=1;var e=Nt(),t=Nn().Graph,r=Dr();Ub={positionX:x,findType1Conflicts:n,findType2Conflicts:i,addConflict:a,hasConflict:s,verticalAlignment:c,horizontalCompaction:u,alignCoordinates:v,findSmallestWidthAlignment:p,balance:h};function n(w,y){var _={};function S(E,I){var N=0,T=0,k=E.length,L=e.last(I);return e.forEach(I,function(B,A){var z=o(w,B),P=z?w.node(z).order:k;(z||B===L)&&(e.forEach(I.slice(T,A+1),function(K){e.forEach(w.predecessors(K),function($){var Y=w.node($),U=Y.order;(U<N||P<U)&&!(Y.dummy&&w.node(K).dummy)&&a(_,$,K)})}),T=A+1,N=P)}),I}return e.reduce(y,S),_}function i(w,y){var _={};function S(I,N,T,k,L){var B;e.forEach(e.range(N,T),function(A){B=I[A],w.node(B).dummy&&e.forEach(w.predecessors(B),function(z){var P=w.node(z);P.dummy&&(P.order<k||P.order>L)&&a(_,z,B)})})}function E(I,N){var T=-1,k,L=0;return e.forEach(N,function(B,A){if(w.node(B).dummy==="border"){var z=w.predecessors(B);z.length&&(k=w.node(z[0]).order,S(N,L,A,T,k),L=A,T=k)}S(N,L,N.length,k,I.length)}),N}return e.reduce(y,E),_}function o(w,y){if(w.node(y).dummy)return e.find(w.predecessors(y),function(_){return w.node(_).dummy})}function a(w,y,_){if(y>_){var S=y;y=_,_=S}var E=w[y];E||(w[y]=E={}),E[_]=!0}function s(w,y,_){if(y>_){var S=y;y=_,_=S}return e.has(w[y],_)}function c(w,y,_,S){var E={},I={},N={};return e.forEach(y,function(T){e.forEach(T,function(k,L){E[k]=k,I[k]=k,N[k]=L})}),e.forEach(y,function(T){var k=-1;e.forEach(T,function(L){var B=S(L);if(B.length){B=e.sortBy(B,function($){return N[$]});for(var A=(B.length-1)/2,z=Math.floor(A),P=Math.ceil(A);z<=P;++z){var K=B[z];I[L]===L&&k<N[K]&&!s(_,L,K)&&(I[K]=L,I[L]=E[L]=E[K],k=N[K])}}})}),{root:E,align:I}}function u(w,y,_,S,E){var I={},N=d(w,y,_,E),T=E?"borderLeft":"borderRight";function k(A,z){for(var P=N.nodes(),K=P.pop(),$={};K;)$[K]?A(K):($[K]=!0,P.push(K),P=P.concat(z(K))),K=P.pop()}function L(A){I[A]=N.inEdges(A).reduce(function(z,P){return Math.max(z,I[P.v]+N.edge(P))},0)}function B(A){var z=N.outEdges(A).reduce(function(K,$){return Math.min(K,I[$.w]-N.edge($))},Number.POSITIVE_INFINITY),P=w.node(A);z!==Number.POSITIVE_INFINITY&&P.borderType!==T&&(I[A]=Math.max(I[A],z))}return k(L,N.predecessors.bind(N)),k(B,N.successors.bind(N)),e.forEach(S,function(A){I[A]=I[_[A]]}),I}function d(w,y,_,S){var E=new t,I=w.graph(),N=b(I.nodesep,I.edgesep,S);return e.forEach(y,function(T){var k;e.forEach(T,function(L){var B=_[L];if(E.setNode(B),k){var A=_[k],z=E.edge(A,B);E.setEdge(A,B,Math.max(N(w,L,k),z||0))}k=L})}),E}function p(w,y){return e.minBy(e.values(y),function(_){var S=Number.NEGATIVE_INFINITY,E=Number.POSITIVE_INFINITY;return e.forIn(_,function(I,N){var T=m(w,N)/2;S=Math.max(I+T,S),E=Math.min(I-T,E)}),S-E})}function v(w,y){var _=e.values(y),S=e.min(_),E=e.max(_);e.forEach(["u","d"],function(I){e.forEach(["l","r"],function(N){var T=I+N,k=w[T],L;if(k!==y){var B=e.values(k);L=N==="l"?S-e.min(B):E-e.max(B),L&&(w[T]=e.mapValues(k,function(A){return A+L}))}})})}function h(w,y){return e.mapValues(w.ul,function(_,S){if(y)return w[y.toLowerCase()][S];var E=e.sortBy(e.map(w,S));return(E[1]+E[2])/2})}function x(w){var y=r.buildLayerMatrix(w),_=e.merge(n(w,y),i(w,y)),S={},E;e.forEach(["u","d"],function(N){E=N==="u"?y:e.values(y).reverse(),e.forEach(["l","r"],function(T){T==="r"&&(E=e.map(E,function(A){return e.values(A).reverse()}));var k=(N==="u"?w.predecessors:w.successors).bind(w),L=c(w,E,_,k),B=u(w,E,L.root,L.align,T==="r");T==="r"&&(B=e.mapValues(B,function(A){return-A})),S[N+T]=B})});var I=p(w,S);return v(S,I),h(S,w.graph().align)}function b(w,y,_){return function(S,E,I){var N=S.node(E),T=S.node(I),k=0,L;if(k+=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}if(L&&(k+=_?L:-L),L=0,k+=(N.dummy?y:w)/2,k+=(T.dummy?y:w)/2,k+=T.width/2,e.has(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":L=T.width/2;break;case"r":L=-T.width/2;break}return L&&(k+=_?L:-L),L=0,k}}function m(w,y){return w.node(y).width}return Ub}var Gb,GP;function UJ(){if(GP)return Gb;GP=1;var e=Nt(),t=Dr(),r=WJ().positionX;Gb=n;function n(o){o=t.asNonCompoundGraph(o),i(o),e.forEach(r(o),function(a,s){o.node(s).x=a})}function i(o){var a=t.buildLayerMatrix(o),s=o.graph().ranksep,c=0;e.forEach(a,function(u){var d=e.max(e.map(u,function(p){return o.node(p).height}));e.forEach(u,function(p){o.node(p).y=c+d/2}),c+=d+s})}return Gb}var Kb,KP;function GJ(){if(KP)return Kb;KP=1;var e=Nt(),t=RJ(),r=NJ(),n=PJ(),i=Dr().normalizeRanks,o=kJ(),a=Dr().removeEmptyRanks,s=MJ(),c=AJ(),u=DJ(),d=HJ(),p=UJ(),v=Dr(),h=Nn().Graph;Kb=x;function x(j,F){var G=F&&F.debugTiming?v.time:v.notime;G("layout",function(){var q=G(" buildLayoutGraph",function(){return k(j)});G(" runLayout",function(){b(q,G)}),G(" updateInputGraph",function(){m(j,q)})})}function b(j,F){F(" makeSpaceForEdgeLabels",function(){L(j)}),F(" removeSelfEdges",function(){Z(j)}),F(" acyclic",function(){t.run(j)}),F(" nestingGraph.run",function(){s.run(j)}),F(" rank",function(){n(v.asNonCompoundGraph(j))}),F(" injectEdgeLabelProxies",function(){B(j)}),F(" removeEmptyRanks",function(){a(j)}),F(" nestingGraph.cleanup",function(){s.cleanup(j)}),F(" normalizeRanks",function(){i(j)}),F(" assignRankMinMax",function(){A(j)}),F(" removeEdgeLabelProxies",function(){z(j)}),F(" normalize.run",function(){r.run(j)}),F(" parentDummyChains",function(){o(j)}),F(" addBorderSegments",function(){c(j)}),F(" order",function(){d(j)}),F(" insertSelfEdges",function(){D(j)}),F(" adjustCoordinateSystem",function(){u.adjust(j)}),F(" position",function(){p(j)}),F(" positionSelfEdges",function(){W(j)}),F(" removeBorderNodes",function(){U(j)}),F(" normalize.undo",function(){r.undo(j)}),F(" fixupEdgeLabelCoords",function(){$(j)}),F(" undoCoordinateSystem",function(){u.undo(j)}),F(" translateGraph",function(){P(j)}),F(" assignNodeIntersects",function(){K(j)}),F(" reversePoints",function(){Y(j)}),F(" acyclic.undo",function(){t.undo(j)})}function m(j,F){e.forEach(j.nodes(),function(G){var q=j.node(G),X=F.node(G);q&&(q.x=X.x,q.y=X.y,F.children(G).length&&(q.width=X.width,q.height=X.height))}),e.forEach(j.edges(),function(G){var q=j.edge(G),X=F.edge(G);q.points=X.points,e.has(X,"x")&&(q.x=X.x,q.y=X.y)}),j.graph().width=F.graph().width,j.graph().height=F.graph().height}var w=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],S=["width","height"],E={width:0,height:0},I=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function k(j){var F=new h({multigraph:!0,compound:!0}),G=ee(j.graph());return F.setGraph(e.merge({},y,Q(G,w),e.pick(G,_))),e.forEach(j.nodes(),function(q){var X=ee(j.node(q));F.setNode(q,e.defaults(Q(X,S),E)),F.setParent(q,j.parent(q))}),e.forEach(j.edges(),function(q){var X=ee(j.edge(q));F.setEdge(q,e.merge({},N,Q(X,I),e.pick(X,T)))}),F}function L(j){var F=j.graph();F.ranksep/=2,e.forEach(j.edges(),function(G){var q=j.edge(G);q.minlen*=2,q.labelpos.toLowerCase()!=="c"&&(F.rankdir==="TB"||F.rankdir==="BT"?q.width+=q.labeloffset:q.height+=q.labeloffset)})}function B(j){e.forEach(j.edges(),function(F){var G=j.edge(F);if(G.width&&G.height){var q=j.node(F.v),X=j.node(F.w),te={rank:(X.rank-q.rank)/2+q.rank,e:F};v.addDummyNode(j,"edge-proxy",te,"_ep")}})}function A(j){var F=0;e.forEach(j.nodes(),function(G){var q=j.node(G);q.borderTop&&(q.minRank=j.node(q.borderTop).rank,q.maxRank=j.node(q.borderBottom).rank,F=e.max(F,q.maxRank))}),j.graph().maxRank=F}function z(j){e.forEach(j.nodes(),function(F){var G=j.node(F);G.dummy==="edge-proxy"&&(j.edge(G.e).labelRank=G.rank,j.removeNode(F))})}function P(j){var F=Number.POSITIVE_INFINITY,G=0,q=Number.POSITIVE_INFINITY,X=0,te=j.graph(),ne=te.marginx||0,de=te.marginy||0;function re(ge){var ue=ge.x,xe=ge.y,le=ge.width,se=ge.height;F=Math.min(F,ue-le/2),G=Math.max(G,ue+le/2),q=Math.min(q,xe-se/2),X=Math.max(X,xe+se/2)}e.forEach(j.nodes(),function(ge){re(j.node(ge))}),e.forEach(j.edges(),function(ge){var ue=j.edge(ge);e.has(ue,"x")&&re(ue)}),F-=ne,q-=de,e.forEach(j.nodes(),function(ge){var ue=j.node(ge);ue.x-=F,ue.y-=q}),e.forEach(j.edges(),function(ge){var ue=j.edge(ge);e.forEach(ue.points,function(xe){xe.x-=F,xe.y-=q}),e.has(ue,"x")&&(ue.x-=F),e.has(ue,"y")&&(ue.y-=q)}),te.width=G-F+ne,te.height=X-q+de}function K(j){e.forEach(j.edges(),function(F){var G=j.edge(F),q=j.node(F.v),X=j.node(F.w),te,ne;G.points?(te=G.points[0],ne=G.points[G.points.length-1]):(G.points=[],te=X,ne=q),G.points.unshift(v.intersectRect(q,te)),G.points.push(v.intersectRect(X,ne))})}function $(j){e.forEach(j.edges(),function(F){var G=j.edge(F);if(e.has(G,"x"))switch((G.labelpos==="l"||G.labelpos==="r")&&(G.width-=G.labeloffset),G.labelpos){case"l":G.x-=G.width/2+G.labeloffset;break;case"r":G.x+=G.width/2+G.labeloffset;break}})}function Y(j){e.forEach(j.edges(),function(F){var G=j.edge(F);G.reversed&&G.points.reverse()})}function U(j){e.forEach(j.nodes(),function(F){if(j.children(F).length){var G=j.node(F),q=j.node(G.borderTop),X=j.node(G.borderBottom),te=j.node(e.last(G.borderLeft)),ne=j.node(e.last(G.borderRight));G.width=Math.abs(ne.x-te.x),G.height=Math.abs(X.y-q.y),G.x=te.x+G.width/2,G.y=q.y+G.height/2}}),e.forEach(j.nodes(),function(F){j.node(F).dummy==="border"&&j.removeNode(F)})}function Z(j){e.forEach(j.edges(),function(F){if(F.v===F.w){var G=j.node(F.v);G.selfEdges||(G.selfEdges=[]),G.selfEdges.push({e:F,label:j.edge(F)}),j.removeEdge(F)}})}function D(j){var F=v.buildLayerMatrix(j);e.forEach(F,function(G){var q=0;e.forEach(G,function(X,te){var ne=j.node(X);ne.order=te+q,e.forEach(ne.selfEdges,function(de){v.addDummyNode(j,"selfedge",{width:de.label.width,height:de.label.height,rank:ne.rank,order:te+ ++q,e:de.e,label:de.label},"_se")}),delete ne.selfEdges})})}function W(j){e.forEach(j.nodes(),function(F){var G=j.node(F);if(G.dummy==="selfedge"){var q=j.node(G.e.v),X=q.x+q.width/2,te=q.y,ne=G.x-X,de=q.height/2;j.setEdge(G.e,G.label),j.removeNode(F),G.label.points=[{x:X+2*ne/3,y:te-de},{x:X+5*ne/6,y:te-de},{x:X+ne,y:te},{x:X+5*ne/6,y:te+de},{x:X+2*ne/3,y:te+de}],G.label.x=G.x,G.label.y=G.y}})}function Q(j,F){return e.mapValues(e.pick(j,F),Number)}function ee(j){var F={};return e.forEach(j,function(G,q){F[q.toLowerCase()]=G}),F}return Kb}var Yb,YP;function KJ(){if(YP)return Yb;YP=1;var e=Nt(),t=Dr(),r=Nn().Graph;Yb={debugOrdering:n};function n(i){var o=t.buildLayerMatrix(i),a=new r({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(s){a.setNode(s,{label:s}),a.setParent(s,"layer"+i.node(s).rank)}),e.forEach(i.edges(),function(s){a.setEdge(s.v,s.w,{},s.name)}),e.forEach(o,function(s,c){var u="layer"+c;a.setNode(u,{rank:"same"}),e.reduce(s,function(d,p){return a.setEdge(d,p,{style:"invis"}),p})}),a}return Yb}var Xb,XP;function YJ(){return XP||(XP=1,Xb="0.8.5"),Xb}var Zb,ZP;function XJ(){return ZP||(ZP=1,Zb={graphlib:Nn(),layout:GJ(),debug:KJ(),util:{time:Dr().time,notime:Dr().notime},version:YJ()}),Zb}var ZJ=XJ();const JP=Li(ZJ);function JJ(e){let t;const r=new Set,n=(u,d)=>{const p=typeof u=="function"?u(t):u;if(p!==t){const v=t;t=d?p:Object.assign({},t,p),r.forEach(h=>h(t,v))}},i=()=>t,o=(u,d=i,p=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let v=d(t);function h(){const x=d(t);if(!p(v,x)){const b=v;u(v=x,b)}}return r.add(h),()=>r.delete(h)},c={setState:n,getState:i,subscribe:(u,d,p)=>d||p?o(u,d,p):(r.add(u),()=>r.delete(u)),destroy:()=>r.clear()};return t=e(n,i,c),c}const QJ=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),QP=QJ?C.useEffect:C.useLayoutEffect;function eQ(e){const t=typeof e=="function"?JJ(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=C.useReducer(m=>m+1,0),a=t.getState(),s=C.useRef(a),c=C.useRef(n),u=C.useRef(i),d=C.useRef(!1),p=C.useRef();p.current===void 0&&(p.current=n(a));let v,h=!1;(s.current!==a||c.current!==n||u.current!==i||d.current)&&(v=n(a),h=!i(p.current,v)),QP(()=>{h&&(p.current=v),s.current=a,c.current=n,u.current=i,d.current=!1});const x=C.useRef(a);QP(()=>{const m=()=>{try{const y=t.getState(),_=c.current(y);u.current(p.current,_)||(s.current=y,p.current=_,o())}catch{d.current=!0,o()}},w=t.subscribe(m);return t.getState()!==x.current&&m(),w},[]);const b=h?v:p.current;return C.useDebugValue(b),b};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 tQ(){const e=C.createContext(void 0);return{Provider:({initialStore:i,createStore:o,children:a})=>{const s=C.useRef();return s.current||(i&&(console.warn("Provider initialStore is deprecated and will be removed in the next version."),o||(o=()=>i)),s.current=o()),C.createElement(e.Provider,{value:s.current},a)},useStore:(i,o=Object.is)=>{const a=C.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=C.useContext(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return C.useMemo(()=>({getState:i.getState,setState:i.setState,subscribe:i.subscribe,destroy:i.destroy}),[i])}}}var rQ={value:()=>{}};function wd(){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 ou(r)}function ou(e){this._=e}function nQ(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}})}ou.prototype=wd.prototype={constructor:ou,on:function(e,t){var r=this._,n=nQ(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=iQ(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]=ek(r[i],e.name,t);else if(t==null)for(i in r)r[i]=ek(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 ou(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 iQ(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function ek(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=rQ,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var yw="http://www.w3.org/1999/xhtml";const tk={svg:"http://www.w3.org/2000/svg",xhtml:yw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _d(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),tk.hasOwnProperty(t)?{space:tk[t],local:e}:e}function oQ(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===yw&&t.documentElement.namespaceURI===yw?t.createElement(e):t.createElementNS(r,e)}}function aQ(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function i5(e){var t=_d(e);return(t.local?aQ:oQ)(t)}function sQ(){}function x_(e){return e==null?sQ:function(){return this.querySelector(e)}}function lQ(e){typeof e!="function"&&(e=x_(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,s=n[i]=new Array(a),c,u,d=0;d<a;++d)(c=o[d])&&(u=e.call(c,c.__data__,d,o))&&("__data__"in c&&(u.__data__=c.__data__),s[d]=u);return new Xr(n,this._parents)}function cQ(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function uQ(){return[]}function o5(e){return e==null?uQ:function(){return this.querySelectorAll(e)}}function dQ(e){return function(){return cQ(e.apply(this,arguments))}}function fQ(e){typeof e=="function"?e=dQ(e):e=o5(e);for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&(n.push(e.call(c,c.__data__,u,a)),i.push(c));return new Xr(n,i)}function a5(e){return function(){return this.matches(e)}}function s5(e){return function(t){return t.matches(e)}}var pQ=Array.prototype.find;function hQ(e){return function(){return pQ.call(this.children,e)}}function vQ(){return this.firstElementChild}function gQ(e){return this.select(e==null?vQ:hQ(typeof e=="function"?e:s5(e)))}var mQ=Array.prototype.filter;function bQ(){return Array.from(this.children)}function yQ(e){return function(){return mQ.call(this.children,e)}}function xQ(e){return this.selectAll(e==null?bQ:yQ(typeof e=="function"?e:s5(e)))}function wQ(e){typeof e!="function"&&(e=a5(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,s=n[i]=[],c,u=0;u<a;++u)(c=o[u])&&e.call(c,c.__data__,u,o)&&s.push(c);return new Xr(n,this._parents)}function l5(e){return new Array(e.length)}function _Q(){return new Xr(this._enter||this._groups.map(l5),this._parents)}function Pu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Pu.prototype={constructor:Pu,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 EQ(e){return function(){return e}}function SQ(e,t,r,n,i,o){for(var a=0,s,c=t.length,u=o.length;a<u;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new Pu(e,o[a]);for(;a<c;++a)(s=t[a])&&(i[a]=s)}function OQ(e,t,r,n,i,o,a){var s,c,u=new Map,d=t.length,p=o.length,v=new Array(d),h;for(s=0;s<d;++s)(c=t[s])&&(v[s]=h=a.call(c,c.__data__,s,t)+"",u.has(h)?i[s]=c:u.set(h,c));for(s=0;s<p;++s)h=a.call(e,o[s],s,o)+"",(c=u.get(h))?(n[s]=c,c.__data__=o[s],u.delete(h)):r[s]=new Pu(e,o[s]);for(s=0;s<d;++s)(c=t[s])&&u.get(v[s])===c&&(i[s]=c)}function CQ(e){return e.__data__}function IQ(e,t){if(!arguments.length)return Array.from(this,CQ);var r=t?OQ:SQ,n=this._parents,i=this._groups;typeof e!="function"&&(e=EQ(e));for(var o=i.length,a=new Array(o),s=new Array(o),c=new Array(o),u=0;u<o;++u){var d=n[u],p=i[u],v=p.length,h=RQ(e.call(d,d&&d.__data__,u,n)),x=h.length,b=s[u]=new Array(x),m=a[u]=new Array(x),w=c[u]=new Array(v);r(d,p,b,m,w,h,t);for(var y=0,_=0,S,E;y<x;++y)if(S=b[y]){for(y>=_&&(_=y+1);!(E=m[_])&&++_<x;);S._next=E||null}}return a=new Xr(a,n),a._enter=s,a._exit=c,a}function RQ(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function NQ(){return new Xr(this._exit||this._groups.map(l5),this._parents)}function TQ(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 PQ(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),s=new Array(i),c=0;c<a;++c)for(var u=r[c],d=n[c],p=u.length,v=s[c]=new Array(p),h,x=0;x<p;++x)(h=u[x]||d[x])&&(v[x]=h);for(;c<i;++c)s[c]=r[c];return new Xr(s,this._parents)}function kQ(){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 MQ(e){e||(e=AQ);function t(p,v){return p&&v?e(p.__data__,v.__data__):!p-!v}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,c=i[o]=new Array(s),u,d=0;d<s;++d)(u=a[d])&&(c[d]=u);c.sort(t)}return new Xr(i,this._parents).order()}function AQ(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function DQ(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function jQ(){return Array.from(this)}function qQ(){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 LQ(){let e=0;for(const t of this)++e;return e}function zQ(){return!this.node()}function BQ(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function FQ(e){return function(){this.removeAttribute(e)}}function $Q(e){return function(){this.removeAttributeNS(e.space,e.local)}}function VQ(e,t){return function(){this.setAttribute(e,t)}}function HQ(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function WQ(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function UQ(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 GQ(e,t){var r=_d(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?$Q:FQ:typeof t=="function"?r.local?UQ:WQ:r.local?HQ:VQ)(r,t))}function c5(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function KQ(e){return function(){this.style.removeProperty(e)}}function YQ(e,t,r){return function(){this.style.setProperty(e,t,r)}}function XQ(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function ZQ(e,t,r){return arguments.length>1?this.each((t==null?KQ:typeof t=="function"?XQ:YQ)(e,t,r??"")):da(this.node(),e)}function da(e,t){return e.style.getPropertyValue(t)||c5(e).getComputedStyle(e,null).getPropertyValue(t)}function JQ(e){return function(){delete this[e]}}function QQ(e,t){return function(){this[e]=t}}function eee(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function tee(e,t){return arguments.length>1?this.each((t==null?JQ:typeof t=="function"?eee:QQ)(e,t)):this.node()[e]}function u5(e){return e.trim().split(/^|\s+/)}function w_(e){return e.classList||new d5(e)}function d5(e){this._node=e,this._names=u5(e.getAttribute("class")||"")}d5.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 f5(e,t){for(var r=w_(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function p5(e,t){for(var r=w_(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function ree(e){return function(){f5(this,e)}}function nee(e){return function(){p5(this,e)}}function iee(e,t){return function(){(t.apply(this,arguments)?f5:p5)(this,e)}}function oee(e,t){var r=u5(e+"");if(arguments.length<2){for(var n=w_(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?iee:t?ree:nee)(r,t))}function aee(){this.textContent=""}function see(e){return function(){this.textContent=e}}function lee(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function cee(e){return arguments.length?this.each(e==null?aee:(typeof e=="function"?lee:see)(e)):this.node().textContent}function uee(){this.innerHTML=""}function dee(e){return function(){this.innerHTML=e}}function fee(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function pee(e){return arguments.length?this.each(e==null?uee:(typeof e=="function"?fee:dee)(e)):this.node().innerHTML}function hee(){this.nextSibling&&this.parentNode.appendChild(this)}function vee(){return this.each(hee)}function gee(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mee(){return this.each(gee)}function bee(e){var t=typeof e=="function"?e:i5(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function yee(){return null}function xee(e,t){var r=typeof e=="function"?e:i5(e),n=t==null?yee:typeof t=="function"?t:x_(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function wee(){var e=this.parentNode;e&&e.removeChild(this)}function _ee(){return this.each(wee)}function Eee(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function See(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Oee(e){return this.select(e?See:Eee)}function Cee(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Iee(e){return function(t){e.call(this,t,this.__data__)}}function Ree(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 Nee(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 Tee(e,t,r){return function(){var n=this.__on,i,o=Iee(t);if(n){for(var a=0,s=n.length;a<s;++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 Pee(e,t,r){var n=Ree(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,u=s.length,d;c<u;++c)for(i=0,d=s[c];i<o;++i)if((a=n[i]).type===d.type&&a.name===d.name)return d.value}return}for(s=t?Tee:Nee,i=0;i<o;++i)this.each(s(n[i],t,r));return this}function h5(e,t,r){var n=c5(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 kee(e,t){return function(){return h5(this,e,t)}}function Mee(e,t){return function(){return h5(this,e,t.apply(this,arguments))}}function Aee(e,t){return this.each((typeof t=="function"?Mee:kee)(e,t))}function*Dee(){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 v5=[null];function Xr(e,t){this._groups=e,this._parents=t}function al(){return new Xr([[document.documentElement]],v5)}function jee(){return this}Xr.prototype=al.prototype={constructor:Xr,select:lQ,selectAll:fQ,selectChild:gQ,selectChildren:xQ,filter:wQ,data:IQ,enter:_Q,exit:NQ,join:TQ,merge:PQ,selection:jee,order:kQ,sort:MQ,call:DQ,nodes:jQ,node:qQ,size:LQ,empty:zQ,each:BQ,attr:GQ,style:ZQ,property:tee,classed:oee,text:cee,html:pee,raise:vee,lower:mee,append:bee,insert:xee,remove:_ee,clone:Oee,datum:Cee,on:Pee,dispatch:Aee,[Symbol.iterator]:Dee};function En(e){return typeof e=="string"?new Xr([[document.querySelector(e)]],[document.documentElement]):new Xr([[e]],v5)}function qee(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Bn(e,t){if(e=qee(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 Lee={passive:!1},zs={capture:!0,passive:!1};function Jb(e){e.stopImmediatePropagation()}function Qo(e){e.preventDefault(),e.stopImmediatePropagation()}function g5(e){var t=e.document.documentElement,r=En(e).on("dragstart.drag",Qo,zs);"onselectstart"in t?r.on("selectstart.drag",Qo,zs):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function m5(e,t){var r=e.document.documentElement,n=En(e).on("dragstart.drag",null);t&&(n.on("click.drag",Qo,zs),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 Nc=e=>()=>e;function xw(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:o,x:a,y:s,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value: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:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}xw.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function zee(e){return!e.ctrlKey&&!e.button}function Bee(){return this.parentNode}function Fee(e,t){return t??{x:e.x,y:e.y}}function $ee(){return navigator.maxTouchPoints||"ontouchstart"in this}function Vee(){var e=zee,t=Bee,r=Fee,n=$ee,i={},o=wd("start","drag","end"),a=0,s,c,u,d,p=0;function v(S){S.on("mousedown.drag",h).filter(n).on("touchstart.drag",m).on("touchmove.drag",w,Lee).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(S,E){if(!(d||!e.call(this,S,E))){var I=_(this,t.call(this,S,E),S,E,"mouse");I&&(En(S.view).on("mousemove.drag",x,zs).on("mouseup.drag",b,zs),g5(S.view),Jb(S),u=!1,s=S.clientX,c=S.clientY,I("start",S))}}function x(S){if(Qo(S),!u){var E=S.clientX-s,I=S.clientY-c;u=E*E+I*I>p}i.mouse("drag",S)}function b(S){En(S.view).on("mousemove.drag mouseup.drag",null),m5(S.view,u),Qo(S),i.mouse("end",S)}function m(S,E){if(e.call(this,S,E)){var I=S.changedTouches,N=t.call(this,S,E),T=I.length,k,L;for(k=0;k<T;++k)(L=_(this,N,S,E,I[k].identifier,I[k]))&&(Jb(S),L("start",S,I[k]))}}function w(S){var E=S.changedTouches,I=E.length,N,T;for(N=0;N<I;++N)(T=i[E[N].identifier])&&(Qo(S),T("drag",S,E[N]))}function y(S){var E=S.changedTouches,I=E.length,N,T;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),N=0;N<I;++N)(T=i[E[N].identifier])&&(Jb(S),T("end",S,E[N]))}function _(S,E,I,N,T,k){var L=o.copy(),B=Bn(k||I,E),A,z,P;if((P=r.call(S,new xw("beforestart",{sourceEvent:I,target:v,identifier:T,active:a,x:B[0],y:B[1],dx:0,dy:0,dispatch:L}),N))!=null)return A=P.x-B[0]||0,z=P.y-B[1]||0,function K($,Y,U){var Z=B,D;switch($){case"start":i[T]=K,D=a++;break;case"end":delete i[T],--a;case"drag":B=Bn(U||Y,E),D=a;break}L.call($,S,new xw($,{sourceEvent:Y,subject:P,target:v,identifier:T,active:D,x:B[0]+A,y:B[1]+z,dx:B[0]-Z[0],dy:B[1]-Z[1],dispatch:L}),N)}}return v.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Nc(!!S),v):e},v.container=function(S){return arguments.length?(t=typeof S=="function"?S:Nc(S),v):t},v.subject=function(S){return arguments.length?(r=typeof S=="function"?S:Nc(S),v):r},v.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:Nc(!!S),v):n},v.on=function(){var S=o.on.apply(o,arguments);return S===o?v:S},v.clickDistance=function(S){return arguments.length?(p=(S=+S)*S,v):Math.sqrt(p)},v}function __(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function b5(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function sl(){}var Bs=.7,ku=1/Bs,ea="\\s*([+-]?\\d+)\\s*",Fs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Hee=/^#([0-9a-f]{3,8})$/,Wee=new RegExp(`^rgb\\(${ea},${ea},${ea}\\)$`),Uee=new RegExp(`^rgb\\(${Vn},${Vn},${Vn}\\)$`),Gee=new RegExp(`^rgba\\(${ea},${ea},${ea},${Fs}\\)$`),Kee=new RegExp(`^rgba\\(${Vn},${Vn},${Vn},${Fs}\\)$`),Yee=new RegExp(`^hsl\\(${Fs},${Vn},${Vn}\\)$`),Xee=new RegExp(`^hsla\\(${Fs},${Vn},${Vn},${Fs}\\)$`),rk={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};__(sl,$s,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nk,formatHex:nk,formatHex8:Zee,formatHsl:Jee,formatRgb:ik,toString:ik});function nk(){return this.rgb().formatHex()}function Zee(){return this.rgb().formatHex8()}function Jee(){return y5(this).formatHsl()}function ik(){return this.rgb().formatRgb()}function $s(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Hee.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?ok(t):r===3?new kr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Tc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Tc(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=Wee.exec(e))?new kr(t[1],t[2],t[3],1):(t=Uee.exec(e))?new kr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Gee.exec(e))?Tc(t[1],t[2],t[3],t[4]):(t=Kee.exec(e))?Tc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Yee.exec(e))?lk(t[1],t[2]/100,t[3]/100,1):(t=Xee.exec(e))?lk(t[1],t[2]/100,t[3]/100,t[4]):rk.hasOwnProperty(e)?ok(rk[e]):e==="transparent"?new kr(NaN,NaN,NaN,0):null}function ok(e){return new kr(e>>16&255,e>>8&255,e&255,1)}function Tc(e,t,r,n){return n<=0&&(e=t=r=NaN),new kr(e,t,r,n)}function Qee(e){return e instanceof sl||(e=$s(e)),e?(e=e.rgb(),new kr(e.r,e.g,e.b,e.opacity)):new kr}function ww(e,t,r,n){return arguments.length===1?Qee(e):new kr(e,t,r,n??1)}function kr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}__(kr,ww,b5(sl,{brighter(e){return e=e==null?ku:Math.pow(ku,e),new kr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Bs:Math.pow(Bs,e),new kr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new kr(oo(this.r),oo(this.g),oo(this.b),Mu(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:ak,formatHex:ak,formatHex8:ete,formatRgb:sk,toString:sk}));function ak(){return`#${to(this.r)}${to(this.g)}${to(this.b)}`}function ete(){return`#${to(this.r)}${to(this.g)}${to(this.b)}${to((isNaN(this.opacity)?1:this.opacity)*255)}`}function sk(){const e=Mu(this.opacity);return`${e===1?"rgb(":"rgba("}${oo(this.r)}, ${oo(this.g)}, ${oo(this.b)}${e===1?")":`, ${e})`}`}function Mu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function oo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function to(e){return e=oo(e),(e<16?"0":"")+e.toString(16)}function lk(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Sn(e,t,r,n)}function y5(e){if(e instanceof Sn)return new Sn(e.h,e.s,e.l,e.opacity);if(e instanceof sl||(e=$s(e)),!e)return new Sn;if(e instanceof Sn)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,s=o-i,c=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new Sn(a,s,c,e.opacity)}function tte(e,t,r,n){return arguments.length===1?y5(e):new Sn(e,t,r,n??1)}function Sn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}__(Sn,tte,b5(sl,{brighter(e){return e=e==null?ku:Math.pow(ku,e),new Sn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Bs:Math.pow(Bs,e),new Sn(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 kr(Qb(e>=240?e-240:e+120,i,n),Qb(e,i,n),Qb(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Sn(ck(this.h),Pc(this.s),Pc(this.l),Mu(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=Mu(this.opacity);return`${e===1?"hsl(":"hsla("}${ck(this.h)}, ${Pc(this.s)*100}%, ${Pc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function ck(e){return e=(e||0)%360,e<0?e+360:e}function Pc(e){return Math.max(0,Math.min(1,e||0))}function Qb(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 x5=e=>()=>e;function rte(e,t){return function(r){return e+r*t}}function nte(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 ite(e){return(e=+e)==1?w5:function(t,r){return r-t?nte(t,r,e):x5(isNaN(t)?r:t)}}function w5(e,t){var r=t-e;return r?rte(e,r):x5(isNaN(e)?t:e)}const uk=(function e(t){var r=ite(t);function n(i,o){var a=r((i=ww(i)).r,(o=ww(o)).r),s=r(i.g,o.g),c=r(i.b,o.b),u=w5(i.opacity,o.opacity);return function(d){return i.r=a(d),i.g=s(d),i.b=c(d),i.opacity=u(d),i+""}}return n.gamma=e,n})(1);function ki(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var _w=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ey=new RegExp(_w.source,"g");function ote(e){return function(){return e}}function ate(e){return function(t){return e(t)+""}}function ste(e,t){var r=_w.lastIndex=ey.lastIndex=0,n,i,o,a=-1,s=[],c=[];for(e=e+"",t=t+"";(n=_w.exec(e))&&(i=ey.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,c.push({i:a,x:ki(n,i)})),r=ey.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?ate(c[0].x):ote(t):(t=c.length,function(u){for(var d=0,p;d<t;++d)s[(p=c[d]).i]=p.x(u);return s.join("")})}var dk=180/Math.PI,Ew={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _5(e,t,r,n,i,o){var a,s,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*r+t*n)&&(r-=e*c,n-=t*c),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,c/=s),e*n<t*r&&(e=-e,t=-t,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*dk,skewX:Math.atan(c)*dk,scaleX:a,scaleY:s}}var kc;function lte(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ew:_5(t.a,t.b,t.c,t.d,t.e,t.f)}function cte(e){return e==null||(kc||(kc=document.createElementNS("http://www.w3.org/2000/svg","g")),kc.setAttribute("transform",e),!(e=kc.transform.baseVal.consolidate()))?Ew:(e=e.matrix,_5(e.a,e.b,e.c,e.d,e.e,e.f))}function E5(e,t,r,n){function i(u){return u.length?u.pop()+" ":""}function o(u,d,p,v,h,x){if(u!==p||d!==v){var b=h.push("translate(",null,t,null,r);x.push({i:b-4,x:ki(u,p)},{i:b-2,x:ki(d,v)})}else(p||v)&&h.push("translate("+p+t+v+r)}function a(u,d,p,v){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),v.push({i:p.push(i(p)+"rotate(",null,n)-2,x:ki(u,d)})):d&&p.push(i(p)+"rotate("+d+n)}function s(u,d,p,v){u!==d?v.push({i:p.push(i(p)+"skewX(",null,n)-2,x:ki(u,d)}):d&&p.push(i(p)+"skewX("+d+n)}function c(u,d,p,v,h,x){if(u!==p||d!==v){var b=h.push(i(h)+"scale(",null,",",null,")");x.push({i:b-4,x:ki(u,p)},{i:b-2,x:ki(d,v)})}else(p!==1||v!==1)&&h.push(i(h)+"scale("+p+","+v+")")}return function(u,d){var p=[],v=[];return u=e(u),d=e(d),o(u.translateX,u.translateY,d.translateX,d.translateY,p,v),a(u.rotate,d.rotate,p,v),s(u.skewX,d.skewX,p,v),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,p,v),u=d=null,function(h){for(var x=-1,b=v.length,m;++x<b;)p[(m=v[x]).i]=m.x(h);return p.join("")}}}var ute=E5(lte,"px, ","px)","deg)"),dte=E5(cte,", ",")",")"),fte=1e-12;function fk(e){return((e=Math.exp(e))+1/e)/2}function pte(e){return((e=Math.exp(e))-1/e)/2}function hte(e){return((e=Math.exp(2*e))-1)/(e+1)}const vte=(function e(t,r,n){function i(o,a){var s=o[0],c=o[1],u=o[2],d=a[0],p=a[1],v=a[2],h=d-s,x=p-c,b=h*h+x*x,m,w;if(b<fte)w=Math.log(v/u)/t,m=function(N){return[s+N*h,c+N*x,u*Math.exp(t*N*w)]};else{var y=Math.sqrt(b),_=(v*v-u*u+n*b)/(2*u*r*y),S=(v*v-u*u-n*b)/(2*v*r*y),E=Math.log(Math.sqrt(_*_+1)-_),I=Math.log(Math.sqrt(S*S+1)-S);w=(I-E)/t,m=function(N){var T=N*w,k=fk(E),L=u/(r*y)*(k*hte(t*T+E)-pte(E));return[s+L*h,c+L*x,u*k/fk(t*T+E)]}}return m.duration=w*1e3*t/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,c=s*s;return e(a,s,c)},i})(Math.SQRT2,2,4);var fa=0,ys=0,Xa=0,S5=1e3,Au,xs,Du=0,fo=0,Ed=0,Vs=typeof performance=="object"&&performance.now?performance:Date,O5=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function E_(){return fo||(O5(gte),fo=Vs.now()+Ed)}function gte(){fo=0}function ju(){this._call=this._time=this._next=null}ju.prototype=C5.prototype={constructor:ju,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?E_():+r)+(t==null?0:+t),!this._next&&xs!==this&&(xs?xs._next=this:Au=this,xs=this),this._call=e,this._time=r,Sw()},stop:function(){this._call&&(this._call=null,this._time=1/0,Sw())}};function C5(e,t,r){var n=new ju;return n.restart(e,t,r),n}function mte(){E_(),++fa;for(var e=Au,t;e;)(t=fo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--fa}function pk(){fo=(Du=Vs.now())+Ed,fa=ys=0;try{mte()}finally{fa=0,yte(),fo=0}}function bte(){var e=Vs.now(),t=e-Du;t>S5&&(Ed-=t,Du=e)}function yte(){for(var e,t=Au,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:Au=r);xs=e,Sw(n)}function Sw(e){if(!fa){ys&&(ys=clearTimeout(ys));var t=e-fo;t>24?(e<1/0&&(ys=setTimeout(pk,e-Vs.now()-Ed)),Xa&&(Xa=clearInterval(Xa))):(Xa||(Du=Vs.now(),Xa=setInterval(bte,S5)),fa=1,O5(pk))}}function hk(e,t,r){var n=new ju;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var xte=wd("start","end","cancel","interrupt"),wte=[],I5=0,vk=1,Ow=2,au=3,gk=4,Cw=5,su=6;function Sd(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;_te(e,r,{name:t,index:n,group:i,on:xte,tween:wte,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:I5})}function S_(e,t){var r=Pn(e,t);if(r.state>I5)throw new Error("too late; already scheduled");return r}function Gn(e,t){var r=Pn(e,t);if(r.state>au)throw new Error("too late; already running");return r}function Pn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function _te(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=C5(o,0,r.time);function o(u){r.state=vk,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var d,p,v,h;if(r.state!==vk)return c();for(d in n)if(h=n[d],h.name===r.name){if(h.state===au)return hk(a);h.state===gk?(h.state=su,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete n[d]):+d<t&&(h.state=su,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete n[d])}if(hk(function(){r.state===au&&(r.state=gk,r.timer.restart(s,r.delay,r.time),s(u))}),r.state=Ow,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Ow){for(r.state=au,i=new Array(v=r.tween.length),d=0,p=-1;d<v;++d)(h=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(i[++p]=h);i.length=p+1}}function s(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(c),r.state=Cw,1),p=-1,v=i.length;++p<v;)i[p].call(e,d);r.state===Cw&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=su,r.timer.stop(),delete n[t];for(var u in n)return;delete e.__transition}}function lu(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>Ow&&n.state<Cw,n.state=su,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function Ete(e){return this.each(function(){lu(this,e)})}function Ste(e,t){var r,n;return function(){var i=Gn(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function Ote(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=Gn(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},c=0,u=i.length;c<u;++c)if(i[c].name===t){i[c]=s;break}c===u&&i.push(s)}o.tween=i}}function Cte(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Pn(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?Ste:Ote)(r,e,t))}function O_(e,t,r){var n=e._id;return e.each(function(){var i=Gn(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Pn(i,n).value[t]}}function R5(e,t){var r;return(typeof t=="number"?ki:t instanceof $s?uk:(r=$s(t))?(t=r,uk):ste)(e,t)}function Ite(e){return function(){this.removeAttribute(e)}}function Rte(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Nte(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 Tte(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 Pte(e,t,r){var n,i,o;return function(){var a,s=r(this),c;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=s+"",a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,s)))}}function kte(e,t,r){var n,i,o;return function(){var a,s=r(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=s+"",a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,s)))}}function Mte(e,t){var r=_d(e),n=r==="transform"?dte:R5;return this.attrTween(e,typeof t=="function"?(r.local?kte:Pte)(r,n,O_(this,"attr."+e,t)):t==null?(r.local?Rte:Ite)(r):(r.local?Tte:Nte)(r,n,t))}function Ate(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Dte(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function jte(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Dte(e,o)),r}return i._value=t,i}function qte(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Ate(e,o)),r}return i._value=t,i}function Lte(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=_d(e);return this.tween(r,(n.local?jte:qte)(n,t))}function zte(e,t){return function(){S_(this,e).delay=+t.apply(this,arguments)}}function Bte(e,t){return t=+t,function(){S_(this,e).delay=t}}function Fte(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?zte:Bte)(t,e)):Pn(this.node(),t).delay}function $te(e,t){return function(){Gn(this,e).duration=+t.apply(this,arguments)}}function Vte(e,t){return t=+t,function(){Gn(this,e).duration=t}}function Hte(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?$te:Vte)(t,e)):Pn(this.node(),t).duration}function Wte(e,t){if(typeof t!="function")throw new Error;return function(){Gn(this,e).ease=t}}function Ute(e){var t=this._id;return arguments.length?this.each(Wte(t,e)):Pn(this.node(),t).ease}function Gte(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Gn(this,e).ease=r}}function Kte(e){if(typeof e!="function")throw new Error;return this.each(Gte(this._id,e))}function Yte(e){typeof e!="function"&&(e=a5(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,s=n[i]=[],c,u=0;u<a;++u)(c=o[u])&&e.call(c,c.__data__,u,o)&&s.push(c);return new di(n,this._parents,this._name,this._id)}function Xte(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),s=0;s<o;++s)for(var c=t[s],u=r[s],d=c.length,p=a[s]=new Array(d),v,h=0;h<d;++h)(v=c[h]||u[h])&&(p[h]=v);for(;s<n;++s)a[s]=t[s];return new di(a,this._parents,this._name,this._id)}function Zte(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 Jte(e,t,r){var n,i,o=Zte(t)?S_:Gn;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function Qte(e,t){var r=this._id;return arguments.length<2?Pn(this.node(),r).on.on(e):this.each(Jte(r,e,t))}function ere(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function tre(){return this.on("end.remove",ere(this._id))}function rre(e){var t=this._name,r=this._id;typeof e!="function"&&(e=x_(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s=n[a],c=s.length,u=o[a]=new Array(c),d,p,v=0;v<c;++v)(d=s[v])&&(p=e.call(d,d.__data__,v,s))&&("__data__"in d&&(p.__data__=d.__data__),u[v]=p,Sd(u[v],t,r,v,u,Pn(d,r)));return new di(o,this._parents,t,r)}function nre(e){var t=this._name,r=this._id;typeof e!="function"&&(e=o5(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var c=n[s],u=c.length,d,p=0;p<u;++p)if(d=c[p]){for(var v=e.call(d,d.__data__,p,c),h,x=Pn(d,r),b=0,m=v.length;b<m;++b)(h=v[b])&&Sd(h,t,r,b,v,x);o.push(v),a.push(d)}return new di(o,a,t,r)}var ire=al.prototype.constructor;function ore(){return new ire(this._groups,this._parents)}function are(e,t){var r,n,i;return function(){var o=da(this,e),a=(this.style.removeProperty(e),da(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function N5(e){return function(){this.style.removeProperty(e)}}function sre(e,t,r){var n,i=r+"",o;return function(){var a=da(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function lre(e,t,r){var n,i,o;return function(){var a=da(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),da(this,e))),a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,s))}}function cre(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var c=Gn(this,e),u=c.on,d=c.value[o]==null?s||(s=N5(t)):void 0;(u!==r||i!==d)&&(n=(r=u).copy()).on(a,i=d),c.on=n}}function ure(e,t,r){var n=(e+="")=="transform"?ute:R5;return t==null?this.styleTween(e,are(e,n)).on("end.style."+e,N5(e)):typeof t=="function"?this.styleTween(e,lre(e,n,O_(this,"style."+e,t))).each(cre(this._id,e)):this.styleTween(e,sre(e,n,t),r).on("end.style."+e,null)}function dre(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function fre(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&dre(e,a,r)),n}return o._value=t,o}function pre(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,fre(e,t,r??""))}function hre(e){return function(){this.textContent=e}}function vre(e){return function(){var t=e(this);this.textContent=t??""}}function gre(e){return this.tween("text",typeof e=="function"?vre(O_(this,"text",e)):hre(e==null?"":e+""))}function mre(e){return function(t){this.textContent=e.call(this,t)}}function bre(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&mre(i)),t}return n._value=e,n}function yre(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,bre(e))}function xre(){for(var e=this._name,t=this._id,r=T5(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,c,u=0;u<s;++u)if(c=a[u]){var d=Pn(c,t);Sd(c,e,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new di(n,this._parents,e,r)}function wre(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},c={value:function(){--i===0&&o()}};r.each(function(){var u=Gn(this,n),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),u.on=t}),i===0&&o()})}var _re=0;function di(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function T5(){return++_re}var oi=al.prototype;di.prototype={constructor:di,select:rre,selectAll:nre,selectChild:oi.selectChild,selectChildren:oi.selectChildren,filter:Yte,merge:Xte,selection:ore,transition:xre,call:oi.call,nodes:oi.nodes,node:oi.node,size:oi.size,empty:oi.empty,each:oi.each,on:Qte,attr:Mte,attrTween:Lte,style:ure,styleTween:pre,text:gre,textTween:yre,remove:tre,tween:Cte,delay:Fte,duration:Hte,ease:Ute,easeVarying:Kte,end:wre,[Symbol.iterator]:oi[Symbol.iterator]};function Ere(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Sre={time:null,delay:0,duration:250,ease:Ere};function Ore(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 Cre(e){var t,r;e instanceof di?(t=e._id,e=e._name):(t=T5(),(r=Sre).time=E_(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&Sd(c,e,t,u,a,r||Ore(c,t));return new di(n,this._parents,e,t)}al.prototype.interrupt=Ete;al.prototype.transition=Cre;const Mc=e=>()=>e;function Ire(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 li(e,t,r){this.k=e,this.x=t,this.y=r}li.prototype={constructor:li,scale:function(e){return e===1?this:new li(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new li(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 ao=new li(1,0,0);li.prototype;function ty(e){e.stopImmediatePropagation()}function Za(e){e.preventDefault(),e.stopImmediatePropagation()}function Rre(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Nre(){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 mk(){return this.__zoom||ao}function Tre(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Pre(){return navigator.maxTouchPoints||"ontouchstart"in this}function kre(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 Mre(){var e=Rre,t=Nre,r=kre,n=Tre,i=Pre,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=vte,u=wd("start","zoom","end"),d,p,v,h=500,x=150,b=0,m=10;function w(P){P.property("__zoom",mk).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",L).filter(i).on("touchstart.zoom",B).on("touchmove.zoom",A).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(P,K,$,Y){var U=P.selection?P.selection():P;U.property("__zoom",mk),P!==U?E(P,K,$,Y):U.interrupt().each(function(){I(this,arguments).event(Y).start().zoom(null,typeof K=="function"?K.apply(this,arguments):K).end()})},w.scaleBy=function(P,K,$,Y){w.scaleTo(P,function(){var U=this.__zoom.k,Z=typeof K=="function"?K.apply(this,arguments):K;return U*Z},$,Y)},w.scaleTo=function(P,K,$,Y){w.transform(P,function(){var U=t.apply(this,arguments),Z=this.__zoom,D=$==null?S(U):typeof $=="function"?$.apply(this,arguments):$,W=Z.invert(D),Q=typeof K=="function"?K.apply(this,arguments):K;return r(_(y(Z,Q),D,W),U,a)},$,Y)},w.translateBy=function(P,K,$,Y){w.transform(P,function(){return r(this.__zoom.translate(typeof K=="function"?K.apply(this,arguments):K,typeof $=="function"?$.apply(this,arguments):$),t.apply(this,arguments),a)},null,Y)},w.translateTo=function(P,K,$,Y,U){w.transform(P,function(){var Z=t.apply(this,arguments),D=this.__zoom,W=Y==null?S(Z):typeof Y=="function"?Y.apply(this,arguments):Y;return r(ao.translate(W[0],W[1]).scale(D.k).translate(typeof K=="function"?-K.apply(this,arguments):-K,typeof $=="function"?-$.apply(this,arguments):-$),Z,a)},Y,U)};function y(P,K){return K=Math.max(o[0],Math.min(o[1],K)),K===P.k?P:new li(K,P.x,P.y)}function _(P,K,$){var Y=K[0]-$[0]*P.k,U=K[1]-$[1]*P.k;return Y===P.x&&U===P.y?P:new li(P.k,Y,U)}function S(P){return[(+P[0][0]+ +P[1][0])/2,(+P[0][1]+ +P[1][1])/2]}function E(P,K,$,Y){P.on("start.zoom",function(){I(this,arguments).event(Y).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).event(Y).end()}).tween("zoom",function(){var U=this,Z=arguments,D=I(U,Z).event(Y),W=t.apply(U,Z),Q=$==null?S(W):typeof $=="function"?$.apply(U,Z):$,ee=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),j=U.__zoom,F=typeof K=="function"?K.apply(U,Z):K,G=c(j.invert(Q).concat(ee/j.k),F.invert(Q).concat(ee/F.k));return function(q){if(q===1)q=F;else{var X=G(q),te=ee/X[2];q=new li(te,Q[0]-X[0]*te,Q[1]-X[1]*te)}D.zoom(null,q)}})}function I(P,K,$){return!$&&P.__zooming||new N(P,K)}function N(P,K){this.that=P,this.args=K,this.active=0,this.sourceEvent=null,this.extent=t.apply(P,K),this.taps=0}N.prototype={event:function(P){return P&&(this.sourceEvent=P),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(P,K){return this.mouse&&P!=="mouse"&&(this.mouse[1]=K.invert(this.mouse[0])),this.touch0&&P!=="touch"&&(this.touch0[1]=K.invert(this.touch0[0])),this.touch1&&P!=="touch"&&(this.touch1[1]=K.invert(this.touch1[0])),this.that.__zoom=K,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(P){var K=En(this.that).datum();u.call(P,this.that,new Ire(P,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:u}),K)}};function T(P,...K){if(!e.apply(this,arguments))return;var $=I(this,K).event(P),Y=this.__zoom,U=Math.max(o[0],Math.min(o[1],Y.k*Math.pow(2,n.apply(this,arguments)))),Z=Bn(P);if($.wheel)($.mouse[0][0]!==Z[0]||$.mouse[0][1]!==Z[1])&&($.mouse[1]=Y.invert($.mouse[0]=Z)),clearTimeout($.wheel);else{if(Y.k===U)return;$.mouse=[Z,Y.invert(Z)],lu(this),$.start()}Za(P),$.wheel=setTimeout(D,x),$.zoom("mouse",r(_(y(Y,U),$.mouse[0],$.mouse[1]),$.extent,a));function D(){$.wheel=null,$.end()}}function k(P,...K){if(v||!e.apply(this,arguments))return;var $=P.currentTarget,Y=I(this,K,!0).event(P),U=En(P.view).on("mousemove.zoom",Q,!0).on("mouseup.zoom",ee,!0),Z=Bn(P,$),D=P.clientX,W=P.clientY;g5(P.view),ty(P),Y.mouse=[Z,this.__zoom.invert(Z)],lu(this),Y.start();function Q(j){if(Za(j),!Y.moved){var F=j.clientX-D,G=j.clientY-W;Y.moved=F*F+G*G>b}Y.event(j).zoom("mouse",r(_(Y.that.__zoom,Y.mouse[0]=Bn(j,$),Y.mouse[1]),Y.extent,a))}function ee(j){U.on("mousemove.zoom mouseup.zoom",null),m5(j.view,Y.moved),Za(j),Y.event(j).end()}}function L(P,...K){if(e.apply(this,arguments)){var $=this.__zoom,Y=Bn(P.changedTouches?P.changedTouches[0]:P,this),U=$.invert(Y),Z=$.k*(P.shiftKey?.5:2),D=r(_(y($,Z),Y,U),t.apply(this,K),a);Za(P),s>0?En(this).transition().duration(s).call(E,D,Y,P):En(this).call(w.transform,D,Y,P)}}function B(P,...K){if(e.apply(this,arguments)){var $=P.touches,Y=$.length,U=I(this,K,P.changedTouches.length===Y).event(P),Z,D,W,Q;for(ty(P),D=0;D<Y;++D)W=$[D],Q=Bn(W,this),Q=[Q,this.__zoom.invert(Q),W.identifier],U.touch0?!U.touch1&&U.touch0[2]!==Q[2]&&(U.touch1=Q,U.taps=0):(U.touch0=Q,Z=!0,U.taps=1+!!d);d&&(d=clearTimeout(d)),Z&&(U.taps<2&&(p=Q[0],d=setTimeout(function(){d=null},h)),lu(this),U.start())}}function A(P,...K){if(this.__zooming){var $=I(this,K).event(P),Y=P.changedTouches,U=Y.length,Z,D,W,Q;for(Za(P),Z=0;Z<U;++Z)D=Y[Z],W=Bn(D,this),$.touch0&&$.touch0[2]===D.identifier?$.touch0[0]=W:$.touch1&&$.touch1[2]===D.identifier&&($.touch1[0]=W);if(D=$.that.__zoom,$.touch1){var ee=$.touch0[0],j=$.touch0[1],F=$.touch1[0],G=$.touch1[1],q=(q=F[0]-ee[0])*q+(q=F[1]-ee[1])*q,X=(X=G[0]-j[0])*X+(X=G[1]-j[1])*X;D=y(D,Math.sqrt(q/X)),W=[(ee[0]+F[0])/2,(ee[1]+F[1])/2],Q=[(j[0]+G[0])/2,(j[1]+G[1])/2]}else if($.touch0)W=$.touch0[0],Q=$.touch0[1];else return;$.zoom("touch",r(_(D,W,Q),$.extent,a))}}function z(P,...K){if(this.__zooming){var $=I(this,K).event(P),Y=P.changedTouches,U=Y.length,Z,D;for(ty(P),v&&clearTimeout(v),v=setTimeout(function(){v=null},h),Z=0;Z<U;++Z)D=Y[Z],$.touch0&&$.touch0[2]===D.identifier?delete $.touch0:$.touch1&&$.touch1[2]===D.identifier&&delete $.touch1;if($.touch1&&!$.touch0&&($.touch0=$.touch1,delete $.touch1),$.touch0)$.touch0[1]=this.__zoom.invert($.touch0[0]);else if($.end(),$.taps===2&&(D=Bn(D,this),Math.hypot(p[0]-D[0],p[1]-D[1])<m)){var W=En(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return w.wheelDelta=function(P){return arguments.length?(n=typeof P=="function"?P:Mc(+P),w):n},w.filter=function(P){return arguments.length?(e=typeof P=="function"?P:Mc(!!P),w):e},w.touchable=function(P){return arguments.length?(i=typeof P=="function"?P:Mc(!!P),w):i},w.extent=function(P){return arguments.length?(t=typeof P=="function"?P:Mc([[+P[0][0],+P[0][1]],[+P[1][0],+P[1][1]]]),w):t},w.scaleExtent=function(P){return arguments.length?(o[0]=+P[0],o[1]=+P[1],w):[o[0],o[1]]},w.translateExtent=function(P){return arguments.length?(a[0][0]=+P[0][0],a[1][0]=+P[1][0],a[0][1]=+P[0][1],a[1][1]=+P[1][1],w):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},w.constrain=function(P){return arguments.length?(r=P,w):r},w.duration=function(P){return arguments.length?(s=+P,w):s},w.interpolate=function(P){return arguments.length?(c=P,w):c},w.on=function(){var P=u.on.apply(u,arguments);return P===u?w:P},w.clickDistance=function(P){return arguments.length?(b=(P=+P)*P,w):Math.sqrt(b)},w.tapDistance=function(P){return arguments.length?(m=+P,w):m},w}function Qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Iw(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 P5(e,t){if(e){if(typeof e=="string")return Iw(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 Iw(e,t)}}function Are(e){if(Array.isArray(e))return e}function Dre(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,s;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,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function jre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
55
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ge(e,t){return Are(e)||Dre(e,t)||P5(e,t)||jre()}var pa;(function(e){e.Strict="strict",e.Loose="loose"})(pa||(pa={}));var po;(function(e){e.Lines="lines",e.Dots="dots"})(po||(po={}));var ta;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ta||(ta={}));var Ai;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Ai||(Ai={}));var qu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(qu||(qu={}));var Se;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Se||(Se={}));var C_=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},ra=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)},k5=function(t,r){return{x:ra(t.x,r[0][0],r[1][0]),y:ra(t.y,r[0][1],r[1][1])}},M5=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)},qre=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)}},Lu=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}},Lre=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}},A5=function(t){return!isNaN(t)&&isFinite(t)},or=Symbol("internals");function bk(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 ws(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bk(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yk(e,t){var r=e.find(function(u){return u.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=ws({},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 s=Math.abs(t.position.x);r.position.x=r.position.x-s,r.style.width+=s,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 D5(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(ws(ws({},i),{},{selected:o.selected})),n;case"position":{var a=ws({},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&&yk(n,a),n.push(a),n}case"dimensions":{var s=ws({},i);return typeof o.dimensions<"u"&&(s.width=o.dimensions.width,s.height=o.dimensions.height),s.expandParent&&yk(n,s),n.push(s),n}case"remove":return n}return n.push(i),n},r)}function j5(e,t){return D5(e,t)}function zre(e,t){return D5(e,t)}var Mi=function(t,r){return{id:t,type:"select",selected:r}};function Xo(e,t){return e.reduce(function(r,n){var i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(Mi(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Mi(n.id,!1))),r},[])}function xk(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 q5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xk(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var wk=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(s){var c=s.getBoundingClientRect();return q5({id:s.getAttribute("data-handleid"),position:s.getAttribute("data-handlepos"),x:(c.left-a.left)/n,y:(c.top-a.top)/n},C_(s))})};function Ja(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,q5({},i))}}function L5(e){var t=e.id,r=e.store,n=r.getState(),i=n.addSelectedNodes,o=n.unselectNodesAndEdges,a=n.multiSelectionActive,s=n.nodeInternals,c=s.get(t);r.setState({nodesSelectionActive:!1}),c.selected?c.selected&&a&&o({nodes:[c]}):i([t])}function _k(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 Ns(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_k(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_k(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Bre=function(t){return"id"in t&&"source"in t&&"target"in t},Fre=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||"")},Rw=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("&"))},$re=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)})},Vre=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 Bre(t)?n=Ns({},t):n=Ns(Ns({},t),{},{id:Fre(t)}),$re(n,r)?r:r.concat(n)},z5=function(t,r,n,i){var o=t.x,a=t.y,s=Ge(r,3),c=s[0],u=s[1],d=s[2],p=Ge(i,2),v=p[0],h=p[1],x={x:(o-c)/d,y:(a-u)/d};return n?{x:v*Math.round(x.x/v),y:h*Math.round(x.y/h)}:x},I_=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,s=i.width,c=i.height;return qre(n,Lu({x:o?o.x:a.x,y:o?o.y:a.y,width:s||0,height:c||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Lre(r)},B5=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],i=Ge(n,3),o=i[0],a=i[1],s=i[2],c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,d=Lu({x:(r.x-o)/s,y:(r.y-a)/s,width:r.width/s,height:r.height/s}),p=[];return t.forEach(function(v){var h=v.positionAbsolute,x=v.width,b=v.height,m=v.selectable,w=m===void 0?!0:m;if(u&&!w)return!1;var y=Lu(Ns(Ns({},h),{},{width:x||0,height:b||0})),_=Math.max(0,Math.min(d.x2,y.x2)-Math.max(d.x,y.x)),S=Math.max(0,Math.min(d.y2,y.y2)-Math.max(d.y,y.y)),E=Math.ceil(_*S),I=typeof x>"u"||typeof b>"u"||x===null||b===null,N=c&&E>0,T=(x||0)*(b||0),k=I||N||E>=T;k&&p.push(v)}),p},F5=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)})},$5=function(t,r,n,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:.1,s=r/(t.width*(1+a)),c=n/(t.height*(1+a)),u=Math.min(s,c),d=ra(u,i,o),p=t.x+t.width/2,v=t.y+t.height/2,h=r/2-p*d,x=n/2-v*d;return[h,x,d]},eo=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};function Ek(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 Zo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ek(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ek(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function V5(e,t,r,n){var i,o,a,s,c,u,d,p,v,h,x,b;if(!e.parentNode)return n;var m=t.get(e.parentNode);return V5(m,t,r,{x:((i=n.x)!==null&&i!==void 0?i:0)+((o=(a=m.position)===null||a===void 0?void 0:a.x)!==null&&o!==void 0?o:0),y:((s=n.y)!==null&&s!==void 0?s:0)+((c=(u=m.position)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0),z:((d=(p=m[or])===null||p===void 0?void 0:p.z)!==null&&d!==void 0?d:0)>((v=n.z)!==null&&v!==void 0?v:0)?(h=(x=m[or])===null||x===void 0?void 0:x.z)!==null&&h!==void 0?h:0:(b=n.z)!==null&&b!==void 0?b:0})}function ry(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=A5(i.zIndex)?i.zIndex:i.selected?1e3:0,s=t.get(i.id),c=Zo(Zo({width:s==null?void 0:s.width,height:s==null?void 0:s.height},i),{},{positionAbsolute:{x:i.position.x,y:i.position.y}});i.parentNode&&(c.parentNode=i.parentNode,n[i.parentNode]=!0),Object.defineProperty(c,or,{enumerable:!1,value:{handleBounds:s==null||(o=s[or])===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,s=V5(i,r,n,Zo(Zo({},i.position),{},{z:(o=(a=i[or])===null||a===void 0?void 0:a.z)!==null&&o!==void 0?o:0})),c=s.x,u=s.y,d=s.z;i.positionAbsolute={x:c,y:u},i[or].z=d,n[i.id]&&(i[or].isParent=!0)}}),r}function H5(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,s=r.maxZoom,c=r.d3Zoom,u=r.d3Selection,d=r.fitViewOnInitDone,p=r.fitViewOnInit;if((t.initial&&!d&&p||!t.initial)&&c&&u){var v=Array.from(n.values()).filter(function(T){return t.includeHiddenNodes?T.width&&T.height:!T.hidden}),h=v.every(function(T){return T.width&&T.height});if(v.length>0&&h){var x,b,m,w=I_(v),y=$5(w,i,o,(x=t.minZoom)!==null&&x!==void 0?x:a,(b=t.maxZoom)!==null&&b!==void 0?b:s,(m=t.padding)!==null&&m!==void 0?m:.1),_=Ge(y,3),S=_[0],E=_[1],I=_[2],N=ao.translate(S,E).scale(I);return typeof t.duration=="number"&&t.duration>0?c.transform(eo(u,t.duration),N):c.transform(u,N),!0}}return!1}function Hre(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,Zo(Zo({},n),{},(i={},Qe(i,or,n[or]),Qe(i,"selected",r.selected),i)))}}),new Map(t)}function Wre(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 Ac(e){var t=e.changedNodes,r=e.changedEdges,n=e.get,i=e.set,o=n(),a=o.nodeInternals,s=o.edges,c=o.onNodesChange,u=o.onEdgesChange,d=o.hasDefaultNodes,p=o.hasDefaultEdges;t!=null&&t.length&&(d&&i({nodeInternals:Hre(t,a)}),c==null||c(t)),r!=null&&r.length&&(p&&i({edges:Wre(r,s)}),u==null||u(r))}var Nw=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Sk={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:Nw,nodeExtent:Nw,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:pa.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 Ok(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 qn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ok(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ok(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var R_=tQ(),Ure=R_.Provider,zt=R_.useStore,Sr=R_.useStoreApi,Gre=function(){return eQ(function(t,r){return qn(qn({},Sk),{},{setNodes:function(i){t({nodeInternals:ry(i,r().nodeInternals)})},setEdges:function(i){var o=r(),a=o.defaultEdgeOptions,s=a===void 0?{}:a;t({edges:i.map(function(c){return qn(qn({},s),c)})})},setDefaultNodesAndEdges:function(i,o){var a=typeof i<"u",s=typeof o<"u",c=a?ry(i,new Map):new Map,u=s?o:[];t({nodeInternals:c,edges:u,hasDefaultNodes:a,hasDefaultEdges:s})},updateNodeDimensions:function(i){var o=r(),a=o.onNodesChange,s=o.nodeInternals,c=o.fitViewOnInit,u=o.fitViewOnInitDone,d=o.fitViewOnInitOptions,p=o.domNode,v=p==null?void 0:p.querySelector(".react-flow__viewport");if(v){var h=window.getComputedStyle(v),x=new window.DOMMatrixReadOnly(h.transform),b=x.m22,m=i.reduce(function(y,_){var S=s.get(_.id);if(S){var E=C_(_.nodeElement),I=!!(E.width&&E.height&&(S.width!==E.width||S.height!==E.height||_.forceUpdate));I&&(s.set(S.id,qn(qn({},S),{},Qe({},or,qn(qn({},S[or]),{},{handleBounds:{source:wk(".source",_.nodeElement,b),target:wk(".target",_.nodeElement,b)}})),E)),y.push({id:S.id,type:"dimensions",dimensions:E}))}return y},[]),w=u||c&&!u&&H5(r,qn({initial:!0},d));t({nodeInternals:new Map(s),fitViewOnInitDone:w}),(m==null?void 0:m.length)>0&&(a==null||a(m))}},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,s=r(),c=s.onNodesChange,u=s.nodeInternals,d=s.hasDefaultNodes;if(d||c){var p=i.map(function(x){var b={id:x.id,type:"position",dragging:a};return o&&(b.positionAbsolute=x.positionAbsolute,b.position=x.position),b});if(p!=null&&p.length){if(d){var v=j5(p,Array.from(u.values())),h=ry(v,u);t({nodeInternals:h})}c==null||c(p)}}},addSelectedNodes:function(i){var o=r(),a=o.multiSelectionActive,s=o.nodeInternals,c=o.edges,u,d=null;a?u=i.map(function(p){return Mi(p,!0)}):(u=Xo(Array.from(s.values()),i),d=Xo(c,[])),Ac({changedNodes:u,changedEdges:d,get:r,set:t})},addSelectedEdges:function(i){var o=r(),a=o.multiSelectionActive,s=o.edges,c=o.nodeInternals,u,d=null;a?u=i.map(function(p){return Mi(p,!0)}):(u=Xo(s,i),d=Xo(Array.from(c.values()),[])),Ac({changedNodes:d,changedEdges:u,get:r,set:t})},unselectNodesAndEdges:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.nodes,a=i.edges,s=r(),c=s.nodeInternals,u=s.edges,d=o||Array.from(c.values()),p=a||u,v=d.map(function(x){return x.selected=!1,Mi(x.id,!1)}),h=p.map(function(x){return Mi(x.id,!1)});Ac({changedNodes:v,changedEdges:h,get:r,set:t})},setMinZoom:function(i){var o=r(),a=o.d3Zoom,s=o.maxZoom;a==null||a.scaleExtent([i,s]),t({minZoom:i})},setMaxZoom:function(i){var o=r(),a=o.d3Zoom,s=o.minZoom;a==null||a.scaleExtent([s,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,s=Array.from(o.values()),c=s.filter(function(d){return d.selected}).map(function(d){return Mi(d.id,!1)}),u=a.filter(function(d){return d.selected}).map(function(d){return Mi(d.id,!1)});Ac({changedNodes:c,changedEdges:u,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(s){s.positionAbsolute=k5(s.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(qn({},Sk))}})})};function Zr(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=Zr(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function jr(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 Kre(e){if(Array.isArray(e))return Iw(e)}function Yre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
56
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function so(e){return Kre(e)||Yre(e)||P5(e)||Xre()}var Zre={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},Jre=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},Qre=function(){var t=Sr(),r=zt(Jre,jr),n=r.d3Zoom,i=r.d3Selection,o=C.useMemo(function(){return i&&n?{zoomIn:function(s){return n.scaleBy(eo(i,s==null?void 0:s.duration),1.2)},zoomOut:function(s){return n.scaleBy(eo(i,s==null?void 0:s.duration),1/1.2)},zoomTo:function(s,c){return n.scaleTo(eo(i,c==null?void 0:c.duration),s)},getZoom:function(){return t.getState().transform[2]},setViewport:function(s,c){var u,d,p,v=Ge(t.getState().transform,3),h=v[0],x=v[1],b=v[2],m=ao.translate((u=s.x)!==null&&u!==void 0?u:h,(d=s.y)!==null&&d!==void 0?d:x).scale((p=s.zoom)!==null&&p!==void 0?p:b);n.transform(eo(i,c==null?void 0:c.duration),m)},getViewport:function(){var s=Ge(t.getState().transform,3),c=s[0],u=s[1],d=s[2];return{x:c,y:u,zoom:d}},fitView:function(s){return H5(t.getState,s)},setCenter:function(s,c,u){var d=t.getState(),p=d.width,v=d.height,h=d.maxZoom,x=typeof(u==null?void 0:u.zoom)<"u"?u.zoom:h,b=p/2-s*x,m=v/2-c*x,w=ao.translate(b,m).scale(x);n.transform(eo(i,u==null?void 0:u.duration),w)},fitBounds:function(s,c){var u,d=t.getState(),p=d.width,v=d.height,h=d.minZoom,x=d.maxZoom,b=$5(s,p,v,h,x,(u=c==null?void 0:c.padding)!==null&&u!==void 0?u:.1),m=Ge(b,3),w=m[0],y=m[1],_=m[2],S=ao.translate(w,y).scale(_);n.transform(eo(i,c==null?void 0:c.duration),S)},project:function(s){var c=t.getState(),u=c.transform,d=c.snapToGrid,p=c.snapGrid;return z5(s,u,d,p)},viewportInitialized:!0}:Zre},[n,i]);return o};function Ck(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 Fo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ck(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ck(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function W5(){var e=Qre(),t=Sr(),r=C.useCallback(function(){var p=t.getState(),v=p.nodeInternals,h=Array.from(v.values());return h.map(function(x){return Fo({},x)})},[]),n=C.useCallback(function(p){var v=t.getState(),h=v.nodeInternals;return h.get(p)},[]),i=C.useCallback(function(){var p=t.getState(),v=p.edges,h=v===void 0?[]:v;return h.map(function(x){return Fo({},x)})},[]),o=C.useCallback(function(p){var v=t.getState(),h=v.edges,x=h===void 0?[]:h;return x.find(function(b){return b.id===p})},[]),a=C.useCallback(function(p){var v=t.getState(),h=v.nodeInternals,x=v.setNodes,b=v.hasDefaultNodes,m=v.onNodesChange,w=Array.from(h.values()),y=typeof p=="function"?p(w):p;if(b)x(y);else if(m){var _=y.length===0?w.map(function(S){return{type:"remove",id:S.id}}):y.map(function(S){return{item:S,type:"reset"}});m(_)}},[]),s=C.useCallback(function(p){var v=t.getState(),h=v.edges,x=h===void 0?[]:h,b=v.setEdges,m=v.hasDefaultEdges,w=v.onEdgesChange,y=typeof p=="function"?p(x):p;if(m)b(y);else if(w){var _=y.length===0?x.map(function(S){return{type:"remove",id:S.id}}):y.map(function(S){return{item:S,type:"reset"}});w(_)}},[]),c=C.useCallback(function(p){var v=Array.isArray(p)?p:[p],h=t.getState(),x=h.nodeInternals,b=h.setNodes,m=h.hasDefaultNodes,w=h.onNodesChange;if(m){var y=Array.from(x.values()),_=[].concat(y,so(v));b(_)}else if(w){var S=v.map(function(E){return{item:E,type:"add"}});w(S)}},[]),u=C.useCallback(function(p){var v=Array.isArray(p)?p:[p],h=t.getState(),x=h.edges,b=x===void 0?[]:x,m=h.setEdges,w=h.hasDefaultEdges,y=h.onEdgesChange;if(w)m([].concat(so(b),so(v)));else if(y){var _=v.map(function(S){return{item:S,type:"add"}});y(_)}},[]),d=C.useCallback(function(){var p=t.getState(),v=p.nodeInternals,h=p.edges,x=h===void 0?[]:h,b=p.transform,m=Array.from(v.values()),w=Ge(b,3),y=w[0],_=w[1],S=w[2];return{nodes:m.map(function(E){return Fo({},E)}),edges:x.map(function(E){return Fo({},E)}),viewport:{x:y,y:_,zoom:S}}},[]);return C.useMemo(function(){return Fo(Fo({},e),{},{getNodes:r,getNode:n,getEdges:i,getEdge:o,setNodes:a,setEdges:s,addNodes:c,addEdges:u,toObject:d})},[e,r,n,i,o,a,s,c,u,d])}function ene(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 Od(e,t){if(e==null)return{};var r=ene(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 tne(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},C.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function rne(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},C.createElement("path",{d:"M0 0h32v4.2H0z"}))}function nne(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},C.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 ine(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},C.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 one(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},C.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 ane=["children","className"];function Ik(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 sne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ik(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ik(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Dc=function(t){var r=t.children,n=t.className,i=Od(t,ane);return C.createElement("button",sne({type:"button",className:Zr(["react-flow__controls-button",n])},i),r)},lne=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},cne=function(t){var r=t.style,n=t.showZoom,i=n===void 0?!0:n,o=t.showFitView,a=o===void 0?!0:o,s=t.showInteractive,c=s===void 0?!0:s,u=t.fitViewOptions,d=t.onZoomIn,p=t.onZoomOut,v=t.onFitView,h=t.onInteractiveChange,x=t.className,b=t.children,m=Sr(),w=C.useState(!1),y=Ge(w,2),_=y[0],S=y[1],E=zt(lne),I=W5(),N=I.zoomIn,T=I.zoomOut,k=I.fitView;if(C.useEffect(function(){S(!0)},[]),!_)return null;var L=function(){N==null||N(),d==null||d()},B=function(){T==null||T(),p==null||p()},A=function(){k==null||k(u),v==null||v()},z=function(){m.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),h==null||h(!E)};return C.createElement("div",{className:Zr(["react-flow__controls",x]),style:r},i&&C.createElement(C.Fragment,null,C.createElement(Dc,{onClick:L,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},C.createElement(tne,null)),C.createElement(Dc,{onClick:B,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},C.createElement(rne,null))),a&&C.createElement(Dc,{className:"react-flow__controls-fitview",onClick:A,title:"fit view","aria-label":"fit view"},C.createElement(nne,null)),c&&C.createElement(Dc,{className:"react-flow__controls-interactive",onClick:z,title:"toggle interactivity","aria-label":"toggle interactivity"},E?C.createElement(one,null):C.createElement(ine,null)),b)};cne.displayName="Controls";var une=function(t,r,n){return C.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},dne=function(t,r){return C.createElement("circle",{cx:t,cy:t,r:t,fill:r})},jc;function Rk(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 Nk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rk(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var fne=(jc={},Qe(jc,po.Dots,"#81818a"),Qe(jc,po.Lines,"#eee"),jc),pne=function(t){return t.transform},U5=function(t){var r=t.variant,n=r===void 0?po.Dots:r,i=t.gap,o=i===void 0?15:i,a=t.size,s=a===void 0?.4:a,c=t.color,u=t.style,d=t.className,p=C.useRef(null),v=C.useState(null),h=Ge(v,2),x=h[0],b=h[1],m=zt(pne),w=Ge(m,3),y=w[0],_=w[1],S=w[2];C.useEffect(function(){var B=document.querySelectorAll(".react-flow__background"),A=Array.from(B).findIndex(function(z){return z===p.current});b("pattern-".concat(A))},[]);var E=o*S||1,I=y%E,N=_%E,T=n===po.Lines,k=c||fne[n],L=T?une(E,s,k):dne(s*S,k);return C.createElement("svg",{className:Zr(["react-flow__background","react-flow__container",d]),style:Nk(Nk({},u),{},{width:"100%",height:"100%"}),ref:p},x&&C.createElement(C.Fragment,null,C.createElement("pattern",{id:x,x:I,y:N,width:E,height:E,patternUnits:"userSpaceOnUse"},L),C.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(x,")")})))};U5.displayName="Background";var hne=C.memo(U5),vne=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function gne(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&vne.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var i="".concat(n).split("-");return C.createElement("div",{className:Zr(["react-flow__attribution"].concat(so(i))),"data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev/pricing"},C.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var mne=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function Tk(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 bne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tk(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var yne=function(t){var r=t.x,n=t.y,i=t.label,o=t.labelStyle,a=o===void 0?{}:o,s=t.labelShowBg,c=s===void 0?!0:s,u=t.labelBgStyle,d=u===void 0?{}:u,p=t.labelBgPadding,v=p===void 0?[2,4]:p,h=t.labelBgBorderRadius,x=h===void 0?2:h,b=t.children,m=t.className,w=Od(t,mne),y=C.useRef(null),_=C.useState({x:0,y:0,width:0,height:0}),S=Ge(_,2),E=S[0],I=S[1],N=Zr(["react-flow__edge-textwrapper",m]);return C.useEffect(function(){if(y.current){var T=y.current.getBBox();I({x:T.x,y:T.y,width:T.width,height:T.height})}},[i]),typeof i>"u"||!i?null:C.createElement("g",bne({transform:"translate(".concat(r-E.width/2," ").concat(n-E.height/2,")"),className:N},w),c&&C.createElement("rect",{width:E.width+2*v[0],x:-v[0],y:-v[1],height:E.height+2*v[1],className:"react-flow__edge-textbg",style:d,rx:x,ry:x}),C.createElement("text",{className:"react-flow__edge-text",y:E.height/2,dy:"0.3em",ref:y,style:a},i),b)},xne=C.memo(yne),Cd=(function(e){var t=e.path,r=e.centerX,n=e.centerY,i=e.label,o=e.labelStyle,a=e.labelShowBg,s=e.labelBgStyle,c=e.labelBgPadding,u=e.labelBgBorderRadius,d=e.style,p=e.markerEnd,v=e.markerStart,h=i?C.createElement(xne,{x:r,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:u}):null;return C.createElement(C.Fragment,null,C.createElement("path",{style:d,d:t,className:"react-flow__edge-path",markerEnd:p,markerStart:v}),h)});function zu(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a,s;switch(t){case Se.Left:case Se.Right:a=.5*(r+i),s=n;break;case Se.Top:case Se.Bottom:a=r,s=.5*(n+o);break}return[a,s]}function G5(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=zu({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Ge(u,2),p=d[0],v=d[1],h=zu({pos:c,x1:o,y1:a,x2:t,y2:r}),x=Ge(h,2),b=x[0],m=x[1];return"M".concat(t,",").concat(r," C").concat(p,",").concat(v," ").concat(b,",").concat(m," ").concat(o,",").concat(a)}function wne(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=zu({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Ge(u,2),p=d[0],v=d[1],h=zu({pos:c,x1:o,y1:a,x2:t,y2:r}),x=Ge(h,2),b=x[0],m=x[1],w=t*.125+p*.375+b*.375+o*.125,y=r*.125+v*.375+m*.375+a*.125,_=Math.abs(w-t),S=Math.abs(y-r);return[w,y,_,S]}var K5=C.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,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.label,d=e.labelStyle,p=e.labelShowBg,v=e.labelBgStyle,h=e.labelBgPadding,x=e.labelBgBorderRadius,b=e.style,m=e.markerEnd,w=e.markerStart,y={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c},_=G5(y),S=wne(y),E=Ge(S,2),I=E[0],N=E[1];return C.createElement(Cd,{path:_,centerX:I,centerY:N,label:u,labelStyle:d,labelShowBg:p,labelBgStyle:v,labelBgPadding:h,labelBgBorderRadius:x,style:b,markerEnd:m,markerStart:w})});function Pk(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 _ne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pk(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var kk=[Se.Left,Se.Right],Y5=function(t){var r=t.sourceX,n=t.sourceY,i=t.targetX,o=t.targetY,a=t.sourcePosition,s=a===void 0?Se.Bottom:a,c=t.targetPosition,u=c===void 0?Se.Top:c,d=kk.includes(s),p=kk.includes(u),v=d&&!p||p&&!d;if(v){var h=d?Math.abs(i-r):0,x=r>i?r-h:r+h,b=d?0:Math.abs(o-n),m=n<o?n+b:n-b;return[x,m,h,b]}var w=Math.abs(i-r)/2,y=i<r?i+w:i-w,_=Math.abs(o-n)/2,S=o<n?o+_:o-_;return[y,S,w,_]};function Qa(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,_ne({},i))}}var ny=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},iy=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},oy=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},ay=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},sy=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},ly=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},cy=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},uy=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function Tw(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.borderRadius,d=u===void 0?5:u,p=e.centerX,v=e.centerY,h=Y5({sourceX:t,sourceY:r,targetX:o,targetY:a}),x=Ge(h,4),b=x[0],m=x[1],w=x[2],y=x[3],_=Math.min(d,Math.abs(o-t)),S=Math.min(d,Math.abs(a-r)),E=Math.min(_,S,w,y),I=[Se.Left,Se.Right],N=typeof p<"u"?p:b,T=typeof v<"u"?v:m,k=null,L=null;return t<=o?(k=r<=a?ny(t,T,E):ly(t,T,E),L=r<=a?uy(o,T,E):ay(o,T,E)):(k=r<a?oy(t,T,E):cy(t,T,E),L=r<a?sy(o,T,E):iy(o,T,E)),I.includes(i)&&I.includes(c)?t<=o?(k=r<=a?uy(N,r,E):ay(N,r,E),L=r<=a?ny(N,a,E):ly(N,a,E)):(i===Se.Right&&c===Se.Left||i===Se.Left&&c===Se.Right||i===Se.Left&&c===Se.Left)&&(k=r<=a?sy(N,r,E):iy(N,r,E),L=r<=a?oy(N,a,E):cy(N,a,E)):I.includes(i)&&!I.includes(c)?(t<=o?k=r<=a?uy(o,r,E):ay(o,r,E):k=r<=a?sy(o,r,E):iy(o,r,E),L=""):!I.includes(i)&&I.includes(c)&&(t<=o?k=r<=a?ny(t,a,E):ly(t,a,E):k=r<=a?oy(t,a,E):cy(t,a,E),L=""),"M ".concat(t,",").concat(r).concat(k).concat(L,"L ").concat(o,",").concat(a)}var N_=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,s=e.labelShowBg,c=e.labelBgStyle,u=e.labelBgPadding,d=e.labelBgBorderRadius,p=e.style,v=e.sourcePosition,h=v===void 0?Se.Bottom:v,x=e.targetPosition,b=x===void 0?Se.Top:x,m=e.markerEnd,w=e.markerStart,y=e.borderRadius,_=y===void 0?5:y,S=Y5({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:h,targetPosition:b}),E=Ge(S,2),I=E[0],N=E[1],T=Tw({sourceX:t,sourceY:r,sourcePosition:h,targetX:n,targetY:i,targetPosition:b,borderRadius:_});return C.createElement(Cd,{path:T,centerX:I,centerY:N,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:p,markerEnd:m,markerStart:w})});function Mk(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 Ak(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mk(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var X5=C.memo(function(e){return C.createElement(N_,Ak(Ak({},e),{},{borderRadius:0}))}),Z5=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,s=e.labelShowBg,c=e.labelBgStyle,u=e.labelBgPadding,d=e.labelBgBorderRadius,p=e.style,v=e.markerEnd,h=e.markerStart,x=Math.abs(i-r)/2,b=i<r?i+x:i-x,m=Math.abs(n-t)/2,w=n<t?n+m:n-m,y="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(i);return C.createElement(Cd,{path:y,centerX:w,centerY:b,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:p,markerEnd:v,markerStart:h})});function qc(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Bu(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a=e.c,s,c;switch(t){case Se.Left:s=r-qc(r-i,a),c=n;break;case Se.Right:s=r+qc(i-r,a),c=n;break;case Se.Top:s=r,c=n-qc(n-o,a);break;case Se.Bottom:s=r,c=n+qc(o-n,a);break}return[s,c]}function Id(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.curvature,d=u===void 0?.25:u,p=Bu({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),v=Ge(p,2),h=v[0],x=v[1],b=Bu({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),m=Ge(b,2),w=m[0],y=m[1];return"M".concat(t,",").concat(r," C").concat(h,",").concat(x," ").concat(w,",").concat(y," ").concat(o,",").concat(a)}function Ene(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.curvature,d=u===void 0?.25:u,p=Bu({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),v=Ge(p,2),h=v[0],x=v[1],b=Bu({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),m=Ge(b,2),w=m[0],y=m[1],_=t*.125+h*.375+w*.375+o*.125,S=r*.125+x*.375+y*.375+a*.125,E=Math.abs(_-t),I=Math.abs(S-r);return[_,S,E,I]}var Pw=C.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,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.label,d=e.labelStyle,p=e.labelShowBg,v=e.labelBgStyle,h=e.labelBgPadding,x=e.labelBgBorderRadius,b=e.style,m=e.markerEnd,w=e.markerStart,y=e.curvature,_={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c,curvature:y},S=Id(_),E=Ene(_),I=Ge(E,2),N=I[0],T=I[1];return C.createElement(Cd,{path:S,centerX:N,centerY:T,label:u,labelStyle:d,labelShowBg:p,labelBgStyle:v,labelBgPadding:h,labelBgBorderRadius:x,style:b,markerEnd:m,markerStart:w})}),T_=C.createContext(null),Sne=T_.Provider;T_.Consumer;function kw(e,t,r,n,i,o,a){var s=a.elementFromPoint(e.clientX,e.clientY),c=(s==null?void 0:s.classList.contains("target"))||!1,u=(s==null?void 0:s.classList.contains("source"))||!1,d={elementBelow:s,isValid:!1,connection:{source:null,target:null,sourceHandle:null,targetHandle:null},isHoveringHandle:!1};if(s&&(c||u)){d.isHoveringHandle=!0;var p=s.getAttribute("data-nodeid"),v=s.getAttribute("data-handleid"),h=r?{source:p,sourceHandle:v,target:n,targetHandle:i}:{source:n,sourceHandle:i,target:p,targetHandle:v};d.connection=h;var x=t===pa.Strict?r&&u||!r&&c:!0;x&&(d.isValid=o(h))}return d}function dy(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function J5(e){var t=e.event,r=e.handleId,n=e.nodeId,i=e.onConnect,o=e.isTarget,a=e.getState,s=e.setState,c=e.isValidConnection,u=e.elementEdgeUpdaterType,d=e.onEdgeUpdateEnd,p=t.target.closest(".react-flow"),v=M5(t.target);if(!v)return;var h=v.elementFromPoint(t.clientX,t.clientY),x=h==null?void 0:h.classList.contains("target"),b=h==null?void 0:h.classList.contains("source");if(!p||!x&&!b&&!u)return;var m=a(),w=m.onConnectStart,y=m.connectionMode,_=u||(x?"target":"source"),S=p.getBoundingClientRect(),E;s({connectionPosition:{x:t.clientX-S.left,y:t.clientY-S.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:_}),w==null||w(t,{nodeId:n,handleId:r,handleType:_});function I(T){s({connectionPosition:{x:T.clientX-S.left,y:T.clientY-S.top}});var k=kw(T,y,o,n,r,c,v),L=k.connection,B=k.elementBelow,A=k.isValid,z=k.isHoveringHandle;if(!z)return dy(E);L.source!==L.target&&B&&(dy(E),E=B,B.classList.add("react-flow__handle-connecting"),B.classList.toggle("react-flow__handle-valid",A))}function N(T){var k=a(),L=k.onConnectStop,B=k.onConnectEnd,A=kw(T,y,o,n,r,c,v),z=A.connection,P=A.isValid;L==null||L(T),P&&(i==null||i(z)),B==null||B(T),u&&d&&d(T),dy(E),s({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),v.removeEventListener("mousemove",I),v.removeEventListener("mouseup",N)}v.addEventListener("mousemove",I),v.addEventListener("mouseup",N)}var One=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];function Dk(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 fy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dk(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Cne=function(){return!0},Ine=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},Q5=C.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,s=a===void 0?Cne:a,c=e.isConnectable,u=c===void 0?!0:c,d=e.id,p=e.onConnect,v=e.children,h=e.className,x=e.onMouseDown,b=Od(e,One),m=Sr(),w=C.useContext(T_),y=zt(Ine,jr),_=y.connectionStartHandle,S=y.connectOnClick,E=d||null,I=n==="target",N=function(B){var A=m.getState(),z=A.defaultEdgeOptions,P=A.onConnect,K=A.hasDefaultEdges,$=fy(fy({},z),B);if(K){var Y=m.getState(),U=Y.edges;m.setState({edges:Vre($,U)})}P==null||P($),p==null||p($)},T=function(B){B.button===0&&J5({event:B,handleId:E,nodeId:w,onConnect:N,isTarget:I,getState:m.getState,setState:m.setState,isValidConnection:s}),x==null||x(B)},k=function(B){var A=m.getState(),z=A.onClickConnectStart,P=A.onClickConnectStop,K=A.onClickConnectEnd,$=A.connectionMode;if(!_){z==null||z(B,{nodeId:w,handleId:E,handleType:n}),m.setState({connectionStartHandle:{nodeId:w,type:n,handleId:E}});return}var Y=M5(B.target),U=kw(B,$,_.type==="target",_.nodeId,_.handleId||null,s,Y),Z=U.connection,D=U.isValid;P==null||P(B),D&&N(Z),K==null||K(B),m.setState({connectionStartHandle:null})};return C.createElement("div",fy({"data-handleid":E,"data-nodeid":w,"data-handlepos":o,className:Zr(["react-flow__handle","react-flow__handle-".concat(o),"nodrag",h,{source:!I,target:I,connectable:u,connecting:(_==null?void 0:_.nodeId)===w&&(_==null?void 0:_.handleId)===E&&(_==null?void 0:_.type)===n}]),onMouseDown:T,onClick:S?k:void 0,ref:t},b),v)});Q5.displayName="Handle";var Fu=C.memo(Q5),eB=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Se.Top:i,a=t.sourcePosition,s=a===void 0?Se.Bottom:a;return C.createElement(C.Fragment,null,C.createElement(Fu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,C.createElement(Fu,{type:"source",position:s,isConnectable:n}))};eB.displayName="DefaultNode";var Mw=C.memo(eB),tB=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?Se.Bottom:i;return C.createElement(C.Fragment,null,r==null?void 0:r.label,C.createElement(Fu,{type:"source",position:o,isConnectable:n}))};tB.displayName="InputNode";var rB=C.memo(tB),nB=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Se.Top:i;return C.createElement(C.Fragment,null,C.createElement(Fu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};nB.displayName="OutputNode";var iB=C.memo(nB),Rne=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},Nne=function(t,r){var n=t.selectedNodes.map(function(s){return s.id}),i=r.selectedNodes.map(function(s){return s.id}),o=t.selectedEdges.map(function(s){return s.id}),a=r.selectedEdges.map(function(s){return s.id});return jr(n,i)&&jr(o,a)};function Tne(e){var t=e.onSelectionChange,r=zt(Rne,Nne),n=r.selectedNodes,i=r.selectedEdges;return C.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var Pne=C.memo(Tne),kne=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 Ri(e,t){C.useEffect(function(){typeof e<"u"&&t(e)},[e])}function gt(e,t,r){C.useEffect(function(){typeof t<"u"&&r(Qe({},e,t))},[t])}var Mne=function(t){var r=t.nodes,n=t.edges,i=t.defaultNodes,o=t.defaultEdges,a=t.onConnect,s=t.onConnectStart,c=t.onConnectStop,u=t.onConnectEnd,d=t.onClickConnectStart,p=t.onClickConnectStop,v=t.onClickConnectEnd,h=t.nodesDraggable,x=t.nodesConnectable,b=t.minZoom,m=t.maxZoom,w=t.nodeExtent,y=t.onNodesChange,_=t.onEdgesChange,S=t.elementsSelectable,E=t.connectionMode,I=t.snapGrid,N=t.snapToGrid,T=t.translateExtent,k=t.connectOnClick,L=t.defaultEdgeOptions,B=t.fitView,A=t.fitViewOptions,z=t.onNodesDelete,P=t.onEdgesDelete,K=t.onNodeDrag,$=t.onNodeDragStart,Y=t.onNodeDragStop,U=t.onSelectionDrag,Z=t.onSelectionDragStart,D=t.onSelectionDragStop,W=zt(kne,jr),Q=W.setNodes,ee=W.setEdges,j=W.setDefaultNodesAndEdges,F=W.setMinZoom,G=W.setMaxZoom,q=W.setTranslateExtent,X=W.setNodeExtent,te=W.reset,ne=Sr();return C.useEffect(function(){return j(i,o),function(){te()}},[]),gt("defaultEdgeOptions",L,ne.setState),gt("connectionMode",E,ne.setState),gt("onConnect",a,ne.setState),gt("onConnectStart",s,ne.setState),gt("onConnectStop",c,ne.setState),gt("onConnectEnd",u,ne.setState),gt("onClickConnectStart",d,ne.setState),gt("onClickConnectStop",p,ne.setState),gt("onClickConnectEnd",v,ne.setState),gt("nodesDraggable",h,ne.setState),gt("nodesConnectable",x,ne.setState),gt("elementsSelectable",S,ne.setState),gt("snapToGrid",N,ne.setState),gt("snapGrid",I,ne.setState),gt("onNodesChange",y,ne.setState),gt("onEdgesChange",_,ne.setState),gt("connectOnClick",k,ne.setState),gt("fitViewOnInit",B,ne.setState),gt("fitViewOnInitOptions",A,ne.setState),gt("onNodesDelete",z,ne.setState),gt("onEdgesDelete",P,ne.setState),gt("onNodeDrag",K,ne.setState),gt("onNodeDragStart",$,ne.setState),gt("onNodeDragStop",Y,ne.setState),gt("onSelectionDrag",U,ne.setState),gt("onSelectionDragStart",Z,ne.setState),gt("onSelectionDragStop",D,ne.setState),Ri(r,Q),Ri(n,ee),Ri(i,Q),Ri(o,ee),Ri(b,F),Ri(m,G),Ri(T,q),Ri(w,X),null},Ane=".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%)}",Dne=Ane,jne=".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}",qne=jne,Lne=function(t,r,n){return n===Se.Left?t-r:n===Se.Right?t+r:t},zne=function(t,r,n){return n===Se.Top?t-r:n===Se.Bottom?t+r:t},jk=function(t){var r=t.className,n=t.position,i=t.centerX,o=t.centerY,a=t.radius,s=a===void 0?10:a;return C.createElement("circle",{className:Zr(["react-flow__edgeupdater",r]),cx:Lne(i,s,n),cy:zne(o,s,n),r:s,stroke:"transparent",fill:"transparent"})},$o=(function(e){var t=function(n){var i=n.id,o=n.className,a=n.type,s=n.data,c=n.onClick,u=n.onEdgeDoubleClick,d=n.selected,p=n.animated,v=n.label,h=n.labelStyle,x=n.labelShowBg,b=n.labelBgStyle,m=n.labelBgPadding,w=n.labelBgBorderRadius,y=n.style,_=n.source,S=n.target,E=n.sourceX,I=n.sourceY,N=n.targetX,T=n.targetY,k=n.sourcePosition,L=n.targetPosition,B=n.elementsSelectable,A=n.hidden,z=n.sourceHandleId,P=n.targetHandleId,K=n.onContextMenu,$=n.onMouseEnter,Y=n.onMouseMove,U=n.onMouseLeave,Z=n.edgeUpdaterRadius,D=n.onEdgeUpdate,W=n.onEdgeUpdateStart,Q=n.onEdgeUpdateEnd,ee=n.markerEnd,j=n.markerStart,F=n.rfId,G=C.useState(!1),q=Ge(G,2),X=q[0],te=q[1],ne=Sr(),de=function(De){var it=ne.getState(),ot=it.edges,Qt=it.addSelectedEdges,Bt=ot.find(function(Tt){return Tt.id===i});B&&(ne.setState({nodesSelectionActive:!1}),Qt([i])),c==null||c(De,Bt)},re=Qa(i,ne.getState,u),ge=Qa(i,ne.getState,K),ue=Qa(i,ne.getState,$),xe=Qa(i,ne.getState,Y),le=Qa(i,ne.getState,U),se=function(De,it){var ot=it?S:_,Qt=(it?P:z)||null,Bt=it?"target":"source",Tt=function(){return!0},Le=it,Ye=ne.getState().edges.find(function(Ht){return Ht.id===i});W==null||W(De,Ye,Bt);var bt=Q?function(Ht){return Q(Ht,Ye,Bt)}:void 0,Ot=function(Lr){return D==null?void 0:D(Ye,Lr)};J5({event:De,handleId:Qt,nodeId:ot,onConnect:Ot,isTarget:Le,getState:ne.getState,setState:ne.setState,isValidConnection:Tt,elementEdgeUpdaterType:Bt,onEdgeUpdateEnd:bt})},we=function(De){return se(De,!0)},Re=function(De){return se(De,!1)},Te=function(){return te(!0)},je=function(){return te(!1)},Ke=C.useMemo(function(){return"url(#".concat(Rw(j,F),")")},[j,F]),qe=C.useMemo(function(){return"url(#".concat(Rw(ee,F),")")},[ee,F]);if(A)return null;var et=!B&&!c,ht=typeof D<"u",St=Zr(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:d,animated:p,inactive:et,updating:X}]);return C.createElement("g",{className:St,onClick:de,onDoubleClick:re,onContextMenu:ge,onMouseEnter:ue,onMouseMove:xe,onMouseLeave:le},C.createElement(e,{id:i,source:_,target:S,selected:d,animated:p,label:v,labelStyle:h,labelShowBg:x,labelBgStyle:b,labelBgPadding:m,labelBgBorderRadius:w,data:s,style:y,sourceX:E,sourceY:I,targetX:N,targetY:T,sourcePosition:k,targetPosition:L,sourceHandleId:z,targetHandleId:P,markerStart:Ke,markerEnd:qe,"data-testid":"rf__edge-".concat(i)}),ht&&C.createElement("g",{onMouseDown:we,onMouseEnter:Te,onMouseOut:je},C.createElement(jk,{position:k,centerX:E,centerY:I,radius:Z})),ht&&C.createElement("g",{onMouseDown:Re,onMouseEnter:Te,onMouseOut:je},C.createElement(jk,{position:L,centerX:N,centerY:T,radius:Z})))};return t.displayName="EdgeWrapper",C.memo(t)});function qk(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 Lk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qk(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bne(e){var t={default:$o(e.default||Pw),straight:$o(e.bezier||Z5),step:$o(e.step||X5),smoothstep:$o(e.step||N_),simplebezier:$o(e.simplebezier||K5)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=$o(e[o]||Pw),i},r);return Lk(Lk({},t),n)}function zk(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 Bk(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 Fne=function(t,r,n,i,o,a){var s=zk(n,t,r),c=zk(a,i,o);return{sourceX:s.x,sourceY:s.y,targetX:c.x,targetY:c.y}};function $ne(e){var t=e.sourcePos,r=e.targetPos,n=e.sourceWidth,i=e.sourceHeight,o=e.targetWidth,a=e.targetHeight,s=e.width,c=e.height,u=e.transform,d={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)};d.x===d.x2&&(d.x2+=1),d.y===d.y2&&(d.y2+=1);var p=Lu({x:(0-u[0])/u[2],y:(0-u[1])/u[2],width:s/u[2],height:c/u[2]}),v=Math.max(0,Math.min(p.x2,d.x2)-Math.max(p.x,d.x)),h=Math.max(0,Math.min(p.y2,d.y2)-Math.max(p.y,d.y)),x=Math.ceil(v*h);return x>0}function Fk(e,t){var r,n,i,o,a,s=e.get(t),c=(s==null||(r=s[or])===null||r===void 0?void 0:r.handleBounds)||null,u=!s||!c||!s.width||!s.height||typeof((n=s.positionAbsolute)===null||n===void 0?void 0:n.x)>"u"||typeof((i=s.positionAbsolute)===null||i===void 0?void 0:i.y)>"u";return[{x:(s==null||(o=s.positionAbsolute)===null||o===void 0?void 0:o.x)||0,y:(s==null||(a=s.positionAbsolute)===null||a===void 0?void 0:a.y)||0,width:(s==null?void 0:s.width)||0,height:(s==null?void 0:s.height)||0},c,!u]}var Vne=typeof document<"u"?document:null,$u=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:Vne},r=C.useState(!1),n=Ge(r,2),i=n[0],o=n[1],a=C.useRef(new Set([])),s=C.useMemo(function(){if(e!==null){var p=Array.isArray(e)?e:[e],v=p.filter(function(x){return typeof x=="string"}).map(function(x){return x.split("+")}),h=v.reduce(function(x,b){return x.concat.apply(x,so(b))},[]);return[v,h]}return[[],[]]},[e]),c=Ge(s,2),u=c[0],d=c[1];return C.useEffect(function(){if(e!==null){var p,v,h=function(w){if(Hk(w))return!1;var y=Vk(w.code,d);a.current.add(w[y]),$k(u,a.current,!1)&&(w.preventDefault(),o(!0))},x=function(w){if(Hk(w))return!1;var y=Vk(w.code,d);$k(u,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(w[y])},b=function(){a.current.clear(),o(!1)};return t==null||(p=t.target)===null||p===void 0||p.addEventListener("keydown",h),t==null||(v=t.target)===null||v===void 0||v.addEventListener("keyup",x),window.addEventListener("blur",b),function(){var m,w;t==null||(m=t.target)===null||m===void 0||m.removeEventListener("keydown",h),t==null||(w=t.target)===null||w===void 0||w.removeEventListener("keyup",x),window.removeEventListener("blur",b)}}},[e,o]),i});function $k(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 Vk(e,t){return t.includes(e)?"code":"key"}function Hk(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 Hne=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},Wne=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Sr(),i=zt(Hne,jr),o=i.onNodesChange,a=i.onEdgesChange,s=$u(t),c=$u(r);C.useEffect(function(){var u=n.getState(),d=u.nodeInternals,p=u.edges,v=u.hasDefaultNodes,h=u.hasDefaultEdges,x=u.onNodesDelete,b=u.onEdgesDelete,m=Array.from(d.values()),w=m.reduce(function(T,k){return(!k.selected&&k.parentNode&&T.find(function(L){return L.id===k.parentNode})||k.selected)&&T.push(k),T},[]),y=p.filter(function(T){return T.selected});if(s&&(w||y)){var _=F5(w,p),S=[].concat(so(y),so(_)),E=S.reduce(function(T,k){return T.includes(k.id)||T.push(k.id),T},[]);if((h||v)&&(h&&n.setState({edges:p.filter(function(T){return!E.includes(T.id)})}),v&&(w.forEach(function(T){d.delete(T.id)}),n.setState({nodeInternals:new Map(d)}))),E.length>0&&(b==null||b(S),a)){var I=E.map(function(T){return{id:T,type:"remove"}});a(I)}if(w.length>0&&(x==null||x(w),o)){var N=w.map(function(T){return{id:T.id,type:"remove"}});o(N)}n.setState({nodesSelectionActive:!1})}},[s,o,a]),C.useEffect(function(){n.setState({multiSelectionActive:c})},[c])});function Une(e){var t=Sr();C.useEffect(function(){var r,n=function(){if(e.current){var o=C_(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 Gne=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},py=function(t){return{x:t.x,y:t.y,zoom:t.k}},Lc=function(t,r){return t.target.closest(".".concat(r))},Kne=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},Yne=function(t){var r=t.onMove,n=t.onMoveStart,i=t.onMoveEnd,o=t.zoomOnScroll,a=o===void 0?!0:o,s=t.zoomOnPinch,c=s===void 0?!0:s,u=t.panOnScroll,d=u===void 0?!1:u,p=t.panOnScrollSpeed,v=p===void 0?.5:p,h=t.panOnScrollMode,x=h===void 0?ta.Free:h,b=t.zoomOnDoubleClick,m=b===void 0?!0:b,w=t.selectionKeyPressed,y=t.elementsSelectable,_=t.panOnDrag,S=_===void 0?!0:_,E=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,k=T===void 0?1:T,L=t.defaultPosition,B=L===void 0?[0,0]:L,A=t.zoomActivationKeyCode,z=t.preventScrolling,P=z===void 0?!0:z,K=t.children,$=t.noWheelClassName,Y=t.noPanClassName,U=Sr(),Z=C.useRef(!1),D=C.useRef(null),W=C.useRef({x:0,y:0,zoom:0}),Q=zt(Kne,jr),ee=Q.d3Zoom,j=Q.d3Selection,F=Q.d3ZoomHandler,G=$u(A);return Une(D),C.useEffect(function(){if(D.current){var q,X=Mre().scaleExtent([I,N]).translateExtent(E),te=En(D.current).call(X),ne=ra(B[0],E[0][0],E[1][0]),de=ra(B[1],E[0][1],E[1][1]),re=ra(k,I,N),ge=ao.translate(ne,de).scale(re);X.transform(te,ge),U.setState({d3Zoom:X,d3Selection:te,d3ZoomHandler:te.on("wheel.zoom"),transform:[ne,de,re],domNode:(q=te.node())===null||q===void 0?void 0:q.closest(".react-flow")})}},[]),C.useEffect(function(){j&&ee&&(d&&!G?j.on("wheel",function(q){if(Lc(q,$))return!1;q.preventDefault(),q.stopImmediatePropagation();var X=j.property("__zoom").k||1;if(q.ctrlKey&&c){var te=Bn(q),ne=-q.deltaY*(q.deltaMode===1?.05:q.deltaMode?1:.002)*10,de=X*Math.pow(2,ne);ee.scaleTo(j,de,te);return}var re=q.deltaMode===1?20:1,ge=x===ta.Vertical?0:q.deltaX*re,ue=x===ta.Horizontal?0:q.deltaY*re;ee.translateBy(j,-(ge/X)*v,-(ue/X)*v)}).on("wheel.zoom",null):typeof F<"u"&&j.on("wheel",function(q){if(!P||Lc(q,$))return null;q.preventDefault()}).on("wheel.zoom",F))},[d,x,j,ee,F,G,c,P,$]),C.useEffect(function(){ee&&(w&&!Z.current?ee.on("zoom",null):w||ee.on("zoom",function(q){if(U.setState({transform:[q.transform.x,q.transform.y,q.transform.k]}),r){var X=py(q.transform);r(q.sourceEvent,X)}}))},[w,ee,r]),C.useEffect(function(){ee&&ee.on("start",function(q){if(Z.current=!0,n){var X=py(q.transform);W.current=X,n(q.sourceEvent,X)}})},[ee,n]),C.useEffect(function(){ee&&ee.on("end",function(q){if(Z.current=!1,i&&Gne(W.current,q.transform)){var X=py(q.transform);W.current=X,i(q.sourceEvent,X)}})},[ee,i]),C.useEffect(function(){ee&&ee.filter(function(q){var X=G||a,te=c&&q.ctrlKey;return!S&&!X&&!d&&!m&&!c||w||!m&&q.type==="dblclick"||Lc(q,$)&&q.type==="wheel"||Lc(q,Y)&&q.type!=="wheel"||!c&&q.ctrlKey&&q.type==="wheel"||!X&&!d&&!te&&q.type==="wheel"||!S&&(q.type==="mousedown"||q.type==="touchstart")?!1:(!q.ctrlKey||q.type==="wheel")&&!q.button})},[ee,a,c,d,m,S,w,y,G]),C.createElement("div",{className:"react-flow__renderer react-flow__container",ref:D},K)};function Wk(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 Uk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wk(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gk(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var Xne=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},Kk={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},Zne=C.memo(function(e){var t=e.selectionKeyPressed,r=Sr(),n=C.useRef(0),i=C.useRef(0),o=C.useRef(),a=C.useState(Kk),s=Ge(a,2),c=s[0],u=s[1],d=zt(Xne,jr),p=d.userSelectionActive,v=d.elementsSelectable,h=p||t;if(!v||!h)return null;var x=function(){u(Kk),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},b=function(S){var E=S.target.closest(".react-flow");o.current=E.getBoundingClientRect();var I=Gk(S,o.current);u({width:0,height:0,startX:I.x,startY:I.y,x:I.x,y:I.y,draw:!0}),r.setState({userSelectionActive:!0,nodesSelectionActive:!1})},m=function(S){var E,I;if(!(!t||!c.draw||!o.current)){var N=Gk(S,o.current),T=(E=c.startX)!==null&&E!==void 0?E:0,k=(I=c.startY)!==null&&I!==void 0?I:0,L=Uk(Uk({},c),{},{x:N.x<T?N.x:T,y:N.y<k?N.y:k,width:Math.abs(N.x-T),height:Math.abs(N.y-k)}),B=r.getState(),A=B.nodeInternals,z=B.edges,P=B.transform,K=B.onNodesChange,$=B.onEdgesChange,Y=Array.from(A.values()),U=B5(A,L,P,!1,!0),Z=F5(U,z).map(function(ee){return ee.id}),D=U.map(function(ee){return ee.id});if(n.current!==D.length){n.current=D.length;var W=Xo(Y,D);W.length&&(K==null||K(W))}if(i.current!==Z.length){i.current=Z.length;var Q=Xo(z,Z);Q.length&&($==null||$(Q))}u(L)}},w=function(){r.setState({nodesSelectionActive:n.current>0}),x()},y=function(){r.setState({nodesSelectionActive:!1}),x()};return C.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:b,onMouseMove:m,onMouseUp:w,onMouseLeave:y},c.draw&&C.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 Yk(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 Xk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yk(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oB(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:oB(r,t):!1}function Zk(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 Jne(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!oB(n,e))}).map(function(n){var i,o,a,s;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=(s=n.positionAbsolute)===null||s===void 0?void 0:s.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 Qne(e,t,r,n,i,o){var a=Ge(n,2),s=a[0],c=a[1],u=e.extent||o,d={x:t.x-e.distance.x,y:t.y-e.distance.y};if(r&&(d.x=s*Math.round(d.x/s),d.y=c*Math.round(d.y/c)),e.extent==="parent")if(e.parentNode&&e.width&&e.height){var p=i.get(e.parentNode);u=p!=null&&p.positionAbsolute&&p!==null&&p!==void 0&&p.width&&p!==null&&p!==void 0&&p.height?[[p.positionAbsolute.x,p.positionAbsolute.y],[p.positionAbsolute.x+p.width-e.width,p.positionAbsolute.y+p.height-e.height]]:u}else process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Only child nodes can use a parent extent. Help: https://reactflow.dev/error#500"),u=o;else if(e.extent&&e.parentNode){var v,h,x,b,m=i.get(e.parentNode),w=(v=m==null||(h=m.positionAbsolute)===null||h===void 0?void 0:h.x)!==null&&v!==void 0?v:0,y=(x=m==null||(b=m.positionAbsolute)===null||b===void 0?void 0:b.y)!==null&&x!==void 0?x:0;u=[[e.extent[0][0]+w,e.extent[0][1]+y],[e.extent[1][0]+w,e.extent[1][1]+y]]}var _={x:0,y:0};if(e.parentNode){var S,E,I,N,T=i.get(e.parentNode);_={x:(S=T==null||(E=T.positionAbsolute)===null||E===void 0?void 0:E.x)!==null&&S!==void 0?S:0,y:(I=T==null||(N=T.positionAbsolute)===null||N===void 0?void 0:N.y)!==null&&I!==void 0?I:0}}return e.positionAbsolute=u?k5(d,u):d,e.position={x:e.positionAbsolute.x-_.x,y:e.positionAbsolute.y-_.y},e}function hy(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return Xk(Xk({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function vy(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function aB(e){var t=e.nodeRef,r=e.disabled,n=r===void 0?!1:r,i=e.noDragClassName,o=e.handleSelector,a=e.nodeId,s=e.isSelectable,c=e.selectNodesOnDrag,u=C.useState(!1),d=Ge(u,2),p=d[0],v=d[1],h=Sr(),x=C.useRef(),b=C.useRef({x:null,y:null}),m=C.useCallback(function(w){var y=w.sourceEvent,_=h.getState(),S=_.transform,E=_.snapGrid,I=_.snapToGrid,N=y.touches?y.touches[0].clientX:y.clientX,T=y.touches?y.touches[0].clientY:y.clientY,k=z5({x:N,y:T},S,I,E);return k},[]);return C.useEffect(function(){if(t!=null&&t.current){var w=En(t.current);if(n)w.on(".drag",null);else{var y=Vee().on("start",function(_){var S=h.getState(),E=S.nodeInternals,I=S.multiSelectionActive,N=S.unselectNodesAndEdges,T=S.onNodeDragStart,k=S.onSelectionDragStart,L=a?T:vy(k);if(!c&&!I&&a){var B;(B=E.get(a))!==null&&B!==void 0&&B.selected||N()}a&&s&&c&&L5({id:a,store:h});var A=m(_);if(b.current=A,x.current=Jne(E,A,a),L&&x.current){var z=hy({nodeId:a,dragItems:x.current,nodeInternals:E}),P=Ge(z,2),K=P[0],$=P[1];L(_.sourceEvent,K,$)}}).on("drag",function(_){var S=h.getState(),E=S.updateNodePositions,I=S.snapToGrid,N=S.snapGrid,T=S.nodeInternals,k=S.nodeExtent,L=S.onNodeDrag,B=S.onSelectionDrag,A=m(_);if((b.current.x!==A.x||b.current.y!==A.y)&&x.current){b.current=A,x.current=x.current.map(function(U){return Qne(U,A,I,N,T,k)});var z=a?L:vy(B);if(E(x.current,!0,!0),v(!0),z){var P=hy({nodeId:a,dragItems:x.current,nodeInternals:T}),K=Ge(P,2),$=K[0],Y=K[1];z(_.sourceEvent,$,Y)}}_.on("end",function(U){if(v(!1),x.current){var Z=h.getState(),D=Z.updateNodePositions,W=Z.nodeInternals,Q=Z.onNodeDragStop,ee=Z.onSelectionDragStop,j=a?Q:vy(ee);if(D(x.current,!1,!1),j){var F=hy({nodeId:a,dragItems:x.current,nodeInternals:W}),G=Ge(F,2),q=G[0],X=G[1];j(U.sourceEvent,q,X)}}})}).filter(function(_){var S=_.target,E=!_.button&&(!i||!Zk(S,".".concat(i),t))&&(!o||Zk(S,o,t));return E});return w.call(y),function(){w.on(".drag",null)}}}},[t,n,i,o,s,h,a,c,m]),p}function Jk(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 eie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jk(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var tie=function(t){return eie({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},I_(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},rie=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return I_(r)};function nie(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Sr(),i=zt(tie,jr),o=i.transformString,a=i.userSelectionActive,s=zt(rie,jr),c=s.width,u=s.height,d=s.x,p=s.y,v=C.useRef(null);if(aB({nodeRef:v}),a||!c||!u)return null;var h=t?function(x){var b=Array.from(n.getState().nodeInternals.values()).filter(function(m){return m.selected});t(x,b)}:void 0;return C.createElement("div",{className:Zr(["react-flow__nodesselection","react-flow__container",r]),style:{transform:o}},C.createElement("div",{ref:v,className:"react-flow__nodesselection-rect",onContextMenu:h,style:{width:c,height:u,top:p,left:d}}))}var iie=C.memo(nie),oie=function(t){return t.nodesSelectionActive},sB=function(t){var r=t.children,n=t.onPaneClick,i=t.onPaneContextMenu,o=t.onPaneScroll,a=t.deleteKeyCode,s=t.onMove,c=t.onMoveStart,u=t.onMoveEnd,d=t.selectionKeyCode,p=t.multiSelectionKeyCode,v=t.zoomActivationKeyCode,h=t.elementsSelectable,x=t.zoomOnScroll,b=t.zoomOnPinch,m=t.panOnScroll,w=t.panOnScrollSpeed,y=t.panOnScrollMode,_=t.zoomOnDoubleClick,S=t.panOnDrag,E=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,k=t.defaultPosition,L=t.preventScrolling,B=t.onSelectionContextMenu,A=t.noWheelClassName,z=t.noPanClassName,P=Sr(),K=zt(oie),$=$u(d);Wne({deleteKeyCode:a,multiSelectionKeyCode:p});var Y=function(W){n==null||n(W),P.getState().resetSelectedElements(),P.setState({nodesSelectionActive:!1})},U=i?function(D){return i(D)}:void 0,Z=o?function(D){return o(D)}:void 0;return C.createElement(Yne,{onMove:s,onMoveStart:c,onMoveEnd:u,selectionKeyPressed:$,elementsSelectable:h,zoomOnScroll:x,zoomOnPinch:b,panOnScroll:m,panOnScrollSpeed:w,panOnScrollMode:y,zoomOnDoubleClick:_,panOnDrag:S,translateExtent:E,minZoom:I,maxZoom:N,defaultZoom:T,defaultPosition:k,zoomActivationKeyCode:v,preventScrolling:L,noWheelClassName:A,noPanClassName:z},r,C.createElement(Zne,{selectionKeyPressed:$}),K&&C.createElement(iie,{onSelectionContextMenu:B,noPanClassName:z}),C.createElement("div",{className:"react-flow__pane react-flow__container",onClick:Y,onContextMenu:U,onWheel:Z}))};sB.displayName="FlowRenderer";var aie=C.memo(sB);function sie(e){var t=zt(C.useCallback(function(r){return e?B5(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var lie=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},lB=function(t){var r=zt(lie,jr),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,s=sie(t.onlyRenderVisibleElements),c=C.useRef(),u=C.useMemo(function(){if(typeof ResizeObserver>"u")return null;var d=new ResizeObserver(function(p){var v=p.map(function(h){return{id:h.target.getAttribute("data-id"),nodeElement:h.target,forceUpdate:!0}});a(v)});return c.current=d,d},[]);return C.useEffect(function(){return function(){var d;c==null||(d=c.current)===null||d===void 0||d.disconnect()}},[]),C.createElement("div",{className:"react-flow__nodes react-flow__container"},s.map(function(d){var p,v,h,x,b,m,w,y=d.type||"default";t.nodeTypes[y]||(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Node type "'.concat(y,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),y="default");var _=t.nodeTypes[y]||t.nodeTypes.default,S=!!(d.draggable||n&&typeof d.draggable>"u"),E=!!(d.selectable||o&&typeof d.selectable>"u"),I=!!(d.connectable||i&&typeof d.connectable>"u");return C.createElement(_,{key:d.id,id:d.id,className:d.className,style:d.style,type:y,data:d.data,sourcePosition:d.sourcePosition||Se.Bottom,targetPosition:d.targetPosition||Se.Top,hidden:d.hidden,xPos:(p=(v=d.positionAbsolute)===null||v===void 0?void 0:v.x)!==null&&p!==void 0?p:0,yPos:(h=(x=d.positionAbsolute)===null||x===void 0?void 0:x.y)!==null&&h!==void 0?h:0,selectNodesOnDrag:t.selectNodesOnDrag,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,selected:!!d.selected,isDraggable:S,isSelectable:E,isConnectable:I,resizeObserver:u,dragHandle:d.dragHandle,zIndex:(b=(m=d[or])===null||m===void 0?void 0:m.z)!==null&&b!==void 0?b:0,isParent:!!((w=d[or])!==null&&w!==void 0&&w.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!d.width&&!!d.height})}))};lB.displayName="NodeRenderer";var cie=C.memo(lB),Vo;function Qk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function eM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qk(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var uie=(Vo={},Qe(Vo,Se.Left,Se.Right),Qe(Vo,Se.Right,Se.Left),Qe(Vo,Se.Top,Se.Bottom),Qe(Vo,Se.Bottom,Se.Top),Vo),die=(function(e){var t,r,n,i,o,a=e.connectionNodeId,s=e.connectionHandleType,c=e.connectionLineStyle,u=e.connectionLineType,d=u===void 0?Ai.Bezier:u,p=e.isConnectable,v=e.CustomConnectionLineComponent,h=zt(C.useCallback(function(Z){return{fromNode:Z.nodeInternals.get(a),handleId:Z.connectionHandleId,toX:(Z.connectionPosition.x-Z.transform[0])/Z.transform[2],toY:(Z.connectionPosition.y-Z.transform[1])/Z.transform[2]}},[a]),jr),x=h.fromNode,b=h.handleId,m=h.toX,w=h.toY,y=x==null||(t=x[or])===null||t===void 0?void 0:t.handleBounds;if(!x||!p||!(y!=null&&y[s]))return null;var _=y[s],S=b?_.find(function(Z){return Z.id===b}):_[0],E=S?S.x+S.width/2:((r=x==null?void 0:x.width)!==null&&r!==void 0?r:0)/2,I=S?S.y+S.height/2:(n=x==null?void 0:x.height)!==null&&n!==void 0?n:0,N=((x==null||(i=x.positionAbsolute)===null||i===void 0?void 0:i.x)||0)+E,T=((x==null||(o=x.positionAbsolute)===null||o===void 0?void 0:o.y)||0)+I,k=S==null?void 0:S.position;if(!k)return null;var L=uie[k],B,A,z,P,K,$;switch(s){case"source":B=N,A=T,z=k,P=m,K=w,$=L;break;case"target":B=m,A=w,z=L,P=N,K=T,$=k;break}if(v)return C.createElement("g",{className:"react-flow__connection"},C.createElement(v,{connectionLineType:d,connectionLineStyle:c,fromNode:x,fromHandle:S,fromX:N,fromY:T,toX:m,toY:w,fromPosition:k,toPosition:L,sourcePosition:z,targetPosition:$,sourceNode:x,sourceHandle:S,targetX:P,targetY:K,sourceX:B,sourceY:A}));var Y="",U={sourceX:B,sourceY:A,sourcePosition:z,targetX:P,targetY:K,targetPosition:$};return d===Ai.Bezier?Y=Id(U):d===Ai.Step?Y=Tw(eM(eM({},U),{},{borderRadius:0})):d===Ai.SmoothStep?Y=Tw(U):d===Ai.SimpleBezier?Y=G5(U):Y="M".concat(B,",").concat(A," ").concat(P,",").concat(K),C.createElement("g",{className:"react-flow__connection"},C.createElement("path",{d:Y,className:"react-flow__connection-path",style:c}))});function Aw(e){"@babel/helpers - typeof";return Aw=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},Aw(e)}var zc,fie=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return C.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:"none",points:"-5,-4 0,0 -5,4"})},pie=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return C.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},tM=(zc={},Qe(zc,qu.Arrow,fie),Qe(zc,qu.ArrowClosed,pie),zc);function hie(e){var t=C.useMemo(function(){var r=tM.hasOwnProperty(e);return r?tM[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 rM(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 vie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rM(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gie=function(t){var r=t.id,n=t.type,i=t.color,o=t.width,a=o===void 0?12.5:o,s=t.height,c=s===void 0?12.5:s,u=t.markerUnits,d=u===void 0?"strokeWidth":u,p=t.strokeWidth,v=t.orient,h=v===void 0?"auto":v,x=hie(n);return C.createElement("marker",{className:"react-flow__arrowhead",id:r,markerWidth:"".concat(a),markerHeight:"".concat(c),viewBox:"-10 -10 20 20",markerUnits:d,orient:h,refX:"0",refY:"0"},C.createElement(x,{color:i,strokeWidth:p}))},mie=function(t){var r=t.defaultColor,n=t.rfId;return function(i){var o=[];return i.edges.reduce(function(a,s){return[s.markerStart,s.markerEnd].forEach(function(c){if(c&&Aw(c)==="object"){var u=Rw(c,n);o.includes(u)||(a.push(vie({id:u,color:c.color||r},c)),o.push(u))}}),a},[]).sort(function(a,s){return a.id.localeCompare(s.id)})}},cB=function(t){var r=t.defaultColor,n=t.rfId,i=zt(C.useCallback(mie({defaultColor:r,rfId:n}),[r,n]),function(o,a){return!(o.length!==a.length||o.some(function(s,c){return s.id!==a[c].id}))});return C.createElement("defs",null,i.map(function(o){return C.createElement(gie,{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})}))};cB.displayName="MarkerDefinitions";var bie=C.memo(cB),yie=[{level:0,isMaxLevel:!0,edges:[]}];function xie(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,s){var c=A5(s.zIndex),u=c?s.zIndex:0;if(r){var d,p,v,h;u=c?s.zIndex:Math.max(((d=t.get(s.source))===null||d===void 0||(p=d[or])===null||p===void 0?void 0:p.z)||0,((v=t.get(s.target))===null||v===void 0||(h=v[or])===null||h===void 0?void 0:h.z)||0)}return a[u]?a[u].push(s):a[u]=[s],n=u>n?u:n,a},{}),o=Object.entries(i).map(function(a){var s=Ge(a,2),c=s[0],u=s[1],d=+c;return{edges:u,level:d,isMaxLevel:d===n}});return o.length===0?yie:o}function wie(e,t,r){var n=zt(C.useCallback(function(i){return e?i.edges.filter(function(o){var a=t.get(o.source),s=t.get(o.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&$ne({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:s.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:s.width,targetHeight:s.height,width:i.width,height:i.height,transform:i.transform})}):i.edges},[e,t]));return xie(n,t,r)}var _ie=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}},uB=function(t){var r=zt(_ie,jr),n=r.connectionNodeId,i=r.connectionHandleType,o=r.nodesConnectable,a=r.elementsSelectable,s=r.width,c=r.height,u=r.connectionMode,d=r.nodeInternals,p=wie(t.onlyRenderVisibleElements,d,t.elevateEdgesOnSelect);if(!s)return null;var v=t.connectionLineType,h=t.defaultMarkerColor,x=t.connectionLineStyle,b=t.connectionLineComponent,m=t.connectionLineContainerStyle,w=n&&i;return C.createElement(C.Fragment,null,p.map(function(y){var _=y.level,S=y.edges,E=y.isMaxLevel;return C.createElement("svg",{key:_,style:{zIndex:_},width:s,height:c,className:"react-flow__edges react-flow__container"},E&&C.createElement(bie,{defaultColor:h,rfId:t.rfId}),C.createElement("g",null,S.map(function(I){var N=Fk(d,I.source),T=Ge(N,3),k=T[0],L=T[1],B=T[2],A=Fk(d,I.target),z=Ge(A,3),P=z[0],K=z[1],$=z[2];if(!B||!$)return null;var Y=I.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 U=t.edgeTypes[Y]||t.edgeTypes.default,Z=u===pa.Strict?K.target:K.target||K.source,D=Bk(L.source,I.sourceHandle||null),W=Bk(Z,I.targetHandle||null),Q=(D==null?void 0:D.position)||Se.Bottom,ee=(W==null?void 0:W.position)||Se.Top;if(!D)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for source handle id: ".concat(I.sourceHandle,"; edge id: ").concat(I.id,". Help: https://reactflow.dev/error#800")),null;if(!W)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for target handle id: ".concat(I.targetHandle,"; edge id: ").concat(I.id,". Help: https://reactflow.dev/error#800")),null;var j=Fne(k,D,Q,P,W,ee),F=j.sourceX,G=j.sourceY,q=j.targetX,X=j.targetY;return C.createElement(U,{key:I.id,id:I.id,className:Zr([I.className,t.noPanClassName]),type:Y,data:I.data,selected:!!I.selected,animated:!!I.animated,hidden:!!I.hidden,label:I.label,labelStyle:I.labelStyle,labelShowBg:I.labelShowBg,labelBgStyle:I.labelBgStyle,labelBgPadding:I.labelBgPadding,labelBgBorderRadius:I.labelBgBorderRadius,style:I.style,source:I.source,target:I.target,sourceHandleId:I.sourceHandle,targetHandleId:I.targetHandle,markerEnd:I.markerEnd,markerStart:I.markerStart,sourceX:F,sourceY:G,targetX:q,targetY:X,sourcePosition:Q,targetPosition:ee,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})})))}),w&&C.createElement("svg",{style:m,width:s,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},C.createElement(die,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:x,connectionLineType:v,isConnectable:o,CustomConnectionLineComponent:b})))};uB.displayName="EdgeRenderer";var Eie=C.memo(uB),Sie=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function Oie(e){var t=e.children,r=zt(Sie);return C.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function Cie(e){var t=W5(),r=C.useRef(!1);C.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var dB=function(t){var r=t.nodeTypes,n=t.edgeTypes,i=t.onMove,o=t.onMoveStart,a=t.onMoveEnd,s=t.onInit,c=t.onNodeClick,u=t.onEdgeClick,d=t.onNodeDoubleClick,p=t.onEdgeDoubleClick,v=t.onNodeMouseEnter,h=t.onNodeMouseMove,x=t.onNodeMouseLeave,b=t.onNodeContextMenu,m=t.onSelectionContextMenu,w=t.connectionLineType,y=t.connectionLineStyle,_=t.connectionLineComponent,S=t.connectionLineContainerStyle,E=t.selectionKeyCode,I=t.multiSelectionKeyCode,N=t.zoomActivationKeyCode,T=t.deleteKeyCode,k=t.onlyRenderVisibleElements,L=t.elementsSelectable,B=t.selectNodesOnDrag,A=t.translateExtent,z=t.minZoom,P=t.maxZoom,K=t.defaultZoom,$=t.defaultPosition,Y=t.preventScrolling,U=t.defaultMarkerColor,Z=t.zoomOnScroll,D=t.zoomOnPinch,W=t.panOnScroll,Q=t.panOnScrollSpeed,ee=t.panOnScrollMode,j=t.zoomOnDoubleClick,F=t.panOnDrag,G=t.onPaneClick,q=t.onPaneScroll,X=t.onPaneContextMenu,te=t.onEdgeUpdate,ne=t.onEdgeContextMenu,de=t.onEdgeMouseEnter,re=t.onEdgeMouseMove,ge=t.onEdgeMouseLeave,ue=t.edgeUpdaterRadius,xe=t.onEdgeUpdateStart,le=t.onEdgeUpdateEnd,se=t.noDragClassName,we=t.noWheelClassName,Re=t.noPanClassName,Te=t.elevateEdgesOnSelect,je=t.id;return Cie(s),C.createElement(aie,{onPaneClick:G,onPaneContextMenu:X,onPaneScroll:q,deleteKeyCode:T,selectionKeyCode:E,multiSelectionKeyCode:I,zoomActivationKeyCode:N,elementsSelectable:L,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:Z,zoomOnPinch:D,zoomOnDoubleClick:j,panOnScroll:W,panOnScrollSpeed:Q,panOnScrollMode:ee,panOnDrag:F,translateExtent:A,minZoom:z,maxZoom:P,defaultZoom:K,defaultPosition:$,onSelectionContextMenu:m,preventScrolling:Y,noDragClassName:se,noWheelClassName:we,noPanClassName:Re},C.createElement(Oie,null,C.createElement(Eie,{edgeTypes:n,onEdgeClick:u,onEdgeDoubleClick:p,connectionLineType:w,connectionLineStyle:y,connectionLineComponent:_,connectionLineContainerStyle:S,onEdgeUpdate:te,onlyRenderVisibleElements:k,onEdgeContextMenu:ne,onEdgeMouseEnter:de,onEdgeMouseMove:re,onEdgeMouseLeave:ge,onEdgeUpdateStart:xe,onEdgeUpdateEnd:le,edgeUpdaterRadius:ue,defaultMarkerColor:U,noPanClassName:Re,elevateEdgesOnSelect:!!Te,rfId:je}),C.createElement(cie,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:d,onNodeMouseEnter:v,onNodeMouseMove:h,onNodeMouseLeave:x,onNodeContextMenu:b,selectNodesOnDrag:B,onlyRenderVisibleElements:k,noPanClassName:Re,noDragClassName:se})))};dB.displayName="GraphView";var Iie=C.memo(dB),fB=function(){return null};fB.displayName="GroupNode";function nM(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 iM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nM(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var es=(function(e){var t=function(n){var i=n.id,o=n.type,a=n.data,s=n.xPos,c=n.yPos,u=n.selected,d=n.onClick,p=n.onMouseEnter,v=n.onMouseMove,h=n.onMouseLeave,x=n.onContextMenu,b=n.onDoubleClick,m=n.style,w=n.className,y=n.isDraggable,_=n.isSelectable,S=n.isConnectable,E=n.selectNodesOnDrag,I=n.sourcePosition,N=n.targetPosition,T=n.hidden,k=n.resizeObserver,L=n.dragHandle,B=n.zIndex,A=n.isParent,z=n.noPanClassName,P=n.noDragClassName,K=n.initialized,$=Sr(),Y=C.useRef(null),U=C.useRef(I),Z=C.useRef(N),D=C.useRef(o),W=_||y||d||p||v||h,Q=Ja(i,$.getState,p),ee=Ja(i,$.getState,v),j=Ja(i,$.getState,h),F=Ja(i,$.getState,x),G=Ja(i,$.getState,b),q=function(ne){if(_&&(!E||!y)&&L5({id:i,store:$}),d){var de=$.getState().nodeInternals.get(i);d(ne,iM({},de))}};C.useEffect(function(){if(Y.current&&!T){var te=Y.current;return k==null||k.observe(te),function(){return k==null?void 0:k.unobserve(te)}}},[T]),C.useEffect(function(){var te=D.current!==o,ne=U.current!==I,de=Z.current!==N;Y.current&&(te||ne||de)&&(te&&(D.current=o),ne&&(U.current=I),de&&(Z.current=N),$.getState().updateNodeDimensions([{id:i,nodeElement:Y.current,forceUpdate:!0}]))},[i,o,I,N]);var X=aB({nodeRef:Y,disabled:T||!y,noDragClassName:P,handleSelector:L,nodeId:i,isSelectable:_,selectNodesOnDrag:E});return T?null:C.createElement("div",{className:Zr(["react-flow__node","react-flow__node-".concat(o),z,w,{selected:u,selectable:_,parent:A}]),ref:Y,style:iM({zIndex:B,transform:"translate(".concat(s,"px,").concat(c,"px)"),pointerEvents:W?"all":"none",visibility:K?"visible":"hidden"},m),onMouseEnter:Q,onMouseMove:ee,onMouseLeave:j,onContextMenu:F,onClick:q,onDoubleClick:G,"data-testid":"rf__node-".concat(i),"data-id":i},C.createElement(Sne,{value:i},C.createElement(e,{id:i,data:a,type:o,xPos:s,yPos:c,selected:u,isConnectable:S,sourcePosition:I,targetPosition:N,dragging:X,dragHandle:L,zIndex:B})))};return t.displayName="NodeWrapper",C.memo(t)});function oM(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?oM(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rie(e){var t={input:es(e.input||rB),default:es(e.default||Mw),output:es(e.output||iB),group:es(e.group||fB)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=es(e[o]||Mw),i},r);return aM(aM({},t),n)}function sM(e,t){var r=C.useRef(null),n=C.useMemo(function(){if(process.env.NODE_ENV==="development"){var i=Object.keys(e);jr(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 lM(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 pB=function(t){var r=t.children,n=!0;try{Sr()}catch{n=!1}return n?C.createElement(C.Fragment,null,r):C.createElement(Ure,{createStore:Gre},r)};pB.displayName="ReactFlowWrapper";var Nie=["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 cM(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 uM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cM(Object(r),!0).forEach(function(n){Qe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}lM(Dne),lM(qne);var Tie={input:rB,default:Mw,output:iB},Pie={default:Pw,straight:Z5,step:X5,smoothstep:N_,simplebezier:K5},kie=[15,15],Mie=[0,0],hB=C.forwardRef(function(e,t){var r=e.nodes,n=e.edges,i=e.defaultNodes,o=e.defaultEdges,a=e.className,s=e.nodeTypes,c=s===void 0?Tie:s,u=e.edgeTypes,d=u===void 0?Pie:u,p=e.onNodeClick,v=e.onEdgeClick,h=e.onInit,x=e.onMove,b=e.onMoveStart,m=e.onMoveEnd,w=e.onConnect,y=e.onConnectStart,_=e.onConnectStop,S=e.onConnectEnd,E=e.onClickConnectStart,I=e.onClickConnectStop,N=e.onClickConnectEnd,T=e.onNodeMouseEnter,k=e.onNodeMouseMove,L=e.onNodeMouseLeave,B=e.onNodeContextMenu,A=e.onNodeDoubleClick,z=e.onNodeDragStart,P=e.onNodeDrag,K=e.onNodeDragStop,$=e.onNodesDelete,Y=e.onEdgesDelete,U=e.onSelectionChange,Z=e.onSelectionDragStart,D=e.onSelectionDrag,W=e.onSelectionDragStop,Q=e.onSelectionContextMenu,ee=e.connectionMode,j=ee===void 0?pa.Strict:ee,F=e.connectionLineType,G=F===void 0?Ai.Bezier:F,q=e.connectionLineStyle,X=e.connectionLineComponent,te=e.connectionLineContainerStyle,ne=e.deleteKeyCode,de=ne===void 0?"Backspace":ne,re=e.selectionKeyCode,ge=re===void 0?"Shift":re,ue=e.multiSelectionKeyCode,xe=ue===void 0?"Meta":ue,le=e.zoomActivationKeyCode,se=le===void 0?"Meta":le,we=e.snapToGrid,Re=we===void 0?!1:we,Te=e.snapGrid,je=Te===void 0?kie:Te,Ke=e.onlyRenderVisibleElements,qe=Ke===void 0?!1:Ke,et=e.selectNodesOnDrag,ht=et===void 0?!0:et,St=e.nodesDraggable,Ve=e.nodesConnectable,De=e.elementsSelectable,it=e.minZoom,ot=it===void 0?.5:it,Qt=e.maxZoom,Bt=Qt===void 0?2:Qt,Tt=e.defaultZoom,Le=Tt===void 0?1:Tt,Ye=e.defaultPosition,bt=Ye===void 0?Mie:Ye,Ot=e.translateExtent,Ht=Ot===void 0?Nw:Ot,Lr=e.preventScrolling,mn=Lr===void 0?!0:Lr,Ct=e.nodeExtent,It=e.defaultMarkerColor,Pt=It===void 0?"#b1b1b7":It,er=e.zoomOnScroll,sr=er===void 0?!0:er,Xt=e.zoomOnPinch,pr=Xt===void 0?!0:Xt,Mn=e.panOnScroll,Dt=Mn===void 0?!1:Mn,tr=e.panOnScrollSpeed,hr=tr===void 0?.5:tr,bn=e.panOnScrollMode,Cr=bn===void 0?ta.Free:bn,zr=e.zoomOnDoubleClick,Kn=zr===void 0?!0:zr,$i=e.panOnDrag,Hd=$i===void 0?!0:$i,Wd=e.onPaneClick,Ud=e.onPaneScroll,Gd=e.onPaneContextMenu,Kd=e.children,vl=e.onEdgeUpdate,Yd=e.onEdgeContextMenu,Xd=e.onEdgeDoubleClick,Zd=e.onEdgeMouseEnter,Jd=e.onEdgeMouseMove,Qd=e.onEdgeMouseLeave,ef=e.onEdgeUpdateStart,wo=e.onEdgeUpdateEnd,gl=e.edgeUpdaterRadius,_o=gl===void 0?10:gl,tf=e.onNodesChange,rf=e.onEdgesChange,ml=e.noDragClassName,bl=ml===void 0?"nodrag":ml,Ra=e.noWheelClassName,yl=Ra===void 0?"nowheel":Ra,xl=e.noPanClassName,nf=xl===void 0?"nopan":xl,wl=e.fitView,of=wl===void 0?!1:wl,_l=e.fitViewOptions,Na=e.connectOnClick,El=Na===void 0?!0:Na,Ta=e.attributionPosition,af=e.proOptions,Sl=e.defaultEdgeOptions,Vi=e.elevateEdgesOnSelect,Ol=Vi===void 0?!1:Vi,Eo=Od(e,Nie),Cl=sM(c,Rie),Il=sM(d,Bne);return C.createElement("div",uM(uM({},Eo),{},{ref:t,className:Zr(["react-flow",a])}),C.createElement(pB,null,C.createElement(Iie,{onInit:h,onMove:x,onMoveStart:b,onMoveEnd:m,onNodeClick:p,onEdgeClick:v,onNodeMouseEnter:T,onNodeMouseMove:k,onNodeMouseLeave:L,onNodeContextMenu:B,onNodeDoubleClick:A,nodeTypes:Cl,edgeTypes:Il,connectionLineType:G,connectionLineStyle:q,connectionLineComponent:X,connectionLineContainerStyle:te,selectionKeyCode:ge,deleteKeyCode:de,multiSelectionKeyCode:xe,zoomActivationKeyCode:se,onlyRenderVisibleElements:qe,selectNodesOnDrag:ht,translateExtent:Ht,minZoom:ot,maxZoom:Bt,defaultZoom:Le,defaultPosition:bt,preventScrolling:mn,zoomOnScroll:sr,zoomOnPinch:pr,zoomOnDoubleClick:Kn,panOnScroll:Dt,panOnScrollSpeed:hr,panOnScrollMode:Cr,panOnDrag:Hd,onPaneClick:Wd,onPaneScroll:Ud,onPaneContextMenu:Gd,onSelectionContextMenu:Q,onEdgeUpdate:vl,onEdgeContextMenu:Yd,onEdgeDoubleClick:Xd,onEdgeMouseEnter:Zd,onEdgeMouseMove:Jd,onEdgeMouseLeave:Qd,onEdgeUpdateStart:ef,onEdgeUpdateEnd:wo,edgeUpdaterRadius:_o,defaultMarkerColor:Pt,noDragClassName:bl,noWheelClassName:yl,noPanClassName:nf,elevateEdgesOnSelect:Ol,id:Eo==null?void 0:Eo.id}),C.createElement(Mne,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:w,onConnectStart:y,onConnectStop:_,onConnectEnd:S,onClickConnectStart:E,onClickConnectStop:I,onClickConnectEnd:N,nodesDraggable:St,nodesConnectable:Ve,elementsSelectable:De,minZoom:ot,maxZoom:Bt,nodeExtent:Ct,onNodesChange:tf,onEdgesChange:rf,snapToGrid:Re,snapGrid:je,connectionMode:j,translateExtent:Ht,connectOnClick:El,defaultEdgeOptions:Sl,fitView:of,fitViewOptions:_l,onNodesDelete:$,onEdgesDelete:Y,onNodeDragStart:z,onNodeDrag:P,onNodeDragStop:K,onSelectionDrag:D,onSelectionDragStart:Z,onSelectionDragStop:W}),U&&C.createElement(Pne,{onSelectionChange:U}),Kd,C.createElement(gne,{proOptions:af,position:Ta})))});hB.displayName="ReactFlow";function vB(e){return function(t){var r=C.useState(t),n=Ge(r,2),i=n[0],o=n[1],a=C.useCallback(function(s){return o(function(c){return e(s,c)})},[]);return[i,o,a]}}var Aie=vB(j5),Die=vB(zre);function dM(e,t){const{width:r,height:n,positionAbsolute:i}=e,o=t.positionAbsolute,a=r/2,s=n/2,c=i.x+a,u=i.y+s,d=o.x+a,p=o.y+s,v=(d-c)/(2*a)-(p-u)/(2*s),h=(d-c)/(2*a)+(p-u)/(2*s),x=1/(Math.abs(v)+Math.abs(h)),b=x*v,m=x*h,w=a*(b+m)+c,y=s*(-b+m)+u;return{x:w,y}}function fM(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 gB(e,t){const r=dM(e,t),n=dM(t,e),i=fM(e,r),o=fM(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const jie=({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:s}=gB(i,o),c=Id({sourceX:a,sourceY:s,sourcePosition:r,targetPosition:n,targetX:e,targetY:t});return O.jsxs("g",{children:[O.jsx("path",{fill:"none",stroke:"#222",strokeWidth:1.5,className:"animated",d:c}),O.jsx("circle",{cx:e,cy:t,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})},qie=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=zt(C.useCallback(x=>x.nodeInternals.get(t),[t])),a=zt(C.useCallback(x=>x.nodeInternals.get(r),[r]));if(!o||!a)return null;const{sx:s,sy:c,tx:u,ty:d,sourcePos:p,targetPos:v}=gB(o,a),h=Id({sourceX:s,sourceY:c,sourcePosition:p,targetPosition:v,targetX:u,targetY:d});return O.jsx("path",{id:e,className:"react-flow__edge-path",d:h,markerEnd:n,style:i})},pM=172,hM=36,Lie={custom:qie},zie=(e,t,r="LR")=>{const n=new JP.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:pM,height:hM})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),JP.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-pM/2,y:a.y-hM/2},o}),{nodes:e,edges:t}},Bie=()=>{},Fie=({data:e,dict:t,onSelect:r=Bie})=>{const{nodes:n,edges:i}=zie(Object.values(t).filter(p=>p.id===e.selected||e.parents.flat().includes(p.id)||e.children.flat().includes(p.id)).map(p=>({id:p.id,type:p.parents.length===0?"input":p.includes.length===0?"output":"default",sourcePosition:Se.Right,targetPosition:Se.Left,data:{label:p.privilege},position:{x:0,y:0},className:p.id===e.selected?"highlighted":"",selected:p.id===e.selected})),e.links.map(({source:p,target:v})=>({id:`e${p}-${v}`,source:p,target:v}))),[o,a,s]=Aie(n),[c,u,d]=Die(i);return C.useEffect(()=>{a([...n]),u([...i])},[e]),O.jsx(hB,{nodes:o,edges:c,fitView:!0,onNodesChange:s,onEdgesChange:d,onNodeClick:(p,v)=>{r(v.id)},defaultZoom:.5,edgeTypes:Lie,connectionLineComponent:jie,children:O.jsx(hne,{variant:po.Dots,color:"#81818140",gap:18,size:1})})};var mB=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(mB||{});const bB=e=>{switch(e){case"entityCollection":return fe.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return fe.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return fe.ESubPermissionType.DS_METHOD;case"entity":return fe.ESubPermissionType.ENTITY_METHOD;default:return fe.EPermissionType.METHOD}},vM=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[mB[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===fe.EPermissionType.METHOD&&(c.subType=bB(a.applyTo)),n.push(c)}});return n},$ie=(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:fe.EPermissionType.SINGLETON_METHOD})});return r};function P_(e,t=[],r=[],n=[]){const i=vM(r,e,fe.EPermissionType.ATTRIBUTE),o=vM(r,e,fe.EPermissionType.METHOD),a=$ie(n,e),s=t.filter(p=>!e||`ds.${p.name.toLowerCase()}`.includes(e)).map(p=>({applyTo:`ds.${p.name}`,type:fe.ESubPermissionType.DS_METHOD})),c=[],u=[];return r.filter(p=>p.name.toLowerCase().includes(e)).forEach(p=>{c.push({applyTo:p.name,type:fe.EPermissionType.DATACLASS})}),n.filter(p=>p.name.toLowerCase().includes(e)).forEach(p=>{u.push({applyTo:p.name,type:fe.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:fe.EPermissionType.DATASTORE}].filter(p=>!e||`ds.${p.applyTo.toLowerCase()}`.includes(e)),...s,...c,...i,...o,...u,...a].reduce((p,v)=>{const h=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],[x,b]=v.applyTo.split("."),m=p.find(w=>w.prefix===x);return m?(m.resources=[...m.resources,v].sort((w,y)=>{const _=h.indexOf(w.type),S=h.indexOf(y.type);return _>S?1:-1}),m.type=b?m.type:v.type,[...p].sort((w,y)=>{const _=h.indexOf(w.type),S=h.indexOf(y.type);return _>S?1:-1})):[...p,{prefix:x,type:b?null:v.type,resources:[v]}]},[]).reduce((p,v)=>[...p,...v.resources],[])}const Vie=(e=[],t=[],r=[])=>{const n=P_("",e,t,r),i={ds:{applyTo:"ds",type:fe.EPermissionType.DATASTORE,methods:[],dataClasses:[],singletons:[]}},o=(s,c)=>s.applyTo.localeCompare(c.applyTo);n.forEach(s=>{const[c,u]=s.applyTo.split(".");if(u||(s.type===fe.EPermissionType.DATACLASS?i.ds.dataClasses.push({applyTo:c,type:fe.EPermissionType.DATACLASS,methods:[],attributes:[]}):s.type===fe.EPermissionType.SINGLETON&&i.ds.singletons.push({applyTo:c,type:fe.EPermissionType.SINGLETON,methods:[],attributes:[]})),u){const d=(p,v,h)=>{p.forEach(x=>{x.applyTo===c&&x[v].push(h)})};[fe.ESubPermissionType.DS_METHOD,fe.ESubPermissionType.DATACLASS_METHOD,fe.ESubPermissionType.ENTITY_METHOD,fe.ESubPermissionType.ENTITY_SEL_METHOD].includes(s.type)?c==="ds"?i.ds.methods.push(s):d(i.ds.dataClasses,"methods",s):s.type===fe.EPermissionType.ATTRIBUTE?(d(i.ds.dataClasses,"attributes",s),d(i.ds.singletons,"attributes",s)):s.type===fe.EPermissionType.SINGLETON_METHOD&&d(i.ds.singletons,"methods",s)}});const a=s=>{s.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},yB=(e,t=[])=>{const r={};return Object.entries(e).forEach(([n,i])=>{r[n]={...i,resources:i.resources.map(o=>{var a,s,c;if(o.type===fe.EPermissionType.METHOD&&t.length){const[u,d]=o.resource.split("."),p=u==="ds"?"dataStore":((c=(s=(a=t.find(v=>v.name===u))==null?void 0:a.methods)==null?void 0:s.find(v=>v.name===d))==null?void 0:c.applyTo)||"dataClass";return{...o,type:o.type,subType:bB(p)}}return o})}}),r},xB=(e,t)=>Object.entries(e).map(([r,n])=>{const i=n.resources.map(o=>{var u,d,p,v,h,x,b,m;const[a,s]=o.resource.split(".");let c=!0;switch(o.type){case fe.EPermissionType.DATASTORE:c=!!t;break;case fe.EPermissionType.METHOD:a==="ds"?c=!!t.methods.find(w=>w.name===s&&w.applyTo==="dataStore"):c=!!((d=(u=t.dataClasses[a])==null?void 0:u.methods)!=null&&d.find(w=>w.name===s));break;case fe.ESubPermissionType.DS_METHOD:c=!!t.methods.find(w=>w.name===s&&w.applyTo==="dataStore");break;case fe.EPermissionType.DATACLASS:c=!!t.dataClasses[a];break;case fe.EPermissionType.ATTRIBUTE:c=!!((v=(p=t.dataClasses[a])==null?void 0:p.attributes)!=null&&v.find(w=>w.name===s));break;case fe.ESubPermissionType.ENTITY_SEL_METHOD:c=!!((h=t.dataClasses[a])!=null&&h.methods.find(w=>w.name===s&&w.applyTo==="entityCollection"));break;case fe.ESubPermissionType.DATACLASS_METHOD:c=!!((x=t.dataClasses[a])!=null&&x.methods.find(w=>w.name===s&&w.applyTo==="dataClass"));break;case fe.ESubPermissionType.ENTITY_METHOD:c=!!((b=t.dataClasses[a])!=null&&b.methods.find(w=>w.name===s&&w.applyTo==="entity"));break;case fe.EPermissionType.SINGLETON_METHOD:c=!!((m=t.singletons[a])!=null&&m.methods.find(w=>w.name===s));break;case fe.EPermissionType.SINGLETON:c=!!t.singletons[a];break;default:c=!0}return{...o,exists:c}});return{[r]:{...n,resources:i}}}).reduce((r,n)=>({...r,...n}),{});var gy={exports:{}};/*!
57
- Copyright (c) 2018 Jed Watson.
58
- Licensed under the MIT License (MIT), see
59
- http://jedwatson.github.io/classnames
60
- */var gM;function Hie(){return gM||(gM=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(o=i(o,n(s)))}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 s in o)t.call(o,s)&&o[s]&&(a=i(a,s));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})()})(gy)),gy.exports}var Wie=Hie();const Kr=Li(Wie);var _s={exports:{}};/**
40
+ */var cN;function NX(){return cN||(cN=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 S(ae){return!!(typeof ae=="string"||typeof ae=="function"||ae===r||ae===i||ae===y||ae===n||ae===c||ae===d||ae===x||w||typeof ae=="object"&&ae!==null&&(ae.$$typeof===h||ae.$$typeof===f||ae.$$typeof===o||ae.$$typeof===a||ae.$$typeof===u||ae.$$typeof===m||ae.$$typeof===p||ae[0]===v))}function E(ae){if(typeof ae=="object"&&ae!==null){var ce=ae.$$typeof;switch(ce){case e:var we=ae.type;switch(we){case r:case i:case n:case c:case d:return we;default:var Se=we&&we.$$typeof;switch(Se){case a:case u:case h:case f:case o:return Se;default:return ce}}case t:return ce}}}var _=a,R=o,I=e,N=u,D=r,L=h,B=f,U=t,j=i,T=n,G=c,z=!1,X=!1;function Z(ae){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function re(ae){return X||(X=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(ae){return E(ae)===a}function Q(ae){return E(ae)===o}function ue(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===e}function oe(ae){return E(ae)===u}function H(ae){return E(ae)===r}function K(ae){return E(ae)===h}function $(ae){return E(ae)===f}function k(ae){return E(ae)===t}function F(ae){return E(ae)===i}function te(ae){return E(ae)===n}function ie(ae){return E(ae)===c}Qe.ContextConsumer=_,Qe.ContextProvider=R,Qe.Element=I,Qe.ForwardRef=N,Qe.Fragment=D,Qe.Lazy=L,Qe.Memo=B,Qe.Portal=U,Qe.Profiler=j,Qe.StrictMode=T,Qe.Suspense=G,Qe.isAsyncMode=Z,Qe.isConcurrentMode=re,Qe.isContextConsumer=W,Qe.isContextProvider=Q,Qe.isElement=ue,Qe.isForwardRef=oe,Qe.isFragment=H,Qe.isLazy=K,Qe.isMemo=$,Qe.isPortal=k,Qe.isProfiler=F,Qe.isStrictMode=te,Qe.isSuspense=ie,Qe.isValidElementType=S,Qe.typeOf=E})()),Qe}var lN;function TX(){return lN||(lN=1,process.env.NODE_ENV==="production"?Su.exports=PX():Su.exports=NX()),Su.exports}var fN=TX();function dN(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function hN(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function Bm(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return hN(r.overflowY,t)||hN(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 Ou(e,t,r,n,i,o,a,u){return o<e&&a>t||o>e&&a<t?0:o<=e&&u<=r||a>=t&&u>=r?o-e-n:a>t&&u<r||o<e&&u>r?a-t+i:0}var AX=function(e,t){var r=window,n=t.inline,i=t.boundary,o=t.skipOverflowHiddenElements,a=typeof i=="function"?i:function(ce){return ce!==i};if(!dN(e))throw new TypeError("Invalid target");for(var u,c,d=document.scrollingElement||document.documentElement,f=[],h=e;dN(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&&Bm(h)&&!Bm(document.documentElement)||h!=null&&Bm(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,S=x.top,E=x.right,_=x.bottom,R=x.left,I=S,N=n==="center"?R+w/2:n==="end"?E:R,D=[],L=0;L<f.length;L++){var B=f[L],U=B.getBoundingClientRect(),j=U.height,T=U.width,G=U.top,z=U.right,X=U.bottom,Z=U.left;if(S>=0&&R>=0&&_<=v&&E<=p&&S>=G&&_<=X&&R>=Z&&E<=z)return D;var re=getComputedStyle(B),W=parseInt(re.borderLeftWidth,10),Q=parseInt(re.borderTopWidth,10),ue=parseInt(re.borderRightWidth,10),oe=parseInt(re.borderBottomWidth,10),H=0,K=0,$="offsetWidth"in B?B.offsetWidth-B.clientWidth-W-ue:0,k="offsetHeight"in B?B.offsetHeight-B.clientHeight-Q-oe:0,F="offsetWidth"in B?B.offsetWidth===0?0:T/B.offsetWidth:0,te="offsetHeight"in B?B.offsetHeight===0?0:j/B.offsetHeight:0;if(d===B)H=Ou(y,y+v,v,Q,oe,y+I,y+I+b,b),K=n==="start"?N:n==="center"?N-p/2:n==="end"?N-p:Ou(m,m+p,p,W,ue,m+N,m+N+w,w),H=Math.max(0,H+y),K=Math.max(0,K+m);else{H=Ou(G,X,j,Q,oe+k,I,I+b,b),K=n==="start"?N-Z-W:n==="center"?N-(Z+T/2)+$/2:n==="end"?N-z+ue+$:Ou(Z,z,T,W,ue+$,N,N+w,w);var ie=B.scrollLeft,ae=B.scrollTop;I+=ae-(H=Math.max(0,Math.min(ae+H/te,B.scrollHeight-j/te+k))),N+=ie-(K=Math.max(0,Math.min(ie+K/F,B.scrollWidth-T/F+$)))}D.push({el:B,top:H,left:K})}return D},cc=function(){return cc=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},cc.apply(this,arguments)};let MX=0;function pN(e){return typeof e=="function"?e:br}function br(){}function b2(e,t){if(!e)return;AX(e,{boundary:t}).forEach(n=>{let{el:i,top:o,left:a}=n;i.scrollTop=o,i.scrollLeft=a})}function vN(e,t,r){return e===t||t instanceof r.Node&&e.contains&&e.contains(t)}function Gx(e,t){let r;function n(){r&&clearTimeout(r)}function i(){for(var o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];n(),r=setTimeout(()=>{r=null,e(...a)},t)}return i.cancel=n,i}function Ot(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(u=>(u&&u(n,...o),n.preventDownshiftDefault||n.hasOwnProperty("nativeEvent")&&n.nativeEvent.preventDownshiftDefault))}}function si(){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 x2(){return String(MX++)}function w2(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 gN(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function _2(e){return typeof e.type=="string"}function E2(e){return e.props}function DX(e,t){console.error(`The property "${t}" is required in "${e}"`)}const jX=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Cu(e){e===void 0&&(e={});const t={};return jX.forEach(r=>{e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function lc(e,t){return Object.keys(e).reduce((r,n)=>(r[n]=fc(t,n)?t[n]:e[n],r),{})}function fc(e,t){return e[t]!==void 0}function Vb(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 so(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=xi(e,a,r,n,i);return u===-1?t>=r?-1:t:u}function xi(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?xi(1,0,r,n,!1):xi(-1,r-1,r,n,!1):-1}function dc(e,t,r,n){return n===void 0&&(n=!0),t.some(i=>i&&(vN(i,e,r)||n&&vN(i,r.document.activeElement,r)))}let Kx=br;process.env.NODE_ENV!=="production"&&(Kx=(e,t,r)=>{const n="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(e).forEach(i=>{t[i]!==void 0&&r[i]===void 0?console.error(`downshift: A component has changed the controlled prop "${i}" to be uncontrolled. ${n}`):t[i]===void 0&&r[i]!==void 0&&console.error(`downshift: A component has changed the uncontrolled prop "${i}" to be controlled. ${n}`)})});const kX=Gx(e=>{O2(e).textContent=""},500);function S2(e,t){const r=O2(t);e&&(r.textContent=e,kX(t))}function O2(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 C2=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,R2=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,I2=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,Bu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Fu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,P2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,N2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,T2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,A2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,M2=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,D2=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,j2=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,q2=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,Wb=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,k2=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,L2=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,B2=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16;var LX=Object.freeze({__proto__:null,unknown:C2,mouseUp:R2,itemMouseEnter:I2,keyDownArrowUp:Bu,keyDownArrowDown:Fu,keyDownEscape:P2,keyDownEnter:N2,keyDownHome:T2,keyDownEnd:A2,clickItem:M2,blurInput:D2,changeInput:j2,keyDownSpaceButton:q2,clickButton:Wb,blurButton:k2,controlledPropUpdatedSelectedItem:L2,touchEnd:B2});const BX=(()=>{class e extends A.Component{constructor(r){var n;super(r),n=this,this.id=this.props.id||`downshift-${x2()}`,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=Cu(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=Cu(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 S={};return v&&w.selectedItem!==b.selectedItem&&(m=w.selectedItem),w.type=w.type||C2,Object.keys(w).forEach(E=>{b[E]!==w[E]&&(y[E]=w[E]),E!=="type"&&(w[E],fc(this.props,E)||(S[E]=w[E]))}),x&&w.hasOwnProperty("inputValue")&&this.props.onInputValueChange(w.inputValue,{...this.getStateAndHelpers(),...w}),S},()=>{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]:si(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:Fu})}else this.internalSetState({isOpen:!0,type:Fu},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=so(1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:Fu})}})},ArrowUp(h){if(h.preventDefault(),this.getState().isOpen){const p=h.shiftKey?-5:-1;this.moveHighlightedIndex(p,{type:Bu})}else this.internalSetState({isOpen:!0,type:Bu},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=so(-1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:Bu})}})},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:N2})}},Escape(h){h.preventDefault(),this.reset({type:P2,...!this.state.isOpen&&{selectedItem:null,inputValue:""}})}},this.buttonKeyDownHandlers={...this.keyDownHandlers," "(h){h.preventDefault(),this.toggleMenu({type:q2})}},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=xi(1,0,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:T2})},End(h){const{isOpen:p}=this.getState();if(!p)return;h.preventDefault();const v=this.getItemCount();if(v<=0||!p)return;const m=xi(-1,v-1,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:A2})}},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(),S={onClick:Ot(p,n.buttonHandleClick),onKeyDown:Ot(m,n.buttonHandleKeyDown),onKeyUp:Ot(y,n.buttonHandleKeyUp),onBlur:Ot(x,n.buttonHandleBlur)},E=b.disabled?{}:S;return{type:"button",role:"button","aria-label":w?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0,...E,...b}},this.buttonHandleKeyUp=h=>{h.preventDefault()},this.buttonHandleKeyDown=h=>{const p=Vb(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:Wb}):this.internalSetTimeout(()=>this.toggleMenu({type:Wb}))},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:k2})})},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,S={};w="onChange";const{inputValue:E,isOpen:_,highlightedIndex:R}=n.getState();return b.disabled||(S={[w]:Ot(m,y,n.inputHandleChange),onKeyDown:Ot(p,n.inputHandleKeyDown),onBlur:Ot(v,n.inputHandleBlur)}),{"aria-autocomplete":"list","aria-activedescendant":_&&typeof R=="number"&&R>=0?n.getItemId(R):null,"aria-controls":_?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:E,id:n.inputId,...S,...b}},this.inputHandleKeyDown=h=>{const p=Vb(h);p&&this.inputKeyDownHandlers[p]&&this.inputKeyDownHandlers[p].call(this,h)},this.inputHandleChange=h=>{this.internalSetState({type:j2,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:D2})})},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]:si(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:DX("getItemProps","item"),...w}=h===void 0?{}:h;x===void 0?(n.items.push(b),x=n.items.indexOf(b)):n.items[x]=b;const S="onClick",E=m,_={onMouseMove:Ot(p,()=>{x!==n.getState().highlightedIndex&&(n.setHighlightedIndex(x,{type:I2}),n.avoidScrolling=!0,n.internalSetTimeout(()=>n.avoidScrolling=!1,250))}),onMouseDown:Ot(v,I=>{I.preventDefault()}),[S]:Ot(E,()=>{n.selectItemAtIndex(x,{type:M2})})},R=w.disabled?{onMouseDown:_.onMouseDown}:_;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=Cu(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=Cu(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=Gx(()=>{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,S2(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),lc(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=so(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:S,setHighlightedIndex:E,clearSelection:_,clearItems:R,reset:I,setItemCount:N,unsetItemCount:D,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:S,setHighlightedIndex:E,clearSelection:_,clearItems:R,setItemCount:N,unsetItemCount:D,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&&mN(this._menuNode,this.getMenuProps);{const r=()=>{this.isMouseDown=!0},n=c=>{this.isMouseDown=!1,!dc(c.target,[this._rootNode,this._menuNode],this.props.environment)&&this.getState().isOpen&&this.reset({type:R2},()=>this.props.onOuterClick(this.getStateAndHelpers()))},i=()=>{this.isTouchMove=!1},o=()=>{this.isTouchMove=!0},a=c=>{const d=dc(c.target,[this._rootNode,this._menuNode],this.props.environment,!1);!this.isTouchMove&&!d&&this.getState().isOpen&&this.reset({type:B2},()=>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"&&(Kx(this.state,r,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&mN(this._menuNode,this.getMenuProps)),fc(this.props,"selectedItem")&&this.props.selectedItemChanged(r.selectedItem,this.props.selectedItem)&&this.internalSetState({type:L2,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(n,r)&&this.scrollHighlightedItemIntoView(),this.updateStatus()}componentWillUnmount(){this.cleanup()}render(){const r=gN(this.props.children,br);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=gN(r(this.getStateAndHelpers()));if(!n)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&FX(n,this.getRootProps),n;if(_2(n))return A.cloneElement(n,this.getRootProps(E2(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:w2,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:br,onInputValueChange:br,onUserAction:br,onChange:br,onSelect:br,onOuterClick:br,selectedItemChanged:(t,r)=>t!==r,environment:typeof window>"u"?{}:window,stateReducer:(t,r)=>r,suppressRefError:!1,scrollIntoView:b2},e.stateChangeTypes=LX,e})();process.env.NODE_ENV!=="production"&&(BX.propTypes={children:fe.func,defaultHighlightedIndex:fe.number,defaultIsOpen:fe.bool,initialHighlightedIndex:fe.number,initialSelectedItem:fe.any,initialInputValue:fe.string,initialIsOpen:fe.bool,getA11yStatusMessage:fe.func,itemToString:fe.func,onChange:fe.func,onSelect:fe.func,onStateChange:fe.func,onInputValueChange:fe.func,onUserAction:fe.func,onOuterClick:fe.func,selectedItemChanged:fe.func,stateReducer:fe.func,itemCount:fe.number,id:fe.string,environment:fe.shape({addEventListener:fe.func,removeEventListener:fe.func,document:fe.shape({getElementById:fe.func,activeElement:fe.any,body:fe.any})}),suppressRefError:fe.bool,scrollIntoView:fe.func,selectedItem:fe.any,isOpen:fe.bool,inputValue:fe.string,highlightedIndex:fe.number,labelId:fe.string,inputId:fe.string,menuId:fe.string,getItemId:fe.func});function mN(e,t){let{refKey:r}=t;e||console.error(`downshift: The ref prop "${r}" from getMenuProps was not applied correctly on your menu element.`)}function FX(e,t){let{refKey:r}=t;const n=r!=="ref",i=!_2(e);i&&!n&&!fN.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}"`),!fN.isForwardRef(e)&&!E2(e)[r]&&console.error(`downshift: You must apply the ref prop "${r}" from getRootProps onto your root element.`)}const F2={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function $X(e,t,r){const{props:n,type:i}=e,o={};Object.keys(t).forEach(a=>{zX(a,e,t,r),r[a]!==t[a]&&(o[a]=r[a])}),n.onStateChange&&Object.keys(o).length&&n.onStateChange({type:i,...o})}function zX(e,t,r,n){const{props:i,type:o}=t,a=`on${Yx(e)}Change`;i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a]({type:o,...n})}function HX(e,t){return t.changes}function UX(e){const{selectedItem:t,itemToString:r}=e;return t?`${r(t)} has been selected.`:""}const VX=Gx((e,t)=>{S2(e(),t)},200),WX=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?A.useLayoutEffect:A.useEffect;function GX(e){let{id:t=`downshift-${x2()}`,labelId:r,menuId:n,getItemId:i,toggleButtonId:o,inputId:a}=e;return A.useRef({labelId:r||`${t}-label`,menuId:n||`${t}-menu`,getItemId:i||(c=>`${t}-item-${c}`),toggleButtonId:o||`${t}-toggle-button`,inputId:a||`${t}-input`}).current}function KX(e,t,r){return e!==void 0?e:r.length===0?-1:r.indexOf(t)}function YX(e){return e?String(e):""}function Yx(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function $2(e){const t=A.useRef(e);return t.current=e,t}function XX(e,t,r){const n=A.useRef(),i=A.useRef(),o=A.useCallback((h,p)=>{i.current=p,h=lc(h,p.props);const v=e(h,p);return p.props.stateReducer(h,{...p,changes:v})},[e]),[a,u]=A.useReducer(o,t),c=$2(r),d=A.useCallback(h=>u({props:c.current,...h}),[c]),f=i.current;return A.useEffect(()=>{f&&n.current&&n.current!==a&&$X(f,lc(n.current,f.props),a),n.current=a},[a,r,f]),[a,d]}const Ia={itemToString:YX,stateReducer:HX,getA11ySelectionMessage:UX,scrollIntoView:b2,circularNavigation:!1,environment:typeof window>"u"?{}:window};function Zr(e,t,r){r===void 0&&(r=F2);const n=e[`default${Yx(t)}`];return n!==void 0?n:r[t]}function Ru(e,t,r){r===void 0&&(r=F2);const n=e[t];if(n!==void 0)return n;const i=e[`initial${Yx(t)}`];return i!==void 0?i:Zr(e,t,r)}function ZX(e){const t=Ru(e,"selectedItem"),r=Ru(e,"isOpen"),n=Ru(e,"highlightedIndex"),i=Ru(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.indexOf(t):n,isOpen:r,selectedItem:t,inputValue:i}}function hc(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):so(r,i.indexOf(u),i.length,n,!1):r===0?-1:r<0?i.length-1:0}function JX(e,t,r,n){const i=A.useRef({isMouseDown:!1,isTouchMove:!1});return A.useEffect(()=>{const o=()=>{i.current.isMouseDown=!0},a=f=>{i.current.isMouseDown=!1,e&&!dc(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&&!dc(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 z2=()=>br;process.env.NODE_ENV!=="production"&&(z2=function(){const e=A.useRef(!0);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const i=A.useRef(r.reduce((a,u)=>(a[u]={},a),{}));return A.useEffect(()=>{Object.keys(i.current).forEach(a=>{const u=i.current[a];if(e.current&&!Object.keys(u).length){console.error(`downshift: You forgot to call the ${a} getter function on your component / element.`);return}const{suppressRefError:c,refKey:d,elementRef:f}=u;(!f||!f.current)&&!c&&console.error(`downshift: The ref prop "${d}" from ${a} was not applied correctly on your element.`)}),e.current=!1}),A.useCallback((a,u,c,d)=>{i.current[a]={suppressRefError:u,refKey:c,elementRef:d}},[])});function yN(e,t,r){let{isInitialMount:n,highlightedIndex:i,items:o,environment:a,...u}=r;A.useEffect(()=>{n||VX(()=>e({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length,...u}),a.document)},t)}function QX(e){let{highlightedIndex:t,isOpen:r,itemRefs:n,getItemNodeFromIndex:i,menuElement:o,scrollIntoView:a}=e;const u=A.useRef(!0);return WX(()=>{t<0||!r||!Object.keys(n.current).length||(u.current===!1?u.current=!0:a(i(t),o))},[t]),u}let H2=br;process.env.NODE_ENV!=="production"&&(H2=e=>{let{isInitialMount:t,props:r,state:n}=e;const i=A.useRef(r);A.useEffect(()=>{t||(Kx(n,i.current,r),i.current=r)},[n,r,t])});function eZ(e,t,r){const{type:n,props:i}=t;let o;switch(n){case r.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case r.MenuMouseLeave:o={highlightedIndex:-1};break;case r.ToggleButtonClick:case r.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:hc(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:hc(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:Zr(i,"highlightedIndex"),isOpen:Zr(i,"isOpen"),selectedItem:Zr(i,"selectedItem"),inputValue:Zr(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...o}}fe.array.isRequired,fe.func,fe.func,fe.func,fe.bool,fe.number,fe.number,fe.number,fe.bool,fe.bool,fe.bool,fe.any,fe.any,fe.any,fe.string,fe.string,fe.string,fe.func,fe.string,fe.func,fe.func,fe.func,fe.func,fe.func,fe.shape({addEventListener:fe.func,removeEventListener:fe.func,document:fe.shape({getElementById:fe.func,activeElement:fe.any,body:fe.any})});function tZ(e){var t=e.isOpen,r=e.resultCount,n=e.previousResultCount;return t?r?r!==n?"".concat(r," result").concat(r===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}cc(cc({},Ia),{getA11yStatusMessage:tZ});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const Xx=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Zx=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Jx=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Qx=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,ew=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,tw=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":5,rw=process.env.NODE_ENV!=="production"?"__input_change__":6,pc=process.env.NODE_ENV!=="production"?"__input_blur__":7,U2=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":8,V2=process.env.NODE_ENV!=="production"?"__item_mouse_move__":9,nw=process.env.NODE_ENV!=="production"?"__item_click__":10,W2=process.env.NODE_ENV!=="production"?"__togglebutton_click__":11,G2=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":12,K2=process.env.NODE_ENV!=="production"?"__function_open_menu__":13,Y2=process.env.NODE_ENV!=="production"?"__function_close_menu__":14,X2=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":15,iw=process.env.NODE_ENV!=="production"?"__function_select_item__":16,Z2=process.env.NODE_ENV!=="production"?"__function_set_input_value__":17,J2=process.env.NODE_ENV!=="production"?"__function_reset__":18,ow=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":19;var Q2=Object.freeze({__proto__:null,InputKeyDownArrowDown:Xx,InputKeyDownArrowUp:Zx,InputKeyDownEscape:Jx,InputKeyDownHome:Qx,InputKeyDownEnd:ew,InputKeyDownEnter:tw,InputChange:rw,InputBlur:pc,MenuMouseLeave:U2,ItemMouseMove:V2,ItemClick:nw,ToggleButtonClick:W2,FunctionToggleMenu:G2,FunctionOpenMenu:K2,FunctionCloseMenu:Y2,FunctionSetHighlightedIndex:X2,FunctionSelectItem:iw,FunctionSetInputValue:Z2,FunctionReset:J2,ControlledPropUpdatedSelectedItem:ow});function rZ(e){const t=ZX(e),{selectedItem:r}=t;let{inputValue:n}=t;return n===""&&r&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(n=e.itemToString(r)),{...t,inputValue:n}}const nZ={items:fe.array.isRequired,itemToString:fe.func,getA11yStatusMessage:fe.func,getA11ySelectionMessage:fe.func,circularNavigation:fe.bool,highlightedIndex:fe.number,defaultHighlightedIndex:fe.number,initialHighlightedIndex:fe.number,isOpen:fe.bool,defaultIsOpen:fe.bool,initialIsOpen:fe.bool,selectedItem:fe.any,initialSelectedItem:fe.any,defaultSelectedItem:fe.any,inputValue:fe.string,defaultInputValue:fe.string,initialInputValue:fe.string,id:fe.string,labelId:fe.string,menuId:fe.string,getItemId:fe.func,inputId:fe.string,toggleButtonId:fe.string,stateReducer:fe.func,onSelectedItemChange:fe.func,onHighlightedIndexChange:fe.func,onStateChange:fe.func,onIsOpenChange:fe.func,onInputValueChange:fe.func,environment:fe.shape({addEventListener:fe.func,removeEventListener:fe.func,document:fe.shape({getElementById:fe.func,activeElement:fe.any,body:fe.any})})};function iZ(e,t,r){const n=A.useRef(),[i,o]=XX(e,t,r);return A.useEffect(()=>{fc(r,"selectedItem")&&(n.current!==r.selectedItem&&o({type:ow,inputValue:r.itemToString(r.selectedItem)}),n.current=i.selectedItem===n.current?r.selectedItem:i.selectedItem)}),[lc(i,r),o]}let ek=br;process.env.NODE_ENV!=="production"&&(ek=(e,t)=>{fe.checkPropTypes(nZ,e,"prop",t.name)});const oZ={...Ia,getA11yStatusMessage:w2,circularNavigation:!0};function aZ(e,t){const{type:r,props:n,shiftKey:i}=t;let o;switch(r){case nw:o={isOpen:Zr(n,"isOpen"),highlightedIndex:Zr(n,"highlightedIndex"),selectedItem:n.items[t.index],inputValue:n.itemToString(n.items[t.index])};break;case Xx:e.isOpen?o={highlightedIndex:so(i?5:1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:hc(n,e,1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case Zx:e.isOpen?o={highlightedIndex:so(i?-5:-1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:hc(n,e,-1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case tw:o={...e.isOpen&&e.highlightedIndex>=0&&{selectedItem:n.items[e.highlightedIndex],isOpen:Zr(n,"isOpen"),highlightedIndex:Zr(n,"highlightedIndex"),inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case Jx:o={isOpen:!1,highlightedIndex:-1,...!e.isOpen&&{selectedItem:null,inputValue:""}};break;case Qx:o={highlightedIndex:xi(1,0,n.items.length,t.getItemNodeFromIndex,!1)};break;case ew:o={highlightedIndex:xi(-1,n.items.length-1,n.items.length,t.getItemNodeFromIndex,!1)};break;case pc:o={isOpen:!1,highlightedIndex:-1,...e.highlightedIndex>=0&&t.selectItem&&{selectedItem:n.items[e.highlightedIndex],inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case rw:o={isOpen:!0,highlightedIndex:Zr(n,"highlightedIndex"),inputValue:t.inputValue};break;case iw:o={selectedItem:t.selectedItem,inputValue:n.itemToString(t.selectedItem)};break;case ow:o={inputValue:t.inputValue};break;default:return eZ(e,t,Q2)}return{...e,...o}}to.stateChangeTypes=Q2;function to(e){e===void 0&&(e={}),ek(e,to);const t={...oZ,...e},{initialIsOpen:r,defaultIsOpen:n,items:i,scrollIntoView:o,environment:a,getA11yStatusMessage:u,getA11ySelectionMessage:c,itemToString:d}=t,f=rZ(t),[h,p]=iZ(aZ,f,t),{isOpen:v,highlightedIndex:m,selectedItem:y,inputValue:x}=h,b=A.useRef(null),w=A.useRef({}),S=A.useRef(null),E=A.useRef(null),_=A.useRef(null),R=A.useRef(!0),I=GX(t),N=A.useRef(),D=$2({state:h,props:t}),L=A.useCallback(F=>w.current[I.getItemId(F)],[I]);yN(u,[v,m,x,i],{isInitialMount:R.current,previousResultCount:N.current,items:i,environment:a,itemToString:d,...h}),yN(c,[y],{isInitialMount:R.current,previousResultCount:N.current,items:i,environment:a,itemToString:d,...h});const B=QX({menuElement:b.current,highlightedIndex:m,isOpen:v,itemRefs:w,scrollIntoView:o,getItemNodeFromIndex:L});H2({isInitialMount:R.current,props:t,state:h}),A.useEffect(()=>{(r||n||v)&&S.current&&S.current.focus()},[]),A.useEffect(()=>{R.current||(N.current=i.length)});const U=JX(v,[_,b,E],a,()=>{p({type:pc,selectItem:!1})}),j=z2("getInputProps","getComboboxProps","getMenuProps");A.useEffect(()=>{R.current=!1},[]),A.useEffect(()=>{v||(w.current={})},[v]);const T=A.useMemo(()=>({ArrowDown(F){F.preventDefault(),p({type:Xx,shiftKey:F.shiftKey,getItemNodeFromIndex:L})},ArrowUp(F){F.preventDefault(),p({type:Zx,shiftKey:F.shiftKey,getItemNodeFromIndex:L})},Home(F){D.current.state.isOpen&&(F.preventDefault(),p({type:Qx,getItemNodeFromIndex:L}))},End(F){D.current.state.isOpen&&(F.preventDefault(),p({type:ew,getItemNodeFromIndex:L}))},Escape(F){const te=D.current.state;(te.isOpen||te.inputValue||te.selectedItem||te.highlightedIndex>-1)&&(F.preventDefault(),p({type:Jx}))},Enter(F){const te=D.current.state;!te.isOpen||te.highlightedIndex<0||F.which===229||(F.preventDefault(),p({type:tw,getItemNodeFromIndex:L}))}}),[p,D,L]),G=A.useCallback(F=>({id:I.labelId,htmlFor:I.inputId,...F}),[I]),z=A.useCallback(function(F,te){let{onMouseLeave:ie,refKey:ae="ref",ref:ce,...we}=F===void 0?{}:F,{suppressRefError:Se=!1}=te===void 0?{}:te;return j("getMenuProps",Se,ae,b),{[ae]:si(ce,_e=>{b.current=_e}),id:I.menuId,role:"listbox","aria-labelledby":I.labelId,onMouseLeave:Ot(ie,()=>{p({type:U2})}),...we}},[p,j,I]),X=A.useCallback(function(F){let{item:te,index:ie,refKey:ae="ref",ref:ce,onMouseMove:we,onMouseDown:Se,onClick:_e,onPress:he,disabled:le,...Oe}=F===void 0?{}:F;const{props:Ne,state:He}=D.current,qe=KX(ie,te,Ne.items);if(qe<0)throw new Error("Pass either item or item index in getItemProps!");const Xe="onClick",We=_e,mt=()=>{ie!==He.highlightedIndex&&(B.current=!1,p({type:V2,index:ie,disabled:le}))},et=()=>{p({type:nw,index:ie})},Tt=ut=>ut.preventDefault();return{[ae]:si(ce,ut=>{ut&&(w.current[I.getItemId(qe)]=ut)}),disabled:le,role:"option","aria-selected":`${qe===He.highlightedIndex}`,id:I.getItemId(qe),...!le&&{[Xe]:Ot(We,et)},onMouseMove:Ot(we,mt),onMouseDown:Ot(Se,Tt),...Oe}},[p,D,B,I]),Z=A.useCallback(function(F){let{onClick:te,onPress:ie,refKey:ae="ref",ref:ce,...we}=F===void 0?{}:F;const Se=()=>{p({type:W2}),!D.current.state.isOpen&&S.current&&S.current.focus()};return{[ae]:si(ce,_e=>{E.current=_e}),id:I.toggleButtonId,tabIndex:-1,...!we.disabled&&{onClick:Ot(te,Se)},...we}},[p,D,I]),re=A.useCallback(function(F,te){let{onKeyDown:ie,onChange:ae,onInput:ce,onBlur:we,onChangeText:Se,refKey:_e="ref",ref:he,...le}=F===void 0?{}:F,{suppressRefError:Oe=!1}=te===void 0?{}:te;j("getInputProps",Oe,_e,S);const Ne=D.current.state,He=et=>{const Tt=Vb(et);Tt&&T[Tt]&&T[Tt](et)},qe=et=>{p({type:rw,inputValue:et.target.value})},Xe=()=>{Ne.isOpen&&!U.current.isMouseDown&&p({type:pc,selectItem:!0})},We="onChange";let mt={};return le.disabled||(mt={[We]:Ot(ae,ce,qe),onKeyDown:Ot(ie,He),onBlur:Ot(we,Xe)}),{[_e]:si(he,et=>{S.current=et}),id:I.inputId,"aria-autocomplete":"list","aria-controls":I.menuId,...Ne.isOpen&&Ne.highlightedIndex>-1&&{"aria-activedescendant":I.getItemId(Ne.highlightedIndex)},"aria-labelledby":I.labelId,autoComplete:"off",value:Ne.inputValue,...mt,...le}},[p,T,D,U,j,I]),W=A.useCallback(function(F,te){let{refKey:ie="ref",ref:ae,...ce}=F===void 0?{}:F,{suppressRefError:we=!1}=te===void 0?{}:te;return j("getComboboxProps",we,ie,_),{[ie]:si(ae,Se=>{_.current=Se}),role:"combobox","aria-haspopup":"listbox","aria-owns":I.menuId,"aria-expanded":D.current.state.isOpen,...ce}},[D,j,I]),Q=A.useCallback(()=>{p({type:G2})},[p]),ue=A.useCallback(()=>{p({type:Y2})},[p]),oe=A.useCallback(()=>{p({type:K2})},[p]),H=A.useCallback(F=>{p({type:X2,highlightedIndex:F})},[p]),K=A.useCallback(F=>{p({type:iw,selectedItem:F})},[p]),$=A.useCallback(F=>{p({type:Z2,inputValue:F})},[p]),k=A.useCallback(()=>{p({type:J2})},[p]);return{getItemProps:X,getLabelProps:G,getMenuProps:z,getInputProps:re,getComboboxProps:W,getToggleButtonProps:Z,toggleMenu:Q,openMenu:oe,closeMenu:ue,setHighlightedIndex:H,setInputValue:$,selectItem:K,reset:k,highlightedIndex:m,isOpen:v,selectedItem:y,inputValue:x}}fe.array,fe.array,fe.array,fe.func,fe.func,fe.func,fe.number,fe.number,fe.number,fe.func,fe.func,fe.string,fe.string,fe.shape({addEventListener:fe.func,removeEventListener:fe.func,document:fe.shape({getElementById:fe.func,activeElement:fe.any,body:fe.any})});Ia.itemToString,Ia.stateReducer,Ia.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 Sa={exports:{}};/**
61
41
  * @license
62
42
  * Lodash <https://lodash.com/>
63
43
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
64
44
  * Released under MIT license <https://lodash.com/license>
65
45
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
66
46
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
67
- */var Uie=_s.exports,mM;function Gie(){return mM||(mM=1,(function(e,t){(function(){var r,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",p=1,v=2,h=4,x=1,b=2,m=1,w=2,y=4,_=8,S=16,E=32,I=64,N=128,T=256,k=512,L=30,B="...",A=800,z=16,P=1,K=2,$=3,Y=1/0,U=9007199254740991,Z=17976931348623157e292,D=NaN,W=4294967295,Q=W-1,ee=W>>>1,j=[["ary",N],["bind",m],["bindKey",w],["curry",_],["curryRight",S],["flip",k],["partial",E],["partialRight",I],["rearg",T]],F="[object Arguments]",G="[object Array]",q="[object AsyncFunction]",X="[object Boolean]",te="[object Date]",ne="[object DOMException]",de="[object Error]",re="[object Function]",ge="[object GeneratorFunction]",ue="[object Map]",xe="[object Number]",le="[object Null]",se="[object Object]",we="[object Promise]",Re="[object Proxy]",Te="[object RegExp]",je="[object Set]",Ke="[object String]",qe="[object Symbol]",et="[object Undefined]",ht="[object WeakMap]",St="[object WeakSet]",Ve="[object ArrayBuffer]",De="[object DataView]",it="[object Float32Array]",ot="[object Float64Array]",Qt="[object Int8Array]",Bt="[object Int16Array]",Tt="[object Int32Array]",Le="[object Uint8Array]",Ye="[object Uint8ClampedArray]",bt="[object Uint16Array]",Ot="[object Uint32Array]",Ht=/\b__p \+= '';/g,Lr=/\b(__p \+=) '' \+/g,mn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ct=/&(?:amp|lt|gt|quot|#39);/g,It=/[&<>"']/g,Pt=RegExp(Ct.source),er=RegExp(It.source),sr=/<%-([\s\S]+?)%>/g,Xt=/<%([\s\S]+?)%>/g,pr=/<%=([\s\S]+?)%>/g,Mn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dt=/^\w*$/,tr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hr=/[\\^$.*+?()[\]{}|]/g,bn=RegExp(hr.source),Cr=/^\s+/,zr=/\s/,Kn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$i=/\{\n\/\* \[wrapped with (.+)\] \*/,Hd=/,? & /,Wd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ud=/[()=,{}\[\]\/\s]/,Gd=/\\(\\)?/g,Kd=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vl=/\w*$/,Yd=/^[-+]0x[0-9a-f]+$/i,Xd=/^0b[01]+$/i,Zd=/^\[object .+?Constructor\]$/,Jd=/^0o[0-7]+$/i,Qd=/^(?:0|[1-9]\d*)$/,ef=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wo=/($^)/,gl=/['\n\r\u2028\u2029\\]/g,_o="\\ud800-\\udfff",tf="\\u0300-\\u036f",rf="\\ufe20-\\ufe2f",ml="\\u20d0-\\u20ff",bl=tf+rf+ml,Ra="\\u2700-\\u27bf",yl="a-z\\xdf-\\xf6\\xf8-\\xff",xl="\\xac\\xb1\\xd7\\xf7",nf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wl="\\u2000-\\u206f",of=" \\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",_l="A-Z\\xc0-\\xd6\\xd8-\\xde",Na="\\ufe0e\\ufe0f",El=xl+nf+wl+of,Ta="['’]",af="["+_o+"]",Sl="["+El+"]",Vi="["+bl+"]",Ol="\\d+",Eo="["+Ra+"]",Cl="["+yl+"]",Il="[^"+_o+El+Ol+Ra+yl+_l+"]",sf="\\ud83c[\\udffb-\\udfff]",RF="(?:"+Vi+"|"+sf+")",J_="[^"+_o+"]",lf="(?:\\ud83c[\\udde6-\\uddff]){2}",cf="[\\ud800-\\udbff][\\udc00-\\udfff]",So="["+_l+"]",Q_="\\u200d",eE="(?:"+Cl+"|"+Il+")",NF="(?:"+So+"|"+Il+")",tE="(?:"+Ta+"(?:d|ll|m|re|s|t|ve))?",rE="(?:"+Ta+"(?:D|LL|M|RE|S|T|VE))?",nE=RF+"?",iE="["+Na+"]?",TF="(?:"+Q_+"(?:"+[J_,lf,cf].join("|")+")"+iE+nE+")*",PF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",oE=iE+nE+TF,MF="(?:"+[Eo,lf,cf].join("|")+")"+oE,AF="(?:"+[J_+Vi+"?",Vi,lf,cf,af].join("|")+")",DF=RegExp(Ta,"g"),jF=RegExp(Vi,"g"),uf=RegExp(sf+"(?="+sf+")|"+AF+oE,"g"),qF=RegExp([So+"?"+Cl+"+"+tE+"(?="+[Sl,So,"$"].join("|")+")",NF+"+"+rE+"(?="+[Sl,So+eE,"$"].join("|")+")",So+"?"+eE+"+"+tE,So+"+"+rE,kF,PF,Ol,MF].join("|"),"g"),LF=RegExp("["+Q_+_o+bl+Na+"]"),zF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,BF=["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"],FF=-1,_t={};_t[it]=_t[ot]=_t[Qt]=_t[Bt]=_t[Tt]=_t[Le]=_t[Ye]=_t[bt]=_t[Ot]=!0,_t[F]=_t[G]=_t[Ve]=_t[X]=_t[De]=_t[te]=_t[de]=_t[re]=_t[ue]=_t[xe]=_t[se]=_t[Te]=_t[je]=_t[Ke]=_t[ht]=!1;var yt={};yt[F]=yt[G]=yt[Ve]=yt[De]=yt[X]=yt[te]=yt[it]=yt[ot]=yt[Qt]=yt[Bt]=yt[Tt]=yt[ue]=yt[xe]=yt[se]=yt[Te]=yt[je]=yt[Ke]=yt[qe]=yt[Le]=yt[Ye]=yt[bt]=yt[Ot]=!0,yt[de]=yt[re]=yt[ht]=!1;var $F={À:"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"},VF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},HF={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},WF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},UF=parseFloat,GF=parseInt,aE=typeof At=="object"&&At&&At.Object===Object&&At,KF=typeof self=="object"&&self&&self.Object===Object&&self,rr=aE||KF||Function("return this")(),df=t&&!t.nodeType&&t,Hi=df&&!0&&e&&!e.nodeType&&e,sE=Hi&&Hi.exports===df,ff=sE&&aE.process,Jr=(function(){try{var oe=Hi&&Hi.require&&Hi.require("util").types;return oe||ff&&ff.binding&&ff.binding("util")}catch{}})(),lE=Jr&&Jr.isArrayBuffer,cE=Jr&&Jr.isDate,uE=Jr&&Jr.isMap,dE=Jr&&Jr.isRegExp,fE=Jr&&Jr.isSet,pE=Jr&&Jr.isTypedArray;function Br(oe,pe,ce){switch(ce.length){case 0:return oe.call(pe);case 1:return oe.call(pe,ce[0]);case 2:return oe.call(pe,ce[0],ce[1]);case 3:return oe.call(pe,ce[0],ce[1],ce[2])}return oe.apply(pe,ce)}function YF(oe,pe,ce,Oe){for(var ze=-1,tt=oe==null?0:oe.length;++ze<tt;){var Wt=oe[ze];pe(Oe,Wt,ce(Wt),oe)}return Oe}function Qr(oe,pe){for(var ce=-1,Oe=oe==null?0:oe.length;++ce<Oe&&pe(oe[ce],ce,oe)!==!1;);return oe}function XF(oe,pe){for(var ce=oe==null?0:oe.length;ce--&&pe(oe[ce],ce,oe)!==!1;);return oe}function hE(oe,pe){for(var ce=-1,Oe=oe==null?0:oe.length;++ce<Oe;)if(!pe(oe[ce],ce,oe))return!1;return!0}function vi(oe,pe){for(var ce=-1,Oe=oe==null?0:oe.length,ze=0,tt=[];++ce<Oe;){var Wt=oe[ce];pe(Wt,ce,oe)&&(tt[ze++]=Wt)}return tt}function Rl(oe,pe){var ce=oe==null?0:oe.length;return!!ce&&Oo(oe,pe,0)>-1}function pf(oe,pe,ce){for(var Oe=-1,ze=oe==null?0:oe.length;++Oe<ze;)if(ce(pe,oe[Oe]))return!0;return!1}function Rt(oe,pe){for(var ce=-1,Oe=oe==null?0:oe.length,ze=Array(Oe);++ce<Oe;)ze[ce]=pe(oe[ce],ce,oe);return ze}function gi(oe,pe){for(var ce=-1,Oe=pe.length,ze=oe.length;++ce<Oe;)oe[ze+ce]=pe[ce];return oe}function hf(oe,pe,ce,Oe){var ze=-1,tt=oe==null?0:oe.length;for(Oe&&tt&&(ce=oe[++ze]);++ze<tt;)ce=pe(ce,oe[ze],ze,oe);return ce}function ZF(oe,pe,ce,Oe){var ze=oe==null?0:oe.length;for(Oe&&ze&&(ce=oe[--ze]);ze--;)ce=pe(ce,oe[ze],ze,oe);return ce}function vf(oe,pe){for(var ce=-1,Oe=oe==null?0:oe.length;++ce<Oe;)if(pe(oe[ce],ce,oe))return!0;return!1}var JF=gf("length");function QF(oe){return oe.split("")}function e3(oe){return oe.match(Wd)||[]}function vE(oe,pe,ce){var Oe;return ce(oe,function(ze,tt,Wt){if(pe(ze,tt,Wt))return Oe=tt,!1}),Oe}function Nl(oe,pe,ce,Oe){for(var ze=oe.length,tt=ce+(Oe?1:-1);Oe?tt--:++tt<ze;)if(pe(oe[tt],tt,oe))return tt;return-1}function Oo(oe,pe,ce){return pe===pe?f3(oe,pe,ce):Nl(oe,gE,ce)}function t3(oe,pe,ce,Oe){for(var ze=ce-1,tt=oe.length;++ze<tt;)if(Oe(oe[ze],pe))return ze;return-1}function gE(oe){return oe!==oe}function mE(oe,pe){var ce=oe==null?0:oe.length;return ce?bf(oe,pe)/ce:D}function gf(oe){return function(pe){return pe==null?r:pe[oe]}}function mf(oe){return function(pe){return oe==null?r:oe[pe]}}function bE(oe,pe,ce,Oe,ze){return ze(oe,function(tt,Wt,vt){ce=Oe?(Oe=!1,tt):pe(ce,tt,Wt,vt)}),ce}function r3(oe,pe){var ce=oe.length;for(oe.sort(pe);ce--;)oe[ce]=oe[ce].value;return oe}function bf(oe,pe){for(var ce,Oe=-1,ze=oe.length;++Oe<ze;){var tt=pe(oe[Oe]);tt!==r&&(ce=ce===r?tt:ce+tt)}return ce}function yf(oe,pe){for(var ce=-1,Oe=Array(oe);++ce<oe;)Oe[ce]=pe(ce);return Oe}function n3(oe,pe){return Rt(pe,function(ce){return[ce,oe[ce]]})}function yE(oe){return oe&&oe.slice(0,EE(oe)+1).replace(Cr,"")}function Fr(oe){return function(pe){return oe(pe)}}function xf(oe,pe){return Rt(pe,function(ce){return oe[ce]})}function Pa(oe,pe){return oe.has(pe)}function xE(oe,pe){for(var ce=-1,Oe=oe.length;++ce<Oe&&Oo(pe,oe[ce],0)>-1;);return ce}function wE(oe,pe){for(var ce=oe.length;ce--&&Oo(pe,oe[ce],0)>-1;);return ce}function i3(oe,pe){for(var ce=oe.length,Oe=0;ce--;)oe[ce]===pe&&++Oe;return Oe}var o3=mf($F),a3=mf(VF);function s3(oe){return"\\"+WF[oe]}function l3(oe,pe){return oe==null?r:oe[pe]}function Co(oe){return LF.test(oe)}function c3(oe){return zF.test(oe)}function u3(oe){for(var pe,ce=[];!(pe=oe.next()).done;)ce.push(pe.value);return ce}function wf(oe){var pe=-1,ce=Array(oe.size);return oe.forEach(function(Oe,ze){ce[++pe]=[ze,Oe]}),ce}function _E(oe,pe){return function(ce){return oe(pe(ce))}}function mi(oe,pe){for(var ce=-1,Oe=oe.length,ze=0,tt=[];++ce<Oe;){var Wt=oe[ce];(Wt===pe||Wt===d)&&(oe[ce]=d,tt[ze++]=ce)}return tt}function Tl(oe){var pe=-1,ce=Array(oe.size);return oe.forEach(function(Oe){ce[++pe]=Oe}),ce}function d3(oe){var pe=-1,ce=Array(oe.size);return oe.forEach(function(Oe){ce[++pe]=[Oe,Oe]}),ce}function f3(oe,pe,ce){for(var Oe=ce-1,ze=oe.length;++Oe<ze;)if(oe[Oe]===pe)return Oe;return-1}function p3(oe,pe,ce){for(var Oe=ce+1;Oe--;)if(oe[Oe]===pe)return Oe;return Oe}function Io(oe){return Co(oe)?v3(oe):JF(oe)}function yn(oe){return Co(oe)?g3(oe):QF(oe)}function EE(oe){for(var pe=oe.length;pe--&&zr.test(oe.charAt(pe)););return pe}var h3=mf(HF);function v3(oe){for(var pe=uf.lastIndex=0;uf.test(oe);)++pe;return pe}function g3(oe){return oe.match(uf)||[]}function m3(oe){return oe.match(qF)||[]}var b3=(function oe(pe){pe=pe==null?rr:Ro.defaults(rr.Object(),pe,Ro.pick(rr,BF));var ce=pe.Array,Oe=pe.Date,ze=pe.Error,tt=pe.Function,Wt=pe.Math,vt=pe.Object,_f=pe.RegExp,y3=pe.String,en=pe.TypeError,Pl=ce.prototype,x3=tt.prototype,No=vt.prototype,kl=pe["__core-js_shared__"],Ml=x3.toString,dt=No.hasOwnProperty,w3=0,SE=(function(){var l=/[^.]+$/.exec(kl&&kl.keys&&kl.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Al=No.toString,_3=Ml.call(vt),E3=rr._,S3=_f("^"+Ml.call(dt).replace(hr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dl=sE?pe.Buffer:r,bi=pe.Symbol,jl=pe.Uint8Array,OE=Dl?Dl.allocUnsafe:r,ql=_E(vt.getPrototypeOf,vt),CE=vt.create,IE=No.propertyIsEnumerable,Ll=Pl.splice,RE=bi?bi.isConcatSpreadable:r,ka=bi?bi.iterator:r,Wi=bi?bi.toStringTag:r,zl=(function(){try{var l=Xi(vt,"defineProperty");return l({},"",{}),l}catch{}})(),O3=pe.clearTimeout!==rr.clearTimeout&&pe.clearTimeout,C3=Oe&&Oe.now!==rr.Date.now&&Oe.now,I3=pe.setTimeout!==rr.setTimeout&&pe.setTimeout,Bl=Wt.ceil,Fl=Wt.floor,Ef=vt.getOwnPropertySymbols,R3=Dl?Dl.isBuffer:r,NE=pe.isFinite,N3=Pl.join,T3=_E(vt.keys,vt),Ut=Wt.max,lr=Wt.min,P3=Oe.now,k3=pe.parseInt,TE=Wt.random,M3=Pl.reverse,Sf=Xi(pe,"DataView"),Ma=Xi(pe,"Map"),Of=Xi(pe,"Promise"),To=Xi(pe,"Set"),Aa=Xi(pe,"WeakMap"),Da=Xi(vt,"create"),$l=Aa&&new Aa,Po={},A3=Zi(Sf),D3=Zi(Ma),j3=Zi(Of),q3=Zi(To),L3=Zi(Aa),Vl=bi?bi.prototype:r,ja=Vl?Vl.valueOf:r,PE=Vl?Vl.toString:r;function V(l){if(Mt(l)&&!Be(l)&&!(l instanceof Xe)){if(l instanceof tn)return l;if(dt.call(l,"__wrapped__"))return kS(l)}return new tn(l)}var ko=(function(){function l(){}return function(f){if(!kt(f))return{};if(CE)return CE(f);l.prototype=f;var g=new l;return l.prototype=r,g}})();function Hl(){}function tn(l,f){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=r}V.templateSettings={escape:sr,evaluate:Xt,interpolate:pr,variable:"",imports:{_:V}},V.prototype=Hl.prototype,V.prototype.constructor=V,tn.prototype=ko(Hl.prototype),tn.prototype.constructor=tn;function Xe(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=W,this.__views__=[]}function z3(){var l=new Xe(this.__wrapped__);return l.__actions__=Ir(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=Ir(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=Ir(this.__views__),l}function B3(){if(this.__filtered__){var l=new Xe(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function F3(){var l=this.__wrapped__.value(),f=this.__dir__,g=Be(l),R=f<0,M=g?l.length:0,H=Q4(0,M,this.__views__),J=H.start,ie=H.end,ae=ie-J,he=R?ie:J-1,ve=this.__iteratees__,be=ve.length,Ee=0,Ne=lr(ae,this.__takeCount__);if(!g||!R&&M==ae&&Ne==ae)return tS(l,this.__actions__);var Me=[];e:for(;ae--&&Ee<Ne;){he+=f;for(var $e=-1,Ae=l[he];++$e<be;){var Ue=ve[$e],Ze=Ue.iteratee,Hr=Ue.type,mr=Ze(Ae);if(Hr==K)Ae=mr;else if(!mr){if(Hr==P)continue e;break e}}Me[Ee++]=Ae}return Me}Xe.prototype=ko(Hl.prototype),Xe.prototype.constructor=Xe;function Ui(l){var f=-1,g=l==null?0:l.length;for(this.clear();++f<g;){var R=l[f];this.set(R[0],R[1])}}function $3(){this.__data__=Da?Da(null):{},this.size=0}function V3(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function H3(l){var f=this.__data__;if(Da){var g=f[l];return g===c?r:g}return dt.call(f,l)?f[l]:r}function W3(l){var f=this.__data__;return Da?f[l]!==r:dt.call(f,l)}function U3(l,f){var g=this.__data__;return this.size+=this.has(l)?0:1,g[l]=Da&&f===r?c:f,this}Ui.prototype.clear=$3,Ui.prototype.delete=V3,Ui.prototype.get=H3,Ui.prototype.has=W3,Ui.prototype.set=U3;function Yn(l){var f=-1,g=l==null?0:l.length;for(this.clear();++f<g;){var R=l[f];this.set(R[0],R[1])}}function G3(){this.__data__=[],this.size=0}function K3(l){var f=this.__data__,g=Wl(f,l);if(g<0)return!1;var R=f.length-1;return g==R?f.pop():Ll.call(f,g,1),--this.size,!0}function Y3(l){var f=this.__data__,g=Wl(f,l);return g<0?r:f[g][1]}function X3(l){return Wl(this.__data__,l)>-1}function Z3(l,f){var g=this.__data__,R=Wl(g,l);return R<0?(++this.size,g.push([l,f])):g[R][1]=f,this}Yn.prototype.clear=G3,Yn.prototype.delete=K3,Yn.prototype.get=Y3,Yn.prototype.has=X3,Yn.prototype.set=Z3;function Xn(l){var f=-1,g=l==null?0:l.length;for(this.clear();++f<g;){var R=l[f];this.set(R[0],R[1])}}function J3(){this.size=0,this.__data__={hash:new Ui,map:new(Ma||Yn),string:new Ui}}function Q3(l){var f=nc(this,l).delete(l);return this.size-=f?1:0,f}function e4(l){return nc(this,l).get(l)}function t4(l){return nc(this,l).has(l)}function r4(l,f){var g=nc(this,l),R=g.size;return g.set(l,f),this.size+=g.size==R?0:1,this}Xn.prototype.clear=J3,Xn.prototype.delete=Q3,Xn.prototype.get=e4,Xn.prototype.has=t4,Xn.prototype.set=r4;function Gi(l){var f=-1,g=l==null?0:l.length;for(this.__data__=new Xn;++f<g;)this.add(l[f])}function n4(l){return this.__data__.set(l,c),this}function i4(l){return this.__data__.has(l)}Gi.prototype.add=Gi.prototype.push=n4,Gi.prototype.has=i4;function xn(l){var f=this.__data__=new Yn(l);this.size=f.size}function o4(){this.__data__=new Yn,this.size=0}function a4(l){var f=this.__data__,g=f.delete(l);return this.size=f.size,g}function s4(l){return this.__data__.get(l)}function l4(l){return this.__data__.has(l)}function c4(l,f){var g=this.__data__;if(g instanceof Yn){var R=g.__data__;if(!Ma||R.length<i-1)return R.push([l,f]),this.size=++g.size,this;g=this.__data__=new Xn(R)}return g.set(l,f),this.size=g.size,this}xn.prototype.clear=o4,xn.prototype.delete=a4,xn.prototype.get=s4,xn.prototype.has=l4,xn.prototype.set=c4;function kE(l,f){var g=Be(l),R=!g&&Ji(l),M=!g&&!R&&Ei(l),H=!g&&!R&&!M&&jo(l),J=g||R||M||H,ie=J?yf(l.length,y3):[],ae=ie.length;for(var he in l)(f||dt.call(l,he))&&!(J&&(he=="length"||M&&(he=="offset"||he=="parent")||H&&(he=="buffer"||he=="byteLength"||he=="byteOffset")||ei(he,ae)))&&ie.push(he);return ie}function ME(l){var f=l.length;return f?l[jf(0,f-1)]:r}function u4(l,f){return ic(Ir(l),Ki(f,0,l.length))}function d4(l){return ic(Ir(l))}function Cf(l,f,g){(g!==r&&!wn(l[f],g)||g===r&&!(f in l))&&Zn(l,f,g)}function qa(l,f,g){var R=l[f];(!(dt.call(l,f)&&wn(R,g))||g===r&&!(f in l))&&Zn(l,f,g)}function Wl(l,f){for(var g=l.length;g--;)if(wn(l[g][0],f))return g;return-1}function f4(l,f,g,R){return yi(l,function(M,H,J){f(R,M,g(M),J)}),R}function AE(l,f){return l&&Dn(f,Zt(f),l)}function p4(l,f){return l&&Dn(f,Nr(f),l)}function Zn(l,f,g){f=="__proto__"&&zl?zl(l,f,{configurable:!0,enumerable:!0,value:g,writable:!0}):l[f]=g}function If(l,f){for(var g=-1,R=f.length,M=ce(R),H=l==null;++g<R;)M[g]=H?r:sp(l,f[g]);return M}function Ki(l,f,g){return l===l&&(g!==r&&(l=l<=g?l:g),f!==r&&(l=l>=f?l:f)),l}function rn(l,f,g,R,M,H){var J,ie=f&p,ae=f&v,he=f&h;if(g&&(J=M?g(l,R,M,H):g(l)),J!==r)return J;if(!kt(l))return l;var ve=Be(l);if(ve){if(J=t$(l),!ie)return Ir(l,J)}else{var be=cr(l),Ee=be==re||be==ge;if(Ei(l))return iS(l,ie);if(be==se||be==F||Ee&&!M){if(J=ae||Ee?{}:ES(l),!ie)return ae?H4(l,p4(J,l)):V4(l,AE(J,l))}else{if(!yt[be])return M?l:{};J=r$(l,be,ie)}}H||(H=new xn);var Ne=H.get(l);if(Ne)return Ne;H.set(l,J),JS(l)?l.forEach(function(Ae){J.add(rn(Ae,f,g,Ae,l,H))}):XS(l)&&l.forEach(function(Ae,Ue){J.set(Ue,rn(Ae,f,g,Ue,l,H))});var Me=he?ae?Gf:Uf:ae?Nr:Zt,$e=ve?r:Me(l);return Qr($e||l,function(Ae,Ue){$e&&(Ue=Ae,Ae=l[Ue]),qa(J,Ue,rn(Ae,f,g,Ue,l,H))}),J}function h4(l){var f=Zt(l);return function(g){return DE(g,l,f)}}function DE(l,f,g){var R=g.length;if(l==null)return!R;for(l=vt(l);R--;){var M=g[R],H=f[M],J=l[M];if(J===r&&!(M in l)||!H(J))return!1}return!0}function jE(l,f,g){if(typeof l!="function")throw new en(a);return Ha(function(){l.apply(r,g)},f)}function La(l,f,g,R){var M=-1,H=Rl,J=!0,ie=l.length,ae=[],he=f.length;if(!ie)return ae;g&&(f=Rt(f,Fr(g))),R?(H=pf,J=!1):f.length>=i&&(H=Pa,J=!1,f=new Gi(f));e:for(;++M<ie;){var ve=l[M],be=g==null?ve:g(ve);if(ve=R||ve!==0?ve:0,J&&be===be){for(var Ee=he;Ee--;)if(f[Ee]===be)continue e;ae.push(ve)}else H(f,be,R)||ae.push(ve)}return ae}var yi=cS(An),qE=cS(Nf,!0);function v4(l,f){var g=!0;return yi(l,function(R,M,H){return g=!!f(R,M,H),g}),g}function Ul(l,f,g){for(var R=-1,M=l.length;++R<M;){var H=l[R],J=f(H);if(J!=null&&(ie===r?J===J&&!Vr(J):g(J,ie)))var ie=J,ae=H}return ae}function g4(l,f,g,R){var M=l.length;for(g=Fe(g),g<0&&(g=-g>M?0:M+g),R=R===r||R>M?M:Fe(R),R<0&&(R+=M),R=g>R?0:eO(R);g<R;)l[g++]=f;return l}function LE(l,f){var g=[];return yi(l,function(R,M,H){f(R,M,H)&&g.push(R)}),g}function nr(l,f,g,R,M){var H=-1,J=l.length;for(g||(g=i$),M||(M=[]);++H<J;){var ie=l[H];f>0&&g(ie)?f>1?nr(ie,f-1,g,R,M):gi(M,ie):R||(M[M.length]=ie)}return M}var Rf=uS(),zE=uS(!0);function An(l,f){return l&&Rf(l,f,Zt)}function Nf(l,f){return l&&zE(l,f,Zt)}function Gl(l,f){return vi(f,function(g){return ti(l[g])})}function Yi(l,f){f=wi(f,l);for(var g=0,R=f.length;l!=null&&g<R;)l=l[jn(f[g++])];return g&&g==R?l:r}function BE(l,f,g){var R=f(l);return Be(l)?R:gi(R,g(l))}function vr(l){return l==null?l===r?et:le:Wi&&Wi in vt(l)?J4(l):d$(l)}function Tf(l,f){return l>f}function m4(l,f){return l!=null&&dt.call(l,f)}function b4(l,f){return l!=null&&f in vt(l)}function y4(l,f,g){return l>=lr(f,g)&&l<Ut(f,g)}function Pf(l,f,g){for(var R=g?pf:Rl,M=l[0].length,H=l.length,J=H,ie=ce(H),ae=1/0,he=[];J--;){var ve=l[J];J&&f&&(ve=Rt(ve,Fr(f))),ae=lr(ve.length,ae),ie[J]=!g&&(f||M>=120&&ve.length>=120)?new Gi(J&&ve):r}ve=l[0];var be=-1,Ee=ie[0];e:for(;++be<M&&he.length<ae;){var Ne=ve[be],Me=f?f(Ne):Ne;if(Ne=g||Ne!==0?Ne:0,!(Ee?Pa(Ee,Me):R(he,Me,g))){for(J=H;--J;){var $e=ie[J];if(!($e?Pa($e,Me):R(l[J],Me,g)))continue e}Ee&&Ee.push(Me),he.push(Ne)}}return he}function x4(l,f,g,R){return An(l,function(M,H,J){f(R,g(M),H,J)}),R}function za(l,f,g){f=wi(f,l),l=IS(l,f);var R=l==null?l:l[jn(on(f))];return R==null?r:Br(R,l,g)}function FE(l){return Mt(l)&&vr(l)==F}function w4(l){return Mt(l)&&vr(l)==Ve}function _4(l){return Mt(l)&&vr(l)==te}function Ba(l,f,g,R,M){return l===f?!0:l==null||f==null||!Mt(l)&&!Mt(f)?l!==l&&f!==f:E4(l,f,g,R,Ba,M)}function E4(l,f,g,R,M,H){var J=Be(l),ie=Be(f),ae=J?G:cr(l),he=ie?G:cr(f);ae=ae==F?se:ae,he=he==F?se:he;var ve=ae==se,be=he==se,Ee=ae==he;if(Ee&&Ei(l)){if(!Ei(f))return!1;J=!0,ve=!1}if(Ee&&!ve)return H||(H=new xn),J||jo(l)?xS(l,f,g,R,M,H):X4(l,f,ae,g,R,M,H);if(!(g&x)){var Ne=ve&&dt.call(l,"__wrapped__"),Me=be&&dt.call(f,"__wrapped__");if(Ne||Me){var $e=Ne?l.value():l,Ae=Me?f.value():f;return H||(H=new xn),M($e,Ae,g,R,H)}}return Ee?(H||(H=new xn),Z4(l,f,g,R,M,H)):!1}function S4(l){return Mt(l)&&cr(l)==ue}function kf(l,f,g,R){var M=g.length,H=M,J=!R;if(l==null)return!H;for(l=vt(l);M--;){var ie=g[M];if(J&&ie[2]?ie[1]!==l[ie[0]]:!(ie[0]in l))return!1}for(;++M<H;){ie=g[M];var ae=ie[0],he=l[ae],ve=ie[1];if(J&&ie[2]){if(he===r&&!(ae in l))return!1}else{var be=new xn;if(R)var Ee=R(he,ve,ae,l,f,be);if(!(Ee===r?Ba(ve,he,x|b,R,be):Ee))return!1}}return!0}function $E(l){if(!kt(l)||a$(l))return!1;var f=ti(l)?S3:Zd;return f.test(Zi(l))}function O4(l){return Mt(l)&&vr(l)==Te}function C4(l){return Mt(l)&&cr(l)==je}function I4(l){return Mt(l)&&uc(l.length)&&!!_t[vr(l)]}function VE(l){return typeof l=="function"?l:l==null?Tr:typeof l=="object"?Be(l)?UE(l[0],l[1]):WE(l):dO(l)}function Mf(l){if(!Va(l))return T3(l);var f=[];for(var g in vt(l))dt.call(l,g)&&g!="constructor"&&f.push(g);return f}function R4(l){if(!kt(l))return u$(l);var f=Va(l),g=[];for(var R in l)R=="constructor"&&(f||!dt.call(l,R))||g.push(R);return g}function Af(l,f){return l<f}function HE(l,f){var g=-1,R=Rr(l)?ce(l.length):[];return yi(l,function(M,H,J){R[++g]=f(M,H,J)}),R}function WE(l){var f=Yf(l);return f.length==1&&f[0][2]?OS(f[0][0],f[0][1]):function(g){return g===l||kf(g,l,f)}}function UE(l,f){return Zf(l)&&SS(f)?OS(jn(l),f):function(g){var R=sp(g,l);return R===r&&R===f?lp(g,l):Ba(f,R,x|b)}}function Kl(l,f,g,R,M){l!==f&&Rf(f,function(H,J){if(M||(M=new xn),kt(H))N4(l,f,J,g,Kl,R,M);else{var ie=R?R(Qf(l,J),H,J+"",l,f,M):r;ie===r&&(ie=H),Cf(l,J,ie)}},Nr)}function N4(l,f,g,R,M,H,J){var ie=Qf(l,g),ae=Qf(f,g),he=J.get(ae);if(he){Cf(l,g,he);return}var ve=H?H(ie,ae,g+"",l,f,J):r,be=ve===r;if(be){var Ee=Be(ae),Ne=!Ee&&Ei(ae),Me=!Ee&&!Ne&&jo(ae);ve=ae,Ee||Ne||Me?Be(ie)?ve=ie:jt(ie)?ve=Ir(ie):Ne?(be=!1,ve=iS(ae,!0)):Me?(be=!1,ve=oS(ae,!0)):ve=[]:Wa(ae)||Ji(ae)?(ve=ie,Ji(ie)?ve=tO(ie):(!kt(ie)||ti(ie))&&(ve=ES(ae))):be=!1}be&&(J.set(ae,ve),M(ve,ae,R,H,J),J.delete(ae)),Cf(l,g,ve)}function GE(l,f){var g=l.length;if(g)return f+=f<0?g:0,ei(f,g)?l[f]:r}function KE(l,f,g){f.length?f=Rt(f,function(H){return Be(H)?function(J){return Yi(J,H.length===1?H[0]:H)}:H}):f=[Tr];var R=-1;f=Rt(f,Fr(Pe()));var M=HE(l,function(H,J,ie){var ae=Rt(f,function(he){return he(H)});return{criteria:ae,index:++R,value:H}});return r3(M,function(H,J){return $4(H,J,g)})}function T4(l,f){return YE(l,f,function(g,R){return lp(l,R)})}function YE(l,f,g){for(var R=-1,M=f.length,H={};++R<M;){var J=f[R],ie=Yi(l,J);g(ie,J)&&Fa(H,wi(J,l),ie)}return H}function P4(l){return function(f){return Yi(f,l)}}function Df(l,f,g,R){var M=R?t3:Oo,H=-1,J=f.length,ie=l;for(l===f&&(f=Ir(f)),g&&(ie=Rt(l,Fr(g)));++H<J;)for(var ae=0,he=f[H],ve=g?g(he):he;(ae=M(ie,ve,ae,R))>-1;)ie!==l&&Ll.call(ie,ae,1),Ll.call(l,ae,1);return l}function XE(l,f){for(var g=l?f.length:0,R=g-1;g--;){var M=f[g];if(g==R||M!==H){var H=M;ei(M)?Ll.call(l,M,1):zf(l,M)}}return l}function jf(l,f){return l+Fl(TE()*(f-l+1))}function k4(l,f,g,R){for(var M=-1,H=Ut(Bl((f-l)/(g||1)),0),J=ce(H);H--;)J[R?H:++M]=l,l+=g;return J}function qf(l,f){var g="";if(!l||f<1||f>U)return g;do f%2&&(g+=l),f=Fl(f/2),f&&(l+=l);while(f);return g}function He(l,f){return ep(CS(l,f,Tr),l+"")}function M4(l){return ME(qo(l))}function A4(l,f){var g=qo(l);return ic(g,Ki(f,0,g.length))}function Fa(l,f,g,R){if(!kt(l))return l;f=wi(f,l);for(var M=-1,H=f.length,J=H-1,ie=l;ie!=null&&++M<H;){var ae=jn(f[M]),he=g;if(ae==="__proto__"||ae==="constructor"||ae==="prototype")return l;if(M!=J){var ve=ie[ae];he=R?R(ve,ae,ie):r,he===r&&(he=kt(ve)?ve:ei(f[M+1])?[]:{})}qa(ie,ae,he),ie=ie[ae]}return l}var ZE=$l?function(l,f){return $l.set(l,f),l}:Tr,D4=zl?function(l,f){return zl(l,"toString",{configurable:!0,enumerable:!1,value:up(f),writable:!0})}:Tr;function j4(l){return ic(qo(l))}function nn(l,f,g){var R=-1,M=l.length;f<0&&(f=-f>M?0:M+f),g=g>M?M:g,g<0&&(g+=M),M=f>g?0:g-f>>>0,f>>>=0;for(var H=ce(M);++R<M;)H[R]=l[R+f];return H}function q4(l,f){var g;return yi(l,function(R,M,H){return g=f(R,M,H),!g}),!!g}function Yl(l,f,g){var R=0,M=l==null?R:l.length;if(typeof f=="number"&&f===f&&M<=ee){for(;R<M;){var H=R+M>>>1,J=l[H];J!==null&&!Vr(J)&&(g?J<=f:J<f)?R=H+1:M=H}return M}return Lf(l,f,Tr,g)}function Lf(l,f,g,R){var M=0,H=l==null?0:l.length;if(H===0)return 0;f=g(f);for(var J=f!==f,ie=f===null,ae=Vr(f),he=f===r;M<H;){var ve=Fl((M+H)/2),be=g(l[ve]),Ee=be!==r,Ne=be===null,Me=be===be,$e=Vr(be);if(J)var Ae=R||Me;else he?Ae=Me&&(R||Ee):ie?Ae=Me&&Ee&&(R||!Ne):ae?Ae=Me&&Ee&&!Ne&&(R||!$e):Ne||$e?Ae=!1:Ae=R?be<=f:be<f;Ae?M=ve+1:H=ve}return lr(H,Q)}function JE(l,f){for(var g=-1,R=l.length,M=0,H=[];++g<R;){var J=l[g],ie=f?f(J):J;if(!g||!wn(ie,ae)){var ae=ie;H[M++]=J===0?0:J}}return H}function QE(l){return typeof l=="number"?l:Vr(l)?D:+l}function $r(l){if(typeof l=="string")return l;if(Be(l))return Rt(l,$r)+"";if(Vr(l))return PE?PE.call(l):"";var f=l+"";return f=="0"&&1/l==-Y?"-0":f}function xi(l,f,g){var R=-1,M=Rl,H=l.length,J=!0,ie=[],ae=ie;if(g)J=!1,M=pf;else if(H>=i){var he=f?null:K4(l);if(he)return Tl(he);J=!1,M=Pa,ae=new Gi}else ae=f?[]:ie;e:for(;++R<H;){var ve=l[R],be=f?f(ve):ve;if(ve=g||ve!==0?ve:0,J&&be===be){for(var Ee=ae.length;Ee--;)if(ae[Ee]===be)continue e;f&&ae.push(be),ie.push(ve)}else M(ae,be,g)||(ae!==ie&&ae.push(be),ie.push(ve))}return ie}function zf(l,f){return f=wi(f,l),l=IS(l,f),l==null||delete l[jn(on(f))]}function eS(l,f,g,R){return Fa(l,f,g(Yi(l,f)),R)}function Xl(l,f,g,R){for(var M=l.length,H=R?M:-1;(R?H--:++H<M)&&f(l[H],H,l););return g?nn(l,R?0:H,R?H+1:M):nn(l,R?H+1:0,R?M:H)}function tS(l,f){var g=l;return g instanceof Xe&&(g=g.value()),hf(f,function(R,M){return M.func.apply(M.thisArg,gi([R],M.args))},g)}function Bf(l,f,g){var R=l.length;if(R<2)return R?xi(l[0]):[];for(var M=-1,H=ce(R);++M<R;)for(var J=l[M],ie=-1;++ie<R;)ie!=M&&(H[M]=La(H[M]||J,l[ie],f,g));return xi(nr(H,1),f,g)}function rS(l,f,g){for(var R=-1,M=l.length,H=f.length,J={};++R<M;){var ie=R<H?f[R]:r;g(J,l[R],ie)}return J}function Ff(l){return jt(l)?l:[]}function $f(l){return typeof l=="function"?l:Tr}function wi(l,f){return Be(l)?l:Zf(l,f)?[l]:PS(at(l))}var L4=He;function _i(l,f,g){var R=l.length;return g=g===r?R:g,!f&&g>=R?l:nn(l,f,g)}var nS=O3||function(l){return rr.clearTimeout(l)};function iS(l,f){if(f)return l.slice();var g=l.length,R=OE?OE(g):new l.constructor(g);return l.copy(R),R}function Vf(l){var f=new l.constructor(l.byteLength);return new jl(f).set(new jl(l)),f}function z4(l,f){var g=f?Vf(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function B4(l){var f=new l.constructor(l.source,vl.exec(l));return f.lastIndex=l.lastIndex,f}function F4(l){return ja?vt(ja.call(l)):{}}function oS(l,f){var g=f?Vf(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function aS(l,f){if(l!==f){var g=l!==r,R=l===null,M=l===l,H=Vr(l),J=f!==r,ie=f===null,ae=f===f,he=Vr(f);if(!ie&&!he&&!H&&l>f||H&&J&&ae&&!ie&&!he||R&&J&&ae||!g&&ae||!M)return 1;if(!R&&!H&&!he&&l<f||he&&g&&M&&!R&&!H||ie&&g&&M||!J&&M||!ae)return-1}return 0}function $4(l,f,g){for(var R=-1,M=l.criteria,H=f.criteria,J=M.length,ie=g.length;++R<J;){var ae=aS(M[R],H[R]);if(ae){if(R>=ie)return ae;var he=g[R];return ae*(he=="desc"?-1:1)}}return l.index-f.index}function sS(l,f,g,R){for(var M=-1,H=l.length,J=g.length,ie=-1,ae=f.length,he=Ut(H-J,0),ve=ce(ae+he),be=!R;++ie<ae;)ve[ie]=f[ie];for(;++M<J;)(be||M<H)&&(ve[g[M]]=l[M]);for(;he--;)ve[ie++]=l[M++];return ve}function lS(l,f,g,R){for(var M=-1,H=l.length,J=-1,ie=g.length,ae=-1,he=f.length,ve=Ut(H-ie,0),be=ce(ve+he),Ee=!R;++M<ve;)be[M]=l[M];for(var Ne=M;++ae<he;)be[Ne+ae]=f[ae];for(;++J<ie;)(Ee||M<H)&&(be[Ne+g[J]]=l[M++]);return be}function Ir(l,f){var g=-1,R=l.length;for(f||(f=ce(R));++g<R;)f[g]=l[g];return f}function Dn(l,f,g,R){var M=!g;g||(g={});for(var H=-1,J=f.length;++H<J;){var ie=f[H],ae=R?R(g[ie],l[ie],ie,g,l):r;ae===r&&(ae=l[ie]),M?Zn(g,ie,ae):qa(g,ie,ae)}return g}function V4(l,f){return Dn(l,Xf(l),f)}function H4(l,f){return Dn(l,wS(l),f)}function Zl(l,f){return function(g,R){var M=Be(g)?YF:f4,H=f?f():{};return M(g,l,Pe(R,2),H)}}function Mo(l){return He(function(f,g){var R=-1,M=g.length,H=M>1?g[M-1]:r,J=M>2?g[2]:r;for(H=l.length>3&&typeof H=="function"?(M--,H):r,J&&gr(g[0],g[1],J)&&(H=M<3?r:H,M=1),f=vt(f);++R<M;){var ie=g[R];ie&&l(f,ie,R,H)}return f})}function cS(l,f){return function(g,R){if(g==null)return g;if(!Rr(g))return l(g,R);for(var M=g.length,H=f?M:-1,J=vt(g);(f?H--:++H<M)&&R(J[H],H,J)!==!1;);return g}}function uS(l){return function(f,g,R){for(var M=-1,H=vt(f),J=R(f),ie=J.length;ie--;){var ae=J[l?ie:++M];if(g(H[ae],ae,H)===!1)break}return f}}function W4(l,f,g){var R=f&m,M=$a(l);function H(){var J=this&&this!==rr&&this instanceof H?M:l;return J.apply(R?g:this,arguments)}return H}function dS(l){return function(f){f=at(f);var g=Co(f)?yn(f):r,R=g?g[0]:f.charAt(0),M=g?_i(g,1).join(""):f.slice(1);return R[l]()+M}}function Ao(l){return function(f){return hf(cO(lO(f).replace(DF,"")),l,"")}}function $a(l){return function(){var f=arguments;switch(f.length){case 0:return new l;case 1:return new l(f[0]);case 2:return new l(f[0],f[1]);case 3:return new l(f[0],f[1],f[2]);case 4:return new l(f[0],f[1],f[2],f[3]);case 5:return new l(f[0],f[1],f[2],f[3],f[4]);case 6:return new l(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new l(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var g=ko(l.prototype),R=l.apply(g,f);return kt(R)?R:g}}function U4(l,f,g){var R=$a(l);function M(){for(var H=arguments.length,J=ce(H),ie=H,ae=Do(M);ie--;)J[ie]=arguments[ie];var he=H<3&&J[0]!==ae&&J[H-1]!==ae?[]:mi(J,ae);if(H-=he.length,H<g)return gS(l,f,Jl,M.placeholder,r,J,he,r,r,g-H);var ve=this&&this!==rr&&this instanceof M?R:l;return Br(ve,this,J)}return M}function fS(l){return function(f,g,R){var M=vt(f);if(!Rr(f)){var H=Pe(g,3);f=Zt(f),g=function(ie){return H(M[ie],ie,M)}}var J=l(f,g,R);return J>-1?M[H?f[J]:J]:r}}function pS(l){return Qn(function(f){var g=f.length,R=g,M=tn.prototype.thru;for(l&&f.reverse();R--;){var H=f[R];if(typeof H!="function")throw new en(a);if(M&&!J&&rc(H)=="wrapper")var J=new tn([],!0)}for(R=J?R:g;++R<g;){H=f[R];var ie=rc(H),ae=ie=="wrapper"?Kf(H):r;ae&&Jf(ae[0])&&ae[1]==(N|_|E|T)&&!ae[4].length&&ae[9]==1?J=J[rc(ae[0])].apply(J,ae[3]):J=H.length==1&&Jf(H)?J[ie]():J.thru(H)}return function(){var he=arguments,ve=he[0];if(J&&he.length==1&&Be(ve))return J.plant(ve).value();for(var be=0,Ee=g?f[be].apply(this,he):ve;++be<g;)Ee=f[be].call(this,Ee);return Ee}})}function Jl(l,f,g,R,M,H,J,ie,ae,he){var ve=f&N,be=f&m,Ee=f&w,Ne=f&(_|S),Me=f&k,$e=Ee?r:$a(l);function Ae(){for(var Ue=arguments.length,Ze=ce(Ue),Hr=Ue;Hr--;)Ze[Hr]=arguments[Hr];if(Ne)var mr=Do(Ae),Wr=i3(Ze,mr);if(R&&(Ze=sS(Ze,R,M,Ne)),H&&(Ze=lS(Ze,H,J,Ne)),Ue-=Wr,Ne&&Ue<he){var qt=mi(Ze,mr);return gS(l,f,Jl,Ae.placeholder,g,Ze,qt,ie,ae,he-Ue)}var _n=be?g:this,ni=Ee?_n[l]:l;return Ue=Ze.length,ie?Ze=f$(Ze,ie):Me&&Ue>1&&Ze.reverse(),ve&&ae<Ue&&(Ze.length=ae),this&&this!==rr&&this instanceof Ae&&(ni=$e||$a(ni)),ni.apply(_n,Ze)}return Ae}function hS(l,f){return function(g,R){return x4(g,l,f(R),{})}}function Ql(l,f){return function(g,R){var M;if(g===r&&R===r)return f;if(g!==r&&(M=g),R!==r){if(M===r)return R;typeof g=="string"||typeof R=="string"?(g=$r(g),R=$r(R)):(g=QE(g),R=QE(R)),M=l(g,R)}return M}}function Hf(l){return Qn(function(f){return f=Rt(f,Fr(Pe())),He(function(g){var R=this;return l(f,function(M){return Br(M,R,g)})})})}function ec(l,f){f=f===r?" ":$r(f);var g=f.length;if(g<2)return g?qf(f,l):f;var R=qf(f,Bl(l/Io(f)));return Co(f)?_i(yn(R),0,l).join(""):R.slice(0,l)}function G4(l,f,g,R){var M=f&m,H=$a(l);function J(){for(var ie=-1,ae=arguments.length,he=-1,ve=R.length,be=ce(ve+ae),Ee=this&&this!==rr&&this instanceof J?H:l;++he<ve;)be[he]=R[he];for(;ae--;)be[he++]=arguments[++ie];return Br(Ee,M?g:this,be)}return J}function vS(l){return function(f,g,R){return R&&typeof R!="number"&&gr(f,g,R)&&(g=R=r),f=ri(f),g===r?(g=f,f=0):g=ri(g),R=R===r?f<g?1:-1:ri(R),k4(f,g,R,l)}}function tc(l){return function(f,g){return typeof f=="string"&&typeof g=="string"||(f=an(f),g=an(g)),l(f,g)}}function gS(l,f,g,R,M,H,J,ie,ae,he){var ve=f&_,be=ve?J:r,Ee=ve?r:J,Ne=ve?H:r,Me=ve?r:H;f|=ve?E:I,f&=~(ve?I:E),f&y||(f&=-4);var $e=[l,f,M,Ne,be,Me,Ee,ie,ae,he],Ae=g.apply(r,$e);return Jf(l)&&RS(Ae,$e),Ae.placeholder=R,NS(Ae,l,f)}function Wf(l){var f=Wt[l];return function(g,R){if(g=an(g),R=R==null?0:lr(Fe(R),292),R&&NE(g)){var M=(at(g)+"e").split("e"),H=f(M[0]+"e"+(+M[1]+R));return M=(at(H)+"e").split("e"),+(M[0]+"e"+(+M[1]-R))}return f(g)}}var K4=To&&1/Tl(new To([,-0]))[1]==Y?function(l){return new To(l)}:pp;function mS(l){return function(f){var g=cr(f);return g==ue?wf(f):g==je?d3(f):n3(f,l(f))}}function Jn(l,f,g,R,M,H,J,ie){var ae=f&w;if(!ae&&typeof l!="function")throw new en(a);var he=R?R.length:0;if(he||(f&=-97,R=M=r),J=J===r?J:Ut(Fe(J),0),ie=ie===r?ie:Fe(ie),he-=M?M.length:0,f&I){var ve=R,be=M;R=M=r}var Ee=ae?r:Kf(l),Ne=[l,f,g,R,M,ve,be,H,J,ie];if(Ee&&c$(Ne,Ee),l=Ne[0],f=Ne[1],g=Ne[2],R=Ne[3],M=Ne[4],ie=Ne[9]=Ne[9]===r?ae?0:l.length:Ut(Ne[9]-he,0),!ie&&f&(_|S)&&(f&=-25),!f||f==m)var Me=W4(l,f,g);else f==_||f==S?Me=U4(l,f,ie):(f==E||f==(m|E))&&!M.length?Me=G4(l,f,g,R):Me=Jl.apply(r,Ne);var $e=Ee?ZE:RS;return NS($e(Me,Ne),l,f)}function bS(l,f,g,R){return l===r||wn(l,No[g])&&!dt.call(R,g)?f:l}function yS(l,f,g,R,M,H){return kt(l)&&kt(f)&&(H.set(f,l),Kl(l,f,r,yS,H),H.delete(f)),l}function Y4(l){return Wa(l)?r:l}function xS(l,f,g,R,M,H){var J=g&x,ie=l.length,ae=f.length;if(ie!=ae&&!(J&&ae>ie))return!1;var he=H.get(l),ve=H.get(f);if(he&&ve)return he==f&&ve==l;var be=-1,Ee=!0,Ne=g&b?new Gi:r;for(H.set(l,f),H.set(f,l);++be<ie;){var Me=l[be],$e=f[be];if(R)var Ae=J?R($e,Me,be,f,l,H):R(Me,$e,be,l,f,H);if(Ae!==r){if(Ae)continue;Ee=!1;break}if(Ne){if(!vf(f,function(Ue,Ze){if(!Pa(Ne,Ze)&&(Me===Ue||M(Me,Ue,g,R,H)))return Ne.push(Ze)})){Ee=!1;break}}else if(!(Me===$e||M(Me,$e,g,R,H))){Ee=!1;break}}return H.delete(l),H.delete(f),Ee}function X4(l,f,g,R,M,H,J){switch(g){case De:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case Ve:return!(l.byteLength!=f.byteLength||!H(new jl(l),new jl(f)));case X:case te:case xe:return wn(+l,+f);case de:return l.name==f.name&&l.message==f.message;case Te:case Ke:return l==f+"";case ue:var ie=wf;case je:var ae=R&x;if(ie||(ie=Tl),l.size!=f.size&&!ae)return!1;var he=J.get(l);if(he)return he==f;R|=b,J.set(l,f);var ve=xS(ie(l),ie(f),R,M,H,J);return J.delete(l),ve;case qe:if(ja)return ja.call(l)==ja.call(f)}return!1}function Z4(l,f,g,R,M,H){var J=g&x,ie=Uf(l),ae=ie.length,he=Uf(f),ve=he.length;if(ae!=ve&&!J)return!1;for(var be=ae;be--;){var Ee=ie[be];if(!(J?Ee in f:dt.call(f,Ee)))return!1}var Ne=H.get(l),Me=H.get(f);if(Ne&&Me)return Ne==f&&Me==l;var $e=!0;H.set(l,f),H.set(f,l);for(var Ae=J;++be<ae;){Ee=ie[be];var Ue=l[Ee],Ze=f[Ee];if(R)var Hr=J?R(Ze,Ue,Ee,f,l,H):R(Ue,Ze,Ee,l,f,H);if(!(Hr===r?Ue===Ze||M(Ue,Ze,g,R,H):Hr)){$e=!1;break}Ae||(Ae=Ee=="constructor")}if($e&&!Ae){var mr=l.constructor,Wr=f.constructor;mr!=Wr&&"constructor"in l&&"constructor"in f&&!(typeof mr=="function"&&mr instanceof mr&&typeof Wr=="function"&&Wr instanceof Wr)&&($e=!1)}return H.delete(l),H.delete(f),$e}function Qn(l){return ep(CS(l,r,DS),l+"")}function Uf(l){return BE(l,Zt,Xf)}function Gf(l){return BE(l,Nr,wS)}var Kf=$l?function(l){return $l.get(l)}:pp;function rc(l){for(var f=l.name+"",g=Po[f],R=dt.call(Po,f)?g.length:0;R--;){var M=g[R],H=M.func;if(H==null||H==l)return M.name}return f}function Do(l){var f=dt.call(V,"placeholder")?V:l;return f.placeholder}function Pe(){var l=V.iteratee||dp;return l=l===dp?VE:l,arguments.length?l(arguments[0],arguments[1]):l}function nc(l,f){var g=l.__data__;return o$(f)?g[typeof f=="string"?"string":"hash"]:g.map}function Yf(l){for(var f=Zt(l),g=f.length;g--;){var R=f[g],M=l[R];f[g]=[R,M,SS(M)]}return f}function Xi(l,f){var g=l3(l,f);return $E(g)?g:r}function J4(l){var f=dt.call(l,Wi),g=l[Wi];try{l[Wi]=r;var R=!0}catch{}var M=Al.call(l);return R&&(f?l[Wi]=g:delete l[Wi]),M}var Xf=Ef?function(l){return l==null?[]:(l=vt(l),vi(Ef(l),function(f){return IE.call(l,f)}))}:hp,wS=Ef?function(l){for(var f=[];l;)gi(f,Xf(l)),l=ql(l);return f}:hp,cr=vr;(Sf&&cr(new Sf(new ArrayBuffer(1)))!=De||Ma&&cr(new Ma)!=ue||Of&&cr(Of.resolve())!=we||To&&cr(new To)!=je||Aa&&cr(new Aa)!=ht)&&(cr=function(l){var f=vr(l),g=f==se?l.constructor:r,R=g?Zi(g):"";if(R)switch(R){case A3:return De;case D3:return ue;case j3:return we;case q3:return je;case L3:return ht}return f});function Q4(l,f,g){for(var R=-1,M=g.length;++R<M;){var H=g[R],J=H.size;switch(H.type){case"drop":l+=J;break;case"dropRight":f-=J;break;case"take":f=lr(f,l+J);break;case"takeRight":l=Ut(l,f-J);break}}return{start:l,end:f}}function e$(l){var f=l.match($i);return f?f[1].split(Hd):[]}function _S(l,f,g){f=wi(f,l);for(var R=-1,M=f.length,H=!1;++R<M;){var J=jn(f[R]);if(!(H=l!=null&&g(l,J)))break;l=l[J]}return H||++R!=M?H:(M=l==null?0:l.length,!!M&&uc(M)&&ei(J,M)&&(Be(l)||Ji(l)))}function t$(l){var f=l.length,g=new l.constructor(f);return f&&typeof l[0]=="string"&&dt.call(l,"index")&&(g.index=l.index,g.input=l.input),g}function ES(l){return typeof l.constructor=="function"&&!Va(l)?ko(ql(l)):{}}function r$(l,f,g){var R=l.constructor;switch(f){case Ve:return Vf(l);case X:case te:return new R(+l);case De:return z4(l,g);case it:case ot:case Qt:case Bt:case Tt:case Le:case Ye:case bt:case Ot:return oS(l,g);case ue:return new R;case xe:case Ke:return new R(l);case Te:return B4(l);case je:return new R;case qe:return F4(l)}}function n$(l,f){var g=f.length;if(!g)return l;var R=g-1;return f[R]=(g>1?"& ":"")+f[R],f=f.join(g>2?", ":" "),l.replace(Kn,`{
68
- /* [wrapped with `+f+`] */
69
- `)}function i$(l){return Be(l)||Ji(l)||!!(RE&&l&&l[RE])}function ei(l,f){var g=typeof l;return f=f??U,!!f&&(g=="number"||g!="symbol"&&Qd.test(l))&&l>-1&&l%1==0&&l<f}function gr(l,f,g){if(!kt(g))return!1;var R=typeof f;return(R=="number"?Rr(g)&&ei(f,g.length):R=="string"&&f in g)?wn(g[f],l):!1}function Zf(l,f){if(Be(l))return!1;var g=typeof l;return g=="number"||g=="symbol"||g=="boolean"||l==null||Vr(l)?!0:Dt.test(l)||!Mn.test(l)||f!=null&&l in vt(f)}function o$(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function Jf(l){var f=rc(l),g=V[f];if(typeof g!="function"||!(f in Xe.prototype))return!1;if(l===g)return!0;var R=Kf(g);return!!R&&l===R[0]}function a$(l){return!!SE&&SE in l}var s$=kl?ti:vp;function Va(l){var f=l&&l.constructor,g=typeof f=="function"&&f.prototype||No;return l===g}function SS(l){return l===l&&!kt(l)}function OS(l,f){return function(g){return g==null?!1:g[l]===f&&(f!==r||l in vt(g))}}function l$(l){var f=lc(l,function(R){return g.size===u&&g.clear(),R}),g=f.cache;return f}function c$(l,f){var g=l[1],R=f[1],M=g|R,H=M<(m|w|N),J=R==N&&g==_||R==N&&g==T&&l[7].length<=f[8]||R==(N|T)&&f[7].length<=f[8]&&g==_;if(!(H||J))return l;R&m&&(l[2]=f[2],M|=g&m?0:y);var ie=f[3];if(ie){var ae=l[3];l[3]=ae?sS(ae,ie,f[4]):ie,l[4]=ae?mi(l[3],d):f[4]}return ie=f[5],ie&&(ae=l[5],l[5]=ae?lS(ae,ie,f[6]):ie,l[6]=ae?mi(l[5],d):f[6]),ie=f[7],ie&&(l[7]=ie),R&N&&(l[8]=l[8]==null?f[8]:lr(l[8],f[8])),l[9]==null&&(l[9]=f[9]),l[0]=f[0],l[1]=M,l}function u$(l){var f=[];if(l!=null)for(var g in vt(l))f.push(g);return f}function d$(l){return Al.call(l)}function CS(l,f,g){return f=Ut(f===r?l.length-1:f,0),function(){for(var R=arguments,M=-1,H=Ut(R.length-f,0),J=ce(H);++M<H;)J[M]=R[f+M];M=-1;for(var ie=ce(f+1);++M<f;)ie[M]=R[M];return ie[f]=g(J),Br(l,this,ie)}}function IS(l,f){return f.length<2?l:Yi(l,nn(f,0,-1))}function f$(l,f){for(var g=l.length,R=lr(f.length,g),M=Ir(l);R--;){var H=f[R];l[R]=ei(H,g)?M[H]:r}return l}function Qf(l,f){if(!(f==="constructor"&&typeof l[f]=="function")&&f!="__proto__")return l[f]}var RS=TS(ZE),Ha=I3||function(l,f){return rr.setTimeout(l,f)},ep=TS(D4);function NS(l,f,g){var R=f+"";return ep(l,n$(R,p$(e$(R),g)))}function TS(l){var f=0,g=0;return function(){var R=P3(),M=z-(R-g);if(g=R,M>0){if(++f>=A)return arguments[0]}else f=0;return l.apply(r,arguments)}}function ic(l,f){var g=-1,R=l.length,M=R-1;for(f=f===r?R:f;++g<f;){var H=jf(g,M),J=l[H];l[H]=l[g],l[g]=J}return l.length=f,l}var PS=l$(function(l){var f=[];return l.charCodeAt(0)===46&&f.push(""),l.replace(tr,function(g,R,M,H){f.push(M?H.replace(Gd,"$1"):R||g)}),f});function jn(l){if(typeof l=="string"||Vr(l))return l;var f=l+"";return f=="0"&&1/l==-Y?"-0":f}function Zi(l){if(l!=null){try{return Ml.call(l)}catch{}try{return l+""}catch{}}return""}function p$(l,f){return Qr(j,function(g){var R="_."+g[0];f&g[1]&&!Rl(l,R)&&l.push(R)}),l.sort()}function kS(l){if(l instanceof Xe)return l.clone();var f=new tn(l.__wrapped__,l.__chain__);return f.__actions__=Ir(l.__actions__),f.__index__=l.__index__,f.__values__=l.__values__,f}function h$(l,f,g){(g?gr(l,f,g):f===r)?f=1:f=Ut(Fe(f),0);var R=l==null?0:l.length;if(!R||f<1)return[];for(var M=0,H=0,J=ce(Bl(R/f));M<R;)J[H++]=nn(l,M,M+=f);return J}function v$(l){for(var f=-1,g=l==null?0:l.length,R=0,M=[];++f<g;){var H=l[f];H&&(M[R++]=H)}return M}function g$(){var l=arguments.length;if(!l)return[];for(var f=ce(l-1),g=arguments[0],R=l;R--;)f[R-1]=arguments[R];return gi(Be(g)?Ir(g):[g],nr(f,1))}var m$=He(function(l,f){return jt(l)?La(l,nr(f,1,jt,!0)):[]}),b$=He(function(l,f){var g=on(f);return jt(g)&&(g=r),jt(l)?La(l,nr(f,1,jt,!0),Pe(g,2)):[]}),y$=He(function(l,f){var g=on(f);return jt(g)&&(g=r),jt(l)?La(l,nr(f,1,jt,!0),r,g):[]});function x$(l,f,g){var R=l==null?0:l.length;return R?(f=g||f===r?1:Fe(f),nn(l,f<0?0:f,R)):[]}function w$(l,f,g){var R=l==null?0:l.length;return R?(f=g||f===r?1:Fe(f),f=R-f,nn(l,0,f<0?0:f)):[]}function _$(l,f){return l&&l.length?Xl(l,Pe(f,3),!0,!0):[]}function E$(l,f){return l&&l.length?Xl(l,Pe(f,3),!0):[]}function S$(l,f,g,R){var M=l==null?0:l.length;return M?(g&&typeof g!="number"&&gr(l,f,g)&&(g=0,R=M),g4(l,f,g,R)):[]}function MS(l,f,g){var R=l==null?0:l.length;if(!R)return-1;var M=g==null?0:Fe(g);return M<0&&(M=Ut(R+M,0)),Nl(l,Pe(f,3),M)}function AS(l,f,g){var R=l==null?0:l.length;if(!R)return-1;var M=R-1;return g!==r&&(M=Fe(g),M=g<0?Ut(R+M,0):lr(M,R-1)),Nl(l,Pe(f,3),M,!0)}function DS(l){var f=l==null?0:l.length;return f?nr(l,1):[]}function O$(l){var f=l==null?0:l.length;return f?nr(l,Y):[]}function C$(l,f){var g=l==null?0:l.length;return g?(f=f===r?1:Fe(f),nr(l,f)):[]}function I$(l){for(var f=-1,g=l==null?0:l.length,R={};++f<g;){var M=l[f];R[M[0]]=M[1]}return R}function jS(l){return l&&l.length?l[0]:r}function R$(l,f,g){var R=l==null?0:l.length;if(!R)return-1;var M=g==null?0:Fe(g);return M<0&&(M=Ut(R+M,0)),Oo(l,f,M)}function N$(l){var f=l==null?0:l.length;return f?nn(l,0,-1):[]}var T$=He(function(l){var f=Rt(l,Ff);return f.length&&f[0]===l[0]?Pf(f):[]}),P$=He(function(l){var f=on(l),g=Rt(l,Ff);return f===on(g)?f=r:g.pop(),g.length&&g[0]===l[0]?Pf(g,Pe(f,2)):[]}),k$=He(function(l){var f=on(l),g=Rt(l,Ff);return f=typeof f=="function"?f:r,f&&g.pop(),g.length&&g[0]===l[0]?Pf(g,r,f):[]});function M$(l,f){return l==null?"":N3.call(l,f)}function on(l){var f=l==null?0:l.length;return f?l[f-1]:r}function A$(l,f,g){var R=l==null?0:l.length;if(!R)return-1;var M=R;return g!==r&&(M=Fe(g),M=M<0?Ut(R+M,0):lr(M,R-1)),f===f?p3(l,f,M):Nl(l,gE,M,!0)}function D$(l,f){return l&&l.length?GE(l,Fe(f)):r}var j$=He(qS);function qS(l,f){return l&&l.length&&f&&f.length?Df(l,f):l}function q$(l,f,g){return l&&l.length&&f&&f.length?Df(l,f,Pe(g,2)):l}function L$(l,f,g){return l&&l.length&&f&&f.length?Df(l,f,r,g):l}var z$=Qn(function(l,f){var g=l==null?0:l.length,R=If(l,f);return XE(l,Rt(f,function(M){return ei(M,g)?+M:M}).sort(aS)),R});function B$(l,f){var g=[];if(!(l&&l.length))return g;var R=-1,M=[],H=l.length;for(f=Pe(f,3);++R<H;){var J=l[R];f(J,R,l)&&(g.push(J),M.push(R))}return XE(l,M),g}function tp(l){return l==null?l:M3.call(l)}function F$(l,f,g){var R=l==null?0:l.length;return R?(g&&typeof g!="number"&&gr(l,f,g)?(f=0,g=R):(f=f==null?0:Fe(f),g=g===r?R:Fe(g)),nn(l,f,g)):[]}function $$(l,f){return Yl(l,f)}function V$(l,f,g){return Lf(l,f,Pe(g,2))}function H$(l,f){var g=l==null?0:l.length;if(g){var R=Yl(l,f);if(R<g&&wn(l[R],f))return R}return-1}function W$(l,f){return Yl(l,f,!0)}function U$(l,f,g){return Lf(l,f,Pe(g,2),!0)}function G$(l,f){var g=l==null?0:l.length;if(g){var R=Yl(l,f,!0)-1;if(wn(l[R],f))return R}return-1}function K$(l){return l&&l.length?JE(l):[]}function Y$(l,f){return l&&l.length?JE(l,Pe(f,2)):[]}function X$(l){var f=l==null?0:l.length;return f?nn(l,1,f):[]}function Z$(l,f,g){return l&&l.length?(f=g||f===r?1:Fe(f),nn(l,0,f<0?0:f)):[]}function J$(l,f,g){var R=l==null?0:l.length;return R?(f=g||f===r?1:Fe(f),f=R-f,nn(l,f<0?0:f,R)):[]}function Q$(l,f){return l&&l.length?Xl(l,Pe(f,3),!1,!0):[]}function e6(l,f){return l&&l.length?Xl(l,Pe(f,3)):[]}var t6=He(function(l){return xi(nr(l,1,jt,!0))}),r6=He(function(l){var f=on(l);return jt(f)&&(f=r),xi(nr(l,1,jt,!0),Pe(f,2))}),n6=He(function(l){var f=on(l);return f=typeof f=="function"?f:r,xi(nr(l,1,jt,!0),r,f)});function i6(l){return l&&l.length?xi(l):[]}function o6(l,f){return l&&l.length?xi(l,Pe(f,2)):[]}function a6(l,f){return f=typeof f=="function"?f:r,l&&l.length?xi(l,r,f):[]}function rp(l){if(!(l&&l.length))return[];var f=0;return l=vi(l,function(g){if(jt(g))return f=Ut(g.length,f),!0}),yf(f,function(g){return Rt(l,gf(g))})}function LS(l,f){if(!(l&&l.length))return[];var g=rp(l);return f==null?g:Rt(g,function(R){return Br(f,r,R)})}var s6=He(function(l,f){return jt(l)?La(l,f):[]}),l6=He(function(l){return Bf(vi(l,jt))}),c6=He(function(l){var f=on(l);return jt(f)&&(f=r),Bf(vi(l,jt),Pe(f,2))}),u6=He(function(l){var f=on(l);return f=typeof f=="function"?f:r,Bf(vi(l,jt),r,f)}),d6=He(rp);function f6(l,f){return rS(l||[],f||[],qa)}function p6(l,f){return rS(l||[],f||[],Fa)}var h6=He(function(l){var f=l.length,g=f>1?l[f-1]:r;return g=typeof g=="function"?(l.pop(),g):r,LS(l,g)});function zS(l){var f=V(l);return f.__chain__=!0,f}function v6(l,f){return f(l),l}function oc(l,f){return f(l)}var g6=Qn(function(l){var f=l.length,g=f?l[0]:0,R=this.__wrapped__,M=function(H){return If(H,l)};return f>1||this.__actions__.length||!(R instanceof Xe)||!ei(g)?this.thru(M):(R=R.slice(g,+g+(f?1:0)),R.__actions__.push({func:oc,args:[M],thisArg:r}),new tn(R,this.__chain__).thru(function(H){return f&&!H.length&&H.push(r),H}))});function m6(){return zS(this)}function b6(){return new tn(this.value(),this.__chain__)}function y6(){this.__values__===r&&(this.__values__=QS(this.value()));var l=this.__index__>=this.__values__.length,f=l?r:this.__values__[this.__index__++];return{done:l,value:f}}function x6(){return this}function w6(l){for(var f,g=this;g instanceof Hl;){var R=kS(g);R.__index__=0,R.__values__=r,f?M.__wrapped__=R:f=R;var M=R;g=g.__wrapped__}return M.__wrapped__=l,f}function _6(){var l=this.__wrapped__;if(l instanceof Xe){var f=l;return this.__actions__.length&&(f=new Xe(this)),f=f.reverse(),f.__actions__.push({func:oc,args:[tp],thisArg:r}),new tn(f,this.__chain__)}return this.thru(tp)}function E6(){return tS(this.__wrapped__,this.__actions__)}var S6=Zl(function(l,f,g){dt.call(l,g)?++l[g]:Zn(l,g,1)});function O6(l,f,g){var R=Be(l)?hE:v4;return g&&gr(l,f,g)&&(f=r),R(l,Pe(f,3))}function C6(l,f){var g=Be(l)?vi:LE;return g(l,Pe(f,3))}var I6=fS(MS),R6=fS(AS);function N6(l,f){return nr(ac(l,f),1)}function T6(l,f){return nr(ac(l,f),Y)}function P6(l,f,g){return g=g===r?1:Fe(g),nr(ac(l,f),g)}function BS(l,f){var g=Be(l)?Qr:yi;return g(l,Pe(f,3))}function FS(l,f){var g=Be(l)?XF:qE;return g(l,Pe(f,3))}var k6=Zl(function(l,f,g){dt.call(l,g)?l[g].push(f):Zn(l,g,[f])});function M6(l,f,g,R){l=Rr(l)?l:qo(l),g=g&&!R?Fe(g):0;var M=l.length;return g<0&&(g=Ut(M+g,0)),dc(l)?g<=M&&l.indexOf(f,g)>-1:!!M&&Oo(l,f,g)>-1}var A6=He(function(l,f,g){var R=-1,M=typeof f=="function",H=Rr(l)?ce(l.length):[];return yi(l,function(J){H[++R]=M?Br(f,J,g):za(J,f,g)}),H}),D6=Zl(function(l,f,g){Zn(l,g,f)});function ac(l,f){var g=Be(l)?Rt:HE;return g(l,Pe(f,3))}function j6(l,f,g,R){return l==null?[]:(Be(f)||(f=f==null?[]:[f]),g=R?r:g,Be(g)||(g=g==null?[]:[g]),KE(l,f,g))}var q6=Zl(function(l,f,g){l[g?0:1].push(f)},function(){return[[],[]]});function L6(l,f,g){var R=Be(l)?hf:bE,M=arguments.length<3;return R(l,Pe(f,4),g,M,yi)}function z6(l,f,g){var R=Be(l)?ZF:bE,M=arguments.length<3;return R(l,Pe(f,4),g,M,qE)}function B6(l,f){var g=Be(l)?vi:LE;return g(l,cc(Pe(f,3)))}function F6(l){var f=Be(l)?ME:M4;return f(l)}function $6(l,f,g){(g?gr(l,f,g):f===r)?f=1:f=Fe(f);var R=Be(l)?u4:A4;return R(l,f)}function V6(l){var f=Be(l)?d4:j4;return f(l)}function H6(l){if(l==null)return 0;if(Rr(l))return dc(l)?Io(l):l.length;var f=cr(l);return f==ue||f==je?l.size:Mf(l).length}function W6(l,f,g){var R=Be(l)?vf:q4;return g&&gr(l,f,g)&&(f=r),R(l,Pe(f,3))}var U6=He(function(l,f){if(l==null)return[];var g=f.length;return g>1&&gr(l,f[0],f[1])?f=[]:g>2&&gr(f[0],f[1],f[2])&&(f=[f[0]]),KE(l,nr(f,1),[])}),sc=C3||function(){return rr.Date.now()};function G6(l,f){if(typeof f!="function")throw new en(a);return l=Fe(l),function(){if(--l<1)return f.apply(this,arguments)}}function $S(l,f,g){return f=g?r:f,f=l&&f==null?l.length:f,Jn(l,N,r,r,r,r,f)}function VS(l,f){var g;if(typeof f!="function")throw new en(a);return l=Fe(l),function(){return--l>0&&(g=f.apply(this,arguments)),l<=1&&(f=r),g}}var np=He(function(l,f,g){var R=m;if(g.length){var M=mi(g,Do(np));R|=E}return Jn(l,R,f,g,M)}),HS=He(function(l,f,g){var R=m|w;if(g.length){var M=mi(g,Do(HS));R|=E}return Jn(f,R,l,g,M)});function WS(l,f,g){f=g?r:f;var R=Jn(l,_,r,r,r,r,r,f);return R.placeholder=WS.placeholder,R}function US(l,f,g){f=g?r:f;var R=Jn(l,S,r,r,r,r,r,f);return R.placeholder=US.placeholder,R}function GS(l,f,g){var R,M,H,J,ie,ae,he=0,ve=!1,be=!1,Ee=!0;if(typeof l!="function")throw new en(a);f=an(f)||0,kt(g)&&(ve=!!g.leading,be="maxWait"in g,H=be?Ut(an(g.maxWait)||0,f):H,Ee="trailing"in g?!!g.trailing:Ee);function Ne(qt){var _n=R,ni=M;return R=M=r,he=qt,J=l.apply(ni,_n),J}function Me(qt){return he=qt,ie=Ha(Ue,f),ve?Ne(qt):J}function $e(qt){var _n=qt-ae,ni=qt-he,fO=f-_n;return be?lr(fO,H-ni):fO}function Ae(qt){var _n=qt-ae,ni=qt-he;return ae===r||_n>=f||_n<0||be&&ni>=H}function Ue(){var qt=sc();if(Ae(qt))return Ze(qt);ie=Ha(Ue,$e(qt))}function Ze(qt){return ie=r,Ee&&R?Ne(qt):(R=M=r,J)}function Hr(){ie!==r&&nS(ie),he=0,R=ae=M=ie=r}function mr(){return ie===r?J:Ze(sc())}function Wr(){var qt=sc(),_n=Ae(qt);if(R=arguments,M=this,ae=qt,_n){if(ie===r)return Me(ae);if(be)return nS(ie),ie=Ha(Ue,f),Ne(ae)}return ie===r&&(ie=Ha(Ue,f)),J}return Wr.cancel=Hr,Wr.flush=mr,Wr}var K6=He(function(l,f){return jE(l,1,f)}),Y6=He(function(l,f,g){return jE(l,an(f)||0,g)});function X6(l){return Jn(l,k)}function lc(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new en(a);var g=function(){var R=arguments,M=f?f.apply(this,R):R[0],H=g.cache;if(H.has(M))return H.get(M);var J=l.apply(this,R);return g.cache=H.set(M,J)||H,J};return g.cache=new(lc.Cache||Xn),g}lc.Cache=Xn;function cc(l){if(typeof l!="function")throw new en(a);return function(){var f=arguments;switch(f.length){case 0:return!l.call(this);case 1:return!l.call(this,f[0]);case 2:return!l.call(this,f[0],f[1]);case 3:return!l.call(this,f[0],f[1],f[2])}return!l.apply(this,f)}}function Z6(l){return VS(2,l)}var J6=L4(function(l,f){f=f.length==1&&Be(f[0])?Rt(f[0],Fr(Pe())):Rt(nr(f,1),Fr(Pe()));var g=f.length;return He(function(R){for(var M=-1,H=lr(R.length,g);++M<H;)R[M]=f[M].call(this,R[M]);return Br(l,this,R)})}),ip=He(function(l,f){var g=mi(f,Do(ip));return Jn(l,E,r,f,g)}),KS=He(function(l,f){var g=mi(f,Do(KS));return Jn(l,I,r,f,g)}),Q6=Qn(function(l,f){return Jn(l,T,r,r,r,f)});function eV(l,f){if(typeof l!="function")throw new en(a);return f=f===r?f:Fe(f),He(l,f)}function tV(l,f){if(typeof l!="function")throw new en(a);return f=f==null?0:Ut(Fe(f),0),He(function(g){var R=g[f],M=_i(g,0,f);return R&&gi(M,R),Br(l,this,M)})}function rV(l,f,g){var R=!0,M=!0;if(typeof l!="function")throw new en(a);return kt(g)&&(R="leading"in g?!!g.leading:R,M="trailing"in g?!!g.trailing:M),GS(l,f,{leading:R,maxWait:f,trailing:M})}function nV(l){return $S(l,1)}function iV(l,f){return ip($f(f),l)}function oV(){if(!arguments.length)return[];var l=arguments[0];return Be(l)?l:[l]}function aV(l){return rn(l,h)}function sV(l,f){return f=typeof f=="function"?f:r,rn(l,h,f)}function lV(l){return rn(l,p|h)}function cV(l,f){return f=typeof f=="function"?f:r,rn(l,p|h,f)}function uV(l,f){return f==null||DE(l,f,Zt(f))}function wn(l,f){return l===f||l!==l&&f!==f}var dV=tc(Tf),fV=tc(function(l,f){return l>=f}),Ji=FE((function(){return arguments})())?FE:function(l){return Mt(l)&&dt.call(l,"callee")&&!IE.call(l,"callee")},Be=ce.isArray,pV=lE?Fr(lE):w4;function Rr(l){return l!=null&&uc(l.length)&&!ti(l)}function jt(l){return Mt(l)&&Rr(l)}function hV(l){return l===!0||l===!1||Mt(l)&&vr(l)==X}var Ei=R3||vp,vV=cE?Fr(cE):_4;function gV(l){return Mt(l)&&l.nodeType===1&&!Wa(l)}function mV(l){if(l==null)return!0;if(Rr(l)&&(Be(l)||typeof l=="string"||typeof l.splice=="function"||Ei(l)||jo(l)||Ji(l)))return!l.length;var f=cr(l);if(f==ue||f==je)return!l.size;if(Va(l))return!Mf(l).length;for(var g in l)if(dt.call(l,g))return!1;return!0}function bV(l,f){return Ba(l,f)}function yV(l,f,g){g=typeof g=="function"?g:r;var R=g?g(l,f):r;return R===r?Ba(l,f,r,g):!!R}function op(l){if(!Mt(l))return!1;var f=vr(l);return f==de||f==ne||typeof l.message=="string"&&typeof l.name=="string"&&!Wa(l)}function xV(l){return typeof l=="number"&&NE(l)}function ti(l){if(!kt(l))return!1;var f=vr(l);return f==re||f==ge||f==q||f==Re}function YS(l){return typeof l=="number"&&l==Fe(l)}function uc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=U}function kt(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function Mt(l){return l!=null&&typeof l=="object"}var XS=uE?Fr(uE):S4;function wV(l,f){return l===f||kf(l,f,Yf(f))}function _V(l,f,g){return g=typeof g=="function"?g:r,kf(l,f,Yf(f),g)}function EV(l){return ZS(l)&&l!=+l}function SV(l){if(s$(l))throw new ze(o);return $E(l)}function OV(l){return l===null}function CV(l){return l==null}function ZS(l){return typeof l=="number"||Mt(l)&&vr(l)==xe}function Wa(l){if(!Mt(l)||vr(l)!=se)return!1;var f=ql(l);if(f===null)return!0;var g=dt.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&Ml.call(g)==_3}var ap=dE?Fr(dE):O4;function IV(l){return YS(l)&&l>=-U&&l<=U}var JS=fE?Fr(fE):C4;function dc(l){return typeof l=="string"||!Be(l)&&Mt(l)&&vr(l)==Ke}function Vr(l){return typeof l=="symbol"||Mt(l)&&vr(l)==qe}var jo=pE?Fr(pE):I4;function RV(l){return l===r}function NV(l){return Mt(l)&&cr(l)==ht}function TV(l){return Mt(l)&&vr(l)==St}var PV=tc(Af),kV=tc(function(l,f){return l<=f});function QS(l){if(!l)return[];if(Rr(l))return dc(l)?yn(l):Ir(l);if(ka&&l[ka])return u3(l[ka]());var f=cr(l),g=f==ue?wf:f==je?Tl:qo;return g(l)}function ri(l){if(!l)return l===0?l:0;if(l=an(l),l===Y||l===-Y){var f=l<0?-1:1;return f*Z}return l===l?l:0}function Fe(l){var f=ri(l),g=f%1;return f===f?g?f-g:f:0}function eO(l){return l?Ki(Fe(l),0,W):0}function an(l){if(typeof l=="number")return l;if(Vr(l))return D;if(kt(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=kt(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=yE(l);var g=Xd.test(l);return g||Jd.test(l)?GF(l.slice(2),g?2:8):Yd.test(l)?D:+l}function tO(l){return Dn(l,Nr(l))}function MV(l){return l?Ki(Fe(l),-U,U):l===0?l:0}function at(l){return l==null?"":$r(l)}var AV=Mo(function(l,f){if(Va(f)||Rr(f)){Dn(f,Zt(f),l);return}for(var g in f)dt.call(f,g)&&qa(l,g,f[g])}),rO=Mo(function(l,f){Dn(f,Nr(f),l)}),fc=Mo(function(l,f,g,R){Dn(f,Nr(f),l,R)}),DV=Mo(function(l,f,g,R){Dn(f,Zt(f),l,R)}),jV=Qn(If);function qV(l,f){var g=ko(l);return f==null?g:AE(g,f)}var LV=He(function(l,f){l=vt(l);var g=-1,R=f.length,M=R>2?f[2]:r;for(M&&gr(f[0],f[1],M)&&(R=1);++g<R;)for(var H=f[g],J=Nr(H),ie=-1,ae=J.length;++ie<ae;){var he=J[ie],ve=l[he];(ve===r||wn(ve,No[he])&&!dt.call(l,he))&&(l[he]=H[he])}return l}),zV=He(function(l){return l.push(r,yS),Br(nO,r,l)});function BV(l,f){return vE(l,Pe(f,3),An)}function FV(l,f){return vE(l,Pe(f,3),Nf)}function $V(l,f){return l==null?l:Rf(l,Pe(f,3),Nr)}function VV(l,f){return l==null?l:zE(l,Pe(f,3),Nr)}function HV(l,f){return l&&An(l,Pe(f,3))}function WV(l,f){return l&&Nf(l,Pe(f,3))}function UV(l){return l==null?[]:Gl(l,Zt(l))}function GV(l){return l==null?[]:Gl(l,Nr(l))}function sp(l,f,g){var R=l==null?r:Yi(l,f);return R===r?g:R}function KV(l,f){return l!=null&&_S(l,f,m4)}function lp(l,f){return l!=null&&_S(l,f,b4)}var YV=hS(function(l,f,g){f!=null&&typeof f.toString!="function"&&(f=Al.call(f)),l[f]=g},up(Tr)),XV=hS(function(l,f,g){f!=null&&typeof f.toString!="function"&&(f=Al.call(f)),dt.call(l,f)?l[f].push(g):l[f]=[g]},Pe),ZV=He(za);function Zt(l){return Rr(l)?kE(l):Mf(l)}function Nr(l){return Rr(l)?kE(l,!0):R4(l)}function JV(l,f){var g={};return f=Pe(f,3),An(l,function(R,M,H){Zn(g,f(R,M,H),R)}),g}function QV(l,f){var g={};return f=Pe(f,3),An(l,function(R,M,H){Zn(g,M,f(R,M,H))}),g}var eH=Mo(function(l,f,g){Kl(l,f,g)}),nO=Mo(function(l,f,g,R){Kl(l,f,g,R)}),tH=Qn(function(l,f){var g={};if(l==null)return g;var R=!1;f=Rt(f,function(H){return H=wi(H,l),R||(R=H.length>1),H}),Dn(l,Gf(l),g),R&&(g=rn(g,p|v|h,Y4));for(var M=f.length;M--;)zf(g,f[M]);return g});function rH(l,f){return iO(l,cc(Pe(f)))}var nH=Qn(function(l,f){return l==null?{}:T4(l,f)});function iO(l,f){if(l==null)return{};var g=Rt(Gf(l),function(R){return[R]});return f=Pe(f),YE(l,g,function(R,M){return f(R,M[0])})}function iH(l,f,g){f=wi(f,l);var R=-1,M=f.length;for(M||(M=1,l=r);++R<M;){var H=l==null?r:l[jn(f[R])];H===r&&(R=M,H=g),l=ti(H)?H.call(l):H}return l}function oH(l,f,g){return l==null?l:Fa(l,f,g)}function aH(l,f,g,R){return R=typeof R=="function"?R:r,l==null?l:Fa(l,f,g,R)}var oO=mS(Zt),aO=mS(Nr);function sH(l,f,g){var R=Be(l),M=R||Ei(l)||jo(l);if(f=Pe(f,4),g==null){var H=l&&l.constructor;M?g=R?new H:[]:kt(l)?g=ti(H)?ko(ql(l)):{}:g={}}return(M?Qr:An)(l,function(J,ie,ae){return f(g,J,ie,ae)}),g}function lH(l,f){return l==null?!0:zf(l,f)}function cH(l,f,g){return l==null?l:eS(l,f,$f(g))}function uH(l,f,g,R){return R=typeof R=="function"?R:r,l==null?l:eS(l,f,$f(g),R)}function qo(l){return l==null?[]:xf(l,Zt(l))}function dH(l){return l==null?[]:xf(l,Nr(l))}function fH(l,f,g){return g===r&&(g=f,f=r),g!==r&&(g=an(g),g=g===g?g:0),f!==r&&(f=an(f),f=f===f?f:0),Ki(an(l),f,g)}function pH(l,f,g){return f=ri(f),g===r?(g=f,f=0):g=ri(g),l=an(l),y4(l,f,g)}function hH(l,f,g){if(g&&typeof g!="boolean"&&gr(l,f,g)&&(f=g=r),g===r&&(typeof f=="boolean"?(g=f,f=r):typeof l=="boolean"&&(g=l,l=r)),l===r&&f===r?(l=0,f=1):(l=ri(l),f===r?(f=l,l=0):f=ri(f)),l>f){var R=l;l=f,f=R}if(g||l%1||f%1){var M=TE();return lr(l+M*(f-l+UF("1e-"+((M+"").length-1))),f)}return jf(l,f)}var vH=Ao(function(l,f,g){return f=f.toLowerCase(),l+(g?sO(f):f)});function sO(l){return cp(at(l).toLowerCase())}function lO(l){return l=at(l),l&&l.replace(ef,o3).replace(jF,"")}function gH(l,f,g){l=at(l),f=$r(f);var R=l.length;g=g===r?R:Ki(Fe(g),0,R);var M=g;return g-=f.length,g>=0&&l.slice(g,M)==f}function mH(l){return l=at(l),l&&er.test(l)?l.replace(It,a3):l}function bH(l){return l=at(l),l&&bn.test(l)?l.replace(hr,"\\$&"):l}var yH=Ao(function(l,f,g){return l+(g?"-":"")+f.toLowerCase()}),xH=Ao(function(l,f,g){return l+(g?" ":"")+f.toLowerCase()}),wH=dS("toLowerCase");function _H(l,f,g){l=at(l),f=Fe(f);var R=f?Io(l):0;if(!f||R>=f)return l;var M=(f-R)/2;return ec(Fl(M),g)+l+ec(Bl(M),g)}function EH(l,f,g){l=at(l),f=Fe(f);var R=f?Io(l):0;return f&&R<f?l+ec(f-R,g):l}function SH(l,f,g){l=at(l),f=Fe(f);var R=f?Io(l):0;return f&&R<f?ec(f-R,g)+l:l}function OH(l,f,g){return g||f==null?f=0:f&&(f=+f),k3(at(l).replace(Cr,""),f||0)}function CH(l,f,g){return(g?gr(l,f,g):f===r)?f=1:f=Fe(f),qf(at(l),f)}function IH(){var l=arguments,f=at(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var RH=Ao(function(l,f,g){return l+(g?"_":"")+f.toLowerCase()});function NH(l,f,g){return g&&typeof g!="number"&&gr(l,f,g)&&(f=g=r),g=g===r?W:g>>>0,g?(l=at(l),l&&(typeof f=="string"||f!=null&&!ap(f))&&(f=$r(f),!f&&Co(l))?_i(yn(l),0,g):l.split(f,g)):[]}var TH=Ao(function(l,f,g){return l+(g?" ":"")+cp(f)});function PH(l,f,g){return l=at(l),g=g==null?0:Ki(Fe(g),0,l.length),f=$r(f),l.slice(g,g+f.length)==f}function kH(l,f,g){var R=V.templateSettings;g&&gr(l,f,g)&&(f=r),l=at(l),f=fc({},f,R,bS);var M=fc({},f.imports,R.imports,bS),H=Zt(M),J=xf(M,H),ie,ae,he=0,ve=f.interpolate||wo,be="__p += '",Ee=_f((f.escape||wo).source+"|"+ve.source+"|"+(ve===pr?Kd:wo).source+"|"+(f.evaluate||wo).source+"|$","g"),Ne="//# sourceURL="+(dt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++FF+"]")+`
70
- `;l.replace(Ee,function(Ae,Ue,Ze,Hr,mr,Wr){return Ze||(Ze=Hr),be+=l.slice(he,Wr).replace(gl,s3),Ue&&(ie=!0,be+=`' +
71
- __e(`+Ue+`) +
72
- '`),mr&&(ae=!0,be+=`';
73
- `+mr+`;
74
- __p += '`),Ze&&(be+=`' +
75
- ((__t = (`+Ze+`)) == null ? '' : __t) +
76
- '`),he=Wr+Ae.length,Ae}),be+=`';
77
- `;var Me=dt.call(f,"variable")&&f.variable;if(!Me)be=`with (obj) {
78
- `+be+`
47
+ */var sZ=Sa.exports,bN;function uZ(){return bN||(bN=1,(function(e,t){(function(){var r,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",h=1,p=2,v=4,m=1,y=2,x=1,b=2,w=4,S=8,E=16,_=32,R=64,I=128,N=256,D=512,L=30,B="...",U=800,j=16,T=1,G=2,z=3,X=1/0,Z=9007199254740991,re=17976931348623157e292,W=NaN,Q=4294967295,ue=Q-1,oe=Q>>>1,H=[["ary",I],["bind",x],["bindKey",b],["curry",S],["curryRight",E],["flip",D],["partial",_],["partialRight",R],["rearg",N]],K="[object Arguments]",$="[object Array]",k="[object AsyncFunction]",F="[object Boolean]",te="[object Date]",ie="[object DOMException]",ae="[object Error]",ce="[object Function]",we="[object GeneratorFunction]",Se="[object Map]",_e="[object Number]",he="[object Null]",le="[object Object]",Oe="[object Promise]",Ne="[object Proxy]",He="[object RegExp]",qe="[object Set]",Xe="[object String]",We="[object Symbol]",mt="[object Undefined]",et="[object WeakMap]",Tt="[object WeakSet]",ut="[object ArrayBuffer]",tt="[object DataView]",Ct="[object Float32Array]",Jt="[object Float64Array]",lr="[object Int8Array]",Dt="[object Int16Array]",xt="[object Int32Array]",jt="[object Uint8Array]",Hr="[object Uint8ClampedArray]",Yn="[object Uint16Array]",Cn="[object Uint32Array]",Ur=/\b__p \+= '';/g,Pi=/\b(__p \+=) '' \+/g,vl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ts=/&(?:amp|lt|gt|quot|#39);/g,No=/[&<>"']/g,gl=RegExp(ts.source),rs=RegExp(No.source),ml=/<%-([\s\S]+?)%>/g,ns=/<%([\s\S]+?)%>/g,is=/<%=([\s\S]+?)%>/g,os=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yl=/^\w*$/,as=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,To=/[\\^$.*+?()[\]{}|]/g,ss=RegExp(To.source),Ao=/^\s+/,us=/\s/,bl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,cs=/\{\n\/\* \[wrapped with (.+)\] \*/,xl=/,? & /,wl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_l=/[()=,{}\[\]\/\s]/,El=/\\(\\)?/g,Sl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ls=/\w*$/,Ol=/^[-+]0x[0-9a-f]+$/i,Cl=/^0b[01]+$/i,Rl=/^\[object .+?Constructor\]$/,Il=/^0o[0-7]+$/i,Pl=/^(?:0|[1-9]\d*)$/,Nl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ni=/($^)/,fs=/['\n\r\u2028\u2029\\]/g,Ti="\\ud800-\\udfff",Tl="\\u0300-\\u036f",Al="\\ufe20-\\ufe2f",ds="\\u20d0-\\u20ff",hs=Tl+Al+ds,Mo="\\u2700-\\u27bf",ps="a-z\\xdf-\\xf6\\xf8-\\xff",vs="\\xac\\xb1\\xd7\\xf7",Ml="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",gs="\\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",ms="A-Z\\xc0-\\xd6\\xd8-\\xde",Do="\\ufe0e\\ufe0f",ys=vs+Ml+gs+Dl,jo="['’]",jl="["+Ti+"]",bs="["+ys+"]",Xn="["+hs+"]",xs="\\d+",Ai="["+Mo+"]",ws="["+ps+"]",_s="[^"+Ti+ys+xs+Mo+ps+ms+"]",ql="\\ud83c[\\udffb-\\udfff]",Zk="(?:"+Xn+"|"+ql+")",Ew="[^"+Ti+"]",kl="(?:\\ud83c[\\udde6-\\uddff]){2}",Ll="[\\ud800-\\udbff][\\udc00-\\udfff]",Mi="["+ms+"]",Sw="\\u200d",Ow="(?:"+ws+"|"+_s+")",Jk="(?:"+Mi+"|"+_s+")",Cw="(?:"+jo+"(?:d|ll|m|re|s|t|ve))?",Rw="(?:"+jo+"(?:D|LL|M|RE|S|T|VE))?",Iw=Zk+"?",Pw="["+Do+"]?",Qk="(?:"+Sw+"(?:"+[Ew,kl,Ll].join("|")+")"+Pw+Iw+")*",eL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",tL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Nw=Pw+Iw+Qk,rL="(?:"+[Ai,kl,Ll].join("|")+")"+Nw,nL="(?:"+[Ew+Xn+"?",Xn,kl,Ll,jl].join("|")+")",iL=RegExp(jo,"g"),oL=RegExp(Xn,"g"),Bl=RegExp(ql+"(?="+ql+")|"+nL+Nw,"g"),aL=RegExp([Mi+"?"+ws+"+"+Cw+"(?="+[bs,Mi,"$"].join("|")+")",Jk+"+"+Rw+"(?="+[bs,Mi+Ow,"$"].join("|")+")",Mi+"?"+Ow+"+"+Cw,Mi+"+"+Rw,tL,eL,xs,rL].join("|"),"g"),sL=RegExp("["+Sw+Ti+hs+Do+"]"),uL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,cL=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],lL=-1,st={};st[Ct]=st[Jt]=st[lr]=st[Dt]=st[xt]=st[jt]=st[Hr]=st[Yn]=st[Cn]=!0,st[K]=st[$]=st[ut]=st[F]=st[tt]=st[te]=st[ae]=st[ce]=st[Se]=st[_e]=st[le]=st[He]=st[qe]=st[Xe]=st[et]=!1;var ot={};ot[K]=ot[$]=ot[ut]=ot[tt]=ot[F]=ot[te]=ot[Ct]=ot[Jt]=ot[lr]=ot[Dt]=ot[xt]=ot[Se]=ot[_e]=ot[le]=ot[He]=ot[qe]=ot[Xe]=ot[We]=ot[jt]=ot[Hr]=ot[Yn]=ot[Cn]=!0,ot[ae]=ot[ce]=ot[et]=!1;var fL={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},dL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},hL={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},pL={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},vL=parseFloat,gL=parseInt,Tw=typeof ht=="object"&&ht&&ht.Object===Object&&ht,mL=typeof self=="object"&&self&&self.Object===Object&&self,Rt=Tw||mL||Function("return this")(),Fl=t&&!t.nodeType&&t,Zn=Fl&&!0&&e&&!e.nodeType&&e,Aw=Zn&&Zn.exports===Fl,$l=Aw&&Tw.process,fr=(function(){try{var ee=Zn&&Zn.require&&Zn.require("util").types;return ee||$l&&$l.binding&&$l.binding("util")}catch{}})(),Mw=fr&&fr.isArrayBuffer,Dw=fr&&fr.isDate,jw=fr&&fr.isMap,qw=fr&&fr.isRegExp,kw=fr&&fr.isSet,Lw=fr&&fr.isTypedArray;function Qt(ee,de,se){switch(se.length){case 0:return ee.call(de);case 1:return ee.call(de,se[0]);case 2:return ee.call(de,se[0],se[1]);case 3:return ee.call(de,se[0],se[1],se[2])}return ee.apply(de,se)}function yL(ee,de,se,Ee){for(var Ae=-1,Ue=ee==null?0:ee.length;++Ae<Ue;){var wt=ee[Ae];de(Ee,wt,se(wt),ee)}return Ee}function dr(ee,de){for(var se=-1,Ee=ee==null?0:ee.length;++se<Ee&&de(ee[se],se,ee)!==!1;);return ee}function bL(ee,de){for(var se=ee==null?0:ee.length;se--&&de(ee[se],se,ee)!==!1;);return ee}function Bw(ee,de){for(var se=-1,Ee=ee==null?0:ee.length;++se<Ee;)if(!de(ee[se],se,ee))return!1;return!0}function Rn(ee,de){for(var se=-1,Ee=ee==null?0:ee.length,Ae=0,Ue=[];++se<Ee;){var wt=ee[se];de(wt,se,ee)&&(Ue[Ae++]=wt)}return Ue}function Es(ee,de){var se=ee==null?0:ee.length;return!!se&&Di(ee,de,0)>-1}function zl(ee,de,se){for(var Ee=-1,Ae=ee==null?0:ee.length;++Ee<Ae;)if(se(de,ee[Ee]))return!0;return!1}function ct(ee,de){for(var se=-1,Ee=ee==null?0:ee.length,Ae=Array(Ee);++se<Ee;)Ae[se]=de(ee[se],se,ee);return Ae}function In(ee,de){for(var se=-1,Ee=de.length,Ae=ee.length;++se<Ee;)ee[Ae+se]=de[se];return ee}function Hl(ee,de,se,Ee){var Ae=-1,Ue=ee==null?0:ee.length;for(Ee&&Ue&&(se=ee[++Ae]);++Ae<Ue;)se=de(se,ee[Ae],Ae,ee);return se}function xL(ee,de,se,Ee){var Ae=ee==null?0:ee.length;for(Ee&&Ae&&(se=ee[--Ae]);Ae--;)se=de(se,ee[Ae],Ae,ee);return se}function Ul(ee,de){for(var se=-1,Ee=ee==null?0:ee.length;++se<Ee;)if(de(ee[se],se,ee))return!0;return!1}var wL=Vl("length");function _L(ee){return ee.split("")}function EL(ee){return ee.match(wl)||[]}function Fw(ee,de,se){var Ee;return se(ee,function(Ae,Ue,wt){if(de(Ae,Ue,wt))return Ee=Ue,!1}),Ee}function Ss(ee,de,se,Ee){for(var Ae=ee.length,Ue=se+(Ee?1:-1);Ee?Ue--:++Ue<Ae;)if(de(ee[Ue],Ue,ee))return Ue;return-1}function Di(ee,de,se){return de===de?jL(ee,de,se):Ss(ee,$w,se)}function SL(ee,de,se,Ee){for(var Ae=se-1,Ue=ee.length;++Ae<Ue;)if(Ee(ee[Ae],de))return Ae;return-1}function $w(ee){return ee!==ee}function zw(ee,de){var se=ee==null?0:ee.length;return se?Gl(ee,de)/se:W}function Vl(ee){return function(de){return de==null?r:de[ee]}}function Wl(ee){return function(de){return ee==null?r:ee[de]}}function Hw(ee,de,se,Ee,Ae){return Ae(ee,function(Ue,wt,rt){se=Ee?(Ee=!1,Ue):de(se,Ue,wt,rt)}),se}function OL(ee,de){var se=ee.length;for(ee.sort(de);se--;)ee[se]=ee[se].value;return ee}function Gl(ee,de){for(var se,Ee=-1,Ae=ee.length;++Ee<Ae;){var Ue=de(ee[Ee]);Ue!==r&&(se=se===r?Ue:se+Ue)}return se}function Kl(ee,de){for(var se=-1,Ee=Array(ee);++se<ee;)Ee[se]=de(se);return Ee}function CL(ee,de){return ct(de,function(se){return[se,ee[se]]})}function Uw(ee){return ee&&ee.slice(0,Kw(ee)+1).replace(Ao,"")}function er(ee){return function(de){return ee(de)}}function Yl(ee,de){return ct(de,function(se){return ee[se]})}function qo(ee,de){return ee.has(de)}function Vw(ee,de){for(var se=-1,Ee=ee.length;++se<Ee&&Di(de,ee[se],0)>-1;);return se}function Ww(ee,de){for(var se=ee.length;se--&&Di(de,ee[se],0)>-1;);return se}function RL(ee,de){for(var se=ee.length,Ee=0;se--;)ee[se]===de&&++Ee;return Ee}var IL=Wl(fL),PL=Wl(dL);function NL(ee){return"\\"+pL[ee]}function TL(ee,de){return ee==null?r:ee[de]}function ji(ee){return sL.test(ee)}function AL(ee){return uL.test(ee)}function ML(ee){for(var de,se=[];!(de=ee.next()).done;)se.push(de.value);return se}function Xl(ee){var de=-1,se=Array(ee.size);return ee.forEach(function(Ee,Ae){se[++de]=[Ae,Ee]}),se}function Gw(ee,de){return function(se){return ee(de(se))}}function Pn(ee,de){for(var se=-1,Ee=ee.length,Ae=0,Ue=[];++se<Ee;){var wt=ee[se];(wt===de||wt===f)&&(ee[se]=f,Ue[Ae++]=se)}return Ue}function Os(ee){var de=-1,se=Array(ee.size);return ee.forEach(function(Ee){se[++de]=Ee}),se}function DL(ee){var de=-1,se=Array(ee.size);return ee.forEach(function(Ee){se[++de]=[Ee,Ee]}),se}function jL(ee,de,se){for(var Ee=se-1,Ae=ee.length;++Ee<Ae;)if(ee[Ee]===de)return Ee;return-1}function qL(ee,de,se){for(var Ee=se+1;Ee--;)if(ee[Ee]===de)return Ee;return Ee}function qi(ee){return ji(ee)?LL(ee):wL(ee)}function Pr(ee){return ji(ee)?BL(ee):_L(ee)}function Kw(ee){for(var de=ee.length;de--&&us.test(ee.charAt(de)););return de}var kL=Wl(hL);function LL(ee){for(var de=Bl.lastIndex=0;Bl.test(ee);)++de;return de}function BL(ee){return ee.match(Bl)||[]}function FL(ee){return ee.match(aL)||[]}var $L=(function ee(de){de=de==null?Rt:ki.defaults(Rt.Object(),de,ki.pick(Rt,cL));var se=de.Array,Ee=de.Date,Ae=de.Error,Ue=de.Function,wt=de.Math,rt=de.Object,Zl=de.RegExp,zL=de.String,hr=de.TypeError,Cs=se.prototype,HL=Ue.prototype,Li=rt.prototype,Rs=de["__core-js_shared__"],Is=HL.toString,Ze=Li.hasOwnProperty,UL=0,Yw=(function(){var s=/[^.]+$/.exec(Rs&&Rs.keys&&Rs.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})(),Ps=Li.toString,VL=Is.call(rt),WL=Rt._,GL=Zl("^"+Is.call(Ze).replace(To,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ns=Aw?de.Buffer:r,Nn=de.Symbol,Ts=de.Uint8Array,Xw=Ns?Ns.allocUnsafe:r,As=Gw(rt.getPrototypeOf,rt),Zw=rt.create,Jw=Li.propertyIsEnumerable,Ms=Cs.splice,Qw=Nn?Nn.isConcatSpreadable:r,ko=Nn?Nn.iterator:r,Jn=Nn?Nn.toStringTag:r,Ds=(function(){try{var s=ni(rt,"defineProperty");return s({},"",{}),s}catch{}})(),KL=de.clearTimeout!==Rt.clearTimeout&&de.clearTimeout,YL=Ee&&Ee.now!==Rt.Date.now&&Ee.now,XL=de.setTimeout!==Rt.setTimeout&&de.setTimeout,js=wt.ceil,qs=wt.floor,Jl=rt.getOwnPropertySymbols,ZL=Ns?Ns.isBuffer:r,e_=de.isFinite,JL=Cs.join,QL=Gw(rt.keys,rt),_t=wt.max,At=wt.min,eB=Ee.now,tB=de.parseInt,t_=wt.random,rB=Cs.reverse,Ql=ni(de,"DataView"),Lo=ni(de,"Map"),ef=ni(de,"Promise"),Bi=ni(de,"Set"),Bo=ni(de,"WeakMap"),Fo=ni(rt,"create"),ks=Bo&&new Bo,Fi={},nB=ii(Ql),iB=ii(Lo),oB=ii(ef),aB=ii(Bi),sB=ii(Bo),Ls=Nn?Nn.prototype:r,$o=Ls?Ls.valueOf:r,r_=Ls?Ls.toString:r;function M(s){if(dt(s)&&!Me(s)&&!(s instanceof Fe)){if(s instanceof pr)return s;if(Ze.call(s,"__wrapped__"))return n1(s)}return new pr(s)}var $i=(function(){function s(){}return function(l){if(!ft(l))return{};if(Zw)return Zw(l);s.prototype=l;var g=new s;return s.prototype=r,g}})();function Bs(){}function pr(s,l){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}M.templateSettings={escape:ml,evaluate:ns,interpolate:is,variable:"",imports:{_:M}},M.prototype=Bs.prototype,M.prototype.constructor=M,pr.prototype=$i(Bs.prototype),pr.prototype.constructor=pr;function Fe(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Q,this.__views__=[]}function uB(){var s=new Fe(this.__wrapped__);return s.__actions__=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 cB(){if(this.__filtered__){var s=new Fe(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function lB(){var s=this.__wrapped__.value(),l=this.__dir__,g=Me(s),O=l<0,P=g?s.length:0,q=_F(0,P,this.__views__),V=q.start,Y=q.end,ne=Y-V,pe=O?Y:V-1,ge=this.__iteratees__,me=ge.length,be=0,Ce=At(ne,this.__takeCount__);if(!g||!O&&P==ne&&Ce==ne)return C_(s,this.__actions__);var Ie=[];e:for(;ne--&&be<Ce;){pe+=l;for(var je=-1,Pe=s[pe];++je<me;){var Le=ge[je],$e=Le.iteratee,nr=Le.type,Lt=$e(Pe);if(nr==G)Pe=Lt;else if(!Lt){if(nr==T)continue e;break e}}Ie[be++]=Pe}return Ie}Fe.prototype=$i(Bs.prototype),Fe.prototype.constructor=Fe;function Qn(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var O=s[l];this.set(O[0],O[1])}}function fB(){this.__data__=Fo?Fo(null):{},this.size=0}function dB(s){var l=this.has(s)&&delete this.__data__[s];return this.size-=l?1:0,l}function hB(s){var l=this.__data__;if(Fo){var g=l[s];return g===c?r:g}return Ze.call(l,s)?l[s]:r}function pB(s){var l=this.__data__;return Fo?l[s]!==r:Ze.call(l,s)}function vB(s,l){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Fo&&l===r?c:l,this}Qn.prototype.clear=fB,Qn.prototype.delete=dB,Qn.prototype.get=hB,Qn.prototype.has=pB,Qn.prototype.set=vB;function un(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var O=s[l];this.set(O[0],O[1])}}function gB(){this.__data__=[],this.size=0}function mB(s){var l=this.__data__,g=Fs(l,s);if(g<0)return!1;var O=l.length-1;return g==O?l.pop():Ms.call(l,g,1),--this.size,!0}function yB(s){var l=this.__data__,g=Fs(l,s);return g<0?r:l[g][1]}function bB(s){return Fs(this.__data__,s)>-1}function xB(s,l){var g=this.__data__,O=Fs(g,s);return O<0?(++this.size,g.push([s,l])):g[O][1]=l,this}un.prototype.clear=gB,un.prototype.delete=mB,un.prototype.get=yB,un.prototype.has=bB,un.prototype.set=xB;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 wB(){this.size=0,this.__data__={hash:new Qn,map:new(Lo||un),string:new Qn}}function _B(s){var l=Js(this,s).delete(s);return this.size-=l?1:0,l}function EB(s){return Js(this,s).get(s)}function SB(s){return Js(this,s).has(s)}function OB(s,l){var g=Js(this,s),O=g.size;return g.set(s,l),this.size+=g.size==O?0:1,this}cn.prototype.clear=wB,cn.prototype.delete=_B,cn.prototype.get=EB,cn.prototype.has=SB,cn.prototype.set=OB;function ei(s){var l=-1,g=s==null?0:s.length;for(this.__data__=new cn;++l<g;)this.add(s[l])}function CB(s){return this.__data__.set(s,c),this}function RB(s){return this.__data__.has(s)}ei.prototype.add=ei.prototype.push=CB,ei.prototype.has=RB;function Nr(s){var l=this.__data__=new un(s);this.size=l.size}function IB(){this.__data__=new un,this.size=0}function PB(s){var l=this.__data__,g=l.delete(s);return this.size=l.size,g}function NB(s){return this.__data__.get(s)}function TB(s){return this.__data__.has(s)}function AB(s,l){var g=this.__data__;if(g instanceof un){var O=g.__data__;if(!Lo||O.length<i-1)return O.push([s,l]),this.size=++g.size,this;g=this.__data__=new cn(O)}return g.set(s,l),this.size=g.size,this}Nr.prototype.clear=IB,Nr.prototype.delete=PB,Nr.prototype.get=NB,Nr.prototype.has=TB,Nr.prototype.set=AB;function n_(s,l){var g=Me(s),O=!g&&oi(s),P=!g&&!O&&jn(s),q=!g&&!O&&!P&&Vi(s),V=g||O||P||q,Y=V?Kl(s.length,zL):[],ne=Y.length;for(var pe in s)(l||Ze.call(s,pe))&&!(V&&(pe=="length"||P&&(pe=="offset"||pe=="parent")||q&&(pe=="buffer"||pe=="byteLength"||pe=="byteOffset")||hn(pe,ne)))&&Y.push(pe);return Y}function i_(s){var l=s.length;return l?s[df(0,l-1)]:r}function MB(s,l){return Qs(zt(s),ti(l,0,s.length))}function DB(s){return Qs(zt(s))}function tf(s,l,g){(g!==r&&!Tr(s[l],g)||g===r&&!(l in s))&&ln(s,l,g)}function zo(s,l,g){var O=s[l];(!(Ze.call(s,l)&&Tr(O,g))||g===r&&!(l in s))&&ln(s,l,g)}function Fs(s,l){for(var g=s.length;g--;)if(Tr(s[g][0],l))return g;return-1}function jB(s,l,g,O){return Tn(s,function(P,q,V){l(O,P,g(P),V)}),O}function o_(s,l){return s&&Wr(l,St(l),s)}function qB(s,l){return s&&Wr(l,Ut(l),s)}function ln(s,l,g){l=="__proto__"&&Ds?Ds(s,l,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[l]=g}function rf(s,l){for(var g=-1,O=l.length,P=se(O),q=s==null;++g<O;)P[g]=q?r:kf(s,l[g]);return P}function ti(s,l,g){return s===s&&(g!==r&&(s=s<=g?s:g),l!==r&&(s=s>=l?s:l)),s}function vr(s,l,g,O,P,q){var V,Y=l&h,ne=l&p,pe=l&v;if(g&&(V=P?g(s,O,P,q):g(s)),V!==r)return V;if(!ft(s))return s;var ge=Me(s);if(ge){if(V=SF(s),!Y)return zt(s,V)}else{var me=Mt(s),be=me==ce||me==we;if(jn(s))return P_(s,Y);if(me==le||me==K||be&&!P){if(V=ne||be?{}:K_(s),!Y)return ne?hF(s,qB(V,s)):dF(s,o_(V,s))}else{if(!ot[me])return P?s:{};V=OF(s,me,Y)}}q||(q=new Nr);var Ce=q.get(s);if(Ce)return Ce;q.set(s,V),E1(s)?s.forEach(function(Pe){V.add(vr(Pe,l,g,Pe,s,q))}):w1(s)&&s.forEach(function(Pe,Le){V.set(Le,vr(Pe,l,g,Le,s,q))});var Ie=pe?ne?Ef:_f:ne?Ut:St,je=ge?r:Ie(s);return dr(je||s,function(Pe,Le){je&&(Le=Pe,Pe=s[Le]),zo(V,Le,vr(Pe,l,g,Le,s,q))}),V}function kB(s){var l=St(s);return function(g){return a_(g,s,l)}}function a_(s,l,g){var O=g.length;if(s==null)return!O;for(s=rt(s);O--;){var P=g[O],q=l[P],V=s[P];if(V===r&&!(P in s)||!q(V))return!1}return!0}function s_(s,l,g){if(typeof s!="function")throw new hr(a);return Yo(function(){s.apply(r,g)},l)}function Ho(s,l,g,O){var P=-1,q=Es,V=!0,Y=s.length,ne=[],pe=l.length;if(!Y)return ne;g&&(l=ct(l,er(g))),O?(q=zl,V=!1):l.length>=i&&(q=qo,V=!1,l=new ei(l));e:for(;++P<Y;){var ge=s[P],me=g==null?ge:g(ge);if(ge=O||ge!==0?ge:0,V&&me===me){for(var be=pe;be--;)if(l[be]===me)continue e;ne.push(ge)}else q(l,me,O)||ne.push(ge)}return ne}var Tn=D_(Vr),u_=D_(of,!0);function LB(s,l){var g=!0;return Tn(s,function(O,P,q){return g=!!l(O,P,q),g}),g}function $s(s,l,g){for(var O=-1,P=s.length;++O<P;){var q=s[O],V=l(q);if(V!=null&&(Y===r?V===V&&!rr(V):g(V,Y)))var Y=V,ne=q}return ne}function BB(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:O1(O);g<O;)s[g++]=l;return s}function c_(s,l){var g=[];return Tn(s,function(O,P,q){l(O,P,q)&&g.push(O)}),g}function It(s,l,g,O,P){var q=-1,V=s.length;for(g||(g=RF),P||(P=[]);++q<V;){var Y=s[q];l>0&&g(Y)?l>1?It(Y,l-1,g,O,P):In(P,Y):O||(P[P.length]=Y)}return P}var nf=j_(),l_=j_(!0);function Vr(s,l){return s&&nf(s,l,St)}function of(s,l){return s&&l_(s,l,St)}function zs(s,l){return Rn(l,function(g){return pn(s[g])})}function ri(s,l){l=Mn(l,s);for(var g=0,O=l.length;s!=null&&g<O;)s=s[Gr(l[g++])];return g&&g==O?s:r}function f_(s,l,g){var O=l(s);return Me(s)?O:In(O,g(s))}function qt(s){return s==null?s===r?mt:he:Jn&&Jn in rt(s)?wF(s):DF(s)}function af(s,l){return s>l}function FB(s,l){return s!=null&&Ze.call(s,l)}function $B(s,l){return s!=null&&l in rt(s)}function zB(s,l,g){return s>=At(l,g)&&s<_t(l,g)}function sf(s,l,g){for(var O=g?zl:Es,P=s[0].length,q=s.length,V=q,Y=se(q),ne=1/0,pe=[];V--;){var ge=s[V];V&&l&&(ge=ct(ge,er(l))),ne=At(ge.length,ne),Y[V]=!g&&(l||P>=120&&ge.length>=120)?new ei(V&&ge):r}ge=s[0];var me=-1,be=Y[0];e:for(;++me<P&&pe.length<ne;){var Ce=ge[me],Ie=l?l(Ce):Ce;if(Ce=g||Ce!==0?Ce:0,!(be?qo(be,Ie):O(pe,Ie,g))){for(V=q;--V;){var je=Y[V];if(!(je?qo(je,Ie):O(s[V],Ie,g)))continue e}be&&be.push(Ie),pe.push(Ce)}}return pe}function HB(s,l,g,O){return Vr(s,function(P,q,V){l(O,g(P),q,V)}),O}function Uo(s,l,g){l=Mn(l,s),s=J_(s,l);var O=s==null?s:s[Gr(mr(l))];return O==null?r:Qt(O,s,g)}function d_(s){return dt(s)&&qt(s)==K}function UB(s){return dt(s)&&qt(s)==ut}function VB(s){return dt(s)&&qt(s)==te}function Vo(s,l,g,O,P){return s===l?!0:s==null||l==null||!dt(s)&&!dt(l)?s!==s&&l!==l:WB(s,l,g,O,Vo,P)}function WB(s,l,g,O,P,q){var V=Me(s),Y=Me(l),ne=V?$:Mt(s),pe=Y?$:Mt(l);ne=ne==K?le:ne,pe=pe==K?le:pe;var ge=ne==le,me=pe==le,be=ne==pe;if(be&&jn(s)){if(!jn(l))return!1;V=!0,ge=!1}if(be&&!ge)return q||(q=new Nr),V||Vi(s)?V_(s,l,g,O,P,q):bF(s,l,ne,g,O,P,q);if(!(g&m)){var Ce=ge&&Ze.call(s,"__wrapped__"),Ie=me&&Ze.call(l,"__wrapped__");if(Ce||Ie){var je=Ce?s.value():s,Pe=Ie?l.value():l;return q||(q=new Nr),P(je,Pe,g,O,q)}}return be?(q||(q=new Nr),xF(s,l,g,O,P,q)):!1}function GB(s){return dt(s)&&Mt(s)==Se}function uf(s,l,g,O){var P=g.length,q=P,V=!O;if(s==null)return!q;for(s=rt(s);P--;){var Y=g[P];if(V&&Y[2]?Y[1]!==s[Y[0]]:!(Y[0]in s))return!1}for(;++P<q;){Y=g[P];var ne=Y[0],pe=s[ne],ge=Y[1];if(V&&Y[2]){if(pe===r&&!(ne in s))return!1}else{var me=new Nr;if(O)var be=O(pe,ge,ne,s,l,me);if(!(be===r?Vo(ge,pe,m|y,O,me):be))return!1}}return!0}function h_(s){if(!ft(s)||PF(s))return!1;var l=pn(s)?GL:Rl;return l.test(ii(s))}function KB(s){return dt(s)&&qt(s)==He}function YB(s){return dt(s)&&Mt(s)==qe}function XB(s){return dt(s)&&ou(s.length)&&!!st[qt(s)]}function p_(s){return typeof s=="function"?s:s==null?Vt:typeof s=="object"?Me(s)?m_(s[0],s[1]):g_(s):q1(s)}function cf(s){if(!Ko(s))return QL(s);var l=[];for(var g in rt(s))Ze.call(s,g)&&g!="constructor"&&l.push(g);return l}function ZB(s){if(!ft(s))return MF(s);var l=Ko(s),g=[];for(var O in s)O=="constructor"&&(l||!Ze.call(s,O))||g.push(O);return g}function lf(s,l){return s<l}function v_(s,l){var g=-1,O=Ht(s)?se(s.length):[];return Tn(s,function(P,q,V){O[++g]=l(P,q,V)}),O}function g_(s){var l=Of(s);return l.length==1&&l[0][2]?X_(l[0][0],l[0][1]):function(g){return g===s||uf(g,s,l)}}function m_(s,l){return Rf(s)&&Y_(l)?X_(Gr(s),l):function(g){var O=kf(g,s);return O===r&&O===l?Lf(g,s):Vo(l,O,m|y)}}function Hs(s,l,g,O,P){s!==l&&nf(l,function(q,V){if(P||(P=new Nr),ft(q))JB(s,l,V,g,Hs,O,P);else{var Y=O?O(Pf(s,V),q,V+"",s,l,P):r;Y===r&&(Y=q),tf(s,V,Y)}},Ut)}function JB(s,l,g,O,P,q,V){var Y=Pf(s,g),ne=Pf(l,g),pe=V.get(ne);if(pe){tf(s,g,pe);return}var ge=q?q(Y,ne,g+"",s,l,V):r,me=ge===r;if(me){var be=Me(ne),Ce=!be&&jn(ne),Ie=!be&&!Ce&&Vi(ne);ge=ne,be||Ce||Ie?Me(Y)?ge=Y:pt(Y)?ge=zt(Y):Ce?(me=!1,ge=P_(ne,!0)):Ie?(me=!1,ge=N_(ne,!0)):ge=[]:Xo(ne)||oi(ne)?(ge=Y,oi(Y)?ge=C1(Y):(!ft(Y)||pn(Y))&&(ge=K_(ne))):me=!1}me&&(V.set(ne,ge),P(ge,ne,O,q,V),V.delete(ne)),tf(s,g,ge)}function y_(s,l){var g=s.length;if(g)return l+=l<0?g:0,hn(l,g)?s[l]:r}function b_(s,l,g){l.length?l=ct(l,function(q){return Me(q)?function(V){return ri(V,q.length===1?q[0]:q)}:q}):l=[Vt];var O=-1;l=ct(l,er(Re()));var P=v_(s,function(q,V,Y){var ne=ct(l,function(pe){return pe(q)});return{criteria:ne,index:++O,value:q}});return OL(P,function(q,V){return fF(q,V,g)})}function QB(s,l){return x_(s,l,function(g,O){return Lf(s,O)})}function x_(s,l,g){for(var O=-1,P=l.length,q={};++O<P;){var V=l[O],Y=ri(s,V);g(Y,V)&&Wo(q,Mn(V,s),Y)}return q}function eF(s){return function(l){return ri(l,s)}}function ff(s,l,g,O){var P=O?SL:Di,q=-1,V=l.length,Y=s;for(s===l&&(l=zt(l)),g&&(Y=ct(s,er(g)));++q<V;)for(var ne=0,pe=l[q],ge=g?g(pe):pe;(ne=P(Y,ge,ne,O))>-1;)Y!==s&&Ms.call(Y,ne,1),Ms.call(s,ne,1);return s}function w_(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)?Ms.call(s,P,1):vf(s,P)}}return s}function df(s,l){return s+qs(t_()*(l-s+1))}function tF(s,l,g,O){for(var P=-1,q=_t(js((l-s)/(g||1)),0),V=se(q);q--;)V[O?q:++P]=s,s+=g;return V}function hf(s,l){var g="";if(!s||l<1||l>Z)return g;do l%2&&(g+=s),l=qs(l/2),l&&(s+=s);while(l);return g}function ke(s,l){return Nf(Z_(s,l,Vt),s+"")}function rF(s){return i_(Wi(s))}function nF(s,l){var g=Wi(s);return Qs(g,ti(l,0,g.length))}function Wo(s,l,g,O){if(!ft(s))return s;l=Mn(l,s);for(var P=-1,q=l.length,V=q-1,Y=s;Y!=null&&++P<q;){var ne=Gr(l[P]),pe=g;if(ne==="__proto__"||ne==="constructor"||ne==="prototype")return s;if(P!=V){var ge=Y[ne];pe=O?O(ge,ne,Y):r,pe===r&&(pe=ft(ge)?ge:hn(l[P+1])?[]:{})}zo(Y,ne,pe),Y=Y[ne]}return s}var __=ks?function(s,l){return ks.set(s,l),s}:Vt,iF=Ds?function(s,l){return Ds(s,"toString",{configurable:!0,enumerable:!1,value:Ff(l),writable:!0})}:Vt;function oF(s){return Qs(Wi(s))}function gr(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=se(P);++O<P;)q[O]=s[O+l];return q}function aF(s,l){var g;return Tn(s,function(O,P,q){return g=l(O,P,q),!g}),!!g}function Us(s,l,g){var O=0,P=s==null?O:s.length;if(typeof l=="number"&&l===l&&P<=oe){for(;O<P;){var q=O+P>>>1,V=s[q];V!==null&&!rr(V)&&(g?V<=l:V<l)?O=q+1:P=q}return P}return pf(s,l,Vt,g)}function pf(s,l,g,O){var P=0,q=s==null?0:s.length;if(q===0)return 0;l=g(l);for(var V=l!==l,Y=l===null,ne=rr(l),pe=l===r;P<q;){var ge=qs((P+q)/2),me=g(s[ge]),be=me!==r,Ce=me===null,Ie=me===me,je=rr(me);if(V)var Pe=O||Ie;else pe?Pe=Ie&&(O||be):Y?Pe=Ie&&be&&(O||!Ce):ne?Pe=Ie&&be&&!Ce&&(O||!je):Ce||je?Pe=!1:Pe=O?me<=l:me<l;Pe?P=ge+1:q=ge}return At(q,ue)}function E_(s,l){for(var g=-1,O=s.length,P=0,q=[];++g<O;){var V=s[g],Y=l?l(V):V;if(!g||!Tr(Y,ne)){var ne=Y;q[P++]=V===0?0:V}}return q}function S_(s){return typeof s=="number"?s:rr(s)?W:+s}function tr(s){if(typeof s=="string")return s;if(Me(s))return ct(s,tr)+"";if(rr(s))return r_?r_.call(s):"";var l=s+"";return l=="0"&&1/s==-X?"-0":l}function An(s,l,g){var O=-1,P=Es,q=s.length,V=!0,Y=[],ne=Y;if(g)V=!1,P=zl;else if(q>=i){var pe=l?null:mF(s);if(pe)return Os(pe);V=!1,P=qo,ne=new ei}else ne=l?[]:Y;e:for(;++O<q;){var ge=s[O],me=l?l(ge):ge;if(ge=g||ge!==0?ge:0,V&&me===me){for(var be=ne.length;be--;)if(ne[be]===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 vf(s,l){return l=Mn(l,s),s=J_(s,l),s==null||delete s[Gr(mr(l))]}function O_(s,l,g,O){return Wo(s,l,g(ri(s,l)),O)}function Vs(s,l,g,O){for(var P=s.length,q=O?P:-1;(O?q--:++q<P)&&l(s[q],q,s););return g?gr(s,O?0:q,O?q+1:P):gr(s,O?q+1:0,O?P:q)}function C_(s,l){var g=s;return g instanceof Fe&&(g=g.value()),Hl(l,function(O,P){return P.func.apply(P.thisArg,In([O],P.args))},g)}function gf(s,l,g){var O=s.length;if(O<2)return O?An(s[0]):[];for(var P=-1,q=se(O);++P<O;)for(var V=s[P],Y=-1;++Y<O;)Y!=P&&(q[P]=Ho(q[P]||V,s[Y],l,g));return An(It(q,1),l,g)}function R_(s,l,g){for(var O=-1,P=s.length,q=l.length,V={};++O<P;){var Y=O<q?l[O]:r;g(V,s[O],Y)}return V}function mf(s){return pt(s)?s:[]}function yf(s){return typeof s=="function"?s:Vt}function Mn(s,l){return Me(s)?s:Rf(s,l)?[s]:r1(Ge(s))}var sF=ke;function Dn(s,l,g){var O=s.length;return g=g===r?O:g,!l&&g>=O?s:gr(s,l,g)}var I_=KL||function(s){return Rt.clearTimeout(s)};function P_(s,l){if(l)return s.slice();var g=s.length,O=Xw?Xw(g):new s.constructor(g);return s.copy(O),O}function bf(s){var l=new s.constructor(s.byteLength);return new Ts(l).set(new Ts(s)),l}function uF(s,l){var g=l?bf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function cF(s){var l=new s.constructor(s.source,ls.exec(s));return l.lastIndex=s.lastIndex,l}function lF(s){return $o?rt($o.call(s)):{}}function N_(s,l){var g=l?bf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function T_(s,l){if(s!==l){var g=s!==r,O=s===null,P=s===s,q=rr(s),V=l!==r,Y=l===null,ne=l===l,pe=rr(l);if(!Y&&!pe&&!q&&s>l||q&&V&&ne&&!Y&&!pe||O&&V&&ne||!g&&ne||!P)return 1;if(!O&&!q&&!pe&&s<l||pe&&g&&P&&!O&&!q||Y&&g&&P||!V&&P||!ne)return-1}return 0}function fF(s,l,g){for(var O=-1,P=s.criteria,q=l.criteria,V=P.length,Y=g.length;++O<V;){var ne=T_(P[O],q[O]);if(ne){if(O>=Y)return ne;var pe=g[O];return ne*(pe=="desc"?-1:1)}}return s.index-l.index}function A_(s,l,g,O){for(var P=-1,q=s.length,V=g.length,Y=-1,ne=l.length,pe=_t(q-V,0),ge=se(ne+pe),me=!O;++Y<ne;)ge[Y]=l[Y];for(;++P<V;)(me||P<q)&&(ge[g[P]]=s[P]);for(;pe--;)ge[Y++]=s[P++];return ge}function M_(s,l,g,O){for(var P=-1,q=s.length,V=-1,Y=g.length,ne=-1,pe=l.length,ge=_t(q-Y,0),me=se(ge+pe),be=!O;++P<ge;)me[P]=s[P];for(var Ce=P;++ne<pe;)me[Ce+ne]=l[ne];for(;++V<Y;)(be||P<q)&&(me[Ce+g[V]]=s[P++]);return me}function zt(s,l){var g=-1,O=s.length;for(l||(l=se(O));++g<O;)l[g]=s[g];return l}function Wr(s,l,g,O){var P=!g;g||(g={});for(var q=-1,V=l.length;++q<V;){var Y=l[q],ne=O?O(g[Y],s[Y],Y,g,s):r;ne===r&&(ne=s[Y]),P?ln(g,Y,ne):zo(g,Y,ne)}return g}function dF(s,l){return Wr(s,Cf(s),l)}function hF(s,l){return Wr(s,W_(s),l)}function Ws(s,l){return function(g,O){var P=Me(g)?yL:jB,q=l?l():{};return P(g,s,Re(O,2),q)}}function zi(s){return ke(function(l,g){var O=-1,P=g.length,q=P>1?g[P-1]:r,V=P>2?g[2]:r;for(q=s.length>3&&typeof q=="function"?(P--,q):r,V&&kt(g[0],g[1],V)&&(q=P<3?r:q,P=1),l=rt(l);++O<P;){var Y=g[O];Y&&s(l,Y,O,q)}return l})}function D_(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,V=rt(g);(l?q--:++q<P)&&O(V[q],q,V)!==!1;);return g}}function j_(s){return function(l,g,O){for(var P=-1,q=rt(l),V=O(l),Y=V.length;Y--;){var ne=V[s?Y:++P];if(g(q[ne],ne,q)===!1)break}return l}}function pF(s,l,g){var O=l&x,P=Go(s);function q(){var V=this&&this!==Rt&&this instanceof q?P:s;return V.apply(O?g:this,arguments)}return q}function q_(s){return function(l){l=Ge(l);var g=ji(l)?Pr(l):r,O=g?g[0]:l.charAt(0),P=g?Dn(g,1).join(""):l.slice(1);return O[s]()+P}}function Hi(s){return function(l){return Hl(D1(M1(l).replace(iL,"")),s,"")}}function Go(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=$i(s.prototype),O=s.apply(g,l);return ft(O)?O:g}}function vF(s,l,g){var O=Go(s);function P(){for(var q=arguments.length,V=se(q),Y=q,ne=Ui(P);Y--;)V[Y]=arguments[Y];var pe=q<3&&V[0]!==ne&&V[q-1]!==ne?[]:Pn(V,ne);if(q-=pe.length,q<g)return $_(s,l,Gs,P.placeholder,r,V,pe,r,r,g-q);var ge=this&&this!==Rt&&this instanceof P?O:s;return Qt(ge,this,V)}return P}function k_(s){return function(l,g,O){var P=rt(l);if(!Ht(l)){var q=Re(g,3);l=St(l),g=function(Y){return q(P[Y],Y,P)}}var V=s(l,g,O);return V>-1?P[q?l[V]:V]:r}}function L_(s){return dn(function(l){var g=l.length,O=g,P=pr.prototype.thru;for(s&&l.reverse();O--;){var q=l[O];if(typeof q!="function")throw new hr(a);if(P&&!V&&Zs(q)=="wrapper")var V=new pr([],!0)}for(O=V?O:g;++O<g;){q=l[O];var Y=Zs(q),ne=Y=="wrapper"?Sf(q):r;ne&&If(ne[0])&&ne[1]==(I|S|_|N)&&!ne[4].length&&ne[9]==1?V=V[Zs(ne[0])].apply(V,ne[3]):V=q.length==1&&If(q)?V[Y]():V.thru(q)}return function(){var pe=arguments,ge=pe[0];if(V&&pe.length==1&&Me(ge))return V.plant(ge).value();for(var me=0,be=g?l[me].apply(this,pe):ge;++me<g;)be=l[me].call(this,be);return be}})}function Gs(s,l,g,O,P,q,V,Y,ne,pe){var ge=l&I,me=l&x,be=l&b,Ce=l&(S|E),Ie=l&D,je=be?r:Go(s);function Pe(){for(var Le=arguments.length,$e=se(Le),nr=Le;nr--;)$e[nr]=arguments[nr];if(Ce)var Lt=Ui(Pe),ir=RL($e,Lt);if(O&&($e=A_($e,O,P,Ce)),q&&($e=M_($e,q,V,Ce)),Le-=ir,Ce&&Le<pe){var vt=Pn($e,Lt);return $_(s,l,Gs,Pe.placeholder,g,$e,vt,Y,ne,pe-Le)}var Ar=me?g:this,gn=be?Ar[s]:s;return Le=$e.length,Y?$e=jF($e,Y):Ie&&Le>1&&$e.reverse(),ge&&ne<Le&&($e.length=ne),this&&this!==Rt&&this instanceof Pe&&(gn=je||Go(gn)),gn.apply(Ar,$e)}return Pe}function B_(s,l){return function(g,O){return HB(g,s,l(O),{})}}function Ks(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=tr(g),O=tr(O)):(g=S_(g),O=S_(O)),P=s(g,O)}return P}}function xf(s){return dn(function(l){return l=ct(l,er(Re())),ke(function(g){var O=this;return s(l,function(P){return Qt(P,O,g)})})})}function Ys(s,l){l=l===r?" ":tr(l);var g=l.length;if(g<2)return g?hf(l,s):l;var O=hf(l,js(s/qi(l)));return ji(l)?Dn(Pr(O),0,s).join(""):O.slice(0,s)}function gF(s,l,g,O){var P=l&x,q=Go(s);function V(){for(var Y=-1,ne=arguments.length,pe=-1,ge=O.length,me=se(ge+ne),be=this&&this!==Rt&&this instanceof V?q:s;++pe<ge;)me[pe]=O[pe];for(;ne--;)me[pe++]=arguments[++Y];return Qt(be,P?g:this,me)}return V}function F_(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),tF(l,g,O,s)}}function Xs(s){return function(l,g){return typeof l=="string"&&typeof g=="string"||(l=yr(l),g=yr(g)),s(l,g)}}function $_(s,l,g,O,P,q,V,Y,ne,pe){var ge=l&S,me=ge?V:r,be=ge?r:V,Ce=ge?q:r,Ie=ge?r:q;l|=ge?_:R,l&=~(ge?R:_),l&w||(l&=-4);var je=[s,l,P,Ce,me,Ie,be,Y,ne,pe],Pe=g.apply(r,je);return If(s)&&Q_(Pe,je),Pe.placeholder=O,e1(Pe,s,l)}function wf(s){var l=wt[s];return function(g,O){if(g=yr(g),O=O==null?0:At(De(O),292),O&&e_(g)){var P=(Ge(g)+"e").split("e"),q=l(P[0]+"e"+(+P[1]+O));return P=(Ge(q)+"e").split("e"),+(P[0]+"e"+(+P[1]-O))}return l(g)}}var mF=Bi&&1/Os(new Bi([,-0]))[1]==X?function(s){return new Bi(s)}:Hf;function z_(s){return function(l){var g=Mt(l);return g==Se?Xl(l):g==qe?DL(l):CL(l,s(l))}}function fn(s,l,g,O,P,q,V,Y){var ne=l&b;if(!ne&&typeof s!="function")throw new hr(a);var pe=O?O.length:0;if(pe||(l&=-97,O=P=r),V=V===r?V:_t(De(V),0),Y=Y===r?Y:De(Y),pe-=P?P.length:0,l&R){var ge=O,me=P;O=P=r}var be=ne?r:Sf(s),Ce=[s,l,g,O,P,ge,me,q,V,Y];if(be&&AF(Ce,be),s=Ce[0],l=Ce[1],g=Ce[2],O=Ce[3],P=Ce[4],Y=Ce[9]=Ce[9]===r?ne?0:s.length:_t(Ce[9]-pe,0),!Y&&l&(S|E)&&(l&=-25),!l||l==x)var Ie=pF(s,l,g);else l==S||l==E?Ie=vF(s,l,Y):(l==_||l==(x|_))&&!P.length?Ie=gF(s,l,g,O):Ie=Gs.apply(r,Ce);var je=be?__:Q_;return e1(je(Ie,Ce),s,l)}function H_(s,l,g,O){return s===r||Tr(s,Li[g])&&!Ze.call(O,g)?l:s}function U_(s,l,g,O,P,q){return ft(s)&&ft(l)&&(q.set(l,s),Hs(s,l,r,U_,q),q.delete(l)),s}function yF(s){return Xo(s)?r:s}function V_(s,l,g,O,P,q){var V=g&m,Y=s.length,ne=l.length;if(Y!=ne&&!(V&&ne>Y))return!1;var pe=q.get(s),ge=q.get(l);if(pe&&ge)return pe==l&&ge==s;var me=-1,be=!0,Ce=g&y?new ei:r;for(q.set(s,l),q.set(l,s);++me<Y;){var Ie=s[me],je=l[me];if(O)var Pe=V?O(je,Ie,me,l,s,q):O(Ie,je,me,s,l,q);if(Pe!==r){if(Pe)continue;be=!1;break}if(Ce){if(!Ul(l,function(Le,$e){if(!qo(Ce,$e)&&(Ie===Le||P(Ie,Le,g,O,q)))return Ce.push($e)})){be=!1;break}}else if(!(Ie===je||P(Ie,je,g,O,q))){be=!1;break}}return q.delete(s),q.delete(l),be}function bF(s,l,g,O,P,q,V){switch(g){case tt:if(s.byteLength!=l.byteLength||s.byteOffset!=l.byteOffset)return!1;s=s.buffer,l=l.buffer;case ut:return!(s.byteLength!=l.byteLength||!q(new Ts(s),new Ts(l)));case F:case te:case _e:return Tr(+s,+l);case ae:return s.name==l.name&&s.message==l.message;case He:case Xe:return s==l+"";case Se:var Y=Xl;case qe:var ne=O&m;if(Y||(Y=Os),s.size!=l.size&&!ne)return!1;var pe=V.get(s);if(pe)return pe==l;O|=y,V.set(s,l);var ge=V_(Y(s),Y(l),O,P,q,V);return V.delete(s),ge;case We:if($o)return $o.call(s)==$o.call(l)}return!1}function xF(s,l,g,O,P,q){var V=g&m,Y=_f(s),ne=Y.length,pe=_f(l),ge=pe.length;if(ne!=ge&&!V)return!1;for(var me=ne;me--;){var be=Y[me];if(!(V?be in l:Ze.call(l,be)))return!1}var Ce=q.get(s),Ie=q.get(l);if(Ce&&Ie)return Ce==l&&Ie==s;var je=!0;q.set(s,l),q.set(l,s);for(var Pe=V;++me<ne;){be=Y[me];var Le=s[be],$e=l[be];if(O)var nr=V?O($e,Le,be,l,s,q):O(Le,$e,be,s,l,q);if(!(nr===r?Le===$e||P(Le,$e,g,O,q):nr)){je=!1;break}Pe||(Pe=be=="constructor")}if(je&&!Pe){var Lt=s.constructor,ir=l.constructor;Lt!=ir&&"constructor"in s&&"constructor"in l&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof ir=="function"&&ir instanceof ir)&&(je=!1)}return q.delete(s),q.delete(l),je}function dn(s){return Nf(Z_(s,r,a1),s+"")}function _f(s){return f_(s,St,Cf)}function Ef(s){return f_(s,Ut,W_)}var Sf=ks?function(s){return ks.get(s)}:Hf;function Zs(s){for(var l=s.name+"",g=Fi[l],O=Ze.call(Fi,l)?g.length:0;O--;){var P=g[O],q=P.func;if(q==null||q==s)return P.name}return l}function Ui(s){var l=Ze.call(M,"placeholder")?M:s;return l.placeholder}function Re(){var s=M.iteratee||$f;return s=s===$f?p_:s,arguments.length?s(arguments[0],arguments[1]):s}function Js(s,l){var g=s.__data__;return IF(l)?g[typeof l=="string"?"string":"hash"]:g.map}function Of(s){for(var l=St(s),g=l.length;g--;){var O=l[g],P=s[O];l[g]=[O,P,Y_(P)]}return l}function ni(s,l){var g=TL(s,l);return h_(g)?g:r}function wF(s){var l=Ze.call(s,Jn),g=s[Jn];try{s[Jn]=r;var O=!0}catch{}var P=Ps.call(s);return O&&(l?s[Jn]=g:delete s[Jn]),P}var Cf=Jl?function(s){return s==null?[]:(s=rt(s),Rn(Jl(s),function(l){return Jw.call(s,l)}))}:Uf,W_=Jl?function(s){for(var l=[];s;)In(l,Cf(s)),s=As(s);return l}:Uf,Mt=qt;(Ql&&Mt(new Ql(new ArrayBuffer(1)))!=tt||Lo&&Mt(new Lo)!=Se||ef&&Mt(ef.resolve())!=Oe||Bi&&Mt(new Bi)!=qe||Bo&&Mt(new Bo)!=et)&&(Mt=function(s){var l=qt(s),g=l==le?s.constructor:r,O=g?ii(g):"";if(O)switch(O){case nB:return tt;case iB:return Se;case oB:return Oe;case aB:return qe;case sB:return et}return l});function _F(s,l,g){for(var O=-1,P=g.length;++O<P;){var q=g[O],V=q.size;switch(q.type){case"drop":s+=V;break;case"dropRight":l-=V;break;case"take":l=At(l,s+V);break;case"takeRight":s=_t(s,l-V);break}}return{start:s,end:l}}function EF(s){var l=s.match(cs);return l?l[1].split(xl):[]}function G_(s,l,g){l=Mn(l,s);for(var O=-1,P=l.length,q=!1;++O<P;){var V=Gr(l[O]);if(!(q=s!=null&&g(s,V)))break;s=s[V]}return q||++O!=P?q:(P=s==null?0:s.length,!!P&&ou(P)&&hn(V,P)&&(Me(s)||oi(s)))}function SF(s){var l=s.length,g=new s.constructor(l);return l&&typeof s[0]=="string"&&Ze.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function K_(s){return typeof s.constructor=="function"&&!Ko(s)?$i(As(s)):{}}function OF(s,l,g){var O=s.constructor;switch(l){case ut:return bf(s);case F:case te:return new O(+s);case tt:return uF(s,g);case Ct:case Jt:case lr:case Dt:case xt:case jt:case Hr:case Yn:case Cn:return N_(s,g);case Se:return new O;case _e:case Xe:return new O(s);case He:return cF(s);case qe:return new O;case We:return lF(s)}}function CF(s,l){var g=l.length;if(!g)return s;var O=g-1;return l[O]=(g>1?"& ":"")+l[O],l=l.join(g>2?", ":" "),s.replace(bl,`{
48
+ /* [wrapped with `+l+`] */
49
+ `)}function RF(s){return Me(s)||oi(s)||!!(Qw&&s&&s[Qw])}function hn(s,l){var g=typeof s;return l=l??Z,!!l&&(g=="number"||g!="symbol"&&Pl.test(s))&&s>-1&&s%1==0&&s<l}function kt(s,l,g){if(!ft(g))return!1;var O=typeof l;return(O=="number"?Ht(g)&&hn(l,g.length):O=="string"&&l in g)?Tr(g[l],s):!1}function Rf(s,l){if(Me(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||rr(s)?!0:yl.test(s)||!os.test(s)||l!=null&&s in rt(l)}function IF(s){var l=typeof s;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?s!=="__proto__":s===null}function If(s){var l=Zs(s),g=M[l];if(typeof g!="function"||!(l in Fe.prototype))return!1;if(s===g)return!0;var O=Sf(g);return!!O&&s===O[0]}function PF(s){return!!Yw&&Yw in s}var NF=Rs?pn:Vf;function Ko(s){var l=s&&s.constructor,g=typeof l=="function"&&l.prototype||Li;return s===g}function Y_(s){return s===s&&!ft(s)}function X_(s,l){return function(g){return g==null?!1:g[s]===l&&(l!==r||s in rt(g))}}function TF(s){var l=nu(s,function(O){return g.size===d&&g.clear(),O}),g=l.cache;return l}function AF(s,l){var g=s[1],O=l[1],P=g|O,q=P<(x|b|I),V=O==I&&g==S||O==I&&g==N&&s[7].length<=l[8]||O==(I|N)&&l[7].length<=l[8]&&g==S;if(!(q||V))return s;O&x&&(s[2]=l[2],P|=g&x?0:w);var Y=l[3];if(Y){var ne=s[3];s[3]=ne?A_(ne,Y,l[4]):Y,s[4]=ne?Pn(s[3],f):l[4]}return Y=l[5],Y&&(ne=s[5],s[5]=ne?M_(ne,Y,l[6]):Y,s[6]=ne?Pn(s[5],f):l[6]),Y=l[7],Y&&(s[7]=Y),O&I&&(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 MF(s){var l=[];if(s!=null)for(var g in rt(s))l.push(g);return l}function DF(s){return Ps.call(s)}function Z_(s,l,g){return l=_t(l===r?s.length-1:l,0),function(){for(var O=arguments,P=-1,q=_t(O.length-l,0),V=se(q);++P<q;)V[P]=O[l+P];P=-1;for(var Y=se(l+1);++P<l;)Y[P]=O[P];return Y[l]=g(V),Qt(s,this,Y)}}function J_(s,l){return l.length<2?s:ri(s,gr(l,0,-1))}function jF(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 Pf(s,l){if(!(l==="constructor"&&typeof s[l]=="function")&&l!="__proto__")return s[l]}var Q_=t1(__),Yo=XL||function(s,l){return Rt.setTimeout(s,l)},Nf=t1(iF);function e1(s,l,g){var O=l+"";return Nf(s,CF(O,qF(EF(O),g)))}function t1(s){var l=0,g=0;return function(){var O=eB(),P=j-(O-g);if(g=O,P>0){if(++l>=U)return arguments[0]}else l=0;return s.apply(r,arguments)}}function Qs(s,l){var g=-1,O=s.length,P=O-1;for(l=l===r?O:l;++g<l;){var q=df(g,P),V=s[q];s[q]=s[g],s[g]=V}return s.length=l,s}var r1=TF(function(s){var l=[];return s.charCodeAt(0)===46&&l.push(""),s.replace(as,function(g,O,P,q){l.push(P?q.replace(El,"$1"):O||g)}),l});function Gr(s){if(typeof s=="string"||rr(s))return s;var l=s+"";return l=="0"&&1/s==-X?"-0":l}function ii(s){if(s!=null){try{return Is.call(s)}catch{}try{return s+""}catch{}}return""}function qF(s,l){return dr(H,function(g){var O="_."+g[0];l&g[1]&&!Es(s,O)&&s.push(O)}),s.sort()}function n1(s){if(s instanceof Fe)return s.clone();var l=new pr(s.__wrapped__,s.__chain__);return l.__actions__=zt(s.__actions__),l.__index__=s.__index__,l.__values__=s.__values__,l}function kF(s,l,g){(g?kt(s,l,g):l===r)?l=1:l=_t(De(l),0);var O=s==null?0:s.length;if(!O||l<1)return[];for(var P=0,q=0,V=se(js(O/l));P<O;)V[q++]=gr(s,P,P+=l);return V}function LF(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 BF(){var s=arguments.length;if(!s)return[];for(var l=se(s-1),g=arguments[0],O=s;O--;)l[O-1]=arguments[O];return In(Me(g)?zt(g):[g],It(l,1))}var FF=ke(function(s,l){return pt(s)?Ho(s,It(l,1,pt,!0)):[]}),$F=ke(function(s,l){var g=mr(l);return pt(g)&&(g=r),pt(s)?Ho(s,It(l,1,pt,!0),Re(g,2)):[]}),zF=ke(function(s,l){var g=mr(l);return pt(g)&&(g=r),pt(s)?Ho(s,It(l,1,pt,!0),r,g):[]});function HF(s,l,g){var O=s==null?0:s.length;return O?(l=g||l===r?1:De(l),gr(s,l<0?0:l,O)):[]}function UF(s,l,g){var O=s==null?0:s.length;return O?(l=g||l===r?1:De(l),l=O-l,gr(s,0,l<0?0:l)):[]}function VF(s,l){return s&&s.length?Vs(s,Re(l,3),!0,!0):[]}function WF(s,l){return s&&s.length?Vs(s,Re(l,3),!0):[]}function GF(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),BB(s,l,g,O)):[]}function i1(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=_t(O+P,0)),Ss(s,Re(l,3),P)}function o1(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?_t(O+P,0):At(P,O-1)),Ss(s,Re(l,3),P,!0)}function a1(s){var l=s==null?0:s.length;return l?It(s,1):[]}function KF(s){var l=s==null?0:s.length;return l?It(s,X):[]}function YF(s,l){var g=s==null?0:s.length;return g?(l=l===r?1:De(l),It(s,l)):[]}function XF(s){for(var l=-1,g=s==null?0:s.length,O={};++l<g;){var P=s[l];O[P[0]]=P[1]}return O}function s1(s){return s&&s.length?s[0]:r}function ZF(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var P=g==null?0:De(g);return P<0&&(P=_t(O+P,0)),Di(s,l,P)}function JF(s){var l=s==null?0:s.length;return l?gr(s,0,-1):[]}var QF=ke(function(s){var l=ct(s,mf);return l.length&&l[0]===s[0]?sf(l):[]}),e$=ke(function(s){var l=mr(s),g=ct(s,mf);return l===mr(g)?l=r:g.pop(),g.length&&g[0]===s[0]?sf(g,Re(l,2)):[]}),t$=ke(function(s){var l=mr(s),g=ct(s,mf);return l=typeof l=="function"?l:r,l&&g.pop(),g.length&&g[0]===s[0]?sf(g,r,l):[]});function r$(s,l){return s==null?"":JL.call(s,l)}function mr(s){var l=s==null?0:s.length;return l?s[l-1]:r}function n$(s,l,g){var O=s==null?0:s.length;if(!O)return-1;var P=O;return g!==r&&(P=De(g),P=P<0?_t(O+P,0):At(P,O-1)),l===l?qL(s,l,P):Ss(s,$w,P,!0)}function i$(s,l){return s&&s.length?y_(s,De(l)):r}var o$=ke(u1);function u1(s,l){return s&&s.length&&l&&l.length?ff(s,l):s}function a$(s,l,g){return s&&s.length&&l&&l.length?ff(s,l,Re(g,2)):s}function s$(s,l,g){return s&&s.length&&l&&l.length?ff(s,l,r,g):s}var u$=dn(function(s,l){var g=s==null?0:s.length,O=rf(s,l);return w_(s,ct(l,function(P){return hn(P,g)?+P:P}).sort(T_)),O});function c$(s,l){var g=[];if(!(s&&s.length))return g;var O=-1,P=[],q=s.length;for(l=Re(l,3);++O<q;){var V=s[O];l(V,O,s)&&(g.push(V),P.push(O))}return w_(s,P),g}function Tf(s){return s==null?s:rB.call(s)}function l$(s,l,g){var O=s==null?0:s.length;return O?(g&&typeof g!="number"&&kt(s,l,g)?(l=0,g=O):(l=l==null?0:De(l),g=g===r?O:De(g)),gr(s,l,g)):[]}function f$(s,l){return Us(s,l)}function d$(s,l,g){return pf(s,l,Re(g,2))}function h$(s,l){var g=s==null?0:s.length;if(g){var O=Us(s,l);if(O<g&&Tr(s[O],l))return O}return-1}function p$(s,l){return Us(s,l,!0)}function v$(s,l,g){return pf(s,l,Re(g,2),!0)}function g$(s,l){var g=s==null?0:s.length;if(g){var O=Us(s,l,!0)-1;if(Tr(s[O],l))return O}return-1}function m$(s){return s&&s.length?E_(s):[]}function y$(s,l){return s&&s.length?E_(s,Re(l,2)):[]}function b$(s){var l=s==null?0:s.length;return l?gr(s,1,l):[]}function x$(s,l,g){return s&&s.length?(l=g||l===r?1:De(l),gr(s,0,l<0?0:l)):[]}function w$(s,l,g){var O=s==null?0:s.length;return O?(l=g||l===r?1:De(l),l=O-l,gr(s,l<0?0:l,O)):[]}function _$(s,l){return s&&s.length?Vs(s,Re(l,3),!1,!0):[]}function E$(s,l){return s&&s.length?Vs(s,Re(l,3)):[]}var S$=ke(function(s){return An(It(s,1,pt,!0))}),O$=ke(function(s){var l=mr(s);return pt(l)&&(l=r),An(It(s,1,pt,!0),Re(l,2))}),C$=ke(function(s){var l=mr(s);return l=typeof l=="function"?l:r,An(It(s,1,pt,!0),r,l)});function R$(s){return s&&s.length?An(s):[]}function I$(s,l){return s&&s.length?An(s,Re(l,2)):[]}function P$(s,l){return l=typeof l=="function"?l:r,s&&s.length?An(s,r,l):[]}function Af(s){if(!(s&&s.length))return[];var l=0;return s=Rn(s,function(g){if(pt(g))return l=_t(g.length,l),!0}),Kl(l,function(g){return ct(s,Vl(g))})}function c1(s,l){if(!(s&&s.length))return[];var g=Af(s);return l==null?g:ct(g,function(O){return Qt(l,r,O)})}var N$=ke(function(s,l){return pt(s)?Ho(s,l):[]}),T$=ke(function(s){return gf(Rn(s,pt))}),A$=ke(function(s){var l=mr(s);return pt(l)&&(l=r),gf(Rn(s,pt),Re(l,2))}),M$=ke(function(s){var l=mr(s);return l=typeof l=="function"?l:r,gf(Rn(s,pt),r,l)}),D$=ke(Af);function j$(s,l){return R_(s||[],l||[],zo)}function q$(s,l){return R_(s||[],l||[],Wo)}var k$=ke(function(s){var l=s.length,g=l>1?s[l-1]:r;return g=typeof g=="function"?(s.pop(),g):r,c1(s,g)});function l1(s){var l=M(s);return l.__chain__=!0,l}function L$(s,l){return l(s),s}function eu(s,l){return l(s)}var B$=dn(function(s){var l=s.length,g=l?s[0]:0,O=this.__wrapped__,P=function(q){return rf(q,s)};return l>1||this.__actions__.length||!(O instanceof Fe)||!hn(g)?this.thru(P):(O=O.slice(g,+g+(l?1:0)),O.__actions__.push({func:eu,args:[P],thisArg:r}),new pr(O,this.__chain__).thru(function(q){return l&&!q.length&&q.push(r),q}))});function F$(){return l1(this)}function $$(){return new pr(this.value(),this.__chain__)}function z$(){this.__values__===r&&(this.__values__=S1(this.value()));var s=this.__index__>=this.__values__.length,l=s?r:this.__values__[this.__index__++];return{done:s,value:l}}function H$(){return this}function U$(s){for(var l,g=this;g instanceof Bs;){var O=n1(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 V$(){var s=this.__wrapped__;if(s instanceof Fe){var l=s;return this.__actions__.length&&(l=new Fe(this)),l=l.reverse(),l.__actions__.push({func:eu,args:[Tf],thisArg:r}),new pr(l,this.__chain__)}return this.thru(Tf)}function W$(){return C_(this.__wrapped__,this.__actions__)}var G$=Ws(function(s,l,g){Ze.call(s,g)?++s[g]:ln(s,g,1)});function K$(s,l,g){var O=Me(s)?Bw:LB;return g&&kt(s,l,g)&&(l=r),O(s,Re(l,3))}function Y$(s,l){var g=Me(s)?Rn:c_;return g(s,Re(l,3))}var X$=k_(i1),Z$=k_(o1);function J$(s,l){return It(tu(s,l),1)}function Q$(s,l){return It(tu(s,l),X)}function e3(s,l,g){return g=g===r?1:De(g),It(tu(s,l),g)}function f1(s,l){var g=Me(s)?dr:Tn;return g(s,Re(l,3))}function d1(s,l){var g=Me(s)?bL:u_;return g(s,Re(l,3))}var t3=Ws(function(s,l,g){Ze.call(s,g)?s[g].push(l):ln(s,g,[l])});function r3(s,l,g,O){s=Ht(s)?s:Wi(s),g=g&&!O?De(g):0;var P=s.length;return g<0&&(g=_t(P+g,0)),au(s)?g<=P&&s.indexOf(l,g)>-1:!!P&&Di(s,l,g)>-1}var n3=ke(function(s,l,g){var O=-1,P=typeof l=="function",q=Ht(s)?se(s.length):[];return Tn(s,function(V){q[++O]=P?Qt(l,V,g):Uo(V,l,g)}),q}),i3=Ws(function(s,l,g){ln(s,g,l)});function tu(s,l){var g=Me(s)?ct:v_;return g(s,Re(l,3))}function o3(s,l,g,O){return s==null?[]:(Me(l)||(l=l==null?[]:[l]),g=O?r:g,Me(g)||(g=g==null?[]:[g]),b_(s,l,g))}var a3=Ws(function(s,l,g){s[g?0:1].push(l)},function(){return[[],[]]});function s3(s,l,g){var O=Me(s)?Hl:Hw,P=arguments.length<3;return O(s,Re(l,4),g,P,Tn)}function u3(s,l,g){var O=Me(s)?xL:Hw,P=arguments.length<3;return O(s,Re(l,4),g,P,u_)}function c3(s,l){var g=Me(s)?Rn:c_;return g(s,iu(Re(l,3)))}function l3(s){var l=Me(s)?i_:rF;return l(s)}function f3(s,l,g){(g?kt(s,l,g):l===r)?l=1:l=De(l);var O=Me(s)?MB:nF;return O(s,l)}function d3(s){var l=Me(s)?DB:oF;return l(s)}function h3(s){if(s==null)return 0;if(Ht(s))return au(s)?qi(s):s.length;var l=Mt(s);return l==Se||l==qe?s.size:cf(s).length}function p3(s,l,g){var O=Me(s)?Ul:aF;return g&&kt(s,l,g)&&(l=r),O(s,Re(l,3))}var v3=ke(function(s,l){if(s==null)return[];var g=l.length;return g>1&&kt(s,l[0],l[1])?l=[]:g>2&&kt(l[0],l[1],l[2])&&(l=[l[0]]),b_(s,It(l,1),[])}),ru=YL||function(){return Rt.Date.now()};function g3(s,l){if(typeof l!="function")throw new hr(a);return s=De(s),function(){if(--s<1)return l.apply(this,arguments)}}function h1(s,l,g){return l=g?r:l,l=s&&l==null?s.length:l,fn(s,I,r,r,r,r,l)}function p1(s,l){var g;if(typeof l!="function")throw new hr(a);return s=De(s),function(){return--s>0&&(g=l.apply(this,arguments)),s<=1&&(l=r),g}}var Mf=ke(function(s,l,g){var O=x;if(g.length){var P=Pn(g,Ui(Mf));O|=_}return fn(s,O,l,g,P)}),v1=ke(function(s,l,g){var O=x|b;if(g.length){var P=Pn(g,Ui(v1));O|=_}return fn(l,O,s,g,P)});function g1(s,l,g){l=g?r:l;var O=fn(s,S,r,r,r,r,r,l);return O.placeholder=g1.placeholder,O}function m1(s,l,g){l=g?r:l;var O=fn(s,E,r,r,r,r,r,l);return O.placeholder=m1.placeholder,O}function y1(s,l,g){var O,P,q,V,Y,ne,pe=0,ge=!1,me=!1,be=!0;if(typeof s!="function")throw new hr(a);l=yr(l)||0,ft(g)&&(ge=!!g.leading,me="maxWait"in g,q=me?_t(yr(g.maxWait)||0,l):q,be="trailing"in g?!!g.trailing:be);function Ce(vt){var Ar=O,gn=P;return O=P=r,pe=vt,V=s.apply(gn,Ar),V}function Ie(vt){return pe=vt,Y=Yo(Le,l),ge?Ce(vt):V}function je(vt){var Ar=vt-ne,gn=vt-pe,k1=l-Ar;return me?At(k1,q-gn):k1}function Pe(vt){var Ar=vt-ne,gn=vt-pe;return ne===r||Ar>=l||Ar<0||me&&gn>=q}function Le(){var vt=ru();if(Pe(vt))return $e(vt);Y=Yo(Le,je(vt))}function $e(vt){return Y=r,be&&O?Ce(vt):(O=P=r,V)}function nr(){Y!==r&&I_(Y),pe=0,O=ne=P=Y=r}function Lt(){return Y===r?V:$e(ru())}function ir(){var vt=ru(),Ar=Pe(vt);if(O=arguments,P=this,ne=vt,Ar){if(Y===r)return Ie(ne);if(me)return I_(Y),Y=Yo(Le,l),Ce(ne)}return Y===r&&(Y=Yo(Le,l)),V}return ir.cancel=nr,ir.flush=Lt,ir}var m3=ke(function(s,l){return s_(s,1,l)}),y3=ke(function(s,l,g){return s_(s,yr(l)||0,g)});function b3(s){return fn(s,D)}function nu(s,l){if(typeof s!="function"||l!=null&&typeof l!="function")throw new hr(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 V=s.apply(this,O);return g.cache=q.set(P,V)||q,V};return g.cache=new(nu.Cache||cn),g}nu.Cache=cn;function iu(s){if(typeof s!="function")throw new hr(a);return function(){var l=arguments;switch(l.length){case 0:return!s.call(this);case 1:return!s.call(this,l[0]);case 2:return!s.call(this,l[0],l[1]);case 3:return!s.call(this,l[0],l[1],l[2])}return!s.apply(this,l)}}function x3(s){return p1(2,s)}var w3=sF(function(s,l){l=l.length==1&&Me(l[0])?ct(l[0],er(Re())):ct(It(l,1),er(Re()));var g=l.length;return ke(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)})}),Df=ke(function(s,l){var g=Pn(l,Ui(Df));return fn(s,_,r,l,g)}),b1=ke(function(s,l){var g=Pn(l,Ui(b1));return fn(s,R,r,l,g)}),_3=dn(function(s,l){return fn(s,N,r,r,r,l)});function E3(s,l){if(typeof s!="function")throw new hr(a);return l=l===r?l:De(l),ke(s,l)}function S3(s,l){if(typeof s!="function")throw new hr(a);return l=l==null?0:_t(De(l),0),ke(function(g){var O=g[l],P=Dn(g,0,l);return O&&In(P,O),Qt(s,this,P)})}function O3(s,l,g){var O=!0,P=!0;if(typeof s!="function")throw new hr(a);return ft(g)&&(O="leading"in g?!!g.leading:O,P="trailing"in g?!!g.trailing:P),y1(s,l,{leading:O,maxWait:l,trailing:P})}function C3(s){return h1(s,1)}function R3(s,l){return Df(yf(l),s)}function I3(){if(!arguments.length)return[];var s=arguments[0];return Me(s)?s:[s]}function P3(s){return vr(s,v)}function N3(s,l){return l=typeof l=="function"?l:r,vr(s,v,l)}function T3(s){return vr(s,h|v)}function A3(s,l){return l=typeof l=="function"?l:r,vr(s,h|v,l)}function M3(s,l){return l==null||a_(s,l,St(l))}function Tr(s,l){return s===l||s!==s&&l!==l}var D3=Xs(af),j3=Xs(function(s,l){return s>=l}),oi=d_((function(){return arguments})())?d_:function(s){return dt(s)&&Ze.call(s,"callee")&&!Jw.call(s,"callee")},Me=se.isArray,q3=Mw?er(Mw):UB;function Ht(s){return s!=null&&ou(s.length)&&!pn(s)}function pt(s){return dt(s)&&Ht(s)}function k3(s){return s===!0||s===!1||dt(s)&&qt(s)==F}var jn=ZL||Vf,L3=Dw?er(Dw):VB;function B3(s){return dt(s)&&s.nodeType===1&&!Xo(s)}function F3(s){if(s==null)return!0;if(Ht(s)&&(Me(s)||typeof s=="string"||typeof s.splice=="function"||jn(s)||Vi(s)||oi(s)))return!s.length;var l=Mt(s);if(l==Se||l==qe)return!s.size;if(Ko(s))return!cf(s).length;for(var g in s)if(Ze.call(s,g))return!1;return!0}function $3(s,l){return Vo(s,l)}function z3(s,l,g){g=typeof g=="function"?g:r;var O=g?g(s,l):r;return O===r?Vo(s,l,r,g):!!O}function jf(s){if(!dt(s))return!1;var l=qt(s);return l==ae||l==ie||typeof s.message=="string"&&typeof s.name=="string"&&!Xo(s)}function H3(s){return typeof s=="number"&&e_(s)}function pn(s){if(!ft(s))return!1;var l=qt(s);return l==ce||l==we||l==k||l==Ne}function x1(s){return typeof s=="number"&&s==De(s)}function ou(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Z}function ft(s){var l=typeof s;return s!=null&&(l=="object"||l=="function")}function dt(s){return s!=null&&typeof s=="object"}var w1=jw?er(jw):GB;function U3(s,l){return s===l||uf(s,l,Of(l))}function V3(s,l,g){return g=typeof g=="function"?g:r,uf(s,l,Of(l),g)}function W3(s){return _1(s)&&s!=+s}function G3(s){if(NF(s))throw new Ae(o);return h_(s)}function K3(s){return s===null}function Y3(s){return s==null}function _1(s){return typeof s=="number"||dt(s)&&qt(s)==_e}function Xo(s){if(!dt(s)||qt(s)!=le)return!1;var l=As(s);if(l===null)return!0;var g=Ze.call(l,"constructor")&&l.constructor;return typeof g=="function"&&g instanceof g&&Is.call(g)==VL}var qf=qw?er(qw):KB;function X3(s){return x1(s)&&s>=-Z&&s<=Z}var E1=kw?er(kw):YB;function au(s){return typeof s=="string"||!Me(s)&&dt(s)&&qt(s)==Xe}function rr(s){return typeof s=="symbol"||dt(s)&&qt(s)==We}var Vi=Lw?er(Lw):XB;function Z3(s){return s===r}function J3(s){return dt(s)&&Mt(s)==et}function Q3(s){return dt(s)&&qt(s)==Tt}var e5=Xs(lf),t5=Xs(function(s,l){return s<=l});function S1(s){if(!s)return[];if(Ht(s))return au(s)?Pr(s):zt(s);if(ko&&s[ko])return ML(s[ko]());var l=Mt(s),g=l==Se?Xl:l==qe?Os:Wi;return g(s)}function vn(s){if(!s)return s===0?s:0;if(s=yr(s),s===X||s===-X){var l=s<0?-1:1;return l*re}return s===s?s:0}function De(s){var l=vn(s),g=l%1;return l===l?g?l-g:l:0}function O1(s){return s?ti(De(s),0,Q):0}function yr(s){if(typeof s=="number")return s;if(rr(s))return W;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=Uw(s);var g=Cl.test(s);return g||Il.test(s)?gL(s.slice(2),g?2:8):Ol.test(s)?W:+s}function C1(s){return Wr(s,Ut(s))}function r5(s){return s?ti(De(s),-Z,Z):s===0?s:0}function Ge(s){return s==null?"":tr(s)}var n5=zi(function(s,l){if(Ko(l)||Ht(l)){Wr(l,St(l),s);return}for(var g in l)Ze.call(l,g)&&zo(s,g,l[g])}),R1=zi(function(s,l){Wr(l,Ut(l),s)}),su=zi(function(s,l,g,O){Wr(l,Ut(l),s,O)}),i5=zi(function(s,l,g,O){Wr(l,St(l),s,O)}),o5=dn(rf);function a5(s,l){var g=$i(s);return l==null?g:o_(g,l)}var s5=ke(function(s,l){s=rt(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],V=Ut(q),Y=-1,ne=V.length;++Y<ne;){var pe=V[Y],ge=s[pe];(ge===r||Tr(ge,Li[pe])&&!Ze.call(s,pe))&&(s[pe]=q[pe])}return s}),u5=ke(function(s){return s.push(r,U_),Qt(I1,r,s)});function c5(s,l){return Fw(s,Re(l,3),Vr)}function l5(s,l){return Fw(s,Re(l,3),of)}function f5(s,l){return s==null?s:nf(s,Re(l,3),Ut)}function d5(s,l){return s==null?s:l_(s,Re(l,3),Ut)}function h5(s,l){return s&&Vr(s,Re(l,3))}function p5(s,l){return s&&of(s,Re(l,3))}function v5(s){return s==null?[]:zs(s,St(s))}function g5(s){return s==null?[]:zs(s,Ut(s))}function kf(s,l,g){var O=s==null?r:ri(s,l);return O===r?g:O}function m5(s,l){return s!=null&&G_(s,l,FB)}function Lf(s,l){return s!=null&&G_(s,l,$B)}var y5=B_(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=Ps.call(l)),s[l]=g},Ff(Vt)),b5=B_(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=Ps.call(l)),Ze.call(s,l)?s[l].push(g):s[l]=[g]},Re),x5=ke(Uo);function St(s){return Ht(s)?n_(s):cf(s)}function Ut(s){return Ht(s)?n_(s,!0):ZB(s)}function w5(s,l){var g={};return l=Re(l,3),Vr(s,function(O,P,q){ln(g,l(O,P,q),O)}),g}function _5(s,l){var g={};return l=Re(l,3),Vr(s,function(O,P,q){ln(g,P,l(O,P,q))}),g}var E5=zi(function(s,l,g){Hs(s,l,g)}),I1=zi(function(s,l,g,O){Hs(s,l,g,O)}),S5=dn(function(s,l){var g={};if(s==null)return g;var O=!1;l=ct(l,function(q){return q=Mn(q,s),O||(O=q.length>1),q}),Wr(s,Ef(s),g),O&&(g=vr(g,h|p|v,yF));for(var P=l.length;P--;)vf(g,l[P]);return g});function O5(s,l){return P1(s,iu(Re(l)))}var C5=dn(function(s,l){return s==null?{}:QB(s,l)});function P1(s,l){if(s==null)return{};var g=ct(Ef(s),function(O){return[O]});return l=Re(l),x_(s,g,function(O,P){return l(O,P[0])})}function R5(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[Gr(l[O])];q===r&&(O=P,q=g),s=pn(q)?q.call(s):q}return s}function I5(s,l,g){return s==null?s:Wo(s,l,g)}function P5(s,l,g,O){return O=typeof O=="function"?O:r,s==null?s:Wo(s,l,g,O)}var N1=z_(St),T1=z_(Ut);function N5(s,l,g){var O=Me(s),P=O||jn(s)||Vi(s);if(l=Re(l,4),g==null){var q=s&&s.constructor;P?g=O?new q:[]:ft(s)?g=pn(q)?$i(As(s)):{}:g={}}return(P?dr:Vr)(s,function(V,Y,ne){return l(g,V,Y,ne)}),g}function T5(s,l){return s==null?!0:vf(s,l)}function A5(s,l,g){return s==null?s:O_(s,l,yf(g))}function M5(s,l,g,O){return O=typeof O=="function"?O:r,s==null?s:O_(s,l,yf(g),O)}function Wi(s){return s==null?[]:Yl(s,St(s))}function D5(s){return s==null?[]:Yl(s,Ut(s))}function j5(s,l,g){return g===r&&(g=l,l=r),g!==r&&(g=yr(g),g=g===g?g:0),l!==r&&(l=yr(l),l=l===l?l:0),ti(yr(s),l,g)}function q5(s,l,g){return l=vn(l),g===r?(g=l,l=0):g=vn(g),s=yr(s),zB(s,l,g)}function k5(s,l,g){if(g&&typeof g!="boolean"&&kt(s,l,g)&&(l=g=r),g===r&&(typeof l=="boolean"?(g=l,l=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&l===r?(s=0,l=1):(s=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=t_();return At(s+P*(l-s+vL("1e-"+((P+"").length-1))),l)}return df(s,l)}var L5=Hi(function(s,l,g){return l=l.toLowerCase(),s+(g?A1(l):l)});function A1(s){return Bf(Ge(s).toLowerCase())}function M1(s){return s=Ge(s),s&&s.replace(Nl,IL).replace(oL,"")}function B5(s,l,g){s=Ge(s),l=tr(l);var O=s.length;g=g===r?O:ti(De(g),0,O);var P=g;return g-=l.length,g>=0&&s.slice(g,P)==l}function F5(s){return s=Ge(s),s&&rs.test(s)?s.replace(No,PL):s}function $5(s){return s=Ge(s),s&&ss.test(s)?s.replace(To,"\\$&"):s}var z5=Hi(function(s,l,g){return s+(g?"-":"")+l.toLowerCase()}),H5=Hi(function(s,l,g){return s+(g?" ":"")+l.toLowerCase()}),U5=q_("toLowerCase");function V5(s,l,g){s=Ge(s),l=De(l);var O=l?qi(s):0;if(!l||O>=l)return s;var P=(l-O)/2;return Ys(qs(P),g)+s+Ys(js(P),g)}function W5(s,l,g){s=Ge(s),l=De(l);var O=l?qi(s):0;return l&&O<l?s+Ys(l-O,g):s}function G5(s,l,g){s=Ge(s),l=De(l);var O=l?qi(s):0;return l&&O<l?Ys(l-O,g)+s:s}function K5(s,l,g){return g||l==null?l=0:l&&(l=+l),tB(Ge(s).replace(Ao,""),l||0)}function Y5(s,l,g){return(g?kt(s,l,g):l===r)?l=1:l=De(l),hf(Ge(s),l)}function X5(){var s=arguments,l=Ge(s[0]);return s.length<3?l:l.replace(s[1],s[2])}var Z5=Hi(function(s,l,g){return s+(g?"_":"")+l.toLowerCase()});function J5(s,l,g){return g&&typeof g!="number"&&kt(s,l,g)&&(l=g=r),g=g===r?Q:g>>>0,g?(s=Ge(s),s&&(typeof l=="string"||l!=null&&!qf(l))&&(l=tr(l),!l&&ji(s))?Dn(Pr(s),0,g):s.split(l,g)):[]}var Q5=Hi(function(s,l,g){return s+(g?" ":"")+Bf(l)});function ez(s,l,g){return s=Ge(s),g=g==null?0:ti(De(g),0,s.length),l=tr(l),s.slice(g,g+l.length)==l}function tz(s,l,g){var O=M.templateSettings;g&&kt(s,l,g)&&(l=r),s=Ge(s),l=su({},l,O,H_);var P=su({},l.imports,O.imports,H_),q=St(P),V=Yl(P,q),Y,ne,pe=0,ge=l.interpolate||Ni,me="__p += '",be=Zl((l.escape||Ni).source+"|"+ge.source+"|"+(ge===is?Sl:Ni).source+"|"+(l.evaluate||Ni).source+"|$","g"),Ce="//# sourceURL="+(Ze.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++lL+"]")+`
50
+ `;s.replace(be,function(Pe,Le,$e,nr,Lt,ir){return $e||($e=nr),me+=s.slice(pe,ir).replace(fs,NL),Le&&(Y=!0,me+=`' +
51
+ __e(`+Le+`) +
52
+ '`),Lt&&(ne=!0,me+=`';
53
+ `+Lt+`;
54
+ __p += '`),$e&&(me+=`' +
55
+ ((__t = (`+$e+`)) == null ? '' : __t) +
56
+ '`),pe=ir+Pe.length,Pe}),me+=`';
57
+ `;var Ie=Ze.call(l,"variable")&&l.variable;if(!Ie)me=`with (obj) {
58
+ `+me+`
79
59
  }
80
- `;else if(Ud.test(Me))throw new ze(s);be=(ae?be.replace(Ht,""):be).replace(Lr,"$1").replace(mn,"$1;"),be="function("+(Me||"obj")+`) {
81
- `+(Me?"":`obj || (obj = {});
82
- `)+"var __t, __p = ''"+(ie?", __e = _.escape":"")+(ae?`, __j = Array.prototype.join;
60
+ `;else if(_l.test(Ie))throw new Ae(u);me=(ne?me.replace(Ur,""):me).replace(Pi,"$1").replace(vl,"$1;"),me="function("+(Ie||"obj")+`) {
61
+ `+(Ie?"":`obj || (obj = {});
62
+ `)+"var __t, __p = ''"+(Y?", __e = _.escape":"")+(ne?`, __j = Array.prototype.join;
83
63
  function print() { __p += __j.call(arguments, '') }
84
64
  `:`;
85
- `)+be+`return __p
86
- }`;var $e=uO(function(){return tt(H,Ne+"return "+be).apply(r,J)});if($e.source=be,op($e))throw $e;return $e}function MH(l){return at(l).toLowerCase()}function AH(l){return at(l).toUpperCase()}function DH(l,f,g){if(l=at(l),l&&(g||f===r))return yE(l);if(!l||!(f=$r(f)))return l;var R=yn(l),M=yn(f),H=xE(R,M),J=wE(R,M)+1;return _i(R,H,J).join("")}function jH(l,f,g){if(l=at(l),l&&(g||f===r))return l.slice(0,EE(l)+1);if(!l||!(f=$r(f)))return l;var R=yn(l),M=wE(R,yn(f))+1;return _i(R,0,M).join("")}function qH(l,f,g){if(l=at(l),l&&(g||f===r))return l.replace(Cr,"");if(!l||!(f=$r(f)))return l;var R=yn(l),M=xE(R,yn(f));return _i(R,M).join("")}function LH(l,f){var g=L,R=B;if(kt(f)){var M="separator"in f?f.separator:M;g="length"in f?Fe(f.length):g,R="omission"in f?$r(f.omission):R}l=at(l);var H=l.length;if(Co(l)){var J=yn(l);H=J.length}if(g>=H)return l;var ie=g-Io(R);if(ie<1)return R;var ae=J?_i(J,0,ie).join(""):l.slice(0,ie);if(M===r)return ae+R;if(J&&(ie+=ae.length-ie),ap(M)){if(l.slice(ie).search(M)){var he,ve=ae;for(M.global||(M=_f(M.source,at(vl.exec(M))+"g")),M.lastIndex=0;he=M.exec(ve);)var be=he.index;ae=ae.slice(0,be===r?ie:be)}}else if(l.indexOf($r(M),ie)!=ie){var Ee=ae.lastIndexOf(M);Ee>-1&&(ae=ae.slice(0,Ee))}return ae+R}function zH(l){return l=at(l),l&&Pt.test(l)?l.replace(Ct,h3):l}var BH=Ao(function(l,f,g){return l+(g?" ":"")+f.toUpperCase()}),cp=dS("toUpperCase");function cO(l,f,g){return l=at(l),f=g?r:f,f===r?c3(l)?m3(l):e3(l):l.match(f)||[]}var uO=He(function(l,f){try{return Br(l,r,f)}catch(g){return op(g)?g:new ze(g)}}),FH=Qn(function(l,f){return Qr(f,function(g){g=jn(g),Zn(l,g,np(l[g],l))}),l});function $H(l){var f=l==null?0:l.length,g=Pe();return l=f?Rt(l,function(R){if(typeof R[1]!="function")throw new en(a);return[g(R[0]),R[1]]}):[],He(function(R){for(var M=-1;++M<f;){var H=l[M];if(Br(H[0],this,R))return Br(H[1],this,R)}})}function VH(l){return h4(rn(l,p))}function up(l){return function(){return l}}function HH(l,f){return l==null||l!==l?f:l}var WH=pS(),UH=pS(!0);function Tr(l){return l}function dp(l){return VE(typeof l=="function"?l:rn(l,p))}function GH(l){return WE(rn(l,p))}function KH(l,f){return UE(l,rn(f,p))}var YH=He(function(l,f){return function(g){return za(g,l,f)}}),XH=He(function(l,f){return function(g){return za(l,g,f)}});function fp(l,f,g){var R=Zt(f),M=Gl(f,R);g==null&&!(kt(f)&&(M.length||!R.length))&&(g=f,f=l,l=this,M=Gl(f,Zt(f)));var H=!(kt(g)&&"chain"in g)||!!g.chain,J=ti(l);return Qr(M,function(ie){var ae=f[ie];l[ie]=ae,J&&(l.prototype[ie]=function(){var he=this.__chain__;if(H||he){var ve=l(this.__wrapped__),be=ve.__actions__=Ir(this.__actions__);return be.push({func:ae,args:arguments,thisArg:l}),ve.__chain__=he,ve}return ae.apply(l,gi([this.value()],arguments))})}),l}function ZH(){return rr._===this&&(rr._=E3),this}function pp(){}function JH(l){return l=Fe(l),He(function(f){return GE(f,l)})}var QH=Hf(Rt),eW=Hf(hE),tW=Hf(vf);function dO(l){return Zf(l)?gf(jn(l)):P4(l)}function rW(l){return function(f){return l==null?r:Yi(l,f)}}var nW=vS(),iW=vS(!0);function hp(){return[]}function vp(){return!1}function oW(){return{}}function aW(){return""}function sW(){return!0}function lW(l,f){if(l=Fe(l),l<1||l>U)return[];var g=W,R=lr(l,W);f=Pe(f),l-=W;for(var M=yf(R,f);++g<l;)f(g);return M}function cW(l){return Be(l)?Rt(l,jn):Vr(l)?[l]:Ir(PS(at(l)))}function uW(l){var f=++w3;return at(l)+f}var dW=Ql(function(l,f){return l+f},0),fW=Wf("ceil"),pW=Ql(function(l,f){return l/f},1),hW=Wf("floor");function vW(l){return l&&l.length?Ul(l,Tr,Tf):r}function gW(l,f){return l&&l.length?Ul(l,Pe(f,2),Tf):r}function mW(l){return mE(l,Tr)}function bW(l,f){return mE(l,Pe(f,2))}function yW(l){return l&&l.length?Ul(l,Tr,Af):r}function xW(l,f){return l&&l.length?Ul(l,Pe(f,2),Af):r}var wW=Ql(function(l,f){return l*f},1),_W=Wf("round"),EW=Ql(function(l,f){return l-f},0);function SW(l){return l&&l.length?bf(l,Tr):0}function OW(l,f){return l&&l.length?bf(l,Pe(f,2)):0}return V.after=G6,V.ary=$S,V.assign=AV,V.assignIn=rO,V.assignInWith=fc,V.assignWith=DV,V.at=jV,V.before=VS,V.bind=np,V.bindAll=FH,V.bindKey=HS,V.castArray=oV,V.chain=zS,V.chunk=h$,V.compact=v$,V.concat=g$,V.cond=$H,V.conforms=VH,V.constant=up,V.countBy=S6,V.create=qV,V.curry=WS,V.curryRight=US,V.debounce=GS,V.defaults=LV,V.defaultsDeep=zV,V.defer=K6,V.delay=Y6,V.difference=m$,V.differenceBy=b$,V.differenceWith=y$,V.drop=x$,V.dropRight=w$,V.dropRightWhile=_$,V.dropWhile=E$,V.fill=S$,V.filter=C6,V.flatMap=N6,V.flatMapDeep=T6,V.flatMapDepth=P6,V.flatten=DS,V.flattenDeep=O$,V.flattenDepth=C$,V.flip=X6,V.flow=WH,V.flowRight=UH,V.fromPairs=I$,V.functions=UV,V.functionsIn=GV,V.groupBy=k6,V.initial=N$,V.intersection=T$,V.intersectionBy=P$,V.intersectionWith=k$,V.invert=YV,V.invertBy=XV,V.invokeMap=A6,V.iteratee=dp,V.keyBy=D6,V.keys=Zt,V.keysIn=Nr,V.map=ac,V.mapKeys=JV,V.mapValues=QV,V.matches=GH,V.matchesProperty=KH,V.memoize=lc,V.merge=eH,V.mergeWith=nO,V.method=YH,V.methodOf=XH,V.mixin=fp,V.negate=cc,V.nthArg=JH,V.omit=tH,V.omitBy=rH,V.once=Z6,V.orderBy=j6,V.over=QH,V.overArgs=J6,V.overEvery=eW,V.overSome=tW,V.partial=ip,V.partialRight=KS,V.partition=q6,V.pick=nH,V.pickBy=iO,V.property=dO,V.propertyOf=rW,V.pull=j$,V.pullAll=qS,V.pullAllBy=q$,V.pullAllWith=L$,V.pullAt=z$,V.range=nW,V.rangeRight=iW,V.rearg=Q6,V.reject=B6,V.remove=B$,V.rest=eV,V.reverse=tp,V.sampleSize=$6,V.set=oH,V.setWith=aH,V.shuffle=V6,V.slice=F$,V.sortBy=U6,V.sortedUniq=K$,V.sortedUniqBy=Y$,V.split=NH,V.spread=tV,V.tail=X$,V.take=Z$,V.takeRight=J$,V.takeRightWhile=Q$,V.takeWhile=e6,V.tap=v6,V.throttle=rV,V.thru=oc,V.toArray=QS,V.toPairs=oO,V.toPairsIn=aO,V.toPath=cW,V.toPlainObject=tO,V.transform=sH,V.unary=nV,V.union=t6,V.unionBy=r6,V.unionWith=n6,V.uniq=i6,V.uniqBy=o6,V.uniqWith=a6,V.unset=lH,V.unzip=rp,V.unzipWith=LS,V.update=cH,V.updateWith=uH,V.values=qo,V.valuesIn=dH,V.without=s6,V.words=cO,V.wrap=iV,V.xor=l6,V.xorBy=c6,V.xorWith=u6,V.zip=d6,V.zipObject=f6,V.zipObjectDeep=p6,V.zipWith=h6,V.entries=oO,V.entriesIn=aO,V.extend=rO,V.extendWith=fc,fp(V,V),V.add=dW,V.attempt=uO,V.camelCase=vH,V.capitalize=sO,V.ceil=fW,V.clamp=fH,V.clone=aV,V.cloneDeep=lV,V.cloneDeepWith=cV,V.cloneWith=sV,V.conformsTo=uV,V.deburr=lO,V.defaultTo=HH,V.divide=pW,V.endsWith=gH,V.eq=wn,V.escape=mH,V.escapeRegExp=bH,V.every=O6,V.find=I6,V.findIndex=MS,V.findKey=BV,V.findLast=R6,V.findLastIndex=AS,V.findLastKey=FV,V.floor=hW,V.forEach=BS,V.forEachRight=FS,V.forIn=$V,V.forInRight=VV,V.forOwn=HV,V.forOwnRight=WV,V.get=sp,V.gt=dV,V.gte=fV,V.has=KV,V.hasIn=lp,V.head=jS,V.identity=Tr,V.includes=M6,V.indexOf=R$,V.inRange=pH,V.invoke=ZV,V.isArguments=Ji,V.isArray=Be,V.isArrayBuffer=pV,V.isArrayLike=Rr,V.isArrayLikeObject=jt,V.isBoolean=hV,V.isBuffer=Ei,V.isDate=vV,V.isElement=gV,V.isEmpty=mV,V.isEqual=bV,V.isEqualWith=yV,V.isError=op,V.isFinite=xV,V.isFunction=ti,V.isInteger=YS,V.isLength=uc,V.isMap=XS,V.isMatch=wV,V.isMatchWith=_V,V.isNaN=EV,V.isNative=SV,V.isNil=CV,V.isNull=OV,V.isNumber=ZS,V.isObject=kt,V.isObjectLike=Mt,V.isPlainObject=Wa,V.isRegExp=ap,V.isSafeInteger=IV,V.isSet=JS,V.isString=dc,V.isSymbol=Vr,V.isTypedArray=jo,V.isUndefined=RV,V.isWeakMap=NV,V.isWeakSet=TV,V.join=M$,V.kebabCase=yH,V.last=on,V.lastIndexOf=A$,V.lowerCase=xH,V.lowerFirst=wH,V.lt=PV,V.lte=kV,V.max=vW,V.maxBy=gW,V.mean=mW,V.meanBy=bW,V.min=yW,V.minBy=xW,V.stubArray=hp,V.stubFalse=vp,V.stubObject=oW,V.stubString=aW,V.stubTrue=sW,V.multiply=wW,V.nth=D$,V.noConflict=ZH,V.noop=pp,V.now=sc,V.pad=_H,V.padEnd=EH,V.padStart=SH,V.parseInt=OH,V.random=hH,V.reduce=L6,V.reduceRight=z6,V.repeat=CH,V.replace=IH,V.result=iH,V.round=_W,V.runInContext=oe,V.sample=F6,V.size=H6,V.snakeCase=RH,V.some=W6,V.sortedIndex=$$,V.sortedIndexBy=V$,V.sortedIndexOf=H$,V.sortedLastIndex=W$,V.sortedLastIndexBy=U$,V.sortedLastIndexOf=G$,V.startCase=TH,V.startsWith=PH,V.subtract=EW,V.sum=SW,V.sumBy=OW,V.template=kH,V.times=lW,V.toFinite=ri,V.toInteger=Fe,V.toLength=eO,V.toLower=MH,V.toNumber=an,V.toSafeInteger=MV,V.toString=at,V.toUpper=AH,V.trim=DH,V.trimEnd=jH,V.trimStart=qH,V.truncate=LH,V.unescape=zH,V.uniqueId=uW,V.upperCase=BH,V.upperFirst=cp,V.each=BS,V.eachRight=FS,V.first=jS,fp(V,(function(){var l={};return An(V,function(f,g){dt.call(V.prototype,g)||(l[g]=f)}),l})(),{chain:!1}),V.VERSION=n,Qr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){V[l].placeholder=V}),Qr(["drop","take"],function(l,f){Xe.prototype[l]=function(g){g=g===r?1:Ut(Fe(g),0);var R=this.__filtered__&&!f?new Xe(this):this.clone();return R.__filtered__?R.__takeCount__=lr(g,R.__takeCount__):R.__views__.push({size:lr(g,W),type:l+(R.__dir__<0?"Right":"")}),R},Xe.prototype[l+"Right"]=function(g){return this.reverse()[l](g).reverse()}}),Qr(["filter","map","takeWhile"],function(l,f){var g=f+1,R=g==P||g==$;Xe.prototype[l]=function(M){var H=this.clone();return H.__iteratees__.push({iteratee:Pe(M,3),type:g}),H.__filtered__=H.__filtered__||R,H}}),Qr(["head","last"],function(l,f){var g="take"+(f?"Right":"");Xe.prototype[l]=function(){return this[g](1).value()[0]}}),Qr(["initial","tail"],function(l,f){var g="drop"+(f?"":"Right");Xe.prototype[l]=function(){return this.__filtered__?new Xe(this):this[g](1)}}),Xe.prototype.compact=function(){return this.filter(Tr)},Xe.prototype.find=function(l){return this.filter(l).head()},Xe.prototype.findLast=function(l){return this.reverse().find(l)},Xe.prototype.invokeMap=He(function(l,f){return typeof l=="function"?new Xe(this):this.map(function(g){return za(g,l,f)})}),Xe.prototype.reject=function(l){return this.filter(cc(Pe(l)))},Xe.prototype.slice=function(l,f){l=Fe(l);var g=this;return g.__filtered__&&(l>0||f<0)?new Xe(g):(l<0?g=g.takeRight(-l):l&&(g=g.drop(l)),f!==r&&(f=Fe(f),g=f<0?g.dropRight(-f):g.take(f-l)),g)},Xe.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Xe.prototype.toArray=function(){return this.take(W)},An(Xe.prototype,function(l,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),R=/^(?:head|last)$/.test(f),M=V[R?"take"+(f=="last"?"Right":""):f],H=R||/^find/.test(f);M&&(V.prototype[f]=function(){var J=this.__wrapped__,ie=R?[1]:arguments,ae=J instanceof Xe,he=ie[0],ve=ae||Be(J),be=function(Ue){var Ze=M.apply(V,gi([Ue],ie));return R&&Ee?Ze[0]:Ze};ve&&g&&typeof he=="function"&&he.length!=1&&(ae=ve=!1);var Ee=this.__chain__,Ne=!!this.__actions__.length,Me=H&&!Ee,$e=ae&&!Ne;if(!H&&ve){J=$e?J:new Xe(this);var Ae=l.apply(J,ie);return Ae.__actions__.push({func:oc,args:[be],thisArg:r}),new tn(Ae,Ee)}return Me&&$e?l.apply(this,ie):(Ae=this.thru(be),Me?R?Ae.value()[0]:Ae.value():Ae)})}),Qr(["pop","push","shift","sort","splice","unshift"],function(l){var f=Pl[l],g=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",R=/^(?:pop|shift)$/.test(l);V.prototype[l]=function(){var M=arguments;if(R&&!this.__chain__){var H=this.value();return f.apply(Be(H)?H:[],M)}return this[g](function(J){return f.apply(Be(J)?J:[],M)})}}),An(Xe.prototype,function(l,f){var g=V[f];if(g){var R=g.name+"";dt.call(Po,R)||(Po[R]=[]),Po[R].push({name:f,func:g})}}),Po[Jl(r,w).name]=[{name:"wrapper",func:r}],Xe.prototype.clone=z3,Xe.prototype.reverse=B3,Xe.prototype.value=F3,V.prototype.at=g6,V.prototype.chain=m6,V.prototype.commit=b6,V.prototype.next=y6,V.prototype.plant=w6,V.prototype.reverse=_6,V.prototype.toJSON=V.prototype.valueOf=V.prototype.value=E6,V.prototype.first=V.prototype.head,ka&&(V.prototype[ka]=x6),V}),Ro=b3();Hi?((Hi.exports=Ro)._=Ro,df._=Ro):rr._=Ro}).call(Uie)})(_s,_s.exports)),_s.exports}var ll=Gie();function Kie(){const e=Je.useAppDispatch(),t=Je.useAppSelector(Je.selectRoles),r=Je.useAppSelector(Je.selectPrivileges),n=Je.useAppSelector(Je.selectRolesFlags),i=Je.useAppSelector(Je.selectRolesAndPrivileges,(x,b)=>ll.isEqual(x,b)),o=Je.useAppSelector(Je.selectCatalog),a=Je.useAppSelector(Je.selectQodly),s=Je.useAppSelector(Je.selectSelectedTab),c=Je.useAppSelector(Je.selectForceLogin),u=Je.useAppSelector(Je.selectRestrictedByDefault),d=Je.useAppSelector(Je.selectGuestPrivilege),p=Je.useAppSelector(Je.selectCatalogMethods),v=Je.useAppSelector(Je.selectDataclasses),h=Je.useAppSelector(Je.selectSingletons);return{getRoles:()=>t,getPrivileges:()=>r,getRolesFlags:()=>n,getRolesAndPrivileges:()=>i,getCatalog:()=>o,getQodly:()=>a,getSelectedTab:()=>s,getForceLogin:()=>c??!1,getRestrictedByDefault:()=>u??!1,getGuestPrivilege:()=>d??null,getCatalogMethods:()=>p,getDataclasses:()=>v,getSingletons:()=>h,actions:{updateRoles:x=>{e(Je.updateRoles(x))},updatePrivileges:x=>{e(Je.updatePrivileges(x))},setRolesContent:x=>{e(Je.setRolesContent(x))},toggleTab:x=>{e(Je.toggleTab(x))},toggleForceLogin:x=>{e(Je.toggleForceLogin(x))},toggleRestrictedByDefault:x=>{e(Je.toggleRestrictedByDefault(x))},setTabFlags:(x,b)=>{e(Je.setTabFlags({path:x,flags:b}))},openModal:async x=>await e(Je.openModal(x)).unwrap()}}}const wB=C.createContext(null),_B=({children:e,adapter:t})=>O.jsx(wB.Provider,{value:t,children:e});function fr(){const e=C.useContext(wB);if(!e)throw new Error("useEditorStateAdapter must be used within an EditorStateAdapterProvider");return e}var Dw=function(e,t){return Dw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Dw(e,t)};function cl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Dw(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function jw(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function qw(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function Lw(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function Hn(e){return typeof e=="function"}function EB(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var my=EB(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
87
- `+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
88
- `):"",this.name="UnsubscriptionError",this.errors=r}});function zw(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Rd=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=jw(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(b){t={error:b}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else a.remove(this);var d=this.initialTeardown;if(Hn(d))try{d()}catch(b){o=b instanceof my?b.errors:[b]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var v=jw(p),h=v.next();!h.done;h=v.next()){var x=h.value;try{bM(x)}catch(b){o=o??[],b instanceof my?o=Lw(Lw([],qw(o)),qw(b.errors)):o.push(b)}}}catch(b){n={error:b}}finally{try{h&&!h.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}}if(o)throw new my(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)bM(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&zw(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&zw(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),SB=Rd.EMPTY;function OB(e){return e instanceof Rd||e&&"closed"in e&&Hn(e.remove)&&Hn(e.add)&&Hn(e.unsubscribe)}function bM(e){Hn(e)?e():e.unsubscribe()}var Yie={Promise:void 0},Xie={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,Lw([e,t],qw(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Zie(e){Xie.setTimeout(function(){throw e})}function yM(){}function cu(e){e()}var k_=(function(e){cl(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,OB(r)&&r.add(n)):n.destination=eoe,n}return t.create=function(r,n,i){return new Bw(r,n,i)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Rd),Jie=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){Bc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Bc(n)}else Bc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Bc(r)}},e})(),Bw=(function(e){cl(t,e);function t(r,n,i){var o=e.call(this)||this,a;return Hn(r)||!r?a={next:r??void 0,error:n??void 0,complete:i??void 0}:a=r,o.destination=new Jie(a),o}return t})(k_);function Bc(e){Zie(e)}function Qie(e){throw e}var eoe={closed:!0,next:yM,error:Qie,complete:yM},toe=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function roe(e){return e}function noe(e){return e.length===0?roe:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}var xM=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var i=this,o=ooe(t)?t:new Bw(t,r,n);return cu(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=wM(r),new r(function(i,o){var a=new Bw({next:function(s){try{t(s)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});n.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[toe]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return noe(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=wM(t),new t(function(n,i){var o;r.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},e.create=function(t){return new e(t)},e})();function wM(e){var t;return(t=e??Yie.Promise)!==null&&t!==void 0?t:Promise}function ioe(e){return e&&Hn(e.next)&&Hn(e.error)&&Hn(e.complete)}function ooe(e){return e&&e instanceof k_||ioe(e)&&OB(e)}function aoe(e){return Hn(e==null?void 0:e.lift)}function soe(e){return function(t){if(aoe(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function loe(e,t,r,n,i){return new coe(e,t,r,n,i)}var coe=(function(e){cl(t,e);function t(r,n,i,o,a,s){var c=e.call(this,r)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=n?function(u){try{n(u)}catch(d){r.error(d)}}:e.prototype._next,c._error=o?function(u){try{o(u)}catch(d){r.error(d)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(u){r.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(k_),uoe=EB(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),CB=(function(e){cl(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new _M(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new uoe},t.prototype.next=function(r){var n=this;cu(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=jw(n.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(r)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;cu(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;cu(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?SB:(this.currentObservers=null,s.push(r),new Rd(function(){n.currentObservers=null,zw(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new xM;return r.source=this,r},t.create=function(r,n){return new _M(r,n)},t})(xM),_M=(function(e){cl(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:SB},t})(CB);function doe(e,t){return soe(function(r,n){var i=0;r.subscribe(loe(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}var by={},ts={},Fc={},EM;function IB(){if(EM)return Fc;EM=1,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.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 Fc}var Ho={},rs={},ns={},SM;function foe(){if(SM)return ns;SM=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.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 ns.default=e,ns}var OM;function Nd(){if(OM)return rs;OM=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var e=t(foe());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 rs.default=n,rs}var CM;function Td(){if(CM)return Ho;CM=1,Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.default=void 0,Ho.unsafeStringify=n;var e=t(Nd());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,s=0){return r[a[s+0]]+r[a[s+1]]+r[a[s+2]]+r[a[s+3]]+"-"+r[a[s+4]]+r[a[s+5]]+"-"+r[a[s+6]]+r[a[s+7]]+"-"+r[a[s+8]]+r[a[s+9]]+"-"+r[a[s+10]]+r[a[s+11]]+r[a[s+12]]+r[a[s+13]]+r[a[s+14]]+r[a[s+15]]}function i(a,s=0){const c=n(a,s);if(!(0,e.default)(c))throw TypeError("Stringified UUID is invalid");return c}var o=i;return Ho.default=o,Ho}var IM;function poe(){if(IM)return ts;IM=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;var e=r(IB()),t=Td();function r(u){return u&&u.__esModule?u:{default:u}}let n,i,o=0,a=0;function s(u,d,p){let v=d&&p||0;const h=d||new Array(16);u=u||{};let x=u.node||n,b=u.clockseq!==void 0?u.clockseq:i;if(x==null||b==null){const E=u.random||(u.rng||e.default)();x==null&&(x=n=[E[0]|1,E[1],E[2],E[3],E[4],E[5]]),b==null&&(b=i=(E[6]<<8|E[7])&16383)}let m=u.msecs!==void 0?u.msecs:Date.now(),w=u.nsecs!==void 0?u.nsecs:a+1;const y=m-o+(w-a)/1e4;if(y<0&&u.clockseq===void 0&&(b=b+1&16383),(y<0||m>o)&&u.nsecs===void 0&&(w=0),w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=m,a=w,i=b,m+=122192928e5;const _=((m&268435455)*1e4+w)%4294967296;h[v++]=_>>>24&255,h[v++]=_>>>16&255,h[v++]=_>>>8&255,h[v++]=_&255;const S=m/4294967296*1e4&268435455;h[v++]=S>>>8&255,h[v++]=S&255,h[v++]=S>>>24&15|16,h[v++]=S>>>16&255,h[v++]=b>>>8|128,h[v++]=b&255;for(let E=0;E<6;++E)h[v+E]=x[E];return d||(0,t.unsafeStringify)(h)}var c=s;return ts.default=c,ts}var is={},Ni={},os={},RM;function RB(){if(RM)return os;RM=1,Object.defineProperty(os,"__esModule",{value:!0}),os.default=void 0;var e=t(Nd());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 os.default=n,os}var NM;function NB(){if(NM)return Ni;NM=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.URL=Ni.DNS=void 0,Ni.default=a;var e=Td(),t=r(RB());function r(s){return s&&s.__esModule?s:{default:s}}function n(s){s=unescape(encodeURIComponent(s));const c=[];for(let u=0;u<s.length;++u)c.push(s.charCodeAt(u));return c}const i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Ni.DNS=i;const o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Ni.URL=o;function a(s,c,u){function d(p,v,h,x){var b;if(typeof p=="string"&&(p=n(p)),typeof v=="string"&&(v=(0,t.default)(v)),((b=v)===null||b===void 0?void 0:b.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let m=new Uint8Array(16+p.length);if(m.set(v),m.set(p,v.length),m=u(m),m[6]=m[6]&15|c,m[8]=m[8]&63|128,h){x=x||0;for(let w=0;w<16;++w)h[x+w]=m[w];return h}return(0,e.unsafeStringify)(m)}try{d.name=s}catch{}return d.DNS=i,d.URL=o,d}return Ni}var as={},TM;function hoe(){if(TM)return as;TM=1,Object.defineProperty(as,"__esModule",{value:!0}),as.default=void 0;function e(h){if(typeof h=="string"){const x=unescape(encodeURIComponent(h));h=new Uint8Array(x.length);for(let b=0;b<x.length;++b)h[b]=x.charCodeAt(b)}return t(n(i(h),h.length*8))}function t(h){const x=[],b=h.length*32,m="0123456789abcdef";for(let w=0;w<b;w+=8){const y=h[w>>5]>>>w%32&255,_=parseInt(m.charAt(y>>>4&15)+m.charAt(y&15),16);x.push(_)}return x}function r(h){return(h+64>>>9<<4)+14+1}function n(h,x){h[x>>5]|=128<<x%32,h[r(x)-1]=x;let b=1732584193,m=-271733879,w=-1732584194,y=271733878;for(let _=0;_<h.length;_+=16){const S=b,E=m,I=w,N=y;b=c(b,m,w,y,h[_],7,-680876936),y=c(y,b,m,w,h[_+1],12,-389564586),w=c(w,y,b,m,h[_+2],17,606105819),m=c(m,w,y,b,h[_+3],22,-1044525330),b=c(b,m,w,y,h[_+4],7,-176418897),y=c(y,b,m,w,h[_+5],12,1200080426),w=c(w,y,b,m,h[_+6],17,-1473231341),m=c(m,w,y,b,h[_+7],22,-45705983),b=c(b,m,w,y,h[_+8],7,1770035416),y=c(y,b,m,w,h[_+9],12,-1958414417),w=c(w,y,b,m,h[_+10],17,-42063),m=c(m,w,y,b,h[_+11],22,-1990404162),b=c(b,m,w,y,h[_+12],7,1804603682),y=c(y,b,m,w,h[_+13],12,-40341101),w=c(w,y,b,m,h[_+14],17,-1502002290),m=c(m,w,y,b,h[_+15],22,1236535329),b=u(b,m,w,y,h[_+1],5,-165796510),y=u(y,b,m,w,h[_+6],9,-1069501632),w=u(w,y,b,m,h[_+11],14,643717713),m=u(m,w,y,b,h[_],20,-373897302),b=u(b,m,w,y,h[_+5],5,-701558691),y=u(y,b,m,w,h[_+10],9,38016083),w=u(w,y,b,m,h[_+15],14,-660478335),m=u(m,w,y,b,h[_+4],20,-405537848),b=u(b,m,w,y,h[_+9],5,568446438),y=u(y,b,m,w,h[_+14],9,-1019803690),w=u(w,y,b,m,h[_+3],14,-187363961),m=u(m,w,y,b,h[_+8],20,1163531501),b=u(b,m,w,y,h[_+13],5,-1444681467),y=u(y,b,m,w,h[_+2],9,-51403784),w=u(w,y,b,m,h[_+7],14,1735328473),m=u(m,w,y,b,h[_+12],20,-1926607734),b=d(b,m,w,y,h[_+5],4,-378558),y=d(y,b,m,w,h[_+8],11,-2022574463),w=d(w,y,b,m,h[_+11],16,1839030562),m=d(m,w,y,b,h[_+14],23,-35309556),b=d(b,m,w,y,h[_+1],4,-1530992060),y=d(y,b,m,w,h[_+4],11,1272893353),w=d(w,y,b,m,h[_+7],16,-155497632),m=d(m,w,y,b,h[_+10],23,-1094730640),b=d(b,m,w,y,h[_+13],4,681279174),y=d(y,b,m,w,h[_],11,-358537222),w=d(w,y,b,m,h[_+3],16,-722521979),m=d(m,w,y,b,h[_+6],23,76029189),b=d(b,m,w,y,h[_+9],4,-640364487),y=d(y,b,m,w,h[_+12],11,-421815835),w=d(w,y,b,m,h[_+15],16,530742520),m=d(m,w,y,b,h[_+2],23,-995338651),b=p(b,m,w,y,h[_],6,-198630844),y=p(y,b,m,w,h[_+7],10,1126891415),w=p(w,y,b,m,h[_+14],15,-1416354905),m=p(m,w,y,b,h[_+5],21,-57434055),b=p(b,m,w,y,h[_+12],6,1700485571),y=p(y,b,m,w,h[_+3],10,-1894986606),w=p(w,y,b,m,h[_+10],15,-1051523),m=p(m,w,y,b,h[_+1],21,-2054922799),b=p(b,m,w,y,h[_+8],6,1873313359),y=p(y,b,m,w,h[_+15],10,-30611744),w=p(w,y,b,m,h[_+6],15,-1560198380),m=p(m,w,y,b,h[_+13],21,1309151649),b=p(b,m,w,y,h[_+4],6,-145523070),y=p(y,b,m,w,h[_+11],10,-1120210379),w=p(w,y,b,m,h[_+2],15,718787259),m=p(m,w,y,b,h[_+9],21,-343485551),b=o(b,S),m=o(m,E),w=o(w,I),y=o(y,N)}return[b,m,w,y]}function i(h){if(h.length===0)return[];const x=h.length*8,b=new Uint32Array(r(x));for(let m=0;m<x;m+=8)b[m>>5]|=(h[m/8]&255)<<m%32;return b}function o(h,x){const b=(h&65535)+(x&65535);return(h>>16)+(x>>16)+(b>>16)<<16|b&65535}function a(h,x){return h<<x|h>>>32-x}function s(h,x,b,m,w,y){return o(a(o(o(x,h),o(m,y)),w),b)}function c(h,x,b,m,w,y,_){return s(x&b|~x&m,h,x,w,y,_)}function u(h,x,b,m,w,y,_){return s(x&m|b&~m,h,x,w,y,_)}function d(h,x,b,m,w,y,_){return s(x^b^m,h,x,w,y,_)}function p(h,x,b,m,w,y,_){return s(b^(x|~m),h,x,w,y,_)}var v=e;return as.default=v,as}var PM;function voe(){if(PM)return is;PM=1,Object.defineProperty(is,"__esModule",{value:!0}),is.default=void 0;var e=r(NB()),t=r(hoe());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return is.default=i,is}var ss={},ls={},kM;function goe(){if(kM)return ls;kM=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return ls.default=t,ls}var MM;function moe(){if(MM)return ss;MM=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=void 0;var e=n(goe()),t=n(IB()),r=Td();function n(a){return a&&a.__esModule?a:{default:a}}function i(a,s,c){if(e.default.randomUUID&&!s&&!a)return e.default.randomUUID();a=a||{};const u=a.random||(a.rng||t.default)();if(u[6]=u[6]&15|64,u[8]=u[8]&63|128,s){c=c||0;for(let d=0;d<16;++d)s[c+d]=u[d];return s}return(0,r.unsafeStringify)(u)}var o=i;return ss.default=o,ss}var cs={},us={},AM;function boe(){if(AM)return us;AM=1,Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;function e(i,o,a,s){switch(i){case 0:return o&a^~o&s;case 1:return o^a^s;case 2:return o&a^o&s^a&s;case 3:return o^a^s}}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 d=unescape(encodeURIComponent(i));i=[];for(let p=0;p<d.length;++p)i.push(d.charCodeAt(p))}else Array.isArray(i)||(i=Array.prototype.slice.call(i));i.push(128);const s=i.length/4+2,c=Math.ceil(s/16),u=new Array(c);for(let d=0;d<c;++d){const p=new Uint32Array(16);for(let v=0;v<16;++v)p[v]=i[d*64+v*4]<<24|i[d*64+v*4+1]<<16|i[d*64+v*4+2]<<8|i[d*64+v*4+3];u[d]=p}u[c-1][14]=(i.length-1)*8/Math.pow(2,32),u[c-1][14]=Math.floor(u[c-1][14]),u[c-1][15]=(i.length-1)*8&4294967295;for(let d=0;d<c;++d){const p=new Uint32Array(80);for(let w=0;w<16;++w)p[w]=u[d][w];for(let w=16;w<80;++w)p[w]=t(p[w-3]^p[w-8]^p[w-14]^p[w-16],1);let v=a[0],h=a[1],x=a[2],b=a[3],m=a[4];for(let w=0;w<80;++w){const y=Math.floor(w/20),_=t(v,5)+e(y,h,x,b)+m+o[y]+p[w]>>>0;m=b,b=x,x=t(h,30)>>>0,h=v,v=_}a[0]=a[0]+v>>>0,a[1]=a[1]+h>>>0,a[2]=a[2]+x>>>0,a[3]=a[3]+b>>>0,a[4]=a[4]+m>>>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 us.default=n,us}var DM;function yoe(){if(DM)return cs;DM=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0;var e=r(NB()),t=r(boe());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return cs.default=i,cs}var ds={},jM;function xoe(){if(jM)return ds;jM=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=void 0;var e="00000000-0000-0000-0000-000000000000";return ds.default=e,ds}var fs={},qM;function woe(){if(qM)return fs;qM=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=void 0;var e=t(Nd());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 fs.default=n,fs}var LM;function _oe(){return LM||(LM=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 u.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 s.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return a.default}});var t=d(poe()),r=d(voe()),n=d(moe()),i=d(yoe()),o=d(xoe()),a=d(woe()),s=d(Nd()),c=d(Td()),u=d(RB());function d(p){return p&&p.__esModule?p:{default:p}}})(by)),by}var yy,zM;function Eoe(){if(zM)return yy;zM=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,s=this.dstAlphabet.length,c=t.length,u=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>=s?(o[i++]=parseInt(n/s,10),n=n%s):i>0&&(o[i++]=0);c=i,u=this.dstAlphabet.slice(n,n+1).concat(u)}while(i!==0);return u},e.prototype.isValid=function(t){for(var r=0;r<t.length;++r)if(this.srcAlphabet.indexOf(t[r])===-1)return!1;return!0},yy=e,yy}var xy,BM;function Soe(){if(BM)return xy;BM=1;var e=Eoe();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",xy=t,xy}var wy,FM;function Ooe(){if(FM)return wy;FM=1;const{v4:e,validate:t}=_oe(),r=Soe(),n={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},i={consistentLength:!0};let o;const a=(u,d,p)=>{const v=d(u.toLowerCase().replace(/-/g,""));return!p||!p.consistentLength?v:v.padStart(p.shortIdLength,p.paddingChar)},s=(u,d)=>{const v=d(u).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[v[1],v[2],v[3],v[4],v[5]].join("-")},c=u=>Math.ceil(Math.log(2**128)/Math.log(u));return wy=(()=>{const u=(d,p)=>{const v=d||n.flickrBase58,h={...i,...p};if([...new Set(Array.from(v))].length!==v.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const x=c(v.length),b={shortIdLength:x,consistentLength:h.consistentLength,paddingChar:v[0]},m=r(r.HEX,v),w=r(v,r.HEX),y=()=>a(e(),m,b),S={alphabet:v,fromUUID:E=>a(E,m,b),maxLength:x,generate:y,new:y,toUUID:E=>s(E,w),uuid:e,validate:(E,I=!1)=>{if(!E||typeof E!="string")return!1;const N=h.consistentLength?E.length===x:E.length<=x,T=E.split("").every(k=>v.includes(k));return I===!1?N&&T:N&&T&&t(s(E,w))}};return Object.freeze(S),S};return u.constants=n,u.uuid=e,u.generate=()=>(o||(o=u(n.flickrBase58).generate),o()),u})(),wy}var TB=Ooe();const PB=new CB;function Coe(e,t){switch(t.type){case"UPDATE_ROLES":return{...e,roles:t.payload,flags:{...e.flags,touched:!0}};case"UPDATE_PRIVILEGES":return{...e,privileges:t.payload,flags:{...e.flags,touched:!0}};case"SET_ROLES_CONTENT":{const{content:r,flags:n={},...i}=t.payload,o=fe.sanitizeRoles(r),a={...e.flags,...n};return{...e,...o,...i,flags:a}}case"TOGGLE_TAB":return{...e,selectedTab:t.payload};case"TOGGLE_FORCE_LOGIN":return e.forceLogin===t.payload?e:{...e,forceLogin:t.payload,flags:{...e.flags,touched:!0}};case"TOGGLE_RESTRICTED_BY_DEFAULT":return e.restrictedByDefault===t.payload?e:{...e,restrictedByDefault:t.payload,flags:{...e.flags,touched:!0}};case"SET_FLAGS":return{...e,flags:{...e.flags,...t.payload}};case"CREATE_MODAL":return{...e,modals:{...e.modals,list:[...e.modals.list,t.payload]}};case"REMOVE_MODAL":return{...e,modals:{...e.modals,list:e.modals.list.filter(r=>r.id!==t.payload)}};case"CLOSE_MODAL":{const{id:r,reason:n}=t.payload;let i;if(n)if(e.modals.list.find(a=>a.id===r))i={...e,modals:{...e.modals,list:e.modals.list.map(a=>a.id===r?{...a,closeReason:n,isOpen:!1}:a)}};else return e;else i={...e,modals:{...e.modals,list:e.modals.list.filter(o=>o.id!==r)}};return PB.next(i.modals),i}case"EDIT_MODAL":{const{id:r,...n}=t.payload;return e.modals.list.find(o=>o.id===r)?{...e,modals:{...e.modals,list:e.modals.list.map(o=>o.id===r?{...o,...n}:o)}}:e}default:return e}}const M_=C.createContext(null),Ioe=()=>({roles:{},privileges:{},flags:{touched:!1},date:void 0,selectedTab:"roles",forceLogin:!1,restrictedByDefault:!1,modals:{list:[]}}),Roe=({children:e,catalog:t=null,qodly:r=!1,catalogMethods:n=[],dataclasses:i={},singletons:o={},onSetTabFlags:a,initialState:s})=>{const[c,u]=C.useReducer(Coe,{...Ioe(),...s}),d=C.useMemo(()=>({catalog:t,qodly:r,catalogMethods:n,dataclasses:i,singletons:o,onSetTabFlags:a}),[t,r,n,i,o,a]);return O.jsx(M_.Provider,{value:{state:c,dispatch:u,external:d},children:e})};function Noe(){const e=C.useContext(M_);if(!e)throw new Error("useReducerAdapter must be used within a ReducerAdapterProvider");const{state:t,dispatch:r,external:n}=e,i=C.useMemo(()=>fe.rolesToAPI({roles:t.roles,privileges:t.privileges,forceLogin:t.forceLogin,restrictedByDefault:t.restrictedByDefault}),[t.roles,t.privileges,t.forceLogin,t.restrictedByDefault]);return{getRoles:C.useCallback(()=>t.roles,[t.roles]),getPrivileges:C.useCallback(()=>t.privileges,[t.privileges]),getRolesFlags:C.useCallback(()=>t.flags,[t.flags]),getRolesAndPrivileges:C.useCallback(()=>i,[i]),getCatalog:C.useCallback(()=>n.catalog??null,[n.catalog]),getQodly:C.useCallback(()=>n.qodly??!1,[n.qodly]),getSelectedTab:C.useCallback(()=>t.selectedTab,[t.selectedTab]),getForceLogin:C.useCallback(()=>t.forceLogin??!1,[t.forceLogin]),getRestrictedByDefault:C.useCallback(()=>t.restrictedByDefault??!1,[t.restrictedByDefault]),getGuestPrivilege:C.useCallback(()=>Object.values(t.privileges).find(({privilege:o})=>o==="guest")??null,[t.privileges]),getCatalogMethods:C.useCallback(()=>n.catalogMethods??[],[n.catalogMethods]),getDataclasses:C.useCallback(()=>n.dataclasses??{},[n.dataclasses]),getSingletons:C.useCallback(()=>n.singletons??{},[n.singletons]),actions:{updateRoles:C.useCallback(o=>{r({type:"UPDATE_ROLES",payload:o})},[]),updatePrivileges:C.useCallback(o=>{r({type:"UPDATE_PRIVILEGES",payload:o})},[]),setRolesContent:C.useCallback(o=>{r({type:"SET_ROLES_CONTENT",payload:o})},[]),toggleTab:C.useCallback(o=>{r({type:"TOGGLE_TAB",payload:o})},[]),toggleForceLogin:C.useCallback(o=>{r({type:"TOGGLE_FORCE_LOGIN",payload:o})},[]),toggleRestrictedByDefault:C.useCallback(o=>{r({type:"TOGGLE_RESTRICTED_BY_DEFAULT",payload:o})},[]),setTabFlags:C.useCallback((o,a)=>{n.onSetTabFlags&&n.onSetTabFlags(o,a)},[n.onSetTabFlags]),openModal:C.useCallback(async o=>{const{type:a=fe.ModalType.ALERT}=o,s=TB.generate();return r({type:"CREATE_MODAL",payload:{id:s,type:a,isOpen:!0,...o}}),a===fe.ModalType.CONFIRM?new Promise(c=>{const u=PB.pipe(doe(d=>{const p=d.list.find(v=>v.id===s);return p!==void 0&&!p.isOpen})).subscribe(d=>{var v;const p=d.list.find(h=>h.id===s);if(p){const h=p.closeReason===fe.ModalCloseReason.CONFIRMED,x=ll.entries(((v=p.views)==null?void 0:v.toggles)||{}).reduce((b,m)=>({...b,[m[0]]:m[1].value}),{});r({type:"REMOVE_MODAL",payload:s}),u.unsubscribe(),c({confirmed:h,options:x})}})}):{confirmed:!1}},[r])}}}function Toe(){const e=C.useContext(M_);if(!e)throw new Error("useModals must be used within a ReducerAdapterProvider");const{state:t,dispatch:r}=e;return{modals:t.modals.list,closeModal:C.useCallback(n=>{r({type:"CLOSE_MODAL",payload:n})},[r]),editModal:C.useCallback(n=>{r({type:"EDIT_MODAL",payload:n})},[r]),removeModal:C.useCallback(n=>{r({type:"REMOVE_MODAL",payload:n})},[r])}}const _y=({child:e,parent:t,status:r,onSelect:n,currentPrivilegeId:i})=>{const o=fr(),a=o.getPrivileges();function s(){const u=fe.addPrivilegeIn(t.id,e.id,a);o.actions.updatePrivileges(u)}function c(){const u=fe.removePrivilegeFrom(t.id,e.id,a);o.actions.updatePrivileges(u)}return O.jsxs(Zc,{color:r==="included"?"primary":"dark",onClick:r==="included"?c:s,disabled:r==="disabled",children:[e.privilege,O.jsx(_e.FdPlus,{className:Kr("transform transition-transform",{"rotate-45":r==="included"})})]})},Poe=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:i})=>{const o=Object.values(t),a=fe.getPrivilegeById(e.id,t);let s=a?fe.populateShallow(a.includes,t):[],c=a?fe.populateShallow(fe.parents(a.id,t),t):[],u=a?fe.populateShallow(fe.allowed(a.id,t),t):[];return[s,c,u]=[s,c,u].map(d=>d.filter(p=>(p==null?void 0:p.privilege)!=="guest")),o.length<2&&s.length+c.length+u.length===0?null:O.jsxs(ur,{depth:1,className:"w-full border-b p-4",children:[O.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[" ",o.length>2?O.jsx("h4",{className:"text-[13px] font-semibold",children:"Include a privilege"}):O.jsx("div",{}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(wu,{onChange:()=>n(!i),checked:i}),O.jsx("label",{className:"text-xs",children:" Show inherited permissions"})]})]}),O.jsxs("div",{className:"flex flex-wrap items-start justify-start gap-1",children:[s.map(d=>O.jsx(_y,{child:d,parent:e,status:"included",onSelect:r,currentPrivilegeId:d.id},d.id)),u.map(d=>O.jsx(_y,{child:d,parent:e,status:"available",onSelect:r,currentPrivilegeId:d.id},d.id)),c.map(d=>O.jsx(_y,{child:d,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:d.id},d.id))]})]})},koe=({item:e,depth:t})=>{const r=fr(),[n,i]=C.useState(!1),o=r.getPrivileges(),a=fe.populateShallow(e.includes,o);return O.jsxs("div",{className:"py-1 text-xs text-white",children:[O.jsxs("div",{className:"flex items-center",children:[O.jsx("button",{className:"-ml-1",onClick:s=>{s.stopPropagation(),i(!n)},children:O.jsx(_e.FdRight,{className:Kr("h-4 w-4",{"tranform rotate-90":n})})})," ",O.jsx("div",{children:e.privilege})]}),O.jsx("div",{className:"border-l pl-2",style:{marginLeft:t?t*4:3},children:n&&O.jsx(kB,{depth:t+1,data:a})})]})},kB=({data:e,depth:t=0})=>e.map(r=>r.includes.length?O.jsx(koe,{item:r,depth:t},r.id):O.jsx("div",{className:Kr("py-1 text-xs",{}),children:r.privilege},r.id)),xr=()=>document.querySelector(`.${x2.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,Pd=({container:e,...t})=>O.jsx(fe.Portal,{...t,container:e||xr()}),$M=({privilege:e,selectedPrivilege:t,onSelect:r,isGuest:n=!1})=>{const i=fr(),o=i.getPrivileges(),a=fe.populateShallow(e.includes,o),[s,c]=C.useState(!1),[u,d]=C.useState(e.privilege),[p,v]=C.useState(null),h=fe.useOutsideClick(()=>{s&&m()});fe.useDidMountEffect(()=>{e.privilege!==u&&d(e.privilege)},[e.privilege]);function x(){c(!0),v(null)}function b(){c(!1),d(e.privilege)}function m(){v(null);try{fe.validateName(u);const _=fe.renamePrivilege(u,e.id,o);i.actions.updatePrivileges(_),c(!1)}catch(_){v(_.message)}}const w=async _=>{_.stopPropagation();const{confirmed:S}=await i.actions.openModal({title:"Delete Privilege",type:fe.ModalType.CONFIRM,color:fe.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(S){const E=fe.removePrivilege(e.id,o);if((t==null?void 0:t.id)!==e.id){i.actions.updatePrivileges(E);return}const I=Object.keys(E).filter(N=>E[N].privilege!=="guest");if(I.length===0)r(null);else{const N=Object.keys(o).filter(B=>o[B].privilege!=="guest"),T=N.indexOf(e.id),k=Math.max(0,T-1),L=N[k];T===0?r(E[I[0]]):E[L]?r(E[L]):r(E[I[0]])}i.actions.updatePrivileges(E)}},y=C.useMemo(()=>e.resources.some(_=>_.exists===!1),[e]);return O.jsxs(Gr,{container:xr(),color:"negative",icon:O.jsx(_e.FdBulb,{}),label:"This privilege uses non-existing resources",isHidden:!y,children:[O.jsxs(ur,{depth:4,borderType:(t==null?void 0:t.id)===e.id?"primary":(t==null?void 0:t.id)!==e.id?"light":"default",className:Kr("w-full rounded border p-2",{"border-red-400":y&&(t==null?void 0:t.id)!==e.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{r(e)},ref:h,children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{className:"flex flex-1 items-center",children:[O.jsx("span",{className:"mr-4",children:n?O.jsx(_e.FdGuest,{className:"h-6 w-6"}):O.jsx(_e.FdGroup,{className:"h-6 w-6"})}),s?O.jsxs(xt.Root,{color:p?"negative":"primary",className:"flex-1 mr-2",children:[O.jsx(xt.Group,{children:O.jsx(xt.Field,{autoFocus:!0,value:u,onChange:_=>d(_.target.value),onKeyDown:_=>{_.key==="Enter"&&m(),_.key==="Escape"&&b()},onBlur:b,type:"text"})}),p&&O.jsx(xt.Message,{children:p})]}):O.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:u})]}),n?O.jsx("div",{className:"flex items-center justify-center",children:O.jsx(Gr,{icon:O.jsx(_e.FdBulb,{}),label:O.jsx("div",{className:"max-w-xs flex-1 min-w-0 break-words whitespace-normal py-1",children:"Guest privileges are used to indicate resources accessible without any permission required (e.g. an authenticate function)"}),container:xr(),children:O.jsx(_e.FdInfoBold,{className:"h-4 w-4"})})}):O.jsx("div",{className:"flex items-center space-x-2",children:s?O.jsxs(O.Fragment,{children:[O.jsx(wr,{variant:"ghost",color:"white",onClick:b,children:O.jsx("span",{children:O.jsx(_e.FdClose,{className:"h-4 w-4"})})}),O.jsx(wr,{variant:"ghost",color:"white",onClick:m,children:O.jsx("span",{children:O.jsx(_e.FdCheckCircle,{className:"h-4 w-4"})})})]}):O.jsxs(O.Fragment,{children:[O.jsx(wr,{variant:"ghost",color:"white",onClick:x,children:O.jsx(_e.FdPen,{className:"h-4 w-4"})}),O.jsx(wr,{variant:"ghost",color:"white",onClick:w,children:O.jsx(_e.FdTrash,{className:"h-4 w-4"})})]})})]}),a.length?O.jsx("div",{className:"ml-[43px]",children:O.jsx(kB,{data:a})}):null]})," "]})},Moe=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=fr(),i=n.getGuestPrivilege(),o=n.getCatalog(),a=C.useMemo(()=>{if(o===null||!i)return i;const s=yB({guest:i},Object.values((o==null?void 0:o.dataClasses)??{}));return xB(s,o).guest},[e,o]);return O.jsxs("div",{className:"flex flex-1 flex-col gap-y-4 overflow-auto p-4 pb-10 pt-1",children:[a?O.jsx($M,{privilege:a,onSelect:t,selectedPrivilege:r,isGuest:!0}):null,Object.entries(e).length?Object.entries(e).filter(([,s])=>s.privilege!=="guest").sort(([,s],[,c])=>fe.localeCompare(s.privilege,c.privilege)).map(([s,c])=>O.jsx($M,{privilege:c,onSelect:t,selectedPrivilege:r},s)):O.jsx("div",{className:"flex h-full items-center justify-center",children:O.jsx("div",{className:"flex flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-inactive-text",children:[O.jsx(_e.FdInfoBold,{className:"h-10 w-10"}),O.jsx("div",{className:"font-semibold",children:"There are no privileges"}),O.jsxs("div",{className:"flex items-center text-sm",children:["Create a new Privilege by clicking on the"," ",O.jsx(_e.FdPlus,{className:"ml-2 inline h-4 w-4"})]})]})})})]})};var $c={exports:{}},Vc={exports:{}},ct={};/** @license React v16.13.1
89
- * react-is.production.min.js
90
- *
91
- * Copyright (c) Facebook, Inc. and its affiliates.
92
- *
93
- * This source code is licensed under the MIT license found in the
94
- * LICENSE file in the root directory of this source tree.
95
- */var VM;function Aoe(){if(VM)return ct;VM=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,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case c:case u:case n:case o:case i:case p:return E;default:switch(E=E&&E.$$typeof,E){case s:case d:case x:case h:case a:return E;default:return I}}case r:return I}}}function S(E){return _(E)===u}return ct.AsyncMode=c,ct.ConcurrentMode=u,ct.ContextConsumer=s,ct.ContextProvider=a,ct.Element=t,ct.ForwardRef=d,ct.Fragment=n,ct.Lazy=x,ct.Memo=h,ct.Portal=r,ct.Profiler=o,ct.StrictMode=i,ct.Suspense=p,ct.isAsyncMode=function(E){return S(E)||_(E)===c},ct.isConcurrentMode=S,ct.isContextConsumer=function(E){return _(E)===s},ct.isContextProvider=function(E){return _(E)===a},ct.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ct.isForwardRef=function(E){return _(E)===d},ct.isFragment=function(E){return _(E)===n},ct.isLazy=function(E){return _(E)===x},ct.isMemo=function(E){return _(E)===h},ct.isPortal=function(E){return _(E)===r},ct.isProfiler=function(E){return _(E)===o},ct.isStrictMode=function(E){return _(E)===i},ct.isSuspense=function(E){return _(E)===p},ct.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===u||E===o||E===i||E===p||E===v||typeof E=="object"&&E!==null&&(E.$$typeof===x||E.$$typeof===h||E.$$typeof===a||E.$$typeof===s||E.$$typeof===d||E.$$typeof===m||E.$$typeof===w||E.$$typeof===y||E.$$typeof===b)},ct.typeOf=_,ct}var ut={};/** @license React v16.13.1
96
- * react-is.development.js
97
- *
98
- * Copyright (c) Facebook, Inc. and its affiliates.
99
- *
100
- * This source code is licensed under the MIT license found in the
101
- * LICENSE file in the root directory of this source tree.
102
- */var HM;function Doe(){return HM||(HM=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,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(re){return typeof re=="string"||typeof re=="function"||re===n||re===u||re===o||re===i||re===p||re===v||typeof re=="object"&&re!==null&&(re.$$typeof===x||re.$$typeof===h||re.$$typeof===a||re.$$typeof===s||re.$$typeof===d||re.$$typeof===m||re.$$typeof===w||re.$$typeof===y||re.$$typeof===b)}function S(re){if(typeof re=="object"&&re!==null){var ge=re.$$typeof;switch(ge){case t:var ue=re.type;switch(ue){case c:case u:case n:case o:case i:case p:return ue;default:var xe=ue&&ue.$$typeof;switch(xe){case s:case d:case x:case h:case a:return xe;default:return ge}}case r:return ge}}}var E=c,I=u,N=s,T=a,k=t,L=d,B=n,A=x,z=h,P=r,K=o,$=i,Y=p,U=!1;function Z(re){return U||(U=!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.")),D(re)||S(re)===c}function D(re){return S(re)===u}function W(re){return S(re)===s}function Q(re){return S(re)===a}function ee(re){return typeof re=="object"&&re!==null&&re.$$typeof===t}function j(re){return S(re)===d}function F(re){return S(re)===n}function G(re){return S(re)===x}function q(re){return S(re)===h}function X(re){return S(re)===r}function te(re){return S(re)===o}function ne(re){return S(re)===i}function de(re){return S(re)===p}ut.AsyncMode=E,ut.ConcurrentMode=I,ut.ContextConsumer=N,ut.ContextProvider=T,ut.Element=k,ut.ForwardRef=L,ut.Fragment=B,ut.Lazy=A,ut.Memo=z,ut.Portal=P,ut.Profiler=K,ut.StrictMode=$,ut.Suspense=Y,ut.isAsyncMode=Z,ut.isConcurrentMode=D,ut.isContextConsumer=W,ut.isContextProvider=Q,ut.isElement=ee,ut.isForwardRef=j,ut.isFragment=F,ut.isLazy=G,ut.isMemo=q,ut.isPortal=X,ut.isProfiler=te,ut.isStrictMode=ne,ut.isSuspense=de,ut.isValidElementType=_,ut.typeOf=S})()),ut}var WM;function MB(){return WM||(WM=1,process.env.NODE_ENV==="production"?Vc.exports=Aoe():Vc.exports=Doe()),Vc.exports}/*
103
- object-assign
104
- (c) Sindre Sorhus
105
- @license MIT
106
- */var Ey,UM;function joe(){if(UM)return Ey;UM=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={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ey=i()?Object.assign:function(o,a){for(var s,c=n(o),u,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var p in s)t.call(s,p)&&(c[p]=s[p]);if(e){u=e(s);for(var v=0;v<u.length;v++)r.call(s,u[v])&&(c[u[v]]=s[u[v]])}}return c},Ey}var Sy,GM;function A_(){if(GM)return Sy;GM=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Sy=e,Sy}var Oy,KM;function AB(){return KM||(KM=1,Oy=Function.call.bind(Object.prototype.hasOwnProperty)),Oy}var Cy,YM;function qoe(){if(YM)return Cy;YM=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=A_(),r={},n=AB();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,c,u){if(process.env.NODE_ENV!=="production"){for(var d in o)if(n(o,d)){var p;try{if(typeof o[d]!="function"){var v=Error((c||"React class")+": "+s+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}p=o[d](a,d,c,s,null,t)}catch(x){p=x}if(p&&!(p instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in r)){r[p.message]=!0;var h=u?u():"";e("Failed "+s+" type: "+p.message+(h??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Cy=i,Cy}var Iy,XM;function Loe(){if(XM)return Iy;XM=1;var e=MB(),t=joe(),r=A_(),n=AB(),i=qoe(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return Iy=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function p(D){var W=D&&(u&&D[u]||D[d]);if(typeof W=="function")return W}var v="<<anonymous>>",h={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:y(),arrayOf:_,element:S(),elementType:E(),instanceOf:I,node:L(),objectOf:T,oneOf:N,oneOfType:k,shape:A,exact:z};function x(D,W){return D===W?D!==0||1/D===1/W:D!==D&&W!==W}function b(D,W){this.message=D,this.data=W&&typeof W=="object"?W:{},this.stack=""}b.prototype=Error.prototype;function m(D){if(process.env.NODE_ENV!=="production")var W={},Q=0;function ee(F,G,q,X,te,ne,de){if(X=X||v,ne=ne||q,de!==r){if(c){var re=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 re.name="Invariant Violation",re}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ge=X+":"+q;!W[ge]&&Q<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+X+"`. 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."),W[ge]=!0,Q++)}}return G[q]==null?F?G[q]===null?new b("The "+te+" `"+ne+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new b("The "+te+" `"+ne+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:D(G,q,X,te,ne)}var j=ee.bind(null,!1);return j.isRequired=ee.bind(null,!0),j}function w(D){function W(Q,ee,j,F,G,q){var X=Q[ee],te=$(X);if(te!==D){var ne=Y(X);return new b("Invalid "+F+" `"+G+"` of type "+("`"+ne+"` supplied to `"+j+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return m(W)}function y(){return m(a)}function _(D){function W(Q,ee,j,F,G){if(typeof D!="function")return new b("Property `"+G+"` of component `"+j+"` has invalid PropType notation inside arrayOf.");var q=Q[ee];if(!Array.isArray(q)){var X=$(q);return new b("Invalid "+F+" `"+G+"` of type "+("`"+X+"` supplied to `"+j+"`, expected an array."))}for(var te=0;te<q.length;te++){var ne=D(q,te,j,F,G+"["+te+"]",r);if(ne instanceof Error)return ne}return null}return m(W)}function S(){function D(W,Q,ee,j,F){var G=W[Q];if(!s(G)){var q=$(G);return new b("Invalid "+j+" `"+F+"` of type "+("`"+q+"` supplied to `"+ee+"`, expected a single ReactElement."))}return null}return m(D)}function E(){function D(W,Q,ee,j,F){var G=W[Q];if(!e.isValidElementType(G)){var q=$(G);return new b("Invalid "+j+" `"+F+"` of type "+("`"+q+"` supplied to `"+ee+"`, expected a single ReactElement type."))}return null}return m(D)}function I(D){function W(Q,ee,j,F,G){if(!(Q[ee]instanceof D)){var q=D.name||v,X=Z(Q[ee]);return new b("Invalid "+F+" `"+G+"` of type "+("`"+X+"` supplied to `"+j+"`, expected ")+("instance of `"+q+"`."))}return null}return m(W)}function N(D){if(!Array.isArray(D))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 W(Q,ee,j,F,G){for(var q=Q[ee],X=0;X<D.length;X++)if(x(q,D[X]))return null;var te=JSON.stringify(D,function(de,re){var ge=Y(re);return ge==="symbol"?String(re):re});return new b("Invalid "+F+" `"+G+"` of value `"+String(q)+"` "+("supplied to `"+j+"`, expected one of "+te+"."))}return m(W)}function T(D){function W(Q,ee,j,F,G){if(typeof D!="function")return new b("Property `"+G+"` of component `"+j+"` has invalid PropType notation inside objectOf.");var q=Q[ee],X=$(q);if(X!=="object")return new b("Invalid "+F+" `"+G+"` of type "+("`"+X+"` supplied to `"+j+"`, expected an object."));for(var te in q)if(n(q,te)){var ne=D(q,te,j,F,G+"."+te,r);if(ne instanceof Error)return ne}return null}return m(W)}function k(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var W=0;W<D.length;W++){var Q=D[W];if(typeof Q!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(Q)+" at index "+W+"."),a}function ee(j,F,G,q,X){for(var te=[],ne=0;ne<D.length;ne++){var de=D[ne],re=de(j,F,G,q,X,r);if(re==null)return null;re.data&&n(re.data,"expectedType")&&te.push(re.data.expectedType)}var ge=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new b("Invalid "+q+" `"+X+"` supplied to "+("`"+G+"`"+ge+"."))}return m(ee)}function L(){function D(W,Q,ee,j,F){return P(W[Q])?null:new b("Invalid "+j+" `"+F+"` supplied to "+("`"+ee+"`, expected a ReactNode."))}return m(D)}function B(D,W,Q,ee,j){return new b((D||"React class")+": "+W+" type `"+Q+"."+ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+j+"`.")}function A(D){function W(Q,ee,j,F,G){var q=Q[ee],X=$(q);if(X!=="object")return new b("Invalid "+F+" `"+G+"` of type `"+X+"` "+("supplied to `"+j+"`, expected `object`."));for(var te in D){var ne=D[te];if(typeof ne!="function")return B(j,F,G,te,Y(ne));var de=ne(q,te,j,F,G+"."+te,r);if(de)return de}return null}return m(W)}function z(D){function W(Q,ee,j,F,G){var q=Q[ee],X=$(q);if(X!=="object")return new b("Invalid "+F+" `"+G+"` of type `"+X+"` "+("supplied to `"+j+"`, expected `object`."));var te=t({},Q[ee],D);for(var ne in te){var de=D[ne];if(n(D,ne)&&typeof de!="function")return B(j,F,G,ne,Y(de));if(!de)return new b("Invalid "+F+" `"+G+"` key `"+ne+"` supplied to `"+j+"`.\nBad object: "+JSON.stringify(Q[ee],null," ")+`
107
- Valid keys: `+JSON.stringify(Object.keys(D),null," "));var re=de(q,ne,j,F,G+"."+ne,r);if(re)return re}return null}return m(W)}function P(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(P);if(D===null||s(D))return!0;var W=p(D);if(W){var Q=W.call(D),ee;if(W!==D.entries){for(;!(ee=Q.next()).done;)if(!P(ee.value))return!1}else for(;!(ee=Q.next()).done;){var j=ee.value;if(j&&!P(j[1]))return!1}}else return!1;return!0;default:return!1}}function K(D,W){return D==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function $(D){var W=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":K(W,D)?"symbol":W}function Y(D){if(typeof D>"u"||D===null)return""+D;var W=$(D);if(W==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return W}function U(D){var W=Y(D);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function Z(D){return!D.constructor||!D.constructor.name?v:D.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},Iy}var Ry,ZM;function zoe(){if(ZM)return Ry;ZM=1;var e=A_();function t(){}function r(){}return r.resetWarningCache=t,Ry=function(){function n(a,s,c,u,d,p){if(p!==e){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}}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},Ry}var JM;function Boe(){if(JM)return $c.exports;if(JM=1,process.env.NODE_ENV!=="production"){var e=MB(),t=!0;$c.exports=Loe()(e.isElement,t)}else $c.exports=zoe()();return $c.exports}var Foe=Boe();const ps=Li(Foe);var QM={},hs,eA;function Vt(){if(eA)return hs;eA=1;var e=function(t){return t&&t.Math===Math&&t};return hs=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof At=="object"&&At)||e(typeof hs=="object"&&hs)||(function(){return this})()||Function("return this")(),hs}var Ny={},Ty,tA;function wt(){return tA||(tA=1,Ty=function(e){try{return!!e()}catch{return!0}}),Ty}var Py,rA;function kn(){if(rA)return Py;rA=1;var e=wt();return Py=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Py}var ky,nA;function kd(){if(nA)return ky;nA=1;var e=wt();return ky=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),ky}var My,iA;function qr(){if(iA)return My;iA=1;var e=kd(),t=Function.prototype.call;return My=e?t.bind(t):function(){return t.apply(t,arguments)},My}var Ay={},oA;function DB(){if(oA)return Ay;oA=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Ay.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,Ay}var Dy,aA;function D_(){return aA||(aA=1,Dy=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),Dy}var jy,sA;function mt(){if(sA)return jy;sA=1;var e=kd(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return jy=e?n:function(i){return function(){return r.apply(i,arguments)}},jy}var qy,lA;function Bi(){if(lA)return qy;lA=1;var e=mt(),t=e({}.toString),r=e("".slice);return qy=function(n){return r(t(n),8,-1)},qy}var Ly,cA;function Md(){if(cA)return Ly;cA=1;var e=mt(),t=wt(),r=Bi(),n=Object,i=e("".split);return Ly=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,Ly}var zy,uA;function ul(){return uA||(uA=1,zy=function(e){return e==null}),zy}var By,dA;function bo(){if(dA)return By;dA=1;var e=ul(),t=TypeError;return By=function(r){if(e(r))throw new t("Can't call method on "+r);return r},By}var Fy,fA;function Oa(){if(fA)return Fy;fA=1;var e=Md(),t=bo();return Fy=function(r){return e(t(r))},Fy}var $y,pA;function Yt(){if(pA)return $y;pA=1;var e=typeof document=="object"&&document.all;return $y=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},$y}var Vy,hA;function ar(){if(hA)return Vy;hA=1;var e=Yt();return Vy=function(t){return typeof t=="object"?t!==null:e(t)},Vy}var Hy,vA;function Ad(){if(vA)return Hy;vA=1;var e=Vt(),t=Yt(),r=function(n){return t(n)?n:void 0};return Hy=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},Hy}var Wy,gA;function Dd(){if(gA)return Wy;gA=1;var e=mt();return Wy=e({}.isPrototypeOf),Wy}var Uy,mA;function jB(){if(mA)return Uy;mA=1;var e=Vt(),t=e.navigator,r=t&&t.userAgent;return Uy=r?String(r):"",Uy}var Gy,bA;function j_(){if(bA)return Gy;bA=1;var e=Vt(),t=jB(),r=e.process,n=e.Deno,i=r&&r.versions||n&&n.version,o=i&&i.v8,a,s;return o&&(a=o.split("."),s=a[0]>0&&a[0]<4?1:+(a[0]+a[1])),!s&&t&&(a=t.match(/Edge\/(\d+)/),(!a||a[1]>=74)&&(a=t.match(/Chrome\/(\d+)/),a&&(s=+a[1]))),Gy=s,Gy}var Ky,yA;function qB(){if(yA)return Ky;yA=1;var e=j_(),t=wt(),r=Vt(),n=r.String;return Ky=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Ky}var Yy,xA;function LB(){if(xA)return Yy;xA=1;var e=qB();return Yy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Yy}var Xy,wA;function zB(){if(wA)return Xy;wA=1;var e=Ad(),t=Yt(),r=Dd(),n=LB(),i=Object;return Xy=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},Xy}var Zy,_A;function q_(){if(_A)return Zy;_A=1;var e=String;return Zy=function(t){try{return e(t)}catch{return"Object"}},Zy}var Jy,EA;function dl(){if(EA)return Jy;EA=1;var e=Yt(),t=q_(),r=TypeError;return Jy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Jy}var Qy,SA;function fl(){if(SA)return Qy;SA=1;var e=dl(),t=ul();return Qy=function(r,n){var i=r[n];return t(i)?void 0:e(i)},Qy}var e0,OA;function $oe(){if(OA)return e0;OA=1;var e=qr(),t=Yt(),r=ar(),n=TypeError;return e0=function(i,o){var a,s;if(o==="string"&&t(a=i.toString)&&!r(s=e(a,i))||t(a=i.valueOf)&&!r(s=e(a,i))||o!=="string"&&t(a=i.toString)&&!r(s=e(a,i)))return s;throw new n("Can't convert object to primitive value")},e0}var t0={exports:{}},r0,CA;function jd(){return CA||(CA=1,r0=!1),r0}var n0,IA;function L_(){if(IA)return n0;IA=1;var e=Vt(),t=Object.defineProperty;return n0=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},n0}var RA;function z_(){if(RA)return t0.exports;RA=1;var e=jd(),t=Vt(),r=L_(),n="__core-js_shared__",i=t0.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.45.1",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"}),t0.exports}var i0,NA;function B_(){if(NA)return i0;NA=1;var e=z_();return i0=function(t,r){return e[t]||(e[t]=r||{})},i0}var o0,TA;function Ca(){if(TA)return o0;TA=1;var e=bo(),t=Object;return o0=function(r){return t(e(r))},o0}var a0,PA;function vn(){if(PA)return a0;PA=1;var e=mt(),t=Ca(),r=e({}.hasOwnProperty);return a0=Object.hasOwn||function(i,o){return r(t(i),o)},a0}var s0,kA;function F_(){if(kA)return s0;kA=1;var e=mt(),t=0,r=Math.random(),n=e(1.1.toString);return s0=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},s0}var l0,MA;function Or(){if(MA)return l0;MA=1;var e=Vt(),t=B_(),r=vn(),n=F_(),i=qB(),o=LB(),a=e.Symbol,s=t("wks"),c=o?a.for||a:a&&a.withoutSetter||n;return l0=function(u){return r(s,u)||(s[u]=i&&r(a,u)?a[u]:c("Symbol."+u)),s[u]},l0}var c0,AA;function Voe(){if(AA)return c0;AA=1;var e=qr(),t=ar(),r=zB(),n=fl(),i=$oe(),o=Or(),a=TypeError,s=o("toPrimitive");return c0=function(c,u){if(!t(c)||r(c))return c;var d=n(c,s),p;if(d){if(u===void 0&&(u="default"),p=e(d,c,u),!t(p)||r(p))return p;throw new a("Can't convert object to primitive value")}return u===void 0&&(u="number"),i(c,u)},c0}var u0,DA;function BB(){if(DA)return u0;DA=1;var e=Voe(),t=zB();return u0=function(r){var n=e(r,"string");return t(n)?n:n+""},u0}var d0,jA;function $_(){if(jA)return d0;jA=1;var e=Vt(),t=ar(),r=e.document,n=t(r)&&t(r.createElement);return d0=function(i){return n?r.createElement(i):{}},d0}var f0,qA;function FB(){if(qA)return f0;qA=1;var e=kn(),t=wt(),r=$_();return f0=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),f0}var LA;function $B(){if(LA)return Ny;LA=1;var e=kn(),t=qr(),r=DB(),n=D_(),i=Oa(),o=BB(),a=vn(),s=FB(),c=Object.getOwnPropertyDescriptor;return Ny.f=e?c:function(d,p){if(d=i(d),p=o(p),s)try{return c(d,p)}catch{}if(a(d,p))return n(!t(r.f,d,p),d[p])},Ny}var p0={},h0,zA;function VB(){if(zA)return h0;zA=1;var e=kn(),t=wt();return h0=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),h0}var v0,BA;function gn(){if(BA)return v0;BA=1;var e=ar(),t=String,r=TypeError;return v0=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},v0}var FA;function hi(){if(FA)return p0;FA=1;var e=kn(),t=FB(),r=VB(),n=gn(),i=BB(),o=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",u="configurable",d="writable";return p0.f=e?r?function(v,h,x){if(n(v),h=i(h),n(x),typeof v=="function"&&h==="prototype"&&"value"in x&&d in x&&!x[d]){var b=s(v,h);b&&b[d]&&(v[h]=x.value,x={configurable:u in x?x[u]:b[u],enumerable:c in x?x[c]:b[c],writable:!1})}return a(v,h,x)}:a:function(v,h,x){if(n(v),h=i(h),n(x),t)try{return a(v,h,x)}catch{}if("get"in x||"set"in x)throw new o("Accessors not supported");return"value"in x&&(v[h]=x.value),v},p0}var g0,$A;function pl(){if($A)return g0;$A=1;var e=kn(),t=hi(),r=D_();return g0=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},g0}var m0={exports:{}},b0,VA;function V_(){if(VA)return b0;VA=1;var e=kn(),t=vn(),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 b0={EXISTS:i,PROPER:o,CONFIGURABLE:a},b0}var y0,HA;function HB(){if(HA)return y0;HA=1;var e=mt(),t=Yt(),r=z_(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),y0=r.inspectSource,y0}var x0,WA;function WB(){if(WA)return x0;WA=1;var e=Vt(),t=Yt(),r=e.WeakMap;return x0=t(r)&&/native code/.test(String(r)),x0}var w0,UA;function H_(){if(UA)return w0;UA=1;var e=B_(),t=F_(),r=e("keys");return w0=function(n){return r[n]||(r[n]=t(n))},w0}var _0,GA;function qd(){return GA||(GA=1,_0={}),_0}var E0,KA;function Ia(){if(KA)return E0;KA=1;var e=WB(),t=Vt(),r=ar(),n=pl(),i=vn(),o=z_(),a=H_(),s=qd(),c="Object already initialized",u=t.TypeError,d=t.WeakMap,p,v,h,x=function(y){return h(y)?v(y):p(y,{})},b=function(y){return function(_){var S;if(!r(_)||(S=v(_)).type!==y)throw new u("Incompatible receiver, "+y+" required");return S}};if(e||o.state){var m=o.state||(o.state=new d);m.get=m.get,m.has=m.has,m.set=m.set,p=function(y,_){if(m.has(y))throw new u(c);return _.facade=y,m.set(y,_),_},v=function(y){return m.get(y)||{}},h=function(y){return m.has(y)}}else{var w=a("state");s[w]=!0,p=function(y,_){if(i(y,w))throw new u(c);return _.facade=y,n(y,w,_),_},v=function(y){return i(y,w)?y[w]:{}},h=function(y){return i(y,w)}}return E0={set:p,get:v,has:h,enforce:x,getterFor:b},E0}var YA;function UB(){if(YA)return m0.exports;YA=1;var e=mt(),t=wt(),r=Yt(),n=vn(),i=kn(),o=V_().CONFIGURABLE,a=HB(),s=Ia(),c=s.enforce,u=s.get,d=String,p=Object.defineProperty,v=e("".slice),h=e("".replace),x=e([].join),b=i&&!t(function(){return p(function(){},"length",{value:8}).length!==8}),m=String(String).split("String"),w=m0.exports=function(y,_,S){v(d(_),0,7)==="Symbol("&&(_="["+h(d(_),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),S&&S.getter&&(_="get "+_),S&&S.setter&&(_="set "+_),(!n(y,"name")||o&&y.name!==_)&&(i?p(y,"name",{value:_,configurable:!0}):y.name=_),b&&S&&n(S,"arity")&&y.length!==S.arity&&p(y,"length",{value:S.arity});try{S&&n(S,"constructor")&&S.constructor?i&&p(y,"prototype",{writable:!1}):y.prototype&&(y.prototype=void 0)}catch{}var E=c(y);return n(E,"source")||(E.source=x(m,typeof _=="string"?_:"")),y};return Function.prototype.toString=w(function(){return r(this)&&u(this).source||a(this)},"toString"),m0.exports}var S0,XA;function yo(){if(XA)return S0;XA=1;var e=Yt(),t=hi(),r=UB(),n=L_();return S0=function(i,o,a,s){s||(s={});var c=s.enumerable,u=s.name!==void 0?s.name:o;if(e(a)&&r(a,u,s),s.global)c?i[o]=a:n(o,a);else{try{s.unsafe?i[o]&&(c=!0):delete i[o]}catch{}c?i[o]=a:t.f(i,o,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return i},S0}var O0={},C0,ZA;function Hoe(){if(ZA)return C0;ZA=1;var e=Math.ceil,t=Math.floor;return C0=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},C0}var I0,JA;function Ld(){if(JA)return I0;JA=1;var e=Hoe();return I0=function(t){var r=+t;return r!==r||r===0?0:e(r)},I0}var R0,QA;function Woe(){if(QA)return R0;QA=1;var e=Ld(),t=Math.max,r=Math.min;return R0=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},R0}var N0,eD;function W_(){if(eD)return N0;eD=1;var e=Ld(),t=Math.min;return N0=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},N0}var T0,tD;function zd(){if(tD)return T0;tD=1;var e=W_();return T0=function(t){return e(t.length)},T0}var P0,rD;function Uoe(){if(rD)return P0;rD=1;var e=Oa(),t=Woe(),r=zd(),n=function(i){return function(o,a,s){var c=e(o),u=r(c);if(u===0)return!i&&-1;var d=t(s,u),p;if(i&&a!==a){for(;u>d;)if(p=c[d++],p!==p)return!0}else for(;u>d;d++)if((i||d in c)&&c[d]===a)return i||d||0;return!i&&-1}};return P0={includes:n(!0),indexOf:n(!1)},P0}var k0,nD;function GB(){if(nD)return k0;nD=1;var e=mt(),t=vn(),r=Oa(),n=Uoe().indexOf,i=qd(),o=e([].push);return k0=function(a,s){var c=r(a),u=0,d=[],p;for(p in c)!t(i,p)&&t(c,p)&&o(d,p);for(;s.length>u;)t(c,p=s[u++])&&(~n(d,p)||o(d,p));return d},k0}var M0,iD;function U_(){return iD||(iD=1,M0=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),M0}var oD;function G_(){if(oD)return O0;oD=1;var e=GB(),t=U_(),r=t.concat("length","prototype");return O0.f=Object.getOwnPropertyNames||function(i){return e(i,r)},O0}var A0={},aD;function KB(){return aD||(aD=1,A0.f=Object.getOwnPropertySymbols),A0}var D0,sD;function Goe(){if(sD)return D0;sD=1;var e=Ad(),t=mt(),r=G_(),n=KB(),i=gn(),o=t([].concat);return D0=e("Reflect","ownKeys")||function(s){var c=r.f(i(s)),u=n.f;return u?o(c,u(s)):c},D0}var j0,lD;function Koe(){if(lD)return j0;lD=1;var e=vn(),t=Goe(),r=$B(),n=hi();return j0=function(i,o,a){for(var s=t(o),c=n.f,u=r.f,d=0;d<s.length;d++){var p=s[d];!e(i,p)&&!(a&&e(a,p))&&c(i,p,u(o,p))}},j0}var q0,cD;function YB(){if(cD)return q0;cD=1;var e=wt(),t=Yt(),r=/#|\.prototype\./,n=function(c,u){var d=o[i(c)];return d===s?!0:d===a?!1:t(u)?e(u):!!u},i=n.normalize=function(c){return String(c).replace(r,".").toLowerCase()},o=n.data={},a=n.NATIVE="N",s=n.POLYFILL="P";return q0=n,q0}var L0,uD;function Fi(){if(uD)return L0;uD=1;var e=Vt(),t=$B().f,r=pl(),n=yo(),i=L_(),o=Koe(),a=YB();return L0=function(s,c){var u=s.target,d=s.global,p=s.stat,v,h,x,b,m,w;if(d?h=e:p?h=e[u]||i(u,{}):h=e[u]&&e[u].prototype,h)for(x in c){if(m=c[x],s.dontCallGetSet?(w=t(h,x),b=w&&w.value):b=h[x],v=a(d?x:u+(p?".":"#")+x,s.forced),!v&&b!==void 0){if(typeof m==typeof b)continue;o(m,b)}(s.sham||b&&b.sham)&&r(m,"sham",!0),n(h,x,m,s)}},L0}var z0,dD;function K_(){if(dD)return z0;dD=1;var e=Or(),t=e("toStringTag"),r={};return r[t]="z",z0=String(r)==="[object z]",z0}var B0,fD;function Bd(){if(fD)return B0;fD=1;var e=K_(),t=Yt(),r=Bi(),n=Or(),i=n("toStringTag"),o=Object,a=r((function(){return arguments})())==="Arguments",s=function(c,u){try{return c[u]}catch{}};return B0=e?r:function(c){var u,d,p;return c===void 0?"Undefined":c===null?"Null":typeof(d=s(u=o(c),i))=="string"?d:a?r(u):(p=r(u))==="Object"&&t(u.callee)?"Arguments":p},B0}var F0,pD;function xo(){if(pD)return F0;pD=1;var e=Bd(),t=String;return F0=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},F0}var $0,hD;function XB(){return hD||(hD=1,$0=`
108
- \v\f\r                 \u2028\u2029\uFEFF`),$0}var V0,vD;function Yoe(){if(vD)return V0;vD=1;var e=mt(),t=bo(),r=xo(),n=XB(),i=e("".replace),o=RegExp("^["+n+"]+"),a=RegExp("(^|[^"+n+"])["+n+"]+$"),s=function(c){return function(u){var d=r(t(u));return c&1&&(d=i(d,o,"")),c&2&&(d=i(d,a,"$1")),d}};return V0={start:s(1),end:s(2),trim:s(3)},V0}var H0,gD;function Xoe(){if(gD)return H0;gD=1;var e=Vt(),t=wt(),r=mt(),n=xo(),i=Yoe().trim,o=XB(),a=e.parseInt,s=e.Symbol,c=s&&s.iterator,u=/^[+-]?0x/i,d=r(u.exec),p=a(o+"08")!==8||a(o+"0x16")!==22||c&&!t(function(){a(Object(c))});return H0=p?function(h,x){var b=i(n(h));return a(b,x>>>0||(d(u,b)?16:10))}:a,H0}var mD;function Zoe(){if(mD)return QM;mD=1;var e=Fi(),t=Xoe();return e({global:!0,forced:parseInt!==t},{parseInt:t}),QM}Zoe();var bD={},W0,yD;function ZB(){if(yD)return W0;yD=1;var e=GB(),t=U_();return W0=Object.keys||function(n){return e(n,t)},W0}var U0,xD;function Joe(){if(xD)return U0;xD=1;var e=kn(),t=mt(),r=qr(),n=wt(),i=ZB(),o=KB(),a=DB(),s=Ca(),c=Md(),u=Object.assign,d=Object.defineProperty,p=t([].concat);return U0=!u||n(function(){if(e&&u({b:1},u(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var v={},h={},x=Symbol("assign detection"),b="abcdefghijklmnopqrst";return v[x]=7,b.split("").forEach(function(m){h[m]=m}),u({},v)[x]!==7||i(u({},h)).join("")!==b})?function(h,x){for(var b=s(h),m=arguments.length,w=1,y=o.f,_=a.f;m>w;)for(var S=c(arguments[w++]),E=y?p(i(S),y(S)):i(S),I=E.length,N=0,T;I>N;)T=E[N++],(!e||r(_,S,T))&&(b[T]=S[T]);return b}:u,U0}var wD;function Qoe(){if(wD)return bD;wD=1;var e=Fi(),t=Joe();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),bD}Qoe();var _D={},G0,ED;function eae(){if(ED)return G0;ED=1;var e=Bi(),t=mt();return G0=function(r){if(e(r)==="Function")return t(r)},G0}var K0,SD;function JB(){if(SD)return K0;SD=1;var e=eae(),t=dl(),r=kd(),n=e(e.bind);return K0=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},K0}var Y0,OD;function tae(){if(OD)return Y0;OD=1;var e=Bi();return Y0=Array.isArray||function(r){return e(r)==="Array"},Y0}var X0,CD;function rae(){if(CD)return X0;CD=1;var e=mt(),t=wt(),r=Yt(),n=Bd(),i=Ad(),o=HB(),a=function(){},s=i("Reflect","construct"),c=/^\s*(?:class|function)\b/,u=e(c.exec),d=!c.test(a),p=function(x){if(!r(x))return!1;try{return s(a,[],x),!0}catch{return!1}},v=function(x){if(!r(x))return!1;switch(n(x)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!u(c,o(x))}catch{return!0}};return v.sham=!0,X0=!s||t(function(){var h;return p(p.call)||!p(Object)||!p(function(){h=!0})||h})?v:p,X0}var Z0,ID;function nae(){if(ID)return Z0;ID=1;var e=tae(),t=rae(),r=ar(),n=Or(),i=n("species"),o=Array;return Z0=function(a){var s;return e(a)&&(s=a.constructor,t(s)&&(s===o||e(s.prototype))?s=void 0:r(s)&&(s=s[i],s===null&&(s=void 0))),s===void 0?o:s},Z0}var J0,RD;function iae(){if(RD)return J0;RD=1;var e=nae();return J0=function(t,r){return new(e(t))(r===0?0:r)},J0}var Q0,ND;function QB(){if(ND)return Q0;ND=1;var e=JB(),t=mt(),r=Md(),n=Ca(),i=zd(),o=iae(),a=t([].push),s=function(c){var u=c===1,d=c===2,p=c===3,v=c===4,h=c===6,x=c===7,b=c===5||h;return function(m,w,y,_){for(var S=n(m),E=r(S),I=i(E),N=e(w,y),T=0,k=_||o,L=u?k(m,I):d||x?k(m,0):void 0,B,A;I>T;T++)if((b||T in E)&&(B=E[T],A=N(B,T,S),c))if(u)L[T]=A;else if(A)switch(c){case 3:return!0;case 5:return B;case 6:return T;case 2:a(L,B)}else switch(c){case 4:return!1;case 7:a(L,B)}return h?-1:p||v?v:L}};return Q0={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},Q0}var ex,TD;function oae(){if(TD)return ex;TD=1;var e=wt(),t=Or(),r=j_(),n=t("species");return ex=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},ex}var PD;function aae(){if(PD)return _D;PD=1;var e=Fi(),t=QB().filter,r=oae(),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)}}),_D}aae();var kD={},tx,MD;function sae(){if(MD)return tx;MD=1;var e=K_(),t=Bd();return tx=e?{}.toString:function(){return"[object "+t(this)+"]"},tx}var AD;function lae(){if(AD)return kD;AD=1;var e=K_(),t=yo(),r=sae();return e||t(Object.prototype,"toString",r,{unsafe:!0}),kD}lae();var rx={},DD;function cae(){if(DD)return rx;DD=1;var e=kn(),t=VB(),r=hi(),n=gn(),i=Oa(),o=ZB();return rx.f=e&&!t?Object.defineProperties:function(s,c){n(s);for(var u=i(c),d=o(c),p=d.length,v=0,h;p>v;)r.f(s,h=d[v++],u[h]);return s},rx}var nx,jD;function uae(){if(jD)return nx;jD=1;var e=Ad();return nx=e("document","documentElement"),nx}var ix,qD;function Fd(){if(qD)return ix;qD=1;var e=gn(),t=cae(),r=U_(),n=qd(),i=uae(),o=$_(),a=H_(),s=">",c="<",u="prototype",d="script",p=a("IE_PROTO"),v=function(){},h=function(y){return c+d+s+y+c+"/"+d+s},x=function(y){y.write(h("")),y.close();var _=y.parentWindow.Object;return y=null,_},b=function(){var y=o("iframe"),_="java"+d+":",S;return y.style.display="none",i.appendChild(y),y.src=String(_),S=y.contentWindow.document,S.open(),S.write(h("document.F=Object")),S.close(),S.F},m,w=function(){try{m=new ActiveXObject("htmlfile")}catch{}w=typeof document<"u"?document.domain&&m?x(m):b():x(m);for(var y=r.length;y--;)delete w[u][r[y]];return w()};return n[p]=!0,ix=Object.create||function(_,S){var E;return _!==null?(v[u]=e(_),E=new v,v[u]=null,E[p]=_):E=w(),S===void 0?E:t.f(E,S)},ix}var ox,LD;function dae(){if(LD)return ox;LD=1;var e=Or(),t=Fd(),r=hi().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),ox=function(o){i[n][o]=!0},ox}var ax,zD;function hl(){return zD||(zD=1,ax={}),ax}var sx,BD;function fae(){if(BD)return sx;BD=1;var e=wt();return sx=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),sx}var lx,FD;function eF(){if(FD)return lx;FD=1;var e=vn(),t=Yt(),r=Ca(),n=H_(),i=fae(),o=n("IE_PROTO"),a=Object,s=a.prototype;return lx=i?a.getPrototypeOf:function(c){var u=r(c);if(e(u,o))return u[o];var d=u.constructor;return t(d)&&u instanceof d?d.prototype:u instanceof a?s:null},lx}var cx,$D;function tF(){if($D)return cx;$D=1;var e=wt(),t=Yt(),r=ar(),n=Fd(),i=eF(),o=yo(),a=Or(),s=jd(),c=a("iterator"),u=!1,d,p,v;[].keys&&(v=[].keys(),"next"in v?(p=i(i(v)),p!==Object.prototype&&(d=p)):u=!0);var h=!r(d)||e(function(){var x={};return d[c].call(x)!==x});return h?d={}:s&&(d=n(d)),t(d[c])||o(d,c,function(){return this}),cx={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:u},cx}var ux,VD;function $d(){if(VD)return ux;VD=1;var e=hi().f,t=vn(),r=Or(),n=r("toStringTag");return ux=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},ux}var dx,HD;function pae(){if(HD)return dx;HD=1;var e=tF().IteratorPrototype,t=Fd(),r=D_(),n=$d(),i=hl(),o=function(){return this};return dx=function(a,s,c,u){var d=s+" Iterator";return a.prototype=t(e,{next:r(+!u,c)}),n(a,d,!1,!0),i[d]=o,a},dx}var fx,WD;function hae(){if(WD)return fx;WD=1;var e=mt(),t=dl();return fx=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},fx}var px,UD;function vae(){if(UD)return px;UD=1;var e=ar();return px=function(t){return e(t)||t===null},px}var hx,GD;function gae(){if(GD)return hx;GD=1;var e=vae(),t=String,r=TypeError;return hx=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},hx}var vx,KD;function rF(){if(KD)return vx;KD=1;var e=hae(),t=ar(),r=bo(),n=gae();return vx=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,u){return r(c),n(u),t(c)&&(i?a(c,u):c.__proto__=u),c}})():void 0),vx}var gx,YD;function nF(){if(YD)return gx;YD=1;var e=Fi(),t=qr(),r=jd(),n=V_(),i=Yt(),o=pae(),a=eF(),s=rF(),c=$d(),u=pl(),d=yo(),p=Or(),v=hl(),h=tF(),x=n.PROPER,b=n.CONFIGURABLE,m=h.IteratorPrototype,w=h.BUGGY_SAFARI_ITERATORS,y=p("iterator"),_="keys",S="values",E="entries",I=function(){return this};return gx=function(N,T,k,L,B,A,z){o(k,T,L);var P=function(j){if(j===B&&Z)return Z;if(!w&&j&&j in Y)return Y[j];switch(j){case _:return function(){return new k(this,j)};case S:return function(){return new k(this,j)};case E:return function(){return new k(this,j)}}return function(){return new k(this)}},K=T+" Iterator",$=!1,Y=N.prototype,U=Y[y]||Y["@@iterator"]||B&&Y[B],Z=!w&&U||P(B),D=T==="Array"&&Y.entries||U,W,Q,ee;if(D&&(W=a(D.call(new N)),W!==Object.prototype&&W.next&&(!r&&a(W)!==m&&(s?s(W,m):i(W[y])||d(W,y,I)),c(W,K,!0,!0),r&&(v[K]=I))),x&&B===S&&U&&U.name!==S&&(!r&&b?u(Y,"name",S):($=!0,Z=function(){return t(U,this)})),B)if(Q={values:P(S),keys:A?Z:P(_),entries:P(E)},z)for(ee in Q)(w||$||!(ee in Y))&&d(Y,ee,Q[ee]);else e({target:T,proto:!0,forced:w||$},Q);return(!r||z)&&Y[y]!==Z&&d(Y,y,Z,{name:B}),v[T]=Z,Q},gx}var mx,XD;function iF(){return XD||(XD=1,mx=function(e,t){return{value:e,done:t}}),mx}var bx,ZD;function oF(){if(ZD)return bx;ZD=1;var e=Oa(),t=dae(),r=hl(),n=Ia(),i=hi().f,o=nF(),a=iF(),s=jd(),c=kn(),u="Array Iterator",d=n.set,p=n.getterFor(u);bx=o(Array,"Array",function(h,x){d(this,{type:u,target:e(h),index:0,kind:x})},function(){var h=p(this),x=h.target,b=h.index++;if(!x||b>=x.length)return h.target=null,a(void 0,!0);switch(h.kind){case"keys":return a(b,!1);case"values":return a(x[b],!1)}return a([b,x[b]],!1)},"values");var v=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!s&&c&&v.name!=="values")try{i(v,"name",{value:"values"})}catch{}return bx}oF();var JD={},yx,QD;function aF(){if(QD)return yx;QD=1;var e=mt(),t=Ld(),r=xo(),n=bo(),i=e("".charAt),o=e("".charCodeAt),a=e("".slice),s=function(c){return function(u,d){var p=r(n(u)),v=t(d),h=p.length,x,b;return v<0||v>=h?c?"":void 0:(x=o(p,v),x<55296||x>56319||v+1===h||(b=o(p,v+1))<56320||b>57343?c?i(p,v):x:c?a(p,v,v+2):(x-55296<<10)+(b-56320)+65536)}};return yx={codeAt:s(!1),charAt:s(!0)},yx}var ej;function mae(){if(ej)return JD;ej=1;var e=aF().charAt,t=xo(),r=Ia(),n=nF(),i=iF(),o="String Iterator",a=r.set,s=r.getterFor(o);return n(String,"String",function(c){a(this,{type:o,string:t(c),index:0})},function(){var u=s(this),d=u.string,p=u.index,v;return p>=d.length?i(void 0,!0):(v=e(d,p),u.index+=v.length,i(v,!1))}),JD}mae();var tj={},rj={},xx,nj;function sF(){if(nj)return xx;nj=1;var e=wt();return xx=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),xx}var wx,ij;function lF(){if(ij)return wx;ij=1;var e=yo();return wx=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},wx}var _x={exports:{}},Ex={},Sx,oj;function bae(){if(oj)return Sx;oj=1;var e=mt();return Sx=e([].slice),Sx}var aj;function yae(){if(aj)return Ex;aj=1;var e=Bi(),t=Oa(),r=G_().f,n=bae(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return Ex.f=function(s){return i&&e(s)==="Window"?o(s):r(t(s))},Ex}var Ox,sj;function xae(){if(sj)return Ox;sj=1;var e=wt();return Ox=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),Ox}var Cx,lj;function wae(){if(lj)return Cx;lj=1;var e=wt(),t=ar(),r=Bi(),n=xae(),i=Object.isExtensible,o=e(function(){});return Cx=o||n?function(s){return!t(s)||n&&r(s)==="ArrayBuffer"?!1:i?i(s):!0}:i,Cx}var cj;function Y_(){if(cj)return _x.exports;cj=1;var e=Fi(),t=mt(),r=qd(),n=ar(),i=vn(),o=hi().f,a=G_(),s=yae(),c=wae(),u=F_(),d=sF(),p=!1,v=u("meta"),h=0,x=function(S){o(S,v,{value:{objectID:"O"+h++,weakData:{}}})},b=function(S,E){if(!n(S))return typeof S=="symbol"?S:(typeof S=="string"?"S":"P")+S;if(!i(S,v)){if(!c(S))return"F";if(!E)return"E";x(S)}return S[v].objectID},m=function(S,E){if(!i(S,v)){if(!c(S))return!0;if(!E)return!1;x(S)}return S[v].weakData},w=function(S){return d&&p&&c(S)&&!i(S,v)&&x(S),S},y=function(){_.enable=function(){},p=!0;var S=a.f,E=t([].splice),I={};I[v]=1,S(I).length&&(a.f=function(N){for(var T=S(N),k=0,L=T.length;k<L;k++)if(T[k]===v){E(T,k,1);break}return T},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},_=_x.exports={enable:y,fastKey:b,getWeakData:m,onFreeze:w};return r[v]=!0,_x.exports}var Ix,uj;function _ae(){if(uj)return Ix;uj=1;var e=Or(),t=hl(),r=e("iterator"),n=Array.prototype;return Ix=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},Ix}var Rx,dj;function cF(){if(dj)return Rx;dj=1;var e=Bd(),t=fl(),r=ul(),n=hl(),i=Or(),o=i("iterator");return Rx=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},Rx}var Nx,fj;function Eae(){if(fj)return Nx;fj=1;var e=qr(),t=dl(),r=gn(),n=q_(),i=cF(),o=TypeError;return Nx=function(a,s){var c=arguments.length<2?i(a):s;if(t(c))return r(e(c,a));throw new o(n(a)+" is not iterable")},Nx}var Tx,pj;function Sae(){if(pj)return Tx;pj=1;var e=qr(),t=gn(),r=fl();return Tx=function(n,i,o){var a,s;t(n);try{if(a=r(n,"return"),!a){if(i==="throw")throw o;return o}a=e(a,n)}catch(c){s=!0,a=c}if(i==="throw")throw o;if(s)throw a;return t(a),o},Tx}var Px,hj;function uF(){if(hj)return Px;hj=1;var e=JB(),t=qr(),r=gn(),n=q_(),i=_ae(),o=zd(),a=Dd(),s=Eae(),c=cF(),u=Sae(),d=TypeError,p=function(h,x){this.stopped=h,this.result=x},v=p.prototype;return Px=function(h,x,b){var m=b&&b.that,w=!!(b&&b.AS_ENTRIES),y=!!(b&&b.IS_RECORD),_=!!(b&&b.IS_ITERATOR),S=!!(b&&b.INTERRUPTED),E=e(x,m),I,N,T,k,L,B,A,z=function(K){return I&&u(I,"normal"),new p(!0,K)},P=function(K){return w?(r(K),S?E(K[0],K[1],z):E(K[0],K[1])):S?E(K,z):E(K)};if(y)I=h.iterator;else if(_)I=h;else{if(N=c(h),!N)throw new d(n(h)+" is not iterable");if(i(N)){for(T=0,k=o(h);k>T;T++)if(L=P(h[T]),L&&a(v,L))return L;return new p(!1)}I=s(h,N)}for(B=y?h.next:I.next;!(A=t(B,I)).done;){try{L=P(A.value)}catch(K){u(I,"throw",K)}if(typeof L=="object"&&L&&a(v,L))return L}return new p(!1)},Px}var kx,vj;function dF(){if(vj)return kx;vj=1;var e=Dd(),t=TypeError;return kx=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},kx}var Mx,gj;function Oae(){if(gj)return Mx;gj=1;var e=Or(),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 Mx=function(o,a){try{if(!a&&!r)return!1}catch{return!1}var s=!1;try{var c={};c[t]=function(){return{next:function(){return{done:s=!0}}}},o(c)}catch{}return s},Mx}var Ax,mj;function Cae(){if(mj)return Ax;mj=1;var e=Yt(),t=ar(),r=rF();return Ax=function(n,i,o){var a,s;return r&&e(a=i.constructor)&&a!==o&&t(s=a.prototype)&&s!==o.prototype&&r(n,s),n},Ax}var Dx,bj;function Iae(){if(bj)return Dx;bj=1;var e=Fi(),t=Vt(),r=mt(),n=YB(),i=yo(),o=Y_(),a=uF(),s=dF(),c=Yt(),u=ul(),d=ar(),p=wt(),v=Oae(),h=$d(),x=Cae();return Dx=function(b,m,w){var y=b.indexOf("Map")!==-1,_=b.indexOf("Weak")!==-1,S=y?"set":"add",E=t[b],I=E&&E.prototype,N=E,T={},k=function($){var Y=r(I[$]);i(I,$,$==="add"?function(Z){return Y(this,Z===0?0:Z),this}:$==="delete"?function(U){return _&&!d(U)?!1:Y(this,U===0?0:U)}:$==="get"?function(Z){return _&&!d(Z)?void 0:Y(this,Z===0?0:Z)}:$==="has"?function(Z){return _&&!d(Z)?!1:Y(this,Z===0?0:Z)}:function(Z,D){return Y(this,Z===0?0:Z,D),this})},L=n(b,!c(E)||!(_||I.forEach&&!p(function(){new E().entries().next()})));if(L)N=w.getConstructor(m,b,y,S),o.enable();else if(n(b,!0)){var B=new N,A=B[S](_?{}:-0,1)!==B,z=p(function(){B.has(1)}),P=v(function($){new E($)}),K=!_&&p(function(){for(var $=new E,Y=5;Y--;)$[S](Y,Y);return!$.has(-0)});P||(N=m(function($,Y){s($,I);var U=x(new E,$,N);return u(Y)||a(Y,U[S],{that:U,AS_ENTRIES:y}),U}),N.prototype=I,I.constructor=N),(z||K)&&(k("delete"),k("has"),y&&k("get")),(K||A)&&k(S),_&&I.clear&&delete I.clear}return T[b]=N,e({global:!0,constructor:!0,forced:N!==E},T),h(N,b),_||w.setStrong(N,b,y),N},Dx}var jx,yj;function Rae(){if(yj)return jx;yj=1;var e=mt(),t=lF(),r=Y_().getWeakData,n=dF(),i=gn(),o=ul(),a=ar(),s=uF(),c=QB(),u=vn(),d=Ia(),p=d.set,v=d.getterFor,h=c.find,x=c.findIndex,b=e([].splice),m=0,w=function(S){return S.frozen||(S.frozen=new y)},y=function(){this.entries=[]},_=function(S,E){return h(S.entries,function(I){return I[0]===E})};return y.prototype={get:function(S){var E=_(this,S);if(E)return E[1]},has:function(S){return!!_(this,S)},set:function(S,E){var I=_(this,S);I?I[1]=E:this.entries.push([S,E])},delete:function(S){var E=x(this.entries,function(I){return I[0]===S});return~E&&b(this.entries,E,1),!!~E}},jx={getConstructor:function(S,E,I,N){var T=S(function(A,z){n(A,k),p(A,{type:E,id:m++,frozen:null}),o(z)||s(z,A[N],{that:A,AS_ENTRIES:I})}),k=T.prototype,L=v(E),B=function(A,z,P){var K=L(A),$=r(i(z),!0);return $===!0?w(K).set(z,P):$[K.id]=P,A};return t(k,{delete:function(A){var z=L(this);if(!a(A))return!1;var P=r(A);return P===!0?w(z).delete(A):P&&u(P,z.id)&&delete P[z.id]},has:function(z){var P=L(this);if(!a(z))return!1;var K=r(z);return K===!0?w(P).has(z):K&&u(K,P.id)}}),t(k,I?{get:function(z){var P=L(this);if(a(z)){var K=r(z);if(K===!0)return w(P).get(z);if(K)return K[P.id]}},set:function(z,P){return B(this,z,P)}}:{add:function(z){return B(this,z,!0)}}),T}},jx}var xj;function Nae(){if(xj)return rj;xj=1;var e=sF(),t=Vt(),r=mt(),n=lF(),i=Y_(),o=Iae(),a=Rae(),s=ar(),c=Ia().enforce,u=wt(),d=WB(),p=Object,v=Array.isArray,h=p.isExtensible,x=p.isFrozen,b=p.isSealed,m=p.freeze,w=p.seal,y=!t.ActiveXObject&&"ActiveXObject"in t,_,S=function(A){return function(){return A(this,arguments.length?arguments[0]:void 0)}},E=o("WeakMap",S,a),I=E.prototype,N=r(I.set),T=function(){return e&&u(function(){var A=m([]);return N(new E,A,1),!x(A)})};if(d)if(y){_=a.getConstructor(S,"WeakMap",!0),i.enable();var k=r(I.delete),L=r(I.has),B=r(I.get);n(I,{delete:function(A){if(s(A)&&!h(A)){var z=c(this);return z.frozen||(z.frozen=new _),k(this,A)||z.frozen.delete(A)}return k(this,A)},has:function(z){if(s(z)&&!h(z)){var P=c(this);return P.frozen||(P.frozen=new _),L(this,z)||P.frozen.has(z)}return L(this,z)},get:function(z){if(s(z)&&!h(z)){var P=c(this);return P.frozen||(P.frozen=new _),L(this,z)?B(this,z):P.frozen.get(z)}return B(this,z)},set:function(z,P){if(s(z)&&!h(z)){var K=c(this);K.frozen||(K.frozen=new _),L(this,z)?N(this,z,P):K.frozen.set(z,P)}else N(this,z,P);return this}})}else T()&&n(I,{set:function(z,P){var K;return v(z)&&(x(z)?K=m:b(z)&&(K=w)),N(this,z,P),K&&K(z),this}});return rj}var wj;function Tae(){return wj||(wj=1,Nae()),tj}Tae();var _j={},qx,Ej;function Pae(){return Ej||(Ej=1,qx={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}),qx}var Lx,Sj;function kae(){if(Sj)return Lx;Sj=1;var e=$_(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return Lx=r===Object.prototype?void 0:r,Lx}var Oj;function Mae(){if(Oj)return _j;Oj=1;var e=Vt(),t=Pae(),r=kae(),n=oF(),i=pl(),o=$d(),a=Or(),s=a("iterator"),c=n.values,u=function(p,v){if(p){if(p[s]!==c)try{i(p,s,c)}catch{p[s]=c}if(o(p,v,!0),t[v]){for(var h in n)if(p[h]!==n[h])try{i(p,h,n[h])}catch{p[h]=n[h]}}}};for(var d in t)u(e[d]&&e[d].prototype,d);return u(r,"DOMTokenList"),_j}Mae();var zx,Cj;function Aae(){if(Cj)return zx;Cj=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,s=parseInt,c=typeof At=="object"&&At&&At.Object===Object&&At,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),p=Object.prototype,v=p.toString,h=Math.max,x=Math.min,b=function(){return d.Date.now()};function m(I,N,T){var k,L,B,A,z,P,K=0,$=!1,Y=!1,U=!0;if(typeof I!="function")throw new TypeError(e);N=E(N)||0,y(T)&&($=!!T.leading,Y="maxWait"in T,B=Y?h(E(T.maxWait)||0,N):B,U="trailing"in T?!!T.trailing:U);function Z(X){var te=k,ne=L;return k=L=void 0,K=X,A=I.apply(ne,te),A}function D(X){return K=X,z=setTimeout(ee,N),$?Z(X):A}function W(X){var te=X-P,ne=X-K,de=N-te;return Y?x(de,B-ne):de}function Q(X){var te=X-P,ne=X-K;return P===void 0||te>=N||te<0||Y&&ne>=B}function ee(){var X=b();if(Q(X))return j(X);z=setTimeout(ee,W(X))}function j(X){return z=void 0,U&&k?Z(X):(k=L=void 0,A)}function F(){z!==void 0&&clearTimeout(z),K=0,k=P=L=z=void 0}function G(){return z===void 0?A:j(b())}function q(){var X=b(),te=Q(X);if(k=arguments,L=this,P=X,te){if(z===void 0)return D(P);if(Y)return z=setTimeout(ee,N),Z(P)}return z===void 0&&(z=setTimeout(ee,N)),A}return q.cancel=F,q.flush=G,q}function w(I,N,T){var k=!0,L=!0;if(typeof I!="function")throw new TypeError(e);return y(T)&&(k="leading"in T?!!T.leading:k,L="trailing"in T?!!T.trailing:L),m(I,N,{leading:k,maxWait:N,trailing:L})}function y(I){var N=typeof I;return!!I&&(N=="object"||N=="function")}function _(I){return!!I&&typeof I=="object"}function S(I){return typeof I=="symbol"||_(I)&&v.call(I)==r}function E(I){if(typeof I=="number")return I;if(S(I))return t;if(y(I)){var N=typeof I.valueOf=="function"?I.valueOf():I;I=y(N)?N+"":N}if(typeof I!="string")return I===0?I:+I;I=I.replace(n,"");var T=o.test(I);return T||a.test(I)?s(I.slice(2),T?2:8):i.test(I)?t:+I}return zx=w,zx}var Dae=Aae();const Ij=Li(Dae);var Bx,Rj;function jae(){if(Rj)return Bx;Rj=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,s=parseInt,c=typeof At=="object"&&At&&At.Object===Object&&At,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),p=Object.prototype,v=p.toString,h=Math.max,x=Math.min,b=function(){return d.Date.now()};function m(E,I,N){var T,k,L,B,A,z,P=0,K=!1,$=!1,Y=!0;if(typeof E!="function")throw new TypeError(e);I=S(I)||0,w(N)&&(K=!!N.leading,$="maxWait"in N,L=$?h(S(N.maxWait)||0,I):L,Y="trailing"in N?!!N.trailing:Y);function U(q){var X=T,te=k;return T=k=void 0,P=q,B=E.apply(te,X),B}function Z(q){return P=q,A=setTimeout(Q,I),K?U(q):B}function D(q){var X=q-z,te=q-P,ne=I-X;return $?x(ne,L-te):ne}function W(q){var X=q-z,te=q-P;return z===void 0||X>=I||X<0||$&&te>=L}function Q(){var q=b();if(W(q))return ee(q);A=setTimeout(Q,D(q))}function ee(q){return A=void 0,Y&&T?U(q):(T=k=void 0,B)}function j(){A!==void 0&&clearTimeout(A),P=0,T=z=k=A=void 0}function F(){return A===void 0?B:ee(b())}function G(){var q=b(),X=W(q);if(T=arguments,k=this,z=q,X){if(A===void 0)return Z(z);if($)return A=setTimeout(Q,I),U(z)}return A===void 0&&(A=setTimeout(Q,I)),B}return G.cancel=j,G.flush=F,G}function w(E){var I=typeof E;return!!E&&(I=="object"||I=="function")}function y(E){return!!E&&typeof E=="object"}function _(E){return typeof E=="symbol"||y(E)&&v.call(E)==r}function S(E){if(typeof E=="number")return E;if(_(E))return t;if(w(E)){var I=typeof E.valueOf=="function"?E.valueOf():E;E=w(I)?I+"":I}if(typeof E!="string")return E===0?E:+E;E=E.replace(n,"");var N=o.test(E);return N||a.test(E)?s(E.slice(2),N?2:8):i.test(E)?t:+E}return Bx=m,Bx}var qae=jae();const Nj=Li(qae);var Fx,Tj;function Lae(){if(Tj)return Fx;Tj=1;var e="Expected a function",t="__lodash_hash_undefined__",r="[object Function]",n="[object GeneratorFunction]",i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=typeof At=="object"&&At&&At.Object===Object&&At,s=typeof self=="object"&&self&&self.Object===Object&&self,c=a||s||Function("return this")();function u(le,se){return le==null?void 0:le[se]}function d(le){var se=!1;if(le!=null&&typeof le.toString!="function")try{se=!!(le+"")}catch{}return se}var p=Array.prototype,v=Function.prototype,h=Object.prototype,x=c["__core-js_shared__"],b=(function(){var le=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||"");return le?"Symbol(src)_1."+le:""})(),m=v.toString,w=h.hasOwnProperty,y=h.toString,_=RegExp("^"+m.call(w).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=p.splice,E=X(c,"Map"),I=X(Object,"create");function N(le){var se=-1,we=le?le.length:0;for(this.clear();++se<we;){var Re=le[se];this.set(Re[0],Re[1])}}function T(){this.__data__=I?I(null):{}}function k(le){return this.has(le)&&delete this.__data__[le]}function L(le){var se=this.__data__;if(I){var we=se[le];return we===t?void 0:we}return w.call(se,le)?se[le]:void 0}function B(le){var se=this.__data__;return I?se[le]!==void 0:w.call(se,le)}function A(le,se){var we=this.__data__;return we[le]=I&&se===void 0?t:se,this}N.prototype.clear=T,N.prototype.delete=k,N.prototype.get=L,N.prototype.has=B,N.prototype.set=A;function z(le){var se=-1,we=le?le.length:0;for(this.clear();++se<we;){var Re=le[se];this.set(Re[0],Re[1])}}function P(){this.__data__=[]}function K(le){var se=this.__data__,we=F(se,le);if(we<0)return!1;var Re=se.length-1;return we==Re?se.pop():S.call(se,we,1),!0}function $(le){var se=this.__data__,we=F(se,le);return we<0?void 0:se[we][1]}function Y(le){return F(this.__data__,le)>-1}function U(le,se){var we=this.__data__,Re=F(we,le);return Re<0?we.push([le,se]):we[Re][1]=se,this}z.prototype.clear=P,z.prototype.delete=K,z.prototype.get=$,z.prototype.has=Y,z.prototype.set=U;function Z(le){var se=-1,we=le?le.length:0;for(this.clear();++se<we;){var Re=le[se];this.set(Re[0],Re[1])}}function D(){this.__data__={hash:new N,map:new(E||z),string:new N}}function W(le){return q(this,le).delete(le)}function Q(le){return q(this,le).get(le)}function ee(le){return q(this,le).has(le)}function j(le,se){return q(this,le).set(le,se),this}Z.prototype.clear=D,Z.prototype.delete=W,Z.prototype.get=Q,Z.prototype.has=ee,Z.prototype.set=j;function F(le,se){for(var we=le.length;we--;)if(ge(le[we][0],se))return we;return-1}function G(le){if(!xe(le)||ne(le))return!1;var se=ue(le)||d(le)?_:o;return se.test(de(le))}function q(le,se){var we=le.__data__;return te(se)?we[typeof se=="string"?"string":"hash"]:we.map}function X(le,se){var we=u(le,se);return G(we)?we:void 0}function te(le){var se=typeof le;return se=="string"||se=="number"||se=="symbol"||se=="boolean"?le!=="__proto__":le===null}function ne(le){return!!b&&b in le}function de(le){if(le!=null){try{return m.call(le)}catch{}try{return le+""}catch{}}return""}function re(le,se){if(typeof le!="function"||se&&typeof se!="function")throw new TypeError(e);var we=function(){var Re=arguments,Te=se?se.apply(this,Re):Re[0],je=we.cache;if(je.has(Te))return je.get(Te);var Ke=le.apply(this,Re);return we.cache=je.set(Te,Ke),Ke};return we.cache=new(re.Cache||Z),we}re.Cache=Z;function ge(le,se){return le===se||le!==le&&se!==se}function ue(le){var se=xe(le)?y.call(le):"";return se==r||se==n}function xe(le){var se=typeof le;return!!le&&(se=="object"||se=="function")}return Fx=re,Fx}var zae=Lae();const Bae=Li(zae);var lo=[],Fae=function(){return lo.some(function(e){return e.activeTargets.length>0})},$ae=function(){return lo.some(function(e){return e.skippedTargets.length>0})},Pj="ResizeObserver loop completed with undelivered notifications.",Vae=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Pj}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Pj),window.dispatchEvent(e)},Hs;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Hs||(Hs={}));var co=function(e){return Object.freeze(e)},Hae=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,co(this)}return e})(),fF=(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,co(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,i=t.top,o=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:r,y:n,top:i,right:o,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),X_=function(e){return e instanceof SVGElement&&"getBBox"in e},pF=function(e){if(X_(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)},kj=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)},Wae=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},Ts=typeof window<"u"?window:{},Hc=new WeakMap,Mj=/auto|scroll/,Uae=/^tb|vertical/,Gae=/msie|trident/i.test(Ts.navigator&&Ts.navigator.userAgent),Ln=function(e){return parseFloat(e||"0")},na=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new Hae((r?t:e)||0,(r?e:t)||0)},Aj=co({devicePixelContentBoxSize:na(),borderBoxSize:na(),contentBoxSize:na(),contentRect:new fF(0,0,0,0)}),hF=function(e,t){if(t===void 0&&(t=!1),Hc.has(e)&&!t)return Hc.get(e);if(pF(e))return Hc.set(e,Aj),Aj;var r=getComputedStyle(e),n=X_(e)&&e.ownerSVGElement&&e.getBBox(),i=!Gae&&r.boxSizing==="border-box",o=Uae.test(r.writingMode||""),a=!n&&Mj.test(r.overflowY||""),s=!n&&Mj.test(r.overflowX||""),c=n?0:Ln(r.paddingTop),u=n?0:Ln(r.paddingRight),d=n?0:Ln(r.paddingBottom),p=n?0:Ln(r.paddingLeft),v=n?0:Ln(r.borderTopWidth),h=n?0:Ln(r.borderRightWidth),x=n?0:Ln(r.borderBottomWidth),b=n?0:Ln(r.borderLeftWidth),m=p+u,w=c+d,y=b+h,_=v+x,S=s?e.offsetHeight-_-e.clientHeight:0,E=a?e.offsetWidth-y-e.clientWidth:0,I=i?m+y:0,N=i?w+_:0,T=n?n.width:Ln(r.width)-I-E,k=n?n.height:Ln(r.height)-N-S,L=T+m+E+y,B=k+w+S+_,A=co({devicePixelContentBoxSize:na(Math.round(T*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:na(L,B,o),contentBoxSize:na(T,k,o),contentRect:new fF(p,c,T,k)});return Hc.set(e,A),A},vF=function(e,t,r){var n=hF(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case Hs.DEVICE_PIXEL_CONTENT_BOX:return a;case Hs.BORDER_BOX:return i;default:return o}},Kae=(function(){function e(t){var r=hF(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=co([r.borderBoxSize]),this.contentBoxSize=co([r.contentBoxSize]),this.devicePixelContentBoxSize=co([r.devicePixelContentBoxSize])}return e})(),gF=function(e){if(pF(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},Yae=function(){var e=1/0,t=[];lo.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new Kae(u.target),p=gF(u.target);s.push(d),u.lastReportedSize=vF(u.target,u.observedBox),p<e&&(e=p)}),t.push(function(){a.callback.call(a.observer,s,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},Dj=function(e){lo.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(gF(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},Xae=function(){var e=0;for(Dj(e);Fae();)e=Yae(),Dj(e);return $ae()&&Vae(),e>0},$x,mF=[],Zae=function(){return mF.splice(0).forEach(function(e){return e()})},Jae=function(e){if(!$x){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Zae()}).observe(r,n),$x=function(){r.textContent="".concat(t?t--:t++)}}mF.push(e),$x()},Qae=function(e){Jae(function(){requestAnimationFrame(e)})},uu=0,ese=function(){return!!uu},tse=250,rse={attributes:!0,characterData:!0,childList:!0,subtree:!0},jj=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],qj=function(e){return e===void 0&&(e=0),Date.now()+e},Vx=!1,nse=(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=tse),!Vx){Vx=!0;var n=qj(t);Qae(function(){var i=!1;try{i=Xae()}finally{if(Vx=!1,t=n-qj(),!ese())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,rse)};document.body?r():Ts.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),jj.forEach(function(r){return Ts.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),jj.forEach(function(r){return Ts.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),Fw=new nse,Lj=function(e){!uu&&e>0&&Fw.start(),uu+=e,!uu&&Fw.stop()},ise=function(e){return!X_(e)&&!Wae(e)&&getComputedStyle(e).display==="inline"},ose=(function(){function e(t,r){this.target=t,this.observedBox=r||Hs.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=vF(this.target,this.observedBox,!0);return ise(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),ase=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Wc=new WeakMap,zj=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Uc=(function(){function e(){}return e.connect=function(t,r){var n=new ase(t,r);Wc.set(t,n)},e.observe=function(t,r,n){var i=Wc.get(t),o=i.observationTargets.length===0;zj(i.observationTargets,r)<0&&(o&&lo.push(i),i.observationTargets.push(new ose(r,n&&n.box)),Lj(1),Fw.schedule())},e.unobserve=function(t,r){var n=Wc.get(t),i=zj(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&lo.splice(lo.indexOf(n),1),n.observationTargets.splice(i,1),Lj(-1))},e.disconnect=function(t){var r=this,n=Wc.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),sse=(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.");Uc.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(!kj(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Uc.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(!kj(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Uc.unobserve(this,t)},e.prototype.disconnect=function(){Uc.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Hx,Bj;function lse(){if(Bj)return Hx;Bj=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return Hx=e,Hx}var cse=lse();const bF=Li(cse);var Fj={},Wx,$j;function use(){if($j)return Wx;$j=1;var e=dl(),t=Ca(),r=Md(),n=zd(),i=TypeError,o="Reduce of empty array with no initial value",a=function(s){return function(c,u,d,p){var v=t(c),h=r(v),x=n(v);if(e(u),x===0&&d<2)throw new i(o);var b=s?x-1:0,m=s?-1:1;if(d<2)for(;;){if(b in h){p=h[b],b+=m;break}if(b+=m,s?b<0:x<=b)throw new i(o)}for(;s?b>=0:x>b;b+=m)b in h&&(p=u(p,h[b],b,v));return p}};return Wx={left:a(!1),right:a(!0)},Wx}var Ux,Vj;function dse(){if(Vj)return Ux;Vj=1;var e=wt();return Ux=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},Ux}var Gx,Hj;function fse(){if(Hj)return Gx;Hj=1;var e=Vt(),t=jB(),r=Bi(),n=function(i){return t.slice(0,i.length)===i};return Gx=(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"})(),Gx}var Kx,Wj;function pse(){if(Wj)return Kx;Wj=1;var e=fse();return Kx=e==="NODE",Kx}var Uj;function hse(){if(Uj)return Fj;Uj=1;var e=Fi(),t=use().left,r=dse(),n=j_(),i=pse(),o=!i&&n>79&&n<83,a=o||!r("reduce");return e({target:"Array",proto:!0,forced:a},{reduce:function(c){var u=arguments.length;return t(this,c,u,u>1?arguments[1]:void 0)}}),Fj}hse();var Gj={},Yx,Kj;function yF(){if(Kj)return Yx;Kj=1;var e=gn();return Yx=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},Yx}var Xx,Yj;function vse(){if(Yj)return Xx;Yj=1;var e=wt(),t=Vt(),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 Xx={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},Xx}var Zx,Xj;function gse(){if(Xj)return Zx;Xj=1;var e=wt(),t=Vt(),r=t.RegExp;return Zx=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
109
- `)&&n.flags==="s")}),Zx}var Jx,Zj;function mse(){if(Zj)return Jx;Zj=1;var e=wt(),t=Vt(),r=t.RegExp;return Jx=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),Jx}var Qx,Jj;function Z_(){if(Jj)return Qx;Jj=1;var e=qr(),t=mt(),r=xo(),n=yF(),i=vse(),o=B_(),a=Fd(),s=Ia().get,c=gse(),u=mse(),d=o("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,v=p,h=t("".charAt),x=t("".indexOf),b=t("".replace),m=t("".slice),w=(function(){var E=/a/,I=/b*/g;return e(p,E,"a"),e(p,I,"a"),E.lastIndex!==0||I.lastIndex!==0})(),y=i.BROKEN_CARET,_=/()??/.exec("")[1]!==void 0,S=w||_||y||c||u;return S&&(v=function(I){var N=this,T=s(N),k=r(I),L=T.raw,B,A,z,P,K,$,Y;if(L)return L.lastIndex=N.lastIndex,B=e(v,L,k),N.lastIndex=L.lastIndex,B;var U=T.groups,Z=y&&N.sticky,D=e(n,N),W=N.source,Q=0,ee=k;if(Z&&(D=b(D,"y",""),x(D,"g")===-1&&(D+="g"),ee=m(k,N.lastIndex),N.lastIndex>0&&(!N.multiline||N.multiline&&h(k,N.lastIndex-1)!==`
110
- `)&&(W="(?: "+W+")",ee=" "+ee,Q++),A=new RegExp("^(?:"+W+")",D)),_&&(A=new RegExp("^"+W+"$(?!\\s)",D)),w&&(z=N.lastIndex),P=e(p,Z?A:N,ee),Z?P?(P.input=m(P.input,Q),P[0]=m(P[0],Q),P.index=N.lastIndex,N.lastIndex+=P[0].length):N.lastIndex=0:w&&P&&(N.lastIndex=N.global?P.index+P[0].length:z),_&&P&&P.length>1&&e(d,P[0],A,function(){for(K=1;K<arguments.length-2;K++)arguments[K]===void 0&&(P[K]=void 0)}),P&&U)for(P.groups=$=a(null),K=0;K<U.length;K++)Y=U[K],$[Y[0]]=P[Y[1]];return P}),Qx=v,Qx}var Qj;function xF(){if(Qj)return Gj;Qj=1;var e=Fi(),t=Z_();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),Gj}xF();var e2={},ew,t2;function wF(){if(t2)return ew;t2=1,xF();var e=qr(),t=yo(),r=Z_(),n=wt(),i=Or(),o=pl(),a=i("species"),s=RegExp.prototype;return ew=function(c,u,d,p){var v=i(c),h=!n(function(){var w={};return w[v]=function(){return 7},""[c](w)!==7}),x=h&&!n(function(){var w=!1,y=/a/;return c==="split"&&(y={},y.constructor={},y.constructor[a]=function(){return y},y.flags="",y[v]=/./[v]),y.exec=function(){return w=!0,null},y[v](""),!w});if(!h||!x||d){var b=/./[v],m=u(v,""[c],function(w,y,_,S,E){var I=y.exec;return I===r||I===s.exec?h&&!E?{done:!0,value:e(b,y,_,S)}:{done:!0,value:e(w,_,y,S)}:{done:!1}});t(String.prototype,c,m[0]),t(s,v,m[1])}p&&o(s[v],"sham",!0)},ew}var tw,r2;function _F(){if(r2)return tw;r2=1;var e=aF().charAt;return tw=function(t,r,n){return r+(n?e(t,r).length:1)},tw}var rw,n2;function bse(){if(n2)return rw;n2=1;var e=Vt(),t=wt(),r=e.RegExp,n=!t(function(){var i=!0;try{r(".","d")}catch{i=!1}var o={},a="",s=i?"dgimsy":"gimsy",c=function(v,h){Object.defineProperty(o,v,{get:function(){return a+=h,!0}})},u={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};i&&(u.hasIndices="d");for(var d in u)c(d,u[d]);var p=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(o);return p!==s||a!==s});return rw={correct:n},rw}var nw,i2;function EF(){if(i2)return nw;i2=1;var e=qr(),t=vn(),r=Dd(),n=bse(),i=yF(),o=RegExp.prototype;return nw=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},nw}var iw,o2;function SF(){if(o2)return iw;o2=1;var e=qr(),t=gn(),r=Yt(),n=Bi(),i=Z_(),o=TypeError;return iw=function(a,s){var c=a.exec;if(r(c)){var u=e(c,a,s);return u!==null&&t(u),u}if(n(a)==="RegExp")return e(i,a,s);throw new o("RegExp#exec called on incompatible receiver")},iw}var a2;function yse(){if(a2)return e2;a2=1;var e=qr(),t=mt(),r=wF(),n=gn(),i=ar(),o=W_(),a=xo(),s=bo(),c=fl(),u=_F(),d=EF(),p=SF(),v=t("".indexOf);return r("match",function(h,x,b){return[function(w){var y=s(this),_=i(w)?c(w,h):void 0;return _?e(_,w,y):new RegExp(w)[h](a(y))},function(m){var w=n(this),y=a(m),_=b(x,w,y);if(_.done)return _.value;var S=a(d(w));if(v(S,"g")===-1)return p(w,y);var E=v(S,"u")!==-1;w.lastIndex=0;for(var I=[],N=0,T;(T=p(w,y))!==null;){var k=a(T[0]);I[N]=k,k===""&&(w.lastIndex=u(y,o(w.lastIndex),E)),N++}return N===0?null:I}]}),e2}yse();var s2={},ow,l2;function xse(){if(l2)return ow;l2=1;var e=UB(),t=hi();return ow=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)},ow}var c2;function wse(){if(c2)return s2;c2=1;var e=kn(),t=V_().EXISTS,r=mt(),n=xse(),i=Function.prototype,o=r(i.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=r(a.exec),c="name";return e&&!t&&n(i,c,{configurable:!0,get:function(){try{return s(a,o(this))[1]}catch{return""}}}),s2}wse();var u2={},aw,d2;function _se(){if(d2)return aw;d2=1;var e=kd(),t=Function.prototype,r=t.apply,n=t.call;return aw=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),aw}var sw,f2;function Ese(){if(f2)return sw;f2=1;var e=mt(),t=Ca(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return sw=function(c,u,d,p,v,h){var x=d+c.length,b=p.length,m=s;return v!==void 0&&(v=t(v),m=a),i(h,m,function(w,y){var _;switch(n(y,0)){case"$":return"$";case"&":return c;case"`":return o(u,0,d);case"'":return o(u,x);case"<":_=v[o(y,1,-1)];break;default:var S=+y;if(S===0)return w;if(S>b){var E=r(S/10);return E===0?w:E<=b?p[E-1]===void 0?n(y,1):p[E-1]+n(y,1):w}_=p[S-1]}return _===void 0?"":_})},sw}var p2;function Sse(){if(p2)return u2;p2=1;var e=_se(),t=qr(),r=mt(),n=wF(),i=wt(),o=gn(),a=Yt(),s=ar(),c=Ld(),u=W_(),d=xo(),p=bo(),v=_F(),h=fl(),x=Ese(),b=EF(),m=SF(),w=Or(),y=w("replace"),_=Math.max,S=Math.min,E=r([].concat),I=r([].push),N=r("".indexOf),T=r("".slice),k=function(z){return z===void 0?z:String(z)},L=(function(){return"a".replace(/./,"$0")==="$0"})(),B=(function(){return/./[y]?/./[y]("a","$0")==="":!1})(),A=!i(function(){var z=/./;return z.exec=function(){var P=[];return P.groups={a:"7"},P},"".replace(z,"$<a>")!=="7"});return n("replace",function(z,P,K){var $=B?"$":"$0";return[function(U,Z){var D=p(this),W=s(U)?h(U,y):void 0;return W?t(W,U,D,Z):t(P,d(D),U,Z)},function(Y,U){var Z=o(this),D=d(Y);if(typeof U=="string"&&N(U,$)===-1&&N(U,"$<")===-1){var W=K(P,Z,D,U);if(W.done)return W.value}var Q=a(U);Q||(U=d(U));var ee=d(b(Z)),j=N(ee,"g")!==-1,F;j&&(F=N(ee,"u")!==-1,Z.lastIndex=0);for(var G=[],q;q=m(Z,D),!(q===null||(I(G,q),!j));){var X=d(q[0]);X===""&&(Z.lastIndex=v(D,u(Z.lastIndex),F))}for(var te="",ne=0,de=0;de<G.length;de++){q=G[de];for(var re=d(q[0]),ge=_(S(c(q.index),D.length),0),ue=[],xe,le=1;le<q.length;le++)I(ue,k(q[le]));var se=q.groups;if(Q){var we=E([re],ue,ge,D);se!==void 0&&I(we,se),xe=d(e(U,void 0,we))}else xe=x(re,D,ge,ue,se,U);ge>=ne&&(te+=T(D,ne,ge)+xe,ne=ge+re.length)}return te+T(D,ne)}]},!A||!L||B),u2}Sse();function Ti(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function du(e){return!e||!e.ownerDocument?document:e.ownerDocument}var Go=null,h2=null;bF&&window.addEventListener("resize",function(){h2!==window.devicePixelRatio&&(h2=window.devicePixelRatio,Go=null)});function v2(e){if(Go===null){var t=du(e);if(typeof t>"u")return Go=0,Go;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),Go=i}return Go}var Vu=(function(){function e(r,n){var i=this;this.onScroll=function(){var o=Ti(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,s;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)&&(s=i.isWithinBounds(i.axis.y.track.rect)),(a||s)&&(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")),s&&(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,s=i.axis[i.draggedAxis].track,c=s.rect[i.axis[i.draggedAxis].sizeAttr],u=i.axis[i.draggedAxis].scrollbar,d=i.contentWrapperEl[i.axis[i.draggedAxis].scrollSizeAttr],p=parseInt(i.elStyles[i.axis[i.draggedAxis].sizeAttr],10);o.preventDefault(),o.stopPropagation(),i.draggedAxis==="y"?a=o.pageY:a=o.pageX;var v=a-s.rect[i.axis[i.draggedAxis].offsetAttr]-i.axis[i.draggedAxis].dragOffset,h=v/(c-u.size),x=h*(d-p);i.draggedAxis==="x"&&(x=i.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?x-(c+u.size):x,x=i.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-x:x),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=x},this.onEndDrag=function(o){var a=du(i.el),s=Ti(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=s.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=Ij(this.recalculate.bind(this),64),this.onMouseMove=Ij(this.onMouseMove.bind(this),64),this.hideScrollbars=Nj(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Nj(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=Bae(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),s=e.getOffset(o);i.scrollLeft=999;var c=e.getOffset(o);return{isRtlScrollingInverted:a.left!==s.left&&s.left-c.left!==0,isRtlScrollbarInverted:a.left!==s.left}},e.getOffset=function(n){var i=n.getBoundingClientRect(),o=du(n),a=Ti(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),bF&&(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=Ti(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,s=i.ResizeObserver||sse;this.resizeObserver=new s(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=Ti(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,s=this.contentWrapperEl.offsetWidth,c=this.elStyles.overflowX,u=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 d=this.contentEl.scrollHeight,p=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=i?"auto":"100%",this.placeholderEl.style.width=o?a+"px":"auto",this.placeholderEl.style.height=d+"px";var v=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=p>a,this.axis.y.isOverflowing=d>v,this.axis.x.isOverflowing=c==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=u==="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 h=this.axis.x.isOverflowing?this.scrollbarWidth:0,x=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&p>s-x,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&d>v-h,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,s=o/i;return a=Math.max(~~(s*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),s=this.axis[n].scrollbar,c=this.contentWrapperEl[this.axis[n].scrollOffsetAttr];c=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-c:c;var u=c/(i-a),d=~~((o-s.size)*u);d=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?d+(o-s.size):d,s.el.style.transform=n==="x"?"translate3d("+d+"px, 0, 0)":"translate3d(0, "+d+"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=du(this.el),a=Ti(this.el),s=this.axis[i].scrollbar,c=i==="y"?n.pageY:n.pageX;this.axis[i].dragOffset=c-s.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=Ti(this.el);this.axis[i].scrollbar.rect=this.axis[i].scrollbar.el.getBoundingClientRect();var s=this.axis[i].scrollbar,c=s.rect[this.axis[i].offsetAttr],u=parseInt(this.elStyles[this.axis[i].sizeAttr],10),d=this.contentWrapperEl[this.axis[i].scrollOffsetAttr],p=i==="y"?this.mouseY-c:this.mouseX-c,v=p<0?-1:1,h=v===-1?d-u:d+u,x=function b(){if(v===-1){if(d>h){var m;d-=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((m={},m[o.axis[i].offsetAttr]=d,m)),a.requestAnimationFrame(b)}}else if(d<h){var w;d+=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((w={},w[o.axis[i].offsetAttr]=d,w)),a.requestAnimationFrame(b)}};x()}},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:v2(this.el)}catch{return v2(this.el)}},t.removeListeners=function(){var n=this,i=Ti(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})();Vu.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};Vu.instances=new WeakMap;function g2(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 Gc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g2(Object(r),!0).forEach(function(n){Ose(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ose(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hu(){return Hu=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},Hu.apply(this,arguments)}function Cse(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 Ise(e,t){if(e==null)return{};var r=Cse(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 Rse=["children","scrollableNodeProps","tag"],Nse=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(s,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},Vd=C.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,s=Ise(e,Rse),c=a,u,d=C.useRef(),p=C.useRef(),v=C.useRef(),h={},x={},b=[];return Object.keys(s).forEach(function(m){Object.prototype.hasOwnProperty.call(Vu.defaultOptions,m)?h[m]=s[m]:m.match(/data-simplebar-(.+)/)&&m!=="data-simplebar-direction"?b.push({name:m,value:s[m]}):x[m]=s[m]}),b.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
65
+ `)+me+`return __p
66
+ }`;var je=j1(function(){return Ue(q,Ce+"return "+me).apply(r,V)});if(je.source=me,jf(je))throw je;return je}function rz(s){return Ge(s).toLowerCase()}function nz(s){return Ge(s).toUpperCase()}function iz(s,l,g){if(s=Ge(s),s&&(g||l===r))return Uw(s);if(!s||!(l=tr(l)))return s;var O=Pr(s),P=Pr(l),q=Vw(O,P),V=Ww(O,P)+1;return Dn(O,q,V).join("")}function oz(s,l,g){if(s=Ge(s),s&&(g||l===r))return s.slice(0,Kw(s)+1);if(!s||!(l=tr(l)))return s;var O=Pr(s),P=Ww(O,Pr(l))+1;return Dn(O,0,P).join("")}function az(s,l,g){if(s=Ge(s),s&&(g||l===r))return s.replace(Ao,"");if(!s||!(l=tr(l)))return s;var O=Pr(s),P=Vw(O,Pr(l));return Dn(O,P).join("")}function sz(s,l){var g=L,O=B;if(ft(l)){var P="separator"in l?l.separator:P;g="length"in l?De(l.length):g,O="omission"in l?tr(l.omission):O}s=Ge(s);var q=s.length;if(ji(s)){var V=Pr(s);q=V.length}if(g>=q)return s;var Y=g-qi(O);if(Y<1)return O;var ne=V?Dn(V,0,Y).join(""):s.slice(0,Y);if(P===r)return ne+O;if(V&&(Y+=ne.length-Y),qf(P)){if(s.slice(Y).search(P)){var pe,ge=ne;for(P.global||(P=Zl(P.source,Ge(ls.exec(P))+"g")),P.lastIndex=0;pe=P.exec(ge);)var me=pe.index;ne=ne.slice(0,me===r?Y:me)}}else if(s.indexOf(tr(P),Y)!=Y){var be=ne.lastIndexOf(P);be>-1&&(ne=ne.slice(0,be))}return ne+O}function uz(s){return s=Ge(s),s&&gl.test(s)?s.replace(ts,kL):s}var cz=Hi(function(s,l,g){return s+(g?" ":"")+l.toUpperCase()}),Bf=q_("toUpperCase");function D1(s,l,g){return s=Ge(s),l=g?r:l,l===r?AL(s)?FL(s):EL(s):s.match(l)||[]}var j1=ke(function(s,l){try{return Qt(s,r,l)}catch(g){return jf(g)?g:new Ae(g)}}),lz=dn(function(s,l){return dr(l,function(g){g=Gr(g),ln(s,g,Mf(s[g],s))}),s});function fz(s){var l=s==null?0:s.length,g=Re();return s=l?ct(s,function(O){if(typeof O[1]!="function")throw new hr(a);return[g(O[0]),O[1]]}):[],ke(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 dz(s){return kB(vr(s,h))}function Ff(s){return function(){return s}}function hz(s,l){return s==null||s!==s?l:s}var pz=L_(),vz=L_(!0);function Vt(s){return s}function $f(s){return p_(typeof s=="function"?s:vr(s,h))}function gz(s){return g_(vr(s,h))}function mz(s,l){return m_(s,vr(l,h))}var yz=ke(function(s,l){return function(g){return Uo(g,s,l)}}),bz=ke(function(s,l){return function(g){return Uo(s,g,l)}});function zf(s,l,g){var O=St(l),P=zs(l,O);g==null&&!(ft(l)&&(P.length||!O.length))&&(g=l,l=s,s=this,P=zs(l,St(l)));var q=!(ft(g)&&"chain"in g)||!!g.chain,V=pn(s);return dr(P,function(Y){var ne=l[Y];s[Y]=ne,V&&(s.prototype[Y]=function(){var pe=this.__chain__;if(q||pe){var ge=s(this.__wrapped__),me=ge.__actions__=zt(this.__actions__);return me.push({func:ne,args:arguments,thisArg:s}),ge.__chain__=pe,ge}return ne.apply(s,In([this.value()],arguments))})}),s}function xz(){return Rt._===this&&(Rt._=WL),this}function Hf(){}function wz(s){return s=De(s),ke(function(l){return y_(l,s)})}var _z=xf(ct),Ez=xf(Bw),Sz=xf(Ul);function q1(s){return Rf(s)?Vl(Gr(s)):eF(s)}function Oz(s){return function(l){return s==null?r:ri(s,l)}}var Cz=F_(),Rz=F_(!0);function Uf(){return[]}function Vf(){return!1}function Iz(){return{}}function Pz(){return""}function Nz(){return!0}function Tz(s,l){if(s=De(s),s<1||s>Z)return[];var g=Q,O=At(s,Q);l=Re(l),s-=Q;for(var P=Kl(O,l);++g<s;)l(g);return P}function Az(s){return Me(s)?ct(s,Gr):rr(s)?[s]:zt(r1(Ge(s)))}function Mz(s){var l=++UL;return Ge(s)+l}var Dz=Ks(function(s,l){return s+l},0),jz=wf("ceil"),qz=Ks(function(s,l){return s/l},1),kz=wf("floor");function Lz(s){return s&&s.length?$s(s,Vt,af):r}function Bz(s,l){return s&&s.length?$s(s,Re(l,2),af):r}function Fz(s){return zw(s,Vt)}function $z(s,l){return zw(s,Re(l,2))}function zz(s){return s&&s.length?$s(s,Vt,lf):r}function Hz(s,l){return s&&s.length?$s(s,Re(l,2),lf):r}var Uz=Ks(function(s,l){return s*l},1),Vz=wf("round"),Wz=Ks(function(s,l){return s-l},0);function Gz(s){return s&&s.length?Gl(s,Vt):0}function Kz(s,l){return s&&s.length?Gl(s,Re(l,2)):0}return M.after=g3,M.ary=h1,M.assign=n5,M.assignIn=R1,M.assignInWith=su,M.assignWith=i5,M.at=o5,M.before=p1,M.bind=Mf,M.bindAll=lz,M.bindKey=v1,M.castArray=I3,M.chain=l1,M.chunk=kF,M.compact=LF,M.concat=BF,M.cond=fz,M.conforms=dz,M.constant=Ff,M.countBy=G$,M.create=a5,M.curry=g1,M.curryRight=m1,M.debounce=y1,M.defaults=s5,M.defaultsDeep=u5,M.defer=m3,M.delay=y3,M.difference=FF,M.differenceBy=$F,M.differenceWith=zF,M.drop=HF,M.dropRight=UF,M.dropRightWhile=VF,M.dropWhile=WF,M.fill=GF,M.filter=Y$,M.flatMap=J$,M.flatMapDeep=Q$,M.flatMapDepth=e3,M.flatten=a1,M.flattenDeep=KF,M.flattenDepth=YF,M.flip=b3,M.flow=pz,M.flowRight=vz,M.fromPairs=XF,M.functions=v5,M.functionsIn=g5,M.groupBy=t3,M.initial=JF,M.intersection=QF,M.intersectionBy=e$,M.intersectionWith=t$,M.invert=y5,M.invertBy=b5,M.invokeMap=n3,M.iteratee=$f,M.keyBy=i3,M.keys=St,M.keysIn=Ut,M.map=tu,M.mapKeys=w5,M.mapValues=_5,M.matches=gz,M.matchesProperty=mz,M.memoize=nu,M.merge=E5,M.mergeWith=I1,M.method=yz,M.methodOf=bz,M.mixin=zf,M.negate=iu,M.nthArg=wz,M.omit=S5,M.omitBy=O5,M.once=x3,M.orderBy=o3,M.over=_z,M.overArgs=w3,M.overEvery=Ez,M.overSome=Sz,M.partial=Df,M.partialRight=b1,M.partition=a3,M.pick=C5,M.pickBy=P1,M.property=q1,M.propertyOf=Oz,M.pull=o$,M.pullAll=u1,M.pullAllBy=a$,M.pullAllWith=s$,M.pullAt=u$,M.range=Cz,M.rangeRight=Rz,M.rearg=_3,M.reject=c3,M.remove=c$,M.rest=E3,M.reverse=Tf,M.sampleSize=f3,M.set=I5,M.setWith=P5,M.shuffle=d3,M.slice=l$,M.sortBy=v3,M.sortedUniq=m$,M.sortedUniqBy=y$,M.split=J5,M.spread=S3,M.tail=b$,M.take=x$,M.takeRight=w$,M.takeRightWhile=_$,M.takeWhile=E$,M.tap=L$,M.throttle=O3,M.thru=eu,M.toArray=S1,M.toPairs=N1,M.toPairsIn=T1,M.toPath=Az,M.toPlainObject=C1,M.transform=N5,M.unary=C3,M.union=S$,M.unionBy=O$,M.unionWith=C$,M.uniq=R$,M.uniqBy=I$,M.uniqWith=P$,M.unset=T5,M.unzip=Af,M.unzipWith=c1,M.update=A5,M.updateWith=M5,M.values=Wi,M.valuesIn=D5,M.without=N$,M.words=D1,M.wrap=R3,M.xor=T$,M.xorBy=A$,M.xorWith=M$,M.zip=D$,M.zipObject=j$,M.zipObjectDeep=q$,M.zipWith=k$,M.entries=N1,M.entriesIn=T1,M.extend=R1,M.extendWith=su,zf(M,M),M.add=Dz,M.attempt=j1,M.camelCase=L5,M.capitalize=A1,M.ceil=jz,M.clamp=j5,M.clone=P3,M.cloneDeep=T3,M.cloneDeepWith=A3,M.cloneWith=N3,M.conformsTo=M3,M.deburr=M1,M.defaultTo=hz,M.divide=qz,M.endsWith=B5,M.eq=Tr,M.escape=F5,M.escapeRegExp=$5,M.every=K$,M.find=X$,M.findIndex=i1,M.findKey=c5,M.findLast=Z$,M.findLastIndex=o1,M.findLastKey=l5,M.floor=kz,M.forEach=f1,M.forEachRight=d1,M.forIn=f5,M.forInRight=d5,M.forOwn=h5,M.forOwnRight=p5,M.get=kf,M.gt=D3,M.gte=j3,M.has=m5,M.hasIn=Lf,M.head=s1,M.identity=Vt,M.includes=r3,M.indexOf=ZF,M.inRange=q5,M.invoke=x5,M.isArguments=oi,M.isArray=Me,M.isArrayBuffer=q3,M.isArrayLike=Ht,M.isArrayLikeObject=pt,M.isBoolean=k3,M.isBuffer=jn,M.isDate=L3,M.isElement=B3,M.isEmpty=F3,M.isEqual=$3,M.isEqualWith=z3,M.isError=jf,M.isFinite=H3,M.isFunction=pn,M.isInteger=x1,M.isLength=ou,M.isMap=w1,M.isMatch=U3,M.isMatchWith=V3,M.isNaN=W3,M.isNative=G3,M.isNil=Y3,M.isNull=K3,M.isNumber=_1,M.isObject=ft,M.isObjectLike=dt,M.isPlainObject=Xo,M.isRegExp=qf,M.isSafeInteger=X3,M.isSet=E1,M.isString=au,M.isSymbol=rr,M.isTypedArray=Vi,M.isUndefined=Z3,M.isWeakMap=J3,M.isWeakSet=Q3,M.join=r$,M.kebabCase=z5,M.last=mr,M.lastIndexOf=n$,M.lowerCase=H5,M.lowerFirst=U5,M.lt=e5,M.lte=t5,M.max=Lz,M.maxBy=Bz,M.mean=Fz,M.meanBy=$z,M.min=zz,M.minBy=Hz,M.stubArray=Uf,M.stubFalse=Vf,M.stubObject=Iz,M.stubString=Pz,M.stubTrue=Nz,M.multiply=Uz,M.nth=i$,M.noConflict=xz,M.noop=Hf,M.now=ru,M.pad=V5,M.padEnd=W5,M.padStart=G5,M.parseInt=K5,M.random=k5,M.reduce=s3,M.reduceRight=u3,M.repeat=Y5,M.replace=X5,M.result=R5,M.round=Vz,M.runInContext=ee,M.sample=l3,M.size=h3,M.snakeCase=Z5,M.some=p3,M.sortedIndex=f$,M.sortedIndexBy=d$,M.sortedIndexOf=h$,M.sortedLastIndex=p$,M.sortedLastIndexBy=v$,M.sortedLastIndexOf=g$,M.startCase=Q5,M.startsWith=ez,M.subtract=Wz,M.sum=Gz,M.sumBy=Kz,M.template=tz,M.times=Tz,M.toFinite=vn,M.toInteger=De,M.toLength=O1,M.toLower=rz,M.toNumber=yr,M.toSafeInteger=r5,M.toString=Ge,M.toUpper=nz,M.trim=iz,M.trimEnd=oz,M.trimStart=az,M.truncate=sz,M.unescape=uz,M.uniqueId=Mz,M.upperCase=cz,M.upperFirst=Bf,M.each=f1,M.eachRight=d1,M.first=s1,zf(M,(function(){var s={};return Vr(M,function(l,g){Ze.call(M.prototype,g)||(s[g]=l)}),s})(),{chain:!1}),M.VERSION=n,dr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){M[s].placeholder=M}),dr(["drop","take"],function(s,l){Fe.prototype[s]=function(g){g=g===r?1:_t(De(g),0);var O=this.__filtered__&&!l?new Fe(this):this.clone();return O.__filtered__?O.__takeCount__=At(g,O.__takeCount__):O.__views__.push({size:At(g,Q),type:s+(O.__dir__<0?"Right":"")}),O},Fe.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),dr(["filter","map","takeWhile"],function(s,l){var g=l+1,O=g==T||g==z;Fe.prototype[s]=function(P){var q=this.clone();return q.__iteratees__.push({iteratee:Re(P,3),type:g}),q.__filtered__=q.__filtered__||O,q}}),dr(["head","last"],function(s,l){var g="take"+(l?"Right":"");Fe.prototype[s]=function(){return this[g](1).value()[0]}}),dr(["initial","tail"],function(s,l){var g="drop"+(l?"":"Right");Fe.prototype[s]=function(){return this.__filtered__?new Fe(this):this[g](1)}}),Fe.prototype.compact=function(){return this.filter(Vt)},Fe.prototype.find=function(s){return this.filter(s).head()},Fe.prototype.findLast=function(s){return this.reverse().find(s)},Fe.prototype.invokeMap=ke(function(s,l){return typeof s=="function"?new Fe(this):this.map(function(g){return Uo(g,s,l)})}),Fe.prototype.reject=function(s){return this.filter(iu(Re(s)))},Fe.prototype.slice=function(s,l){s=De(s);var g=this;return g.__filtered__&&(s>0||l<0)?new Fe(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),l!==r&&(l=De(l),g=l<0?g.dropRight(-l):g.take(l-s)),g)},Fe.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Fe.prototype.toArray=function(){return this.take(Q)},Vr(Fe.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 V=this.__wrapped__,Y=O?[1]:arguments,ne=V instanceof Fe,pe=Y[0],ge=ne||Me(V),me=function(Le){var $e=P.apply(M,In([Le],Y));return O&&be?$e[0]:$e};ge&&g&&typeof pe=="function"&&pe.length!=1&&(ne=ge=!1);var be=this.__chain__,Ce=!!this.__actions__.length,Ie=q&&!be,je=ne&&!Ce;if(!q&&ge){V=je?V:new Fe(this);var Pe=s.apply(V,Y);return Pe.__actions__.push({func:eu,args:[me],thisArg:r}),new pr(Pe,be)}return Ie&&je?s.apply(this,Y):(Pe=this.thru(me),Ie?O?Pe.value()[0]:Pe.value():Pe)})}),dr(["pop","push","shift","sort","splice","unshift"],function(s){var l=Cs[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(V){return l.apply(Me(V)?V:[],P)})}}),Vr(Fe.prototype,function(s,l){var g=M[l];if(g){var O=g.name+"";Ze.call(Fi,O)||(Fi[O]=[]),Fi[O].push({name:l,func:g})}}),Fi[Gs(r,b).name]=[{name:"wrapper",func:r}],Fe.prototype.clone=uB,Fe.prototype.reverse=cB,Fe.prototype.value=lB,M.prototype.at=B$,M.prototype.chain=F$,M.prototype.commit=$$,M.prototype.next=z$,M.prototype.plant=U$,M.prototype.reverse=V$,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=W$,M.prototype.first=M.prototype.head,ko&&(M.prototype[ko]=H$),M}),ki=$L();Zn?((Zn.exports=ki)._=ki,Fl._=ki):Rt._=ki}).call(sZ)})(Sa,Sa.exports)),Sa.exports}var vc=uZ(),xN={},na,wN;function bt(){if(wN)return na;wN=1;var e=function(t){return t&&t.Math===Math&&t};return na=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof ht=="object"&&ht)||e(typeof na=="object"&&na)||(function(){return this})()||Function("return this")(),na}var Fm={},$m,_N;function at(){return _N||(_N=1,$m=function(e){try{return!!e()}catch{return!0}}),$m}var zm,EN;function zr(){if(EN)return zm;EN=1;var e=at();return zm=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),zm}var Hm,SN;function tl(){if(SN)return Hm;SN=1;var e=at();return Hm=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Hm}var Um,ON;function Zt(){if(ON)return Um;ON=1;var e=tl(),t=Function.prototype.call;return Um=e?t.bind(t):function(){return t.apply(t,arguments)},Um}var Vm={},CN;function tk(){if(CN)return Vm;CN=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Vm.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,Vm}var Wm,RN;function aw(){return RN||(RN=1,Wm=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),Wm}var Gm,IN;function it(){if(IN)return Gm;IN=1;var e=tl(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Gm=e?n:function(i){return function(){return r.apply(i,arguments)}},Gm}var Km,PN;function Gn(){if(PN)return Km;PN=1;var e=it(),t=e({}.toString),r=e("".slice);return Km=function(n){return r(t(n),8,-1)},Km}var Ym,NN;function rl(){if(NN)return Ym;NN=1;var e=it(),t=at(),r=Gn(),n=Object,i=e("".split);return Ym=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,Ym}var Xm,TN;function Xa(){return TN||(TN=1,Xm=function(e){return e==null}),Xm}var Zm,AN;function Ci(){if(AN)return Zm;AN=1;var e=Xa(),t=TypeError;return Zm=function(r){if(e(r))throw new t("Can't call method on "+r);return r},Zm}var Jm,MN;function Ro(){if(MN)return Jm;MN=1;var e=rl(),t=Ci();return Jm=function(r){return e(t(r))},Jm}var Qm,DN;function Et(){if(DN)return Qm;DN=1;var e=typeof document=="object"&&document.all;return Qm=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},Qm}var ey,jN;function Nt(){if(jN)return ey;jN=1;var e=Et();return ey=function(t){return typeof t=="object"?t!==null:e(t)},ey}var ty,qN;function nl(){if(qN)return ty;qN=1;var e=bt(),t=Et(),r=function(n){return t(n)?n:void 0};return ty=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},ty}var ry,kN;function il(){if(kN)return ry;kN=1;var e=it();return ry=e({}.isPrototypeOf),ry}var ny,LN;function rk(){if(LN)return ny;LN=1;var e=bt(),t=e.navigator,r=t&&t.userAgent;return ny=r?String(r):"",ny}var iy,BN;function sw(){if(BN)return iy;BN=1;var e=bt(),t=rk(),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]))),iy=u,iy}var oy,FN;function nk(){if(FN)return oy;FN=1;var e=sw(),t=at(),r=bt(),n=r.String;return oy=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),oy}var ay,$N;function ik(){if($N)return ay;$N=1;var e=nk();return ay=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ay}var sy,zN;function ok(){if(zN)return sy;zN=1;var e=nl(),t=Et(),r=il(),n=ik(),i=Object;return sy=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},sy}var uy,HN;function uw(){if(HN)return uy;HN=1;var e=String;return uy=function(t){try{return e(t)}catch{return"Object"}},uy}var cy,UN;function Za(){if(UN)return cy;UN=1;var e=Et(),t=uw(),r=TypeError;return cy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},cy}var ly,VN;function Ja(){if(VN)return ly;VN=1;var e=Za(),t=Xa();return ly=function(r,n){var i=r[n];return t(i)?void 0:e(i)},ly}var fy,WN;function cZ(){if(WN)return fy;WN=1;var e=Zt(),t=Et(),r=Nt(),n=TypeError;return fy=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")},fy}var dy={exports:{}},hy,GN;function ol(){return GN||(GN=1,hy=!1),hy}var py,KN;function cw(){if(KN)return py;KN=1;var e=bt(),t=Object.defineProperty;return py=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},py}var YN;function lw(){if(YN)return dy.exports;YN=1;var e=ol(),t=bt(),r=cw(),n="__core-js_shared__",i=dy.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.45.1",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"}),dy.exports}var vy,XN;function fw(){if(XN)return vy;XN=1;var e=lw();return vy=function(t,r){return e[t]||(e[t]=r||{})},vy}var gy,ZN;function Io(){if(ZN)return gy;ZN=1;var e=Ci(),t=Object;return gy=function(r){return t(e(r))},gy}var my,JN;function Rr(){if(JN)return my;JN=1;var e=it(),t=Io(),r=e({}.hasOwnProperty);return my=Object.hasOwn||function(i,o){return r(t(i),o)},my}var yy,QN;function dw(){if(QN)return yy;QN=1;var e=it(),t=0,r=Math.random(),n=e(1.1.toString);return yy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},yy}var by,eT;function $t(){if(eT)return by;eT=1;var e=bt(),t=fw(),r=Rr(),n=dw(),i=nk(),o=ik(),a=e.Symbol,u=t("wks"),c=o?a.for||a:a&&a.withoutSetter||n;return by=function(d){return r(u,d)||(u[d]=i&&r(a,d)?a[d]:c("Symbol."+d)),u[d]},by}var xy,tT;function lZ(){if(tT)return xy;tT=1;var e=Zt(),t=Nt(),r=ok(),n=Ja(),i=cZ(),o=$t(),a=TypeError,u=o("toPrimitive");return xy=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)},xy}var wy,rT;function ak(){if(rT)return wy;rT=1;var e=lZ(),t=ok();return wy=function(r){var n=e(r,"string");return t(n)?n:n+""},wy}var _y,nT;function hw(){if(nT)return _y;nT=1;var e=bt(),t=Nt(),r=e.document,n=t(r)&&t(r.createElement);return _y=function(i){return n?r.createElement(i):{}},_y}var Ey,iT;function sk(){if(iT)return Ey;iT=1;var e=zr(),t=at(),r=hw();return Ey=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Ey}var oT;function uk(){if(oT)return Fm;oT=1;var e=zr(),t=Zt(),r=tk(),n=aw(),i=Ro(),o=ak(),a=Rr(),u=sk(),c=Object.getOwnPropertyDescriptor;return Fm.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])},Fm}var Sy={},Oy,aT;function ck(){if(aT)return Oy;aT=1;var e=zr(),t=at();return Oy=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Oy}var Cy,sT;function Ir(){if(sT)return Cy;sT=1;var e=Nt(),t=String,r=TypeError;return Cy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Cy}var uT;function On(){if(uT)return Sy;uT=1;var e=zr(),t=sk(),r=ck(),n=Ir(),i=ak(),o=TypeError,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c="enumerable",d="configurable",f="writable";return Sy.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},Sy}var Ry,cT;function Qa(){if(cT)return Ry;cT=1;var e=zr(),t=On(),r=aw();return Ry=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},Ry}var Iy={exports:{}},Py,lT;function pw(){if(lT)return Py;lT=1;var e=zr(),t=Rr(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,i=t(r,"name"),o=i&&(function(){}).name==="something",a=i&&(!e||e&&n(r,"name").configurable);return Py={EXISTS:i,PROPER:o,CONFIGURABLE:a},Py}var Ny,fT;function lk(){if(fT)return Ny;fT=1;var e=it(),t=Et(),r=lw(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),Ny=r.inspectSource,Ny}var Ty,dT;function fk(){if(dT)return Ty;dT=1;var e=bt(),t=Et(),r=e.WeakMap;return Ty=t(r)&&/native code/.test(String(r)),Ty}var Ay,hT;function vw(){if(hT)return Ay;hT=1;var e=fw(),t=dw(),r=e("keys");return Ay=function(n){return r[n]||(r[n]=t(n))},Ay}var My,pT;function al(){return pT||(pT=1,My={}),My}var Dy,vT;function Po(){if(vT)return Dy;vT=1;var e=fk(),t=bt(),r=Nt(),n=Qa(),i=Rr(),o=lw(),a=vw(),u=al(),c="Object already initialized",d=t.TypeError,f=t.WeakMap,h,p,v,m=function(w){return v(w)?p(w):h(w,{})},y=function(w){return function(S){var E;if(!r(S)||(E=p(S)).type!==w)throw new d("Incompatible receiver, "+w+" required");return E}};if(e||o.state){var x=o.state||(o.state=new f);x.get=x.get,x.has=x.has,x.set=x.set,h=function(w,S){if(x.has(w))throw new d(c);return S.facade=w,x.set(w,S),S},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,S){if(i(w,b))throw new d(c);return S.facade=w,n(w,b,S),S},p=function(w){return i(w,b)?w[b]:{}},v=function(w){return i(w,b)}}return Dy={set:h,get:p,has:v,enforce:m,getterFor:y},Dy}var gT;function dk(){if(gT)return Iy.exports;gT=1;var e=it(),t=at(),r=Et(),n=Rr(),i=zr(),o=pw().CONFIGURABLE,a=lk(),u=Po(),c=u.enforce,d=u.get,f=String,h=Object.defineProperty,p=e("".slice),v=e("".replace),m=e([].join),y=i&&!t(function(){return h(function(){},"length",{value:8}).length!==8}),x=String(String).split("String"),b=Iy.exports=function(w,S,E){p(f(S),0,7)==="Symbol("&&(S="["+v(f(S),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),E&&E.getter&&(S="get "+S),E&&E.setter&&(S="set "+S),(!n(w,"name")||o&&w.name!==S)&&(i?h(w,"name",{value:S,configurable:!0}):w.name=S),y&&E&&n(E,"arity")&&w.length!==E.arity&&h(w,"length",{value:E.arity});try{E&&n(E,"constructor")&&E.constructor?i&&h(w,"prototype",{writable:!1}):w.prototype&&(w.prototype=void 0)}catch{}var _=c(w);return n(_,"source")||(_.source=m(x,typeof S=="string"?S:"")),w};return Function.prototype.toString=b(function(){return r(this)&&d(this).source||a(this)},"toString"),Iy.exports}var jy,mT;function Ri(){if(mT)return jy;mT=1;var e=Et(),t=On(),r=dk(),n=cw();return jy=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},jy}var qy={},ky,yT;function fZ(){if(yT)return ky;yT=1;var e=Math.ceil,t=Math.floor;return ky=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},ky}var Ly,bT;function sl(){if(bT)return Ly;bT=1;var e=fZ();return Ly=function(t){var r=+t;return r!==r||r===0?0:e(r)},Ly}var By,xT;function dZ(){if(xT)return By;xT=1;var e=sl(),t=Math.max,r=Math.min;return By=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},By}var Fy,wT;function gw(){if(wT)return Fy;wT=1;var e=sl(),t=Math.min;return Fy=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},Fy}var $y,_T;function ul(){if(_T)return $y;_T=1;var e=gw();return $y=function(t){return e(t.length)},$y}var zy,ET;function hZ(){if(ET)return zy;ET=1;var e=Ro(),t=dZ(),r=ul(),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 zy={includes:n(!0),indexOf:n(!1)},zy}var Hy,ST;function hk(){if(ST)return Hy;ST=1;var e=it(),t=Rr(),r=Ro(),n=hZ().indexOf,i=al(),o=e([].push);return Hy=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},Hy}var Uy,OT;function mw(){return OT||(OT=1,Uy=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Uy}var CT;function yw(){if(CT)return qy;CT=1;var e=hk(),t=mw(),r=t.concat("length","prototype");return qy.f=Object.getOwnPropertyNames||function(i){return e(i,r)},qy}var Vy={},RT;function pk(){return RT||(RT=1,Vy.f=Object.getOwnPropertySymbols),Vy}var Wy,IT;function pZ(){if(IT)return Wy;IT=1;var e=nl(),t=it(),r=yw(),n=pk(),i=Ir(),o=t([].concat);return Wy=e("Reflect","ownKeys")||function(u){var c=r.f(i(u)),d=n.f;return d?o(c,d(u)):c},Wy}var Gy,PT;function vZ(){if(PT)return Gy;PT=1;var e=Rr(),t=pZ(),r=uk(),n=On();return Gy=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))}},Gy}var Ky,NT;function vk(){if(NT)return Ky;NT=1;var e=at(),t=Et(),r=/#|\.prototype\./,n=function(c,d){var f=o[i(c)];return f===u?!0:f===a?!1:t(d)?e(d):!!d},i=n.normalize=function(c){return String(c).replace(r,".").toLowerCase()},o=n.data={},a=n.NATIVE="N",u=n.POLYFILL="P";return Ky=n,Ky}var Yy,TT;function Kn(){if(TT)return Yy;TT=1;var e=bt(),t=uk().f,r=Qa(),n=Ri(),i=cw(),o=vZ(),a=vk();return Yy=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)}},Yy}var Xy,AT;function bw(){if(AT)return Xy;AT=1;var e=$t(),t=e("toStringTag"),r={};return r[t]="z",Xy=String(r)==="[object z]",Xy}var Zy,MT;function cl(){if(MT)return Zy;MT=1;var e=bw(),t=Et(),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 Zy=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},Zy}var Jy,DT;function Ii(){if(DT)return Jy;DT=1;var e=cl(),t=String;return Jy=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},Jy}var Qy,jT;function gk(){return jT||(jT=1,Qy=`
67
+ \v\f\r                 \u2028\u2029\uFEFF`),Qy}var e0,qT;function gZ(){if(qT)return e0;qT=1;var e=it(),t=Ci(),r=Ii(),n=gk(),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 e0={start:u(1),end:u(2),trim:u(3)},e0}var t0,kT;function mZ(){if(kT)return t0;kT=1;var e=bt(),t=at(),r=it(),n=Ii(),i=gZ().trim,o=gk(),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 t0=h?function(v,m){var y=i(n(v));return a(y,m>>>0||(f(d,y)?16:10))}:a,t0}var LT;function yZ(){if(LT)return xN;LT=1;var e=Kn(),t=mZ();return e({global:!0,forced:parseInt!==t},{parseInt:t}),xN}yZ();var BT={},r0,FT;function mk(){if(FT)return r0;FT=1;var e=hk(),t=mw();return r0=Object.keys||function(n){return e(n,t)},r0}var n0,$T;function bZ(){if($T)return n0;$T=1;var e=zr(),t=it(),r=Zt(),n=at(),i=mk(),o=pk(),a=tk(),u=Io(),c=rl(),d=Object.assign,f=Object.defineProperty,h=t([].concat);return n0=!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,S=a.f;x>b;)for(var E=c(arguments[b++]),_=w?h(i(E),w(E)):i(E),R=_.length,I=0,N;R>I;)N=_[I++],(!e||r(S,E,N))&&(y[N]=E[N]);return y}:d,n0}var zT;function xZ(){if(zT)return BT;zT=1;var e=Kn(),t=bZ();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),BT}xZ();var HT={},i0,UT;function wZ(){if(UT)return i0;UT=1;var e=Gn(),t=it();return i0=function(r){if(e(r)==="Function")return t(r)},i0}var o0,VT;function yk(){if(VT)return o0;VT=1;var e=wZ(),t=Za(),r=tl(),n=e(e.bind);return o0=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},o0}var a0,WT;function _Z(){if(WT)return a0;WT=1;var e=Gn();return a0=Array.isArray||function(r){return e(r)==="Array"},a0}var s0,GT;function EZ(){if(GT)return s0;GT=1;var e=it(),t=at(),r=Et(),n=cl(),i=nl(),o=lk(),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,s0=!u||t(function(){var v;return h(h.call)||!h(Object)||!h(function(){v=!0})||v})?p:h,s0}var u0,KT;function SZ(){if(KT)return u0;KT=1;var e=_Z(),t=EZ(),r=Nt(),n=$t(),i=n("species"),o=Array;return u0=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},u0}var c0,YT;function OZ(){if(YT)return c0;YT=1;var e=SZ();return c0=function(t,r){return new(e(t))(r===0?0:r)},c0}var l0,XT;function bk(){if(XT)return l0;XT=1;var e=yk(),t=it(),r=rl(),n=Io(),i=ul(),o=OZ(),a=t([].push),u=function(c){var d=c===1,f=c===2,h=c===3,p=c===4,v=c===6,m=c===7,y=c===5||v;return function(x,b,w,S){for(var E=n(x),_=r(E),R=i(_),I=e(b,w),N=0,D=S||o,L=d?D(x,R):f||m?D(x,0):void 0,B,U;R>N;N++)if((y||N in _)&&(B=_[N],U=I(B,N,E),c))if(d)L[N]=U;else if(U)switch(c){case 3:return!0;case 5:return B;case 6:return N;case 2:a(L,B)}else switch(c){case 4:return!1;case 7:a(L,B)}return v?-1:h||p?p:L}};return l0={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)},l0}var f0,ZT;function CZ(){if(ZT)return f0;ZT=1;var e=at(),t=$t(),r=sw(),n=t("species");return f0=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},f0}var JT;function RZ(){if(JT)return HT;JT=1;var e=Kn(),t=bk().filter,r=CZ(),n=r("filter");return e({target:"Array",proto:!0,forced:!n},{filter:function(o){return t(this,o,arguments.length>1?arguments[1]:void 0)}}),HT}RZ();var QT={},d0,eA;function IZ(){if(eA)return d0;eA=1;var e=bw(),t=cl();return d0=e?{}.toString:function(){return"[object "+t(this)+"]"},d0}var tA;function PZ(){if(tA)return QT;tA=1;var e=bw(),t=Ri(),r=IZ();return e||t(Object.prototype,"toString",r,{unsafe:!0}),QT}PZ();var h0={},rA;function NZ(){if(rA)return h0;rA=1;var e=zr(),t=ck(),r=On(),n=Ir(),i=Ro(),o=mk();return h0.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},h0}var p0,nA;function TZ(){if(nA)return p0;nA=1;var e=nl();return p0=e("document","documentElement"),p0}var v0,iA;function ll(){if(iA)return v0;iA=1;var e=Ir(),t=NZ(),r=mw(),n=al(),i=TZ(),o=hw(),a=vw(),u=">",c="<",d="prototype",f="script",h=a("IE_PROTO"),p=function(){},v=function(w){return c+f+u+w+c+"/"+f+u},m=function(w){w.write(v("")),w.close();var S=w.parentWindow.Object;return w=null,S},y=function(){var w=o("iframe"),S="java"+f+":",E;return w.style.display="none",i.appendChild(w),w.src=String(S),E=w.contentWindow.document,E.open(),E.write(v("document.F=Object")),E.close(),E.F},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,v0=Object.create||function(S,E){var _;return S!==null?(p[d]=e(S),_=new p,p[d]=null,_[h]=S):_=b(),E===void 0?_:t.f(_,E)},v0}var g0,oA;function AZ(){if(oA)return g0;oA=1;var e=$t(),t=ll(),r=On().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),g0=function(o){i[n][o]=!0},g0}var m0,aA;function es(){return aA||(aA=1,m0={}),m0}var y0,sA;function MZ(){if(sA)return y0;sA=1;var e=at();return y0=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),y0}var b0,uA;function xk(){if(uA)return b0;uA=1;var e=Rr(),t=Et(),r=Io(),n=vw(),i=MZ(),o=n("IE_PROTO"),a=Object,u=a.prototype;return b0=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},b0}var x0,cA;function wk(){if(cA)return x0;cA=1;var e=at(),t=Et(),r=Nt(),n=ll(),i=xk(),o=Ri(),a=$t(),u=ol(),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}),x0={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:d},x0}var w0,lA;function fl(){if(lA)return w0;lA=1;var e=On().f,t=Rr(),r=$t(),n=r("toStringTag");return w0=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},w0}var _0,fA;function DZ(){if(fA)return _0;fA=1;var e=wk().IteratorPrototype,t=ll(),r=aw(),n=fl(),i=es(),o=function(){return this};return _0=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},_0}var E0,dA;function jZ(){if(dA)return E0;dA=1;var e=it(),t=Za();return E0=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},E0}var S0,hA;function qZ(){if(hA)return S0;hA=1;var e=Nt();return S0=function(t){return e(t)||t===null},S0}var O0,pA;function kZ(){if(pA)return O0;pA=1;var e=qZ(),t=String,r=TypeError;return O0=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},O0}var C0,vA;function _k(){if(vA)return C0;vA=1;var e=jZ(),t=Nt(),r=Ci(),n=kZ();return C0=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),C0}var R0,gA;function Ek(){if(gA)return R0;gA=1;var e=Kn(),t=Zt(),r=ol(),n=pw(),i=Et(),o=DZ(),a=xk(),u=_k(),c=fl(),d=Qa(),f=Ri(),h=$t(),p=es(),v=wk(),m=n.PROPER,y=n.CONFIGURABLE,x=v.IteratorPrototype,b=v.BUGGY_SAFARI_ITERATORS,w=h("iterator"),S="keys",E="values",_="entries",R=function(){return this};return R0=function(I,N,D,L,B,U,j){o(D,N,L);var T=function(H){if(H===B&&re)return re;if(!b&&H&&H in X)return X[H];switch(H){case S:return function(){return new D(this,H)};case E:return function(){return new D(this,H)};case _:return function(){return new D(this,H)}}return function(){return new D(this)}},G=N+" Iterator",z=!1,X=I.prototype,Z=X[w]||X["@@iterator"]||B&&X[B],re=!b&&Z||T(B),W=N==="Array"&&X.entries||Z,Q,ue,oe;if(W&&(Q=a(W.call(new I)),Q!==Object.prototype&&Q.next&&(!r&&a(Q)!==x&&(u?u(Q,x):i(Q[w])||f(Q,w,R)),c(Q,G,!0,!0),r&&(p[G]=R))),m&&B===E&&Z&&Z.name!==E&&(!r&&y?d(X,"name",E):(z=!0,re=function(){return t(Z,this)})),B)if(ue={values:T(E),keys:U?re:T(S),entries:T(_)},j)for(oe in ue)(b||z||!(oe in X))&&f(X,oe,ue[oe]);else e({target:N,proto:!0,forced:b||z},ue);return(!r||j)&&X[w]!==re&&f(X,w,re,{name:B}),p[N]=re,ue},R0}var I0,mA;function Sk(){return mA||(mA=1,I0=function(e,t){return{value:e,done:t}}),I0}var P0,yA;function Ok(){if(yA)return P0;yA=1;var e=Ro(),t=AZ(),r=es(),n=Po(),i=On().f,o=Ek(),a=Sk(),u=ol(),c=zr(),d="Array Iterator",f=n.set,h=n.getterFor(d);P0=o(Array,"Array",function(v,m){f(this,{type:d,target:e(v),index:0,kind:m})},function(){var v=h(this),m=v.target,y=v.index++;if(!m||y>=m.length)return v.target=null,a(void 0,!0);switch(v.kind){case"keys":return a(y,!1);case"values":return a(m[y],!1)}return a([y,m[y]],!1)},"values");var p=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!u&&c&&p.name!=="values")try{i(p,"name",{value:"values"})}catch{}return P0}Ok();var bA={},N0,xA;function Ck(){if(xA)return N0;xA=1;var e=it(),t=sl(),r=Ii(),n=Ci(),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 N0={codeAt:u(!1),charAt:u(!0)},N0}var wA;function LZ(){if(wA)return bA;wA=1;var e=Ck().charAt,t=Ii(),r=Po(),n=Ek(),i=Sk(),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))}),bA}LZ();var _A={},EA={},T0,SA;function Rk(){if(SA)return T0;SA=1;var e=at();return T0=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),T0}var A0,OA;function Ik(){if(OA)return A0;OA=1;var e=Ri();return A0=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},A0}var M0={exports:{}},D0={},j0,CA;function BZ(){if(CA)return j0;CA=1;var e=it();return j0=e([].slice),j0}var RA;function FZ(){if(RA)return D0;RA=1;var e=Gn(),t=Ro(),r=yw().f,n=BZ(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return D0.f=function(u){return i&&e(u)==="Window"?o(u):r(t(u))},D0}var q0,IA;function $Z(){if(IA)return q0;IA=1;var e=at();return q0=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),q0}var k0,PA;function zZ(){if(PA)return k0;PA=1;var e=at(),t=Nt(),r=Gn(),n=$Z(),i=Object.isExtensible,o=e(function(){});return k0=o||n?function(u){return!t(u)||n&&r(u)==="ArrayBuffer"?!1:i?i(u):!0}:i,k0}var NA;function xw(){if(NA)return M0.exports;NA=1;var e=Kn(),t=it(),r=al(),n=Nt(),i=Rr(),o=On().f,a=yw(),u=FZ(),c=zZ(),d=dw(),f=Rk(),h=!1,p=d("meta"),v=0,m=function(E){o(E,p,{value:{objectID:"O"+v++,weakData:{}}})},y=function(E,_){if(!n(E))return typeof E=="symbol"?E:(typeof E=="string"?"S":"P")+E;if(!i(E,p)){if(!c(E))return"F";if(!_)return"E";m(E)}return E[p].objectID},x=function(E,_){if(!i(E,p)){if(!c(E))return!0;if(!_)return!1;m(E)}return E[p].weakData},b=function(E){return f&&h&&c(E)&&!i(E,p)&&m(E),E},w=function(){S.enable=function(){},h=!0;var E=a.f,_=t([].splice),R={};R[p]=1,E(R).length&&(a.f=function(I){for(var N=E(I),D=0,L=N.length;D<L;D++)if(N[D]===p){_(N,D,1);break}return N},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},S=M0.exports={enable:w,fastKey:y,getWeakData:x,onFreeze:b};return r[p]=!0,M0.exports}var L0,TA;function HZ(){if(TA)return L0;TA=1;var e=$t(),t=es(),r=e("iterator"),n=Array.prototype;return L0=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},L0}var B0,AA;function Pk(){if(AA)return B0;AA=1;var e=cl(),t=Ja(),r=Xa(),n=es(),i=$t(),o=i("iterator");return B0=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},B0}var F0,MA;function UZ(){if(MA)return F0;MA=1;var e=Zt(),t=Za(),r=Ir(),n=uw(),i=Pk(),o=TypeError;return F0=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")},F0}var $0,DA;function VZ(){if(DA)return $0;DA=1;var e=Zt(),t=Ir(),r=Ja();return $0=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},$0}var z0,jA;function Nk(){if(jA)return z0;jA=1;var e=yk(),t=Zt(),r=Ir(),n=uw(),i=HZ(),o=ul(),a=il(),u=UZ(),c=Pk(),d=VZ(),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),S=!!(y&&y.IS_ITERATOR),E=!!(y&&y.INTERRUPTED),_=e(m,x),R,I,N,D,L,B,U,j=function(G){return R&&d(R,"normal"),new h(!0,G)},T=function(G){return b?(r(G),E?_(G[0],G[1],j):_(G[0],G[1])):E?_(G,j):_(G)};if(w)R=v.iterator;else if(S)R=v;else{if(I=c(v),!I)throw new f(n(v)+" is not iterable");if(i(I)){for(N=0,D=o(v);D>N;N++)if(L=T(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;){try{L=T(U.value)}catch(G){d(R,"throw",G)}if(typeof L=="object"&&L&&a(p,L))return L}return new h(!1)},z0}var H0,qA;function Tk(){if(qA)return H0;qA=1;var e=il(),t=TypeError;return H0=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},H0}var U0,kA;function WZ(){if(kA)return U0;kA=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 U0=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},U0}var V0,LA;function GZ(){if(LA)return V0;LA=1;var e=Et(),t=Nt(),r=_k();return V0=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},V0}var W0,BA;function KZ(){if(BA)return W0;BA=1;var e=Kn(),t=bt(),r=it(),n=vk(),i=Ri(),o=xw(),a=Nk(),u=Tk(),c=Et(),d=Xa(),f=Nt(),h=at(),p=WZ(),v=fl(),m=GZ();return W0=function(y,x,b){var w=y.indexOf("Map")!==-1,S=y.indexOf("Weak")!==-1,E=w?"set":"add",_=t[y],R=_&&_.prototype,I=_,N={},D=function(z){var X=r(R[z]);i(R,z,z==="add"?function(re){return X(this,re===0?0:re),this}:z==="delete"?function(Z){return S&&!f(Z)?!1:X(this,Z===0?0:Z)}:z==="get"?function(re){return S&&!f(re)?void 0:X(this,re===0?0:re)}:z==="has"?function(re){return S&&!f(re)?!1:X(this,re===0?0:re)}:function(re,W){return X(this,re===0?0:re,W),this})},L=n(y,!c(_)||!(S||R.forEach&&!h(function(){new _().entries().next()})));if(L)I=b.getConstructor(x,y,w,E),o.enable();else if(n(y,!0)){var B=new I,U=B[E](S?{}:-0,1)!==B,j=h(function(){B.has(1)}),T=p(function(z){new _(z)}),G=!S&&h(function(){for(var z=new _,X=5;X--;)z[E](X,X);return!z.has(-0)});T||(I=x(function(z,X){u(z,R);var Z=m(new _,z,I);return d(X)||a(X,Z[E],{that:Z,AS_ENTRIES:w}),Z}),I.prototype=R,R.constructor=I),(j||G)&&(D("delete"),D("has"),w&&D("get")),(G||U)&&D(E),S&&R.clear&&delete R.clear}return N[y]=I,e({global:!0,constructor:!0,forced:I!==_},N),v(I,y),S||b.setStrong(I,y,w),I},W0}var G0,FA;function YZ(){if(FA)return G0;FA=1;var e=it(),t=Ik(),r=xw().getWeakData,n=Tk(),i=Ir(),o=Xa(),a=Nt(),u=Nk(),c=bk(),d=Rr(),f=Po(),h=f.set,p=f.getterFor,v=c.find,m=c.findIndex,y=e([].splice),x=0,b=function(E){return E.frozen||(E.frozen=new w)},w=function(){this.entries=[]},S=function(E,_){return v(E.entries,function(R){return R[0]===_})};return w.prototype={get:function(E){var _=S(this,E);if(_)return _[1]},has:function(E){return!!S(this,E)},set:function(E,_){var R=S(this,E);R?R[1]=_:this.entries.push([E,_])},delete:function(E){var _=m(this.entries,function(R){return R[0]===E});return~_&&y(this.entries,_,1),!!~_}},G0={getConstructor:function(E,_,R,I){var N=E(function(U,j){n(U,D),h(U,{type:_,id:x++,frozen:null}),o(j)||u(j,U[I],{that:U,AS_ENTRIES:R})}),D=N.prototype,L=p(_),B=function(U,j,T){var G=L(U),z=r(i(j),!0);return z===!0?b(G).set(j,T):z[G.id]=T,U};return t(D,{delete:function(U){var j=L(this);if(!a(U))return!1;var T=r(U);return T===!0?b(j).delete(U):T&&d(T,j.id)&&delete T[j.id]},has:function(j){var T=L(this);if(!a(j))return!1;var G=r(j);return G===!0?b(T).has(j):G&&d(G,T.id)}}),t(D,R?{get:function(j){var T=L(this);if(a(j)){var G=r(j);if(G===!0)return b(T).get(j);if(G)return G[T.id]}},set:function(j,T){return B(this,j,T)}}:{add:function(j){return B(this,j,!0)}}),N}},G0}var $A;function XZ(){if($A)return EA;$A=1;var e=Rk(),t=bt(),r=it(),n=Ik(),i=xw(),o=KZ(),a=YZ(),u=Nt(),c=Po().enforce,d=at(),f=fk(),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,S,E=function(U){return function(){return U(this,arguments.length?arguments[0]:void 0)}},_=o("WeakMap",E,a),R=_.prototype,I=r(R.set),N=function(){return e&&d(function(){var U=x([]);return I(new _,U,1),!m(U)})};if(f)if(w){S=a.getConstructor(E,"WeakMap",!0),i.enable();var D=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 S),D(this,U)||j.frozen.delete(U)}return D(this,U)},has:function(j){if(u(j)&&!v(j)){var T=c(this);return T.frozen||(T.frozen=new S),L(this,j)||T.frozen.has(j)}return L(this,j)},get:function(j){if(u(j)&&!v(j)){var T=c(this);return T.frozen||(T.frozen=new S),L(this,j)?B(this,j):T.frozen.get(j)}return B(this,j)},set:function(j,T){if(u(j)&&!v(j)){var G=c(this);G.frozen||(G.frozen=new S),L(this,j)?I(this,j,T):G.frozen.set(j,T)}else I(this,j,T);return this}})}else N()&&n(R,{set:function(j,T){var G;return p(j)&&(m(j)?G=x:y(j)&&(G=b)),I(this,j,T),G&&G(j),this}});return EA}var zA;function ZZ(){return zA||(zA=1,XZ()),_A}ZZ();var HA={},K0,UA;function JZ(){return UA||(UA=1,K0={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}),K0}var Y0,VA;function QZ(){if(VA)return Y0;VA=1;var e=hw(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return Y0=r===Object.prototype?void 0:r,Y0}var WA;function eJ(){if(WA)return HA;WA=1;var e=bt(),t=JZ(),r=QZ(),n=Ok(),i=Qa(),o=fl(),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"),HA}eJ();var X0,GA;function tJ(){if(GA)return X0;GA=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,c=typeof ht=="object"&&ht&&ht.Object===Object&&ht,d=typeof self=="object"&&self&&self.Object===Object&&self,f=c||d||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,m=Math.min,y=function(){return f.Date.now()};function x(R,I,N){var D,L,B,U,j,T,G=0,z=!1,X=!1,Z=!0;if(typeof R!="function")throw new TypeError(e);I=_(I)||0,w(N)&&(z=!!N.leading,X="maxWait"in N,B=X?v(_(N.maxWait)||0,I):B,Z="trailing"in N?!!N.trailing:Z);function re(F){var te=D,ie=L;return D=L=void 0,G=F,U=R.apply(ie,te),U}function W(F){return G=F,j=setTimeout(oe,I),z?re(F):U}function Q(F){var te=F-T,ie=F-G,ae=I-te;return X?m(ae,B-ie):ae}function ue(F){var te=F-T,ie=F-G;return T===void 0||te>=I||te<0||X&&ie>=B}function oe(){var F=y();if(ue(F))return H(F);j=setTimeout(oe,Q(F))}function H(F){return j=void 0,Z&&D?re(F):(D=L=void 0,U)}function K(){j!==void 0&&clearTimeout(j),G=0,D=T=L=j=void 0}function $(){return j===void 0?U:H(y())}function k(){var F=y(),te=ue(F);if(D=arguments,L=this,T=F,te){if(j===void 0)return W(T);if(X)return j=setTimeout(oe,I),re(T)}return j===void 0&&(j=setTimeout(oe,I)),U}return k.cancel=K,k.flush=$,k}function b(R,I,N){var D=!0,L=!0;if(typeof R!="function")throw new TypeError(e);return w(N)&&(D="leading"in N?!!N.leading:D,L="trailing"in N?!!N.trailing:L),x(R,I,{leading:D,maxWait:I,trailing:L})}function w(R){var I=typeof R;return!!R&&(I=="object"||I=="function")}function S(R){return!!R&&typeof R=="object"}function E(R){return typeof R=="symbol"||S(R)&&p.call(R)==r}function _(R){if(typeof R=="number")return R;if(E(R))return t;if(w(R)){var 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 X0=b,X0}var rJ=tJ();const KA=Un(rJ);var Z0,YA;function nJ(){if(YA)return Z0;YA=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){var N,D,L,B,U,j,T=0,G=!1,z=!1,X=!0;if(typeof _!="function")throw new TypeError(e);R=E(R)||0,b(I)&&(G=!!I.leading,z="maxWait"in I,L=z?v(E(I.maxWait)||0,R):L,X="trailing"in I?!!I.trailing:X);function Z(k){var F=N,te=D;return N=D=void 0,T=k,B=_.apply(te,F),B}function re(k){return T=k,U=setTimeout(ue,R),G?Z(k):B}function W(k){var F=k-j,te=k-T,ie=R-F;return z?m(ie,L-te):ie}function Q(k){var F=k-j,te=k-T;return j===void 0||F>=R||F<0||z&&te>=L}function ue(){var k=y();if(Q(k))return oe(k);U=setTimeout(ue,W(k))}function oe(k){return U=void 0,X&&N?Z(k):(N=D=void 0,B)}function H(){U!==void 0&&clearTimeout(U),T=0,N=j=D=U=void 0}function K(){return U===void 0?B:oe(y())}function $(){var k=y(),F=Q(k);if(N=arguments,D=this,j=k,F){if(U===void 0)return re(j);if(z)return U=setTimeout(ue,R),Z(j)}return U===void 0&&(U=setTimeout(ue,R)),B}return $.cancel=H,$.flush=K,$}function b(_){var R=typeof _;return!!_&&(R=="object"||R=="function")}function w(_){return!!_&&typeof _=="object"}function S(_){return typeof _=="symbol"||w(_)&&p.call(_)==r}function E(_){if(typeof _=="number")return _;if(S(_))return t;if(b(_)){var R=typeof _.valueOf=="function"?_.valueOf():_;_=b(R)?R+"":R}if(typeof _!="string")return _===0?_:+_;_=_.replace(n,"");var I=o.test(_);return I||a.test(_)?u(_.slice(2),I?2:8):i.test(_)?t:+_}return Z0=x,Z0}var iJ=nJ();const XA=Un(iJ);var J0,ZA;function oJ(){if(ZA)return J0;ZA=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,le){return he==null?void 0:he[le]}function f(he){var le=!1;if(he!=null&&typeof he.toString!="function")try{le=!!(he+"")}catch{}return le}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,S=RegExp("^"+x.call(b).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=h.splice,_=F(c,"Map"),R=F(Object,"create");function I(he){var le=-1,Oe=he?he.length:0;for(this.clear();++le<Oe;){var Ne=he[le];this.set(Ne[0],Ne[1])}}function N(){this.__data__=R?R(null):{}}function D(he){return this.has(he)&&delete this.__data__[he]}function L(he){var le=this.__data__;if(R){var Oe=le[he];return Oe===t?void 0:Oe}return b.call(le,he)?le[he]:void 0}function B(he){var le=this.__data__;return R?le[he]!==void 0:b.call(le,he)}function U(he,le){var Oe=this.__data__;return Oe[he]=R&&le===void 0?t:le,this}I.prototype.clear=N,I.prototype.delete=D,I.prototype.get=L,I.prototype.has=B,I.prototype.set=U;function j(he){var le=-1,Oe=he?he.length:0;for(this.clear();++le<Oe;){var Ne=he[le];this.set(Ne[0],Ne[1])}}function T(){this.__data__=[]}function G(he){var le=this.__data__,Oe=K(le,he);if(Oe<0)return!1;var Ne=le.length-1;return Oe==Ne?le.pop():E.call(le,Oe,1),!0}function z(he){var le=this.__data__,Oe=K(le,he);return Oe<0?void 0:le[Oe][1]}function X(he){return K(this.__data__,he)>-1}function Z(he,le){var Oe=this.__data__,Ne=K(Oe,he);return Ne<0?Oe.push([he,le]):Oe[Ne][1]=le,this}j.prototype.clear=T,j.prototype.delete=G,j.prototype.get=z,j.prototype.has=X,j.prototype.set=Z;function re(he){var le=-1,Oe=he?he.length:0;for(this.clear();++le<Oe;){var Ne=he[le];this.set(Ne[0],Ne[1])}}function W(){this.__data__={hash:new I,map:new(_||j),string:new I}}function Q(he){return k(this,he).delete(he)}function ue(he){return k(this,he).get(he)}function oe(he){return k(this,he).has(he)}function H(he,le){return k(this,he).set(he,le),this}re.prototype.clear=W,re.prototype.delete=Q,re.prototype.get=ue,re.prototype.has=oe,re.prototype.set=H;function K(he,le){for(var Oe=he.length;Oe--;)if(we(he[Oe][0],le))return Oe;return-1}function $(he){if(!_e(he)||ie(he))return!1;var le=Se(he)||f(he)?S:o;return le.test(ae(he))}function k(he,le){var Oe=he.__data__;return te(le)?Oe[typeof le=="string"?"string":"hash"]:Oe.map}function F(he,le){var Oe=d(he,le);return $(Oe)?Oe:void 0}function te(he){var le=typeof he;return le=="string"||le=="number"||le=="symbol"||le=="boolean"?he!=="__proto__":he===null}function ie(he){return!!y&&y in he}function ae(he){if(he!=null){try{return x.call(he)}catch{}try{return he+""}catch{}}return""}function ce(he,le){if(typeof he!="function"||le&&typeof le!="function")throw new TypeError(e);var Oe=function(){var Ne=arguments,He=le?le.apply(this,Ne):Ne[0],qe=Oe.cache;if(qe.has(He))return qe.get(He);var Xe=he.apply(this,Ne);return Oe.cache=qe.set(He,Xe),Xe};return Oe.cache=new(ce.Cache||re),Oe}ce.Cache=re;function we(he,le){return he===le||he!==he&&le!==le}function Se(he){var le=_e(he)?w.call(he):"";return le==r||le==n}function _e(he){var le=typeof he;return!!he&&(le=="object"||le=="function")}return J0=ce,J0}var aJ=oJ();const sJ=Un(aJ);var hi=[],uJ=function(){return hi.some(function(e){return e.activeTargets.length>0})},cJ=function(){return hi.some(function(e){return e.skippedTargets.length>0})},JA="ResizeObserver loop completed with undelivered notifications.",lJ=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:JA}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=JA),window.dispatchEvent(e)},Ba;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ba||(Ba={}));var pi=function(e){return Object.freeze(e)},fJ=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,pi(this)}return e})(),Ak=(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,pi(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})(),ww=function(e){return e instanceof SVGElement&&"getBBox"in e},Mk=function(e){if(ww(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)},QA=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},dJ=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Pa=typeof window<"u"?window:{},Iu=new WeakMap,eM=/auto|scroll/,hJ=/^tb|vertical/,pJ=/msie|trident/i.test(Pa.navigator&&Pa.navigator.userAgent),Yr=function(e){return parseFloat(e||"0")},uo=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new fJ((r?t:e)||0,(r?e:t)||0)},tM=pi({devicePixelContentBoxSize:uo(),borderBoxSize:uo(),contentBoxSize:uo(),contentRect:new Ak(0,0,0,0)}),Dk=function(e,t){if(t===void 0&&(t=!1),Iu.has(e)&&!t)return Iu.get(e);if(Mk(e))return Iu.set(e,tM),tM;var r=getComputedStyle(e),n=ww(e)&&e.ownerSVGElement&&e.getBBox(),i=!pJ&&r.boxSizing==="border-box",o=hJ.test(r.writingMode||""),a=!n&&eM.test(r.overflowY||""),u=!n&&eM.test(r.overflowX||""),c=n?0:Yr(r.paddingTop),d=n?0:Yr(r.paddingRight),f=n?0:Yr(r.paddingBottom),h=n?0:Yr(r.paddingLeft),p=n?0:Yr(r.borderTopWidth),v=n?0:Yr(r.borderRightWidth),m=n?0:Yr(r.borderBottomWidth),y=n?0:Yr(r.borderLeftWidth),x=h+d,b=c+f,w=y+v,S=p+m,E=u?e.offsetHeight-S-e.clientHeight:0,_=a?e.offsetWidth-w-e.clientWidth:0,R=i?x+w:0,I=i?b+S:0,N=n?n.width:Yr(r.width)-R-_,D=n?n.height:Yr(r.height)-I-E,L=N+x+_+w,B=D+b+E+S,U=pi({devicePixelContentBoxSize:uo(Math.round(N*devicePixelRatio),Math.round(D*devicePixelRatio),o),borderBoxSize:uo(L,B,o),contentBoxSize:uo(N,D,o),contentRect:new Ak(h,c,N,D)});return Iu.set(e,U),U},jk=function(e,t,r){var n=Dk(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case Ba.DEVICE_PIXEL_CONTENT_BOX:return a;case Ba.BORDER_BOX:return i;default:return o}},vJ=(function(){function e(t){var r=Dk(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=pi([r.borderBoxSize]),this.contentBoxSize=pi([r.contentBoxSize]),this.devicePixelContentBoxSize=pi([r.devicePixelContentBoxSize])}return e})(),qk=function(e){if(Mk(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},gJ=function(){var e=1/0,t=[];hi.forEach(function(a){if(a.activeTargets.length!==0){var u=[];a.activeTargets.forEach(function(d){var f=new vJ(d.target),h=qk(d.target);u.push(f),d.lastReportedSize=jk(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},rM=function(e){hi.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(qk(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},mJ=function(){var e=0;for(rM(e);uJ();)e=gJ(),rM(e);return cJ()&&lJ(),e>0},Q0,kk=[],yJ=function(){return kk.splice(0).forEach(function(e){return e()})},bJ=function(e){if(!Q0){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return yJ()}).observe(r,n),Q0=function(){r.textContent="".concat(t?t--:t++)}}kk.push(e),Q0()},xJ=function(e){bJ(function(){requestAnimationFrame(e)})},$u=0,wJ=function(){return!!$u},_J=250,EJ={attributes:!0,characterData:!0,childList:!0,subtree:!0},nM=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],iM=function(e){return e===void 0&&(e=0),Date.now()+e},eb=!1,SJ=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=_J),!eb){eb=!0;var n=iM(t);xJ(function(){var i=!1;try{i=mJ()}finally{if(eb=!1,t=n-iM(),!wJ())return;i?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,EJ)};document.body?r():Pa.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),nM.forEach(function(r){return Pa.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),nM.forEach(function(r){return Pa.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),Gb=new SJ,oM=function(e){!$u&&e>0&&Gb.start(),$u+=e,!$u&&Gb.stop()},OJ=function(e){return!ww(e)&&!dJ(e)&&getComputedStyle(e).display==="inline"},CJ=(function(){function e(t,r){this.target=t,this.observedBox=r||Ba.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=jk(this.target,this.observedBox,!0);return OJ(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),RJ=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Pu=new WeakMap,aM=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Nu=(function(){function e(){}return e.connect=function(t,r){var n=new RJ(t,r);Pu.set(t,n)},e.observe=function(t,r,n){var i=Pu.get(t),o=i.observationTargets.length===0;aM(i.observationTargets,r)<0&&(o&&hi.push(i),i.observationTargets.push(new CJ(r,n&&n.box)),oM(1),Gb.schedule())},e.unobserve=function(t,r){var n=Pu.get(t),i=aM(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&hi.splice(hi.indexOf(n),1),n.observationTargets.splice(i,1),oM(-1))},e.disconnect=function(t){var r=this,n=Pu.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),IJ=(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.");Nu.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(!QA(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Nu.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(!QA(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Nu.unobserve(this,t)},e.prototype.disconnect=function(){Nu.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),tb,sM;function PJ(){if(sM)return tb;sM=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return tb=e,tb}var NJ=PJ();const Lk=Un(NJ);var uM={},rb,cM;function TJ(){if(cM)return rb;cM=1;var e=Za(),t=Io(),r=rl(),n=ul(),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 rb={left:a(!1),right:a(!0)},rb}var nb,lM;function AJ(){if(lM)return nb;lM=1;var e=at();return nb=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},nb}var ib,fM;function MJ(){if(fM)return ib;fM=1;var e=bt(),t=rk(),r=Gn(),n=function(i){return t.slice(0,i.length)===i};return ib=(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"})(),ib}var ob,dM;function DJ(){if(dM)return ob;dM=1;var e=MJ();return ob=e==="NODE",ob}var hM;function jJ(){if(hM)return uM;hM=1;var e=Kn(),t=TJ().left,r=AJ(),n=sw(),i=DJ(),o=!i&&n>79&&n<83,a=o||!r("reduce");return e({target:"Array",proto:!0,forced:a},{reduce:function(c){var d=arguments.length;return t(this,c,d,d>1?arguments[1]:void 0)}}),uM}jJ();var pM={},ab,vM;function Bk(){if(vM)return ab;vM=1;var e=Ir();return ab=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},ab}var sb,gM;function qJ(){if(gM)return sb;gM=1;var e=at(),t=bt(),r=t.RegExp,n=e(function(){var a=r("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),i=n||e(function(){return!r("a","y").sticky}),o=n||e(function(){var a=r("^r","gy");return a.lastIndex=2,a.exec("str")!==null});return sb={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},sb}var ub,mM;function kJ(){if(mM)return ub;mM=1;var e=at(),t=bt(),r=t.RegExp;return ub=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
68
+ `)&&n.flags==="s")}),ub}var cb,yM;function LJ(){if(yM)return cb;yM=1;var e=at(),t=bt(),r=t.RegExp;return cb=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),cb}var lb,bM;function _w(){if(bM)return lb;bM=1;var e=Zt(),t=it(),r=Ii(),n=Bk(),i=qJ(),o=fw(),a=ll(),u=Po().get,c=kJ(),d=LJ(),f=o("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,v=t("".charAt),m=t("".indexOf),y=t("".replace),x=t("".slice),b=(function(){var _=/a/,R=/b*/g;return e(h,_,"a"),e(h,R,"a"),_.lastIndex!==0||R.lastIndex!==0})(),w=i.BROKEN_CARET,S=/()??/.exec("")[1]!==void 0,E=b||S||w||c||d;return E&&(p=function(R){var I=this,N=u(I),D=r(R),L=N.raw,B,U,j,T,G,z,X;if(L)return L.lastIndex=I.lastIndex,B=e(p,L,D),I.lastIndex=L.lastIndex,B;var Z=N.groups,re=w&&I.sticky,W=e(n,I),Q=I.source,ue=0,oe=D;if(re&&(W=y(W,"y",""),m(W,"g")===-1&&(W+="g"),oe=x(D,I.lastIndex),I.lastIndex>0&&(!I.multiline||I.multiline&&v(D,I.lastIndex-1)!==`
69
+ `)&&(Q="(?: "+Q+")",oe=" "+oe,ue++),U=new RegExp("^(?:"+Q+")",W)),S&&(U=new RegExp("^"+Q+"$(?!\\s)",W)),b&&(j=I.lastIndex),T=e(h,re?U:I,oe),re?T?(T.input=x(T.input,ue),T[0]=x(T[0],ue),T.index=I.lastIndex,I.lastIndex+=T[0].length):I.lastIndex=0:b&&T&&(I.lastIndex=I.global?T.index+T[0].length:j),S&&T&&T.length>1&&e(f,T[0],U,function(){for(G=1;G<arguments.length-2;G++)arguments[G]===void 0&&(T[G]=void 0)}),T&&Z)for(T.groups=z=a(null),G=0;G<Z.length;G++)X=Z[G],z[X[0]]=T[X[1]];return T}),lb=p,lb}var xM;function Fk(){if(xM)return pM;xM=1;var e=Kn(),t=_w();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),pM}Fk();var wM={},fb,_M;function $k(){if(_M)return fb;_M=1,Fk();var e=Zt(),t=Ri(),r=_w(),n=at(),i=$t(),o=Qa(),a=i("species"),u=RegExp.prototype;return fb=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/;return c==="split"&&(w={},w.constructor={},w.constructor[a]=function(){return w},w.flags="",w[p]=/./[p]),w.exec=function(){return b=!0,null},w[p](""),!b});if(!v||!m||f){var y=/./[p],x=d(p,""[c],function(b,w,S,E,_){var R=w.exec;return R===r||R===u.exec?v&&!_?{done:!0,value:e(y,w,S,E)}:{done:!0,value:e(b,S,w,E)}:{done:!1}});t(String.prototype,c,x[0]),t(u,p,x[1])}h&&o(u[p],"sham",!0)},fb}var db,EM;function zk(){if(EM)return db;EM=1;var e=Ck().charAt;return db=function(t,r,n){return r+(n?e(t,r).length:1)},db}var hb,SM;function BJ(){if(SM)return hb;SM=1;var e=bt(),t=at(),r=e.RegExp,n=!t(function(){var i=!0;try{r(".","d")}catch{i=!1}var o={},a="",u=i?"dgimsy":"gimsy",c=function(p,v){Object.defineProperty(o,p,{get:function(){return a+=v,!0}})},d={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};i&&(d.hasIndices="d");for(var f in d)c(f,d[f]);var h=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(o);return h!==u||a!==u});return hb={correct:n},hb}var pb,OM;function Hk(){if(OM)return pb;OM=1;var e=Zt(),t=Rr(),r=il(),n=BJ(),i=Bk(),o=RegExp.prototype;return pb=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},pb}var vb,CM;function Uk(){if(CM)return vb;CM=1;var e=Zt(),t=Ir(),r=Et(),n=Gn(),i=_w(),o=TypeError;return vb=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")},vb}var RM;function FJ(){if(RM)return wM;RM=1;var e=Zt(),t=it(),r=$k(),n=Ir(),i=Nt(),o=gw(),a=Ii(),u=Ci(),c=Ja(),d=zk(),f=Hk(),h=Uk(),p=t("".indexOf);return r("match",function(v,m,y){return[function(b){var w=u(this),S=i(b)?c(b,v):void 0;return S?e(S,b,w):new RegExp(b)[v](a(w))},function(x){var b=n(this),w=a(x),S=y(m,b,w);if(S.done)return S.value;var E=a(f(b));if(p(E,"g")===-1)return h(b,w);var _=p(E,"u")!==-1;b.lastIndex=0;for(var R=[],I=0,N;(N=h(b,w))!==null;){var D=a(N[0]);R[I]=D,D===""&&(b.lastIndex=d(w,o(b.lastIndex),_)),I++}return I===0?null:R}]}),wM}FJ();var IM={},gb,PM;function $J(){if(PM)return gb;PM=1;var e=dk(),t=On();return gb=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)},gb}var NM;function zJ(){if(NM)return IM;NM=1;var e=zr(),t=pw().EXISTS,r=it(),n=$J(),i=Function.prototype,o=r(i.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=r(a.exec),c="name";return e&&!t&&n(i,c,{configurable:!0,get:function(){try{return u(a,o(this))[1]}catch{return""}}}),IM}zJ();var TM={},mb,AM;function HJ(){if(AM)return mb;AM=1;var e=tl(),t=Function.prototype,r=t.apply,n=t.call;return mb=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),mb}var yb,MM;function UJ(){if(MM)return yb;MM=1;var e=it(),t=Io(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;return yb=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 S;switch(n(w,0)){case"$":return"$";case"&":return c;case"`":return o(d,0,f);case"'":return o(d,m);case"<":S=p[o(w,1,-1)];break;default:var E=+w;if(E===0)return b;if(E>y){var _=r(E/10);return _===0?b:_<=y?h[_-1]===void 0?n(w,1):h[_-1]+n(w,1):b}S=h[E-1]}return S===void 0?"":S})},yb}var DM;function VJ(){if(DM)return TM;DM=1;var e=HJ(),t=Zt(),r=it(),n=$k(),i=at(),o=Ir(),a=Et(),u=Nt(),c=sl(),d=gw(),f=Ii(),h=Ci(),p=zk(),v=Ja(),m=UJ(),y=Hk(),x=Uk(),b=$t(),w=b("replace"),S=Math.max,E=Math.min,_=r([].concat),R=r([].push),I=r("".indexOf),N=r("".slice),D=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 T=[];return T.groups={a:"7"},T},"".replace(j,"$<a>")!=="7"});return n("replace",function(j,T,G){var z=B?"$":"$0";return[function(Z,re){var W=h(this),Q=u(Z)?v(Z,w):void 0;return Q?t(Q,Z,W,re):t(T,f(W),Z,re)},function(X,Z){var re=o(this),W=f(X);if(typeof Z=="string"&&I(Z,z)===-1&&I(Z,"$<")===-1){var Q=G(T,re,W,Z);if(Q.done)return Q.value}var ue=a(Z);ue||(Z=f(Z));var oe=f(y(re)),H=I(oe,"g")!==-1,K;H&&(K=I(oe,"u")!==-1,re.lastIndex=0);for(var $=[],k;k=x(re,W),!(k===null||(R($,k),!H));){var F=f(k[0]);F===""&&(re.lastIndex=p(W,d(re.lastIndex),K))}for(var te="",ie=0,ae=0;ae<$.length;ae++){k=$[ae];for(var ce=f(k[0]),we=S(E(c(k.index),W.length),0),Se=[],_e,he=1;he<k.length;he++)R(Se,D(k[he]));var le=k.groups;if(ue){var Oe=_([ce],Se,we,W);le!==void 0&&R(Oe,le),_e=f(e(Z,void 0,Oe))}else _e=m(ce,W,we,Se,le,Z);we>=ie&&(te+=N(W,ie,we)+_e,ie=we+ce.length)}return te+N(W,ie)}]},!U||!L||B),TM}VJ();function kn(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function zu(e){return!e||!e.ownerDocument?document:e.ownerDocument}var Ji=null,jM=null;Lk&&window.addEventListener("resize",function(){jM!==window.devicePixelRatio&&(jM=window.devicePixelRatio,Ji=null)});function qM(e){if(Ji===null){var t=zu(e);if(typeof t>"u")return Ji=0,Ji;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),Ji=i}return Ji}var gc=(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=zu(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=KA(this.recalculate.bind(this),64),this.onMouseMove=KA(this.onMouseMove.bind(this),64),this.hideScrollbars=XA(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=XA(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=sJ(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var n=document.createElement("div");n.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var i=n.firstElementChild;document.body.appendChild(i);var o=i.firstElementChild;i.scrollLeft=0;var a=e.getOffset(i),u=e.getOffset(o);i.scrollLeft=999;var c=e.getOffset(o);return{isRtlScrollingInverted:a.left!==u.left&&u.left-c.left!==0,isRtlScrollbarInverted:a.left!==u.left}},e.getOffset=function(n){var i=n.getBoundingClientRect(),o=zu(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),Lk&&(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||IJ;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=zu(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:qM(this.el)}catch{return qM(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})();gc.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};gc.instances=new WeakMap;function kM(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 Tu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kM(Object(r),!0).forEach(function(n){WJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WJ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mc(){return mc=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},mc.apply(this,arguments)}function GJ(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function KJ(e,t){if(e==null)return{};var r=GJ(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var YJ=["children","scrollableNodeProps","tag"],XJ=function(t){var r=Array.prototype.reduce.call(t,function(n,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var a=o[1].replace(/\W+(.)/g,function(u,c){return c.toUpperCase()});switch(i.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=i.value}}return n},{});return r},dl=A.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=e.tag,a=o===void 0?"div":o,u=KJ(e,YJ),c=a,d,f=A.useRef(),h=A.useRef(),p=A.useRef(),v={},m={},y=[];return Object.keys(u).forEach(function(x){Object.prototype.hasOwnProperty.call(gc.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:
111
70
  'data-simplebar-auto-hide="false"' —> 'autoHide="false"'
112
- `),C.useEffect(function(){return d=i.ref||d,p.current&&(u=new Vu(p.current,Gc(Gc(Gc(Gc({},Nse(b)),h),d&&{scrollableNode:d.current}),v.current&&{contentNode:v.current})),typeof t=="function"?t(u):t&&(t.current=u)),function(){u.unMount(),u=null,typeof t=="function"&&t(null)}},[]),C.createElement(c,Hu({ref:p,"data-simplebar":!0},x),C.createElement("div",{className:"simplebar-wrapper"},C.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},C.createElement("div",{className:"simplebar-height-auto-observer"})),C.createElement("div",{className:"simplebar-mask"},C.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:d,contentNodeRef:v}):C.createElement("div",Hu({},i,{className:"simplebar-content-wrapper".concat(i.className?" ".concat(i.className):"")}),C.createElement("div",{className:"simplebar-content"},r)))),C.createElement("div",{className:"simplebar-placeholder"})),C.createElement("div",{className:"simplebar-track simplebar-horizontal"},C.createElement("div",{className:"simplebar-scrollbar"})),C.createElement("div",{className:"simplebar-track simplebar-vertical"},C.createElement("div",{className:"simplebar-scrollbar"})))});Vd.displayName="SimpleBar";Vd.propTypes={children:ps.oneOfType([ps.node,ps.func]),scrollableNodeProps:ps.object,tag:ps.string};const OF=e=>{switch(e){case fe.EPermissionType.DATACLASS:return O.jsx(_e.FdTableHeader,{className:"h-6 w-6"});case fe.EPermissionType.SINGLETON:return O.jsx(_e.FdSingleton,{className:"h-6 w-6"});case fe.EPermissionType.DATASTORE:return O.jsx(_e.FdModel3,{className:"h-6 w-6"});case fe.EPermissionType.ATTRIBUTE:return O.jsx(_e.FdTableColumn,{className:"h-6 w-6"});case fe.EPermissionType.METHOD:return O.jsx(_e.FdCode,{className:"h-6 w-6"});case fe.EPermissionType.SINGLETON_METHOD:return O.jsx(_e.FdFunctionSingleton,{className:"h-6 w-6"});case fe.ESubPermissionType.ENTITY_SEL_METHOD:return O.jsx(_e.FdFunctionSelection,{className:"h-6 w-6"});case fe.ESubPermissionType.ENTITY_METHOD:return O.jsx(_e.FdFunctionEntity,{className:"h-6 w-6"});case fe.ESubPermissionType.DS_METHOD:return O.jsx(_e.FdFunctionDatastore,{className:"h-6 w-6"});case fe.ESubPermissionType.DATACLASS_METHOD:return O.jsx(_e.FdFunctionDataclass,{className:"h-6 w-6"});default:return O.jsx(_e.FdTableHeader,{className:"h-6 w-6"})}},m2=({children:e})=>O.jsx("div",{className:"h-full w-full",children:O.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-inactive-text",children:[O.jsx(_e.FdInfoBold,{className:"h-10 w-10"}),O.jsx("div",{className:"text-center text-sm",children:e})]})})}),Wo=({permissions:e,label:t,onToggle:r,onSelect:n,promoted:i,showIncluded:o,privileges:a,exists:s})=>{const c=e.find(u=>u.name===t);return c?O.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[O.jsx(ir,{value:c.checked||c.from.length===0||t==="promote"?c.checked:o&&c.from.length>0?null:!1,onChange:()=>r&&r(c),isInvalid:s===!1}),O.jsxs("div",{className:"absolute left-full translate-x-1/4 top-1/2 -translate-y-1/2 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)&&O.jsx(O.Fragment,{children:O.jsx(Gr,{container:xr(),delay:100,label:O.jsxs("div",{className:"max-w-xs h-fit flex flex-col gap-y-3 p-1.5 text-sm font-semibold",children:[c.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:c.from.map(u=>O.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[u].id),children:a[u].privilege}))})]})]}):null,c.info&&O.jsxs("div",{className:"flex items-start",children:[O.jsx(_e.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"})," ",O.jsx("span",{className:"flex-1 min-w-0 break-words whitespace-normal text-left",children:c.info})]})]}),children:O.jsx(_e.FdInfoBold,{className:"h-4 w-4 "})})}),(c.checked||c.from.length>0)&&["execute"].includes(t)&&!!(i!=null&&i.length)&&O.jsx(Gr,{container:xr(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(_e.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{children:[O.jsx("span",{className:"mr-1",children:"Function is promoted with: "}),i==null?void 0:i.map(u=>O.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[u].id),children:a[u].privilege}))]})]})}),children:O.jsx(_e.FdCrown,{className:"h-3 w-3 "})})]})]}):null},Tse=({privilegeId:e,privileges:t})=>{const r=fr(),n=r.getCatalogMethods(),i=r.getDataclasses(),o=r.getSingletons(),a=t[e],[s,c]=C.useState([]),[u,d]=C.useState("");C.useEffect(()=>{d("")},[e]),C.useEffect(()=>{const h=a.resources.map(({resource:b,type:m,subType:w})=>({type:m,applyTo:b,subType:w})),x=P_(u.toLowerCase(),n,Object.values(i),Object.values(o));c(x.filter(({applyTo:b,type:m,subType:w})=>!ll.find(h,{applyTo:b,type:m,subType:w})))},[u,a.resources]);const[p,v]=C.useState(!1);return O.jsx(yC.Root,{className:"w-56",onInputChange:h=>d(h||""),onOpenChange:v,isOpen:p,isSearchable:!0,options:s,getOptionLabel:h=>h?h.applyTo:"",getOptionValue:h=>h?h.applyTo:"",value:null,onChange:h=>{if(!h)return;const x=fe.addPermission(e,h,t);r.actions.updatePrivileges(x),d("")},children:O.jsx(yC.Field,{formatOptionLabel:h=>O.jsxs("div",{className:"flex items-center space-x-2",children:[OF(h.type),O.jsx("span",{children:h.applyTo})]}),placeholder:"Create a permission"})})};function Pse(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(s=>s.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),s=t.indexOf(o.type);return a!==s?a-s:i.resource.toLowerCase()>o.resource.toLowerCase()?1:-1})})).reduce((n,i)=>[...n,...i.resources],[])}const kse=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n})=>{const[i,o]=C.useState(null),[a,s]=C.useState(null),{styles:c,attributes:u}=nd(i,a,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),d=fr(),[p,v]=C.useState([]),[h,x]=C.useState(""),{id:b}=e,m=C.useMemo(()=>fe.getInheritedResources(b,n),[b,n[b].includes,n[b].resources]),w=C.useMemo(()=>fe.getPromotions(b,n),[n[b]]);function y(A){v(z=>z.some(P=>A.includes(P))?z.filter(P=>!A.includes(P)):[...z,...A])}const _=async A=>{const{confirmed:z}=await d.actions.openModal({title:"Delete Privilege",type:fe.ModalType.CONFIRM,color:fe.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(z){const P=fe.removePermission(e.id,A,n);d.actions.updatePrivileges(P)}},S=async()=>{const{confirmed:A}=await d.actions.openModal({title:"Reset Permissions",type:fe.ModalType.CONFIRM,color:fe.ModalColor.DANGER,message:"Are you sure you want to reset permissions for this Privilege?",icon:"FdWarningDanger"});if(A){const z=fe.resetResources(e.id,n);d.actions.updatePrivileges(z)}},I=m.filter(A=>p.length===0?!0:p.includes(A.type)).filter(({resource:A})=>h?new RegExp(ll.escapeRegExp(h),"i").test(A):!0),N=Pse(I),T=N.filter(A=>{const z=A.permissions.every(P=>!P.checked)&&A.permissions.some(P=>P.from.length>0);return r||!z}),k=(A,z)=>{const P=fe.togglePermission(e.id,A,z,n);d.actions.updatePrivileges(P)},L=C.useMemo(()=>T.some(A=>A.exists===!1),[T]),B=async()=>{const{confirmed:A}=await d.actions.openModal({title:"Delete Privilege",type:fe.ModalType.CONFIRM,color:fe.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"}),z=Object.entries(n).map(([P,K])=>{const $=K.resources.filter(Y=>!Y.exists);return{[P]:$.map(Y=>({applyTo:Y.resource,type:Y.type}))}}).reduce((P,K)=>({...P,...K}),{});if(A){const P=fe.removeMultiplePermissions(z,n);d.actions.updatePrivileges(P)}};return O.jsxs(Vd,{className:"z-20 h-full flex-1 overflow-auto p-[15px] pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[O.jsxs("table",{className:"relative h-full w-full border-collapse",children:[O.jsx("thead",{className:"sticky top-0 z-20",children:O.jsxs("tr",{className:"border-b border-grey-100",children:[O.jsx("td",{className:"py-2",children:O.jsxs("div",{className:"flex items-center space-x-2",children:[O.jsx("div",{className:"relative w-56",children:O.jsx(xt.Root,{children:O.jsxs(xt.Group,{children:[O.jsx(xt.Icon,{children:O.jsx(_e.FdSearch,{})}),O.jsx(xt.Field,{type:"text",placeholder:"Search available permissions",value:h,onChange:A=>{x(A.target.value)}}),O.jsx(cn.Popover,{className:"flex items-center",children:({open:A})=>O.jsxs(O.Fragment,{children:[O.jsx(cn.Popover.Button,{ref:o,children:O.jsx(xt.Icon,{isAction:!0,children:O.jsx(_e.FdAdjust,{})})}),A&&O.jsx(Pd,{children:O.jsx(cn.Popover.Panel,{ref:s,style:c.popper,...u.popper,className:"z-50",static:!0,children:O.jsxs(ur,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5",children:[O.jsx("h5",{className:"mb-2 text-sm",children:"Filter"}),O.jsxs("div",{className:"space-y-2 text-s",children:[O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{value:p.includes("datastore"),onChange:()=>{y(["datastore"])},label:"Datastore",size:"sm"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{value:p.includes("dataclass"),onChange:()=>{y(["dataclass"])},label:"Dataclass",size:"sm"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{value:p.includes("singleton"),onChange:()=>{y(["singleton"])},label:"Singleton",size:"sm"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{value:p.some(z=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes(z)),onChange:()=>{y(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions",size:"sm"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{value:p.includes("attribute"),onChange:()=>{y(["attribute"])},label:"Attribute",size:"sm"})})]})]})})})]})})]})})}),O.jsx(Tse,{privilegeId:b,privileges:n}),O.jsx("div",{children:O.jsx(Gr,{label:`Resetting the privilege will remove all configured\r
113
- ressources`,container:xr(),children:O.jsx(wr,{color:"white",variant:"ghost",onClick:S,children:O.jsx(_e.FdReload,{})})})}),O.jsx(Gr,{icon:O.jsx(_e.FdBulb,{}),label:"Delete all the non existing resources from privileges",container:xr(),children:O.jsx(wr,{color:"white",variant:"ghost",onClick:B,disabled:!L,children:O.jsx(_e.FdClean,{className:"h-4 w-4"})})})]})}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Read"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Promote"})]})}),T.length?O.jsx("tbody",{children:T.map((A,z)=>{const P=A.permissions.some(K=>K.from.length>0);return O.jsxs("tr",{className:Kr("group even:bg-white/5 hover:bg-input-bg",{"opacity-60":A.exists===!1}),children:[O.jsxs("td",{className:Kr("group flex items-center gap-3 py-2 text-xs group-hover:rounded-l group-hover:bg-input-bg ",A.exists===!1?"text-negative-text":""),children:[OF(A.type),A.resource,O.jsx(Gr,{label:"Remove Permission",container:xr(),children:O.jsx(wr,{color:"white",variant:"ghost",disabled:P,onClick:()=>{P?fe.toastSubject.next({kind:"info",markdown:!0,message:`<div className="flex gap-x-3"><h3 className="font-bold">Info:</h3><p className="font-normal">Inherited permissions can't be removed</p></div>`,customIcon:_e.FdInfoBold}):_({applyTo:A.resource,type:A.type})},className:"opacity-0 group-hover:opacity-100",children:O.jsx(_e.FdPlus,{className:"h-4 w-4 rotate-45 transform"})})})]}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(Wo,{permissions:A.permissions,showIncluded:r,label:"read",onToggle:K=>k(A,K),onSelect:t,privileges:n,exists:A.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(Wo,{permissions:A.permissions,showIncluded:r,label:"create",onToggle:K=>k(A,K),onSelect:t,privileges:n,exists:A.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(Wo,{permissions:A.permissions,showIncluded:r,label:"update",onToggle:K=>k(A,K),onSelect:t,privileges:n,exists:A.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:O.jsx(Wo,{permissions:A.permissions,showIncluded:r,label:"drop",onToggle:K=>k(A,K),onSelect:t,privileges:n,exists:A.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:O.jsx(Wo,{promoted:w[A.resource],permissions:A.permissions,showIncluded:r,label:"execute",onToggle:K=>k(A,K),onSelect:t,privileges:n,exists:A.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-input-bg",children:O.jsx(Wo,{permissions:A.permissions,showIncluded:r,label:"promote",onToggle:K=>k(A,K),onSelect:t,privileges:n,exists:A.exists})})]},z)})}):null]}),!N.length&&h?O.jsx(m2,{children:"The Permission you're looking for can't be found "}):null,!N.length&&!h?O.jsxs(m2,{children:["This Privilege has no Permissions configured yet ",O.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},Mse=({onCreate:e})=>{const t=fr(),r=t.getPrivileges(),[n,i]=C.useState(null),[o,a]=C.useState(null),[s,c]=C.useState(""),[u,d]=C.useState(null),{styles:p,attributes:v}=nd(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});return C.useEffect(()=>{c(""),d(null)},[o]),O.jsx(cn.Popover,{children:({open:h,close:x})=>O.jsxs(O.Fragment,{children:[O.jsx(cn.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",ref:i,children:O.jsx(wr,{variant:"ghost",color:"white",children:O.jsx(_e.FdPlus,{className:"h-4 w-4"})})}),h&&O.jsx(Pd,{children:O.jsx(cn.Popover.Panel,{ref:a,style:p.popper,...v.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:O.jsxs(ur,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[O.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Privilege"}),O.jsx("div",{className:"mt-2",children:O.jsxs("label",{className:"flex items-center space-x-4",children:[O.jsx("span",{children:"Name"}),O.jsxs(xt.Root,{className:"w-full",color:u?"negative":"primary",children:[O.jsx(xt.Group,{children:O.jsx(xt.Field,{autoFocus:!0,value:s,onChange:b=>c(b.target.value),onKeyDown:b=>{if(b.key==="Enter"){d(null);try{const m=fe.createPrivilege(s,r),w=t.actions.updatePrivileges(m),y=Object.values(w.payload).find(_=>_.privilege===s);y&&(e(y),x())}catch(m){d(m.message)}}},type:"text"})}),u&&O.jsx(xt.Message,{children:u})]})]})}),O.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[O.jsx("button",{className:"rounded border border-primary-dark bg-primary-dark px-4 py-1 hover:border-primary-hover hover:bg-primary-hover",onClick:()=>{d(null);try{const b=fe.createPrivilege(s,r),m=t.actions.updatePrivileges(b),w=Object.values(m.payload).find(y=>y.privilege===s);w&&e(w),x()}catch(b){d(b.message)}},children:"Create"}),O.jsx("button",{className:"rounded border border-grey-100 px-4 py-1 text-grey-100 hover:bg-white hover:text-primary-dark",onClick:()=>x(),children:"Cancel"})]})]})})})]})})},Ase=()=>{const e=fr(),t=e.getCatalog(),r=e.getPrivileges(),n=C.useMemo(()=>{if(t===null)return r;const u=yB(r,Object.values((t==null?void 0:t.dataClasses)??{}));return xB(u,t)},[r,t]),[i,o]=C.useState(null),a=C.useMemo(()=>Object.keys(n),[n]);C.useEffect(()=>{i&&n[i.id]||!a.length||o(n[a[0]])},[n]),C.useEffect(()=>{a.length<2&&c(!0)},[a.length]);const[s,c]=C.useState(!0);return O.jsxs("div",{className:"flex flex-1 h-full",children:[O.jsxs(ur,{depth:1,className:"flex h-full w-[356px] flex-col",children:[O.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between px-3.5 py-[10px]",children:[O.jsxs("div",{className:"flex items-center space-x-1",children:[O.jsx("span",{children:O.jsx(_e.FdGroup,{className:"h-[14px] w-[14px]"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),O.jsx(Mse,{onCreate:u=>{o(u)}})]}),O.jsx(Moe,{privileges:n,selectedPrivilege:i,selectPrivilege:u=>{o(u)}})]}),i&&n[i.id]?O.jsxs(ur,{depth:1,className:"privileges-container relative flex flex-1 flex-col overflow-x-auto border-l-[0.5px]",children:[O.jsxs("div",{className:"mb-1 flex h-full w-full flex-col items-stretch",children:[i.privilege!=="guest"?O.jsx(Poe,{privileges:n,selectedPrivilege:i,onSelect:u=>o(r[u]),setShowIncluded:c,showIncluded:s}):null,O.jsx(kse,{privileges:n,selectedPrivilege:i,onSelect:u=>o(r[u]),showIncluded:s})]}),O.jsx(Dse,{privileges:n,selectedPrivilege:i,setSelectedPrivilege:o})]}):O.jsx(iz,{tab:"Privilege"})]})},Dse=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=C.useState(!1);return O.jsx(fe.Panel,{path:fe.ROLES_TAB_PATH,isOpen:n,onOpen:()=>i(!0),onClose:()=>i(!1),children:O.jsx("div",{className:"h-full w-full px-3 pb-3",children:O.jsx(ur,{depth:2,className:"h-full w-full rounded",children:O.jsx(Fie,{dict:e,data:fe.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})},jse=({role:e})=>{var E;const t=fr(),[r,n]=C.useState(e),[i,o]=C.useState(e.role),[a,s]=C.useState(null),c=t.getPrivileges(),u=((E=r.privileges)==null?void 0:E.filter(I=>c[I]&&c[I].privilege!=="guest").length)||0,d=t.getRoles(),{selectedRole:p,selectRole:v}=K1(),[h,x]=C.useState(!1),b=fe.useOutsideClick(()=>{h&&w()});fe.useDidMountEffect(()=>{i!==e.role&&o(e.role)},[e.role]),C.useEffect(()=>{e.role||x(!0)},[]),C.useEffect(()=>{n(e)},[e]);const m=()=>{s(null),x(!0)},w=()=>{s(null),e.role&&e.role===i&&x(!1);try{const I=fe.saveRole({...r,role:i},d);t.actions.updateRoles(I),x(!1)}catch(I){s(I.message)}},y=async I=>{I.stopPropagation();const{confirmed:N}=await t.actions.openModal({title:"Delete Role",type:fe.ModalType.CONFIRM,color:fe.ModalColor.DANGER,message:"Are you sure you want to remove this Role?",icon:"FdWarningDanger"});N&&_()},_=()=>{const I=fe.removeRole(r.id,d),N=Object.keys(I);if(p!==r.id){t.actions.updateRoles(I);return}if(N.length===0)v(null);else{const T=Object.keys(d),k=T.indexOf(r.id),L=Math.max(0,k-1),B=T[L];k===0?v(N[0]):I[B]?v(B):v(N[0])}t.actions.updateRoles(I)},S=(I=null)=>{if(I&&I.stopPropagation(),!e.role){_();return}x(!1),o(e.role)};return O.jsx(O.Fragment,{children:O.jsxs(ur,{depth:4,borderType:p===r.id?"primary":p!==r.id?"light":"default",className:Kr("rounded border p-2"),role:"button","data-cy":"privilegeCard",onClick:()=>{v(r.id)},ref:b,children:[O.jsx("div",{className:"flex items-center justify-between",children:O.jsxs("div",{className:"flex flex-1 items-center",children:[O.jsx("span",{className:"mr-4",children:O.jsx(_e.FdGroup,{className:"h-6 w-6"})}),h?O.jsxs(xt.Root,{color:a?"negative":"primary",className:"flex-1 mr-2",children:[O.jsx(xt.Group,{children:O.jsx(xt.Field,{type:"text",value:i,onChange:({target:{value:I}})=>{o(I)},onKeyDown:I=>{I.key==="Enter"&&w(),I.key==="Escape"&&S()},onBlur:()=>S(),placeholder:"role",autoComplete:"off",autoFocus:!0})}),a&&O.jsx(xt.Message,{children:a})]}):O.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",title:i,children:r.role}),O.jsx("div",{className:Kr("justify-between ml-auto flex w-fit items-center gap-x-2"),children:h?O.jsxs(O.Fragment,{children:[O.jsx(wr,{color:"white",variant:"ghost",onClick:w,children:O.jsx(_e.FdSave,{className:"h-4 w-4"})}),O.jsx(wr,{color:"white",variant:"ghost",onClick:S,children:O.jsx(_e.FdClose,{className:"h-4 w-4"})})]}):O.jsxs(O.Fragment,{children:[O.jsx(wr,{color:"white",variant:"ghost",onClick:m,children:O.jsx(_e.FdPen,{className:"h-4 w-4"})}),O.jsx(wr,{color:"white",variant:"ghost",onClick:I=>y(I),children:O.jsx(_e.FdTrash,{className:"h-4 w-4"})})]})})]})}),O.jsxs("span",{className:Kr("ml-[43px] py-1 text-xs"),children:[u," Privilege",u>1?"s":""]})]})})},CF=(e,t)=>e?t[e]:null,b2=(e,t,r)=>{const n=CF(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},qse=()=>{const e=fr(),t=e.getPrivileges(),r=e.getRoles(),{selectedRole:n}=K1(),i=CF(n,r),o=(a,s)=>s&&s.privileges.includes(a.id);return O.jsxs(ur,{depth:1,className:"w-full border-b p-4 ",children:[O.jsx("div",{className:"mb-4 flex items-center gap-x-5",children:O.jsx("h4",{className:"text-[13px] font-semibold ",children:"Privileges"})}),O.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[O.jsx(Zc,{"data-cy":"item=>Permisions",className:"italic opacity-90",children:"guest"}),Object.values(t).filter(a=>o(a,i)&&a.privilege!=="guest").map((a,s)=>O.jsxs(Zc,{"data-cy":"item=>Permisions",color:"primary",onClick:()=>{const c=b2(i.id,a.id,r);e.actions.updateRoles(c)},children:[a.privilege,O.jsx(_e.FdPlus,{className:"rotate-45 transform"})]},s)),Object.values(t).filter(a=>!o(a,i)&&a.privilege!=="guest").map((a,s)=>O.jsxs(Zc,{"data-cy":"item=>Permisions",color:"dark",onClick:()=>{const c=b2(i.id,a.id,r);e.actions.updateRoles(c)},children:[a.privilege,O.jsx(_e.FdPlus,{})]},s))]})]})},Lse=({children:e})=>O.jsx("div",{className:"h-full w-full",children:O.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-inactive-text",children:[O.jsx(_e.FdInfoBold,{className:"absolute -right-full h-10 w-10 translate-x-1"}),O.jsx("div",{className:"text-center text-sm",children:e})]})})}),$w=(e,t,r,n=!1)=>{const i=e.applyTo,o=e.type===fe.EPermissionType.DATACLASS?"ds":i.split(".")[0],a={...t,...r},s=()=>({value:!n,inherited:!1,from:[],explicitly:!1}),c={read:s(),create:s(),update:s(),drop:s(),execute:s(),promote:s()},u=p=>{p.forEach(v=>{a[v]&&(a[v].resources.forEach(h=>{if(h.resource===i||h.resource===o){const x=$w(e,t,{[v]:a[v]},n);Object.values(h.permissions).forEach(b=>{c[b.name].explicitly||(!c[b.name].from.includes(a[v].privilege)&&b.checked&&c[b.name].from.push(a[v].privilege),c[b.name].inherited=c[b.name].inherited||x[b.name].value||x[b.name].inherited)})}}),a[v].includes.length>0&&u(a[v].includes))})};if(Object.values(r).forEach(p=>{p.resources.forEach(v=>{v.resource===i&&Object.values(v.permissions).forEach(h=>{h.checked&&(c[h.name].explicitly=!0,n&&(c[h.name].value=!0))})}),(p.includes.length>0||p.privilege==="guest")&&u(p.includes)}),Object.values(t).forEach(p=>{p.resources.forEach(v=>{v.resource===i&&(p.privilege==="guest"?Object.values(v.permissions).forEach(h=>{h.checked&&(c[h.name].explicitly=!0,n&&(c[h.name].value=!0))}):Object.values(v.permissions).forEach(h=>{!c[h.name].explicitly&&h.checked&&(n?c[h.name].value=!0:c[h.name].value=!1)}))})}),(n?Object.entries(c).some(([p,v])=>p!=="promote"&&!v.value&&!v.explicitly):Object.entries(c).some(([p,v])=>p!=="promote"&&v.value&&!v.explicitly))&&![fe.EPermissionType.DATASTORE,fe.EPermissionType.SINGLETON].includes(e.type)){const p={applyTo:o,type:e.type===fe.EPermissionType.DATACLASS?fe.EPermissionType.DATASTORE:e.type===fe.EPermissionType.SINGLETON_METHOD?fe.EPermissionType.SINGLETON:fe.EPermissionType.DATACLASS},v=$w(p,t,r,n),h=x=>{let b=c[x].value;return n?!c[x].value&&!c[x].explicitly&&(b=v[x].value):c[x].value&&!c[x].explicitly&&(b=v[x].value),{value:b,inherited:c[x].inherited||v[x].inherited,from:c[x].from.length>0?c[x].from:v[x].from,explicitly:c[x].explicitly}};return{read:h("read"),create:h("create"),update:h("update"),drop:h("drop"),execute:h("execute"),promote:h("promote")}}return{read:c.read,create:c.create,update:c.update,drop:c.drop,execute:c.execute,promote:c.promote}},zse=e=>{switch(e){case"dataclass":return O.jsx(_e.FdTableHeader,{className:"h-6 w-6"});case"singleton":return O.jsx(_e.FdSingleton,{className:"h-6 w-6"});case"datastore":return O.jsx(_e.FdModel3,{className:"h-6 w-6"});case"attribute":return O.jsx(_e.FdTableColumn,{className:"h-6 w-6"});case"method":return O.jsx(_e.FdCode,{className:"h-6 w-6"});case"singletonMethod":return O.jsx(_e.FdFunctionSingleton,{className:"h-6 w-6"});case"entityselMethod":return O.jsx(_e.FdFunctionSelection,{className:"h-6 w-6"});case"entityMethod":return O.jsx(_e.FdFunctionEntity,{className:"h-6 w-6"});case"dsMethod":return O.jsx(_e.FdFunctionDatastore,{className:"h-6 w-6"});case"dataclassMethod":return O.jsx(_e.FdFunctionDataclass,{className:"h-6 w-6"});default:return O.jsx(_e.FdTableHeader,{className:"h-6 w-6"})}},ia=({privileges:e,permission:t,hasChild:r,depth:n,isChild:i=!1,className:o,inSearch:a,toggleCollapse:s,collapsed:c,isRestrictedByDefault:u,toastMessageCallback:d})=>{const[p,v]=t.applyTo.split("."),h=C.useMemo(()=>$w(t,e.otherPrivs,e.rolePrivs,u),[e,t,u]);return O.jsxs("tr",{className:Kr("group even:bg-white/5 hover:bg-input-bg",o),children:[O.jsxs("td",{className:Kr("flex h-full w-full items-stretch gap-3 p-0 text-xs group-hover:rounded-l group-hover:bg-input-bg",{"px-1":a}),children:[Array(n).fill("").map((x,b)=>O.jsx("div",{className:Kr("ml-1.5 mr-1 w-[2px] bg-grey-100",{"mr-0.5":i})},b)),O.jsxs("div",{className:"flex items-center gap-3 py-2",children:[r&&O.jsx("button",{onClick:s,className:"w-3",children:c?O.jsx(_e.FdRight,{className:"inline h-4 w-4"}):O.jsx(_e.FdDown,{className:"inline h-4 w-4"})}),zse(t.type),a?t.applyTo:v||p]})]}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[fe.EPermissionType.ATTRIBUTE,fe.EPermissionType.DATASTORE,fe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[O.jsx(ir,{value:h.read.value||h.read.inherited,onClick:d,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!h.read.value&&h.read.inherited?O.jsx(Gr,{container:xr(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:h.read.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:h.read.from.map((x,b)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},b))})]})]}):null}),children:O.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[fe.EPermissionType.ATTRIBUTE,fe.EPermissionType.DATASTORE,fe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[O.jsx(ir,{value:h.create.value||h.create.inherited,onClick:d,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!h.create.value&&h.create.inherited?O.jsx(Gr,{container:xr(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:h.read.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:h.read.from.map((x,b)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},b))})]})]}):null}),children:O.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[fe.EPermissionType.ATTRIBUTE,fe.EPermissionType.DATASTORE,fe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[O.jsx(ir,{value:h.update.value||h.update.inherited,onClick:d,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!h.update.value&&h.update.inherited?O.jsx(Gr,{container:xr(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:h.update.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:h.update.from.map((x,b)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},b))})]})]}):null}),children:O.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[fe.EPermissionType.ATTRIBUTE,fe.EPermissionType.DATASTORE,fe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[O.jsx(ir,{value:h.drop.value||h.drop.inherited,onClick:d,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!h.drop.value&&h.drop.inherited?O.jsx(Gr,{container:xr(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:h.drop.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:h.drop.from.map((x,b)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},b))})]})]}):null}),children:O.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-input-bg",children:t.type!=="attribute"&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[O.jsx(ir,{value:h.execute.value||h.execute.inherited,onClick:d,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!h.execute.value&&h.execute.inherited?O.jsx(Gr,{container:xr(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:h.execute.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:h.execute.from.map((x,b)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},b))})]})]}):null}),children:O.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})})]})},y2=({depth:e,permission:t,privileges:r,childCollapsed:n,didChildCollapsed:i,toastMessageCallback:o})=>{const[a,s]=C.useState(n),c=fr(),u=c.getRestrictedByDefault(),d=c.getPrivileges();return C.useEffect(()=>{n===!0&&s(!0)},[n]),O.jsxs(O.Fragment,{children:[O.jsx(ia,{privileges:r,permission:t,isChild:!0,depth:e,hasChild:!0,toggleCollapse:()=>{const p=!a;s(p),i==null||i(p)},isRestrictedByDefault:u,allPrivileges:d,collapsed:a,toastMessageCallback:o}),!a&&O.jsxs(O.Fragment,{children:[t.attributes.map((p,v)=>O.jsx(ia,{privileges:r,permission:p,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:o},`${p.type}-${v}`)),t.methods.map((p,v)=>O.jsx(ia,{privileges:r,permission:p,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:o},`${p.type}-${v}`))]})]})},Bse=({selectedRole:e})=>{const[t,r]=C.useState(null),[n,i]=C.useState(null),{styles:o,attributes:a}=nd(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),s=fr(),c=s.getRestrictedByDefault(),u=s.getPrivileges(),[d,p]=C.useState([]),[v,h]=C.useState(""),x=s.getCatalogMethods(),b=s.getDataclasses(),m=s.getSingletons(),[w,y]=C.useState({}),[_,S]=C.useState([]);C.useEffect(()=>{const $=Vie(x,Object.values(b),Object.values(m));y($)},[e]);function E($){const Y=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"];return $.sort((U,Z)=>{const D=Y.indexOf(U.type),W=Y.indexOf(Z.type);return D!==W?D-W:U.applyTo.toLowerCase()>Z.applyTo.toLowerCase()?1:-1})}C.useEffect(()=>{S(E(P_(v,x,Object.values(b),Object.values(m)).filter($=>d.length?d.includes($.type):!0)))},[d,v]);const[I,N]=C.useState(!1),T=$=>{p(Y=>Y.some(U=>$.includes(U))?Y.filter(U=>!$.includes(U)):[...Y,...$])},k=s.getRoles(),L={toggleAllCollapsed:$=>{$.allCollapsed=!$.allCollapsed},toggleChildCollapsed:$=>{$.childCollapsed=!$.childCollapsed},setAllCollapsed:($,Y)=>{$.allCollapsed=Y},setChildCollapsed:($,Y)=>{$.childCollapsed=Y}},B=C.useMemo(()=>{const $=Object.values(u).find(W=>W.privilege==="guest"),Y=k[e],U=Y?Object.fromEntries(Y.privileges.map(W=>[W,u[W]]).filter(([,W])=>!!W)):{};if(c)return{rolePrivs:U,otherPrivs:$?{[$.id]:$}:{}};const Z=$?{[$.id]:{...$,active:!0}}:{},D=Object.fromEntries(Object.entries(u).filter(([W])=>W!==($==null?void 0:$.id)&&!(Y!=null&&Y.privileges.includes(W))).map(([W,Q])=>[W,{...Q,active:!1}]));return{rolePrivs:U,otherPrivs:{...Z,...D}}},[u,k,e,c]),{state:{allCollapsed:A,childCollapsed:z},dispatch:P}=fe.useEnhancedState({allCollapsed:!1,childCollapsed:!1},L,"Table Collapse Store"),K=()=>{fe.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** You can add or modify permissions only in the Privilege section.",customIcon:_e.FdInfoCircle})};return O.jsxs(Vd,{className:"z-20 h-full flex-1 overflow-auto p-[15px] pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[O.jsxs("table",{className:"relative h-full w-full border-collapse",children:[O.jsx("thead",{className:"sticky top-0 z-20",children:O.jsxs("tr",{className:"border-b border-grey-100",children:[O.jsx("td",{className:"py-2",children:O.jsxs("div",{className:"flex items-center space-x-2",children:[O.jsx(fe.Tooltip,{label:"Collapse All",placement:"top",container:xr(),children:O.jsx(wr,{color:"white",variant:"ghost",disabled:A,onClick:()=>{z?(P.setAllCollapsed(!0),N(!0)):P.setChildCollapsed(!0)},children:O.jsx(_e.FdCollapseAll,{})})}),O.jsx("div",{className:"relative w-56",children:O.jsx(xt.Root,{children:O.jsxs(xt.Group,{children:[O.jsx(xt.Icon,{children:O.jsx(_e.FdSearch,{})}),O.jsx(xt.Field,{type:"text",placeholder:"Search",value:v,onChange:$=>{h($.target.value)}}),O.jsx(cn.Popover,{className:"flex items-center",children:({open:$})=>O.jsxs(O.Fragment,{children:[O.jsx(cn.Popover.Button,{ref:r,children:O.jsx(xt.Icon,{isAction:!0,children:O.jsx(_e.FdAdjust,{})})}),$&&O.jsx(Pd,{children:O.jsx(cn.Popover.Panel,{ref:i,style:o.popper,...a.popper,className:"z-50",static:!0,children:O.jsxs(ur,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5 text-xs",children:[O.jsx("h5",{className:"mb-2 text-sm",children:"Filter"}),O.jsxs("div",{className:"space-y-2 text-s",children:[O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{value:d.includes("datastore"),onChange:()=>{T(["datastore"])},label:"Datastore",size:"sm"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{value:d.includes("dataclass"),onChange:()=>{T(["dataclass"])},label:"Dataclass",size:"sm"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{value:d.includes("singleton"),onChange:()=>{T(["singleton"])},label:"Singleton",size:"sm"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{value:d.some(Y=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes(Y)),onChange:()=>{T(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions",size:"sm"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{value:d.includes("attribute"),onChange:()=>{T(["attribute"])},label:"Attribute",size:"sm"})})]})]})})})]})})]})})})]})}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"read"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"})]})}),O.jsx("tbody",{className:"relative",children:d.length||v?_.map(($,Y)=>O.jsx(ia,{privileges:B,permission:$,depth:0,inSearch:!0,isRestrictedByDefault:c,allPrivileges:u,toastMessageCallback:K},`${$.type}-${Y}`)):Object.values(w).map(($,Y)=>O.jsxs(C.Fragment,{children:[O.jsx(ia,{privileges:B,permission:$,isRestrictedByDefault:c,allPrivileges:u,hasChild:!0,depth:0,toggleCollapse:()=>{const U=!I;N(U),P.setAllCollapsed(!U&&A?!1:A)},collapsed:I,toastMessageCallback:K}),$.type==="datastore"&&!I?O.jsxs(O.Fragment,{children:[$.methods.map((U,Z)=>O.jsx(ia,{privileges:B,isRestrictedByDefault:c,allPrivileges:u,permission:U,depth:1,collapsed:A||!1,toastMessageCallback:K},`${U.type}-${Z}`)),$.dataClasses.map((U,Z)=>O.jsx(y2,{depth:1,privileges:B,permission:U,childCollapsed:z,didChildCollapsed:D=>{P.setChildCollapsed(D?z:!1)},toastMessageCallback:K},`${U.type}-${Z}`))]}):null,$.singletons.map((U,Z)=>O.jsx(y2,{depth:0,privileges:B,permission:U,childCollapsed:A,didChildCollapsed:D=>{P.setAllCollapsed(D?A:!1)},toastMessageCallback:K},`${U.type}-${Z}`))]},`${$.type}-${Y}`))})]}),(v||d.length)&&!_.length?O.jsx(Lse,{children:"The Permission you're looking for can't be found "}):null]})},Fse=()=>{const e=fr(),t=e.getRoles(),[r,n]=C.useState(null),[i,o]=C.useState(null),[a,s]=C.useState(""),[c,u]=C.useState(null),{styles:d,attributes:p}=nd(r,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});C.useEffect(()=>{s(""),u(null)},[i]);const v=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(t).find(m=>m.role.toLowerCase()===a.toLowerCase()))throw new Error(`A role with the name ${a} already exists`);const x=TB.generate(),b=fe.createRole(x,a,t);e.actions.updateRoles(b)};return O.jsx(cn.Popover,{children:({open:h,close:x})=>{const b=()=>{u(null);try{fe.validateName(a),v(),x()}catch(m){u(m.message)}};return O.jsxs(O.Fragment,{children:[O.jsx(cn.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",ref:n,children:O.jsx(wr,{variant:"ghost",color:"white",children:O.jsx(_e.FdPlus,{className:"h-4 w-4"})})}),h&&O.jsx(Pd,{children:O.jsx(cn.Popover.Panel,{ref:o,style:d.popper,...p.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:O.jsxs(ur,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[O.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Role"}),O.jsx("div",{className:"mt-2",children:O.jsxs("label",{className:"flex items-center space-x-4",children:[O.jsx("span",{className:"text-grey-100",children:"Name"}),O.jsxs(xt.Root,{color:c?"negative":"primary",className:"w-full",children:[O.jsx(xt.Group,{children:O.jsx(xt.Field,{autoFocus:!0,value:a,onChange:m=>s(m.target.value),onKeyDown:m=>{m.key==="Enter"&&b()},type:"text"})}),c&&O.jsx(xt.Message,{children:c})]})]})}),O.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[O.jsx("button",{className:"rounded border border-primary-dark bg-primary-dark px-4 py-1 hover:border-primary-hover hover:bg-primary-hover",onClick:()=>{b()},children:"Create"}),O.jsx("button",{className:"rounded border border-grey-100 px-4 py-1 text-grey-100 hover:bg-white hover:text-primary-dark",onClick:()=>x(),children:"Cancel"})]})]})})})]})}})},$se=()=>{const t=fr().getRoles(),{selectedRole:r}=K1();return O.jsxs("div",{className:"flex flex-1 h-full",children:[O.jsxs(ur,{depth:1,className:"flex h-full w-[356px] flex-col",children:[O.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between px-3.5 py-[10px]",children:[O.jsxs("div",{className:"flex items-center space-x-1",children:[O.jsx("span",{children:O.jsx(_e.FdGroup,{className:"h-[14px] w-[14px]"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),O.jsx(Fse,{})]}),O.jsx("div",{className:"flex-1 space-y-4 overflow-auto p-4 pb-10 pt-1",children:Object.values(t).length>0?Object.values(t).sort((n,i)=>fe.localeCompare(n.role,i.role)).map((n,i)=>O.jsx(jse,{role:n},i)):O.jsx("div",{className:"flex h-full items-center justify-center",children:O.jsx("div",{className:"flex flex-1 items-center justify-center text-inactive-text",children:O.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4",children:[O.jsx(_e.FdInfoBold,{className:"h-10 w-10"}),O.jsx("div",{className:"font-semibold",children:"There are no roles"}),O.jsxs("div",{className:"flex items-center text-sm",children:["Create a new role by clicking on the"," ",O.jsx(_e.FdPlus,{className:"ml-2 inline h-4 w-4"})]})]})})})})]}),O.jsx(ur,{depth:1,className:Kr("relative flex h-full w-full flex-1 flex-col items-stretch overflow-x-auto",{"border-l-[0.5px]":r}),children:O.jsx("div",{className:"flex h-full w-full select-none flex-col",children:r?O.jsxs(O.Fragment,{children:[O.jsx(qse,{}),O.jsx(Bse,{selectedRole:r})]}):O.jsx(iz,{tab:"Role"})})})]})},IF=()=>{const e=fr(),t=e.getQodly(),r=e.getSelectedTab(),n=e.getForceLogin(),i=e.getRestrictedByDefault(),o=C.useRef();return O.jsx("div",{className:"absolute inset-0 flex flex-1 overflow-hidden",children:O.jsx("div",{className:"relative flex flex-1 overflow-x-auto","data-cy":"Roles&Privileges-editor-cy",ref:a=>o.current=a,children:O.jsxs("div",{className:"flex w-full flex-col",children:[O.jsx(S9,{activeTab:r,forceLogin:n,restrictedByDefault:i,onTabChange:a=>{e.actions.toggleTab(a)},onForceLoginChange:a=>{e.actions.toggleForceLogin(a)},onRestrictedByDefaultChange:a=>{e.actions.toggleRestrictedByDefault(a)},qodly:t}),r==="roles"?O.jsx(O9,{children:O.jsx($se,{})}):O.jsx(Ase,{})]})})})},Vse=()=>{const{modals:e,closeModal:t,editModal:r}=Toe();return O.jsx(O.Fragment,{children:e.map((n,i)=>O.jsx(fe.Modal,{hasOverlay:i===0,...n,onClose:t,onEdit:r,container:xr()},n.id))})},Hse=({initialValue:e,onChange:t,...r})=>{const n=fr(),i=n.getRolesFlags(),o=n.getRolesAndPrivileges();return C.useEffect(()=>{if(e)try{const a=JSON.parse(e);if(ll.isEqual(a,o))return;n.actions.setRolesContent({content:a,flags:{touched:!1}})}catch(a){console.error("[Roles Editor Standalone] Error while parsing the initial value:",a)}},[e]),fe.useDidMountEffect(()=>{if(i.touched&&t)try{const a=JSON.stringify(o,null,2);t(a)}catch(a){console.error("[Roles Editor Standalone] Error on value stringify:",a)}},[o]),O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"relative h-screen z-10 overflow-hidden",children:O.jsx(IF,{...r})}),O.jsx(Vse,{})]})},Wse=e=>{const t=Noe();return O.jsx(_B,{adapter:t,children:O.jsx(fe.TipsProvider,{children:O.jsx(Hse,{...e})})})},Use=e=>O.jsx(Roe,{children:O.jsx(Wse,{...e})});exports.ROLES_EDITOR_SCOPE_CLASS=x2.ROLES_EDITOR_SCOPE_CLASS;exports.EditorStateAdapterProvider=_B;exports.Roles=IF;exports.Standalone=Use;exports.useReduxAdapter=Kie;
71
+ `),A.useEffect(function(){return f=i.ref||f,h.current&&(d=new gc(h.current,Tu(Tu(Tu(Tu({},XJ(y)),v),f&&{scrollableNode:f.current}),p.current&&{contentNode:p.current})),typeof t=="function"?t(d):t&&(t.current=d)),function(){d.unMount(),d=null,typeof t=="function"&&t(null)}},[]),A.createElement(c,mc({ref:h,"data-simplebar":!0},m),A.createElement("div",{className:"simplebar-wrapper"},A.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},A.createElement("div",{className:"simplebar-height-auto-observer"})),A.createElement("div",{className:"simplebar-mask"},A.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:f,contentNodeRef:p}):A.createElement("div",mc({},i,{className:"simplebar-content-wrapper".concat(i.className?" ".concat(i.className):"")}),A.createElement("div",{className:"simplebar-content"},r)))),A.createElement("div",{className:"simplebar-placeholder"})),A.createElement("div",{className:"simplebar-track simplebar-horizontal"},A.createElement("div",{className:"simplebar-scrollbar"})),A.createElement("div",{className:"simplebar-track simplebar-vertical"},A.createElement("div",{className:"simplebar-scrollbar"})))});dl.displayName="SimpleBar";dl.propTypes={children:fe.oneOfType([fe.node,fe.func]),scrollableNodeProps:fe.object,tag:fe.string};const yc=Ux,bc=Vx,Vk=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"})}},LM=({children:e})=>C.jsx("div",{className:"h-full w-full",children:C.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})});function ZJ(e){const{isIndeterminate:t,isChecked:r,...n}=e,i=t?"M22.5 12C22.5 17.799 17.799 22.5 12 22.5C6.20101 22.5 1.5 17.799 1.5 12C1.5 6.20101 6.20101 1.5 12 1.5C17.799 1.5 22.5 6.20101 22.5 12Z":"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z";return C.jsx(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 JJ(e){return C.jsx(Te.Checkbox,{icon:C.jsx(ZJ,{}),...e})}const Xi=({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(JJ,{isIndeterminate:o&&c.from.length>0,onChange:()=>r&&r(c),isInvalid:u===!1}),C.jsxs("div",{className:"absolute left-5 top-0 flex cursor-pointer items-center space-x-1",children:[t!=="promote"&&(c.checked&&(c.info||c.from.length>0)||!c.checked&&c.from.length>0)&&C.jsx(C.Fragment,{children:C.jsxs(yc,{openDelay:0,closeDelay:0,children:[C.jsx(bc,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(jr,{container:Bt(),children:C.jsx(qr,{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(yc,{openDelay:0,closeDelay:0,children:[C.jsx(bc,{children:C.jsx(ye.FdCrown,{className:"h-3 w-3 text-white"})}),C.jsx(jr,{container:Bt(),children:C.jsx(qr,{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},QJ=({privilegeId:e,privileges:t})=>{const r=J.useAppSelector(J.selectCatalogMethods),n=J.useAppSelector(J.selectDataclasses),i=J.useAppSelector(J.selectSingletons),o=t[e],a=J.useAppDispatch(),[u,c]=A.useState([]),[d,f]=A.useState("");A.useEffect(()=>{f("")},[e]);const{isOpen:h,getMenuProps:p,getInputProps:v,getComboboxProps:m,highlightedIndex:y,getItemProps:x,selectedItem:b,openMenu:w}=to({onInputValueChange(){c([])},items:[],itemToString(_){return _?_.applyTo:""},defaultHighlightedIndex:0,stateReducer:(_,R)=>{const{changes:I,type:N}=R;switch(N){case to.stateChangeTypes.InputKeyDownArrowDown:return{...I,isOpen:!0,highlightedIndex:_.highlightedIndex<=u.length?_.highlightedIndex+1:0};case to.stateChangeTypes.InputKeyDownArrowUp:return{...I,isOpen:!0,highlightedIndex:_.highlightedIndex>=0?_.highlightedIndex-1:u.length};case to.stateChangeTypes.InputKeyDownEnter:{const D=u[_.highlightedIndex];if(!D)return I;const L=J.addPermission(e,D,t);return a(J.updatePrivileges(L)),{...I,isOpen:!0,highlightedIndex:0}}}return I}});A.useEffect(()=>{const _=o.resources.map(({resource:I,type:N,subType:D})=>({type:N,applyTo:I,subType:D})),R=Mx(d.toLowerCase(),r,Object.values(n),Object.values(i));c(R.filter(({applyTo:I,type:N,subType:D})=>!vc.find(_,{applyTo:I,type:N,subType:D})))},[d,o.resources,r,n,i]);const S=p({},{suppressRefError:!0}),E=A.useRef(null);return A.useEffect(()=>{h&&E.current&&E.current.focus()},[h]),C.jsxs("div",{className:"relative w-56 text-white group",...m(),children:[C.jsx("div",{...m(),children:C.jsx("input",{...v({},{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:d,onChange:({target:{value:_}})=>f(_),onFocus:()=>{w()}})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-1",children:C.jsx(ye.FdDown,{className:"h-4 w-4 cursor-pointer",onMouseDown:_=>_.preventDefault(),onClick:()=>w()})}),h&&C.jsx("ul",{...S,tabIndex:0,className:"absolute max-h-80 inset-x-0 top-full overflow-auto rounded-md border border-grey-50 bg-grey-900 p-0 text-grey-50 shadow-md group-focus-within:rounded-t-none group-focus-within:border-t-0",children:u.map((_,R)=>C.jsxs("li",{className:Ve(b===_&&"font-bold","flex min-w-fit cursor-pointer items-center space-x-2 px-3 py-2 text-xs shadow-sm",{"bg-primary-hover":y===R,"font-bold":b===_}),...x({item:_,index:R}),onClick:()=>{const I=J.addPermission(e,_,t);a(J.updatePrivileges(I))},children:[Vk(_.type),C.jsx("span",{children:_.applyTo})]},`${_.applyTo}-${R}`))})]})};function eQ(e){const t=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],r=e.reduce((n,i)=>{const[o]=i.resource.split("."),a=n.find(u=>u.prefix===o.toLowerCase());return a?(a.resources.push(i),n):[...n,{prefix:o.toLowerCase(),type:i.type,resources:[i]}]},[]);return r.sort((n,i)=>n.prefix==="ds"?-1:i.prefix==="ds"||n.prefix>i.prefix?1:-1),r.map(n=>({...n,resources:n.resources.sort((i,o)=>{const a=t.indexOf(i.type),u=t.indexOf(o.type);return a!==u?a-u:i.resource.toLowerCase()>o.resource.toLowerCase()?1:-1})})).reduce((n,i)=>[...n,...i.resources],[])}const tQ=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n})=>{const[i,o]=A.useState(null),[a,u]=A.useState(null),{styles:c,attributes:d}=wc(i,a,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),[f,h]=A.useState([]),[p,v]=A.useState(""),m=J.useAppDispatch(),{id:y}=e,x=A.useMemo(()=>J.getInheritedResources(y,n),[y,n[y].includes,n[y].resources]),b=A.useMemo(()=>J.getPromotions(y,n),[n[y]]),w={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},S=Object.values(w).flat(),E=($,k)=>k.length>0&&k.every(F=>$.includes(F)),_=($,k)=>k.some(F=>$.includes(F)),R=($,k)=>Array.from(new Set([...$,...k])),I=($,k)=>$.filter(F=>!k.includes(F)),N=$=>{h([...$])},D=$=>{h(k=>E(k,$)?I(k,$):R(k,$))},L=$=>{D(w[$])},B=E(f,S),U=f.length>0&&!B,j=E(f,w.functions),T=!j&&_(f,w.functions),G=()=>N(S),z=()=>N([]),X=async $=>{const{confirmed:k}=await m(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(k){const F=J.removePermission(e.id,$,n);m(J.updatePrivileges(F))}},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))}},W=x.filter($=>f.length===0?!1:f.includes($.type)).filter(({resource:$})=>p?new RegExp(vc.escapeRegExp(p),"i").test($):!0),Q=eQ(W),ue=Q.filter($=>{const k=$.permissions.every(F=>!F.checked)&&$.permissions.some(F=>F.from.length>0);return r||!k}),oe=($,k)=>{const F=J.togglePermission(e.id,$,k,n);m(J.updatePrivileges(F))},H=A.useMemo(()=>ue.some($=>$.exists===!1),[ue]),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(([F,te])=>{const ie=te.resources.filter(ae=>!ae.exists);return{[F]:ie.map(ae=>({applyTo:ae.resource,type:ae.type}))}}).reduce((F,te)=>({...F,...te}),{});if($){const F=J.removeMultiplePermissions(k,n);m(J.updatePrivileges(F))}};return C.jsxs(dl,{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(wr.Popover,{className:"flex items-center",children:({open:$})=>C.jsxs(C.Fragment,{children:[C.jsx(wr.Popover.Button,{ref:o,children:C.jsx(ye.FdAdjust,{className:"h-4 w-4"})}),$&&C.jsx(el,{children:C.jsxs(wr.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?z():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:E(f,w.dataclass),onChange:()=>L("dataclass"),label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:E(f,w.singleton),onChange:()=>L("singleton"),label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:j,isIndeterminate:T,onChange:()=>L("functions"),label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:E(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(QJ,{privilegeId:y,privileges:n}),C.jsx("div",{children:C.jsxs(yc,{openDelay:0,closeDelay:0,children:[C.jsx(bc,{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(jr,{container:Bt(),children:C.jsxs(qr,{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(yc,{openDelay:0,closeDelay:0,children:[C.jsx(bc,{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(jr,{container:Bt(),children:C.jsxs(qr,{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"})]})}),ue.length?C.jsx("tbody",{children:ue.map(($,k)=>{const F=$.permissions.some(te=>te.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:[Vk($.type),$.resource,C.jsx(Te.Tooltip,{placement:"top",label:"Remove Permission",isDisabled:F,container:Bt(),children:C.jsx("button",{onClick:()=>{F?Te.toastSubject.next({kind:"info",markdown:!0,message:`<div className="flex gap-x-3"><h3 className="font-bold">Info:</h3><p className="font-normal">Inherited permissions can\\'t be removed</p></div>`,customIcon:ye.FdInfoBold}):X({applyTo:$.resource,type:$.type})},className:Ve("flex flex-shrink-0 items-center justify-center rounded p-1 opacity-0 group-hover:opacity-100",F?"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(Xi,{permissions:$.permissions,showIncluded:r,label:"read",onToggle:te=>oe($,te),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(Xi,{permissions:$.permissions,showIncluded:r,label:"create",onToggle:te=>oe($,te),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(Xi,{permissions:$.permissions,showIncluded:r,label:"update",onToggle:te=>oe($,te),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(Xi,{permissions:$.permissions,showIncluded:r,label:"drop",onToggle:te=>oe($,te),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Xi,{promoted:b[$.resource],permissions:$.permissions,showIncluded:r,label:"execute",onToggle:te=>oe($,te),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(Xi,{permissions:$.permissions,showIncluded:r,label:"promote",onToggle:te=>oe($,te),onSelect:t,privileges:n,exists:$.exists})})]},`${$.resource}-${k}`)})}):null]}),!Q.length&&p?C.jsx(LM,{children:"The Permission you're looking for can't be found "}):null,!Q.length&&!p?C.jsxs(LM,{children:["This Privilege has no Permissions configured yet ",C.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},rQ=({onCreate:e})=>{const t=J.useAppSelector(J.selectPrivileges),r=J.useAppDispatch(),[n,i]=A.useState(null),[o,a]=A.useState(null),[u,c]=A.useState(""),[d,f]=A.useState(null),{styles:h,attributes:p}=wc(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});return A.useEffect(()=>{c(""),f(null)},[o]),C.jsx(wr.Popover,{children:({open:v,close:m})=>C.jsxs(C.Fragment,{children:[C.jsx(wr.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(el,{children:C.jsxs(wr.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(S=>S.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"})]})]})})]})})},nQ=()=>{const e=J.useAppSelector(J.selectCatalog),t=J.useAppSelector(J.selectPrivileges),r=A.useMemo(()=>{if(e===null)return t;const c=Dq(t,Object.values((e==null?void 0:e.dataClasses)??{}));return jq(c,e)},[t,e]),[n,i]=A.useState(null),o=A.useMemo(()=>Object.keys(r),[r]);A.useEffect(()=>{n&&r[n.id]||!o.length||i(r[o[0]])},[r]),A.useEffect(()=>{o.length<2&&u(!0)},[o.length]);const[a,u]=A.useState(!0);return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs("div",{className:"flex h-full w-[356px] flex-col bg-grey-800",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between bg-grey-800 px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[C.jsx("span",{children:C.jsx(ye.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),C.jsx(rQ,{onCreate:c=>{i(c)}})]}),C.jsx(xX,{privileges:r,selectedPrivilege:n,selectPrivilege:c=>{i(c)}})]}),n&&r[n.id]?C.jsxs("div",{className:"privileges-container relative flex flex-1 flex-col overflow-x-auto border-l-[0.5px] border-grey-900 bg-grey-800",children:[C.jsxs("div",{className:"mb-1 flex h-full w-full flex-col items-stretch",children:[n.privilege!=="guest"?C.jsx(m9,{privileges:r,selectedPrivilege:n,onSelect:c=>i(t[c]),setShowIncluded:u,showIncluded:a}):null,C.jsx(tQ,{privileges:r,selectedPrivilege:n,onSelect:c=>i(t[c]),showIncluded:a})]}),C.jsx(iQ,{privileges:r,selectedPrivilege:n,setSelectedPrivilege:i})]}):C.jsx(bD,{tab:"Privilege"})]})},iQ=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=A.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(p9,{dict:e,data:J.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})};var bb={},ia={},Au={},BM;function Wk(){if(BM)return Au;BM=1,Object.defineProperty(Au,"__esModule",{value:!0}),Au.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 Au}var Zi={},oa={},aa={},FM;function oQ(){if(FM)return aa;FM=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.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 aa.default=e,aa}var $M;function hl(){if($M)return oa;$M=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.default=void 0;var e=t(oQ());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){return typeof i=="string"&&e.default.test(i)}var n=r;return oa.default=n,oa}var zM;function pl(){if(zM)return Zi;zM=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.default=void 0,Zi.unsafeStringify=n;var e=t(hl());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 Zi.default=o,Zi}var HM;function aQ(){if(HM)return ia;HM=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.default=void 0;var e=r(Wk()),t=pl();function r(d){return d&&d.__esModule?d:{default:d}}let n,i,o=0,a=0;function u(d,f,h){let p=f&&h||0;const v=f||new Array(16);d=d||{};let m=d.node||n,y=d.clockseq!==void 0?d.clockseq:i;if(m==null||y==null){const _=d.random||(d.rng||e.default)();m==null&&(m=n=[_[0]|1,_[1],_[2],_[3],_[4],_[5]]),y==null&&(y=i=(_[6]<<8|_[7])&16383)}let 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 S=((x&268435455)*1e4+b)%4294967296;v[p++]=S>>>24&255,v[p++]=S>>>16&255,v[p++]=S>>>8&255,v[p++]=S&255;const E=x/4294967296*1e4&268435455;v[p++]=E>>>8&255,v[p++]=E&255,v[p++]=E>>>24&15|16,v[p++]=E>>>16&255,v[p++]=y>>>8|128,v[p++]=y&255;for(let _=0;_<6;++_)v[p+_]=m[_];return f||(0,t.unsafeStringify)(v)}var c=u;return ia.default=c,ia}var sa={},Ln={},ua={},UM;function Gk(){if(UM)return ua;UM=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.default=void 0;var e=t(hl());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 ua.default=n,ua}var VM;function Kk(){if(VM)return Ln;VM=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.URL=Ln.DNS=void 0,Ln.default=a;var e=pl(),t=r(Gk());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 ca={},WM;function sQ(){if(WM)return ca;WM=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.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,S=parseInt(x.charAt(w>>>4&15)+x.charAt(w&15),16);m.push(S)}return m}function r(v){return(v+64>>>9<<4)+14+1}function n(v,m){v[m>>5]|=128<<m%32,v[r(m)-1]=m;let y=1732584193,x=-271733879,b=-1732584194,w=271733878;for(let S=0;S<v.length;S+=16){const E=y,_=x,R=b,I=w;y=c(y,x,b,w,v[S],7,-680876936),w=c(w,y,x,b,v[S+1],12,-389564586),b=c(b,w,y,x,v[S+2],17,606105819),x=c(x,b,w,y,v[S+3],22,-1044525330),y=c(y,x,b,w,v[S+4],7,-176418897),w=c(w,y,x,b,v[S+5],12,1200080426),b=c(b,w,y,x,v[S+6],17,-1473231341),x=c(x,b,w,y,v[S+7],22,-45705983),y=c(y,x,b,w,v[S+8],7,1770035416),w=c(w,y,x,b,v[S+9],12,-1958414417),b=c(b,w,y,x,v[S+10],17,-42063),x=c(x,b,w,y,v[S+11],22,-1990404162),y=c(y,x,b,w,v[S+12],7,1804603682),w=c(w,y,x,b,v[S+13],12,-40341101),b=c(b,w,y,x,v[S+14],17,-1502002290),x=c(x,b,w,y,v[S+15],22,1236535329),y=d(y,x,b,w,v[S+1],5,-165796510),w=d(w,y,x,b,v[S+6],9,-1069501632),b=d(b,w,y,x,v[S+11],14,643717713),x=d(x,b,w,y,v[S],20,-373897302),y=d(y,x,b,w,v[S+5],5,-701558691),w=d(w,y,x,b,v[S+10],9,38016083),b=d(b,w,y,x,v[S+15],14,-660478335),x=d(x,b,w,y,v[S+4],20,-405537848),y=d(y,x,b,w,v[S+9],5,568446438),w=d(w,y,x,b,v[S+14],9,-1019803690),b=d(b,w,y,x,v[S+3],14,-187363961),x=d(x,b,w,y,v[S+8],20,1163531501),y=d(y,x,b,w,v[S+13],5,-1444681467),w=d(w,y,x,b,v[S+2],9,-51403784),b=d(b,w,y,x,v[S+7],14,1735328473),x=d(x,b,w,y,v[S+12],20,-1926607734),y=f(y,x,b,w,v[S+5],4,-378558),w=f(w,y,x,b,v[S+8],11,-2022574463),b=f(b,w,y,x,v[S+11],16,1839030562),x=f(x,b,w,y,v[S+14],23,-35309556),y=f(y,x,b,w,v[S+1],4,-1530992060),w=f(w,y,x,b,v[S+4],11,1272893353),b=f(b,w,y,x,v[S+7],16,-155497632),x=f(x,b,w,y,v[S+10],23,-1094730640),y=f(y,x,b,w,v[S+13],4,681279174),w=f(w,y,x,b,v[S],11,-358537222),b=f(b,w,y,x,v[S+3],16,-722521979),x=f(x,b,w,y,v[S+6],23,76029189),y=f(y,x,b,w,v[S+9],4,-640364487),w=f(w,y,x,b,v[S+12],11,-421815835),b=f(b,w,y,x,v[S+15],16,530742520),x=f(x,b,w,y,v[S+2],23,-995338651),y=h(y,x,b,w,v[S],6,-198630844),w=h(w,y,x,b,v[S+7],10,1126891415),b=h(b,w,y,x,v[S+14],15,-1416354905),x=h(x,b,w,y,v[S+5],21,-57434055),y=h(y,x,b,w,v[S+12],6,1700485571),w=h(w,y,x,b,v[S+3],10,-1894986606),b=h(b,w,y,x,v[S+10],15,-1051523),x=h(x,b,w,y,v[S+1],21,-2054922799),y=h(y,x,b,w,v[S+8],6,1873313359),w=h(w,y,x,b,v[S+15],10,-30611744),b=h(b,w,y,x,v[S+6],15,-1560198380),x=h(x,b,w,y,v[S+13],21,1309151649),y=h(y,x,b,w,v[S+4],6,-145523070),w=h(w,y,x,b,v[S+11],10,-1120210379),b=h(b,w,y,x,v[S+2],15,718787259),x=h(x,b,w,y,v[S+9],21,-343485551),y=o(y,E),x=o(x,_),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,S){return u(m&y|~m&x,v,m,b,w,S)}function d(v,m,y,x,b,w,S){return u(m&x|y&~x,v,m,b,w,S)}function f(v,m,y,x,b,w,S){return u(m^y^x,v,m,b,w,S)}function h(v,m,y,x,b,w,S){return u(y^(m|~x),v,m,b,w,S)}var p=e;return ca.default=p,ca}var GM;function uQ(){if(GM)return sa;GM=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.default=void 0;var e=r(Kk()),t=r(sQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return sa.default=i,sa}var la={},fa={},KM;function cQ(){if(KM)return fa;KM=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return fa.default=t,fa}var YM;function lQ(){if(YM)return la;YM=1,Object.defineProperty(la,"__esModule",{value:!0}),la.default=void 0;var e=n(cQ()),t=n(Wk()),r=pl();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 la.default=o,la}var da={},ha={},XM;function fQ(){if(XM)return ha;XM=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.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),S=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=S}a[0]=a[0]+p>>>0,a[1]=a[1]+v>>>0,a[2]=a[2]+m>>>0,a[3]=a[3]+y>>>0,a[4]=a[4]+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 ha.default=n,ha}var ZM;function dQ(){if(ZM)return da;ZM=1,Object.defineProperty(da,"__esModule",{value:!0}),da.default=void 0;var e=r(Kk()),t=r(fQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return da.default=i,da}var pa={},JM;function hQ(){if(JM)return pa;JM=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.default=void 0;var e="00000000-0000-0000-0000-000000000000";return pa.default=e,pa}var va={},QM;function pQ(){if(QM)return va;QM=1,Object.defineProperty(va,"__esModule",{value:!0}),va.default=void 0;var e=t(hl());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 va.default=n,va}var eD;function vQ(){return eD||(eD=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return a.default}});var t=f(aQ()),r=f(uQ()),n=f(lQ()),i=f(dQ()),o=f(hQ()),a=f(pQ()),u=f(hl()),c=f(pl()),d=f(Gk());function f(h){return h&&h.__esModule?h:{default:h}}})(bb)),bb}var xb,tD;function gQ(){if(tD)return xb;tD=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},xb=e,xb}var wb,rD;function mQ(){if(rD)return wb;rD=1;var e=gQ();function t(r,n){var i=new e(r,n);return function(o){return i.convert(o)}}return t.BIN="01",t.OCT="01234567",t.DEC="0123456789",t.HEX="0123456789abcdef",wb=t,wb}var _b,nD;function yQ(){if(nD)return _b;nD=1;const{v4:e,validate:t}=vQ(),r=mQ(),n={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},i={consistentLength:!0};let o;const a=(d,f,h)=>{const p=f(d.toLowerCase().replace(/-/g,""));return!h||!h.consistentLength?p:p.padStart(h.shortIdLength,h.paddingChar)},u=(d,f)=>{const p=f(d).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[p[1],p[2],p[3],p[4],p[5]].join("-")},c=d=>Math.ceil(Math.log(2**128)/Math.log(d));return _b=(()=>{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),E={alphabet:p,fromUUID:_=>a(_,x,y),maxLength:m,generate:w,new:w,toUUID:_=>u(_,b),uuid:e,validate:(_,R=!1)=>{if(!_||typeof _!="string")return!1;const I=v.consistentLength?_.length===m:_.length<=m,N=_.split("").every(D=>p.includes(D));return R===!1?I&&N:I&&N&&t(u(_,b))}};return Object.freeze(E),E};return d.constants=n,d.uuid=e,d.generate=()=>(o||(o=d(n.flickrBase58).generate),o()),d})(),_b}var bQ=yQ();const xQ=({role:e})=>{var R;const[t,r]=A.useState(e),[n,i]=A.useState(e.role),[o,a]=A.useState(null),u=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}=Xb(),[v,m]=A.useState(!1),y=Te.useOutsideClick(()=>{v&&b()});Te.useDidMountEffect(()=>{n!==e.role&&i(e.role)},[e.role]),A.useEffect(()=>{e.role||m(!0)},[]),A.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(),S=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&&E()},E=()=>{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 D=Object.keys(d),L=D.indexOf(t.id),B=Math.max(0,L-1),U=D[B];L===0?p(N[0]):I[U]?p(U):p(N[0])}f(J.updateRoles(I))},_=(I=null)=>{if(I&&I.stopPropagation(),!e.role){E();return}m(!1),i(e.role)};return C.jsx(C.Fragment,{children:C.jsxs("div",{className:Ve("rounded border bg-grey-300 p-2",{"border-grey-100":h!==t.id,"border-primary-dark":h===t.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{p(t.id)},ref:y,children:[C.jsx("div",{className:"flex items-center justify-between",children:C.jsxs("div",{className:"flex flex-1 items-center text-white",children:[C.jsx("span",{className:"mr-4",children:C.jsx(ye.FdGroup,{className:"h-6 w-6"})}),v?C.jsxs("div",{className:"relative h-6 flex-1 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"&&_()},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:_,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=>S(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":""]})]})})},Yk=(e,t)=>e?t[e]:null,iD=(e,t,r)=>{const n=Yk(e,r);return n?Object.values(r).reduce((i,o)=>o.id===e?n.privileges.includes(t)?{...i,[n.id]:{...n,privileges:n.privileges.filter(a=>a!==t)}}:{...i,[n.id]:{...n,privileges:[...n.privileges,t]}}:{...i,[o.id]:o},{}):r},wQ=()=>{const e=J.useAppSelector(J.selectPrivileges),t=J.useAppSelector(J.selectRoles),r=J.useAppDispatch(),{selectedRole:n}=Xb(),i=Yk(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=iD(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=iD(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))]})]})},_Q=({children:e})=>C.jsx("div",{className:"h-full w-full",children:C.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"absolute -right-full h-10 w-10 translate-x-1"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})}),Kb=(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=Kb(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=Kb(h,t,r,n),v=m=>{let y=c[m].value;return n?!c[m].value&&!c[m].explicitly&&(y=p[m].value):c[m].value&&!c[m].explicitly&&(y=p[m].value),{value:y,inherited:c[m].inherited||p[m].inherited,from:c[m].from.length>0?c[m].from:p[m].from,explicitly:c[m].explicitly}};return{read:v("read"),create:v("create"),update:v("update"),drop:v("drop"),execute:v("execute"),promote:v("promote")}}return{read:c.read,create:c.create,update:c.update,drop:c.drop,execute:c.execute,promote:c.promote}},EQ=e=>{switch(e){case"dataclass":return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"});case"singleton":return C.jsx(ye.FdSingleton,{className:"h-6 w-6"});case"datastore":return C.jsx(ye.FdModel3,{className:"h-6 w-6"});case"attribute":return C.jsx(ye.FdTableColumn,{className:"h-6 w-6"});case"method":return C.jsx(ye.FdCode,{className:"h-6 w-6"});case"singletonMethod":return C.jsx(ye.FdFunctionSingleton,{className:"h-6 w-6"});case"entityselMethod":return C.jsx(ye.FdFunctionSelection,{className:"h-6 w-6"});case"entityMethod":return C.jsx(ye.FdFunctionEntity,{className:"h-6 w-6"});case"dsMethod":return C.jsx(ye.FdFunctionDatastore,{className:"h-6 w-6"});case"dataclassMethod":return C.jsx(ye.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"})}},ga=Ux,ma=Vx,co=({privileges:e,permission:t,hasChild:r,depth:n,isChild:i=!1,className:o,inSearch:a,toggleCollapse:u,collapsed:c,isRestrictedByDefault:d,toastMessageCallback:f})=>{const[h,p]=t.applyTo.split("."),v=A.useMemo(()=>Kb(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"})}),EQ(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(ga,{openDelay:0,closeDelay:0,children:[C.jsx(ma,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(jr,{container:Bt(),children:C.jsx(qr,{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(ga,{openDelay:0,closeDelay:0,children:[C.jsx(ma,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(jr,{container:Bt(),children:C.jsx(qr,{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(ga,{openDelay:0,closeDelay:0,children:[C.jsx(ma,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(jr,{container:Bt(),children:C.jsx(qr,{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(ga,{openDelay:0,closeDelay:0,children:[C.jsx(ma,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(jr,{container:Bt(),children:C.jsx(qr,{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(ga,{openDelay:0,closeDelay:0,children:[C.jsx(ma,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(jr,{container:Bt(),children:C.jsx(qr,{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})})})]}):""})]})})]})},oD=({depth:e,permission:t,privileges:r,childCollapsed:n,didChildCollapsed:i,toastMessageCallback:o})=>{const[a,u]=A.useState(n),c=J.useAppSelector(J.selectRestrictedByDefault),d=J.useAppSelector(J.selectPrivileges);return A.useEffect(()=>{n===!0&&u(!0)},[n]),C.jsxs(C.Fragment,{children:[C.jsx(co,{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(co,{privileges:r,permission:f,depth:e+1,isRestrictedByDefault:c,allPrivileges:d,toastMessageCallback:o},`${f.type}-${h}`)),t.methods.map((f,h)=>C.jsx(co,{privileges:r,permission:f,depth:e+1,isRestrictedByDefault:c,allPrivileges:d,toastMessageCallback:o},`${f.type}-${h}`))]})]})},SQ=({selectedRole:e})=>{const[t,r]=A.useState(null),[n,i]=A.useState(null),{styles:o,attributes:a}=wc(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),u=J.useAppSelector(J.selectRestrictedByDefault),c=J.useAppSelector(J.selectPrivileges),[d,f]=A.useState([]),[h,p]=A.useState(""),v=J.useAppSelector(J.selectCatalogMethods),m=J.useAppSelector(J.selectDataclasses),y=J.useAppSelector(J.selectSingletons),[x,b]=A.useState({}),[w,S]=A.useState([]);A.useEffect(()=>{const k=g9(v,Object.values(m),Object.values(y));b(k)},[e,v,m,y]);function E(k){const F=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"];return k.sort((te,ie)=>{const ae=F.indexOf(te.type),ce=F.indexOf(ie.type);return ae!==ce?ae-ce:te.applyTo.toLowerCase()>ie.applyTo.toLowerCase()?1:-1})}A.useEffect(()=>{S(E(Mx(h,v,Object.values(m),Object.values(y)).filter(k=>d.length?d.includes(k.type):!0)))},[d,h,v,m,y]);const[_,R]=A.useState(!1),I={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},N=Object.values(I).flat(),D=(k,F)=>F.length>0&&F.every(te=>k.includes(te)),L=(k,F)=>Array.from(new Set([...k,...F])),B=(k,F)=>k.filter(te=>!F.includes(te)),U=k=>f([...k]),j=k=>{f(F=>D(F,k)?B(F,k):L(F,k))},T=k=>j(I[k]),G=N.every(k=>d.includes(k)),z=d.length>0&&!G,X=D(d,I.functions),Z=()=>U(N),re=()=>U([]),W=J.useAppSelector(J.selectRoles),Q={toggleAllCollapsed:k=>{k.allCollapsed=!k.allCollapsed},toggleChildCollapsed:k=>{k.childCollapsed=!k.childCollapsed},setAllCollapsed:(k,F)=>{k.allCollapsed=F},setChildCollapsed:(k,F)=>{k.childCollapsed=F}},ue=A.useMemo(()=>{const k=Object.values(c).find(ce=>ce.privilege==="guest"),F=W[e],te=F?Object.fromEntries(F.privileges.map(ce=>[ce,c[ce]]).filter(([,ce])=>!!ce)):{};if(u)return{rolePrivs:te,otherPrivs:k?{[k.id]:k}:{}};const ie=k?{[k.id]:{...k,active:!0}}:{},ae=Object.fromEntries(Object.entries(c).filter(([ce])=>ce!==(k==null?void 0:k.id)&&!(F!=null&&F.privileges.includes(ce))).map(([ce,we])=>[ce,{...we,active:!1}]));return{rolePrivs:te,otherPrivs:{...ie,...ae}}},[c,W,e,u]),{state:{allCollapsed:oe,childCollapsed:H},dispatch:K}=Te.useEnhancedState({allCollapsed:!1,childCollapsed:!1},Q,"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(dl,{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":oe,"text-white":!oe}),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(wr.Popover,{className:"flex items-center",children:({open:k})=>C.jsxs(C.Fragment,{children:[C.jsx(wr.Popover.Button,{ref:r,children:C.jsx(ye.FdAdjust,{className:"h-4 w-4"})}),k&&C.jsx(el,{children:C.jsxs(wr.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:z,onChange:()=>G?re():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:D(d,I.datastore),onChange:()=>T("datastore"),label:"Datastore"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:D(d,I.dataclass),onChange:()=>T("dataclass"),label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:D(d,I.singleton),onChange:()=>T("singleton"),label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:X,onChange:()=>T("functions"),label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:D(d,I.attribute),onChange:()=>T("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,F)=>C.jsx(co,{privileges:ue,permission:k,depth:0,inSearch:!0,isRestrictedByDefault:u,allPrivileges:c,toastMessageCallback:$},`${k.type}-${F}`)):Object.values(x).map((k,F)=>C.jsxs(A.Fragment,{children:[C.jsx(co,{privileges:ue,permission:k,isRestrictedByDefault:u,allPrivileges:c,hasChild:!0,depth:0,toggleCollapse:()=>{const te=!_;R(te),K.setAllCollapsed(!te&&oe?!1:oe)},collapsed:_,toastMessageCallback:$}),k.type==="datastore"&&!_?C.jsxs(C.Fragment,{children:[k.methods.map((te,ie)=>C.jsx(co,{privileges:ue,isRestrictedByDefault:u,allPrivileges:c,permission:te,depth:1,collapsed:oe||!1,toastMessageCallback:$},`${te.type}-${ie}`)),k.dataClasses.map((te,ie)=>C.jsx(oD,{depth:1,privileges:ue,permission:te,childCollapsed:H,didChildCollapsed:ae=>{K.setChildCollapsed(ae?H:!1)},toastMessageCallback:$},`${te.type}-${ie}`))]}):null,k.singletons.map((te,ie)=>C.jsx(oD,{depth:0,privileges:ue,permission:te,childCollapsed:oe,didChildCollapsed:ae=>{K.setAllCollapsed(ae?oe:!1)},toastMessageCallback:$},`${te.type}-${ie}`))]},`${k.type}-${F}`))})]}),(h||d.length)&&!w.length?C.jsx(_Q,{children:"The Permission you're looking for can't be found "}):null]})},OQ=()=>{const e=J.useAppSelector(J.selectRoles),t=J.useAppDispatch(),[r,n]=A.useState(null),[i,o]=A.useState(null),[a,u]=A.useState(""),[c,d]=A.useState(null),{styles:f,attributes:h}=wc(r,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});A.useEffect(()=>{u(""),d(null)},[i]);const p=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(e).find(x=>x.role.toLowerCase()===a.toLowerCase()))throw new Error(`A role with the name ${a} already exists`);const m=bQ.generate(),y=J.createRole(m,a,e);t(J.updateRoles(y))};return C.jsx(wr.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(wr.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(el,{children:C.jsxs(wr.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"})]})]})})]})}})},CQ=()=>{const e=J.useAppSelector(J.selectRoles),{selectedRole:t}=Xb();return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs("div",{className:"flex h-full w-[356px] flex-col bg-grey-800",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between bg-grey-800 px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[C.jsx("span",{children:C.jsx(ye.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),C.jsx(OQ,{})]}),C.jsx("div",{className:"flex-1 space-y-4 overflow-auto p-4 pb-10 pt-1",children:Object.values(e).length>0?Object.values(e).sort((r,n)=>Te.localeCompare(r.role,n.role)).map((r,n)=>C.jsx(xQ,{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(wQ,{}),C.jsx(SQ,{selectedRole:t})]}):C.jsx(bD,{tab:"Role"})})})]})},Xk=()=>{const e=J.useAppSelector(J.selectQodly),t=J.useAppSelector(J.selectSelectedTab),r=J.useAppSelector(J.selectForceLogin),n=J.useAppSelector(J.selectRestrictedByDefault),i=A.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(Zz,{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(Jz,{children:C.jsx(CQ,{})}):C.jsx(nQ,{})]})})})},RQ=()=>{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))})},IQ=({initialValue:e,onChange:t,...r})=>{const n=J.useAppSelector(J.selectRolesFlags),i=J.useAppSelector(J.selectRolesAndPrivileges,(a,u)=>vc.isEqual(a,u)),o=J.useAppDispatch();return A.useEffect(()=>{if(e)try{const a=JSON.parse(e);if(vc.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(Xk,{...r})}),C.jsx(RQ,{})]})},PQ=e=>C.jsx(J.ReduxProvider,{store:J.getStore(),children:C.jsx(Te.TipsProvider,{children:C.jsx(IQ,{...e})})});exports.ROLES_EDITOR_SCOPE_CLASS=sD.ROLES_EDITOR_SCOPE_CLASS;exports.Roles=Xk;exports.Standalone=PQ;
114
72
  //# sourceMappingURL=index.cjs.js.map