@ws-ui/roles-editor 1.11.12-rc10 → 1.11.12-rc12
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 +16 -16
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +1751 -1744
- package/dist/index.es.js.map +1 -1
- package/dist/json-schema.json +181 -0
- package/dist/json-schema.json.d.ts +184 -0
- package/package.json +3 -2
package/dist/index.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),O=require("react"),fe=require("@ws-ui/shared"),si=require("react-dom"),un=require("@headlessui/react"),_e=require("@ws-ui/icons"),Je=require("@ws-ui/store"),w2=require("./common.cjs.js");function _2(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 Ct=_2(O),xW=_2(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-50:not(#\\#){color:var(--color-grey-50)}.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(--ws-palette-negative-200);--ws-negative-dark: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 wW=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.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"})}),_W=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.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"})}),Vu=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.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"})}),EW=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.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"})}),SW=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.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"})}),OW=(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},CW=(e,t)=>({classGroupId:e,validator:t}),E2=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),du="-",hO=[],IW="arbitrary..",RW=e=>{const t=TW(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return NW(i);const o=i.split(du),a=o[0]===""&&o.length>1?1:0;return S2(o,a,t)},getConflictingClassGroupIds:(i,o)=>{if(o){const a=n[i],s=r[i];return a?s?OW(s,a):a:s||hO}return r[i]||hO}}},S2=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],i=r.nextPart.get(n);if(i){const c=S2(e,t+1,i);if(c)return c}const o=r.validators;if(o===null)return;const a=t===0?e.join(du):e.slice(t).join(du),s=o.length;for(let c=0;c<s;c++){const u=o[c];if(u.validator(a))return u.classGroupId}},NW=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?IW+n:void 0})(),TW=e=>{const{theme:t,classGroups:r}=e;return PW(r,t)},PW=(e,t)=>{const r=E2();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];kW(a,t,r,n)}},kW=(e,t,r,n)=>{if(typeof e=="string"){AW(e,t,r);return}if(typeof e=="function"){MW(e,t,r,n);return}DW(e,t,r,n)},AW=(e,t,r)=>{const n=e===""?t:O2(t,e);n.classGroupId=r},MW=(e,t,r,n)=>{if(jW(e)){Vw(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(CW(r,e))},DW=(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,O2(t,s),r,n)}},O2=(e,t)=>{let r=e;const n=t.split(du),i=n.length;for(let o=0;o<i;o++){const a=n[o];let s=r.nextPart.get(a);s||(s=E2(),r.nextPart.set(a,s)),r=s}return r},jW=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,qW=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)}}},cw="!",vO=":",LW=[],gO=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),zW=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 m=0;m<d;m++){const b=i[m];if(a===0&&s===0){if(b===vO){o.push(i.slice(c,m)),c=m+1;continue}if(b==="/"){u=m;continue}}b==="["?a++:b==="]"?a--:b==="("?s++:b===")"&&s--}const p=o.length===0?i:i.slice(c);let v=p,h=!1;p.endsWith(cw)?(v=p.slice(0,-1),h=!0):p.startsWith(cw)&&(v=p.slice(1),h=!0);const x=u&&u>c?u-c:void 0;return gO(o,h,v,x)};if(t){const i=t+vO,o=n;n=a=>a.startsWith(i)?o(a.slice(i.length)):gO(LW,!1,a,void 0,!0)}if(r){const i=n;n=o=>r({className:o,parseClassName:i})}return n},BW=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}},FW=e=>({cache:qW(e.cacheSize),parseClassName:zW(e),sortModifiers:BW(e),...RW(e)}),$W=/\s+/,HW=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],s=e.trim().split($W);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:m}=r(d);if(p){c=d+(c.length>0?" "+c:c);continue}let b=!!m,w=n(b?x.substring(0,m):x);if(!w){if(!b){c=d+(c.length>0?" "+c:c);continue}if(w=n(x),!w){c=d+(c.length>0?" "+c:c);continue}b=!1}const y=v.length===0?"":v.length===1?v[0]:o(v).join(":"),_=h?y+cw:y,S=_+w;if(a.indexOf(S)>-1)continue;a.push(S);const E=i(w,b);for(let I=0;I<E.length;++I){const N=E[I];a.push(_+N)}c=d+(c.length>0?" "+c:c)}return c},VW=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=C2(r))&&(i&&(i+=" "),i+=n);return i},C2=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=C2(e[n]))&&(r&&(r+=" "),r+=t);return r},mO=(e,...t)=>{let r,n,i,o;const a=c=>{const u=t.reduce((d,p)=>p(d),e());return r=FW(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=HW(c,r);return i(c,d),d};return o=a,(...c)=>o(VW(...c))},WW=[],Yt=e=>{const t=r=>r[e]||WW;return t.isThemeGetter=!0,t},I2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,R2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,UW=/^\d+\/\d+$/,GW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KW=/\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$/,YW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,XW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lo=e=>UW.test(e),Ve=e=>!!e&&!Number.isNaN(Number(e)),Si=e=>!!e&&Number.isInteger(Number(e)),vp=e=>e.endsWith("%")&&Ve(e.slice(0,-1)),ii=e=>GW.test(e),JW=()=>!0,QW=e=>KW.test(e)&&!YW.test(e),N2=()=>!1,eU=e=>XW.test(e),tU=e=>ZW.test(e),rU=e=>!Ie(e)&&!Re(e),nU=e=>va(e,k2,N2),Ie=e=>I2.test(e),Qi=e=>va(e,A2,QW),gp=e=>va(e,lU,Ve),bO=e=>va(e,T2,N2),iU=e=>va(e,P2,tU),pc=e=>va(e,M2,eU),Re=e=>R2.test(e),Ga=e=>ga(e,A2),oU=e=>ga(e,cU),yO=e=>ga(e,T2),aU=e=>ga(e,k2),sU=e=>ga(e,P2),hc=e=>ga(e,M2,!0),va=(e,t,r)=>{const n=I2.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ga=(e,t,r=!1)=>{const n=R2.exec(e);return n?n[1]?t(n[1]):r:!1},T2=e=>e==="position"||e==="percentage",P2=e=>e==="image"||e==="url",k2=e=>e==="length"||e==="size"||e==="bg-size",A2=e=>e==="length",lU=e=>e==="number",cU=e=>e==="family-name",M2=e=>e==="shadow",xO=()=>{const e=Yt("color"),t=Yt("font"),r=Yt("text"),n=Yt("font-weight"),i=Yt("tracking"),o=Yt("leading"),a=Yt("breakpoint"),s=Yt("container"),c=Yt("spacing"),u=Yt("radius"),d=Yt("shadow"),p=Yt("inset-shadow"),v=Yt("text-shadow"),h=Yt("drop-shadow"),x=Yt("blur"),m=Yt("perspective"),b=Yt("aspect"),w=Yt("ease"),y=Yt("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(),Re,Ie],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],T=()=>[Re,Ie,c],A=()=>[Lo,"full","auto",...T()],B=()=>[Si,"none","subgrid",Re,Ie],L=()=>["auto",{span:["full",Si,Re,Ie]},Si,Re,Ie],D=()=>[Si,"auto",Re,Ie],z=()=>["auto","min","max","fr",Re,Ie],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,Re,Ie],Q=()=>[...S(),yO,bO,{position:[Re,Ie]}],k=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",aU,nU,{size:[Re,Ie]}],J=()=>[vp,Ga,Qi],ee=()=>["","none","full",u,Re,Ie],j=()=>["",Ve,Ga,Qi],G=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[Ve,vp,yO,bO],X=()=>["","none",x,Re,Ie],ne=()=>["none",Ve,Re,Ie],te=()=>["none",Ve,Re,Ie],ue=()=>[Ve,Re,Ie],re=()=>[Lo,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ii],breakpoint:[ii],color:[JW],container:[ii],"drop-shadow":[ii],ease:["in","out","in-out"],font:[rU],"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",Ve],text:[ii],"text-shadow":[ii],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lo,Ie,Re,b]}],container:["container"],columns:[{columns:[Ve,Ie,Re,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:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Si,"auto",Re,Ie]}],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:[Ve,Lo,"auto","initial","none",Ie]}],grow:[{grow:["",Ve,Re,Ie]}],shrink:[{shrink:["",Ve,Re,Ie]}],order:[{order:[Si,"first","last","none",Re,Ie]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"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,Ga,Qi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Re,gp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vp,Ie]}],"font-family":[{font:[oU,Ie,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,Re,Ie]}],"line-clamp":[{"line-clamp":[Ve,"none",Re,gp]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",Re,Ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Re,Ie]}],"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:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ve,"from-font","auto",Re,Qi]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[Ve,"auto",Re,Ie]}],"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",Re,Ie]}],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",Re,Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Q()}],"bg-repeat":[{bg:k()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Si,Re,Ie],radial:["",Re,Ie],conic:[Si,Re,Ie]},sU,iU]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"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:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"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:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ve,Re,Ie]}],"outline-w":[{outline:["",Ve,Ga,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":[Ve,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:[Ve,Re,Ie]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"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":[Ve]}],"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":[Re,Ie]}],"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":[Ve]}],"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:Q()}],"mask-repeat":[{mask:k()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Re,Ie]}],filter:[{filter:["","none",Re,Ie]}],blur:[{blur:X()}],brightness:[{brightness:[Ve,Re,Ie]}],contrast:[{contrast:[Ve,Re,Ie]}],"drop-shadow":[{"drop-shadow":["","none",h,hc,pc]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",Ve,Re,Ie]}],"hue-rotate":[{"hue-rotate":[Ve,Re,Ie]}],invert:[{invert:["",Ve,Re,Ie]}],saturate:[{saturate:[Ve,Re,Ie]}],sepia:[{sepia:["",Ve,Re,Ie]}],"backdrop-filter":[{"backdrop-filter":["","none",Re,Ie]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[Ve,Re,Ie]}],"backdrop-contrast":[{"backdrop-contrast":[Ve,Re,Ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ve,Re,Ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ve,Re,Ie]}],"backdrop-invert":[{"backdrop-invert":["",Ve,Re,Ie]}],"backdrop-opacity":[{"backdrop-opacity":[Ve,Re,Ie]}],"backdrop-saturate":[{"backdrop-saturate":[Ve,Re,Ie]}],"backdrop-sepia":[{"backdrop-sepia":["",Ve,Re,Ie]}],"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",Re,Ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ve,"initial",Re,Ie]}],ease:[{ease:["linear","initial",w,Re,Ie]}],delay:[{delay:[Ve,Re,Ie]}],animate:[{animate:["none",y,Re,Ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Re,Ie]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[Re,Ie,"","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",Re,Ie]}],"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",Re,Ie]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[Ve,Ga,Qi,gp]}],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"]}},uU=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:i={},override:o={}})=>(gs(e,"cacheSize",t),gs(e,"prefix",r),gs(e,"experimentalParseClassName",n),vc(e.theme,o.theme),vc(e.classGroups,o.classGroups),vc(e.conflictingClassGroups,o.conflictingClassGroups),vc(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),gs(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),gc(e.theme,i.theme),gc(e.classGroups,i.classGroups),gc(e.conflictingClassGroups,i.conflictingClassGroups),gc(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),D2(e,i,"orderSensitiveModifiers"),e),gs=(e,t,r)=>{r!==void 0&&(e[t]=r)},vc=(e,t)=>{if(t)for(const r in t)gs(e,r,t[r])},gc=(e,t)=>{if(t)for(const r in t)D2(e,t,r)},D2=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},dU=(e,...t)=>typeof e=="function"?mO(xO,e,...t):mO(()=>uU(xO(),e),...t);function j2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wO={exports:{}};/*!
|
|
2
|
+
`,document.head.appendChild(e)}catch(e){console.error("vite-plugin-inject-css: failed to inject css",e)}})();const wW=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.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"})}),_W=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.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"})}),Vu=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.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"})}),EW=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.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"})}),SW=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.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"})}),OW=(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},CW=(e,t)=>({classGroupId:e,validator:t}),E2=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),du="-",hO=[],IW="arbitrary..",RW=e=>{const t=TW(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return NW(i);const o=i.split(du),a=o[0]===""&&o.length>1?1:0;return S2(o,a,t)},getConflictingClassGroupIds:(i,o)=>{if(o){const a=n[i],s=r[i];return a?s?OW(s,a):a:s||hO}return r[i]||hO}}},S2=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],i=r.nextPart.get(n);if(i){const c=S2(e,t+1,i);if(c)return c}const o=r.validators;if(o===null)return;const a=t===0?e.join(du):e.slice(t).join(du),s=o.length;for(let c=0;c<s;c++){const u=o[c];if(u.validator(a))return u.classGroupId}},NW=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?IW+n:void 0})(),TW=e=>{const{theme:t,classGroups:r}=e;return PW(r,t)},PW=(e,t)=>{const r=E2();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];kW(a,t,r,n)}},kW=(e,t,r,n)=>{if(typeof e=="string"){AW(e,t,r);return}if(typeof e=="function"){MW(e,t,r,n);return}DW(e,t,r,n)},AW=(e,t,r)=>{const n=e===""?t:O2(t,e);n.classGroupId=r},MW=(e,t,r,n)=>{if(jW(e)){Vw(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(CW(r,e))},DW=(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,O2(t,s),r,n)}},O2=(e,t)=>{let r=e;const n=t.split(du),i=n.length;for(let o=0;o<i;o++){const a=n[o];let s=r.nextPart.get(a);s||(s=E2(),r.nextPart.set(a,s)),r=s}return r},jW=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,qW=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)}}},cw="!",vO=":",LW=[],gO=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),zW=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 m=0;m<d;m++){const b=i[m];if(a===0&&s===0){if(b===vO){o.push(i.slice(c,m)),c=m+1;continue}if(b==="/"){u=m;continue}}b==="["?a++:b==="]"?a--:b==="("?s++:b===")"&&s--}const p=o.length===0?i:i.slice(c);let v=p,h=!1;p.endsWith(cw)?(v=p.slice(0,-1),h=!0):p.startsWith(cw)&&(v=p.slice(1),h=!0);const x=u&&u>c?u-c:void 0;return gO(o,h,v,x)};if(t){const i=t+vO,o=n;n=a=>a.startsWith(i)?o(a.slice(i.length)):gO(LW,!1,a,void 0,!0)}if(r){const i=n;n=o=>r({className:o,parseClassName:i})}return n},BW=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}},FW=e=>({cache:qW(e.cacheSize),parseClassName:zW(e),sortModifiers:BW(e),...RW(e)}),$W=/\s+/,HW=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],s=e.trim().split($W);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:m}=r(d);if(p){c=d+(c.length>0?" "+c:c);continue}let b=!!m,w=n(b?x.substring(0,m):x);if(!w){if(!b){c=d+(c.length>0?" "+c:c);continue}if(w=n(x),!w){c=d+(c.length>0?" "+c:c);continue}b=!1}const y=v.length===0?"":v.length===1?v[0]:o(v).join(":"),_=h?y+cw:y,S=_+w;if(a.indexOf(S)>-1)continue;a.push(S);const E=i(w,b);for(let I=0;I<E.length;++I){const N=E[I];a.push(_+N)}c=d+(c.length>0?" "+c:c)}return c},VW=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=C2(r))&&(i&&(i+=" "),i+=n);return i},C2=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=C2(e[n]))&&(r&&(r+=" "),r+=t);return r},mO=(e,...t)=>{let r,n,i,o;const a=c=>{const u=t.reduce((d,p)=>p(d),e());return r=FW(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=HW(c,r);return i(c,d),d};return o=a,(...c)=>o(VW(...c))},WW=[],Yt=e=>{const t=r=>r[e]||WW;return t.isThemeGetter=!0,t},I2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,R2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,UW=/^\d+\/\d+$/,GW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KW=/\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$/,YW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,XW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zo=e=>UW.test(e),Ve=e=>!!e&&!Number.isNaN(Number(e)),Si=e=>!!e&&Number.isInteger(Number(e)),vp=e=>e.endsWith("%")&&Ve(e.slice(0,-1)),ii=e=>GW.test(e),JW=()=>!0,QW=e=>KW.test(e)&&!YW.test(e),N2=()=>!1,eU=e=>XW.test(e),tU=e=>ZW.test(e),rU=e=>!Ie(e)&&!Re(e),nU=e=>va(e,k2,N2),Ie=e=>I2.test(e),Qi=e=>va(e,A2,QW),gp=e=>va(e,lU,Ve),bO=e=>va(e,T2,N2),iU=e=>va(e,P2,tU),pc=e=>va(e,M2,eU),Re=e=>R2.test(e),Ga=e=>ga(e,A2),oU=e=>ga(e,cU),yO=e=>ga(e,T2),aU=e=>ga(e,k2),sU=e=>ga(e,P2),hc=e=>ga(e,M2,!0),va=(e,t,r)=>{const n=I2.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ga=(e,t,r=!1)=>{const n=R2.exec(e);return n?n[1]?t(n[1]):r:!1},T2=e=>e==="position"||e==="percentage",P2=e=>e==="image"||e==="url",k2=e=>e==="length"||e==="size"||e==="bg-size",A2=e=>e==="length",lU=e=>e==="number",cU=e=>e==="family-name",M2=e=>e==="shadow",xO=()=>{const e=Yt("color"),t=Yt("font"),r=Yt("text"),n=Yt("font-weight"),i=Yt("tracking"),o=Yt("leading"),a=Yt("breakpoint"),s=Yt("container"),c=Yt("spacing"),u=Yt("radius"),d=Yt("shadow"),p=Yt("inset-shadow"),v=Yt("text-shadow"),h=Yt("drop-shadow"),x=Yt("blur"),m=Yt("perspective"),b=Yt("aspect"),w=Yt("ease"),y=Yt("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(),Re,Ie],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],T=()=>[Re,Ie,c],A=()=>[zo,"full","auto",...T()],B=()=>[Si,"none","subgrid",Re,Ie],L=()=>["auto",{span:["full",Si,Re,Ie]},Si,Re,Ie],D=()=>[Si,"auto",Re,Ie],z=()=>["auto","min","max","fr",Re,Ie],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=()=>[zo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],U=()=>[e,Re,Ie],Q=()=>[...S(),yO,bO,{position:[Re,Ie]}],k=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",aU,nU,{size:[Re,Ie]}],J=()=>[vp,Ga,Qi],ee=()=>["","none","full",u,Re,Ie],j=()=>["",Ve,Ga,Qi],G=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[Ve,vp,yO,bO],X=()=>["","none",x,Re,Ie],ne=()=>["none",Ve,Re,Ie],te=()=>["none",Ve,Re,Ie],ue=()=>[Ve,Re,Ie],re=()=>[zo,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ii],breakpoint:[ii],color:[JW],container:[ii],"drop-shadow":[ii],ease:["in","out","in-out"],font:[rU],"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",Ve],text:[ii],"text-shadow":[ii],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zo,Ie,Re,b]}],container:["container"],columns:[{columns:[Ve,Ie,Re,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:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Si,"auto",Re,Ie]}],basis:[{basis:[zo,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ve,zo,"auto","initial","none",Ie]}],grow:[{grow:["",Ve,Re,Ie]}],shrink:[{shrink:["",Ve,Re,Ie]}],order:[{order:[Si,"first","last","none",Re,Ie]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"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,Ga,Qi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Re,gp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vp,Ie]}],"font-family":[{font:[oU,Ie,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,Re,Ie]}],"line-clamp":[{"line-clamp":[Ve,"none",Re,gp]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",Re,Ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Re,Ie]}],"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:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ve,"from-font","auto",Re,Qi]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[Ve,"auto",Re,Ie]}],"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",Re,Ie]}],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",Re,Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Q()}],"bg-repeat":[{bg:k()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Si,Re,Ie],radial:["",Re,Ie],conic:[Si,Re,Ie]},sU,iU]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"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:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"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:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ve,Re,Ie]}],"outline-w":[{outline:["",Ve,Ga,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":[Ve,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:[Ve,Re,Ie]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"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":[Ve]}],"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":[Re,Ie]}],"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":[Ve]}],"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:Q()}],"mask-repeat":[{mask:k()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Re,Ie]}],filter:[{filter:["","none",Re,Ie]}],blur:[{blur:X()}],brightness:[{brightness:[Ve,Re,Ie]}],contrast:[{contrast:[Ve,Re,Ie]}],"drop-shadow":[{"drop-shadow":["","none",h,hc,pc]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",Ve,Re,Ie]}],"hue-rotate":[{"hue-rotate":[Ve,Re,Ie]}],invert:[{invert:["",Ve,Re,Ie]}],saturate:[{saturate:[Ve,Re,Ie]}],sepia:[{sepia:["",Ve,Re,Ie]}],"backdrop-filter":[{"backdrop-filter":["","none",Re,Ie]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[Ve,Re,Ie]}],"backdrop-contrast":[{"backdrop-contrast":[Ve,Re,Ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ve,Re,Ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ve,Re,Ie]}],"backdrop-invert":[{"backdrop-invert":["",Ve,Re,Ie]}],"backdrop-opacity":[{"backdrop-opacity":[Ve,Re,Ie]}],"backdrop-saturate":[{"backdrop-saturate":[Ve,Re,Ie]}],"backdrop-sepia":[{"backdrop-sepia":["",Ve,Re,Ie]}],"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",Re,Ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ve,"initial",Re,Ie]}],ease:[{ease:["linear","initial",w,Re,Ie]}],delay:[{delay:[Ve,Re,Ie]}],animate:[{animate:["none",y,Re,Ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Re,Ie]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[Re,Ie,"","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",Re,Ie]}],"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",Re,Ie]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[Ve,Ga,Qi,gp]}],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"]}},uU=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:i={},override:o={}})=>(gs(e,"cacheSize",t),gs(e,"prefix",r),gs(e,"experimentalParseClassName",n),vc(e.theme,o.theme),vc(e.classGroups,o.classGroups),vc(e.conflictingClassGroups,o.conflictingClassGroups),vc(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),gs(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),gc(e.theme,i.theme),gc(e.classGroups,i.classGroups),gc(e.conflictingClassGroups,i.conflictingClassGroups),gc(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),D2(e,i,"orderSensitiveModifiers"),e),gs=(e,t,r)=>{r!==void 0&&(e[t]=r)},vc=(e,t)=>{if(t)for(const r in t)gs(e,r,t[r])},gc=(e,t)=>{if(t)for(const r in t)D2(e,t,r)},D2=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},dU=(e,...t)=>typeof e=="function"?mO(xO,e,...t):mO(()=>uU(xO(),e),...t);function j2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wO={exports:{}};/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
relative rounded-full border transition-all duration-200 ease-in-out bg-transparent
|
|
12
12
|
focus:outline-hidden focus:ring-2 focus:ring-offset-0
|
|
13
13
|
cursor-pointer peer
|
|
14
|
-
`,SU=(e,t,r)=>{const{isDisabled:n,isInvalid:i}=r;return me(EU,Gs[e].radio,i?ks[t].radioInvalid:{[ks[t].radio]:!n,"cursor-not-allowed opacity-60":n})},OU=(e,t,r)=>{const{checked:n,isDisabled:i,isInvalid:o}=r;return me("center-absolute rounded-full transition-all duration-200 ease-in-out",Gs[e].dot,o?"bg-negative":{[ks[t].dot]:!i,"border-neutral":i,"opacity-0 scale-0":!n,"opacity-100 scale-100":n&&!i})},CU=(e,t,r)=>me("center-absolute rounded-full transition-all duration-200 opacity-0 group-hover:opacity-100",Gs[e].hoverDot,{[ks[t].hoverDot]:!r,"bg-negative-bg":r}),IU=e=>me("cursor-pointer select-none transition-colors duration-200",Gs[e].label),RU=(e,t,r,n)=>{const{isDisabled:i,isInvalid:o}=r;return me("inline-flex items-center group",Gs[e].container,o?{"text-negative":o}:{[ks[t].label]:!i,"text-muted":i},n)},NU=O.createContext(null),TU=()=>{const e=O.useContext(NU);if(!e)throw new Error("Radio.Item must be used within Radio.Group");return e},PU=O.forwardRef(({value:e,label:t,size:r,color:n,isDisabled:i,isInvalid:o,isRequired:a,className:s,...c},u)=>{const d=TU(),p=r??d.size,v=n??d.color,h=i??d.isDisabled,x=o??d.isInvalid,m=a??d.isRequired,b=d.value===e,w={checked:b,isDisabled:h,isInvalid:x},y=SU(p,v,w),_=OU(p,v,w),S=CU(p,v,x),E=IU(p),I=RU(p,v,w,s),N=()=>{h||d.onChange(e)};return C.jsxs("label",{"data-qui":"RadioItem",className:I,children:[C.jsxs("div",{className:me("relative",{hidden:d.hideIndicator}),children:[C.jsx("input",{ref:u,type:"radio",value:e,checked:b,disabled:h,required:m,"aria-invalid":x,"aria-label":t?void 0:c["aria-label"],name:d.name,onChange:N,className:"sr-only",...c}),C.jsxs("div",{className:y,children:[C.jsx("div",{className:_}),!b&&!h&&C.jsx("div",{className:S})]})]}),t&&C.jsxs("span",{className:E,children:[t,m&&C.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});PU.displayName="RadioItem";const q2={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"}},kU={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"}}},AU=(e,t,r,n)=>{const i=q2[e],o=kU[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])},MU=e=>me("flex items-center justify-center gap-1",q2[e].text),Zt=O.forwardRef(({size:e="md",variant:t="solid",color:r="primary",className:n,children:i,disabled:o,...a},s)=>C.jsx("button",{"data-qui":"Button",ref:s,type:"button",className:me(AU(e,t,r,o),MU(e),n),disabled:o,...a,children:i}));Zt.displayName="Button";const L2=O.createContext(null),Ks=()=>{const e=O.useContext(L2);if(!e)throw new Error("Input components must be used within Input.Root");return e},ma={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"}},DU=()=>me("flex flex-col relative"),jU=({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,ma[e].group,{"ring-1":i,"opacity-60":r,"items-center":!o})},qU=({size:e,color:t})=>me("bg-transparent ring-0 w-full","focus:outline-hidden",[ma[e].input],ci[t].placeholder),EO=({size:e,color:t})=>me("bg-transparent ring-0 w-full h-fit resize-none py-0.5","focus:outline-hidden",ma[e].input,ci[t].placeholder),LU=({size:e,color:t,isDisabled:r,isAction:n})=>me("transition-colors duration-200 rounded max-h-full h-fit",ma[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}),zU=({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,ma[e].message,{"opacity-60":r}),BU=({size:e})=>me(ma[e].icon);function fu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var FU=typeof global=="object"&&global&&global.Object===Object&&global,$U=typeof self=="object"&&self&&self.Object===Object&&self,z2=FU||$U||Function("return this")(),mp=function(){return z2.Date.now()},HU=/\s/;function VU(e){for(var t=e.length;t--&&HU.test(e.charAt(t)););return t}var WU=/^\s+/;function UU(e){return e&&e.slice(0,VU(e)+1).replace(WU,"")}var pu=z2.Symbol,B2=Object.prototype,GU=B2.hasOwnProperty,KU=B2.toString,Ka=pu?pu.toStringTag:void 0;function YU(e){var t=GU.call(e,Ka),r=e[Ka];try{e[Ka]=void 0;var n=!0}catch{}var i=KU.call(e);return n&&(t?e[Ka]=r:delete e[Ka]),i}var XU=Object.prototype,ZU=XU.toString;function JU(e){return ZU.call(e)}var QU="[object Null]",e8="[object Undefined]",SO=pu?pu.toStringTag:void 0;function t8(e){return e==null?e===void 0?e8:QU:SO&&SO in Object(e)?YU(e):JU(e)}function r8(e){return e!=null&&typeof e=="object"}var n8="[object Symbol]";function i8(e){return typeof e=="symbol"||r8(e)&&t8(e)==n8}var OO=NaN,o8=/^[-+]0x[0-9a-f]+$/i,a8=/^0b[01]+$/i,s8=/^0o[0-7]+$/i,l8=parseInt;function CO(e){if(typeof e=="number")return e;if(i8(e))return OO;if(fu(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=fu(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=UU(e);var r=a8.test(e);return r||s8.test(e)?l8(e.slice(2),r?2:8):o8.test(e)?OO:+e}var c8="Expected a function",u8=Math.max,d8=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(c8);t=CO(t)||0,fu(r)&&(d=!!r.leading,p="maxWait"in r,o=p?u8(CO(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 m(I){var N=I-c,T=I-u,A=t-N;return p?d8(A,o-T):A}function b(I){var N=I-c,T=I-u;return c===void 0||N>=t||N<0||p&&T>=o}function w(){var I=mp();if(b(I))return y(I);s=setTimeout(w,m(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(mp())}function E(){var I=mp(),N=b(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 f8="Expected a function";function p8(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(f8);return fu(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 F2(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function $2(e){return!e||!e.ownerDocument?document:e.ownerDocument}var H2=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 W2(e,t){e&&t.split(" ").forEach(function(r){e.classList.remove(r)})}function U2(e){return".".concat(e.split(" ").join("."))}var Ww=!!(typeof window<"u"&&window.document&&window.document.createElement),h8=Object.freeze({__proto__:null,addClasses:V2,canUseDOM:Ww,classNamesToQuery:U2,getElementDocument:$2,getElementWindow:F2,getOptions:H2,removeClasses:W2}),Uo=null,IO=null;Ww&&window.addEventListener("resize",function(){IO!==window.devicePixelRatio&&(IO=window.devicePixelRatio,Uo=null)});function RO(){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=F2,bp=$2,v8=H2,Ci=V2,Ii=W2,Ar=U2,Ya=(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,m;if(!(!n.draggedAxis||!n.contentWrapperEl)){var b,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"?b=i.pageY:b=i.pageX;var I=b-((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=!((m=e.getRtlHelpers())===null||m===void 0)&&m.isScrollingToNegative?-T:T),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=T}},this.onEndDrag=function(i){n.isDragging=!1;var o=bp(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=p8(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:RO()}catch{return RO()}},e.getOffset=function(t){var r=t.getBoundingClientRect(),n=bp(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(){Ww&&(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(Ar(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(Ar(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(Ar(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(Ar(this.classNames.offset)),this.maskEl=this.el.querySelector(Ar(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,Ar(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(Ar(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(Ar(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(Ar(this.classNames.track)).concat(Ar(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(Ar(this.classNames.track)).concat(Ar(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(Ar(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(Ar(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=bp(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,m=x<0?-1:1,b=m===-1?h-v:h+v,w=40,y=function(){n.contentWrapperEl&&(m===-1?h>b&&(h-=w,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=h,u.requestAnimationFrame(y)):h<b&&(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=v8,e.helpers=h8,e})(),Gr=function(){return Gr=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},Gr.apply(this,arguments)};function g8(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 Uw=Ct.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=g8(e,["children","scrollableNodeProps"]),a=Ct.useRef(),s=Ct.useRef(),c=Ct.useRef(),u={},d={};Object.keys(o).forEach(function(h){Object.prototype.hasOwnProperty.call(Ya.defaultOptions,h)?u[h]=o[h]:d[h]=o[h]});var p=Gr(Gr({},Ya.defaultOptions.classNames),u.classNames),v=Gr(Gr({},i),{className:"".concat(p.contentWrapper).concat(i.className?" ".concat(i.className):""),tabIndex:u.tabIndex||Ya.defaultOptions.tabIndex,role:"region","aria-label":u.ariaLabel||Ya.defaultOptions.ariaLabel});return Ct.useEffect(function(){var h;return s.current=v.ref?v.ref.current:s.current,a.current&&(h=new Ya(a.current,Gr(Gr(Gr({},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)}},[]),Ct.createElement("div",Gr({"data-simplebar":"init",ref:a},d),Ct.createElement("div",{className:p.wrapper},Ct.createElement("div",{className:p.heightAutoObserverWrapperEl},Ct.createElement("div",{className:p.heightAutoObserverEl})),Ct.createElement("div",{className:p.mask},Ct.createElement("div",{className:p.offset},typeof r=="function"?r({scrollableNodeRef:s,scrollableNodeProps:Gr(Gr({},v),{ref:s}),contentNodeRef:c,contentNodeProps:{className:p.contentEl,ref:c}}):Ct.createElement("div",Gr({},v),Ct.createElement("div",{className:p.contentEl},r)))),Ct.createElement("div",{className:p.placeholder})),Ct.createElement("div",{className:"".concat(p.track," ").concat(p.horizontal)},Ct.createElement("div",{className:p.scrollbar})),Ct.createElement("div",{className:"".concat(p.track," ").concat(p.vertical)},Ct.createElement("div",{className:p.scrollbar})))});Uw.displayName="SimpleBar";const G2=O.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]=O.useState(!1),[p,v]=O.useState(!1),h={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,isReadOnly:i,hasMessage:u,setHasMessage:d,hasArea:p,setHasArea:v};return C.jsx(L2.Provider,{value:h,children:C.jsx("div",{ref:c,"data-qui":"Input",className:me(DU(),o),...s,children:a})})}),K2=O.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:u,isInvalid:d}=Ks();return C.jsx("div",{ref:n,"data-qui":"InputGroup",className:me(jU({size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:u,isInvalid:d}),e),...r,children:t})}),Y2=O.forwardRef(({className:e,...t},r)=>{const{size:n,color:i,isInvalid:o,isDisabled:a,isReadOnly:s}=Ks(),{isDisabled:c,isReadOnly:u,...d}=t;return C.jsx("input",{ref:r,disabled:a||c,readOnly:u||s||!1,"aria-invalid":o,className:me(qU({size:n,color:i}),e),...d})}),m8=O.forwardRef(({className:e,autoHeight:t,...r},n)=>{const{size:i,color:o,isInvalid:a,isDisabled:s,setHasArea:c}=Ks(),u=O.useRef(null),d=n||u,p=O.useRef(null);O.useEffect(()=>(c(!0),()=>{c(!1)}),[c]);const v=O.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)};O.useEffect(()=>{v()},[v,r.value]),O.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 A=E+(T.clientY-S);A>30&&(_.style.height=A+"px")},N=()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",N)};document.addEventListener("mousemove",I),document.addEventListener("mouseup",N)},{isDisabled:m,isReadOnly:b,...w}=r;return C.jsxs("div",{ref:p,className:me("w-full relative",!t&&"h-[120px]"),children:[t?C.jsx("textarea",{ref:d,rows:1,className:me(EO({size:i,color:o}),e),disabled:s||m,onInput:h,readOnly:b||!1,"aria-invalid":a,style:{overflow:"hidden"},...w}):C.jsx(Uw,{style:{height:"100%"},children:C.jsx("textarea",{ref:d,rows:1,className:me(EO({size:i,color:o}),e),disabled:s||m,onInput:h,readOnly:b||!1,"aria-invalid":a,style:{height:"auto",overflow:"hidden",width:"100%"},...w})}),!t&&C.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:C.jsx(SW,{})})]})}),X2=O.forwardRef(({isAction:e=!1,className:t,isDisabled:r=!1,style:n,children:i,...o},a)=>{const{size:s,color:c,isDisabled:u}=Ks(),d=r||u,p=LU({size:s,color:c,isDisabled:d,isAction:e});return C.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})}),Z2=O.forwardRef(({icon:e,className:t,children:r,...n},i)=>{const{size:o,color:a,setHasMessage:s,isDisabled:c}=Ks();return O.useEffect(()=>(s(!0),()=>{s(!1)}),[s]),C.jsxs("div",{ref:i,"data-qui":"InputMessage",role:"alert",className:me(zU({size:o,color:a,isDisabled:c}),t),...n,children:[e!==void 0&&C.jsx("div",{className:me(BU({size:o}),t),children:e}),C.jsx("p",{children:r})]})});G2.displayName="InputRoot";K2.displayName="InputGroup";Y2.displayName="InputField";m8.displayName="InputArea";X2.displayName="InputIcon";Z2.displayName="InputMessage";const wt={Root:G2,Group:K2,Field:Y2,Icon:X2,Message:Z2},As={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"}},b8=({color:e})=>me("min-h-6 absolute py-0.5 px-1 rounded whitespace-nowrap flex items-center gap-1",As[e].container,As[e].icon),y8=({color:e})=>me("text-xs font-medium leading-3",As[e].text),x8=({color:e})=>me("p-0.5 rounded cursor-pointer",As[e].button,As[e].icon),Kr=({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]=O.useState(!1),[h,x]=O.useState(!1),[m,b]=O.useState({position:r,transform:""}),w=O.useRef(null),y=O.useRef(null),_=O.useRef(null);O.useEffect(()=>{d&&p&&(v(!1),_.current&&clearTimeout(_.current))},[d,p]);const S=O.useCallback(()=>{if(!w.current||!y.current)return;const D=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),Q=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,K),k=4;let W=r,J={position:W,transform:""};const ee=q=>{const{top:X,left:ne,width:te,height:ue}=D,re=X+Y,ge=ne+$;switch(q){case"up":return{top:`${re-z.height-k}px`,left:`${ge+te/2}px`,transform:"translateX(-50%)"};case"up-start":return{top:`${re-z.height-k}px`,left:`${ge}px`,transform:"translateX(0)"};case"up-end":return{top:`${re-z.height-k}px`,left:`${ge+te-z.width}px`,transform:"translateX(0)"};case"down":return{top:`${re+ue+k}px`,left:`${ge+te/2}px`,transform:"translateX(-50%)"};case"down-start":return{top:`${re+ue+k}px`,left:`${ge}px`,transform:"translateX(0)"};case"down-end":return{top:`${re+ue+k}px`,left:`${ge+te-z.width}px`,transform:"translateX(0)"};case"left":return{top:`${re+ue/2}px`,left:`${ge-z.width-k}px`,transform:"translateY(-50%)"};case"left-start":return{top:`${re}px`,left:`${ge-z.width-k}px`,transform:"translateY(0)"};case"left-end":return{top:`${re+ue-z.height}px`,left:`${ge-z.width-k}px`,transform:"translateY(0)"};case"right":return{top:`${re+ue/2}px`,left:`${ge+te+k}px`,transform:"translateY(-50%)"};case"right-start":return{top:`${re}px`,left:`${ge+te+k}px`,transform:"translateY(0)"};case"right-end":return{top:`${re+ue-z.height}px`,left:`${ge+te+k}px`,transform:"translateY(0)"};default:return{}}},j={up:{fits:D.top-z.height-k>=0},"up-start":{fits:D.top-z.height-k>=0&&D.left+z.width<=P},"up-end":{fits:D.top-z.height-k>=0&&D.right-z.width>=0},down:{fits:D.bottom+z.height+k<=K&&D.bottom+z.height+k<=Q},"down-start":{fits:D.bottom+z.height+k<=K&&D.bottom+z.height+k<=Q&&D.left+z.width<=P},"down-end":{fits:D.bottom+z.height+k<=K&&D.bottom+z.height+k<=Q&&D.right-z.width>=0},left:{fits:D.left-z.width-k>=0},"left-start":{fits:D.left-z.width-k>=0&&D.top+z.height<=K},"left-end":{fits:D.left-z.width-k>=0&&D.bottom-z.height>=0},right:{fits:D.right+z.width+k<=P&&D.right+z.width+k<=U},"right-start":{fits:D.right+z.width+k<=P&&D.right+z.width+k<=U&&D.top+z.height<=K},"right-end":{fits:D.right+z.width+k<=P&&D.right+z.width+k<=U&&D.bottom-z.height>=0}},G=D.left+D.width/2-z.width/2,H=D.left+D.width/2+z.width/2;if((r==="up"||r==="down")&&(G<0||H>P)&&(j[r].fits=!1),j[r].fits){const q=ee(r);J={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);J={position:W,...X,transform:X.transform||""}}else{const X={up:D.top,"up-start":D.top,"up-end":D.top,down:Math.min(K-D.bottom,Q-D.bottom),"down-start":Math.min(K-D.bottom,Q-D.bottom),"down-end":Math.min(K-D.bottom,Q-D.bottom),left:D.left,"left-start":D.left,"left-end":D.left,right:Math.min(P-D.right,U-D.right),"right-start":Math.min(P-D.right,U-D.right),"right-end":Math.min(P-D.right,U-D.right)},ne=Object.entries(X).reduce((ue,[re,ge])=>ge>ue.space?{position:re,space:ge}:ue,{position:"up",space:0}).position;W=ne;const te=ee(ne);J={position:W,...te,transform:te.transform||""}}}b(J)},[r]),E=()=>{s!=="click"||d||(v(!0),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{h||v(!1)},a))},I=D=>{D.stopPropagation(),v(!1),_.current&&clearTimeout(_.current)},N=()=>{x(!0),_.current&&clearTimeout(_.current)},T=()=>{x(!1),p&&(_.current=setTimeout(()=>{v(!1)},a))},A=()=>{s==="hover"&&!d&&(v(!0),_.current&&clearTimeout(_.current))},B=()=>{s==="hover"&&(_.current=setTimeout(()=>{v(!1)},a))};O.useEffect(()=>{if(p){const D=requestAnimationFrame(()=>{S()});return()=>cancelAnimationFrame(D)}},[p,e,S]),O.useEffect(()=>{if(p){const D=setTimeout(()=>S(),0);return()=>clearTimeout(D)}},[p,S]),O.useEffect(()=>{const D=()=>{p&&S()},z=()=>{p&&S()};return window.addEventListener("resize",D),window.addEventListener("scroll",z,!0),()=>{window.removeEventListener("resize",D),window.removeEventListener("scroll",z,!0),_.current&&clearTimeout(_.current)}},[p,S]);const L=u||(typeof document<"u"?document.body:null);return L?C.jsxs(C.Fragment,{children:[C.jsx("div",{"data-qui":"Tooltip",ref:w,onClick:E,onMouseEnter:A,onMouseLeave:B,className:me("relative inline-flex items-center",c),children:o}),p&&!!e&&si.createPortal(C.jsxs("div",{ref:y,role:"tooltip",className:b8({color:t}),style:{position:"absolute",left:m.left??0,top:m.top??0,transform:m.transform,zIndex:1e3,visibility:m.left?"visible":"hidden"},onMouseEnter:N,onMouseLeave:T,children:[i&&C.jsx("span",{"data-testid":"tooltip-icon",children:i}),C.jsx("div",{className:y8({color:t}),children:e}),n&&C.jsx("div",{onClick:I,className:x8({color:t}),role:"button",children:C.jsx(Vu,{})})]}),L)]}):null};function w8(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return O.useMemo(()=>n=>{t.forEach(i=>i(n))},t)}const Wu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ba(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Gw(e){return"nodeType"in e}function wr(e){var t,r;return e?ba(e)?e:Gw(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function Kw(e){const{Document:t}=wr(e);return e instanceof t}function Ys(e){return ba(e)?!1:e instanceof wr(e).HTMLElement}function J2(e){return e instanceof wr(e).SVGElement}function ya(e){return e?ba(e)?e.document:Gw(e)?Kw(e)?e:Ys(e)||J2(e)?e.ownerDocument:document:document:document}const Rn=Wu?O.useLayoutEffect:O.useEffect;function Uu(e){const t=O.useRef(e);return Rn(()=>{t.current=e}),O.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 _8(){const e=O.useRef(null),t=O.useCallback((n,i)=>{e.current=setInterval(n,i)},[]),r=O.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Ms(e,t){t===void 0&&(t=[e]);const r=O.useRef(e);return Rn(()=>{r.current!==e&&(r.current=e)},t),r}function Xs(e,t){const r=O.useRef();return O.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function hu(e){const t=Uu(e),r=O.useRef(null),n=O.useCallback(i=>{i!==r.current&&(t==null||t(i,r.current)),r.current=i},[]);return[r,n]}function vu(e){const t=O.useRef();return O.useEffect(()=>{t.current=e},[e]),t.current}let yp={};function Zs(e,t){return O.useMemo(()=>{if(t)return t;const r=yp[e]==null?0:yp[e]+1;return yp[e]=r,e+"-"+r},[e,t])}function Q2(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=Q2(1),gu=Q2(-1);function E8(e){return"clientX"in e&&"clientY"in e}function Gu(e){if(!e)return!1;const{KeyboardEvent:t}=wr(e.target);return t&&e instanceof t}function S8(e){if(!e)return!1;const{TouchEvent:t}=wr(e.target);return t&&e instanceof t}function mu(e){if(S8(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 E8(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}}}),NO="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function O8(e){return e.matches(NO)?e:e.querySelector(NO)}const C8={display:"none"};function I8(e){let{id:t,value:r}=e;return O.createElement("div",{id:t,style:C8},r)}function R8(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 O.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function N8(){const[e,t]=O.useState("");return{announce:O.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const eq=O.createContext(null);function T8(e){const t=O.useContext(eq);O.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function P8(){const[e]=O.useState(()=>new Set),t=O.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[O.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 k8={draggable:`
|
|
14
|
+
`,SU=(e,t,r)=>{const{isDisabled:n,isInvalid:i}=r;return me(EU,Gs[e].radio,i?ks[t].radioInvalid:{[ks[t].radio]:!n,"cursor-not-allowed opacity-60":n})},OU=(e,t,r)=>{const{checked:n,isDisabled:i,isInvalid:o}=r;return me("center-absolute rounded-full transition-all duration-200 ease-in-out",Gs[e].dot,o?"bg-negative":{[ks[t].dot]:!i,"border-neutral":i,"opacity-0 scale-0":!n,"opacity-100 scale-100":n&&!i})},CU=(e,t,r)=>me("center-absolute rounded-full transition-all duration-200 opacity-0 group-hover:opacity-100",Gs[e].hoverDot,{[ks[t].hoverDot]:!r,"bg-negative-bg":r}),IU=e=>me("cursor-pointer select-none transition-colors duration-200",Gs[e].label),RU=(e,t,r,n)=>{const{isDisabled:i,isInvalid:o}=r;return me("inline-flex items-center group",Gs[e].container,o?{"text-negative":o}:{[ks[t].label]:!i,"text-muted":i},n)},NU=O.createContext(null),TU=()=>{const e=O.useContext(NU);if(!e)throw new Error("Radio.Item must be used within Radio.Group");return e},PU=O.forwardRef(({value:e,label:t,size:r,color:n,isDisabled:i,isInvalid:o,isRequired:a,className:s,...c},u)=>{const d=TU(),p=r??d.size,v=n??d.color,h=i??d.isDisabled,x=o??d.isInvalid,m=a??d.isRequired,b=d.value===e,w={checked:b,isDisabled:h,isInvalid:x},y=SU(p,v,w),_=OU(p,v,w),S=CU(p,v,x),E=IU(p),I=RU(p,v,w,s),N=()=>{h||d.onChange(e)};return C.jsxs("label",{"data-qui":"RadioItem",className:I,children:[C.jsxs("div",{className:me("relative",{hidden:d.hideIndicator}),children:[C.jsx("input",{ref:u,type:"radio",value:e,checked:b,disabled:h,required:m,"aria-invalid":x,"aria-label":t?void 0:c["aria-label"],name:d.name,onChange:N,className:"sr-only",...c}),C.jsxs("div",{className:y,children:[C.jsx("div",{className:_}),!b&&!h&&C.jsx("div",{className:S})]})]}),t&&C.jsxs("span",{className:E,children:[t,m&&C.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});PU.displayName="RadioItem";const q2={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"}},kU={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"}}},AU=(e,t,r,n)=>{const i=q2[e],o=kU[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])},MU=e=>me("flex items-center justify-center gap-1",q2[e].text),Zt=O.forwardRef(({size:e="md",variant:t="solid",color:r="primary",className:n,children:i,disabled:o,...a},s)=>C.jsx("button",{"data-qui":"Button",ref:s,type:"button",className:me(AU(e,t,r,o),MU(e),n),disabled:o,...a,children:i}));Zt.displayName="Button";const L2=O.createContext(null),Ks=()=>{const e=O.useContext(L2);if(!e)throw new Error("Input components must be used within Input.Root");return e},ma={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"}},DU=()=>me("flex flex-col relative"),jU=({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,ma[e].group,{"ring-1":i,"opacity-60":r,"items-center":!o})},qU=({size:e,color:t})=>me("bg-transparent ring-0 w-full","focus:outline-hidden",[ma[e].input],ci[t].placeholder),EO=({size:e,color:t})=>me("bg-transparent ring-0 w-full h-fit resize-none py-0.5","focus:outline-hidden",ma[e].input,ci[t].placeholder),LU=({size:e,color:t,isDisabled:r,isAction:n})=>me("transition-colors duration-200 rounded max-h-full h-fit",ma[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}),zU=({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,ma[e].message,{"opacity-60":r}),BU=({size:e})=>me(ma[e].icon);function fu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var FU=typeof global=="object"&&global&&global.Object===Object&&global,$U=typeof self=="object"&&self&&self.Object===Object&&self,z2=FU||$U||Function("return this")(),mp=function(){return z2.Date.now()},HU=/\s/;function VU(e){for(var t=e.length;t--&&HU.test(e.charAt(t)););return t}var WU=/^\s+/;function UU(e){return e&&e.slice(0,VU(e)+1).replace(WU,"")}var pu=z2.Symbol,B2=Object.prototype,GU=B2.hasOwnProperty,KU=B2.toString,Ka=pu?pu.toStringTag:void 0;function YU(e){var t=GU.call(e,Ka),r=e[Ka];try{e[Ka]=void 0;var n=!0}catch{}var i=KU.call(e);return n&&(t?e[Ka]=r:delete e[Ka]),i}var XU=Object.prototype,ZU=XU.toString;function JU(e){return ZU.call(e)}var QU="[object Null]",e8="[object Undefined]",SO=pu?pu.toStringTag:void 0;function t8(e){return e==null?e===void 0?e8:QU:SO&&SO in Object(e)?YU(e):JU(e)}function r8(e){return e!=null&&typeof e=="object"}var n8="[object Symbol]";function i8(e){return typeof e=="symbol"||r8(e)&&t8(e)==n8}var OO=NaN,o8=/^[-+]0x[0-9a-f]+$/i,a8=/^0b[01]+$/i,s8=/^0o[0-7]+$/i,l8=parseInt;function CO(e){if(typeof e=="number")return e;if(i8(e))return OO;if(fu(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=fu(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=UU(e);var r=a8.test(e);return r||s8.test(e)?l8(e.slice(2),r?2:8):o8.test(e)?OO:+e}var c8="Expected a function",u8=Math.max,d8=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(c8);t=CO(t)||0,fu(r)&&(d=!!r.leading,p="maxWait"in r,o=p?u8(CO(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 m(I){var N=I-c,T=I-u,A=t-N;return p?d8(A,o-T):A}function b(I){var N=I-c,T=I-u;return c===void 0||N>=t||N<0||p&&T>=o}function w(){var I=mp();if(b(I))return y(I);s=setTimeout(w,m(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(mp())}function E(){var I=mp(),N=b(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 f8="Expected a function";function p8(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(f8);return fu(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 Yo=function(){return Yo=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},Yo.apply(this,arguments)};function F2(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function $2(e){return!e||!e.ownerDocument?document:e.ownerDocument}var H2=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 W2(e,t){e&&t.split(" ").forEach(function(r){e.classList.remove(r)})}function U2(e){return".".concat(e.split(" ").join("."))}var Ww=!!(typeof window<"u"&&window.document&&window.document.createElement),h8=Object.freeze({__proto__:null,addClasses:V2,canUseDOM:Ww,classNamesToQuery:U2,getElementDocument:$2,getElementWindow:F2,getOptions:H2,removeClasses:W2}),Go=null,IO=null;Ww&&window.addEventListener("resize",function(){IO!==window.devicePixelRatio&&(IO=window.devicePixelRatio,Go=null)});function RO(){if(Go===null){if(typeof document>"u")return Go=0,Go;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),Go=r}return Go}var Oi=F2,bp=$2,v8=H2,Ci=V2,Ii=W2,Ar=U2,Ya=(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,m;if(!(!n.draggedAxis||!n.contentWrapperEl)){var b,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"?b=i.pageY:b=i.pageX;var I=b-((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=!((m=e.getRtlHelpers())===null||m===void 0)&&m.isScrollingToNegative?-T:T),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=T}},this.onEndDrag=function(i){n.isDragging=!1;var o=bp(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=Yo(Yo({},e.defaultOptions),r),this.classNames=Yo(Yo({},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=p8(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:RO()}catch{return RO()}},e.getOffset=function(t){var r=t.getBoundingClientRect(),n=bp(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(){Ww&&(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(Ar(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(Ar(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(Ar(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(Ar(this.classNames.offset)),this.maskEl=this.el.querySelector(Ar(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,Ar(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(Ar(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(Ar(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(Ar(this.classNames.track)).concat(Ar(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(Ar(this.classNames.track)).concat(Ar(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(Ar(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(Ar(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=bp(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,m=x<0?-1:1,b=m===-1?h-v:h+v,w=40,y=function(){n.contentWrapperEl&&(m===-1?h>b&&(h-=w,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=h,u.requestAnimationFrame(y)):h<b&&(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=v8,e.helpers=h8,e})(),Gr=function(){return Gr=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},Gr.apply(this,arguments)};function g8(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 Uw=Ct.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=g8(e,["children","scrollableNodeProps"]),a=Ct.useRef(),s=Ct.useRef(),c=Ct.useRef(),u={},d={};Object.keys(o).forEach(function(h){Object.prototype.hasOwnProperty.call(Ya.defaultOptions,h)?u[h]=o[h]:d[h]=o[h]});var p=Gr(Gr({},Ya.defaultOptions.classNames),u.classNames),v=Gr(Gr({},i),{className:"".concat(p.contentWrapper).concat(i.className?" ".concat(i.className):""),tabIndex:u.tabIndex||Ya.defaultOptions.tabIndex,role:"region","aria-label":u.ariaLabel||Ya.defaultOptions.ariaLabel});return Ct.useEffect(function(){var h;return s.current=v.ref?v.ref.current:s.current,a.current&&(h=new Ya(a.current,Gr(Gr(Gr({},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)}},[]),Ct.createElement("div",Gr({"data-simplebar":"init",ref:a},d),Ct.createElement("div",{className:p.wrapper},Ct.createElement("div",{className:p.heightAutoObserverWrapperEl},Ct.createElement("div",{className:p.heightAutoObserverEl})),Ct.createElement("div",{className:p.mask},Ct.createElement("div",{className:p.offset},typeof r=="function"?r({scrollableNodeRef:s,scrollableNodeProps:Gr(Gr({},v),{ref:s}),contentNodeRef:c,contentNodeProps:{className:p.contentEl,ref:c}}):Ct.createElement("div",Gr({},v),Ct.createElement("div",{className:p.contentEl},r)))),Ct.createElement("div",{className:p.placeholder})),Ct.createElement("div",{className:"".concat(p.track," ").concat(p.horizontal)},Ct.createElement("div",{className:p.scrollbar})),Ct.createElement("div",{className:"".concat(p.track," ").concat(p.vertical)},Ct.createElement("div",{className:p.scrollbar})))});Uw.displayName="SimpleBar";const G2=O.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]=O.useState(!1),[p,v]=O.useState(!1),h={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,isReadOnly:i,hasMessage:u,setHasMessage:d,hasArea:p,setHasArea:v};return C.jsx(L2.Provider,{value:h,children:C.jsx("div",{ref:c,"data-qui":"Input",className:me(DU(),o),...s,children:a})})}),K2=O.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:u,isInvalid:d}=Ks();return C.jsx("div",{ref:n,"data-qui":"InputGroup",className:me(jU({size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:u,isInvalid:d}),e),...r,children:t})}),Y2=O.forwardRef(({className:e,...t},r)=>{const{size:n,color:i,isInvalid:o,isDisabled:a,isReadOnly:s}=Ks(),{isDisabled:c,isReadOnly:u,...d}=t;return C.jsx("input",{ref:r,disabled:a||c,readOnly:u||s||!1,"aria-invalid":o,className:me(qU({size:n,color:i}),e),...d})}),m8=O.forwardRef(({className:e,autoHeight:t,...r},n)=>{const{size:i,color:o,isInvalid:a,isDisabled:s,setHasArea:c}=Ks(),u=O.useRef(null),d=n||u,p=O.useRef(null);O.useEffect(()=>(c(!0),()=>{c(!1)}),[c]);const v=O.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)};O.useEffect(()=>{v()},[v,r.value]),O.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 A=E+(T.clientY-S);A>30&&(_.style.height=A+"px")},N=()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",N)};document.addEventListener("mousemove",I),document.addEventListener("mouseup",N)},{isDisabled:m,isReadOnly:b,...w}=r;return C.jsxs("div",{ref:p,className:me("w-full relative",!t&&"h-[120px]"),children:[t?C.jsx("textarea",{ref:d,rows:1,className:me(EO({size:i,color:o}),e),disabled:s||m,onInput:h,readOnly:b||!1,"aria-invalid":a,style:{overflow:"hidden"},...w}):C.jsx(Uw,{style:{height:"100%"},children:C.jsx("textarea",{ref:d,rows:1,className:me(EO({size:i,color:o}),e),disabled:s||m,onInput:h,readOnly:b||!1,"aria-invalid":a,style:{height:"auto",overflow:"hidden",width:"100%"},...w})}),!t&&C.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:C.jsx(SW,{})})]})}),X2=O.forwardRef(({isAction:e=!1,className:t,isDisabled:r=!1,style:n,children:i,...o},a)=>{const{size:s,color:c,isDisabled:u}=Ks(),d=r||u,p=LU({size:s,color:c,isDisabled:d,isAction:e});return C.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})}),Z2=O.forwardRef(({icon:e,className:t,children:r,...n},i)=>{const{size:o,color:a,setHasMessage:s,isDisabled:c}=Ks();return O.useEffect(()=>(s(!0),()=>{s(!1)}),[s]),C.jsxs("div",{ref:i,"data-qui":"InputMessage",role:"alert",className:me(zU({size:o,color:a,isDisabled:c}),t),...n,children:[e!==void 0&&C.jsx("div",{className:me(BU({size:o}),t),children:e}),C.jsx("p",{children:r})]})});G2.displayName="InputRoot";K2.displayName="InputGroup";Y2.displayName="InputField";m8.displayName="InputArea";X2.displayName="InputIcon";Z2.displayName="InputMessage";const wt={Root:G2,Group:K2,Field:Y2,Icon:X2,Message:Z2},As={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"}},b8=({color:e})=>me("min-h-6 absolute py-0.5 px-1 rounded whitespace-nowrap flex items-center gap-1",As[e].container,As[e].icon),y8=({color:e})=>me("text-xs font-medium leading-3",As[e].text),x8=({color:e})=>me("p-0.5 rounded cursor-pointer",As[e].button,As[e].icon),Kr=({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]=O.useState(!1),[h,x]=O.useState(!1),[m,b]=O.useState({position:r,transform:""}),w=O.useRef(null),y=O.useRef(null),_=O.useRef(null);O.useEffect(()=>{d&&p&&(v(!1),_.current&&clearTimeout(_.current))},[d,p]);const S=O.useCallback(()=>{if(!w.current||!y.current)return;const D=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),Q=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,K),k=4;let W=r,J={position:W,transform:""};const ee=q=>{const{top:X,left:ne,width:te,height:ue}=D,re=X+Y,ge=ne+$;switch(q){case"up":return{top:`${re-z.height-k}px`,left:`${ge+te/2}px`,transform:"translateX(-50%)"};case"up-start":return{top:`${re-z.height-k}px`,left:`${ge}px`,transform:"translateX(0)"};case"up-end":return{top:`${re-z.height-k}px`,left:`${ge+te-z.width}px`,transform:"translateX(0)"};case"down":return{top:`${re+ue+k}px`,left:`${ge+te/2}px`,transform:"translateX(-50%)"};case"down-start":return{top:`${re+ue+k}px`,left:`${ge}px`,transform:"translateX(0)"};case"down-end":return{top:`${re+ue+k}px`,left:`${ge+te-z.width}px`,transform:"translateX(0)"};case"left":return{top:`${re+ue/2}px`,left:`${ge-z.width-k}px`,transform:"translateY(-50%)"};case"left-start":return{top:`${re}px`,left:`${ge-z.width-k}px`,transform:"translateY(0)"};case"left-end":return{top:`${re+ue-z.height}px`,left:`${ge-z.width-k}px`,transform:"translateY(0)"};case"right":return{top:`${re+ue/2}px`,left:`${ge+te+k}px`,transform:"translateY(-50%)"};case"right-start":return{top:`${re}px`,left:`${ge+te+k}px`,transform:"translateY(0)"};case"right-end":return{top:`${re+ue-z.height}px`,left:`${ge+te+k}px`,transform:"translateY(0)"};default:return{}}},j={up:{fits:D.top-z.height-k>=0},"up-start":{fits:D.top-z.height-k>=0&&D.left+z.width<=P},"up-end":{fits:D.top-z.height-k>=0&&D.right-z.width>=0},down:{fits:D.bottom+z.height+k<=K&&D.bottom+z.height+k<=Q},"down-start":{fits:D.bottom+z.height+k<=K&&D.bottom+z.height+k<=Q&&D.left+z.width<=P},"down-end":{fits:D.bottom+z.height+k<=K&&D.bottom+z.height+k<=Q&&D.right-z.width>=0},left:{fits:D.left-z.width-k>=0},"left-start":{fits:D.left-z.width-k>=0&&D.top+z.height<=K},"left-end":{fits:D.left-z.width-k>=0&&D.bottom-z.height>=0},right:{fits:D.right+z.width+k<=P&&D.right+z.width+k<=U},"right-start":{fits:D.right+z.width+k<=P&&D.right+z.width+k<=U&&D.top+z.height<=K},"right-end":{fits:D.right+z.width+k<=P&&D.right+z.width+k<=U&&D.bottom-z.height>=0}},G=D.left+D.width/2-z.width/2,H=D.left+D.width/2+z.width/2;if((r==="up"||r==="down")&&(G<0||H>P)&&(j[r].fits=!1),j[r].fits){const q=ee(r);J={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);J={position:W,...X,transform:X.transform||""}}else{const X={up:D.top,"up-start":D.top,"up-end":D.top,down:Math.min(K-D.bottom,Q-D.bottom),"down-start":Math.min(K-D.bottom,Q-D.bottom),"down-end":Math.min(K-D.bottom,Q-D.bottom),left:D.left,"left-start":D.left,"left-end":D.left,right:Math.min(P-D.right,U-D.right),"right-start":Math.min(P-D.right,U-D.right),"right-end":Math.min(P-D.right,U-D.right)},ne=Object.entries(X).reduce((ue,[re,ge])=>ge>ue.space?{position:re,space:ge}:ue,{position:"up",space:0}).position;W=ne;const te=ee(ne);J={position:W,...te,transform:te.transform||""}}}b(J)},[r]),E=()=>{s!=="click"||d||(v(!0),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{h||v(!1)},a))},I=D=>{D.stopPropagation(),v(!1),_.current&&clearTimeout(_.current)},N=()=>{x(!0),_.current&&clearTimeout(_.current)},T=()=>{x(!1),p&&(_.current=setTimeout(()=>{v(!1)},a))},A=()=>{s==="hover"&&!d&&(v(!0),_.current&&clearTimeout(_.current))},B=()=>{s==="hover"&&(_.current=setTimeout(()=>{v(!1)},a))};O.useEffect(()=>{if(p){const D=requestAnimationFrame(()=>{S()});return()=>cancelAnimationFrame(D)}},[p,e,S]),O.useEffect(()=>{if(p){const D=setTimeout(()=>S(),0);return()=>clearTimeout(D)}},[p,S]),O.useEffect(()=>{const D=()=>{p&&S()},z=()=>{p&&S()};return window.addEventListener("resize",D),window.addEventListener("scroll",z,!0),()=>{window.removeEventListener("resize",D),window.removeEventListener("scroll",z,!0),_.current&&clearTimeout(_.current)}},[p,S]);const L=u||(typeof document<"u"?document.body:null);return L?C.jsxs(C.Fragment,{children:[C.jsx("div",{"data-qui":"Tooltip",ref:w,onClick:E,onMouseEnter:A,onMouseLeave:B,className:me("relative inline-flex items-center",c),children:o}),p&&!!e&&si.createPortal(C.jsxs("div",{ref:y,role:"tooltip",className:b8({color:t}),style:{position:"absolute",left:m.left??0,top:m.top??0,transform:m.transform,zIndex:1e3,visibility:m.left?"visible":"hidden"},onMouseEnter:N,onMouseLeave:T,children:[i&&C.jsx("span",{"data-testid":"tooltip-icon",children:i}),C.jsx("div",{className:y8({color:t}),children:e}),n&&C.jsx("div",{onClick:I,className:x8({color:t}),role:"button",children:C.jsx(Vu,{})})]}),L)]}):null};function w8(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return O.useMemo(()=>n=>{t.forEach(i=>i(n))},t)}const Wu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ba(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Gw(e){return"nodeType"in e}function wr(e){var t,r;return e?ba(e)?e:Gw(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function Kw(e){const{Document:t}=wr(e);return e instanceof t}function Ys(e){return ba(e)?!1:e instanceof wr(e).HTMLElement}function J2(e){return e instanceof wr(e).SVGElement}function ya(e){return e?ba(e)?e.document:Gw(e)?Kw(e)?e:Ys(e)||J2(e)?e.ownerDocument:document:document:document}const Rn=Wu?O.useLayoutEffect:O.useEffect;function Uu(e){const t=O.useRef(e);return Rn(()=>{t.current=e}),O.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 _8(){const e=O.useRef(null),t=O.useCallback((n,i)=>{e.current=setInterval(n,i)},[]),r=O.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Ms(e,t){t===void 0&&(t=[e]);const r=O.useRef(e);return Rn(()=>{r.current!==e&&(r.current=e)},t),r}function Xs(e,t){const r=O.useRef();return O.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function hu(e){const t=Uu(e),r=O.useRef(null),n=O.useCallback(i=>{i!==r.current&&(t==null||t(i,r.current)),r.current=i},[]);return[r,n]}function vu(e){const t=O.useRef();return O.useEffect(()=>{t.current=e},[e]),t.current}let yp={};function Zs(e,t){return O.useMemo(()=>{if(t)return t;const r=yp[e]==null?0:yp[e]+1;return yp[e]=r,e+"-"+r},[e,t])}function Q2(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 Qo=Q2(1),gu=Q2(-1);function E8(e){return"clientX"in e&&"clientY"in e}function Gu(e){if(!e)return!1;const{KeyboardEvent:t}=wr(e.target);return t&&e instanceof t}function S8(e){if(!e)return!1;const{TouchEvent:t}=wr(e.target);return t&&e instanceof t}function mu(e){if(S8(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 E8(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}}}),NO="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function O8(e){return e.matches(NO)?e:e.querySelector(NO)}const C8={display:"none"};function I8(e){let{id:t,value:r}=e;return O.createElement("div",{id:t,style:C8},r)}function R8(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 O.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function N8(){const[e,t]=O.useState("");return{announce:O.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const eq=O.createContext(null);function T8(e){const t=O.useContext(eq);O.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function P8(){const[e]=O.useState(()=>new Set),t=O.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[O.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 k8={draggable:`
|
|
15
15
|
To pick up a draggable item, press the space bar.
|
|
16
16
|
While dragging, use the arrow keys to move the item.
|
|
17
17
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
18
|
-
`},A8={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 M8(e){let{announcements:t=A8,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=k8}=e;const{announce:o,announcement:a}=N8(),s=Zs("DndLiveRegion"),[c,u]=O.useState(!1);if(O.useEffect(()=>{u(!0)},[]),T8(O.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=O.createElement(O.Fragment,null,O.createElement(I8,{id:n,value:i.draggable}),O.createElement(R8,{id:s,announcement:a}));return r?si.createPortal(d,r):d}var Xt;(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"})(Xt||(Xt={}));function bu(){}function D8(e,t){return O.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function j8(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return O.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Nn=Object.freeze({x:0,y:0});function q8(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function L8(e,t){const r=mu(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 z8(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function B8(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function F8(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function TO(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 $8=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=TO(t,t.left,t.top),o=[];for(const a of n){const{id:s}=a,c=r.get(s);if(c){const u=q8(TO(c),i);o.push({id:s,data:{droppableContainer:a,value:u}})}}return o.sort(z8)};function H8(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 V8=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=H8(s,t);c>0&&i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(B8)};function W8(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function tq(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Nn}function U8(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 G8=U8(1);function rq(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 K8(e,t,r){const n=rq(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 Y8={ignoreTransform:!1};function xa(e,t){t===void 0&&(t=Y8);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=wr(e).getComputedStyle(e);u&&(r=K8(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 PO(e){return xa(e,{ignoreTransform:!0})}function X8(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function Z8(e,t){return t===void 0&&(t=wr(e).getComputedStyle(e)),t.position==="fixed"}function J8(e,t){t===void 0&&(t=wr(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 Yw(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(Kw(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!Ys(i)||J2(i)||r.includes(i))return r;const o=wr(e).getComputedStyle(i);return i!==e&&J8(i,o)&&r.push(i),Z8(i,o)?r:n(i.parentNode)}return e?n(e):r}function nq(e){const[t]=Yw(e,1);return t??null}function xp(e){return!Wu||!e?null:ba(e)?e:Gw(e)?Kw(e)||e===ya(e).scrollingElement?window:Ys(e)?e:null:null}function iq(e){return ba(e)?e.scrollX:e.scrollLeft}function oq(e){return ba(e)?e.scrollY:e.scrollTop}function uw(e){return{x:iq(e),y:oq(e)}}var tr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(tr||(tr={}));function aq(e){return!Wu||!e?!1:e===document.scrollingElement}function sq(e){const t={x:0,y:0},r=aq(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 Q8={x:.2,y:.2};function eG(e,t,r,n,i){let{top:o,left:a,right:s,bottom:c}=r;n===void 0&&(n=10),i===void 0&&(i=Q8);const{isTop:u,isBottom:d,isLeft:p,isRight:v}=sq(e),h={x:0,y:0},x={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+m.height?(h.y=tr.Backward,x.y=n*Math.abs((t.top+m.height-o)/m.height)):!d&&c>=t.bottom-m.height&&(h.y=tr.Forward,x.y=n*Math.abs((t.bottom-m.height-c)/m.height)),!v&&s>=t.right-m.width?(h.x=tr.Forward,x.x=n*Math.abs((t.right-m.width-s)/m.width)):!p&&a<=t.left+m.width&&(h.x=tr.Backward,x.x=n*Math.abs((t.left+m.width-a)/m.width)),{direction:h,speed:x}}function tG(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 lq(e){return e.reduce((t,r)=>Jo(t,uw(r)),Nn)}function rG(e){return e.reduce((t,r)=>t+iq(r),0)}function nG(e){return e.reduce((t,r)=>t+oq(r),0)}function cq(e,t){if(t===void 0&&(t=xa),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);nq(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const iG=[["x",["left","right"],rG],["y",["top","bottom"],nG]];class Xw{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=Yw(r),i=lq(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of iG)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 Ss{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 oG(e){const{EventTarget:t}=wr(e);return e instanceof t?e:ya(e)}function wp(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 cn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(cn||(cn={}));function kO(e){e.preventDefault()}function aG(e){e.stopPropagation()}var nt;(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"})(nt||(nt={}));const uq={start:[nt.Space,nt.Enter],cancel:[nt.Esc],end:[nt.Space,nt.Enter,nt.Tab]},sG=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case nt.Right:return{...r,x:r.x+25};case nt.Left:return{...r,x:r.x-25};case nt.Down:return{...r,y:r.y+25};case nt.Up:return{...r,y:r.y-25}}};class dq{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 Ss(ya(r)),this.windowListeners=new Ss(wr(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(cn.Resize,this.handleCancel),this.windowListeners.add(cn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(cn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&cq(n),r(Nn)}handleKeyDown(t){if(Gu(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=uq,coordinateGetter:a=sG,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}:Nn;this.referenceCoordinates||(this.referenceCoordinates=d);const p=a(t,{active:r,context:n.current,currentCoordinates:d});if(p){const v=gu(p,d),h={x:0,y:0},{scrollableAncestors:x}=n.current;for(const m of x){const b=t.code,{isTop:w,isRight:y,isLeft:_,isBottom:S,maxScroll:E,minScroll:I}=sq(m),N=tG(m),T={x:Math.min(b===nt.Right?N.right-N.width/2:N.right,Math.max(b===nt.Right?N.left:N.left+N.width/2,p.x)),y:Math.min(b===nt.Down?N.bottom-N.height/2:N.bottom,Math.max(b===nt.Down?N.top:N.top+N.height/2,p.y))},A=b===nt.Right&&!y||b===nt.Left&&!_,B=b===nt.Down&&!S||b===nt.Up&&!w;if(A&&T.x!==p.x){const L=m.scrollLeft+v.x,D=b===nt.Right&&L<=E.x||b===nt.Left&&L>=I.x;if(D&&!v.y){m.scrollTo({left:L,behavior:s});return}D?h.x=m.scrollLeft-L:h.x=b===nt.Right?m.scrollLeft-E.x:m.scrollLeft-I.x,h.x&&m.scrollBy({left:-h.x,behavior:s});break}else if(B&&T.y!==p.y){const L=m.scrollTop+v.y,D=b===nt.Down&&L<=E.y||b===nt.Up&&L>=I.y;if(D&&!v.x){m.scrollTo({top:L,behavior:s});return}D?h.y=m.scrollTop-L:h.y=b===nt.Down?m.scrollTop-E.y:m.scrollTop-I.y,h.y&&m.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,Jo(gu(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()}}dq.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=uq,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 AO(e){return!!(e&&"distance"in e)}function MO(e){return!!(e&&"delay"in e)}class Zw{constructor(t,r,n){var i;n===void 0&&(n=oG(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=ya(a),this.documentListeners=new Ss(this.document),this.listeners=new Ss(n),this.windowListeners=new Ss(wr(a)),this.initialCoordinates=(i=mu(o))!=null?i:Nn,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(cn.Resize,this.handleCancel),this.windowListeners.add(cn.DragStart,kO),this.windowListeners.add(cn.VisibilityChange,this.handleCancel),this.windowListeners.add(cn.ContextMenu,kO),this.documentListeners.add(cn.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(AO(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(cn.Click,aG,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(cn.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=mu(t))!=null?r:Nn,u=gu(i,c);if(!n&&s){if(AO(s)){if(s.tolerance!=null&&wp(u,s.tolerance))return this.handleCancel();if(wp(u,s.distance))return this.handleStart()}if(MO(s)&&wp(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===nt.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const lG={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Jw extends Zw{constructor(t){const{event:r}=t,n=ya(r.target);super(t,lG,n)}}Jw.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 cG={move:{name:"mousemove"},end:{name:"mouseup"}};var dw;(function(e){e[e.RightClick=2]="RightClick"})(dw||(dw={}));class uG extends Zw{constructor(t){super(t,cG,ya(t.event.target))}}uG.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===dw.RightClick?!1:(n==null||n({event:r}),!0)}}];const _p={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class dG extends Zw{constructor(t){super(t,_p)}static setup(){return window.addEventListener(_p.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(_p.move.name,t)};function t(){}}}dG.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 Os;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Os||(Os={}));var yu;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(yu||(yu={}));function fG(e){let{acceleration:t,activator:r=Os.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=yu.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:p,threshold:v}=e;const h=hG({delta:p,disabled:!o}),[x,m]=_8(),b=O.useRef({x:0,y:0}),w=O.useRef({x:0,y:0}),y=O.useMemo(()=>{switch(r){case Os.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Os.DraggableRect:return i}},[r,i,c]),_=O.useRef(null),S=O.useCallback(()=>{const I=_.current;if(!I)return;const N=b.current.x*w.current.x,T=b.current.y*w.current.y;I.scrollBy(N,T)},[]),E=O.useMemo(()=>s===yu.TreeOrder?[...u].reverse():u,[s,u]);O.useEffect(()=>{if(!o||!u.length||!y){m();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:A,speed:B}=eG(I,T,y,t,v);for(const L of["x","y"])h[L][A[L]]||(B[L]=0,A[L]=0);if(B.x>0||B.y>0){m(),_.current=I,x(S,a),b.current=B,w.current=A;return}}b.current={x:0,y:0},w.current={x:0,y:0},m()},[t,S,n,m,o,a,JSON.stringify(y),JSON.stringify(h),x,u,E,d,JSON.stringify(v)])}const pG={x:{[tr.Backward]:!1,[tr.Forward]:!1},y:{[tr.Backward]:!1,[tr.Forward]:!1}};function hG(e){let{delta:t,disabled:r}=e;const n=vu(t);return Xs(i=>{if(r||!n||!i)return pG;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[tr.Backward]:i.x[tr.Backward]||o.x===-1,[tr.Forward]:i.x[tr.Forward]||o.x===1},y:{[tr.Backward]:i.y[tr.Backward]||o.y===-1,[tr.Forward]:i.y[tr.Forward]||o.y===1}}},[r,t,n])}function vG(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return Xs(i=>{var o;return t==null?null:(o=n??i)!=null?o:null},[n,t])}function gG(e,t){return O.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 Ds;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Ds||(Ds={}));var fw;(function(e){e.Optimized="optimized"})(fw||(fw={}));const DO=new Map;function mG(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,a]=O.useState(null),{frequency:s,measure:c,strategy:u}=i,d=O.useRef(e),p=b(),v=Ms(p),h=O.useCallback(function(w){w===void 0&&(w=[]),!v.current&&a(y=>y===null?w:y.concat(w.filter(_=>!y.includes(_))))},[v]),x=O.useRef(null),m=Xs(w=>{if(p&&!r)return DO;if(!w||w===DO||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 Xw(c(S),S):null;_.rect.current=E,E&&y.set(_.id,E)}return y}return w},[e,o,r,p,c]);return O.useEffect(()=>{d.current=e},[e]),O.useEffect(()=>{p||h()},[r,p]),O.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),O.useEffect(()=>{p||typeof s!="number"||x.current!==null||(x.current=setTimeout(()=>{h(),x.current=null},s))},[s,p,h,...n]),{droppableRects:m,measureDroppableContainers:h,measuringScheduled:o!=null};function b(){switch(u){case Ds.Always:return!1;case Ds.BeforeDragging:return r;default:return!r}}}function Qw(e,t){return Xs(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function bG(e,t){return Qw(e,t)}function yG(e){let{callback:t,disabled:r}=e;const n=Uu(t),i=O.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(n)},[n,r]);return O.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Ku(e){let{callback:t,disabled:r}=e;const n=Uu(t),i=O.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(n)},[r]);return O.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function xG(e){return new Xw(xa(e),e)}function jO(e,t,r){t===void 0&&(t=xG);const[n,i]=O.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=yG({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=Ku({callback:o});return Rn(()=>{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 wG(e){const t=Qw(e);return tq(e,t)}const qO=[];function _G(e){const t=O.useRef(e),r=Xs(n=>e?n&&n!==qO&&e&&t.current&&e.parentNode===t.current.parentNode?n:Yw(e):qO,[e]);return O.useEffect(()=>{t.current=e},[e]),r}function EG(e){const[t,r]=O.useState(null),n=O.useRef(e),i=O.useCallback(o=>{const a=xp(o.target);a&&r(s=>s?(s.set(a,uw(a)),new Map(s)):null)},[]);return O.useEffect(()=>{const o=n.current;if(e!==o){a(o);const s=e.map(c=>{const u=xp(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,uw(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=xp(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),O.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>Jo(o,a),Nn):lq(e):Nn,[e,t])}function LO(e,t){t===void 0&&(t=[]);const r=O.useRef(null);return O.useEffect(()=>{r.current=null},t),O.useEffect(()=>{const n=e!==Nn;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?gu(e,r.current):Nn}function SG(e){O.useEffect(()=>{if(!Wu)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 OG(e,t){return O.useMemo(()=>e.reduce((r,n)=>{let{eventName:i,handler:o}=n;return r[i]=a=>{o(a,t)},r},{}),[e,t])}function fq(e){return O.useMemo(()=>e?X8(e):null,[e])}const zO=[];function CG(e,t){t===void 0&&(t=xa);const[r]=e,n=fq(r?wr(r):null),[i,o]=O.useState(zO);function a(){o(()=>e.length?e.map(c=>aq(c)?n:new Xw(t(c),c)):zO)}const s=Ku({callback:a});return Rn(()=>{s==null||s.disconnect(),a(),e.forEach(c=>s==null?void 0:s.observe(c))},[e]),i}function pq(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ys(t)?t:e}function IG(e){let{measure:t}=e;const[r,n]=O.useState(null),i=O.useCallback(u=>{for(const{target:d}of u)if(Ys(d)){n(p=>{const v=t(d);return p?{...p,width:v.width,height:v.height}:v});break}},[t]),o=Ku({callback:i}),a=O.useCallback(u=>{const d=pq(u);o==null||o.disconnect(),d&&(o==null||o.observe(d)),n(d?t(d):null)},[t,o]),[s,c]=hu(a);return O.useMemo(()=>({nodeRef:s,rect:r,setRef:c}),[r,s,c])}const RG=[{sensor:Jw,options:{}},{sensor:dq,options:{}}],NG={current:{}},Yc={draggable:{measure:PO},droppable:{measure:PO,strategy:Ds.WhileDragging,frequency:fw.Optimized},dragOverlay:{measure:xa}};class Cs 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 TG={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Cs,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:bu},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Yc,measureDroppableContainers:bu,windowRect:null,measuringScheduled:!1},hq={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:bu,draggableNodes:new Map,over:null,measureDroppableContainers:bu},Js=O.createContext(hq),vq=O.createContext(TG);function PG(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Cs}}}function kG(e,t){switch(t.type){case Xt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Xt.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 Xt.DragEnd:case Xt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Xt.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Cs(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case Xt.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 Cs(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Xt.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Cs(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function AG(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=O.useContext(Js),o=vu(n),a=vu(r==null?void 0:r.id);return O.useEffect(()=>{if(!t&&!n&&o&&a!=null){if(!Gu(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=O8(d);if(p){p.focus();break}}})}},[n,t,i,a,o]),null}function gq(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function MG(e){return O.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 DG(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const o=O.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;Rn(()=>{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=tq(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=nq(c);p&&p.scrollBy({top:d.y,left:d.x})}},[t,a,s,n,r])}const Yu=O.createContext({...Nn,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 jG=O.memo(function(e){var t,r,n,i;let{id:o,accessibility:a,autoScroll:s=!0,children:c,sensors:u=RG,collisionDetection:d=V8,measuring:p,modifiers:v,...h}=e;const x=O.useReducer(kG,void 0,PG),[m,b]=x,[w,y]=P8(),[_,S]=O.useState(Pi.Uninitialized),E=_===Pi.Initialized,{draggable:{active:I,nodes:N,translate:T},droppable:{containers:A}}=m,B=I!=null?N.get(I):null,L=O.useRef({initial:null,translated:null}),D=O.useMemo(()=>{var et;return I!=null?{id:I,data:(et=B==null?void 0:B.data)!=null?et:NG,rect:L}:null},[I,B]),z=O.useRef(null),[P,K]=O.useState(null),[$,Y]=O.useState(null),U=Ms(h,Object.values(h)),Q=Zs("DndDescribedBy",o),k=O.useMemo(()=>A.getEnabled(),[A]),W=MG(p),{droppableRects:J,measureDroppableContainers:ee,measuringScheduled:j}=mG(k,{dragging:E,dependencies:[T.x,T.y],config:W.droppable}),G=vG(N,I),H=O.useMemo(()=>$?mu($):null,[$]),q=Xe(),X=bG(G,W.draggable.measure);DG({activeNode:I!=null?N.get(I):null,config:q.layoutShiftCompensation,initialRect:X,measure:W.draggable.measure});const ne=jO(G,W.draggable.measure,X),te=jO(G?G.parentElement:null),ue=O.useRef({activatorEvent:null,active:null,activeNode:G,collisionRect:null,collisions:null,droppableRects:J,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:A,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),re=A.getNodeFor((t=ue.current.over)==null?void 0:t.id),ge=IG({measure:W.dragOverlay.measure}),de=(r=ge.nodeRef.current)!=null?r:G,xe=E?(n=ge.rect)!=null?n:ne:null,se=!!(ge.nodeRef.current&&ge.rect),le=wG(se?null:ne),we=fq(de?wr(de):null),Oe=_G(E?re??G:null),Te=CG(Oe),qe=gq(v,{transform:{x:T.x-le.x,y:T.y-le.y,scaleX:1,scaleY:1},activatorEvent:$,active:D,activeNodeRect:ne,containerNodeRect:te,draggingNodeRect:xe,over:ue.current.over,overlayNodeRect:ge.rect,scrollableAncestors:Oe,scrollableAncestorRects:Te,windowRect:we}),Ue=H?Jo(H,T):null,De=EG(Oe),ot=LO(De),vt=LO(De,[ne]),Et=Jo(qe,ot),We=xe?G8(xe,qe):null,je=D&&We?d({active:D,collisionRect:We,droppableRects:J,droppableContainers:k,pointerCoordinates:Ue}):null,Qe=F8(je,"id"),[dt,Qt]=O.useState(null),Mt=se?qe:Jo(qe,vt),St=W8(Mt,(i=dt==null?void 0:dt.rect)!=null?i:null,ne),Dt=O.useRef(null),lr=O.useCallback((et,yt)=>{let{sensor:Pt,options:Ut}=yt;if(z.current==null)return;const jt=N.get(z.current);if(!jt)return;const Nt=et.nativeEvent,qt=new Pt({active:z.current,activeNode:jt,event:Nt,options:Ut,context:ue,onAbort(Lt){if(!N.get(Lt))return;const{onDragAbort:rr}=U.current,hr={id:Lt};rr==null||rr(hr),w({type:"onDragAbort",event:hr})},onPending(Lt,rr,hr,yn){if(!N.get(Lt))return;const{onDragPending:Rr}=U.current,Br={id:Lt,constraint:rr,initialCoordinates:hr,offset:yn};Rr==null||Rr(Br),w({type:"onDragPending",event:Br})},onStart(Lt){const rr=z.current;if(rr==null)return;const hr=N.get(rr);if(!hr)return;const{onDragStart:yn}=U.current,Rr={activatorEvent:Nt,active:{id:rr,data:hr.data,rect:L}};si.unstable_batchedUpdates(()=>{yn==null||yn(Rr),S(Pi.Initializing),b({type:Xt.DragStart,initialCoordinates:Lt,active:rr}),w({type:"onDragStart",event:Rr}),K(Dt.current),Y(Nt)})},onMove(Lt){b({type:Xt.DragMove,coordinates:Lt})},onEnd:Ir(Xt.DragEnd),onCancel:Ir(Xt.DragCancel)});Dt.current=qt;function Ir(Lt){return async function(){const{active:rr,collisions:hr,over:yn,scrollAdjustedTranslate:Rr}=ue.current;let Br=null;if(rr&&Rr){const{cancelDrop:Kn}=U.current;Br={activatorEvent:Nt,active:rr,collisions:hr,delta:Rr,over:yn},Lt===Xt.DragEnd&&typeof Kn=="function"&&await Promise.resolve(Kn(Br))&&(Lt=Xt.DragCancel)}z.current=null,si.unstable_batchedUpdates(()=>{b({type:Lt}),S(Pi.Uninitialized),Qt(null),K(null),Y(null),Dt.current=null;const Kn=Lt===Xt.DragEnd?"onDragEnd":"onDragCancel";if(Br){const $i=U.current[Kn];$i==null||$i(Br),w({type:Kn,event:Br})}})}}},[N]),bn=O.useCallback((et,yt)=>(Pt,Ut)=>{const jt=Pt.nativeEvent,Nt=N.get(Ut);if(z.current!==null||!Nt||jt.dndKit||jt.defaultPrevented)return;const qt={active:Nt};et(Pt,yt.options,qt)===!0&&(jt.dndKit={capturedBy:yt.sensor},z.current=Ut,lr(Pt,yt))},[N,lr]),Or=gG(u,bn);SG(u),Rn(()=>{ne&&_===Pi.Initializing&&S(Pi.Initialized)},[ne,_]),O.useEffect(()=>{const{onDragMove:et}=U.current,{active:yt,activatorEvent:Pt,collisions:Ut,over:jt}=ue.current;if(!yt||!Pt)return;const Nt={active:yt,activatorEvent:Pt,collisions:Ut,delta:{x:Et.x,y:Et.y},over:jt};si.unstable_batchedUpdates(()=>{et==null||et(Nt),w({type:"onDragMove",event:Nt})})},[Et.x,Et.y]),O.useEffect(()=>{const{active:et,activatorEvent:yt,collisions:Pt,droppableContainers:Ut,scrollAdjustedTranslate:jt}=ue.current;if(!et||z.current==null||!yt||!jt)return;const{onDragOver:Nt}=U.current,qt=Ut.get(Qe),Ir=qt&&qt.rect.current?{id:qt.id,rect:qt.rect.current,data:qt.data,disabled:qt.disabled}:null,Lt={active:et,activatorEvent:yt,collisions:Pt,delta:{x:jt.x,y:jt.y},over:Ir};si.unstable_batchedUpdates(()=>{Qt(Ir),Nt==null||Nt(Lt),w({type:"onDragOver",event:Lt})})},[Qe]),Rn(()=>{ue.current={activatorEvent:$,active:D,activeNode:G,collisionRect:We,collisions:je,droppableRects:J,draggableNodes:N,draggingNode:de,draggingNodeRect:xe,droppableContainers:A,over:dt,scrollableAncestors:Oe,scrollAdjustedTranslate:Et},L.current={initial:xe,translated:We}},[D,G,je,We,N,de,xe,J,A,dt,Oe,Et]),fG({...q,delta:T,draggingRect:We,pointerCoordinates:Ue,scrollableAncestors:Oe,scrollableAncestorRects:Te});const Cr=O.useMemo(()=>({active:D,activeNode:G,activeNodeRect:ne,activatorEvent:$,collisions:je,containerNodeRect:te,dragOverlay:ge,draggableNodes:N,droppableContainers:A,droppableRects:J,over:dt,measureDroppableContainers:ee,scrollableAncestors:Oe,scrollableAncestorRects:Te,measuringConfiguration:W,measuringScheduled:j,windowRect:we}),[D,G,ne,$,je,te,ge,N,A,J,dt,ee,Oe,Te,W,j,we]),Be=O.useMemo(()=>({activatorEvent:$,activators:Or,active:D,activeNodeRect:ne,ariaDescribedById:{draggable:Q},dispatch:b,draggableNodes:N,over:dt,measureDroppableContainers:ee}),[$,Or,D,ne,b,Q,N,dt,ee]);return O.createElement(eq.Provider,{value:y},O.createElement(Js.Provider,{value:Be},O.createElement(vq.Provider,{value:Cr},O.createElement(Yu.Provider,{value:St},c)),O.createElement(AG,{disabled:(a==null?void 0:a.restoreFocus)===!1})),O.createElement(M8,{...a,hiddenTextDescribedById:Q}));function Xe(){const et=(P==null?void 0:P.autoScrollEnabled)===!1,yt=typeof s=="object"?s.enabled===!1:s===!1,Pt=E&&!et&&!yt;return typeof s=="object"?{...s,enabled:Pt}:{enabled:Pt}}}),qG=O.createContext(null),BO="button",LG="Draggable";function zG(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=Zs(LG),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:p,over:v}=O.useContext(Js),{role:h=BO,roleDescription:x="draggable",tabIndex:m=0}=i??{},b=(c==null?void 0:c.id)===t,w=O.useContext(b?Yu:qG),[y,_]=hu(),[S,E]=hu(),I=OG(a,t),N=Ms(r);Rn(()=>(p.set(t,{id:t,key:o,node:y,activatorNode:S,data:N}),()=>{const A=p.get(t);A&&A.key===o&&p.delete(t)}),[p,t]);const T=O.useMemo(()=>({role:h,tabIndex:m,"aria-disabled":n,"aria-pressed":b&&h===BO?!0:void 0,"aria-roledescription":x,"aria-describedby":d.draggable}),[n,h,m,b,x,d.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:T,isDragging:b,listeners:n?void 0:I,node:y,over:v,setNodeRef:_,setActivatorNodeRef:E,transform:w}}function mq(){return O.useContext(vq)}const BG="Droppable",FG={timeout:25};function $G(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=Zs(BG),{active:a,dispatch:s,over:c,measureDroppableContainers:u}=O.useContext(Js),d=O.useRef({disabled:r}),p=O.useRef(!1),v=O.useRef(null),h=O.useRef(null),{disabled:x,updateMeasurementsFor:m,timeout:b}={...FG,...i},w=Ms(m??n),y=O.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},b)},[b]),_=Ku({callback:y,disabled:x||!a}),S=O.useCallback((T,A)=>{_&&(A&&(_.unobserve(A),p.current=!1),T&&_.observe(T))},[_]),[E,I]=hu(S),N=Ms(t);return O.useEffect(()=>{!_||!E.current||(_.disconnect(),p.current=!1,_.observe(E.current))},[E,_]),O.useEffect(()=>(s({type:Xt.RegisterDroppable,element:{id:n,key:o,disabled:r,node:E,rect:v,data:N}}),()=>s({type:Xt.UnregisterDroppable,key:o,id:n})),[n]),O.useEffect(()=>{r!==d.current.disabled&&(s({type:Xt.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 HG(e){let{animation:t,children:r}=e;const[n,i]=O.useState(null),[o,a]=O.useState(null),s=vu(r);return!r&&!n&&s&&i(s),Rn(()=>{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]),O.createElement(O.Fragment,null,r,n?O.cloneElement(n,{ref:a}):null)}const VG={x:0,y:0,scaleX:1,scaleY:1};function WG(e){let{children:t}=e;return O.createElement(Js.Provider,{value:hq},O.createElement(Yu.Provider,{value:VG},t))}const UG={position:"fixed",touchAction:"none"},GG=e=>Gu(e)?"transform 250ms ease":void 0,KG=O.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:i,children:o,className:a,rect:s,style:c,transform:u,transition:d=GG}=e;if(!s)return null;const p=i?u:{...u,scaleX:1,scaleY:1},v={...UG,width:s.width,height:s.height,top:s.top,left:s.left,transform:Di.Transform.toString(p),transformOrigin:i&&n?L8(n,s):void 0,transition:typeof d=="function"?d(n):d,...c};return O.createElement(r,{className:a,style:v,ref:t},o)}),YG=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)}},XG=e=>{let{transform:{initial:t,final:r}}=e;return[{transform:Di.Transform.toString(t)},{transform:Di.Transform.toString(r)}]},ZG={duration:250,easing:"ease",keyframes:XG,sideEffects:YG({styles:{active:{opacity:"0"}}})};function JG(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:i}=e;return Uu((o,a)=>{if(t===null)return;const s=r.get(o);if(!s)return;const c=s.node.current;if(!c)return;const u=pq(a);if(!u)return;const{transform:d}=wr(a).getComputedStyle(a),p=rq(d);if(!p)return;const v=typeof t=="function"?t:QG(t);return cq(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 QG(e){const{duration:t,easing:r,sideEffects:n,keyframes:i}={...ZG,...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,m=h[h.length-1];if(JSON.stringify(x)===JSON.stringify(m))return;const b=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=()=>{b==null||b(),y()}})}}let FO=0;function e7(e){return O.useMemo(()=>{if(e!=null)return FO++,FO},[e])}const t7=O.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:m,dragOverlay:b,over:w,measuringConfiguration:y,scrollableAncestors:_,scrollableAncestorRects:S,windowRect:E}=mq(),I=O.useContext(Yu),N=e7(p==null?void 0:p.id),T=gq(a,{activatorEvent:d,active:p,activeNodeRect:v,containerNodeRect:h,draggingNodeRect:b.rect,over:w,overlayNodeRect:b.rect,scrollableAncestors:_,scrollableAncestorRects:S,transform:I,windowRect:E}),A=Qw(v),B=JG({config:n,draggableNodes:x,droppableContainers:m,measuringConfiguration:y}),L=A?b.setRef:void 0;return O.createElement(WG,null,O.createElement(HG,{animation:B},p&&N?O.createElement(KG,{key:N,id:p.id,ref:L,as:s,activatorEvent:d,adjustScale:t,className:c,transition:o,rect:A,style:{zIndex:u,...i},transform:T},r):null))});function e1(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function r7(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 n7(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 i7(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const bc={scaleX:1,scaleY:1},o7=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=a7(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 a7(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 bq=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const o=e1(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}},yq="Sortable",xq=O.createContext({activeIndex:-1,containerId:yq,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:bq,disabled:{draggable:!1,droppable:!1}});function s7(e){let{children:t,id:r,items:n,strategy:i=bq,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:c,over:u,measureDroppableContainers:d}=mq(),p=Zs(yq,r),v=s.rect!==null,h=O.useMemo(()=>n.map(I=>typeof I=="object"&&"id"in I?I.id:I),[n]),x=a!=null,m=a?h.indexOf(a.id):-1,b=u?h.indexOf(u.id):-1,w=O.useRef(h),y=!n7(h,w.current),_=b!==-1&&m===-1||y,S=i7(o);Rn(()=>{y&&x&&d(h)},[y,h,x,d]),O.useEffect(()=>{w.current=h},[h]);const E=O.useMemo(()=>({activeIndex:m,containerId:p,disabled:S,disableTransforms:_,items:h,overIndex:b,useDragOverlay:v,sortedRects:r7(h,c),strategy:i}),[m,p,S.draggable,S.droppable,_,h,b,c,v,i]);return O.createElement(xq.Provider,{value:E},t)}const l7=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return e1(r,n,i).indexOf(t)},c7=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},u7={duration:200,easing:"ease"},wq="transform",d7=Di.Transition.toString({property:wq,duration:0,easing:"linear"}),f7={roleDescription:"sortable"};function p7(e){let{disabled:t,index:r,node:n,rect:i}=e;const[o,a]=O.useState(null),s=O.useRef(r);return Rn(()=>{if(!t&&r!==s.current&&n.current){const c=i.current;if(c){const u=xa(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]),O.useEffect(()=>{o&&a(null)},[o]),o}function h7(e){let{animateLayoutChanges:t=c7,attributes:r,disabled:n,data:i,getNewIndex:o=l7,id:a,strategy:s,resizeObserverConfig:c,transition:u=u7}=e;const{items:d,containerId:p,activeIndex:v,disabled:h,disableTransforms:x,sortedRects:m,overIndex:b,useDragOverlay:w,strategy:y}=O.useContext(xq),_=v7(n,h),S=d.indexOf(a),E=O.useMemo(()=>({sortable:{containerId:p,index:S,items:d},...i}),[p,i,S,d]),I=O.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:N,node:T,isOver:A,setNodeRef:B}=$G({id:a,data:E,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...c}}),{active:L,activatorEvent:D,activeNodeRect:z,attributes:P,setNodeRef:K,listeners:$,isDragging:Y,over:U,setActivatorNodeRef:Q,transform:k}=zG({id:a,data:E,attributes:{...f7,...r},disabled:_.draggable}),W=w8(B,K),J=!!L,ee=J&&!x&&mc(v)&&mc(b),j=!w&&Y,G=j&&ee?k:null,H=ee?G??(s??y)({rects:m,activeNodeRect:z,activeIndex:v,overIndex:b,index:S}):null,q=mc(v)&&mc(b)?o({id:a,items:d,activeIndex:v,overIndex:b}):S,X=L==null?void 0:L.id,ne=O.useRef({activeId:X,items:d,newIndex:q,containerId:p}),te=d!==ne.current.items,ue=t({active:L,containerId:p,isDragging:Y,isSorting:J,id:a,index:S,items:d,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:u,wasDragging:ne.current.activeId!=null}),re=p7({disabled:!ue,index:S,node:T,rect:N});return O.useEffect(()=>{J&&ne.current.newIndex!==q&&(ne.current.newIndex=q),p!==ne.current.containerId&&(ne.current.containerId=p),d!==ne.current.items&&(ne.current.items=d)},[J,q,p,d]),O.useEffect(()=>{if(X===ne.current.activeId)return;if(X!=null&&ne.current.activeId==null){ne.current.activeId=X;return}const de=setTimeout(()=>{ne.current.activeId=X},50);return()=>clearTimeout(de)},[X]),{active:L,activeIndex:v,attributes:P,data:E,rect:N,index:S,newIndex:q,items:d,isOver:A,isSorting:J,isDragging:Y,listeners:$,node:T,overIndex:b,over:U,setNodeRef:W,setActivatorNodeRef:Q,setDroppableNodeRef:B,setDraggableNodeRef:K,transform:re??H,transition:ge()};function ge(){if(re||te&&ne.current.newIndex===S)return d7;if(!(j&&!Gu(D)||!u)&&(J||ue))return Di.Transition.toString({...u,property:wq})}}function v7(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}}nt.Down,nt.Right,nt.Up,nt.Left;const g7=e=>{let{transform:t}=e;return{...t,y:0}};function m7(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 b7=e=>{let{draggingNodeRect:t,transform:r,scrollableAncestorRects:n}=e;const i=n[0];return!t||!i?r:m7(r,t,i)},$O=({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}=h7({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)},m=b=>{b==null||b.stopPropagation(),o&&o(t)};return a?C.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?m:void 0})}):null},_q={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"}},y7={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"}}},HO=()=>me("inline-flex items-center rounded overflow-hidden"),Eq=(e,t,r,n)=>{const i=y7[e],o=_q[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)},Sq=(e,t)=>me("flex items-center justify-center",_q[e].icon,{"opacity-50":t}),Oq=()=>me("whitespace-nowrap"),Ep=()=>me("min-w-full flex h-8 bg-tab-bg-default pt-0.5"),Cq=(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")},pw=O.createContext(void 0),Iq=O.forwardRef(({value:e,label:t,icon:r,disabled:n,children:i,className:o,onClick:a,active:s,content:c,...u},d)=>{const p=O.useContext(pw);if(!p)return null;const{activeTab:v,onTabChange:h,variant:x,color:m,size:b,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"?C.jsx("div",{"data-qui":"FileTabItem",className:me(Cq(_,!1),"cursor-pointer",o),onClick:I=>!S&&E(I),children:i||C.jsx(C.Fragment,{children:C.jsxs("span",{className:"flex items-center gap-2",children:[r,C.jsx("span",{children:t})]})})}):C.jsxs("button",{ref:d,"data-qui":"TabItem",type:"button",role:"tab","aria-selected":_,"aria-disabled":S,className:me(Eq(m,b,_,S||!1),o),onClick:E,disabled:S,...u,children:[w&&r&&C.jsx("span",{className:Sq(b,S||!1),children:r}),C.jsx("span",{className:Oq(),children:i||t})]})});Iq.displayName="TabItem";const x7=({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?C.jsx(C.Fragment,{children:p({tab:e,isActive:n,onClick:v,onClose:d?h:void 0})}):C.jsxs("button",{"data-qui":"TabItem",type:"button",role:"tab","aria-selected":n,"aria-disabled":u,className:Eq(i,o,n,u),onClick:v,disabled:u,children:[a&&c&&C.jsx("span",{className:Sq(o,u),children:c}),C.jsx("span",{className:Oq(),children:r})]})},w7=({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?C.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},_7=[],t1=({tabs:e=_7,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:m,children:b})=>{const w=U=>{const Q=U[t]??U.value??U.key;return Q!==void 0?String(Q):""},y=U=>U[r]??U.label,_=i||(e[0]?w(e[0]):""),[S,E]=O.useState(_),[I,N]=O.useState(null),[T,A]=O.useState(e),B=n!==void 0?n:S,L=T,D=j8(D8(Jw,{activationConstraint:{distance:10}})),z=U=>{n===void 0&&E(U),h==null||h(U)},P=U=>L.findIndex(Q=>w(Q)===U),K=I?P(I):-1;O.useEffect(()=>{A(e)},[e]);const $={activeTab:B,onTabChange:z,variant:o,color:a,size:s,showIcons:u,disabled:d};if(b)return C.jsxs(pw.Provider,{value:$,children:[C.jsx("div",{"data-qui":"Tabs",role:"tablist",className:me(o==="file"?Ep():HO(),p,v),children:b}),o==="file"&&C.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]});const Y=o==="file"&&c?C.jsxs("div",{className:"relative h-full w-full",children:[C.jsxs(jG,{collisionDetection:$8,modifiers:[g7,b7],sensors:D,onDragStart:({active:U})=>{U&&N(U.id)},onDragEnd:({over:U})=>{if(N(null),U){const Q=P(U.id);if(K!==Q&&K!==-1){const k=e1(L,K,Q);A(k),x&&x(k,k[Q]),z(w(k[Q]))}}},onDragCancel:()=>{N(null)},children:[C.jsx(s7,{items:L.map(U=>w(U)),strategy:o7,children:C.jsx("div",{role:"tablist",className:me(Ep(),v),children:L.map(U=>{const Q=w(U);return C.jsx($O,{value:Q,tab:{...U,renderTab:U.renderTab||m},isActive:B===Q,onTabClick:z,className:p},Q)})})}),C.jsx(t7,{children:I&&K!==-1?C.jsx($O,{value:w(L[K]),tab:{...L[K],renderTab:L[K].renderTab||m},isActive:B===w(L[K]),onTabClick:z,dragOverlay:!0,className:p}):null})]}),C.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):o==="file"?C.jsxs("div",{className:"relative",children:[C.jsx("div",{role:"tablist",className:me(Ep(),v),children:e.map(U=>{const Q=w(U);return C.jsx(w7,{value:Q,tab:{...U,renderTab:U.renderTab||m},isActive:B===Q,onTabClick:z},Q)})}),C.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):C.jsx("div",{role:"tablist",className:me(HO(),v),children:e.map(U=>{const Q=w(U);return C.jsx(x7,{value:Q,label:y(U),tab:{...U,renderTab:U.renderTab||m},isActive:B===Q,color:a,size:s,showIcons:u,onTabClick:z},Q)})});return C.jsx(pw.Provider,{value:$,children:C.jsx("div",{"data-qui":"Tabs",className:p,children:Y})})},E7=O.forwardRef(({isActive:e=!1,isDesactive:t=!1,children:r,...n},i)=>C.jsx("div",{"data-qui":"TabNavContainer",className:Cq(e,t),ref:i,...n,children:r}));E7.displayName="TabNavContainer";t1.displayName="Tabs";t1.Item=Iq;const Sp=t1;var Ht=function(){return Ht=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},Ht.apply(this,arguments)},VO={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},WO={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},yc={width:"20px",height:"20px",position:"absolute",zIndex:1},S7={top:Ht(Ht({},VO),{top:"-5px"}),right:Ht(Ht({},WO),{left:void 0,right:"-5px"}),bottom:Ht(Ht({},VO),{top:void 0,bottom:"-5px"}),left:Ht(Ht({},WO),{left:"-5px"}),topRight:Ht(Ht({},yc),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Ht(Ht({},yc),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Ht(Ht({},yc),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Ht(Ht({},yc),{left:"-10px",top:"-10px",cursor:"nw-resize"})},O7=O.memo(function(e){var t=e.onResizeStart,r=e.direction,n=e.children,i=e.replaceStyles,o=e.className,a=O.useCallback(function(u){t(u,r)},[t,r]),s=O.useCallback(function(u){t(u,r)},[t,r]),c=O.useMemo(function(){return Ht(Ht({position:"absolute",userSelect:"none"},S7[r]),i??{})},[i,r]);return C.jsx("div",{className:o||void 0,style:c,onMouseDown:a,onTouchStart:s,children:n})}),C7=(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)},I7={width:"auto",height:"auto"},xc=function(e,t,r){return Math.max(Math.min(e,r),t)},UO=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)},R7=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},GO=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},Op=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},N7=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)}},T7=function(e){return Array.isArray(e)?e:[e,e]},P7=["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"],KO="__resizable_base__",k7=(function(e){C7(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(KO):u.className+=KO,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||I7},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 Op(r.state[s])},o=n&&typeof n.width<"u"&&!this.state.isResizing?Op(n.width):i("width"),a=n&&typeof n.height<"u"&&!this.state.isResizing?Op(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=T7(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,m=d.width,b=d.height,w=h||0,y=x||0;return zo("right",u)&&(m=d.width+(r-d.x)*a/i,v&&(b=(m-y)/this.ratio+w)),zo("left",u)&&(m=d.width-(r-d.x)*a/i,v&&(b=(m-y)/this.ratio+w)),zo("bottom",u)&&(b=d.height+(n-d.y)*s/i,v&&(m=(b-w)*this.ratio+y)),zo("top",u)&&(b=d.height-(n-d.y)*s/i,v&&(m=(b-w)*this.ratio+y)),{newWidth:m,newHeight:b}},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,m=u||0;if(s){var b=(v-x)*this.ratio+m,w=(h-x)*this.ratio+m,y=(d-m)/this.ratio+x,_=(p-m)/this.ratio+x,S=Math.max(d,b),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&&R7(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,m=p.height,b=this.getParentSize(),w=N7(b,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=GO(S,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(_=GO(_,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=UO(S,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),T=UO(_,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),A=this.props.snapGap||0,B=A===0||Math.abs(N-S)<=A?N:S,L=A===0||Math.abs(T-_)<=A?T:_;S=B,_=L}var D={width:S-h.width,height:_-h.height};if(this.delta=D,x&&typeof x=="string"){if(x.endsWith("%")){var z=S/b.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(m&&typeof m=="string"){if(m.endsWith("%")){var z=_/b.height*100;_="".concat(z,"%")}else if(m.endsWith("vw")){var P=_/this.window.innerWidth*100;_="".concat(P,"vw")}else if(m.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,Q=this.state.flexBasis!==$.flexBasis,k=Y||U||Q;k&&si.flushSync(function(){n.setState($)}),this.props.onResize&&k&&this.props.onResize(r,v,this.resizable,D)}},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?C.jsx(O7,{direction:p,onResizeStart:r.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return C.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 P7.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 C.jsxs(o,zn({style:i,className:this.props.className},n,{ref:function(a){a&&(r.resizable=a)},children:[this.state.isResizing&&C.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})(O.PureComponent);const A7={0:"bg-panel-0",1:"bg-panel-1",2:"bg-panel-2",3:"bg-panel-3",4:"bg-panel-4",5:"bg-panel-5"},M7={tabs:"border-tab-border",primary:"border-primary",negative:"border-input-error-border",positive:"border-positive",light:"border-panel-border-subtle",default:"border-panel-border"},Rq=({depth:e=0,className:t,borderType:r,disabled:n})=>me("transition-colors duration-200",{"text-body":!n,"text-inactive-text":n},r?M7[r]:"border-panel-border",A7[e],t),D7=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},j7=O.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:m={},handleClasses:b={},handleComponent:w={},style:y={},className:_,onResizeStart:S,onResize:E,onResizeStop:I,scale:N=1,bounds:T,snapGap:A,as:B="div",depth:L,disabled:D},z)=>{const P=Rq({depth:L,className:_,disabled:D}),K=D7(_),$=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=O.useRef(null);return O.useImperativeHandle(z,()=>{var Q;return(Q=U.current)==null?void 0:Q.resizable}),C.jsx(k7,{"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:m,handleClasses:b,handleComponent:w,style:y,className:me("relative box-border",P),onResizeStart:S,onResize:E,onResizeStop:I,scale:N,bounds:T,snapGap:A,as:B,children:e})});j7.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"}},q7=(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})}),xu=O.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]=O.useState(r),m=t!==void 0,b=m?t:h,w=()=>{const _=!b;m||x(_),s==null||s(_)},y=q7(i,o,b,n,!!a,c);return C.jsxs("div",{"data-qui":"Toggle",className:y.container,children:[e&&C.jsx("label",{htmlFor:u,className:y.label,children:e}),C.jsxs("button",{ref:v,...p,type:"button",role:"switch","aria-checked":b,"aria-label":e,disabled:n,onClick:w,name:d,id:u,className:y.track,children:[a&&C.jsx("span",{className:y.iconLeft,children:a.unchecked}),C.jsx("span",{className:y.thumb,"aria-hidden":"true"}),a&&C.jsx("span",{className:y.iconRight,children:a.checked})]})]})});xu.displayName="Toggle";O.createContext(null);const dr=O.forwardRef(({depth:e=0,className:t,children:r,borderType:n,disabled:i,...o},a)=>{const s=Rq({depth:e,className:t,borderType:n,disabled:i});return C.jsx("div",{"data-qui":"Panel",ref:a,className:s,"aria-disabled":i,...o,children:r})});dr.displayName="Panel";const js={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"}},L7=(e,t,r,n)=>me("inline-flex items-center justify-center font-medium border",js[e].container,Xc[t].bg,Xc[t].text,Xc[t].border,js[e].text,{"opacity-60 pointer-events-none":r,"cursor-pointer hover:bg-opacity-90 transition-opacity":n&&!r}),z7=(e,t,r)=>me({[js[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}),B7=e=>me(js[e].text),Nq=(e,t,r)=>me("inline-flex items-center justify-center rounded transition-colors duration-200 focus:outline-hidden ",js[e].iconButton,Xc[t].buttonHover,{"pointer-events-none":r}),Tq=O.createContext(null),Xu=()=>{const e=O.useContext(Tq);if(!e)throw new Error("Pill components must be used within a Pill.Root");return e},r1=O.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 C.jsx(Tq.Provider,{value:c,children:C.jsx("div",{"data-qui":"Pill",ref:s,onClick:o,className:me(L7(e,t,i,u),r),...a,children:n})})});r1.displayName="Pill.Root";const n1=O.forwardRef(({className:e,children:t,...r},n)=>{const{size:i}=Xu();return C.jsx("span",{ref:n,className:me(B7(i),e),...r,children:t})});n1.displayName="Pill.Text";const i1=O.forwardRef(({className:e,children:t,label:r,position:n,...i},o)=>{const{size:a,color:s,disabled:c}=Xu(),u=!!r,d=C.jsx("span",{ref:o,className:me(z7(a,s,u),e,{"opacity-60":c}),...i,children:t});return u&&!c?C.jsx(Kr,{label:r||"",position:n||"up",children:d}):d});i1.displayName="Pill.Icon";const Pq=O.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,disabled:a}=Xu();return C.jsx("button",{ref:n,type:"button",disabled:a,className:me(Nq(i,o,a),e),...r,children:t})});Pq.displayName="Pill.Button";const o1=O.forwardRef(({className:e,onClose:t,"aria-label":r="Remove pill",children:n,...i},o)=>{const{size:a,color:s,disabled:c}=Xu();return C.jsx("button",{ref:o,type:"button",disabled:c,className:me(Nq(a,s,c),e),onClick:t,"aria-label":r,...i,children:n||C.jsx(Vu,{})})});o1.displayName="Pill.Close";const kq=O.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)=>C.jsxs(r1,{ref:d,size:e,color:t,className:a,disabled:c,...u,children:[n&&C.jsx(i1,{children:n}),s||r&&C.jsx(n1,{children:r}),o&&C.jsx(o1,{onClose:i})]}));kq.displayName="Pill";const Zc=Object.assign(kq,{Root:r1,Text:n1,Icon:i1,Button:Pq,Close:o1}),Aq=O.createContext(null),_r=()=>{const e=O.useContext(Aq);if(!e)throw new Error("Select compound components must be used within Select.Root");return e},fr={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"}},Ft={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-text 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-text 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-text 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-text 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"}},F7=()=>me("flex flex-col relative"),$7=({size:e,color:t,isDisabled:r,isFocused:n,isInvalid:i,hasMessage:o})=>{const a=Ft[i?"negative":t];return me("flex items-center justify-between only:rounded first:rounded-t last:rounded-b",fr[e].control,a.control,o?["ring-1",a.messageBorder]:["border",r?"border-input-border":n?a.controlFocused:`border-select-border
|
|
18
|
+
`},A8={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 M8(e){let{announcements:t=A8,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=k8}=e;const{announce:o,announcement:a}=N8(),s=Zs("DndLiveRegion"),[c,u]=O.useState(!1);if(O.useEffect(()=>{u(!0)},[]),T8(O.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=O.createElement(O.Fragment,null,O.createElement(I8,{id:n,value:i.draggable}),O.createElement(R8,{id:s,announcement:a}));return r?si.createPortal(d,r):d}var Xt;(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"})(Xt||(Xt={}));function bu(){}function D8(e,t){return O.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function j8(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return O.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Nn=Object.freeze({x:0,y:0});function q8(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function L8(e,t){const r=mu(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 z8(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function B8(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function F8(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function TO(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 $8=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=TO(t,t.left,t.top),o=[];for(const a of n){const{id:s}=a,c=r.get(s);if(c){const u=q8(TO(c),i);o.push({id:s,data:{droppableContainer:a,value:u}})}}return o.sort(z8)};function H8(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 V8=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=H8(s,t);c>0&&i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(B8)};function W8(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function tq(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Nn}function U8(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 G8=U8(1);function rq(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 K8(e,t,r){const n=rq(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 Y8={ignoreTransform:!1};function xa(e,t){t===void 0&&(t=Y8);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=wr(e).getComputedStyle(e);u&&(r=K8(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 PO(e){return xa(e,{ignoreTransform:!0})}function X8(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function Z8(e,t){return t===void 0&&(t=wr(e).getComputedStyle(e)),t.position==="fixed"}function J8(e,t){t===void 0&&(t=wr(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 Yw(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(Kw(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!Ys(i)||J2(i)||r.includes(i))return r;const o=wr(e).getComputedStyle(i);return i!==e&&J8(i,o)&&r.push(i),Z8(i,o)?r:n(i.parentNode)}return e?n(e):r}function nq(e){const[t]=Yw(e,1);return t??null}function xp(e){return!Wu||!e?null:ba(e)?e:Gw(e)?Kw(e)||e===ya(e).scrollingElement?window:Ys(e)?e:null:null}function iq(e){return ba(e)?e.scrollX:e.scrollLeft}function oq(e){return ba(e)?e.scrollY:e.scrollTop}function uw(e){return{x:iq(e),y:oq(e)}}var tr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(tr||(tr={}));function aq(e){return!Wu||!e?!1:e===document.scrollingElement}function sq(e){const t={x:0,y:0},r=aq(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 Q8={x:.2,y:.2};function eG(e,t,r,n,i){let{top:o,left:a,right:s,bottom:c}=r;n===void 0&&(n=10),i===void 0&&(i=Q8);const{isTop:u,isBottom:d,isLeft:p,isRight:v}=sq(e),h={x:0,y:0},x={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+m.height?(h.y=tr.Backward,x.y=n*Math.abs((t.top+m.height-o)/m.height)):!d&&c>=t.bottom-m.height&&(h.y=tr.Forward,x.y=n*Math.abs((t.bottom-m.height-c)/m.height)),!v&&s>=t.right-m.width?(h.x=tr.Forward,x.x=n*Math.abs((t.right-m.width-s)/m.width)):!p&&a<=t.left+m.width&&(h.x=tr.Backward,x.x=n*Math.abs((t.left+m.width-a)/m.width)),{direction:h,speed:x}}function tG(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 lq(e){return e.reduce((t,r)=>Qo(t,uw(r)),Nn)}function rG(e){return e.reduce((t,r)=>t+iq(r),0)}function nG(e){return e.reduce((t,r)=>t+oq(r),0)}function cq(e,t){if(t===void 0&&(t=xa),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);nq(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const iG=[["x",["left","right"],rG],["y",["top","bottom"],nG]];class Xw{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=Yw(r),i=lq(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of iG)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 Ss{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 oG(e){const{EventTarget:t}=wr(e);return e instanceof t?e:ya(e)}function wp(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 cn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(cn||(cn={}));function kO(e){e.preventDefault()}function aG(e){e.stopPropagation()}var nt;(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"})(nt||(nt={}));const uq={start:[nt.Space,nt.Enter],cancel:[nt.Esc],end:[nt.Space,nt.Enter,nt.Tab]},sG=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case nt.Right:return{...r,x:r.x+25};case nt.Left:return{...r,x:r.x-25};case nt.Down:return{...r,y:r.y+25};case nt.Up:return{...r,y:r.y-25}}};class dq{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 Ss(ya(r)),this.windowListeners=new Ss(wr(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(cn.Resize,this.handleCancel),this.windowListeners.add(cn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(cn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&cq(n),r(Nn)}handleKeyDown(t){if(Gu(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=uq,coordinateGetter:a=sG,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}:Nn;this.referenceCoordinates||(this.referenceCoordinates=d);const p=a(t,{active:r,context:n.current,currentCoordinates:d});if(p){const v=gu(p,d),h={x:0,y:0},{scrollableAncestors:x}=n.current;for(const m of x){const b=t.code,{isTop:w,isRight:y,isLeft:_,isBottom:S,maxScroll:E,minScroll:I}=sq(m),N=tG(m),T={x:Math.min(b===nt.Right?N.right-N.width/2:N.right,Math.max(b===nt.Right?N.left:N.left+N.width/2,p.x)),y:Math.min(b===nt.Down?N.bottom-N.height/2:N.bottom,Math.max(b===nt.Down?N.top:N.top+N.height/2,p.y))},A=b===nt.Right&&!y||b===nt.Left&&!_,B=b===nt.Down&&!S||b===nt.Up&&!w;if(A&&T.x!==p.x){const L=m.scrollLeft+v.x,D=b===nt.Right&&L<=E.x||b===nt.Left&&L>=I.x;if(D&&!v.y){m.scrollTo({left:L,behavior:s});return}D?h.x=m.scrollLeft-L:h.x=b===nt.Right?m.scrollLeft-E.x:m.scrollLeft-I.x,h.x&&m.scrollBy({left:-h.x,behavior:s});break}else if(B&&T.y!==p.y){const L=m.scrollTop+v.y,D=b===nt.Down&&L<=E.y||b===nt.Up&&L>=I.y;if(D&&!v.x){m.scrollTo({top:L,behavior:s});return}D?h.y=m.scrollTop-L:h.y=b===nt.Down?m.scrollTop-E.y:m.scrollTop-I.y,h.y&&m.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,Qo(gu(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()}}dq.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=uq,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 AO(e){return!!(e&&"distance"in e)}function MO(e){return!!(e&&"delay"in e)}class Zw{constructor(t,r,n){var i;n===void 0&&(n=oG(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=ya(a),this.documentListeners=new Ss(this.document),this.listeners=new Ss(n),this.windowListeners=new Ss(wr(a)),this.initialCoordinates=(i=mu(o))!=null?i:Nn,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(cn.Resize,this.handleCancel),this.windowListeners.add(cn.DragStart,kO),this.windowListeners.add(cn.VisibilityChange,this.handleCancel),this.windowListeners.add(cn.ContextMenu,kO),this.documentListeners.add(cn.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(AO(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(cn.Click,aG,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(cn.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=mu(t))!=null?r:Nn,u=gu(i,c);if(!n&&s){if(AO(s)){if(s.tolerance!=null&&wp(u,s.tolerance))return this.handleCancel();if(wp(u,s.distance))return this.handleStart()}if(MO(s)&&wp(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===nt.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const lG={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Jw extends Zw{constructor(t){const{event:r}=t,n=ya(r.target);super(t,lG,n)}}Jw.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 cG={move:{name:"mousemove"},end:{name:"mouseup"}};var dw;(function(e){e[e.RightClick=2]="RightClick"})(dw||(dw={}));class uG extends Zw{constructor(t){super(t,cG,ya(t.event.target))}}uG.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===dw.RightClick?!1:(n==null||n({event:r}),!0)}}];const _p={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class dG extends Zw{constructor(t){super(t,_p)}static setup(){return window.addEventListener(_p.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(_p.move.name,t)};function t(){}}}dG.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 Os;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Os||(Os={}));var yu;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(yu||(yu={}));function fG(e){let{acceleration:t,activator:r=Os.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=yu.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:p,threshold:v}=e;const h=hG({delta:p,disabled:!o}),[x,m]=_8(),b=O.useRef({x:0,y:0}),w=O.useRef({x:0,y:0}),y=O.useMemo(()=>{switch(r){case Os.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Os.DraggableRect:return i}},[r,i,c]),_=O.useRef(null),S=O.useCallback(()=>{const I=_.current;if(!I)return;const N=b.current.x*w.current.x,T=b.current.y*w.current.y;I.scrollBy(N,T)},[]),E=O.useMemo(()=>s===yu.TreeOrder?[...u].reverse():u,[s,u]);O.useEffect(()=>{if(!o||!u.length||!y){m();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:A,speed:B}=eG(I,T,y,t,v);for(const L of["x","y"])h[L][A[L]]||(B[L]=0,A[L]=0);if(B.x>0||B.y>0){m(),_.current=I,x(S,a),b.current=B,w.current=A;return}}b.current={x:0,y:0},w.current={x:0,y:0},m()},[t,S,n,m,o,a,JSON.stringify(y),JSON.stringify(h),x,u,E,d,JSON.stringify(v)])}const pG={x:{[tr.Backward]:!1,[tr.Forward]:!1},y:{[tr.Backward]:!1,[tr.Forward]:!1}};function hG(e){let{delta:t,disabled:r}=e;const n=vu(t);return Xs(i=>{if(r||!n||!i)return pG;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[tr.Backward]:i.x[tr.Backward]||o.x===-1,[tr.Forward]:i.x[tr.Forward]||o.x===1},y:{[tr.Backward]:i.y[tr.Backward]||o.y===-1,[tr.Forward]:i.y[tr.Forward]||o.y===1}}},[r,t,n])}function vG(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return Xs(i=>{var o;return t==null?null:(o=n??i)!=null?o:null},[n,t])}function gG(e,t){return O.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 Ds;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Ds||(Ds={}));var fw;(function(e){e.Optimized="optimized"})(fw||(fw={}));const DO=new Map;function mG(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,a]=O.useState(null),{frequency:s,measure:c,strategy:u}=i,d=O.useRef(e),p=b(),v=Ms(p),h=O.useCallback(function(w){w===void 0&&(w=[]),!v.current&&a(y=>y===null?w:y.concat(w.filter(_=>!y.includes(_))))},[v]),x=O.useRef(null),m=Xs(w=>{if(p&&!r)return DO;if(!w||w===DO||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 Xw(c(S),S):null;_.rect.current=E,E&&y.set(_.id,E)}return y}return w},[e,o,r,p,c]);return O.useEffect(()=>{d.current=e},[e]),O.useEffect(()=>{p||h()},[r,p]),O.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),O.useEffect(()=>{p||typeof s!="number"||x.current!==null||(x.current=setTimeout(()=>{h(),x.current=null},s))},[s,p,h,...n]),{droppableRects:m,measureDroppableContainers:h,measuringScheduled:o!=null};function b(){switch(u){case Ds.Always:return!1;case Ds.BeforeDragging:return r;default:return!r}}}function Qw(e,t){return Xs(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function bG(e,t){return Qw(e,t)}function yG(e){let{callback:t,disabled:r}=e;const n=Uu(t),i=O.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(n)},[n,r]);return O.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Ku(e){let{callback:t,disabled:r}=e;const n=Uu(t),i=O.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(n)},[r]);return O.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function xG(e){return new Xw(xa(e),e)}function jO(e,t,r){t===void 0&&(t=xG);const[n,i]=O.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=yG({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=Ku({callback:o});return Rn(()=>{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 wG(e){const t=Qw(e);return tq(e,t)}const qO=[];function _G(e){const t=O.useRef(e),r=Xs(n=>e?n&&n!==qO&&e&&t.current&&e.parentNode===t.current.parentNode?n:Yw(e):qO,[e]);return O.useEffect(()=>{t.current=e},[e]),r}function EG(e){const[t,r]=O.useState(null),n=O.useRef(e),i=O.useCallback(o=>{const a=xp(o.target);a&&r(s=>s?(s.set(a,uw(a)),new Map(s)):null)},[]);return O.useEffect(()=>{const o=n.current;if(e!==o){a(o);const s=e.map(c=>{const u=xp(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,uw(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=xp(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),O.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>Qo(o,a),Nn):lq(e):Nn,[e,t])}function LO(e,t){t===void 0&&(t=[]);const r=O.useRef(null);return O.useEffect(()=>{r.current=null},t),O.useEffect(()=>{const n=e!==Nn;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?gu(e,r.current):Nn}function SG(e){O.useEffect(()=>{if(!Wu)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 OG(e,t){return O.useMemo(()=>e.reduce((r,n)=>{let{eventName:i,handler:o}=n;return r[i]=a=>{o(a,t)},r},{}),[e,t])}function fq(e){return O.useMemo(()=>e?X8(e):null,[e])}const zO=[];function CG(e,t){t===void 0&&(t=xa);const[r]=e,n=fq(r?wr(r):null),[i,o]=O.useState(zO);function a(){o(()=>e.length?e.map(c=>aq(c)?n:new Xw(t(c),c)):zO)}const s=Ku({callback:a});return Rn(()=>{s==null||s.disconnect(),a(),e.forEach(c=>s==null?void 0:s.observe(c))},[e]),i}function pq(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ys(t)?t:e}function IG(e){let{measure:t}=e;const[r,n]=O.useState(null),i=O.useCallback(u=>{for(const{target:d}of u)if(Ys(d)){n(p=>{const v=t(d);return p?{...p,width:v.width,height:v.height}:v});break}},[t]),o=Ku({callback:i}),a=O.useCallback(u=>{const d=pq(u);o==null||o.disconnect(),d&&(o==null||o.observe(d)),n(d?t(d):null)},[t,o]),[s,c]=hu(a);return O.useMemo(()=>({nodeRef:s,rect:r,setRef:c}),[r,s,c])}const RG=[{sensor:Jw,options:{}},{sensor:dq,options:{}}],NG={current:{}},Yc={draggable:{measure:PO},droppable:{measure:PO,strategy:Ds.WhileDragging,frequency:fw.Optimized},dragOverlay:{measure:xa}};class Cs 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 TG={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Cs,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:bu},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Yc,measureDroppableContainers:bu,windowRect:null,measuringScheduled:!1},hq={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:bu,draggableNodes:new Map,over:null,measureDroppableContainers:bu},Js=O.createContext(hq),vq=O.createContext(TG);function PG(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Cs}}}function kG(e,t){switch(t.type){case Xt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Xt.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 Xt.DragEnd:case Xt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Xt.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Cs(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case Xt.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 Cs(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Xt.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Cs(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function AG(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=O.useContext(Js),o=vu(n),a=vu(r==null?void 0:r.id);return O.useEffect(()=>{if(!t&&!n&&o&&a!=null){if(!Gu(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=O8(d);if(p){p.focus();break}}})}},[n,t,i,a,o]),null}function gq(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function MG(e){return O.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 DG(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const o=O.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;Rn(()=>{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=tq(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=nq(c);p&&p.scrollBy({top:d.y,left:d.x})}},[t,a,s,n,r])}const Yu=O.createContext({...Nn,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 jG=O.memo(function(e){var t,r,n,i;let{id:o,accessibility:a,autoScroll:s=!0,children:c,sensors:u=RG,collisionDetection:d=V8,measuring:p,modifiers:v,...h}=e;const x=O.useReducer(kG,void 0,PG),[m,b]=x,[w,y]=P8(),[_,S]=O.useState(Pi.Uninitialized),E=_===Pi.Initialized,{draggable:{active:I,nodes:N,translate:T},droppable:{containers:A}}=m,B=I!=null?N.get(I):null,L=O.useRef({initial:null,translated:null}),D=O.useMemo(()=>{var et;return I!=null?{id:I,data:(et=B==null?void 0:B.data)!=null?et:NG,rect:L}:null},[I,B]),z=O.useRef(null),[P,K]=O.useState(null),[$,Y]=O.useState(null),U=Ms(h,Object.values(h)),Q=Zs("DndDescribedBy",o),k=O.useMemo(()=>A.getEnabled(),[A]),W=MG(p),{droppableRects:J,measureDroppableContainers:ee,measuringScheduled:j}=mG(k,{dragging:E,dependencies:[T.x,T.y],config:W.droppable}),G=vG(N,I),H=O.useMemo(()=>$?mu($):null,[$]),q=Xe(),X=bG(G,W.draggable.measure);DG({activeNode:I!=null?N.get(I):null,config:q.layoutShiftCompensation,initialRect:X,measure:W.draggable.measure});const ne=jO(G,W.draggable.measure,X),te=jO(G?G.parentElement:null),ue=O.useRef({activatorEvent:null,active:null,activeNode:G,collisionRect:null,collisions:null,droppableRects:J,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:A,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),re=A.getNodeFor((t=ue.current.over)==null?void 0:t.id),ge=IG({measure:W.dragOverlay.measure}),de=(r=ge.nodeRef.current)!=null?r:G,xe=E?(n=ge.rect)!=null?n:ne:null,se=!!(ge.nodeRef.current&&ge.rect),le=wG(se?null:ne),we=fq(de?wr(de):null),Oe=_G(E?re??G:null),Te=CG(Oe),qe=gq(v,{transform:{x:T.x-le.x,y:T.y-le.y,scaleX:1,scaleY:1},activatorEvent:$,active:D,activeNodeRect:ne,containerNodeRect:te,draggingNodeRect:xe,over:ue.current.over,overlayNodeRect:ge.rect,scrollableAncestors:Oe,scrollableAncestorRects:Te,windowRect:we}),Ue=H?Qo(H,T):null,De=EG(Oe),ot=LO(De),vt=LO(De,[ne]),Et=Qo(qe,ot),We=xe?G8(xe,qe):null,je=D&&We?d({active:D,collisionRect:We,droppableRects:J,droppableContainers:k,pointerCoordinates:Ue}):null,Qe=F8(je,"id"),[dt,Qt]=O.useState(null),Mt=se?qe:Qo(qe,vt),St=W8(Mt,(i=dt==null?void 0:dt.rect)!=null?i:null,ne),Dt=O.useRef(null),lr=O.useCallback((et,yt)=>{let{sensor:Pt,options:Ut}=yt;if(z.current==null)return;const jt=N.get(z.current);if(!jt)return;const Nt=et.nativeEvent,qt=new Pt({active:z.current,activeNode:jt,event:Nt,options:Ut,context:ue,onAbort(Lt){if(!N.get(Lt))return;const{onDragAbort:rr}=U.current,hr={id:Lt};rr==null||rr(hr),w({type:"onDragAbort",event:hr})},onPending(Lt,rr,hr,yn){if(!N.get(Lt))return;const{onDragPending:Rr}=U.current,Br={id:Lt,constraint:rr,initialCoordinates:hr,offset:yn};Rr==null||Rr(Br),w({type:"onDragPending",event:Br})},onStart(Lt){const rr=z.current;if(rr==null)return;const hr=N.get(rr);if(!hr)return;const{onDragStart:yn}=U.current,Rr={activatorEvent:Nt,active:{id:rr,data:hr.data,rect:L}};si.unstable_batchedUpdates(()=>{yn==null||yn(Rr),S(Pi.Initializing),b({type:Xt.DragStart,initialCoordinates:Lt,active:rr}),w({type:"onDragStart",event:Rr}),K(Dt.current),Y(Nt)})},onMove(Lt){b({type:Xt.DragMove,coordinates:Lt})},onEnd:Ir(Xt.DragEnd),onCancel:Ir(Xt.DragCancel)});Dt.current=qt;function Ir(Lt){return async function(){const{active:rr,collisions:hr,over:yn,scrollAdjustedTranslate:Rr}=ue.current;let Br=null;if(rr&&Rr){const{cancelDrop:Kn}=U.current;Br={activatorEvent:Nt,active:rr,collisions:hr,delta:Rr,over:yn},Lt===Xt.DragEnd&&typeof Kn=="function"&&await Promise.resolve(Kn(Br))&&(Lt=Xt.DragCancel)}z.current=null,si.unstable_batchedUpdates(()=>{b({type:Lt}),S(Pi.Uninitialized),Qt(null),K(null),Y(null),Dt.current=null;const Kn=Lt===Xt.DragEnd?"onDragEnd":"onDragCancel";if(Br){const $i=U.current[Kn];$i==null||$i(Br),w({type:Kn,event:Br})}})}}},[N]),bn=O.useCallback((et,yt)=>(Pt,Ut)=>{const jt=Pt.nativeEvent,Nt=N.get(Ut);if(z.current!==null||!Nt||jt.dndKit||jt.defaultPrevented)return;const qt={active:Nt};et(Pt,yt.options,qt)===!0&&(jt.dndKit={capturedBy:yt.sensor},z.current=Ut,lr(Pt,yt))},[N,lr]),Or=gG(u,bn);SG(u),Rn(()=>{ne&&_===Pi.Initializing&&S(Pi.Initialized)},[ne,_]),O.useEffect(()=>{const{onDragMove:et}=U.current,{active:yt,activatorEvent:Pt,collisions:Ut,over:jt}=ue.current;if(!yt||!Pt)return;const Nt={active:yt,activatorEvent:Pt,collisions:Ut,delta:{x:Et.x,y:Et.y},over:jt};si.unstable_batchedUpdates(()=>{et==null||et(Nt),w({type:"onDragMove",event:Nt})})},[Et.x,Et.y]),O.useEffect(()=>{const{active:et,activatorEvent:yt,collisions:Pt,droppableContainers:Ut,scrollAdjustedTranslate:jt}=ue.current;if(!et||z.current==null||!yt||!jt)return;const{onDragOver:Nt}=U.current,qt=Ut.get(Qe),Ir=qt&&qt.rect.current?{id:qt.id,rect:qt.rect.current,data:qt.data,disabled:qt.disabled}:null,Lt={active:et,activatorEvent:yt,collisions:Pt,delta:{x:jt.x,y:jt.y},over:Ir};si.unstable_batchedUpdates(()=>{Qt(Ir),Nt==null||Nt(Lt),w({type:"onDragOver",event:Lt})})},[Qe]),Rn(()=>{ue.current={activatorEvent:$,active:D,activeNode:G,collisionRect:We,collisions:je,droppableRects:J,draggableNodes:N,draggingNode:de,draggingNodeRect:xe,droppableContainers:A,over:dt,scrollableAncestors:Oe,scrollAdjustedTranslate:Et},L.current={initial:xe,translated:We}},[D,G,je,We,N,de,xe,J,A,dt,Oe,Et]),fG({...q,delta:T,draggingRect:We,pointerCoordinates:Ue,scrollableAncestors:Oe,scrollableAncestorRects:Te});const Cr=O.useMemo(()=>({active:D,activeNode:G,activeNodeRect:ne,activatorEvent:$,collisions:je,containerNodeRect:te,dragOverlay:ge,draggableNodes:N,droppableContainers:A,droppableRects:J,over:dt,measureDroppableContainers:ee,scrollableAncestors:Oe,scrollableAncestorRects:Te,measuringConfiguration:W,measuringScheduled:j,windowRect:we}),[D,G,ne,$,je,te,ge,N,A,J,dt,ee,Oe,Te,W,j,we]),Be=O.useMemo(()=>({activatorEvent:$,activators:Or,active:D,activeNodeRect:ne,ariaDescribedById:{draggable:Q},dispatch:b,draggableNodes:N,over:dt,measureDroppableContainers:ee}),[$,Or,D,ne,b,Q,N,dt,ee]);return O.createElement(eq.Provider,{value:y},O.createElement(Js.Provider,{value:Be},O.createElement(vq.Provider,{value:Cr},O.createElement(Yu.Provider,{value:St},c)),O.createElement(AG,{disabled:(a==null?void 0:a.restoreFocus)===!1})),O.createElement(M8,{...a,hiddenTextDescribedById:Q}));function Xe(){const et=(P==null?void 0:P.autoScrollEnabled)===!1,yt=typeof s=="object"?s.enabled===!1:s===!1,Pt=E&&!et&&!yt;return typeof s=="object"?{...s,enabled:Pt}:{enabled:Pt}}}),qG=O.createContext(null),BO="button",LG="Draggable";function zG(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=Zs(LG),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:p,over:v}=O.useContext(Js),{role:h=BO,roleDescription:x="draggable",tabIndex:m=0}=i??{},b=(c==null?void 0:c.id)===t,w=O.useContext(b?Yu:qG),[y,_]=hu(),[S,E]=hu(),I=OG(a,t),N=Ms(r);Rn(()=>(p.set(t,{id:t,key:o,node:y,activatorNode:S,data:N}),()=>{const A=p.get(t);A&&A.key===o&&p.delete(t)}),[p,t]);const T=O.useMemo(()=>({role:h,tabIndex:m,"aria-disabled":n,"aria-pressed":b&&h===BO?!0:void 0,"aria-roledescription":x,"aria-describedby":d.draggable}),[n,h,m,b,x,d.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:T,isDragging:b,listeners:n?void 0:I,node:y,over:v,setNodeRef:_,setActivatorNodeRef:E,transform:w}}function mq(){return O.useContext(vq)}const BG="Droppable",FG={timeout:25};function $G(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=Zs(BG),{active:a,dispatch:s,over:c,measureDroppableContainers:u}=O.useContext(Js),d=O.useRef({disabled:r}),p=O.useRef(!1),v=O.useRef(null),h=O.useRef(null),{disabled:x,updateMeasurementsFor:m,timeout:b}={...FG,...i},w=Ms(m??n),y=O.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},b)},[b]),_=Ku({callback:y,disabled:x||!a}),S=O.useCallback((T,A)=>{_&&(A&&(_.unobserve(A),p.current=!1),T&&_.observe(T))},[_]),[E,I]=hu(S),N=Ms(t);return O.useEffect(()=>{!_||!E.current||(_.disconnect(),p.current=!1,_.observe(E.current))},[E,_]),O.useEffect(()=>(s({type:Xt.RegisterDroppable,element:{id:n,key:o,disabled:r,node:E,rect:v,data:N}}),()=>s({type:Xt.UnregisterDroppable,key:o,id:n})),[n]),O.useEffect(()=>{r!==d.current.disabled&&(s({type:Xt.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 HG(e){let{animation:t,children:r}=e;const[n,i]=O.useState(null),[o,a]=O.useState(null),s=vu(r);return!r&&!n&&s&&i(s),Rn(()=>{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]),O.createElement(O.Fragment,null,r,n?O.cloneElement(n,{ref:a}):null)}const VG={x:0,y:0,scaleX:1,scaleY:1};function WG(e){let{children:t}=e;return O.createElement(Js.Provider,{value:hq},O.createElement(Yu.Provider,{value:VG},t))}const UG={position:"fixed",touchAction:"none"},GG=e=>Gu(e)?"transform 250ms ease":void 0,KG=O.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:i,children:o,className:a,rect:s,style:c,transform:u,transition:d=GG}=e;if(!s)return null;const p=i?u:{...u,scaleX:1,scaleY:1},v={...UG,width:s.width,height:s.height,top:s.top,left:s.left,transform:Di.Transform.toString(p),transformOrigin:i&&n?L8(n,s):void 0,transition:typeof d=="function"?d(n):d,...c};return O.createElement(r,{className:a,style:v,ref:t},o)}),YG=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)}},XG=e=>{let{transform:{initial:t,final:r}}=e;return[{transform:Di.Transform.toString(t)},{transform:Di.Transform.toString(r)}]},ZG={duration:250,easing:"ease",keyframes:XG,sideEffects:YG({styles:{active:{opacity:"0"}}})};function JG(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:i}=e;return Uu((o,a)=>{if(t===null)return;const s=r.get(o);if(!s)return;const c=s.node.current;if(!c)return;const u=pq(a);if(!u)return;const{transform:d}=wr(a).getComputedStyle(a),p=rq(d);if(!p)return;const v=typeof t=="function"?t:QG(t);return cq(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 QG(e){const{duration:t,easing:r,sideEffects:n,keyframes:i}={...ZG,...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,m=h[h.length-1];if(JSON.stringify(x)===JSON.stringify(m))return;const b=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=()=>{b==null||b(),y()}})}}let FO=0;function e7(e){return O.useMemo(()=>{if(e!=null)return FO++,FO},[e])}const t7=O.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:m,dragOverlay:b,over:w,measuringConfiguration:y,scrollableAncestors:_,scrollableAncestorRects:S,windowRect:E}=mq(),I=O.useContext(Yu),N=e7(p==null?void 0:p.id),T=gq(a,{activatorEvent:d,active:p,activeNodeRect:v,containerNodeRect:h,draggingNodeRect:b.rect,over:w,overlayNodeRect:b.rect,scrollableAncestors:_,scrollableAncestorRects:S,transform:I,windowRect:E}),A=Qw(v),B=JG({config:n,draggableNodes:x,droppableContainers:m,measuringConfiguration:y}),L=A?b.setRef:void 0;return O.createElement(WG,null,O.createElement(HG,{animation:B},p&&N?O.createElement(KG,{key:N,id:p.id,ref:L,as:s,activatorEvent:d,adjustScale:t,className:c,transition:o,rect:A,style:{zIndex:u,...i},transform:T},r):null))});function e1(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function r7(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 n7(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 i7(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const bc={scaleX:1,scaleY:1},o7=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=a7(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 a7(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 bq=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const o=e1(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}},yq="Sortable",xq=O.createContext({activeIndex:-1,containerId:yq,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:bq,disabled:{draggable:!1,droppable:!1}});function s7(e){let{children:t,id:r,items:n,strategy:i=bq,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:c,over:u,measureDroppableContainers:d}=mq(),p=Zs(yq,r),v=s.rect!==null,h=O.useMemo(()=>n.map(I=>typeof I=="object"&&"id"in I?I.id:I),[n]),x=a!=null,m=a?h.indexOf(a.id):-1,b=u?h.indexOf(u.id):-1,w=O.useRef(h),y=!n7(h,w.current),_=b!==-1&&m===-1||y,S=i7(o);Rn(()=>{y&&x&&d(h)},[y,h,x,d]),O.useEffect(()=>{w.current=h},[h]);const E=O.useMemo(()=>({activeIndex:m,containerId:p,disabled:S,disableTransforms:_,items:h,overIndex:b,useDragOverlay:v,sortedRects:r7(h,c),strategy:i}),[m,p,S.draggable,S.droppable,_,h,b,c,v,i]);return O.createElement(xq.Provider,{value:E},t)}const l7=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return e1(r,n,i).indexOf(t)},c7=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},u7={duration:200,easing:"ease"},wq="transform",d7=Di.Transition.toString({property:wq,duration:0,easing:"linear"}),f7={roleDescription:"sortable"};function p7(e){let{disabled:t,index:r,node:n,rect:i}=e;const[o,a]=O.useState(null),s=O.useRef(r);return Rn(()=>{if(!t&&r!==s.current&&n.current){const c=i.current;if(c){const u=xa(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]),O.useEffect(()=>{o&&a(null)},[o]),o}function h7(e){let{animateLayoutChanges:t=c7,attributes:r,disabled:n,data:i,getNewIndex:o=l7,id:a,strategy:s,resizeObserverConfig:c,transition:u=u7}=e;const{items:d,containerId:p,activeIndex:v,disabled:h,disableTransforms:x,sortedRects:m,overIndex:b,useDragOverlay:w,strategy:y}=O.useContext(xq),_=v7(n,h),S=d.indexOf(a),E=O.useMemo(()=>({sortable:{containerId:p,index:S,items:d},...i}),[p,i,S,d]),I=O.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:N,node:T,isOver:A,setNodeRef:B}=$G({id:a,data:E,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...c}}),{active:L,activatorEvent:D,activeNodeRect:z,attributes:P,setNodeRef:K,listeners:$,isDragging:Y,over:U,setActivatorNodeRef:Q,transform:k}=zG({id:a,data:E,attributes:{...f7,...r},disabled:_.draggable}),W=w8(B,K),J=!!L,ee=J&&!x&&mc(v)&&mc(b),j=!w&&Y,G=j&&ee?k:null,H=ee?G??(s??y)({rects:m,activeNodeRect:z,activeIndex:v,overIndex:b,index:S}):null,q=mc(v)&&mc(b)?o({id:a,items:d,activeIndex:v,overIndex:b}):S,X=L==null?void 0:L.id,ne=O.useRef({activeId:X,items:d,newIndex:q,containerId:p}),te=d!==ne.current.items,ue=t({active:L,containerId:p,isDragging:Y,isSorting:J,id:a,index:S,items:d,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:u,wasDragging:ne.current.activeId!=null}),re=p7({disabled:!ue,index:S,node:T,rect:N});return O.useEffect(()=>{J&&ne.current.newIndex!==q&&(ne.current.newIndex=q),p!==ne.current.containerId&&(ne.current.containerId=p),d!==ne.current.items&&(ne.current.items=d)},[J,q,p,d]),O.useEffect(()=>{if(X===ne.current.activeId)return;if(X!=null&&ne.current.activeId==null){ne.current.activeId=X;return}const de=setTimeout(()=>{ne.current.activeId=X},50);return()=>clearTimeout(de)},[X]),{active:L,activeIndex:v,attributes:P,data:E,rect:N,index:S,newIndex:q,items:d,isOver:A,isSorting:J,isDragging:Y,listeners:$,node:T,overIndex:b,over:U,setNodeRef:W,setActivatorNodeRef:Q,setDroppableNodeRef:B,setDraggableNodeRef:K,transform:re??H,transition:ge()};function ge(){if(re||te&&ne.current.newIndex===S)return d7;if(!(j&&!Gu(D)||!u)&&(J||ue))return Di.Transition.toString({...u,property:wq})}}function v7(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}}nt.Down,nt.Right,nt.Up,nt.Left;const g7=e=>{let{transform:t}=e;return{...t,y:0}};function m7(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 b7=e=>{let{draggingNodeRect:t,transform:r,scrollableAncestorRects:n}=e;const i=n[0];return!t||!i?r:m7(r,t,i)},$O=({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}=h7({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)},m=b=>{b==null||b.stopPropagation(),o&&o(t)};return a?C.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?m:void 0})}):null},_q={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"}},y7={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"}}},HO=()=>me("inline-flex items-center rounded overflow-hidden"),Eq=(e,t,r,n)=>{const i=y7[e],o=_q[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)},Sq=(e,t)=>me("flex items-center justify-center",_q[e].icon,{"opacity-50":t}),Oq=()=>me("whitespace-nowrap"),Ep=()=>me("min-w-full flex h-8 bg-tab-bg-default pt-0.5"),Cq=(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")},pw=O.createContext(void 0),Iq=O.forwardRef(({value:e,label:t,icon:r,disabled:n,children:i,className:o,onClick:a,active:s,content:c,...u},d)=>{const p=O.useContext(pw);if(!p)return null;const{activeTab:v,onTabChange:h,variant:x,color:m,size:b,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"?C.jsx("div",{"data-qui":"FileTabItem",className:me(Cq(_,!1),"cursor-pointer",o),onClick:I=>!S&&E(I),children:i||C.jsx(C.Fragment,{children:C.jsxs("span",{className:"flex items-center gap-2",children:[r,C.jsx("span",{children:t})]})})}):C.jsxs("button",{ref:d,"data-qui":"TabItem",type:"button",role:"tab","aria-selected":_,"aria-disabled":S,className:me(Eq(m,b,_,S||!1),o),onClick:E,disabled:S,...u,children:[w&&r&&C.jsx("span",{className:Sq(b,S||!1),children:r}),C.jsx("span",{className:Oq(),children:i||t})]})});Iq.displayName="TabItem";const x7=({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?C.jsx(C.Fragment,{children:p({tab:e,isActive:n,onClick:v,onClose:d?h:void 0})}):C.jsxs("button",{"data-qui":"TabItem",type:"button",role:"tab","aria-selected":n,"aria-disabled":u,className:Eq(i,o,n,u),onClick:v,disabled:u,children:[a&&c&&C.jsx("span",{className:Sq(o,u),children:c}),C.jsx("span",{className:Oq(),children:r})]})},w7=({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?C.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},_7=[],t1=({tabs:e=_7,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:m,children:b})=>{const w=U=>{const Q=U[t]??U.value??U.key;return Q!==void 0?String(Q):""},y=U=>U[r]??U.label,_=i||(e[0]?w(e[0]):""),[S,E]=O.useState(_),[I,N]=O.useState(null),[T,A]=O.useState(e),B=n!==void 0?n:S,L=T,D=j8(D8(Jw,{activationConstraint:{distance:10}})),z=U=>{n===void 0&&E(U),h==null||h(U)},P=U=>L.findIndex(Q=>w(Q)===U),K=I?P(I):-1;O.useEffect(()=>{A(e)},[e]);const $={activeTab:B,onTabChange:z,variant:o,color:a,size:s,showIcons:u,disabled:d};if(b)return C.jsxs(pw.Provider,{value:$,children:[C.jsx("div",{"data-qui":"Tabs",role:"tablist",className:me(o==="file"?Ep():HO(),p,v),children:b}),o==="file"&&C.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]});const Y=o==="file"&&c?C.jsxs("div",{className:"relative h-full w-full",children:[C.jsxs(jG,{collisionDetection:$8,modifiers:[g7,b7],sensors:D,onDragStart:({active:U})=>{U&&N(U.id)},onDragEnd:({over:U})=>{if(N(null),U){const Q=P(U.id);if(K!==Q&&K!==-1){const k=e1(L,K,Q);A(k),x&&x(k,k[Q]),z(w(k[Q]))}}},onDragCancel:()=>{N(null)},children:[C.jsx(s7,{items:L.map(U=>w(U)),strategy:o7,children:C.jsx("div",{role:"tablist",className:me(Ep(),v),children:L.map(U=>{const Q=w(U);return C.jsx($O,{value:Q,tab:{...U,renderTab:U.renderTab||m},isActive:B===Q,onTabClick:z,className:p},Q)})})}),C.jsx(t7,{children:I&&K!==-1?C.jsx($O,{value:w(L[K]),tab:{...L[K],renderTab:L[K].renderTab||m},isActive:B===w(L[K]),onTabClick:z,dragOverlay:!0,className:p}):null})]}),C.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):o==="file"?C.jsxs("div",{className:"relative",children:[C.jsx("div",{role:"tablist",className:me(Ep(),v),children:e.map(U=>{const Q=w(U);return C.jsx(w7,{value:Q,tab:{...U,renderTab:U.renderTab||m},isActive:B===Q,onTabClick:z},Q)})}),C.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):C.jsx("div",{role:"tablist",className:me(HO(),v),children:e.map(U=>{const Q=w(U);return C.jsx(x7,{value:Q,label:y(U),tab:{...U,renderTab:U.renderTab||m},isActive:B===Q,color:a,size:s,showIcons:u,onTabClick:z},Q)})});return C.jsx(pw.Provider,{value:$,children:C.jsx("div",{"data-qui":"Tabs",className:p,children:Y})})},E7=O.forwardRef(({isActive:e=!1,isDesactive:t=!1,children:r,...n},i)=>C.jsx("div",{"data-qui":"TabNavContainer",className:Cq(e,t),ref:i,...n,children:r}));E7.displayName="TabNavContainer";t1.displayName="Tabs";t1.Item=Iq;const Sp=t1;var Ht=function(){return Ht=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},Ht.apply(this,arguments)},VO={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},WO={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},yc={width:"20px",height:"20px",position:"absolute",zIndex:1},S7={top:Ht(Ht({},VO),{top:"-5px"}),right:Ht(Ht({},WO),{left:void 0,right:"-5px"}),bottom:Ht(Ht({},VO),{top:void 0,bottom:"-5px"}),left:Ht(Ht({},WO),{left:"-5px"}),topRight:Ht(Ht({},yc),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Ht(Ht({},yc),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Ht(Ht({},yc),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Ht(Ht({},yc),{left:"-10px",top:"-10px",cursor:"nw-resize"})},O7=O.memo(function(e){var t=e.onResizeStart,r=e.direction,n=e.children,i=e.replaceStyles,o=e.className,a=O.useCallback(function(u){t(u,r)},[t,r]),s=O.useCallback(function(u){t(u,r)},[t,r]),c=O.useMemo(function(){return Ht(Ht({position:"absolute",userSelect:"none"},S7[r]),i??{})},[i,r]);return C.jsx("div",{className:o||void 0,style:c,onMouseDown:a,onTouchStart:s,children:n})}),C7=(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)},I7={width:"auto",height:"auto"},xc=function(e,t,r){return Math.max(Math.min(e,r),t)},UO=function(e,t,r){var n=Math.round(e/t);return n*t+r*(n-1)},Bo=function(e,t){return new RegExp(e,"i").test(t)},wc=function(e){return!!(e.touches&&e.touches.length)},R7=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},GO=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},Op=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},N7=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)}},T7=function(e){return Array.isArray(e)?e:[e,e]},P7=["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"],KO="__resizable_base__",k7=(function(e){C7(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(KO):u.className+=KO,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||I7},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 Op(r.state[s])},o=n&&typeof n.width<"u"&&!this.state.isResizing?Op(n.width):i("width"),a=n&&typeof n.height<"u"&&!this.state.isResizing?Op(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&&Bo("left",o),s=i&&Bo("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=T7(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,m=d.width,b=d.height,w=h||0,y=x||0;return Bo("right",u)&&(m=d.width+(r-d.x)*a/i,v&&(b=(m-y)/this.ratio+w)),Bo("left",u)&&(m=d.width-(r-d.x)*a/i,v&&(b=(m-y)/this.ratio+w)),Bo("bottom",u)&&(b=d.height+(n-d.y)*s/i,v&&(m=(b-w)*this.ratio+y)),Bo("top",u)&&(b=d.height-(n-d.y)*s/i,v&&(m=(b-w)*this.ratio+y)),{newWidth:m,newHeight:b}},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,m=u||0;if(s){var b=(v-x)*this.ratio+m,w=(h-x)*this.ratio+m,y=(d-m)/this.ratio+x,_=(p-m)/this.ratio+x,S=Math.max(d,b),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&&R7(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,m=p.height,b=this.getParentSize(),w=N7(b,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=GO(S,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(_=GO(_,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=UO(S,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),T=UO(_,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),A=this.props.snapGap||0,B=A===0||Math.abs(N-S)<=A?N:S,L=A===0||Math.abs(T-_)<=A?T:_;S=B,_=L}var D={width:S-h.width,height:_-h.height};if(this.delta=D,x&&typeof x=="string"){if(x.endsWith("%")){var z=S/b.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(m&&typeof m=="string"){if(m.endsWith("%")){var z=_/b.height*100;_="".concat(z,"%")}else if(m.endsWith("vw")){var P=_/this.window.innerWidth*100;_="".concat(P,"vw")}else if(m.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,Q=this.state.flexBasis!==$.flexBasis,k=Y||U||Q;k&&si.flushSync(function(){n.setState($)}),this.props.onResize&&k&&this.props.onResize(r,v,this.resizable,D)}},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?C.jsx(O7,{direction:p,onResizeStart:r.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return C.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 P7.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 C.jsxs(o,zn({style:i,className:this.props.className},n,{ref:function(a){a&&(r.resizable=a)},children:[this.state.isResizing&&C.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})(O.PureComponent);const A7={0:"bg-panel-0",1:"bg-panel-1",2:"bg-panel-2",3:"bg-panel-3",4:"bg-panel-4",5:"bg-panel-5"},M7={tabs:"border-tab-border",primary:"border-primary",negative:"border-input-error-border",positive:"border-positive",light:"border-panel-border-subtle",default:"border-panel-border"},Rq=({depth:e=0,className:t,borderType:r,disabled:n})=>me("transition-colors duration-200",{"text-body":!n,"text-inactive-text":n},r?M7[r]:"border-panel-border",A7[e],t),D7=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},j7=O.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:m={},handleClasses:b={},handleComponent:w={},style:y={},className:_,onResizeStart:S,onResize:E,onResizeStop:I,scale:N=1,bounds:T,snapGap:A,as:B="div",depth:L,disabled:D},z)=>{const P=Rq({depth:L,className:_,disabled:D}),K=D7(_),$=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=O.useRef(null);return O.useImperativeHandle(z,()=>{var Q;return(Q=U.current)==null?void 0:Q.resizable}),C.jsx(k7,{"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:m,handleClasses:b,handleComponent:w,style:y,className:me("relative box-border",P),onResizeStart:S,onResize:E,onResizeStop:I,scale:N,bounds:T,snapGap:A,as:B,children:e})});j7.displayName="Resizable";const Fo={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"}},q7=(e,t,r,n,i,o)=>({container:me("inline-flex items-center",Fo[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",Fo[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",Fo[e].thumb,r?Fo[e].thumbChecked:Fo[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",Fo[e].label,{"cursor-pointer":!n,"cursor-not-allowed text-muted":n})}),xu=O.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]=O.useState(r),m=t!==void 0,b=m?t:h,w=()=>{const _=!b;m||x(_),s==null||s(_)},y=q7(i,o,b,n,!!a,c);return C.jsxs("div",{"data-qui":"Toggle",className:y.container,children:[e&&C.jsx("label",{htmlFor:u,className:y.label,children:e}),C.jsxs("button",{ref:v,...p,type:"button",role:"switch","aria-checked":b,"aria-label":e,disabled:n,onClick:w,name:d,id:u,className:y.track,children:[a&&C.jsx("span",{className:y.iconLeft,children:a.unchecked}),C.jsx("span",{className:y.thumb,"aria-hidden":"true"}),a&&C.jsx("span",{className:y.iconRight,children:a.checked})]})]})});xu.displayName="Toggle";O.createContext(null);const dr=O.forwardRef(({depth:e=0,className:t,children:r,borderType:n,disabled:i,...o},a)=>{const s=Rq({depth:e,className:t,borderType:n,disabled:i});return C.jsx("div",{"data-qui":"Panel",ref:a,className:s,"aria-disabled":i,...o,children:r})});dr.displayName="Panel";const js={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"}},L7=(e,t,r,n)=>me("inline-flex items-center justify-center font-medium border",js[e].container,Xc[t].bg,Xc[t].text,Xc[t].border,js[e].text,{"opacity-60 pointer-events-none":r,"cursor-pointer hover:bg-opacity-90 transition-opacity":n&&!r}),z7=(e,t,r)=>me({[js[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}),B7=e=>me(js[e].text),Nq=(e,t,r)=>me("inline-flex items-center justify-center rounded transition-colors duration-200 focus:outline-hidden ",js[e].iconButton,Xc[t].buttonHover,{"pointer-events-none":r}),Tq=O.createContext(null),Xu=()=>{const e=O.useContext(Tq);if(!e)throw new Error("Pill components must be used within a Pill.Root");return e},r1=O.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 C.jsx(Tq.Provider,{value:c,children:C.jsx("div",{"data-qui":"Pill",ref:s,onClick:o,className:me(L7(e,t,i,u),r),...a,children:n})})});r1.displayName="Pill.Root";const n1=O.forwardRef(({className:e,children:t,...r},n)=>{const{size:i}=Xu();return C.jsx("span",{ref:n,className:me(B7(i),e),...r,children:t})});n1.displayName="Pill.Text";const i1=O.forwardRef(({className:e,children:t,label:r,position:n,...i},o)=>{const{size:a,color:s,disabled:c}=Xu(),u=!!r,d=C.jsx("span",{ref:o,className:me(z7(a,s,u),e,{"opacity-60":c}),...i,children:t});return u&&!c?C.jsx(Kr,{label:r||"",position:n||"up",children:d}):d});i1.displayName="Pill.Icon";const Pq=O.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,disabled:a}=Xu();return C.jsx("button",{ref:n,type:"button",disabled:a,className:me(Nq(i,o,a),e),...r,children:t})});Pq.displayName="Pill.Button";const o1=O.forwardRef(({className:e,onClose:t,"aria-label":r="Remove pill",children:n,...i},o)=>{const{size:a,color:s,disabled:c}=Xu();return C.jsx("button",{ref:o,type:"button",disabled:c,className:me(Nq(a,s,c),e),onClick:t,"aria-label":r,...i,children:n||C.jsx(Vu,{})})});o1.displayName="Pill.Close";const kq=O.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)=>C.jsxs(r1,{ref:d,size:e,color:t,className:a,disabled:c,...u,children:[n&&C.jsx(i1,{children:n}),s||r&&C.jsx(n1,{children:r}),o&&C.jsx(o1,{onClose:i})]}));kq.displayName="Pill";const Zc=Object.assign(kq,{Root:r1,Text:n1,Icon:i1,Button:Pq,Close:o1}),Aq=O.createContext(null),_r=()=>{const e=O.useContext(Aq);if(!e)throw new Error("Select compound components must be used within Select.Root");return e},fr={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"}},Ft={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-text 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-text 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-text 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-text 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"}},F7=()=>me("flex flex-col relative"),$7=({size:e,color:t,isDisabled:r,isFocused:n,isInvalid:i,hasMessage:o})=>{const a=Ft[i?"negative":t];return me("flex items-center justify-between only:rounded first:rounded-t last:rounded-b",fr[e].control,a.control,o?["ring-1",a.messageBorder]:["border",r?"border-input-border":n?a.controlFocused:`border-select-border
|
|
19
19
|
focus-within:${a.controlFocused}`],{[a.controlDisabled]:r})},H7=({isMulti:e})=>me("flex items-center gap-1 flex-1 min-w-0 overflow-hidden",{"flex-wrap":e,"px-0.5":!e}),V7=({size:e,color:t})=>me("bg-transparent border-0 outline-hidden flex-1 min-w-7.5 px-1 text-input-text",fr[e].input,Ft[t].placeholder),W7=({size:e,color:t})=>me("select-none truncate",fr[e].placeholder,Ft[t].placeholder),U7=({size:e,color:t,isDisabled:r})=>me("truncate",fr[e].singleValue,r?Ft[t].singleValueDisabled:Ft[t].singleValue),G7=({size:e,color:t,isDisabled:r,isFocused:n})=>me("inline-flex items-center rounded-xs",fr[e].multiValue,r?Ft[t].multiValueDisabled:Ft[t].multiValue,{"border border-white":n&&!r}),K7=({size:e})=>me("truncate",fr[e].multiValueLabel),Y7=({size:e,color:t,isDisabled:r})=>me("flex items-center justify-center cursor-pointer transition-colors",fr[e].multiValueRemove,Ft[t].multiValueRemove),Mq=({size:e,color:t,isDisabled:r})=>me("flex items-center justify-center transition-colors rounded",fr[e].clearIndicator,r?"hidden":[Ft[t].clearIndicator,Ft[t].clearIndicatorHover]),X7=({size:e,color:t,isDisabled:r})=>me("flex items-center justify-center transition-colors rounded",fr[e].dropdownIndicator,r?"text-grey-200":[Ft[t].dropdownIndicator,Ft[t].dropdownIndicatorHover]),Z7=({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",Ft[n].menu,{[Ft[n].messageBorder]:r},i[t||"auto"],fr[e].menu)},J7=({size:e})=>me("overflow-y-auto",fr[e].menuList,Ft.primary.menuList),Q7=({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",fr[e].option,{[Ft[t].optionDisabled]:r,[Ft[t].optionSelected]:i&&!r,[Ft[t].optionFocused]:n&&!i&&!r,[Ft[t].option]:!i&&!n&&!r}),e9=({size:e})=>me(fr[e].group),t9=({size:e,color:t})=>me(fr[e].groupHeading,Ft[t].groupHeading),r9=({size:e})=>me("text-grey-100",fr[e].loadingMessage),n9=({size:e})=>me(fr[e].noOptionsMessage,Ft.primary.noOptionsMessage),Dq=e=>{const t=e[0];return e.length>0&&typeof t=="object"&&t!==null&&"options"in t&&Array.isArray(t.options)},i9=e=>Dq(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 hw(e,t){return hw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},hw(e,t)}function o9(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,hw(e,t)}var Sc={exports:{}},Cp={exports:{}},st={};/** @license React v16.13.1
|
|
20
20
|
* react-is.production.min.js
|
|
21
21
|
*
|
|
@@ -51,9 +51,9 @@ Valid keys: `+JSON.stringify(Object.keys(k),null," "));var re=ue(q,te,j,G,H+"."
|
|
|
51
51
|
*
|
|
52
52
|
* This source code is licensed under the MIT license found in the
|
|
53
53
|
* LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/var sC;function v9(){return sC||(sC=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,m=!1,b=!1,w=!1,y=!1,_;_=Symbol.for("react.module.reference");function S(de){return!!(typeof de=="string"||typeof de=="function"||de===r||de===i||y||de===n||de===u||de===d||w||de===h||x||m||b||typeof de=="object"&&de!==null&&(de.$$typeof===v||de.$$typeof===p||de.$$typeof===o||de.$$typeof===a||de.$$typeof===c||de.$$typeof===_||de.getModuleId!==void 0))}function E(de){if(typeof de=="object"&&de!==null){var xe=de.$$typeof;switch(xe){case e:var se=de.type;switch(se){case r:case i:case n:case u:case d:return se;default:var le=se&&se.$$typeof;switch(le){case s:case a:case c:case v:case p:case o:return le;default:return xe}}case t:return xe}}}var I=a,N=o,T=e,A=c,B=r,L=v,D=p,z=t,P=i,K=n,$=u,Y=d,U=!1,Q=!1;function k(de){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(de){return Q||(Q=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function J(de){return E(de)===a}function ee(de){return E(de)===o}function j(de){return typeof de=="object"&&de!==null&&de.$$typeof===e}function G(de){return E(de)===c}function H(de){return E(de)===r}function q(de){return E(de)===v}function X(de){return E(de)===p}function ne(de){return E(de)===t}function te(de){return E(de)===i}function ue(de){return E(de)===n}function re(de){return E(de)===u}function ge(de){return E(de)===d}ht.ContextConsumer=I,ht.ContextProvider=N,ht.Element=T,ht.ForwardRef=A,ht.Fragment=B,ht.Lazy=L,ht.Memo=D,ht.Portal=z,ht.Profiler=P,ht.StrictMode=K,ht.Suspense=$,ht.SuspenseList=Y,ht.isAsyncMode=k,ht.isConcurrentMode=W,ht.isContextConsumer=J,ht.isContextProvider=ee,ht.isElement=j,ht.isForwardRef=G,ht.isFragment=H,ht.isLazy=q,ht.isMemo=X,ht.isPortal=ne,ht.isProfiler=te,ht.isStrictMode=ue,ht.isSuspense=re,ht.isSuspenseList=ge,ht.isValidElementType=S,ht.typeOf=E})()),ht}var lC;function g9(){return lC||(lC=1,process.env.NODE_ENV==="production"?kp.exports=h9():kp.exports=v9()),kp.exports}var cC=g9();const uC=e=>typeof e=="object"&&e!=null&&e.nodeType===1,dC=(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 dC(r.overflowY,t)||dC(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,m9=e=>e.parentElement??(e.getRootNode().host||null),b9=(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(!uC(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,p=[];let v=e;for(;uC(v)&&u(v);){if(v=m9(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:m,scrollY:b}=window,{height:w,width:y,top:_,right:S,bottom:E,left:I}=e.getBoundingClientRect(),{top:N,right:T,left:A}=(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 B=_-N,L=a==="center"?I+y/2-A+T:a==="end"?S+T:I-A;const D=[];for(let z=0;z<p.length;z++){const P=p[z],{height:K,width:$,top:Y,right:U,bottom:Q,left:k}=P.getBoundingClientRect();if(_>=0&&I>=0&&E<=x&&S<=h&&(P===d&&!Oc(P)||_>=Y&&E<=Q&&I>=k&&S<=U))return D;const W=getComputedStyle(P),J=parseInt(W.borderLeftWidth,10),ee=parseInt(W.borderTopWidth,10),j=parseInt(W.borderRightWidth,10),G=parseInt(W.borderBottomWidth,10);let H=0,q=0;const X="offsetWidth"in P?P.offsetWidth-P.clientWidth-J-j:0,ne="offsetHeight"in P?P.offsetHeight-P.clientHeight-ee-G:0,te="offsetWidth"in P?P.offsetWidth===0?0:$/P.offsetWidth:0,ue="offsetHeight"in P?P.offsetHeight===0?0:K/P.offsetHeight:0;if(d===P)H=Cc(b,b+x,x,ee,G,b+B,b+B+w,w),q=a==="start"?L:a==="center"?L-h/2:a==="end"?L-h:Cc(m,m+h,h,J,j,m+L,m+L+y,y),H=Math.max(0,H+b),q=Math.max(0,q+m);else{H=Cc(Y,Q,K,ee,G+ne,B,B+w,w),q=a==="start"?L-k-J:a==="center"?L-(k+$/2)+X/2:a==="end"?L-U+j+X:Cc(k,U,$,J,j+X,L,L+y,y);const{scrollLeft:re,scrollTop:ge}=P;H=ue===0?0:Math.max(0,Math.min(ge+H/ue,P.scrollHeight-K/ue+ne)),q=te===0?0:Math.max(0,Math.min(re+q/te,P.scrollWidth-$/te+X)),B+=ge-H,L+=re-q}D.push({el:P,top:H,left:q})}return D};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)},y9=0;function fC(e){return typeof e=="function"?e:br}function br(){}function Lq(e,t){if(e){var r=b9(e,{boundary:t});r.forEach(function(n){var i=n.el,o=n.top,a=n.left;i.scrollTop=o,i.scrollLeft=a})}}function pC(e,t,r){var n=e===t||t instanceof r.Node&&e.contains&&e.contains(t);return n}function Zu(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 it(){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 Cn(){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 zq(){return String(y9++)}function x9(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 hC(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function Bq(e){return typeof e.type=="string"}function Fq(e){return e.props}function w9(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var _9=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Ic(e){e===void 0&&(e={});var t={};return _9.forEach(function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function qs(e,t){return!e||!t?e:Object.keys(e).reduce(function(r,n){return r[n]=wu(t,n)?t[n]:e[n],r},{})}function wu(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 E9(e){return Object.prototype.toString.call(e)==="[object Object]"}function In(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 _u(e,t,r,n){return n===void 0&&(n=!0),r&&t.some(function(i){return i&&(pC(i,e,r)||n&&pC(i,r.document.activeElement,r))})}var s1=br;process.env.NODE_ENV!=="production"&&(s1=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 S9=Zu(function(e){$q(e).textContent=""},500);function $q(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 Hq(e,t){if(!(!e||!t)){var r=$q(t);r.textContent=e,S9(t)}}function O9(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,Wq=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,Uq=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,Gq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,Kq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,Yq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Xq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,Zq=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,Jq=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Qq=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,eL=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,vw=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,tL=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,rL=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,nL=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,C9=Object.freeze({__proto__:null,blurButton:tL,blurInput:Jq,changeInput:Qq,clickButton:vw,clickItem:Zq,controlledPropUpdatedSelectedItem:rL,itemMouseEnter:Uq,keyDownArrowDown:Qc,keyDownArrowUp:Jc,keyDownEnd:Xq,keyDownEnter:Kq,keyDownEscape:Gq,keyDownHome:Yq,keyDownSpaceButton:eL,mouseUp:Wq,touchEnd:nL,unknown:Vq}),I9=["refKey","ref"],R9=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],N9=["onKeyDown","onBlur","onChange","onInput","onChangeText"],T9=["refKey","ref"],P9=["onMouseMove","onMouseDown","onClick","onPress","index","item"],k9=(function(){var e=(function(t){function r(i){var o;o=t.call(this,i)||this,o.id=o.props.id||"downshift-"+zq(),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 A;T=o.getState(T);var B=N?y(T):y;B=o.props.stateReducer(T,B),S=B.hasOwnProperty("selectedItem");var L={};return S&&B.selectedItem!==T.selectedItem&&(E=B.selectedItem),(A=B).type||(A.type=Vq),Object.keys(B).forEach(function(D){T[D]!==B[D]&&(I[D]=B[D]),D!=="type"&&(B[D],wu(o.props,D)||(L[D]=B[D]))}),N&&B.hasOwnProperty("inputValue")&&o.props.onInputValueChange(B.inputValue,ke({},o.getStateAndHelpers(),B)),L},function(){fC(_)();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,A=yr(E,I9),B=_===void 0?{}:_,L=B.suppressRefError,D=L===void 0?!1:L;o.getRootProps.called=!0,o.getRootProps.refKey=N,o.getRootProps.suppressRefError=D;var z=o.getState(),P=z.isOpen;return ke((S={},S[N]=Cn(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),A)},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=In(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=In(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:Kq})}}},Escape:function(y){y.preventDefault(),this.reset(ke({type:Gq},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},o.buttonKeyDownHandlers=ke({},o.keyDownHandlers,{" ":function(y){y.preventDefault(),this.toggleMenu({type:eL})}}),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:Yq})}}},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:Xq})}}}}),o.getToggleButtonProps=function(y){var _=y===void 0?{}:y,S=_.onClick;_.onPress;var E=_.onKeyDown,I=_.onKeyUp,N=_.onBlur,T=yr(_,R9),A=o.getState(),B=A.isOpen,L={onClick:it(S,o.buttonHandleClick),onKeyDown:it(E,o.buttonHandleKeyDown),onKeyUp:it(I,o.buttonHandleKeyUp),onBlur:it(N,o.buttonHandleBlur)},D=T.disabled?{}:L;return ke({type:"button",role:"button","aria-label":B?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},D,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:vw}):o.internalSetTimeout(function(){return o.toggleMenu({type:vw})})},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:tL})}})},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(_,N9),A,B={};A="onChange";var L=o.getState(),D=L.inputValue,z=L.isOpen,P=L.highlightedIndex;if(!T.disabled){var K;B=(K={},K[A]=it(I,N,o.inputHandleChange),K.onKeyDown=it(S,o.inputHandleKeyDown),K.onBlur=it(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:D,id:o.inputId},B,T)},o.inputHandleKeyDown=function(y){var _=aa(y);_&&o.inputKeyDownHandlers[_]&&o.inputKeyDownHandlers[_].call(o,y)},o.inputHandleChange=function(y){o.internalSetState({type:Qq,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:Jq})}})},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,A=yr(E,T9),B=_===void 0?{}:_,L=B.suppressRefError,D=L===void 0?!1:L;return o.getMenuProps.called=!0,o.getMenuProps.refKey=N,o.getMenuProps.suppressRefError=D,ke((S={},S[N]=Cn(T,o.menuRef),S.role="listbox",S["aria-labelledby"]=A&&A["aria-label"]?void 0:o.labelId,S.id=o.menuId,S),A)},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,A=S.item,B=A===void 0?process.env.NODE_ENV==="production"?void 0:w9("getItemProps","item"):A,L=yr(S,P9);T===void 0?(o.items.push(B),T=o.items.indexOf(B)):o.items[T]=B;var D="onClick",z=N,P=(_={onMouseMove:it(E,function(){T!==o.getState().highlightedIndex&&(o.setHighlightedIndex(T,{type:Uq}),o.avoidScrolling=!0,o.internalSetTimeout(function(){return o.avoidScrolling=!1},250))}),onMouseDown:it(I,function($){$.preventDefault()})},_[D]=it(z,function(){o.selectItemAtIndex(T,{type:Zq})}),_),K=L.disabled?{onMouseDown:P.onMouseDown}:P;return ke({id:o.getItemId(T),role:"option","aria-selected":o.getState().highlightedIndex===T},K,L)},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),fC(_)()})},o.openMenu=function(y){o.internalSetState({isOpen:!0},y)},o.closeMenu=function(y){o.internalSetState({isOpen:!1},y)},o.updateStatus=Zu(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,Hq(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,m=a.initialSelectedItem,b=m===void 0?null:m,w=o.getState({highlightedIndex:u,isOpen:v,inputValue:x,selectedItem:b});return w.selectedItem!=null&&o.props.initialInputValue===void 0&&(w.inputValue=o.props.itemToString(w.selectedItem)),o.state=w,o}o9(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),qs(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=In(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,m=this.getInputProps,b=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,A=this.clearItems,B=this.reset,L=this.setItemCount,D=this.unsetItemCount,z=this.internalSetState;return{getRootProps:p,getToggleButtonProps:v,getLabelProps:h,getMenuProps:x,getInputProps:m,getItemProps:b,reset:B,openMenu:w,closeMenu:y,toggleMenu:_,selectItem:S,selectItemAtIndex:E,selectHighlightedItem:I,setHighlightedIndex:N,clearSelection:T,clearItems:A,setItemCount:L,unsetItemCount:D,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&&vC(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=_u(p.target,[i._rootNode,i._menuNode],i.props.environment);!v&&i.getState().isOpen&&i.reset({type:Wq},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},s=function(){i.isTouchMove=!1},c=function(){i.isTouchMove=!0},u=function(p){var v=_u(p.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!v&&i.getState().isOpen&&i.reset({type:nL},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"&&(s1(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&vC(this._menuNode,this.getMenuProps)),wu(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:rL,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=hC(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=hC(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&&A9(o,this.getRootProps),o;if(Bq(o))return O.cloneElement(o,this.getRootProps(Fq(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})(O.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:x9,itemToString:function(t){return t==null?"":(process.env.NODE_ENV!=="production"&&E9(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:Lq},e.stateChangeTypes=C9,e})();process.env.NODE_ENV!=="production"&&(k9.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 vC(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 A9(e,t){var r=t.refKey,n=r!=="ref",i=!Bq(e);i&&!n&&!cC.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+'"'),!cC.isForwardRef(e)&&!Fq(e)[r]&&console.error('downshift: You must apply the ref prop "'+r+'" from getRootProps onto your root element.')}var iL={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function M9(e,t,r){var n=e.props,i=e.type,o={};Object.keys(t).forEach(function(a){D9(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 D9(e,t,r,n){var i=t.props,o=t.type,a="on"+c1(e)+"Change";i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a](ke({type:o},n))}function j9(e,t){return t.changes}var gC=Zu(function(e,t){Hq(e,t)},200),q9=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?O.useLayoutEffect:O.useEffect,oL="useId"in O?function(e){var t=e.id,r=e.labelId,n=e.menuId,i=e.getItemId,o=e.toggleButtonId,a=e.inputId,s="downshift-"+O.useId();t||(t=s);var c=O.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-"+zq():t,n=e.labelId,i=e.menuId,o=e.getItemId,a=e.toggleButtonId,s=e.inputId,c=O.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 l1(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 L9(e){return/^\S{1}$/.test(e)}function c1(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Ju(e){var t=O.useRef(e);return t.current=e,t}function aL(e,t,r,n){var i=O.useRef(),o=O.useRef(),a=O.useCallback(function(h,x){o.current=x,h=qs(h,x.props);var m=e(h,x),b=x.props.stateReducer(h,ke({},x,{changes:m}));return b},[e]),s=O.useReducer(a,t,r),c=s[0],u=s[1],d=Ju(t),p=O.useCallback(function(h){return u(ke({props:d.current},h))},[d]),v=o.current;return O.useEffect(function(){var h=qs(i.current,v==null?void 0:v.props),x=v&&i.current&&!n(h,c);x&&M9(v,h,c),i.current=c},[c,v,n]),[c,p]}function sL(e,t,r,n){var i=aL(e,t,r,n),o=i[0],a=i[1];return[qs(o,t),a]}var Is={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:j9,scrollIntoView:Lq,environment:typeof window>"u"?void 0:window};function Fn(e,t,r){r===void 0&&(r=iL);var n=e["default"+c1(t)];return n!==void 0?n:r[t]}function ro(e,t,r){r===void 0&&(r=iL);var n=e[t];if(n!==void 0)return n;var i=e["initial"+c1(t)];return i!==void 0?i:Fn(e,t,r)}function lL(e){var t=ro(e,"selectedItem"),r=ro(e,"isOpen"),n=z9(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 cL(e,t,r){var n=O.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),i=O.useCallback(function(){return r.map(function(o){return o.current})},[r]);return O.useEffect(function(){if(!e)return br;function o(){n.current.isTouchEnd=!1,n.current.isMouseDown=!0}function a(d){n.current.isMouseDown=!1,_u(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&&!_u(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 Qu=function(){return br};process.env.NODE_ENV!=="production"&&(Qu=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=O.useRef(t.reduce(function(o,a){return o[a]={},o},{}));O.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=O.useCallback(function(o,a,s,c){n.current[o]={suppressRefError:a,refKey:s,elementRef:c}},[]);return i});function u1(e,t,r,n){n===void 0&&(n={});var i=n.document,o=Qs();O.useEffect(function(){if(!(!e||o||!i)){var a=e(t);gC(a,i)}},r),O.useEffect(function(){return function(){gC.cancel(),O9(i)}},[i])}function uL(e){var t=e.highlightedIndex,r=e.isOpen,n=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,a=e.scrollIntoView,s=O.useRef(!0);return q9(function(){t<0||!r||!Object.keys(n.current).length||(s.current===!1?s.current=!0:a(i(t),o))},[t]),s}var ed=br;process.env.NODE_ENV!=="production"&&(ed=function(e){var t=e.props,r=e.state,n=O.useRef(t),i=Qs();O.useEffect(function(){i||(s1(r,n.current,t),n.current=t)},[r,t,i])});function Eu(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 dL(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Qs(){var e=O.useRef(!0);return O.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function Su(e){var t=Fn(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function z9(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},fL=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 pL(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:Su(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 B9(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 F9=oa(oa({},fL),{items:ye.array.isRequired,isItemDisabled:ye.func}),$9=oa(oa({},Is),{isItemDisabled:function(){return!1}}),hL=br;process.env.NODE_ENV!=="production"&&(hL=function(e,t){ye.checkPropTypes(F9,e,"prop",t.name)});var tu=process.env.NODE_ENV!=="production"?"__togglebutton_click__":0,d1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_down__":1,f1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_up__":2,Ou=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_character__":3,p1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_escape__":4,h1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_home__":5,v1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_end__":6,g1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_enter__":7,m1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_space_button__":8,b1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_up__":9,y1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_down__":10,Cu=process.env.NODE_ENV!=="production"?"__togglebutton_blur__":11,vL=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":12,gL=process.env.NODE_ENV!=="production"?"__item_mouse_move__":13,x1=process.env.NODE_ENV!=="production"?"__item_click__":14,mL=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,bL=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,yL=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,xL=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,w1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,gw=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,wL=process.env.NODE_ENV!=="production"?"__function_reset__":21,_L=Object.freeze({__proto__:null,FunctionCloseMenu:yL,FunctionOpenMenu:bL,FunctionReset:wL,FunctionSelectItem:w1,FunctionSetHighlightedIndex:xL,FunctionSetInputValue:gw,FunctionToggleMenu:mL,ItemClick:x1,ItemMouseMove:gL,MenuMouseLeave:vL,ToggleButtonBlur:Cu,ToggleButtonClick:tu,ToggleButtonKeyDownArrowDown:d1,ToggleButtonKeyDownArrowUp:f1,ToggleButtonKeyDownCharacter:Ou,ToggleButtonKeyDownEnd:v1,ToggleButtonKeyDownEnter:g1,ToggleButtonKeyDownEscape:p1,ToggleButtonKeyDownHome:h1,ToggleButtonKeyDownPageDown:y1,ToggleButtonKeyDownPageUp:b1,ToggleButtonKeyDownSpaceButton:m1});function H9(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case x1:a={isOpen:Fn(i,"isOpen"),highlightedIndex:Su(i),selectedItem:i.items[t.index]};break;case Ou:{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=B9({keysSoFar:c,highlightedIndex:u,items:i.items,itemToString:i.itemToString,isItemDisabled:i.isItemDisabled});a={inputValue:c,highlightedIndex:d,isOpen:!0}}break;case d1:{var p=e.isOpen?In(e.highlightedIndex,1,i.items,i.isItemDisabled):o&&e.selectedItem==null?-1:no(i,e,1);a={highlightedIndex:p,isOpen:!0}}break;case f1:if(e.isOpen&&o)a=Eu(i,e.highlightedIndex,!1);else{var v=e.isOpen?In(e.highlightedIndex,-1,i.items,i.isItemDisabled):no(i,e,-1);a={highlightedIndex:v,isOpen:!0}}break;case g1:case m1:a=Eu(i,e.highlightedIndex,!1);break;case h1:a={highlightedIndex:ji(0,!1,i.items,i.isItemDisabled),isOpen:!0};break;case v1:a={highlightedIndex:ji(i.items.length-1,!0,i.items,i.isItemDisabled),isOpen:!0};break;case b1:a={highlightedIndex:In(e.highlightedIndex,-10,i.items,i.isItemDisabled)};break;case y1:a={highlightedIndex:In(e.highlightedIndex,10,i.items,i.isItemDisabled)};break;case p1:a={isOpen:!1,highlightedIndex:-1};break;case Cu:a=ke({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((r=i.items)==null?void 0:r.length)&&{selectedItem:i.items[e.highlightedIndex]});break;case w1:a={selectedItem:t.selectedItem};break;default:return pL(e,t,_L)}return ke({},e,a)}var V9=["onClick"],W9=["onMouseLeave","refKey","ref"],U9=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],G9=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];Yo.stateChangeTypes=_L;function Yo(e){e===void 0&&(e={}),hL(e,Yo);var t=ke({},$9,e),r=t.scrollIntoView,n=t.environment,i=t.getA11yStatusMessage,o=sL(H9,t,lL,dL),a=o[0],s=o[1],c=a.isOpen,u=a.highlightedIndex,d=a.selectedItem,p=a.inputValue,v=O.useRef(null),h=O.useRef(null),x=O.useRef({}),m=O.useRef(null),b=oL(t),w=Ju({state:a,props:t}),y=O.useCallback(function(k){return x.current[b.getItemId(k)]},[b]);u1(i,a,[c,u,d,p],n);var _=uL({menuElement:h.current,highlightedIndex:u,isOpen:c,itemRefs:x,scrollIntoView:r,getItemNodeFromIndex:y});O.useEffect(function(){return m.current=Zu(function(k){k({type:gw,inputValue:""})},500),function(){m.current.cancel()}},[]),O.useEffect(function(){p&&m.current(s)},[s,p]),ed({props:t,state:a}),O.useEffect(function(){var k=ro(t,"isOpen");k&&v.current&&v.current.focus()},[]);var S=O.useCallback(function(){w.current.state.isOpen&&s({type:Cu})},[s,w]),E=O.useMemo(function(){return[h,v]},[]),I=cL(n,S,E),N=Qu("getMenuProps","getToggleButtonProps");O.useEffect(function(){c||(x.current={})},[c]);var T=O.useMemo(function(){return{ArrowDown:function(k){k.preventDefault(),s({type:d1,altKey:k.altKey})},ArrowUp:function(k){k.preventDefault(),s({type:f1,altKey:k.altKey})},Home:function(k){k.preventDefault(),s({type:h1})},End:function(k){k.preventDefault(),s({type:v1})},Escape:function(){w.current.state.isOpen&&s({type:p1})},Enter:function(k){k.preventDefault(),s({type:w.current.state.isOpen?g1:tu})},PageUp:function(k){w.current.state.isOpen&&(k.preventDefault(),s({type:b1}))},PageDown:function(k){w.current.state.isOpen&&(k.preventDefault(),s({type:y1}))}," ":function(k){k.preventDefault();var W=w.current.state;if(!W.isOpen){s({type:tu});return}W.inputValue?s({type:Ou,key:" "}):s({type:m1})}}},[s,w]),A=O.useCallback(function(){s({type:mL})},[s]),B=O.useCallback(function(){s({type:yL})},[s]),L=O.useCallback(function(){s({type:bL})},[s]),D=O.useCallback(function(k){s({type:xL,highlightedIndex:k})},[s]),z=O.useCallback(function(k){s({type:w1,selectedItem:k})},[s]),P=O.useCallback(function(){s({type:wL})},[s]),K=O.useCallback(function(k){s({type:gw,inputValue:k})},[s]),$=O.useCallback(function(k){var W=k===void 0?{}:k,J=W.onClick,ee=yr(W,V9),j=function(){var G;(G=v.current)==null||G.focus()};return ke({id:b.labelId,htmlFor:b.toggleButtonId,onClick:it(J,j)},ee)},[b]),Y=O.useCallback(function(k,W){var J,ee=k===void 0?{}:k,j=ee.onMouseLeave,G=ee.refKey,H=G===void 0?"ref":G,q=ee.ref,X=yr(ee,W9),ne=W===void 0?{}:W,te=ne.suppressRefError,ue=te===void 0?!1:te,re=function(){s({type:vL})};return N("getMenuProps",ue,H,h),ke((J={},J[H]=Cn(q,function(ge){h.current=ge}),J.id=b.menuId,J.role="listbox",J["aria-labelledby"]=X&&X["aria-label"]?void 0:""+b.labelId,J.onMouseLeave=it(j,re),J),X)},[s,N,b]),U=O.useCallback(function(k,W){var J,ee=k===void 0?{}:k,j=ee.onBlur,G=ee.onClick;ee.onPress;var H=ee.onKeyDown,q=ee.refKey,X=q===void 0?"ref":q,ne=ee.ref,te=yr(ee,U9),ue=W===void 0?{}:W,re=ue.suppressRefError,ge=re===void 0?!1:re,de=w.current.state,xe=function(){s({type:tu})},se=function(){de.isOpen&&!I.isMouseDown&&s({type:Cu})},le=function(Oe){var Te=aa(Oe);Te&&T[Te]?T[Te](Oe):L9(Te)&&s({type:Ou,key:Te})},we=ke((J={},J[X]=Cn(ne,function(Oe){v.current=Oe}),J["aria-activedescendant"]=de.isOpen&&de.highlightedIndex>-1?b.getItemId(de.highlightedIndex):"",J["aria-controls"]=b.menuId,J["aria-expanded"]=w.current.state.isOpen,J["aria-haspopup"]="listbox",J["aria-labelledby"]=te&&te["aria-label"]?void 0:""+b.labelId,J.id=b.toggleButtonId,J.role="combobox",J.tabIndex=0,J.onBlur=it(j,se),J),te);return te.disabled||(we.onClick=it(G,xe),we.onKeyDown=it(H,le)),N("getToggleButtonProps",ge,X,v),we},[s,b,w,I,N,T]),Q=O.useCallback(function(k){var W,J=k===void 0?{}:k,ee=J.item,j=J.index,G=J.onMouseMove,H=J.onClick,q=J.onMouseDown;J.onPress;var X=J.refKey,ne=X===void 0?"ref":X,te=J.disabled,ue=J.ref,re=yr(J,G9);te!==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,de=ge.state,xe=ge.props,se=l1(ee,j,xe.items,"Pass either item or index to getItemProps!"),le=se[0],we=se[1],Oe=xe.isItemDisabled(le,we),Te=function(){I.isTouchEnd||we===de.highlightedIndex||(_.current=!1,s({type:gL,index:we,disabled:Oe}))},qe=function(){s({type:x1,index:we})},Ue=function(ot){return ot.preventDefault()},De=ke((W={},W[ne]=Cn(ue,function(ot){ot&&(x.current[b.getItemId(we)]=ot)}),W["aria-disabled"]=Oe,W["aria-selected"]=le===de.selectedItem,W.id=b.getItemId(we),W.role="option",W),re);return Oe||(De.onClick=it(H,qe)),De.onMouseMove=it(G,Te),De.onMouseDown=it(q,Ue),De},[w,b,I,_,s]);return{getToggleButtonProps:U,getLabelProps:$,getMenuProps:Y,getItemProps:Q,toggleMenu:A,openMenu:L,closeMenu:B,setHighlightedIndex:D,selectItem:z,reset:P,setInputValue:K,highlightedIndex:u,isOpen:c,selectedItem:d,inputValue:p}}var _1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,E1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,S1=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,O1=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,C1=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,I1=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,R1=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,N1=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,T1=process.env.NODE_ENV!=="production"?"__input_change__":8,Iu=process.env.NODE_ENV!=="production"?"__input_blur__":9,P1=process.env.NODE_ENV!=="production"?"__input_click__":10,EL=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,SL=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,k1=process.env.NODE_ENV!=="production"?"__item_click__":13,OL=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,CL=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,IL=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,RL=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,NL=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,A1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,TL=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,PL=process.env.NODE_ENV!=="production"?"__function_reset__":21,M1=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,kL=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:M1,FunctionCloseMenu:RL,FunctionOpenMenu:IL,FunctionReset:PL,FunctionSelectItem:A1,FunctionSetHighlightedIndex:NL,FunctionSetInputValue:TL,FunctionToggleMenu:CL,InputBlur:Iu,InputChange:T1,InputClick:P1,InputKeyDownArrowDown:_1,InputKeyDownArrowUp:E1,InputKeyDownEnd:C1,InputKeyDownEnter:N1,InputKeyDownEscape:S1,InputKeyDownHome:O1,InputKeyDownPageDown:R1,InputKeyDownPageUp:I1,ItemClick:k1,ItemMouseMove:SL,MenuMouseLeave:EL,ToggleButtonClick:OL});function K9(e){var t=lL(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 Y9=ke({},fL,{items:ye.array.isRequired,isItemDisabled:ye.func,inputValue:ye.string,defaultInputValue:ye.string,initialInputValue:ye.string,inputId:ye.string,onInputValueChange:ye.func});function X9(e,t,r,n){var i=O.useRef(),o=aL(e,t,r,n),a=o[0],s=o[1],c=Qs();return O.useEffect(function(){if(wu(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]),[qs(a,t),s]}var AL=br;process.env.NODE_ENV!=="production"&&(AL=function(e,t){ye.checkPropTypes(Y9,e,"prop",t.name)});var Z9=ke({},Is,{isItemDisabled:function(){return!1}});function J9(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case k1:a={isOpen:Fn(i,"isOpen"),highlightedIndex:Su(i),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case _1:e.isOpen?a={highlightedIndex:In(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 E1:e.isOpen?o?a=Eu(i,e.highlightedIndex):a={highlightedIndex:In(e.highlightedIndex,-1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:no(i,e,-1),isOpen:i.items.length>=0};break;case N1:a=Eu(i,e.highlightedIndex);break;case S1:a=ke({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case I1:a={highlightedIndex:In(e.highlightedIndex,-10,i.items,i.isItemDisabled,!0)};break;case R1:a={highlightedIndex:In(e.highlightedIndex,10,i.items,i.isItemDisabled,!0)};break;case O1:a={highlightedIndex:ji(0,!1,i.items,i.isItemDisabled)};break;case C1:a={highlightedIndex:ji(i.items.length-1,!0,i.items,i.isItemDisabled)};break;case Iu: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 T1:a={isOpen:!0,highlightedIndex:Su(i),inputValue:t.inputValue};break;case P1:a={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:no(i,e,0)};break;case A1:a={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case M1:a={inputValue:t.inputValue};break;default:return pL(e,t,kL)}return ke({},e,a)}var Q9=["onMouseLeave","refKey","ref"],eK=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],tK=["onClick","onPress","refKey","ref"],rK=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];ai.stateChangeTypes=kL;function ai(e){e===void 0&&(e={}),AL(e,ai);var t=ke({},Z9,e),r=t.items,n=t.scrollIntoView,i=t.environment,o=t.getA11yStatusMessage,a=X9(J9,t,K9,dL),s=a[0],c=a[1],u=s.isOpen,d=s.highlightedIndex,p=s.selectedItem,v=s.inputValue,h=O.useRef(null),x=O.useRef({}),m=O.useRef(null),b=O.useRef(null),w=Qs(),y=oL(t),_=O.useRef(),S=Ju({state:s,props:t}),E=O.useCallback(function(j){return x.current[y.getItemId(j)]},[y]);u1(o,s,[u,d,p,v],i);var I=uL({menuElement:h.current,highlightedIndex:d,isOpen:u,itemRefs:x,scrollIntoView:n,getItemNodeFromIndex:E});ed({props:t,state:s}),O.useEffect(function(){var j=ro(t,"isOpen");j&&m.current&&m.current.focus()},[]),O.useEffect(function(){w||(_.current=r.length)});var N=O.useCallback(function(){S.current.state.isOpen&&c({type:Iu})},[c,S]),T=O.useMemo(function(){return[h,b,m]},[]),A=cL(i,N,T),B=Qu("getInputProps","getMenuProps");O.useEffect(function(){u||(x.current={})},[u]),O.useEffect(function(){var j;!u||!(i!=null&&i.document)||!(m!=null&&(j=m.current)!=null&&j.focus)||i.document.activeElement!==m.current&&m.current.focus()},[u,i]);var L=O.useMemo(function(){return{ArrowDown:function(j){j.preventDefault(),c({type:_1,altKey:j.altKey})},ArrowUp:function(j){j.preventDefault(),c({type:E1,altKey:j.altKey})},Home:function(j){S.current.state.isOpen&&(j.preventDefault(),c({type:O1}))},End:function(j){S.current.state.isOpen&&(j.preventDefault(),c({type:C1}))},Escape:function(j){var G=S.current.state;(G.isOpen||G.inputValue||G.selectedItem||G.highlightedIndex>-1)&&(j.preventDefault(),c({type:S1}))},Enter:function(j){var G=S.current.state;!G.isOpen||j.which===229||(j.preventDefault(),c({type:N1}))},PageUp:function(j){S.current.state.isOpen&&(j.preventDefault(),c({type:I1}))},PageDown:function(j){S.current.state.isOpen&&(j.preventDefault(),c({type:R1}))}}},[c,S]),D=O.useCallback(function(j){return ke({id:y.labelId,htmlFor:y.inputId},j)},[y]),z=O.useCallback(function(j,G){var H,q=j===void 0?{}:j,X=q.onMouseLeave,ne=q.refKey,te=ne===void 0?"ref":ne,ue=q.ref,re=yr(q,Q9),ge=G===void 0?{}:G,de=ge.suppressRefError,xe=de===void 0?!1:de;return B("getMenuProps",xe,te,h),ke((H={},H[te]=Cn(ue,function(se){h.current=se}),H.id=y.menuId,H.role="listbox",H["aria-labelledby"]=re&&re["aria-label"]?void 0:""+y.labelId,H.onMouseLeave=it(X,function(){c({type:EL})}),H),re)},[c,B,y]),P=O.useCallback(function(j){var G,H,q=j===void 0?{}:j,X=q.item,ne=q.index,te=q.refKey,ue=te===void 0?"ref":te,re=q.ref,ge=q.onMouseMove,de=q.onMouseDown,xe=q.onClick;q.onPress;var se=q.disabled,le=yr(q,eK);se!==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,Oe=we.props,Te=we.state,qe=l1(X,ne,Oe.items,"Pass either item or index to getItemProps!"),Ue=qe[0],De=qe[1],ot=Oe.isItemDisabled(Ue,De),vt="onClick",Et=xe,We=function(){A.isTouchEnd||De===Te.highlightedIndex||(I.current=!1,c({type:SL,index:De,disabled:ot}))},je=function(){c({type:k1,index:De})},Qe=function(dt){return dt.preventDefault()};return ke((G={},G[ue]=Cn(re,function(dt){dt&&(x.current[y.getItemId(De)]=dt)}),G["aria-disabled"]=ot,G["aria-selected"]=De===Te.highlightedIndex,G.id=y.getItemId(De),G.role="option",G),!ot&&(H={},H[vt]=it(Et,je),H),{onMouseMove:it(ge,We),onMouseDown:it(de,Qe)},le)},[c,y,S,A,I]),K=O.useCallback(function(j){var G,H=j===void 0?{}:j,q=H.onClick;H.onPress;var X=H.refKey,ne=X===void 0?"ref":X,te=H.ref,ue=yr(H,tK),re=S.current.state,ge=function(){c({type:OL})};return ke((G={},G[ne]=Cn(te,function(de){b.current=de}),G["aria-controls"]=y.menuId,G["aria-expanded"]=re.isOpen,G.id=y.toggleButtonId,G.tabIndex=-1,G),!ue.disabled&&ke({},{onClick:it(q,ge)}),ue)},[c,S,y]),$=O.useCallback(function(j,G){var H,q=j===void 0?{}:j,X=q.onKeyDown,ne=q.onChange,te=q.onInput,ue=q.onBlur;q.onChangeText;var re=q.onClick,ge=q.refKey,de=ge===void 0?"ref":ge,xe=q.ref,se=yr(q,rK),le=G===void 0?{}:G,we=le.suppressRefError,Oe=we===void 0?!1:we;B("getInputProps",Oe,de,m);var Te=S.current.state,qe=function(je){var Qe=aa(je);Qe&&L[Qe]&&L[Qe](je)},Ue=function(je){c({type:T1,inputValue:je.target.value})},De=function(je){if(i!=null&&i.document&&Te.isOpen&&!A.isMouseDown){var Qe=je.relatedTarget===null&&i.document.activeElement!==i.document.body;c({type:Iu,selectItem:!Qe})}},ot=function(){c({type:P1})},vt="onChange",Et={};if(!se.disabled){var We;Et=(We={},We[vt]=it(ne,te,Ue),We.onKeyDown=it(X,qe),We.onBlur=it(ue,De),We.onClick=it(re,ot),We)}return ke((H={},H[de]=Cn(xe,function(je){m.current=je}),H["aria-activedescendant"]=Te.isOpen&&Te.highlightedIndex>-1?y.getItemId(Te.highlightedIndex):"",H["aria-autocomplete"]="list",H["aria-controls"]=y.menuId,H["aria-expanded"]=Te.isOpen,H["aria-labelledby"]=se&&se["aria-label"]?void 0:y.labelId,H.autoComplete="off",H.id=y.inputId,H.role="combobox",H.value=Te.inputValue,H),Et,se)},[c,y,i,L,S,A,B]),Y=O.useCallback(function(){c({type:CL})},[c]),U=O.useCallback(function(){c({type:RL})},[c]),Q=O.useCallback(function(){c({type:IL})},[c]),k=O.useCallback(function(j){c({type:NL,highlightedIndex:j})},[c]),W=O.useCallback(function(j){c({type:A1,selectedItem:j})},[c]),J=O.useCallback(function(j){c({type:TL,inputValue:j})},[c]),ee=O.useCallback(function(){c({type:PL})},[c]);return{getItemProps:P,getLabelProps:D,getMenuProps:z,getInputProps:$,getToggleButtonProps:K,toggleMenu:Y,openMenu:Q,closeMenu:U,setHighlightedIndex:k,setInputValue:J,selectItem:W,reset:ee,highlightedIndex:d,isOpen:u,selectedItem:p,inputValue:v}}var ML={activeIndex:-1,selectedItems:[]};function mC(e,t){return ro(e,t,ML)}function bC(e,t){return Fn(e,t,ML)}function nK(e){var t=mC(e,"activeIndex"),r=mC(e,"selectedItems");return{activeIndex:t,selectedItems:r}}function yC(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 iK(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var oK={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},aK={itemToKey:Is.itemToKey,stateReducer:Is.stateReducer,environment:Is.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},DL=br;process.env.NODE_ENV!=="production"&&(DL=function(e,t){ye.checkPropTypes(oK,e,"prop",t.name)});var D1=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,j1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,q1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,L1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,z1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,B1=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,F1=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,$1=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,H1=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,V1=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,W1=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,U1=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,G1=process.env.NODE_ENV!=="production"?"__function_reset__":12,sK=Object.freeze({__proto__:null,DropdownClick:$1,DropdownKeyDownBackspace:F1,DropdownKeyDownNavigationPrevious:B1,FunctionAddSelectedItem:H1,FunctionRemoveSelectedItem:V1,FunctionReset:G1,FunctionSetActiveIndex:U1,FunctionSetSelectedItems:W1,SelectedItemClick:D1,SelectedItemKeyDownBackspace:q1,SelectedItemKeyDownDelete:j1,SelectedItemKeyDownNavigationNext:L1,SelectedItemKeyDownNavigationPrevious:z1});function lK(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 D1:c={activeIndex:n};break;case z1:c={activeIndex:a-1<0?0:a-1};break;case L1:c={activeIndex:a+1>=s.length?-1:a+1};break;case q1:case j1:{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 B1:c={activeIndex:s.length-1};break;case F1:c={selectedItems:s.slice(0,s.length-1)};break;case H1:c={selectedItems:[].concat(s,[o])};break;case $1: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 W1:{var v=t.selectedItems;c={selectedItems:v};break}case U1:{var h=t.activeIndex;c={activeIndex:h};break}case G1:c={activeIndex:bC(i,"activeIndex"),selectedItems:bC(i,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ke({},e,c)}var cK=["refKey","ref","onClick","onKeyDown","selectedItem","index"],uK=["refKey","ref","onKeyDown","onClick","preventKeyAction"];K1.stateChangeTypes=sK;function K1(e){e===void 0&&(e={}),DL(e,K1);var t=ke({},aK,e),r=t.getA11yStatusMessage,n=t.environment,i=t.keyNavigationNext,o=t.keyNavigationPrevious,a=sL(lK,t,nK,iK),s=a[0],c=a[1],u=s.activeIndex,d=s.selectedItems,p=Qs(),v=O.useRef(null),h=O.useRef();h.current=[];var x=Ju({state:s,props:t});u1(r,s,[u,d],n),O.useEffect(function(){p||(u===-1&&v.current?v.current.focus():h.current[u]&&h.current[u].focus())},[u]),ed({props:t,state:s});var m=Qu("getDropdownProps"),b=O.useMemo(function(){var A;return A={},A[o]=function(){c({type:z1})},A[i]=function(){c({type:L1})},A.Delete=function(){c({type:j1})},A.Backspace=function(){c({type:q1})},A},[c,i,o]),w=O.useMemo(function(){var A;return A={},A[o]=function(B){yC(B)&&c({type:B1})},A.Backspace=function(B){yC(B)&&c({type:F1})},A},[c,o]),y=O.useCallback(function(A){var B,L=A===void 0?{}:A,D=L.refKey,z=D===void 0?"ref":D,P=L.ref,K=L.onClick,$=L.onKeyDown,Y=L.selectedItem,U=L.index,Q=yr(L,cK),k=x.current.state,W=l1(Y,U,k.selectedItems,"Pass either item or index to getSelectedItemProps!"),J=W[1],ee=J>-1&&J===k.activeIndex,j=function(){c({type:D1,index:J})},G=function(H){var q=aa(H);q&&b[q]&&b[q](H)};return ke((B={},B[z]=Cn(P,function(H){H&&h.current.push(H)}),B.tabIndex=ee?0:-1,B.onClick=it(K,j),B.onKeyDown=it($,G),B),Q)},[c,x,b]),_=O.useCallback(function(A,B){var L,D=A===void 0?{}:A,z=D.refKey,P=z===void 0?"ref":z,K=D.ref,$=D.onKeyDown,Y=D.onClick,U=D.preventKeyAction,Q=U===void 0?!1:U,k=yr(D,uK),W=B===void 0?{}:B,J=W.suppressRefError,ee=J===void 0?!1:J;m("getDropdownProps",ee,P,v);var j=function(H){var q=aa(H);q&&w[q]&&w[q](H)},G=function(){c({type:$1})};return ke((L={},L[P]=Cn(K,function(H){H&&(v.current=H)}),L),!Q&&{onKeyDown:it($,j),onClick:it(Y,G)},k)},[c,w,m]),S=O.useCallback(function(A){c({type:H1,selectedItem:A})},[c]),E=O.useCallback(function(A){c({type:V1,selectedItem:A})},[c]),I=O.useCallback(function(A){c({type:W1,selectedItems:A})},[c]),N=O.useCallback(function(A){c({type:U1,activeIndex:A})},[c]),T=O.useCallback(function(){c({type:G1})},[c]);return{getSelectedItemProps:y,getDropdownProps:_,addSelectedItem:S,removeSelectedItem:E,setSelectedItems:I,setActiveIndex:N,reset:T,selectedItems:d,activeIndex:u}}const dK=e=>{const{items:t=[],isMulti:r=!1,isSearchable:n=!1,value:i,defaultValue:o,inputValue:a,onChange:s,onInputChange:c,getOptionLabel:u=H=>(H==null?void 0:H.label)||"",getOptionValue:d=H=>(H==null?void 0:H.value)||"",isOpen:p,onOpenChange:v,customOptionGenerator:h,disableInternalFiltering:x=!1,stateReducer:m,isDisabled:b=!1}=e,w=O.useCallback(H=>{const q=u(H);if(typeof q=="string")return q;if(typeof q=="number")return String(q);const X=H;if(typeof X=="object"&&X!==null){if(typeof X.label=="string")return X.label;if(typeof X.name=="string")return X.name}return String(d(H))},[u,d]),y=H=>H?Array.isArray(H)?H:[H]:[],_=o!==void 0?o:i!==void 0?i:null,[S,E]=O.useState(()=>y(_)),[I,N]=O.useState(a||""),[T,A]=O.useState(()=>p!==void 0?p:!1),B=i!==void 0?y(i):S,L=a!==void 0?a:I,D=p!==void 0?p:T,z=O.useCallback(H=>{p===void 0&&A(H),v==null||v(H)},[p,v]),P=O.useCallback(H=>{i===void 0&&E(H);const q=r?H:H[0]||null;s==null||s(q)},[i,r,s]),K=O.useCallback(H=>{a===void 0&&N(H),c==null||c(H)},[a,c]),$=O.useMemo(()=>h?h(L,t):x||!n||!L?t:t.filter(H=>w(H).toLowerCase().includes(L.toLowerCase())),[t,L,h,x,n,w]),Y=K1({selectedItems:B,onSelectedItemsChange:H=>{const q=H.selectedItems||[];P(q)}}),U={items:$,itemToString:H=>H?w(H):"",isOpen:D,onIsOpenChange:({isOpen:H})=>{H!==void 0&&z(H)},selectedItem:r?null:B[0]||null,onSelectedItemChange:H=>{!r&&H.selectedItem&&P([H.selectedItem])}},Q=H=>(q,X)=>{const ne=(()=>{const{changes:te,type:ue}=X;return r&&te.selectedItem&&(H===ai?[ai.stateChangeTypes.InputKeyDownEnter,ai.stateChangeTypes.ItemClick]:[Yo.stateChangeTypes.ToggleButtonKeyDownEnter,Yo.stateChangeTypes.ItemClick]).includes(ue)?(!B.some(re=>d(re)===d(te.selectedItem))&&te.selectedItem&&Y.addSelectedItem(te.selectedItem),{...te,isOpen:!0,highlightedIndex:q.highlightedIndex,...n&&{inputValue:""}}):ue===ai.stateChangeTypes.InputBlur&&!r&&B.length>0?{...te,inputValue:w(B[0])}:te})();return m?m(q,{...X,changes:ne}):ne},k=n?ai({...U,inputValue:L,onInputValueChange:({inputValue:H,type:q})=>{!H&&q===ai.stateChangeTypes.InputChange&&P([]),K(H||"")},stateReducer:Q(ai),initialIsOpen:p!==void 0?p:!1,defaultIsOpen:!1}):Yo({...U,stateReducer:Q(Yo),initialIsOpen:p!==void 0?p:!1,defaultIsOpen:!1}),W=()=>{b||(z(!D),"toggleMenu"in k&&k.toggleMenu())},J=O.useCallback(()=>{b||(z(!0),"openMenu"in k&&k.openMenu())},[z,k,b]),ee=O.useCallback(()=>{z(!1),"closeMenu"in k&&k.closeMenu()},[z,k]),j=O.useCallback(()=>{P([]),K(""),r&&Y.reset()},[P,K,r,Y]),G=O.useCallback(H=>{r&&Y.removeSelectedItem(H)},[r,Y]);return{isOpen:k.isOpen,selectedItem:k.selectedItem,highlightedIndex:k.highlightedIndex,inputValue:L,getToggleButtonProps:k.getToggleButtonProps,getMenuProps:k.getMenuProps,getItemProps:k.getItemProps,getInputProps:"getInputProps"in k?k.getInputProps:void 0,selectedItems:B,filteredItems:$,setInputValue:K,setIsOpen:z,toggleMenu:W,openMenu:J,closeMenu:ee,clearSelection:j,removeItem:G,multipleSelection:Y,isMulti:r,isSearchable:n}},jL=({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:m,customOptionGenerator:b,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,A]=O.useState(!1),B=O.useMemo(()=>i9(a),[a]),L=dK({items:B,value:s,defaultValue:c,onChange:u,isMulti:d,inputValue:p,onInputChange:v,isSearchable:h,isOpen:x,onOpenChange:m,getOptionLabel:y,getOptionValue:_,customOptionGenerator:b,disableInternalFiltering:w,stateReducer:I,isDisabled:n}),D={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,hasMessage:T,setHasMessage:A,downshift:L,options:a,getOptionLabel:y,getOptionValue:_,isOptionDisabled:S,formatOptionLabel:E};return C.jsx(Aq.Provider,{value:D,children:C.jsx("div",{"data-qui":"Select",className:me(F7(),i),...N,children:o})})},fK=O.forwardRef(({className:e,children:t,isFocused:r,isDisabled:n,...i},o)=>{const{size:a,color:s,isDisabled:c,hasMessage:u,downshift:d,isInvalid:p}=_r(),v=n??c,h=r??d.isOpen;return C.jsx("div",{ref:o,className:me($7({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})}),pK=({className:e,children:t,isMulti:r})=>C.jsx("div",{className:me(H7({isMulti:r}),e),children:t}),ru=O.forwardRef(({isHidden:e,inputClassName:t,...r},n)=>{const{size:i,color:o}=_r();return e?C.jsx("input",{ref:n,type:"text",style:{position:"absolute",top:0,left:0,opacity:0,width:"100%",height:"100%",pointerEvents:"none"},tabIndex:-1,...r}):C.jsx("input",{ref:n,type:"text",className:me(V7({size:i,color:o}),t),...r})}),hK=({className:e,children:t})=>{const{size:r,color:n}=_r();return C.jsx("div",{className:me(W7({size:r,color:n}),e),children:t})},vK=({className:e,children:t,data:r,isDisabled:n})=>{const{size:i,color:o,getOptionLabel:a,formatOptionLabel:s}=_r();return C.jsx("div",{className:me(U7({size:i,color:o,isDisabled:n}),e),children:t||(s?s(r):a(r))})},qL=({className:e,children:t,data:r,isDisabled:n,isFocused:i,onRemove:o})=>{const{size:a,color:s,downshift:c,getOptionLabel:u,formatOptionLabel:d}=_r(),p=()=>{o?o(r):c.removeItem(r)};return C.jsxs("div",{className:me(G7({size:a,color:s,isDisabled:n,isFocused:i}),e),children:[C.jsx("div",{className:K7({size:a}),children:t||(d?d(r):u(r))}),!n&&C.jsx("div",{className:Y7({size:a,color:s,isDisabled:!1}),onClick:p,children:C.jsx(Vu,{className:"w-3 h-3"})})]})},LL=({color:e,className:t,children:r,onClick:n,isDisabled:i,...o})=>{const{size:a,color:s,isDisabled:c,downshift:u}=_r(),d=i??c,p=u.selectedItems.length>0;if(d||!p)return null;const v=h=>{h.stopPropagation(),n?n(h):u.clearSelection()};return C.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||C.jsx(_W,{})})},gK=({className:e,children:t,onClick:r,isDisabled:n,...i})=>{const{size:o,color:a,isDisabled:s,downshift:c}=_r(),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 C.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||C.jsx(Vu,{})})},zL=({color:e,className:t,children:r,onClick:n,isDisabled:i,...o})=>{const{size:a,color:s,isDisabled:c,downshift:u}=_r(),d=i??c,p=u.isOpen,v=h=>{h.stopPropagation(),d||(n?n(h):u.toggleMenu())};return C.jsx("div",{className:me(X7({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||C.jsx(EW,{className:me("transition-transform duration-200",{"rotate-180":p})})})},mK=O.forwardRef(({className:e,children:t,placement:r,...n},i)=>{const{size:o,hasMessage:a,color:s}=_r();return C.jsx("div",{"data-qui":"SelectMenu",ref:i,className:me(Z7({size:o,placement:r,hasMessage:a,color:s}),e),...n,children:t})}),bK=O.forwardRef(({className:e,children:t,maxHeight:r=300,...n},i)=>{const{size:o}=_r();return C.jsx(Uw,{scrollableNodeProps:{ref:i},className:me(J7({size:o}),e),style:{maxHeight:r},...n,children:t})}),mw=({className:e,children:t,data:r,isDisabled:n,isFocused:i,isSelected:o,innerProps:a,...s})=>{const{size:c,color:u,getOptionLabel:d,formatOptionLabel:p}=_r();return C.jsx("div",{"data-qui":"SelectOption",className:me(Q7({size:c,color:u,isDisabled:n,isFocused:i,isSelected:o}),e),...a,...s,children:t||(p?p(r):d(r))})},yK=({className:e,children:t,data:r,label:n})=>{const{size:i}=_r();return C.jsxs("div",{"data-qui":"SelectGroup",className:me(e9({size:i}),e),children:[C.jsx(xK,{children:n||r.label}),t]})},xK=({className:e,children:t})=>{const{size:r,color:n}=_r();return C.jsx("div",{className:me(t9({size:r,color:n}),e),children:t})},Ap=({className:e,children:t,inputValue:r})=>{const{size:n}=_r();return C.jsx("div",{className:me(n9({size:n}),e),children:t||`No options found${r?` for "${r}"`:""}`})},wK=({isOpen:e,usePortal:t,controlRef:r,children:n})=>{const[i,o]=O.useState(null);return O.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(C.jsx("div",{className:"absolute z-50",style:{top:i.top,left:i.left,width:i.width,height:i.height,pointerEvents:"none"},children:C.jsx("div",{className:"relative w-full h-full",children:C.jsx("div",{style:{pointerEvents:"auto"},children:n})})}),document.body):C.jsx(C.Fragment,{children:n}):null},Mp=e=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&"current"in r&&(r.current=t)})},BL=O.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:m,displayFormattedOption:b=!1,renderMultiValue:w,renderOption:y,inputRef:_,controlShouldRenderValue:S=!0,name:E,id:I,onSelectionComplete:N,"aria-label":T,"aria-labelledby":A,"aria-describedby":B,children:L,usePortal:D=!1,...z},P)=>{const{size:K,isInvalid:$,isDisabled:Y,downshift:U,options:Q=[],getOptionLabel:k,getOptionValue:W,isOptionDisabled:J}=_r(),ee=O.useRef(null),j=_||ee,G=O.useRef(null),{isOpen:H,openMenu:q,selectedItem:X,inputValue:ne,highlightedIndex:te,getToggleButtonProps:ue,getMenuProps:re,getInputProps:ge,getItemProps:de,isMulti:xe,isSearchable:se,multipleSelection:le}=U,{getDropdownProps:we}=le,Oe=xe?U.selectedItems??[]:X?[X]:[],Te=Oe.length>0,qe=o&&!Y&&!c,Ue=i&&Te&&!Y&&!c,De=!u&&!c,ot=!Te&&(!se||!ne)||!S,vt={},Et={};Object.entries(z).forEach(([Be,Xe])=>{Be.startsWith("data-")||Be.startsWith("aria-")||Be==="role"?vt[Be]=Xe:Et[Be]=Xe});const We=O.useMemo(()=>Mp([G,P]),[P]),je=re({},{suppressRefError:!0}),Qe=we({preventKeyAction:H}),dt=(ge==null?void 0:ge({ref:j,disabled:Y,required:s,name:E,id:I,"aria-label":T,"aria-labelledby":A,"aria-describedby":B,"aria-invalid":$,onFocus:v,onBlur:h,...Et,...Qe}))??{},{ref:Qt,...Mt}=dt,St=O.useMemo(()=>Mp([Qt,Qe.ref]),[Qt,Qe.ref]),Dt=Be=>Oe.some(Xe=>W(Xe)===W(Be)),lr=Be=>p?Be.filter(Xe=>!Dt(Xe)):Be,bn=Be=>p?Be.map(Xe=>({...Xe,options:lr(Xe.options)})).filter(Xe=>Xe.options.length>0):Be,Or=Be=>{N==null||N(W(Be),Be)},Cr=se?{}:ue({disabled:Y,...Qe,ref:Mp([We,Qe.ref])});return C.jsxs("div",{className:"relative",children:[C.jsxs(fK,{...se?{ref:We}:Cr,...vt,isFocused:H,isDisabled:Y,onClick:Be=>{Be.stopPropagation(),se?q():se||U.toggleMenu()},children:[L||C.jsxs(pK,{isMulti:xe,children:[xe&&S&&Oe.map((Be,Xe)=>w?w({data:Be,index:Xe,isDisabled:Y,onRemove:et=>U.removeItem(et)}):C.jsx(qL,{data:Be,index:Xe,isDisabled:Y},W(Be))),!xe&&Te&&S&&!se&&C.jsx("div",{className:"flex items-center gap-2",children:C.jsx(vK,{data:Oe[0],isDisabled:Y,children:m&&b?m(Oe[0]):k(Oe[0])})}),se&&d==="trigger"?C.jsx(ru,{ref:St,...Mt,placeholder:e}):C.jsxs(C.Fragment,{children:[C.jsx(ru,{ref:St,...Mt,isHidden:!0,value:Oe.map(Be=>W(Be)).join(",")}),ot&&C.jsx(hK,{children:e})]})]}),C.jsxs("div",{className:me("flex items-center size-fit gap-1",{hidden:!Ue&&!De}),children:[qe&&C.jsx(gK,{}),Ue&&C.jsx(LL,{}),De&&C.jsx(zL,{...se?ue({disabled:Y,"aria-label":H?"Close menu":"Open menu"}):{}})]})]}),C.jsx(wK,{isOpen:H,usePortal:D,controlRef:G,children:r&&U.filteredItems.length===0?C.jsx("div",{...je,style:{display:"none"},"aria-hidden":"true"}):C.jsxs(mK,{...je,children:[x&&x(U),se&&d==="menu"&&C.jsx("div",{className:"p-2",children:C.jsx(ru,{ref:St,...Mt,autoFocus:!0,placeholder:e,onClick:Be=>Be.stopPropagation()})}),C.jsx(bK,{children:a?C.jsx("div",{className:r9({size:K}),children:n}):U.filteredItems.length===0?C.jsx(Ap,{inputValue:ne,children:typeof t=="function"?t(ne):t}):Dq(Q)?(()=>{const Be=bn(Q);return Be.length===0?C.jsx(Ap,{inputValue:ne,children:typeof t=="function"?t(ne):t}):Be.map(Xe=>C.jsx(yK,{data:Xe,label:Xe.label,options:Xe.options,children:Xe.options.map(et=>{const yt=W(et),Pt=Oe.some(Ir=>W(Ir)===yt),Ut=U.filteredItems.findIndex(Ir=>W(Ir)===yt),jt=te===Ut,Nt=J(et),qt=de({item:et,index:Ut,onClick:()=>Or(et)});return C.jsx(mw,{...qt,data:et,isDisabled:Nt,isFocused:jt,isSelected:Pt,children:m?m(et):k(et)},yt)})},Xe.label))})():(()=>{const Be=lr(U.filteredItems);return Be.length===0?C.jsx(Ap,{inputValue:ne,children:typeof t=="function"?t(ne):t}):Be.map(Xe=>{const et=W(Xe),yt=Oe.some(qt=>W(qt)===et),Pt=U.filteredItems.findIndex(qt=>W(qt)===et),Ut=te===Pt,jt=J(Xe),Nt=de({item:Xe,index:Pt,onClick:()=>Or(Xe)});return y?C.jsx(O.Fragment,{children:y({...Nt,data:Xe,isDisabled:jt,isFocused:Ut,isSelected:yt})},et):C.jsx(mw,{...Nt,data:Xe,isDisabled:jt,isFocused:Ut,isSelected:yt,children:m?m(Xe):k(Xe)},et)})})()})]})})]})});jL.displayName="Select.Root";ru.displayName="Select.Input";qL.displayName="Select.MultiValue";LL.displayName="Select.ClearIndicator";zL.displayName="Select.DropdownIndicator";mw.displayName="Select.Option";const _K=BL;_K.displayName="Select.Field";const xC={Root:jL,Field:BL};O.createContext(void 0);const EK=({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-body":e&&!t,"text-negative":r&&!e&&!t,"bg-primary text-grey-50":n&&!e&&!t,"text-muted":!e&&!t&&!r,"hover:bg-primary-hover hover:text-tab-active-fg":!t&&!e},i),SK=O.forwardRef(({active:e,disabled:t,error:r,isOpen:n,className:i,children:o,as:a="div",...s},c)=>{const u=EK({active:e,disabled:t,error:r,isOpen:n,className:i});return C.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})});SK.displayName="ListItem";function OK({qodly:e,activeTab:t,forceLogin:r,onTabChange:n,restrictedByDefault:i,onRestrictedByDefaultChange:o,onForceLoginChange:a}){return C.jsx(C.Fragment,{children:C.jsx(dr,{depth:1,className:"relative mb-0 flex h-auto flex-wrap items-center justify-between border-b 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.jsxs(Sp,{defaultValue:t,onTabChange:s=>n(s),children:[C.jsx(Sp.Item,{label:"Roles",value:"roles","data-cy":"roles_btn_navbar"}),C.jsx(Sp.Item,{label:"Privileges",value:"privileges","data-cy":"privileges_btn_navbar"})]}),C.jsxs("div",{className:"flex gap-2 justify-between",children:[C.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[C.jsx(xu,{checked:i||!1,onChange:s=>{o(s)}}),C.jsx("span",{className:"px-1 text-xs",children:"Restrict Access By Default"}),C.jsx(fe.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(xu,{checked:r||!1,onChange:s=>{a(s)}}),C.jsx("span",{className:"px-1 text-xs",children:"Force login"}),C.jsx(fe.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const FL=O.createContext(void 0),CK=({children:e})=>{const[t,r]=O.useState(null);function n(o){r(o)}const i={selectedRole:t,selectRole:n};return C.jsx(FL.Provider,{value:i,children:e})};function Y1(){const e=O.useContext(FL);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var wC=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},_C=typeof window<"u"&&window.document&&window.document.createElement?Ct.useLayoutEffect:Ct.useEffect,Dr="top",fn="bottom",pn="right",jr="left",X1="auto",el=[Dr,fn,pn,jr],sa="start",Ls="end",IK="clippingParents",$L="viewport",Xa="popper",RK="reference",EC=el.reduce(function(e,t){return e.concat([t+"-"+sa,t+"-"+Ls])},[]),HL=[].concat(el,[X1]).reduce(function(e,t){return e.concat([t,t+"-"+sa,t+"-"+Ls])},[]),NK="beforeRead",TK="read",PK="afterRead",kK="beforeMain",AK="main",MK="afterMain",DK="beforeWrite",jK="write",qK="afterWrite",LK=[NK,TK,PK,kK,AK,MK,DK,jK,qK];function Wn(e){return e?(e.nodeName||"").toLowerCase():null}function Xr(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=Xr(e).Element;return e instanceof t||e instanceof Element}function dn(e){var t=Xr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Z1(e){if(typeof ShadowRoot>"u")return!1;var t=Xr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function zK(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];!dn(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 BK(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},{});!dn(i)||!Wn(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const FK={name:"applyStyles",enabled:!0,phase:"write",fn:zK,effect:BK,requires:["computeStyles"]};function $n(e){return e.split("-")[0]}var io=Math.max,Ru=Math.min,la=Math.round;function bw(){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 VL(){return!/^((?!chrome|android).)*safari/i.test(bw())}function ca(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&dn(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)?Xr(e):window,s=a.visualViewport,c=!VL()&&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 J1(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 WL(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Z1(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 Xr(e).getComputedStyle(e)}function $K(e){return["table","td","th"].indexOf(Wn(e))>=0}function qi(e){return((uo(e)?e.ownerDocument:e.document)||window.document).documentElement}function td(e){return Wn(e)==="html"?e:e.assignedSlot||e.parentNode||(Z1(e)?e.host:null)||qi(e)}function SC(e){return!dn(e)||ui(e).position==="fixed"?null:e.offsetParent}function HK(e){var t=/firefox/i.test(bw()),r=/Trident/i.test(bw());if(r&&dn(e)){var n=ui(e);if(n.position==="fixed")return null}var i=td(e);for(Z1(i)&&(i=i.host);dn(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 tl(e){for(var t=Xr(e),r=SC(e);r&&$K(r)&&ui(r).position==="static";)r=SC(r);return r&&(Wn(r)==="html"||Wn(r)==="body"&&ui(r).position==="static")?t:r||HK(e)||t}function Q1(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Rs(e,t,r){return io(e,Ru(t,r))}function VK(e,t,r){var n=Rs(e,t,r);return n>r?r:n}function UL(){return{top:0,right:0,bottom:0,left:0}}function GL(e){return Object.assign({},UL(),e)}function KL(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var WK=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,GL(typeof t!="number"?t:KL(t,el))};function UK(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=Q1(s),u=[jr,pn].indexOf(s)>=0,d=u?"height":"width";if(!(!o||!a)){var p=WK(i.padding,r),v=J1(o),h=c==="y"?Dr:jr,x=c==="y"?fn:pn,m=r.rects.reference[d]+r.rects.reference[c]-a[c]-r.rects.popper[d],b=a[c]-r.rects.reference[c],w=tl(o),y=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,_=m/2-b/2,S=p[h],E=y-v[d]-p[x],I=y/2-v[d]/2+_,N=Rs(S,I,E),T=c;r.modifiersData[n]=(t={},t[T]=N,t.centerOffset=N-I,t)}}function GK(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)||WL(t.elements.popper,i)&&(t.elements.arrow=i))}const KK={name:"arrow",enabled:!0,phase:"main",fn:UK,effect:GK,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ua(e){return e.split("-")[1]}var YK={top:"auto",right:"auto",bottom:"auto",left:"auto"};function XK(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 OC(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,m=x===void 0?0:x,b=typeof d=="function"?d({x:h,y:m}):{x:h,y:m};h=b.x,m=b.y;var w=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),_=jr,S=Dr,E=window;if(u){var I=tl(r),N="clientHeight",T="clientWidth";if(I===Xr(r)&&(I=qi(r),ui(I).position!=="static"&&s==="absolute"&&(N="scrollHeight",T="scrollWidth")),I=I,i===Dr||(i===jr||i===pn)&&o===Ls){S=fn;var A=p&&I===E&&E.visualViewport?E.visualViewport.height:I[N];m-=A-n.height,m*=c?1:-1}if(i===jr||(i===Dr||i===fn)&&o===Ls){_=pn;var B=p&&I===E&&E.visualViewport?E.visualViewport.width:I[T];h-=B-n.width,h*=c?1:-1}}var L=Object.assign({position:s},u&&YK),D=d===!0?XK({x:h,y:m},Xr(r)):{x:h,y:m};if(h=D.x,m=D.y,c){var z;return Object.assign({},L,(z={},z[S]=y?"0":"",z[_]=w?"0":"",z.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",z))}return Object.assign({},L,(t={},t[S]=y?m+"px":"",t[_]=w?h+"px":"",t.transform="",t))}function ZK(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,OC(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,OC(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 JK={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ZK,data:{}};var Rc={passive:!0};function QK(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=Xr(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 eY={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:QK,data:{}};var tY={left:"right",right:"left",bottom:"top",top:"bottom"};function nu(e){return e.replace(/left|right|bottom|top/g,function(t){return tY[t]})}var rY={start:"end",end:"start"};function CC(e){return e.replace(/start|end/g,function(t){return rY[t]})}function e_(e){var t=Xr(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function t_(e){return ca(qi(e)).left+e_(e).scrollLeft}function nY(e,t){var r=Xr(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=VL();(u||!u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+t_(e),y:c}}function iY(e){var t,r=qi(e),n=e_(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+t_(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 r_(e){var t=ui(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function YL(e){return["html","body","#document"].indexOf(Wn(e))>=0?e.ownerDocument.body:dn(e)&&r_(e)?e:YL(td(e))}function Ns(e,t){var r;t===void 0&&(t=[]);var n=YL(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Xr(n),a=i?[o].concat(o.visualViewport||[],r_(n)?n:[]):n,s=t.concat(a);return i?s:s.concat(Ns(td(a)))}function yw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function oY(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 IC(e,t,r){return t===$L?yw(nY(e,r)):uo(t)?oY(t,r):yw(iY(qi(e)))}function aY(e){var t=Ns(td(e)),r=["absolute","fixed"].indexOf(ui(e).position)>=0,n=r&&dn(e)?tl(e):e;return uo(n)?t.filter(function(i){return uo(i)&&WL(i,n)&&Wn(i)!=="body"}):[]}function sY(e,t,r,n){var i=t==="clippingParents"?aY(e):[].concat(t),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(c,u){var d=IC(e,u,n);return c.top=io(d.top,c.top),c.right=Ru(d.right,c.right),c.bottom=Ru(d.bottom,c.bottom),c.left=io(d.left,c.left),c},IC(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 XL(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 Dr:c={x:a,y:t.y-r.height};break;case fn:c={x:a,y:t.y+t.height};break;case pn:c={x:t.x+t.width,y:s};break;case jr:c={x:t.x-r.width,y:s};break;default:c={x:t.x,y:t.y}}var u=i?Q1(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 Ls:c[u]=c[u]+(t[d]/2-r[d]/2);break}}return c}function zs(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?IK:s,u=r.rootBoundary,d=u===void 0?$L:u,p=r.elementContext,v=p===void 0?Xa:p,h=r.altBoundary,x=h===void 0?!1:h,m=r.padding,b=m===void 0?0:m,w=GL(typeof b!="number"?b:KL(b,el)),y=v===Xa?RK:Xa,_=e.rects.popper,S=e.elements[x?y:v],E=sY(uo(S)?S:S.contextElement||qi(e.elements.popper),c,d,a),I=ca(e.elements.reference),N=XL({reference:I,element:_,placement:i}),T=yw(Object.assign({},_,N)),A=v===Xa?T:I,B={top:E.top-A.top+w.top,bottom:A.bottom-E.bottom+w.bottom,left:E.left-A.left+w.left,right:A.right-E.right+w.right},L=e.modifiersData.offset;if(v===Xa&&L){var D=L[i];Object.keys(B).forEach(function(z){var P=[pn,fn].indexOf(z)>=0?1:-1,K=[Dr,fn].indexOf(z)>=0?"y":"x";B[z]+=D[K]*P})}return B}function lY(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?HL:c,d=ua(n),p=d?s?EC:EC.filter(function(x){return ua(x)===d}):el,v=p.filter(function(x){return u.indexOf(x)>=0});v.length===0&&(v=p);var h=v.reduce(function(x,m){return x[m]=zs(e,{placement:m,boundary:i,rootBoundary:o,padding:a})[$n(m)],x},{});return Object.keys(h).sort(function(x,m){return h[x]-h[m]})}function cY(e){if($n(e)===X1)return[];var t=nu(e);return[CC(e),t,CC(t)]}function uY(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,m=r.allowedAutoPlacements,b=t.options.placement,w=$n(b),y=w===b,_=c||(y||!x?[nu(b)]:cY(b)),S=[b].concat(_).reduce(function(j,G){return j.concat($n(G)===X1?lY(t,{placement:G,boundary:d,rootBoundary:p,padding:u,flipVariations:x,allowedAutoPlacements:m}):G)},[]),E=t.rects.reference,I=t.rects.popper,N=new Map,T=!0,A=S[0],B=0;B<S.length;B++){var L=S[B],D=$n(L),z=ua(L)===sa,P=[Dr,fn].indexOf(D)>=0,K=P?"width":"height",$=zs(t,{placement:L,boundary:d,rootBoundary:p,altBoundary:v,padding:u}),Y=P?z?pn:jr:z?fn:Dr;E[K]>I[K]&&(Y=nu(Y));var U=nu(Y),Q=[];if(o&&Q.push($[D]<=0),s&&Q.push($[Y]<=0,$[U]<=0),Q.every(function(j){return j})){A=L,T=!1;break}N.set(L,Q)}if(T)for(var k=x?3:1,W=function(G){var H=S.find(function(q){var X=N.get(q);if(X)return X.slice(0,G).every(function(ne){return ne})});if(H)return A=H,"break"},J=k;J>0;J--){var ee=W(J);if(ee==="break")break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}const dY={name:"flip",enabled:!0,phase:"main",fn:uY,requiresIfExists:["offset"],data:{_skip:!1}};function RC(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 NC(e){return[Dr,pn,fn,jr].some(function(t){return e[t]>=0})}function fY(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=zs(t,{elementContext:"reference"}),s=zs(t,{altBoundary:!0}),c=RC(a,n),u=RC(s,i,o),d=NC(c),p=NC(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 pY={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:fY};function hY(e,t,r){var n=$n(e),i=[jr,Dr].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,[jr,pn].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function vY(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=HL.reduce(function(d,p){return d[p]=hY(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 gY={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:vY};function mY(e){var t=e.state,r=e.name;t.modifiersData[r]=XL({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const bY={name:"popperOffsets",enabled:!0,phase:"read",fn:mY,data:{}};function yY(e){return e==="x"?"y":"x"}function xY(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,m=x===void 0?0:x,b=zs(t,{boundary:c,rootBoundary:u,padding:p,altBoundary:d}),w=$n(t.placement),y=ua(t.placement),_=!y,S=Q1(w),E=yY(S),I=t.modifiersData.popperOffsets,N=t.rects.reference,T=t.rects.popper,A=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,B=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(I){if(o){var z,P=S==="y"?Dr:jr,K=S==="y"?fn:pn,$=S==="y"?"height":"width",Y=I[S],U=Y+b[P],Q=Y-b[K],k=h?-T[$]/2:0,W=y===sa?N[$]:T[$],J=y===sa?-T[$]:-N[$],ee=t.elements.arrow,j=h&&ee?J1(ee):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:UL(),H=G[P],q=G[K],X=Rs(0,N[$],j[$]),ne=_?N[$]/2-k-X-H-B.mainAxis:W-X-H-B.mainAxis,te=_?-N[$]/2+k+X+q+B.mainAxis:J+X+q+B.mainAxis,ue=t.elements.arrow&&tl(t.elements.arrow),re=ue?S==="y"?ue.clientTop||0:ue.clientLeft||0:0,ge=(z=L==null?void 0:L[S])!=null?z:0,de=Y+ne-ge-re,xe=Y+te-ge,se=Rs(h?Ru(U,de):U,Y,h?io(Q,xe):Q);I[S]=se,D[S]=se-Y}if(s){var le,we=S==="x"?Dr:jr,Oe=S==="x"?fn:pn,Te=I[E],qe=E==="y"?"height":"width",Ue=Te+b[we],De=Te-b[Oe],ot=[Dr,jr].indexOf(w)!==-1,vt=(le=L==null?void 0:L[E])!=null?le:0,Et=ot?Ue:Te-N[qe]-T[qe]-vt+B.altAxis,We=ot?Te+N[qe]+T[qe]-vt-B.altAxis:De,je=h&&ot?VK(Et,Te,We):Rs(h?Et:Ue,Te,h?We:De);I[E]=je,D[E]=je-Te}t.modifiersData[n]=D}}const wY={name:"preventOverflow",enabled:!0,phase:"main",fn:xY,requiresIfExists:["offset"]};function _Y(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function EY(e){return e===Xr(e)||!dn(e)?e_(e):_Y(e)}function SY(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 OY(e,t,r){r===void 0&&(r=!1);var n=dn(t),i=dn(t)&&SY(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"||r_(o))&&(s=EY(t)),dn(t)?(c=ca(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=t_(o))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function CY(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 IY(e){var t=CY(e);return LK.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function RY(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function NY(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 TC={placement:"bottom",modifiers:[],strategy:"absolute"};function PC(){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 TY(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?TC:i;return function(s,c,u){u===void 0&&(u=o);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},TC,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;m(),d.options=Object.assign({},o,d.options,y),d.scrollParents={reference:uo(s)?Ns(s):s.contextElement?Ns(s.contextElement):[],popper:Ns(c)};var _=IY(NY([].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(PC(y,_)){d.rects={reference:OY(y,tl(_),d.options.strategy==="fixed"),popper:J1(_)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(B){return d.modifiersData[B.name]=Object.assign({},B.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,A=E.name;typeof I=="function"&&(d=I({state:d,options:T,name:A,instance:h})||d)}}}},update:RY(function(){return new Promise(function(b){h.forceUpdate(),b(d)})}),destroy:function(){m(),v=!0}};if(!PC(s,c))return h;h.setOptions(u).then(function(b){!v&&u.onFirstUpdate&&u.onFirstUpdate(b)});function x(){d.orderedModifiers.forEach(function(b){var w=b.name,y=b.options,_=y===void 0?{}:y,S=b.effect;if(typeof S=="function"){var E=S({state:d,name:w,instance:h,options:_}),I=function(){};p.push(E||I)}})}function m(){p.forEach(function(b){return b()}),p=[]}return h}}var PY=[eY,bY,JK,FK,gY,dY,wY,KK,pY],kY=TY({defaultModifiers:PY}),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 Dp,kC;function AY(){if(kC)return Dp;kC=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 Dp=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}},Dp}var MY=AY();const DY=Li(MY);var jY=[],rd=function(t,r,n){n===void 0&&(n={});var i=Ct.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||jY},a=Ct.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],c=a[1],u=Ct.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(h){var x=h.state,m=Object.keys(x.elements);xW.flushSync(function(){c({styles:wC(m.map(function(b){return[b,x.styles[b]||{}]})),attributes:wC(m.map(function(b){return[b,x.attributes[b]]}))})})},requires:["computeStyles"]}},[]),d=Ct.useMemo(function(){var v={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[u,{name:"applyStyles",enabled:!1}])};return DY(i.current,v)?i.current||v:(i.current=v,v)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,u]),p=Ct.useRef();return _C(function(){p.current&&p.current.setOptions(d)},[d]),_C(function(){if(!(t==null||r==null)){var v=n.createPopper||kY,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 ZL=({tab:e})=>C.jsx(dr,{depth:1,className:"flex flex-1 items-center justify-center border-l-[0.5px]",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-inactive-text",children:[C.jsx(_e.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 n_(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 jp,AC;function qY(){if(AC)return jp;AC=1;function e(){this.__data__=[],this.size=0}return jp=e,jp}var qp,MC;function wa(){if(MC)return qp;MC=1;function e(t,r){return t===r||t!==t&&r!==r}return qp=e,qp}var Lp,DC;function nd(){if(DC)return Lp;DC=1;var e=wa();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Lp=t,Lp}var zp,jC;function LY(){if(jC)return zp;jC=1;var e=nd(),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 zp=n,zp}var Bp,qC;function zY(){if(qC)return Bp;qC=1;var e=nd();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return Bp=t,Bp}var Fp,LC;function BY(){if(LC)return Fp;LC=1;var e=nd();function t(r){return e(this.__data__,r)>-1}return Fp=t,Fp}var $p,zC;function FY(){if(zC)return $p;zC=1;var e=nd();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 $p=t,$p}var Hp,BC;function id(){if(BC)return Hp;BC=1;var e=qY(),t=LY(),r=zY(),n=BY(),i=FY();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,Hp=o,Hp}var Vp,FC;function $Y(){if(FC)return Vp;FC=1;var e=id();function t(){this.__data__=new e,this.size=0}return Vp=t,Vp}var Wp,$C;function HY(){if($C)return Wp;$C=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Wp=e,Wp}var Up,HC;function VY(){if(HC)return Up;HC=1;function e(t){return this.__data__.get(t)}return Up=e,Up}var Gp,VC;function WY(){if(VC)return Gp;VC=1;function e(t){return this.__data__.has(t)}return Gp=e,Gp}var Kp,WC;function JL(){if(WC)return Kp;WC=1;var e=typeof At=="object"&&At&&At.Object===Object&&At;return Kp=e,Kp}var Yp,UC;function Pn(){if(UC)return Yp;UC=1;var e=JL(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Yp=r,Yp}var Xp,GC;function _a(){if(GC)return Xp;GC=1;var e=Pn(),t=e.Symbol;return Xp=t,Xp}var Zp,KC;function UY(){if(KC)return Zp;KC=1;var e=_a(),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 Zp=o,Zp}var Jp,YC;function GY(){if(YC)return Jp;YC=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Jp=r,Jp}var Qp,XC;function ho(){if(XC)return Qp;XC=1;var e=_a(),t=UY(),r=GY(),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 Qp=a,Qp}var eh,ZC;function hn(){if(ZC)return eh;ZC=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return eh=e,eh}var th,JC;function rl(){if(JC)return th;JC=1;var e=ho(),t=hn(),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 th=a,th}var rh,QC;function KY(){if(QC)return rh;QC=1;var e=Pn(),t=e["__core-js_shared__"];return rh=t,rh}var nh,eI;function YY(){if(eI)return nh;eI=1;var e=KY(),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 nh=r,nh}var ih,tI;function QL(){if(tI)return ih;tI=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 ih=r,ih}var oh,rI;function XY(){if(rI)return oh;rI=1;var e=rl(),t=YY(),r=hn(),n=QL(),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 oh=p,oh}var ah,nI;function ZY(){if(nI)return ah;nI=1;function e(t,r){return t==null?void 0:t[r]}return ah=e,ah}var sh,iI;function vo(){if(iI)return sh;iI=1;var e=XY(),t=ZY();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return sh=r,sh}var lh,oI;function i_(){if(oI)return lh;oI=1;var e=vo(),t=Pn(),r=e(t,"Map");return lh=r,lh}var ch,aI;function od(){if(aI)return ch;aI=1;var e=vo(),t=e(Object,"create");return ch=t,ch}var uh,sI;function JY(){if(sI)return uh;sI=1;var e=od();function t(){this.__data__=e?e(null):{},this.size=0}return uh=t,uh}var dh,lI;function QY(){if(lI)return dh;lI=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return dh=e,dh}var fh,cI;function eX(){if(cI)return fh;cI=1;var e=od(),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 fh=i,fh}var ph,uI;function tX(){if(uI)return ph;uI=1;var e=od(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return ph=n,ph}var hh,dI;function rX(){if(dI)return hh;dI=1;var e=od(),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 hh=r,hh}var vh,fI;function nX(){if(fI)return vh;fI=1;var e=JY(),t=QY(),r=eX(),n=tX(),i=rX();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,vh=o,vh}var gh,pI;function iX(){if(pI)return gh;pI=1;var e=nX(),t=id(),r=i_();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return gh=n,gh}var mh,hI;function oX(){if(hI)return mh;hI=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return mh=e,mh}var bh,vI;function ad(){if(vI)return bh;vI=1;var e=oX();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return bh=t,bh}var yh,gI;function aX(){if(gI)return yh;gI=1;var e=ad();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return yh=t,yh}var xh,mI;function sX(){if(mI)return xh;mI=1;var e=ad();function t(r){return e(this,r).get(r)}return xh=t,xh}var wh,bI;function lX(){if(bI)return wh;bI=1;var e=ad();function t(r){return e(this,r).has(r)}return wh=t,wh}var _h,yI;function cX(){if(yI)return _h;yI=1;var e=ad();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 _h=t,_h}var Eh,xI;function o_(){if(xI)return Eh;xI=1;var e=iX(),t=aX(),r=sX(),n=lX(),i=cX();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,Eh=o,Eh}var Sh,wI;function uX(){if(wI)return Sh;wI=1;var e=id(),t=i_(),r=o_(),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 Sh=i,Sh}var Oh,_I;function sd(){if(_I)return Oh;_I=1;var e=id(),t=$Y(),r=HY(),n=VY(),i=WY(),o=uX();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,Oh=a,Oh}var Ch,EI;function a_(){if(EI)return Ch;EI=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 Ch=e,Ch}var Ih,SI;function e5(){if(SI)return Ih;SI=1;var e=vo(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Ih=t,Ih}var Rh,OI;function ld(){if(OI)return Rh;OI=1;var e=e5();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Rh=t,Rh}var Nh,CI;function cd(){if(CI)return Nh;CI=1;var e=ld(),t=wa(),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 Nh=i,Nh}var Th,II;function nl(){if(II)return Th;II=1;var e=cd(),t=ld();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 Th=r,Th}var Ph,RI;function dX(){if(RI)return Ph;RI=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Ph=e,Ph}var kh,NI;function Un(){if(NI)return kh;NI=1;function e(t){return t!=null&&typeof t=="object"}return kh=e,kh}var Ah,TI;function fX(){if(TI)return Ah;TI=1;var e=ho(),t=Un(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Ah=n,Ah}var Mh,PI;function il(){if(PI)return Mh;PI=1;var e=fX(),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 Dh,kI;function Vt(){if(kI)return Dh;kI=1;var e=Array.isArray;return Dh=e,Dh}var ms={exports:{}},jh,AI;function pX(){if(AI)return jh;AI=1;function e(){return!1}return jh=e,jh}ms.exports;var MI;function Ea(){return MI||(MI=1,(function(e,t){var r=Pn(),n=pX(),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})(ms,ms.exports)),ms.exports}var qh,DI;function ud(){if(DI)return qh;DI=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 qh=r,qh}var Lh,jI;function s_(){if(jI)return Lh;jI=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Lh=t,Lh}var zh,qI;function hX(){if(qI)return zh;qI=1;var e=ho(),t=s_(),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]",m="[object WeakMap]",b="[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]",A="[object Uint16Array]",B="[object Uint32Array]",L={};L[y]=L[_]=L[S]=L[E]=L[I]=L[N]=L[T]=L[A]=L[B]=!0,L[n]=L[i]=L[b]=L[o]=L[w]=L[a]=L[s]=L[c]=L[u]=L[d]=L[p]=L[v]=L[h]=L[x]=L[m]=!1;function D(z){return r(z)&&t(z.length)&&!!L[e(z)]}return zh=D,zh}var Bh,LI;function dd(){if(LI)return Bh;LI=1;function e(t){return function(r){return t(r)}}return Bh=e,Bh}var bs={exports:{}};bs.exports;var zI;function l_(){return zI||(zI=1,(function(e,t){var r=JL(),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})(bs,bs.exports)),bs.exports}var Fh,BI;function ol(){if(BI)return Fh;BI=1;var e=hX(),t=dd(),r=l_(),n=r&&r.isTypedArray,i=n?t(n):e;return Fh=i,Fh}var $h,FI;function t5(){if(FI)return $h;FI=1;var e=dX(),t=il(),r=Vt(),n=Ea(),i=ud(),o=ol(),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),m=p||v||h||x,b=m?e(u.length,String):[],w=b.length;for(var y in u)(d||s.call(u,y))&&!(m&&(y=="length"||h&&(y=="offset"||y=="parent")||x&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||i(y,w)))&&b.push(y);return b}return $h=c,$h}var Hh,$I;function fd(){if($I)return Hh;$I=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return Hh=t,Hh}var Vh,HI;function r5(){if(HI)return Vh;HI=1;function e(t,r){return function(n){return t(r(n))}}return Vh=e,Vh}var Wh,VI;function vX(){if(VI)return Wh;VI=1;var e=r5(),t=e(Object.keys,Object);return Wh=t,Wh}var Uh,WI;function c_(){if(WI)return Uh;WI=1;var e=fd(),t=vX(),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 Uh=i,Uh}var Gh,UI;function fi(){if(UI)return Gh;UI=1;var e=rl(),t=s_();function r(n){return n!=null&&t(n.length)&&!e(n)}return Gh=r,Gh}var Kh,GI;function zi(){if(GI)return Kh;GI=1;var e=t5(),t=c_(),r=fi();function n(i){return r(i)?e(i):t(i)}return Kh=n,Kh}var Yh,KI;function gX(){if(KI)return Yh;KI=1;var e=nl(),t=zi();function r(n,i){return n&&e(i,t(i),n)}return Yh=r,Yh}var Xh,YI;function mX(){if(YI)return Xh;YI=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return Xh=e,Xh}var Zh,XI;function bX(){if(XI)return Zh;XI=1;var e=hn(),t=fd(),r=mX(),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 Zh=o,Zh}var Jh,ZI;function go(){if(ZI)return Jh;ZI=1;var e=t5(),t=bX(),r=fi();function n(i){return r(i)?e(i,!0):t(i)}return Jh=n,Jh}var Qh,JI;function yX(){if(JI)return Qh;JI=1;var e=nl(),t=go();function r(n,i){return n&&e(i,t(i),n)}return Qh=r,Qh}var ys={exports:{}};ys.exports;var QI;function n5(){return QI||(QI=1,(function(e,t){var r=Pn(),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})(ys,ys.exports)),ys.exports}var ev,eR;function i5(){if(eR)return ev;eR=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 ev=e,ev}var tv,tR;function o5(){if(tR)return tv;tR=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 tv=e,tv}var rv,rR;function a5(){if(rR)return rv;rR=1;function e(){return[]}return rv=e,rv}var nv,nR;function u_(){if(nR)return nv;nR=1;var e=o5(),t=a5(),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 nv=o,nv}var iv,iR;function xX(){if(iR)return iv;iR=1;var e=nl(),t=u_();function r(n,i){return e(n,t(n),i)}return iv=r,iv}var ov,oR;function d_(){if(oR)return ov;oR=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 ov=e,ov}var av,aR;function pd(){if(aR)return av;aR=1;var e=r5(),t=e(Object.getPrototypeOf,Object);return av=t,av}var sv,sR;function s5(){if(sR)return sv;sR=1;var e=d_(),t=pd(),r=u_(),n=a5(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var s=[];a;)e(s,r(a)),a=t(a);return s}:n;return sv=o,sv}var lv,lR;function wX(){if(lR)return lv;lR=1;var e=nl(),t=s5();function r(n,i){return e(n,t(n),i)}return lv=r,lv}var cv,cR;function l5(){if(cR)return cv;cR=1;var e=d_(),t=Vt();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return cv=r,cv}var uv,uR;function c5(){if(uR)return uv;uR=1;var e=l5(),t=u_(),r=zi();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=l5(),t=s5(),r=go();function n(i){return e(i,r,t)}return dv=n,dv}var fv,fR;function EX(){if(fR)return fv;fR=1;var e=vo(),t=Pn(),r=e(t,"DataView");return fv=r,fv}var pv,pR;function SX(){if(pR)return pv;pR=1;var e=vo(),t=Pn(),r=e(t,"Promise");return pv=r,pv}var hv,hR;function u5(){if(hR)return hv;hR=1;var e=vo(),t=Pn(),r=e(t,"Set");return hv=r,hv}var vv,vR;function OX(){if(vR)return vv;vR=1;var e=vo(),t=Pn(),r=e(t,"WeakMap");return vv=r,vv}var gv,gR;function Sa(){if(gR)return gv;gR=1;var e=EX(),t=i_(),r=SX(),n=u5(),i=OX(),o=ho(),a=QL(),s="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",p="[object WeakMap]",v="[object DataView]",h=a(e),x=a(t),m=a(r),b=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 m:return u;case b:return d;case w:return p}return S}),gv=y,gv}var mv,mR;function CX(){if(mR)return mv;mR=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 mv=r,mv}var bv,bR;function d5(){if(bR)return bv;bR=1;var e=Pn(),t=e.Uint8Array;return bv=t,bv}var yv,yR;function f_(){if(yR)return yv;yR=1;var e=d5();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return yv=t,yv}var xv,xR;function IX(){if(xR)return xv;xR=1;var e=f_();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return xv=t,xv}var wv,wR;function RX(){if(wR)return wv;wR=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return wv=t,wv}var _v,_R;function NX(){if(_R)return _v;_R=1;var e=_a(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return _v=n,_v}var Ev,ER;function f5(){if(ER)return Ev;ER=1;var e=f_();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return Ev=t,Ev}var Sv,SR;function TX(){if(SR)return Sv;SR=1;var e=f_(),t=IX(),r=RX(),n=NX(),i=f5(),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]",m="[object Float32Array]",b="[object Float64Array]",w="[object Int8Array]",y="[object Int16Array]",_="[object Int32Array]",S="[object Uint8Array]",E="[object Uint8ClampedArray]",I="[object Uint16Array]",N="[object Uint32Array]";function T(A,B,L){var D=A.constructor;switch(B){case h:return e(A);case o:case a:return new D(+A);case x:return t(A,L);case m:case b:case w:case y:case _:case S:case E:case I:case N:return i(A,L);case s:return new D;case c:case p:return new D(A);case u:return r(A);case d:return new D;case v:return n(A)}}return Sv=T,Sv}var Ov,OR;function p5(){if(OR)return Ov;OR=1;var e=hn(),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 Ov=r,Ov}var Cv,CR;function h5(){if(CR)return Cv;CR=1;var e=p5(),t=pd(),r=fd();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Cv=n,Cv}var Iv,IR;function PX(){if(IR)return Iv;IR=1;var e=Sa(),t=Un(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Iv=n,Iv}var Rv,RR;function kX(){if(RR)return Rv;RR=1;var e=PX(),t=dd(),r=l_(),n=r&&r.isMap,i=n?t(n):e;return Rv=i,Rv}var Nv,NR;function AX(){if(NR)return Nv;NR=1;var e=Sa(),t=Un(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return Nv=n,Nv}var Tv,TR;function MX(){if(TR)return Tv;TR=1;var e=AX(),t=dd(),r=l_(),n=r&&r.isSet,i=n?t(n):e;return Tv=i,Tv}var Pv,PR;function v5(){if(PR)return Pv;PR=1;var e=sd(),t=a_(),r=cd(),n=gX(),i=yX(),o=n5(),a=i5(),s=xX(),c=wX(),u=c5(),d=_X(),p=Sa(),v=CX(),h=TX(),x=h5(),m=Vt(),b=Ea(),w=kX(),y=hn(),_=MX(),S=zi(),E=go(),I=1,N=2,T=4,A="[object Arguments]",B="[object Array]",L="[object Boolean]",D="[object Date]",z="[object Error]",P="[object Function]",K="[object GeneratorFunction]",$="[object Map]",Y="[object Number]",U="[object Object]",Q="[object RegExp]",k="[object Set]",W="[object String]",J="[object Symbol]",ee="[object WeakMap]",j="[object ArrayBuffer]",G="[object DataView]",H="[object Float32Array]",q="[object Float64Array]",X="[object Int8Array]",ne="[object Int16Array]",te="[object Int32Array]",ue="[object Uint8Array]",re="[object Uint8ClampedArray]",ge="[object Uint16Array]",de="[object Uint32Array]",xe={};xe[A]=xe[B]=xe[j]=xe[G]=xe[L]=xe[D]=xe[H]=xe[q]=xe[X]=xe[ne]=xe[te]=xe[$]=xe[Y]=xe[U]=xe[Q]=xe[k]=xe[W]=xe[J]=xe[ue]=xe[re]=xe[ge]=xe[de]=!0,xe[z]=xe[P]=xe[ee]=!1;function se(le,we,Oe,Te,qe,Ue){var De,ot=we&I,vt=we&N,Et=we&T;if(Oe&&(De=qe?Oe(le,Te,qe,Ue):Oe(le)),De!==void 0)return De;if(!y(le))return le;var We=m(le);if(We){if(De=v(le),!ot)return a(le,De)}else{var je=p(le),Qe=je==P||je==K;if(b(le))return o(le,ot);if(je==U||je==A||Qe&&!qe){if(De=vt||Qe?{}:x(le),!ot)return vt?c(le,i(De,le)):s(le,n(De,le))}else{if(!xe[je])return qe?le:{};De=h(le,je,ot)}}Ue||(Ue=new e);var dt=Ue.get(le);if(dt)return dt;Ue.set(le,De),_(le)?le.forEach(function(St){De.add(se(St,we,Oe,St,le,Ue))}):w(le)&&le.forEach(function(St,Dt){De.set(Dt,se(St,we,Oe,Dt,le,Ue))});var Qt=Et?vt?d:u:vt?E:S,Mt=We?void 0:Qt(le);return t(Mt||le,function(St,Dt){Mt&&(Dt=St,St=le[Dt]),r(De,Dt,se(St,we,Oe,Dt,le,Ue))}),De}return Pv=se,Pv}var kv,kR;function DX(){if(kR)return kv;kR=1;var e=v5(),t=4;function r(n){return e(n,t)}return kv=r,kv}var Av,AR;function p_(){if(AR)return Av;AR=1;function e(t){return function(){return t}}return Av=e,Av}var Mv,MR;function jX(){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 Dv,DR;function h_(){if(DR)return Dv;DR=1;var e=jX(),t=e();return Dv=t,Dv}var jv,jR;function v_(){if(jR)return jv;jR=1;var e=h_(),t=zi();function r(n,i){return n&&e(n,i,t)}return jv=r,jv}var qv,qR;function qX(){if(qR)return qv;qR=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 qv=t,qv}var Lv,LR;function hd(){if(LR)return Lv;LR=1;var e=v_(),t=qX(),r=t(e);return Lv=r,Lv}var zv,zR;function mo(){if(zR)return zv;zR=1;function e(t){return t}return zv=e,zv}var Bv,BR;function g5(){if(BR)return Bv;BR=1;var e=mo();function t(r){return typeof r=="function"?r:e}return Bv=t,Bv}var Fv,FR;function m5(){if(FR)return Fv;FR=1;var e=a_(),t=hd(),r=g5(),n=Vt();function i(o,a){var s=n(o)?e:t;return s(o,r(a))}return Fv=i,Fv}var $v,$R;function b5(){return $R||($R=1,$v=m5()),$v}var Hv,HR;function LX(){if(HR)return Hv;HR=1;var e=hd();function t(r,n){var i=[];return e(r,function(o,a,s){n(o,a,s)&&i.push(o)}),i}return Hv=t,Hv}var Vv,VR;function zX(){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 Wv,WR;function BX(){if(WR)return Wv;WR=1;function e(t){return this.__data__.has(t)}return Wv=e,Wv}var Uv,UR;function y5(){if(UR)return Uv;UR=1;var e=o_(),t=zX(),r=BX();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,Uv=n,Uv}var Gv,GR;function FX(){if(GR)return Gv;GR=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 Gv=e,Gv}var Kv,KR;function x5(){if(KR)return Kv;KR=1;function e(t,r){return t.has(r)}return Kv=e,Kv}var Yv,YR;function w5(){if(YR)return Yv;YR=1;var e=y5(),t=FX(),r=x5(),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 m=p.get(a),b=p.get(s);if(m&&b)return m==s&&b==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 Yv=o,Yv}var Xv,XR;function $X(){if(XR)return Xv;XR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return Xv=e,Xv}var Zv,ZR;function g_(){if(ZR)return Zv;ZR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return Zv=e,Zv}var Jv,JR;function HX(){if(JR)return Jv;JR=1;var e=_a(),t=d5(),r=wa(),n=w5(),i=$X(),o=g_(),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]",m="[object String]",b="[object Symbol]",w="[object ArrayBuffer]",y="[object DataView]",_=e?e.prototype:void 0,S=_?_.valueOf:void 0;function E(I,N,T,A,B,L,D){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||!L(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 m:return I==N+"";case p:var z=i;case x:var P=A&a;if(z||(z=o),I.size!=N.size&&!P)return!1;var K=D.get(I);if(K)return K==N;A|=s,D.set(I,N);var $=n(z(I),z(N),A,B,L,D);return D.delete(I),$;case b:if(S)return S.call(I)==S.call(N)}return!1}return Jv=E,Jv}var Qv,QR;function VX(){if(QR)return Qv;QR=1;var e=c5(),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),m=x.length;if(h!=m&&!p)return!1;for(var b=h;b--;){var w=v[b];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;++b<h;){w=v[b];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 A=o.constructor,B=a.constructor;A!=B&&"constructor"in o&&"constructor"in a&&!(typeof A=="function"&&A instanceof A&&typeof B=="function"&&B instanceof B)&&(S=!1)}return d.delete(o),d.delete(a),S}return Qv=i,Qv}var eg,eN;function WX(){if(eN)return eg;eN=1;var e=sd(),t=w5(),r=HX(),n=VX(),i=Sa(),o=Vt(),a=Ea(),s=ol(),c=1,u="[object Arguments]",d="[object Array]",p="[object Object]",v=Object.prototype,h=v.hasOwnProperty;function x(m,b,w,y,_,S){var E=o(m),I=o(b),N=E?d:i(m),T=I?d:i(b);N=N==u?p:N,T=T==u?p:T;var A=N==p,B=T==p,L=N==T;if(L&&a(m)){if(!a(b))return!1;E=!0,A=!1}if(L&&!A)return S||(S=new e),E||s(m)?t(m,b,w,y,_,S):r(m,b,N,w,y,_,S);if(!(w&c)){var D=A&&h.call(m,"__wrapped__"),z=B&&h.call(b,"__wrapped__");if(D||z){var P=D?m.value():m,K=z?b.value():b;return S||(S=new e),_(P,K,w,y,S)}}return L?(S||(S=new e),n(m,b,w,y,_,S)):!1}return eg=x,eg}var tg,tN;function _5(){if(tN)return tg;tN=1;var e=WX(),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 tg=r,tg}var rg,rN;function UX(){if(rN)return rg;rN=1;var e=sd(),t=_5(),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],m=v[1];if(p&&v[2]){if(x===void 0&&!(h in o))return!1}else{var b=new e;if(c)var w=c(x,m,h,o,a,b);if(!(w===void 0?t(m,x,r|n,c,b):w))return!1}}return!0}return rg=i,rg}var ng,nN;function E5(){if(nN)return ng;nN=1;var e=hn();function t(r){return r===r&&!e(r)}return ng=t,ng}var ig,iN;function GX(){if(iN)return ig;iN=1;var e=E5(),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 ig=r,ig}var og,oN;function S5(){if(oN)return og;oN=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return og=e,og}var ag,aN;function KX(){if(aN)return ag;aN=1;var e=UX(),t=GX(),r=S5();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 ag=n,ag}var sg,sN;function Oa(){if(sN)return sg;sN=1;var e=ho(),t=Un(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return sg=n,sg}var lg,lN;function m_(){if(lN)return lg;lN=1;var e=Vt(),t=Oa(),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 lg=i,lg}var cg,cN;function YX(){if(cN)return cg;cN=1;var e=o_(),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,cg=r,cg}var ug,uN;function XX(){if(uN)return ug;uN=1;var e=YX(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return ug=r,ug}var dg,dN;function ZX(){if(dN)return dg;dN=1;var e=XX(),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 dg=n,dg}var fg,fN;function vd(){if(fN)return fg;fN=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 fg=e,fg}var pg,pN;function JX(){if(pN)return pg;pN=1;var e=_a(),t=vd(),r=Vt(),n=Oa(),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 pg=a,pg}var hg,hN;function O5(){if(hN)return hg;hN=1;var e=JX();function t(r){return r==null?"":e(r)}return hg=t,hg}var vg,vN;function gd(){if(vN)return vg;vN=1;var e=Vt(),t=m_(),r=ZX(),n=O5();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return vg=i,vg}var gg,gN;function al(){if(gN)return gg;gN=1;var e=Oa();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return gg=t,gg}var mg,mN;function md(){if(mN)return mg;mN=1;var e=gd(),t=al();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 mg=r,mg}var bg,bN;function QX(){if(bN)return bg;bN=1;var e=md();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return bg=t,bg}var yg,yN;function eZ(){if(yN)return yg;yN=1;function e(t,r){return t!=null&&r in Object(t)}return yg=e,yg}var xg,xN;function C5(){if(xN)return xg;xN=1;var e=gd(),t=il(),r=Vt(),n=ud(),i=s_(),o=al();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 xg=a,xg}var wg,wN;function I5(){if(wN)return wg;wN=1;var e=eZ(),t=C5();function r(n,i){return n!=null&&t(n,i,e)}return wg=r,wg}var _g,_N;function tZ(){if(_N)return _g;_N=1;var e=_5(),t=QX(),r=I5(),n=m_(),i=E5(),o=S5(),a=al(),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 _g=u,_g}var Eg,EN;function R5(){if(EN)return Eg;EN=1;function e(t){return function(r){return r==null?void 0:r[t]}}return Eg=e,Eg}var Sg,SN;function rZ(){if(SN)return Sg;SN=1;var e=md();function t(r){return function(n){return e(n,r)}}return Sg=t,Sg}var Og,ON;function nZ(){if(ON)return Og;ON=1;var e=R5(),t=rZ(),r=m_(),n=al();function i(o){return r(o)?e(n(o)):t(o)}return Og=i,Og}var Cg,CN;function pi(){if(CN)return Cg;CN=1;var e=KX(),t=tZ(),r=mo(),n=Vt(),i=nZ();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 Cg=o,Cg}var Ig,IN;function N5(){if(IN)return Ig;IN=1;var e=o5(),t=LX(),r=pi(),n=Vt();function i(o,a){var s=n(o)?e:t;return s(o,r(a,3))}return Ig=i,Ig}var Rg,RN;function iZ(){if(RN)return Rg;RN=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return Rg=r,Rg}var Ng,NN;function T5(){if(NN)return Ng;NN=1;var e=iZ(),t=C5();function r(n,i){return n!=null&&t(n,i,e)}return Ng=r,Ng}var Tg,TN;function oZ(){if(TN)return Tg;TN=1;var e=c_(),t=Sa(),r=il(),n=Vt(),i=fi(),o=Ea(),a=fd(),s=ol(),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 m in h)if(p.call(h,m))return!1;return!0}return Tg=v,Tg}var Pg,PN;function P5(){if(PN)return Pg;PN=1;function e(t){return t===void 0}return Pg=e,Pg}var kg,kN;function k5(){if(kN)return kg;kN=1;var e=hd(),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 kg=r,kg}var Ag,AN;function A5(){if(AN)return Ag;AN=1;var e=vd(),t=pi(),r=k5(),n=Vt();function i(o,a){var s=n(o)?e:r;return s(o,t(a,3))}return Ag=i,Ag}var Mg,MN;function aZ(){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 Dg,DN;function sZ(){if(DN)return Dg;DN=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 Dg=e,Dg}var jg,jN;function M5(){if(jN)return jg;jN=1;var e=aZ(),t=hd(),r=pi(),n=sZ(),i=Vt();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 jg=o,jg}var qg,qN;function lZ(){if(qN)return qg;qN=1;var e=ho(),t=Vt(),r=Un(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return qg=i,qg}var Lg,LN;function cZ(){if(LN)return Lg;LN=1;var e=R5(),t=e("length");return Lg=t,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="\\u200d",s=RegExp("["+a+e+i+o+"]");function c(u){return s.test(u)}return zg=c,zg}var Bg,BN;function dZ(){if(BN)return Bg;BN=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+"?",m="["+o+"]?",b="(?:"+h+"(?:"+[d,p,v].join("|")+")"+m+x+")*",w=m+x+b,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 Bg=S,Bg}var Fg,FN;function fZ(){if(FN)return Fg;FN=1;var e=cZ(),t=uZ(),r=dZ();function n(i){return t(i)?r(i):e(i)}return Fg=n,Fg}var $g,$N;function pZ(){if($N)return $g;$N=1;var e=c_(),t=Sa(),r=fi(),n=lZ(),i=fZ(),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 $g=s,$g}var Hg,HN;function hZ(){if(HN)return Hg;HN=1;var e=a_(),t=p5(),r=v_(),n=pi(),i=pd(),o=Vt(),a=Ea(),s=rl(),c=hn(),u=ol();function d(p,v,h){var x=o(p),m=x||a(p)||u(p);if(v=n(v,4),h==null){var b=p&&p.constructor;m?h=x?new b:[]:c(p)?h=s(b)?t(i(p)):{}:h={}}return(m?e:r)(p,function(w,y,_){return v(h,w,y,_)}),h}return Hg=d,Hg}var Vg,VN;function vZ(){if(VN)return Vg;VN=1;var e=_a(),t=il(),r=Vt(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return Vg=i,Vg}var Wg,WN;function b_(){if(WN)return Wg;WN=1;var e=d_(),t=vZ();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 Wg=r,Wg}var Ug,UN;function gZ(){if(UN)return Ug;UN=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 Ug=e,Ug}var Gg,GN;function D5(){if(GN)return Gg;GN=1;var e=gZ(),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 Gg=r,Gg}var Kg,KN;function mZ(){if(KN)return Kg;KN=1;var e=p_(),t=e5(),r=mo(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return Kg=n,Kg}var Yg,YN;function bZ(){if(YN)return Yg;YN=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 Yg=n,Yg}var Xg,XN;function j5(){if(XN)return Xg;XN=1;var e=mZ(),t=bZ(),r=t(e);return Xg=r,Xg}var Zg,ZN;function bd(){if(ZN)return Zg;ZN=1;var e=mo(),t=D5(),r=j5();function n(i,o){return r(t(i,o,e),i+"")}return Zg=n,Zg}var Jg,JN;function q5(){if(JN)return Jg;JN=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 Jg=e,Jg}var Qg,QN;function yZ(){if(QN)return Qg;QN=1;function e(t){return t!==t}return Qg=e,Qg}var em,eT;function xZ(){if(eT)return em;eT=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 em=e,em}var tm,tT;function wZ(){if(tT)return tm;tT=1;var e=q5(),t=yZ(),r=xZ();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return tm=n,tm}var rm,rT;function _Z(){if(rT)return rm;rT=1;var e=wZ();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return rm=t,rm}var nm,nT;function EZ(){if(nT)return nm;nT=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 nm=e,nm}var im,iT;function SZ(){if(iT)return im;iT=1;function e(){}return im=e,im}var om,oT;function OZ(){if(oT)return om;oT=1;var e=u5(),t=SZ(),r=g_(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return om=i,om}var am,aT;function CZ(){if(aT)return am;aT=1;var e=y5(),t=_Z(),r=EZ(),n=x5(),i=OZ(),o=g_(),a=200;function s(c,u,d){var p=-1,v=t,h=c.length,x=!0,m=[],b=m;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,b=new e}else b=u?[]:m;e:for(;++p<h;){var y=c[p],_=u?u(y):y;if(y=d||y!==0?y:0,x&&_===_){for(var S=b.length;S--;)if(b[S]===_)continue e;u&&b.push(_),m.push(y)}else v(b,_,d)||(b!==m&&b.push(_),m.push(y))}return m}return am=s,am}var sm,sT;function L5(){if(sT)return sm;sT=1;var e=fi(),t=Un();function r(n){return t(n)&&e(n)}return sm=r,sm}var lm,lT;function IZ(){if(lT)return lm;lT=1;var e=b_(),t=bd(),r=CZ(),n=L5(),i=t(function(o){return r(e(o,1,n,!0))});return lm=i,lm}var cm,cT;function RZ(){if(cT)return cm;cT=1;var e=vd();function t(r,n){return e(n,function(i){return r[i]})}return cm=t,cm}var um,uT;function z5(){if(uT)return um;uT=1;var e=RZ(),t=zi();function r(n){return n==null?[]:e(n,t(n))}return um=r,um}var dm,dT;function vn(){if(dT)return dm;dT=1;var e;if(typeof n_=="function")try{e={clone:DX(),constant:p_(),each:b5(),filter:N5(),has:T5(),isArray:Vt(),isEmpty:oZ(),isFunction:rl(),isUndefined:P5(),keys:zi(),map:A5(),reduce:M5(),size:pZ(),transform:hZ(),union:IZ(),values:z5()}}catch{}return e||(e=window._),dm=e,dm}var fm,fT;function y_(){if(fT)return fm;fT=1;var e=vn();fm=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(m,b){d(b)&&p.setNode(b,m)}),e.each(this._edgeObjs,function(m){p.hasNode(m.v)&&p.hasNode(m.w)&&p.setEdge(m,v.edge(m))});var h={};function x(m){var b=v.parent(m);return b===void 0||p.hasNode(b)?(h[m]=b,b):b in h?h[b]:x(b)}return this._isCompound&&e.each(p.nodes(),function(m){p.setParent(m,x(m))}),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,m){return h.length>1?v.setEdge(x,m,p):v.setEdge(x,m),m}),this},i.prototype.setEdge=function(){var d,p,v,h,x=!1,m=arguments[0];typeof m=="object"&&m!==null&&"v"in m?(d=m.v,p=m.w,v=m.name,arguments.length===2&&(h=arguments[1],x=!0)):(d=m,p=arguments[1],v=arguments[3],arguments.length>2&&(h=arguments[2],x=!0)),d=""+d,p=""+p,e.isUndefined(v)||(v=""+v);var b=s(this._isDirected,d,p,v);if(e.has(this._edgeLabels,b))return x&&(this._edgeLabels[b]=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[b]=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[b]=w,o(this._preds[p],d),o(this._sucs[d],p),this._in[p][b]=w,this._out[d][b]=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,m=""+v;if(!d&&x>m){var b=x;x=m,m=b}return x+n+m+n+(e.isUndefined(h)?t:h)}function c(d,p,v,h){var x=""+p,m=""+v;if(!d&&x>m){var b=x;x=m,m=b}var w={v:x,w:m};return h&&(w.name=h),w}function u(d,p){return s(d,p.v,p.w,p.name)}return fm}var pm,pT;function NZ(){return pT||(pT=1,pm="2.1.8"),pm}var hm,hT;function TZ(){return hT||(hT=1,hm={Graph:y_(),version:NZ()}),hm}var vm,vT;function PZ(){if(vT)return vm;vT=1;var e=vn(),t=y_();vm={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 vm}var gm,gT;function kZ(){if(gT)return gm;gT=1;var e=vn();gm=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 gm}var mm,mT;function B5(){if(mT)return mm;mT=1;var e=vn();mm=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},mm}var bm,bT;function F5(){if(bT)return bm;bT=1;var e=vn(),t=B5();bm=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 m=x.v!==p?x.v:x.w,b=u[m],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<b.distance&&(b.distance=y,b.predecessor=p,d.decrease(m,y))};for(o.nodes().forEach(function(x){var m=x===a?0:Number.POSITIVE_INFINITY;u[x]={distance:m},d.add(x,m)});d.size()>0&&(p=d.removeMin(),v=u[p],v.distance!==Number.POSITIVE_INFINITY);)c(p).forEach(h);return u}return bm}var ym,yT;function AZ(){if(yT)return ym;yT=1;var e=F5(),t=vn();ym=r;function r(n,i,o){return t.transform(n.nodes(),function(a,s){a[s]=e(n,s,i,o)},{})}return ym}var xm,xT;function $5(){if(xT)return xm;xT=1;var e=vn();xm=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 xm}var wm,wT;function MZ(){if(wT)return wm;wT=1;var e=vn(),t=$5();wm=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 wm}var _m,_T;function DZ(){if(_T)return _m;_T=1;var e=vn();_m=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],m=d[h],b=v[h],w=x.distance+m.distance;w<b.distance&&(b.distance=w,b.predecessor=m.predecessor)})})}),s}return _m}var Em,ET;function H5(){if(ET)return Em;ET=1;var e=vn();Em=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,Em}var Sm,ST;function jZ(){if(ST)return Sm;ST=1;var e=H5();Sm=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return Sm}var Om,OT;function V5(){if(OT)return Om;OT=1;var e=vn();Om=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 Om}var Cm,CT;function qZ(){if(CT)return Cm;CT=1;var e=V5();Cm=t;function t(r,n){return e(r,n,"post")}return Cm}var Im,IT;function LZ(){if(IT)return Im;IT=1;var e=V5();Im=t;function t(r,n){return e(r,n,"pre")}return Im}var Rm,RT;function zZ(){if(RT)return Rm;RT=1;var e=vn(),t=y_(),r=B5();Rm=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 m=o(v);m<x&&(s[h]=u,c.decrease(h,m))}}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 Rm}var Nm,NT;function BZ(){return NT||(NT=1,Nm={components:kZ(),dijkstra:F5(),dijkstraAll:AZ(),findCycles:MZ(),floydWarshall:DZ(),isAcyclic:jZ(),postorder:qZ(),preorder:LZ(),prim:zZ(),tarjan:$5(),topsort:H5()}),Nm}var Tm,TT;function FZ(){if(TT)return Tm;TT=1;var e=TZ();return Tm={Graph:e.Graph,json:PZ(),alg:BZ(),version:e.version},Tm}var Pm,PT;function Tn(){if(PT)return Pm;PT=1;var e;if(typeof n_=="function")try{e=FZ()}catch{}return e||(e=window.graphlib),Pm=e,Pm}var km,kT;function $Z(){if(kT)return km;kT=1;var e=v5(),t=1,r=4;function n(i){return e(i,t|r)}return km=n,km}var Am,AT;function yd(){if(AT)return Am;AT=1;var e=wa(),t=fi(),r=ud(),n=hn();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 Am=i,Am}var Mm,MT;function HZ(){if(MT)return Mm;MT=1;var e=bd(),t=wa(),r=yd(),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,m=h.length;++x<m;){var b=h[x],w=s[b];(w===void 0||t(w,i[b])&&!o.call(s,b))&&(s[b]=v[b])}return s});return Mm=a,Mm}var Dm,DT;function VZ(){if(DT)return Dm;DT=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 Dm=n,Dm}var jm,jT;function WZ(){if(jT)return jm;jT=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return jm=t,jm}var qm,qT;function UZ(){if(qT)return qm;qT=1;var e=WZ(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return qm=r,qm}var Lm,LT;function GZ(){if(LT)return Lm;LT=1;var e=UZ(),t=hn(),r=Oa(),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 Lm=c,Lm}var zm,zT;function W5(){if(zT)return zm;zT=1;var e=GZ(),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 zm=n,zm}var Bm,BT;function KZ(){if(BT)return Bm;BT=1;var e=W5();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return Bm=t,Bm}var Fm,FT;function YZ(){if(FT)return Fm;FT=1;var e=q5(),t=pi(),r=KZ(),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 Fm=i,Fm}var $m,$T;function XZ(){if($T)return $m;$T=1;var e=VZ(),t=YZ(),r=e(t);return $m=r,$m}var Hm,HT;function U5(){if(HT)return Hm;HT=1;var e=b_();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return Hm=t,Hm}var Vm,VT;function ZZ(){if(VT)return Vm;VT=1;var e=h_(),t=g5(),r=go();function n(i,o){return i==null?i:e(i,t(o),r)}return Vm=n,Vm}var Wm,WT;function JZ(){if(WT)return Wm;WT=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return Wm=e,Wm}var Um,UT;function QZ(){if(UT)return Um;UT=1;var e=ld(),t=v_(),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 Um=n,Um}var Gm,GT;function x_(){if(GT)return Gm;GT=1;var e=Oa();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 Gm=t,Gm}var Km,KT;function eJ(){if(KT)return Km;KT=1;function e(t,r){return t>r}return Km=e,Km}var Ym,YT;function tJ(){if(YT)return Ym;YT=1;var e=x_(),t=eJ(),r=mo();function n(i){return i&&i.length?e(i,r,t):void 0}return Ym=n,Ym}var Xm,XT;function G5(){if(XT)return Xm;XT=1;var e=ld(),t=wa();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return Xm=r,Xm}var Zm,ZT;function rJ(){if(ZT)return Zm;ZT=1;var e=ho(),t=pd(),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 Zm=u,Zm}var Jm,JT;function K5(){if(JT)return Jm;JT=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return Jm=e,Jm}var Qm,QT;function nJ(){if(QT)return Qm;QT=1;var e=nl(),t=go();function r(n){return e(n,t(n))}return Qm=r,Qm}var eb,eP;function iJ(){if(eP)return eb;eP=1;var e=G5(),t=n5(),r=f5(),n=i5(),i=h5(),o=il(),a=Vt(),s=L5(),c=Ea(),u=rl(),d=hn(),p=rJ(),v=ol(),h=K5(),x=nJ();function m(b,w,y,_,S,E,I){var N=h(b,y),T=h(w,y),A=I.get(T);if(A){e(b,y,A);return}var B=E?E(N,T,y+"",b,w,I):void 0,L=B===void 0;if(L){var D=a(T),z=!D&&c(T),P=!D&&!z&&v(T);B=T,D||z||P?a(N)?B=N:s(N)?B=n(N):z?(L=!1,B=t(T,!0)):P?(L=!1,B=r(T,!0)):B=[]:p(T)||o(T)?(B=N,o(N)?B=x(N):(!d(N)||u(N))&&(B=i(T))):L=!1}L&&(I.set(T,B),S(B,T,_,E,I),I.delete(T)),e(b,y,B)}return eb=m,eb}var tb,tP;function oJ(){if(tP)return tb;tP=1;var e=sd(),t=G5(),r=h_(),n=iJ(),i=hn(),o=go(),a=K5();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 m=p?p(a(c,x),h,x+"",c,u,v):void 0;m===void 0&&(m=h),t(c,x,m)}},o)}return tb=s,tb}var rb,rP;function aJ(){if(rP)return rb;rP=1;var e=bd(),t=yd();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 rb=r,rb}var nb,nP;function sJ(){if(nP)return nb;nP=1;var e=oJ(),t=aJ(),r=t(function(n,i,o){e(n,i,o)});return nb=r,nb}var ib,iP;function Y5(){if(iP)return ib;iP=1;function e(t,r){return t<r}return ib=e,ib}var ob,oP;function lJ(){if(oP)return ob;oP=1;var e=x_(),t=Y5(),r=mo();function n(i){return i&&i.length?e(i,r,t):void 0}return ob=n,ob}var ab,aP;function cJ(){if(aP)return ab;aP=1;var e=x_(),t=pi(),r=Y5();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return ab=n,ab}var sb,sP;function uJ(){if(sP)return sb;sP=1;var e=Pn(),t=function(){return e.Date.now()};return sb=t,sb}var lb,lP;function dJ(){if(lP)return lb;lP=1;var e=cd(),t=gd(),r=ud(),n=hn(),i=al();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]),m=c;if(x==="__proto__"||x==="constructor"||x==="prototype")return a;if(d!=v){var b=h[x];m=u?u(b,x,h):void 0,m===void 0&&(m=n(b)?b:r(s[d+1])?[]:{})}e(h,x,m),h=h[x]}return a}return lb=o,lb}var cb,cP;function fJ(){if(cP)return cb;cP=1;var e=md(),t=dJ(),r=gd();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 cb=n,cb}var ub,uP;function pJ(){if(uP)return ub;uP=1;var e=fJ(),t=I5();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return ub=r,ub}var db,dP;function hJ(){if(dP)return db;dP=1;var e=U5(),t=D5(),r=j5();function n(i){return r(t(i,void 0,e),i+"")}return db=n,db}var fb,fP;function vJ(){if(fP)return fb;fP=1;var e=pJ(),t=hJ(),r=t(function(n,i){return n==null?{}:e(n,i)});return fb=r,fb}var pb,pP;function gJ(){if(pP)return pb;pP=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 pb=r,pb}var hb,hP;function mJ(){if(hP)return hb;hP=1;var e=gJ(),t=yd(),r=W5();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 hb=n,hb}var vb,vP;function bJ(){if(vP)return vb;vP=1;var e=mJ(),t=e();return vb=t,vb}var gb,gP;function yJ(){if(gP)return gb;gP=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return gb=e,gb}var mb,mP;function xJ(){if(mP)return mb;mP=1;var e=Oa();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 mb=t,mb}var bb,bP;function wJ(){if(bP)return bb;bP=1;var e=xJ();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 bb=t,bb}var yb,yP;function _J(){if(yP)return yb;yP=1;var e=vd(),t=md(),r=pi(),n=k5(),i=yJ(),o=dd(),a=wJ(),s=mo(),c=Vt();function u(d,p,v){p.length?p=e(p,function(m){return c(m)?function(b){return t(b,m.length===1?m[0]:m)}:m}):p=[s];var h=-1;p=e(p,o(r));var x=n(d,function(m,b,w){var y=e(p,function(_){return _(m)});return{criteria:y,index:++h,value:m}});return i(x,function(m,b){return a(m,b,v)})}return yb=u,yb}var xb,xP;function EJ(){if(xP)return xb;xP=1;var e=b_(),t=_J(),r=bd(),n=yd(),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 xb=i,xb}var wb,wP;function SJ(){if(wP)return wb;wP=1;var e=O5(),t=0;function r(n){var i=++t;return e(n)+i}return wb=r,wb}var _b,_P;function OJ(){if(_P)return _b;_P=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 _b=e,_b}var Eb,EP;function CJ(){if(EP)return Eb;EP=1;var e=cd(),t=OJ();function r(n,i){return t(n||[],i||[],e)}return Eb=r,Eb}var Sb,SP;function Rt(){if(SP)return Sb;SP=1;var e;if(typeof n_=="function")try{e={cloneDeep:$Z(),constant:p_(),defaults:HZ(),each:b5(),filter:N5(),find:XZ(),flatten:U5(),forEach:m5(),forIn:ZZ(),has:T5(),isUndefined:P5(),last:JZ(),map:A5(),mapValues:QZ(),max:tJ(),merge:sJ(),min:lJ(),minBy:cJ(),now:uJ(),pick:vJ(),range:bJ(),reduce:M5(),sortBy:EJ(),uniqueId:SJ(),values:z5(),zipObject:CJ()}}catch{}return e||(e=window._),Sb=e,Sb}var Ob,OP;function IJ(){if(OP)return Ob;OP=1,Ob=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 Ob}var Cb,CP;function RJ(){if(CP)return Cb;CP=1;var e=Rt(),t=Tn().Graph,r=IJ();Cb=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],m;u.nodeCount();){for(;m=x.dequeue();)a(u,d,p,m);for(;m=h.dequeue();)a(u,d,p,m);if(u.nodeCount()){for(var b=d.length-2;b>0;--b)if(m=d[b].dequeue(),m){v=v.concat(a(u,d,p,m,!0));break}}}return v}function a(u,d,p,v,h){var x=h?[]:void 0;return e.forEach(u.inEdges(v.v),function(m){var b=u.edge(m),w=u.node(m.v);h&&x.push({v:m.v,w:m.w}),w.out-=b,c(d,p,w)}),e.forEach(u.outEdges(v.v),function(m){var b=u.edge(m),w=m.w,y=u.node(w);y.in-=b,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(b){p.setNode(b,{v:b,in:0,out:0})}),e.forEach(u.edges(),function(b){var w=p.edge(b.v,b.w)||0,y=d(b),_=w+y;p.setEdge(b.v,b.w,_),h=Math.max(h,p.node(b.v).out+=y),v=Math.max(v,p.node(b.w).in+=y)});var x=e.range(h+v+3).map(function(){return new r}),m=v+1;return e.forEach(p.nodes(),function(b){c(x,m,p.node(b))}),{graph:p,buckets:x,zeroIdx:m}}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 Cb}var Ib,IP;function NJ(){if(IP)return Ib;IP=1;var e=Rt(),t=RJ();Ib={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 Ib}var Rb,RP;function qr(){if(RP)return Rb;RP=1;var e=Rt(),t=Tn().Graph;Rb={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:m};function r(b,w,y,_){var S;do S=e.uniqueId(_);while(b.hasNode(S));return y.dummy=w,b.setNode(S,y),S}function n(b){var w=new t().setGraph(b.graph());return e.forEach(b.nodes(),function(y){w.setNode(y,b.node(y))}),e.forEach(b.edges(),function(y){var _=w.edge(y.v,y.w)||{weight:0,minlen:1},S=b.edge(y);w.setEdge(y.v,y.w,{weight:_.weight+S.weight,minlen:Math.max(_.minlen,S.minlen)})}),w}function i(b){var w=new t({multigraph:b.isMultigraph()}).setGraph(b.graph());return e.forEach(b.nodes(),function(y){b.children(y).length||w.setNode(y,b.node(y))}),e.forEach(b.edges(),function(y){w.setEdge(y,b.edge(y))}),w}function o(b){var w=e.map(b.nodes(),function(y){var _={};return e.forEach(b.outEdges(y),function(S){_[S.w]=(_[S.w]||0)+b.edge(S).weight}),_});return e.zipObject(b.nodes(),w)}function a(b){var w=e.map(b.nodes(),function(y){var _={};return e.forEach(b.inEdges(y),function(S){_[S.v]=(_[S.v]||0)+b.edge(S).weight}),_});return e.zipObject(b.nodes(),w)}function s(b,w){var y=b.x,_=b.y,S=w.x-y,E=w.y-_,I=b.width/2,N=b.height/2;if(!S&&!E)throw new Error("Not possible to find intersection inside of the rectangle");var T,A;return Math.abs(E)*I>Math.abs(S)*N?(E<0&&(N=-N),T=N*S/E,A=N):(S<0&&(I=-I),T=I,A=I*E/S),{x:y+T,y:_+A}}function c(b){var w=e.map(e.range(v(b)+1),function(){return[]});return e.forEach(b.nodes(),function(y){var _=b.node(y),S=_.rank;e.isUndefined(S)||(w[S][_.order]=y)}),w}function u(b){var w=e.min(e.map(b.nodes(),function(y){return b.node(y).rank}));e.forEach(b.nodes(),function(y){var _=b.node(y);e.has(_,"rank")&&(_.rank-=w)})}function d(b){var w=e.min(e.map(b.nodes(),function(E){return b.node(E).rank})),y=[];e.forEach(b.nodes(),function(E){var I=b.node(E).rank-w;y[I]||(y[I]=[]),y[I].push(E)});var _=0,S=b.graph().nodeRankFactor;e.forEach(y,function(E,I){e.isUndefined(E)&&I%S!==0?--_:_&&e.forEach(E,function(N){b.node(N).rank+=_})})}function p(b,w,y,_){var S={width:0,height:0};return arguments.length>=4&&(S.rank=y,S.order=_),r(b,"border",S,w)}function v(b){return e.max(e.map(b.nodes(),function(w){var y=b.node(w).rank;if(!e.isUndefined(y))return y}))}function h(b,w){var y={lhs:[],rhs:[]};return e.forEach(b,function(_){w(_)?y.lhs.push(_):y.rhs.push(_)}),y}function x(b,w){var y=e.now();try{return w()}finally{console.log(b+" time: "+(e.now()-y)+"ms")}}function m(b,w){return w()}return Rb}var Nb,NP;function TJ(){if(NP)return Nb;NP=1;var e=Rt(),t=qr();Nb={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,m,b;for(b=0,++c;c<d;++b,++c)v.points=[],m={width:0,height:0,edgeLabel:v,edgeObj:a,rank:c},x=t.addDummyNode(o,"edge",m,"_d"),c===h&&(m.width=v.width,m.height=v.height,m.dummy="edge-label",m.labelpos=v.labelpos),o.setEdge(s,x,{weight:v.weight},p),b===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 Nb}var Tb,TP;function Nu(){if(TP)return Tb;TP=1;var e=Rt();Tb={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 Tb}var Pb,PP;function X5(){if(PP)return Pb;PP=1;var e=Rt(),t=Tn().Graph,r=Nu().slack;Pb=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 Pb}var kb,kP;function PJ(){if(kP)return kb;kP=1;var e=Rt(),t=X5(),r=Nu().slack,n=Nu().longestPath,i=Tn().alg.preorder,o=Tn().alg.postorder,a=qr().simplify;kb=s,s.initLowLimValues=p,s.initCutValues=c,s.calcCutValue=d,s.leaveEdge=h,s.enterEdge=x,s.exchangeEdges=m;function s(_){_=a(_),n(_);var S=t(_);p(S),c(S,_);for(var E,I;E=h(S);)I=x(S,_,E),m(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,A=S.edge(E,N),B=0;return A||(T=!1,A=S.edge(N,E)),B=A.weight,e.forEach(S.nodeEdges(E),function(L){var D=L.v===E,z=D?L.w:L.v;if(z!==N){var P=D===T,K=S.edge(L).weight;if(B+=P?K:-K,w(_,E,z)){var $=_.edge(E,z).cutvalue;B+=P?-$:$}}}),B}function p(_,S){arguments.length<2&&(S=_.nodes()[0]),v(_,{},1,S)}function v(_,S,E,I,N){var T=E,A=_.node(I);return S[I]=!0,e.forEach(_.neighbors(I),function(B){e.has(S,B)||(E=v(_,S,E,B,I))}),A.low=T,A.lim=E++,N?A.parent=N:delete A.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),A=_.node(N),B=T,L=!1;T.lim>A.lim&&(B=A,L=!0);var D=e.filter(S.edges(),function(z){return L===y(_,_.node(z.v),B)&&L!==y(_,_.node(z.w),B)});return e.minBy(D,function(z){return r(S,z)})}function m(_,S,E,I){var N=E.v,T=E.w;_.removeEdge(N,T),_.setEdge(I.v,I.w,{}),p(_),c(_,S),b(_,S)}function b(_,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,A=S.edge(N,T),B=!1;A||(A=S.edge(T,N),B=!0),S.node(N).rank=S.node(T).rank+(B?A.minlen:-A.minlen)})}function w(_,S,E){return _.hasEdge(S,E)}function y(_,S,E){return E.low<=S.lim&&S.lim<=E.lim}return kb}var Ab,AP;function kJ(){if(AP)return Ab;AP=1;var e=Nu(),t=e.longestPath,r=X5(),n=PJ();Ab=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 Ab}var Mb,MP;function AJ(){if(MP)return Mb;MP=1;var e=Rt();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 Db,DP;function MJ(){if(DP)return Db;DP=1;var e=Rt(),t=qr();Db={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 m=t.addBorderNode(s,"_bt"),b=t.addBorderNode(s,"_bb"),w=s.node(h);s.setParent(m,h),w.borderTop=m,s.setParent(b,h),w.borderBottom=b,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(m,S,{weight:I,minlen:N,nestingEdge:!0}),s.setEdge(E,b,{weight:I,minlen:N,nestingEdge:!0})}),s.parent(h)||s.setEdge(c,m,{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 Db}var jb,jP;function DJ(){if(jP)return jb;jP=1;var e=Rt(),t=qr();jb=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 jb}var qb,qP;function jJ(){if(qP)return qb;qP=1;var e=Rt();qb={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 qb}var Lb,LP;function qJ(){if(LP)return Lb;LP=1;var e=Rt();Lb=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 Lb}var zb,zP;function LJ(){if(zP)return zb;zP=1;var e=Rt();zb=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 zb}var Bb,BP;function zJ(){if(BP)return Bb;BP=1;var e=Rt();Bb=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 Bb}var Fb,FP;function BJ(){if(FP)return Fb;FP=1;var e=Rt();Fb=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 Fb}var $b,$P;function FJ(){if($P)return $b;$P=1;var e=Rt(),t=qr();$b=r;function r(o,a){var s=t.partition(o,function(m){return e.has(m,"barycenter")}),c=s.lhs,u=e.sortBy(s.rhs,function(m){return-m.i}),d=[],p=0,v=0,h=0;c.sort(i(!!a)),h=n(d,u,h),e.forEach(c,function(m){h+=m.vs.length,d.push(m.vs),p+=m.barycenter*m.weight,v+=m.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 $b}var Hb,HP;function $J(){if(HP)return Hb;HP=1;var e=Rt(),t=zJ(),r=BJ(),n=FJ();Hb=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,m={};h&&(p=e.filter(p,function(E){return E!==h&&E!==x}));var b=t(s,p);e.forEach(b,function(E){if(s.children(E.v).length){var I=i(s,E.v,u,d);m[E.v]=I,e.has(I,"barycenter")&&a(E,I)}});var w=r(b,u);o(w,m);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 Hb}var Vb,VP;function HJ(){if(VP)return Vb;VP=1;var e=Rt(),t=Tn().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),m=e.isUndefined(x)?0:x.weight;c.setEdge(h,u,{weight:i.edge(v).weight+m})}),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 Wb,WP;function VJ(){if(WP)return Wb;WP=1;var e=Rt();Wb=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 Wb}var Ub,UP;function WJ(){if(UP)return Ub;UP=1;var e=Rt(),t=qJ(),r=LJ(),n=$J(),i=HJ(),o=VJ(),a=Tn().Graph,s=qr();Ub=c;function c(v){var h=s.maxRank(v),x=u(v,e.range(1,h+1),"inEdges"),m=u(v,e.range(h-1,-1,-1),"outEdges"),b=t(v);p(v,b);for(var w=Number.POSITIVE_INFINITY,y,_=0,S=0;S<4;++_,++S){d(_%2?x:m,_%4>=2),b=s.buildLayerMatrix(v);var E=r(v,b);E<w&&(S=0,y=e.cloneDeep(b),w=E)}p(v,y)}function u(v,h,x){return e.map(h,function(m){return i(v,m,x)})}function d(v,h){var x=new a;e.forEach(v,function(m){var b=m.graph().root,w=n(m,b,x,h);e.forEach(w.vs,function(y,_){m.node(y).order=_}),o(m,x,w.vs)})}function p(v,h){e.forEach(h,function(x){e.forEach(x,function(m,b){v.node(m).order=b})})}return Ub}var Gb,GP;function UJ(){if(GP)return Gb;GP=1;var e=Rt(),t=Tn().Graph,r=qr();Gb={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,A=E.length,B=e.last(I);return e.forEach(I,function(L,D){var z=o(w,L),P=z?w.node(z).order:A;(z||L===B)&&(e.forEach(I.slice(T,D+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=D+1,N=P)}),I}return e.reduce(y,S),_}function i(w,y){var _={};function S(I,N,T,A,B){var L;e.forEach(e.range(N,T),function(D){L=I[D],w.node(L).dummy&&e.forEach(w.predecessors(L),function(z){var P=w.node(z);P.dummy&&(P.order<A||P.order>B)&&a(_,z,L)})})}function E(I,N){var T=-1,A,B=0;return e.forEach(N,function(L,D){if(w.node(L).dummy==="border"){var z=w.predecessors(L);z.length&&(A=w.node(z[0]).order,S(N,B,D,T,A),B=D,T=A)}S(N,B,N.length,A,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(A,B){E[A]=A,I[A]=A,N[A]=B})}),e.forEach(y,function(T){var A=-1;e.forEach(T,function(B){var L=S(B);if(L.length){L=e.sortBy(L,function($){return N[$]});for(var D=(L.length-1)/2,z=Math.floor(D),P=Math.ceil(D);z<=P;++z){var K=L[z];I[B]===B&&A<N[K]&&!s(_,B,K)&&(I[K]=B,I[B]=E[B]=E[K],A=N[K])}}})}),{root:E,align:I}}function u(w,y,_,S,E){var I={},N=d(w,y,_,E),T=E?"borderLeft":"borderRight";function A(D,z){for(var P=N.nodes(),K=P.pop(),$={};K;)$[K]?D(K):($[K]=!0,P.push(K),P=P.concat(z(K))),K=P.pop()}function B(D){I[D]=N.inEdges(D).reduce(function(z,P){return Math.max(z,I[P.v]+N.edge(P))},0)}function L(D){var z=N.outEdges(D).reduce(function(K,$){return Math.min(K,I[$.w]-N.edge($))},Number.POSITIVE_INFINITY),P=w.node(D);z!==Number.POSITIVE_INFINITY&&P.borderType!==T&&(I[D]=Math.max(I[D],z))}return A(B,N.predecessors.bind(N)),A(L,N.successors.bind(N)),e.forEach(S,function(D){I[D]=I[_[D]]}),I}function d(w,y,_,S){var E=new t,I=w.graph(),N=m(I.nodesep,I.edgesep,S);return e.forEach(y,function(T){var A;e.forEach(T,function(B){var L=_[B];if(E.setNode(L),A){var D=_[A],z=E.edge(D,L);E.setEdge(D,L,Math.max(N(w,B,A),z||0))}A=B})}),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=b(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,A=w[T],B;if(A!==y){var L=e.values(A);B=N==="l"?S-e.min(L):E-e.max(L),B&&(w[T]=e.mapValues(A,function(D){return D+B}))}})})}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(D){return e.values(D).reverse()}));var A=(N==="u"?w.predecessors:w.successors).bind(w),B=c(w,E,_,A),L=u(w,E,B.root,B.align,T==="r");T==="r"&&(L=e.mapValues(L,function(D){return-D})),S[N+T]=L})});var I=p(w,S);return v(S,I),h(S,w.graph().align)}function m(w,y,_){return function(S,E,I){var N=S.node(E),T=S.node(I),A=0,B;if(A+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":B=-N.width/2;break;case"r":B=N.width/2;break}if(B&&(A+=_?B:-B),B=0,A+=(N.dummy?y:w)/2,A+=(T.dummy?y:w)/2,A+=T.width/2,e.has(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":B=T.width/2;break;case"r":B=-T.width/2;break}return B&&(A+=_?B:-B),B=0,A}}function b(w,y){return w.node(y).width}return Gb}var Kb,KP;function GJ(){if(KP)return Kb;KP=1;var e=Rt(),t=qr(),r=UJ().positionX;Kb=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 Kb}var Yb,YP;function KJ(){if(YP)return Yb;YP=1;var e=Rt(),t=NJ(),r=TJ(),n=kJ(),i=qr().normalizeRanks,o=AJ(),a=qr().removeEmptyRanks,s=MJ(),c=DJ(),u=jJ(),d=WJ(),p=GJ(),v=qr(),h=Tn().Graph;Yb=x;function x(j,G){var H=G&&G.debugTiming?v.time:v.notime;H("layout",function(){var q=H(" buildLayoutGraph",function(){return A(j)});H(" runLayout",function(){m(q,H)}),H(" updateInputGraph",function(){b(j,q)})})}function m(j,G){G(" makeSpaceForEdgeLabels",function(){B(j)}),G(" removeSelfEdges",function(){Q(j)}),G(" acyclic",function(){t.run(j)}),G(" nestingGraph.run",function(){s.run(j)}),G(" rank",function(){n(v.asNonCompoundGraph(j))}),G(" injectEdgeLabelProxies",function(){L(j)}),G(" removeEmptyRanks",function(){a(j)}),G(" nestingGraph.cleanup",function(){s.cleanup(j)}),G(" normalizeRanks",function(){i(j)}),G(" assignRankMinMax",function(){D(j)}),G(" removeEdgeLabelProxies",function(){z(j)}),G(" normalize.run",function(){r.run(j)}),G(" parentDummyChains",function(){o(j)}),G(" addBorderSegments",function(){c(j)}),G(" order",function(){d(j)}),G(" insertSelfEdges",function(){k(j)}),G(" adjustCoordinateSystem",function(){u.adjust(j)}),G(" position",function(){p(j)}),G(" positionSelfEdges",function(){W(j)}),G(" removeBorderNodes",function(){U(j)}),G(" normalize.undo",function(){r.undo(j)}),G(" fixupEdgeLabelCoords",function(){$(j)}),G(" undoCoordinateSystem",function(){u.undo(j)}),G(" translateGraph",function(){P(j)}),G(" assignNodeIntersects",function(){K(j)}),G(" reversePoints",function(){Y(j)}),G(" acyclic.undo",function(){t.undo(j)})}function b(j,G){e.forEach(j.nodes(),function(H){var q=j.node(H),X=G.node(H);q&&(q.x=X.x,q.y=X.y,G.children(H).length&&(q.width=X.width,q.height=X.height))}),e.forEach(j.edges(),function(H){var q=j.edge(H),X=G.edge(H);q.points=X.points,e.has(X,"x")&&(q.x=X.x,q.y=X.y)}),j.graph().width=G.graph().width,j.graph().height=G.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 A(j){var G=new h({multigraph:!0,compound:!0}),H=ee(j.graph());return G.setGraph(e.merge({},y,J(H,w),e.pick(H,_))),e.forEach(j.nodes(),function(q){var X=ee(j.node(q));G.setNode(q,e.defaults(J(X,S),E)),G.setParent(q,j.parent(q))}),e.forEach(j.edges(),function(q){var X=ee(j.edge(q));G.setEdge(q,e.merge({},N,J(X,I),e.pick(X,T)))}),G}function B(j){var G=j.graph();G.ranksep/=2,e.forEach(j.edges(),function(H){var q=j.edge(H);q.minlen*=2,q.labelpos.toLowerCase()!=="c"&&(G.rankdir==="TB"||G.rankdir==="BT"?q.width+=q.labeloffset:q.height+=q.labeloffset)})}function L(j){e.forEach(j.edges(),function(G){var H=j.edge(G);if(H.width&&H.height){var q=j.node(G.v),X=j.node(G.w),ne={rank:(X.rank-q.rank)/2+q.rank,e:G};v.addDummyNode(j,"edge-proxy",ne,"_ep")}})}function D(j){var G=0;e.forEach(j.nodes(),function(H){var q=j.node(H);q.borderTop&&(q.minRank=j.node(q.borderTop).rank,q.maxRank=j.node(q.borderBottom).rank,G=e.max(G,q.maxRank))}),j.graph().maxRank=G}function z(j){e.forEach(j.nodes(),function(G){var H=j.node(G);H.dummy==="edge-proxy"&&(j.edge(H.e).labelRank=H.rank,j.removeNode(G))})}function P(j){var G=Number.POSITIVE_INFINITY,H=0,q=Number.POSITIVE_INFINITY,X=0,ne=j.graph(),te=ne.marginx||0,ue=ne.marginy||0;function re(ge){var de=ge.x,xe=ge.y,se=ge.width,le=ge.height;G=Math.min(G,de-se/2),H=Math.max(H,de+se/2),q=Math.min(q,xe-le/2),X=Math.max(X,xe+le/2)}e.forEach(j.nodes(),function(ge){re(j.node(ge))}),e.forEach(j.edges(),function(ge){var de=j.edge(ge);e.has(de,"x")&&re(de)}),G-=te,q-=ue,e.forEach(j.nodes(),function(ge){var de=j.node(ge);de.x-=G,de.y-=q}),e.forEach(j.edges(),function(ge){var de=j.edge(ge);e.forEach(de.points,function(xe){xe.x-=G,xe.y-=q}),e.has(de,"x")&&(de.x-=G),e.has(de,"y")&&(de.y-=q)}),ne.width=H-G+te,ne.height=X-q+ue}function K(j){e.forEach(j.edges(),function(G){var H=j.edge(G),q=j.node(G.v),X=j.node(G.w),ne,te;H.points?(ne=H.points[0],te=H.points[H.points.length-1]):(H.points=[],ne=X,te=q),H.points.unshift(v.intersectRect(q,ne)),H.points.push(v.intersectRect(X,te))})}function $(j){e.forEach(j.edges(),function(G){var H=j.edge(G);if(e.has(H,"x"))switch((H.labelpos==="l"||H.labelpos==="r")&&(H.width-=H.labeloffset),H.labelpos){case"l":H.x-=H.width/2+H.labeloffset;break;case"r":H.x+=H.width/2+H.labeloffset;break}})}function Y(j){e.forEach(j.edges(),function(G){var H=j.edge(G);H.reversed&&H.points.reverse()})}function U(j){e.forEach(j.nodes(),function(G){if(j.children(G).length){var H=j.node(G),q=j.node(H.borderTop),X=j.node(H.borderBottom),ne=j.node(e.last(H.borderLeft)),te=j.node(e.last(H.borderRight));H.width=Math.abs(te.x-ne.x),H.height=Math.abs(X.y-q.y),H.x=ne.x+H.width/2,H.y=q.y+H.height/2}}),e.forEach(j.nodes(),function(G){j.node(G).dummy==="border"&&j.removeNode(G)})}function Q(j){e.forEach(j.edges(),function(G){if(G.v===G.w){var H=j.node(G.v);H.selfEdges||(H.selfEdges=[]),H.selfEdges.push({e:G,label:j.edge(G)}),j.removeEdge(G)}})}function k(j){var G=v.buildLayerMatrix(j);e.forEach(G,function(H){var q=0;e.forEach(H,function(X,ne){var te=j.node(X);te.order=ne+q,e.forEach(te.selfEdges,function(ue){v.addDummyNode(j,"selfedge",{width:ue.label.width,height:ue.label.height,rank:te.rank,order:ne+ ++q,e:ue.e,label:ue.label},"_se")}),delete te.selfEdges})})}function W(j){e.forEach(j.nodes(),function(G){var H=j.node(G);if(H.dummy==="selfedge"){var q=j.node(H.e.v),X=q.x+q.width/2,ne=q.y,te=H.x-X,ue=q.height/2;j.setEdge(H.e,H.label),j.removeNode(G),H.label.points=[{x:X+2*te/3,y:ne-ue},{x:X+5*te/6,y:ne-ue},{x:X+te,y:ne},{x:X+5*te/6,y:ne+ue},{x:X+2*te/3,y:ne+ue}],H.label.x=H.x,H.label.y=H.y}})}function J(j,G){return e.mapValues(e.pick(j,G),Number)}function ee(j){var G={};return e.forEach(j,function(H,q){G[q.toLowerCase()]=H}),G}return Yb}var Xb,XP;function YJ(){if(XP)return Xb;XP=1;var e=Rt(),t=qr(),r=Tn().Graph;Xb={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 Xb}var Zb,ZP;function XJ(){return ZP||(ZP=1,Zb="0.8.5"),Zb}var Jb,JP;function ZJ(){return JP||(JP=1,Jb={graphlib:Tn(),layout:KJ(),debug:YJ(),util:{time:qr().time,notime:qr().notime},version:XJ()}),Jb}var JJ=ZJ();const QP=Li(JJ);function QJ(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 m=v;u(v=x,m)}}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 eQ=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ek=eQ?O.useEffect:O.useLayoutEffect;function tQ(e){const t=typeof e=="function"?QJ(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=O.useReducer(b=>b+1,0),a=t.getState(),s=O.useRef(a),c=O.useRef(n),u=O.useRef(i),d=O.useRef(!1),p=O.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)),ek(()=>{h&&(p.current=v),s.current=a,c.current=n,u.current=i,d.current=!1});const x=O.useRef(a);ek(()=>{const b=()=>{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(b);return t.getState()!==x.current&&b(),w},[]);const m=h?v:p.current;return O.useDebugValue(m),m};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 rQ(){const e=O.createContext(void 0);return{Provider:({initialStore:i,createStore:o,children:a})=>{const s=O.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()),O.createElement(e.Provider,{value:s.current},a)},useStore:(i,o=Object.is)=>{const a=O.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=O.useContext(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return O.useMemo(()=>({getState:i.getState,setState:i.setState,subscribe:i.subscribe,destroy:i.destroy}),[i])}}}var nQ={value:()=>{}};function xd(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new iu(r)}function iu(e){this._=e}function iQ(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}iu.prototype=xd.prototype={constructor:iu,on:function(e,t){var r=this._,n=iQ(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=oQ(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]=tk(r[i],e.name,t);else if(t==null)for(i in r)r[i]=tk(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new iu(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};function oQ(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function tk(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=nQ,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var xw="http://www.w3.org/1999/xhtml";const rk={svg:"http://www.w3.org/2000/svg",xhtml:xw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function wd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),rk.hasOwnProperty(t)?{space:rk[t],local:e}:e}function aQ(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===xw&&t.documentElement.namespaceURI===xw?t.createElement(e):t.createElementNS(r,e)}}function sQ(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Z5(e){var t=wd(e);return(t.local?sQ:aQ)(t)}function lQ(){}function w_(e){return e==null?lQ:function(){return this.querySelector(e)}}function cQ(e){typeof e!="function"&&(e=w_(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 Zr(n,this._parents)}function uQ(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function dQ(){return[]}function J5(e){return e==null?dQ:function(){return this.querySelectorAll(e)}}function fQ(e){return function(){return uQ(e.apply(this,arguments))}}function pQ(e){typeof e=="function"?e=fQ(e):e=J5(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 Zr(n,i)}function Q5(e){return function(){return this.matches(e)}}function ez(e){return function(t){return t.matches(e)}}var hQ=Array.prototype.find;function vQ(e){return function(){return hQ.call(this.children,e)}}function gQ(){return this.firstElementChild}function mQ(e){return this.select(e==null?gQ:vQ(typeof e=="function"?e:ez(e)))}var bQ=Array.prototype.filter;function yQ(){return Array.from(this.children)}function xQ(e){return function(){return bQ.call(this.children,e)}}function wQ(e){return this.selectAll(e==null?yQ:xQ(typeof e=="function"?e:ez(e)))}function _Q(e){typeof e!="function"&&(e=Q5(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 Zr(n,this._parents)}function tz(e){return new Array(e.length)}function EQ(){return new Zr(this._enter||this._groups.map(tz),this._parents)}function Tu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Tu.prototype={constructor:Tu,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 SQ(e){return function(){return e}}function OQ(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 Tu(e,o[a]);for(;a<c;++a)(s=t[a])&&(i[a]=s)}function CQ(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 Tu(e,o[s]);for(s=0;s<d;++s)(c=t[s])&&u.get(v[s])===c&&(i[s]=c)}function IQ(e){return e.__data__}function RQ(e,t){if(!arguments.length)return Array.from(this,IQ);var r=t?CQ:OQ,n=this._parents,i=this._groups;typeof e!="function"&&(e=SQ(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=NQ(e.call(d,d&&d.__data__,u,n)),x=h.length,m=s[u]=new Array(x),b=a[u]=new Array(x),w=c[u]=new Array(v);r(d,p,m,b,w,h,t);for(var y=0,_=0,S,E;y<x;++y)if(S=m[y]){for(y>=_&&(_=y+1);!(E=b[_])&&++_<x;);S._next=E||null}}return a=new Zr(a,n),a._enter=s,a._exit=c,a}function NQ(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function TQ(){return new Zr(this._exit||this._groups.map(tz),this._parents)}function PQ(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 kQ(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 Zr(s,this._parents)}function AQ(){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=DQ);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 Zr(i,this._parents).order()}function DQ(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function jQ(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function qQ(){return Array.from(this)}function LQ(){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 zQ(){let e=0;for(const t of this)++e;return e}function BQ(){return!this.node()}function FQ(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 $Q(e){return function(){this.removeAttribute(e)}}function HQ(e){return function(){this.removeAttributeNS(e.space,e.local)}}function VQ(e,t){return function(){this.setAttribute(e,t)}}function WQ(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function UQ(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function GQ(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 KQ(e,t){var r=wd(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?HQ:$Q:typeof t=="function"?r.local?GQ:UQ:r.local?WQ:VQ)(r,t))}function rz(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function YQ(e){return function(){this.style.removeProperty(e)}}function XQ(e,t,r){return function(){this.style.setProperty(e,t,r)}}function ZQ(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function JQ(e,t,r){return arguments.length>1?this.each((t==null?YQ:typeof t=="function"?ZQ:XQ)(e,t,r??"")):da(this.node(),e)}function da(e,t){return e.style.getPropertyValue(t)||rz(e).getComputedStyle(e,null).getPropertyValue(t)}function QQ(e){return function(){delete this[e]}}function eee(e,t){return function(){this[e]=t}}function tee(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function ree(e,t){return arguments.length>1?this.each((t==null?QQ:typeof t=="function"?tee:eee)(e,t)):this.node()[e]}function nz(e){return e.trim().split(/^|\s+/)}function __(e){return e.classList||new iz(e)}function iz(e){this._node=e,this._names=nz(e.getAttribute("class")||"")}iz.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 oz(e,t){for(var r=__(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function az(e,t){for(var r=__(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function nee(e){return function(){oz(this,e)}}function iee(e){return function(){az(this,e)}}function oee(e,t){return function(){(t.apply(this,arguments)?oz:az)(this,e)}}function aee(e,t){var r=nz(e+"");if(arguments.length<2){for(var n=__(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?oee:t?nee:iee)(r,t))}function see(){this.textContent=""}function lee(e){return function(){this.textContent=e}}function cee(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function uee(e){return arguments.length?this.each(e==null?see:(typeof e=="function"?cee:lee)(e)):this.node().textContent}function dee(){this.innerHTML=""}function fee(e){return function(){this.innerHTML=e}}function pee(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function hee(e){return arguments.length?this.each(e==null?dee:(typeof e=="function"?pee:fee)(e)):this.node().innerHTML}function vee(){this.nextSibling&&this.parentNode.appendChild(this)}function gee(){return this.each(vee)}function mee(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function bee(){return this.each(mee)}function yee(e){var t=typeof e=="function"?e:Z5(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function xee(){return null}function wee(e,t){var r=typeof e=="function"?e:Z5(e),n=t==null?xee:typeof t=="function"?t:w_(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function _ee(){var e=this.parentNode;e&&e.removeChild(this)}function Eee(){return this.each(_ee)}function See(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Oee(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Cee(e){return this.select(e?Oee:See)}function Iee(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Ree(e){return function(t){e.call(this,t,this.__data__)}}function Nee(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 Tee(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 Pee(e,t,r){return function(){var n=this.__on,i,o=Ree(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 kee(e,t,r){var n=Nee(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?Pee:Tee,i=0;i<o;++i)this.each(s(n[i],t,r));return this}function sz(e,t,r){var n=rz(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 Aee(e,t){return function(){return sz(this,e,t)}}function Mee(e,t){return function(){return sz(this,e,t.apply(this,arguments))}}function Dee(e,t){return this.each((typeof t=="function"?Mee:Aee)(e,t))}function*jee(){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 lz=[null];function Zr(e,t){this._groups=e,this._parents=t}function sl(){return new Zr([[document.documentElement]],lz)}function qee(){return this}Zr.prototype=sl.prototype={constructor:Zr,select:cQ,selectAll:pQ,selectChild:mQ,selectChildren:wQ,filter:_Q,data:RQ,enter:EQ,exit:TQ,join:PQ,merge:kQ,selection:qee,order:AQ,sort:MQ,call:jQ,nodes:qQ,node:LQ,size:zQ,empty:BQ,each:FQ,attr:KQ,style:JQ,property:ree,classed:aee,text:uee,html:hee,raise:gee,lower:bee,append:yee,insert:wee,remove:Eee,clone:Cee,datum:Iee,on:kee,dispatch:Dee,[Symbol.iterator]:jee};function Sn(e){return typeof e=="string"?new Zr([[document.querySelector(e)]],[document.documentElement]):new Zr([[e]],lz)}function Lee(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Bn(e,t){if(e=Lee(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 zee={passive:!1},Bs={capture:!0,passive:!1};function Qb(e){e.stopImmediatePropagation()}function Qo(e){e.preventDefault(),e.stopImmediatePropagation()}function cz(e){var t=e.document.documentElement,r=Sn(e).on("dragstart.drag",Qo,Bs);"onselectstart"in t?r.on("selectstart.drag",Qo,Bs):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function uz(e,t){var r=e.document.documentElement,n=Sn(e).on("dragstart.drag",null);t&&(n.on("click.drag",Qo,Bs),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 ww(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}})}ww.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Bee(e){return!e.ctrlKey&&!e.button}function Fee(){return this.parentNode}function $ee(e,t){return t??{x:e.x,y:e.y}}function Hee(){return navigator.maxTouchPoints||"ontouchstart"in this}function Vee(){var e=Bee,t=Fee,r=$ee,n=Hee,i={},o=xd("start","drag","end"),a=0,s,c,u,d,p=0;function v(S){S.on("mousedown.drag",h).filter(n).on("touchstart.drag",b).on("touchmove.drag",w,zee).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&&(Sn(S.view).on("mousemove.drag",x,Bs).on("mouseup.drag",m,Bs),cz(S.view),Qb(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 m(S){Sn(S.view).on("mousemove.drag mouseup.drag",null),uz(S.view,u),Qo(S),i.mouse("end",S)}function b(S,E){if(e.call(this,S,E)){var I=S.changedTouches,N=t.call(this,S,E),T=I.length,A,B;for(A=0;A<T;++A)(B=_(this,N,S,E,I[A].identifier,I[A]))&&(Qb(S),B("start",S,I[A]))}}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])&&(Qb(S),T("end",S,E[N]))}function _(S,E,I,N,T,A){var B=o.copy(),L=Bn(A||I,E),D,z,P;if((P=r.call(S,new ww("beforestart",{sourceEvent:I,target:v,identifier:T,active:a,x:L[0],y:L[1],dx:0,dy:0,dispatch:B}),N))!=null)return D=P.x-L[0]||0,z=P.y-L[1]||0,function K($,Y,U){var Q=L,k;switch($){case"start":i[T]=K,k=a++;break;case"end":delete i[T],--a;case"drag":L=Bn(U||Y,E),k=a;break}B.call($,S,new ww($,{sourceEvent:Y,subject:P,target:v,identifier:T,active:k,x:L[0]+D,y:L[1]+z,dx:L[0]-Q[0],dy:L[1]-Q[1],dispatch:B}),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_(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function dz(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ll(){}var Fs=.7,Pu=1/Fs,ea="\\s*([+-]?\\d+)\\s*",$s="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Wee=/^#([0-9a-f]{3,8})$/,Uee=new RegExp(`^rgb\\(${ea},${ea},${ea}\\)$`),Gee=new RegExp(`^rgb\\(${Hn},${Hn},${Hn}\\)$`),Kee=new RegExp(`^rgba\\(${ea},${ea},${ea},${$s}\\)$`),Yee=new RegExp(`^rgba\\(${Hn},${Hn},${Hn},${$s}\\)$`),Xee=new RegExp(`^hsl\\(${$s},${Hn},${Hn}\\)$`),Zee=new RegExp(`^hsla\\(${$s},${Hn},${Hn},${$s}\\)$`),nk={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};E_(ll,Hs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ik,formatHex:ik,formatHex8:Jee,formatHsl:Qee,formatRgb:ok,toString:ok});function ik(){return this.rgb().formatHex()}function Jee(){return this.rgb().formatHex8()}function Qee(){return fz(this).formatHsl()}function ok(){return this.rgb().formatRgb()}function Hs(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Wee.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?ak(t):r===3?new Mr(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=Uee.exec(e))?new Mr(t[1],t[2],t[3],1):(t=Gee.exec(e))?new Mr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Kee.exec(e))?Tc(t[1],t[2],t[3],t[4]):(t=Yee.exec(e))?Tc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Xee.exec(e))?ck(t[1],t[2]/100,t[3]/100,1):(t=Zee.exec(e))?ck(t[1],t[2]/100,t[3]/100,t[4]):nk.hasOwnProperty(e)?ak(nk[e]):e==="transparent"?new Mr(NaN,NaN,NaN,0):null}function ak(e){return new Mr(e>>16&255,e>>8&255,e&255,1)}function Tc(e,t,r,n){return n<=0&&(e=t=r=NaN),new Mr(e,t,r,n)}function ete(e){return e instanceof ll||(e=Hs(e)),e?(e=e.rgb(),new Mr(e.r,e.g,e.b,e.opacity)):new Mr}function _w(e,t,r,n){return arguments.length===1?ete(e):new Mr(e,t,r,n??1)}function Mr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}E_(Mr,_w,dz(ll,{brighter(e){return e=e==null?Pu:Math.pow(Pu,e),new Mr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Fs:Math.pow(Fs,e),new Mr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Mr(oo(this.r),oo(this.g),oo(this.b),ku(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:sk,formatHex:sk,formatHex8:tte,formatRgb:lk,toString:lk}));function sk(){return`#${to(this.r)}${to(this.g)}${to(this.b)}`}function tte(){return`#${to(this.r)}${to(this.g)}${to(this.b)}${to((isNaN(this.opacity)?1:this.opacity)*255)}`}function lk(){const e=ku(this.opacity);return`${e===1?"rgb(":"rgba("}${oo(this.r)}, ${oo(this.g)}, ${oo(this.b)}${e===1?")":`, ${e})`}`}function ku(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 ck(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new On(e,t,r,n)}function fz(e){if(e instanceof On)return new On(e.h,e.s,e.l,e.opacity);if(e instanceof ll||(e=Hs(e)),!e)return new On;if(e instanceof On)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 On(a,s,c,e.opacity)}function rte(e,t,r,n){return arguments.length===1?fz(e):new On(e,t,r,n??1)}function On(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}E_(On,rte,dz(ll,{brighter(e){return e=e==null?Pu:Math.pow(Pu,e),new On(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Fs:Math.pow(Fs,e),new On(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 Mr(ey(e>=240?e-240:e+120,i,n),ey(e,i,n),ey(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new On(uk(this.h),Pc(this.s),Pc(this.l),ku(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=ku(this.opacity);return`${e===1?"hsl(":"hsla("}${uk(this.h)}, ${Pc(this.s)*100}%, ${Pc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function uk(e){return e=(e||0)%360,e<0?e+360:e}function Pc(e){return Math.max(0,Math.min(1,e||0))}function ey(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 pz=e=>()=>e;function nte(e,t){return function(r){return e+r*t}}function ite(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 ote(e){return(e=+e)==1?hz:function(t,r){return r-t?ite(t,r,e):pz(isNaN(t)?r:t)}}function hz(e,t){var r=t-e;return r?nte(e,r):pz(isNaN(e)?t:e)}const dk=(function e(t){var r=ote(t);function n(i,o){var a=r((i=_w(i)).r,(o=_w(o)).r),s=r(i.g,o.g),c=r(i.b,o.b),u=hz(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 Ew=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ty=new RegExp(Ew.source,"g");function ate(e){return function(){return e}}function ste(e){return function(t){return e(t)+""}}function lte(e,t){var r=Ew.lastIndex=ty.lastIndex=0,n,i,o,a=-1,s=[],c=[];for(e=e+"",t=t+"";(n=Ew.exec(e))&&(i=ty.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=ty.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?ste(c[0].x):ate(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 fk=180/Math.PI,Sw={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vz(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)*fk,skewX:Math.atan(c)*fk,scaleX:a,scaleY:s}}var kc;function cte(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Sw:vz(t.a,t.b,t.c,t.d,t.e,t.f)}function ute(e){return e==null||(kc||(kc=document.createElementNS("http://www.w3.org/2000/svg","g")),kc.setAttribute("transform",e),!(e=kc.transform.baseVal.consolidate()))?Sw:(e=e.matrix,vz(e.a,e.b,e.c,e.d,e.e,e.f))}function gz(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 m=h.push("translate(",null,t,null,r);x.push({i:m-4,x:ki(u,p)},{i:m-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 m=h.push(i(h)+"scale(",null,",",null,")");x.push({i:m-4,x:ki(u,p)},{i:m-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,m=v.length,b;++x<m;)p[(b=v[x]).i]=b.x(h);return p.join("")}}}var dte=gz(cte,"px, ","px)","deg)"),fte=gz(ute,", ",")",")"),pte=1e-12;function pk(e){return((e=Math.exp(e))+1/e)/2}function hte(e){return((e=Math.exp(e))-1/e)/2}function vte(e){return((e=Math.exp(2*e))-1)/(e+1)}const gte=(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,m=h*h+x*x,b,w;if(m<pte)w=Math.log(v/u)/t,b=function(N){return[s+N*h,c+N*x,u*Math.exp(t*N*w)]};else{var y=Math.sqrt(m),_=(v*v-u*u+n*m)/(2*u*r*y),S=(v*v-u*u-n*m)/(2*v*r*y),E=Math.log(Math.sqrt(_*_+1)-_),I=Math.log(Math.sqrt(S*S+1)-S);w=(I-E)/t,b=function(N){var T=N*w,A=pk(E),B=u/(r*y)*(A*vte(t*T+E)-hte(E));return[s+B*h,c+B*x,u*A/pk(t*T+E)]}}return b.duration=w*1e3*t/Math.SQRT2,b}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,xs=0,Za=0,mz=1e3,Au,ws,Mu=0,fo=0,_d=0,Vs=typeof performance=="object"&&performance.now?performance:Date,bz=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function S_(){return fo||(bz(mte),fo=Vs.now()+_d)}function mte(){fo=0}function Du(){this._call=this._time=this._next=null}Du.prototype=yz.prototype={constructor:Du,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?S_():+r)+(t==null?0:+t),!this._next&&ws!==this&&(ws?ws._next=this:Au=this,ws=this),this._call=e,this._time=r,Ow()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ow())}};function yz(e,t,r){var n=new Du;return n.restart(e,t,r),n}function bte(){S_(),++fa;for(var e=Au,t;e;)(t=fo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--fa}function hk(){fo=(Mu=Vs.now())+_d,fa=xs=0;try{bte()}finally{fa=0,xte(),fo=0}}function yte(){var e=Vs.now(),t=e-Mu;t>mz&&(_d-=t,Mu=e)}function xte(){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);ws=e,Ow(n)}function Ow(e){if(!fa){xs&&(xs=clearTimeout(xs));var t=e-fo;t>24?(e<1/0&&(xs=setTimeout(hk,e-Vs.now()-_d)),Za&&(Za=clearInterval(Za))):(Za||(Mu=Vs.now(),Za=setInterval(yte,mz)),fa=1,bz(hk))}}function vk(e,t,r){var n=new Du;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var wte=xd("start","end","cancel","interrupt"),_te=[],xz=0,gk=1,Cw=2,ou=3,mk=4,Iw=5,au=6;function Ed(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Ete(e,r,{name:t,index:n,group:i,on:wte,tween:_te,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:xz})}function O_(e,t){var r=kn(e,t);if(r.state>xz)throw new Error("too late; already scheduled");return r}function Gn(e,t){var r=kn(e,t);if(r.state>ou)throw new Error("too late; already running");return r}function kn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Ete(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=yz(o,0,r.time);function o(u){r.state=gk,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!==gk)return c();for(d in n)if(h=n[d],h.name===r.name){if(h.state===ou)return vk(a);h.state===mk?(h.state=au,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete n[d]):+d<t&&(h.state=au,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete n[d])}if(vk(function(){r.state===ou&&(r.state=mk,r.timer.restart(s,r.delay,r.time),s(u))}),r.state=Cw,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Cw){for(r.state=ou,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=Iw,1),p=-1,v=i.length;++p<v;)i[p].call(e,d);r.state===Iw&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=au,r.timer.stop(),delete n[t];for(var u in n)return;delete e.__transition}}function su(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>Cw&&n.state<Iw,n.state=au,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function Ste(e){return this.each(function(){su(this,e)})}function Ote(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 Cte(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 Ite(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=kn(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?Ote:Cte)(r,e,t))}function C_(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 kn(i,n).value[t]}}function wz(e,t){var r;return(typeof t=="number"?ki:t instanceof Hs?dk:(r=Hs(t))?(t=r,dk):lte)(e,t)}function Rte(e){return function(){this.removeAttribute(e)}}function Nte(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Tte(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 Pte(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 kte(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 Ate(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=wd(e),n=r==="transform"?fte:wz;return this.attrTween(e,typeof t=="function"?(r.local?Ate:kte)(r,n,C_(this,"attr."+e,t)):t==null?(r.local?Nte:Rte)(r):(r.local?Pte:Tte)(r,n,t))}function Dte(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function jte(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function qte(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&jte(e,o)),r}return i._value=t,i}function Lte(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 zte(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=wd(e);return this.tween(r,(n.local?qte:Lte)(n,t))}function Bte(e,t){return function(){O_(this,e).delay=+t.apply(this,arguments)}}function Fte(e,t){return t=+t,function(){O_(this,e).delay=t}}function $te(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Bte:Fte)(t,e)):kn(this.node(),t).delay}function Hte(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 Wte(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Hte:Vte)(t,e)):kn(this.node(),t).duration}function Ute(e,t){if(typeof t!="function")throw new Error;return function(){Gn(this,e).ease=t}}function Gte(e){var t=this._id;return arguments.length?this.each(Ute(t,e)):kn(this.node(),t).ease}function Kte(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Gn(this,e).ease=r}}function Yte(e){if(typeof e!="function")throw new Error;return this.each(Kte(this._id,e))}function Xte(e){typeof e!="function"&&(e=Q5(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 Zte(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 Jte(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 Qte(e,t,r){var n,i,o=Jte(t)?O_:Gn;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function ere(e,t){var r=this._id;return arguments.length<2?kn(this.node(),r).on.on(e):this.each(Qte(r,e,t))}function tre(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function rre(){return this.on("end.remove",tre(this._id))}function nre(e){var t=this._name,r=this._id;typeof e!="function"&&(e=w_(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,Ed(u[v],t,r,v,u,kn(d,r)));return new di(o,this._parents,t,r)}function ire(e){var t=this._name,r=this._id;typeof e!="function"&&(e=J5(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=kn(d,r),m=0,b=v.length;m<b;++m)(h=v[m])&&Ed(h,t,r,m,v,x);o.push(v),a.push(d)}return new di(o,a,t,r)}var ore=sl.prototype.constructor;function are(){return new ore(this._groups,this._parents)}function sre(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 _z(e){return function(){this.style.removeProperty(e)}}function lre(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 cre(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 ure(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=_z(t)):void 0;(u!==r||i!==d)&&(n=(r=u).copy()).on(a,i=d),c.on=n}}function dre(e,t,r){var n=(e+="")=="transform"?dte:wz;return t==null?this.styleTween(e,sre(e,n)).on("end.style."+e,_z(e)):typeof t=="function"?this.styleTween(e,cre(e,n,C_(this,"style."+e,t))).each(ure(this._id,e)):this.styleTween(e,lre(e,n,t),r).on("end.style."+e,null)}function fre(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function pre(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&fre(e,a,r)),n}return o._value=t,o}function hre(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,pre(e,t,r??""))}function vre(e){return function(){this.textContent=e}}function gre(e){return function(){var t=e(this);this.textContent=t??""}}function mre(e){return this.tween("text",typeof e=="function"?gre(C_(this,"text",e)):vre(e==null?"":e+""))}function bre(e){return function(t){this.textContent=e.call(this,t)}}function yre(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&bre(i)),t}return n._value=e,n}function xre(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,yre(e))}function wre(){for(var e=this._name,t=this._id,r=Ez(),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=kn(c,t);Ed(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 _re(){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 Ere=0;function di(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Ez(){return++Ere}var oi=sl.prototype;di.prototype={constructor:di,select:nre,selectAll:ire,selectChild:oi.selectChild,selectChildren:oi.selectChildren,filter:Xte,merge:Zte,selection:are,transition:wre,call:oi.call,nodes:oi.nodes,node:oi.node,size:oi.size,empty:oi.empty,each:oi.each,on:ere,attr:Mte,attrTween:zte,style:dre,styleTween:hre,text:mre,textTween:xre,remove:rre,tween:Ite,delay:$te,duration:Wte,ease:Gte,easeVarying:Yte,end:_re,[Symbol.iterator]:oi[Symbol.iterator]};function Sre(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ore={time:null,delay:0,duration:250,ease:Sre};function Cre(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 Ire(e){var t,r;e instanceof di?(t=e._id,e=e._name):(t=Ez(),(r=Ore).time=S_(),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])&&Ed(c,e,t,u,a,r||Cre(c,t));return new di(n,this._parents,e,t)}sl.prototype.interrupt=Ste;sl.prototype.transition=Ire;const Ac=e=>()=>e;function Rre(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 ry(e){e.stopImmediatePropagation()}function Ja(e){e.preventDefault(),e.stopImmediatePropagation()}function Nre(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Tre(){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 bk(){return this.__zoom||ao}function Pre(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function kre(){return navigator.maxTouchPoints||"ontouchstart"in this}function Are(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=Nre,t=Tre,r=Are,n=Pre,i=kre,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=gte,u=xd("start","zoom","end"),d,p,v,h=500,x=150,m=0,b=10;function w(P){P.property("__zoom",bk).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",B).filter(i).on("touchstart.zoom",L).on("touchmove.zoom",D).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",bk),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,Q=typeof K=="function"?K.apply(this,arguments):K;return U*Q},$,Y)},w.scaleTo=function(P,K,$,Y){w.transform(P,function(){var U=t.apply(this,arguments),Q=this.__zoom,k=$==null?S(U):typeof $=="function"?$.apply(this,arguments):$,W=Q.invert(k),J=typeof K=="function"?K.apply(this,arguments):K;return r(_(y(Q,J),k,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 Q=t.apply(this,arguments),k=this.__zoom,W=Y==null?S(Q):typeof Y=="function"?Y.apply(this,arguments):Y;return r(ao.translate(W[0],W[1]).scale(k.k).translate(typeof K=="function"?-K.apply(this,arguments):-K,typeof $=="function"?-$.apply(this,arguments):-$),Q,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,Q=arguments,k=I(U,Q).event(Y),W=t.apply(U,Q),J=$==null?S(W):typeof $=="function"?$.apply(U,Q):$,ee=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),j=U.__zoom,G=typeof K=="function"?K.apply(U,Q):K,H=c(j.invert(J).concat(ee/j.k),G.invert(J).concat(ee/G.k));return function(q){if(q===1)q=G;else{var X=H(q),ne=ee/X[2];q=new li(ne,J[0]-X[0]*ne,J[1]-X[1]*ne)}k.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=Sn(this.that).datum();u.call(P,this.that,new Rre(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)))),Q=Bn(P);if($.wheel)($.mouse[0][0]!==Q[0]||$.mouse[0][1]!==Q[1])&&($.mouse[1]=Y.invert($.mouse[0]=Q)),clearTimeout($.wheel);else{if(Y.k===U)return;$.mouse=[Q,Y.invert(Q)],su(this),$.start()}Ja(P),$.wheel=setTimeout(k,x),$.zoom("mouse",r(_(y(Y,U),$.mouse[0],$.mouse[1]),$.extent,a));function k(){$.wheel=null,$.end()}}function A(P,...K){if(v||!e.apply(this,arguments))return;var $=P.currentTarget,Y=I(this,K,!0).event(P),U=Sn(P.view).on("mousemove.zoom",J,!0).on("mouseup.zoom",ee,!0),Q=Bn(P,$),k=P.clientX,W=P.clientY;cz(P.view),ry(P),Y.mouse=[Q,this.__zoom.invert(Q)],su(this),Y.start();function J(j){if(Ja(j),!Y.moved){var G=j.clientX-k,H=j.clientY-W;Y.moved=G*G+H*H>m}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),uz(j.view,Y.moved),Ja(j),Y.event(j).end()}}function B(P,...K){if(e.apply(this,arguments)){var $=this.__zoom,Y=Bn(P.changedTouches?P.changedTouches[0]:P,this),U=$.invert(Y),Q=$.k*(P.shiftKey?.5:2),k=r(_(y($,Q),Y,U),t.apply(this,K),a);Ja(P),s>0?Sn(this).transition().duration(s).call(E,k,Y,P):Sn(this).call(w.transform,k,Y,P)}}function L(P,...K){if(e.apply(this,arguments)){var $=P.touches,Y=$.length,U=I(this,K,P.changedTouches.length===Y).event(P),Q,k,W,J;for(ry(P),k=0;k<Y;++k)W=$[k],J=Bn(W,this),J=[J,this.__zoom.invert(J),W.identifier],U.touch0?!U.touch1&&U.touch0[2]!==J[2]&&(U.touch1=J,U.taps=0):(U.touch0=J,Q=!0,U.taps=1+!!d);d&&(d=clearTimeout(d)),Q&&(U.taps<2&&(p=J[0],d=setTimeout(function(){d=null},h)),su(this),U.start())}}function D(P,...K){if(this.__zooming){var $=I(this,K).event(P),Y=P.changedTouches,U=Y.length,Q,k,W,J;for(Ja(P),Q=0;Q<U;++Q)k=Y[Q],W=Bn(k,this),$.touch0&&$.touch0[2]===k.identifier?$.touch0[0]=W:$.touch1&&$.touch1[2]===k.identifier&&($.touch1[0]=W);if(k=$.that.__zoom,$.touch1){var ee=$.touch0[0],j=$.touch0[1],G=$.touch1[0],H=$.touch1[1],q=(q=G[0]-ee[0])*q+(q=G[1]-ee[1])*q,X=(X=H[0]-j[0])*X+(X=H[1]-j[1])*X;k=y(k,Math.sqrt(q/X)),W=[(ee[0]+G[0])/2,(ee[1]+G[1])/2],J=[(j[0]+H[0])/2,(j[1]+H[1])/2]}else if($.touch0)W=$.touch0[0],J=$.touch0[1];else return;$.zoom("touch",r(_(k,W,J),$.extent,a))}}function z(P,...K){if(this.__zooming){var $=I(this,K).event(P),Y=P.changedTouches,U=Y.length,Q,k;for(ry(P),v&&clearTimeout(v),v=setTimeout(function(){v=null},h),Q=0;Q<U;++Q)k=Y[Q],$.touch0&&$.touch0[2]===k.identifier?delete $.touch0:$.touch1&&$.touch1[2]===k.identifier&&delete $.touch1;if($.touch1&&!$.touch0&&($.touch0=$.touch1,delete $.touch1),$.touch0)$.touch0[1]=this.__zoom.invert($.touch0[0]);else if($.end(),$.taps===2&&(k=Bn(k,this),Math.hypot(p[0]-k[0],p[1]-k[1])<b)){var W=Sn(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return w.wheelDelta=function(P){return arguments.length?(n=typeof P=="function"?P:Ac(+P),w):n},w.filter=function(P){return arguments.length?(e=typeof P=="function"?P:Ac(!!P),w):e},w.touchable=function(P){return arguments.length?(i=typeof P=="function"?P:Ac(!!P),w):i},w.extent=function(P){return arguments.length?(t=typeof P=="function"?P:Ac([[+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?(m=(P=+P)*P,w):Math.sqrt(m)},w.tapDistance=function(P){return arguments.length?(b=+P,w):b},w}function tt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rw(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 Sz(e,t){if(e){if(typeof e=="string")return Rw(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 Rw(e,t)}}function Dre(e){if(Array.isArray(e))return e}function jre(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 qre(){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 Ke(e,t){return Dre(e)||jre(e,t)||Sz(e,t)||qre()}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 Mi;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Mi||(Mi={}));var ju;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ju||(ju={}));var Se;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Se||(Se={}));var I_=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)},Oz=function(t,r){return{x:ra(t.x,r[0][0],r[1][0]),y:ra(t.y,r[0][1],r[1][1])}},Cz=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)},Lre=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)}},qu=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}},zre=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}},Iz=function(t){return!isNaN(t)&&isFinite(t)},ar=Symbol("internals");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 _s(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){tt(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 xk(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=_s({},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 Rz(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(_s(_s({},i),{},{selected:o.selected})),n;case"position":{var a=_s({},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&&xk(n,a),n.push(a),n}case"dimensions":{var s=_s({},i);return typeof o.dimensions<"u"&&(s.width=o.dimensions.width,s.height=o.dimensions.height),s.expandParent&&xk(n,s),n.push(s),n}case"remove":return n}return n.push(i),n},r)}function Nz(e,t){return Rz(e,t)}function Bre(e,t){return Rz(e,t)}var Ai=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(Ai(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Ai(n.id,!1))),r},[])}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 Tz(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){tt(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}var _k=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 Tz({id:s.getAttribute("data-handleid"),position:s.getAttribute("data-handlepos"),x:(c.left-a.left)/n,y:(c.top-a.top)/n},I_(s))})};function Qa(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,Tz({},i))}}function Pz(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 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 Ts(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){tt(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}var Fre=function(t){return"id"in t&&"source"in t&&"target"in t},$re=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||"")},Nw=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("&"))},Hre=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 Fre(t)?n=Ts({},t):n=Ts(Ts({},t),{},{id:$re(t)}),Hre(n,r)?r:r.concat(n)},kz=function(t,r,n,i){var o=t.x,a=t.y,s=Ke(r,3),c=s[0],u=s[1],d=s[2],p=Ke(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},R_=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 Lre(n,qu({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 zre(r)},Az=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],i=Ke(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=qu({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,m=v.height,b=v.selectable,w=b===void 0?!0:b;if(u&&!w)return!1;var y=qu(Ts(Ts({},h),{},{width:x||0,height:m||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 m>"u"||x===null||m===null,N=c&&E>0,T=(x||0)*(m||0),A=I||N||E>=T;A&&p.push(v)}),p},Mz=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)})},Dz=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 Sk(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?Sk(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jz(e,t,r,n){var i,o,a,s,c,u,d,p,v,h,x,m;if(!e.parentNode)return n;var b=t.get(e.parentNode);return jz(b,t,r,{x:((i=n.x)!==null&&i!==void 0?i:0)+((o=(a=b.position)===null||a===void 0?void 0:a.x)!==null&&o!==void 0?o:0),y:((s=n.y)!==null&&s!==void 0?s:0)+((c=(u=b.position)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0),z:((d=(p=b[ar])===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=b[ar])===null||x===void 0?void 0:x.z)!==null&&h!==void 0?h:0:(m=n.z)!==null&&m!==void 0?m:0})}function ny(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=Iz(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,ar,{enumerable:!1,value:{handleBounds:s==null||(o=s[ar])===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=jz(i,r,n,Zo(Zo({},i.position),{},{z:(o=(a=i[ar])===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[ar].z=d,n[i.id]&&(i[ar].isParent=!0)}}),r}function qz(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,m,b,w=R_(v),y=Dz(w,i,o,(x=t.minZoom)!==null&&x!==void 0?x:a,(m=t.maxZoom)!==null&&m!==void 0?m:s,(b=t.padding)!==null&&b!==void 0?b:.1),_=Ke(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 Wre(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={},tt(i,ar,n[ar]),tt(i,"selected",r.selected),i)))}}),new Map(t)}function Ure(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 Mc(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:Wre(t,a)}),c==null||c(t)),r!=null&&r.length&&(p&&i({edges:Ure(r,s)}),u==null||u(r))}var Tw=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Ok={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:Tw,nodeExtent:Tw,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 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 qn(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){tt(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}var N_=rQ(),Gre=N_.Provider,$t=N_.useStore,Er=N_.useStoreApi,Kre=function(){return tQ(function(t,r){return qn(qn({},Ok),{},{setNodes:function(i){t({nodeInternals:ny(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?ny(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),m=x.m22,b=i.reduce(function(y,_){var S=s.get(_.id);if(S){var E=I_(_.nodeElement),I=!!(E.width&&E.height&&(S.width!==E.width||S.height!==E.height||_.forceUpdate));I&&(s.set(S.id,qn(qn({},S),{},tt({},ar,qn(qn({},S[ar]),{},{handleBounds:{source:_k(".source",_.nodeElement,m),target:_k(".target",_.nodeElement,m)}})),E)),y.push({id:S.id,type:"dimensions",dimensions:E}))}return y},[]),w=u||c&&!u&&qz(r,qn({initial:!0},d));t({nodeInternals:new Map(s),fitViewOnInitDone:w}),(b==null?void 0:b.length)>0&&(a==null||a(b))}},updateNodePositions:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=r(),c=s.onNodesChange,u=s.nodeInternals,d=s.hasDefaultNodes;if(d||c){var p=i.map(function(x){var m={id:x.id,type:"position",dragging:a};return o&&(m.positionAbsolute=x.positionAbsolute,m.position=x.position),m});if(p!=null&&p.length){if(d){var v=Nz(p,Array.from(u.values())),h=ny(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 Ai(p,!0)}):(u=Xo(Array.from(s.values()),i),d=Xo(c,[])),Mc({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 Ai(p,!0)}):(u=Xo(s,i),d=Xo(Array.from(c.values()),[])),Mc({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,Ai(x.id,!1)}),h=p.map(function(x){return Ai(x.id,!1)});Mc({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 Ai(d.id,!1)}),u=a.filter(function(d){return d.selected}).map(function(d){return Ai(d.id,!1)});Mc({changedNodes:c,changedEdges:u,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(s){s.positionAbsolute=Oz(s.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(qn({},Ok))}})})};function Jr(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=Jr(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function Lr(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 Yre(e){if(Array.isArray(e))return Rw(e)}function Xre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Zre(){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 Yre(e)||Xre(e)||Sz(e)||Zre()}var Jre={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},Qre=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},ene=function(){var t=Er(),r=$t(Qre,Lr),n=r.d3Zoom,i=r.d3Selection,o=O.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=Ke(t.getState().transform,3),h=v[0],x=v[1],m=v[2],b=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:m);n.transform(eo(i,c==null?void 0:c.duration),b)},getViewport:function(){var s=Ke(t.getState().transform,3),c=s[0],u=s[1],d=s[2];return{x:c,y:u,zoom:d}},fitView:function(s){return qz(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,m=p/2-s*x,b=v/2-c*x,w=ao.translate(m,b).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,m=Dz(s,p,v,h,x,(u=c==null?void 0:c.padding)!==null&&u!==void 0?u:.1),b=Ke(m,3),w=b[0],y=b[1],_=b[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 kz(s,u,d,p)},viewportInitialized:!0}:Jre},[n,i]);return o};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 Fo(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){tt(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}function Lz(){var e=ene(),t=Er(),r=O.useCallback(function(){var p=t.getState(),v=p.nodeInternals,h=Array.from(v.values());return h.map(function(x){return Fo({},x)})},[]),n=O.useCallback(function(p){var v=t.getState(),h=v.nodeInternals;return h.get(p)},[]),i=O.useCallback(function(){var p=t.getState(),v=p.edges,h=v===void 0?[]:v;return h.map(function(x){return Fo({},x)})},[]),o=O.useCallback(function(p){var v=t.getState(),h=v.edges,x=h===void 0?[]:h;return x.find(function(m){return m.id===p})},[]),a=O.useCallback(function(p){var v=t.getState(),h=v.nodeInternals,x=v.setNodes,m=v.hasDefaultNodes,b=v.onNodesChange,w=Array.from(h.values()),y=typeof p=="function"?p(w):p;if(m)x(y);else if(b){var _=y.length===0?w.map(function(S){return{type:"remove",id:S.id}}):y.map(function(S){return{item:S,type:"reset"}});b(_)}},[]),s=O.useCallback(function(p){var v=t.getState(),h=v.edges,x=h===void 0?[]:h,m=v.setEdges,b=v.hasDefaultEdges,w=v.onEdgesChange,y=typeof p=="function"?p(x):p;if(b)m(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=O.useCallback(function(p){var v=Array.isArray(p)?p:[p],h=t.getState(),x=h.nodeInternals,m=h.setNodes,b=h.hasDefaultNodes,w=h.onNodesChange;if(b){var y=Array.from(x.values()),_=[].concat(y,so(v));m(_)}else if(w){var S=v.map(function(E){return{item:E,type:"add"}});w(S)}},[]),u=O.useCallback(function(p){var v=Array.isArray(p)?p:[p],h=t.getState(),x=h.edges,m=x===void 0?[]:x,b=h.setEdges,w=h.hasDefaultEdges,y=h.onEdgesChange;if(w)b([].concat(so(m),so(v)));else if(y){var _=v.map(function(S){return{item:S,type:"add"}});y(_)}},[]),d=O.useCallback(function(){var p=t.getState(),v=p.nodeInternals,h=p.edges,x=h===void 0?[]:h,m=p.transform,b=Array.from(v.values()),w=Ke(m,3),y=w[0],_=w[1],S=w[2];return{nodes:b.map(function(E){return Fo({},E)}),edges:x.map(function(E){return Fo({},E)}),viewport:{x:y,y:_,zoom:S}}},[]);return O.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 tne(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 Sd(e,t){if(e==null)return{};var r=tne(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 rne(){return O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},O.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function nne(){return O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},O.createElement("path",{d:"M0 0h32v4.2H0z"}))}function ine(){return O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},O.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 one(){return O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},O.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 ane(){return O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},O.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 sne=["children","className"];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 lne(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){tt(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 Dc=function(t){var r=t.children,n=t.className,i=Sd(t,sne);return O.createElement("button",lne({type:"button",className:Jr(["react-flow__controls-button",n])},i),r)},cne=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},une=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,m=t.children,b=Er(),w=O.useState(!1),y=Ke(w,2),_=y[0],S=y[1],E=$t(cne),I=Lz(),N=I.zoomIn,T=I.zoomOut,A=I.fitView;if(O.useEffect(function(){S(!0)},[]),!_)return null;var B=function(){N==null||N(),d==null||d()},L=function(){T==null||T(),p==null||p()},D=function(){A==null||A(u),v==null||v()},z=function(){b.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),h==null||h(!E)};return O.createElement("div",{className:Jr(["react-flow__controls",x]),style:r},i&&O.createElement(O.Fragment,null,O.createElement(Dc,{onClick:B,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},O.createElement(rne,null)),O.createElement(Dc,{onClick:L,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},O.createElement(nne,null))),a&&O.createElement(Dc,{className:"react-flow__controls-fitview",onClick:D,title:"fit view","aria-label":"fit view"},O.createElement(ine,null)),c&&O.createElement(Dc,{className:"react-flow__controls-interactive",onClick:z,title:"toggle interactivity","aria-label":"toggle interactivity"},E?O.createElement(ane,null):O.createElement(one,null)),m)};une.displayName="Controls";var dne=function(t,r,n){return O.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},fne=function(t,r){return O.createElement("circle",{cx:t,cy:t,r:t,fill:r})},jc;function Nk(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 Tk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nk(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var pne=(jc={},tt(jc,po.Dots,"#81818a"),tt(jc,po.Lines,"#eee"),jc),hne=function(t){return t.transform},zz=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=O.useRef(null),v=O.useState(null),h=Ke(v,2),x=h[0],m=h[1],b=$t(hne),w=Ke(b,3),y=w[0],_=w[1],S=w[2];O.useEffect(function(){var L=document.querySelectorAll(".react-flow__background"),D=Array.from(L).findIndex(function(z){return z===p.current});m("pattern-".concat(D))},[]);var E=o*S||1,I=y%E,N=_%E,T=n===po.Lines,A=c||pne[n],B=T?dne(E,s,A):fne(s*S,A);return O.createElement("svg",{className:Jr(["react-flow__background","react-flow__container",d]),style:Tk(Tk({},u),{},{width:"100%",height:"100%"}),ref:p},x&&O.createElement(O.Fragment,null,O.createElement("pattern",{id:x,x:I,y:N,width:E,height:E,patternUnits:"userSpaceOnUse"},B),O.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(x,")")})))};zz.displayName="Background";var vne=O.memo(zz),gne=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function mne(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&gne.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var i="".concat(n).split("-");return O.createElement("div",{className:Jr(["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"},O.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var bne=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];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 yne(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){tt(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 xne=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,m=t.children,b=t.className,w=Sd(t,bne),y=O.useRef(null),_=O.useState({x:0,y:0,width:0,height:0}),S=Ke(_,2),E=S[0],I=S[1],N=Jr(["react-flow__edge-textwrapper",b]);return O.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:O.createElement("g",yne({transform:"translate(".concat(r-E.width/2," ").concat(n-E.height/2,")"),className:N},w),c&&O.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}),O.createElement("text",{className:"react-flow__edge-text",y:E.height/2,dy:"0.3em",ref:y,style:a},i),m)},wne=O.memo(xne),Od=(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?O.createElement(wne,{x:r,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:u}):null;return O.createElement(O.Fragment,null,O.createElement("path",{style:d,d:t,className:"react-flow__edge-path",markerEnd:p,markerStart:v}),h)});function Lu(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 Bz(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=Lu({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Ke(u,2),p=d[0],v=d[1],h=Lu({pos:c,x1:o,y1:a,x2:t,y2:r}),x=Ke(h,2),m=x[0],b=x[1];return"M".concat(t,",").concat(r," C").concat(p,",").concat(v," ").concat(m,",").concat(b," ").concat(o,",").concat(a)}function _ne(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=Lu({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Ke(u,2),p=d[0],v=d[1],h=Lu({pos:c,x1:o,y1:a,x2:t,y2:r}),x=Ke(h,2),m=x[0],b=x[1],w=t*.125+p*.375+m*.375+o*.125,y=r*.125+v*.375+b*.375+a*.125,_=Math.abs(w-t),S=Math.abs(y-r);return[w,y,_,S]}var Fz=O.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,m=e.style,b=e.markerEnd,w=e.markerStart,y={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c},_=Bz(y),S=_ne(y),E=Ke(S,2),I=E[0],N=E[1];return O.createElement(Od,{path:_,centerX:I,centerY:N,label:u,labelStyle:d,labelShowBg:p,labelBgStyle:v,labelBgPadding:h,labelBgBorderRadius:x,style:m,markerEnd:b,markerStart:w})});function kk(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 Ene(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kk(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ak=[Se.Left,Se.Right],$z=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=Ak.includes(s),p=Ak.includes(u),v=d&&!p||p&&!d;if(v){var h=d?Math.abs(i-r):0,x=r>i?r-h:r+h,m=d?0:Math.abs(o-n),b=n<o?n+m:n-m;return[x,b,h,m]}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 es(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,Ene({},i))}}var iy=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},oy=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},ay=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},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+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},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,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},dy=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function Pw(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=$z({sourceX:t,sourceY:r,targetX:o,targetY:a}),x=Ke(h,4),m=x[0],b=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:m,T=typeof v<"u"?v:b,A=null,B=null;return t<=o?(A=r<=a?iy(t,T,E):cy(t,T,E),B=r<=a?dy(o,T,E):sy(o,T,E)):(A=r<a?ay(t,T,E):uy(t,T,E),B=r<a?ly(o,T,E):oy(o,T,E)),I.includes(i)&&I.includes(c)?t<=o?(A=r<=a?dy(N,r,E):sy(N,r,E),B=r<=a?iy(N,a,E):cy(N,a,E)):(i===Se.Right&&c===Se.Left||i===Se.Left&&c===Se.Right||i===Se.Left&&c===Se.Left)&&(A=r<=a?ly(N,r,E):oy(N,r,E),B=r<=a?ay(N,a,E):uy(N,a,E)):I.includes(i)&&!I.includes(c)?(t<=o?A=r<=a?dy(o,r,E):sy(o,r,E):A=r<=a?ly(o,r,E):oy(o,r,E),B=""):!I.includes(i)&&I.includes(c)&&(t<=o?A=r<=a?iy(t,a,E):cy(t,a,E):A=r<=a?ay(t,a,E):uy(t,a,E),B=""),"M ".concat(t,",").concat(r).concat(A).concat(B,"L ").concat(o,",").concat(a)}var T_=O.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,m=x===void 0?Se.Top:x,b=e.markerEnd,w=e.markerStart,y=e.borderRadius,_=y===void 0?5:y,S=$z({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:h,targetPosition:m}),E=Ke(S,2),I=E[0],N=E[1],T=Pw({sourceX:t,sourceY:r,sourcePosition:h,targetX:n,targetY:i,targetPosition:m,borderRadius:_});return O.createElement(Od,{path:T,centerX:I,centerY:N,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:p,markerEnd:b,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 Dk(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){tt(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 Hz=O.memo(function(e){return O.createElement(T_,Dk(Dk({},e),{},{borderRadius:0}))}),Vz=O.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,m=i<r?i+x:i-x,b=Math.abs(n-t)/2,w=n<t?n+b:n-b,y="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(i);return O.createElement(Od,{path:y,centerX:w,centerY:m,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 zu(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 Cd(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=zu({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),v=Ke(p,2),h=v[0],x=v[1],m=zu({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),b=Ke(m,2),w=b[0],y=b[1];return"M".concat(t,",").concat(r," C").concat(h,",").concat(x," ").concat(w,",").concat(y," ").concat(o,",").concat(a)}function Sne(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=zu({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),v=Ke(p,2),h=v[0],x=v[1],m=zu({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),b=Ke(m,2),w=b[0],y=b[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 kw=O.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,m=e.style,b=e.markerEnd,w=e.markerStart,y=e.curvature,_={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c,curvature:y},S=Cd(_),E=Sne(_),I=Ke(E,2),N=I[0],T=I[1];return O.createElement(Od,{path:S,centerX:N,centerY:T,label:u,labelStyle:d,labelShowBg:p,labelBgStyle:v,labelBgPadding:h,labelBgBorderRadius:x,style:m,markerEnd:b,markerStart:w})}),P_=O.createContext(null),One=P_.Provider;P_.Consumer;function Aw(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 fy(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function Wz(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=Cz(t.target);if(!v)return;var h=v.elementFromPoint(t.clientX,t.clientY),x=h==null?void 0:h.classList.contains("target"),m=h==null?void 0:h.classList.contains("source");if(!p||!x&&!m&&!u)return;var b=a(),w=b.onConnectStart,y=b.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 A=Aw(T,y,o,n,r,c,v),B=A.connection,L=A.elementBelow,D=A.isValid,z=A.isHoveringHandle;if(!z)return fy(E);B.source!==B.target&&L&&(fy(E),E=L,L.classList.add("react-flow__handle-connecting"),L.classList.toggle("react-flow__handle-valid",D))}function N(T){var A=a(),B=A.onConnectStop,L=A.onConnectEnd,D=Aw(T,y,o,n,r,c,v),z=D.connection,P=D.isValid;B==null||B(T),P&&(i==null||i(z)),L==null||L(T),u&&d&&d(T),fy(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 Cne=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];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 py(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){tt(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 Ine=function(){return!0},Rne=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},Uz=O.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?Ine: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,m=Sd(e,Cne),b=Er(),w=O.useContext(P_),y=$t(Rne,Lr),_=y.connectionStartHandle,S=y.connectOnClick,E=d||null,I=n==="target",N=function(L){var D=b.getState(),z=D.defaultEdgeOptions,P=D.onConnect,K=D.hasDefaultEdges,$=py(py({},z),L);if(K){var Y=b.getState(),U=Y.edges;b.setState({edges:Vre($,U)})}P==null||P($),p==null||p($)},T=function(L){L.button===0&&Wz({event:L,handleId:E,nodeId:w,onConnect:N,isTarget:I,getState:b.getState,setState:b.setState,isValidConnection:s}),x==null||x(L)},A=function(L){var D=b.getState(),z=D.onClickConnectStart,P=D.onClickConnectStop,K=D.onClickConnectEnd,$=D.connectionMode;if(!_){z==null||z(L,{nodeId:w,handleId:E,handleType:n}),b.setState({connectionStartHandle:{nodeId:w,type:n,handleId:E}});return}var Y=Cz(L.target),U=Aw(L,$,_.type==="target",_.nodeId,_.handleId||null,s,Y),Q=U.connection,k=U.isValid;P==null||P(L),k&&N(Q),K==null||K(L),b.setState({connectionStartHandle:null})};return O.createElement("div",py({"data-handleid":E,"data-nodeid":w,"data-handlepos":o,className:Jr(["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?A:void 0,ref:t},m),v)});Uz.displayName="Handle";var Bu=O.memo(Uz),Gz=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 O.createElement(O.Fragment,null,O.createElement(Bu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,O.createElement(Bu,{type:"source",position:s,isConnectable:n}))};Gz.displayName="DefaultNode";var Mw=O.memo(Gz),Kz=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?Se.Bottom:i;return O.createElement(O.Fragment,null,r==null?void 0:r.label,O.createElement(Bu,{type:"source",position:o,isConnectable:n}))};Kz.displayName="InputNode";var Yz=O.memo(Kz),Xz=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Se.Top:i;return O.createElement(O.Fragment,null,O.createElement(Bu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};Xz.displayName="OutputNode";var Zz=O.memo(Xz),Nne=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},Tne=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 Lr(n,i)&&Lr(o,a)};function Pne(e){var t=e.onSelectionChange,r=$t(Nne,Tne),n=r.selectedNodes,i=r.selectedEdges;return O.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var kne=O.memo(Pne),Ane=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){O.useEffect(function(){typeof e<"u"&&t(e)},[e])}function mt(e,t,r){O.useEffect(function(){typeof t<"u"&&r(tt({},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,m=t.minZoom,b=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,A=t.connectOnClick,B=t.defaultEdgeOptions,L=t.fitView,D=t.fitViewOptions,z=t.onNodesDelete,P=t.onEdgesDelete,K=t.onNodeDrag,$=t.onNodeDragStart,Y=t.onNodeDragStop,U=t.onSelectionDrag,Q=t.onSelectionDragStart,k=t.onSelectionDragStop,W=$t(Ane,Lr),J=W.setNodes,ee=W.setEdges,j=W.setDefaultNodesAndEdges,G=W.setMinZoom,H=W.setMaxZoom,q=W.setTranslateExtent,X=W.setNodeExtent,ne=W.reset,te=Er();return O.useEffect(function(){return j(i,o),function(){ne()}},[]),mt("defaultEdgeOptions",B,te.setState),mt("connectionMode",E,te.setState),mt("onConnect",a,te.setState),mt("onConnectStart",s,te.setState),mt("onConnectStop",c,te.setState),mt("onConnectEnd",u,te.setState),mt("onClickConnectStart",d,te.setState),mt("onClickConnectStop",p,te.setState),mt("onClickConnectEnd",v,te.setState),mt("nodesDraggable",h,te.setState),mt("nodesConnectable",x,te.setState),mt("elementsSelectable",S,te.setState),mt("snapToGrid",N,te.setState),mt("snapGrid",I,te.setState),mt("onNodesChange",y,te.setState),mt("onEdgesChange",_,te.setState),mt("connectOnClick",A,te.setState),mt("fitViewOnInit",L,te.setState),mt("fitViewOnInitOptions",D,te.setState),mt("onNodesDelete",z,te.setState),mt("onEdgesDelete",P,te.setState),mt("onNodeDrag",K,te.setState),mt("onNodeDragStart",$,te.setState),mt("onNodeDragStop",Y,te.setState),mt("onSelectionDrag",U,te.setState),mt("onSelectionDragStart",Q,te.setState),mt("onSelectionDragStop",k,te.setState),Ri(r,J),Ri(n,ee),Ri(i,J),Ri(o,ee),Ri(m,G),Ri(b,H),Ri(T,q),Ri(w,X),null},Dne=".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%)}",jne=Dne,qne=".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}",Lne=qne,zne=function(t,r,n){return n===Se.Left?t-r:n===Se.Right?t+r:t},Bne=function(t,r,n){return n===Se.Top?t-r:n===Se.Bottom?t+r:t},qk=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 O.createElement("circle",{className:Jr(["react-flow__edgeupdater",r]),cx:zne(i,s,n),cy:Bne(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,m=n.labelBgStyle,b=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,A=n.sourcePosition,B=n.targetPosition,L=n.elementsSelectable,D=n.hidden,z=n.sourceHandleId,P=n.targetHandleId,K=n.onContextMenu,$=n.onMouseEnter,Y=n.onMouseMove,U=n.onMouseLeave,Q=n.edgeUpdaterRadius,k=n.onEdgeUpdate,W=n.onEdgeUpdateStart,J=n.onEdgeUpdateEnd,ee=n.markerEnd,j=n.markerStart,G=n.rfId,H=O.useState(!1),q=Ke(H,2),X=q[0],ne=q[1],te=Er(),ue=function(je){var Qe=te.getState(),dt=Qe.edges,Qt=Qe.addSelectedEdges,Mt=dt.find(function(St){return St.id===i});L&&(te.setState({nodesSelectionActive:!1}),Qt([i])),c==null||c(je,Mt)},re=es(i,te.getState,u),ge=es(i,te.getState,K),de=es(i,te.getState,$),xe=es(i,te.getState,Y),se=es(i,te.getState,U),le=function(je,Qe){var dt=Qe?S:_,Qt=(Qe?P:z)||null,Mt=Qe?"target":"source",St=function(){return!0},Dt=Qe,lr=te.getState().edges.find(function(Cr){return Cr.id===i});W==null||W(je,lr,Mt);var bn=J?function(Cr){return J(Cr,lr,Mt)}:void 0,Or=function(Be){return k==null?void 0:k(lr,Be)};Wz({event:je,handleId:Qt,nodeId:dt,onConnect:Or,isTarget:Dt,getState:te.getState,setState:te.setState,isValidConnection:St,elementEdgeUpdaterType:Mt,onEdgeUpdateEnd:bn})},we=function(je){return le(je,!0)},Oe=function(je){return le(je,!1)},Te=function(){return ne(!0)},qe=function(){return ne(!1)},Ue=O.useMemo(function(){return"url(#".concat(Nw(j,G),")")},[j,G]),De=O.useMemo(function(){return"url(#".concat(Nw(ee,G),")")},[ee,G]);if(D)return null;var ot=!L&&!c,vt=typeof k<"u",Et=Jr(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:d,animated:p,inactive:ot,updating:X}]);return O.createElement("g",{className:Et,onClick:ue,onDoubleClick:re,onContextMenu:ge,onMouseEnter:de,onMouseMove:xe,onMouseLeave:se},O.createElement(e,{id:i,source:_,target:S,selected:d,animated:p,label:v,labelStyle:h,labelShowBg:x,labelBgStyle:m,labelBgPadding:b,labelBgBorderRadius:w,data:s,style:y,sourceX:E,sourceY:I,targetX:N,targetY:T,sourcePosition:A,targetPosition:B,sourceHandleId:z,targetHandleId:P,markerStart:Ue,markerEnd:De,"data-testid":"rf__edge-".concat(i)}),vt&&O.createElement("g",{onMouseDown:we,onMouseEnter:Te,onMouseOut:qe},O.createElement(qk,{position:A,centerX:E,centerY:I,radius:Q})),vt&&O.createElement("g",{onMouseDown:Oe,onMouseEnter:Te,onMouseOut:qe},O.createElement(qk,{position:B,centerX:N,centerY:T,radius:Q})))};return t.displayName="EdgeWrapper",O.memo(t)});function Lk(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 zk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lk(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fne(e){var t={default:$o(e.default||kw),straight:$o(e.bezier||Vz),step:$o(e.step||Hz),smoothstep:$o(e.step||T_),simplebezier:$o(e.simplebezier||Fz)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=$o(e[o]||kw),i},r);return zk(zk({},t),n)}function Bk(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 Fk(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 $ne=function(t,r,n,i,o,a){var s=Bk(n,t,r),c=Bk(a,i,o);return{sourceX:s.x,sourceY:s.y,targetX:c.x,targetY:c.y}};function Hne(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=qu({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 $k(e,t){var r,n,i,o,a,s=e.get(t),c=(s==null||(r=s[ar])===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,Fu=(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=O.useState(!1),n=Ke(r,2),i=n[0],o=n[1],a=O.useRef(new Set([])),s=O.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,m){return x.concat.apply(x,so(m))},[]);return[v,h]}return[[],[]]},[e]),c=Ke(s,2),u=c[0],d=c[1];return O.useEffect(function(){if(e!==null){var p,v,h=function(w){if(Wk(w))return!1;var y=Vk(w.code,d);a.current.add(w[y]),Hk(u,a.current,!1)&&(w.preventDefault(),o(!0))},x=function(w){if(Wk(w))return!1;var y=Vk(w.code,d);Hk(u,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(w[y])},m=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",m),function(){var b,w;t==null||(b=t.target)===null||b===void 0||b.removeEventListener("keydown",h),t==null||(w=t.target)===null||w===void 0||w.removeEventListener("keyup",x),window.removeEventListener("blur",m)}}},[e,o]),i});function Hk(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 Wk(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 Wne=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},Une=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Er(),i=$t(Wne,Lr),o=i.onNodesChange,a=i.onEdgesChange,s=Fu(t),c=Fu(r);O.useEffect(function(){var u=n.getState(),d=u.nodeInternals,p=u.edges,v=u.hasDefaultNodes,h=u.hasDefaultEdges,x=u.onNodesDelete,m=u.onEdgesDelete,b=Array.from(d.values()),w=b.reduce(function(T,A){return(!A.selected&&A.parentNode&&T.find(function(B){return B.id===A.parentNode})||A.selected)&&T.push(A),T},[]),y=p.filter(function(T){return T.selected});if(s&&(w||y)){var _=Mz(w,p),S=[].concat(so(y),so(_)),E=S.reduce(function(T,A){return T.includes(A.id)||T.push(A.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&&(m==null||m(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]),O.useEffect(function(){n.setState({multiSelectionActive:c})},[c])});function Gne(e){var t=Er();O.useEffect(function(){var r,n=function(){if(e.current){var o=I_(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 Kne=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},hy=function(t){return{x:t.x,y:t.y,zoom:t.k}},Lc=function(t,r){return t.target.closest(".".concat(r))},Yne=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},Xne=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,m=t.zoomOnDoubleClick,b=m===void 0?!0:m,w=t.selectionKeyPressed,y=t.elementsSelectable,_=t.panOnDrag,S=_===void 0?!0:_,E=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,A=T===void 0?1:T,B=t.defaultPosition,L=B===void 0?[0,0]:B,D=t.zoomActivationKeyCode,z=t.preventScrolling,P=z===void 0?!0:z,K=t.children,$=t.noWheelClassName,Y=t.noPanClassName,U=Er(),Q=O.useRef(!1),k=O.useRef(null),W=O.useRef({x:0,y:0,zoom:0}),J=$t(Yne,Lr),ee=J.d3Zoom,j=J.d3Selection,G=J.d3ZoomHandler,H=Fu(D);return Gne(k),O.useEffect(function(){if(k.current){var q,X=Mre().scaleExtent([I,N]).translateExtent(E),ne=Sn(k.current).call(X),te=ra(L[0],E[0][0],E[1][0]),ue=ra(L[1],E[0][1],E[1][1]),re=ra(A,I,N),ge=ao.translate(te,ue).scale(re);X.transform(ne,ge),U.setState({d3Zoom:X,d3Selection:ne,d3ZoomHandler:ne.on("wheel.zoom"),transform:[te,ue,re],domNode:(q=ne.node())===null||q===void 0?void 0:q.closest(".react-flow")})}},[]),O.useEffect(function(){j&&ee&&(d&&!H?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 ne=Bn(q),te=-q.deltaY*(q.deltaMode===1?.05:q.deltaMode?1:.002)*10,ue=X*Math.pow(2,te);ee.scaleTo(j,ue,ne);return}var re=q.deltaMode===1?20:1,ge=x===ta.Vertical?0:q.deltaX*re,de=x===ta.Horizontal?0:q.deltaY*re;ee.translateBy(j,-(ge/X)*v,-(de/X)*v)}).on("wheel.zoom",null):typeof G<"u"&&j.on("wheel",function(q){if(!P||Lc(q,$))return null;q.preventDefault()}).on("wheel.zoom",G))},[d,x,j,ee,G,H,c,P,$]),O.useEffect(function(){ee&&(w&&!Q.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=hy(q.transform);r(q.sourceEvent,X)}}))},[w,ee,r]),O.useEffect(function(){ee&&ee.on("start",function(q){if(Q.current=!0,n){var X=hy(q.transform);W.current=X,n(q.sourceEvent,X)}})},[ee,n]),O.useEffect(function(){ee&&ee.on("end",function(q){if(Q.current=!1,i&&Kne(W.current,q.transform)){var X=hy(q.transform);W.current=X,i(q.sourceEvent,X)}})},[ee,i]),O.useEffect(function(){ee&&ee.filter(function(q){var X=H||a,ne=c&&q.ctrlKey;return!S&&!X&&!d&&!b&&!c||w||!b&&q.type==="dblclick"||Lc(q,$)&&q.type==="wheel"||Lc(q,Y)&&q.type!=="wheel"||!c&&q.ctrlKey&&q.type==="wheel"||!X&&!d&&!ne&&q.type==="wheel"||!S&&(q.type==="mousedown"||q.type==="touchstart")?!1:(!q.ctrlKey||q.type==="wheel")&&!q.button})},[ee,a,c,d,b,S,w,y,H]),O.createElement("div",{className:"react-flow__renderer react-flow__container",ref:k},K)};function Uk(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 Gk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uk(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kk(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var Zne=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},Yk={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},Jne=O.memo(function(e){var t=e.selectionKeyPressed,r=Er(),n=O.useRef(0),i=O.useRef(0),o=O.useRef(),a=O.useState(Yk),s=Ke(a,2),c=s[0],u=s[1],d=$t(Zne,Lr),p=d.userSelectionActive,v=d.elementsSelectable,h=p||t;if(!v||!h)return null;var x=function(){u(Yk),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},m=function(S){var E=S.target.closest(".react-flow");o.current=E.getBoundingClientRect();var I=Kk(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})},b=function(S){var E,I;if(!(!t||!c.draw||!o.current)){var N=Kk(S,o.current),T=(E=c.startX)!==null&&E!==void 0?E:0,A=(I=c.startY)!==null&&I!==void 0?I:0,B=Gk(Gk({},c),{},{x:N.x<T?N.x:T,y:N.y<A?N.y:A,width:Math.abs(N.x-T),height:Math.abs(N.y-A)}),L=r.getState(),D=L.nodeInternals,z=L.edges,P=L.transform,K=L.onNodesChange,$=L.onEdgesChange,Y=Array.from(D.values()),U=Az(D,B,P,!1,!0),Q=Mz(U,z).map(function(ee){return ee.id}),k=U.map(function(ee){return ee.id});if(n.current!==k.length){n.current=k.length;var W=Xo(Y,k);W.length&&(K==null||K(W))}if(i.current!==Q.length){i.current=Q.length;var J=Xo(z,Q);J.length&&($==null||$(J))}u(B)}},w=function(){r.setState({nodesSelectionActive:n.current>0}),x()},y=function(){r.setState({nodesSelectionActive:!1}),x()};return O.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:m,onMouseMove:b,onMouseUp:w,onMouseLeave:y},c.draw&&O.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 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 Zk(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){tt(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}function Jz(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:Jz(r,t):!1}function Jk(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 Qne(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!Jz(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 eie(e,t,r,n,i,o){var a=Ke(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,m,b=i.get(e.parentNode),w=(v=b==null||(h=b.positionAbsolute)===null||h===void 0?void 0:h.x)!==null&&v!==void 0?v:0,y=(x=b==null||(m=b.positionAbsolute)===null||m===void 0?void 0:m.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?Oz(d,u):d,e.position={x:e.positionAbsolute.x-_.x,y:e.positionAbsolute.y-_.y},e}function vy(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return Zk(Zk({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function gy(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function Qz(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=O.useState(!1),d=Ke(u,2),p=d[0],v=d[1],h=Er(),x=O.useRef(),m=O.useRef({x:null,y:null}),b=O.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,A=kz({x:N,y:T},S,I,E);return A},[]);return O.useEffect(function(){if(t!=null&&t.current){var w=Sn(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,A=S.onSelectionDragStart,B=a?T:gy(A);if(!c&&!I&&a){var L;(L=E.get(a))!==null&&L!==void 0&&L.selected||N()}a&&s&&c&&Pz({id:a,store:h});var D=b(_);if(m.current=D,x.current=Qne(E,D,a),B&&x.current){var z=vy({nodeId:a,dragItems:x.current,nodeInternals:E}),P=Ke(z,2),K=P[0],$=P[1];B(_.sourceEvent,K,$)}}).on("drag",function(_){var S=h.getState(),E=S.updateNodePositions,I=S.snapToGrid,N=S.snapGrid,T=S.nodeInternals,A=S.nodeExtent,B=S.onNodeDrag,L=S.onSelectionDrag,D=b(_);if((m.current.x!==D.x||m.current.y!==D.y)&&x.current){m.current=D,x.current=x.current.map(function(U){return eie(U,D,I,N,T,A)});var z=a?B:gy(L);if(E(x.current,!0,!0),v(!0),z){var P=vy({nodeId:a,dragItems:x.current,nodeInternals:T}),K=Ke(P,2),$=K[0],Y=K[1];z(_.sourceEvent,$,Y)}}_.on("end",function(U){if(v(!1),x.current){var Q=h.getState(),k=Q.updateNodePositions,W=Q.nodeInternals,J=Q.onNodeDragStop,ee=Q.onSelectionDragStop,j=a?J:gy(ee);if(k(x.current,!1,!1),j){var G=vy({nodeId:a,dragItems:x.current,nodeInternals:W}),H=Ke(G,2),q=H[0],X=H[1];j(U.sourceEvent,q,X)}}})}).filter(function(_){var S=_.target,E=!_.button&&(!i||!Jk(S,".".concat(i),t))&&(!o||Jk(S,o,t));return E});return w.call(y),function(){w.on(".drag",null)}}}},[t,n,i,o,s,h,a,c,b]),p}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 tie(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){tt(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 rie=function(t){return tie({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},R_(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},nie=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return R_(r)};function iie(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Er(),i=$t(rie,Lr),o=i.transformString,a=i.userSelectionActive,s=$t(nie,Lr),c=s.width,u=s.height,d=s.x,p=s.y,v=O.useRef(null);if(Qz({nodeRef:v}),a||!c||!u)return null;var h=t?function(x){var m=Array.from(n.getState().nodeInternals.values()).filter(function(b){return b.selected});t(x,m)}:void 0;return O.createElement("div",{className:Jr(["react-flow__nodesselection","react-flow__container",r]),style:{transform:o}},O.createElement("div",{ref:v,className:"react-flow__nodesselection-rect",onContextMenu:h,style:{width:c,height:u,top:p,left:d}}))}var oie=O.memo(iie),aie=function(t){return t.nodesSelectionActive},eB=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,m=t.zoomOnPinch,b=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,A=t.defaultPosition,B=t.preventScrolling,L=t.onSelectionContextMenu,D=t.noWheelClassName,z=t.noPanClassName,P=Er(),K=$t(aie),$=Fu(d);Une({deleteKeyCode:a,multiSelectionKeyCode:p});var Y=function(W){n==null||n(W),P.getState().resetSelectedElements(),P.setState({nodesSelectionActive:!1})},U=i?function(k){return i(k)}:void 0,Q=o?function(k){return o(k)}:void 0;return O.createElement(Xne,{onMove:s,onMoveStart:c,onMoveEnd:u,selectionKeyPressed:$,elementsSelectable:h,zoomOnScroll:x,zoomOnPinch:m,panOnScroll:b,panOnScrollSpeed:w,panOnScrollMode:y,zoomOnDoubleClick:_,panOnDrag:S,translateExtent:E,minZoom:I,maxZoom:N,defaultZoom:T,defaultPosition:A,zoomActivationKeyCode:v,preventScrolling:B,noWheelClassName:D,noPanClassName:z},r,O.createElement(Jne,{selectionKeyPressed:$}),K&&O.createElement(oie,{onSelectionContextMenu:L,noPanClassName:z}),O.createElement("div",{className:"react-flow__pane react-flow__container",onClick:Y,onContextMenu:U,onWheel:Q}))};eB.displayName="FlowRenderer";var sie=O.memo(eB);function lie(e){var t=$t(O.useCallback(function(r){return e?Az(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var cie=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},tB=function(t){var r=$t(cie,Lr),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,s=lie(t.onlyRenderVisibleElements),c=O.useRef(),u=O.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 O.useEffect(function(){return function(){var d;c==null||(d=c.current)===null||d===void 0||d.disconnect()}},[]),O.createElement("div",{className:"react-flow__nodes react-flow__container"},s.map(function(d){var p,v,h,x,m,b,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 O.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:(m=(b=d[ar])===null||b===void 0?void 0:b.z)!==null&&m!==void 0?m:0,isParent:!!((w=d[ar])!==null&&w!==void 0&&w.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!d.width&&!!d.height})}))};tB.displayName="NodeRenderer";var uie=O.memo(tB),Ho;function eA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eA(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var die=(Ho={},tt(Ho,Se.Left,Se.Right),tt(Ho,Se.Right,Se.Left),tt(Ho,Se.Top,Se.Bottom),tt(Ho,Se.Bottom,Se.Top),Ho),fie=(function(e){var t,r,n,i,o,a=e.connectionNodeId,s=e.connectionHandleType,c=e.connectionLineStyle,u=e.connectionLineType,d=u===void 0?Mi.Bezier:u,p=e.isConnectable,v=e.CustomConnectionLineComponent,h=$t(O.useCallback(function(Q){return{fromNode:Q.nodeInternals.get(a),handleId:Q.connectionHandleId,toX:(Q.connectionPosition.x-Q.transform[0])/Q.transform[2],toY:(Q.connectionPosition.y-Q.transform[1])/Q.transform[2]}},[a]),Lr),x=h.fromNode,m=h.handleId,b=h.toX,w=h.toY,y=x==null||(t=x[ar])===null||t===void 0?void 0:t.handleBounds;if(!x||!p||!(y!=null&&y[s]))return null;var _=y[s],S=m?_.find(function(Q){return Q.id===m}):_[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,A=S==null?void 0:S.position;if(!A)return null;var B=die[A],L,D,z,P,K,$;switch(s){case"source":L=N,D=T,z=A,P=b,K=w,$=B;break;case"target":L=b,D=w,z=B,P=N,K=T,$=A;break}if(v)return O.createElement("g",{className:"react-flow__connection"},O.createElement(v,{connectionLineType:d,connectionLineStyle:c,fromNode:x,fromHandle:S,fromX:N,fromY:T,toX:b,toY:w,fromPosition:A,toPosition:B,sourcePosition:z,targetPosition:$,sourceNode:x,sourceHandle:S,targetX:P,targetY:K,sourceX:L,sourceY:D}));var Y="",U={sourceX:L,sourceY:D,sourcePosition:z,targetX:P,targetY:K,targetPosition:$};return d===Mi.Bezier?Y=Cd(U):d===Mi.Step?Y=Pw(tA(tA({},U),{},{borderRadius:0})):d===Mi.SmoothStep?Y=Pw(U):d===Mi.SimpleBezier?Y=Bz(U):Y="M".concat(L,",").concat(D," ").concat(P,",").concat(K),O.createElement("g",{className:"react-flow__connection"},O.createElement("path",{d:Y,className:"react-flow__connection-path",style:c}))});function Dw(e){"@babel/helpers - typeof";return Dw=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},Dw(e)}var zc,pie=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return O.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:"none",points:"-5,-4 0,0 -5,4"})},hie=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return O.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},rA=(zc={},tt(zc,ju.Arrow,pie),tt(zc,ju.ArrowClosed,hie),zc);function vie(e){var t=O.useMemo(function(){var r=rA.hasOwnProperty(e);return r?rA[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 nA(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 gie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nA(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var mie=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=vie(n);return O.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"},O.createElement(x,{color:i,strokeWidth:p}))},bie=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&&Dw(c)==="object"){var u=Nw(c,n);o.includes(u)||(a.push(gie({id:u,color:c.color||r},c)),o.push(u))}}),a},[]).sort(function(a,s){return a.id.localeCompare(s.id)})}},rB=function(t){var r=t.defaultColor,n=t.rfId,i=$t(O.useCallback(bie({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 O.createElement("defs",null,i.map(function(o){return O.createElement(mie,{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})}))};rB.displayName="MarkerDefinitions";var yie=O.memo(rB),xie=[{level:0,isMaxLevel:!0,edges:[]}];function wie(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,s){var c=Iz(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[ar])===null||p===void 0?void 0:p.z)||0,((v=t.get(s.target))===null||v===void 0||(h=v[ar])===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=Ke(a,2),c=s[0],u=s[1],d=+c;return{edges:u,level:d,isMaxLevel:d===n}});return o.length===0?xie:o}function _ie(e,t,r){var n=$t(O.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)&&Hne({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 wie(n,t,r)}var Eie=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}},nB=function(t){var r=$t(Eie,Lr),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=_ie(t.onlyRenderVisibleElements,d,t.elevateEdgesOnSelect);if(!s)return null;var v=t.connectionLineType,h=t.defaultMarkerColor,x=t.connectionLineStyle,m=t.connectionLineComponent,b=t.connectionLineContainerStyle,w=n&&i;return O.createElement(O.Fragment,null,p.map(function(y){var _=y.level,S=y.edges,E=y.isMaxLevel;return O.createElement("svg",{key:_,style:{zIndex:_},width:s,height:c,className:"react-flow__edges react-flow__container"},E&&O.createElement(yie,{defaultColor:h,rfId:t.rfId}),O.createElement("g",null,S.map(function(I){var N=$k(d,I.source),T=Ke(N,3),A=T[0],B=T[1],L=T[2],D=$k(d,I.target),z=Ke(D,3),P=z[0],K=z[1],$=z[2];if(!L||!$)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,Q=u===pa.Strict?K.target:K.target||K.source,k=Fk(B.source,I.sourceHandle||null),W=Fk(Q,I.targetHandle||null),J=(k==null?void 0:k.position)||Se.Bottom,ee=(W==null?void 0:W.position)||Se.Top;if(!k)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=$ne(A,k,J,P,W,ee),G=j.sourceX,H=j.sourceY,q=j.targetX,X=j.targetY;return O.createElement(U,{key:I.id,id:I.id,className:Jr([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:G,sourceY:H,targetX:q,targetY:X,sourcePosition:J,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&&O.createElement("svg",{style:b,width:s,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},O.createElement(fie,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:x,connectionLineType:v,isConnectable:o,CustomConnectionLineComponent:m})))};nB.displayName="EdgeRenderer";var Sie=O.memo(nB),Oie=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function Cie(e){var t=e.children,r=$t(Oie);return O.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function Iie(e){var t=Lz(),r=O.useRef(!1);O.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var iB=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,m=t.onNodeContextMenu,b=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,A=t.onlyRenderVisibleElements,B=t.elementsSelectable,L=t.selectNodesOnDrag,D=t.translateExtent,z=t.minZoom,P=t.maxZoom,K=t.defaultZoom,$=t.defaultPosition,Y=t.preventScrolling,U=t.defaultMarkerColor,Q=t.zoomOnScroll,k=t.zoomOnPinch,W=t.panOnScroll,J=t.panOnScrollSpeed,ee=t.panOnScrollMode,j=t.zoomOnDoubleClick,G=t.panOnDrag,H=t.onPaneClick,q=t.onPaneScroll,X=t.onPaneContextMenu,ne=t.onEdgeUpdate,te=t.onEdgeContextMenu,ue=t.onEdgeMouseEnter,re=t.onEdgeMouseMove,ge=t.onEdgeMouseLeave,de=t.edgeUpdaterRadius,xe=t.onEdgeUpdateStart,se=t.onEdgeUpdateEnd,le=t.noDragClassName,we=t.noWheelClassName,Oe=t.noPanClassName,Te=t.elevateEdgesOnSelect,qe=t.id;return Iie(s),O.createElement(sie,{onPaneClick:H,onPaneContextMenu:X,onPaneScroll:q,deleteKeyCode:T,selectionKeyCode:E,multiSelectionKeyCode:I,zoomActivationKeyCode:N,elementsSelectable:B,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:Q,zoomOnPinch:k,zoomOnDoubleClick:j,panOnScroll:W,panOnScrollSpeed:J,panOnScrollMode:ee,panOnDrag:G,translateExtent:D,minZoom:z,maxZoom:P,defaultZoom:K,defaultPosition:$,onSelectionContextMenu:b,preventScrolling:Y,noDragClassName:le,noWheelClassName:we,noPanClassName:Oe},O.createElement(Cie,null,O.createElement(Sie,{edgeTypes:n,onEdgeClick:u,onEdgeDoubleClick:p,connectionLineType:w,connectionLineStyle:y,connectionLineComponent:_,connectionLineContainerStyle:S,onEdgeUpdate:ne,onlyRenderVisibleElements:A,onEdgeContextMenu:te,onEdgeMouseEnter:ue,onEdgeMouseMove:re,onEdgeMouseLeave:ge,onEdgeUpdateStart:xe,onEdgeUpdateEnd:se,edgeUpdaterRadius:de,defaultMarkerColor:U,noPanClassName:Oe,elevateEdgesOnSelect:!!Te,rfId:qe}),O.createElement(uie,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:d,onNodeMouseEnter:v,onNodeMouseMove:h,onNodeMouseLeave:x,onNodeContextMenu:m,selectNodesOnDrag:L,onlyRenderVisibleElements:A,noPanClassName:Oe,noDragClassName:le})))};iB.displayName="GraphView";var Rie=O.memo(iB),oB=function(){return null};oB.displayName="GroupNode";function iA(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 oA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iA(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ts=(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,m=n.onDoubleClick,b=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,A=n.resizeObserver,B=n.dragHandle,L=n.zIndex,D=n.isParent,z=n.noPanClassName,P=n.noDragClassName,K=n.initialized,$=Er(),Y=O.useRef(null),U=O.useRef(I),Q=O.useRef(N),k=O.useRef(o),W=_||y||d||p||v||h,J=Qa(i,$.getState,p),ee=Qa(i,$.getState,v),j=Qa(i,$.getState,h),G=Qa(i,$.getState,x),H=Qa(i,$.getState,m),q=function(te){if(_&&(!E||!y)&&Pz({id:i,store:$}),d){var ue=$.getState().nodeInternals.get(i);d(te,oA({},ue))}};O.useEffect(function(){if(Y.current&&!T){var ne=Y.current;return A==null||A.observe(ne),function(){return A==null?void 0:A.unobserve(ne)}}},[T]),O.useEffect(function(){var ne=k.current!==o,te=U.current!==I,ue=Q.current!==N;Y.current&&(ne||te||ue)&&(ne&&(k.current=o),te&&(U.current=I),ue&&(Q.current=N),$.getState().updateNodeDimensions([{id:i,nodeElement:Y.current,forceUpdate:!0}]))},[i,o,I,N]);var X=Qz({nodeRef:Y,disabled:T||!y,noDragClassName:P,handleSelector:B,nodeId:i,isSelectable:_,selectNodesOnDrag:E});return T?null:O.createElement("div",{className:Jr(["react-flow__node","react-flow__node-".concat(o),z,w,{selected:u,selectable:_,parent:D}]),ref:Y,style:oA({zIndex:L,transform:"translate(".concat(s,"px,").concat(c,"px)"),pointerEvents:W?"all":"none",visibility:K?"visible":"hidden"},b),onMouseEnter:J,onMouseMove:ee,onMouseLeave:j,onContextMenu:G,onClick:q,onDoubleClick:H,"data-testid":"rf__node-".concat(i),"data-id":i},O.createElement(One,{value:i},O.createElement(e,{id:i,data:a,type:o,xPos:s,yPos:c,selected:u,isConnectable:S,sourcePosition:I,targetPosition:N,dragging:X,dragHandle:B,zIndex:L})))};return t.displayName="NodeWrapper",O.memo(t)});function aA(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 sA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aA(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nie(e){var t={input:ts(e.input||Yz),default:ts(e.default||Mw),output:ts(e.output||Zz),group:ts(e.group||oB)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=ts(e[o]||Mw),i},r);return sA(sA({},t),n)}function lA(e,t){var r=O.useRef(null),n=O.useMemo(function(){if(process.env.NODE_ENV==="development"){var i=Object.keys(e);Lr(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 cA(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 aB=function(t){var r=t.children,n=!0;try{Er()}catch{n=!1}return n?O.createElement(O.Fragment,null,r):O.createElement(Gre,{createStore:Kre},r)};aB.displayName="ReactFlowWrapper";var Tie=["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 uA(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 dA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uA(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}cA(jne),cA(Lne);var Pie={input:Yz,default:Mw,output:Zz},kie={default:kw,straight:Vz,step:Hz,smoothstep:T_,simplebezier:Fz},Aie=[15,15],Mie=[0,0],sB=O.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?Pie:s,u=e.edgeTypes,d=u===void 0?kie:u,p=e.onNodeClick,v=e.onEdgeClick,h=e.onInit,x=e.onMove,m=e.onMoveStart,b=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,A=e.onNodeMouseMove,B=e.onNodeMouseLeave,L=e.onNodeContextMenu,D=e.onNodeDoubleClick,z=e.onNodeDragStart,P=e.onNodeDrag,K=e.onNodeDragStop,$=e.onNodesDelete,Y=e.onEdgesDelete,U=e.onSelectionChange,Q=e.onSelectionDragStart,k=e.onSelectionDrag,W=e.onSelectionDragStop,J=e.onSelectionContextMenu,ee=e.connectionMode,j=ee===void 0?pa.Strict:ee,G=e.connectionLineType,H=G===void 0?Mi.Bezier:G,q=e.connectionLineStyle,X=e.connectionLineComponent,ne=e.connectionLineContainerStyle,te=e.deleteKeyCode,ue=te===void 0?"Backspace":te,re=e.selectionKeyCode,ge=re===void 0?"Shift":re,de=e.multiSelectionKeyCode,xe=de===void 0?"Meta":de,se=e.zoomActivationKeyCode,le=se===void 0?"Meta":se,we=e.snapToGrid,Oe=we===void 0?!1:we,Te=e.snapGrid,qe=Te===void 0?Aie:Te,Ue=e.onlyRenderVisibleElements,De=Ue===void 0?!1:Ue,ot=e.selectNodesOnDrag,vt=ot===void 0?!0:ot,Et=e.nodesDraggable,We=e.nodesConnectable,je=e.elementsSelectable,Qe=e.minZoom,dt=Qe===void 0?.5:Qe,Qt=e.maxZoom,Mt=Qt===void 0?2:Qt,St=e.defaultZoom,Dt=St===void 0?1:St,lr=e.defaultPosition,bn=lr===void 0?Mie:lr,Or=e.translateExtent,Cr=Or===void 0?Tw:Or,Be=e.preventScrolling,Xe=Be===void 0?!0:Be,et=e.nodeExtent,yt=e.defaultMarkerColor,Pt=yt===void 0?"#b1b1b7":yt,Ut=e.zoomOnScroll,jt=Ut===void 0?!0:Ut,Nt=e.zoomOnPinch,qt=Nt===void 0?!0:Nt,Ir=e.panOnScroll,Lt=Ir===void 0?!1:Ir,rr=e.panOnScrollSpeed,hr=rr===void 0?.5:rr,yn=e.panOnScrollMode,Rr=yn===void 0?ta.Free:yn,Br=e.zoomOnDoubleClick,Kn=Br===void 0?!0:Br,$i=e.panOnDrag,Hd=$i===void 0?!0:$i,Vd=e.onPaneClick,Wd=e.onPaneScroll,Ud=e.onPaneContextMenu,Gd=e.children,vl=e.onEdgeUpdate,Kd=e.onEdgeContextMenu,Yd=e.onEdgeDoubleClick,Xd=e.onEdgeMouseEnter,Zd=e.onEdgeMouseMove,Jd=e.onEdgeMouseLeave,Qd=e.onEdgeUpdateStart,wo=e.onEdgeUpdateEnd,gl=e.edgeUpdaterRadius,_o=gl===void 0?10:gl,ef=e.onNodesChange,tf=e.onEdgesChange,ml=e.noDragClassName,bl=ml===void 0?"nodrag":ml,Na=e.noWheelClassName,yl=Na===void 0?"nowheel":Na,xl=e.noPanClassName,rf=xl===void 0?"nopan":xl,wl=e.fitView,nf=wl===void 0?!1:wl,_l=e.fitViewOptions,Ta=e.connectOnClick,El=Ta===void 0?!0:Ta,Pa=e.attributionPosition,of=e.proOptions,Sl=e.defaultEdgeOptions,Hi=e.elevateEdgesOnSelect,Ol=Hi===void 0?!1:Hi,Eo=Sd(e,Tie),Cl=lA(c,Nie),Il=lA(d,Fne);return O.createElement("div",dA(dA({},Eo),{},{ref:t,className:Jr(["react-flow",a])}),O.createElement(aB,null,O.createElement(Rie,{onInit:h,onMove:x,onMoveStart:m,onMoveEnd:b,onNodeClick:p,onEdgeClick:v,onNodeMouseEnter:T,onNodeMouseMove:A,onNodeMouseLeave:B,onNodeContextMenu:L,onNodeDoubleClick:D,nodeTypes:Cl,edgeTypes:Il,connectionLineType:H,connectionLineStyle:q,connectionLineComponent:X,connectionLineContainerStyle:ne,selectionKeyCode:ge,deleteKeyCode:ue,multiSelectionKeyCode:xe,zoomActivationKeyCode:le,onlyRenderVisibleElements:De,selectNodesOnDrag:vt,translateExtent:Cr,minZoom:dt,maxZoom:Mt,defaultZoom:Dt,defaultPosition:bn,preventScrolling:Xe,zoomOnScroll:jt,zoomOnPinch:qt,zoomOnDoubleClick:Kn,panOnScroll:Lt,panOnScrollSpeed:hr,panOnScrollMode:Rr,panOnDrag:Hd,onPaneClick:Vd,onPaneScroll:Wd,onPaneContextMenu:Ud,onSelectionContextMenu:J,onEdgeUpdate:vl,onEdgeContextMenu:Kd,onEdgeDoubleClick:Yd,onEdgeMouseEnter:Xd,onEdgeMouseMove:Zd,onEdgeMouseLeave:Jd,onEdgeUpdateStart:Qd,onEdgeUpdateEnd:wo,edgeUpdaterRadius:_o,defaultMarkerColor:Pt,noDragClassName:bl,noWheelClassName:yl,noPanClassName:rf,elevateEdgesOnSelect:Ol,id:Eo==null?void 0:Eo.id}),O.createElement(Mne,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:w,onConnectStart:y,onConnectStop:_,onConnectEnd:S,onClickConnectStart:E,onClickConnectStop:I,onClickConnectEnd:N,nodesDraggable:Et,nodesConnectable:We,elementsSelectable:je,minZoom:dt,maxZoom:Mt,nodeExtent:et,onNodesChange:ef,onEdgesChange:tf,snapToGrid:Oe,snapGrid:qe,connectionMode:j,translateExtent:Cr,connectOnClick:El,defaultEdgeOptions:Sl,fitView:nf,fitViewOptions:_l,onNodesDelete:$,onEdgesDelete:Y,onNodeDragStart:z,onNodeDrag:P,onNodeDragStop:K,onSelectionDrag:k,onSelectionDragStart:Q,onSelectionDragStop:W}),U&&O.createElement(kne,{onSelectionChange:U}),Gd,O.createElement(mne,{proOptions:of,position:Pa})))});sB.displayName="ReactFlow";function lB(e){return function(t){var r=O.useState(t),n=Ke(r,2),i=n[0],o=n[1],a=O.useCallback(function(s){return o(function(c){return e(s,c)})},[]);return[i,o,a]}}var Die=lB(Nz),jie=lB(Bre);function fA(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)),m=x*v,b=x*h,w=a*(m+b)+c,y=s*(-m+b)+u;return{x:w,y}}function pA(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 cB(e,t){const r=fA(e,t),n=fA(t,e),i=pA(e,r),o=pA(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const qie=({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}=cB(i,o),c=Cd({sourceX:a,sourceY:s,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})]})},Lie=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=$t(O.useCallback(x=>x.nodeInternals.get(t),[t])),a=$t(O.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}=cB(o,a),h=Cd({sourceX:s,sourceY:c,sourcePosition:p,targetPosition:v,targetX:u,targetY:d});return C.jsx("path",{id:e,className:"react-flow__edge-path",d:h,markerEnd:n,style:i})},hA=172,vA=36,zie={custom:Lie},Bie=(e,t,r="LR")=>{const n=new QP.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:hA,height:vA})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),QP.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-hA/2,y:a.y-vA/2},o}),{nodes:e,edges:t}},Fie=()=>{},$ie=({data:e,dict:t,onSelect:r=Fie})=>{const{nodes:n,edges:i}=Bie(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]=Die(n),[c,u,d]=jie(i);return O.useEffect(()=>{a([...n]),u([...i])},[e]),C.jsx(sB,{nodes:o,edges:c,fitView:!0,onNodesChange:s,onEdgesChange:d,onNodeClick:(p,v)=>{r(v.id)},defaultZoom:.5,edgeTypes:zie,connectionLineComponent:qie,children:C.jsx(vne,{variant:po.Dots,color:"#81818140",gap:18,size:1})})};var uB=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(uB||{});const dB=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}},gA=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[uB[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=dB(a.applyTo)),n.push(c)}});return n},Hie=(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 k_(e,t=[],r=[],n=[]){const i=gA(r,e,fe.EPermissionType.ATTRIBUTE),o=gA(r,e,fe.EPermissionType.METHOD),a=Hie(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,m]=v.applyTo.split("."),b=p.find(w=>w.prefix===x);return b?(b.resources=[...b.resources,v].sort((w,y)=>{const _=h.indexOf(w.type),S=h.indexOf(y.type);return _>S?1:-1}),b.type=m?b.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:m?null:v.type,resources:[v]}]},[]).reduce((p,v)=>[...p,...v.resources],[])}const Vie=(e=[],t=[],r=[])=>{const n=k_("",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},fB=(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:dB(p)}}return o})}}),r},pB=(e,t)=>Object.entries(e).map(([r,n])=>{const i=n.resources.map(o=>{var u,d,p,v,h,x,m,b;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=!!((m=t.dataClasses[a])!=null&&m.methods.find(w=>w.name===s&&w.applyTo==="entity"));break;case fe.EPermissionType.SINGLETON_METHOD:c=!!((b=t.singletons[a])!=null&&b.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 my={exports:{}};/*!
|
|
54
|
+
*/var sC;function v9(){return sC||(sC=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,m=!1,b=!1,w=!1,y=!1,_;_=Symbol.for("react.module.reference");function S(de){return!!(typeof de=="string"||typeof de=="function"||de===r||de===i||y||de===n||de===u||de===d||w||de===h||x||m||b||typeof de=="object"&&de!==null&&(de.$$typeof===v||de.$$typeof===p||de.$$typeof===o||de.$$typeof===a||de.$$typeof===c||de.$$typeof===_||de.getModuleId!==void 0))}function E(de){if(typeof de=="object"&&de!==null){var xe=de.$$typeof;switch(xe){case e:var se=de.type;switch(se){case r:case i:case n:case u:case d:return se;default:var le=se&&se.$$typeof;switch(le){case s:case a:case c:case v:case p:case o:return le;default:return xe}}case t:return xe}}}var I=a,N=o,T=e,A=c,B=r,L=v,D=p,z=t,P=i,K=n,$=u,Y=d,U=!1,Q=!1;function k(de){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(de){return Q||(Q=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function J(de){return E(de)===a}function ee(de){return E(de)===o}function j(de){return typeof de=="object"&&de!==null&&de.$$typeof===e}function G(de){return E(de)===c}function H(de){return E(de)===r}function q(de){return E(de)===v}function X(de){return E(de)===p}function ne(de){return E(de)===t}function te(de){return E(de)===i}function ue(de){return E(de)===n}function re(de){return E(de)===u}function ge(de){return E(de)===d}ht.ContextConsumer=I,ht.ContextProvider=N,ht.Element=T,ht.ForwardRef=A,ht.Fragment=B,ht.Lazy=L,ht.Memo=D,ht.Portal=z,ht.Profiler=P,ht.StrictMode=K,ht.Suspense=$,ht.SuspenseList=Y,ht.isAsyncMode=k,ht.isConcurrentMode=W,ht.isContextConsumer=J,ht.isContextProvider=ee,ht.isElement=j,ht.isForwardRef=G,ht.isFragment=H,ht.isLazy=q,ht.isMemo=X,ht.isPortal=ne,ht.isProfiler=te,ht.isStrictMode=ue,ht.isSuspense=re,ht.isSuspenseList=ge,ht.isValidElementType=S,ht.typeOf=E})()),ht}var lC;function g9(){return lC||(lC=1,process.env.NODE_ENV==="production"?kp.exports=h9():kp.exports=v9()),kp.exports}var cC=g9();const uC=e=>typeof e=="object"&&e!=null&&e.nodeType===1,dC=(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 dC(r.overflowY,t)||dC(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,m9=e=>e.parentElement??(e.getRootNode().host||null),b9=(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(!uC(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,p=[];let v=e;for(;uC(v)&&u(v);){if(v=m9(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:m,scrollY:b}=window,{height:w,width:y,top:_,right:S,bottom:E,left:I}=e.getBoundingClientRect(),{top:N,right:T,left:A}=(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 B=_-N,L=a==="center"?I+y/2-A+T:a==="end"?S+T:I-A;const D=[];for(let z=0;z<p.length;z++){const P=p[z],{height:K,width:$,top:Y,right:U,bottom:Q,left:k}=P.getBoundingClientRect();if(_>=0&&I>=0&&E<=x&&S<=h&&(P===d&&!Oc(P)||_>=Y&&E<=Q&&I>=k&&S<=U))return D;const W=getComputedStyle(P),J=parseInt(W.borderLeftWidth,10),ee=parseInt(W.borderTopWidth,10),j=parseInt(W.borderRightWidth,10),G=parseInt(W.borderBottomWidth,10);let H=0,q=0;const X="offsetWidth"in P?P.offsetWidth-P.clientWidth-J-j:0,ne="offsetHeight"in P?P.offsetHeight-P.clientHeight-ee-G:0,te="offsetWidth"in P?P.offsetWidth===0?0:$/P.offsetWidth:0,ue="offsetHeight"in P?P.offsetHeight===0?0:K/P.offsetHeight:0;if(d===P)H=Cc(b,b+x,x,ee,G,b+B,b+B+w,w),q=a==="start"?L:a==="center"?L-h/2:a==="end"?L-h:Cc(m,m+h,h,J,j,m+L,m+L+y,y),H=Math.max(0,H+b),q=Math.max(0,q+m);else{H=Cc(Y,Q,K,ee,G+ne,B,B+w,w),q=a==="start"?L-k-J:a==="center"?L-(k+$/2)+X/2:a==="end"?L-U+j+X:Cc(k,U,$,J,j+X,L,L+y,y);const{scrollLeft:re,scrollTop:ge}=P;H=ue===0?0:Math.max(0,Math.min(ge+H/ue,P.scrollHeight-K/ue+ne)),q=te===0?0:Math.max(0,Math.min(re+q/te,P.scrollWidth-$/te+X)),B+=ge-H,L+=re-q}D.push({el:P,top:H,left:q})}return D};var aa=function(){return aa=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},aa.apply(this,arguments)},y9=0;function fC(e){return typeof e=="function"?e:br}function br(){}function Lq(e,t){if(e){var r=b9(e,{boundary:t});r.forEach(function(n){var i=n.el,o=n.top,a=n.left;i.scrollTop=o,i.scrollLeft=a})}}function pC(e,t,r){var n=e===t||t instanceof r.Node&&e.contains&&e.contains(t);return n}function Zu(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 it(){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 Cn(){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 zq(){return String(y9++)}function x9(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 hC(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function Bq(e){return typeof e.type=="string"}function Fq(e){return e.props}function w9(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var _9=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Ic(e){e===void 0&&(e={});var t={};return _9.forEach(function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function qs(e,t){return!e||!t?e:Object.keys(e).reduce(function(r,n){return r[n]=wu(t,n)?t[n]:e[n],r},{})}function wu(e,t){return e[t]!==void 0}function sa(e){var t=e.key,r=e.keyCode;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function E9(e){return Object.prototype.toString.call(e)==="[object Object]"}function In(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 _u(e,t,r,n){return n===void 0&&(n=!0),r&&t.some(function(i){return i&&(pC(i,e,r)||n&&pC(i,r.document.activeElement,r))})}var s1=br;process.env.NODE_ENV!=="production"&&(s1=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 S9=Zu(function(e){$q(e).textContent=""},500);function $q(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 Hq(e,t){if(!(!e||!t)){var r=$q(t);r.textContent=e,S9(t)}}function O9(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,Wq=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,Uq=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,Gq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,Kq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,Yq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Xq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,Zq=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,Jq=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Qq=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,eL=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,vw=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,tL=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,rL=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,nL=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,C9=Object.freeze({__proto__:null,blurButton:tL,blurInput:Jq,changeInput:Qq,clickButton:vw,clickItem:Zq,controlledPropUpdatedSelectedItem:rL,itemMouseEnter:Uq,keyDownArrowDown:Qc,keyDownArrowUp:Jc,keyDownEnd:Xq,keyDownEnter:Kq,keyDownEscape:Gq,keyDownHome:Yq,keyDownSpaceButton:eL,mouseUp:Wq,touchEnd:nL,unknown:Vq}),I9=["refKey","ref"],R9=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],N9=["onKeyDown","onBlur","onChange","onInput","onChangeText"],T9=["refKey","ref"],P9=["onMouseMove","onMouseDown","onClick","onPress","index","item"],k9=(function(){var e=(function(t){function r(i){var o;o=t.call(this,i)||this,o.id=o.props.id||"downshift-"+zq(),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 A;T=o.getState(T);var B=N?y(T):y;B=o.props.stateReducer(T,B),S=B.hasOwnProperty("selectedItem");var L={};return S&&B.selectedItem!==T.selectedItem&&(E=B.selectedItem),(A=B).type||(A.type=Vq),Object.keys(B).forEach(function(D){T[D]!==B[D]&&(I[D]=B[D]),D!=="type"&&(B[D],wu(o.props,D)||(L[D]=B[D]))}),N&&B.hasOwnProperty("inputValue")&&o.props.onInputValueChange(B.inputValue,ke({},o.getStateAndHelpers(),B)),L},function(){fC(_)();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,A=yr(E,I9),B=_===void 0?{}:_,L=B.suppressRefError,D=L===void 0?!1:L;o.getRootProps.called=!0,o.getRootProps.refKey=N,o.getRootProps.suppressRefError=D;var z=o.getState(),P=z.isOpen;return ke((S={},S[N]=Cn(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),A)},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=In(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=In(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:Kq})}}},Escape:function(y){y.preventDefault(),this.reset(ke({type:Gq},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},o.buttonKeyDownHandlers=ke({},o.keyDownHandlers,{" ":function(y){y.preventDefault(),this.toggleMenu({type:eL})}}),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:Yq})}}},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:Xq})}}}}),o.getToggleButtonProps=function(y){var _=y===void 0?{}:y,S=_.onClick;_.onPress;var E=_.onKeyDown,I=_.onKeyUp,N=_.onBlur,T=yr(_,R9),A=o.getState(),B=A.isOpen,L={onClick:it(S,o.buttonHandleClick),onKeyDown:it(E,o.buttonHandleKeyDown),onKeyUp:it(I,o.buttonHandleKeyUp),onBlur:it(N,o.buttonHandleBlur)},D=T.disabled?{}:L;return ke({type:"button",role:"button","aria-label":B?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},D,T)},o.buttonHandleKeyUp=function(y){y.preventDefault()},o.buttonHandleKeyDown=function(y){var _=sa(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:vw}):o.internalSetTimeout(function(){return o.toggleMenu({type:vw})})},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:tL})}})},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(_,N9),A,B={};A="onChange";var L=o.getState(),D=L.inputValue,z=L.isOpen,P=L.highlightedIndex;if(!T.disabled){var K;B=(K={},K[A]=it(I,N,o.inputHandleChange),K.onKeyDown=it(S,o.inputHandleKeyDown),K.onBlur=it(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:D,id:o.inputId},B,T)},o.inputHandleKeyDown=function(y){var _=sa(y);_&&o.inputKeyDownHandlers[_]&&o.inputKeyDownHandlers[_].call(o,y)},o.inputHandleChange=function(y){o.internalSetState({type:Qq,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:Jq})}})},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,A=yr(E,T9),B=_===void 0?{}:_,L=B.suppressRefError,D=L===void 0?!1:L;return o.getMenuProps.called=!0,o.getMenuProps.refKey=N,o.getMenuProps.suppressRefError=D,ke((S={},S[N]=Cn(T,o.menuRef),S.role="listbox",S["aria-labelledby"]=A&&A["aria-label"]?void 0:o.labelId,S.id=o.menuId,S),A)},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,A=S.item,B=A===void 0?process.env.NODE_ENV==="production"?void 0:w9("getItemProps","item"):A,L=yr(S,P9);T===void 0?(o.items.push(B),T=o.items.indexOf(B)):o.items[T]=B;var D="onClick",z=N,P=(_={onMouseMove:it(E,function(){T!==o.getState().highlightedIndex&&(o.setHighlightedIndex(T,{type:Uq}),o.avoidScrolling=!0,o.internalSetTimeout(function(){return o.avoidScrolling=!1},250))}),onMouseDown:it(I,function($){$.preventDefault()})},_[D]=it(z,function(){o.selectItemAtIndex(T,{type:Zq})}),_),K=L.disabled?{onMouseDown:P.onMouseDown}:P;return ke({id:o.getItemId(T),role:"option","aria-selected":o.getState().highlightedIndex===T},K,L)},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),fC(_)()})},o.openMenu=function(y){o.internalSetState({isOpen:!0},y)},o.closeMenu=function(y){o.internalSetState({isOpen:!1},y)},o.updateStatus=Zu(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,Hq(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,m=a.initialSelectedItem,b=m===void 0?null:m,w=o.getState({highlightedIndex:u,isOpen:v,inputValue:x,selectedItem:b});return w.selectedItem!=null&&o.props.initialInputValue===void 0&&(w.inputValue=o.props.itemToString(w.selectedItem)),o.state=w,o}o9(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),qs(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=In(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,m=this.getInputProps,b=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,A=this.clearItems,B=this.reset,L=this.setItemCount,D=this.unsetItemCount,z=this.internalSetState;return{getRootProps:p,getToggleButtonProps:v,getLabelProps:h,getMenuProps:x,getInputProps:m,getItemProps:b,reset:B,openMenu:w,closeMenu:y,toggleMenu:_,selectItem:S,selectItemAtIndex:E,selectHighlightedItem:I,setHighlightedIndex:N,clearSelection:T,clearItems:A,setItemCount:L,unsetItemCount:D,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&&vC(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=_u(p.target,[i._rootNode,i._menuNode],i.props.environment);!v&&i.getState().isOpen&&i.reset({type:Wq},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},s=function(){i.isTouchMove=!1},c=function(){i.isTouchMove=!0},u=function(p){var v=_u(p.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!v&&i.getState().isOpen&&i.reset({type:nL},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"&&(s1(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&vC(this._menuNode,this.getMenuProps)),wu(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:rL,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=hC(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=hC(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&&A9(o,this.getRootProps),o;if(Bq(o))return O.cloneElement(o,this.getRootProps(Fq(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})(O.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:x9,itemToString:function(t){return t==null?"":(process.env.NODE_ENV!=="production"&&E9(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:Lq},e.stateChangeTypes=C9,e})();process.env.NODE_ENV!=="production"&&(k9.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 vC(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 A9(e,t){var r=t.refKey,n=r!=="ref",i=!Bq(e);i&&!n&&!cC.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+'"'),!cC.isForwardRef(e)&&!Fq(e)[r]&&console.error('downshift: You must apply the ref prop "'+r+'" from getRootProps onto your root element.')}var iL={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function M9(e,t,r){var n=e.props,i=e.type,o={};Object.keys(t).forEach(function(a){D9(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 D9(e,t,r,n){var i=t.props,o=t.type,a="on"+c1(e)+"Change";i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a](ke({type:o},n))}function j9(e,t){return t.changes}var gC=Zu(function(e,t){Hq(e,t)},200),q9=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?O.useLayoutEffect:O.useEffect,oL="useId"in O?function(e){var t=e.id,r=e.labelId,n=e.menuId,i=e.getItemId,o=e.toggleButtonId,a=e.inputId,s="downshift-"+O.useId();t||(t=s);var c=O.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-"+zq():t,n=e.labelId,i=e.menuId,o=e.getItemId,a=e.toggleButtonId,s=e.inputId,c=O.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 l1(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 L9(e){return/^\S{1}$/.test(e)}function c1(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Ju(e){var t=O.useRef(e);return t.current=e,t}function aL(e,t,r,n){var i=O.useRef(),o=O.useRef(),a=O.useCallback(function(h,x){o.current=x,h=qs(h,x.props);var m=e(h,x),b=x.props.stateReducer(h,ke({},x,{changes:m}));return b},[e]),s=O.useReducer(a,t,r),c=s[0],u=s[1],d=Ju(t),p=O.useCallback(function(h){return u(ke({props:d.current},h))},[d]),v=o.current;return O.useEffect(function(){var h=qs(i.current,v==null?void 0:v.props),x=v&&i.current&&!n(h,c);x&&M9(v,h,c),i.current=c},[c,v,n]),[c,p]}function sL(e,t,r,n){var i=aL(e,t,r,n),o=i[0],a=i[1];return[qs(o,t),a]}var Is={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:j9,scrollIntoView:Lq,environment:typeof window>"u"?void 0:window};function Fn(e,t,r){r===void 0&&(r=iL);var n=e["default"+c1(t)];return n!==void 0?n:r[t]}function ro(e,t,r){r===void 0&&(r=iL);var n=e[t];if(n!==void 0)return n;var i=e["initial"+c1(t)];return i!==void 0?i:Fn(e,t,r)}function lL(e){var t=ro(e,"selectedItem"),r=ro(e,"isOpen"),n=z9(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 cL(e,t,r){var n=O.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),i=O.useCallback(function(){return r.map(function(o){return o.current})},[r]);return O.useEffect(function(){if(!e)return br;function o(){n.current.isTouchEnd=!1,n.current.isMouseDown=!0}function a(d){n.current.isMouseDown=!1,_u(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&&!_u(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 Qu=function(){return br};process.env.NODE_ENV!=="production"&&(Qu=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=O.useRef(t.reduce(function(o,a){return o[a]={},o},{}));O.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=O.useCallback(function(o,a,s,c){n.current[o]={suppressRefError:a,refKey:s,elementRef:c}},[]);return i});function u1(e,t,r,n){n===void 0&&(n={});var i=n.document,o=Qs();O.useEffect(function(){if(!(!e||o||!i)){var a=e(t);gC(a,i)}},r),O.useEffect(function(){return function(){gC.cancel(),O9(i)}},[i])}function uL(e){var t=e.highlightedIndex,r=e.isOpen,n=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,a=e.scrollIntoView,s=O.useRef(!0);return q9(function(){t<0||!r||!Object.keys(n.current).length||(s.current===!1?s.current=!0:a(i(t),o))},[t]),s}var ed=br;process.env.NODE_ENV!=="production"&&(ed=function(e){var t=e.props,r=e.state,n=O.useRef(t),i=Qs();O.useEffect(function(){i||(s1(r,n.current,t),n.current=t)},[r,t,i])});function Eu(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 dL(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Qs(){var e=O.useRef(!0);return O.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function Su(e){var t=Fn(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function z9(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},fL=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 pL(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:Su(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 B9(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 F9=aa(aa({},fL),{items:ye.array.isRequired,isItemDisabled:ye.func}),$9=aa(aa({},Is),{isItemDisabled:function(){return!1}}),hL=br;process.env.NODE_ENV!=="production"&&(hL=function(e,t){ye.checkPropTypes(F9,e,"prop",t.name)});var tu=process.env.NODE_ENV!=="production"?"__togglebutton_click__":0,d1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_down__":1,f1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_up__":2,Ou=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_character__":3,p1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_escape__":4,h1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_home__":5,v1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_end__":6,g1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_enter__":7,m1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_space_button__":8,b1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_up__":9,y1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_down__":10,Cu=process.env.NODE_ENV!=="production"?"__togglebutton_blur__":11,vL=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":12,gL=process.env.NODE_ENV!=="production"?"__item_mouse_move__":13,x1=process.env.NODE_ENV!=="production"?"__item_click__":14,mL=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,bL=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,yL=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,xL=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,w1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,gw=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,wL=process.env.NODE_ENV!=="production"?"__function_reset__":21,_L=Object.freeze({__proto__:null,FunctionCloseMenu:yL,FunctionOpenMenu:bL,FunctionReset:wL,FunctionSelectItem:w1,FunctionSetHighlightedIndex:xL,FunctionSetInputValue:gw,FunctionToggleMenu:mL,ItemClick:x1,ItemMouseMove:gL,MenuMouseLeave:vL,ToggleButtonBlur:Cu,ToggleButtonClick:tu,ToggleButtonKeyDownArrowDown:d1,ToggleButtonKeyDownArrowUp:f1,ToggleButtonKeyDownCharacter:Ou,ToggleButtonKeyDownEnd:v1,ToggleButtonKeyDownEnter:g1,ToggleButtonKeyDownEscape:p1,ToggleButtonKeyDownHome:h1,ToggleButtonKeyDownPageDown:y1,ToggleButtonKeyDownPageUp:b1,ToggleButtonKeyDownSpaceButton:m1});function H9(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case x1:a={isOpen:Fn(i,"isOpen"),highlightedIndex:Su(i),selectedItem:i.items[t.index]};break;case Ou:{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=B9({keysSoFar:c,highlightedIndex:u,items:i.items,itemToString:i.itemToString,isItemDisabled:i.isItemDisabled});a={inputValue:c,highlightedIndex:d,isOpen:!0}}break;case d1:{var p=e.isOpen?In(e.highlightedIndex,1,i.items,i.isItemDisabled):o&&e.selectedItem==null?-1:no(i,e,1);a={highlightedIndex:p,isOpen:!0}}break;case f1:if(e.isOpen&&o)a=Eu(i,e.highlightedIndex,!1);else{var v=e.isOpen?In(e.highlightedIndex,-1,i.items,i.isItemDisabled):no(i,e,-1);a={highlightedIndex:v,isOpen:!0}}break;case g1:case m1:a=Eu(i,e.highlightedIndex,!1);break;case h1:a={highlightedIndex:ji(0,!1,i.items,i.isItemDisabled),isOpen:!0};break;case v1:a={highlightedIndex:ji(i.items.length-1,!0,i.items,i.isItemDisabled),isOpen:!0};break;case b1:a={highlightedIndex:In(e.highlightedIndex,-10,i.items,i.isItemDisabled)};break;case y1:a={highlightedIndex:In(e.highlightedIndex,10,i.items,i.isItemDisabled)};break;case p1:a={isOpen:!1,highlightedIndex:-1};break;case Cu:a=ke({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((r=i.items)==null?void 0:r.length)&&{selectedItem:i.items[e.highlightedIndex]});break;case w1:a={selectedItem:t.selectedItem};break;default:return pL(e,t,_L)}return ke({},e,a)}var V9=["onClick"],W9=["onMouseLeave","refKey","ref"],U9=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],G9=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];Xo.stateChangeTypes=_L;function Xo(e){e===void 0&&(e={}),hL(e,Xo);var t=ke({},$9,e),r=t.scrollIntoView,n=t.environment,i=t.getA11yStatusMessage,o=sL(H9,t,lL,dL),a=o[0],s=o[1],c=a.isOpen,u=a.highlightedIndex,d=a.selectedItem,p=a.inputValue,v=O.useRef(null),h=O.useRef(null),x=O.useRef({}),m=O.useRef(null),b=oL(t),w=Ju({state:a,props:t}),y=O.useCallback(function(k){return x.current[b.getItemId(k)]},[b]);u1(i,a,[c,u,d,p],n);var _=uL({menuElement:h.current,highlightedIndex:u,isOpen:c,itemRefs:x,scrollIntoView:r,getItemNodeFromIndex:y});O.useEffect(function(){return m.current=Zu(function(k){k({type:gw,inputValue:""})},500),function(){m.current.cancel()}},[]),O.useEffect(function(){p&&m.current(s)},[s,p]),ed({props:t,state:a}),O.useEffect(function(){var k=ro(t,"isOpen");k&&v.current&&v.current.focus()},[]);var S=O.useCallback(function(){w.current.state.isOpen&&s({type:Cu})},[s,w]),E=O.useMemo(function(){return[h,v]},[]),I=cL(n,S,E),N=Qu("getMenuProps","getToggleButtonProps");O.useEffect(function(){c||(x.current={})},[c]);var T=O.useMemo(function(){return{ArrowDown:function(k){k.preventDefault(),s({type:d1,altKey:k.altKey})},ArrowUp:function(k){k.preventDefault(),s({type:f1,altKey:k.altKey})},Home:function(k){k.preventDefault(),s({type:h1})},End:function(k){k.preventDefault(),s({type:v1})},Escape:function(){w.current.state.isOpen&&s({type:p1})},Enter:function(k){k.preventDefault(),s({type:w.current.state.isOpen?g1:tu})},PageUp:function(k){w.current.state.isOpen&&(k.preventDefault(),s({type:b1}))},PageDown:function(k){w.current.state.isOpen&&(k.preventDefault(),s({type:y1}))}," ":function(k){k.preventDefault();var W=w.current.state;if(!W.isOpen){s({type:tu});return}W.inputValue?s({type:Ou,key:" "}):s({type:m1})}}},[s,w]),A=O.useCallback(function(){s({type:mL})},[s]),B=O.useCallback(function(){s({type:yL})},[s]),L=O.useCallback(function(){s({type:bL})},[s]),D=O.useCallback(function(k){s({type:xL,highlightedIndex:k})},[s]),z=O.useCallback(function(k){s({type:w1,selectedItem:k})},[s]),P=O.useCallback(function(){s({type:wL})},[s]),K=O.useCallback(function(k){s({type:gw,inputValue:k})},[s]),$=O.useCallback(function(k){var W=k===void 0?{}:k,J=W.onClick,ee=yr(W,V9),j=function(){var G;(G=v.current)==null||G.focus()};return ke({id:b.labelId,htmlFor:b.toggleButtonId,onClick:it(J,j)},ee)},[b]),Y=O.useCallback(function(k,W){var J,ee=k===void 0?{}:k,j=ee.onMouseLeave,G=ee.refKey,H=G===void 0?"ref":G,q=ee.ref,X=yr(ee,W9),ne=W===void 0?{}:W,te=ne.suppressRefError,ue=te===void 0?!1:te,re=function(){s({type:vL})};return N("getMenuProps",ue,H,h),ke((J={},J[H]=Cn(q,function(ge){h.current=ge}),J.id=b.menuId,J.role="listbox",J["aria-labelledby"]=X&&X["aria-label"]?void 0:""+b.labelId,J.onMouseLeave=it(j,re),J),X)},[s,N,b]),U=O.useCallback(function(k,W){var J,ee=k===void 0?{}:k,j=ee.onBlur,G=ee.onClick;ee.onPress;var H=ee.onKeyDown,q=ee.refKey,X=q===void 0?"ref":q,ne=ee.ref,te=yr(ee,U9),ue=W===void 0?{}:W,re=ue.suppressRefError,ge=re===void 0?!1:re,de=w.current.state,xe=function(){s({type:tu})},se=function(){de.isOpen&&!I.isMouseDown&&s({type:Cu})},le=function(Oe){var Te=sa(Oe);Te&&T[Te]?T[Te](Oe):L9(Te)&&s({type:Ou,key:Te})},we=ke((J={},J[X]=Cn(ne,function(Oe){v.current=Oe}),J["aria-activedescendant"]=de.isOpen&&de.highlightedIndex>-1?b.getItemId(de.highlightedIndex):"",J["aria-controls"]=b.menuId,J["aria-expanded"]=w.current.state.isOpen,J["aria-haspopup"]="listbox",J["aria-labelledby"]=te&&te["aria-label"]?void 0:""+b.labelId,J.id=b.toggleButtonId,J.role="combobox",J.tabIndex=0,J.onBlur=it(j,se),J),te);return te.disabled||(we.onClick=it(G,xe),we.onKeyDown=it(H,le)),N("getToggleButtonProps",ge,X,v),we},[s,b,w,I,N,T]),Q=O.useCallback(function(k){var W,J=k===void 0?{}:k,ee=J.item,j=J.index,G=J.onMouseMove,H=J.onClick,q=J.onMouseDown;J.onPress;var X=J.refKey,ne=X===void 0?"ref":X,te=J.disabled,ue=J.ref,re=yr(J,G9);te!==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,de=ge.state,xe=ge.props,se=l1(ee,j,xe.items,"Pass either item or index to getItemProps!"),le=se[0],we=se[1],Oe=xe.isItemDisabled(le,we),Te=function(){I.isTouchEnd||we===de.highlightedIndex||(_.current=!1,s({type:gL,index:we,disabled:Oe}))},qe=function(){s({type:x1,index:we})},Ue=function(ot){return ot.preventDefault()},De=ke((W={},W[ne]=Cn(ue,function(ot){ot&&(x.current[b.getItemId(we)]=ot)}),W["aria-disabled"]=Oe,W["aria-selected"]=le===de.selectedItem,W.id=b.getItemId(we),W.role="option",W),re);return Oe||(De.onClick=it(H,qe)),De.onMouseMove=it(G,Te),De.onMouseDown=it(q,Ue),De},[w,b,I,_,s]);return{getToggleButtonProps:U,getLabelProps:$,getMenuProps:Y,getItemProps:Q,toggleMenu:A,openMenu:L,closeMenu:B,setHighlightedIndex:D,selectItem:z,reset:P,setInputValue:K,highlightedIndex:u,isOpen:c,selectedItem:d,inputValue:p}}var _1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,E1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,S1=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,O1=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,C1=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,I1=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,R1=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,N1=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,T1=process.env.NODE_ENV!=="production"?"__input_change__":8,Iu=process.env.NODE_ENV!=="production"?"__input_blur__":9,P1=process.env.NODE_ENV!=="production"?"__input_click__":10,EL=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,SL=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,k1=process.env.NODE_ENV!=="production"?"__item_click__":13,OL=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,CL=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,IL=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,RL=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,NL=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,A1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,TL=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,PL=process.env.NODE_ENV!=="production"?"__function_reset__":21,M1=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,kL=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:M1,FunctionCloseMenu:RL,FunctionOpenMenu:IL,FunctionReset:PL,FunctionSelectItem:A1,FunctionSetHighlightedIndex:NL,FunctionSetInputValue:TL,FunctionToggleMenu:CL,InputBlur:Iu,InputChange:T1,InputClick:P1,InputKeyDownArrowDown:_1,InputKeyDownArrowUp:E1,InputKeyDownEnd:C1,InputKeyDownEnter:N1,InputKeyDownEscape:S1,InputKeyDownHome:O1,InputKeyDownPageDown:R1,InputKeyDownPageUp:I1,ItemClick:k1,ItemMouseMove:SL,MenuMouseLeave:EL,ToggleButtonClick:OL});function K9(e){var t=lL(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 Y9=ke({},fL,{items:ye.array.isRequired,isItemDisabled:ye.func,inputValue:ye.string,defaultInputValue:ye.string,initialInputValue:ye.string,inputId:ye.string,onInputValueChange:ye.func});function X9(e,t,r,n){var i=O.useRef(),o=aL(e,t,r,n),a=o[0],s=o[1],c=Qs();return O.useEffect(function(){if(wu(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]),[qs(a,t),s]}var AL=br;process.env.NODE_ENV!=="production"&&(AL=function(e,t){ye.checkPropTypes(Y9,e,"prop",t.name)});var Z9=ke({},Is,{isItemDisabled:function(){return!1}});function J9(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case k1:a={isOpen:Fn(i,"isOpen"),highlightedIndex:Su(i),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case _1:e.isOpen?a={highlightedIndex:In(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 E1:e.isOpen?o?a=Eu(i,e.highlightedIndex):a={highlightedIndex:In(e.highlightedIndex,-1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:no(i,e,-1),isOpen:i.items.length>=0};break;case N1:a=Eu(i,e.highlightedIndex);break;case S1:a=ke({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case I1:a={highlightedIndex:In(e.highlightedIndex,-10,i.items,i.isItemDisabled,!0)};break;case R1:a={highlightedIndex:In(e.highlightedIndex,10,i.items,i.isItemDisabled,!0)};break;case O1:a={highlightedIndex:ji(0,!1,i.items,i.isItemDisabled)};break;case C1:a={highlightedIndex:ji(i.items.length-1,!0,i.items,i.isItemDisabled)};break;case Iu: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 T1:a={isOpen:!0,highlightedIndex:Su(i),inputValue:t.inputValue};break;case P1:a={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:no(i,e,0)};break;case A1:a={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case M1:a={inputValue:t.inputValue};break;default:return pL(e,t,kL)}return ke({},e,a)}var Q9=["onMouseLeave","refKey","ref"],eK=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],tK=["onClick","onPress","refKey","ref"],rK=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];ai.stateChangeTypes=kL;function ai(e){e===void 0&&(e={}),AL(e,ai);var t=ke({},Z9,e),r=t.items,n=t.scrollIntoView,i=t.environment,o=t.getA11yStatusMessage,a=X9(J9,t,K9,dL),s=a[0],c=a[1],u=s.isOpen,d=s.highlightedIndex,p=s.selectedItem,v=s.inputValue,h=O.useRef(null),x=O.useRef({}),m=O.useRef(null),b=O.useRef(null),w=Qs(),y=oL(t),_=O.useRef(),S=Ju({state:s,props:t}),E=O.useCallback(function(j){return x.current[y.getItemId(j)]},[y]);u1(o,s,[u,d,p,v],i);var I=uL({menuElement:h.current,highlightedIndex:d,isOpen:u,itemRefs:x,scrollIntoView:n,getItemNodeFromIndex:E});ed({props:t,state:s}),O.useEffect(function(){var j=ro(t,"isOpen");j&&m.current&&m.current.focus()},[]),O.useEffect(function(){w||(_.current=r.length)});var N=O.useCallback(function(){S.current.state.isOpen&&c({type:Iu})},[c,S]),T=O.useMemo(function(){return[h,b,m]},[]),A=cL(i,N,T),B=Qu("getInputProps","getMenuProps");O.useEffect(function(){u||(x.current={})},[u]),O.useEffect(function(){var j;!u||!(i!=null&&i.document)||!(m!=null&&(j=m.current)!=null&&j.focus)||i.document.activeElement!==m.current&&m.current.focus()},[u,i]);var L=O.useMemo(function(){return{ArrowDown:function(j){j.preventDefault(),c({type:_1,altKey:j.altKey})},ArrowUp:function(j){j.preventDefault(),c({type:E1,altKey:j.altKey})},Home:function(j){S.current.state.isOpen&&(j.preventDefault(),c({type:O1}))},End:function(j){S.current.state.isOpen&&(j.preventDefault(),c({type:C1}))},Escape:function(j){var G=S.current.state;(G.isOpen||G.inputValue||G.selectedItem||G.highlightedIndex>-1)&&(j.preventDefault(),c({type:S1}))},Enter:function(j){var G=S.current.state;!G.isOpen||j.which===229||(j.preventDefault(),c({type:N1}))},PageUp:function(j){S.current.state.isOpen&&(j.preventDefault(),c({type:I1}))},PageDown:function(j){S.current.state.isOpen&&(j.preventDefault(),c({type:R1}))}}},[c,S]),D=O.useCallback(function(j){return ke({id:y.labelId,htmlFor:y.inputId},j)},[y]),z=O.useCallback(function(j,G){var H,q=j===void 0?{}:j,X=q.onMouseLeave,ne=q.refKey,te=ne===void 0?"ref":ne,ue=q.ref,re=yr(q,Q9),ge=G===void 0?{}:G,de=ge.suppressRefError,xe=de===void 0?!1:de;return B("getMenuProps",xe,te,h),ke((H={},H[te]=Cn(ue,function(se){h.current=se}),H.id=y.menuId,H.role="listbox",H["aria-labelledby"]=re&&re["aria-label"]?void 0:""+y.labelId,H.onMouseLeave=it(X,function(){c({type:EL})}),H),re)},[c,B,y]),P=O.useCallback(function(j){var G,H,q=j===void 0?{}:j,X=q.item,ne=q.index,te=q.refKey,ue=te===void 0?"ref":te,re=q.ref,ge=q.onMouseMove,de=q.onMouseDown,xe=q.onClick;q.onPress;var se=q.disabled,le=yr(q,eK);se!==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,Oe=we.props,Te=we.state,qe=l1(X,ne,Oe.items,"Pass either item or index to getItemProps!"),Ue=qe[0],De=qe[1],ot=Oe.isItemDisabled(Ue,De),vt="onClick",Et=xe,We=function(){A.isTouchEnd||De===Te.highlightedIndex||(I.current=!1,c({type:SL,index:De,disabled:ot}))},je=function(){c({type:k1,index:De})},Qe=function(dt){return dt.preventDefault()};return ke((G={},G[ue]=Cn(re,function(dt){dt&&(x.current[y.getItemId(De)]=dt)}),G["aria-disabled"]=ot,G["aria-selected"]=De===Te.highlightedIndex,G.id=y.getItemId(De),G.role="option",G),!ot&&(H={},H[vt]=it(Et,je),H),{onMouseMove:it(ge,We),onMouseDown:it(de,Qe)},le)},[c,y,S,A,I]),K=O.useCallback(function(j){var G,H=j===void 0?{}:j,q=H.onClick;H.onPress;var X=H.refKey,ne=X===void 0?"ref":X,te=H.ref,ue=yr(H,tK),re=S.current.state,ge=function(){c({type:OL})};return ke((G={},G[ne]=Cn(te,function(de){b.current=de}),G["aria-controls"]=y.menuId,G["aria-expanded"]=re.isOpen,G.id=y.toggleButtonId,G.tabIndex=-1,G),!ue.disabled&&ke({},{onClick:it(q,ge)}),ue)},[c,S,y]),$=O.useCallback(function(j,G){var H,q=j===void 0?{}:j,X=q.onKeyDown,ne=q.onChange,te=q.onInput,ue=q.onBlur;q.onChangeText;var re=q.onClick,ge=q.refKey,de=ge===void 0?"ref":ge,xe=q.ref,se=yr(q,rK),le=G===void 0?{}:G,we=le.suppressRefError,Oe=we===void 0?!1:we;B("getInputProps",Oe,de,m);var Te=S.current.state,qe=function(je){var Qe=sa(je);Qe&&L[Qe]&&L[Qe](je)},Ue=function(je){c({type:T1,inputValue:je.target.value})},De=function(je){if(i!=null&&i.document&&Te.isOpen&&!A.isMouseDown){var Qe=je.relatedTarget===null&&i.document.activeElement!==i.document.body;c({type:Iu,selectItem:!Qe})}},ot=function(){c({type:P1})},vt="onChange",Et={};if(!se.disabled){var We;Et=(We={},We[vt]=it(ne,te,Ue),We.onKeyDown=it(X,qe),We.onBlur=it(ue,De),We.onClick=it(re,ot),We)}return ke((H={},H[de]=Cn(xe,function(je){m.current=je}),H["aria-activedescendant"]=Te.isOpen&&Te.highlightedIndex>-1?y.getItemId(Te.highlightedIndex):"",H["aria-autocomplete"]="list",H["aria-controls"]=y.menuId,H["aria-expanded"]=Te.isOpen,H["aria-labelledby"]=se&&se["aria-label"]?void 0:y.labelId,H.autoComplete="off",H.id=y.inputId,H.role="combobox",H.value=Te.inputValue,H),Et,se)},[c,y,i,L,S,A,B]),Y=O.useCallback(function(){c({type:CL})},[c]),U=O.useCallback(function(){c({type:RL})},[c]),Q=O.useCallback(function(){c({type:IL})},[c]),k=O.useCallback(function(j){c({type:NL,highlightedIndex:j})},[c]),W=O.useCallback(function(j){c({type:A1,selectedItem:j})},[c]),J=O.useCallback(function(j){c({type:TL,inputValue:j})},[c]),ee=O.useCallback(function(){c({type:PL})},[c]);return{getItemProps:P,getLabelProps:D,getMenuProps:z,getInputProps:$,getToggleButtonProps:K,toggleMenu:Y,openMenu:Q,closeMenu:U,setHighlightedIndex:k,setInputValue:J,selectItem:W,reset:ee,highlightedIndex:d,isOpen:u,selectedItem:p,inputValue:v}}var ML={activeIndex:-1,selectedItems:[]};function mC(e,t){return ro(e,t,ML)}function bC(e,t){return Fn(e,t,ML)}function nK(e){var t=mC(e,"activeIndex"),r=mC(e,"selectedItems");return{activeIndex:t,selectedItems:r}}function yC(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 iK(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var oK={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},aK={itemToKey:Is.itemToKey,stateReducer:Is.stateReducer,environment:Is.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},DL=br;process.env.NODE_ENV!=="production"&&(DL=function(e,t){ye.checkPropTypes(oK,e,"prop",t.name)});var D1=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,j1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,q1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,L1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,z1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,B1=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,F1=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,$1=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,H1=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,V1=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,W1=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,U1=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,G1=process.env.NODE_ENV!=="production"?"__function_reset__":12,sK=Object.freeze({__proto__:null,DropdownClick:$1,DropdownKeyDownBackspace:F1,DropdownKeyDownNavigationPrevious:B1,FunctionAddSelectedItem:H1,FunctionRemoveSelectedItem:V1,FunctionReset:G1,FunctionSetActiveIndex:U1,FunctionSetSelectedItems:W1,SelectedItemClick:D1,SelectedItemKeyDownBackspace:q1,SelectedItemKeyDownDelete:j1,SelectedItemKeyDownNavigationNext:L1,SelectedItemKeyDownNavigationPrevious:z1});function lK(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 D1:c={activeIndex:n};break;case z1:c={activeIndex:a-1<0?0:a-1};break;case L1:c={activeIndex:a+1>=s.length?-1:a+1};break;case q1:case j1:{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 B1:c={activeIndex:s.length-1};break;case F1:c={selectedItems:s.slice(0,s.length-1)};break;case H1:c={selectedItems:[].concat(s,[o])};break;case $1: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 W1:{var v=t.selectedItems;c={selectedItems:v};break}case U1:{var h=t.activeIndex;c={activeIndex:h};break}case G1:c={activeIndex:bC(i,"activeIndex"),selectedItems:bC(i,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ke({},e,c)}var cK=["refKey","ref","onClick","onKeyDown","selectedItem","index"],uK=["refKey","ref","onKeyDown","onClick","preventKeyAction"];K1.stateChangeTypes=sK;function K1(e){e===void 0&&(e={}),DL(e,K1);var t=ke({},aK,e),r=t.getA11yStatusMessage,n=t.environment,i=t.keyNavigationNext,o=t.keyNavigationPrevious,a=sL(lK,t,nK,iK),s=a[0],c=a[1],u=s.activeIndex,d=s.selectedItems,p=Qs(),v=O.useRef(null),h=O.useRef();h.current=[];var x=Ju({state:s,props:t});u1(r,s,[u,d],n),O.useEffect(function(){p||(u===-1&&v.current?v.current.focus():h.current[u]&&h.current[u].focus())},[u]),ed({props:t,state:s});var m=Qu("getDropdownProps"),b=O.useMemo(function(){var A;return A={},A[o]=function(){c({type:z1})},A[i]=function(){c({type:L1})},A.Delete=function(){c({type:j1})},A.Backspace=function(){c({type:q1})},A},[c,i,o]),w=O.useMemo(function(){var A;return A={},A[o]=function(B){yC(B)&&c({type:B1})},A.Backspace=function(B){yC(B)&&c({type:F1})},A},[c,o]),y=O.useCallback(function(A){var B,L=A===void 0?{}:A,D=L.refKey,z=D===void 0?"ref":D,P=L.ref,K=L.onClick,$=L.onKeyDown,Y=L.selectedItem,U=L.index,Q=yr(L,cK),k=x.current.state,W=l1(Y,U,k.selectedItems,"Pass either item or index to getSelectedItemProps!"),J=W[1],ee=J>-1&&J===k.activeIndex,j=function(){c({type:D1,index:J})},G=function(H){var q=sa(H);q&&b[q]&&b[q](H)};return ke((B={},B[z]=Cn(P,function(H){H&&h.current.push(H)}),B.tabIndex=ee?0:-1,B.onClick=it(K,j),B.onKeyDown=it($,G),B),Q)},[c,x,b]),_=O.useCallback(function(A,B){var L,D=A===void 0?{}:A,z=D.refKey,P=z===void 0?"ref":z,K=D.ref,$=D.onKeyDown,Y=D.onClick,U=D.preventKeyAction,Q=U===void 0?!1:U,k=yr(D,uK),W=B===void 0?{}:B,J=W.suppressRefError,ee=J===void 0?!1:J;m("getDropdownProps",ee,P,v);var j=function(H){var q=sa(H);q&&w[q]&&w[q](H)},G=function(){c({type:$1})};return ke((L={},L[P]=Cn(K,function(H){H&&(v.current=H)}),L),!Q&&{onKeyDown:it($,j),onClick:it(Y,G)},k)},[c,w,m]),S=O.useCallback(function(A){c({type:H1,selectedItem:A})},[c]),E=O.useCallback(function(A){c({type:V1,selectedItem:A})},[c]),I=O.useCallback(function(A){c({type:W1,selectedItems:A})},[c]),N=O.useCallback(function(A){c({type:U1,activeIndex:A})},[c]),T=O.useCallback(function(){c({type:G1})},[c]);return{getSelectedItemProps:y,getDropdownProps:_,addSelectedItem:S,removeSelectedItem:E,setSelectedItems:I,setActiveIndex:N,reset:T,selectedItems:d,activeIndex:u}}const dK=e=>{const{items:t=[],isMulti:r=!1,isSearchable:n=!1,value:i,defaultValue:o,inputValue:a,onChange:s,onInputChange:c,getOptionLabel:u=H=>(H==null?void 0:H.label)||"",getOptionValue:d=H=>(H==null?void 0:H.value)||"",isOpen:p,onOpenChange:v,customOptionGenerator:h,disableInternalFiltering:x=!1,stateReducer:m,isDisabled:b=!1}=e,w=O.useCallback(H=>{const q=u(H);if(typeof q=="string")return q;if(typeof q=="number")return String(q);const X=H;if(typeof X=="object"&&X!==null){if(typeof X.label=="string")return X.label;if(typeof X.name=="string")return X.name}return String(d(H))},[u,d]),y=H=>H?Array.isArray(H)?H:[H]:[],_=o!==void 0?o:i!==void 0?i:null,[S,E]=O.useState(()=>y(_)),[I,N]=O.useState(a||""),[T,A]=O.useState(()=>p!==void 0?p:!1),B=i!==void 0?y(i):S,L=a!==void 0?a:I,D=p!==void 0?p:T,z=O.useCallback(H=>{p===void 0&&A(H),v==null||v(H)},[p,v]),P=O.useCallback(H=>{i===void 0&&E(H);const q=r?H:H[0]||null;s==null||s(q)},[i,r,s]),K=O.useCallback(H=>{a===void 0&&N(H),c==null||c(H)},[a,c]),$=O.useMemo(()=>h?h(L,t):x||!n||!L?t:t.filter(H=>w(H).toLowerCase().includes(L.toLowerCase())),[t,L,h,x,n,w]),Y=K1({selectedItems:B,onSelectedItemsChange:H=>{const q=H.selectedItems||[];P(q)}}),U={items:$,itemToString:H=>H?w(H):"",isOpen:D,onIsOpenChange:({isOpen:H})=>{H!==void 0&&z(H)},selectedItem:r?null:B[0]||null,onSelectedItemChange:H=>{!r&&H.selectedItem&&P([H.selectedItem])}},Q=H=>(q,X)=>{const ne=(()=>{const{changes:te,type:ue}=X;return r&&te.selectedItem&&(H===ai?[ai.stateChangeTypes.InputKeyDownEnter,ai.stateChangeTypes.ItemClick]:[Xo.stateChangeTypes.ToggleButtonKeyDownEnter,Xo.stateChangeTypes.ItemClick]).includes(ue)?(!B.some(re=>d(re)===d(te.selectedItem))&&te.selectedItem&&Y.addSelectedItem(te.selectedItem),{...te,isOpen:!0,highlightedIndex:q.highlightedIndex,...n&&{inputValue:""}}):ue===ai.stateChangeTypes.InputBlur&&!r&&B.length>0?{...te,inputValue:w(B[0])}:te})();return m?m(q,{...X,changes:ne}):ne},k=n?ai({...U,inputValue:L,onInputValueChange:({inputValue:H,type:q})=>{!H&&q===ai.stateChangeTypes.InputChange&&P([]),K(H||"")},stateReducer:Q(ai),initialIsOpen:p!==void 0?p:!1,defaultIsOpen:!1}):Xo({...U,stateReducer:Q(Xo),initialIsOpen:p!==void 0?p:!1,defaultIsOpen:!1}),W=()=>{b||(z(!D),"toggleMenu"in k&&k.toggleMenu())},J=O.useCallback(()=>{b||(z(!0),"openMenu"in k&&k.openMenu())},[z,k,b]),ee=O.useCallback(()=>{z(!1),"closeMenu"in k&&k.closeMenu()},[z,k]),j=O.useCallback(()=>{P([]),K(""),r&&Y.reset()},[P,K,r,Y]),G=O.useCallback(H=>{r&&Y.removeSelectedItem(H)},[r,Y]);return{isOpen:k.isOpen,selectedItem:k.selectedItem,highlightedIndex:k.highlightedIndex,inputValue:L,getToggleButtonProps:k.getToggleButtonProps,getMenuProps:k.getMenuProps,getItemProps:k.getItemProps,getInputProps:"getInputProps"in k?k.getInputProps:void 0,selectedItems:B,filteredItems:$,setInputValue:K,setIsOpen:z,toggleMenu:W,openMenu:J,closeMenu:ee,clearSelection:j,removeItem:G,multipleSelection:Y,isMulti:r,isSearchable:n}},jL=({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:m,customOptionGenerator:b,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,A]=O.useState(!1),B=O.useMemo(()=>i9(a),[a]),L=dK({items:B,value:s,defaultValue:c,onChange:u,isMulti:d,inputValue:p,onInputChange:v,isSearchable:h,isOpen:x,onOpenChange:m,getOptionLabel:y,getOptionValue:_,customOptionGenerator:b,disableInternalFiltering:w,stateReducer:I,isDisabled:n}),D={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,hasMessage:T,setHasMessage:A,downshift:L,options:a,getOptionLabel:y,getOptionValue:_,isOptionDisabled:S,formatOptionLabel:E};return C.jsx(Aq.Provider,{value:D,children:C.jsx("div",{"data-qui":"Select",className:me(F7(),i),...N,children:o})})},fK=O.forwardRef(({className:e,children:t,isFocused:r,isDisabled:n,...i},o)=>{const{size:a,color:s,isDisabled:c,hasMessage:u,downshift:d,isInvalid:p}=_r(),v=n??c,h=r??d.isOpen;return C.jsx("div",{ref:o,className:me($7({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})}),pK=({className:e,children:t,isMulti:r})=>C.jsx("div",{className:me(H7({isMulti:r}),e),children:t}),ru=O.forwardRef(({isHidden:e,inputClassName:t,...r},n)=>{const{size:i,color:o}=_r();return e?C.jsx("input",{ref:n,type:"text",style:{position:"absolute",top:0,left:0,opacity:0,width:"100%",height:"100%",pointerEvents:"none"},tabIndex:-1,...r}):C.jsx("input",{ref:n,type:"text",className:me(V7({size:i,color:o}),t),...r})}),hK=({className:e,children:t})=>{const{size:r,color:n}=_r();return C.jsx("div",{className:me(W7({size:r,color:n}),e),children:t})},vK=({className:e,children:t,data:r,isDisabled:n})=>{const{size:i,color:o,getOptionLabel:a,formatOptionLabel:s}=_r();return C.jsx("div",{className:me(U7({size:i,color:o,isDisabled:n}),e),children:t||(s?s(r):a(r))})},qL=({className:e,children:t,data:r,isDisabled:n,isFocused:i,onRemove:o})=>{const{size:a,color:s,downshift:c,getOptionLabel:u,formatOptionLabel:d}=_r(),p=()=>{o?o(r):c.removeItem(r)};return C.jsxs("div",{className:me(G7({size:a,color:s,isDisabled:n,isFocused:i}),e),children:[C.jsx("div",{className:K7({size:a}),children:t||(d?d(r):u(r))}),!n&&C.jsx("div",{className:Y7({size:a,color:s,isDisabled:!1}),onClick:p,children:C.jsx(Vu,{className:"w-3 h-3"})})]})},LL=({color:e,className:t,children:r,onClick:n,isDisabled:i,...o})=>{const{size:a,color:s,isDisabled:c,downshift:u}=_r(),d=i??c,p=u.selectedItems.length>0;if(d||!p)return null;const v=h=>{h.stopPropagation(),n?n(h):u.clearSelection()};return C.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||C.jsx(_W,{})})},gK=({className:e,children:t,onClick:r,isDisabled:n,...i})=>{const{size:o,color:a,isDisabled:s,downshift:c}=_r(),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 C.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||C.jsx(Vu,{})})},zL=({color:e,className:t,children:r,onClick:n,isDisabled:i,...o})=>{const{size:a,color:s,isDisabled:c,downshift:u}=_r(),d=i??c,p=u.isOpen,v=h=>{h.stopPropagation(),d||(n?n(h):u.toggleMenu())};return C.jsx("div",{className:me(X7({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||C.jsx(EW,{className:me("transition-transform duration-200",{"rotate-180":p})})})},mK=O.forwardRef(({className:e,children:t,placement:r,...n},i)=>{const{size:o,hasMessage:a,color:s}=_r();return C.jsx("div",{"data-qui":"SelectMenu",ref:i,className:me(Z7({size:o,placement:r,hasMessage:a,color:s}),e),...n,children:t})}),bK=O.forwardRef(({className:e,children:t,maxHeight:r=300,...n},i)=>{const{size:o}=_r();return C.jsx(Uw,{scrollableNodeProps:{ref:i},className:me(J7({size:o}),e),style:{maxHeight:r},...n,children:t})}),mw=({className:e,children:t,data:r,isDisabled:n,isFocused:i,isSelected:o,innerProps:a,...s})=>{const{size:c,color:u,getOptionLabel:d,formatOptionLabel:p}=_r();return C.jsx("div",{"data-qui":"SelectOption",className:me(Q7({size:c,color:u,isDisabled:n,isFocused:i,isSelected:o}),e),...a,...s,children:t||(p?p(r):d(r))})},yK=({className:e,children:t,data:r,label:n})=>{const{size:i}=_r();return C.jsxs("div",{"data-qui":"SelectGroup",className:me(e9({size:i}),e),children:[C.jsx(xK,{children:n||r.label}),t]})},xK=({className:e,children:t})=>{const{size:r,color:n}=_r();return C.jsx("div",{className:me(t9({size:r,color:n}),e),children:t})},Ap=({className:e,children:t,inputValue:r})=>{const{size:n}=_r();return C.jsx("div",{className:me(n9({size:n}),e),children:t||`No options found${r?` for "${r}"`:""}`})},wK=({isOpen:e,usePortal:t,controlRef:r,children:n})=>{const[i,o]=O.useState(null);return O.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(C.jsx("div",{className:"absolute z-50",style:{top:i.top,left:i.left,width:i.width,height:i.height,pointerEvents:"none"},children:C.jsx("div",{className:"relative w-full h-full",children:C.jsx("div",{style:{pointerEvents:"auto"},children:n})})}),document.body):C.jsx(C.Fragment,{children:n}):null},Mp=e=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&"current"in r&&(r.current=t)})},BL=O.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:m,displayFormattedOption:b=!1,renderMultiValue:w,renderOption:y,inputRef:_,controlShouldRenderValue:S=!0,name:E,id:I,onSelectionComplete:N,"aria-label":T,"aria-labelledby":A,"aria-describedby":B,children:L,usePortal:D=!1,...z},P)=>{const{size:K,isInvalid:$,isDisabled:Y,downshift:U,options:Q=[],getOptionLabel:k,getOptionValue:W,isOptionDisabled:J}=_r(),ee=O.useRef(null),j=_||ee,G=O.useRef(null),{isOpen:H,openMenu:q,selectedItem:X,inputValue:ne,highlightedIndex:te,getToggleButtonProps:ue,getMenuProps:re,getInputProps:ge,getItemProps:de,isMulti:xe,isSearchable:se,multipleSelection:le}=U,{getDropdownProps:we}=le,Oe=xe?U.selectedItems??[]:X?[X]:[],Te=Oe.length>0,qe=o&&!Y&&!c,Ue=i&&Te&&!Y&&!c,De=!u&&!c,ot=!Te&&(!se||!ne)||!S,vt={},Et={};Object.entries(z).forEach(([Be,Xe])=>{Be.startsWith("data-")||Be.startsWith("aria-")||Be==="role"?vt[Be]=Xe:Et[Be]=Xe});const We=O.useMemo(()=>Mp([G,P]),[P]),je=re({},{suppressRefError:!0}),Qe=we({preventKeyAction:H}),dt=(ge==null?void 0:ge({ref:j,disabled:Y,required:s,name:E,id:I,"aria-label":T,"aria-labelledby":A,"aria-describedby":B,"aria-invalid":$,onFocus:v,onBlur:h,...Et,...Qe}))??{},{ref:Qt,...Mt}=dt,St=O.useMemo(()=>Mp([Qt,Qe.ref]),[Qt,Qe.ref]),Dt=Be=>Oe.some(Xe=>W(Xe)===W(Be)),lr=Be=>p?Be.filter(Xe=>!Dt(Xe)):Be,bn=Be=>p?Be.map(Xe=>({...Xe,options:lr(Xe.options)})).filter(Xe=>Xe.options.length>0):Be,Or=Be=>{N==null||N(W(Be),Be)},Cr=se?{}:ue({disabled:Y,...Qe,ref:Mp([We,Qe.ref])});return C.jsxs("div",{className:"relative",children:[C.jsxs(fK,{...se?{ref:We}:Cr,...vt,isFocused:H,isDisabled:Y,onClick:Be=>{Be.stopPropagation(),se?q():se||U.toggleMenu()},children:[L||C.jsxs(pK,{isMulti:xe,children:[xe&&S&&Oe.map((Be,Xe)=>w?w({data:Be,index:Xe,isDisabled:Y,onRemove:et=>U.removeItem(et)}):C.jsx(qL,{data:Be,index:Xe,isDisabled:Y},W(Be))),!xe&&Te&&S&&!se&&C.jsx("div",{className:"flex items-center gap-2",children:C.jsx(vK,{data:Oe[0],isDisabled:Y,children:m&&b?m(Oe[0]):k(Oe[0])})}),se&&d==="trigger"?C.jsx(ru,{ref:St,...Mt,placeholder:e}):C.jsxs(C.Fragment,{children:[C.jsx(ru,{ref:St,...Mt,isHidden:!0,value:Oe.map(Be=>W(Be)).join(",")}),ot&&C.jsx(hK,{children:e})]})]}),C.jsxs("div",{className:me("flex items-center size-fit gap-1",{hidden:!Ue&&!De}),children:[qe&&C.jsx(gK,{}),Ue&&C.jsx(LL,{}),De&&C.jsx(zL,{...se?ue({disabled:Y,"aria-label":H?"Close menu":"Open menu"}):{}})]})]}),C.jsx(wK,{isOpen:H,usePortal:D,controlRef:G,children:r&&U.filteredItems.length===0?C.jsx("div",{...je,style:{display:"none"},"aria-hidden":"true"}):C.jsxs(mK,{...je,children:[x&&x(U),se&&d==="menu"&&C.jsx("div",{className:"p-2",children:C.jsx(ru,{ref:St,...Mt,autoFocus:!0,placeholder:e,onClick:Be=>Be.stopPropagation()})}),C.jsx(bK,{children:a?C.jsx("div",{className:r9({size:K}),children:n}):U.filteredItems.length===0?C.jsx(Ap,{inputValue:ne,children:typeof t=="function"?t(ne):t}):Dq(Q)?(()=>{const Be=bn(Q);return Be.length===0?C.jsx(Ap,{inputValue:ne,children:typeof t=="function"?t(ne):t}):Be.map(Xe=>C.jsx(yK,{data:Xe,label:Xe.label,options:Xe.options,children:Xe.options.map(et=>{const yt=W(et),Pt=Oe.some(Ir=>W(Ir)===yt),Ut=U.filteredItems.findIndex(Ir=>W(Ir)===yt),jt=te===Ut,Nt=J(et),qt=de({item:et,index:Ut,onClick:()=>Or(et)});return C.jsx(mw,{...qt,data:et,isDisabled:Nt,isFocused:jt,isSelected:Pt,children:m?m(et):k(et)},yt)})},Xe.label))})():(()=>{const Be=lr(U.filteredItems);return Be.length===0?C.jsx(Ap,{inputValue:ne,children:typeof t=="function"?t(ne):t}):Be.map(Xe=>{const et=W(Xe),yt=Oe.some(qt=>W(qt)===et),Pt=U.filteredItems.findIndex(qt=>W(qt)===et),Ut=te===Pt,jt=J(Xe),Nt=de({item:Xe,index:Pt,onClick:()=>Or(Xe)});return y?C.jsx(O.Fragment,{children:y({...Nt,data:Xe,isDisabled:jt,isFocused:Ut,isSelected:yt})},et):C.jsx(mw,{...Nt,data:Xe,isDisabled:jt,isFocused:Ut,isSelected:yt,children:m?m(Xe):k(Xe)},et)})})()})]})})]})});jL.displayName="Select.Root";ru.displayName="Select.Input";qL.displayName="Select.MultiValue";LL.displayName="Select.ClearIndicator";zL.displayName="Select.DropdownIndicator";mw.displayName="Select.Option";const _K=BL;_K.displayName="Select.Field";const xC={Root:jL,Field:BL};O.createContext(void 0);const EK=({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-body":e&&!t,"text-negative":r&&!e&&!t,"bg-primary text-grey-50":n&&!e&&!t,"text-muted":!e&&!t&&!r,"hover:bg-primary-hover hover:text-tab-active-fg":!t&&!e},i),SK=O.forwardRef(({active:e,disabled:t,error:r,isOpen:n,className:i,children:o,as:a="div",...s},c)=>{const u=EK({active:e,disabled:t,error:r,isOpen:n,className:i});return C.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})});SK.displayName="ListItem";function OK({qodly:e,activeTab:t,forceLogin:r,onTabChange:n,restrictedByDefault:i,onRestrictedByDefaultChange:o,onForceLoginChange:a}){return C.jsx(C.Fragment,{children:C.jsx(dr,{depth:1,className:"relative mb-0 flex h-auto flex-wrap items-center justify-between border-b 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.jsxs(Sp,{defaultValue:t,onTabChange:s=>n(s),children:[C.jsx(Sp.Item,{label:"Roles",value:"roles","data-cy":"roles_btn_navbar"}),C.jsx(Sp.Item,{label:"Privileges",value:"privileges","data-cy":"privileges_btn_navbar"})]}),C.jsxs("div",{className:"flex gap-2 justify-between",children:[C.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[C.jsx(xu,{checked:i||!1,onChange:s=>{o(s)}}),C.jsx("span",{className:"px-1 text-xs",children:"Restrict Access By Default"}),C.jsx(fe.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(xu,{checked:r||!1,onChange:s=>{a(s)}}),C.jsx("span",{className:"px-1 text-xs",children:"Force login"}),C.jsx(fe.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const FL=O.createContext(void 0),CK=({children:e})=>{const[t,r]=O.useState(null);function n(o){r(o)}const i={selectedRole:t,selectRole:n};return C.jsx(FL.Provider,{value:i,children:e})};function Y1(){const e=O.useContext(FL);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var wC=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},_C=typeof window<"u"&&window.document&&window.document.createElement?Ct.useLayoutEffect:Ct.useEffect,Dr="top",fn="bottom",pn="right",jr="left",X1="auto",el=[Dr,fn,pn,jr],la="start",Ls="end",IK="clippingParents",$L="viewport",Xa="popper",RK="reference",EC=el.reduce(function(e,t){return e.concat([t+"-"+la,t+"-"+Ls])},[]),HL=[].concat(el,[X1]).reduce(function(e,t){return e.concat([t,t+"-"+la,t+"-"+Ls])},[]),NK="beforeRead",TK="read",PK="afterRead",kK="beforeMain",AK="main",MK="afterMain",DK="beforeWrite",jK="write",qK="afterWrite",LK=[NK,TK,PK,kK,AK,MK,DK,jK,qK];function Wn(e){return e?(e.nodeName||"").toLowerCase():null}function Xr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function fo(e){var t=Xr(e).Element;return e instanceof t||e instanceof Element}function dn(e){var t=Xr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Z1(e){if(typeof ShadowRoot>"u")return!1;var t=Xr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function zK(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];!dn(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 BK(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},{});!dn(i)||!Wn(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const FK={name:"applyStyles",enabled:!0,phase:"write",fn:zK,effect:BK,requires:["computeStyles"]};function $n(e){return e.split("-")[0]}var io=Math.max,Ru=Math.min,ca=Math.round;function bw(){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 VL(){return!/^((?!chrome|android).)*safari/i.test(bw())}function ua(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&dn(e)&&(i=e.offsetWidth>0&&ca(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ca(n.height)/e.offsetHeight||1);var a=fo(e)?Xr(e):window,s=a.visualViewport,c=!VL()&&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 J1(e){var t=ua(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 WL(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Z1(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 Xr(e).getComputedStyle(e)}function $K(e){return["table","td","th"].indexOf(Wn(e))>=0}function qi(e){return((fo(e)?e.ownerDocument:e.document)||window.document).documentElement}function td(e){return Wn(e)==="html"?e:e.assignedSlot||e.parentNode||(Z1(e)?e.host:null)||qi(e)}function SC(e){return!dn(e)||ui(e).position==="fixed"?null:e.offsetParent}function HK(e){var t=/firefox/i.test(bw()),r=/Trident/i.test(bw());if(r&&dn(e)){var n=ui(e);if(n.position==="fixed")return null}var i=td(e);for(Z1(i)&&(i=i.host);dn(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 tl(e){for(var t=Xr(e),r=SC(e);r&&$K(r)&&ui(r).position==="static";)r=SC(r);return r&&(Wn(r)==="html"||Wn(r)==="body"&&ui(r).position==="static")?t:r||HK(e)||t}function Q1(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Rs(e,t,r){return io(e,Ru(t,r))}function VK(e,t,r){var n=Rs(e,t,r);return n>r?r:n}function UL(){return{top:0,right:0,bottom:0,left:0}}function GL(e){return Object.assign({},UL(),e)}function KL(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var WK=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,GL(typeof t!="number"?t:KL(t,el))};function UK(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=Q1(s),u=[jr,pn].indexOf(s)>=0,d=u?"height":"width";if(!(!o||!a)){var p=WK(i.padding,r),v=J1(o),h=c==="y"?Dr:jr,x=c==="y"?fn:pn,m=r.rects.reference[d]+r.rects.reference[c]-a[c]-r.rects.popper[d],b=a[c]-r.rects.reference[c],w=tl(o),y=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,_=m/2-b/2,S=p[h],E=y-v[d]-p[x],I=y/2-v[d]/2+_,N=Rs(S,I,E),T=c;r.modifiersData[n]=(t={},t[T]=N,t.centerOffset=N-I,t)}}function GK(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)||WL(t.elements.popper,i)&&(t.elements.arrow=i))}const KK={name:"arrow",enabled:!0,phase:"main",fn:UK,effect:GK,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function da(e){return e.split("-")[1]}var YK={top:"auto",right:"auto",bottom:"auto",left:"auto"};function XK(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:ca(r*i)/i||0,y:ca(n*i)/i||0}}function OC(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,m=x===void 0?0:x,b=typeof d=="function"?d({x:h,y:m}):{x:h,y:m};h=b.x,m=b.y;var w=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),_=jr,S=Dr,E=window;if(u){var I=tl(r),N="clientHeight",T="clientWidth";if(I===Xr(r)&&(I=qi(r),ui(I).position!=="static"&&s==="absolute"&&(N="scrollHeight",T="scrollWidth")),I=I,i===Dr||(i===jr||i===pn)&&o===Ls){S=fn;var A=p&&I===E&&E.visualViewport?E.visualViewport.height:I[N];m-=A-n.height,m*=c?1:-1}if(i===jr||(i===Dr||i===fn)&&o===Ls){_=pn;var B=p&&I===E&&E.visualViewport?E.visualViewport.width:I[T];h-=B-n.width,h*=c?1:-1}}var L=Object.assign({position:s},u&&YK),D=d===!0?XK({x:h,y:m},Xr(r)):{x:h,y:m};if(h=D.x,m=D.y,c){var z;return Object.assign({},L,(z={},z[S]=y?"0":"",z[_]=w?"0":"",z.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",z))}return Object.assign({},L,(t={},t[S]=y?m+"px":"",t[_]=w?h+"px":"",t.transform="",t))}function ZK(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:da(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,OC(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,OC(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 JK={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ZK,data:{}};var Rc={passive:!0};function QK(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=Xr(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 eY={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:QK,data:{}};var tY={left:"right",right:"left",bottom:"top",top:"bottom"};function nu(e){return e.replace(/left|right|bottom|top/g,function(t){return tY[t]})}var rY={start:"end",end:"start"};function CC(e){return e.replace(/start|end/g,function(t){return rY[t]})}function e_(e){var t=Xr(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function t_(e){return ua(qi(e)).left+e_(e).scrollLeft}function nY(e,t){var r=Xr(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=VL();(u||!u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+t_(e),y:c}}function iY(e){var t,r=qi(e),n=e_(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+t_(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 r_(e){var t=ui(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function YL(e){return["html","body","#document"].indexOf(Wn(e))>=0?e.ownerDocument.body:dn(e)&&r_(e)?e:YL(td(e))}function Ns(e,t){var r;t===void 0&&(t=[]);var n=YL(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Xr(n),a=i?[o].concat(o.visualViewport||[],r_(n)?n:[]):n,s=t.concat(a);return i?s:s.concat(Ns(td(a)))}function yw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function oY(e,t){var r=ua(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 IC(e,t,r){return t===$L?yw(nY(e,r)):fo(t)?oY(t,r):yw(iY(qi(e)))}function aY(e){var t=Ns(td(e)),r=["absolute","fixed"].indexOf(ui(e).position)>=0,n=r&&dn(e)?tl(e):e;return fo(n)?t.filter(function(i){return fo(i)&&WL(i,n)&&Wn(i)!=="body"}):[]}function sY(e,t,r,n){var i=t==="clippingParents"?aY(e):[].concat(t),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(c,u){var d=IC(e,u,n);return c.top=io(d.top,c.top),c.right=Ru(d.right,c.right),c.bottom=Ru(d.bottom,c.bottom),c.left=io(d.left,c.left),c},IC(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 XL(e){var t=e.reference,r=e.element,n=e.placement,i=n?$n(n):null,o=n?da(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,c;switch(i){case Dr:c={x:a,y:t.y-r.height};break;case fn:c={x:a,y:t.y+t.height};break;case pn:c={x:t.x+t.width,y:s};break;case jr:c={x:t.x-r.width,y:s};break;default:c={x:t.x,y:t.y}}var u=i?Q1(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case la:c[u]=c[u]-(t[d]/2-r[d]/2);break;case Ls:c[u]=c[u]+(t[d]/2-r[d]/2);break}}return c}function zs(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?IK:s,u=r.rootBoundary,d=u===void 0?$L:u,p=r.elementContext,v=p===void 0?Xa:p,h=r.altBoundary,x=h===void 0?!1:h,m=r.padding,b=m===void 0?0:m,w=GL(typeof b!="number"?b:KL(b,el)),y=v===Xa?RK:Xa,_=e.rects.popper,S=e.elements[x?y:v],E=sY(fo(S)?S:S.contextElement||qi(e.elements.popper),c,d,a),I=ua(e.elements.reference),N=XL({reference:I,element:_,placement:i}),T=yw(Object.assign({},_,N)),A=v===Xa?T:I,B={top:E.top-A.top+w.top,bottom:A.bottom-E.bottom+w.bottom,left:E.left-A.left+w.left,right:A.right-E.right+w.right},L=e.modifiersData.offset;if(v===Xa&&L){var D=L[i];Object.keys(B).forEach(function(z){var P=[pn,fn].indexOf(z)>=0?1:-1,K=[Dr,fn].indexOf(z)>=0?"y":"x";B[z]+=D[K]*P})}return B}function lY(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?HL:c,d=da(n),p=d?s?EC:EC.filter(function(x){return da(x)===d}):el,v=p.filter(function(x){return u.indexOf(x)>=0});v.length===0&&(v=p);var h=v.reduce(function(x,m){return x[m]=zs(e,{placement:m,boundary:i,rootBoundary:o,padding:a})[$n(m)],x},{});return Object.keys(h).sort(function(x,m){return h[x]-h[m]})}function cY(e){if($n(e)===X1)return[];var t=nu(e);return[CC(e),t,CC(t)]}function uY(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,m=r.allowedAutoPlacements,b=t.options.placement,w=$n(b),y=w===b,_=c||(y||!x?[nu(b)]:cY(b)),S=[b].concat(_).reduce(function(j,G){return j.concat($n(G)===X1?lY(t,{placement:G,boundary:d,rootBoundary:p,padding:u,flipVariations:x,allowedAutoPlacements:m}):G)},[]),E=t.rects.reference,I=t.rects.popper,N=new Map,T=!0,A=S[0],B=0;B<S.length;B++){var L=S[B],D=$n(L),z=da(L)===la,P=[Dr,fn].indexOf(D)>=0,K=P?"width":"height",$=zs(t,{placement:L,boundary:d,rootBoundary:p,altBoundary:v,padding:u}),Y=P?z?pn:jr:z?fn:Dr;E[K]>I[K]&&(Y=nu(Y));var U=nu(Y),Q=[];if(o&&Q.push($[D]<=0),s&&Q.push($[Y]<=0,$[U]<=0),Q.every(function(j){return j})){A=L,T=!1;break}N.set(L,Q)}if(T)for(var k=x?3:1,W=function(G){var H=S.find(function(q){var X=N.get(q);if(X)return X.slice(0,G).every(function(ne){return ne})});if(H)return A=H,"break"},J=k;J>0;J--){var ee=W(J);if(ee==="break")break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}const dY={name:"flip",enabled:!0,phase:"main",fn:uY,requiresIfExists:["offset"],data:{_skip:!1}};function RC(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 NC(e){return[Dr,pn,fn,jr].some(function(t){return e[t]>=0})}function fY(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=zs(t,{elementContext:"reference"}),s=zs(t,{altBoundary:!0}),c=RC(a,n),u=RC(s,i,o),d=NC(c),p=NC(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 pY={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:fY};function hY(e,t,r){var n=$n(e),i=[jr,Dr].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,[jr,pn].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function vY(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=HL.reduce(function(d,p){return d[p]=hY(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 gY={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:vY};function mY(e){var t=e.state,r=e.name;t.modifiersData[r]=XL({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const bY={name:"popperOffsets",enabled:!0,phase:"read",fn:mY,data:{}};function yY(e){return e==="x"?"y":"x"}function xY(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,m=x===void 0?0:x,b=zs(t,{boundary:c,rootBoundary:u,padding:p,altBoundary:d}),w=$n(t.placement),y=da(t.placement),_=!y,S=Q1(w),E=yY(S),I=t.modifiersData.popperOffsets,N=t.rects.reference,T=t.rects.popper,A=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,B=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(I){if(o){var z,P=S==="y"?Dr:jr,K=S==="y"?fn:pn,$=S==="y"?"height":"width",Y=I[S],U=Y+b[P],Q=Y-b[K],k=h?-T[$]/2:0,W=y===la?N[$]:T[$],J=y===la?-T[$]:-N[$],ee=t.elements.arrow,j=h&&ee?J1(ee):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:UL(),H=G[P],q=G[K],X=Rs(0,N[$],j[$]),ne=_?N[$]/2-k-X-H-B.mainAxis:W-X-H-B.mainAxis,te=_?-N[$]/2+k+X+q+B.mainAxis:J+X+q+B.mainAxis,ue=t.elements.arrow&&tl(t.elements.arrow),re=ue?S==="y"?ue.clientTop||0:ue.clientLeft||0:0,ge=(z=L==null?void 0:L[S])!=null?z:0,de=Y+ne-ge-re,xe=Y+te-ge,se=Rs(h?Ru(U,de):U,Y,h?io(Q,xe):Q);I[S]=se,D[S]=se-Y}if(s){var le,we=S==="x"?Dr:jr,Oe=S==="x"?fn:pn,Te=I[E],qe=E==="y"?"height":"width",Ue=Te+b[we],De=Te-b[Oe],ot=[Dr,jr].indexOf(w)!==-1,vt=(le=L==null?void 0:L[E])!=null?le:0,Et=ot?Ue:Te-N[qe]-T[qe]-vt+B.altAxis,We=ot?Te+N[qe]+T[qe]-vt-B.altAxis:De,je=h&&ot?VK(Et,Te,We):Rs(h?Et:Ue,Te,h?We:De);I[E]=je,D[E]=je-Te}t.modifiersData[n]=D}}const wY={name:"preventOverflow",enabled:!0,phase:"main",fn:xY,requiresIfExists:["offset"]};function _Y(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function EY(e){return e===Xr(e)||!dn(e)?e_(e):_Y(e)}function SY(e){var t=e.getBoundingClientRect(),r=ca(t.width)/e.offsetWidth||1,n=ca(t.height)/e.offsetHeight||1;return r!==1||n!==1}function OY(e,t,r){r===void 0&&(r=!1);var n=dn(t),i=dn(t)&&SY(t),o=qi(t),a=ua(e,i,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Wn(t)!=="body"||r_(o))&&(s=EY(t)),dn(t)?(c=ua(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=t_(o))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function CY(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 IY(e){var t=CY(e);return LK.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function RY(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function NY(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 TC={placement:"bottom",modifiers:[],strategy:"absolute"};function PC(){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 TY(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?TC:i;return function(s,c,u){u===void 0&&(u=o);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},TC,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;m(),d.options=Object.assign({},o,d.options,y),d.scrollParents={reference:fo(s)?Ns(s):s.contextElement?Ns(s.contextElement):[],popper:Ns(c)};var _=IY(NY([].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(PC(y,_)){d.rects={reference:OY(y,tl(_),d.options.strategy==="fixed"),popper:J1(_)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(B){return d.modifiersData[B.name]=Object.assign({},B.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,A=E.name;typeof I=="function"&&(d=I({state:d,options:T,name:A,instance:h})||d)}}}},update:RY(function(){return new Promise(function(b){h.forceUpdate(),b(d)})}),destroy:function(){m(),v=!0}};if(!PC(s,c))return h;h.setOptions(u).then(function(b){!v&&u.onFirstUpdate&&u.onFirstUpdate(b)});function x(){d.orderedModifiers.forEach(function(b){var w=b.name,y=b.options,_=y===void 0?{}:y,S=b.effect;if(typeof S=="function"){var E=S({state:d,name:w,instance:h,options:_}),I=function(){};p.push(E||I)}})}function m(){p.forEach(function(b){return b()}),p=[]}return h}}var PY=[eY,bY,JK,FK,gY,dY,wY,KK,pY],kY=TY({defaultModifiers:PY}),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 Dp,kC;function AY(){if(kC)return Dp;kC=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 Dp=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}},Dp}var MY=AY();const DY=Li(MY);var jY=[],rd=function(t,r,n){n===void 0&&(n={});var i=Ct.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||jY},a=Ct.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],c=a[1],u=Ct.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(h){var x=h.state,m=Object.keys(x.elements);xW.flushSync(function(){c({styles:wC(m.map(function(b){return[b,x.styles[b]||{}]})),attributes:wC(m.map(function(b){return[b,x.attributes[b]]}))})})},requires:["computeStyles"]}},[]),d=Ct.useMemo(function(){var v={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[u,{name:"applyStyles",enabled:!1}])};return DY(i.current,v)?i.current||v:(i.current=v,v)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,u]),p=Ct.useRef();return _C(function(){p.current&&p.current.setOptions(d)},[d]),_C(function(){if(!(t==null||r==null)){var v=n.createPopper||kY,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 ZL=({tab:e})=>C.jsx(dr,{depth:1,className:"flex flex-1 items-center justify-center border-l-[0.5px]",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-inactive-text",children:[C.jsx(_e.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 n_(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 jp,AC;function qY(){if(AC)return jp;AC=1;function e(){this.__data__=[],this.size=0}return jp=e,jp}var qp,MC;function wa(){if(MC)return qp;MC=1;function e(t,r){return t===r||t!==t&&r!==r}return qp=e,qp}var Lp,DC;function nd(){if(DC)return Lp;DC=1;var e=wa();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Lp=t,Lp}var zp,jC;function LY(){if(jC)return zp;jC=1;var e=nd(),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 zp=n,zp}var Bp,qC;function zY(){if(qC)return Bp;qC=1;var e=nd();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return Bp=t,Bp}var Fp,LC;function BY(){if(LC)return Fp;LC=1;var e=nd();function t(r){return e(this.__data__,r)>-1}return Fp=t,Fp}var $p,zC;function FY(){if(zC)return $p;zC=1;var e=nd();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 $p=t,$p}var Hp,BC;function id(){if(BC)return Hp;BC=1;var e=qY(),t=LY(),r=zY(),n=BY(),i=FY();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,Hp=o,Hp}var Vp,FC;function $Y(){if(FC)return Vp;FC=1;var e=id();function t(){this.__data__=new e,this.size=0}return Vp=t,Vp}var Wp,$C;function HY(){if($C)return Wp;$C=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Wp=e,Wp}var Up,HC;function VY(){if(HC)return Up;HC=1;function e(t){return this.__data__.get(t)}return Up=e,Up}var Gp,VC;function WY(){if(VC)return Gp;VC=1;function e(t){return this.__data__.has(t)}return Gp=e,Gp}var Kp,WC;function JL(){if(WC)return Kp;WC=1;var e=typeof At=="object"&&At&&At.Object===Object&&At;return Kp=e,Kp}var Yp,UC;function Pn(){if(UC)return Yp;UC=1;var e=JL(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Yp=r,Yp}var Xp,GC;function _a(){if(GC)return Xp;GC=1;var e=Pn(),t=e.Symbol;return Xp=t,Xp}var Zp,KC;function UY(){if(KC)return Zp;KC=1;var e=_a(),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 Zp=o,Zp}var Jp,YC;function GY(){if(YC)return Jp;YC=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Jp=r,Jp}var Qp,XC;function vo(){if(XC)return Qp;XC=1;var e=_a(),t=UY(),r=GY(),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 Qp=a,Qp}var eh,ZC;function hn(){if(ZC)return eh;ZC=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return eh=e,eh}var th,JC;function rl(){if(JC)return th;JC=1;var e=vo(),t=hn(),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 th=a,th}var rh,QC;function KY(){if(QC)return rh;QC=1;var e=Pn(),t=e["__core-js_shared__"];return rh=t,rh}var nh,eI;function YY(){if(eI)return nh;eI=1;var e=KY(),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 nh=r,nh}var ih,tI;function QL(){if(tI)return ih;tI=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 ih=r,ih}var oh,rI;function XY(){if(rI)return oh;rI=1;var e=rl(),t=YY(),r=hn(),n=QL(),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 oh=p,oh}var ah,nI;function ZY(){if(nI)return ah;nI=1;function e(t,r){return t==null?void 0:t[r]}return ah=e,ah}var sh,iI;function go(){if(iI)return sh;iI=1;var e=XY(),t=ZY();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return sh=r,sh}var lh,oI;function i_(){if(oI)return lh;oI=1;var e=go(),t=Pn(),r=e(t,"Map");return lh=r,lh}var ch,aI;function od(){if(aI)return ch;aI=1;var e=go(),t=e(Object,"create");return ch=t,ch}var uh,sI;function JY(){if(sI)return uh;sI=1;var e=od();function t(){this.__data__=e?e(null):{},this.size=0}return uh=t,uh}var dh,lI;function QY(){if(lI)return dh;lI=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return dh=e,dh}var fh,cI;function eX(){if(cI)return fh;cI=1;var e=od(),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 fh=i,fh}var ph,uI;function tX(){if(uI)return ph;uI=1;var e=od(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return ph=n,ph}var hh,dI;function rX(){if(dI)return hh;dI=1;var e=od(),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 hh=r,hh}var vh,fI;function nX(){if(fI)return vh;fI=1;var e=JY(),t=QY(),r=eX(),n=tX(),i=rX();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,vh=o,vh}var gh,pI;function iX(){if(pI)return gh;pI=1;var e=nX(),t=id(),r=i_();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return gh=n,gh}var mh,hI;function oX(){if(hI)return mh;hI=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return mh=e,mh}var bh,vI;function ad(){if(vI)return bh;vI=1;var e=oX();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return bh=t,bh}var yh,gI;function aX(){if(gI)return yh;gI=1;var e=ad();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return yh=t,yh}var xh,mI;function sX(){if(mI)return xh;mI=1;var e=ad();function t(r){return e(this,r).get(r)}return xh=t,xh}var wh,bI;function lX(){if(bI)return wh;bI=1;var e=ad();function t(r){return e(this,r).has(r)}return wh=t,wh}var _h,yI;function cX(){if(yI)return _h;yI=1;var e=ad();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 _h=t,_h}var Eh,xI;function o_(){if(xI)return Eh;xI=1;var e=iX(),t=aX(),r=sX(),n=lX(),i=cX();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,Eh=o,Eh}var Sh,wI;function uX(){if(wI)return Sh;wI=1;var e=id(),t=i_(),r=o_(),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 Sh=i,Sh}var Oh,_I;function sd(){if(_I)return Oh;_I=1;var e=id(),t=$Y(),r=HY(),n=VY(),i=WY(),o=uX();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,Oh=a,Oh}var Ch,EI;function a_(){if(EI)return Ch;EI=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 Ch=e,Ch}var Ih,SI;function e5(){if(SI)return Ih;SI=1;var e=go(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Ih=t,Ih}var Rh,OI;function ld(){if(OI)return Rh;OI=1;var e=e5();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Rh=t,Rh}var Nh,CI;function cd(){if(CI)return Nh;CI=1;var e=ld(),t=wa(),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 Nh=i,Nh}var Th,II;function nl(){if(II)return Th;II=1;var e=cd(),t=ld();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 Th=r,Th}var Ph,RI;function dX(){if(RI)return Ph;RI=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Ph=e,Ph}var kh,NI;function Un(){if(NI)return kh;NI=1;function e(t){return t!=null&&typeof t=="object"}return kh=e,kh}var Ah,TI;function fX(){if(TI)return Ah;TI=1;var e=vo(),t=Un(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Ah=n,Ah}var Mh,PI;function il(){if(PI)return Mh;PI=1;var e=fX(),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 Dh,kI;function Vt(){if(kI)return Dh;kI=1;var e=Array.isArray;return Dh=e,Dh}var ms={exports:{}},jh,AI;function pX(){if(AI)return jh;AI=1;function e(){return!1}return jh=e,jh}ms.exports;var MI;function Ea(){return MI||(MI=1,(function(e,t){var r=Pn(),n=pX(),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})(ms,ms.exports)),ms.exports}var qh,DI;function ud(){if(DI)return qh;DI=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 qh=r,qh}var Lh,jI;function s_(){if(jI)return Lh;jI=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Lh=t,Lh}var zh,qI;function hX(){if(qI)return zh;qI=1;var e=vo(),t=s_(),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]",m="[object WeakMap]",b="[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]",A="[object Uint16Array]",B="[object Uint32Array]",L={};L[y]=L[_]=L[S]=L[E]=L[I]=L[N]=L[T]=L[A]=L[B]=!0,L[n]=L[i]=L[b]=L[o]=L[w]=L[a]=L[s]=L[c]=L[u]=L[d]=L[p]=L[v]=L[h]=L[x]=L[m]=!1;function D(z){return r(z)&&t(z.length)&&!!L[e(z)]}return zh=D,zh}var Bh,LI;function dd(){if(LI)return Bh;LI=1;function e(t){return function(r){return t(r)}}return Bh=e,Bh}var bs={exports:{}};bs.exports;var zI;function l_(){return zI||(zI=1,(function(e,t){var r=JL(),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})(bs,bs.exports)),bs.exports}var Fh,BI;function ol(){if(BI)return Fh;BI=1;var e=hX(),t=dd(),r=l_(),n=r&&r.isTypedArray,i=n?t(n):e;return Fh=i,Fh}var $h,FI;function t5(){if(FI)return $h;FI=1;var e=dX(),t=il(),r=Vt(),n=Ea(),i=ud(),o=ol(),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),m=p||v||h||x,b=m?e(u.length,String):[],w=b.length;for(var y in u)(d||s.call(u,y))&&!(m&&(y=="length"||h&&(y=="offset"||y=="parent")||x&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||i(y,w)))&&b.push(y);return b}return $h=c,$h}var Hh,$I;function fd(){if($I)return Hh;$I=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return Hh=t,Hh}var Vh,HI;function r5(){if(HI)return Vh;HI=1;function e(t,r){return function(n){return t(r(n))}}return Vh=e,Vh}var Wh,VI;function vX(){if(VI)return Wh;VI=1;var e=r5(),t=e(Object.keys,Object);return Wh=t,Wh}var Uh,WI;function c_(){if(WI)return Uh;WI=1;var e=fd(),t=vX(),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 Uh=i,Uh}var Gh,UI;function fi(){if(UI)return Gh;UI=1;var e=rl(),t=s_();function r(n){return n!=null&&t(n.length)&&!e(n)}return Gh=r,Gh}var Kh,GI;function zi(){if(GI)return Kh;GI=1;var e=t5(),t=c_(),r=fi();function n(i){return r(i)?e(i):t(i)}return Kh=n,Kh}var Yh,KI;function gX(){if(KI)return Yh;KI=1;var e=nl(),t=zi();function r(n,i){return n&&e(i,t(i),n)}return Yh=r,Yh}var Xh,YI;function mX(){if(YI)return Xh;YI=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return Xh=e,Xh}var Zh,XI;function bX(){if(XI)return Zh;XI=1;var e=hn(),t=fd(),r=mX(),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 Zh=o,Zh}var Jh,ZI;function mo(){if(ZI)return Jh;ZI=1;var e=t5(),t=bX(),r=fi();function n(i){return r(i)?e(i,!0):t(i)}return Jh=n,Jh}var Qh,JI;function yX(){if(JI)return Qh;JI=1;var e=nl(),t=mo();function r(n,i){return n&&e(i,t(i),n)}return Qh=r,Qh}var ys={exports:{}};ys.exports;var QI;function n5(){return QI||(QI=1,(function(e,t){var r=Pn(),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})(ys,ys.exports)),ys.exports}var ev,eR;function i5(){if(eR)return ev;eR=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 ev=e,ev}var tv,tR;function o5(){if(tR)return tv;tR=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 tv=e,tv}var rv,rR;function a5(){if(rR)return rv;rR=1;function e(){return[]}return rv=e,rv}var nv,nR;function u_(){if(nR)return nv;nR=1;var e=o5(),t=a5(),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 nv=o,nv}var iv,iR;function xX(){if(iR)return iv;iR=1;var e=nl(),t=u_();function r(n,i){return e(n,t(n),i)}return iv=r,iv}var ov,oR;function d_(){if(oR)return ov;oR=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 ov=e,ov}var av,aR;function pd(){if(aR)return av;aR=1;var e=r5(),t=e(Object.getPrototypeOf,Object);return av=t,av}var sv,sR;function s5(){if(sR)return sv;sR=1;var e=d_(),t=pd(),r=u_(),n=a5(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var s=[];a;)e(s,r(a)),a=t(a);return s}:n;return sv=o,sv}var lv,lR;function wX(){if(lR)return lv;lR=1;var e=nl(),t=s5();function r(n,i){return e(n,t(n),i)}return lv=r,lv}var cv,cR;function l5(){if(cR)return cv;cR=1;var e=d_(),t=Vt();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return cv=r,cv}var uv,uR;function c5(){if(uR)return uv;uR=1;var e=l5(),t=u_(),r=zi();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=l5(),t=s5(),r=mo();function n(i){return e(i,r,t)}return dv=n,dv}var fv,fR;function EX(){if(fR)return fv;fR=1;var e=go(),t=Pn(),r=e(t,"DataView");return fv=r,fv}var pv,pR;function SX(){if(pR)return pv;pR=1;var e=go(),t=Pn(),r=e(t,"Promise");return pv=r,pv}var hv,hR;function u5(){if(hR)return hv;hR=1;var e=go(),t=Pn(),r=e(t,"Set");return hv=r,hv}var vv,vR;function OX(){if(vR)return vv;vR=1;var e=go(),t=Pn(),r=e(t,"WeakMap");return vv=r,vv}var gv,gR;function Sa(){if(gR)return gv;gR=1;var e=EX(),t=i_(),r=SX(),n=u5(),i=OX(),o=vo(),a=QL(),s="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",p="[object WeakMap]",v="[object DataView]",h=a(e),x=a(t),m=a(r),b=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 m:return u;case b:return d;case w:return p}return S}),gv=y,gv}var mv,mR;function CX(){if(mR)return mv;mR=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 mv=r,mv}var bv,bR;function d5(){if(bR)return bv;bR=1;var e=Pn(),t=e.Uint8Array;return bv=t,bv}var yv,yR;function f_(){if(yR)return yv;yR=1;var e=d5();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return yv=t,yv}var xv,xR;function IX(){if(xR)return xv;xR=1;var e=f_();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return xv=t,xv}var wv,wR;function RX(){if(wR)return wv;wR=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return wv=t,wv}var _v,_R;function NX(){if(_R)return _v;_R=1;var e=_a(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return _v=n,_v}var Ev,ER;function f5(){if(ER)return Ev;ER=1;var e=f_();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return Ev=t,Ev}var Sv,SR;function TX(){if(SR)return Sv;SR=1;var e=f_(),t=IX(),r=RX(),n=NX(),i=f5(),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]",m="[object Float32Array]",b="[object Float64Array]",w="[object Int8Array]",y="[object Int16Array]",_="[object Int32Array]",S="[object Uint8Array]",E="[object Uint8ClampedArray]",I="[object Uint16Array]",N="[object Uint32Array]";function T(A,B,L){var D=A.constructor;switch(B){case h:return e(A);case o:case a:return new D(+A);case x:return t(A,L);case m:case b:case w:case y:case _:case S:case E:case I:case N:return i(A,L);case s:return new D;case c:case p:return new D(A);case u:return r(A);case d:return new D;case v:return n(A)}}return Sv=T,Sv}var Ov,OR;function p5(){if(OR)return Ov;OR=1;var e=hn(),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 Ov=r,Ov}var Cv,CR;function h5(){if(CR)return Cv;CR=1;var e=p5(),t=pd(),r=fd();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Cv=n,Cv}var Iv,IR;function PX(){if(IR)return Iv;IR=1;var e=Sa(),t=Un(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Iv=n,Iv}var Rv,RR;function kX(){if(RR)return Rv;RR=1;var e=PX(),t=dd(),r=l_(),n=r&&r.isMap,i=n?t(n):e;return Rv=i,Rv}var Nv,NR;function AX(){if(NR)return Nv;NR=1;var e=Sa(),t=Un(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return Nv=n,Nv}var Tv,TR;function MX(){if(TR)return Tv;TR=1;var e=AX(),t=dd(),r=l_(),n=r&&r.isSet,i=n?t(n):e;return Tv=i,Tv}var Pv,PR;function v5(){if(PR)return Pv;PR=1;var e=sd(),t=a_(),r=cd(),n=gX(),i=yX(),o=n5(),a=i5(),s=xX(),c=wX(),u=c5(),d=_X(),p=Sa(),v=CX(),h=TX(),x=h5(),m=Vt(),b=Ea(),w=kX(),y=hn(),_=MX(),S=zi(),E=mo(),I=1,N=2,T=4,A="[object Arguments]",B="[object Array]",L="[object Boolean]",D="[object Date]",z="[object Error]",P="[object Function]",K="[object GeneratorFunction]",$="[object Map]",Y="[object Number]",U="[object Object]",Q="[object RegExp]",k="[object Set]",W="[object String]",J="[object Symbol]",ee="[object WeakMap]",j="[object ArrayBuffer]",G="[object DataView]",H="[object Float32Array]",q="[object Float64Array]",X="[object Int8Array]",ne="[object Int16Array]",te="[object Int32Array]",ue="[object Uint8Array]",re="[object Uint8ClampedArray]",ge="[object Uint16Array]",de="[object Uint32Array]",xe={};xe[A]=xe[B]=xe[j]=xe[G]=xe[L]=xe[D]=xe[H]=xe[q]=xe[X]=xe[ne]=xe[te]=xe[$]=xe[Y]=xe[U]=xe[Q]=xe[k]=xe[W]=xe[J]=xe[ue]=xe[re]=xe[ge]=xe[de]=!0,xe[z]=xe[P]=xe[ee]=!1;function se(le,we,Oe,Te,qe,Ue){var De,ot=we&I,vt=we&N,Et=we&T;if(Oe&&(De=qe?Oe(le,Te,qe,Ue):Oe(le)),De!==void 0)return De;if(!y(le))return le;var We=m(le);if(We){if(De=v(le),!ot)return a(le,De)}else{var je=p(le),Qe=je==P||je==K;if(b(le))return o(le,ot);if(je==U||je==A||Qe&&!qe){if(De=vt||Qe?{}:x(le),!ot)return vt?c(le,i(De,le)):s(le,n(De,le))}else{if(!xe[je])return qe?le:{};De=h(le,je,ot)}}Ue||(Ue=new e);var dt=Ue.get(le);if(dt)return dt;Ue.set(le,De),_(le)?le.forEach(function(St){De.add(se(St,we,Oe,St,le,Ue))}):w(le)&&le.forEach(function(St,Dt){De.set(Dt,se(St,we,Oe,Dt,le,Ue))});var Qt=Et?vt?d:u:vt?E:S,Mt=We?void 0:Qt(le);return t(Mt||le,function(St,Dt){Mt&&(Dt=St,St=le[Dt]),r(De,Dt,se(St,we,Oe,Dt,le,Ue))}),De}return Pv=se,Pv}var kv,kR;function DX(){if(kR)return kv;kR=1;var e=v5(),t=4;function r(n){return e(n,t)}return kv=r,kv}var Av,AR;function p_(){if(AR)return Av;AR=1;function e(t){return function(){return t}}return Av=e,Av}var Mv,MR;function jX(){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 Dv,DR;function h_(){if(DR)return Dv;DR=1;var e=jX(),t=e();return Dv=t,Dv}var jv,jR;function v_(){if(jR)return jv;jR=1;var e=h_(),t=zi();function r(n,i){return n&&e(n,i,t)}return jv=r,jv}var qv,qR;function qX(){if(qR)return qv;qR=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 qv=t,qv}var Lv,LR;function hd(){if(LR)return Lv;LR=1;var e=v_(),t=qX(),r=t(e);return Lv=r,Lv}var zv,zR;function bo(){if(zR)return zv;zR=1;function e(t){return t}return zv=e,zv}var Bv,BR;function g5(){if(BR)return Bv;BR=1;var e=bo();function t(r){return typeof r=="function"?r:e}return Bv=t,Bv}var Fv,FR;function m5(){if(FR)return Fv;FR=1;var e=a_(),t=hd(),r=g5(),n=Vt();function i(o,a){var s=n(o)?e:t;return s(o,r(a))}return Fv=i,Fv}var $v,$R;function b5(){return $R||($R=1,$v=m5()),$v}var Hv,HR;function LX(){if(HR)return Hv;HR=1;var e=hd();function t(r,n){var i=[];return e(r,function(o,a,s){n(o,a,s)&&i.push(o)}),i}return Hv=t,Hv}var Vv,VR;function zX(){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 Wv,WR;function BX(){if(WR)return Wv;WR=1;function e(t){return this.__data__.has(t)}return Wv=e,Wv}var Uv,UR;function y5(){if(UR)return Uv;UR=1;var e=o_(),t=zX(),r=BX();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,Uv=n,Uv}var Gv,GR;function FX(){if(GR)return Gv;GR=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 Gv=e,Gv}var Kv,KR;function x5(){if(KR)return Kv;KR=1;function e(t,r){return t.has(r)}return Kv=e,Kv}var Yv,YR;function w5(){if(YR)return Yv;YR=1;var e=y5(),t=FX(),r=x5(),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 m=p.get(a),b=p.get(s);if(m&&b)return m==s&&b==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 Yv=o,Yv}var Xv,XR;function $X(){if(XR)return Xv;XR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return Xv=e,Xv}var Zv,ZR;function g_(){if(ZR)return Zv;ZR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return Zv=e,Zv}var Jv,JR;function HX(){if(JR)return Jv;JR=1;var e=_a(),t=d5(),r=wa(),n=w5(),i=$X(),o=g_(),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]",m="[object String]",b="[object Symbol]",w="[object ArrayBuffer]",y="[object DataView]",_=e?e.prototype:void 0,S=_?_.valueOf:void 0;function E(I,N,T,A,B,L,D){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||!L(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 m:return I==N+"";case p:var z=i;case x:var P=A&a;if(z||(z=o),I.size!=N.size&&!P)return!1;var K=D.get(I);if(K)return K==N;A|=s,D.set(I,N);var $=n(z(I),z(N),A,B,L,D);return D.delete(I),$;case b:if(S)return S.call(I)==S.call(N)}return!1}return Jv=E,Jv}var Qv,QR;function VX(){if(QR)return Qv;QR=1;var e=c5(),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),m=x.length;if(h!=m&&!p)return!1;for(var b=h;b--;){var w=v[b];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;++b<h;){w=v[b];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 A=o.constructor,B=a.constructor;A!=B&&"constructor"in o&&"constructor"in a&&!(typeof A=="function"&&A instanceof A&&typeof B=="function"&&B instanceof B)&&(S=!1)}return d.delete(o),d.delete(a),S}return Qv=i,Qv}var eg,eN;function WX(){if(eN)return eg;eN=1;var e=sd(),t=w5(),r=HX(),n=VX(),i=Sa(),o=Vt(),a=Ea(),s=ol(),c=1,u="[object Arguments]",d="[object Array]",p="[object Object]",v=Object.prototype,h=v.hasOwnProperty;function x(m,b,w,y,_,S){var E=o(m),I=o(b),N=E?d:i(m),T=I?d:i(b);N=N==u?p:N,T=T==u?p:T;var A=N==p,B=T==p,L=N==T;if(L&&a(m)){if(!a(b))return!1;E=!0,A=!1}if(L&&!A)return S||(S=new e),E||s(m)?t(m,b,w,y,_,S):r(m,b,N,w,y,_,S);if(!(w&c)){var D=A&&h.call(m,"__wrapped__"),z=B&&h.call(b,"__wrapped__");if(D||z){var P=D?m.value():m,K=z?b.value():b;return S||(S=new e),_(P,K,w,y,S)}}return L?(S||(S=new e),n(m,b,w,y,_,S)):!1}return eg=x,eg}var tg,tN;function _5(){if(tN)return tg;tN=1;var e=WX(),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 tg=r,tg}var rg,rN;function UX(){if(rN)return rg;rN=1;var e=sd(),t=_5(),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],m=v[1];if(p&&v[2]){if(x===void 0&&!(h in o))return!1}else{var b=new e;if(c)var w=c(x,m,h,o,a,b);if(!(w===void 0?t(m,x,r|n,c,b):w))return!1}}return!0}return rg=i,rg}var ng,nN;function E5(){if(nN)return ng;nN=1;var e=hn();function t(r){return r===r&&!e(r)}return ng=t,ng}var ig,iN;function GX(){if(iN)return ig;iN=1;var e=E5(),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 ig=r,ig}var og,oN;function S5(){if(oN)return og;oN=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return og=e,og}var ag,aN;function KX(){if(aN)return ag;aN=1;var e=UX(),t=GX(),r=S5();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 ag=n,ag}var sg,sN;function Oa(){if(sN)return sg;sN=1;var e=vo(),t=Un(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return sg=n,sg}var lg,lN;function m_(){if(lN)return lg;lN=1;var e=Vt(),t=Oa(),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 lg=i,lg}var cg,cN;function YX(){if(cN)return cg;cN=1;var e=o_(),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,cg=r,cg}var ug,uN;function XX(){if(uN)return ug;uN=1;var e=YX(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return ug=r,ug}var dg,dN;function ZX(){if(dN)return dg;dN=1;var e=XX(),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 dg=n,dg}var fg,fN;function vd(){if(fN)return fg;fN=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 fg=e,fg}var pg,pN;function JX(){if(pN)return pg;pN=1;var e=_a(),t=vd(),r=Vt(),n=Oa(),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 pg=a,pg}var hg,hN;function O5(){if(hN)return hg;hN=1;var e=JX();function t(r){return r==null?"":e(r)}return hg=t,hg}var vg,vN;function gd(){if(vN)return vg;vN=1;var e=Vt(),t=m_(),r=ZX(),n=O5();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return vg=i,vg}var gg,gN;function al(){if(gN)return gg;gN=1;var e=Oa();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return gg=t,gg}var mg,mN;function md(){if(mN)return mg;mN=1;var e=gd(),t=al();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 mg=r,mg}var bg,bN;function QX(){if(bN)return bg;bN=1;var e=md();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return bg=t,bg}var yg,yN;function eZ(){if(yN)return yg;yN=1;function e(t,r){return t!=null&&r in Object(t)}return yg=e,yg}var xg,xN;function C5(){if(xN)return xg;xN=1;var e=gd(),t=il(),r=Vt(),n=ud(),i=s_(),o=al();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 xg=a,xg}var wg,wN;function I5(){if(wN)return wg;wN=1;var e=eZ(),t=C5();function r(n,i){return n!=null&&t(n,i,e)}return wg=r,wg}var _g,_N;function tZ(){if(_N)return _g;_N=1;var e=_5(),t=QX(),r=I5(),n=m_(),i=E5(),o=S5(),a=al(),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 _g=u,_g}var Eg,EN;function R5(){if(EN)return Eg;EN=1;function e(t){return function(r){return r==null?void 0:r[t]}}return Eg=e,Eg}var Sg,SN;function rZ(){if(SN)return Sg;SN=1;var e=md();function t(r){return function(n){return e(n,r)}}return Sg=t,Sg}var Og,ON;function nZ(){if(ON)return Og;ON=1;var e=R5(),t=rZ(),r=m_(),n=al();function i(o){return r(o)?e(n(o)):t(o)}return Og=i,Og}var Cg,CN;function pi(){if(CN)return Cg;CN=1;var e=KX(),t=tZ(),r=bo(),n=Vt(),i=nZ();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 Cg=o,Cg}var Ig,IN;function N5(){if(IN)return Ig;IN=1;var e=o5(),t=LX(),r=pi(),n=Vt();function i(o,a){var s=n(o)?e:t;return s(o,r(a,3))}return Ig=i,Ig}var Rg,RN;function iZ(){if(RN)return Rg;RN=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return Rg=r,Rg}var Ng,NN;function T5(){if(NN)return Ng;NN=1;var e=iZ(),t=C5();function r(n,i){return n!=null&&t(n,i,e)}return Ng=r,Ng}var Tg,TN;function oZ(){if(TN)return Tg;TN=1;var e=c_(),t=Sa(),r=il(),n=Vt(),i=fi(),o=Ea(),a=fd(),s=ol(),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 m in h)if(p.call(h,m))return!1;return!0}return Tg=v,Tg}var Pg,PN;function P5(){if(PN)return Pg;PN=1;function e(t){return t===void 0}return Pg=e,Pg}var kg,kN;function k5(){if(kN)return kg;kN=1;var e=hd(),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 kg=r,kg}var Ag,AN;function A5(){if(AN)return Ag;AN=1;var e=vd(),t=pi(),r=k5(),n=Vt();function i(o,a){var s=n(o)?e:r;return s(o,t(a,3))}return Ag=i,Ag}var Mg,MN;function aZ(){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 Dg,DN;function sZ(){if(DN)return Dg;DN=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 Dg=e,Dg}var jg,jN;function M5(){if(jN)return jg;jN=1;var e=aZ(),t=hd(),r=pi(),n=sZ(),i=Vt();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 jg=o,jg}var qg,qN;function lZ(){if(qN)return qg;qN=1;var e=vo(),t=Vt(),r=Un(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return qg=i,qg}var Lg,LN;function cZ(){if(LN)return Lg;LN=1;var e=R5(),t=e("length");return Lg=t,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="\\u200d",s=RegExp("["+a+e+i+o+"]");function c(u){return s.test(u)}return zg=c,zg}var Bg,BN;function dZ(){if(BN)return Bg;BN=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+"?",m="["+o+"]?",b="(?:"+h+"(?:"+[d,p,v].join("|")+")"+m+x+")*",w=m+x+b,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 Bg=S,Bg}var Fg,FN;function fZ(){if(FN)return Fg;FN=1;var e=cZ(),t=uZ(),r=dZ();function n(i){return t(i)?r(i):e(i)}return Fg=n,Fg}var $g,$N;function pZ(){if($N)return $g;$N=1;var e=c_(),t=Sa(),r=fi(),n=lZ(),i=fZ(),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 $g=s,$g}var Hg,HN;function hZ(){if(HN)return Hg;HN=1;var e=a_(),t=p5(),r=v_(),n=pi(),i=pd(),o=Vt(),a=Ea(),s=rl(),c=hn(),u=ol();function d(p,v,h){var x=o(p),m=x||a(p)||u(p);if(v=n(v,4),h==null){var b=p&&p.constructor;m?h=x?new b:[]:c(p)?h=s(b)?t(i(p)):{}:h={}}return(m?e:r)(p,function(w,y,_){return v(h,w,y,_)}),h}return Hg=d,Hg}var Vg,VN;function vZ(){if(VN)return Vg;VN=1;var e=_a(),t=il(),r=Vt(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return Vg=i,Vg}var Wg,WN;function b_(){if(WN)return Wg;WN=1;var e=d_(),t=vZ();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 Wg=r,Wg}var Ug,UN;function gZ(){if(UN)return Ug;UN=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 Ug=e,Ug}var Gg,GN;function D5(){if(GN)return Gg;GN=1;var e=gZ(),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 Gg=r,Gg}var Kg,KN;function mZ(){if(KN)return Kg;KN=1;var e=p_(),t=e5(),r=bo(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return Kg=n,Kg}var Yg,YN;function bZ(){if(YN)return Yg;YN=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 Yg=n,Yg}var Xg,XN;function j5(){if(XN)return Xg;XN=1;var e=mZ(),t=bZ(),r=t(e);return Xg=r,Xg}var Zg,ZN;function bd(){if(ZN)return Zg;ZN=1;var e=bo(),t=D5(),r=j5();function n(i,o){return r(t(i,o,e),i+"")}return Zg=n,Zg}var Jg,JN;function q5(){if(JN)return Jg;JN=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 Jg=e,Jg}var Qg,QN;function yZ(){if(QN)return Qg;QN=1;function e(t){return t!==t}return Qg=e,Qg}var em,eT;function xZ(){if(eT)return em;eT=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 em=e,em}var tm,tT;function wZ(){if(tT)return tm;tT=1;var e=q5(),t=yZ(),r=xZ();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return tm=n,tm}var rm,rT;function _Z(){if(rT)return rm;rT=1;var e=wZ();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return rm=t,rm}var nm,nT;function EZ(){if(nT)return nm;nT=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 nm=e,nm}var im,iT;function SZ(){if(iT)return im;iT=1;function e(){}return im=e,im}var om,oT;function OZ(){if(oT)return om;oT=1;var e=u5(),t=SZ(),r=g_(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return om=i,om}var am,aT;function CZ(){if(aT)return am;aT=1;var e=y5(),t=_Z(),r=EZ(),n=x5(),i=OZ(),o=g_(),a=200;function s(c,u,d){var p=-1,v=t,h=c.length,x=!0,m=[],b=m;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,b=new e}else b=u?[]:m;e:for(;++p<h;){var y=c[p],_=u?u(y):y;if(y=d||y!==0?y:0,x&&_===_){for(var S=b.length;S--;)if(b[S]===_)continue e;u&&b.push(_),m.push(y)}else v(b,_,d)||(b!==m&&b.push(_),m.push(y))}return m}return am=s,am}var sm,sT;function L5(){if(sT)return sm;sT=1;var e=fi(),t=Un();function r(n){return t(n)&&e(n)}return sm=r,sm}var lm,lT;function IZ(){if(lT)return lm;lT=1;var e=b_(),t=bd(),r=CZ(),n=L5(),i=t(function(o){return r(e(o,1,n,!0))});return lm=i,lm}var cm,cT;function RZ(){if(cT)return cm;cT=1;var e=vd();function t(r,n){return e(n,function(i){return r[i]})}return cm=t,cm}var um,uT;function z5(){if(uT)return um;uT=1;var e=RZ(),t=zi();function r(n){return n==null?[]:e(n,t(n))}return um=r,um}var dm,dT;function vn(){if(dT)return dm;dT=1;var e;if(typeof n_=="function")try{e={clone:DX(),constant:p_(),each:b5(),filter:N5(),has:T5(),isArray:Vt(),isEmpty:oZ(),isFunction:rl(),isUndefined:P5(),keys:zi(),map:A5(),reduce:M5(),size:pZ(),transform:hZ(),union:IZ(),values:z5()}}catch{}return e||(e=window._),dm=e,dm}var fm,fT;function y_(){if(fT)return fm;fT=1;var e=vn();fm=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(m,b){d(b)&&p.setNode(b,m)}),e.each(this._edgeObjs,function(m){p.hasNode(m.v)&&p.hasNode(m.w)&&p.setEdge(m,v.edge(m))});var h={};function x(m){var b=v.parent(m);return b===void 0||p.hasNode(b)?(h[m]=b,b):b in h?h[b]:x(b)}return this._isCompound&&e.each(p.nodes(),function(m){p.setParent(m,x(m))}),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,m){return h.length>1?v.setEdge(x,m,p):v.setEdge(x,m),m}),this},i.prototype.setEdge=function(){var d,p,v,h,x=!1,m=arguments[0];typeof m=="object"&&m!==null&&"v"in m?(d=m.v,p=m.w,v=m.name,arguments.length===2&&(h=arguments[1],x=!0)):(d=m,p=arguments[1],v=arguments[3],arguments.length>2&&(h=arguments[2],x=!0)),d=""+d,p=""+p,e.isUndefined(v)||(v=""+v);var b=s(this._isDirected,d,p,v);if(e.has(this._edgeLabels,b))return x&&(this._edgeLabels[b]=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[b]=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[b]=w,o(this._preds[p],d),o(this._sucs[d],p),this._in[p][b]=w,this._out[d][b]=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,m=""+v;if(!d&&x>m){var b=x;x=m,m=b}return x+n+m+n+(e.isUndefined(h)?t:h)}function c(d,p,v,h){var x=""+p,m=""+v;if(!d&&x>m){var b=x;x=m,m=b}var w={v:x,w:m};return h&&(w.name=h),w}function u(d,p){return s(d,p.v,p.w,p.name)}return fm}var pm,pT;function NZ(){return pT||(pT=1,pm="2.1.8"),pm}var hm,hT;function TZ(){return hT||(hT=1,hm={Graph:y_(),version:NZ()}),hm}var vm,vT;function PZ(){if(vT)return vm;vT=1;var e=vn(),t=y_();vm={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 vm}var gm,gT;function kZ(){if(gT)return gm;gT=1;var e=vn();gm=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 gm}var mm,mT;function B5(){if(mT)return mm;mT=1;var e=vn();mm=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},mm}var bm,bT;function F5(){if(bT)return bm;bT=1;var e=vn(),t=B5();bm=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 m=x.v!==p?x.v:x.w,b=u[m],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<b.distance&&(b.distance=y,b.predecessor=p,d.decrease(m,y))};for(o.nodes().forEach(function(x){var m=x===a?0:Number.POSITIVE_INFINITY;u[x]={distance:m},d.add(x,m)});d.size()>0&&(p=d.removeMin(),v=u[p],v.distance!==Number.POSITIVE_INFINITY);)c(p).forEach(h);return u}return bm}var ym,yT;function AZ(){if(yT)return ym;yT=1;var e=F5(),t=vn();ym=r;function r(n,i,o){return t.transform(n.nodes(),function(a,s){a[s]=e(n,s,i,o)},{})}return ym}var xm,xT;function $5(){if(xT)return xm;xT=1;var e=vn();xm=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 xm}var wm,wT;function MZ(){if(wT)return wm;wT=1;var e=vn(),t=$5();wm=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 wm}var _m,_T;function DZ(){if(_T)return _m;_T=1;var e=vn();_m=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],m=d[h],b=v[h],w=x.distance+m.distance;w<b.distance&&(b.distance=w,b.predecessor=m.predecessor)})})}),s}return _m}var Em,ET;function H5(){if(ET)return Em;ET=1;var e=vn();Em=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,Em}var Sm,ST;function jZ(){if(ST)return Sm;ST=1;var e=H5();Sm=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return Sm}var Om,OT;function V5(){if(OT)return Om;OT=1;var e=vn();Om=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 Om}var Cm,CT;function qZ(){if(CT)return Cm;CT=1;var e=V5();Cm=t;function t(r,n){return e(r,n,"post")}return Cm}var Im,IT;function LZ(){if(IT)return Im;IT=1;var e=V5();Im=t;function t(r,n){return e(r,n,"pre")}return Im}var Rm,RT;function zZ(){if(RT)return Rm;RT=1;var e=vn(),t=y_(),r=B5();Rm=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 m=o(v);m<x&&(s[h]=u,c.decrease(h,m))}}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 Rm}var Nm,NT;function BZ(){return NT||(NT=1,Nm={components:kZ(),dijkstra:F5(),dijkstraAll:AZ(),findCycles:MZ(),floydWarshall:DZ(),isAcyclic:jZ(),postorder:qZ(),preorder:LZ(),prim:zZ(),tarjan:$5(),topsort:H5()}),Nm}var Tm,TT;function FZ(){if(TT)return Tm;TT=1;var e=TZ();return Tm={Graph:e.Graph,json:PZ(),alg:BZ(),version:e.version},Tm}var Pm,PT;function Tn(){if(PT)return Pm;PT=1;var e;if(typeof n_=="function")try{e=FZ()}catch{}return e||(e=window.graphlib),Pm=e,Pm}var km,kT;function $Z(){if(kT)return km;kT=1;var e=v5(),t=1,r=4;function n(i){return e(i,t|r)}return km=n,km}var Am,AT;function yd(){if(AT)return Am;AT=1;var e=wa(),t=fi(),r=ud(),n=hn();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 Am=i,Am}var Mm,MT;function HZ(){if(MT)return Mm;MT=1;var e=bd(),t=wa(),r=yd(),n=mo(),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,m=h.length;++x<m;){var b=h[x],w=s[b];(w===void 0||t(w,i[b])&&!o.call(s,b))&&(s[b]=v[b])}return s});return Mm=a,Mm}var Dm,DT;function VZ(){if(DT)return Dm;DT=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 Dm=n,Dm}var jm,jT;function WZ(){if(jT)return jm;jT=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return jm=t,jm}var qm,qT;function UZ(){if(qT)return qm;qT=1;var e=WZ(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return qm=r,qm}var Lm,LT;function GZ(){if(LT)return Lm;LT=1;var e=UZ(),t=hn(),r=Oa(),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 Lm=c,Lm}var zm,zT;function W5(){if(zT)return zm;zT=1;var e=GZ(),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 zm=n,zm}var Bm,BT;function KZ(){if(BT)return Bm;BT=1;var e=W5();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return Bm=t,Bm}var Fm,FT;function YZ(){if(FT)return Fm;FT=1;var e=q5(),t=pi(),r=KZ(),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 Fm=i,Fm}var $m,$T;function XZ(){if($T)return $m;$T=1;var e=VZ(),t=YZ(),r=e(t);return $m=r,$m}var Hm,HT;function U5(){if(HT)return Hm;HT=1;var e=b_();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return Hm=t,Hm}var Vm,VT;function ZZ(){if(VT)return Vm;VT=1;var e=h_(),t=g5(),r=mo();function n(i,o){return i==null?i:e(i,t(o),r)}return Vm=n,Vm}var Wm,WT;function JZ(){if(WT)return Wm;WT=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return Wm=e,Wm}var Um,UT;function QZ(){if(UT)return Um;UT=1;var e=ld(),t=v_(),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 Um=n,Um}var Gm,GT;function x_(){if(GT)return Gm;GT=1;var e=Oa();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 Gm=t,Gm}var Km,KT;function eJ(){if(KT)return Km;KT=1;function e(t,r){return t>r}return Km=e,Km}var Ym,YT;function tJ(){if(YT)return Ym;YT=1;var e=x_(),t=eJ(),r=bo();function n(i){return i&&i.length?e(i,r,t):void 0}return Ym=n,Ym}var Xm,XT;function G5(){if(XT)return Xm;XT=1;var e=ld(),t=wa();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return Xm=r,Xm}var Zm,ZT;function rJ(){if(ZT)return Zm;ZT=1;var e=vo(),t=pd(),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 Zm=u,Zm}var Jm,JT;function K5(){if(JT)return Jm;JT=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return Jm=e,Jm}var Qm,QT;function nJ(){if(QT)return Qm;QT=1;var e=nl(),t=mo();function r(n){return e(n,t(n))}return Qm=r,Qm}var eb,eP;function iJ(){if(eP)return eb;eP=1;var e=G5(),t=n5(),r=f5(),n=i5(),i=h5(),o=il(),a=Vt(),s=L5(),c=Ea(),u=rl(),d=hn(),p=rJ(),v=ol(),h=K5(),x=nJ();function m(b,w,y,_,S,E,I){var N=h(b,y),T=h(w,y),A=I.get(T);if(A){e(b,y,A);return}var B=E?E(N,T,y+"",b,w,I):void 0,L=B===void 0;if(L){var D=a(T),z=!D&&c(T),P=!D&&!z&&v(T);B=T,D||z||P?a(N)?B=N:s(N)?B=n(N):z?(L=!1,B=t(T,!0)):P?(L=!1,B=r(T,!0)):B=[]:p(T)||o(T)?(B=N,o(N)?B=x(N):(!d(N)||u(N))&&(B=i(T))):L=!1}L&&(I.set(T,B),S(B,T,_,E,I),I.delete(T)),e(b,y,B)}return eb=m,eb}var tb,tP;function oJ(){if(tP)return tb;tP=1;var e=sd(),t=G5(),r=h_(),n=iJ(),i=hn(),o=mo(),a=K5();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 m=p?p(a(c,x),h,x+"",c,u,v):void 0;m===void 0&&(m=h),t(c,x,m)}},o)}return tb=s,tb}var rb,rP;function aJ(){if(rP)return rb;rP=1;var e=bd(),t=yd();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 rb=r,rb}var nb,nP;function sJ(){if(nP)return nb;nP=1;var e=oJ(),t=aJ(),r=t(function(n,i,o){e(n,i,o)});return nb=r,nb}var ib,iP;function Y5(){if(iP)return ib;iP=1;function e(t,r){return t<r}return ib=e,ib}var ob,oP;function lJ(){if(oP)return ob;oP=1;var e=x_(),t=Y5(),r=bo();function n(i){return i&&i.length?e(i,r,t):void 0}return ob=n,ob}var ab,aP;function cJ(){if(aP)return ab;aP=1;var e=x_(),t=pi(),r=Y5();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return ab=n,ab}var sb,sP;function uJ(){if(sP)return sb;sP=1;var e=Pn(),t=function(){return e.Date.now()};return sb=t,sb}var lb,lP;function dJ(){if(lP)return lb;lP=1;var e=cd(),t=gd(),r=ud(),n=hn(),i=al();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]),m=c;if(x==="__proto__"||x==="constructor"||x==="prototype")return a;if(d!=v){var b=h[x];m=u?u(b,x,h):void 0,m===void 0&&(m=n(b)?b:r(s[d+1])?[]:{})}e(h,x,m),h=h[x]}return a}return lb=o,lb}var cb,cP;function fJ(){if(cP)return cb;cP=1;var e=md(),t=dJ(),r=gd();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 cb=n,cb}var ub,uP;function pJ(){if(uP)return ub;uP=1;var e=fJ(),t=I5();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return ub=r,ub}var db,dP;function hJ(){if(dP)return db;dP=1;var e=U5(),t=D5(),r=j5();function n(i){return r(t(i,void 0,e),i+"")}return db=n,db}var fb,fP;function vJ(){if(fP)return fb;fP=1;var e=pJ(),t=hJ(),r=t(function(n,i){return n==null?{}:e(n,i)});return fb=r,fb}var pb,pP;function gJ(){if(pP)return pb;pP=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 pb=r,pb}var hb,hP;function mJ(){if(hP)return hb;hP=1;var e=gJ(),t=yd(),r=W5();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 hb=n,hb}var vb,vP;function bJ(){if(vP)return vb;vP=1;var e=mJ(),t=e();return vb=t,vb}var gb,gP;function yJ(){if(gP)return gb;gP=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return gb=e,gb}var mb,mP;function xJ(){if(mP)return mb;mP=1;var e=Oa();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 mb=t,mb}var bb,bP;function wJ(){if(bP)return bb;bP=1;var e=xJ();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 bb=t,bb}var yb,yP;function _J(){if(yP)return yb;yP=1;var e=vd(),t=md(),r=pi(),n=k5(),i=yJ(),o=dd(),a=wJ(),s=bo(),c=Vt();function u(d,p,v){p.length?p=e(p,function(m){return c(m)?function(b){return t(b,m.length===1?m[0]:m)}:m}):p=[s];var h=-1;p=e(p,o(r));var x=n(d,function(m,b,w){var y=e(p,function(_){return _(m)});return{criteria:y,index:++h,value:m}});return i(x,function(m,b){return a(m,b,v)})}return yb=u,yb}var xb,xP;function EJ(){if(xP)return xb;xP=1;var e=b_(),t=_J(),r=bd(),n=yd(),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 xb=i,xb}var wb,wP;function SJ(){if(wP)return wb;wP=1;var e=O5(),t=0;function r(n){var i=++t;return e(n)+i}return wb=r,wb}var _b,_P;function OJ(){if(_P)return _b;_P=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 _b=e,_b}var Eb,EP;function CJ(){if(EP)return Eb;EP=1;var e=cd(),t=OJ();function r(n,i){return t(n||[],i||[],e)}return Eb=r,Eb}var Sb,SP;function Rt(){if(SP)return Sb;SP=1;var e;if(typeof n_=="function")try{e={cloneDeep:$Z(),constant:p_(),defaults:HZ(),each:b5(),filter:N5(),find:XZ(),flatten:U5(),forEach:m5(),forIn:ZZ(),has:T5(),isUndefined:P5(),last:JZ(),map:A5(),mapValues:QZ(),max:tJ(),merge:sJ(),min:lJ(),minBy:cJ(),now:uJ(),pick:vJ(),range:bJ(),reduce:M5(),sortBy:EJ(),uniqueId:SJ(),values:z5(),zipObject:CJ()}}catch{}return e||(e=window._),Sb=e,Sb}var Ob,OP;function IJ(){if(OP)return Ob;OP=1,Ob=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 Ob}var Cb,CP;function RJ(){if(CP)return Cb;CP=1;var e=Rt(),t=Tn().Graph,r=IJ();Cb=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],m;u.nodeCount();){for(;m=x.dequeue();)a(u,d,p,m);for(;m=h.dequeue();)a(u,d,p,m);if(u.nodeCount()){for(var b=d.length-2;b>0;--b)if(m=d[b].dequeue(),m){v=v.concat(a(u,d,p,m,!0));break}}}return v}function a(u,d,p,v,h){var x=h?[]:void 0;return e.forEach(u.inEdges(v.v),function(m){var b=u.edge(m),w=u.node(m.v);h&&x.push({v:m.v,w:m.w}),w.out-=b,c(d,p,w)}),e.forEach(u.outEdges(v.v),function(m){var b=u.edge(m),w=m.w,y=u.node(w);y.in-=b,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(b){p.setNode(b,{v:b,in:0,out:0})}),e.forEach(u.edges(),function(b){var w=p.edge(b.v,b.w)||0,y=d(b),_=w+y;p.setEdge(b.v,b.w,_),h=Math.max(h,p.node(b.v).out+=y),v=Math.max(v,p.node(b.w).in+=y)});var x=e.range(h+v+3).map(function(){return new r}),m=v+1;return e.forEach(p.nodes(),function(b){c(x,m,p.node(b))}),{graph:p,buckets:x,zeroIdx:m}}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 Cb}var Ib,IP;function NJ(){if(IP)return Ib;IP=1;var e=Rt(),t=RJ();Ib={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 Ib}var Rb,RP;function qr(){if(RP)return Rb;RP=1;var e=Rt(),t=Tn().Graph;Rb={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:m};function r(b,w,y,_){var S;do S=e.uniqueId(_);while(b.hasNode(S));return y.dummy=w,b.setNode(S,y),S}function n(b){var w=new t().setGraph(b.graph());return e.forEach(b.nodes(),function(y){w.setNode(y,b.node(y))}),e.forEach(b.edges(),function(y){var _=w.edge(y.v,y.w)||{weight:0,minlen:1},S=b.edge(y);w.setEdge(y.v,y.w,{weight:_.weight+S.weight,minlen:Math.max(_.minlen,S.minlen)})}),w}function i(b){var w=new t({multigraph:b.isMultigraph()}).setGraph(b.graph());return e.forEach(b.nodes(),function(y){b.children(y).length||w.setNode(y,b.node(y))}),e.forEach(b.edges(),function(y){w.setEdge(y,b.edge(y))}),w}function o(b){var w=e.map(b.nodes(),function(y){var _={};return e.forEach(b.outEdges(y),function(S){_[S.w]=(_[S.w]||0)+b.edge(S).weight}),_});return e.zipObject(b.nodes(),w)}function a(b){var w=e.map(b.nodes(),function(y){var _={};return e.forEach(b.inEdges(y),function(S){_[S.v]=(_[S.v]||0)+b.edge(S).weight}),_});return e.zipObject(b.nodes(),w)}function s(b,w){var y=b.x,_=b.y,S=w.x-y,E=w.y-_,I=b.width/2,N=b.height/2;if(!S&&!E)throw new Error("Not possible to find intersection inside of the rectangle");var T,A;return Math.abs(E)*I>Math.abs(S)*N?(E<0&&(N=-N),T=N*S/E,A=N):(S<0&&(I=-I),T=I,A=I*E/S),{x:y+T,y:_+A}}function c(b){var w=e.map(e.range(v(b)+1),function(){return[]});return e.forEach(b.nodes(),function(y){var _=b.node(y),S=_.rank;e.isUndefined(S)||(w[S][_.order]=y)}),w}function u(b){var w=e.min(e.map(b.nodes(),function(y){return b.node(y).rank}));e.forEach(b.nodes(),function(y){var _=b.node(y);e.has(_,"rank")&&(_.rank-=w)})}function d(b){var w=e.min(e.map(b.nodes(),function(E){return b.node(E).rank})),y=[];e.forEach(b.nodes(),function(E){var I=b.node(E).rank-w;y[I]||(y[I]=[]),y[I].push(E)});var _=0,S=b.graph().nodeRankFactor;e.forEach(y,function(E,I){e.isUndefined(E)&&I%S!==0?--_:_&&e.forEach(E,function(N){b.node(N).rank+=_})})}function p(b,w,y,_){var S={width:0,height:0};return arguments.length>=4&&(S.rank=y,S.order=_),r(b,"border",S,w)}function v(b){return e.max(e.map(b.nodes(),function(w){var y=b.node(w).rank;if(!e.isUndefined(y))return y}))}function h(b,w){var y={lhs:[],rhs:[]};return e.forEach(b,function(_){w(_)?y.lhs.push(_):y.rhs.push(_)}),y}function x(b,w){var y=e.now();try{return w()}finally{console.log(b+" time: "+(e.now()-y)+"ms")}}function m(b,w){return w()}return Rb}var Nb,NP;function TJ(){if(NP)return Nb;NP=1;var e=Rt(),t=qr();Nb={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,m,b;for(b=0,++c;c<d;++b,++c)v.points=[],m={width:0,height:0,edgeLabel:v,edgeObj:a,rank:c},x=t.addDummyNode(o,"edge",m,"_d"),c===h&&(m.width=v.width,m.height=v.height,m.dummy="edge-label",m.labelpos=v.labelpos),o.setEdge(s,x,{weight:v.weight},p),b===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 Nb}var Tb,TP;function Nu(){if(TP)return Tb;TP=1;var e=Rt();Tb={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 Tb}var Pb,PP;function X5(){if(PP)return Pb;PP=1;var e=Rt(),t=Tn().Graph,r=Nu().slack;Pb=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 Pb}var kb,kP;function PJ(){if(kP)return kb;kP=1;var e=Rt(),t=X5(),r=Nu().slack,n=Nu().longestPath,i=Tn().alg.preorder,o=Tn().alg.postorder,a=qr().simplify;kb=s,s.initLowLimValues=p,s.initCutValues=c,s.calcCutValue=d,s.leaveEdge=h,s.enterEdge=x,s.exchangeEdges=m;function s(_){_=a(_),n(_);var S=t(_);p(S),c(S,_);for(var E,I;E=h(S);)I=x(S,_,E),m(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,A=S.edge(E,N),B=0;return A||(T=!1,A=S.edge(N,E)),B=A.weight,e.forEach(S.nodeEdges(E),function(L){var D=L.v===E,z=D?L.w:L.v;if(z!==N){var P=D===T,K=S.edge(L).weight;if(B+=P?K:-K,w(_,E,z)){var $=_.edge(E,z).cutvalue;B+=P?-$:$}}}),B}function p(_,S){arguments.length<2&&(S=_.nodes()[0]),v(_,{},1,S)}function v(_,S,E,I,N){var T=E,A=_.node(I);return S[I]=!0,e.forEach(_.neighbors(I),function(B){e.has(S,B)||(E=v(_,S,E,B,I))}),A.low=T,A.lim=E++,N?A.parent=N:delete A.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),A=_.node(N),B=T,L=!1;T.lim>A.lim&&(B=A,L=!0);var D=e.filter(S.edges(),function(z){return L===y(_,_.node(z.v),B)&&L!==y(_,_.node(z.w),B)});return e.minBy(D,function(z){return r(S,z)})}function m(_,S,E,I){var N=E.v,T=E.w;_.removeEdge(N,T),_.setEdge(I.v,I.w,{}),p(_),c(_,S),b(_,S)}function b(_,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,A=S.edge(N,T),B=!1;A||(A=S.edge(T,N),B=!0),S.node(N).rank=S.node(T).rank+(B?A.minlen:-A.minlen)})}function w(_,S,E){return _.hasEdge(S,E)}function y(_,S,E){return E.low<=S.lim&&S.lim<=E.lim}return kb}var Ab,AP;function kJ(){if(AP)return Ab;AP=1;var e=Nu(),t=e.longestPath,r=X5(),n=PJ();Ab=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 Ab}var Mb,MP;function AJ(){if(MP)return Mb;MP=1;var e=Rt();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 Db,DP;function MJ(){if(DP)return Db;DP=1;var e=Rt(),t=qr();Db={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 m=t.addBorderNode(s,"_bt"),b=t.addBorderNode(s,"_bb"),w=s.node(h);s.setParent(m,h),w.borderTop=m,s.setParent(b,h),w.borderBottom=b,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(m,S,{weight:I,minlen:N,nestingEdge:!0}),s.setEdge(E,b,{weight:I,minlen:N,nestingEdge:!0})}),s.parent(h)||s.setEdge(c,m,{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 Db}var jb,jP;function DJ(){if(jP)return jb;jP=1;var e=Rt(),t=qr();jb=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 jb}var qb,qP;function jJ(){if(qP)return qb;qP=1;var e=Rt();qb={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 qb}var Lb,LP;function qJ(){if(LP)return Lb;LP=1;var e=Rt();Lb=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 Lb}var zb,zP;function LJ(){if(zP)return zb;zP=1;var e=Rt();zb=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 zb}var Bb,BP;function zJ(){if(BP)return Bb;BP=1;var e=Rt();Bb=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 Bb}var Fb,FP;function BJ(){if(FP)return Fb;FP=1;var e=Rt();Fb=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 Fb}var $b,$P;function FJ(){if($P)return $b;$P=1;var e=Rt(),t=qr();$b=r;function r(o,a){var s=t.partition(o,function(m){return e.has(m,"barycenter")}),c=s.lhs,u=e.sortBy(s.rhs,function(m){return-m.i}),d=[],p=0,v=0,h=0;c.sort(i(!!a)),h=n(d,u,h),e.forEach(c,function(m){h+=m.vs.length,d.push(m.vs),p+=m.barycenter*m.weight,v+=m.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 $b}var Hb,HP;function $J(){if(HP)return Hb;HP=1;var e=Rt(),t=zJ(),r=BJ(),n=FJ();Hb=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,m={};h&&(p=e.filter(p,function(E){return E!==h&&E!==x}));var b=t(s,p);e.forEach(b,function(E){if(s.children(E.v).length){var I=i(s,E.v,u,d);m[E.v]=I,e.has(I,"barycenter")&&a(E,I)}});var w=r(b,u);o(w,m);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 Hb}var Vb,VP;function HJ(){if(VP)return Vb;VP=1;var e=Rt(),t=Tn().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),m=e.isUndefined(x)?0:x.weight;c.setEdge(h,u,{weight:i.edge(v).weight+m})}),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 Wb,WP;function VJ(){if(WP)return Wb;WP=1;var e=Rt();Wb=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 Wb}var Ub,UP;function WJ(){if(UP)return Ub;UP=1;var e=Rt(),t=qJ(),r=LJ(),n=$J(),i=HJ(),o=VJ(),a=Tn().Graph,s=qr();Ub=c;function c(v){var h=s.maxRank(v),x=u(v,e.range(1,h+1),"inEdges"),m=u(v,e.range(h-1,-1,-1),"outEdges"),b=t(v);p(v,b);for(var w=Number.POSITIVE_INFINITY,y,_=0,S=0;S<4;++_,++S){d(_%2?x:m,_%4>=2),b=s.buildLayerMatrix(v);var E=r(v,b);E<w&&(S=0,y=e.cloneDeep(b),w=E)}p(v,y)}function u(v,h,x){return e.map(h,function(m){return i(v,m,x)})}function d(v,h){var x=new a;e.forEach(v,function(m){var b=m.graph().root,w=n(m,b,x,h);e.forEach(w.vs,function(y,_){m.node(y).order=_}),o(m,x,w.vs)})}function p(v,h){e.forEach(h,function(x){e.forEach(x,function(m,b){v.node(m).order=b})})}return Ub}var Gb,GP;function UJ(){if(GP)return Gb;GP=1;var e=Rt(),t=Tn().Graph,r=qr();Gb={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,A=E.length,B=e.last(I);return e.forEach(I,function(L,D){var z=o(w,L),P=z?w.node(z).order:A;(z||L===B)&&(e.forEach(I.slice(T,D+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=D+1,N=P)}),I}return e.reduce(y,S),_}function i(w,y){var _={};function S(I,N,T,A,B){var L;e.forEach(e.range(N,T),function(D){L=I[D],w.node(L).dummy&&e.forEach(w.predecessors(L),function(z){var P=w.node(z);P.dummy&&(P.order<A||P.order>B)&&a(_,z,L)})})}function E(I,N){var T=-1,A,B=0;return e.forEach(N,function(L,D){if(w.node(L).dummy==="border"){var z=w.predecessors(L);z.length&&(A=w.node(z[0]).order,S(N,B,D,T,A),B=D,T=A)}S(N,B,N.length,A,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(A,B){E[A]=A,I[A]=A,N[A]=B})}),e.forEach(y,function(T){var A=-1;e.forEach(T,function(B){var L=S(B);if(L.length){L=e.sortBy(L,function($){return N[$]});for(var D=(L.length-1)/2,z=Math.floor(D),P=Math.ceil(D);z<=P;++z){var K=L[z];I[B]===B&&A<N[K]&&!s(_,B,K)&&(I[K]=B,I[B]=E[B]=E[K],A=N[K])}}})}),{root:E,align:I}}function u(w,y,_,S,E){var I={},N=d(w,y,_,E),T=E?"borderLeft":"borderRight";function A(D,z){for(var P=N.nodes(),K=P.pop(),$={};K;)$[K]?D(K):($[K]=!0,P.push(K),P=P.concat(z(K))),K=P.pop()}function B(D){I[D]=N.inEdges(D).reduce(function(z,P){return Math.max(z,I[P.v]+N.edge(P))},0)}function L(D){var z=N.outEdges(D).reduce(function(K,$){return Math.min(K,I[$.w]-N.edge($))},Number.POSITIVE_INFINITY),P=w.node(D);z!==Number.POSITIVE_INFINITY&&P.borderType!==T&&(I[D]=Math.max(I[D],z))}return A(B,N.predecessors.bind(N)),A(L,N.successors.bind(N)),e.forEach(S,function(D){I[D]=I[_[D]]}),I}function d(w,y,_,S){var E=new t,I=w.graph(),N=m(I.nodesep,I.edgesep,S);return e.forEach(y,function(T){var A;e.forEach(T,function(B){var L=_[B];if(E.setNode(L),A){var D=_[A],z=E.edge(D,L);E.setEdge(D,L,Math.max(N(w,B,A),z||0))}A=B})}),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=b(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,A=w[T],B;if(A!==y){var L=e.values(A);B=N==="l"?S-e.min(L):E-e.max(L),B&&(w[T]=e.mapValues(A,function(D){return D+B}))}})})}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(D){return e.values(D).reverse()}));var A=(N==="u"?w.predecessors:w.successors).bind(w),B=c(w,E,_,A),L=u(w,E,B.root,B.align,T==="r");T==="r"&&(L=e.mapValues(L,function(D){return-D})),S[N+T]=L})});var I=p(w,S);return v(S,I),h(S,w.graph().align)}function m(w,y,_){return function(S,E,I){var N=S.node(E),T=S.node(I),A=0,B;if(A+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":B=-N.width/2;break;case"r":B=N.width/2;break}if(B&&(A+=_?B:-B),B=0,A+=(N.dummy?y:w)/2,A+=(T.dummy?y:w)/2,A+=T.width/2,e.has(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":B=T.width/2;break;case"r":B=-T.width/2;break}return B&&(A+=_?B:-B),B=0,A}}function b(w,y){return w.node(y).width}return Gb}var Kb,KP;function GJ(){if(KP)return Kb;KP=1;var e=Rt(),t=qr(),r=UJ().positionX;Kb=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 Kb}var Yb,YP;function KJ(){if(YP)return Yb;YP=1;var e=Rt(),t=NJ(),r=TJ(),n=kJ(),i=qr().normalizeRanks,o=AJ(),a=qr().removeEmptyRanks,s=MJ(),c=DJ(),u=jJ(),d=WJ(),p=GJ(),v=qr(),h=Tn().Graph;Yb=x;function x(j,G){var H=G&&G.debugTiming?v.time:v.notime;H("layout",function(){var q=H(" buildLayoutGraph",function(){return A(j)});H(" runLayout",function(){m(q,H)}),H(" updateInputGraph",function(){b(j,q)})})}function m(j,G){G(" makeSpaceForEdgeLabels",function(){B(j)}),G(" removeSelfEdges",function(){Q(j)}),G(" acyclic",function(){t.run(j)}),G(" nestingGraph.run",function(){s.run(j)}),G(" rank",function(){n(v.asNonCompoundGraph(j))}),G(" injectEdgeLabelProxies",function(){L(j)}),G(" removeEmptyRanks",function(){a(j)}),G(" nestingGraph.cleanup",function(){s.cleanup(j)}),G(" normalizeRanks",function(){i(j)}),G(" assignRankMinMax",function(){D(j)}),G(" removeEdgeLabelProxies",function(){z(j)}),G(" normalize.run",function(){r.run(j)}),G(" parentDummyChains",function(){o(j)}),G(" addBorderSegments",function(){c(j)}),G(" order",function(){d(j)}),G(" insertSelfEdges",function(){k(j)}),G(" adjustCoordinateSystem",function(){u.adjust(j)}),G(" position",function(){p(j)}),G(" positionSelfEdges",function(){W(j)}),G(" removeBorderNodes",function(){U(j)}),G(" normalize.undo",function(){r.undo(j)}),G(" fixupEdgeLabelCoords",function(){$(j)}),G(" undoCoordinateSystem",function(){u.undo(j)}),G(" translateGraph",function(){P(j)}),G(" assignNodeIntersects",function(){K(j)}),G(" reversePoints",function(){Y(j)}),G(" acyclic.undo",function(){t.undo(j)})}function b(j,G){e.forEach(j.nodes(),function(H){var q=j.node(H),X=G.node(H);q&&(q.x=X.x,q.y=X.y,G.children(H).length&&(q.width=X.width,q.height=X.height))}),e.forEach(j.edges(),function(H){var q=j.edge(H),X=G.edge(H);q.points=X.points,e.has(X,"x")&&(q.x=X.x,q.y=X.y)}),j.graph().width=G.graph().width,j.graph().height=G.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 A(j){var G=new h({multigraph:!0,compound:!0}),H=ee(j.graph());return G.setGraph(e.merge({},y,J(H,w),e.pick(H,_))),e.forEach(j.nodes(),function(q){var X=ee(j.node(q));G.setNode(q,e.defaults(J(X,S),E)),G.setParent(q,j.parent(q))}),e.forEach(j.edges(),function(q){var X=ee(j.edge(q));G.setEdge(q,e.merge({},N,J(X,I),e.pick(X,T)))}),G}function B(j){var G=j.graph();G.ranksep/=2,e.forEach(j.edges(),function(H){var q=j.edge(H);q.minlen*=2,q.labelpos.toLowerCase()!=="c"&&(G.rankdir==="TB"||G.rankdir==="BT"?q.width+=q.labeloffset:q.height+=q.labeloffset)})}function L(j){e.forEach(j.edges(),function(G){var H=j.edge(G);if(H.width&&H.height){var q=j.node(G.v),X=j.node(G.w),ne={rank:(X.rank-q.rank)/2+q.rank,e:G};v.addDummyNode(j,"edge-proxy",ne,"_ep")}})}function D(j){var G=0;e.forEach(j.nodes(),function(H){var q=j.node(H);q.borderTop&&(q.minRank=j.node(q.borderTop).rank,q.maxRank=j.node(q.borderBottom).rank,G=e.max(G,q.maxRank))}),j.graph().maxRank=G}function z(j){e.forEach(j.nodes(),function(G){var H=j.node(G);H.dummy==="edge-proxy"&&(j.edge(H.e).labelRank=H.rank,j.removeNode(G))})}function P(j){var G=Number.POSITIVE_INFINITY,H=0,q=Number.POSITIVE_INFINITY,X=0,ne=j.graph(),te=ne.marginx||0,ue=ne.marginy||0;function re(ge){var de=ge.x,xe=ge.y,se=ge.width,le=ge.height;G=Math.min(G,de-se/2),H=Math.max(H,de+se/2),q=Math.min(q,xe-le/2),X=Math.max(X,xe+le/2)}e.forEach(j.nodes(),function(ge){re(j.node(ge))}),e.forEach(j.edges(),function(ge){var de=j.edge(ge);e.has(de,"x")&&re(de)}),G-=te,q-=ue,e.forEach(j.nodes(),function(ge){var de=j.node(ge);de.x-=G,de.y-=q}),e.forEach(j.edges(),function(ge){var de=j.edge(ge);e.forEach(de.points,function(xe){xe.x-=G,xe.y-=q}),e.has(de,"x")&&(de.x-=G),e.has(de,"y")&&(de.y-=q)}),ne.width=H-G+te,ne.height=X-q+ue}function K(j){e.forEach(j.edges(),function(G){var H=j.edge(G),q=j.node(G.v),X=j.node(G.w),ne,te;H.points?(ne=H.points[0],te=H.points[H.points.length-1]):(H.points=[],ne=X,te=q),H.points.unshift(v.intersectRect(q,ne)),H.points.push(v.intersectRect(X,te))})}function $(j){e.forEach(j.edges(),function(G){var H=j.edge(G);if(e.has(H,"x"))switch((H.labelpos==="l"||H.labelpos==="r")&&(H.width-=H.labeloffset),H.labelpos){case"l":H.x-=H.width/2+H.labeloffset;break;case"r":H.x+=H.width/2+H.labeloffset;break}})}function Y(j){e.forEach(j.edges(),function(G){var H=j.edge(G);H.reversed&&H.points.reverse()})}function U(j){e.forEach(j.nodes(),function(G){if(j.children(G).length){var H=j.node(G),q=j.node(H.borderTop),X=j.node(H.borderBottom),ne=j.node(e.last(H.borderLeft)),te=j.node(e.last(H.borderRight));H.width=Math.abs(te.x-ne.x),H.height=Math.abs(X.y-q.y),H.x=ne.x+H.width/2,H.y=q.y+H.height/2}}),e.forEach(j.nodes(),function(G){j.node(G).dummy==="border"&&j.removeNode(G)})}function Q(j){e.forEach(j.edges(),function(G){if(G.v===G.w){var H=j.node(G.v);H.selfEdges||(H.selfEdges=[]),H.selfEdges.push({e:G,label:j.edge(G)}),j.removeEdge(G)}})}function k(j){var G=v.buildLayerMatrix(j);e.forEach(G,function(H){var q=0;e.forEach(H,function(X,ne){var te=j.node(X);te.order=ne+q,e.forEach(te.selfEdges,function(ue){v.addDummyNode(j,"selfedge",{width:ue.label.width,height:ue.label.height,rank:te.rank,order:ne+ ++q,e:ue.e,label:ue.label},"_se")}),delete te.selfEdges})})}function W(j){e.forEach(j.nodes(),function(G){var H=j.node(G);if(H.dummy==="selfedge"){var q=j.node(H.e.v),X=q.x+q.width/2,ne=q.y,te=H.x-X,ue=q.height/2;j.setEdge(H.e,H.label),j.removeNode(G),H.label.points=[{x:X+2*te/3,y:ne-ue},{x:X+5*te/6,y:ne-ue},{x:X+te,y:ne},{x:X+5*te/6,y:ne+ue},{x:X+2*te/3,y:ne+ue}],H.label.x=H.x,H.label.y=H.y}})}function J(j,G){return e.mapValues(e.pick(j,G),Number)}function ee(j){var G={};return e.forEach(j,function(H,q){G[q.toLowerCase()]=H}),G}return Yb}var Xb,XP;function YJ(){if(XP)return Xb;XP=1;var e=Rt(),t=qr(),r=Tn().Graph;Xb={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 Xb}var Zb,ZP;function XJ(){return ZP||(ZP=1,Zb="0.8.5"),Zb}var Jb,JP;function ZJ(){return JP||(JP=1,Jb={graphlib:Tn(),layout:KJ(),debug:YJ(),util:{time:qr().time,notime:qr().notime},version:XJ()}),Jb}var JJ=ZJ();const QP=Li(JJ);function QJ(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 m=v;u(v=x,m)}}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 eQ=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ek=eQ?O.useEffect:O.useLayoutEffect;function tQ(e){const t=typeof e=="function"?QJ(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=O.useReducer(b=>b+1,0),a=t.getState(),s=O.useRef(a),c=O.useRef(n),u=O.useRef(i),d=O.useRef(!1),p=O.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)),ek(()=>{h&&(p.current=v),s.current=a,c.current=n,u.current=i,d.current=!1});const x=O.useRef(a);ek(()=>{const b=()=>{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(b);return t.getState()!==x.current&&b(),w},[]);const m=h?v:p.current;return O.useDebugValue(m),m};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 rQ(){const e=O.createContext(void 0);return{Provider:({initialStore:i,createStore:o,children:a})=>{const s=O.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()),O.createElement(e.Provider,{value:s.current},a)},useStore:(i,o=Object.is)=>{const a=O.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=O.useContext(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return O.useMemo(()=>({getState:i.getState,setState:i.setState,subscribe:i.subscribe,destroy:i.destroy}),[i])}}}var nQ={value:()=>{}};function xd(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new iu(r)}function iu(e){this._=e}function iQ(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}iu.prototype=xd.prototype={constructor:iu,on:function(e,t){var r=this._,n=iQ(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=oQ(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]=tk(r[i],e.name,t);else if(t==null)for(i in r)r[i]=tk(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new iu(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};function oQ(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function tk(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=nQ,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var xw="http://www.w3.org/1999/xhtml";const rk={svg:"http://www.w3.org/2000/svg",xhtml:xw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function wd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),rk.hasOwnProperty(t)?{space:rk[t],local:e}:e}function aQ(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===xw&&t.documentElement.namespaceURI===xw?t.createElement(e):t.createElementNS(r,e)}}function sQ(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Z5(e){var t=wd(e);return(t.local?sQ:aQ)(t)}function lQ(){}function w_(e){return e==null?lQ:function(){return this.querySelector(e)}}function cQ(e){typeof e!="function"&&(e=w_(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 Zr(n,this._parents)}function uQ(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function dQ(){return[]}function J5(e){return e==null?dQ:function(){return this.querySelectorAll(e)}}function fQ(e){return function(){return uQ(e.apply(this,arguments))}}function pQ(e){typeof e=="function"?e=fQ(e):e=J5(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 Zr(n,i)}function Q5(e){return function(){return this.matches(e)}}function ez(e){return function(t){return t.matches(e)}}var hQ=Array.prototype.find;function vQ(e){return function(){return hQ.call(this.children,e)}}function gQ(){return this.firstElementChild}function mQ(e){return this.select(e==null?gQ:vQ(typeof e=="function"?e:ez(e)))}var bQ=Array.prototype.filter;function yQ(){return Array.from(this.children)}function xQ(e){return function(){return bQ.call(this.children,e)}}function wQ(e){return this.selectAll(e==null?yQ:xQ(typeof e=="function"?e:ez(e)))}function _Q(e){typeof e!="function"&&(e=Q5(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 Zr(n,this._parents)}function tz(e){return new Array(e.length)}function EQ(){return new Zr(this._enter||this._groups.map(tz),this._parents)}function Tu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Tu.prototype={constructor:Tu,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 SQ(e){return function(){return e}}function OQ(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 Tu(e,o[a]);for(;a<c;++a)(s=t[a])&&(i[a]=s)}function CQ(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 Tu(e,o[s]);for(s=0;s<d;++s)(c=t[s])&&u.get(v[s])===c&&(i[s]=c)}function IQ(e){return e.__data__}function RQ(e,t){if(!arguments.length)return Array.from(this,IQ);var r=t?CQ:OQ,n=this._parents,i=this._groups;typeof e!="function"&&(e=SQ(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=NQ(e.call(d,d&&d.__data__,u,n)),x=h.length,m=s[u]=new Array(x),b=a[u]=new Array(x),w=c[u]=new Array(v);r(d,p,m,b,w,h,t);for(var y=0,_=0,S,E;y<x;++y)if(S=m[y]){for(y>=_&&(_=y+1);!(E=b[_])&&++_<x;);S._next=E||null}}return a=new Zr(a,n),a._enter=s,a._exit=c,a}function NQ(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function TQ(){return new Zr(this._exit||this._groups.map(tz),this._parents)}function PQ(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 kQ(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 Zr(s,this._parents)}function AQ(){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=DQ);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 Zr(i,this._parents).order()}function DQ(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function jQ(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function qQ(){return Array.from(this)}function LQ(){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 zQ(){let e=0;for(const t of this)++e;return e}function BQ(){return!this.node()}function FQ(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 $Q(e){return function(){this.removeAttribute(e)}}function HQ(e){return function(){this.removeAttributeNS(e.space,e.local)}}function VQ(e,t){return function(){this.setAttribute(e,t)}}function WQ(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function UQ(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function GQ(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 KQ(e,t){var r=wd(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?HQ:$Q:typeof t=="function"?r.local?GQ:UQ:r.local?WQ:VQ)(r,t))}function rz(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function YQ(e){return function(){this.style.removeProperty(e)}}function XQ(e,t,r){return function(){this.style.setProperty(e,t,r)}}function ZQ(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function JQ(e,t,r){return arguments.length>1?this.each((t==null?YQ:typeof t=="function"?ZQ:XQ)(e,t,r??"")):fa(this.node(),e)}function fa(e,t){return e.style.getPropertyValue(t)||rz(e).getComputedStyle(e,null).getPropertyValue(t)}function QQ(e){return function(){delete this[e]}}function eee(e,t){return function(){this[e]=t}}function tee(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function ree(e,t){return arguments.length>1?this.each((t==null?QQ:typeof t=="function"?tee:eee)(e,t)):this.node()[e]}function nz(e){return e.trim().split(/^|\s+/)}function __(e){return e.classList||new iz(e)}function iz(e){this._node=e,this._names=nz(e.getAttribute("class")||"")}iz.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 oz(e,t){for(var r=__(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function az(e,t){for(var r=__(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function nee(e){return function(){oz(this,e)}}function iee(e){return function(){az(this,e)}}function oee(e,t){return function(){(t.apply(this,arguments)?oz:az)(this,e)}}function aee(e,t){var r=nz(e+"");if(arguments.length<2){for(var n=__(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?oee:t?nee:iee)(r,t))}function see(){this.textContent=""}function lee(e){return function(){this.textContent=e}}function cee(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function uee(e){return arguments.length?this.each(e==null?see:(typeof e=="function"?cee:lee)(e)):this.node().textContent}function dee(){this.innerHTML=""}function fee(e){return function(){this.innerHTML=e}}function pee(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function hee(e){return arguments.length?this.each(e==null?dee:(typeof e=="function"?pee:fee)(e)):this.node().innerHTML}function vee(){this.nextSibling&&this.parentNode.appendChild(this)}function gee(){return this.each(vee)}function mee(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function bee(){return this.each(mee)}function yee(e){var t=typeof e=="function"?e:Z5(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function xee(){return null}function wee(e,t){var r=typeof e=="function"?e:Z5(e),n=t==null?xee:typeof t=="function"?t:w_(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function _ee(){var e=this.parentNode;e&&e.removeChild(this)}function Eee(){return this.each(_ee)}function See(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Oee(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Cee(e){return this.select(e?Oee:See)}function Iee(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Ree(e){return function(t){e.call(this,t,this.__data__)}}function Nee(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 Tee(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 Pee(e,t,r){return function(){var n=this.__on,i,o=Ree(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 kee(e,t,r){var n=Nee(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?Pee:Tee,i=0;i<o;++i)this.each(s(n[i],t,r));return this}function sz(e,t,r){var n=rz(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 Aee(e,t){return function(){return sz(this,e,t)}}function Mee(e,t){return function(){return sz(this,e,t.apply(this,arguments))}}function Dee(e,t){return this.each((typeof t=="function"?Mee:Aee)(e,t))}function*jee(){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 lz=[null];function Zr(e,t){this._groups=e,this._parents=t}function sl(){return new Zr([[document.documentElement]],lz)}function qee(){return this}Zr.prototype=sl.prototype={constructor:Zr,select:cQ,selectAll:pQ,selectChild:mQ,selectChildren:wQ,filter:_Q,data:RQ,enter:EQ,exit:TQ,join:PQ,merge:kQ,selection:qee,order:AQ,sort:MQ,call:jQ,nodes:qQ,node:LQ,size:zQ,empty:BQ,each:FQ,attr:KQ,style:JQ,property:ree,classed:aee,text:uee,html:hee,raise:gee,lower:bee,append:yee,insert:wee,remove:Eee,clone:Cee,datum:Iee,on:kee,dispatch:Dee,[Symbol.iterator]:jee};function Sn(e){return typeof e=="string"?new Zr([[document.querySelector(e)]],[document.documentElement]):new Zr([[e]],lz)}function Lee(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Bn(e,t){if(e=Lee(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 zee={passive:!1},Bs={capture:!0,passive:!1};function Qb(e){e.stopImmediatePropagation()}function ea(e){e.preventDefault(),e.stopImmediatePropagation()}function cz(e){var t=e.document.documentElement,r=Sn(e).on("dragstart.drag",ea,Bs);"onselectstart"in t?r.on("selectstart.drag",ea,Bs):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function uz(e,t){var r=e.document.documentElement,n=Sn(e).on("dragstart.drag",null);t&&(n.on("click.drag",ea,Bs),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 ww(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}})}ww.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Bee(e){return!e.ctrlKey&&!e.button}function Fee(){return this.parentNode}function $ee(e,t){return t??{x:e.x,y:e.y}}function Hee(){return navigator.maxTouchPoints||"ontouchstart"in this}function Vee(){var e=Bee,t=Fee,r=$ee,n=Hee,i={},o=xd("start","drag","end"),a=0,s,c,u,d,p=0;function v(S){S.on("mousedown.drag",h).filter(n).on("touchstart.drag",b).on("touchmove.drag",w,zee).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&&(Sn(S.view).on("mousemove.drag",x,Bs).on("mouseup.drag",m,Bs),cz(S.view),Qb(S),u=!1,s=S.clientX,c=S.clientY,I("start",S))}}function x(S){if(ea(S),!u){var E=S.clientX-s,I=S.clientY-c;u=E*E+I*I>p}i.mouse("drag",S)}function m(S){Sn(S.view).on("mousemove.drag mouseup.drag",null),uz(S.view,u),ea(S),i.mouse("end",S)}function b(S,E){if(e.call(this,S,E)){var I=S.changedTouches,N=t.call(this,S,E),T=I.length,A,B;for(A=0;A<T;++A)(B=_(this,N,S,E,I[A].identifier,I[A]))&&(Qb(S),B("start",S,I[A]))}}function w(S){var E=S.changedTouches,I=E.length,N,T;for(N=0;N<I;++N)(T=i[E[N].identifier])&&(ea(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])&&(Qb(S),T("end",S,E[N]))}function _(S,E,I,N,T,A){var B=o.copy(),L=Bn(A||I,E),D,z,P;if((P=r.call(S,new ww("beforestart",{sourceEvent:I,target:v,identifier:T,active:a,x:L[0],y:L[1],dx:0,dy:0,dispatch:B}),N))!=null)return D=P.x-L[0]||0,z=P.y-L[1]||0,function K($,Y,U){var Q=L,k;switch($){case"start":i[T]=K,k=a++;break;case"end":delete i[T],--a;case"drag":L=Bn(U||Y,E),k=a;break}B.call($,S,new ww($,{sourceEvent:Y,subject:P,target:v,identifier:T,active:k,x:L[0]+D,y:L[1]+z,dx:L[0]-Q[0],dy:L[1]-Q[1],dispatch:B}),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_(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function dz(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ll(){}var Fs=.7,Pu=1/Fs,ta="\\s*([+-]?\\d+)\\s*",$s="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Wee=/^#([0-9a-f]{3,8})$/,Uee=new RegExp(`^rgb\\(${ta},${ta},${ta}\\)$`),Gee=new RegExp(`^rgb\\(${Hn},${Hn},${Hn}\\)$`),Kee=new RegExp(`^rgba\\(${ta},${ta},${ta},${$s}\\)$`),Yee=new RegExp(`^rgba\\(${Hn},${Hn},${Hn},${$s}\\)$`),Xee=new RegExp(`^hsl\\(${$s},${Hn},${Hn}\\)$`),Zee=new RegExp(`^hsla\\(${$s},${Hn},${Hn},${$s}\\)$`),nk={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};E_(ll,Hs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ik,formatHex:ik,formatHex8:Jee,formatHsl:Qee,formatRgb:ok,toString:ok});function ik(){return this.rgb().formatHex()}function Jee(){return this.rgb().formatHex8()}function Qee(){return fz(this).formatHsl()}function ok(){return this.rgb().formatRgb()}function Hs(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Wee.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?ak(t):r===3?new Mr(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=Uee.exec(e))?new Mr(t[1],t[2],t[3],1):(t=Gee.exec(e))?new Mr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Kee.exec(e))?Tc(t[1],t[2],t[3],t[4]):(t=Yee.exec(e))?Tc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Xee.exec(e))?ck(t[1],t[2]/100,t[3]/100,1):(t=Zee.exec(e))?ck(t[1],t[2]/100,t[3]/100,t[4]):nk.hasOwnProperty(e)?ak(nk[e]):e==="transparent"?new Mr(NaN,NaN,NaN,0):null}function ak(e){return new Mr(e>>16&255,e>>8&255,e&255,1)}function Tc(e,t,r,n){return n<=0&&(e=t=r=NaN),new Mr(e,t,r,n)}function ete(e){return e instanceof ll||(e=Hs(e)),e?(e=e.rgb(),new Mr(e.r,e.g,e.b,e.opacity)):new Mr}function _w(e,t,r,n){return arguments.length===1?ete(e):new Mr(e,t,r,n??1)}function Mr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}E_(Mr,_w,dz(ll,{brighter(e){return e=e==null?Pu:Math.pow(Pu,e),new Mr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Fs:Math.pow(Fs,e),new Mr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Mr(oo(this.r),oo(this.g),oo(this.b),ku(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:sk,formatHex:sk,formatHex8:tte,formatRgb:lk,toString:lk}));function sk(){return`#${to(this.r)}${to(this.g)}${to(this.b)}`}function tte(){return`#${to(this.r)}${to(this.g)}${to(this.b)}${to((isNaN(this.opacity)?1:this.opacity)*255)}`}function lk(){const e=ku(this.opacity);return`${e===1?"rgb(":"rgba("}${oo(this.r)}, ${oo(this.g)}, ${oo(this.b)}${e===1?")":`, ${e})`}`}function ku(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 ck(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new On(e,t,r,n)}function fz(e){if(e instanceof On)return new On(e.h,e.s,e.l,e.opacity);if(e instanceof ll||(e=Hs(e)),!e)return new On;if(e instanceof On)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 On(a,s,c,e.opacity)}function rte(e,t,r,n){return arguments.length===1?fz(e):new On(e,t,r,n??1)}function On(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}E_(On,rte,dz(ll,{brighter(e){return e=e==null?Pu:Math.pow(Pu,e),new On(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Fs:Math.pow(Fs,e),new On(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 Mr(ey(e>=240?e-240:e+120,i,n),ey(e,i,n),ey(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new On(uk(this.h),Pc(this.s),Pc(this.l),ku(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=ku(this.opacity);return`${e===1?"hsl(":"hsla("}${uk(this.h)}, ${Pc(this.s)*100}%, ${Pc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function uk(e){return e=(e||0)%360,e<0?e+360:e}function Pc(e){return Math.max(0,Math.min(1,e||0))}function ey(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 pz=e=>()=>e;function nte(e,t){return function(r){return e+r*t}}function ite(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 ote(e){return(e=+e)==1?hz:function(t,r){return r-t?ite(t,r,e):pz(isNaN(t)?r:t)}}function hz(e,t){var r=t-e;return r?nte(e,r):pz(isNaN(e)?t:e)}const dk=(function e(t){var r=ote(t);function n(i,o){var a=r((i=_w(i)).r,(o=_w(o)).r),s=r(i.g,o.g),c=r(i.b,o.b),u=hz(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 Ew=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ty=new RegExp(Ew.source,"g");function ate(e){return function(){return e}}function ste(e){return function(t){return e(t)+""}}function lte(e,t){var r=Ew.lastIndex=ty.lastIndex=0,n,i,o,a=-1,s=[],c=[];for(e=e+"",t=t+"";(n=Ew.exec(e))&&(i=ty.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=ty.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?ste(c[0].x):ate(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 fk=180/Math.PI,Sw={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vz(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)*fk,skewX:Math.atan(c)*fk,scaleX:a,scaleY:s}}var kc;function cte(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Sw:vz(t.a,t.b,t.c,t.d,t.e,t.f)}function ute(e){return e==null||(kc||(kc=document.createElementNS("http://www.w3.org/2000/svg","g")),kc.setAttribute("transform",e),!(e=kc.transform.baseVal.consolidate()))?Sw:(e=e.matrix,vz(e.a,e.b,e.c,e.d,e.e,e.f))}function gz(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 m=h.push("translate(",null,t,null,r);x.push({i:m-4,x:ki(u,p)},{i:m-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 m=h.push(i(h)+"scale(",null,",",null,")");x.push({i:m-4,x:ki(u,p)},{i:m-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,m=v.length,b;++x<m;)p[(b=v[x]).i]=b.x(h);return p.join("")}}}var dte=gz(cte,"px, ","px)","deg)"),fte=gz(ute,", ",")",")"),pte=1e-12;function pk(e){return((e=Math.exp(e))+1/e)/2}function hte(e){return((e=Math.exp(e))-1/e)/2}function vte(e){return((e=Math.exp(2*e))-1)/(e+1)}const gte=(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,m=h*h+x*x,b,w;if(m<pte)w=Math.log(v/u)/t,b=function(N){return[s+N*h,c+N*x,u*Math.exp(t*N*w)]};else{var y=Math.sqrt(m),_=(v*v-u*u+n*m)/(2*u*r*y),S=(v*v-u*u-n*m)/(2*v*r*y),E=Math.log(Math.sqrt(_*_+1)-_),I=Math.log(Math.sqrt(S*S+1)-S);w=(I-E)/t,b=function(N){var T=N*w,A=pk(E),B=u/(r*y)*(A*vte(t*T+E)-hte(E));return[s+B*h,c+B*x,u*A/pk(t*T+E)]}}return b.duration=w*1e3*t/Math.SQRT2,b}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 pa=0,xs=0,Za=0,mz=1e3,Au,ws,Mu=0,po=0,_d=0,Vs=typeof performance=="object"&&performance.now?performance:Date,bz=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function S_(){return po||(bz(mte),po=Vs.now()+_d)}function mte(){po=0}function Du(){this._call=this._time=this._next=null}Du.prototype=yz.prototype={constructor:Du,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?S_():+r)+(t==null?0:+t),!this._next&&ws!==this&&(ws?ws._next=this:Au=this,ws=this),this._call=e,this._time=r,Ow()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ow())}};function yz(e,t,r){var n=new Du;return n.restart(e,t,r),n}function bte(){S_(),++pa;for(var e=Au,t;e;)(t=po-e._time)>=0&&e._call.call(void 0,t),e=e._next;--pa}function hk(){po=(Mu=Vs.now())+_d,pa=xs=0;try{bte()}finally{pa=0,xte(),po=0}}function yte(){var e=Vs.now(),t=e-Mu;t>mz&&(_d-=t,Mu=e)}function xte(){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);ws=e,Ow(n)}function Ow(e){if(!pa){xs&&(xs=clearTimeout(xs));var t=e-po;t>24?(e<1/0&&(xs=setTimeout(hk,e-Vs.now()-_d)),Za&&(Za=clearInterval(Za))):(Za||(Mu=Vs.now(),Za=setInterval(yte,mz)),pa=1,bz(hk))}}function vk(e,t,r){var n=new Du;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var wte=xd("start","end","cancel","interrupt"),_te=[],xz=0,gk=1,Cw=2,ou=3,mk=4,Iw=5,au=6;function Ed(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Ete(e,r,{name:t,index:n,group:i,on:wte,tween:_te,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:xz})}function O_(e,t){var r=kn(e,t);if(r.state>xz)throw new Error("too late; already scheduled");return r}function Gn(e,t){var r=kn(e,t);if(r.state>ou)throw new Error("too late; already running");return r}function kn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Ete(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=yz(o,0,r.time);function o(u){r.state=gk,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!==gk)return c();for(d in n)if(h=n[d],h.name===r.name){if(h.state===ou)return vk(a);h.state===mk?(h.state=au,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete n[d]):+d<t&&(h.state=au,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete n[d])}if(vk(function(){r.state===ou&&(r.state=mk,r.timer.restart(s,r.delay,r.time),s(u))}),r.state=Cw,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Cw){for(r.state=ou,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=Iw,1),p=-1,v=i.length;++p<v;)i[p].call(e,d);r.state===Iw&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=au,r.timer.stop(),delete n[t];for(var u in n)return;delete e.__transition}}function su(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>Cw&&n.state<Iw,n.state=au,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function Ste(e){return this.each(function(){su(this,e)})}function Ote(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 Cte(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 Ite(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=kn(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?Ote:Cte)(r,e,t))}function C_(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 kn(i,n).value[t]}}function wz(e,t){var r;return(typeof t=="number"?ki:t instanceof Hs?dk:(r=Hs(t))?(t=r,dk):lte)(e,t)}function Rte(e){return function(){this.removeAttribute(e)}}function Nte(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Tte(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 Pte(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 kte(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 Ate(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=wd(e),n=r==="transform"?fte:wz;return this.attrTween(e,typeof t=="function"?(r.local?Ate:kte)(r,n,C_(this,"attr."+e,t)):t==null?(r.local?Nte:Rte)(r):(r.local?Pte:Tte)(r,n,t))}function Dte(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function jte(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function qte(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&jte(e,o)),r}return i._value=t,i}function Lte(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 zte(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=wd(e);return this.tween(r,(n.local?qte:Lte)(n,t))}function Bte(e,t){return function(){O_(this,e).delay=+t.apply(this,arguments)}}function Fte(e,t){return t=+t,function(){O_(this,e).delay=t}}function $te(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Bte:Fte)(t,e)):kn(this.node(),t).delay}function Hte(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 Wte(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Hte:Vte)(t,e)):kn(this.node(),t).duration}function Ute(e,t){if(typeof t!="function")throw new Error;return function(){Gn(this,e).ease=t}}function Gte(e){var t=this._id;return arguments.length?this.each(Ute(t,e)):kn(this.node(),t).ease}function Kte(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Gn(this,e).ease=r}}function Yte(e){if(typeof e!="function")throw new Error;return this.each(Kte(this._id,e))}function Xte(e){typeof e!="function"&&(e=Q5(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 Zte(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 Jte(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 Qte(e,t,r){var n,i,o=Jte(t)?O_:Gn;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function ere(e,t){var r=this._id;return arguments.length<2?kn(this.node(),r).on.on(e):this.each(Qte(r,e,t))}function tre(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function rre(){return this.on("end.remove",tre(this._id))}function nre(e){var t=this._name,r=this._id;typeof e!="function"&&(e=w_(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,Ed(u[v],t,r,v,u,kn(d,r)));return new di(o,this._parents,t,r)}function ire(e){var t=this._name,r=this._id;typeof e!="function"&&(e=J5(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=kn(d,r),m=0,b=v.length;m<b;++m)(h=v[m])&&Ed(h,t,r,m,v,x);o.push(v),a.push(d)}return new di(o,a,t,r)}var ore=sl.prototype.constructor;function are(){return new ore(this._groups,this._parents)}function sre(e,t){var r,n,i;return function(){var o=fa(this,e),a=(this.style.removeProperty(e),fa(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function _z(e){return function(){this.style.removeProperty(e)}}function lre(e,t,r){var n,i=r+"",o;return function(){var a=fa(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function cre(e,t,r){var n,i,o;return function(){var a=fa(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),fa(this,e))),a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,s))}}function ure(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=_z(t)):void 0;(u!==r||i!==d)&&(n=(r=u).copy()).on(a,i=d),c.on=n}}function dre(e,t,r){var n=(e+="")=="transform"?dte:wz;return t==null?this.styleTween(e,sre(e,n)).on("end.style."+e,_z(e)):typeof t=="function"?this.styleTween(e,cre(e,n,C_(this,"style."+e,t))).each(ure(this._id,e)):this.styleTween(e,lre(e,n,t),r).on("end.style."+e,null)}function fre(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function pre(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&fre(e,a,r)),n}return o._value=t,o}function hre(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,pre(e,t,r??""))}function vre(e){return function(){this.textContent=e}}function gre(e){return function(){var t=e(this);this.textContent=t??""}}function mre(e){return this.tween("text",typeof e=="function"?gre(C_(this,"text",e)):vre(e==null?"":e+""))}function bre(e){return function(t){this.textContent=e.call(this,t)}}function yre(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&bre(i)),t}return n._value=e,n}function xre(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,yre(e))}function wre(){for(var e=this._name,t=this._id,r=Ez(),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=kn(c,t);Ed(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 _re(){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 Ere=0;function di(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Ez(){return++Ere}var oi=sl.prototype;di.prototype={constructor:di,select:nre,selectAll:ire,selectChild:oi.selectChild,selectChildren:oi.selectChildren,filter:Xte,merge:Zte,selection:are,transition:wre,call:oi.call,nodes:oi.nodes,node:oi.node,size:oi.size,empty:oi.empty,each:oi.each,on:ere,attr:Mte,attrTween:zte,style:dre,styleTween:hre,text:mre,textTween:xre,remove:rre,tween:Ite,delay:$te,duration:Wte,ease:Gte,easeVarying:Yte,end:_re,[Symbol.iterator]:oi[Symbol.iterator]};function Sre(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ore={time:null,delay:0,duration:250,ease:Sre};function Cre(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 Ire(e){var t,r;e instanceof di?(t=e._id,e=e._name):(t=Ez(),(r=Ore).time=S_(),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])&&Ed(c,e,t,u,a,r||Cre(c,t));return new di(n,this._parents,e,t)}sl.prototype.interrupt=Ste;sl.prototype.transition=Ire;const Ac=e=>()=>e;function Rre(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 ry(e){e.stopImmediatePropagation()}function Ja(e){e.preventDefault(),e.stopImmediatePropagation()}function Nre(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Tre(){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 bk(){return this.__zoom||ao}function Pre(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function kre(){return navigator.maxTouchPoints||"ontouchstart"in this}function Are(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=Nre,t=Tre,r=Are,n=Pre,i=kre,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=gte,u=xd("start","zoom","end"),d,p,v,h=500,x=150,m=0,b=10;function w(P){P.property("__zoom",bk).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",B).filter(i).on("touchstart.zoom",L).on("touchmove.zoom",D).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",bk),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,Q=typeof K=="function"?K.apply(this,arguments):K;return U*Q},$,Y)},w.scaleTo=function(P,K,$,Y){w.transform(P,function(){var U=t.apply(this,arguments),Q=this.__zoom,k=$==null?S(U):typeof $=="function"?$.apply(this,arguments):$,W=Q.invert(k),J=typeof K=="function"?K.apply(this,arguments):K;return r(_(y(Q,J),k,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 Q=t.apply(this,arguments),k=this.__zoom,W=Y==null?S(Q):typeof Y=="function"?Y.apply(this,arguments):Y;return r(ao.translate(W[0],W[1]).scale(k.k).translate(typeof K=="function"?-K.apply(this,arguments):-K,typeof $=="function"?-$.apply(this,arguments):-$),Q,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,Q=arguments,k=I(U,Q).event(Y),W=t.apply(U,Q),J=$==null?S(W):typeof $=="function"?$.apply(U,Q):$,ee=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),j=U.__zoom,G=typeof K=="function"?K.apply(U,Q):K,H=c(j.invert(J).concat(ee/j.k),G.invert(J).concat(ee/G.k));return function(q){if(q===1)q=G;else{var X=H(q),ne=ee/X[2];q=new li(ne,J[0]-X[0]*ne,J[1]-X[1]*ne)}k.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=Sn(this.that).datum();u.call(P,this.that,new Rre(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)))),Q=Bn(P);if($.wheel)($.mouse[0][0]!==Q[0]||$.mouse[0][1]!==Q[1])&&($.mouse[1]=Y.invert($.mouse[0]=Q)),clearTimeout($.wheel);else{if(Y.k===U)return;$.mouse=[Q,Y.invert(Q)],su(this),$.start()}Ja(P),$.wheel=setTimeout(k,x),$.zoom("mouse",r(_(y(Y,U),$.mouse[0],$.mouse[1]),$.extent,a));function k(){$.wheel=null,$.end()}}function A(P,...K){if(v||!e.apply(this,arguments))return;var $=P.currentTarget,Y=I(this,K,!0).event(P),U=Sn(P.view).on("mousemove.zoom",J,!0).on("mouseup.zoom",ee,!0),Q=Bn(P,$),k=P.clientX,W=P.clientY;cz(P.view),ry(P),Y.mouse=[Q,this.__zoom.invert(Q)],su(this),Y.start();function J(j){if(Ja(j),!Y.moved){var G=j.clientX-k,H=j.clientY-W;Y.moved=G*G+H*H>m}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),uz(j.view,Y.moved),Ja(j),Y.event(j).end()}}function B(P,...K){if(e.apply(this,arguments)){var $=this.__zoom,Y=Bn(P.changedTouches?P.changedTouches[0]:P,this),U=$.invert(Y),Q=$.k*(P.shiftKey?.5:2),k=r(_(y($,Q),Y,U),t.apply(this,K),a);Ja(P),s>0?Sn(this).transition().duration(s).call(E,k,Y,P):Sn(this).call(w.transform,k,Y,P)}}function L(P,...K){if(e.apply(this,arguments)){var $=P.touches,Y=$.length,U=I(this,K,P.changedTouches.length===Y).event(P),Q,k,W,J;for(ry(P),k=0;k<Y;++k)W=$[k],J=Bn(W,this),J=[J,this.__zoom.invert(J),W.identifier],U.touch0?!U.touch1&&U.touch0[2]!==J[2]&&(U.touch1=J,U.taps=0):(U.touch0=J,Q=!0,U.taps=1+!!d);d&&(d=clearTimeout(d)),Q&&(U.taps<2&&(p=J[0],d=setTimeout(function(){d=null},h)),su(this),U.start())}}function D(P,...K){if(this.__zooming){var $=I(this,K).event(P),Y=P.changedTouches,U=Y.length,Q,k,W,J;for(Ja(P),Q=0;Q<U;++Q)k=Y[Q],W=Bn(k,this),$.touch0&&$.touch0[2]===k.identifier?$.touch0[0]=W:$.touch1&&$.touch1[2]===k.identifier&&($.touch1[0]=W);if(k=$.that.__zoom,$.touch1){var ee=$.touch0[0],j=$.touch0[1],G=$.touch1[0],H=$.touch1[1],q=(q=G[0]-ee[0])*q+(q=G[1]-ee[1])*q,X=(X=H[0]-j[0])*X+(X=H[1]-j[1])*X;k=y(k,Math.sqrt(q/X)),W=[(ee[0]+G[0])/2,(ee[1]+G[1])/2],J=[(j[0]+H[0])/2,(j[1]+H[1])/2]}else if($.touch0)W=$.touch0[0],J=$.touch0[1];else return;$.zoom("touch",r(_(k,W,J),$.extent,a))}}function z(P,...K){if(this.__zooming){var $=I(this,K).event(P),Y=P.changedTouches,U=Y.length,Q,k;for(ry(P),v&&clearTimeout(v),v=setTimeout(function(){v=null},h),Q=0;Q<U;++Q)k=Y[Q],$.touch0&&$.touch0[2]===k.identifier?delete $.touch0:$.touch1&&$.touch1[2]===k.identifier&&delete $.touch1;if($.touch1&&!$.touch0&&($.touch0=$.touch1,delete $.touch1),$.touch0)$.touch0[1]=this.__zoom.invert($.touch0[0]);else if($.end(),$.taps===2&&(k=Bn(k,this),Math.hypot(p[0]-k[0],p[1]-k[1])<b)){var W=Sn(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return w.wheelDelta=function(P){return arguments.length?(n=typeof P=="function"?P:Ac(+P),w):n},w.filter=function(P){return arguments.length?(e=typeof P=="function"?P:Ac(!!P),w):e},w.touchable=function(P){return arguments.length?(i=typeof P=="function"?P:Ac(!!P),w):i},w.extent=function(P){return arguments.length?(t=typeof P=="function"?P:Ac([[+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?(m=(P=+P)*P,w):Math.sqrt(m)},w.tapDistance=function(P){return arguments.length?(b=+P,w):b},w}function tt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rw(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 Sz(e,t){if(e){if(typeof e=="string")return Rw(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 Rw(e,t)}}function Dre(e){if(Array.isArray(e))return e}function jre(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 qre(){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 Ke(e,t){return Dre(e)||jre(e,t)||Sz(e,t)||qre()}var ha;(function(e){e.Strict="strict",e.Loose="loose"})(ha||(ha={}));var ho;(function(e){e.Lines="lines",e.Dots="dots"})(ho||(ho={}));var ra;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ra||(ra={}));var Mi;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Mi||(Mi={}));var ju;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ju||(ju={}));var Se;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Se||(Se={}));var I_=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},na=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)},Oz=function(t,r){return{x:na(t.x,r[0][0],r[1][0]),y:na(t.y,r[0][1],r[1][1])}},Cz=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)},Lre=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)}},qu=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}},zre=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}},Iz=function(t){return!isNaN(t)&&isFinite(t)},ar=Symbol("internals");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 _s(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){tt(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 xk(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=_s({},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 Rz(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(_s(_s({},i),{},{selected:o.selected})),n;case"position":{var a=_s({},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&&xk(n,a),n.push(a),n}case"dimensions":{var s=_s({},i);return typeof o.dimensions<"u"&&(s.width=o.dimensions.width,s.height=o.dimensions.height),s.expandParent&&xk(n,s),n.push(s),n}case"remove":return n}return n.push(i),n},r)}function Nz(e,t){return Rz(e,t)}function Bre(e,t){return Rz(e,t)}var Ai=function(t,r){return{id:t,type:"select",selected:r}};function Zo(e,t){return e.reduce(function(r,n){var i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(Ai(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Ai(n.id,!1))),r},[])}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 Tz(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){tt(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}var _k=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 Tz({id:s.getAttribute("data-handleid"),position:s.getAttribute("data-handlepos"),x:(c.left-a.left)/n,y:(c.top-a.top)/n},I_(s))})};function Qa(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,Tz({},i))}}function Pz(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 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 Ts(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){tt(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}var Fre=function(t){return"id"in t&&"source"in t&&"target"in t},$re=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||"")},Nw=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("&"))},Hre=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 Fre(t)?n=Ts({},t):n=Ts(Ts({},t),{},{id:$re(t)}),Hre(n,r)?r:r.concat(n)},kz=function(t,r,n,i){var o=t.x,a=t.y,s=Ke(r,3),c=s[0],u=s[1],d=s[2],p=Ke(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},R_=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 Lre(n,qu({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 zre(r)},Az=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],i=Ke(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=qu({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,m=v.height,b=v.selectable,w=b===void 0?!0:b;if(u&&!w)return!1;var y=qu(Ts(Ts({},h),{},{width:x||0,height:m||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 m>"u"||x===null||m===null,N=c&&E>0,T=(x||0)*(m||0),A=I||N||E>=T;A&&p.push(v)}),p},Mz=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)})},Dz=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=na(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 Sk(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 Jo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sk(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jz(e,t,r,n){var i,o,a,s,c,u,d,p,v,h,x,m;if(!e.parentNode)return n;var b=t.get(e.parentNode);return jz(b,t,r,{x:((i=n.x)!==null&&i!==void 0?i:0)+((o=(a=b.position)===null||a===void 0?void 0:a.x)!==null&&o!==void 0?o:0),y:((s=n.y)!==null&&s!==void 0?s:0)+((c=(u=b.position)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0),z:((d=(p=b[ar])===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=b[ar])===null||x===void 0?void 0:x.z)!==null&&h!==void 0?h:0:(m=n.z)!==null&&m!==void 0?m:0})}function ny(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=Iz(i.zIndex)?i.zIndex:i.selected?1e3:0,s=t.get(i.id),c=Jo(Jo({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,ar,{enumerable:!1,value:{handleBounds:s==null||(o=s[ar])===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=jz(i,r,n,Jo(Jo({},i.position),{},{z:(o=(a=i[ar])===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[ar].z=d,n[i.id]&&(i[ar].isParent=!0)}}),r}function qz(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,m,b,w=R_(v),y=Dz(w,i,o,(x=t.minZoom)!==null&&x!==void 0?x:a,(m=t.maxZoom)!==null&&m!==void 0?m:s,(b=t.padding)!==null&&b!==void 0?b:.1),_=Ke(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 Wre(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,Jo(Jo({},n),{},(i={},tt(i,ar,n[ar]),tt(i,"selected",r.selected),i)))}}),new Map(t)}function Ure(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 Mc(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:Wre(t,a)}),c==null||c(t)),r!=null&&r.length&&(p&&i({edges:Ure(r,s)}),u==null||u(r))}var Tw=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Ok={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:Tw,nodeExtent:Tw,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:ha.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 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 qn(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){tt(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}var N_=rQ(),Gre=N_.Provider,$t=N_.useStore,Er=N_.useStoreApi,Kre=function(){return tQ(function(t,r){return qn(qn({},Ok),{},{setNodes:function(i){t({nodeInternals:ny(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?ny(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),m=x.m22,b=i.reduce(function(y,_){var S=s.get(_.id);if(S){var E=I_(_.nodeElement),I=!!(E.width&&E.height&&(S.width!==E.width||S.height!==E.height||_.forceUpdate));I&&(s.set(S.id,qn(qn({},S),{},tt({},ar,qn(qn({},S[ar]),{},{handleBounds:{source:_k(".source",_.nodeElement,m),target:_k(".target",_.nodeElement,m)}})),E)),y.push({id:S.id,type:"dimensions",dimensions:E}))}return y},[]),w=u||c&&!u&&qz(r,qn({initial:!0},d));t({nodeInternals:new Map(s),fitViewOnInitDone:w}),(b==null?void 0:b.length)>0&&(a==null||a(b))}},updateNodePositions:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=r(),c=s.onNodesChange,u=s.nodeInternals,d=s.hasDefaultNodes;if(d||c){var p=i.map(function(x){var m={id:x.id,type:"position",dragging:a};return o&&(m.positionAbsolute=x.positionAbsolute,m.position=x.position),m});if(p!=null&&p.length){if(d){var v=Nz(p,Array.from(u.values())),h=ny(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 Ai(p,!0)}):(u=Zo(Array.from(s.values()),i),d=Zo(c,[])),Mc({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 Ai(p,!0)}):(u=Zo(s,i),d=Zo(Array.from(c.values()),[])),Mc({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,Ai(x.id,!1)}),h=p.map(function(x){return Ai(x.id,!1)});Mc({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 Ai(d.id,!1)}),u=a.filter(function(d){return d.selected}).map(function(d){return Ai(d.id,!1)});Mc({changedNodes:c,changedEdges:u,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(s){s.positionAbsolute=Oz(s.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(qn({},Ok))}})})};function Jr(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=Jr(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function Lr(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 Yre(e){if(Array.isArray(e))return Rw(e)}function Xre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Zre(){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 Yre(e)||Xre(e)||Sz(e)||Zre()}var Jre={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},Qre=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},ene=function(){var t=Er(),r=$t(Qre,Lr),n=r.d3Zoom,i=r.d3Selection,o=O.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=Ke(t.getState().transform,3),h=v[0],x=v[1],m=v[2],b=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:m);n.transform(eo(i,c==null?void 0:c.duration),b)},getViewport:function(){var s=Ke(t.getState().transform,3),c=s[0],u=s[1],d=s[2];return{x:c,y:u,zoom:d}},fitView:function(s){return qz(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,m=p/2-s*x,b=v/2-c*x,w=ao.translate(m,b).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,m=Dz(s,p,v,h,x,(u=c==null?void 0:c.padding)!==null&&u!==void 0?u:.1),b=Ke(m,3),w=b[0],y=b[1],_=b[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 kz(s,u,d,p)},viewportInitialized:!0}:Jre},[n,i]);return o};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 $o(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){tt(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}function Lz(){var e=ene(),t=Er(),r=O.useCallback(function(){var p=t.getState(),v=p.nodeInternals,h=Array.from(v.values());return h.map(function(x){return $o({},x)})},[]),n=O.useCallback(function(p){var v=t.getState(),h=v.nodeInternals;return h.get(p)},[]),i=O.useCallback(function(){var p=t.getState(),v=p.edges,h=v===void 0?[]:v;return h.map(function(x){return $o({},x)})},[]),o=O.useCallback(function(p){var v=t.getState(),h=v.edges,x=h===void 0?[]:h;return x.find(function(m){return m.id===p})},[]),a=O.useCallback(function(p){var v=t.getState(),h=v.nodeInternals,x=v.setNodes,m=v.hasDefaultNodes,b=v.onNodesChange,w=Array.from(h.values()),y=typeof p=="function"?p(w):p;if(m)x(y);else if(b){var _=y.length===0?w.map(function(S){return{type:"remove",id:S.id}}):y.map(function(S){return{item:S,type:"reset"}});b(_)}},[]),s=O.useCallback(function(p){var v=t.getState(),h=v.edges,x=h===void 0?[]:h,m=v.setEdges,b=v.hasDefaultEdges,w=v.onEdgesChange,y=typeof p=="function"?p(x):p;if(b)m(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=O.useCallback(function(p){var v=Array.isArray(p)?p:[p],h=t.getState(),x=h.nodeInternals,m=h.setNodes,b=h.hasDefaultNodes,w=h.onNodesChange;if(b){var y=Array.from(x.values()),_=[].concat(y,so(v));m(_)}else if(w){var S=v.map(function(E){return{item:E,type:"add"}});w(S)}},[]),u=O.useCallback(function(p){var v=Array.isArray(p)?p:[p],h=t.getState(),x=h.edges,m=x===void 0?[]:x,b=h.setEdges,w=h.hasDefaultEdges,y=h.onEdgesChange;if(w)b([].concat(so(m),so(v)));else if(y){var _=v.map(function(S){return{item:S,type:"add"}});y(_)}},[]),d=O.useCallback(function(){var p=t.getState(),v=p.nodeInternals,h=p.edges,x=h===void 0?[]:h,m=p.transform,b=Array.from(v.values()),w=Ke(m,3),y=w[0],_=w[1],S=w[2];return{nodes:b.map(function(E){return $o({},E)}),edges:x.map(function(E){return $o({},E)}),viewport:{x:y,y:_,zoom:S}}},[]);return O.useMemo(function(){return $o($o({},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 tne(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 Sd(e,t){if(e==null)return{};var r=tne(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 rne(){return O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},O.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function nne(){return O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},O.createElement("path",{d:"M0 0h32v4.2H0z"}))}function ine(){return O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},O.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 one(){return O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},O.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 ane(){return O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},O.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 sne=["children","className"];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 lne(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){tt(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 Dc=function(t){var r=t.children,n=t.className,i=Sd(t,sne);return O.createElement("button",lne({type:"button",className:Jr(["react-flow__controls-button",n])},i),r)},cne=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},une=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,m=t.children,b=Er(),w=O.useState(!1),y=Ke(w,2),_=y[0],S=y[1],E=$t(cne),I=Lz(),N=I.zoomIn,T=I.zoomOut,A=I.fitView;if(O.useEffect(function(){S(!0)},[]),!_)return null;var B=function(){N==null||N(),d==null||d()},L=function(){T==null||T(),p==null||p()},D=function(){A==null||A(u),v==null||v()},z=function(){b.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),h==null||h(!E)};return O.createElement("div",{className:Jr(["react-flow__controls",x]),style:r},i&&O.createElement(O.Fragment,null,O.createElement(Dc,{onClick:B,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},O.createElement(rne,null)),O.createElement(Dc,{onClick:L,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},O.createElement(nne,null))),a&&O.createElement(Dc,{className:"react-flow__controls-fitview",onClick:D,title:"fit view","aria-label":"fit view"},O.createElement(ine,null)),c&&O.createElement(Dc,{className:"react-flow__controls-interactive",onClick:z,title:"toggle interactivity","aria-label":"toggle interactivity"},E?O.createElement(ane,null):O.createElement(one,null)),m)};une.displayName="Controls";var dne=function(t,r,n){return O.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},fne=function(t,r){return O.createElement("circle",{cx:t,cy:t,r:t,fill:r})},jc;function Nk(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 Tk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nk(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var pne=(jc={},tt(jc,ho.Dots,"#81818a"),tt(jc,ho.Lines,"#eee"),jc),hne=function(t){return t.transform},zz=function(t){var r=t.variant,n=r===void 0?ho.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=O.useRef(null),v=O.useState(null),h=Ke(v,2),x=h[0],m=h[1],b=$t(hne),w=Ke(b,3),y=w[0],_=w[1],S=w[2];O.useEffect(function(){var L=document.querySelectorAll(".react-flow__background"),D=Array.from(L).findIndex(function(z){return z===p.current});m("pattern-".concat(D))},[]);var E=o*S||1,I=y%E,N=_%E,T=n===ho.Lines,A=c||pne[n],B=T?dne(E,s,A):fne(s*S,A);return O.createElement("svg",{className:Jr(["react-flow__background","react-flow__container",d]),style:Tk(Tk({},u),{},{width:"100%",height:"100%"}),ref:p},x&&O.createElement(O.Fragment,null,O.createElement("pattern",{id:x,x:I,y:N,width:E,height:E,patternUnits:"userSpaceOnUse"},B),O.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(x,")")})))};zz.displayName="Background";var vne=O.memo(zz),gne=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function mne(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&gne.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var i="".concat(n).split("-");return O.createElement("div",{className:Jr(["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"},O.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var bne=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];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 yne(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){tt(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 xne=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,m=t.children,b=t.className,w=Sd(t,bne),y=O.useRef(null),_=O.useState({x:0,y:0,width:0,height:0}),S=Ke(_,2),E=S[0],I=S[1],N=Jr(["react-flow__edge-textwrapper",b]);return O.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:O.createElement("g",yne({transform:"translate(".concat(r-E.width/2," ").concat(n-E.height/2,")"),className:N},w),c&&O.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}),O.createElement("text",{className:"react-flow__edge-text",y:E.height/2,dy:"0.3em",ref:y,style:a},i),m)},wne=O.memo(xne),Od=(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?O.createElement(wne,{x:r,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:u}):null;return O.createElement(O.Fragment,null,O.createElement("path",{style:d,d:t,className:"react-flow__edge-path",markerEnd:p,markerStart:v}),h)});function Lu(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 Bz(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=Lu({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Ke(u,2),p=d[0],v=d[1],h=Lu({pos:c,x1:o,y1:a,x2:t,y2:r}),x=Ke(h,2),m=x[0],b=x[1];return"M".concat(t,",").concat(r," C").concat(p,",").concat(v," ").concat(m,",").concat(b," ").concat(o,",").concat(a)}function _ne(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=Lu({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Ke(u,2),p=d[0],v=d[1],h=Lu({pos:c,x1:o,y1:a,x2:t,y2:r}),x=Ke(h,2),m=x[0],b=x[1],w=t*.125+p*.375+m*.375+o*.125,y=r*.125+v*.375+b*.375+a*.125,_=Math.abs(w-t),S=Math.abs(y-r);return[w,y,_,S]}var Fz=O.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,m=e.style,b=e.markerEnd,w=e.markerStart,y={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c},_=Bz(y),S=_ne(y),E=Ke(S,2),I=E[0],N=E[1];return O.createElement(Od,{path:_,centerX:I,centerY:N,label:u,labelStyle:d,labelShowBg:p,labelBgStyle:v,labelBgPadding:h,labelBgBorderRadius:x,style:m,markerEnd:b,markerStart:w})});function kk(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 Ene(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kk(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ak=[Se.Left,Se.Right],$z=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=Ak.includes(s),p=Ak.includes(u),v=d&&!p||p&&!d;if(v){var h=d?Math.abs(i-r):0,x=r>i?r-h:r+h,m=d?0:Math.abs(o-n),b=n<o?n+m:n-m;return[x,b,h,m]}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 es(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,Ene({},i))}}var iy=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},oy=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},ay=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},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+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},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,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},dy=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function Pw(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=$z({sourceX:t,sourceY:r,targetX:o,targetY:a}),x=Ke(h,4),m=x[0],b=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:m,T=typeof v<"u"?v:b,A=null,B=null;return t<=o?(A=r<=a?iy(t,T,E):cy(t,T,E),B=r<=a?dy(o,T,E):sy(o,T,E)):(A=r<a?ay(t,T,E):uy(t,T,E),B=r<a?ly(o,T,E):oy(o,T,E)),I.includes(i)&&I.includes(c)?t<=o?(A=r<=a?dy(N,r,E):sy(N,r,E),B=r<=a?iy(N,a,E):cy(N,a,E)):(i===Se.Right&&c===Se.Left||i===Se.Left&&c===Se.Right||i===Se.Left&&c===Se.Left)&&(A=r<=a?ly(N,r,E):oy(N,r,E),B=r<=a?ay(N,a,E):uy(N,a,E)):I.includes(i)&&!I.includes(c)?(t<=o?A=r<=a?dy(o,r,E):sy(o,r,E):A=r<=a?ly(o,r,E):oy(o,r,E),B=""):!I.includes(i)&&I.includes(c)&&(t<=o?A=r<=a?iy(t,a,E):cy(t,a,E):A=r<=a?ay(t,a,E):uy(t,a,E),B=""),"M ".concat(t,",").concat(r).concat(A).concat(B,"L ").concat(o,",").concat(a)}var T_=O.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,m=x===void 0?Se.Top:x,b=e.markerEnd,w=e.markerStart,y=e.borderRadius,_=y===void 0?5:y,S=$z({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:h,targetPosition:m}),E=Ke(S,2),I=E[0],N=E[1],T=Pw({sourceX:t,sourceY:r,sourcePosition:h,targetX:n,targetY:i,targetPosition:m,borderRadius:_});return O.createElement(Od,{path:T,centerX:I,centerY:N,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:p,markerEnd:b,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 Dk(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){tt(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 Hz=O.memo(function(e){return O.createElement(T_,Dk(Dk({},e),{},{borderRadius:0}))}),Vz=O.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,m=i<r?i+x:i-x,b=Math.abs(n-t)/2,w=n<t?n+b:n-b,y="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(i);return O.createElement(Od,{path:y,centerX:w,centerY:m,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 zu(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 Cd(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=zu({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),v=Ke(p,2),h=v[0],x=v[1],m=zu({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),b=Ke(m,2),w=b[0],y=b[1];return"M".concat(t,",").concat(r," C").concat(h,",").concat(x," ").concat(w,",").concat(y," ").concat(o,",").concat(a)}function Sne(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=zu({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),v=Ke(p,2),h=v[0],x=v[1],m=zu({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),b=Ke(m,2),w=b[0],y=b[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 kw=O.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,m=e.style,b=e.markerEnd,w=e.markerStart,y=e.curvature,_={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c,curvature:y},S=Cd(_),E=Sne(_),I=Ke(E,2),N=I[0],T=I[1];return O.createElement(Od,{path:S,centerX:N,centerY:T,label:u,labelStyle:d,labelShowBg:p,labelBgStyle:v,labelBgPadding:h,labelBgBorderRadius:x,style:m,markerEnd:b,markerStart:w})}),P_=O.createContext(null),One=P_.Provider;P_.Consumer;function Aw(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===ha.Strict?r&&u||!r&&c:!0;x&&(d.isValid=o(h))}return d}function fy(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function Wz(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=Cz(t.target);if(!v)return;var h=v.elementFromPoint(t.clientX,t.clientY),x=h==null?void 0:h.classList.contains("target"),m=h==null?void 0:h.classList.contains("source");if(!p||!x&&!m&&!u)return;var b=a(),w=b.onConnectStart,y=b.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 A=Aw(T,y,o,n,r,c,v),B=A.connection,L=A.elementBelow,D=A.isValid,z=A.isHoveringHandle;if(!z)return fy(E);B.source!==B.target&&L&&(fy(E),E=L,L.classList.add("react-flow__handle-connecting"),L.classList.toggle("react-flow__handle-valid",D))}function N(T){var A=a(),B=A.onConnectStop,L=A.onConnectEnd,D=Aw(T,y,o,n,r,c,v),z=D.connection,P=D.isValid;B==null||B(T),P&&(i==null||i(z)),L==null||L(T),u&&d&&d(T),fy(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 Cne=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];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 py(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){tt(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 Ine=function(){return!0},Rne=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},Uz=O.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?Ine: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,m=Sd(e,Cne),b=Er(),w=O.useContext(P_),y=$t(Rne,Lr),_=y.connectionStartHandle,S=y.connectOnClick,E=d||null,I=n==="target",N=function(L){var D=b.getState(),z=D.defaultEdgeOptions,P=D.onConnect,K=D.hasDefaultEdges,$=py(py({},z),L);if(K){var Y=b.getState(),U=Y.edges;b.setState({edges:Vre($,U)})}P==null||P($),p==null||p($)},T=function(L){L.button===0&&Wz({event:L,handleId:E,nodeId:w,onConnect:N,isTarget:I,getState:b.getState,setState:b.setState,isValidConnection:s}),x==null||x(L)},A=function(L){var D=b.getState(),z=D.onClickConnectStart,P=D.onClickConnectStop,K=D.onClickConnectEnd,$=D.connectionMode;if(!_){z==null||z(L,{nodeId:w,handleId:E,handleType:n}),b.setState({connectionStartHandle:{nodeId:w,type:n,handleId:E}});return}var Y=Cz(L.target),U=Aw(L,$,_.type==="target",_.nodeId,_.handleId||null,s,Y),Q=U.connection,k=U.isValid;P==null||P(L),k&&N(Q),K==null||K(L),b.setState({connectionStartHandle:null})};return O.createElement("div",py({"data-handleid":E,"data-nodeid":w,"data-handlepos":o,className:Jr(["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?A:void 0,ref:t},m),v)});Uz.displayName="Handle";var Bu=O.memo(Uz),Gz=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 O.createElement(O.Fragment,null,O.createElement(Bu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,O.createElement(Bu,{type:"source",position:s,isConnectable:n}))};Gz.displayName="DefaultNode";var Mw=O.memo(Gz),Kz=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?Se.Bottom:i;return O.createElement(O.Fragment,null,r==null?void 0:r.label,O.createElement(Bu,{type:"source",position:o,isConnectable:n}))};Kz.displayName="InputNode";var Yz=O.memo(Kz),Xz=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Se.Top:i;return O.createElement(O.Fragment,null,O.createElement(Bu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};Xz.displayName="OutputNode";var Zz=O.memo(Xz),Nne=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},Tne=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 Lr(n,i)&&Lr(o,a)};function Pne(e){var t=e.onSelectionChange,r=$t(Nne,Tne),n=r.selectedNodes,i=r.selectedEdges;return O.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var kne=O.memo(Pne),Ane=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){O.useEffect(function(){typeof e<"u"&&t(e)},[e])}function mt(e,t,r){O.useEffect(function(){typeof t<"u"&&r(tt({},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,m=t.minZoom,b=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,A=t.connectOnClick,B=t.defaultEdgeOptions,L=t.fitView,D=t.fitViewOptions,z=t.onNodesDelete,P=t.onEdgesDelete,K=t.onNodeDrag,$=t.onNodeDragStart,Y=t.onNodeDragStop,U=t.onSelectionDrag,Q=t.onSelectionDragStart,k=t.onSelectionDragStop,W=$t(Ane,Lr),J=W.setNodes,ee=W.setEdges,j=W.setDefaultNodesAndEdges,G=W.setMinZoom,H=W.setMaxZoom,q=W.setTranslateExtent,X=W.setNodeExtent,ne=W.reset,te=Er();return O.useEffect(function(){return j(i,o),function(){ne()}},[]),mt("defaultEdgeOptions",B,te.setState),mt("connectionMode",E,te.setState),mt("onConnect",a,te.setState),mt("onConnectStart",s,te.setState),mt("onConnectStop",c,te.setState),mt("onConnectEnd",u,te.setState),mt("onClickConnectStart",d,te.setState),mt("onClickConnectStop",p,te.setState),mt("onClickConnectEnd",v,te.setState),mt("nodesDraggable",h,te.setState),mt("nodesConnectable",x,te.setState),mt("elementsSelectable",S,te.setState),mt("snapToGrid",N,te.setState),mt("snapGrid",I,te.setState),mt("onNodesChange",y,te.setState),mt("onEdgesChange",_,te.setState),mt("connectOnClick",A,te.setState),mt("fitViewOnInit",L,te.setState),mt("fitViewOnInitOptions",D,te.setState),mt("onNodesDelete",z,te.setState),mt("onEdgesDelete",P,te.setState),mt("onNodeDrag",K,te.setState),mt("onNodeDragStart",$,te.setState),mt("onNodeDragStop",Y,te.setState),mt("onSelectionDrag",U,te.setState),mt("onSelectionDragStart",Q,te.setState),mt("onSelectionDragStop",k,te.setState),Ri(r,J),Ri(n,ee),Ri(i,J),Ri(o,ee),Ri(m,G),Ri(b,H),Ri(T,q),Ri(w,X),null},Dne=".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%)}",jne=Dne,qne=".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}",Lne=qne,zne=function(t,r,n){return n===Se.Left?t-r:n===Se.Right?t+r:t},Bne=function(t,r,n){return n===Se.Top?t-r:n===Se.Bottom?t+r:t},qk=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 O.createElement("circle",{className:Jr(["react-flow__edgeupdater",r]),cx:zne(i,s,n),cy:Bne(o,s,n),r:s,stroke:"transparent",fill:"transparent"})},Ho=(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,m=n.labelBgStyle,b=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,A=n.sourcePosition,B=n.targetPosition,L=n.elementsSelectable,D=n.hidden,z=n.sourceHandleId,P=n.targetHandleId,K=n.onContextMenu,$=n.onMouseEnter,Y=n.onMouseMove,U=n.onMouseLeave,Q=n.edgeUpdaterRadius,k=n.onEdgeUpdate,W=n.onEdgeUpdateStart,J=n.onEdgeUpdateEnd,ee=n.markerEnd,j=n.markerStart,G=n.rfId,H=O.useState(!1),q=Ke(H,2),X=q[0],ne=q[1],te=Er(),ue=function(je){var Qe=te.getState(),dt=Qe.edges,Qt=Qe.addSelectedEdges,Mt=dt.find(function(St){return St.id===i});L&&(te.setState({nodesSelectionActive:!1}),Qt([i])),c==null||c(je,Mt)},re=es(i,te.getState,u),ge=es(i,te.getState,K),de=es(i,te.getState,$),xe=es(i,te.getState,Y),se=es(i,te.getState,U),le=function(je,Qe){var dt=Qe?S:_,Qt=(Qe?P:z)||null,Mt=Qe?"target":"source",St=function(){return!0},Dt=Qe,lr=te.getState().edges.find(function(Cr){return Cr.id===i});W==null||W(je,lr,Mt);var bn=J?function(Cr){return J(Cr,lr,Mt)}:void 0,Or=function(Be){return k==null?void 0:k(lr,Be)};Wz({event:je,handleId:Qt,nodeId:dt,onConnect:Or,isTarget:Dt,getState:te.getState,setState:te.setState,isValidConnection:St,elementEdgeUpdaterType:Mt,onEdgeUpdateEnd:bn})},we=function(je){return le(je,!0)},Oe=function(je){return le(je,!1)},Te=function(){return ne(!0)},qe=function(){return ne(!1)},Ue=O.useMemo(function(){return"url(#".concat(Nw(j,G),")")},[j,G]),De=O.useMemo(function(){return"url(#".concat(Nw(ee,G),")")},[ee,G]);if(D)return null;var ot=!L&&!c,vt=typeof k<"u",Et=Jr(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:d,animated:p,inactive:ot,updating:X}]);return O.createElement("g",{className:Et,onClick:ue,onDoubleClick:re,onContextMenu:ge,onMouseEnter:de,onMouseMove:xe,onMouseLeave:se},O.createElement(e,{id:i,source:_,target:S,selected:d,animated:p,label:v,labelStyle:h,labelShowBg:x,labelBgStyle:m,labelBgPadding:b,labelBgBorderRadius:w,data:s,style:y,sourceX:E,sourceY:I,targetX:N,targetY:T,sourcePosition:A,targetPosition:B,sourceHandleId:z,targetHandleId:P,markerStart:Ue,markerEnd:De,"data-testid":"rf__edge-".concat(i)}),vt&&O.createElement("g",{onMouseDown:we,onMouseEnter:Te,onMouseOut:qe},O.createElement(qk,{position:A,centerX:E,centerY:I,radius:Q})),vt&&O.createElement("g",{onMouseDown:Oe,onMouseEnter:Te,onMouseOut:qe},O.createElement(qk,{position:B,centerX:N,centerY:T,radius:Q})))};return t.displayName="EdgeWrapper",O.memo(t)});function Lk(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 zk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lk(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fne(e){var t={default:Ho(e.default||kw),straight:Ho(e.bezier||Vz),step:Ho(e.step||Hz),smoothstep:Ho(e.step||T_),simplebezier:Ho(e.simplebezier||Fz)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=Ho(e[o]||kw),i},r);return zk(zk({},t),n)}function Bk(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 Fk(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 $ne=function(t,r,n,i,o,a){var s=Bk(n,t,r),c=Bk(a,i,o);return{sourceX:s.x,sourceY:s.y,targetX:c.x,targetY:c.y}};function Hne(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=qu({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 $k(e,t){var r,n,i,o,a,s=e.get(t),c=(s==null||(r=s[ar])===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,Fu=(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=O.useState(!1),n=Ke(r,2),i=n[0],o=n[1],a=O.useRef(new Set([])),s=O.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,m){return x.concat.apply(x,so(m))},[]);return[v,h]}return[[],[]]},[e]),c=Ke(s,2),u=c[0],d=c[1];return O.useEffect(function(){if(e!==null){var p,v,h=function(w){if(Wk(w))return!1;var y=Vk(w.code,d);a.current.add(w[y]),Hk(u,a.current,!1)&&(w.preventDefault(),o(!0))},x=function(w){if(Wk(w))return!1;var y=Vk(w.code,d);Hk(u,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(w[y])},m=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",m),function(){var b,w;t==null||(b=t.target)===null||b===void 0||b.removeEventListener("keydown",h),t==null||(w=t.target)===null||w===void 0||w.removeEventListener("keyup",x),window.removeEventListener("blur",m)}}},[e,o]),i});function Hk(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 Wk(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 Wne=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},Une=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Er(),i=$t(Wne,Lr),o=i.onNodesChange,a=i.onEdgesChange,s=Fu(t),c=Fu(r);O.useEffect(function(){var u=n.getState(),d=u.nodeInternals,p=u.edges,v=u.hasDefaultNodes,h=u.hasDefaultEdges,x=u.onNodesDelete,m=u.onEdgesDelete,b=Array.from(d.values()),w=b.reduce(function(T,A){return(!A.selected&&A.parentNode&&T.find(function(B){return B.id===A.parentNode})||A.selected)&&T.push(A),T},[]),y=p.filter(function(T){return T.selected});if(s&&(w||y)){var _=Mz(w,p),S=[].concat(so(y),so(_)),E=S.reduce(function(T,A){return T.includes(A.id)||T.push(A.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&&(m==null||m(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]),O.useEffect(function(){n.setState({multiSelectionActive:c})},[c])});function Gne(e){var t=Er();O.useEffect(function(){var r,n=function(){if(e.current){var o=I_(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 Kne=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},hy=function(t){return{x:t.x,y:t.y,zoom:t.k}},Lc=function(t,r){return t.target.closest(".".concat(r))},Yne=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},Xne=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?ra.Free:h,m=t.zoomOnDoubleClick,b=m===void 0?!0:m,w=t.selectionKeyPressed,y=t.elementsSelectable,_=t.panOnDrag,S=_===void 0?!0:_,E=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,A=T===void 0?1:T,B=t.defaultPosition,L=B===void 0?[0,0]:B,D=t.zoomActivationKeyCode,z=t.preventScrolling,P=z===void 0?!0:z,K=t.children,$=t.noWheelClassName,Y=t.noPanClassName,U=Er(),Q=O.useRef(!1),k=O.useRef(null),W=O.useRef({x:0,y:0,zoom:0}),J=$t(Yne,Lr),ee=J.d3Zoom,j=J.d3Selection,G=J.d3ZoomHandler,H=Fu(D);return Gne(k),O.useEffect(function(){if(k.current){var q,X=Mre().scaleExtent([I,N]).translateExtent(E),ne=Sn(k.current).call(X),te=na(L[0],E[0][0],E[1][0]),ue=na(L[1],E[0][1],E[1][1]),re=na(A,I,N),ge=ao.translate(te,ue).scale(re);X.transform(ne,ge),U.setState({d3Zoom:X,d3Selection:ne,d3ZoomHandler:ne.on("wheel.zoom"),transform:[te,ue,re],domNode:(q=ne.node())===null||q===void 0?void 0:q.closest(".react-flow")})}},[]),O.useEffect(function(){j&&ee&&(d&&!H?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 ne=Bn(q),te=-q.deltaY*(q.deltaMode===1?.05:q.deltaMode?1:.002)*10,ue=X*Math.pow(2,te);ee.scaleTo(j,ue,ne);return}var re=q.deltaMode===1?20:1,ge=x===ra.Vertical?0:q.deltaX*re,de=x===ra.Horizontal?0:q.deltaY*re;ee.translateBy(j,-(ge/X)*v,-(de/X)*v)}).on("wheel.zoom",null):typeof G<"u"&&j.on("wheel",function(q){if(!P||Lc(q,$))return null;q.preventDefault()}).on("wheel.zoom",G))},[d,x,j,ee,G,H,c,P,$]),O.useEffect(function(){ee&&(w&&!Q.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=hy(q.transform);r(q.sourceEvent,X)}}))},[w,ee,r]),O.useEffect(function(){ee&&ee.on("start",function(q){if(Q.current=!0,n){var X=hy(q.transform);W.current=X,n(q.sourceEvent,X)}})},[ee,n]),O.useEffect(function(){ee&&ee.on("end",function(q){if(Q.current=!1,i&&Kne(W.current,q.transform)){var X=hy(q.transform);W.current=X,i(q.sourceEvent,X)}})},[ee,i]),O.useEffect(function(){ee&&ee.filter(function(q){var X=H||a,ne=c&&q.ctrlKey;return!S&&!X&&!d&&!b&&!c||w||!b&&q.type==="dblclick"||Lc(q,$)&&q.type==="wheel"||Lc(q,Y)&&q.type!=="wheel"||!c&&q.ctrlKey&&q.type==="wheel"||!X&&!d&&!ne&&q.type==="wheel"||!S&&(q.type==="mousedown"||q.type==="touchstart")?!1:(!q.ctrlKey||q.type==="wheel")&&!q.button})},[ee,a,c,d,b,S,w,y,H]),O.createElement("div",{className:"react-flow__renderer react-flow__container",ref:k},K)};function Uk(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 Gk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uk(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kk(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var Zne=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},Yk={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},Jne=O.memo(function(e){var t=e.selectionKeyPressed,r=Er(),n=O.useRef(0),i=O.useRef(0),o=O.useRef(),a=O.useState(Yk),s=Ke(a,2),c=s[0],u=s[1],d=$t(Zne,Lr),p=d.userSelectionActive,v=d.elementsSelectable,h=p||t;if(!v||!h)return null;var x=function(){u(Yk),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},m=function(S){var E=S.target.closest(".react-flow");o.current=E.getBoundingClientRect();var I=Kk(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})},b=function(S){var E,I;if(!(!t||!c.draw||!o.current)){var N=Kk(S,o.current),T=(E=c.startX)!==null&&E!==void 0?E:0,A=(I=c.startY)!==null&&I!==void 0?I:0,B=Gk(Gk({},c),{},{x:N.x<T?N.x:T,y:N.y<A?N.y:A,width:Math.abs(N.x-T),height:Math.abs(N.y-A)}),L=r.getState(),D=L.nodeInternals,z=L.edges,P=L.transform,K=L.onNodesChange,$=L.onEdgesChange,Y=Array.from(D.values()),U=Az(D,B,P,!1,!0),Q=Mz(U,z).map(function(ee){return ee.id}),k=U.map(function(ee){return ee.id});if(n.current!==k.length){n.current=k.length;var W=Zo(Y,k);W.length&&(K==null||K(W))}if(i.current!==Q.length){i.current=Q.length;var J=Zo(z,Q);J.length&&($==null||$(J))}u(B)}},w=function(){r.setState({nodesSelectionActive:n.current>0}),x()},y=function(){r.setState({nodesSelectionActive:!1}),x()};return O.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:m,onMouseMove:b,onMouseUp:w,onMouseLeave:y},c.draw&&O.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 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 Zk(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){tt(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}function Jz(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:Jz(r,t):!1}function Jk(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 Qne(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!Jz(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 eie(e,t,r,n,i,o){var a=Ke(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,m,b=i.get(e.parentNode),w=(v=b==null||(h=b.positionAbsolute)===null||h===void 0?void 0:h.x)!==null&&v!==void 0?v:0,y=(x=b==null||(m=b.positionAbsolute)===null||m===void 0?void 0:m.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?Oz(d,u):d,e.position={x:e.positionAbsolute.x-_.x,y:e.positionAbsolute.y-_.y},e}function vy(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return Zk(Zk({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function gy(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function Qz(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=O.useState(!1),d=Ke(u,2),p=d[0],v=d[1],h=Er(),x=O.useRef(),m=O.useRef({x:null,y:null}),b=O.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,A=kz({x:N,y:T},S,I,E);return A},[]);return O.useEffect(function(){if(t!=null&&t.current){var w=Sn(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,A=S.onSelectionDragStart,B=a?T:gy(A);if(!c&&!I&&a){var L;(L=E.get(a))!==null&&L!==void 0&&L.selected||N()}a&&s&&c&&Pz({id:a,store:h});var D=b(_);if(m.current=D,x.current=Qne(E,D,a),B&&x.current){var z=vy({nodeId:a,dragItems:x.current,nodeInternals:E}),P=Ke(z,2),K=P[0],$=P[1];B(_.sourceEvent,K,$)}}).on("drag",function(_){var S=h.getState(),E=S.updateNodePositions,I=S.snapToGrid,N=S.snapGrid,T=S.nodeInternals,A=S.nodeExtent,B=S.onNodeDrag,L=S.onSelectionDrag,D=b(_);if((m.current.x!==D.x||m.current.y!==D.y)&&x.current){m.current=D,x.current=x.current.map(function(U){return eie(U,D,I,N,T,A)});var z=a?B:gy(L);if(E(x.current,!0,!0),v(!0),z){var P=vy({nodeId:a,dragItems:x.current,nodeInternals:T}),K=Ke(P,2),$=K[0],Y=K[1];z(_.sourceEvent,$,Y)}}_.on("end",function(U){if(v(!1),x.current){var Q=h.getState(),k=Q.updateNodePositions,W=Q.nodeInternals,J=Q.onNodeDragStop,ee=Q.onSelectionDragStop,j=a?J:gy(ee);if(k(x.current,!1,!1),j){var G=vy({nodeId:a,dragItems:x.current,nodeInternals:W}),H=Ke(G,2),q=H[0],X=H[1];j(U.sourceEvent,q,X)}}})}).filter(function(_){var S=_.target,E=!_.button&&(!i||!Jk(S,".".concat(i),t))&&(!o||Jk(S,o,t));return E});return w.call(y),function(){w.on(".drag",null)}}}},[t,n,i,o,s,h,a,c,b]),p}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 tie(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){tt(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 rie=function(t){return tie({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},R_(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},nie=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return R_(r)};function iie(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Er(),i=$t(rie,Lr),o=i.transformString,a=i.userSelectionActive,s=$t(nie,Lr),c=s.width,u=s.height,d=s.x,p=s.y,v=O.useRef(null);if(Qz({nodeRef:v}),a||!c||!u)return null;var h=t?function(x){var m=Array.from(n.getState().nodeInternals.values()).filter(function(b){return b.selected});t(x,m)}:void 0;return O.createElement("div",{className:Jr(["react-flow__nodesselection","react-flow__container",r]),style:{transform:o}},O.createElement("div",{ref:v,className:"react-flow__nodesselection-rect",onContextMenu:h,style:{width:c,height:u,top:p,left:d}}))}var oie=O.memo(iie),aie=function(t){return t.nodesSelectionActive},eB=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,m=t.zoomOnPinch,b=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,A=t.defaultPosition,B=t.preventScrolling,L=t.onSelectionContextMenu,D=t.noWheelClassName,z=t.noPanClassName,P=Er(),K=$t(aie),$=Fu(d);Une({deleteKeyCode:a,multiSelectionKeyCode:p});var Y=function(W){n==null||n(W),P.getState().resetSelectedElements(),P.setState({nodesSelectionActive:!1})},U=i?function(k){return i(k)}:void 0,Q=o?function(k){return o(k)}:void 0;return O.createElement(Xne,{onMove:s,onMoveStart:c,onMoveEnd:u,selectionKeyPressed:$,elementsSelectable:h,zoomOnScroll:x,zoomOnPinch:m,panOnScroll:b,panOnScrollSpeed:w,panOnScrollMode:y,zoomOnDoubleClick:_,panOnDrag:S,translateExtent:E,minZoom:I,maxZoom:N,defaultZoom:T,defaultPosition:A,zoomActivationKeyCode:v,preventScrolling:B,noWheelClassName:D,noPanClassName:z},r,O.createElement(Jne,{selectionKeyPressed:$}),K&&O.createElement(oie,{onSelectionContextMenu:L,noPanClassName:z}),O.createElement("div",{className:"react-flow__pane react-flow__container",onClick:Y,onContextMenu:U,onWheel:Q}))};eB.displayName="FlowRenderer";var sie=O.memo(eB);function lie(e){var t=$t(O.useCallback(function(r){return e?Az(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var cie=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},tB=function(t){var r=$t(cie,Lr),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,s=lie(t.onlyRenderVisibleElements),c=O.useRef(),u=O.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 O.useEffect(function(){return function(){var d;c==null||(d=c.current)===null||d===void 0||d.disconnect()}},[]),O.createElement("div",{className:"react-flow__nodes react-flow__container"},s.map(function(d){var p,v,h,x,m,b,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 O.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:(m=(b=d[ar])===null||b===void 0?void 0:b.z)!==null&&m!==void 0?m:0,isParent:!!((w=d[ar])!==null&&w!==void 0&&w.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!d.width&&!!d.height})}))};tB.displayName="NodeRenderer";var uie=O.memo(tB),Vo;function eA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eA(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var die=(Vo={},tt(Vo,Se.Left,Se.Right),tt(Vo,Se.Right,Se.Left),tt(Vo,Se.Top,Se.Bottom),tt(Vo,Se.Bottom,Se.Top),Vo),fie=(function(e){var t,r,n,i,o,a=e.connectionNodeId,s=e.connectionHandleType,c=e.connectionLineStyle,u=e.connectionLineType,d=u===void 0?Mi.Bezier:u,p=e.isConnectable,v=e.CustomConnectionLineComponent,h=$t(O.useCallback(function(Q){return{fromNode:Q.nodeInternals.get(a),handleId:Q.connectionHandleId,toX:(Q.connectionPosition.x-Q.transform[0])/Q.transform[2],toY:(Q.connectionPosition.y-Q.transform[1])/Q.transform[2]}},[a]),Lr),x=h.fromNode,m=h.handleId,b=h.toX,w=h.toY,y=x==null||(t=x[ar])===null||t===void 0?void 0:t.handleBounds;if(!x||!p||!(y!=null&&y[s]))return null;var _=y[s],S=m?_.find(function(Q){return Q.id===m}):_[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,A=S==null?void 0:S.position;if(!A)return null;var B=die[A],L,D,z,P,K,$;switch(s){case"source":L=N,D=T,z=A,P=b,K=w,$=B;break;case"target":L=b,D=w,z=B,P=N,K=T,$=A;break}if(v)return O.createElement("g",{className:"react-flow__connection"},O.createElement(v,{connectionLineType:d,connectionLineStyle:c,fromNode:x,fromHandle:S,fromX:N,fromY:T,toX:b,toY:w,fromPosition:A,toPosition:B,sourcePosition:z,targetPosition:$,sourceNode:x,sourceHandle:S,targetX:P,targetY:K,sourceX:L,sourceY:D}));var Y="",U={sourceX:L,sourceY:D,sourcePosition:z,targetX:P,targetY:K,targetPosition:$};return d===Mi.Bezier?Y=Cd(U):d===Mi.Step?Y=Pw(tA(tA({},U),{},{borderRadius:0})):d===Mi.SmoothStep?Y=Pw(U):d===Mi.SimpleBezier?Y=Bz(U):Y="M".concat(L,",").concat(D," ").concat(P,",").concat(K),O.createElement("g",{className:"react-flow__connection"},O.createElement("path",{d:Y,className:"react-flow__connection-path",style:c}))});function Dw(e){"@babel/helpers - typeof";return Dw=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},Dw(e)}var zc,pie=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return O.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:"none",points:"-5,-4 0,0 -5,4"})},hie=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return O.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},rA=(zc={},tt(zc,ju.Arrow,pie),tt(zc,ju.ArrowClosed,hie),zc);function vie(e){var t=O.useMemo(function(){var r=rA.hasOwnProperty(e);return r?rA[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 nA(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 gie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nA(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var mie=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=vie(n);return O.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"},O.createElement(x,{color:i,strokeWidth:p}))},bie=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&&Dw(c)==="object"){var u=Nw(c,n);o.includes(u)||(a.push(gie({id:u,color:c.color||r},c)),o.push(u))}}),a},[]).sort(function(a,s){return a.id.localeCompare(s.id)})}},rB=function(t){var r=t.defaultColor,n=t.rfId,i=$t(O.useCallback(bie({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 O.createElement("defs",null,i.map(function(o){return O.createElement(mie,{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})}))};rB.displayName="MarkerDefinitions";var yie=O.memo(rB),xie=[{level:0,isMaxLevel:!0,edges:[]}];function wie(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,s){var c=Iz(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[ar])===null||p===void 0?void 0:p.z)||0,((v=t.get(s.target))===null||v===void 0||(h=v[ar])===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=Ke(a,2),c=s[0],u=s[1],d=+c;return{edges:u,level:d,isMaxLevel:d===n}});return o.length===0?xie:o}function _ie(e,t,r){var n=$t(O.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)&&Hne({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 wie(n,t,r)}var Eie=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}},nB=function(t){var r=$t(Eie,Lr),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=_ie(t.onlyRenderVisibleElements,d,t.elevateEdgesOnSelect);if(!s)return null;var v=t.connectionLineType,h=t.defaultMarkerColor,x=t.connectionLineStyle,m=t.connectionLineComponent,b=t.connectionLineContainerStyle,w=n&&i;return O.createElement(O.Fragment,null,p.map(function(y){var _=y.level,S=y.edges,E=y.isMaxLevel;return O.createElement("svg",{key:_,style:{zIndex:_},width:s,height:c,className:"react-flow__edges react-flow__container"},E&&O.createElement(yie,{defaultColor:h,rfId:t.rfId}),O.createElement("g",null,S.map(function(I){var N=$k(d,I.source),T=Ke(N,3),A=T[0],B=T[1],L=T[2],D=$k(d,I.target),z=Ke(D,3),P=z[0],K=z[1],$=z[2];if(!L||!$)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,Q=u===ha.Strict?K.target:K.target||K.source,k=Fk(B.source,I.sourceHandle||null),W=Fk(Q,I.targetHandle||null),J=(k==null?void 0:k.position)||Se.Bottom,ee=(W==null?void 0:W.position)||Se.Top;if(!k)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=$ne(A,k,J,P,W,ee),G=j.sourceX,H=j.sourceY,q=j.targetX,X=j.targetY;return O.createElement(U,{key:I.id,id:I.id,className:Jr([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:G,sourceY:H,targetX:q,targetY:X,sourcePosition:J,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&&O.createElement("svg",{style:b,width:s,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},O.createElement(fie,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:x,connectionLineType:v,isConnectable:o,CustomConnectionLineComponent:m})))};nB.displayName="EdgeRenderer";var Sie=O.memo(nB),Oie=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function Cie(e){var t=e.children,r=$t(Oie);return O.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function Iie(e){var t=Lz(),r=O.useRef(!1);O.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var iB=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,m=t.onNodeContextMenu,b=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,A=t.onlyRenderVisibleElements,B=t.elementsSelectable,L=t.selectNodesOnDrag,D=t.translateExtent,z=t.minZoom,P=t.maxZoom,K=t.defaultZoom,$=t.defaultPosition,Y=t.preventScrolling,U=t.defaultMarkerColor,Q=t.zoomOnScroll,k=t.zoomOnPinch,W=t.panOnScroll,J=t.panOnScrollSpeed,ee=t.panOnScrollMode,j=t.zoomOnDoubleClick,G=t.panOnDrag,H=t.onPaneClick,q=t.onPaneScroll,X=t.onPaneContextMenu,ne=t.onEdgeUpdate,te=t.onEdgeContextMenu,ue=t.onEdgeMouseEnter,re=t.onEdgeMouseMove,ge=t.onEdgeMouseLeave,de=t.edgeUpdaterRadius,xe=t.onEdgeUpdateStart,se=t.onEdgeUpdateEnd,le=t.noDragClassName,we=t.noWheelClassName,Oe=t.noPanClassName,Te=t.elevateEdgesOnSelect,qe=t.id;return Iie(s),O.createElement(sie,{onPaneClick:H,onPaneContextMenu:X,onPaneScroll:q,deleteKeyCode:T,selectionKeyCode:E,multiSelectionKeyCode:I,zoomActivationKeyCode:N,elementsSelectable:B,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:Q,zoomOnPinch:k,zoomOnDoubleClick:j,panOnScroll:W,panOnScrollSpeed:J,panOnScrollMode:ee,panOnDrag:G,translateExtent:D,minZoom:z,maxZoom:P,defaultZoom:K,defaultPosition:$,onSelectionContextMenu:b,preventScrolling:Y,noDragClassName:le,noWheelClassName:we,noPanClassName:Oe},O.createElement(Cie,null,O.createElement(Sie,{edgeTypes:n,onEdgeClick:u,onEdgeDoubleClick:p,connectionLineType:w,connectionLineStyle:y,connectionLineComponent:_,connectionLineContainerStyle:S,onEdgeUpdate:ne,onlyRenderVisibleElements:A,onEdgeContextMenu:te,onEdgeMouseEnter:ue,onEdgeMouseMove:re,onEdgeMouseLeave:ge,onEdgeUpdateStart:xe,onEdgeUpdateEnd:se,edgeUpdaterRadius:de,defaultMarkerColor:U,noPanClassName:Oe,elevateEdgesOnSelect:!!Te,rfId:qe}),O.createElement(uie,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:d,onNodeMouseEnter:v,onNodeMouseMove:h,onNodeMouseLeave:x,onNodeContextMenu:m,selectNodesOnDrag:L,onlyRenderVisibleElements:A,noPanClassName:Oe,noDragClassName:le})))};iB.displayName="GraphView";var Rie=O.memo(iB),oB=function(){return null};oB.displayName="GroupNode";function iA(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 oA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iA(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ts=(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,m=n.onDoubleClick,b=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,A=n.resizeObserver,B=n.dragHandle,L=n.zIndex,D=n.isParent,z=n.noPanClassName,P=n.noDragClassName,K=n.initialized,$=Er(),Y=O.useRef(null),U=O.useRef(I),Q=O.useRef(N),k=O.useRef(o),W=_||y||d||p||v||h,J=Qa(i,$.getState,p),ee=Qa(i,$.getState,v),j=Qa(i,$.getState,h),G=Qa(i,$.getState,x),H=Qa(i,$.getState,m),q=function(te){if(_&&(!E||!y)&&Pz({id:i,store:$}),d){var ue=$.getState().nodeInternals.get(i);d(te,oA({},ue))}};O.useEffect(function(){if(Y.current&&!T){var ne=Y.current;return A==null||A.observe(ne),function(){return A==null?void 0:A.unobserve(ne)}}},[T]),O.useEffect(function(){var ne=k.current!==o,te=U.current!==I,ue=Q.current!==N;Y.current&&(ne||te||ue)&&(ne&&(k.current=o),te&&(U.current=I),ue&&(Q.current=N),$.getState().updateNodeDimensions([{id:i,nodeElement:Y.current,forceUpdate:!0}]))},[i,o,I,N]);var X=Qz({nodeRef:Y,disabled:T||!y,noDragClassName:P,handleSelector:B,nodeId:i,isSelectable:_,selectNodesOnDrag:E});return T?null:O.createElement("div",{className:Jr(["react-flow__node","react-flow__node-".concat(o),z,w,{selected:u,selectable:_,parent:D}]),ref:Y,style:oA({zIndex:L,transform:"translate(".concat(s,"px,").concat(c,"px)"),pointerEvents:W?"all":"none",visibility:K?"visible":"hidden"},b),onMouseEnter:J,onMouseMove:ee,onMouseLeave:j,onContextMenu:G,onClick:q,onDoubleClick:H,"data-testid":"rf__node-".concat(i),"data-id":i},O.createElement(One,{value:i},O.createElement(e,{id:i,data:a,type:o,xPos:s,yPos:c,selected:u,isConnectable:S,sourcePosition:I,targetPosition:N,dragging:X,dragHandle:B,zIndex:L})))};return t.displayName="NodeWrapper",O.memo(t)});function aA(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 sA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aA(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nie(e){var t={input:ts(e.input||Yz),default:ts(e.default||Mw),output:ts(e.output||Zz),group:ts(e.group||oB)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=ts(e[o]||Mw),i},r);return sA(sA({},t),n)}function lA(e,t){var r=O.useRef(null),n=O.useMemo(function(){if(process.env.NODE_ENV==="development"){var i=Object.keys(e);Lr(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 cA(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 aB=function(t){var r=t.children,n=!0;try{Er()}catch{n=!1}return n?O.createElement(O.Fragment,null,r):O.createElement(Gre,{createStore:Kre},r)};aB.displayName="ReactFlowWrapper";var Tie=["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 uA(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 dA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uA(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}cA(jne),cA(Lne);var Pie={input:Yz,default:Mw,output:Zz},kie={default:kw,straight:Vz,step:Hz,smoothstep:T_,simplebezier:Fz},Aie=[15,15],Mie=[0,0],sB=O.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?Pie:s,u=e.edgeTypes,d=u===void 0?kie:u,p=e.onNodeClick,v=e.onEdgeClick,h=e.onInit,x=e.onMove,m=e.onMoveStart,b=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,A=e.onNodeMouseMove,B=e.onNodeMouseLeave,L=e.onNodeContextMenu,D=e.onNodeDoubleClick,z=e.onNodeDragStart,P=e.onNodeDrag,K=e.onNodeDragStop,$=e.onNodesDelete,Y=e.onEdgesDelete,U=e.onSelectionChange,Q=e.onSelectionDragStart,k=e.onSelectionDrag,W=e.onSelectionDragStop,J=e.onSelectionContextMenu,ee=e.connectionMode,j=ee===void 0?ha.Strict:ee,G=e.connectionLineType,H=G===void 0?Mi.Bezier:G,q=e.connectionLineStyle,X=e.connectionLineComponent,ne=e.connectionLineContainerStyle,te=e.deleteKeyCode,ue=te===void 0?"Backspace":te,re=e.selectionKeyCode,ge=re===void 0?"Shift":re,de=e.multiSelectionKeyCode,xe=de===void 0?"Meta":de,se=e.zoomActivationKeyCode,le=se===void 0?"Meta":se,we=e.snapToGrid,Oe=we===void 0?!1:we,Te=e.snapGrid,qe=Te===void 0?Aie:Te,Ue=e.onlyRenderVisibleElements,De=Ue===void 0?!1:Ue,ot=e.selectNodesOnDrag,vt=ot===void 0?!0:ot,Et=e.nodesDraggable,We=e.nodesConnectable,je=e.elementsSelectable,Qe=e.minZoom,dt=Qe===void 0?.5:Qe,Qt=e.maxZoom,Mt=Qt===void 0?2:Qt,St=e.defaultZoom,Dt=St===void 0?1:St,lr=e.defaultPosition,bn=lr===void 0?Mie:lr,Or=e.translateExtent,Cr=Or===void 0?Tw:Or,Be=e.preventScrolling,Xe=Be===void 0?!0:Be,et=e.nodeExtent,yt=e.defaultMarkerColor,Pt=yt===void 0?"#b1b1b7":yt,Ut=e.zoomOnScroll,jt=Ut===void 0?!0:Ut,Nt=e.zoomOnPinch,qt=Nt===void 0?!0:Nt,Ir=e.panOnScroll,Lt=Ir===void 0?!1:Ir,rr=e.panOnScrollSpeed,hr=rr===void 0?.5:rr,yn=e.panOnScrollMode,Rr=yn===void 0?ra.Free:yn,Br=e.zoomOnDoubleClick,Kn=Br===void 0?!0:Br,$i=e.panOnDrag,Hd=$i===void 0?!0:$i,Vd=e.onPaneClick,Wd=e.onPaneScroll,Ud=e.onPaneContextMenu,Gd=e.children,vl=e.onEdgeUpdate,Kd=e.onEdgeContextMenu,Yd=e.onEdgeDoubleClick,Xd=e.onEdgeMouseEnter,Zd=e.onEdgeMouseMove,Jd=e.onEdgeMouseLeave,Qd=e.onEdgeUpdateStart,_o=e.onEdgeUpdateEnd,gl=e.edgeUpdaterRadius,Eo=gl===void 0?10:gl,ef=e.onNodesChange,tf=e.onEdgesChange,ml=e.noDragClassName,bl=ml===void 0?"nodrag":ml,Na=e.noWheelClassName,yl=Na===void 0?"nowheel":Na,xl=e.noPanClassName,rf=xl===void 0?"nopan":xl,wl=e.fitView,nf=wl===void 0?!1:wl,_l=e.fitViewOptions,Ta=e.connectOnClick,El=Ta===void 0?!0:Ta,Pa=e.attributionPosition,of=e.proOptions,Sl=e.defaultEdgeOptions,Hi=e.elevateEdgesOnSelect,Ol=Hi===void 0?!1:Hi,So=Sd(e,Tie),Cl=lA(c,Nie),Il=lA(d,Fne);return O.createElement("div",dA(dA({},So),{},{ref:t,className:Jr(["react-flow",a])}),O.createElement(aB,null,O.createElement(Rie,{onInit:h,onMove:x,onMoveStart:m,onMoveEnd:b,onNodeClick:p,onEdgeClick:v,onNodeMouseEnter:T,onNodeMouseMove:A,onNodeMouseLeave:B,onNodeContextMenu:L,onNodeDoubleClick:D,nodeTypes:Cl,edgeTypes:Il,connectionLineType:H,connectionLineStyle:q,connectionLineComponent:X,connectionLineContainerStyle:ne,selectionKeyCode:ge,deleteKeyCode:ue,multiSelectionKeyCode:xe,zoomActivationKeyCode:le,onlyRenderVisibleElements:De,selectNodesOnDrag:vt,translateExtent:Cr,minZoom:dt,maxZoom:Mt,defaultZoom:Dt,defaultPosition:bn,preventScrolling:Xe,zoomOnScroll:jt,zoomOnPinch:qt,zoomOnDoubleClick:Kn,panOnScroll:Lt,panOnScrollSpeed:hr,panOnScrollMode:Rr,panOnDrag:Hd,onPaneClick:Vd,onPaneScroll:Wd,onPaneContextMenu:Ud,onSelectionContextMenu:J,onEdgeUpdate:vl,onEdgeContextMenu:Kd,onEdgeDoubleClick:Yd,onEdgeMouseEnter:Xd,onEdgeMouseMove:Zd,onEdgeMouseLeave:Jd,onEdgeUpdateStart:Qd,onEdgeUpdateEnd:_o,edgeUpdaterRadius:Eo,defaultMarkerColor:Pt,noDragClassName:bl,noWheelClassName:yl,noPanClassName:rf,elevateEdgesOnSelect:Ol,id:So==null?void 0:So.id}),O.createElement(Mne,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:w,onConnectStart:y,onConnectStop:_,onConnectEnd:S,onClickConnectStart:E,onClickConnectStop:I,onClickConnectEnd:N,nodesDraggable:Et,nodesConnectable:We,elementsSelectable:je,minZoom:dt,maxZoom:Mt,nodeExtent:et,onNodesChange:ef,onEdgesChange:tf,snapToGrid:Oe,snapGrid:qe,connectionMode:j,translateExtent:Cr,connectOnClick:El,defaultEdgeOptions:Sl,fitView:nf,fitViewOptions:_l,onNodesDelete:$,onEdgesDelete:Y,onNodeDragStart:z,onNodeDrag:P,onNodeDragStop:K,onSelectionDrag:k,onSelectionDragStart:Q,onSelectionDragStop:W}),U&&O.createElement(kne,{onSelectionChange:U}),Gd,O.createElement(mne,{proOptions:of,position:Pa})))});sB.displayName="ReactFlow";function lB(e){return function(t){var r=O.useState(t),n=Ke(r,2),i=n[0],o=n[1],a=O.useCallback(function(s){return o(function(c){return e(s,c)})},[]);return[i,o,a]}}var Die=lB(Nz),jie=lB(Bre);function fA(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)),m=x*v,b=x*h,w=a*(m+b)+c,y=s*(-m+b)+u;return{x:w,y}}function pA(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 cB(e,t){const r=fA(e,t),n=fA(t,e),i=pA(e,r),o=pA(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const qie=({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}=cB(i,o),c=Cd({sourceX:a,sourceY:s,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})]})},Lie=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=$t(O.useCallback(x=>x.nodeInternals.get(t),[t])),a=$t(O.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}=cB(o,a),h=Cd({sourceX:s,sourceY:c,sourcePosition:p,targetPosition:v,targetX:u,targetY:d});return C.jsx("path",{id:e,className:"react-flow__edge-path",d:h,markerEnd:n,style:i})},hA=172,vA=36,zie={custom:Lie},Bie=(e,t,r="LR")=>{const n=new QP.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:hA,height:vA})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),QP.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-hA/2,y:a.y-vA/2},o}),{nodes:e,edges:t}},Fie=()=>{},$ie=({data:e,dict:t,onSelect:r=Fie})=>{const{nodes:n,edges:i}=Bie(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]=Die(n),[c,u,d]=jie(i);return O.useEffect(()=>{a([...n]),u([...i])},[e]),C.jsx(sB,{nodes:o,edges:c,fitView:!0,onNodesChange:s,onEdgesChange:d,onNodeClick:(p,v)=>{r(v.id)},defaultZoom:.5,edgeTypes:zie,connectionLineComponent:qie,children:C.jsx(vne,{variant:ho.Dots,color:"#81818140",gap:18,size:1})})};var uB=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(uB||{});const dB=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}},gA=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[uB[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=dB(a.applyTo)),n.push(c)}});return n},Hie=(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 k_(e,t=[],r=[],n=[]){const i=gA(r,e,fe.EPermissionType.ATTRIBUTE),o=gA(r,e,fe.EPermissionType.METHOD),a=Hie(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,m]=v.applyTo.split("."),b=p.find(w=>w.prefix===x);return b?(b.resources=[...b.resources,v].sort((w,y)=>{const _=h.indexOf(w.type),S=h.indexOf(y.type);return _>S?1:-1}),b.type=m?b.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:m?null:v.type,resources:[v]}]},[]).reduce((p,v)=>[...p,...v.resources],[])}const Vie=(e=[],t=[],r=[])=>{const n=k_("",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},fB=(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:dB(p)}}return o})}}),r},pB=(e,t)=>Object.entries(e).map(([r,n])=>{const i=n.resources.map(o=>{var u,d,p,v,h,x,m,b;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=!!((m=t.dataClasses[a])!=null&&m.methods.find(w=>w.name===s&&w.applyTo==="entity"));break;case fe.EPermissionType.SINGLETON_METHOD:c=!!((b=t.singletons[a])!=null&&b.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 my={exports:{}};/*!
|
|
57
57
|
Copyright (c) 2018 Jed Watson.
|
|
58
58
|
Licensed under the MIT License (MIT), see
|
|
59
59
|
http://jedwatson.github.io/classnames
|
|
@@ -64,9 +64,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
64
64
|
* Released under MIT license <https://lodash.com/license>
|
|
65
65
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
66
66
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
67
|
-
*/var Gie=Es.exports,bA;function Kie(){return bA||(bA=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,m=2,b=1,w=2,y=4,_=8,S=16,E=32,I=64,N=128,T=256,A=512,B=30,L="...",D=800,z=16,P=1,K=2,$=3,Y=1/0,U=9007199254740991,Q=17976931348623157e292,k=NaN,W=4294967295,J=W-1,ee=W>>>1,j=[["ary",N],["bind",b],["bindKey",w],["curry",_],["curryRight",S],["flip",A],["partial",E],["partialRight",I],["rearg",T]],G="[object Arguments]",H="[object Array]",q="[object AsyncFunction]",X="[object Boolean]",ne="[object Date]",te="[object DOMException]",ue="[object Error]",re="[object Function]",ge="[object GeneratorFunction]",de="[object Map]",xe="[object Number]",se="[object Null]",le="[object Object]",we="[object Promise]",Oe="[object Proxy]",Te="[object RegExp]",qe="[object Set]",Ue="[object String]",De="[object Symbol]",ot="[object Undefined]",vt="[object WeakMap]",Et="[object WeakSet]",We="[object ArrayBuffer]",je="[object DataView]",Qe="[object Float32Array]",dt="[object Float64Array]",Qt="[object Int8Array]",Mt="[object Int16Array]",St="[object Int32Array]",Dt="[object Uint8Array]",lr="[object Uint8ClampedArray]",bn="[object Uint16Array]",Or="[object Uint32Array]",Cr=/\b__p \+= '';/g,Be=/\b(__p \+=) '' \+/g,Xe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,et=/&(?:amp|lt|gt|quot|#39);/g,yt=/[&<>"']/g,Pt=RegExp(et.source),Ut=RegExp(yt.source),jt=/<%-([\s\S]+?)%>/g,Nt=/<%([\s\S]+?)%>/g,qt=/<%=([\s\S]+?)%>/g,Ir=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lt=/^\w*$/,rr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hr=/[\\^$.*+?()[\]{}|]/g,yn=RegExp(hr.source),Rr=/^\s+/,Br=/\s/,Kn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$i=/\{\n\/\* \[wrapped with (.+)\] \*/,Hd=/,? & /,Vd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Wd=/[()=,{}\[\]\/\s]/,Ud=/\\(\\)?/g,Gd=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vl=/\w*$/,Kd=/^[-+]0x[0-9a-f]+$/i,Yd=/^0b[01]+$/i,Xd=/^\[object .+?Constructor\]$/,Zd=/^0o[0-7]+$/i,Jd=/^(?:0|[1-9]\d*)$/,Qd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wo=/($^)/,gl=/['\n\r\u2028\u2029\\]/g,_o="\\ud800-\\udfff",ef="\\u0300-\\u036f",tf="\\ufe20-\\ufe2f",ml="\\u20d0-\\u20ff",bl=ef+tf+ml,Na="\\u2700-\\u27bf",yl="a-z\\xdf-\\xf6\\xf8-\\xff",xl="\\xac\\xb1\\xd7\\xf7",rf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wl="\\u2000-\\u206f",nf=" \\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",Ta="\\ufe0e\\ufe0f",El=xl+rf+wl+nf,Pa="['’]",of="["+_o+"]",Sl="["+El+"]",Hi="["+bl+"]",Ol="\\d+",Eo="["+Na+"]",Cl="["+yl+"]",Il="[^"+_o+El+Ol+Na+yl+_l+"]",af="\\ud83c[\\udffb-\\udfff]",_F="(?:"+Hi+"|"+af+")",Q_="[^"+_o+"]",sf="(?:\\ud83c[\\udde6-\\uddff]){2}",lf="[\\ud800-\\udbff][\\udc00-\\udfff]",So="["+_l+"]",eE="\\u200d",tE="(?:"+Cl+"|"+Il+")",EF="(?:"+So+"|"+Il+")",rE="(?:"+Pa+"(?:d|ll|m|re|s|t|ve))?",nE="(?:"+Pa+"(?:D|LL|M|RE|S|T|VE))?",iE=_F+"?",oE="["+Ta+"]?",SF="(?:"+eE+"(?:"+[Q_,sf,lf].join("|")+")"+oE+iE+")*",OF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",CF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",aE=oE+iE+SF,IF="(?:"+[Eo,sf,lf].join("|")+")"+aE,RF="(?:"+[Q_+Hi+"?",Hi,sf,lf,of].join("|")+")",NF=RegExp(Pa,"g"),TF=RegExp(Hi,"g"),cf=RegExp(af+"(?="+af+")|"+RF+aE,"g"),PF=RegExp([So+"?"+Cl+"+"+rE+"(?="+[Sl,So,"$"].join("|")+")",EF+"+"+nE+"(?="+[Sl,So+tE,"$"].join("|")+")",So+"?"+tE+"+"+rE,So+"+"+nE,CF,OF,Ol,IF].join("|"),"g"),kF=RegExp("["+eE+_o+bl+Ta+"]"),AF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,MF=["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"],DF=-1,Ot={};Ot[Qe]=Ot[dt]=Ot[Qt]=Ot[Mt]=Ot[St]=Ot[Dt]=Ot[lr]=Ot[bn]=Ot[Or]=!0,Ot[G]=Ot[H]=Ot[We]=Ot[X]=Ot[je]=Ot[ne]=Ot[ue]=Ot[re]=Ot[de]=Ot[xe]=Ot[le]=Ot[Te]=Ot[qe]=Ot[Ue]=Ot[vt]=!1;var xt={};xt[G]=xt[H]=xt[We]=xt[je]=xt[X]=xt[ne]=xt[Qe]=xt[dt]=xt[Qt]=xt[Mt]=xt[St]=xt[de]=xt[xe]=xt[le]=xt[Te]=xt[qe]=xt[Ue]=xt[De]=xt[Dt]=xt[lr]=xt[bn]=xt[Or]=!0,xt[ue]=xt[re]=xt[vt]=!1;var jF={À:"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"},qF={"&":"&","<":"<",">":">",'"':""","'":"'"},LF={"&":"&","<":"<",">":">",""":'"',"'":"'"},zF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},BF=parseFloat,FF=parseInt,sE=typeof At=="object"&&At&&At.Object===Object&&At,$F=typeof self=="object"&&self&&self.Object===Object&&self,nr=sE||$F||Function("return this")(),uf=t&&!t.nodeType&&t,Vi=uf&&!0&&e&&!e.nodeType&&e,lE=Vi&&Vi.exports===uf,df=lE&&sE.process,Qr=(function(){try{var oe=Vi&&Vi.require&&Vi.require("util").types;return oe||df&&df.binding&&df.binding("util")}catch{}})(),cE=Qr&&Qr.isArrayBuffer,uE=Qr&&Qr.isDate,dE=Qr&&Qr.isMap,fE=Qr&&Qr.isRegExp,pE=Qr&&Qr.isSet,hE=Qr&&Qr.isTypedArray;function Fr(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 HF(oe,pe,ce,Ce){for(var Le=-1,rt=oe==null?0:oe.length;++Le<rt;){var Gt=oe[Le];pe(Ce,Gt,ce(Gt),oe)}return Ce}function en(oe,pe){for(var ce=-1,Ce=oe==null?0:oe.length;++ce<Ce&&pe(oe[ce],ce,oe)!==!1;);return oe}function VF(oe,pe){for(var ce=oe==null?0:oe.length;ce--&&pe(oe[ce],ce,oe)!==!1;);return oe}function vE(oe,pe){for(var ce=-1,Ce=oe==null?0:oe.length;++ce<Ce;)if(!pe(oe[ce],ce,oe))return!1;return!0}function vi(oe,pe){for(var ce=-1,Ce=oe==null?0:oe.length,Le=0,rt=[];++ce<Ce;){var Gt=oe[ce];pe(Gt,ce,oe)&&(rt[Le++]=Gt)}return rt}function Rl(oe,pe){var ce=oe==null?0:oe.length;return!!ce&&Oo(oe,pe,0)>-1}function ff(oe,pe,ce){for(var Ce=-1,Le=oe==null?0:oe.length;++Ce<Le;)if(ce(pe,oe[Ce]))return!0;return!1}function It(oe,pe){for(var ce=-1,Ce=oe==null?0:oe.length,Le=Array(Ce);++ce<Ce;)Le[ce]=pe(oe[ce],ce,oe);return Le}function gi(oe,pe){for(var ce=-1,Ce=pe.length,Le=oe.length;++ce<Ce;)oe[Le+ce]=pe[ce];return oe}function pf(oe,pe,ce,Ce){var Le=-1,rt=oe==null?0:oe.length;for(Ce&&rt&&(ce=oe[++Le]);++Le<rt;)ce=pe(ce,oe[Le],Le,oe);return ce}function WF(oe,pe,ce,Ce){var Le=oe==null?0:oe.length;for(Ce&&Le&&(ce=oe[--Le]);Le--;)ce=pe(ce,oe[Le],Le,oe);return ce}function hf(oe,pe){for(var ce=-1,Ce=oe==null?0:oe.length;++ce<Ce;)if(pe(oe[ce],ce,oe))return!0;return!1}var UF=vf("length");function GF(oe){return oe.split("")}function KF(oe){return oe.match(Vd)||[]}function gE(oe,pe,ce){var Ce;return ce(oe,function(Le,rt,Gt){if(pe(Le,rt,Gt))return Ce=rt,!1}),Ce}function Nl(oe,pe,ce,Ce){for(var Le=oe.length,rt=ce+(Ce?1:-1);Ce?rt--:++rt<Le;)if(pe(oe[rt],rt,oe))return rt;return-1}function Oo(oe,pe,ce){return pe===pe?a3(oe,pe,ce):Nl(oe,mE,ce)}function YF(oe,pe,ce,Ce){for(var Le=ce-1,rt=oe.length;++Le<rt;)if(Ce(oe[Le],pe))return Le;return-1}function mE(oe){return oe!==oe}function bE(oe,pe){var ce=oe==null?0:oe.length;return ce?mf(oe,pe)/ce:k}function vf(oe){return function(pe){return pe==null?r:pe[oe]}}function gf(oe){return function(pe){return oe==null?r:oe[pe]}}function yE(oe,pe,ce,Ce,Le){return Le(oe,function(rt,Gt,gt){ce=Ce?(Ce=!1,rt):pe(ce,rt,Gt,gt)}),ce}function XF(oe,pe){var ce=oe.length;for(oe.sort(pe);ce--;)oe[ce]=oe[ce].value;return oe}function mf(oe,pe){for(var ce,Ce=-1,Le=oe.length;++Ce<Le;){var rt=pe(oe[Ce]);rt!==r&&(ce=ce===r?rt:ce+rt)}return ce}function bf(oe,pe){for(var ce=-1,Ce=Array(oe);++ce<oe;)Ce[ce]=pe(ce);return Ce}function ZF(oe,pe){return It(pe,function(ce){return[ce,oe[ce]]})}function xE(oe){return oe&&oe.slice(0,SE(oe)+1).replace(Rr,"")}function $r(oe){return function(pe){return oe(pe)}}function yf(oe,pe){return It(pe,function(ce){return oe[ce]})}function ka(oe,pe){return oe.has(pe)}function wE(oe,pe){for(var ce=-1,Ce=oe.length;++ce<Ce&&Oo(pe,oe[ce],0)>-1;);return ce}function _E(oe,pe){for(var ce=oe.length;ce--&&Oo(pe,oe[ce],0)>-1;);return ce}function JF(oe,pe){for(var ce=oe.length,Ce=0;ce--;)oe[ce]===pe&&++Ce;return Ce}var QF=gf(jF),e3=gf(qF);function t3(oe){return"\\"+zF[oe]}function r3(oe,pe){return oe==null?r:oe[pe]}function Co(oe){return kF.test(oe)}function n3(oe){return AF.test(oe)}function i3(oe){for(var pe,ce=[];!(pe=oe.next()).done;)ce.push(pe.value);return ce}function xf(oe){var pe=-1,ce=Array(oe.size);return oe.forEach(function(Ce,Le){ce[++pe]=[Le,Ce]}),ce}function EE(oe,pe){return function(ce){return oe(pe(ce))}}function mi(oe,pe){for(var ce=-1,Ce=oe.length,Le=0,rt=[];++ce<Ce;){var Gt=oe[ce];(Gt===pe||Gt===d)&&(oe[ce]=d,rt[Le++]=ce)}return rt}function Tl(oe){var pe=-1,ce=Array(oe.size);return oe.forEach(function(Ce){ce[++pe]=Ce}),ce}function o3(oe){var pe=-1,ce=Array(oe.size);return oe.forEach(function(Ce){ce[++pe]=[Ce,Ce]}),ce}function a3(oe,pe,ce){for(var Ce=ce-1,Le=oe.length;++Ce<Le;)if(oe[Ce]===pe)return Ce;return-1}function s3(oe,pe,ce){for(var Ce=ce+1;Ce--;)if(oe[Ce]===pe)return Ce;return Ce}function Io(oe){return Co(oe)?c3(oe):UF(oe)}function xn(oe){return Co(oe)?u3(oe):GF(oe)}function SE(oe){for(var pe=oe.length;pe--&&Br.test(oe.charAt(pe)););return pe}var l3=gf(LF);function c3(oe){for(var pe=cf.lastIndex=0;cf.test(oe);)++pe;return pe}function u3(oe){return oe.match(cf)||[]}function d3(oe){return oe.match(PF)||[]}var f3=(function oe(pe){pe=pe==null?nr:Ro.defaults(nr.Object(),pe,Ro.pick(nr,MF));var ce=pe.Array,Ce=pe.Date,Le=pe.Error,rt=pe.Function,Gt=pe.Math,gt=pe.Object,wf=pe.RegExp,p3=pe.String,tn=pe.TypeError,Pl=ce.prototype,h3=rt.prototype,No=gt.prototype,kl=pe["__core-js_shared__"],Al=h3.toString,ft=No.hasOwnProperty,v3=0,OE=(function(){var l=/[^.]+$/.exec(kl&&kl.keys&&kl.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Ml=No.toString,g3=Al.call(gt),m3=nr._,b3=wf("^"+Al.call(ft).replace(hr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dl=lE?pe.Buffer:r,bi=pe.Symbol,jl=pe.Uint8Array,CE=Dl?Dl.allocUnsafe:r,ql=EE(gt.getPrototypeOf,gt),IE=gt.create,RE=No.propertyIsEnumerable,Ll=Pl.splice,NE=bi?bi.isConcatSpreadable:r,Aa=bi?bi.iterator:r,Wi=bi?bi.toStringTag:r,zl=(function(){try{var l=Xi(gt,"defineProperty");return l({},"",{}),l}catch{}})(),y3=pe.clearTimeout!==nr.clearTimeout&&pe.clearTimeout,x3=Ce&&Ce.now!==nr.Date.now&&Ce.now,w3=pe.setTimeout!==nr.setTimeout&&pe.setTimeout,Bl=Gt.ceil,Fl=Gt.floor,_f=gt.getOwnPropertySymbols,_3=Dl?Dl.isBuffer:r,TE=pe.isFinite,E3=Pl.join,S3=EE(gt.keys,gt),Kt=Gt.max,cr=Gt.min,O3=Ce.now,C3=pe.parseInt,PE=Gt.random,I3=Pl.reverse,Ef=Xi(pe,"DataView"),Ma=Xi(pe,"Map"),Sf=Xi(pe,"Promise"),To=Xi(pe,"Set"),Da=Xi(pe,"WeakMap"),ja=Xi(gt,"create"),$l=Da&&new Da,Po={},R3=Zi(Ef),N3=Zi(Ma),T3=Zi(Sf),P3=Zi(To),k3=Zi(Da),Hl=bi?bi.prototype:r,qa=Hl?Hl.valueOf:r,kE=Hl?Hl.toString:r;function F(l){if(kt(l)&&!ze(l)&&!(l instanceof Ye)){if(l instanceof rn)return l;if(ft.call(l,"__wrapped__"))return AS(l)}return new rn(l)}var ko=(function(){function l(){}return function(f){if(!Tt(f))return{};if(IE)return IE(f);l.prototype=f;var g=new l;return l.prototype=r,g}})();function Vl(){}function rn(l,f){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=r}F.templateSettings={escape:jt,evaluate:Nt,interpolate:qt,variable:"",imports:{_:F}},F.prototype=Vl.prototype,F.prototype.constructor=F,rn.prototype=ko(Vl.prototype),rn.prototype.constructor=rn;function Ye(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=W,this.__views__=[]}function A3(){var l=new Ye(this.__wrapped__);return l.__actions__=Nr(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=Nr(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=Nr(this.__views__),l}function M3(){if(this.__filtered__){var l=new Ye(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function D3(){var l=this.__wrapped__.value(),f=this.__dir__,g=ze(l),R=f<0,M=g?l.length:0,V=G4(0,M,this.__views__),Z=V.start,ie=V.end,ae=ie-Z,he=R?ie:Z-1,ve=this.__iteratees__,be=ve.length,Ee=0,Ne=cr(ae,this.__takeCount__);if(!g||!R&&M==ae&&Ne==ae)return rS(l,this.__actions__);var Ae=[];e:for(;ae--&&Ee<Ne;){he+=f;for(var $e=-1,Me=l[he];++$e<be;){var Ge=ve[$e],Ze=Ge.iteratee,Wr=Ge.type,mr=Ze(Me);if(Wr==K)Me=mr;else if(!mr){if(Wr==P)continue e;break e}}Ae[Ee++]=Me}return Ae}Ye.prototype=ko(Vl.prototype),Ye.prototype.constructor=Ye;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 j3(){this.__data__=ja?ja(null):{},this.size=0}function q3(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function L3(l){var f=this.__data__;if(ja){var g=f[l];return g===c?r:g}return ft.call(f,l)?f[l]:r}function z3(l){var f=this.__data__;return ja?f[l]!==r:ft.call(f,l)}function B3(l,f){var g=this.__data__;return this.size+=this.has(l)?0:1,g[l]=ja&&f===r?c:f,this}Ui.prototype.clear=j3,Ui.prototype.delete=q3,Ui.prototype.get=L3,Ui.prototype.has=z3,Ui.prototype.set=B3;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 F3(){this.__data__=[],this.size=0}function $3(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 H3(l){var f=this.__data__,g=Wl(f,l);return g<0?r:f[g][1]}function V3(l){return Wl(this.__data__,l)>-1}function W3(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=F3,Yn.prototype.delete=$3,Yn.prototype.get=H3,Yn.prototype.has=V3,Yn.prototype.set=W3;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 U3(){this.size=0,this.__data__={hash:new Ui,map:new(Ma||Yn),string:new Ui}}function G3(l){var f=nc(this,l).delete(l);return this.size-=f?1:0,f}function K3(l){return nc(this,l).get(l)}function Y3(l){return nc(this,l).has(l)}function X3(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=U3,Xn.prototype.delete=G3,Xn.prototype.get=K3,Xn.prototype.has=Y3,Xn.prototype.set=X3;function Gi(l){var f=-1,g=l==null?0:l.length;for(this.__data__=new Xn;++f<g;)this.add(l[f])}function Z3(l){return this.__data__.set(l,c),this}function J3(l){return this.__data__.has(l)}Gi.prototype.add=Gi.prototype.push=Z3,Gi.prototype.has=J3;function wn(l){var f=this.__data__=new Yn(l);this.size=f.size}function Q3(){this.__data__=new Yn,this.size=0}function e4(l){var f=this.__data__,g=f.delete(l);return this.size=f.size,g}function t4(l){return this.__data__.get(l)}function r4(l){return this.__data__.has(l)}function n4(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}wn.prototype.clear=Q3,wn.prototype.delete=e4,wn.prototype.get=t4,wn.prototype.has=r4,wn.prototype.set=n4;function AE(l,f){var g=ze(l),R=!g&&Ji(l),M=!g&&!R&&Ei(l),V=!g&&!R&&!M&&jo(l),Z=g||R||M||V,ie=Z?bf(l.length,p3):[],ae=ie.length;for(var he in l)(f||ft.call(l,he))&&!(Z&&(he=="length"||M&&(he=="offset"||he=="parent")||V&&(he=="buffer"||he=="byteLength"||he=="byteOffset")||ei(he,ae)))&&ie.push(he);return ie}function ME(l){var f=l.length;return f?l[Df(0,f-1)]:r}function i4(l,f){return ic(Nr(l),Ki(f,0,l.length))}function o4(l){return ic(Nr(l))}function Of(l,f,g){(g!==r&&!_n(l[f],g)||g===r&&!(f in l))&&Zn(l,f,g)}function La(l,f,g){var R=l[f];(!(ft.call(l,f)&&_n(R,g))||g===r&&!(f in l))&&Zn(l,f,g)}function Wl(l,f){for(var g=l.length;g--;)if(_n(l[g][0],f))return g;return-1}function a4(l,f,g,R){return yi(l,function(M,V,Z){f(R,M,g(M),Z)}),R}function DE(l,f){return l&&Dn(f,er(f),l)}function s4(l,f){return l&&Dn(f,Pr(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 Cf(l,f){for(var g=-1,R=f.length,M=ce(R),V=l==null;++g<R;)M[g]=V?r:ap(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 nn(l,f,g,R,M,V){var Z,ie=f&p,ae=f&v,he=f&h;if(g&&(Z=M?g(l,R,M,V):g(l)),Z!==r)return Z;if(!Tt(l))return l;var ve=ze(l);if(ve){if(Z=Y4(l),!ie)return Nr(l,Z)}else{var be=ur(l),Ee=be==re||be==ge;if(Ei(l))return oS(l,ie);if(be==le||be==G||Ee&&!M){if(Z=ae||Ee?{}:SS(l),!ie)return ae?L4(l,s4(Z,l)):q4(l,DE(Z,l))}else{if(!xt[be])return M?l:{};Z=X4(l,be,ie)}}V||(V=new wn);var Ne=V.get(l);if(Ne)return Ne;V.set(l,Z),QS(l)?l.forEach(function(Me){Z.add(nn(Me,f,g,Me,l,V))}):ZS(l)&&l.forEach(function(Me,Ge){Z.set(Ge,nn(Me,f,g,Ge,l,V))});var Ae=he?ae?Uf:Wf:ae?Pr:er,$e=ve?r:Ae(l);return en($e||l,function(Me,Ge){$e&&(Ge=Me,Me=l[Ge]),La(Z,Ge,nn(Me,f,g,Ge,l,V))}),Z}function l4(l){var f=er(l);return function(g){return jE(g,l,f)}}function jE(l,f,g){var R=g.length;if(l==null)return!R;for(l=gt(l);R--;){var M=g[R],V=f[M],Z=l[M];if(Z===r&&!(M in l)||!V(Z))return!1}return!0}function qE(l,f,g){if(typeof l!="function")throw new tn(a);return Wa(function(){l.apply(r,g)},f)}function za(l,f,g,R){var M=-1,V=Rl,Z=!0,ie=l.length,ae=[],he=f.length;if(!ie)return ae;g&&(f=It(f,$r(g))),R?(V=ff,Z=!1):f.length>=i&&(V=ka,Z=!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,Z&&be===be){for(var Ee=he;Ee--;)if(f[Ee]===be)continue e;ae.push(ve)}else V(f,be,R)||ae.push(ve)}return ae}var yi=uS(Mn),LE=uS(Rf,!0);function c4(l,f){var g=!0;return yi(l,function(R,M,V){return g=!!f(R,M,V),g}),g}function Ul(l,f,g){for(var R=-1,M=l.length;++R<M;){var V=l[R],Z=f(V);if(Z!=null&&(ie===r?Z===Z&&!Vr(Z):g(Z,ie)))var ie=Z,ae=V}return ae}function u4(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:tO(R);g<R;)l[g++]=f;return l}function zE(l,f){var g=[];return yi(l,function(R,M,V){f(R,M,V)&&g.push(R)}),g}function ir(l,f,g,R,M){var V=-1,Z=l.length;for(g||(g=J4),M||(M=[]);++V<Z;){var ie=l[V];f>0&&g(ie)?f>1?ir(ie,f-1,g,R,M):gi(M,ie):R||(M[M.length]=ie)}return M}var If=dS(),BE=dS(!0);function Mn(l,f){return l&&If(l,f,er)}function Rf(l,f){return l&&BE(l,f,er)}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 FE(l,f,g){var R=f(l);return ze(l)?R:gi(R,g(l))}function vr(l){return l==null?l===r?ot:se:Wi&&Wi in gt(l)?U4(l):o$(l)}function Nf(l,f){return l>f}function d4(l,f){return l!=null&&ft.call(l,f)}function f4(l,f){return l!=null&&f in gt(l)}function p4(l,f,g){return l>=cr(f,g)&&l<Kt(f,g)}function Tf(l,f,g){for(var R=g?ff:Rl,M=l[0].length,V=l.length,Z=V,ie=ce(V),ae=1/0,he=[];Z--;){var ve=l[Z];Z&&f&&(ve=It(ve,$r(f))),ae=cr(ve.length,ae),ie[Z]=!g&&(f||M>=120&&ve.length>=120)?new Gi(Z&&ve):r}ve=l[0];var be=-1,Ee=ie[0];e:for(;++be<M&&he.length<ae;){var Ne=ve[be],Ae=f?f(Ne):Ne;if(Ne=g||Ne!==0?Ne:0,!(Ee?ka(Ee,Ae):R(he,Ae,g))){for(Z=V;--Z;){var $e=ie[Z];if(!($e?ka($e,Ae):R(l[Z],Ae,g)))continue e}Ee&&Ee.push(Ae),he.push(Ne)}}return he}function h4(l,f,g,R){return Mn(l,function(M,V,Z){f(R,g(M),V,Z)}),R}function Ba(l,f,g){f=wi(f,l),l=RS(l,f);var R=l==null?l:l[jn(an(f))];return R==null?r:Fr(R,l,g)}function $E(l){return kt(l)&&vr(l)==G}function v4(l){return kt(l)&&vr(l)==We}function g4(l){return kt(l)&&vr(l)==ne}function Fa(l,f,g,R,M){return l===f?!0:l==null||f==null||!kt(l)&&!kt(f)?l!==l&&f!==f:m4(l,f,g,R,Fa,M)}function m4(l,f,g,R,M,V){var Z=ze(l),ie=ze(f),ae=Z?H:ur(l),he=ie?H:ur(f);ae=ae==G?le:ae,he=he==G?le:he;var ve=ae==le,be=he==le,Ee=ae==he;if(Ee&&Ei(l)){if(!Ei(f))return!1;Z=!0,ve=!1}if(Ee&&!ve)return V||(V=new wn),Z||jo(l)?wS(l,f,g,R,M,V):V4(l,f,ae,g,R,M,V);if(!(g&x)){var Ne=ve&&ft.call(l,"__wrapped__"),Ae=be&&ft.call(f,"__wrapped__");if(Ne||Ae){var $e=Ne?l.value():l,Me=Ae?f.value():f;return V||(V=new wn),M($e,Me,g,R,V)}}return Ee?(V||(V=new wn),W4(l,f,g,R,M,V)):!1}function b4(l){return kt(l)&&ur(l)==de}function Pf(l,f,g,R){var M=g.length,V=M,Z=!R;if(l==null)return!V;for(l=gt(l);M--;){var ie=g[M];if(Z&&ie[2]?ie[1]!==l[ie[0]]:!(ie[0]in l))return!1}for(;++M<V;){ie=g[M];var ae=ie[0],he=l[ae],ve=ie[1];if(Z&&ie[2]){if(he===r&&!(ae in l))return!1}else{var be=new wn;if(R)var Ee=R(he,ve,ae,l,f,be);if(!(Ee===r?Fa(ve,he,x|m,R,be):Ee))return!1}}return!0}function HE(l){if(!Tt(l)||e$(l))return!1;var f=ti(l)?b3:Xd;return f.test(Zi(l))}function y4(l){return kt(l)&&vr(l)==Te}function x4(l){return kt(l)&&ur(l)==qe}function w4(l){return kt(l)&&uc(l.length)&&!!Ot[vr(l)]}function VE(l){return typeof l=="function"?l:l==null?kr:typeof l=="object"?ze(l)?GE(l[0],l[1]):UE(l):fO(l)}function kf(l){if(!Va(l))return S3(l);var f=[];for(var g in gt(l))ft.call(l,g)&&g!="constructor"&&f.push(g);return f}function _4(l){if(!Tt(l))return i$(l);var f=Va(l),g=[];for(var R in l)R=="constructor"&&(f||!ft.call(l,R))||g.push(R);return g}function Af(l,f){return l<f}function WE(l,f){var g=-1,R=Tr(l)?ce(l.length):[];return yi(l,function(M,V,Z){R[++g]=f(M,V,Z)}),R}function UE(l){var f=Kf(l);return f.length==1&&f[0][2]?CS(f[0][0],f[0][1]):function(g){return g===l||Pf(g,l,f)}}function GE(l,f){return Xf(l)&&OS(f)?CS(jn(l),f):function(g){var R=ap(g,l);return R===r&&R===f?sp(g,l):Fa(f,R,x|m)}}function Kl(l,f,g,R,M){l!==f&&If(f,function(V,Z){if(M||(M=new wn),Tt(V))E4(l,f,Z,g,Kl,R,M);else{var ie=R?R(Jf(l,Z),V,Z+"",l,f,M):r;ie===r&&(ie=V),Of(l,Z,ie)}},Pr)}function E4(l,f,g,R,M,V,Z){var ie=Jf(l,g),ae=Jf(f,g),he=Z.get(ae);if(he){Of(l,g,he);return}var ve=V?V(ie,ae,g+"",l,f,Z):r,be=ve===r;if(be){var Ee=ze(ae),Ne=!Ee&&Ei(ae),Ae=!Ee&&!Ne&&jo(ae);ve=ae,Ee||Ne||Ae?ze(ie)?ve=ie:zt(ie)?ve=Nr(ie):Ne?(be=!1,ve=oS(ae,!0)):Ae?(be=!1,ve=aS(ae,!0)):ve=[]:Ua(ae)||Ji(ae)?(ve=ie,Ji(ie)?ve=rO(ie):(!Tt(ie)||ti(ie))&&(ve=SS(ae))):be=!1}be&&(Z.set(ae,ve),M(ve,ae,R,V,Z),Z.delete(ae)),Of(l,g,ve)}function KE(l,f){var g=l.length;if(g)return f+=f<0?g:0,ei(f,g)?l[f]:r}function YE(l,f,g){f.length?f=It(f,function(V){return ze(V)?function(Z){return Yi(Z,V.length===1?V[0]:V)}:V}):f=[kr];var R=-1;f=It(f,$r(Pe()));var M=WE(l,function(V,Z,ie){var ae=It(f,function(he){return he(V)});return{criteria:ae,index:++R,value:V}});return XF(M,function(V,Z){return j4(V,Z,g)})}function S4(l,f){return XE(l,f,function(g,R){return sp(l,R)})}function XE(l,f,g){for(var R=-1,M=f.length,V={};++R<M;){var Z=f[R],ie=Yi(l,Z);g(ie,Z)&&$a(V,wi(Z,l),ie)}return V}function O4(l){return function(f){return Yi(f,l)}}function Mf(l,f,g,R){var M=R?YF:Oo,V=-1,Z=f.length,ie=l;for(l===f&&(f=Nr(f)),g&&(ie=It(l,$r(g)));++V<Z;)for(var ae=0,he=f[V],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 ZE(l,f){for(var g=l?f.length:0,R=g-1;g--;){var M=f[g];if(g==R||M!==V){var V=M;ei(M)?Ll.call(l,M,1):Lf(l,M)}}return l}function Df(l,f){return l+Fl(PE()*(f-l+1))}function C4(l,f,g,R){for(var M=-1,V=Kt(Bl((f-l)/(g||1)),0),Z=ce(V);V--;)Z[R?V:++M]=l,l+=g;return Z}function jf(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 Qf(IS(l,f,kr),l+"")}function I4(l){return ME(qo(l))}function R4(l,f){var g=qo(l);return ic(g,Ki(f,0,g.length))}function $a(l,f,g,R){if(!Tt(l))return l;f=wi(f,l);for(var M=-1,V=f.length,Z=V-1,ie=l;ie!=null&&++M<V;){var ae=jn(f[M]),he=g;if(ae==="__proto__"||ae==="constructor"||ae==="prototype")return l;if(M!=Z){var ve=ie[ae];he=R?R(ve,ae,ie):r,he===r&&(he=Tt(ve)?ve:ei(f[M+1])?[]:{})}La(ie,ae,he),ie=ie[ae]}return l}var JE=$l?function(l,f){return $l.set(l,f),l}:kr,N4=zl?function(l,f){return zl(l,"toString",{configurable:!0,enumerable:!1,value:cp(f),writable:!0})}:kr;function T4(l){return ic(qo(l))}function on(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 V=ce(M);++R<M;)V[R]=l[R+f];return V}function P4(l,f){var g;return yi(l,function(R,M,V){return g=f(R,M,V),!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 V=R+M>>>1,Z=l[V];Z!==null&&!Vr(Z)&&(g?Z<=f:Z<f)?R=V+1:M=V}return M}return qf(l,f,kr,g)}function qf(l,f,g,R){var M=0,V=l==null?0:l.length;if(V===0)return 0;f=g(f);for(var Z=f!==f,ie=f===null,ae=Vr(f),he=f===r;M<V;){var ve=Fl((M+V)/2),be=g(l[ve]),Ee=be!==r,Ne=be===null,Ae=be===be,$e=Vr(be);if(Z)var Me=R||Ae;else he?Me=Ae&&(R||Ee):ie?Me=Ae&&Ee&&(R||!Ne):ae?Me=Ae&&Ee&&!Ne&&(R||!$e):Ne||$e?Me=!1:Me=R?be<=f:be<f;Me?M=ve+1:V=ve}return cr(V,J)}function QE(l,f){for(var g=-1,R=l.length,M=0,V=[];++g<R;){var Z=l[g],ie=f?f(Z):Z;if(!g||!_n(ie,ae)){var ae=ie;V[M++]=Z===0?0:Z}}return V}function eS(l){return typeof l=="number"?l:Vr(l)?k:+l}function Hr(l){if(typeof l=="string")return l;if(ze(l))return It(l,Hr)+"";if(Vr(l))return kE?kE.call(l):"";var f=l+"";return f=="0"&&1/l==-Y?"-0":f}function xi(l,f,g){var R=-1,M=Rl,V=l.length,Z=!0,ie=[],ae=ie;if(g)Z=!1,M=ff;else if(V>=i){var he=f?null:$4(l);if(he)return Tl(he);Z=!1,M=ka,ae=new Gi}else ae=f?[]:ie;e:for(;++R<V;){var ve=l[R],be=f?f(ve):ve;if(ve=g||ve!==0?ve:0,Z&&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 Lf(l,f){return f=wi(f,l),l=RS(l,f),l==null||delete l[jn(an(f))]}function tS(l,f,g,R){return $a(l,f,g(Yi(l,f)),R)}function Xl(l,f,g,R){for(var M=l.length,V=R?M:-1;(R?V--:++V<M)&&f(l[V],V,l););return g?on(l,R?0:V,R?V+1:M):on(l,R?V+1:0,R?M:V)}function rS(l,f){var g=l;return g instanceof Ye&&(g=g.value()),pf(f,function(R,M){return M.func.apply(M.thisArg,gi([R],M.args))},g)}function zf(l,f,g){var R=l.length;if(R<2)return R?xi(l[0]):[];for(var M=-1,V=ce(R);++M<R;)for(var Z=l[M],ie=-1;++ie<R;)ie!=M&&(V[M]=za(V[M]||Z,l[ie],f,g));return xi(ir(V,1),f,g)}function nS(l,f,g){for(var R=-1,M=l.length,V=f.length,Z={};++R<M;){var ie=R<V?f[R]:r;g(Z,l[R],ie)}return Z}function Bf(l){return zt(l)?l:[]}function Ff(l){return typeof l=="function"?l:kr}function wi(l,f){return ze(l)?l:Xf(l,f)?[l]:kS(at(l))}var k4=He;function _i(l,f,g){var R=l.length;return g=g===r?R:g,!f&&g>=R?l:on(l,f,g)}var iS=y3||function(l){return nr.clearTimeout(l)};function oS(l,f){if(f)return l.slice();var g=l.length,R=CE?CE(g):new l.constructor(g);return l.copy(R),R}function $f(l){var f=new l.constructor(l.byteLength);return new jl(f).set(new jl(l)),f}function A4(l,f){var g=f?$f(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function M4(l){var f=new l.constructor(l.source,vl.exec(l));return f.lastIndex=l.lastIndex,f}function D4(l){return qa?gt(qa.call(l)):{}}function aS(l,f){var g=f?$f(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function sS(l,f){if(l!==f){var g=l!==r,R=l===null,M=l===l,V=Vr(l),Z=f!==r,ie=f===null,ae=f===f,he=Vr(f);if(!ie&&!he&&!V&&l>f||V&&Z&&ae&&!ie&&!he||R&&Z&&ae||!g&&ae||!M)return 1;if(!R&&!V&&!he&&l<f||he&&g&&M&&!R&&!V||ie&&g&&M||!Z&&M||!ae)return-1}return 0}function j4(l,f,g){for(var R=-1,M=l.criteria,V=f.criteria,Z=M.length,ie=g.length;++R<Z;){var ae=sS(M[R],V[R]);if(ae){if(R>=ie)return ae;var he=g[R];return ae*(he=="desc"?-1:1)}}return l.index-f.index}function lS(l,f,g,R){for(var M=-1,V=l.length,Z=g.length,ie=-1,ae=f.length,he=Kt(V-Z,0),ve=ce(ae+he),be=!R;++ie<ae;)ve[ie]=f[ie];for(;++M<Z;)(be||M<V)&&(ve[g[M]]=l[M]);for(;he--;)ve[ie++]=l[M++];return ve}function cS(l,f,g,R){for(var M=-1,V=l.length,Z=-1,ie=g.length,ae=-1,he=f.length,ve=Kt(V-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(;++Z<ie;)(Ee||M<V)&&(be[Ne+g[Z]]=l[M++]);return be}function Nr(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 V=-1,Z=f.length;++V<Z;){var ie=f[V],ae=R?R(g[ie],l[ie],ie,g,l):r;ae===r&&(ae=l[ie]),M?Zn(g,ie,ae):La(g,ie,ae)}return g}function q4(l,f){return Dn(l,Yf(l),f)}function L4(l,f){return Dn(l,_S(l),f)}function Zl(l,f){return function(g,R){var M=ze(g)?HF:a4,V=f?f():{};return M(g,l,Pe(R,2),V)}}function Ao(l){return He(function(f,g){var R=-1,M=g.length,V=M>1?g[M-1]:r,Z=M>2?g[2]:r;for(V=l.length>3&&typeof V=="function"?(M--,V):r,Z&&gr(g[0],g[1],Z)&&(V=M<3?r:V,M=1),f=gt(f);++R<M;){var ie=g[R];ie&&l(f,ie,R,V)}return f})}function uS(l,f){return function(g,R){if(g==null)return g;if(!Tr(g))return l(g,R);for(var M=g.length,V=f?M:-1,Z=gt(g);(f?V--:++V<M)&&R(Z[V],V,Z)!==!1;);return g}}function dS(l){return function(f,g,R){for(var M=-1,V=gt(f),Z=R(f),ie=Z.length;ie--;){var ae=Z[l?ie:++M];if(g(V[ae],ae,V)===!1)break}return f}}function z4(l,f,g){var R=f&b,M=Ha(l);function V(){var Z=this&&this!==nr&&this instanceof V?M:l;return Z.apply(R?g:this,arguments)}return V}function fS(l){return function(f){f=at(f);var g=Co(f)?xn(f):r,R=g?g[0]:f.charAt(0),M=g?_i(g,1).join(""):f.slice(1);return R[l]()+M}}function Mo(l){return function(f){return pf(uO(cO(f).replace(NF,"")),l,"")}}function Ha(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 Tt(R)?R:g}}function B4(l,f,g){var R=Ha(l);function M(){for(var V=arguments.length,Z=ce(V),ie=V,ae=Do(M);ie--;)Z[ie]=arguments[ie];var he=V<3&&Z[0]!==ae&&Z[V-1]!==ae?[]:mi(Z,ae);if(V-=he.length,V<g)return mS(l,f,Jl,M.placeholder,r,Z,he,r,r,g-V);var ve=this&&this!==nr&&this instanceof M?R:l;return Fr(ve,this,Z)}return M}function pS(l){return function(f,g,R){var M=gt(f);if(!Tr(f)){var V=Pe(g,3);f=er(f),g=function(ie){return V(M[ie],ie,M)}}var Z=l(f,g,R);return Z>-1?M[V?f[Z]:Z]:r}}function hS(l){return Qn(function(f){var g=f.length,R=g,M=rn.prototype.thru;for(l&&f.reverse();R--;){var V=f[R];if(typeof V!="function")throw new tn(a);if(M&&!Z&&rc(V)=="wrapper")var Z=new rn([],!0)}for(R=Z?R:g;++R<g;){V=f[R];var ie=rc(V),ae=ie=="wrapper"?Gf(V):r;ae&&Zf(ae[0])&&ae[1]==(N|_|E|T)&&!ae[4].length&&ae[9]==1?Z=Z[rc(ae[0])].apply(Z,ae[3]):Z=V.length==1&&Zf(V)?Z[ie]():Z.thru(V)}return function(){var he=arguments,ve=he[0];if(Z&&he.length==1&&ze(ve))return Z.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,V,Z,ie,ae,he){var ve=f&N,be=f&b,Ee=f&w,Ne=f&(_|S),Ae=f&A,$e=Ee?r:Ha(l);function Me(){for(var Ge=arguments.length,Ze=ce(Ge),Wr=Ge;Wr--;)Ze[Wr]=arguments[Wr];if(Ne)var mr=Do(Me),Ur=JF(Ze,mr);if(R&&(Ze=lS(Ze,R,M,Ne)),V&&(Ze=cS(Ze,V,Z,Ne)),Ge-=Ur,Ne&&Ge<he){var Bt=mi(Ze,mr);return mS(l,f,Jl,Me.placeholder,g,Ze,Bt,ie,ae,he-Ge)}var En=be?g:this,ni=Ee?En[l]:l;return Ge=Ze.length,ie?Ze=a$(Ze,ie):Ae&&Ge>1&&Ze.reverse(),ve&&ae<Ge&&(Ze.length=ae),this&&this!==nr&&this instanceof Me&&(ni=$e||Ha(ni)),ni.apply(En,Ze)}return Me}function vS(l,f){return function(g,R){return h4(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=Hr(g),R=Hr(R)):(g=eS(g),R=eS(R)),M=l(g,R)}return M}}function Hf(l){return Qn(function(f){return f=It(f,$r(Pe())),He(function(g){var R=this;return l(f,function(M){return Fr(M,R,g)})})})}function ec(l,f){f=f===r?" ":Hr(f);var g=f.length;if(g<2)return g?jf(f,l):f;var R=jf(f,Bl(l/Io(f)));return Co(f)?_i(xn(R),0,l).join(""):R.slice(0,l)}function F4(l,f,g,R){var M=f&b,V=Ha(l);function Z(){for(var ie=-1,ae=arguments.length,he=-1,ve=R.length,be=ce(ve+ae),Ee=this&&this!==nr&&this instanceof Z?V:l;++he<ve;)be[he]=R[he];for(;ae--;)be[he++]=arguments[++ie];return Fr(Ee,M?g:this,be)}return Z}function gS(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),C4(f,g,R,l)}}function tc(l){return function(f,g){return typeof f=="string"&&typeof g=="string"||(f=sn(f),g=sn(g)),l(f,g)}}function mS(l,f,g,R,M,V,Z,ie,ae,he){var ve=f&_,be=ve?Z:r,Ee=ve?r:Z,Ne=ve?V:r,Ae=ve?r:V;f|=ve?E:I,f&=~(ve?I:E),f&y||(f&=-4);var $e=[l,f,M,Ne,be,Ae,Ee,ie,ae,he],Me=g.apply(r,$e);return Zf(l)&&NS(Me,$e),Me.placeholder=R,TS(Me,l,f)}function Vf(l){var f=Gt[l];return function(g,R){if(g=sn(g),R=R==null?0:cr(Fe(R),292),R&&TE(g)){var M=(at(g)+"e").split("e"),V=f(M[0]+"e"+(+M[1]+R));return M=(at(V)+"e").split("e"),+(M[0]+"e"+(+M[1]-R))}return f(g)}}var $4=To&&1/Tl(new To([,-0]))[1]==Y?function(l){return new To(l)}:fp;function bS(l){return function(f){var g=ur(f);return g==de?xf(f):g==qe?o3(f):ZF(f,l(f))}}function Jn(l,f,g,R,M,V,Z,ie){var ae=f&w;if(!ae&&typeof l!="function")throw new tn(a);var he=R?R.length:0;if(he||(f&=-97,R=M=r),Z=Z===r?Z:Kt(Fe(Z),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:Gf(l),Ne=[l,f,g,R,M,ve,be,V,Z,ie];if(Ee&&n$(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:Kt(Ne[9]-he,0),!ie&&f&(_|S)&&(f&=-25),!f||f==b)var Ae=z4(l,f,g);else f==_||f==S?Ae=B4(l,f,ie):(f==E||f==(b|E))&&!M.length?Ae=F4(l,f,g,R):Ae=Jl.apply(r,Ne);var $e=Ee?JE:NS;return TS($e(Ae,Ne),l,f)}function yS(l,f,g,R){return l===r||_n(l,No[g])&&!ft.call(R,g)?f:l}function xS(l,f,g,R,M,V){return Tt(l)&&Tt(f)&&(V.set(f,l),Kl(l,f,r,xS,V),V.delete(f)),l}function H4(l){return Ua(l)?r:l}function wS(l,f,g,R,M,V){var Z=g&x,ie=l.length,ae=f.length;if(ie!=ae&&!(Z&&ae>ie))return!1;var he=V.get(l),ve=V.get(f);if(he&&ve)return he==f&&ve==l;var be=-1,Ee=!0,Ne=g&m?new Gi:r;for(V.set(l,f),V.set(f,l);++be<ie;){var Ae=l[be],$e=f[be];if(R)var Me=Z?R($e,Ae,be,f,l,V):R(Ae,$e,be,l,f,V);if(Me!==r){if(Me)continue;Ee=!1;break}if(Ne){if(!hf(f,function(Ge,Ze){if(!ka(Ne,Ze)&&(Ae===Ge||M(Ae,Ge,g,R,V)))return Ne.push(Ze)})){Ee=!1;break}}else if(!(Ae===$e||M(Ae,$e,g,R,V))){Ee=!1;break}}return V.delete(l),V.delete(f),Ee}function V4(l,f,g,R,M,V,Z){switch(g){case je:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case We:return!(l.byteLength!=f.byteLength||!V(new jl(l),new jl(f)));case X:case ne:case xe:return _n(+l,+f);case ue:return l.name==f.name&&l.message==f.message;case Te:case Ue:return l==f+"";case de:var ie=xf;case qe:var ae=R&x;if(ie||(ie=Tl),l.size!=f.size&&!ae)return!1;var he=Z.get(l);if(he)return he==f;R|=m,Z.set(l,f);var ve=wS(ie(l),ie(f),R,M,V,Z);return Z.delete(l),ve;case De:if(qa)return qa.call(l)==qa.call(f)}return!1}function W4(l,f,g,R,M,V){var Z=g&x,ie=Wf(l),ae=ie.length,he=Wf(f),ve=he.length;if(ae!=ve&&!Z)return!1;for(var be=ae;be--;){var Ee=ie[be];if(!(Z?Ee in f:ft.call(f,Ee)))return!1}var Ne=V.get(l),Ae=V.get(f);if(Ne&&Ae)return Ne==f&&Ae==l;var $e=!0;V.set(l,f),V.set(f,l);for(var Me=Z;++be<ae;){Ee=ie[be];var Ge=l[Ee],Ze=f[Ee];if(R)var Wr=Z?R(Ze,Ge,Ee,f,l,V):R(Ge,Ze,Ee,l,f,V);if(!(Wr===r?Ge===Ze||M(Ge,Ze,g,R,V):Wr)){$e=!1;break}Me||(Me=Ee=="constructor")}if($e&&!Me){var mr=l.constructor,Ur=f.constructor;mr!=Ur&&"constructor"in l&&"constructor"in f&&!(typeof mr=="function"&&mr instanceof mr&&typeof Ur=="function"&&Ur instanceof Ur)&&($e=!1)}return V.delete(l),V.delete(f),$e}function Qn(l){return Qf(IS(l,r,jS),l+"")}function Wf(l){return FE(l,er,Yf)}function Uf(l){return FE(l,Pr,_S)}var Gf=$l?function(l){return $l.get(l)}:fp;function rc(l){for(var f=l.name+"",g=Po[f],R=ft.call(Po,f)?g.length:0;R--;){var M=g[R],V=M.func;if(V==null||V==l)return M.name}return f}function Do(l){var f=ft.call(F,"placeholder")?F:l;return f.placeholder}function Pe(){var l=F.iteratee||up;return l=l===up?VE:l,arguments.length?l(arguments[0],arguments[1]):l}function nc(l,f){var g=l.__data__;return Q4(f)?g[typeof f=="string"?"string":"hash"]:g.map}function Kf(l){for(var f=er(l),g=f.length;g--;){var R=f[g],M=l[R];f[g]=[R,M,OS(M)]}return f}function Xi(l,f){var g=r3(l,f);return HE(g)?g:r}function U4(l){var f=ft.call(l,Wi),g=l[Wi];try{l[Wi]=r;var R=!0}catch{}var M=Ml.call(l);return R&&(f?l[Wi]=g:delete l[Wi]),M}var Yf=_f?function(l){return l==null?[]:(l=gt(l),vi(_f(l),function(f){return RE.call(l,f)}))}:pp,_S=_f?function(l){for(var f=[];l;)gi(f,Yf(l)),l=ql(l);return f}:pp,ur=vr;(Ef&&ur(new Ef(new ArrayBuffer(1)))!=je||Ma&&ur(new Ma)!=de||Sf&&ur(Sf.resolve())!=we||To&&ur(new To)!=qe||Da&&ur(new Da)!=vt)&&(ur=function(l){var f=vr(l),g=f==le?l.constructor:r,R=g?Zi(g):"";if(R)switch(R){case R3:return je;case N3:return de;case T3:return we;case P3:return qe;case k3:return vt}return f});function G4(l,f,g){for(var R=-1,M=g.length;++R<M;){var V=g[R],Z=V.size;switch(V.type){case"drop":l+=Z;break;case"dropRight":f-=Z;break;case"take":f=cr(f,l+Z);break;case"takeRight":l=Kt(l,f-Z);break}}return{start:l,end:f}}function K4(l){var f=l.match($i);return f?f[1].split(Hd):[]}function ES(l,f,g){f=wi(f,l);for(var R=-1,M=f.length,V=!1;++R<M;){var Z=jn(f[R]);if(!(V=l!=null&&g(l,Z)))break;l=l[Z]}return V||++R!=M?V:(M=l==null?0:l.length,!!M&&uc(M)&&ei(Z,M)&&(ze(l)||Ji(l)))}function Y4(l){var f=l.length,g=new l.constructor(f);return f&&typeof l[0]=="string"&&ft.call(l,"index")&&(g.index=l.index,g.input=l.input),g}function SS(l){return typeof l.constructor=="function"&&!Va(l)?ko(ql(l)):{}}function X4(l,f,g){var R=l.constructor;switch(f){case We:return $f(l);case X:case ne:return new R(+l);case je:return A4(l,g);case Qe:case dt:case Qt:case Mt:case St:case Dt:case lr:case bn:case Or:return aS(l,g);case de:return new R;case xe:case Ue:return new R(l);case Te:return M4(l);case qe:return new R;case De:return D4(l)}}function Z4(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,`{
|
|
67
|
+
*/var Gie=Es.exports,bA;function Kie(){return bA||(bA=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,m=2,b=1,w=2,y=4,_=8,S=16,E=32,I=64,N=128,T=256,A=512,B=30,L="...",D=800,z=16,P=1,K=2,$=3,Y=1/0,U=9007199254740991,Q=17976931348623157e292,k=NaN,W=4294967295,J=W-1,ee=W>>>1,j=[["ary",N],["bind",b],["bindKey",w],["curry",_],["curryRight",S],["flip",A],["partial",E],["partialRight",I],["rearg",T]],G="[object Arguments]",H="[object Array]",q="[object AsyncFunction]",X="[object Boolean]",ne="[object Date]",te="[object DOMException]",ue="[object Error]",re="[object Function]",ge="[object GeneratorFunction]",de="[object Map]",xe="[object Number]",se="[object Null]",le="[object Object]",we="[object Promise]",Oe="[object Proxy]",Te="[object RegExp]",qe="[object Set]",Ue="[object String]",De="[object Symbol]",ot="[object Undefined]",vt="[object WeakMap]",Et="[object WeakSet]",We="[object ArrayBuffer]",je="[object DataView]",Qe="[object Float32Array]",dt="[object Float64Array]",Qt="[object Int8Array]",Mt="[object Int16Array]",St="[object Int32Array]",Dt="[object Uint8Array]",lr="[object Uint8ClampedArray]",bn="[object Uint16Array]",Or="[object Uint32Array]",Cr=/\b__p \+= '';/g,Be=/\b(__p \+=) '' \+/g,Xe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,et=/&(?:amp|lt|gt|quot|#39);/g,yt=/[&<>"']/g,Pt=RegExp(et.source),Ut=RegExp(yt.source),jt=/<%-([\s\S]+?)%>/g,Nt=/<%([\s\S]+?)%>/g,qt=/<%=([\s\S]+?)%>/g,Ir=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lt=/^\w*$/,rr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hr=/[\\^$.*+?()[\]{}|]/g,yn=RegExp(hr.source),Rr=/^\s+/,Br=/\s/,Kn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$i=/\{\n\/\* \[wrapped with (.+)\] \*/,Hd=/,? & /,Vd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Wd=/[()=,{}\[\]\/\s]/,Ud=/\\(\\)?/g,Gd=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vl=/\w*$/,Kd=/^[-+]0x[0-9a-f]+$/i,Yd=/^0b[01]+$/i,Xd=/^\[object .+?Constructor\]$/,Zd=/^0o[0-7]+$/i,Jd=/^(?:0|[1-9]\d*)$/,Qd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_o=/($^)/,gl=/['\n\r\u2028\u2029\\]/g,Eo="\\ud800-\\udfff",ef="\\u0300-\\u036f",tf="\\ufe20-\\ufe2f",ml="\\u20d0-\\u20ff",bl=ef+tf+ml,Na="\\u2700-\\u27bf",yl="a-z\\xdf-\\xf6\\xf8-\\xff",xl="\\xac\\xb1\\xd7\\xf7",rf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wl="\\u2000-\\u206f",nf=" \\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",Ta="\\ufe0e\\ufe0f",El=xl+rf+wl+nf,Pa="['’]",of="["+Eo+"]",Sl="["+El+"]",Hi="["+bl+"]",Ol="\\d+",So="["+Na+"]",Cl="["+yl+"]",Il="[^"+Eo+El+Ol+Na+yl+_l+"]",af="\\ud83c[\\udffb-\\udfff]",_F="(?:"+Hi+"|"+af+")",Q_="[^"+Eo+"]",sf="(?:\\ud83c[\\udde6-\\uddff]){2}",lf="[\\ud800-\\udbff][\\udc00-\\udfff]",Oo="["+_l+"]",eE="\\u200d",tE="(?:"+Cl+"|"+Il+")",EF="(?:"+Oo+"|"+Il+")",rE="(?:"+Pa+"(?:d|ll|m|re|s|t|ve))?",nE="(?:"+Pa+"(?:D|LL|M|RE|S|T|VE))?",iE=_F+"?",oE="["+Ta+"]?",SF="(?:"+eE+"(?:"+[Q_,sf,lf].join("|")+")"+oE+iE+")*",OF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",CF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",aE=oE+iE+SF,IF="(?:"+[So,sf,lf].join("|")+")"+aE,RF="(?:"+[Q_+Hi+"?",Hi,sf,lf,of].join("|")+")",NF=RegExp(Pa,"g"),TF=RegExp(Hi,"g"),cf=RegExp(af+"(?="+af+")|"+RF+aE,"g"),PF=RegExp([Oo+"?"+Cl+"+"+rE+"(?="+[Sl,Oo,"$"].join("|")+")",EF+"+"+nE+"(?="+[Sl,Oo+tE,"$"].join("|")+")",Oo+"?"+tE+"+"+rE,Oo+"+"+nE,CF,OF,Ol,IF].join("|"),"g"),kF=RegExp("["+eE+Eo+bl+Ta+"]"),AF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,MF=["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"],DF=-1,Ot={};Ot[Qe]=Ot[dt]=Ot[Qt]=Ot[Mt]=Ot[St]=Ot[Dt]=Ot[lr]=Ot[bn]=Ot[Or]=!0,Ot[G]=Ot[H]=Ot[We]=Ot[X]=Ot[je]=Ot[ne]=Ot[ue]=Ot[re]=Ot[de]=Ot[xe]=Ot[le]=Ot[Te]=Ot[qe]=Ot[Ue]=Ot[vt]=!1;var xt={};xt[G]=xt[H]=xt[We]=xt[je]=xt[X]=xt[ne]=xt[Qe]=xt[dt]=xt[Qt]=xt[Mt]=xt[St]=xt[de]=xt[xe]=xt[le]=xt[Te]=xt[qe]=xt[Ue]=xt[De]=xt[Dt]=xt[lr]=xt[bn]=xt[Or]=!0,xt[ue]=xt[re]=xt[vt]=!1;var jF={À:"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"},qF={"&":"&","<":"<",">":">",'"':""","'":"'"},LF={"&":"&","<":"<",">":">",""":'"',"'":"'"},zF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},BF=parseFloat,FF=parseInt,sE=typeof At=="object"&&At&&At.Object===Object&&At,$F=typeof self=="object"&&self&&self.Object===Object&&self,nr=sE||$F||Function("return this")(),uf=t&&!t.nodeType&&t,Vi=uf&&!0&&e&&!e.nodeType&&e,lE=Vi&&Vi.exports===uf,df=lE&&sE.process,Qr=(function(){try{var oe=Vi&&Vi.require&&Vi.require("util").types;return oe||df&&df.binding&&df.binding("util")}catch{}})(),cE=Qr&&Qr.isArrayBuffer,uE=Qr&&Qr.isDate,dE=Qr&&Qr.isMap,fE=Qr&&Qr.isRegExp,pE=Qr&&Qr.isSet,hE=Qr&&Qr.isTypedArray;function Fr(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 HF(oe,pe,ce,Ce){for(var Le=-1,rt=oe==null?0:oe.length;++Le<rt;){var Gt=oe[Le];pe(Ce,Gt,ce(Gt),oe)}return Ce}function en(oe,pe){for(var ce=-1,Ce=oe==null?0:oe.length;++ce<Ce&&pe(oe[ce],ce,oe)!==!1;);return oe}function VF(oe,pe){for(var ce=oe==null?0:oe.length;ce--&&pe(oe[ce],ce,oe)!==!1;);return oe}function vE(oe,pe){for(var ce=-1,Ce=oe==null?0:oe.length;++ce<Ce;)if(!pe(oe[ce],ce,oe))return!1;return!0}function vi(oe,pe){for(var ce=-1,Ce=oe==null?0:oe.length,Le=0,rt=[];++ce<Ce;){var Gt=oe[ce];pe(Gt,ce,oe)&&(rt[Le++]=Gt)}return rt}function Rl(oe,pe){var ce=oe==null?0:oe.length;return!!ce&&Co(oe,pe,0)>-1}function ff(oe,pe,ce){for(var Ce=-1,Le=oe==null?0:oe.length;++Ce<Le;)if(ce(pe,oe[Ce]))return!0;return!1}function It(oe,pe){for(var ce=-1,Ce=oe==null?0:oe.length,Le=Array(Ce);++ce<Ce;)Le[ce]=pe(oe[ce],ce,oe);return Le}function gi(oe,pe){for(var ce=-1,Ce=pe.length,Le=oe.length;++ce<Ce;)oe[Le+ce]=pe[ce];return oe}function pf(oe,pe,ce,Ce){var Le=-1,rt=oe==null?0:oe.length;for(Ce&&rt&&(ce=oe[++Le]);++Le<rt;)ce=pe(ce,oe[Le],Le,oe);return ce}function WF(oe,pe,ce,Ce){var Le=oe==null?0:oe.length;for(Ce&&Le&&(ce=oe[--Le]);Le--;)ce=pe(ce,oe[Le],Le,oe);return ce}function hf(oe,pe){for(var ce=-1,Ce=oe==null?0:oe.length;++ce<Ce;)if(pe(oe[ce],ce,oe))return!0;return!1}var UF=vf("length");function GF(oe){return oe.split("")}function KF(oe){return oe.match(Vd)||[]}function gE(oe,pe,ce){var Ce;return ce(oe,function(Le,rt,Gt){if(pe(Le,rt,Gt))return Ce=rt,!1}),Ce}function Nl(oe,pe,ce,Ce){for(var Le=oe.length,rt=ce+(Ce?1:-1);Ce?rt--:++rt<Le;)if(pe(oe[rt],rt,oe))return rt;return-1}function Co(oe,pe,ce){return pe===pe?a3(oe,pe,ce):Nl(oe,mE,ce)}function YF(oe,pe,ce,Ce){for(var Le=ce-1,rt=oe.length;++Le<rt;)if(Ce(oe[Le],pe))return Le;return-1}function mE(oe){return oe!==oe}function bE(oe,pe){var ce=oe==null?0:oe.length;return ce?mf(oe,pe)/ce:k}function vf(oe){return function(pe){return pe==null?r:pe[oe]}}function gf(oe){return function(pe){return oe==null?r:oe[pe]}}function yE(oe,pe,ce,Ce,Le){return Le(oe,function(rt,Gt,gt){ce=Ce?(Ce=!1,rt):pe(ce,rt,Gt,gt)}),ce}function XF(oe,pe){var ce=oe.length;for(oe.sort(pe);ce--;)oe[ce]=oe[ce].value;return oe}function mf(oe,pe){for(var ce,Ce=-1,Le=oe.length;++Ce<Le;){var rt=pe(oe[Ce]);rt!==r&&(ce=ce===r?rt:ce+rt)}return ce}function bf(oe,pe){for(var ce=-1,Ce=Array(oe);++ce<oe;)Ce[ce]=pe(ce);return Ce}function ZF(oe,pe){return It(pe,function(ce){return[ce,oe[ce]]})}function xE(oe){return oe&&oe.slice(0,SE(oe)+1).replace(Rr,"")}function $r(oe){return function(pe){return oe(pe)}}function yf(oe,pe){return It(pe,function(ce){return oe[ce]})}function ka(oe,pe){return oe.has(pe)}function wE(oe,pe){for(var ce=-1,Ce=oe.length;++ce<Ce&&Co(pe,oe[ce],0)>-1;);return ce}function _E(oe,pe){for(var ce=oe.length;ce--&&Co(pe,oe[ce],0)>-1;);return ce}function JF(oe,pe){for(var ce=oe.length,Ce=0;ce--;)oe[ce]===pe&&++Ce;return Ce}var QF=gf(jF),e3=gf(qF);function t3(oe){return"\\"+zF[oe]}function r3(oe,pe){return oe==null?r:oe[pe]}function Io(oe){return kF.test(oe)}function n3(oe){return AF.test(oe)}function i3(oe){for(var pe,ce=[];!(pe=oe.next()).done;)ce.push(pe.value);return ce}function xf(oe){var pe=-1,ce=Array(oe.size);return oe.forEach(function(Ce,Le){ce[++pe]=[Le,Ce]}),ce}function EE(oe,pe){return function(ce){return oe(pe(ce))}}function mi(oe,pe){for(var ce=-1,Ce=oe.length,Le=0,rt=[];++ce<Ce;){var Gt=oe[ce];(Gt===pe||Gt===d)&&(oe[ce]=d,rt[Le++]=ce)}return rt}function Tl(oe){var pe=-1,ce=Array(oe.size);return oe.forEach(function(Ce){ce[++pe]=Ce}),ce}function o3(oe){var pe=-1,ce=Array(oe.size);return oe.forEach(function(Ce){ce[++pe]=[Ce,Ce]}),ce}function a3(oe,pe,ce){for(var Ce=ce-1,Le=oe.length;++Ce<Le;)if(oe[Ce]===pe)return Ce;return-1}function s3(oe,pe,ce){for(var Ce=ce+1;Ce--;)if(oe[Ce]===pe)return Ce;return Ce}function Ro(oe){return Io(oe)?c3(oe):UF(oe)}function xn(oe){return Io(oe)?u3(oe):GF(oe)}function SE(oe){for(var pe=oe.length;pe--&&Br.test(oe.charAt(pe)););return pe}var l3=gf(LF);function c3(oe){for(var pe=cf.lastIndex=0;cf.test(oe);)++pe;return pe}function u3(oe){return oe.match(cf)||[]}function d3(oe){return oe.match(PF)||[]}var f3=(function oe(pe){pe=pe==null?nr:No.defaults(nr.Object(),pe,No.pick(nr,MF));var ce=pe.Array,Ce=pe.Date,Le=pe.Error,rt=pe.Function,Gt=pe.Math,gt=pe.Object,wf=pe.RegExp,p3=pe.String,tn=pe.TypeError,Pl=ce.prototype,h3=rt.prototype,To=gt.prototype,kl=pe["__core-js_shared__"],Al=h3.toString,ft=To.hasOwnProperty,v3=0,OE=(function(){var l=/[^.]+$/.exec(kl&&kl.keys&&kl.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Ml=To.toString,g3=Al.call(gt),m3=nr._,b3=wf("^"+Al.call(ft).replace(hr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dl=lE?pe.Buffer:r,bi=pe.Symbol,jl=pe.Uint8Array,CE=Dl?Dl.allocUnsafe:r,ql=EE(gt.getPrototypeOf,gt),IE=gt.create,RE=To.propertyIsEnumerable,Ll=Pl.splice,NE=bi?bi.isConcatSpreadable:r,Aa=bi?bi.iterator:r,Wi=bi?bi.toStringTag:r,zl=(function(){try{var l=Xi(gt,"defineProperty");return l({},"",{}),l}catch{}})(),y3=pe.clearTimeout!==nr.clearTimeout&&pe.clearTimeout,x3=Ce&&Ce.now!==nr.Date.now&&Ce.now,w3=pe.setTimeout!==nr.setTimeout&&pe.setTimeout,Bl=Gt.ceil,Fl=Gt.floor,_f=gt.getOwnPropertySymbols,_3=Dl?Dl.isBuffer:r,TE=pe.isFinite,E3=Pl.join,S3=EE(gt.keys,gt),Kt=Gt.max,cr=Gt.min,O3=Ce.now,C3=pe.parseInt,PE=Gt.random,I3=Pl.reverse,Ef=Xi(pe,"DataView"),Ma=Xi(pe,"Map"),Sf=Xi(pe,"Promise"),Po=Xi(pe,"Set"),Da=Xi(pe,"WeakMap"),ja=Xi(gt,"create"),$l=Da&&new Da,ko={},R3=Zi(Ef),N3=Zi(Ma),T3=Zi(Sf),P3=Zi(Po),k3=Zi(Da),Hl=bi?bi.prototype:r,qa=Hl?Hl.valueOf:r,kE=Hl?Hl.toString:r;function F(l){if(kt(l)&&!ze(l)&&!(l instanceof Ye)){if(l instanceof rn)return l;if(ft.call(l,"__wrapped__"))return AS(l)}return new rn(l)}var Ao=(function(){function l(){}return function(f){if(!Tt(f))return{};if(IE)return IE(f);l.prototype=f;var g=new l;return l.prototype=r,g}})();function Vl(){}function rn(l,f){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=r}F.templateSettings={escape:jt,evaluate:Nt,interpolate:qt,variable:"",imports:{_:F}},F.prototype=Vl.prototype,F.prototype.constructor=F,rn.prototype=Ao(Vl.prototype),rn.prototype.constructor=rn;function Ye(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=W,this.__views__=[]}function A3(){var l=new Ye(this.__wrapped__);return l.__actions__=Nr(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=Nr(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=Nr(this.__views__),l}function M3(){if(this.__filtered__){var l=new Ye(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function D3(){var l=this.__wrapped__.value(),f=this.__dir__,g=ze(l),R=f<0,M=g?l.length:0,V=G4(0,M,this.__views__),Z=V.start,ie=V.end,ae=ie-Z,he=R?ie:Z-1,ve=this.__iteratees__,be=ve.length,Ee=0,Ne=cr(ae,this.__takeCount__);if(!g||!R&&M==ae&&Ne==ae)return rS(l,this.__actions__);var Ae=[];e:for(;ae--&&Ee<Ne;){he+=f;for(var $e=-1,Me=l[he];++$e<be;){var Ge=ve[$e],Ze=Ge.iteratee,Wr=Ge.type,mr=Ze(Me);if(Wr==K)Me=mr;else if(!mr){if(Wr==P)continue e;break e}}Ae[Ee++]=Me}return Ae}Ye.prototype=Ao(Vl.prototype),Ye.prototype.constructor=Ye;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 j3(){this.__data__=ja?ja(null):{},this.size=0}function q3(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function L3(l){var f=this.__data__;if(ja){var g=f[l];return g===c?r:g}return ft.call(f,l)?f[l]:r}function z3(l){var f=this.__data__;return ja?f[l]!==r:ft.call(f,l)}function B3(l,f){var g=this.__data__;return this.size+=this.has(l)?0:1,g[l]=ja&&f===r?c:f,this}Ui.prototype.clear=j3,Ui.prototype.delete=q3,Ui.prototype.get=L3,Ui.prototype.has=z3,Ui.prototype.set=B3;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 F3(){this.__data__=[],this.size=0}function $3(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 H3(l){var f=this.__data__,g=Wl(f,l);return g<0?r:f[g][1]}function V3(l){return Wl(this.__data__,l)>-1}function W3(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=F3,Yn.prototype.delete=$3,Yn.prototype.get=H3,Yn.prototype.has=V3,Yn.prototype.set=W3;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 U3(){this.size=0,this.__data__={hash:new Ui,map:new(Ma||Yn),string:new Ui}}function G3(l){var f=nc(this,l).delete(l);return this.size-=f?1:0,f}function K3(l){return nc(this,l).get(l)}function Y3(l){return nc(this,l).has(l)}function X3(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=U3,Xn.prototype.delete=G3,Xn.prototype.get=K3,Xn.prototype.has=Y3,Xn.prototype.set=X3;function Gi(l){var f=-1,g=l==null?0:l.length;for(this.__data__=new Xn;++f<g;)this.add(l[f])}function Z3(l){return this.__data__.set(l,c),this}function J3(l){return this.__data__.has(l)}Gi.prototype.add=Gi.prototype.push=Z3,Gi.prototype.has=J3;function wn(l){var f=this.__data__=new Yn(l);this.size=f.size}function Q3(){this.__data__=new Yn,this.size=0}function e4(l){var f=this.__data__,g=f.delete(l);return this.size=f.size,g}function t4(l){return this.__data__.get(l)}function r4(l){return this.__data__.has(l)}function n4(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}wn.prototype.clear=Q3,wn.prototype.delete=e4,wn.prototype.get=t4,wn.prototype.has=r4,wn.prototype.set=n4;function AE(l,f){var g=ze(l),R=!g&&Ji(l),M=!g&&!R&&Ei(l),V=!g&&!R&&!M&&qo(l),Z=g||R||M||V,ie=Z?bf(l.length,p3):[],ae=ie.length;for(var he in l)(f||ft.call(l,he))&&!(Z&&(he=="length"||M&&(he=="offset"||he=="parent")||V&&(he=="buffer"||he=="byteLength"||he=="byteOffset")||ei(he,ae)))&&ie.push(he);return ie}function ME(l){var f=l.length;return f?l[Df(0,f-1)]:r}function i4(l,f){return ic(Nr(l),Ki(f,0,l.length))}function o4(l){return ic(Nr(l))}function Of(l,f,g){(g!==r&&!_n(l[f],g)||g===r&&!(f in l))&&Zn(l,f,g)}function La(l,f,g){var R=l[f];(!(ft.call(l,f)&&_n(R,g))||g===r&&!(f in l))&&Zn(l,f,g)}function Wl(l,f){for(var g=l.length;g--;)if(_n(l[g][0],f))return g;return-1}function a4(l,f,g,R){return yi(l,function(M,V,Z){f(R,M,g(M),Z)}),R}function DE(l,f){return l&&Dn(f,er(f),l)}function s4(l,f){return l&&Dn(f,Pr(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 Cf(l,f){for(var g=-1,R=f.length,M=ce(R),V=l==null;++g<R;)M[g]=V?r:ap(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 nn(l,f,g,R,M,V){var Z,ie=f&p,ae=f&v,he=f&h;if(g&&(Z=M?g(l,R,M,V):g(l)),Z!==r)return Z;if(!Tt(l))return l;var ve=ze(l);if(ve){if(Z=Y4(l),!ie)return Nr(l,Z)}else{var be=ur(l),Ee=be==re||be==ge;if(Ei(l))return oS(l,ie);if(be==le||be==G||Ee&&!M){if(Z=ae||Ee?{}:SS(l),!ie)return ae?L4(l,s4(Z,l)):q4(l,DE(Z,l))}else{if(!xt[be])return M?l:{};Z=X4(l,be,ie)}}V||(V=new wn);var Ne=V.get(l);if(Ne)return Ne;V.set(l,Z),QS(l)?l.forEach(function(Me){Z.add(nn(Me,f,g,Me,l,V))}):ZS(l)&&l.forEach(function(Me,Ge){Z.set(Ge,nn(Me,f,g,Ge,l,V))});var Ae=he?ae?Uf:Wf:ae?Pr:er,$e=ve?r:Ae(l);return en($e||l,function(Me,Ge){$e&&(Ge=Me,Me=l[Ge]),La(Z,Ge,nn(Me,f,g,Ge,l,V))}),Z}function l4(l){var f=er(l);return function(g){return jE(g,l,f)}}function jE(l,f,g){var R=g.length;if(l==null)return!R;for(l=gt(l);R--;){var M=g[R],V=f[M],Z=l[M];if(Z===r&&!(M in l)||!V(Z))return!1}return!0}function qE(l,f,g){if(typeof l!="function")throw new tn(a);return Wa(function(){l.apply(r,g)},f)}function za(l,f,g,R){var M=-1,V=Rl,Z=!0,ie=l.length,ae=[],he=f.length;if(!ie)return ae;g&&(f=It(f,$r(g))),R?(V=ff,Z=!1):f.length>=i&&(V=ka,Z=!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,Z&&be===be){for(var Ee=he;Ee--;)if(f[Ee]===be)continue e;ae.push(ve)}else V(f,be,R)||ae.push(ve)}return ae}var yi=uS(Mn),LE=uS(Rf,!0);function c4(l,f){var g=!0;return yi(l,function(R,M,V){return g=!!f(R,M,V),g}),g}function Ul(l,f,g){for(var R=-1,M=l.length;++R<M;){var V=l[R],Z=f(V);if(Z!=null&&(ie===r?Z===Z&&!Vr(Z):g(Z,ie)))var ie=Z,ae=V}return ae}function u4(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:tO(R);g<R;)l[g++]=f;return l}function zE(l,f){var g=[];return yi(l,function(R,M,V){f(R,M,V)&&g.push(R)}),g}function ir(l,f,g,R,M){var V=-1,Z=l.length;for(g||(g=J4),M||(M=[]);++V<Z;){var ie=l[V];f>0&&g(ie)?f>1?ir(ie,f-1,g,R,M):gi(M,ie):R||(M[M.length]=ie)}return M}var If=dS(),BE=dS(!0);function Mn(l,f){return l&&If(l,f,er)}function Rf(l,f){return l&&BE(l,f,er)}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 FE(l,f,g){var R=f(l);return ze(l)?R:gi(R,g(l))}function vr(l){return l==null?l===r?ot:se:Wi&&Wi in gt(l)?U4(l):o$(l)}function Nf(l,f){return l>f}function d4(l,f){return l!=null&&ft.call(l,f)}function f4(l,f){return l!=null&&f in gt(l)}function p4(l,f,g){return l>=cr(f,g)&&l<Kt(f,g)}function Tf(l,f,g){for(var R=g?ff:Rl,M=l[0].length,V=l.length,Z=V,ie=ce(V),ae=1/0,he=[];Z--;){var ve=l[Z];Z&&f&&(ve=It(ve,$r(f))),ae=cr(ve.length,ae),ie[Z]=!g&&(f||M>=120&&ve.length>=120)?new Gi(Z&&ve):r}ve=l[0];var be=-1,Ee=ie[0];e:for(;++be<M&&he.length<ae;){var Ne=ve[be],Ae=f?f(Ne):Ne;if(Ne=g||Ne!==0?Ne:0,!(Ee?ka(Ee,Ae):R(he,Ae,g))){for(Z=V;--Z;){var $e=ie[Z];if(!($e?ka($e,Ae):R(l[Z],Ae,g)))continue e}Ee&&Ee.push(Ae),he.push(Ne)}}return he}function h4(l,f,g,R){return Mn(l,function(M,V,Z){f(R,g(M),V,Z)}),R}function Ba(l,f,g){f=wi(f,l),l=RS(l,f);var R=l==null?l:l[jn(an(f))];return R==null?r:Fr(R,l,g)}function $E(l){return kt(l)&&vr(l)==G}function v4(l){return kt(l)&&vr(l)==We}function g4(l){return kt(l)&&vr(l)==ne}function Fa(l,f,g,R,M){return l===f?!0:l==null||f==null||!kt(l)&&!kt(f)?l!==l&&f!==f:m4(l,f,g,R,Fa,M)}function m4(l,f,g,R,M,V){var Z=ze(l),ie=ze(f),ae=Z?H:ur(l),he=ie?H:ur(f);ae=ae==G?le:ae,he=he==G?le:he;var ve=ae==le,be=he==le,Ee=ae==he;if(Ee&&Ei(l)){if(!Ei(f))return!1;Z=!0,ve=!1}if(Ee&&!ve)return V||(V=new wn),Z||qo(l)?wS(l,f,g,R,M,V):V4(l,f,ae,g,R,M,V);if(!(g&x)){var Ne=ve&&ft.call(l,"__wrapped__"),Ae=be&&ft.call(f,"__wrapped__");if(Ne||Ae){var $e=Ne?l.value():l,Me=Ae?f.value():f;return V||(V=new wn),M($e,Me,g,R,V)}}return Ee?(V||(V=new wn),W4(l,f,g,R,M,V)):!1}function b4(l){return kt(l)&&ur(l)==de}function Pf(l,f,g,R){var M=g.length,V=M,Z=!R;if(l==null)return!V;for(l=gt(l);M--;){var ie=g[M];if(Z&&ie[2]?ie[1]!==l[ie[0]]:!(ie[0]in l))return!1}for(;++M<V;){ie=g[M];var ae=ie[0],he=l[ae],ve=ie[1];if(Z&&ie[2]){if(he===r&&!(ae in l))return!1}else{var be=new wn;if(R)var Ee=R(he,ve,ae,l,f,be);if(!(Ee===r?Fa(ve,he,x|m,R,be):Ee))return!1}}return!0}function HE(l){if(!Tt(l)||e$(l))return!1;var f=ti(l)?b3:Xd;return f.test(Zi(l))}function y4(l){return kt(l)&&vr(l)==Te}function x4(l){return kt(l)&&ur(l)==qe}function w4(l){return kt(l)&&uc(l.length)&&!!Ot[vr(l)]}function VE(l){return typeof l=="function"?l:l==null?kr:typeof l=="object"?ze(l)?GE(l[0],l[1]):UE(l):fO(l)}function kf(l){if(!Va(l))return S3(l);var f=[];for(var g in gt(l))ft.call(l,g)&&g!="constructor"&&f.push(g);return f}function _4(l){if(!Tt(l))return i$(l);var f=Va(l),g=[];for(var R in l)R=="constructor"&&(f||!ft.call(l,R))||g.push(R);return g}function Af(l,f){return l<f}function WE(l,f){var g=-1,R=Tr(l)?ce(l.length):[];return yi(l,function(M,V,Z){R[++g]=f(M,V,Z)}),R}function UE(l){var f=Kf(l);return f.length==1&&f[0][2]?CS(f[0][0],f[0][1]):function(g){return g===l||Pf(g,l,f)}}function GE(l,f){return Xf(l)&&OS(f)?CS(jn(l),f):function(g){var R=ap(g,l);return R===r&&R===f?sp(g,l):Fa(f,R,x|m)}}function Kl(l,f,g,R,M){l!==f&&If(f,function(V,Z){if(M||(M=new wn),Tt(V))E4(l,f,Z,g,Kl,R,M);else{var ie=R?R(Jf(l,Z),V,Z+"",l,f,M):r;ie===r&&(ie=V),Of(l,Z,ie)}},Pr)}function E4(l,f,g,R,M,V,Z){var ie=Jf(l,g),ae=Jf(f,g),he=Z.get(ae);if(he){Of(l,g,he);return}var ve=V?V(ie,ae,g+"",l,f,Z):r,be=ve===r;if(be){var Ee=ze(ae),Ne=!Ee&&Ei(ae),Ae=!Ee&&!Ne&&qo(ae);ve=ae,Ee||Ne||Ae?ze(ie)?ve=ie:zt(ie)?ve=Nr(ie):Ne?(be=!1,ve=oS(ae,!0)):Ae?(be=!1,ve=aS(ae,!0)):ve=[]:Ua(ae)||Ji(ae)?(ve=ie,Ji(ie)?ve=rO(ie):(!Tt(ie)||ti(ie))&&(ve=SS(ae))):be=!1}be&&(Z.set(ae,ve),M(ve,ae,R,V,Z),Z.delete(ae)),Of(l,g,ve)}function KE(l,f){var g=l.length;if(g)return f+=f<0?g:0,ei(f,g)?l[f]:r}function YE(l,f,g){f.length?f=It(f,function(V){return ze(V)?function(Z){return Yi(Z,V.length===1?V[0]:V)}:V}):f=[kr];var R=-1;f=It(f,$r(Pe()));var M=WE(l,function(V,Z,ie){var ae=It(f,function(he){return he(V)});return{criteria:ae,index:++R,value:V}});return XF(M,function(V,Z){return j4(V,Z,g)})}function S4(l,f){return XE(l,f,function(g,R){return sp(l,R)})}function XE(l,f,g){for(var R=-1,M=f.length,V={};++R<M;){var Z=f[R],ie=Yi(l,Z);g(ie,Z)&&$a(V,wi(Z,l),ie)}return V}function O4(l){return function(f){return Yi(f,l)}}function Mf(l,f,g,R){var M=R?YF:Co,V=-1,Z=f.length,ie=l;for(l===f&&(f=Nr(f)),g&&(ie=It(l,$r(g)));++V<Z;)for(var ae=0,he=f[V],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 ZE(l,f){for(var g=l?f.length:0,R=g-1;g--;){var M=f[g];if(g==R||M!==V){var V=M;ei(M)?Ll.call(l,M,1):Lf(l,M)}}return l}function Df(l,f){return l+Fl(PE()*(f-l+1))}function C4(l,f,g,R){for(var M=-1,V=Kt(Bl((f-l)/(g||1)),0),Z=ce(V);V--;)Z[R?V:++M]=l,l+=g;return Z}function jf(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 Qf(IS(l,f,kr),l+"")}function I4(l){return ME(Lo(l))}function R4(l,f){var g=Lo(l);return ic(g,Ki(f,0,g.length))}function $a(l,f,g,R){if(!Tt(l))return l;f=wi(f,l);for(var M=-1,V=f.length,Z=V-1,ie=l;ie!=null&&++M<V;){var ae=jn(f[M]),he=g;if(ae==="__proto__"||ae==="constructor"||ae==="prototype")return l;if(M!=Z){var ve=ie[ae];he=R?R(ve,ae,ie):r,he===r&&(he=Tt(ve)?ve:ei(f[M+1])?[]:{})}La(ie,ae,he),ie=ie[ae]}return l}var JE=$l?function(l,f){return $l.set(l,f),l}:kr,N4=zl?function(l,f){return zl(l,"toString",{configurable:!0,enumerable:!1,value:cp(f),writable:!0})}:kr;function T4(l){return ic(Lo(l))}function on(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 V=ce(M);++R<M;)V[R]=l[R+f];return V}function P4(l,f){var g;return yi(l,function(R,M,V){return g=f(R,M,V),!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 V=R+M>>>1,Z=l[V];Z!==null&&!Vr(Z)&&(g?Z<=f:Z<f)?R=V+1:M=V}return M}return qf(l,f,kr,g)}function qf(l,f,g,R){var M=0,V=l==null?0:l.length;if(V===0)return 0;f=g(f);for(var Z=f!==f,ie=f===null,ae=Vr(f),he=f===r;M<V;){var ve=Fl((M+V)/2),be=g(l[ve]),Ee=be!==r,Ne=be===null,Ae=be===be,$e=Vr(be);if(Z)var Me=R||Ae;else he?Me=Ae&&(R||Ee):ie?Me=Ae&&Ee&&(R||!Ne):ae?Me=Ae&&Ee&&!Ne&&(R||!$e):Ne||$e?Me=!1:Me=R?be<=f:be<f;Me?M=ve+1:V=ve}return cr(V,J)}function QE(l,f){for(var g=-1,R=l.length,M=0,V=[];++g<R;){var Z=l[g],ie=f?f(Z):Z;if(!g||!_n(ie,ae)){var ae=ie;V[M++]=Z===0?0:Z}}return V}function eS(l){return typeof l=="number"?l:Vr(l)?k:+l}function Hr(l){if(typeof l=="string")return l;if(ze(l))return It(l,Hr)+"";if(Vr(l))return kE?kE.call(l):"";var f=l+"";return f=="0"&&1/l==-Y?"-0":f}function xi(l,f,g){var R=-1,M=Rl,V=l.length,Z=!0,ie=[],ae=ie;if(g)Z=!1,M=ff;else if(V>=i){var he=f?null:$4(l);if(he)return Tl(he);Z=!1,M=ka,ae=new Gi}else ae=f?[]:ie;e:for(;++R<V;){var ve=l[R],be=f?f(ve):ve;if(ve=g||ve!==0?ve:0,Z&&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 Lf(l,f){return f=wi(f,l),l=RS(l,f),l==null||delete l[jn(an(f))]}function tS(l,f,g,R){return $a(l,f,g(Yi(l,f)),R)}function Xl(l,f,g,R){for(var M=l.length,V=R?M:-1;(R?V--:++V<M)&&f(l[V],V,l););return g?on(l,R?0:V,R?V+1:M):on(l,R?V+1:0,R?M:V)}function rS(l,f){var g=l;return g instanceof Ye&&(g=g.value()),pf(f,function(R,M){return M.func.apply(M.thisArg,gi([R],M.args))},g)}function zf(l,f,g){var R=l.length;if(R<2)return R?xi(l[0]):[];for(var M=-1,V=ce(R);++M<R;)for(var Z=l[M],ie=-1;++ie<R;)ie!=M&&(V[M]=za(V[M]||Z,l[ie],f,g));return xi(ir(V,1),f,g)}function nS(l,f,g){for(var R=-1,M=l.length,V=f.length,Z={};++R<M;){var ie=R<V?f[R]:r;g(Z,l[R],ie)}return Z}function Bf(l){return zt(l)?l:[]}function Ff(l){return typeof l=="function"?l:kr}function wi(l,f){return ze(l)?l:Xf(l,f)?[l]:kS(at(l))}var k4=He;function _i(l,f,g){var R=l.length;return g=g===r?R:g,!f&&g>=R?l:on(l,f,g)}var iS=y3||function(l){return nr.clearTimeout(l)};function oS(l,f){if(f)return l.slice();var g=l.length,R=CE?CE(g):new l.constructor(g);return l.copy(R),R}function $f(l){var f=new l.constructor(l.byteLength);return new jl(f).set(new jl(l)),f}function A4(l,f){var g=f?$f(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function M4(l){var f=new l.constructor(l.source,vl.exec(l));return f.lastIndex=l.lastIndex,f}function D4(l){return qa?gt(qa.call(l)):{}}function aS(l,f){var g=f?$f(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function sS(l,f){if(l!==f){var g=l!==r,R=l===null,M=l===l,V=Vr(l),Z=f!==r,ie=f===null,ae=f===f,he=Vr(f);if(!ie&&!he&&!V&&l>f||V&&Z&&ae&&!ie&&!he||R&&Z&&ae||!g&&ae||!M)return 1;if(!R&&!V&&!he&&l<f||he&&g&&M&&!R&&!V||ie&&g&&M||!Z&&M||!ae)return-1}return 0}function j4(l,f,g){for(var R=-1,M=l.criteria,V=f.criteria,Z=M.length,ie=g.length;++R<Z;){var ae=sS(M[R],V[R]);if(ae){if(R>=ie)return ae;var he=g[R];return ae*(he=="desc"?-1:1)}}return l.index-f.index}function lS(l,f,g,R){for(var M=-1,V=l.length,Z=g.length,ie=-1,ae=f.length,he=Kt(V-Z,0),ve=ce(ae+he),be=!R;++ie<ae;)ve[ie]=f[ie];for(;++M<Z;)(be||M<V)&&(ve[g[M]]=l[M]);for(;he--;)ve[ie++]=l[M++];return ve}function cS(l,f,g,R){for(var M=-1,V=l.length,Z=-1,ie=g.length,ae=-1,he=f.length,ve=Kt(V-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(;++Z<ie;)(Ee||M<V)&&(be[Ne+g[Z]]=l[M++]);return be}function Nr(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 V=-1,Z=f.length;++V<Z;){var ie=f[V],ae=R?R(g[ie],l[ie],ie,g,l):r;ae===r&&(ae=l[ie]),M?Zn(g,ie,ae):La(g,ie,ae)}return g}function q4(l,f){return Dn(l,Yf(l),f)}function L4(l,f){return Dn(l,_S(l),f)}function Zl(l,f){return function(g,R){var M=ze(g)?HF:a4,V=f?f():{};return M(g,l,Pe(R,2),V)}}function Mo(l){return He(function(f,g){var R=-1,M=g.length,V=M>1?g[M-1]:r,Z=M>2?g[2]:r;for(V=l.length>3&&typeof V=="function"?(M--,V):r,Z&&gr(g[0],g[1],Z)&&(V=M<3?r:V,M=1),f=gt(f);++R<M;){var ie=g[R];ie&&l(f,ie,R,V)}return f})}function uS(l,f){return function(g,R){if(g==null)return g;if(!Tr(g))return l(g,R);for(var M=g.length,V=f?M:-1,Z=gt(g);(f?V--:++V<M)&&R(Z[V],V,Z)!==!1;);return g}}function dS(l){return function(f,g,R){for(var M=-1,V=gt(f),Z=R(f),ie=Z.length;ie--;){var ae=Z[l?ie:++M];if(g(V[ae],ae,V)===!1)break}return f}}function z4(l,f,g){var R=f&b,M=Ha(l);function V(){var Z=this&&this!==nr&&this instanceof V?M:l;return Z.apply(R?g:this,arguments)}return V}function fS(l){return function(f){f=at(f);var g=Io(f)?xn(f):r,R=g?g[0]:f.charAt(0),M=g?_i(g,1).join(""):f.slice(1);return R[l]()+M}}function Do(l){return function(f){return pf(uO(cO(f).replace(NF,"")),l,"")}}function Ha(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=Ao(l.prototype),R=l.apply(g,f);return Tt(R)?R:g}}function B4(l,f,g){var R=Ha(l);function M(){for(var V=arguments.length,Z=ce(V),ie=V,ae=jo(M);ie--;)Z[ie]=arguments[ie];var he=V<3&&Z[0]!==ae&&Z[V-1]!==ae?[]:mi(Z,ae);if(V-=he.length,V<g)return mS(l,f,Jl,M.placeholder,r,Z,he,r,r,g-V);var ve=this&&this!==nr&&this instanceof M?R:l;return Fr(ve,this,Z)}return M}function pS(l){return function(f,g,R){var M=gt(f);if(!Tr(f)){var V=Pe(g,3);f=er(f),g=function(ie){return V(M[ie],ie,M)}}var Z=l(f,g,R);return Z>-1?M[V?f[Z]:Z]:r}}function hS(l){return Qn(function(f){var g=f.length,R=g,M=rn.prototype.thru;for(l&&f.reverse();R--;){var V=f[R];if(typeof V!="function")throw new tn(a);if(M&&!Z&&rc(V)=="wrapper")var Z=new rn([],!0)}for(R=Z?R:g;++R<g;){V=f[R];var ie=rc(V),ae=ie=="wrapper"?Gf(V):r;ae&&Zf(ae[0])&&ae[1]==(N|_|E|T)&&!ae[4].length&&ae[9]==1?Z=Z[rc(ae[0])].apply(Z,ae[3]):Z=V.length==1&&Zf(V)?Z[ie]():Z.thru(V)}return function(){var he=arguments,ve=he[0];if(Z&&he.length==1&&ze(ve))return Z.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,V,Z,ie,ae,he){var ve=f&N,be=f&b,Ee=f&w,Ne=f&(_|S),Ae=f&A,$e=Ee?r:Ha(l);function Me(){for(var Ge=arguments.length,Ze=ce(Ge),Wr=Ge;Wr--;)Ze[Wr]=arguments[Wr];if(Ne)var mr=jo(Me),Ur=JF(Ze,mr);if(R&&(Ze=lS(Ze,R,M,Ne)),V&&(Ze=cS(Ze,V,Z,Ne)),Ge-=Ur,Ne&&Ge<he){var Bt=mi(Ze,mr);return mS(l,f,Jl,Me.placeholder,g,Ze,Bt,ie,ae,he-Ge)}var En=be?g:this,ni=Ee?En[l]:l;return Ge=Ze.length,ie?Ze=a$(Ze,ie):Ae&&Ge>1&&Ze.reverse(),ve&&ae<Ge&&(Ze.length=ae),this&&this!==nr&&this instanceof Me&&(ni=$e||Ha(ni)),ni.apply(En,Ze)}return Me}function vS(l,f){return function(g,R){return h4(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=Hr(g),R=Hr(R)):(g=eS(g),R=eS(R)),M=l(g,R)}return M}}function Hf(l){return Qn(function(f){return f=It(f,$r(Pe())),He(function(g){var R=this;return l(f,function(M){return Fr(M,R,g)})})})}function ec(l,f){f=f===r?" ":Hr(f);var g=f.length;if(g<2)return g?jf(f,l):f;var R=jf(f,Bl(l/Ro(f)));return Io(f)?_i(xn(R),0,l).join(""):R.slice(0,l)}function F4(l,f,g,R){var M=f&b,V=Ha(l);function Z(){for(var ie=-1,ae=arguments.length,he=-1,ve=R.length,be=ce(ve+ae),Ee=this&&this!==nr&&this instanceof Z?V:l;++he<ve;)be[he]=R[he];for(;ae--;)be[he++]=arguments[++ie];return Fr(Ee,M?g:this,be)}return Z}function gS(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),C4(f,g,R,l)}}function tc(l){return function(f,g){return typeof f=="string"&&typeof g=="string"||(f=sn(f),g=sn(g)),l(f,g)}}function mS(l,f,g,R,M,V,Z,ie,ae,he){var ve=f&_,be=ve?Z:r,Ee=ve?r:Z,Ne=ve?V:r,Ae=ve?r:V;f|=ve?E:I,f&=~(ve?I:E),f&y||(f&=-4);var $e=[l,f,M,Ne,be,Ae,Ee,ie,ae,he],Me=g.apply(r,$e);return Zf(l)&&NS(Me,$e),Me.placeholder=R,TS(Me,l,f)}function Vf(l){var f=Gt[l];return function(g,R){if(g=sn(g),R=R==null?0:cr(Fe(R),292),R&&TE(g)){var M=(at(g)+"e").split("e"),V=f(M[0]+"e"+(+M[1]+R));return M=(at(V)+"e").split("e"),+(M[0]+"e"+(+M[1]-R))}return f(g)}}var $4=Po&&1/Tl(new Po([,-0]))[1]==Y?function(l){return new Po(l)}:fp;function bS(l){return function(f){var g=ur(f);return g==de?xf(f):g==qe?o3(f):ZF(f,l(f))}}function Jn(l,f,g,R,M,V,Z,ie){var ae=f&w;if(!ae&&typeof l!="function")throw new tn(a);var he=R?R.length:0;if(he||(f&=-97,R=M=r),Z=Z===r?Z:Kt(Fe(Z),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:Gf(l),Ne=[l,f,g,R,M,ve,be,V,Z,ie];if(Ee&&n$(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:Kt(Ne[9]-he,0),!ie&&f&(_|S)&&(f&=-25),!f||f==b)var Ae=z4(l,f,g);else f==_||f==S?Ae=B4(l,f,ie):(f==E||f==(b|E))&&!M.length?Ae=F4(l,f,g,R):Ae=Jl.apply(r,Ne);var $e=Ee?JE:NS;return TS($e(Ae,Ne),l,f)}function yS(l,f,g,R){return l===r||_n(l,To[g])&&!ft.call(R,g)?f:l}function xS(l,f,g,R,M,V){return Tt(l)&&Tt(f)&&(V.set(f,l),Kl(l,f,r,xS,V),V.delete(f)),l}function H4(l){return Ua(l)?r:l}function wS(l,f,g,R,M,V){var Z=g&x,ie=l.length,ae=f.length;if(ie!=ae&&!(Z&&ae>ie))return!1;var he=V.get(l),ve=V.get(f);if(he&&ve)return he==f&&ve==l;var be=-1,Ee=!0,Ne=g&m?new Gi:r;for(V.set(l,f),V.set(f,l);++be<ie;){var Ae=l[be],$e=f[be];if(R)var Me=Z?R($e,Ae,be,f,l,V):R(Ae,$e,be,l,f,V);if(Me!==r){if(Me)continue;Ee=!1;break}if(Ne){if(!hf(f,function(Ge,Ze){if(!ka(Ne,Ze)&&(Ae===Ge||M(Ae,Ge,g,R,V)))return Ne.push(Ze)})){Ee=!1;break}}else if(!(Ae===$e||M(Ae,$e,g,R,V))){Ee=!1;break}}return V.delete(l),V.delete(f),Ee}function V4(l,f,g,R,M,V,Z){switch(g){case je:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case We:return!(l.byteLength!=f.byteLength||!V(new jl(l),new jl(f)));case X:case ne:case xe:return _n(+l,+f);case ue:return l.name==f.name&&l.message==f.message;case Te:case Ue:return l==f+"";case de:var ie=xf;case qe:var ae=R&x;if(ie||(ie=Tl),l.size!=f.size&&!ae)return!1;var he=Z.get(l);if(he)return he==f;R|=m,Z.set(l,f);var ve=wS(ie(l),ie(f),R,M,V,Z);return Z.delete(l),ve;case De:if(qa)return qa.call(l)==qa.call(f)}return!1}function W4(l,f,g,R,M,V){var Z=g&x,ie=Wf(l),ae=ie.length,he=Wf(f),ve=he.length;if(ae!=ve&&!Z)return!1;for(var be=ae;be--;){var Ee=ie[be];if(!(Z?Ee in f:ft.call(f,Ee)))return!1}var Ne=V.get(l),Ae=V.get(f);if(Ne&&Ae)return Ne==f&&Ae==l;var $e=!0;V.set(l,f),V.set(f,l);for(var Me=Z;++be<ae;){Ee=ie[be];var Ge=l[Ee],Ze=f[Ee];if(R)var Wr=Z?R(Ze,Ge,Ee,f,l,V):R(Ge,Ze,Ee,l,f,V);if(!(Wr===r?Ge===Ze||M(Ge,Ze,g,R,V):Wr)){$e=!1;break}Me||(Me=Ee=="constructor")}if($e&&!Me){var mr=l.constructor,Ur=f.constructor;mr!=Ur&&"constructor"in l&&"constructor"in f&&!(typeof mr=="function"&&mr instanceof mr&&typeof Ur=="function"&&Ur instanceof Ur)&&($e=!1)}return V.delete(l),V.delete(f),$e}function Qn(l){return Qf(IS(l,r,jS),l+"")}function Wf(l){return FE(l,er,Yf)}function Uf(l){return FE(l,Pr,_S)}var Gf=$l?function(l){return $l.get(l)}:fp;function rc(l){for(var f=l.name+"",g=ko[f],R=ft.call(ko,f)?g.length:0;R--;){var M=g[R],V=M.func;if(V==null||V==l)return M.name}return f}function jo(l){var f=ft.call(F,"placeholder")?F:l;return f.placeholder}function Pe(){var l=F.iteratee||up;return l=l===up?VE:l,arguments.length?l(arguments[0],arguments[1]):l}function nc(l,f){var g=l.__data__;return Q4(f)?g[typeof f=="string"?"string":"hash"]:g.map}function Kf(l){for(var f=er(l),g=f.length;g--;){var R=f[g],M=l[R];f[g]=[R,M,OS(M)]}return f}function Xi(l,f){var g=r3(l,f);return HE(g)?g:r}function U4(l){var f=ft.call(l,Wi),g=l[Wi];try{l[Wi]=r;var R=!0}catch{}var M=Ml.call(l);return R&&(f?l[Wi]=g:delete l[Wi]),M}var Yf=_f?function(l){return l==null?[]:(l=gt(l),vi(_f(l),function(f){return RE.call(l,f)}))}:pp,_S=_f?function(l){for(var f=[];l;)gi(f,Yf(l)),l=ql(l);return f}:pp,ur=vr;(Ef&&ur(new Ef(new ArrayBuffer(1)))!=je||Ma&&ur(new Ma)!=de||Sf&&ur(Sf.resolve())!=we||Po&&ur(new Po)!=qe||Da&&ur(new Da)!=vt)&&(ur=function(l){var f=vr(l),g=f==le?l.constructor:r,R=g?Zi(g):"";if(R)switch(R){case R3:return je;case N3:return de;case T3:return we;case P3:return qe;case k3:return vt}return f});function G4(l,f,g){for(var R=-1,M=g.length;++R<M;){var V=g[R],Z=V.size;switch(V.type){case"drop":l+=Z;break;case"dropRight":f-=Z;break;case"take":f=cr(f,l+Z);break;case"takeRight":l=Kt(l,f-Z);break}}return{start:l,end:f}}function K4(l){var f=l.match($i);return f?f[1].split(Hd):[]}function ES(l,f,g){f=wi(f,l);for(var R=-1,M=f.length,V=!1;++R<M;){var Z=jn(f[R]);if(!(V=l!=null&&g(l,Z)))break;l=l[Z]}return V||++R!=M?V:(M=l==null?0:l.length,!!M&&uc(M)&&ei(Z,M)&&(ze(l)||Ji(l)))}function Y4(l){var f=l.length,g=new l.constructor(f);return f&&typeof l[0]=="string"&&ft.call(l,"index")&&(g.index=l.index,g.input=l.input),g}function SS(l){return typeof l.constructor=="function"&&!Va(l)?Ao(ql(l)):{}}function X4(l,f,g){var R=l.constructor;switch(f){case We:return $f(l);case X:case ne:return new R(+l);case je:return A4(l,g);case Qe:case dt:case Qt:case Mt:case St:case Dt:case lr:case bn:case Or:return aS(l,g);case de:return new R;case xe:case Ue:return new R(l);case Te:return M4(l);case qe:return new R;case De:return D4(l)}}function Z4(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
68
|
/* [wrapped with `+f+`] */
|
|
69
|
-
`)}function J4(l){return ze(l)||Ji(l)||!!(NE&&l&&l[NE])}function ei(l,f){var g=typeof l;return f=f??U,!!f&&(g=="number"||g!="symbol"&&Jd.test(l))&&l>-1&&l%1==0&&l<f}function gr(l,f,g){if(!Tt(g))return!1;var R=typeof f;return(R=="number"?Tr(g)&&ei(f,g.length):R=="string"&&f in g)?_n(g[f],l):!1}function Xf(l,f){if(ze(l))return!1;var g=typeof l;return g=="number"||g=="symbol"||g=="boolean"||l==null||Vr(l)?!0:Lt.test(l)||!Ir.test(l)||f!=null&&l in gt(f)}function Q4(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function Zf(l){var f=rc(l),g=F[f];if(typeof g!="function"||!(f in Ye.prototype))return!1;if(l===g)return!0;var R=Gf(g);return!!R&&l===R[0]}function e$(l){return!!OE&&OE in l}var t$=kl?ti:hp;function Va(l){var f=l&&l.constructor,g=typeof f=="function"&&f.prototype||No;return l===g}function OS(l){return l===l&&!Tt(l)}function CS(l,f){return function(g){return g==null?!1:g[l]===f&&(f!==r||l in gt(g))}}function r$(l){var f=lc(l,function(R){return g.size===u&&g.clear(),R}),g=f.cache;return f}function n$(l,f){var g=l[1],R=f[1],M=g|R,V=M<(b|w|N),Z=R==N&&g==_||R==N&&g==T&&l[7].length<=f[8]||R==(N|T)&&f[7].length<=f[8]&&g==_;if(!(V||Z))return l;R&b&&(l[2]=f[2],M|=g&b?0:y);var ie=f[3];if(ie){var ae=l[3];l[3]=ae?lS(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?cS(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]:cr(l[8],f[8])),l[9]==null&&(l[9]=f[9]),l[0]=f[0],l[1]=M,l}function i$(l){var f=[];if(l!=null)for(var g in gt(l))f.push(g);return f}function o$(l){return Ml.call(l)}function IS(l,f,g){return f=Kt(f===r?l.length-1:f,0),function(){for(var R=arguments,M=-1,V=Kt(R.length-f,0),Z=ce(V);++M<V;)Z[M]=R[f+M];M=-1;for(var ie=ce(f+1);++M<f;)ie[M]=R[M];return ie[f]=g(Z),Fr(l,this,ie)}}function RS(l,f){return f.length<2?l:Yi(l,on(f,0,-1))}function a$(l,f){for(var g=l.length,R=cr(f.length,g),M=Nr(l);R--;){var V=f[R];l[R]=ei(V,g)?M[V]:r}return l}function Jf(l,f){if(!(f==="constructor"&&typeof l[f]=="function")&&f!="__proto__")return l[f]}var NS=PS(JE),Wa=w3||function(l,f){return nr.setTimeout(l,f)},Qf=PS(N4);function TS(l,f,g){var R=f+"";return Qf(l,Z4(R,s$(K4(R),g)))}function PS(l){var f=0,g=0;return function(){var R=O3(),M=z-(R-g);if(g=R,M>0){if(++f>=D)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 V=Df(g,M),Z=l[V];l[V]=l[g],l[g]=Z}return l.length=f,l}var kS=r$(function(l){var f=[];return l.charCodeAt(0)===46&&f.push(""),l.replace(rr,function(g,R,M,V){f.push(M?V.replace(Ud,"$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 Al.call(l)}catch{}try{return l+""}catch{}}return""}function s$(l,f){return en(j,function(g){var R="_."+g[0];f&g[1]&&!Rl(l,R)&&l.push(R)}),l.sort()}function AS(l){if(l instanceof Ye)return l.clone();var f=new rn(l.__wrapped__,l.__chain__);return f.__actions__=Nr(l.__actions__),f.__index__=l.__index__,f.__values__=l.__values__,f}function l$(l,f,g){(g?gr(l,f,g):f===r)?f=1:f=Kt(Fe(f),0);var R=l==null?0:l.length;if(!R||f<1)return[];for(var M=0,V=0,Z=ce(Bl(R/f));M<R;)Z[V++]=on(l,M,M+=f);return Z}function c$(l){for(var f=-1,g=l==null?0:l.length,R=0,M=[];++f<g;){var V=l[f];V&&(M[R++]=V)}return M}function u$(){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(ze(g)?Nr(g):[g],ir(f,1))}var d$=He(function(l,f){return zt(l)?za(l,ir(f,1,zt,!0)):[]}),f$=He(function(l,f){var g=an(f);return zt(g)&&(g=r),zt(l)?za(l,ir(f,1,zt,!0),Pe(g,2)):[]}),p$=He(function(l,f){var g=an(f);return zt(g)&&(g=r),zt(l)?za(l,ir(f,1,zt,!0),r,g):[]});function h$(l,f,g){var R=l==null?0:l.length;return R?(f=g||f===r?1:Fe(f),on(l,f<0?0:f,R)):[]}function v$(l,f,g){var R=l==null?0:l.length;return R?(f=g||f===r?1:Fe(f),f=R-f,on(l,0,f<0?0:f)):[]}function g$(l,f){return l&&l.length?Xl(l,Pe(f,3),!0,!0):[]}function m$(l,f){return l&&l.length?Xl(l,Pe(f,3),!0):[]}function b$(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),u4(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=Kt(R+M,0)),Nl(l,Pe(f,3),M)}function DS(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?Kt(R+M,0):cr(M,R-1)),Nl(l,Pe(f,3),M,!0)}function jS(l){var f=l==null?0:l.length;return f?ir(l,1):[]}function y$(l){var f=l==null?0:l.length;return f?ir(l,Y):[]}function x$(l,f){var g=l==null?0:l.length;return g?(f=f===r?1:Fe(f),ir(l,f)):[]}function w$(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 qS(l){return l&&l.length?l[0]:r}function _$(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=Kt(R+M,0)),Oo(l,f,M)}function E$(l){var f=l==null?0:l.length;return f?on(l,0,-1):[]}var S$=He(function(l){var f=It(l,Bf);return f.length&&f[0]===l[0]?Tf(f):[]}),O$=He(function(l){var f=an(l),g=It(l,Bf);return f===an(g)?f=r:g.pop(),g.length&&g[0]===l[0]?Tf(g,Pe(f,2)):[]}),C$=He(function(l){var f=an(l),g=It(l,Bf);return f=typeof f=="function"?f:r,f&&g.pop(),g.length&&g[0]===l[0]?Tf(g,r,f):[]});function I$(l,f){return l==null?"":E3.call(l,f)}function an(l){var f=l==null?0:l.length;return f?l[f-1]:r}function R$(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?Kt(R+M,0):cr(M,R-1)),f===f?s3(l,f,M):Nl(l,mE,M,!0)}function N$(l,f){return l&&l.length?KE(l,Fe(f)):r}var T$=He(LS);function LS(l,f){return l&&l.length&&f&&f.length?Mf(l,f):l}function P$(l,f,g){return l&&l.length&&f&&f.length?Mf(l,f,Pe(g,2)):l}function k$(l,f,g){return l&&l.length&&f&&f.length?Mf(l,f,r,g):l}var A$=Qn(function(l,f){var g=l==null?0:l.length,R=Cf(l,f);return ZE(l,It(f,function(M){return ei(M,g)?+M:M}).sort(sS)),R});function M$(l,f){var g=[];if(!(l&&l.length))return g;var R=-1,M=[],V=l.length;for(f=Pe(f,3);++R<V;){var Z=l[R];f(Z,R,l)&&(g.push(Z),M.push(R))}return ZE(l,M),g}function ep(l){return l==null?l:I3.call(l)}function D$(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)),on(l,f,g)):[]}function j$(l,f){return Yl(l,f)}function q$(l,f,g){return qf(l,f,Pe(g,2))}function L$(l,f){var g=l==null?0:l.length;if(g){var R=Yl(l,f);if(R<g&&_n(l[R],f))return R}return-1}function z$(l,f){return Yl(l,f,!0)}function B$(l,f,g){return qf(l,f,Pe(g,2),!0)}function F$(l,f){var g=l==null?0:l.length;if(g){var R=Yl(l,f,!0)-1;if(_n(l[R],f))return R}return-1}function $$(l){return l&&l.length?QE(l):[]}function H$(l,f){return l&&l.length?QE(l,Pe(f,2)):[]}function V$(l){var f=l==null?0:l.length;return f?on(l,1,f):[]}function W$(l,f,g){return l&&l.length?(f=g||f===r?1:Fe(f),on(l,0,f<0?0:f)):[]}function U$(l,f,g){var R=l==null?0:l.length;return R?(f=g||f===r?1:Fe(f),f=R-f,on(l,f<0?0:f,R)):[]}function G$(l,f){return l&&l.length?Xl(l,Pe(f,3),!1,!0):[]}function K$(l,f){return l&&l.length?Xl(l,Pe(f,3)):[]}var Y$=He(function(l){return xi(ir(l,1,zt,!0))}),X$=He(function(l){var f=an(l);return zt(f)&&(f=r),xi(ir(l,1,zt,!0),Pe(f,2))}),Z$=He(function(l){var f=an(l);return f=typeof f=="function"?f:r,xi(ir(l,1,zt,!0),r,f)});function J$(l){return l&&l.length?xi(l):[]}function Q$(l,f){return l&&l.length?xi(l,Pe(f,2)):[]}function e6(l,f){return f=typeof f=="function"?f:r,l&&l.length?xi(l,r,f):[]}function tp(l){if(!(l&&l.length))return[];var f=0;return l=vi(l,function(g){if(zt(g))return f=Kt(g.length,f),!0}),bf(f,function(g){return It(l,vf(g))})}function zS(l,f){if(!(l&&l.length))return[];var g=tp(l);return f==null?g:It(g,function(R){return Fr(f,r,R)})}var t6=He(function(l,f){return zt(l)?za(l,f):[]}),r6=He(function(l){return zf(vi(l,zt))}),n6=He(function(l){var f=an(l);return zt(f)&&(f=r),zf(vi(l,zt),Pe(f,2))}),i6=He(function(l){var f=an(l);return f=typeof f=="function"?f:r,zf(vi(l,zt),r,f)}),o6=He(tp);function a6(l,f){return nS(l||[],f||[],La)}function s6(l,f){return nS(l||[],f||[],$a)}var l6=He(function(l){var f=l.length,g=f>1?l[f-1]:r;return g=typeof g=="function"?(l.pop(),g):r,zS(l,g)});function BS(l){var f=F(l);return f.__chain__=!0,f}function c6(l,f){return f(l),l}function oc(l,f){return f(l)}var u6=Qn(function(l){var f=l.length,g=f?l[0]:0,R=this.__wrapped__,M=function(V){return Cf(V,l)};return f>1||this.__actions__.length||!(R instanceof Ye)||!ei(g)?this.thru(M):(R=R.slice(g,+g+(f?1:0)),R.__actions__.push({func:oc,args:[M],thisArg:r}),new rn(R,this.__chain__).thru(function(V){return f&&!V.length&&V.push(r),V}))});function d6(){return BS(this)}function f6(){return new rn(this.value(),this.__chain__)}function p6(){this.__values__===r&&(this.__values__=eO(this.value()));var l=this.__index__>=this.__values__.length,f=l?r:this.__values__[this.__index__++];return{done:l,value:f}}function h6(){return this}function v6(l){for(var f,g=this;g instanceof Vl;){var R=AS(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 g6(){var l=this.__wrapped__;if(l instanceof Ye){var f=l;return this.__actions__.length&&(f=new Ye(this)),f=f.reverse(),f.__actions__.push({func:oc,args:[ep],thisArg:r}),new rn(f,this.__chain__)}return this.thru(ep)}function m6(){return rS(this.__wrapped__,this.__actions__)}var b6=Zl(function(l,f,g){ft.call(l,g)?++l[g]:Zn(l,g,1)});function y6(l,f,g){var R=ze(l)?vE:c4;return g&&gr(l,f,g)&&(f=r),R(l,Pe(f,3))}function x6(l,f){var g=ze(l)?vi:zE;return g(l,Pe(f,3))}var w6=pS(MS),_6=pS(DS);function E6(l,f){return ir(ac(l,f),1)}function S6(l,f){return ir(ac(l,f),Y)}function O6(l,f,g){return g=g===r?1:Fe(g),ir(ac(l,f),g)}function FS(l,f){var g=ze(l)?en:yi;return g(l,Pe(f,3))}function $S(l,f){var g=ze(l)?VF:LE;return g(l,Pe(f,3))}var C6=Zl(function(l,f,g){ft.call(l,g)?l[g].push(f):Zn(l,g,[f])});function I6(l,f,g,R){l=Tr(l)?l:qo(l),g=g&&!R?Fe(g):0;var M=l.length;return g<0&&(g=Kt(M+g,0)),dc(l)?g<=M&&l.indexOf(f,g)>-1:!!M&&Oo(l,f,g)>-1}var R6=He(function(l,f,g){var R=-1,M=typeof f=="function",V=Tr(l)?ce(l.length):[];return yi(l,function(Z){V[++R]=M?Fr(f,Z,g):Ba(Z,f,g)}),V}),N6=Zl(function(l,f,g){Zn(l,g,f)});function ac(l,f){var g=ze(l)?It:WE;return g(l,Pe(f,3))}function T6(l,f,g,R){return l==null?[]:(ze(f)||(f=f==null?[]:[f]),g=R?r:g,ze(g)||(g=g==null?[]:[g]),YE(l,f,g))}var P6=Zl(function(l,f,g){l[g?0:1].push(f)},function(){return[[],[]]});function k6(l,f,g){var R=ze(l)?pf:yE,M=arguments.length<3;return R(l,Pe(f,4),g,M,yi)}function A6(l,f,g){var R=ze(l)?WF:yE,M=arguments.length<3;return R(l,Pe(f,4),g,M,LE)}function M6(l,f){var g=ze(l)?vi:zE;return g(l,cc(Pe(f,3)))}function D6(l){var f=ze(l)?ME:I4;return f(l)}function j6(l,f,g){(g?gr(l,f,g):f===r)?f=1:f=Fe(f);var R=ze(l)?i4:R4;return R(l,f)}function q6(l){var f=ze(l)?o4:T4;return f(l)}function L6(l){if(l==null)return 0;if(Tr(l))return dc(l)?Io(l):l.length;var f=ur(l);return f==de||f==qe?l.size:kf(l).length}function z6(l,f,g){var R=ze(l)?hf:P4;return g&&gr(l,f,g)&&(f=r),R(l,Pe(f,3))}var B6=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]]),YE(l,ir(f,1),[])}),sc=x3||function(){return nr.Date.now()};function F6(l,f){if(typeof f!="function")throw new tn(a);return l=Fe(l),function(){if(--l<1)return f.apply(this,arguments)}}function HS(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 tn(a);return l=Fe(l),function(){return--l>0&&(g=f.apply(this,arguments)),l<=1&&(f=r),g}}var rp=He(function(l,f,g){var R=b;if(g.length){var M=mi(g,Do(rp));R|=E}return Jn(l,R,f,g,M)}),WS=He(function(l,f,g){var R=b|w;if(g.length){var M=mi(g,Do(WS));R|=E}return Jn(f,R,l,g,M)});function US(l,f,g){f=g?r:f;var R=Jn(l,_,r,r,r,r,r,f);return R.placeholder=US.placeholder,R}function GS(l,f,g){f=g?r:f;var R=Jn(l,S,r,r,r,r,r,f);return R.placeholder=GS.placeholder,R}function KS(l,f,g){var R,M,V,Z,ie,ae,he=0,ve=!1,be=!1,Ee=!0;if(typeof l!="function")throw new tn(a);f=sn(f)||0,Tt(g)&&(ve=!!g.leading,be="maxWait"in g,V=be?Kt(sn(g.maxWait)||0,f):V,Ee="trailing"in g?!!g.trailing:Ee);function Ne(Bt){var En=R,ni=M;return R=M=r,he=Bt,Z=l.apply(ni,En),Z}function Ae(Bt){return he=Bt,ie=Wa(Ge,f),ve?Ne(Bt):Z}function $e(Bt){var En=Bt-ae,ni=Bt-he,pO=f-En;return be?cr(pO,V-ni):pO}function Me(Bt){var En=Bt-ae,ni=Bt-he;return ae===r||En>=f||En<0||be&&ni>=V}function Ge(){var Bt=sc();if(Me(Bt))return Ze(Bt);ie=Wa(Ge,$e(Bt))}function Ze(Bt){return ie=r,Ee&&R?Ne(Bt):(R=M=r,Z)}function Wr(){ie!==r&&iS(ie),he=0,R=ae=M=ie=r}function mr(){return ie===r?Z:Ze(sc())}function Ur(){var Bt=sc(),En=Me(Bt);if(R=arguments,M=this,ae=Bt,En){if(ie===r)return Ae(ae);if(be)return iS(ie),ie=Wa(Ge,f),Ne(ae)}return ie===r&&(ie=Wa(Ge,f)),Z}return Ur.cancel=Wr,Ur.flush=mr,Ur}var $6=He(function(l,f){return qE(l,1,f)}),H6=He(function(l,f,g){return qE(l,sn(f)||0,g)});function V6(l){return Jn(l,A)}function lc(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new tn(a);var g=function(){var R=arguments,M=f?f.apply(this,R):R[0],V=g.cache;if(V.has(M))return V.get(M);var Z=l.apply(this,R);return g.cache=V.set(M,Z)||V,Z};return g.cache=new(lc.Cache||Xn),g}lc.Cache=Xn;function cc(l){if(typeof l!="function")throw new tn(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 W6(l){return VS(2,l)}var U6=k4(function(l,f){f=f.length==1&&ze(f[0])?It(f[0],$r(Pe())):It(ir(f,1),$r(Pe()));var g=f.length;return He(function(R){for(var M=-1,V=cr(R.length,g);++M<V;)R[M]=f[M].call(this,R[M]);return Fr(l,this,R)})}),np=He(function(l,f){var g=mi(f,Do(np));return Jn(l,E,r,f,g)}),YS=He(function(l,f){var g=mi(f,Do(YS));return Jn(l,I,r,f,g)}),G6=Qn(function(l,f){return Jn(l,T,r,r,r,f)});function K6(l,f){if(typeof l!="function")throw new tn(a);return f=f===r?f:Fe(f),He(l,f)}function Y6(l,f){if(typeof l!="function")throw new tn(a);return f=f==null?0:Kt(Fe(f),0),He(function(g){var R=g[f],M=_i(g,0,f);return R&&gi(M,R),Fr(l,this,M)})}function X6(l,f,g){var R=!0,M=!0;if(typeof l!="function")throw new tn(a);return Tt(g)&&(R="leading"in g?!!g.leading:R,M="trailing"in g?!!g.trailing:M),KS(l,f,{leading:R,maxWait:f,trailing:M})}function Z6(l){return HS(l,1)}function J6(l,f){return np(Ff(f),l)}function Q6(){if(!arguments.length)return[];var l=arguments[0];return ze(l)?l:[l]}function eH(l){return nn(l,h)}function tH(l,f){return f=typeof f=="function"?f:r,nn(l,h,f)}function rH(l){return nn(l,p|h)}function nH(l,f){return f=typeof f=="function"?f:r,nn(l,p|h,f)}function iH(l,f){return f==null||jE(l,f,er(f))}function _n(l,f){return l===f||l!==l&&f!==f}var oH=tc(Nf),aH=tc(function(l,f){return l>=f}),Ji=$E((function(){return arguments})())?$E:function(l){return kt(l)&&ft.call(l,"callee")&&!RE.call(l,"callee")},ze=ce.isArray,sH=cE?$r(cE):v4;function Tr(l){return l!=null&&uc(l.length)&&!ti(l)}function zt(l){return kt(l)&&Tr(l)}function lH(l){return l===!0||l===!1||kt(l)&&vr(l)==X}var Ei=_3||hp,cH=uE?$r(uE):g4;function uH(l){return kt(l)&&l.nodeType===1&&!Ua(l)}function dH(l){if(l==null)return!0;if(Tr(l)&&(ze(l)||typeof l=="string"||typeof l.splice=="function"||Ei(l)||jo(l)||Ji(l)))return!l.length;var f=ur(l);if(f==de||f==qe)return!l.size;if(Va(l))return!kf(l).length;for(var g in l)if(ft.call(l,g))return!1;return!0}function fH(l,f){return Fa(l,f)}function pH(l,f,g){g=typeof g=="function"?g:r;var R=g?g(l,f):r;return R===r?Fa(l,f,r,g):!!R}function ip(l){if(!kt(l))return!1;var f=vr(l);return f==ue||f==te||typeof l.message=="string"&&typeof l.name=="string"&&!Ua(l)}function hH(l){return typeof l=="number"&&TE(l)}function ti(l){if(!Tt(l))return!1;var f=vr(l);return f==re||f==ge||f==q||f==Oe}function XS(l){return typeof l=="number"&&l==Fe(l)}function uc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=U}function Tt(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function kt(l){return l!=null&&typeof l=="object"}var ZS=dE?$r(dE):b4;function vH(l,f){return l===f||Pf(l,f,Kf(f))}function gH(l,f,g){return g=typeof g=="function"?g:r,Pf(l,f,Kf(f),g)}function mH(l){return JS(l)&&l!=+l}function bH(l){if(t$(l))throw new Le(o);return HE(l)}function yH(l){return l===null}function xH(l){return l==null}function JS(l){return typeof l=="number"||kt(l)&&vr(l)==xe}function Ua(l){if(!kt(l)||vr(l)!=le)return!1;var f=ql(l);if(f===null)return!0;var g=ft.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&Al.call(g)==g3}var op=fE?$r(fE):y4;function wH(l){return XS(l)&&l>=-U&&l<=U}var QS=pE?$r(pE):x4;function dc(l){return typeof l=="string"||!ze(l)&&kt(l)&&vr(l)==Ue}function Vr(l){return typeof l=="symbol"||kt(l)&&vr(l)==De}var jo=hE?$r(hE):w4;function _H(l){return l===r}function EH(l){return kt(l)&&ur(l)==vt}function SH(l){return kt(l)&&vr(l)==Et}var OH=tc(Af),CH=tc(function(l,f){return l<=f});function eO(l){if(!l)return[];if(Tr(l))return dc(l)?xn(l):Nr(l);if(Aa&&l[Aa])return i3(l[Aa]());var f=ur(l),g=f==de?xf:f==qe?Tl:qo;return g(l)}function ri(l){if(!l)return l===0?l:0;if(l=sn(l),l===Y||l===-Y){var f=l<0?-1:1;return f*Q}return l===l?l:0}function Fe(l){var f=ri(l),g=f%1;return f===f?g?f-g:f:0}function tO(l){return l?Ki(Fe(l),0,W):0}function sn(l){if(typeof l=="number")return l;if(Vr(l))return k;if(Tt(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=Tt(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=xE(l);var g=Yd.test(l);return g||Zd.test(l)?FF(l.slice(2),g?2:8):Kd.test(l)?k:+l}function rO(l){return Dn(l,Pr(l))}function IH(l){return l?Ki(Fe(l),-U,U):l===0?l:0}function at(l){return l==null?"":Hr(l)}var RH=Ao(function(l,f){if(Va(f)||Tr(f)){Dn(f,er(f),l);return}for(var g in f)ft.call(f,g)&&La(l,g,f[g])}),nO=Ao(function(l,f){Dn(f,Pr(f),l)}),fc=Ao(function(l,f,g,R){Dn(f,Pr(f),l,R)}),NH=Ao(function(l,f,g,R){Dn(f,er(f),l,R)}),TH=Qn(Cf);function PH(l,f){var g=ko(l);return f==null?g:DE(g,f)}var kH=He(function(l,f){l=gt(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 V=f[g],Z=Pr(V),ie=-1,ae=Z.length;++ie<ae;){var he=Z[ie],ve=l[he];(ve===r||_n(ve,No[he])&&!ft.call(l,he))&&(l[he]=V[he])}return l}),AH=He(function(l){return l.push(r,xS),Fr(iO,r,l)});function MH(l,f){return gE(l,Pe(f,3),Mn)}function DH(l,f){return gE(l,Pe(f,3),Rf)}function jH(l,f){return l==null?l:If(l,Pe(f,3),Pr)}function qH(l,f){return l==null?l:BE(l,Pe(f,3),Pr)}function LH(l,f){return l&&Mn(l,Pe(f,3))}function zH(l,f){return l&&Rf(l,Pe(f,3))}function BH(l){return l==null?[]:Gl(l,er(l))}function FH(l){return l==null?[]:Gl(l,Pr(l))}function ap(l,f,g){var R=l==null?r:Yi(l,f);return R===r?g:R}function $H(l,f){return l!=null&&ES(l,f,d4)}function sp(l,f){return l!=null&&ES(l,f,f4)}var HH=vS(function(l,f,g){f!=null&&typeof f.toString!="function"&&(f=Ml.call(f)),l[f]=g},cp(kr)),VH=vS(function(l,f,g){f!=null&&typeof f.toString!="function"&&(f=Ml.call(f)),ft.call(l,f)?l[f].push(g):l[f]=[g]},Pe),WH=He(Ba);function er(l){return Tr(l)?AE(l):kf(l)}function Pr(l){return Tr(l)?AE(l,!0):_4(l)}function UH(l,f){var g={};return f=Pe(f,3),Mn(l,function(R,M,V){Zn(g,f(R,M,V),R)}),g}function GH(l,f){var g={};return f=Pe(f,3),Mn(l,function(R,M,V){Zn(g,M,f(R,M,V))}),g}var KH=Ao(function(l,f,g){Kl(l,f,g)}),iO=Ao(function(l,f,g,R){Kl(l,f,g,R)}),YH=Qn(function(l,f){var g={};if(l==null)return g;var R=!1;f=It(f,function(V){return V=wi(V,l),R||(R=V.length>1),V}),Dn(l,Uf(l),g),R&&(g=nn(g,p|v|h,H4));for(var M=f.length;M--;)Lf(g,f[M]);return g});function XH(l,f){return oO(l,cc(Pe(f)))}var ZH=Qn(function(l,f){return l==null?{}:S4(l,f)});function oO(l,f){if(l==null)return{};var g=It(Uf(l),function(R){return[R]});return f=Pe(f),XE(l,g,function(R,M){return f(R,M[0])})}function JH(l,f,g){f=wi(f,l);var R=-1,M=f.length;for(M||(M=1,l=r);++R<M;){var V=l==null?r:l[jn(f[R])];V===r&&(R=M,V=g),l=ti(V)?V.call(l):V}return l}function QH(l,f,g){return l==null?l:$a(l,f,g)}function eV(l,f,g,R){return R=typeof R=="function"?R:r,l==null?l:$a(l,f,g,R)}var aO=bS(er),sO=bS(Pr);function tV(l,f,g){var R=ze(l),M=R||Ei(l)||jo(l);if(f=Pe(f,4),g==null){var V=l&&l.constructor;M?g=R?new V:[]:Tt(l)?g=ti(V)?ko(ql(l)):{}:g={}}return(M?en:Mn)(l,function(Z,ie,ae){return f(g,Z,ie,ae)}),g}function rV(l,f){return l==null?!0:Lf(l,f)}function nV(l,f,g){return l==null?l:tS(l,f,Ff(g))}function iV(l,f,g,R){return R=typeof R=="function"?R:r,l==null?l:tS(l,f,Ff(g),R)}function qo(l){return l==null?[]:yf(l,er(l))}function oV(l){return l==null?[]:yf(l,Pr(l))}function aV(l,f,g){return g===r&&(g=f,f=r),g!==r&&(g=sn(g),g=g===g?g:0),f!==r&&(f=sn(f),f=f===f?f:0),Ki(sn(l),f,g)}function sV(l,f,g){return f=ri(f),g===r?(g=f,f=0):g=ri(g),l=sn(l),p4(l,f,g)}function lV(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=PE();return cr(l+M*(f-l+BF("1e-"+((M+"").length-1))),f)}return Df(l,f)}var cV=Mo(function(l,f,g){return f=f.toLowerCase(),l+(g?lO(f):f)});function lO(l){return lp(at(l).toLowerCase())}function cO(l){return l=at(l),l&&l.replace(Qd,QF).replace(TF,"")}function uV(l,f,g){l=at(l),f=Hr(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 dV(l){return l=at(l),l&&Ut.test(l)?l.replace(yt,e3):l}function fV(l){return l=at(l),l&&yn.test(l)?l.replace(hr,"\\$&"):l}var pV=Mo(function(l,f,g){return l+(g?"-":"")+f.toLowerCase()}),hV=Mo(function(l,f,g){return l+(g?" ":"")+f.toLowerCase()}),vV=fS("toLowerCase");function gV(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 mV(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 bV(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 yV(l,f,g){return g||f==null?f=0:f&&(f=+f),C3(at(l).replace(Rr,""),f||0)}function xV(l,f,g){return(g?gr(l,f,g):f===r)?f=1:f=Fe(f),jf(at(l),f)}function wV(){var l=arguments,f=at(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var _V=Mo(function(l,f,g){return l+(g?"_":"")+f.toLowerCase()});function EV(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&&!op(f))&&(f=Hr(f),!f&&Co(l))?_i(xn(l),0,g):l.split(f,g)):[]}var SV=Mo(function(l,f,g){return l+(g?" ":"")+lp(f)});function OV(l,f,g){return l=at(l),g=g==null?0:Ki(Fe(g),0,l.length),f=Hr(f),l.slice(g,g+f.length)==f}function CV(l,f,g){var R=F.templateSettings;g&&gr(l,f,g)&&(f=r),l=at(l),f=fc({},f,R,yS);var M=fc({},f.imports,R.imports,yS),V=er(M),Z=yf(M,V),ie,ae,he=0,ve=f.interpolate||wo,be="__p += '",Ee=wf((f.escape||wo).source+"|"+ve.source+"|"+(ve===qt?Gd:wo).source+"|"+(f.evaluate||wo).source+"|$","g"),Ne="//# sourceURL="+(ft.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++DF+"]")+`
|
|
69
|
+
`)}function J4(l){return ze(l)||Ji(l)||!!(NE&&l&&l[NE])}function ei(l,f){var g=typeof l;return f=f??U,!!f&&(g=="number"||g!="symbol"&&Jd.test(l))&&l>-1&&l%1==0&&l<f}function gr(l,f,g){if(!Tt(g))return!1;var R=typeof f;return(R=="number"?Tr(g)&&ei(f,g.length):R=="string"&&f in g)?_n(g[f],l):!1}function Xf(l,f){if(ze(l))return!1;var g=typeof l;return g=="number"||g=="symbol"||g=="boolean"||l==null||Vr(l)?!0:Lt.test(l)||!Ir.test(l)||f!=null&&l in gt(f)}function Q4(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function Zf(l){var f=rc(l),g=F[f];if(typeof g!="function"||!(f in Ye.prototype))return!1;if(l===g)return!0;var R=Gf(g);return!!R&&l===R[0]}function e$(l){return!!OE&&OE in l}var t$=kl?ti:hp;function Va(l){var f=l&&l.constructor,g=typeof f=="function"&&f.prototype||To;return l===g}function OS(l){return l===l&&!Tt(l)}function CS(l,f){return function(g){return g==null?!1:g[l]===f&&(f!==r||l in gt(g))}}function r$(l){var f=lc(l,function(R){return g.size===u&&g.clear(),R}),g=f.cache;return f}function n$(l,f){var g=l[1],R=f[1],M=g|R,V=M<(b|w|N),Z=R==N&&g==_||R==N&&g==T&&l[7].length<=f[8]||R==(N|T)&&f[7].length<=f[8]&&g==_;if(!(V||Z))return l;R&b&&(l[2]=f[2],M|=g&b?0:y);var ie=f[3];if(ie){var ae=l[3];l[3]=ae?lS(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?cS(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]:cr(l[8],f[8])),l[9]==null&&(l[9]=f[9]),l[0]=f[0],l[1]=M,l}function i$(l){var f=[];if(l!=null)for(var g in gt(l))f.push(g);return f}function o$(l){return Ml.call(l)}function IS(l,f,g){return f=Kt(f===r?l.length-1:f,0),function(){for(var R=arguments,M=-1,V=Kt(R.length-f,0),Z=ce(V);++M<V;)Z[M]=R[f+M];M=-1;for(var ie=ce(f+1);++M<f;)ie[M]=R[M];return ie[f]=g(Z),Fr(l,this,ie)}}function RS(l,f){return f.length<2?l:Yi(l,on(f,0,-1))}function a$(l,f){for(var g=l.length,R=cr(f.length,g),M=Nr(l);R--;){var V=f[R];l[R]=ei(V,g)?M[V]:r}return l}function Jf(l,f){if(!(f==="constructor"&&typeof l[f]=="function")&&f!="__proto__")return l[f]}var NS=PS(JE),Wa=w3||function(l,f){return nr.setTimeout(l,f)},Qf=PS(N4);function TS(l,f,g){var R=f+"";return Qf(l,Z4(R,s$(K4(R),g)))}function PS(l){var f=0,g=0;return function(){var R=O3(),M=z-(R-g);if(g=R,M>0){if(++f>=D)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 V=Df(g,M),Z=l[V];l[V]=l[g],l[g]=Z}return l.length=f,l}var kS=r$(function(l){var f=[];return l.charCodeAt(0)===46&&f.push(""),l.replace(rr,function(g,R,M,V){f.push(M?V.replace(Ud,"$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 Al.call(l)}catch{}try{return l+""}catch{}}return""}function s$(l,f){return en(j,function(g){var R="_."+g[0];f&g[1]&&!Rl(l,R)&&l.push(R)}),l.sort()}function AS(l){if(l instanceof Ye)return l.clone();var f=new rn(l.__wrapped__,l.__chain__);return f.__actions__=Nr(l.__actions__),f.__index__=l.__index__,f.__values__=l.__values__,f}function l$(l,f,g){(g?gr(l,f,g):f===r)?f=1:f=Kt(Fe(f),0);var R=l==null?0:l.length;if(!R||f<1)return[];for(var M=0,V=0,Z=ce(Bl(R/f));M<R;)Z[V++]=on(l,M,M+=f);return Z}function c$(l){for(var f=-1,g=l==null?0:l.length,R=0,M=[];++f<g;){var V=l[f];V&&(M[R++]=V)}return M}function u$(){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(ze(g)?Nr(g):[g],ir(f,1))}var d$=He(function(l,f){return zt(l)?za(l,ir(f,1,zt,!0)):[]}),f$=He(function(l,f){var g=an(f);return zt(g)&&(g=r),zt(l)?za(l,ir(f,1,zt,!0),Pe(g,2)):[]}),p$=He(function(l,f){var g=an(f);return zt(g)&&(g=r),zt(l)?za(l,ir(f,1,zt,!0),r,g):[]});function h$(l,f,g){var R=l==null?0:l.length;return R?(f=g||f===r?1:Fe(f),on(l,f<0?0:f,R)):[]}function v$(l,f,g){var R=l==null?0:l.length;return R?(f=g||f===r?1:Fe(f),f=R-f,on(l,0,f<0?0:f)):[]}function g$(l,f){return l&&l.length?Xl(l,Pe(f,3),!0,!0):[]}function m$(l,f){return l&&l.length?Xl(l,Pe(f,3),!0):[]}function b$(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),u4(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=Kt(R+M,0)),Nl(l,Pe(f,3),M)}function DS(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?Kt(R+M,0):cr(M,R-1)),Nl(l,Pe(f,3),M,!0)}function jS(l){var f=l==null?0:l.length;return f?ir(l,1):[]}function y$(l){var f=l==null?0:l.length;return f?ir(l,Y):[]}function x$(l,f){var g=l==null?0:l.length;return g?(f=f===r?1:Fe(f),ir(l,f)):[]}function w$(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 qS(l){return l&&l.length?l[0]:r}function _$(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=Kt(R+M,0)),Co(l,f,M)}function E$(l){var f=l==null?0:l.length;return f?on(l,0,-1):[]}var S$=He(function(l){var f=It(l,Bf);return f.length&&f[0]===l[0]?Tf(f):[]}),O$=He(function(l){var f=an(l),g=It(l,Bf);return f===an(g)?f=r:g.pop(),g.length&&g[0]===l[0]?Tf(g,Pe(f,2)):[]}),C$=He(function(l){var f=an(l),g=It(l,Bf);return f=typeof f=="function"?f:r,f&&g.pop(),g.length&&g[0]===l[0]?Tf(g,r,f):[]});function I$(l,f){return l==null?"":E3.call(l,f)}function an(l){var f=l==null?0:l.length;return f?l[f-1]:r}function R$(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?Kt(R+M,0):cr(M,R-1)),f===f?s3(l,f,M):Nl(l,mE,M,!0)}function N$(l,f){return l&&l.length?KE(l,Fe(f)):r}var T$=He(LS);function LS(l,f){return l&&l.length&&f&&f.length?Mf(l,f):l}function P$(l,f,g){return l&&l.length&&f&&f.length?Mf(l,f,Pe(g,2)):l}function k$(l,f,g){return l&&l.length&&f&&f.length?Mf(l,f,r,g):l}var A$=Qn(function(l,f){var g=l==null?0:l.length,R=Cf(l,f);return ZE(l,It(f,function(M){return ei(M,g)?+M:M}).sort(sS)),R});function M$(l,f){var g=[];if(!(l&&l.length))return g;var R=-1,M=[],V=l.length;for(f=Pe(f,3);++R<V;){var Z=l[R];f(Z,R,l)&&(g.push(Z),M.push(R))}return ZE(l,M),g}function ep(l){return l==null?l:I3.call(l)}function D$(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)),on(l,f,g)):[]}function j$(l,f){return Yl(l,f)}function q$(l,f,g){return qf(l,f,Pe(g,2))}function L$(l,f){var g=l==null?0:l.length;if(g){var R=Yl(l,f);if(R<g&&_n(l[R],f))return R}return-1}function z$(l,f){return Yl(l,f,!0)}function B$(l,f,g){return qf(l,f,Pe(g,2),!0)}function F$(l,f){var g=l==null?0:l.length;if(g){var R=Yl(l,f,!0)-1;if(_n(l[R],f))return R}return-1}function $$(l){return l&&l.length?QE(l):[]}function H$(l,f){return l&&l.length?QE(l,Pe(f,2)):[]}function V$(l){var f=l==null?0:l.length;return f?on(l,1,f):[]}function W$(l,f,g){return l&&l.length?(f=g||f===r?1:Fe(f),on(l,0,f<0?0:f)):[]}function U$(l,f,g){var R=l==null?0:l.length;return R?(f=g||f===r?1:Fe(f),f=R-f,on(l,f<0?0:f,R)):[]}function G$(l,f){return l&&l.length?Xl(l,Pe(f,3),!1,!0):[]}function K$(l,f){return l&&l.length?Xl(l,Pe(f,3)):[]}var Y$=He(function(l){return xi(ir(l,1,zt,!0))}),X$=He(function(l){var f=an(l);return zt(f)&&(f=r),xi(ir(l,1,zt,!0),Pe(f,2))}),Z$=He(function(l){var f=an(l);return f=typeof f=="function"?f:r,xi(ir(l,1,zt,!0),r,f)});function J$(l){return l&&l.length?xi(l):[]}function Q$(l,f){return l&&l.length?xi(l,Pe(f,2)):[]}function e6(l,f){return f=typeof f=="function"?f:r,l&&l.length?xi(l,r,f):[]}function tp(l){if(!(l&&l.length))return[];var f=0;return l=vi(l,function(g){if(zt(g))return f=Kt(g.length,f),!0}),bf(f,function(g){return It(l,vf(g))})}function zS(l,f){if(!(l&&l.length))return[];var g=tp(l);return f==null?g:It(g,function(R){return Fr(f,r,R)})}var t6=He(function(l,f){return zt(l)?za(l,f):[]}),r6=He(function(l){return zf(vi(l,zt))}),n6=He(function(l){var f=an(l);return zt(f)&&(f=r),zf(vi(l,zt),Pe(f,2))}),i6=He(function(l){var f=an(l);return f=typeof f=="function"?f:r,zf(vi(l,zt),r,f)}),o6=He(tp);function a6(l,f){return nS(l||[],f||[],La)}function s6(l,f){return nS(l||[],f||[],$a)}var l6=He(function(l){var f=l.length,g=f>1?l[f-1]:r;return g=typeof g=="function"?(l.pop(),g):r,zS(l,g)});function BS(l){var f=F(l);return f.__chain__=!0,f}function c6(l,f){return f(l),l}function oc(l,f){return f(l)}var u6=Qn(function(l){var f=l.length,g=f?l[0]:0,R=this.__wrapped__,M=function(V){return Cf(V,l)};return f>1||this.__actions__.length||!(R instanceof Ye)||!ei(g)?this.thru(M):(R=R.slice(g,+g+(f?1:0)),R.__actions__.push({func:oc,args:[M],thisArg:r}),new rn(R,this.__chain__).thru(function(V){return f&&!V.length&&V.push(r),V}))});function d6(){return BS(this)}function f6(){return new rn(this.value(),this.__chain__)}function p6(){this.__values__===r&&(this.__values__=eO(this.value()));var l=this.__index__>=this.__values__.length,f=l?r:this.__values__[this.__index__++];return{done:l,value:f}}function h6(){return this}function v6(l){for(var f,g=this;g instanceof Vl;){var R=AS(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 g6(){var l=this.__wrapped__;if(l instanceof Ye){var f=l;return this.__actions__.length&&(f=new Ye(this)),f=f.reverse(),f.__actions__.push({func:oc,args:[ep],thisArg:r}),new rn(f,this.__chain__)}return this.thru(ep)}function m6(){return rS(this.__wrapped__,this.__actions__)}var b6=Zl(function(l,f,g){ft.call(l,g)?++l[g]:Zn(l,g,1)});function y6(l,f,g){var R=ze(l)?vE:c4;return g&&gr(l,f,g)&&(f=r),R(l,Pe(f,3))}function x6(l,f){var g=ze(l)?vi:zE;return g(l,Pe(f,3))}var w6=pS(MS),_6=pS(DS);function E6(l,f){return ir(ac(l,f),1)}function S6(l,f){return ir(ac(l,f),Y)}function O6(l,f,g){return g=g===r?1:Fe(g),ir(ac(l,f),g)}function FS(l,f){var g=ze(l)?en:yi;return g(l,Pe(f,3))}function $S(l,f){var g=ze(l)?VF:LE;return g(l,Pe(f,3))}var C6=Zl(function(l,f,g){ft.call(l,g)?l[g].push(f):Zn(l,g,[f])});function I6(l,f,g,R){l=Tr(l)?l:Lo(l),g=g&&!R?Fe(g):0;var M=l.length;return g<0&&(g=Kt(M+g,0)),dc(l)?g<=M&&l.indexOf(f,g)>-1:!!M&&Co(l,f,g)>-1}var R6=He(function(l,f,g){var R=-1,M=typeof f=="function",V=Tr(l)?ce(l.length):[];return yi(l,function(Z){V[++R]=M?Fr(f,Z,g):Ba(Z,f,g)}),V}),N6=Zl(function(l,f,g){Zn(l,g,f)});function ac(l,f){var g=ze(l)?It:WE;return g(l,Pe(f,3))}function T6(l,f,g,R){return l==null?[]:(ze(f)||(f=f==null?[]:[f]),g=R?r:g,ze(g)||(g=g==null?[]:[g]),YE(l,f,g))}var P6=Zl(function(l,f,g){l[g?0:1].push(f)},function(){return[[],[]]});function k6(l,f,g){var R=ze(l)?pf:yE,M=arguments.length<3;return R(l,Pe(f,4),g,M,yi)}function A6(l,f,g){var R=ze(l)?WF:yE,M=arguments.length<3;return R(l,Pe(f,4),g,M,LE)}function M6(l,f){var g=ze(l)?vi:zE;return g(l,cc(Pe(f,3)))}function D6(l){var f=ze(l)?ME:I4;return f(l)}function j6(l,f,g){(g?gr(l,f,g):f===r)?f=1:f=Fe(f);var R=ze(l)?i4:R4;return R(l,f)}function q6(l){var f=ze(l)?o4:T4;return f(l)}function L6(l){if(l==null)return 0;if(Tr(l))return dc(l)?Ro(l):l.length;var f=ur(l);return f==de||f==qe?l.size:kf(l).length}function z6(l,f,g){var R=ze(l)?hf:P4;return g&&gr(l,f,g)&&(f=r),R(l,Pe(f,3))}var B6=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]]),YE(l,ir(f,1),[])}),sc=x3||function(){return nr.Date.now()};function F6(l,f){if(typeof f!="function")throw new tn(a);return l=Fe(l),function(){if(--l<1)return f.apply(this,arguments)}}function HS(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 tn(a);return l=Fe(l),function(){return--l>0&&(g=f.apply(this,arguments)),l<=1&&(f=r),g}}var rp=He(function(l,f,g){var R=b;if(g.length){var M=mi(g,jo(rp));R|=E}return Jn(l,R,f,g,M)}),WS=He(function(l,f,g){var R=b|w;if(g.length){var M=mi(g,jo(WS));R|=E}return Jn(f,R,l,g,M)});function US(l,f,g){f=g?r:f;var R=Jn(l,_,r,r,r,r,r,f);return R.placeholder=US.placeholder,R}function GS(l,f,g){f=g?r:f;var R=Jn(l,S,r,r,r,r,r,f);return R.placeholder=GS.placeholder,R}function KS(l,f,g){var R,M,V,Z,ie,ae,he=0,ve=!1,be=!1,Ee=!0;if(typeof l!="function")throw new tn(a);f=sn(f)||0,Tt(g)&&(ve=!!g.leading,be="maxWait"in g,V=be?Kt(sn(g.maxWait)||0,f):V,Ee="trailing"in g?!!g.trailing:Ee);function Ne(Bt){var En=R,ni=M;return R=M=r,he=Bt,Z=l.apply(ni,En),Z}function Ae(Bt){return he=Bt,ie=Wa(Ge,f),ve?Ne(Bt):Z}function $e(Bt){var En=Bt-ae,ni=Bt-he,pO=f-En;return be?cr(pO,V-ni):pO}function Me(Bt){var En=Bt-ae,ni=Bt-he;return ae===r||En>=f||En<0||be&&ni>=V}function Ge(){var Bt=sc();if(Me(Bt))return Ze(Bt);ie=Wa(Ge,$e(Bt))}function Ze(Bt){return ie=r,Ee&&R?Ne(Bt):(R=M=r,Z)}function Wr(){ie!==r&&iS(ie),he=0,R=ae=M=ie=r}function mr(){return ie===r?Z:Ze(sc())}function Ur(){var Bt=sc(),En=Me(Bt);if(R=arguments,M=this,ae=Bt,En){if(ie===r)return Ae(ae);if(be)return iS(ie),ie=Wa(Ge,f),Ne(ae)}return ie===r&&(ie=Wa(Ge,f)),Z}return Ur.cancel=Wr,Ur.flush=mr,Ur}var $6=He(function(l,f){return qE(l,1,f)}),H6=He(function(l,f,g){return qE(l,sn(f)||0,g)});function V6(l){return Jn(l,A)}function lc(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new tn(a);var g=function(){var R=arguments,M=f?f.apply(this,R):R[0],V=g.cache;if(V.has(M))return V.get(M);var Z=l.apply(this,R);return g.cache=V.set(M,Z)||V,Z};return g.cache=new(lc.Cache||Xn),g}lc.Cache=Xn;function cc(l){if(typeof l!="function")throw new tn(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 W6(l){return VS(2,l)}var U6=k4(function(l,f){f=f.length==1&&ze(f[0])?It(f[0],$r(Pe())):It(ir(f,1),$r(Pe()));var g=f.length;return He(function(R){for(var M=-1,V=cr(R.length,g);++M<V;)R[M]=f[M].call(this,R[M]);return Fr(l,this,R)})}),np=He(function(l,f){var g=mi(f,jo(np));return Jn(l,E,r,f,g)}),YS=He(function(l,f){var g=mi(f,jo(YS));return Jn(l,I,r,f,g)}),G6=Qn(function(l,f){return Jn(l,T,r,r,r,f)});function K6(l,f){if(typeof l!="function")throw new tn(a);return f=f===r?f:Fe(f),He(l,f)}function Y6(l,f){if(typeof l!="function")throw new tn(a);return f=f==null?0:Kt(Fe(f),0),He(function(g){var R=g[f],M=_i(g,0,f);return R&&gi(M,R),Fr(l,this,M)})}function X6(l,f,g){var R=!0,M=!0;if(typeof l!="function")throw new tn(a);return Tt(g)&&(R="leading"in g?!!g.leading:R,M="trailing"in g?!!g.trailing:M),KS(l,f,{leading:R,maxWait:f,trailing:M})}function Z6(l){return HS(l,1)}function J6(l,f){return np(Ff(f),l)}function Q6(){if(!arguments.length)return[];var l=arguments[0];return ze(l)?l:[l]}function eH(l){return nn(l,h)}function tH(l,f){return f=typeof f=="function"?f:r,nn(l,h,f)}function rH(l){return nn(l,p|h)}function nH(l,f){return f=typeof f=="function"?f:r,nn(l,p|h,f)}function iH(l,f){return f==null||jE(l,f,er(f))}function _n(l,f){return l===f||l!==l&&f!==f}var oH=tc(Nf),aH=tc(function(l,f){return l>=f}),Ji=$E((function(){return arguments})())?$E:function(l){return kt(l)&&ft.call(l,"callee")&&!RE.call(l,"callee")},ze=ce.isArray,sH=cE?$r(cE):v4;function Tr(l){return l!=null&&uc(l.length)&&!ti(l)}function zt(l){return kt(l)&&Tr(l)}function lH(l){return l===!0||l===!1||kt(l)&&vr(l)==X}var Ei=_3||hp,cH=uE?$r(uE):g4;function uH(l){return kt(l)&&l.nodeType===1&&!Ua(l)}function dH(l){if(l==null)return!0;if(Tr(l)&&(ze(l)||typeof l=="string"||typeof l.splice=="function"||Ei(l)||qo(l)||Ji(l)))return!l.length;var f=ur(l);if(f==de||f==qe)return!l.size;if(Va(l))return!kf(l).length;for(var g in l)if(ft.call(l,g))return!1;return!0}function fH(l,f){return Fa(l,f)}function pH(l,f,g){g=typeof g=="function"?g:r;var R=g?g(l,f):r;return R===r?Fa(l,f,r,g):!!R}function ip(l){if(!kt(l))return!1;var f=vr(l);return f==ue||f==te||typeof l.message=="string"&&typeof l.name=="string"&&!Ua(l)}function hH(l){return typeof l=="number"&&TE(l)}function ti(l){if(!Tt(l))return!1;var f=vr(l);return f==re||f==ge||f==q||f==Oe}function XS(l){return typeof l=="number"&&l==Fe(l)}function uc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=U}function Tt(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function kt(l){return l!=null&&typeof l=="object"}var ZS=dE?$r(dE):b4;function vH(l,f){return l===f||Pf(l,f,Kf(f))}function gH(l,f,g){return g=typeof g=="function"?g:r,Pf(l,f,Kf(f),g)}function mH(l){return JS(l)&&l!=+l}function bH(l){if(t$(l))throw new Le(o);return HE(l)}function yH(l){return l===null}function xH(l){return l==null}function JS(l){return typeof l=="number"||kt(l)&&vr(l)==xe}function Ua(l){if(!kt(l)||vr(l)!=le)return!1;var f=ql(l);if(f===null)return!0;var g=ft.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&Al.call(g)==g3}var op=fE?$r(fE):y4;function wH(l){return XS(l)&&l>=-U&&l<=U}var QS=pE?$r(pE):x4;function dc(l){return typeof l=="string"||!ze(l)&&kt(l)&&vr(l)==Ue}function Vr(l){return typeof l=="symbol"||kt(l)&&vr(l)==De}var qo=hE?$r(hE):w4;function _H(l){return l===r}function EH(l){return kt(l)&&ur(l)==vt}function SH(l){return kt(l)&&vr(l)==Et}var OH=tc(Af),CH=tc(function(l,f){return l<=f});function eO(l){if(!l)return[];if(Tr(l))return dc(l)?xn(l):Nr(l);if(Aa&&l[Aa])return i3(l[Aa]());var f=ur(l),g=f==de?xf:f==qe?Tl:Lo;return g(l)}function ri(l){if(!l)return l===0?l:0;if(l=sn(l),l===Y||l===-Y){var f=l<0?-1:1;return f*Q}return l===l?l:0}function Fe(l){var f=ri(l),g=f%1;return f===f?g?f-g:f:0}function tO(l){return l?Ki(Fe(l),0,W):0}function sn(l){if(typeof l=="number")return l;if(Vr(l))return k;if(Tt(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=Tt(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=xE(l);var g=Yd.test(l);return g||Zd.test(l)?FF(l.slice(2),g?2:8):Kd.test(l)?k:+l}function rO(l){return Dn(l,Pr(l))}function IH(l){return l?Ki(Fe(l),-U,U):l===0?l:0}function at(l){return l==null?"":Hr(l)}var RH=Mo(function(l,f){if(Va(f)||Tr(f)){Dn(f,er(f),l);return}for(var g in f)ft.call(f,g)&&La(l,g,f[g])}),nO=Mo(function(l,f){Dn(f,Pr(f),l)}),fc=Mo(function(l,f,g,R){Dn(f,Pr(f),l,R)}),NH=Mo(function(l,f,g,R){Dn(f,er(f),l,R)}),TH=Qn(Cf);function PH(l,f){var g=Ao(l);return f==null?g:DE(g,f)}var kH=He(function(l,f){l=gt(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 V=f[g],Z=Pr(V),ie=-1,ae=Z.length;++ie<ae;){var he=Z[ie],ve=l[he];(ve===r||_n(ve,To[he])&&!ft.call(l,he))&&(l[he]=V[he])}return l}),AH=He(function(l){return l.push(r,xS),Fr(iO,r,l)});function MH(l,f){return gE(l,Pe(f,3),Mn)}function DH(l,f){return gE(l,Pe(f,3),Rf)}function jH(l,f){return l==null?l:If(l,Pe(f,3),Pr)}function qH(l,f){return l==null?l:BE(l,Pe(f,3),Pr)}function LH(l,f){return l&&Mn(l,Pe(f,3))}function zH(l,f){return l&&Rf(l,Pe(f,3))}function BH(l){return l==null?[]:Gl(l,er(l))}function FH(l){return l==null?[]:Gl(l,Pr(l))}function ap(l,f,g){var R=l==null?r:Yi(l,f);return R===r?g:R}function $H(l,f){return l!=null&&ES(l,f,d4)}function sp(l,f){return l!=null&&ES(l,f,f4)}var HH=vS(function(l,f,g){f!=null&&typeof f.toString!="function"&&(f=Ml.call(f)),l[f]=g},cp(kr)),VH=vS(function(l,f,g){f!=null&&typeof f.toString!="function"&&(f=Ml.call(f)),ft.call(l,f)?l[f].push(g):l[f]=[g]},Pe),WH=He(Ba);function er(l){return Tr(l)?AE(l):kf(l)}function Pr(l){return Tr(l)?AE(l,!0):_4(l)}function UH(l,f){var g={};return f=Pe(f,3),Mn(l,function(R,M,V){Zn(g,f(R,M,V),R)}),g}function GH(l,f){var g={};return f=Pe(f,3),Mn(l,function(R,M,V){Zn(g,M,f(R,M,V))}),g}var KH=Mo(function(l,f,g){Kl(l,f,g)}),iO=Mo(function(l,f,g,R){Kl(l,f,g,R)}),YH=Qn(function(l,f){var g={};if(l==null)return g;var R=!1;f=It(f,function(V){return V=wi(V,l),R||(R=V.length>1),V}),Dn(l,Uf(l),g),R&&(g=nn(g,p|v|h,H4));for(var M=f.length;M--;)Lf(g,f[M]);return g});function XH(l,f){return oO(l,cc(Pe(f)))}var ZH=Qn(function(l,f){return l==null?{}:S4(l,f)});function oO(l,f){if(l==null)return{};var g=It(Uf(l),function(R){return[R]});return f=Pe(f),XE(l,g,function(R,M){return f(R,M[0])})}function JH(l,f,g){f=wi(f,l);var R=-1,M=f.length;for(M||(M=1,l=r);++R<M;){var V=l==null?r:l[jn(f[R])];V===r&&(R=M,V=g),l=ti(V)?V.call(l):V}return l}function QH(l,f,g){return l==null?l:$a(l,f,g)}function eV(l,f,g,R){return R=typeof R=="function"?R:r,l==null?l:$a(l,f,g,R)}var aO=bS(er),sO=bS(Pr);function tV(l,f,g){var R=ze(l),M=R||Ei(l)||qo(l);if(f=Pe(f,4),g==null){var V=l&&l.constructor;M?g=R?new V:[]:Tt(l)?g=ti(V)?Ao(ql(l)):{}:g={}}return(M?en:Mn)(l,function(Z,ie,ae){return f(g,Z,ie,ae)}),g}function rV(l,f){return l==null?!0:Lf(l,f)}function nV(l,f,g){return l==null?l:tS(l,f,Ff(g))}function iV(l,f,g,R){return R=typeof R=="function"?R:r,l==null?l:tS(l,f,Ff(g),R)}function Lo(l){return l==null?[]:yf(l,er(l))}function oV(l){return l==null?[]:yf(l,Pr(l))}function aV(l,f,g){return g===r&&(g=f,f=r),g!==r&&(g=sn(g),g=g===g?g:0),f!==r&&(f=sn(f),f=f===f?f:0),Ki(sn(l),f,g)}function sV(l,f,g){return f=ri(f),g===r?(g=f,f=0):g=ri(g),l=sn(l),p4(l,f,g)}function lV(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=PE();return cr(l+M*(f-l+BF("1e-"+((M+"").length-1))),f)}return Df(l,f)}var cV=Do(function(l,f,g){return f=f.toLowerCase(),l+(g?lO(f):f)});function lO(l){return lp(at(l).toLowerCase())}function cO(l){return l=at(l),l&&l.replace(Qd,QF).replace(TF,"")}function uV(l,f,g){l=at(l),f=Hr(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 dV(l){return l=at(l),l&&Ut.test(l)?l.replace(yt,e3):l}function fV(l){return l=at(l),l&&yn.test(l)?l.replace(hr,"\\$&"):l}var pV=Do(function(l,f,g){return l+(g?"-":"")+f.toLowerCase()}),hV=Do(function(l,f,g){return l+(g?" ":"")+f.toLowerCase()}),vV=fS("toLowerCase");function gV(l,f,g){l=at(l),f=Fe(f);var R=f?Ro(l):0;if(!f||R>=f)return l;var M=(f-R)/2;return ec(Fl(M),g)+l+ec(Bl(M),g)}function mV(l,f,g){l=at(l),f=Fe(f);var R=f?Ro(l):0;return f&&R<f?l+ec(f-R,g):l}function bV(l,f,g){l=at(l),f=Fe(f);var R=f?Ro(l):0;return f&&R<f?ec(f-R,g)+l:l}function yV(l,f,g){return g||f==null?f=0:f&&(f=+f),C3(at(l).replace(Rr,""),f||0)}function xV(l,f,g){return(g?gr(l,f,g):f===r)?f=1:f=Fe(f),jf(at(l),f)}function wV(){var l=arguments,f=at(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var _V=Do(function(l,f,g){return l+(g?"_":"")+f.toLowerCase()});function EV(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&&!op(f))&&(f=Hr(f),!f&&Io(l))?_i(xn(l),0,g):l.split(f,g)):[]}var SV=Do(function(l,f,g){return l+(g?" ":"")+lp(f)});function OV(l,f,g){return l=at(l),g=g==null?0:Ki(Fe(g),0,l.length),f=Hr(f),l.slice(g,g+f.length)==f}function CV(l,f,g){var R=F.templateSettings;g&&gr(l,f,g)&&(f=r),l=at(l),f=fc({},f,R,yS);var M=fc({},f.imports,R.imports,yS),V=er(M),Z=yf(M,V),ie,ae,he=0,ve=f.interpolate||_o,be="__p += '",Ee=wf((f.escape||_o).source+"|"+ve.source+"|"+(ve===qt?Gd:_o).source+"|"+(f.evaluate||_o).source+"|$","g"),Ne="//# sourceURL="+(ft.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++DF+"]")+`
|
|
70
70
|
`;l.replace(Ee,function(Me,Ge,Ze,Wr,mr,Ur){return Ze||(Ze=Wr),be+=l.slice(he,Ur).replace(gl,t3),Ge&&(ie=!0,be+=`' +
|
|
71
71
|
__e(`+Ge+`) +
|
|
72
72
|
'`),mr&&(ae=!0,be+=`';
|
|
@@ -83,9 +83,9 @@ __p += '`),Ze&&(be+=`' +
|
|
|
83
83
|
function print() { __p += __j.call(arguments, '') }
|
|
84
84
|
`:`;
|
|
85
85
|
`)+be+`return __p
|
|
86
|
-
}`;var $e=dO(function(){return rt(V,Ne+"return "+be).apply(r,Z)});if($e.source=be,ip($e))throw $e;return $e}function IV(l){return at(l).toLowerCase()}function RV(l){return at(l).toUpperCase()}function NV(l,f,g){if(l=at(l),l&&(g||f===r))return xE(l);if(!l||!(f=Hr(f)))return l;var R=xn(l),M=xn(f),V=wE(R,M),Z=_E(R,M)+1;return _i(R,V,Z).join("")}function TV(l,f,g){if(l=at(l),l&&(g||f===r))return l.slice(0,SE(l)+1);if(!l||!(f=Hr(f)))return l;var R=xn(l),M=_E(R,xn(f))+1;return _i(R,0,M).join("")}function PV(l,f,g){if(l=at(l),l&&(g||f===r))return l.replace(Rr,"");if(!l||!(f=Hr(f)))return l;var R=xn(l),M=wE(R,xn(f));return _i(R,M).join("")}function kV(l,f){var g=B,R=L;if(Tt(f)){var M="separator"in f?f.separator:M;g="length"in f?Fe(f.length):g,R="omission"in f?Hr(f.omission):R}l=at(l);var V=l.length;if(Co(l)){var Z=xn(l);V=Z.length}if(g>=V)return l;var ie=g-Io(R);if(ie<1)return R;var ae=Z?_i(Z,0,ie).join(""):l.slice(0,ie);if(M===r)return ae+R;if(Z&&(ie+=ae.length-ie),op(M)){if(l.slice(ie).search(M)){var he,ve=ae;for(M.global||(M=wf(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(Hr(M),ie)!=ie){var Ee=ae.lastIndexOf(M);Ee>-1&&(ae=ae.slice(0,Ee))}return ae+R}function AV(l){return l=at(l),l&&Pt.test(l)?l.replace(et,l3):l}var MV=Mo(function(l,f,g){return l+(g?" ":"")+f.toUpperCase()}),lp=fS("toUpperCase");function uO(l,f,g){return l=at(l),f=g?r:f,f===r?n3(l)?d3(l):KF(l):l.match(f)||[]}var dO=He(function(l,f){try{return Fr(l,r,f)}catch(g){return ip(g)?g:new Le(g)}}),DV=Qn(function(l,f){return en(f,function(g){g=jn(g),Zn(l,g,rp(l[g],l))}),l});function jV(l){var f=l==null?0:l.length,g=Pe();return l=f?It(l,function(R){if(typeof R[1]!="function")throw new tn(a);return[g(R[0]),R[1]]}):[],He(function(R){for(var M=-1;++M<f;){var V=l[M];if(Fr(V[0],this,R))return Fr(V[1],this,R)}})}function qV(l){return l4(nn(l,p))}function cp(l){return function(){return l}}function LV(l,f){return l==null||l!==l?f:l}var zV=hS(),BV=hS(!0);function kr(l){return l}function up(l){return VE(typeof l=="function"?l:nn(l,p))}function FV(l){return UE(nn(l,p))}function $V(l,f){return GE(l,nn(f,p))}var HV=He(function(l,f){return function(g){return Ba(g,l,f)}}),VV=He(function(l,f){return function(g){return Ba(l,g,f)}});function dp(l,f,g){var R=er(f),M=Gl(f,R);g==null&&!(Tt(f)&&(M.length||!R.length))&&(g=f,f=l,l=this,M=Gl(f,er(f)));var V=!(Tt(g)&&"chain"in g)||!!g.chain,Z=ti(l);return en(M,function(ie){var ae=f[ie];l[ie]=ae,Z&&(l.prototype[ie]=function(){var he=this.__chain__;if(V||he){var ve=l(this.__wrapped__),be=ve.__actions__=Nr(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 WV(){return nr._===this&&(nr._=m3),this}function fp(){}function UV(l){return l=Fe(l),He(function(f){return KE(f,l)})}var GV=Hf(It),KV=Hf(vE),YV=Hf(hf);function fO(l){return Xf(l)?vf(jn(l)):O4(l)}function XV(l){return function(f){return l==null?r:Yi(l,f)}}var ZV=gS(),JV=gS(!0);function pp(){return[]}function hp(){return!1}function QV(){return{}}function eW(){return""}function tW(){return!0}function rW(l,f){if(l=Fe(l),l<1||l>U)return[];var g=W,R=cr(l,W);f=Pe(f),l-=W;for(var M=bf(R,f);++g<l;)f(g);return M}function nW(l){return ze(l)?It(l,jn):Vr(l)?[l]:Nr(kS(at(l)))}function iW(l){var f=++v3;return at(l)+f}var oW=Ql(function(l,f){return l+f},0),aW=Vf("ceil"),sW=Ql(function(l,f){return l/f},1),lW=Vf("floor");function cW(l){return l&&l.length?Ul(l,kr,Nf):r}function uW(l,f){return l&&l.length?Ul(l,Pe(f,2),Nf):r}function dW(l){return bE(l,kr)}function fW(l,f){return bE(l,Pe(f,2))}function pW(l){return l&&l.length?Ul(l,kr,Af):r}function hW(l,f){return l&&l.length?Ul(l,Pe(f,2),Af):r}var vW=Ql(function(l,f){return l*f},1),gW=Vf("round"),mW=Ql(function(l,f){return l-f},0);function bW(l){return l&&l.length?mf(l,kr):0}function yW(l,f){return l&&l.length?mf(l,Pe(f,2)):0}return F.after=F6,F.ary=HS,F.assign=RH,F.assignIn=nO,F.assignInWith=fc,F.assignWith=NH,F.at=TH,F.before=VS,F.bind=rp,F.bindAll=DV,F.bindKey=WS,F.castArray=Q6,F.chain=BS,F.chunk=l$,F.compact=c$,F.concat=u$,F.cond=jV,F.conforms=qV,F.constant=cp,F.countBy=b6,F.create=PH,F.curry=US,F.curryRight=GS,F.debounce=KS,F.defaults=kH,F.defaultsDeep=AH,F.defer=$6,F.delay=H6,F.difference=d$,F.differenceBy=f$,F.differenceWith=p$,F.drop=h$,F.dropRight=v$,F.dropRightWhile=g$,F.dropWhile=m$,F.fill=b$,F.filter=x6,F.flatMap=E6,F.flatMapDeep=S6,F.flatMapDepth=O6,F.flatten=jS,F.flattenDeep=y$,F.flattenDepth=x$,F.flip=V6,F.flow=zV,F.flowRight=BV,F.fromPairs=w$,F.functions=BH,F.functionsIn=FH,F.groupBy=C6,F.initial=E$,F.intersection=S$,F.intersectionBy=O$,F.intersectionWith=C$,F.invert=HH,F.invertBy=VH,F.invokeMap=R6,F.iteratee=up,F.keyBy=N6,F.keys=er,F.keysIn=Pr,F.map=ac,F.mapKeys=UH,F.mapValues=GH,F.matches=FV,F.matchesProperty=$V,F.memoize=lc,F.merge=KH,F.mergeWith=iO,F.method=HV,F.methodOf=VV,F.mixin=dp,F.negate=cc,F.nthArg=UV,F.omit=YH,F.omitBy=XH,F.once=W6,F.orderBy=T6,F.over=GV,F.overArgs=U6,F.overEvery=KV,F.overSome=YV,F.partial=np,F.partialRight=YS,F.partition=P6,F.pick=ZH,F.pickBy=oO,F.property=fO,F.propertyOf=XV,F.pull=T$,F.pullAll=LS,F.pullAllBy=P$,F.pullAllWith=k$,F.pullAt=A$,F.range=ZV,F.rangeRight=JV,F.rearg=G6,F.reject=M6,F.remove=M$,F.rest=K6,F.reverse=ep,F.sampleSize=j6,F.set=QH,F.setWith=eV,F.shuffle=q6,F.slice=D$,F.sortBy=B6,F.sortedUniq=$$,F.sortedUniqBy=H$,F.split=EV,F.spread=Y6,F.tail=V$,F.take=W$,F.takeRight=U$,F.takeRightWhile=G$,F.takeWhile=K$,F.tap=c6,F.throttle=X6,F.thru=oc,F.toArray=eO,F.toPairs=aO,F.toPairsIn=sO,F.toPath=nW,F.toPlainObject=rO,F.transform=tV,F.unary=Z6,F.union=Y$,F.unionBy=X$,F.unionWith=Z$,F.uniq=J$,F.uniqBy=Q$,F.uniqWith=e6,F.unset=rV,F.unzip=tp,F.unzipWith=zS,F.update=nV,F.updateWith=iV,F.values=qo,F.valuesIn=oV,F.without=t6,F.words=uO,F.wrap=J6,F.xor=r6,F.xorBy=n6,F.xorWith=i6,F.zip=o6,F.zipObject=a6,F.zipObjectDeep=s6,F.zipWith=l6,F.entries=aO,F.entriesIn=sO,F.extend=nO,F.extendWith=fc,dp(F,F),F.add=oW,F.attempt=dO,F.camelCase=cV,F.capitalize=lO,F.ceil=aW,F.clamp=aV,F.clone=eH,F.cloneDeep=rH,F.cloneDeepWith=nH,F.cloneWith=tH,F.conformsTo=iH,F.deburr=cO,F.defaultTo=LV,F.divide=sW,F.endsWith=uV,F.eq=_n,F.escape=dV,F.escapeRegExp=fV,F.every=y6,F.find=w6,F.findIndex=MS,F.findKey=MH,F.findLast=_6,F.findLastIndex=DS,F.findLastKey=DH,F.floor=lW,F.forEach=FS,F.forEachRight=$S,F.forIn=jH,F.forInRight=qH,F.forOwn=LH,F.forOwnRight=zH,F.get=ap,F.gt=oH,F.gte=aH,F.has=$H,F.hasIn=sp,F.head=qS,F.identity=kr,F.includes=I6,F.indexOf=_$,F.inRange=sV,F.invoke=WH,F.isArguments=Ji,F.isArray=ze,F.isArrayBuffer=sH,F.isArrayLike=Tr,F.isArrayLikeObject=zt,F.isBoolean=lH,F.isBuffer=Ei,F.isDate=cH,F.isElement=uH,F.isEmpty=dH,F.isEqual=fH,F.isEqualWith=pH,F.isError=ip,F.isFinite=hH,F.isFunction=ti,F.isInteger=XS,F.isLength=uc,F.isMap=ZS,F.isMatch=vH,F.isMatchWith=gH,F.isNaN=mH,F.isNative=bH,F.isNil=xH,F.isNull=yH,F.isNumber=JS,F.isObject=Tt,F.isObjectLike=kt,F.isPlainObject=Ua,F.isRegExp=op,F.isSafeInteger=wH,F.isSet=QS,F.isString=dc,F.isSymbol=Vr,F.isTypedArray=jo,F.isUndefined=_H,F.isWeakMap=EH,F.isWeakSet=SH,F.join=I$,F.kebabCase=pV,F.last=an,F.lastIndexOf=R$,F.lowerCase=hV,F.lowerFirst=vV,F.lt=OH,F.lte=CH,F.max=cW,F.maxBy=uW,F.mean=dW,F.meanBy=fW,F.min=pW,F.minBy=hW,F.stubArray=pp,F.stubFalse=hp,F.stubObject=QV,F.stubString=eW,F.stubTrue=tW,F.multiply=vW,F.nth=N$,F.noConflict=WV,F.noop=fp,F.now=sc,F.pad=gV,F.padEnd=mV,F.padStart=bV,F.parseInt=yV,F.random=lV,F.reduce=k6,F.reduceRight=A6,F.repeat=xV,F.replace=wV,F.result=JH,F.round=gW,F.runInContext=oe,F.sample=D6,F.size=L6,F.snakeCase=_V,F.some=z6,F.sortedIndex=j$,F.sortedIndexBy=q$,F.sortedIndexOf=L$,F.sortedLastIndex=z$,F.sortedLastIndexBy=B$,F.sortedLastIndexOf=F$,F.startCase=SV,F.startsWith=OV,F.subtract=mW,F.sum=bW,F.sumBy=yW,F.template=CV,F.times=rW,F.toFinite=ri,F.toInteger=Fe,F.toLength=tO,F.toLower=IV,F.toNumber=sn,F.toSafeInteger=IH,F.toString=at,F.toUpper=RV,F.trim=NV,F.trimEnd=TV,F.trimStart=PV,F.truncate=kV,F.unescape=AV,F.uniqueId=iW,F.upperCase=MV,F.upperFirst=lp,F.each=FS,F.eachRight=$S,F.first=qS,dp(F,(function(){var l={};return Mn(F,function(f,g){ft.call(F.prototype,g)||(l[g]=f)}),l})(),{chain:!1}),F.VERSION=n,en(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){F[l].placeholder=F}),en(["drop","take"],function(l,f){Ye.prototype[l]=function(g){g=g===r?1:Kt(Fe(g),0);var R=this.__filtered__&&!f?new Ye(this):this.clone();return R.__filtered__?R.__takeCount__=cr(g,R.__takeCount__):R.__views__.push({size:cr(g,W),type:l+(R.__dir__<0?"Right":"")}),R},Ye.prototype[l+"Right"]=function(g){return this.reverse()[l](g).reverse()}}),en(["filter","map","takeWhile"],function(l,f){var g=f+1,R=g==P||g==$;Ye.prototype[l]=function(M){var V=this.clone();return V.__iteratees__.push({iteratee:Pe(M,3),type:g}),V.__filtered__=V.__filtered__||R,V}}),en(["head","last"],function(l,f){var g="take"+(f?"Right":"");Ye.prototype[l]=function(){return this[g](1).value()[0]}}),en(["initial","tail"],function(l,f){var g="drop"+(f?"":"Right");Ye.prototype[l]=function(){return this.__filtered__?new Ye(this):this[g](1)}}),Ye.prototype.compact=function(){return this.filter(kr)},Ye.prototype.find=function(l){return this.filter(l).head()},Ye.prototype.findLast=function(l){return this.reverse().find(l)},Ye.prototype.invokeMap=He(function(l,f){return typeof l=="function"?new Ye(this):this.map(function(g){return Ba(g,l,f)})}),Ye.prototype.reject=function(l){return this.filter(cc(Pe(l)))},Ye.prototype.slice=function(l,f){l=Fe(l);var g=this;return g.__filtered__&&(l>0||f<0)?new Ye(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)},Ye.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Ye.prototype.toArray=function(){return this.take(W)},Mn(Ye.prototype,function(l,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),R=/^(?:head|last)$/.test(f),M=F[R?"take"+(f=="last"?"Right":""):f],V=R||/^find/.test(f);M&&(F.prototype[f]=function(){var Z=this.__wrapped__,ie=R?[1]:arguments,ae=Z instanceof Ye,he=ie[0],ve=ae||ze(Z),be=function(Ge){var Ze=M.apply(F,gi([Ge],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,Ae=V&&!Ee,$e=ae&&!Ne;if(!V&&ve){Z=$e?Z:new Ye(this);var Me=l.apply(Z,ie);return Me.__actions__.push({func:oc,args:[be],thisArg:r}),new rn(Me,Ee)}return Ae&&$e?l.apply(this,ie):(Me=this.thru(be),Ae?R?Me.value()[0]:Me.value():Me)})}),en(["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);F.prototype[l]=function(){var M=arguments;if(R&&!this.__chain__){var V=this.value();return f.apply(ze(V)?V:[],M)}return this[g](function(Z){return f.apply(ze(Z)?Z:[],M)})}}),Mn(Ye.prototype,function(l,f){var g=F[f];if(g){var R=g.name+"";ft.call(Po,R)||(Po[R]=[]),Po[R].push({name:f,func:g})}}),Po[Jl(r,w).name]=[{name:"wrapper",func:r}],Ye.prototype.clone=A3,Ye.prototype.reverse=M3,Ye.prototype.value=D3,F.prototype.at=u6,F.prototype.chain=d6,F.prototype.commit=f6,F.prototype.next=p6,F.prototype.plant=v6,F.prototype.reverse=g6,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=m6,F.prototype.first=F.prototype.head,Aa&&(F.prototype[Aa]=h6),F}),Ro=f3();Vi?((Vi.exports=Ro)._=Ro,uf._=Ro):nr._=Ro}).call(Gie)})(Es,Es.exports)),Es.exports}var ha=Kie();function Yie(){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,m)=>ha.isEqual(x,m)),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,m)=>{e(Je.setTabFlags({path:x,flags:m}))},openModal:async x=>await e(Je.openModal(x)).unwrap()}}}const hB=O.createContext(null),vB=({children:e,adapter:t})=>C.jsx(hB.Provider,{value:t,children:e});function pr(){const e=O.useContext(hB);if(!e)throw new Error("useEditorStateAdapter must be used within an EditorStateAdapterProvider");return e}var jw=function(e,t){return jw=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])},jw(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");jw(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function qw(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 Lw(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 zw(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 Vn(e){return typeof e=="function"}function gB(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 by=gB(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
86
|
+
}`;var $e=dO(function(){return rt(V,Ne+"return "+be).apply(r,Z)});if($e.source=be,ip($e))throw $e;return $e}function IV(l){return at(l).toLowerCase()}function RV(l){return at(l).toUpperCase()}function NV(l,f,g){if(l=at(l),l&&(g||f===r))return xE(l);if(!l||!(f=Hr(f)))return l;var R=xn(l),M=xn(f),V=wE(R,M),Z=_E(R,M)+1;return _i(R,V,Z).join("")}function TV(l,f,g){if(l=at(l),l&&(g||f===r))return l.slice(0,SE(l)+1);if(!l||!(f=Hr(f)))return l;var R=xn(l),M=_E(R,xn(f))+1;return _i(R,0,M).join("")}function PV(l,f,g){if(l=at(l),l&&(g||f===r))return l.replace(Rr,"");if(!l||!(f=Hr(f)))return l;var R=xn(l),M=wE(R,xn(f));return _i(R,M).join("")}function kV(l,f){var g=B,R=L;if(Tt(f)){var M="separator"in f?f.separator:M;g="length"in f?Fe(f.length):g,R="omission"in f?Hr(f.omission):R}l=at(l);var V=l.length;if(Io(l)){var Z=xn(l);V=Z.length}if(g>=V)return l;var ie=g-Ro(R);if(ie<1)return R;var ae=Z?_i(Z,0,ie).join(""):l.slice(0,ie);if(M===r)return ae+R;if(Z&&(ie+=ae.length-ie),op(M)){if(l.slice(ie).search(M)){var he,ve=ae;for(M.global||(M=wf(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(Hr(M),ie)!=ie){var Ee=ae.lastIndexOf(M);Ee>-1&&(ae=ae.slice(0,Ee))}return ae+R}function AV(l){return l=at(l),l&&Pt.test(l)?l.replace(et,l3):l}var MV=Do(function(l,f,g){return l+(g?" ":"")+f.toUpperCase()}),lp=fS("toUpperCase");function uO(l,f,g){return l=at(l),f=g?r:f,f===r?n3(l)?d3(l):KF(l):l.match(f)||[]}var dO=He(function(l,f){try{return Fr(l,r,f)}catch(g){return ip(g)?g:new Le(g)}}),DV=Qn(function(l,f){return en(f,function(g){g=jn(g),Zn(l,g,rp(l[g],l))}),l});function jV(l){var f=l==null?0:l.length,g=Pe();return l=f?It(l,function(R){if(typeof R[1]!="function")throw new tn(a);return[g(R[0]),R[1]]}):[],He(function(R){for(var M=-1;++M<f;){var V=l[M];if(Fr(V[0],this,R))return Fr(V[1],this,R)}})}function qV(l){return l4(nn(l,p))}function cp(l){return function(){return l}}function LV(l,f){return l==null||l!==l?f:l}var zV=hS(),BV=hS(!0);function kr(l){return l}function up(l){return VE(typeof l=="function"?l:nn(l,p))}function FV(l){return UE(nn(l,p))}function $V(l,f){return GE(l,nn(f,p))}var HV=He(function(l,f){return function(g){return Ba(g,l,f)}}),VV=He(function(l,f){return function(g){return Ba(l,g,f)}});function dp(l,f,g){var R=er(f),M=Gl(f,R);g==null&&!(Tt(f)&&(M.length||!R.length))&&(g=f,f=l,l=this,M=Gl(f,er(f)));var V=!(Tt(g)&&"chain"in g)||!!g.chain,Z=ti(l);return en(M,function(ie){var ae=f[ie];l[ie]=ae,Z&&(l.prototype[ie]=function(){var he=this.__chain__;if(V||he){var ve=l(this.__wrapped__),be=ve.__actions__=Nr(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 WV(){return nr._===this&&(nr._=m3),this}function fp(){}function UV(l){return l=Fe(l),He(function(f){return KE(f,l)})}var GV=Hf(It),KV=Hf(vE),YV=Hf(hf);function fO(l){return Xf(l)?vf(jn(l)):O4(l)}function XV(l){return function(f){return l==null?r:Yi(l,f)}}var ZV=gS(),JV=gS(!0);function pp(){return[]}function hp(){return!1}function QV(){return{}}function eW(){return""}function tW(){return!0}function rW(l,f){if(l=Fe(l),l<1||l>U)return[];var g=W,R=cr(l,W);f=Pe(f),l-=W;for(var M=bf(R,f);++g<l;)f(g);return M}function nW(l){return ze(l)?It(l,jn):Vr(l)?[l]:Nr(kS(at(l)))}function iW(l){var f=++v3;return at(l)+f}var oW=Ql(function(l,f){return l+f},0),aW=Vf("ceil"),sW=Ql(function(l,f){return l/f},1),lW=Vf("floor");function cW(l){return l&&l.length?Ul(l,kr,Nf):r}function uW(l,f){return l&&l.length?Ul(l,Pe(f,2),Nf):r}function dW(l){return bE(l,kr)}function fW(l,f){return bE(l,Pe(f,2))}function pW(l){return l&&l.length?Ul(l,kr,Af):r}function hW(l,f){return l&&l.length?Ul(l,Pe(f,2),Af):r}var vW=Ql(function(l,f){return l*f},1),gW=Vf("round"),mW=Ql(function(l,f){return l-f},0);function bW(l){return l&&l.length?mf(l,kr):0}function yW(l,f){return l&&l.length?mf(l,Pe(f,2)):0}return F.after=F6,F.ary=HS,F.assign=RH,F.assignIn=nO,F.assignInWith=fc,F.assignWith=NH,F.at=TH,F.before=VS,F.bind=rp,F.bindAll=DV,F.bindKey=WS,F.castArray=Q6,F.chain=BS,F.chunk=l$,F.compact=c$,F.concat=u$,F.cond=jV,F.conforms=qV,F.constant=cp,F.countBy=b6,F.create=PH,F.curry=US,F.curryRight=GS,F.debounce=KS,F.defaults=kH,F.defaultsDeep=AH,F.defer=$6,F.delay=H6,F.difference=d$,F.differenceBy=f$,F.differenceWith=p$,F.drop=h$,F.dropRight=v$,F.dropRightWhile=g$,F.dropWhile=m$,F.fill=b$,F.filter=x6,F.flatMap=E6,F.flatMapDeep=S6,F.flatMapDepth=O6,F.flatten=jS,F.flattenDeep=y$,F.flattenDepth=x$,F.flip=V6,F.flow=zV,F.flowRight=BV,F.fromPairs=w$,F.functions=BH,F.functionsIn=FH,F.groupBy=C6,F.initial=E$,F.intersection=S$,F.intersectionBy=O$,F.intersectionWith=C$,F.invert=HH,F.invertBy=VH,F.invokeMap=R6,F.iteratee=up,F.keyBy=N6,F.keys=er,F.keysIn=Pr,F.map=ac,F.mapKeys=UH,F.mapValues=GH,F.matches=FV,F.matchesProperty=$V,F.memoize=lc,F.merge=KH,F.mergeWith=iO,F.method=HV,F.methodOf=VV,F.mixin=dp,F.negate=cc,F.nthArg=UV,F.omit=YH,F.omitBy=XH,F.once=W6,F.orderBy=T6,F.over=GV,F.overArgs=U6,F.overEvery=KV,F.overSome=YV,F.partial=np,F.partialRight=YS,F.partition=P6,F.pick=ZH,F.pickBy=oO,F.property=fO,F.propertyOf=XV,F.pull=T$,F.pullAll=LS,F.pullAllBy=P$,F.pullAllWith=k$,F.pullAt=A$,F.range=ZV,F.rangeRight=JV,F.rearg=G6,F.reject=M6,F.remove=M$,F.rest=K6,F.reverse=ep,F.sampleSize=j6,F.set=QH,F.setWith=eV,F.shuffle=q6,F.slice=D$,F.sortBy=B6,F.sortedUniq=$$,F.sortedUniqBy=H$,F.split=EV,F.spread=Y6,F.tail=V$,F.take=W$,F.takeRight=U$,F.takeRightWhile=G$,F.takeWhile=K$,F.tap=c6,F.throttle=X6,F.thru=oc,F.toArray=eO,F.toPairs=aO,F.toPairsIn=sO,F.toPath=nW,F.toPlainObject=rO,F.transform=tV,F.unary=Z6,F.union=Y$,F.unionBy=X$,F.unionWith=Z$,F.uniq=J$,F.uniqBy=Q$,F.uniqWith=e6,F.unset=rV,F.unzip=tp,F.unzipWith=zS,F.update=nV,F.updateWith=iV,F.values=Lo,F.valuesIn=oV,F.without=t6,F.words=uO,F.wrap=J6,F.xor=r6,F.xorBy=n6,F.xorWith=i6,F.zip=o6,F.zipObject=a6,F.zipObjectDeep=s6,F.zipWith=l6,F.entries=aO,F.entriesIn=sO,F.extend=nO,F.extendWith=fc,dp(F,F),F.add=oW,F.attempt=dO,F.camelCase=cV,F.capitalize=lO,F.ceil=aW,F.clamp=aV,F.clone=eH,F.cloneDeep=rH,F.cloneDeepWith=nH,F.cloneWith=tH,F.conformsTo=iH,F.deburr=cO,F.defaultTo=LV,F.divide=sW,F.endsWith=uV,F.eq=_n,F.escape=dV,F.escapeRegExp=fV,F.every=y6,F.find=w6,F.findIndex=MS,F.findKey=MH,F.findLast=_6,F.findLastIndex=DS,F.findLastKey=DH,F.floor=lW,F.forEach=FS,F.forEachRight=$S,F.forIn=jH,F.forInRight=qH,F.forOwn=LH,F.forOwnRight=zH,F.get=ap,F.gt=oH,F.gte=aH,F.has=$H,F.hasIn=sp,F.head=qS,F.identity=kr,F.includes=I6,F.indexOf=_$,F.inRange=sV,F.invoke=WH,F.isArguments=Ji,F.isArray=ze,F.isArrayBuffer=sH,F.isArrayLike=Tr,F.isArrayLikeObject=zt,F.isBoolean=lH,F.isBuffer=Ei,F.isDate=cH,F.isElement=uH,F.isEmpty=dH,F.isEqual=fH,F.isEqualWith=pH,F.isError=ip,F.isFinite=hH,F.isFunction=ti,F.isInteger=XS,F.isLength=uc,F.isMap=ZS,F.isMatch=vH,F.isMatchWith=gH,F.isNaN=mH,F.isNative=bH,F.isNil=xH,F.isNull=yH,F.isNumber=JS,F.isObject=Tt,F.isObjectLike=kt,F.isPlainObject=Ua,F.isRegExp=op,F.isSafeInteger=wH,F.isSet=QS,F.isString=dc,F.isSymbol=Vr,F.isTypedArray=qo,F.isUndefined=_H,F.isWeakMap=EH,F.isWeakSet=SH,F.join=I$,F.kebabCase=pV,F.last=an,F.lastIndexOf=R$,F.lowerCase=hV,F.lowerFirst=vV,F.lt=OH,F.lte=CH,F.max=cW,F.maxBy=uW,F.mean=dW,F.meanBy=fW,F.min=pW,F.minBy=hW,F.stubArray=pp,F.stubFalse=hp,F.stubObject=QV,F.stubString=eW,F.stubTrue=tW,F.multiply=vW,F.nth=N$,F.noConflict=WV,F.noop=fp,F.now=sc,F.pad=gV,F.padEnd=mV,F.padStart=bV,F.parseInt=yV,F.random=lV,F.reduce=k6,F.reduceRight=A6,F.repeat=xV,F.replace=wV,F.result=JH,F.round=gW,F.runInContext=oe,F.sample=D6,F.size=L6,F.snakeCase=_V,F.some=z6,F.sortedIndex=j$,F.sortedIndexBy=q$,F.sortedIndexOf=L$,F.sortedLastIndex=z$,F.sortedLastIndexBy=B$,F.sortedLastIndexOf=F$,F.startCase=SV,F.startsWith=OV,F.subtract=mW,F.sum=bW,F.sumBy=yW,F.template=CV,F.times=rW,F.toFinite=ri,F.toInteger=Fe,F.toLength=tO,F.toLower=IV,F.toNumber=sn,F.toSafeInteger=IH,F.toString=at,F.toUpper=RV,F.trim=NV,F.trimEnd=TV,F.trimStart=PV,F.truncate=kV,F.unescape=AV,F.uniqueId=iW,F.upperCase=MV,F.upperFirst=lp,F.each=FS,F.eachRight=$S,F.first=qS,dp(F,(function(){var l={};return Mn(F,function(f,g){ft.call(F.prototype,g)||(l[g]=f)}),l})(),{chain:!1}),F.VERSION=n,en(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){F[l].placeholder=F}),en(["drop","take"],function(l,f){Ye.prototype[l]=function(g){g=g===r?1:Kt(Fe(g),0);var R=this.__filtered__&&!f?new Ye(this):this.clone();return R.__filtered__?R.__takeCount__=cr(g,R.__takeCount__):R.__views__.push({size:cr(g,W),type:l+(R.__dir__<0?"Right":"")}),R},Ye.prototype[l+"Right"]=function(g){return this.reverse()[l](g).reverse()}}),en(["filter","map","takeWhile"],function(l,f){var g=f+1,R=g==P||g==$;Ye.prototype[l]=function(M){var V=this.clone();return V.__iteratees__.push({iteratee:Pe(M,3),type:g}),V.__filtered__=V.__filtered__||R,V}}),en(["head","last"],function(l,f){var g="take"+(f?"Right":"");Ye.prototype[l]=function(){return this[g](1).value()[0]}}),en(["initial","tail"],function(l,f){var g="drop"+(f?"":"Right");Ye.prototype[l]=function(){return this.__filtered__?new Ye(this):this[g](1)}}),Ye.prototype.compact=function(){return this.filter(kr)},Ye.prototype.find=function(l){return this.filter(l).head()},Ye.prototype.findLast=function(l){return this.reverse().find(l)},Ye.prototype.invokeMap=He(function(l,f){return typeof l=="function"?new Ye(this):this.map(function(g){return Ba(g,l,f)})}),Ye.prototype.reject=function(l){return this.filter(cc(Pe(l)))},Ye.prototype.slice=function(l,f){l=Fe(l);var g=this;return g.__filtered__&&(l>0||f<0)?new Ye(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)},Ye.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Ye.prototype.toArray=function(){return this.take(W)},Mn(Ye.prototype,function(l,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),R=/^(?:head|last)$/.test(f),M=F[R?"take"+(f=="last"?"Right":""):f],V=R||/^find/.test(f);M&&(F.prototype[f]=function(){var Z=this.__wrapped__,ie=R?[1]:arguments,ae=Z instanceof Ye,he=ie[0],ve=ae||ze(Z),be=function(Ge){var Ze=M.apply(F,gi([Ge],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,Ae=V&&!Ee,$e=ae&&!Ne;if(!V&&ve){Z=$e?Z:new Ye(this);var Me=l.apply(Z,ie);return Me.__actions__.push({func:oc,args:[be],thisArg:r}),new rn(Me,Ee)}return Ae&&$e?l.apply(this,ie):(Me=this.thru(be),Ae?R?Me.value()[0]:Me.value():Me)})}),en(["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);F.prototype[l]=function(){var M=arguments;if(R&&!this.__chain__){var V=this.value();return f.apply(ze(V)?V:[],M)}return this[g](function(Z){return f.apply(ze(Z)?Z:[],M)})}}),Mn(Ye.prototype,function(l,f){var g=F[f];if(g){var R=g.name+"";ft.call(ko,R)||(ko[R]=[]),ko[R].push({name:f,func:g})}}),ko[Jl(r,w).name]=[{name:"wrapper",func:r}],Ye.prototype.clone=A3,Ye.prototype.reverse=M3,Ye.prototype.value=D3,F.prototype.at=u6,F.prototype.chain=d6,F.prototype.commit=f6,F.prototype.next=p6,F.prototype.plant=v6,F.prototype.reverse=g6,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=m6,F.prototype.first=F.prototype.head,Aa&&(F.prototype[Aa]=h6),F}),No=f3();Vi?((Vi.exports=No)._=No,uf._=No):nr._=No}).call(Gie)})(Es,Es.exports)),Es.exports}var lo=Kie();function Yie(){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,m)=>lo.isEqual(x,m)),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,m)=>{e(Je.setTabFlags({path:x,flags:m}))},openModal:async x=>await e(Je.openModal(x)).unwrap()}}}const hB=O.createContext(null),vB=({children:e,adapter:t})=>C.jsx(hB.Provider,{value:t,children:e});function pr(){const e=O.useContext(hB);if(!e)throw new Error("useEditorStateAdapter must be used within an EditorStateAdapterProvider");return e}var jw=function(e,t){return jw=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])},jw(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");jw(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function qw(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 Lw(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 zw(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 Vn(e){return typeof e=="function"}function gB(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 by=gB(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
87
87
|
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
88
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function Bw(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Id=(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=qw(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(m){t={error:m}}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(Vn(d))try{d()}catch(m){o=m instanceof by?m.errors:[m]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var v=qw(p),h=v.next();!h.done;h=v.next()){var x=h.value;try{yA(x)}catch(m){o=o??[],m instanceof by?o=zw(zw([],Lw(o)),Lw(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{h&&!h.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}}if(o)throw new by(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)yA(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)&&Bw(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Bw(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),mB=Id.EMPTY;function bB(e){return e instanceof Id||e&&"closed"in e&&Vn(e.remove)&&Vn(e.add)&&Vn(e.unsubscribe)}function yA(e){Vn(e)?e():e.unsubscribe()}var Xie={Promise:void 0},Zie={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,zw([e,t],Lw(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Jie(e){Zie.setTimeout(function(){throw e})}function xA(){}function lu(e){e()}var A_=(function(e){cl(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,bB(r)&&r.add(n)):n.destination=toe,n}return t.create=function(r,n,i){return new Fw(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})(Id),Qie=(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})(),Fw=(function(e){cl(t,e);function t(r,n,i){var o=e.call(this)||this,a;return Vn(r)||!r?a={next:r??void 0,error:n??void 0,complete:i??void 0}:a=r,o.destination=new Qie(a),o}return t})(A_);function Bc(e){Jie(e)}function eoe(e){throw e}var toe={closed:!0,next:xA,error:eoe,complete:xA},roe=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function noe(e){return e}function ioe(e){return e.length===0?noe:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}var wA=(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=aoe(t)?t:new Fw(t,r,n);return lu(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=_A(r),new r(function(i,o){var a=new Fw({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[roe]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ioe(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=_A(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 _A(e){var t;return(t=e??Xie.Promise)!==null&&t!==void 0?t:Promise}function ooe(e){return e&&Vn(e.next)&&Vn(e.error)&&Vn(e.complete)}function aoe(e){return e&&e instanceof A_||ooe(e)&&bB(e)}function soe(e){return Vn(e==null?void 0:e.lift)}function loe(e){return function(t){if(soe(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 coe(e,t,r,n,i){return new uoe(e,t,r,n,i)}var uoe=(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})(A_),doe=gB(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),yB=(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 EA(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new doe},t.prototype.next=function(r){var n=this;lu(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=qw(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;lu(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;lu(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?mB:(this.currentObservers=null,s.push(r),new Id(function(){n.currentObservers=null,Bw(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 wA;return r.source=this,r},t.create=function(r,n){return new EA(r,n)},t})(wA),EA=(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:mB},t})(yB);function foe(e,t){return loe(function(r,n){var i=0;r.subscribe(coe(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}var yy={},rs={},Fc={},SA;function xB(){if(SA)return Fc;SA=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 Vo={},ns={},is={},OA;function poe(){if(OA)return is;OA=1,Object.defineProperty(is,"__esModule",{value:!0}),is.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 is.default=e,is}var CA;function Rd(){if(CA)return ns;CA=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=void 0;var e=t(poe());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 ns.default=n,ns}var IA;function Nd(){if(IA)return Vo;IA=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.default=void 0,Vo.unsafeStringify=n;var e=t(Rd());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 Vo.default=o,Vo}var RA;function hoe(){if(RA)return rs;RA=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var e=r(xB()),t=Nd();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,m=u.clockseq!==void 0?u.clockseq:i;if(x==null||m==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]]),m==null&&(m=i=(E[6]<<8|E[7])&16383)}let b=u.msecs!==void 0?u.msecs:Date.now(),w=u.nsecs!==void 0?u.nsecs:a+1;const y=b-o+(w-a)/1e4;if(y<0&&u.clockseq===void 0&&(m=m+1&16383),(y<0||b>o)&&u.nsecs===void 0&&(w=0),w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=b,a=w,i=m,b+=122192928e5;const _=((b&268435455)*1e4+w)%4294967296;h[v++]=_>>>24&255,h[v++]=_>>>16&255,h[v++]=_>>>8&255,h[v++]=_&255;const S=b/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++]=m>>>8|128,h[v++]=m&255;for(let E=0;E<6;++E)h[v+E]=x[E];return d||(0,t.unsafeStringify)(h)}var c=s;return rs.default=c,rs}var os={},Ni={},as={},NA;function wB(){if(NA)return as;NA=1,Object.defineProperty(as,"__esModule",{value:!0}),as.default=void 0;var e=t(Rd());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 as.default=n,as}var TA;function _B(){if(TA)return Ni;TA=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.URL=Ni.DNS=void 0,Ni.default=a;var e=Nd(),t=r(wB());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 m;if(typeof p=="string"&&(p=n(p)),typeof v=="string"&&(v=(0,t.default)(v)),((m=v)===null||m===void 0?void 0:m.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let b=new Uint8Array(16+p.length);if(b.set(v),b.set(p,v.length),b=u(b),b[6]=b[6]&15|c,b[8]=b[8]&63|128,h){x=x||0;for(let w=0;w<16;++w)h[x+w]=b[w];return h}return(0,e.unsafeStringify)(b)}try{d.name=s}catch{}return d.DNS=i,d.URL=o,d}return Ni}var ss={},PA;function voe(){if(PA)return ss;PA=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=void 0;function e(h){if(typeof h=="string"){const x=unescape(encodeURIComponent(h));h=new Uint8Array(x.length);for(let m=0;m<x.length;++m)h[m]=x.charCodeAt(m)}return t(n(i(h),h.length*8))}function t(h){const x=[],m=h.length*32,b="0123456789abcdef";for(let w=0;w<m;w+=8){const y=h[w>>5]>>>w%32&255,_=parseInt(b.charAt(y>>>4&15)+b.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 m=1732584193,b=-271733879,w=-1732584194,y=271733878;for(let _=0;_<h.length;_+=16){const S=m,E=b,I=w,N=y;m=c(m,b,w,y,h[_],7,-680876936),y=c(y,m,b,w,h[_+1],12,-389564586),w=c(w,y,m,b,h[_+2],17,606105819),b=c(b,w,y,m,h[_+3],22,-1044525330),m=c(m,b,w,y,h[_+4],7,-176418897),y=c(y,m,b,w,h[_+5],12,1200080426),w=c(w,y,m,b,h[_+6],17,-1473231341),b=c(b,w,y,m,h[_+7],22,-45705983),m=c(m,b,w,y,h[_+8],7,1770035416),y=c(y,m,b,w,h[_+9],12,-1958414417),w=c(w,y,m,b,h[_+10],17,-42063),b=c(b,w,y,m,h[_+11],22,-1990404162),m=c(m,b,w,y,h[_+12],7,1804603682),y=c(y,m,b,w,h[_+13],12,-40341101),w=c(w,y,m,b,h[_+14],17,-1502002290),b=c(b,w,y,m,h[_+15],22,1236535329),m=u(m,b,w,y,h[_+1],5,-165796510),y=u(y,m,b,w,h[_+6],9,-1069501632),w=u(w,y,m,b,h[_+11],14,643717713),b=u(b,w,y,m,h[_],20,-373897302),m=u(m,b,w,y,h[_+5],5,-701558691),y=u(y,m,b,w,h[_+10],9,38016083),w=u(w,y,m,b,h[_+15],14,-660478335),b=u(b,w,y,m,h[_+4],20,-405537848),m=u(m,b,w,y,h[_+9],5,568446438),y=u(y,m,b,w,h[_+14],9,-1019803690),w=u(w,y,m,b,h[_+3],14,-187363961),b=u(b,w,y,m,h[_+8],20,1163531501),m=u(m,b,w,y,h[_+13],5,-1444681467),y=u(y,m,b,w,h[_+2],9,-51403784),w=u(w,y,m,b,h[_+7],14,1735328473),b=u(b,w,y,m,h[_+12],20,-1926607734),m=d(m,b,w,y,h[_+5],4,-378558),y=d(y,m,b,w,h[_+8],11,-2022574463),w=d(w,y,m,b,h[_+11],16,1839030562),b=d(b,w,y,m,h[_+14],23,-35309556),m=d(m,b,w,y,h[_+1],4,-1530992060),y=d(y,m,b,w,h[_+4],11,1272893353),w=d(w,y,m,b,h[_+7],16,-155497632),b=d(b,w,y,m,h[_+10],23,-1094730640),m=d(m,b,w,y,h[_+13],4,681279174),y=d(y,m,b,w,h[_],11,-358537222),w=d(w,y,m,b,h[_+3],16,-722521979),b=d(b,w,y,m,h[_+6],23,76029189),m=d(m,b,w,y,h[_+9],4,-640364487),y=d(y,m,b,w,h[_+12],11,-421815835),w=d(w,y,m,b,h[_+15],16,530742520),b=d(b,w,y,m,h[_+2],23,-995338651),m=p(m,b,w,y,h[_],6,-198630844),y=p(y,m,b,w,h[_+7],10,1126891415),w=p(w,y,m,b,h[_+14],15,-1416354905),b=p(b,w,y,m,h[_+5],21,-57434055),m=p(m,b,w,y,h[_+12],6,1700485571),y=p(y,m,b,w,h[_+3],10,-1894986606),w=p(w,y,m,b,h[_+10],15,-1051523),b=p(b,w,y,m,h[_+1],21,-2054922799),m=p(m,b,w,y,h[_+8],6,1873313359),y=p(y,m,b,w,h[_+15],10,-30611744),w=p(w,y,m,b,h[_+6],15,-1560198380),b=p(b,w,y,m,h[_+13],21,1309151649),m=p(m,b,w,y,h[_+4],6,-145523070),y=p(y,m,b,w,h[_+11],10,-1120210379),w=p(w,y,m,b,h[_+2],15,718787259),b=p(b,w,y,m,h[_+9],21,-343485551),m=o(m,S),b=o(b,E),w=o(w,I),y=o(y,N)}return[m,b,w,y]}function i(h){if(h.length===0)return[];const x=h.length*8,m=new Uint32Array(r(x));for(let b=0;b<x;b+=8)m[b>>5]|=(h[b/8]&255)<<b%32;return m}function o(h,x){const m=(h&65535)+(x&65535);return(h>>16)+(x>>16)+(m>>16)<<16|m&65535}function a(h,x){return h<<x|h>>>32-x}function s(h,x,m,b,w,y){return o(a(o(o(x,h),o(b,y)),w),m)}function c(h,x,m,b,w,y,_){return s(x&m|~x&b,h,x,w,y,_)}function u(h,x,m,b,w,y,_){return s(x&b|m&~b,h,x,w,y,_)}function d(h,x,m,b,w,y,_){return s(x^m^b,h,x,w,y,_)}function p(h,x,m,b,w,y,_){return s(m^(x|~b),h,x,w,y,_)}var v=e;return ss.default=v,ss}var kA;function goe(){if(kA)return os;kA=1,Object.defineProperty(os,"__esModule",{value:!0}),os.default=void 0;var e=r(_B()),t=r(voe());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return os.default=i,os}var ls={},cs={},AA;function moe(){if(AA)return cs;AA=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return cs.default=t,cs}var MA;function boe(){if(MA)return ls;MA=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=void 0;var e=n(moe()),t=n(xB()),r=Nd();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 ls.default=o,ls}var us={},ds={},DA;function yoe(){if(DA)return ds;DA=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.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],m=a[3],b=a[4];for(let w=0;w<80;++w){const y=Math.floor(w/20),_=t(v,5)+e(y,h,x,m)+b+o[y]+p[w]>>>0;b=m,m=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]+m>>>0,a[4]=a[4]+b>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,a[0]&255,a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,a[1]&255,a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,a[2]&255,a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,a[3]&255,a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,a[4]&255]}var n=r;return ds.default=n,ds}var jA;function xoe(){if(jA)return us;jA=1,Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;var e=r(_B()),t=r(yoe());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return us.default=i,us}var fs={},qA;function woe(){if(qA)return fs;qA=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=void 0;var e="00000000-0000-0000-0000-000000000000";return fs.default=e,fs}var ps={},LA;function _oe(){if(LA)return ps;LA=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.default=void 0;var e=t(Rd());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 ps.default=n,ps}var zA;function Eoe(){return zA||(zA=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(hoe()),r=d(goe()),n=d(boe()),i=d(xoe()),o=d(woe()),a=d(_oe()),s=d(Rd()),c=d(Nd()),u=d(wB());function d(p){return p&&p.__esModule?p:{default:p}}})(yy)),yy}var xy,BA;function Soe(){if(BA)return xy;BA=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},xy=e,xy}var wy,FA;function Ooe(){if(FA)return wy;FA=1;var e=Soe();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",wy=t,wy}var _y,$A;function Coe(){if($A)return _y;$A=1;const{v4:e,validate:t}=Eoe(),r=Ooe(),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 _y=(()=>{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),m={shortIdLength:x,consistentLength:h.consistentLength,paddingChar:v[0]},b=r(r.HEX,v),w=r(v,r.HEX),y=()=>a(e(),b,m),S={alphabet:v,fromUUID:E=>a(E,b,m),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(A=>v.includes(A));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})(),_y}var EB=Coe();const SB=new yB;function Ioe(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 SB.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_=O.createContext(null),Roe=()=>({roles:{},privileges:{},flags:{touched:!1},date:void 0,selectedTab:"roles",forceLogin:!1,restrictedByDefault:!1,modals:{list:[]}}),Noe=({children:e,catalog:t=null,qodly:r=!1,catalogMethods:n=[],dataclasses:i={},singletons:o={},onSetTabFlags:a,initialState:s})=>{const[c,u]=O.useReducer(Ioe,{...Roe(),...s}),d=O.useMemo(()=>({catalog:t,qodly:r,catalogMethods:n,dataclasses:i,singletons:o,onSetTabFlags:a}),[t,r,n,i,o,a]);return C.jsx(M_.Provider,{value:{state:c,dispatch:u,external:d},children:e})};function Toe(){const e=O.useContext(M_);if(!e)throw new Error("useReducerAdapter must be used within a ReducerAdapterProvider");const{state:t,dispatch:r,external:n}=e,i=O.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:O.useCallback(()=>t.roles,[t.roles]),getPrivileges:O.useCallback(()=>t.privileges,[t.privileges]),getRolesFlags:O.useCallback(()=>t.flags,[t.flags]),getRolesAndPrivileges:O.useCallback(()=>i,[i]),getCatalog:O.useCallback(()=>n.catalog??null,[n.catalog]),getQodly:O.useCallback(()=>n.qodly??!1,[n.qodly]),getSelectedTab:O.useCallback(()=>t.selectedTab,[t.selectedTab]),getForceLogin:O.useCallback(()=>t.forceLogin??!1,[t.forceLogin]),getRestrictedByDefault:O.useCallback(()=>t.restrictedByDefault??!1,[t.restrictedByDefault]),getGuestPrivilege:O.useCallback(()=>Object.values(t.privileges).find(({privilege:o})=>o==="guest")??null,[t.privileges]),getCatalogMethods:O.useCallback(()=>n.catalogMethods??[],[n.catalogMethods]),getDataclasses:O.useCallback(()=>n.dataclasses??{},[n.dataclasses]),getSingletons:O.useCallback(()=>n.singletons??{},[n.singletons]),actions:{updateRoles:O.useCallback(o=>{r({type:"UPDATE_ROLES",payload:o})},[]),updatePrivileges:O.useCallback(o=>{r({type:"UPDATE_PRIVILEGES",payload:o})},[]),setRolesContent:O.useCallback(o=>{r({type:"SET_ROLES_CONTENT",payload:o})},[]),toggleTab:O.useCallback(o=>{r({type:"TOGGLE_TAB",payload:o})},[]),toggleForceLogin:O.useCallback(o=>{r({type:"TOGGLE_FORCE_LOGIN",payload:o})},[]),toggleRestrictedByDefault:O.useCallback(o=>{r({type:"TOGGLE_RESTRICTED_BY_DEFAULT",payload:o})},[]),setTabFlags:O.useCallback((o,a)=>{n.onSetTabFlags&&n.onSetTabFlags(o,a)},[n.onSetTabFlags]),openModal:O.useCallback(async o=>{const{type:a=fe.ModalType.ALERT}=o,s=EB.generate();return r({type:"CREATE_MODAL",payload:{id:s,type:a,isOpen:!0,...o}}),a===fe.ModalType.CONFIRM?new Promise(c=>{const u=SB.pipe(foe(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=ha.entries(((v=p.views)==null?void 0:v.toggles)||{}).reduce((m,b)=>({...m,[b[0]]:b[1].value}),{});r({type:"REMOVE_MODAL",payload:s}),u.unsubscribe(),c({confirmed:h,options:x})}})}):{confirmed:!1}},[r])}}}function Poe(){const e=O.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:O.useCallback(n=>{r({type:"CLOSE_MODAL",payload:n})},[r]),editModal:O.useCallback(n=>{r({type:"EDIT_MODAL",payload:n})},[r]),removeModal:O.useCallback(n=>{r({type:"REMOVE_MODAL",payload:n})},[r])}}const Ey=({child:e,parent:t,status:r,onSelect:n,currentPrivilegeId:i})=>{const o=pr(),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 C.jsxs(Zc,{color:r==="included"?"primary":"dark",onClick:r==="included"?c:s,disabled:r==="disabled",children:[e.privilege,C.jsx(_e.FdPlus,{className:Yr("transform transition-transform",{"rotate-45":r==="included"})})]})},koe=({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:C.jsxs(dr,{depth:1,className:"w-full border-b 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",children:"Include a privilege"}):C.jsx("div",{}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx(xu,{onChange:()=>n(!i),checked:i}),C.jsx("label",{className:"text-xs",children:" Show inherited permissions"})]})]}),C.jsxs("div",{className:"flex flex-wrap items-start justify-start gap-1",children:[s.map(d=>C.jsx(Ey,{child:d,parent:e,status:"included",onSelect:r,currentPrivilegeId:d.id},d.id)),u.map(d=>C.jsx(Ey,{child:d,parent:e,status:"available",onSelect:r,currentPrivilegeId:d.id},d.id)),c.map(d=>C.jsx(Ey,{child:d,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:d.id},d.id))]})]})},Aoe=({item:e,depth:t})=>{const r=pr(),[n,i]=O.useState(!1),o=r.getPrivileges(),a=fe.populateShallow(e.includes,o);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:s=>{s.stopPropagation(),i(!n)},children:C.jsx(_e.FdRight,{className:Yr("h-4 w-4",{"tranform rotate-90":n})})})," ",C.jsx("div",{children:e.privilege})]}),C.jsx("div",{className:"border-l pl-2",style:{marginLeft:t?t*4:3},children:n&&C.jsx(OB,{depth:t+1,data:a})})]})},OB=({data:e,depth:t=0})=>e.map(r=>r.includes.length?C.jsx(Aoe,{item:r,depth:t},r.id):C.jsx("div",{className:Yr("py-1 text-xs",{}),children:r.privilege},r.id)),xr=()=>document.querySelector(`.${w2.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,Td=({container:e,...t})=>C.jsx(fe.Portal,{...t,container:e||xr()}),HA=({privilege:e,selectedPrivilege:t,onSelect:r,isGuest:n=!1})=>{const i=pr(),o=i.getPrivileges(),a=fe.populateShallow(e.includes,o),[s,c]=O.useState(!1),[u,d]=O.useState(e.privilege),[p,v]=O.useState(null),h=fe.useOutsideClick(()=>{s&&b()});fe.useDidMountEffect(()=>{e.privilege!==u&&d(e.privilege)},[e.privilege]);function x(){c(!0),v(null)}function m(){c(!1),d(e.privilege)}function b(){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(L=>o[L].privilege!=="guest"),T=N.indexOf(e.id),A=Math.max(0,T-1),B=N[A];T===0?r(E[I[0]]):E[B]?r(E[B]):r(E[I[0]])}i.actions.updatePrivileges(E)}},y=O.useMemo(()=>e.resources.some(_=>_.exists===!1),[e]);return C.jsxs(Kr,{container:xr(),color:"negative",icon:C.jsx(_e.FdBulb,{}),label:"This privilege uses non-existing resources",isHidden:!y,children:[C.jsxs(dr,{depth:4,borderType:(t==null?void 0:t.id)===e.id?"primary":(t==null?void 0:t.id)!==e.id?"light":"default",className:Yr("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:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsxs("div",{className:"flex flex-1 items-center",children:[C.jsx("span",{className:"mr-4",children:n?C.jsx(_e.FdGuest,{className:"h-6 w-6"}):C.jsx(_e.FdGroup,{className:"h-6 w-6"})}),s?C.jsxs(wt.Root,{color:p?"negative":"primary",className:"flex-1 mr-2",children:[C.jsx(wt.Group,{children:C.jsx(wt.Field,{autoFocus:!0,value:u,onChange:_=>d(_.target.value),onKeyDown:_=>{_.key==="Enter"&&b(),_.key==="Escape"&&m()},onBlur:m,type:"text"})}),p&&C.jsx(wt.Message,{children:p})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:u})]}),n?C.jsx("div",{className:"flex items-center justify-center",children:C.jsx(Kr,{icon:C.jsx(_e.FdBulb,{}),label:C.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:C.jsx(_e.FdInfoBold,{className:"h-4 w-4"})})}):C.jsx("div",{className:"flex items-center space-x-2",children:s?C.jsxs(C.Fragment,{children:[C.jsx(Zt,{variant:"ghost",color:"white",onClick:m,children:C.jsx("span",{children:C.jsx(_e.FdClose,{className:"h-4 w-4"})})}),C.jsx(Zt,{variant:"ghost",color:"white",onClick:b,children:C.jsx("span",{children:C.jsx(_e.FdCheckCircle,{className:"h-4 w-4"})})})]}):C.jsxs(C.Fragment,{children:[C.jsx(Zt,{variant:"ghost",color:"white",onClick:x,children:C.jsx(_e.FdPen,{className:"h-4 w-4"})}),C.jsx(Zt,{variant:"ghost",color:"white",onClick:w,children:C.jsx(_e.FdTrash,{className:"h-4 w-4"})})]})})]}),a.length?C.jsx("div",{className:"ml-[43px]",children:C.jsx(OB,{data:a})}):null]})," "]})},Moe=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=pr(),i=n.getGuestPrivilege(),o=n.getCatalog(),a=O.useMemo(()=>{if(o===null||!i)return i;const s=fB({guest:i},Object.values((o==null?void 0:o.dataClasses)??{}));return pB(s,o).guest},[e,o]);return C.jsxs("div",{className:"flex flex-1 flex-col gap-y-4 overflow-auto p-4 pb-10 pt-1",children:[a?C.jsx(HA,{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])=>C.jsx(HA,{privilege:c,onSelect:t,selectedPrivilege:r},s)):C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsx("div",{className:"flex flex-1 items-center justify-center",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-inactive-text",children:[C.jsx(_e.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(_e.FdPlus,{className:"ml-2 inline h-4 w-4"})]})]})})})]})};var $c={exports:{}},Hc={exports:{}},ct={};/** @license React v16.13.1
|
|
88
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function Bw(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Id=(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=qw(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(m){t={error:m}}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(Vn(d))try{d()}catch(m){o=m instanceof by?m.errors:[m]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var v=qw(p),h=v.next();!h.done;h=v.next()){var x=h.value;try{yA(x)}catch(m){o=o??[],m instanceof by?o=zw(zw([],Lw(o)),Lw(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{h&&!h.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}}if(o)throw new by(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)yA(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)&&Bw(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Bw(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),mB=Id.EMPTY;function bB(e){return e instanceof Id||e&&"closed"in e&&Vn(e.remove)&&Vn(e.add)&&Vn(e.unsubscribe)}function yA(e){Vn(e)?e():e.unsubscribe()}var Xie={Promise:void 0},Zie={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,zw([e,t],Lw(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Jie(e){Zie.setTimeout(function(){throw e})}function xA(){}function lu(e){e()}var A_=(function(e){cl(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,bB(r)&&r.add(n)):n.destination=toe,n}return t.create=function(r,n,i){return new Fw(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})(Id),Qie=(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})(),Fw=(function(e){cl(t,e);function t(r,n,i){var o=e.call(this)||this,a;return Vn(r)||!r?a={next:r??void 0,error:n??void 0,complete:i??void 0}:a=r,o.destination=new Qie(a),o}return t})(A_);function Bc(e){Jie(e)}function eoe(e){throw e}var toe={closed:!0,next:xA,error:eoe,complete:xA},roe=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function noe(e){return e}function ioe(e){return e.length===0?noe:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}var wA=(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=aoe(t)?t:new Fw(t,r,n);return lu(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=_A(r),new r(function(i,o){var a=new Fw({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[roe]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ioe(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=_A(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 _A(e){var t;return(t=e??Xie.Promise)!==null&&t!==void 0?t:Promise}function ooe(e){return e&&Vn(e.next)&&Vn(e.error)&&Vn(e.complete)}function aoe(e){return e&&e instanceof A_||ooe(e)&&bB(e)}function soe(e){return Vn(e==null?void 0:e.lift)}function loe(e){return function(t){if(soe(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 coe(e,t,r,n,i){return new uoe(e,t,r,n,i)}var uoe=(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})(A_),doe=gB(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),yB=(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 EA(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new doe},t.prototype.next=function(r){var n=this;lu(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=qw(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;lu(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;lu(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?mB:(this.currentObservers=null,s.push(r),new Id(function(){n.currentObservers=null,Bw(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 wA;return r.source=this,r},t.create=function(r,n){return new EA(r,n)},t})(wA),EA=(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:mB},t})(yB);function foe(e,t){return loe(function(r,n){var i=0;r.subscribe(coe(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}var yy={},rs={},Fc={},SA;function xB(){if(SA)return Fc;SA=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 Wo={},ns={},is={},OA;function poe(){if(OA)return is;OA=1,Object.defineProperty(is,"__esModule",{value:!0}),is.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 is.default=e,is}var CA;function Rd(){if(CA)return ns;CA=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=void 0;var e=t(poe());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 ns.default=n,ns}var IA;function Nd(){if(IA)return Wo;IA=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.default=void 0,Wo.unsafeStringify=n;var e=t(Rd());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 Wo.default=o,Wo}var RA;function hoe(){if(RA)return rs;RA=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var e=r(xB()),t=Nd();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,m=u.clockseq!==void 0?u.clockseq:i;if(x==null||m==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]]),m==null&&(m=i=(E[6]<<8|E[7])&16383)}let b=u.msecs!==void 0?u.msecs:Date.now(),w=u.nsecs!==void 0?u.nsecs:a+1;const y=b-o+(w-a)/1e4;if(y<0&&u.clockseq===void 0&&(m=m+1&16383),(y<0||b>o)&&u.nsecs===void 0&&(w=0),w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=b,a=w,i=m,b+=122192928e5;const _=((b&268435455)*1e4+w)%4294967296;h[v++]=_>>>24&255,h[v++]=_>>>16&255,h[v++]=_>>>8&255,h[v++]=_&255;const S=b/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++]=m>>>8|128,h[v++]=m&255;for(let E=0;E<6;++E)h[v+E]=x[E];return d||(0,t.unsafeStringify)(h)}var c=s;return rs.default=c,rs}var os={},Ni={},as={},NA;function wB(){if(NA)return as;NA=1,Object.defineProperty(as,"__esModule",{value:!0}),as.default=void 0;var e=t(Rd());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 as.default=n,as}var TA;function _B(){if(TA)return Ni;TA=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.URL=Ni.DNS=void 0,Ni.default=a;var e=Nd(),t=r(wB());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 m;if(typeof p=="string"&&(p=n(p)),typeof v=="string"&&(v=(0,t.default)(v)),((m=v)===null||m===void 0?void 0:m.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let b=new Uint8Array(16+p.length);if(b.set(v),b.set(p,v.length),b=u(b),b[6]=b[6]&15|c,b[8]=b[8]&63|128,h){x=x||0;for(let w=0;w<16;++w)h[x+w]=b[w];return h}return(0,e.unsafeStringify)(b)}try{d.name=s}catch{}return d.DNS=i,d.URL=o,d}return Ni}var ss={},PA;function voe(){if(PA)return ss;PA=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=void 0;function e(h){if(typeof h=="string"){const x=unescape(encodeURIComponent(h));h=new Uint8Array(x.length);for(let m=0;m<x.length;++m)h[m]=x.charCodeAt(m)}return t(n(i(h),h.length*8))}function t(h){const x=[],m=h.length*32,b="0123456789abcdef";for(let w=0;w<m;w+=8){const y=h[w>>5]>>>w%32&255,_=parseInt(b.charAt(y>>>4&15)+b.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 m=1732584193,b=-271733879,w=-1732584194,y=271733878;for(let _=0;_<h.length;_+=16){const S=m,E=b,I=w,N=y;m=c(m,b,w,y,h[_],7,-680876936),y=c(y,m,b,w,h[_+1],12,-389564586),w=c(w,y,m,b,h[_+2],17,606105819),b=c(b,w,y,m,h[_+3],22,-1044525330),m=c(m,b,w,y,h[_+4],7,-176418897),y=c(y,m,b,w,h[_+5],12,1200080426),w=c(w,y,m,b,h[_+6],17,-1473231341),b=c(b,w,y,m,h[_+7],22,-45705983),m=c(m,b,w,y,h[_+8],7,1770035416),y=c(y,m,b,w,h[_+9],12,-1958414417),w=c(w,y,m,b,h[_+10],17,-42063),b=c(b,w,y,m,h[_+11],22,-1990404162),m=c(m,b,w,y,h[_+12],7,1804603682),y=c(y,m,b,w,h[_+13],12,-40341101),w=c(w,y,m,b,h[_+14],17,-1502002290),b=c(b,w,y,m,h[_+15],22,1236535329),m=u(m,b,w,y,h[_+1],5,-165796510),y=u(y,m,b,w,h[_+6],9,-1069501632),w=u(w,y,m,b,h[_+11],14,643717713),b=u(b,w,y,m,h[_],20,-373897302),m=u(m,b,w,y,h[_+5],5,-701558691),y=u(y,m,b,w,h[_+10],9,38016083),w=u(w,y,m,b,h[_+15],14,-660478335),b=u(b,w,y,m,h[_+4],20,-405537848),m=u(m,b,w,y,h[_+9],5,568446438),y=u(y,m,b,w,h[_+14],9,-1019803690),w=u(w,y,m,b,h[_+3],14,-187363961),b=u(b,w,y,m,h[_+8],20,1163531501),m=u(m,b,w,y,h[_+13],5,-1444681467),y=u(y,m,b,w,h[_+2],9,-51403784),w=u(w,y,m,b,h[_+7],14,1735328473),b=u(b,w,y,m,h[_+12],20,-1926607734),m=d(m,b,w,y,h[_+5],4,-378558),y=d(y,m,b,w,h[_+8],11,-2022574463),w=d(w,y,m,b,h[_+11],16,1839030562),b=d(b,w,y,m,h[_+14],23,-35309556),m=d(m,b,w,y,h[_+1],4,-1530992060),y=d(y,m,b,w,h[_+4],11,1272893353),w=d(w,y,m,b,h[_+7],16,-155497632),b=d(b,w,y,m,h[_+10],23,-1094730640),m=d(m,b,w,y,h[_+13],4,681279174),y=d(y,m,b,w,h[_],11,-358537222),w=d(w,y,m,b,h[_+3],16,-722521979),b=d(b,w,y,m,h[_+6],23,76029189),m=d(m,b,w,y,h[_+9],4,-640364487),y=d(y,m,b,w,h[_+12],11,-421815835),w=d(w,y,m,b,h[_+15],16,530742520),b=d(b,w,y,m,h[_+2],23,-995338651),m=p(m,b,w,y,h[_],6,-198630844),y=p(y,m,b,w,h[_+7],10,1126891415),w=p(w,y,m,b,h[_+14],15,-1416354905),b=p(b,w,y,m,h[_+5],21,-57434055),m=p(m,b,w,y,h[_+12],6,1700485571),y=p(y,m,b,w,h[_+3],10,-1894986606),w=p(w,y,m,b,h[_+10],15,-1051523),b=p(b,w,y,m,h[_+1],21,-2054922799),m=p(m,b,w,y,h[_+8],6,1873313359),y=p(y,m,b,w,h[_+15],10,-30611744),w=p(w,y,m,b,h[_+6],15,-1560198380),b=p(b,w,y,m,h[_+13],21,1309151649),m=p(m,b,w,y,h[_+4],6,-145523070),y=p(y,m,b,w,h[_+11],10,-1120210379),w=p(w,y,m,b,h[_+2],15,718787259),b=p(b,w,y,m,h[_+9],21,-343485551),m=o(m,S),b=o(b,E),w=o(w,I),y=o(y,N)}return[m,b,w,y]}function i(h){if(h.length===0)return[];const x=h.length*8,m=new Uint32Array(r(x));for(let b=0;b<x;b+=8)m[b>>5]|=(h[b/8]&255)<<b%32;return m}function o(h,x){const m=(h&65535)+(x&65535);return(h>>16)+(x>>16)+(m>>16)<<16|m&65535}function a(h,x){return h<<x|h>>>32-x}function s(h,x,m,b,w,y){return o(a(o(o(x,h),o(b,y)),w),m)}function c(h,x,m,b,w,y,_){return s(x&m|~x&b,h,x,w,y,_)}function u(h,x,m,b,w,y,_){return s(x&b|m&~b,h,x,w,y,_)}function d(h,x,m,b,w,y,_){return s(x^m^b,h,x,w,y,_)}function p(h,x,m,b,w,y,_){return s(m^(x|~b),h,x,w,y,_)}var v=e;return ss.default=v,ss}var kA;function goe(){if(kA)return os;kA=1,Object.defineProperty(os,"__esModule",{value:!0}),os.default=void 0;var e=r(_B()),t=r(voe());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return os.default=i,os}var ls={},cs={},AA;function moe(){if(AA)return cs;AA=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return cs.default=t,cs}var MA;function boe(){if(MA)return ls;MA=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=void 0;var e=n(moe()),t=n(xB()),r=Nd();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 ls.default=o,ls}var us={},ds={},DA;function yoe(){if(DA)return ds;DA=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.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],m=a[3],b=a[4];for(let w=0;w<80;++w){const y=Math.floor(w/20),_=t(v,5)+e(y,h,x,m)+b+o[y]+p[w]>>>0;b=m,m=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]+m>>>0,a[4]=a[4]+b>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,a[0]&255,a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,a[1]&255,a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,a[2]&255,a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,a[3]&255,a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,a[4]&255]}var n=r;return ds.default=n,ds}var jA;function xoe(){if(jA)return us;jA=1,Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;var e=r(_B()),t=r(yoe());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return us.default=i,us}var fs={},qA;function woe(){if(qA)return fs;qA=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=void 0;var e="00000000-0000-0000-0000-000000000000";return fs.default=e,fs}var ps={},LA;function _oe(){if(LA)return ps;LA=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.default=void 0;var e=t(Rd());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 ps.default=n,ps}var zA;function Eoe(){return zA||(zA=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(hoe()),r=d(goe()),n=d(boe()),i=d(xoe()),o=d(woe()),a=d(_oe()),s=d(Rd()),c=d(Nd()),u=d(wB());function d(p){return p&&p.__esModule?p:{default:p}}})(yy)),yy}var xy,BA;function Soe(){if(BA)return xy;BA=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},xy=e,xy}var wy,FA;function Ooe(){if(FA)return wy;FA=1;var e=Soe();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",wy=t,wy}var _y,$A;function Coe(){if($A)return _y;$A=1;const{v4:e,validate:t}=Eoe(),r=Ooe(),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 _y=(()=>{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),m={shortIdLength:x,consistentLength:h.consistentLength,paddingChar:v[0]},b=r(r.HEX,v),w=r(v,r.HEX),y=()=>a(e(),b,m),S={alphabet:v,fromUUID:E=>a(E,b,m),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(A=>v.includes(A));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})(),_y}var EB=Coe();const SB=new yB;function Ioe(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 SB.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_=O.createContext(null),Roe=()=>({roles:{},privileges:{},flags:{touched:!1},date:void 0,selectedTab:"roles",forceLogin:!1,restrictedByDefault:!1,modals:{list:[]}}),Noe=({children:e,catalog:t=null,qodly:r=!1,catalogMethods:n=[],dataclasses:i={},singletons:o={},onSetTabFlags:a,initialState:s})=>{const[c,u]=O.useReducer(Ioe,{...Roe(),...s}),d=O.useMemo(()=>({catalog:t,qodly:r,catalogMethods:n,dataclasses:i,singletons:o,onSetTabFlags:a}),[t,r,n,i,o,a]);return C.jsx(M_.Provider,{value:{state:c,dispatch:u,external:d},children:e})};function Toe(){const e=O.useContext(M_);if(!e)throw new Error("useReducerAdapter must be used within a ReducerAdapterProvider");const{state:t,dispatch:r,external:n}=e,i=O.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:O.useCallback(()=>t.roles,[t.roles]),getPrivileges:O.useCallback(()=>t.privileges,[t.privileges]),getRolesFlags:O.useCallback(()=>t.flags,[t.flags]),getRolesAndPrivileges:O.useCallback(()=>i,[i]),getCatalog:O.useCallback(()=>n.catalog??null,[n.catalog]),getQodly:O.useCallback(()=>n.qodly??!1,[n.qodly]),getSelectedTab:O.useCallback(()=>t.selectedTab,[t.selectedTab]),getForceLogin:O.useCallback(()=>t.forceLogin??!1,[t.forceLogin]),getRestrictedByDefault:O.useCallback(()=>t.restrictedByDefault??!1,[t.restrictedByDefault]),getGuestPrivilege:O.useCallback(()=>Object.values(t.privileges).find(({privilege:o})=>o==="guest")??null,[t.privileges]),getCatalogMethods:O.useCallback(()=>n.catalogMethods??[],[n.catalogMethods]),getDataclasses:O.useCallback(()=>n.dataclasses??{},[n.dataclasses]),getSingletons:O.useCallback(()=>n.singletons??{},[n.singletons]),actions:{updateRoles:O.useCallback(o=>{r({type:"UPDATE_ROLES",payload:o})},[]),updatePrivileges:O.useCallback(o=>{r({type:"UPDATE_PRIVILEGES",payload:o})},[]),setRolesContent:O.useCallback(o=>{r({type:"SET_ROLES_CONTENT",payload:o})},[]),toggleTab:O.useCallback(o=>{r({type:"TOGGLE_TAB",payload:o})},[]),toggleForceLogin:O.useCallback(o=>{r({type:"TOGGLE_FORCE_LOGIN",payload:o})},[]),toggleRestrictedByDefault:O.useCallback(o=>{r({type:"TOGGLE_RESTRICTED_BY_DEFAULT",payload:o})},[]),setTabFlags:O.useCallback((o,a)=>{n.onSetTabFlags&&n.onSetTabFlags(o,a)},[n.onSetTabFlags]),openModal:O.useCallback(async o=>{const{type:a=fe.ModalType.ALERT}=o,s=EB.generate();return r({type:"CREATE_MODAL",payload:{id:s,type:a,isOpen:!0,...o}}),a===fe.ModalType.CONFIRM?new Promise(c=>{const u=SB.pipe(foe(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=lo.entries(((v=p.views)==null?void 0:v.toggles)||{}).reduce((m,b)=>({...m,[b[0]]:b[1].value}),{});r({type:"REMOVE_MODAL",payload:s}),u.unsubscribe(),c({confirmed:h,options:x})}})}):{confirmed:!1}},[r])}}}function Poe(){const e=O.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:O.useCallback(n=>{r({type:"CLOSE_MODAL",payload:n})},[r]),editModal:O.useCallback(n=>{r({type:"EDIT_MODAL",payload:n})},[r]),removeModal:O.useCallback(n=>{r({type:"REMOVE_MODAL",payload:n})},[r])}}const Ey=({child:e,parent:t,status:r,onSelect:n,currentPrivilegeId:i})=>{const o=pr(),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 C.jsxs(Zc,{color:r==="included"?"primary":"dark",onClick:r==="included"?c:s,disabled:r==="disabled",children:[e.privilege,C.jsx(_e.FdPlus,{className:Yr("transform transition-transform",{"rotate-45":r==="included"})})]})},koe=({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:C.jsxs(dr,{depth:1,className:"w-full border-b 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",children:"Include a privilege"}):C.jsx("div",{}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx(xu,{onChange:()=>n(!i),checked:i}),C.jsx("label",{className:"text-xs",children:" Show inherited permissions"})]})]}),C.jsxs("div",{className:"flex flex-wrap items-start justify-start gap-1",children:[s.map(d=>C.jsx(Ey,{child:d,parent:e,status:"included",onSelect:r,currentPrivilegeId:d.id},d.id)),u.map(d=>C.jsx(Ey,{child:d,parent:e,status:"available",onSelect:r,currentPrivilegeId:d.id},d.id)),c.map(d=>C.jsx(Ey,{child:d,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:d.id},d.id))]})]})},Aoe=({item:e,depth:t})=>{const r=pr(),[n,i]=O.useState(!1),o=r.getPrivileges(),a=fe.populateShallow(e.includes,o);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:s=>{s.stopPropagation(),i(!n)},children:C.jsx(_e.FdRight,{className:Yr("h-4 w-4",{"tranform rotate-90":n})})})," ",C.jsx("div",{children:e.privilege})]}),C.jsx("div",{className:"border-l pl-2",style:{marginLeft:t?t*4:3},children:n&&C.jsx(OB,{depth:t+1,data:a})})]})},OB=({data:e,depth:t=0})=>e.map(r=>r.includes.length?C.jsx(Aoe,{item:r,depth:t},r.id):C.jsx("div",{className:Yr("py-1 text-xs",{}),children:r.privilege},r.id)),xr=()=>document.querySelector(`.${w2.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,Td=({container:e,...t})=>C.jsx(fe.Portal,{...t,container:e||xr()}),HA=({privilege:e,selectedPrivilege:t,onSelect:r,isGuest:n=!1})=>{const i=pr(),o=i.getPrivileges(),a=fe.populateShallow(e.includes,o),[s,c]=O.useState(!1),[u,d]=O.useState(e.privilege),[p,v]=O.useState(null),h=fe.useOutsideClick(()=>{s&&b()});fe.useDidMountEffect(()=>{e.privilege!==u&&d(e.privilege)},[e.privilege]);function x(){c(!0),v(null)}function m(){c(!1),d(e.privilege)}function b(){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(L=>o[L].privilege!=="guest"),T=N.indexOf(e.id),A=Math.max(0,T-1),B=N[A];T===0?r(E[I[0]]):E[B]?r(E[B]):r(E[I[0]])}i.actions.updatePrivileges(E)}},y=O.useMemo(()=>e.resources.some(_=>_.exists===!1),[e]);return C.jsxs(Kr,{container:xr(),color:"negative",icon:C.jsx(_e.FdBulb,{}),label:"This privilege uses non-existing resources",isHidden:!y,children:[C.jsxs(dr,{depth:4,borderType:(t==null?void 0:t.id)===e.id?"primary":(t==null?void 0:t.id)!==e.id?"light":"default",className:Yr("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:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsxs("div",{className:"flex flex-1 items-center",children:[C.jsx("span",{className:"mr-4",children:n?C.jsx(_e.FdGuest,{className:"h-6 w-6"}):C.jsx(_e.FdGroup,{className:"h-6 w-6"})}),s?C.jsxs(wt.Root,{color:p?"negative":"primary",className:"flex-1 mr-2",children:[C.jsx(wt.Group,{children:C.jsx(wt.Field,{autoFocus:!0,value:u,onChange:_=>d(_.target.value),onKeyDown:_=>{_.key==="Enter"&&b(),_.key==="Escape"&&m()},onBlur:m,type:"text"})}),p&&C.jsx(wt.Message,{children:p})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:u})]}),n?C.jsx("div",{className:"flex items-center justify-center",children:C.jsx(Kr,{icon:C.jsx(_e.FdBulb,{}),label:C.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:C.jsx(_e.FdInfoBold,{className:"h-4 w-4"})})}):C.jsx("div",{className:"flex items-center space-x-2",children:s?C.jsxs(C.Fragment,{children:[C.jsx(Zt,{variant:"ghost",color:"white",onClick:m,children:C.jsx("span",{children:C.jsx(_e.FdClose,{className:"h-4 w-4"})})}),C.jsx(Zt,{variant:"ghost",color:"white",onClick:b,children:C.jsx("span",{children:C.jsx(_e.FdCheckCircle,{className:"h-4 w-4"})})})]}):C.jsxs(C.Fragment,{children:[C.jsx(Zt,{variant:"ghost",color:"white",onClick:x,children:C.jsx(_e.FdPen,{className:"h-4 w-4"})}),C.jsx(Zt,{variant:"ghost",color:"white",onClick:w,children:C.jsx(_e.FdTrash,{className:"h-4 w-4"})})]})})]}),a.length?C.jsx("div",{className:"ml-[43px]",children:C.jsx(OB,{data:a})}):null]})," "]})},Moe=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=pr(),i=n.getGuestPrivilege(),o=n.getCatalog(),a=O.useMemo(()=>{if(o===null||!i)return i;const s=fB({guest:i},Object.values((o==null?void 0:o.dataClasses)??{}));return pB(s,o).guest},[e,o]);return C.jsxs("div",{className:"flex flex-1 flex-col gap-y-4 overflow-auto p-4 pb-10 pt-1",children:[a?C.jsx(HA,{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])=>C.jsx(HA,{privilege:c,onSelect:t,selectedPrivilege:r},s)):C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsx("div",{className:"flex flex-1 items-center justify-center",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-inactive-text",children:[C.jsx(_e.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(_e.FdPlus,{className:"ml-2 inline h-4 w-4"})]})]})})})]})};var $c={exports:{}},Hc={exports:{}},ct={};/** @license React v16.13.1
|
|
89
89
|
* react-is.production.min.js
|
|
90
90
|
*
|
|
91
91
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -104,11 +104,11 @@ object-assign
|
|
|
104
104
|
(c) Sindre Sorhus
|
|
105
105
|
@license MIT
|
|
106
106
|
*/var Sy,GA;function qoe(){if(GA)return Sy;GA=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 Sy=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},Sy}var Oy,KA;function D_(){if(KA)return Oy;KA=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Oy=e,Oy}var Cy,YA;function IB(){return YA||(YA=1,Cy=Function.call.bind(Object.prototype.hasOwnProperty)),Cy}var Iy,XA;function Loe(){if(XA)return Iy;XA=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=D_(),r={},n=IB();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={})},Iy=i,Iy}var Ry,ZA;function zoe(){if(ZA)return Ry;ZA=1;var e=CB(),t=qoe(),r=D_(),n=IB(),i=Loe(),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 Ry=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function p(k){var W=k&&(u&&k[u]||k[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:B(),objectOf:T,oneOf:N,oneOfType:A,shape:D,exact:z};function x(k,W){return k===W?k!==0||1/k===1/W:k!==k&&W!==W}function m(k,W){this.message=k,this.data=W&&typeof W=="object"?W:{},this.stack=""}m.prototype=Error.prototype;function b(k){if(process.env.NODE_ENV!=="production")var W={},J=0;function ee(G,H,q,X,ne,te,ue){if(X=X||v,te=te||q,ue!==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]&&J<3&&(o("You are manually calling a React.PropTypes validation function for the `"+te+"` 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,J++)}}return H[q]==null?G?H[q]===null?new m("The "+ne+" `"+te+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new m("The "+ne+" `"+te+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:k(H,q,X,ne,te)}var j=ee.bind(null,!1);return j.isRequired=ee.bind(null,!0),j}function w(k){function W(J,ee,j,G,H,q){var X=J[ee],ne=$(X);if(ne!==k){var te=Y(X);return new m("Invalid "+G+" `"+H+"` of type "+("`"+te+"` supplied to `"+j+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return b(W)}function y(){return b(a)}function _(k){function W(J,ee,j,G,H){if(typeof k!="function")return new m("Property `"+H+"` of component `"+j+"` has invalid PropType notation inside arrayOf.");var q=J[ee];if(!Array.isArray(q)){var X=$(q);return new m("Invalid "+G+" `"+H+"` of type "+("`"+X+"` supplied to `"+j+"`, expected an array."))}for(var ne=0;ne<q.length;ne++){var te=k(q,ne,j,G,H+"["+ne+"]",r);if(te instanceof Error)return te}return null}return b(W)}function S(){function k(W,J,ee,j,G){var H=W[J];if(!s(H)){var q=$(H);return new m("Invalid "+j+" `"+G+"` of type "+("`"+q+"` supplied to `"+ee+"`, expected a single ReactElement."))}return null}return b(k)}function E(){function k(W,J,ee,j,G){var H=W[J];if(!e.isValidElementType(H)){var q=$(H);return new m("Invalid "+j+" `"+G+"` of type "+("`"+q+"` supplied to `"+ee+"`, expected a single ReactElement type."))}return null}return b(k)}function I(k){function W(J,ee,j,G,H){if(!(J[ee]instanceof k)){var q=k.name||v,X=Q(J[ee]);return new m("Invalid "+G+" `"+H+"` of type "+("`"+X+"` supplied to `"+j+"`, expected ")+("instance of `"+q+"`."))}return null}return b(W)}function N(k){if(!Array.isArray(k))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(J,ee,j,G,H){for(var q=J[ee],X=0;X<k.length;X++)if(x(q,k[X]))return null;var ne=JSON.stringify(k,function(ue,re){var ge=Y(re);return ge==="symbol"?String(re):re});return new m("Invalid "+G+" `"+H+"` of value `"+String(q)+"` "+("supplied to `"+j+"`, expected one of "+ne+"."))}return b(W)}function T(k){function W(J,ee,j,G,H){if(typeof k!="function")return new m("Property `"+H+"` of component `"+j+"` has invalid PropType notation inside objectOf.");var q=J[ee],X=$(q);if(X!=="object")return new m("Invalid "+G+" `"+H+"` of type "+("`"+X+"` supplied to `"+j+"`, expected an object."));for(var ne in q)if(n(q,ne)){var te=k(q,ne,j,G,H+"."+ne,r);if(te instanceof Error)return te}return null}return b(W)}function A(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var W=0;W<k.length;W++){var J=k[W];if(typeof J!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(J)+" at index "+W+"."),a}function ee(j,G,H,q,X){for(var ne=[],te=0;te<k.length;te++){var ue=k[te],re=ue(j,G,H,q,X,r);if(re==null)return null;re.data&&n(re.data,"expectedType")&&ne.push(re.data.expectedType)}var ge=ne.length>0?", expected one of type ["+ne.join(", ")+"]":"";return new m("Invalid "+q+" `"+X+"` supplied to "+("`"+H+"`"+ge+"."))}return b(ee)}function B(){function k(W,J,ee,j,G){return P(W[J])?null:new m("Invalid "+j+" `"+G+"` supplied to "+("`"+ee+"`, expected a ReactNode."))}return b(k)}function L(k,W,J,ee,j){return new m((k||"React class")+": "+W+" type `"+J+"."+ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+j+"`.")}function D(k){function W(J,ee,j,G,H){var q=J[ee],X=$(q);if(X!=="object")return new m("Invalid "+G+" `"+H+"` of type `"+X+"` "+("supplied to `"+j+"`, expected `object`."));for(var ne in k){var te=k[ne];if(typeof te!="function")return L(j,G,H,ne,Y(te));var ue=te(q,ne,j,G,H+"."+ne,r);if(ue)return ue}return null}return b(W)}function z(k){function W(J,ee,j,G,H){var q=J[ee],X=$(q);if(X!=="object")return new m("Invalid "+G+" `"+H+"` of type `"+X+"` "+("supplied to `"+j+"`, expected `object`."));var ne=t({},J[ee],k);for(var te in ne){var ue=k[te];if(n(k,te)&&typeof ue!="function")return L(j,G,H,te,Y(ue));if(!ue)return new m("Invalid "+G+" `"+H+"` key `"+te+"` supplied to `"+j+"`.\nBad object: "+JSON.stringify(J[ee],null," ")+`
|
|
107
|
-
Valid keys: `+JSON.stringify(Object.keys(k),null," "));var re=ue(q,te,j,G,H+"."+te,r);if(re)return re}return null}return b(W)}function P(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(P);if(k===null||s(k))return!0;var W=p(k);if(W){var J=W.call(k),ee;if(W!==k.entries){for(;!(ee=J.next()).done;)if(!P(ee.value))return!1}else for(;!(ee=J.next()).done;){var j=ee.value;if(j&&!P(j[1]))return!1}}else return!1;return!0;default:return!1}}function K(k,W){return k==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function $(k){var W=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":K(W,k)?"symbol":W}function Y(k){if(typeof k>"u"||k===null)return""+k;var W=$(k);if(W==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return W}function U(k){var W=Y(k);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function Q(k){return!k.constructor||!k.constructor.name?v:k.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},Ry}var Ny,JA;function Boe(){if(JA)return Ny;JA=1;var e=D_();function t(){}function r(){}return r.resetWarningCache=t,Ny=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},Ny}var QA;function Foe(){if(QA)return $c.exports;if(QA=1,process.env.NODE_ENV!=="production"){var e=CB(),t=!0;$c.exports=zoe()(e.isElement,t)}else $c.exports=Boe()();return $c.exports}var $oe=Foe();const hs=Li($oe);var eM={},vs,tM;function Wt(){if(tM)return vs;tM=1;var e=function(t){return t&&t.Math===Math&&t};return vs=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof At=="object"&&At)||e(typeof vs=="object"&&vs)||(function(){return this})()||Function("return this")(),vs}var Ty={},Py,rM;function _t(){return rM||(rM=1,Py=function(e){try{return!!e()}catch{return!0}}),Py}var ky,nM;function An(){if(nM)return ky;nM=1;var e=_t();return ky=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ky}var Ay,iM;function Pd(){if(iM)return Ay;iM=1;var e=_t();return Ay=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Ay}var My,oM;function zr(){if(oM)return My;oM=1;var e=Pd(),t=Function.prototype.call;return My=e?t.bind(t):function(){return t.apply(t,arguments)},My}var Dy={},aM;function RB(){if(aM)return Dy;aM=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Dy.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,Dy}var jy,sM;function j_(){return sM||(sM=1,jy=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),jy}var qy,lM;function bt(){if(lM)return qy;lM=1;var e=Pd(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return qy=e?n:function(i){return function(){return r.apply(i,arguments)}},qy}var Ly,cM;function Bi(){if(cM)return Ly;cM=1;var e=bt(),t=e({}.toString),r=e("".slice);return Ly=function(n){return r(t(n),8,-1)},Ly}var zy,uM;function kd(){if(uM)return zy;uM=1;var e=bt(),t=_t(),r=Bi(),n=Object,i=e("".split);return zy=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,zy}var By,dM;function ul(){return dM||(dM=1,By=function(e){return e==null}),By}var Fy,fM;function bo(){if(fM)return Fy;fM=1;var e=ul(),t=TypeError;return Fy=function(r){if(e(r))throw new t("Can't call method on "+r);return r},Fy}var $y,pM;function Ca(){if(pM)return $y;pM=1;var e=kd(),t=bo();return $y=function(r){return e(t(r))},$y}var Hy,hM;function Jt(){if(hM)return Hy;hM=1;var e=typeof document=="object"&&document.all;return Hy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},Hy}var Vy,vM;function sr(){if(vM)return Vy;vM=1;var e=Jt();return Vy=function(t){return typeof t=="object"?t!==null:e(t)},Vy}var Wy,gM;function Ad(){if(gM)return Wy;gM=1;var e=Wt(),t=Jt(),r=function(n){return t(n)?n:void 0};return Wy=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},Wy}var Uy,mM;function Md(){if(mM)return Uy;mM=1;var e=bt();return Uy=e({}.isPrototypeOf),Uy}var Gy,bM;function NB(){if(bM)return Gy;bM=1;var e=Wt(),t=e.navigator,r=t&&t.userAgent;return Gy=r?String(r):"",Gy}var Ky,yM;function q_(){if(yM)return Ky;yM=1;var e=Wt(),t=NB(),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]))),Ky=s,Ky}var Yy,xM;function TB(){if(xM)return Yy;xM=1;var e=q_(),t=_t(),r=Wt(),n=r.String;return Yy=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Yy}var Xy,wM;function PB(){if(wM)return Xy;wM=1;var e=TB();return Xy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Xy}var Zy,_M;function kB(){if(_M)return Zy;_M=1;var e=Ad(),t=Jt(),r=Md(),n=PB(),i=Object;return Zy=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},Zy}var Jy,EM;function L_(){if(EM)return Jy;EM=1;var e=String;return Jy=function(t){try{return e(t)}catch{return"Object"}},Jy}var Qy,SM;function dl(){if(SM)return Qy;SM=1;var e=Jt(),t=L_(),r=TypeError;return Qy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Qy}var e0,OM;function fl(){if(OM)return e0;OM=1;var e=dl(),t=ul();return e0=function(r,n){var i=r[n];return t(i)?void 0:e(i)},e0}var t0,CM;function Hoe(){if(CM)return t0;CM=1;var e=zr(),t=Jt(),r=sr(),n=TypeError;return t0=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")},t0}var r0={exports:{}},n0,IM;function Dd(){return IM||(IM=1,n0=!1),n0}var i0,RM;function z_(){if(RM)return i0;RM=1;var e=Wt(),t=Object.defineProperty;return i0=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},i0}var NM;function B_(){if(NM)return r0.exports;NM=1;var e=Dd(),t=Wt(),r=z_(),n="__core-js_shared__",i=r0.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"}),r0.exports}var o0,TM;function F_(){if(TM)return o0;TM=1;var e=B_();return o0=function(t,r){return e[t]||(e[t]=r||{})},o0}var a0,PM;function Ia(){if(PM)return a0;PM=1;var e=bo(),t=Object;return a0=function(r){return t(e(r))},a0}var s0,kM;function gn(){if(kM)return s0;kM=1;var e=bt(),t=Ia(),r=e({}.hasOwnProperty);return s0=Object.hasOwn||function(i,o){return r(t(i),o)},s0}var l0,AM;function $_(){if(AM)return l0;AM=1;var e=bt(),t=0,r=Math.random(),n=e(1.1.toString);return l0=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},l0}var c0,MM;function Sr(){if(MM)return c0;MM=1;var e=Wt(),t=F_(),r=gn(),n=$_(),i=TB(),o=PB(),a=e.Symbol,s=t("wks"),c=o?a.for||a:a&&a.withoutSetter||n;return c0=function(u){return r(s,u)||(s[u]=i&&r(a,u)?a[u]:c("Symbol."+u)),s[u]},c0}var u0,DM;function Voe(){if(DM)return u0;DM=1;var e=zr(),t=sr(),r=kB(),n=fl(),i=Hoe(),o=Sr(),a=TypeError,s=o("toPrimitive");return u0=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)},u0}var d0,jM;function AB(){if(jM)return d0;jM=1;var e=Voe(),t=kB();return d0=function(r){var n=e(r,"string");return t(n)?n:n+""},d0}var f0,qM;function H_(){if(qM)return f0;qM=1;var e=Wt(),t=sr(),r=e.document,n=t(r)&&t(r.createElement);return f0=function(i){return n?r.createElement(i):{}},f0}var p0,LM;function MB(){if(LM)return p0;LM=1;var e=An(),t=_t(),r=H_();return p0=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),p0}var zM;function DB(){if(zM)return Ty;zM=1;var e=An(),t=zr(),r=RB(),n=j_(),i=Ca(),o=AB(),a=gn(),s=MB(),c=Object.getOwnPropertyDescriptor;return Ty.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])},Ty}var h0={},v0,BM;function jB(){if(BM)return v0;BM=1;var e=An(),t=_t();return v0=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),v0}var g0,FM;function mn(){if(FM)return g0;FM=1;var e=sr(),t=String,r=TypeError;return g0=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},g0}var $M;function hi(){if($M)return h0;$M=1;var e=An(),t=MB(),r=jB(),n=mn(),i=AB(),o=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",u="configurable",d="writable";return h0.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 m=s(v,h);m&&m[d]&&(v[h]=x.value,x={configurable:u in x?x[u]:m[u],enumerable:c in x?x[c]:m[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},h0}var m0,HM;function pl(){if(HM)return m0;HM=1;var e=An(),t=hi(),r=j_();return m0=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},m0}var b0={exports:{}},y0,VM;function V_(){if(VM)return y0;VM=1;var e=An(),t=gn(),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 y0={EXISTS:i,PROPER:o,CONFIGURABLE:a},y0}var x0,WM;function qB(){if(WM)return x0;WM=1;var e=bt(),t=Jt(),r=B_(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),x0=r.inspectSource,x0}var w0,UM;function LB(){if(UM)return w0;UM=1;var e=Wt(),t=Jt(),r=e.WeakMap;return w0=t(r)&&/native code/.test(String(r)),w0}var _0,GM;function W_(){if(GM)return _0;GM=1;var e=F_(),t=$_(),r=e("keys");return _0=function(n){return r[n]||(r[n]=t(n))},_0}var E0,KM;function jd(){return KM||(KM=1,E0={}),E0}var S0,YM;function Ra(){if(YM)return S0;YM=1;var e=LB(),t=Wt(),r=sr(),n=pl(),i=gn(),o=B_(),a=W_(),s=jd(),c="Object already initialized",u=t.TypeError,d=t.WeakMap,p,v,h,x=function(y){return h(y)?v(y):p(y,{})},m=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 b=o.state||(o.state=new d);b.get=b.get,b.has=b.has,b.set=b.set,p=function(y,_){if(b.has(y))throw new u(c);return _.facade=y,b.set(y,_),_},v=function(y){return b.get(y)||{}},h=function(y){return b.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 S0={set:p,get:v,has:h,enforce:x,getterFor:m},S0}var XM;function zB(){if(XM)return b0.exports;XM=1;var e=bt(),t=_t(),r=Jt(),n=gn(),i=An(),o=V_().CONFIGURABLE,a=qB(),s=Ra(),c=s.enforce,u=s.get,d=String,p=Object.defineProperty,v=e("".slice),h=e("".replace),x=e([].join),m=i&&!t(function(){return p(function(){},"length",{value:8}).length!==8}),b=String(String).split("String"),w=b0.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=_),m&&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(b,typeof _=="string"?_:"")),y};return Function.prototype.toString=w(function(){return r(this)&&u(this).source||a(this)},"toString"),b0.exports}var O0,ZM;function yo(){if(ZM)return O0;ZM=1;var e=Jt(),t=hi(),r=zB(),n=z_();return O0=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},O0}var C0={},I0,JM;function Woe(){if(JM)return I0;JM=1;var e=Math.ceil,t=Math.floor;return I0=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},I0}var R0,QM;function qd(){if(QM)return R0;QM=1;var e=Woe();return R0=function(t){var r=+t;return r!==r||r===0?0:e(r)},R0}var N0,eD;function Uoe(){if(eD)return N0;eD=1;var e=qd(),t=Math.max,r=Math.min;return N0=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},N0}var T0,tD;function U_(){if(tD)return T0;tD=1;var e=qd(),t=Math.min;return T0=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},T0}var P0,rD;function Ld(){if(rD)return P0;rD=1;var e=U_();return P0=function(t){return e(t.length)},P0}var k0,nD;function Goe(){if(nD)return k0;nD=1;var e=Ca(),t=Uoe(),r=Ld(),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 k0={includes:n(!0),indexOf:n(!1)},k0}var A0,iD;function BB(){if(iD)return A0;iD=1;var e=bt(),t=gn(),r=Ca(),n=Goe().indexOf,i=jd(),o=e([].push);return A0=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},A0}var M0,oD;function G_(){return oD||(oD=1,M0=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),M0}var aD;function K_(){if(aD)return C0;aD=1;var e=BB(),t=G_(),r=t.concat("length","prototype");return C0.f=Object.getOwnPropertyNames||function(i){return e(i,r)},C0}var D0={},sD;function FB(){return sD||(sD=1,D0.f=Object.getOwnPropertySymbols),D0}var j0,lD;function Koe(){if(lD)return j0;lD=1;var e=Ad(),t=bt(),r=K_(),n=FB(),i=mn(),o=t([].concat);return j0=e("Reflect","ownKeys")||function(s){var c=r.f(i(s)),u=n.f;return u?o(c,u(s)):c},j0}var q0,cD;function Yoe(){if(cD)return q0;cD=1;var e=gn(),t=Koe(),r=DB(),n=hi();return q0=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))}},q0}var L0,uD;function $B(){if(uD)return L0;uD=1;var e=_t(),t=Jt(),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 L0=n,L0}var z0,dD;function Fi(){if(dD)return z0;dD=1;var e=Wt(),t=DB().f,r=pl(),n=yo(),i=z_(),o=Yoe(),a=$B();return z0=function(s,c){var u=s.target,d=s.global,p=s.stat,v,h,x,m,b,w;if(d?h=e:p?h=e[u]||i(u,{}):h=e[u]&&e[u].prototype,h)for(x in c){if(b=c[x],s.dontCallGetSet?(w=t(h,x),m=w&&w.value):m=h[x],v=a(d?x:u+(p?".":"#")+x,s.forced),!v&&m!==void 0){if(typeof b==typeof m)continue;o(b,m)}(s.sham||m&&m.sham)&&r(b,"sham",!0),n(h,x,b,s)}},z0}var B0,fD;function Y_(){if(fD)return B0;fD=1;var e=Sr(),t=e("toStringTag"),r={};return r[t]="z",B0=String(r)==="[object z]",B0}var F0,pD;function zd(){if(pD)return F0;pD=1;var e=Y_(),t=Jt(),r=Bi(),n=Sr(),i=n("toStringTag"),o=Object,a=r((function(){return arguments})())==="Arguments",s=function(c,u){try{return c[u]}catch{}};return F0=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},F0}var $0,hD;function xo(){if(hD)return $0;hD=1;var e=zd(),t=String;return $0=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},$0}var H0,vD;function HB(){return vD||(vD=1,H0=`
|
|
108
|
-
\v\f\r \u2028\u2029\uFEFF`),H0}var V0,gD;function Xoe(){if(gD)return V0;gD=1;var e=bt(),t=bo(),r=xo(),n=HB(),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 W0,mD;function Zoe(){if(mD)return W0;mD=1;var e=Wt(),t=_t(),r=bt(),n=xo(),i=Xoe().trim,o=HB(),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 W0=p?function(h,x){var m=i(n(h));return a(m,x>>>0||(d(u,m)?16:10))}:a,W0}var bD;function Joe(){if(bD)return eM;bD=1;var e=Fi(),t=Zoe();return e({global:!0,forced:parseInt!==t},{parseInt:t}),eM}Joe();var yD={},U0,xD;function VB(){if(xD)return U0;xD=1;var e=BB(),t=G_();return U0=Object.keys||function(n){return e(n,t)},U0}var G0,wD;function Qoe(){if(wD)return G0;wD=1;var e=An(),t=bt(),r=zr(),n=_t(),i=VB(),o=FB(),a=RB(),s=Ia(),c=kd(),u=Object.assign,d=Object.defineProperty,p=t([].concat);return G0=!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"),m="abcdefghijklmnopqrst";return v[x]=7,m.split("").forEach(function(b){h[b]=b}),u({},v)[x]!==7||i(u({},h)).join("")!==m})?function(h,x){for(var m=s(h),b=arguments.length,w=1,y=o.f,_=a.f;b>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))&&(m[T]=S[T]);return m}:u,G0}var _D;function eae(){if(_D)return yD;_D=1;var e=Fi(),t=Qoe();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),yD}eae();var ED={},K0,SD;function tae(){if(SD)return K0;SD=1;var e=Bi(),t=bt();return K0=function(r){if(e(r)==="Function")return t(r)},K0}var Y0,OD;function WB(){if(OD)return Y0;OD=1;var e=tae(),t=dl(),r=Pd(),n=e(e.bind);return Y0=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},Y0}var X0,CD;function rae(){if(CD)return X0;CD=1;var e=Bi();return X0=Array.isArray||function(r){return e(r)==="Array"},X0}var Z0,ID;function nae(){if(ID)return Z0;ID=1;var e=bt(),t=_t(),r=Jt(),n=zd(),i=Ad(),o=qB(),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,Z0=!s||t(function(){var h;return p(p.call)||!p(Object)||!p(function(){h=!0})||h})?v:p,Z0}var J0,RD;function iae(){if(RD)return J0;RD=1;var e=rae(),t=nae(),r=sr(),n=Sr(),i=n("species"),o=Array;return J0=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},J0}var Q0,ND;function oae(){if(ND)return Q0;ND=1;var e=iae();return Q0=function(t,r){return new(e(t))(r===0?0:r)},Q0}var ex,TD;function UB(){if(TD)return ex;TD=1;var e=WB(),t=bt(),r=kd(),n=Ia(),i=Ld(),o=oae(),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,m=c===5||h;return function(b,w,y,_){for(var S=n(b),E=r(S),I=i(E),N=e(w,y),T=0,A=_||o,B=u?A(b,I):d||x?A(b,0):void 0,L,D;I>T;T++)if((m||T in E)&&(L=E[T],D=N(L,T,S),c))if(u)B[T]=D;else if(D)switch(c){case 3:return!0;case 5:return L;case 6:return T;case 2:a(B,L)}else switch(c){case 4:return!1;case 7:a(B,L)}return h?-1:p||v?v:B}};return ex={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},ex}var tx,PD;function aae(){if(PD)return tx;PD=1;var e=_t(),t=Sr(),r=q_(),n=t("species");return tx=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},tx}var kD;function sae(){if(kD)return ED;kD=1;var e=Fi(),t=UB().filter,r=aae(),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)}}),ED}sae();var AD={},rx,MD;function lae(){if(MD)return rx;MD=1;var e=Y_(),t=zd();return rx=e?{}.toString:function(){return"[object "+t(this)+"]"},rx}var DD;function cae(){if(DD)return AD;DD=1;var e=Y_(),t=yo(),r=lae();return e||t(Object.prototype,"toString",r,{unsafe:!0}),AD}cae();var nx={},jD;function uae(){if(jD)return nx;jD=1;var e=An(),t=jB(),r=hi(),n=mn(),i=Ca(),o=VB();return nx.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},nx}var ix,qD;function dae(){if(qD)return ix;qD=1;var e=Ad();return ix=e("document","documentElement"),ix}var ox,LD;function Bd(){if(LD)return ox;LD=1;var e=mn(),t=uae(),r=G_(),n=jd(),i=dae(),o=H_(),a=W_(),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,_},m=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},b,w=function(){try{b=new ActiveXObject("htmlfile")}catch{}w=typeof document<"u"?document.domain&&b?x(b):m():x(b);for(var y=r.length;y--;)delete w[u][r[y]];return w()};return n[p]=!0,ox=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)},ox}var ax,zD;function fae(){if(zD)return ax;zD=1;var e=Sr(),t=Bd(),r=hi().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),ax=function(o){i[n][o]=!0},ax}var sx,BD;function hl(){return BD||(BD=1,sx={}),sx}var lx,FD;function pae(){if(FD)return lx;FD=1;var e=_t();return lx=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),lx}var cx,$D;function GB(){if($D)return cx;$D=1;var e=gn(),t=Jt(),r=Ia(),n=W_(),i=pae(),o=n("IE_PROTO"),a=Object,s=a.prototype;return cx=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},cx}var ux,HD;function KB(){if(HD)return ux;HD=1;var e=_t(),t=Jt(),r=sr(),n=Bd(),i=GB(),o=yo(),a=Sr(),s=Dd(),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}),ux={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:u},ux}var dx,VD;function Fd(){if(VD)return dx;VD=1;var e=hi().f,t=gn(),r=Sr(),n=r("toStringTag");return dx=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},dx}var fx,WD;function hae(){if(WD)return fx;WD=1;var e=KB().IteratorPrototype,t=Bd(),r=j_(),n=Fd(),i=hl(),o=function(){return this};return fx=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},fx}var px,UD;function vae(){if(UD)return px;UD=1;var e=bt(),t=dl();return px=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},px}var hx,GD;function gae(){if(GD)return hx;GD=1;var e=sr();return hx=function(t){return e(t)||t===null},hx}var vx,KD;function mae(){if(KD)return vx;KD=1;var e=gae(),t=String,r=TypeError;return vx=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},vx}var gx,YD;function YB(){if(YD)return gx;YD=1;var e=vae(),t=sr(),r=bo(),n=mae();return gx=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),gx}var mx,XD;function XB(){if(XD)return mx;XD=1;var e=Fi(),t=zr(),r=Dd(),n=V_(),i=Jt(),o=hae(),a=GB(),s=YB(),c=Fd(),u=pl(),d=yo(),p=Sr(),v=hl(),h=KB(),x=n.PROPER,m=n.CONFIGURABLE,b=h.IteratorPrototype,w=h.BUGGY_SAFARI_ITERATORS,y=p("iterator"),_="keys",S="values",E="entries",I=function(){return this};return mx=function(N,T,A,B,L,D,z){o(A,T,B);var P=function(j){if(j===L&&Q)return Q;if(!w&&j&&j in Y)return Y[j];switch(j){case _:return function(){return new A(this,j)};case S:return function(){return new A(this,j)};case E:return function(){return new A(this,j)}}return function(){return new A(this)}},K=T+" Iterator",$=!1,Y=N.prototype,U=Y[y]||Y["@@iterator"]||L&&Y[L],Q=!w&&U||P(L),k=T==="Array"&&Y.entries||U,W,J,ee;if(k&&(W=a(k.call(new N)),W!==Object.prototype&&W.next&&(!r&&a(W)!==b&&(s?s(W,b):i(W[y])||d(W,y,I)),c(W,K,!0,!0),r&&(v[K]=I))),x&&L===S&&U&&U.name!==S&&(!r&&m?u(Y,"name",S):($=!0,Q=function(){return t(U,this)})),L)if(J={values:P(S),keys:D?Q:P(_),entries:P(E)},z)for(ee in J)(w||$||!(ee in Y))&&d(Y,ee,J[ee]);else e({target:T,proto:!0,forced:w||$},J);return(!r||z)&&Y[y]!==Q&&d(Y,y,Q,{name:L}),v[T]=Q,J},mx}var bx,ZD;function ZB(){return ZD||(ZD=1,bx=function(e,t){return{value:e,done:t}}),bx}var yx,JD;function JB(){if(JD)return yx;JD=1;var e=Ca(),t=fae(),r=hl(),n=Ra(),i=hi().f,o=XB(),a=ZB(),s=Dd(),c=An(),u="Array Iterator",d=n.set,p=n.getterFor(u);yx=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,m=h.index++;if(!x||m>=x.length)return h.target=null,a(void 0,!0);switch(h.kind){case"keys":return a(m,!1);case"values":return a(x[m],!1)}return a([m,x[m]],!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 yx}JB();var QD={},xx,ej;function QB(){if(ej)return xx;ej=1;var e=bt(),t=qd(),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,m;return v<0||v>=h?c?"":void 0:(x=o(p,v),x<55296||x>56319||v+1===h||(m=o(p,v+1))<56320||m>57343?c?i(p,v):x:c?a(p,v,v+2):(x-55296<<10)+(m-56320)+65536)}};return xx={codeAt:s(!1),charAt:s(!0)},xx}var tj;function bae(){if(tj)return QD;tj=1;var e=QB().charAt,t=xo(),r=Ra(),n=XB(),i=ZB(),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))}),QD}bae();var rj={},nj={},wx,ij;function eF(){if(ij)return wx;ij=1;var e=_t();return wx=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),wx}var _x,oj;function tF(){if(oj)return _x;oj=1;var e=yo();return _x=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},_x}var Ex={exports:{}},Sx={},Ox,aj;function yae(){if(aj)return Ox;aj=1;var e=bt();return Ox=e([].slice),Ox}var sj;function xae(){if(sj)return Sx;sj=1;var e=Bi(),t=Ca(),r=K_().f,n=yae(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return Sx.f=function(s){return i&&e(s)==="Window"?o(s):r(t(s))},Sx}var Cx,lj;function wae(){if(lj)return Cx;lj=1;var e=_t();return Cx=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),Cx}var Ix,cj;function _ae(){if(cj)return Ix;cj=1;var e=_t(),t=sr(),r=Bi(),n=wae(),i=Object.isExtensible,o=e(function(){});return Ix=o||n?function(s){return!t(s)||n&&r(s)==="ArrayBuffer"?!1:i?i(s):!0}:i,Ix}var uj;function X_(){if(uj)return Ex.exports;uj=1;var e=Fi(),t=bt(),r=jd(),n=sr(),i=gn(),o=hi().f,a=K_(),s=xae(),c=_ae(),u=$_(),d=eF(),p=!1,v=u("meta"),h=0,x=function(S){o(S,v,{value:{objectID:"O"+h++,weakData:{}}})},m=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},b=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),A=0,B=T.length;A<B;A++)if(T[A]===v){E(T,A,1);break}return T},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},_=Ex.exports={enable:y,fastKey:m,getWeakData:b,onFreeze:w};return r[v]=!0,Ex.exports}var Rx,dj;function Eae(){if(dj)return Rx;dj=1;var e=Sr(),t=hl(),r=e("iterator"),n=Array.prototype;return Rx=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},Rx}var Nx,fj;function rF(){if(fj)return Nx;fj=1;var e=zd(),t=fl(),r=ul(),n=hl(),i=Sr(),o=i("iterator");return Nx=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},Nx}var Tx,pj;function Sae(){if(pj)return Tx;pj=1;var e=zr(),t=dl(),r=mn(),n=L_(),i=rF(),o=TypeError;return Tx=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")},Tx}var Px,hj;function Oae(){if(hj)return Px;hj=1;var e=zr(),t=mn(),r=fl();return Px=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},Px}var kx,vj;function nF(){if(vj)return kx;vj=1;var e=WB(),t=zr(),r=mn(),n=L_(),i=Eae(),o=Ld(),a=Md(),s=Sae(),c=rF(),u=Oae(),d=TypeError,p=function(h,x){this.stopped=h,this.result=x},v=p.prototype;return kx=function(h,x,m){var b=m&&m.that,w=!!(m&&m.AS_ENTRIES),y=!!(m&&m.IS_RECORD),_=!!(m&&m.IS_ITERATOR),S=!!(m&&m.INTERRUPTED),E=e(x,b),I,N,T,A,B,L,D,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,A=o(h);A>T;T++)if(B=P(h[T]),B&&a(v,B))return B;return new p(!1)}I=s(h,N)}for(L=y?h.next:I.next;!(D=t(L,I)).done;){try{B=P(D.value)}catch(K){u(I,"throw",K)}if(typeof B=="object"&&B&&a(v,B))return B}return new p(!1)},kx}var Ax,gj;function iF(){if(gj)return Ax;gj=1;var e=Md(),t=TypeError;return Ax=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},Ax}var Mx,mj;function Cae(){if(mj)return Mx;mj=1;var e=Sr(),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 Dx,bj;function Iae(){if(bj)return Dx;bj=1;var e=Jt(),t=sr(),r=YB();return Dx=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},Dx}var jx,yj;function Rae(){if(yj)return jx;yj=1;var e=Fi(),t=Wt(),r=bt(),n=$B(),i=yo(),o=X_(),a=nF(),s=iF(),c=Jt(),u=ul(),d=sr(),p=_t(),v=Cae(),h=Fd(),x=Iae();return jx=function(m,b,w){var y=m.indexOf("Map")!==-1,_=m.indexOf("Weak")!==-1,S=y?"set":"add",E=t[m],I=E&&E.prototype,N=E,T={},A=function($){var Y=r(I[$]);i(I,$,$==="add"?function(Q){return Y(this,Q===0?0:Q),this}:$==="delete"?function(U){return _&&!d(U)?!1:Y(this,U===0?0:U)}:$==="get"?function(Q){return _&&!d(Q)?void 0:Y(this,Q===0?0:Q)}:$==="has"?function(Q){return _&&!d(Q)?!1:Y(this,Q===0?0:Q)}:function(Q,k){return Y(this,Q===0?0:Q,k),this})},B=n(m,!c(E)||!(_||I.forEach&&!p(function(){new E().entries().next()})));if(B)N=w.getConstructor(b,m,y,S),o.enable();else if(n(m,!0)){var L=new N,D=L[S](_?{}:-0,1)!==L,z=p(function(){L.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=b(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)&&(A("delete"),A("has"),y&&A("get")),(K||D)&&A(S),_&&I.clear&&delete I.clear}return T[m]=N,e({global:!0,constructor:!0,forced:N!==E},T),h(N,m),_||w.setStrong(N,m,y),N},jx}var qx,xj;function Nae(){if(xj)return qx;xj=1;var e=bt(),t=tF(),r=X_().getWeakData,n=iF(),i=mn(),o=ul(),a=sr(),s=nF(),c=UB(),u=gn(),d=Ra(),p=d.set,v=d.getterFor,h=c.find,x=c.findIndex,m=e([].splice),b=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&&m(this.entries,E,1),!!~E}},qx={getConstructor:function(S,E,I,N){var T=S(function(D,z){n(D,A),p(D,{type:E,id:b++,frozen:null}),o(z)||s(z,D[N],{that:D,AS_ENTRIES:I})}),A=T.prototype,B=v(E),L=function(D,z,P){var K=B(D),$=r(i(z),!0);return $===!0?w(K).set(z,P):$[K.id]=P,D};return t(A,{delete:function(D){var z=B(this);if(!a(D))return!1;var P=r(D);return P===!0?w(z).delete(D):P&&u(P,z.id)&&delete P[z.id]},has:function(z){var P=B(this);if(!a(z))return!1;var K=r(z);return K===!0?w(P).has(z):K&&u(K,P.id)}}),t(A,I?{get:function(z){var P=B(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 L(this,z,P)}}:{add:function(z){return L(this,z,!0)}}),T}},qx}var wj;function Tae(){if(wj)return nj;wj=1;var e=eF(),t=Wt(),r=bt(),n=tF(),i=X_(),o=Rae(),a=Nae(),s=sr(),c=Ra().enforce,u=_t(),d=LB(),p=Object,v=Array.isArray,h=p.isExtensible,x=p.isFrozen,m=p.isSealed,b=p.freeze,w=p.seal,y=!t.ActiveXObject&&"ActiveXObject"in t,_,S=function(D){return function(){return D(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 D=b([]);return N(new E,D,1),!x(D)})};if(d)if(y){_=a.getConstructor(S,"WeakMap",!0),i.enable();var A=r(I.delete),B=r(I.has),L=r(I.get);n(I,{delete:function(D){if(s(D)&&!h(D)){var z=c(this);return z.frozen||(z.frozen=new _),A(this,D)||z.frozen.delete(D)}return A(this,D)},has:function(z){if(s(z)&&!h(z)){var P=c(this);return P.frozen||(P.frozen=new _),B(this,z)||P.frozen.has(z)}return B(this,z)},get:function(z){if(s(z)&&!h(z)){var P=c(this);return P.frozen||(P.frozen=new _),B(this,z)?L(this,z):P.frozen.get(z)}return L(this,z)},set:function(z,P){if(s(z)&&!h(z)){var K=c(this);K.frozen||(K.frozen=new _),B(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=b:m(z)&&(K=w)),N(this,z,P),K&&K(z),this}});return nj}var _j;function Pae(){return _j||(_j=1,Tae()),rj}Pae();var Ej={},Lx,Sj;function kae(){return Sj||(Sj=1,Lx={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}),Lx}var zx,Oj;function Aae(){if(Oj)return zx;Oj=1;var e=H_(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return zx=r===Object.prototype?void 0:r,zx}var Cj;function Mae(){if(Cj)return Ej;Cj=1;var e=Wt(),t=kae(),r=Aae(),n=JB(),i=pl(),o=Fd(),a=Sr(),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"),Ej}Mae();var Bx,Ij;function Dae(){if(Ij)return Bx;Ij=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,m=function(){return d.Date.now()};function b(I,N,T){var A,B,L,D,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,L=Y?h(E(T.maxWait)||0,N):L,U="trailing"in T?!!T.trailing:U);function Q(X){var ne=A,te=B;return A=B=void 0,K=X,D=I.apply(te,ne),D}function k(X){return K=X,z=setTimeout(ee,N),$?Q(X):D}function W(X){var ne=X-P,te=X-K,ue=N-ne;return Y?x(ue,L-te):ue}function J(X){var ne=X-P,te=X-K;return P===void 0||ne>=N||ne<0||Y&&te>=L}function ee(){var X=m();if(J(X))return j(X);z=setTimeout(ee,W(X))}function j(X){return z=void 0,U&&A?Q(X):(A=B=void 0,D)}function G(){z!==void 0&&clearTimeout(z),K=0,A=P=B=z=void 0}function H(){return z===void 0?D:j(m())}function q(){var X=m(),ne=J(X);if(A=arguments,B=this,P=X,ne){if(z===void 0)return k(P);if(Y)return z=setTimeout(ee,N),Q(P)}return z===void 0&&(z=setTimeout(ee,N)),D}return q.cancel=G,q.flush=H,q}function w(I,N,T){var A=!0,B=!0;if(typeof I!="function")throw new TypeError(e);return y(T)&&(A="leading"in T?!!T.leading:A,B="trailing"in T?!!T.trailing:B),b(I,N,{leading:A,maxWait:N,trailing:B})}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 Bx=w,Bx}var jae=Dae();const Rj=Li(jae);var Fx,Nj;function qae(){if(Nj)return Fx;Nj=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,m=function(){return d.Date.now()};function b(E,I,N){var T,A,B,L,D,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,B=$?h(S(N.maxWait)||0,I):B,Y="trailing"in N?!!N.trailing:Y);function U(q){var X=T,ne=A;return T=A=void 0,P=q,L=E.apply(ne,X),L}function Q(q){return P=q,D=setTimeout(J,I),K?U(q):L}function k(q){var X=q-z,ne=q-P,te=I-X;return $?x(te,B-ne):te}function W(q){var X=q-z,ne=q-P;return z===void 0||X>=I||X<0||$&&ne>=B}function J(){var q=m();if(W(q))return ee(q);D=setTimeout(J,k(q))}function ee(q){return D=void 0,Y&&T?U(q):(T=A=void 0,L)}function j(){D!==void 0&&clearTimeout(D),P=0,T=z=A=D=void 0}function G(){return D===void 0?L:ee(m())}function H(){var q=m(),X=W(q);if(T=arguments,A=this,z=q,X){if(D===void 0)return Q(z);if($)return D=setTimeout(J,I),U(z)}return D===void 0&&(D=setTimeout(J,I)),L}return H.cancel=j,H.flush=G,H}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 Fx=b,Fx}var Lae=qae();const Tj=Li(Lae);var $x,Pj;function zae(){if(Pj)return $x;Pj=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(se,le){return se==null?void 0:se[le]}function d(se){var le=!1;if(se!=null&&typeof se.toString!="function")try{le=!!(se+"")}catch{}return le}var p=Array.prototype,v=Function.prototype,h=Object.prototype,x=c["__core-js_shared__"],m=(function(){var se=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||"");return se?"Symbol(src)_1."+se:""})(),b=v.toString,w=h.hasOwnProperty,y=h.toString,_=RegExp("^"+b.call(w).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=p.splice,E=X(c,"Map"),I=X(Object,"create");function N(se){var le=-1,we=se?se.length:0;for(this.clear();++le<we;){var Oe=se[le];this.set(Oe[0],Oe[1])}}function T(){this.__data__=I?I(null):{}}function A(se){return this.has(se)&&delete this.__data__[se]}function B(se){var le=this.__data__;if(I){var we=le[se];return we===t?void 0:we}return w.call(le,se)?le[se]:void 0}function L(se){var le=this.__data__;return I?le[se]!==void 0:w.call(le,se)}function D(se,le){var we=this.__data__;return we[se]=I&&le===void 0?t:le,this}N.prototype.clear=T,N.prototype.delete=A,N.prototype.get=B,N.prototype.has=L,N.prototype.set=D;function z(se){var le=-1,we=se?se.length:0;for(this.clear();++le<we;){var Oe=se[le];this.set(Oe[0],Oe[1])}}function P(){this.__data__=[]}function K(se){var le=this.__data__,we=G(le,se);if(we<0)return!1;var Oe=le.length-1;return we==Oe?le.pop():S.call(le,we,1),!0}function $(se){var le=this.__data__,we=G(le,se);return we<0?void 0:le[we][1]}function Y(se){return G(this.__data__,se)>-1}function U(se,le){var we=this.__data__,Oe=G(we,se);return Oe<0?we.push([se,le]):we[Oe][1]=le,this}z.prototype.clear=P,z.prototype.delete=K,z.prototype.get=$,z.prototype.has=Y,z.prototype.set=U;function Q(se){var le=-1,we=se?se.length:0;for(this.clear();++le<we;){var Oe=se[le];this.set(Oe[0],Oe[1])}}function k(){this.__data__={hash:new N,map:new(E||z),string:new N}}function W(se){return q(this,se).delete(se)}function J(se){return q(this,se).get(se)}function ee(se){return q(this,se).has(se)}function j(se,le){return q(this,se).set(se,le),this}Q.prototype.clear=k,Q.prototype.delete=W,Q.prototype.get=J,Q.prototype.has=ee,Q.prototype.set=j;function G(se,le){for(var we=se.length;we--;)if(ge(se[we][0],le))return we;return-1}function H(se){if(!xe(se)||te(se))return!1;var le=de(se)||d(se)?_:o;return le.test(ue(se))}function q(se,le){var we=se.__data__;return ne(le)?we[typeof le=="string"?"string":"hash"]:we.map}function X(se,le){var we=u(se,le);return H(we)?we:void 0}function ne(se){var le=typeof se;return le=="string"||le=="number"||le=="symbol"||le=="boolean"?se!=="__proto__":se===null}function te(se){return!!m&&m in se}function ue(se){if(se!=null){try{return b.call(se)}catch{}try{return se+""}catch{}}return""}function re(se,le){if(typeof se!="function"||le&&typeof le!="function")throw new TypeError(e);var we=function(){var Oe=arguments,Te=le?le.apply(this,Oe):Oe[0],qe=we.cache;if(qe.has(Te))return qe.get(Te);var Ue=se.apply(this,Oe);return we.cache=qe.set(Te,Ue),Ue};return we.cache=new(re.Cache||Q),we}re.Cache=Q;function ge(se,le){return se===le||se!==se&&le!==le}function de(se){var le=xe(se)?y.call(se):"";return le==r||le==n}function xe(se){var le=typeof se;return!!se&&(le=="object"||le=="function")}return $x=re,$x}var Bae=zae();const Fae=Li(Bae);var lo=[],$ae=function(){return lo.some(function(e){return e.activeTargets.length>0})},Hae=function(){return lo.some(function(e){return e.skippedTargets.length>0})},kj="ResizeObserver loop completed with undelivered notifications.",Vae=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:kj}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=kj),window.dispatchEvent(e)},Ws;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ws||(Ws={}));var co=function(e){return Object.freeze(e)},Wae=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,co(this)}return e})(),oF=(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})(),Z_=function(e){return e instanceof SVGElement&&"getBBox"in e},aF=function(e){if(Z_(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)},Aj=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)},Uae=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},Ps=typeof window<"u"?window:{},Vc=new WeakMap,Mj=/auto|scroll/,Gae=/^tb|vertical/,Kae=/msie|trident/i.test(Ps.navigator&&Ps.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 Wae((r?t:e)||0,(r?e:t)||0)},Dj=co({devicePixelContentBoxSize:na(),borderBoxSize:na(),contentBoxSize:na(),contentRect:new oF(0,0,0,0)}),sF=function(e,t){if(t===void 0&&(t=!1),Vc.has(e)&&!t)return Vc.get(e);if(aF(e))return Vc.set(e,Dj),Dj;var r=getComputedStyle(e),n=Z_(e)&&e.ownerSVGElement&&e.getBBox(),i=!Kae&&r.boxSizing==="border-box",o=Gae.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),m=n?0:Ln(r.borderLeftWidth),b=p+u,w=c+d,y=m+h,_=v+x,S=s?e.offsetHeight-_-e.clientHeight:0,E=a?e.offsetWidth-y-e.clientWidth:0,I=i?b+y:0,N=i?w+_:0,T=n?n.width:Ln(r.width)-I-E,A=n?n.height:Ln(r.height)-N-S,B=T+b+E+y,L=A+w+S+_,D=co({devicePixelContentBoxSize:na(Math.round(T*devicePixelRatio),Math.round(A*devicePixelRatio),o),borderBoxSize:na(B,L,o),contentBoxSize:na(T,A,o),contentRect:new oF(p,c,T,A)});return Vc.set(e,D),D},lF=function(e,t,r){var n=sF(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case Ws.DEVICE_PIXEL_CONTENT_BOX:return a;case Ws.BORDER_BOX:return i;default:return o}},Yae=(function(){function e(t){var r=sF(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})(),cF=function(e){if(aF(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},Xae=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 Yae(u.target),p=cF(u.target);s.push(d),u.lastReportedSize=lF(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},jj=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()&&(cF(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},Zae=function(){var e=0;for(jj(e);$ae();)e=Xae(),jj(e);return Hae()&&Vae(),e>0},Hx,uF=[],Jae=function(){return uF.splice(0).forEach(function(e){return e()})},Qae=function(e){if(!Hx){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Jae()}).observe(r,n),Hx=function(){r.textContent="".concat(t?t--:t++)}}uF.push(e),Hx()},ese=function(e){Qae(function(){requestAnimationFrame(e)})},cu=0,tse=function(){return!!cu},rse=250,nse={attributes:!0,characterData:!0,childList:!0,subtree:!0},qj=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Lj=function(e){return e===void 0&&(e=0),Date.now()+e},Vx=!1,ise=(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=rse),!Vx){Vx=!0;var n=Lj(t);ese(function(){var i=!1;try{i=Zae()}finally{if(Vx=!1,t=n-Lj(),!tse())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,nse)};document.body?r():Ps.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),qj.forEach(function(r){return Ps.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),qj.forEach(function(r){return Ps.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),$w=new ise,zj=function(e){!cu&&e>0&&$w.start(),cu+=e,!cu&&$w.stop()},ose=function(e){return!Z_(e)&&!Uae(e)&&getComputedStyle(e).display==="inline"},ase=(function(){function e(t,r){this.target=t,this.observedBox=r||Ws.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=lF(this.target,this.observedBox,!0);return ose(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),sse=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Wc=new WeakMap,Bj=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 sse(t,r);Wc.set(t,n)},e.observe=function(t,r,n){var i=Wc.get(t),o=i.observationTargets.length===0;Bj(i.observationTargets,r)<0&&(o&&lo.push(i),i.observationTargets.push(new ase(r,n&&n.box)),zj(1),$w.schedule())},e.unobserve=function(t,r){var n=Wc.get(t),i=Bj(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&lo.splice(lo.indexOf(n),1),n.observationTargets.splice(i,1),zj(-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})(),lse=(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(!Aj(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(!Aj(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})(),Wx,Fj;function cse(){if(Fj)return Wx;Fj=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return Wx=e,Wx}var use=cse();const dF=Li(use);var $j={},Ux,Hj;function dse(){if(Hj)return Ux;Hj=1;var e=dl(),t=Ia(),r=kd(),n=Ld(),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 m=s?x-1:0,b=s?-1:1;if(d<2)for(;;){if(m in h){p=h[m],m+=b;break}if(m+=b,s?m<0:x<=m)throw new i(o)}for(;s?m>=0:x>m;m+=b)m in h&&(p=u(p,h[m],m,v));return p}};return Ux={left:a(!1),right:a(!0)},Ux}var Gx,Vj;function fse(){if(Vj)return Gx;Vj=1;var e=_t();return Gx=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},Gx}var Kx,Wj;function pse(){if(Wj)return Kx;Wj=1;var e=Wt(),t=NB(),r=Bi(),n=function(i){return t.slice(0,i.length)===i};return Kx=(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"})(),Kx}var Yx,Uj;function hse(){if(Uj)return Yx;Uj=1;var e=pse();return Yx=e==="NODE",Yx}var Gj;function vse(){if(Gj)return $j;Gj=1;var e=Fi(),t=dse().left,r=fse(),n=q_(),i=hse(),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)}}),$j}vse();var Kj={},Xx,Yj;function fF(){if(Yj)return Xx;Yj=1;var e=mn();return Xx=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},Xx}var Zx,Xj;function gse(){if(Xj)return Zx;Xj=1;var e=_t(),t=Wt(),r=t.RegExp,n=e(function(){var a=r("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),i=n||e(function(){return!r("a","y").sticky}),o=n||e(function(){var a=r("^r","gy");return a.lastIndex=2,a.exec("str")!==null});return Zx={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},Zx}var Jx,Zj;function mse(){if(Zj)return Jx;Zj=1;var e=_t(),t=Wt(),r=t.RegExp;return Jx=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
|
|
109
|
-
`)&&n.flags==="s")}),Jx}var Qx,Jj;function bse(){if(Jj)return Qx;Jj=1;var e=_t(),t=Wt(),r=t.RegExp;return Qx=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),Qx}var ew,Qj;function J_(){if(Qj)return ew;Qj=1;var e=zr(),t=bt(),r=
|
|
110
|
-
`)&&(W="(?: "+W+")",ee=" "+ee,J++),D=new RegExp("^(?:"+W+")",k)),_&&(D=new RegExp("^"+W+"$(?!\\s)",k)),w&&(z=N.lastIndex),P=e(p,Q?D:N,ee),Q?P?(P.input=b(P.input,J),P[0]=b(P[0],J),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],D,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}),ew=v,ew}var e2;function pF(){if(e2)return Kj;e2=1;var e=Fi(),t=J_();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),Kj}pF();var t2={},tw,r2;function hF(){if(r2)return tw;r2=1,pF();var e=zr(),t=yo(),r=J_(),n=_t(),i=Sr(),o=pl(),a=i("species"),s=RegExp.prototype;return tw=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 m=/./[v],b=u(v,""[c],function(w,y,_,S,E){var I=y.exec;return I===r||I===s.exec?h&&!E?{done:!0,value:e(m,y,_,S)}:{done:!0,value:e(w,_,y,S)}:{done:!1}});t(String.prototype,c,b[0]),t(s,v,b[1])}p&&o(s[v],"sham",!0)},tw}var rw,n2;function vF(){if(n2)return rw;n2=1;var e=QB().charAt;return rw=function(t,r,n){return r+(n?e(t,r).length:1)},rw}var nw,i2;function yse(){if(i2)return nw;i2=1;var e=Wt(),t=_t(),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 nw={correct:n},nw}var iw,o2;function gF(){if(o2)return iw;o2=1;var e=zr(),t=gn(),r=Md(),n=yse(),i=fF(),o=RegExp.prototype;return iw=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},iw}var ow,a2;function mF(){if(a2)return ow;a2=1;var e=zr(),t=mn(),r=Jt(),n=Bi(),i=J_(),o=TypeError;return ow=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")},ow}var s2;function xse(){if(s2)return t2;s2=1;var e=zr(),t=bt(),r=hF(),n=mn(),i=sr(),o=U_(),a=xo(),s=bo(),c=fl(),u=vF(),d=gF(),p=mF(),v=t("".indexOf);return r("match",function(h,x,m){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(b){var w=n(this),y=a(b),_=m(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 A=a(T[0]);I[N]=A,A===""&&(w.lastIndex=u(y,o(w.lastIndex),E)),N++}return N===0?null:I}]}),t2}xse();var l2={},aw,c2;function wse(){if(c2)return aw;c2=1;var e=zB(),t=hi();return aw=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)},aw}var u2;function _se(){if(u2)return l2;u2=1;var e=An(),t=V_().EXISTS,r=bt(),n=wse(),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""}}}),l2}_se();var d2={},sw,f2;function Ese(){if(f2)return sw;f2=1;var e=Pd(),t=Function.prototype,r=t.apply,n=t.call;return sw=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),sw}var lw,p2;function Sse(){if(p2)return lw;p2=1;var e=bt(),t=Ia(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return lw=function(c,u,d,p,v,h){var x=d+c.length,m=p.length,b=s;return v!==void 0&&(v=t(v),b=a),i(h,b,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>m){var E=r(S/10);return E===0?w:E<=m?p[E-1]===void 0?n(y,1):p[E-1]+n(y,1):w}_=p[S-1]}return _===void 0?"":_})},lw}var h2;function Ose(){if(h2)return d2;h2=1;var e=Ese(),t=zr(),r=bt(),n=hF(),i=_t(),o=mn(),a=Jt(),s=sr(),c=qd(),u=U_(),d=xo(),p=bo(),v=vF(),h=fl(),x=Sse(),m=gF(),b=mF(),w=Sr(),y=w("replace"),_=Math.max,S=Math.min,E=r([].concat),I=r([].push),N=r("".indexOf),T=r("".slice),A=function(z){return z===void 0?z:String(z)},B=(function(){return"a".replace(/./,"$0")==="$0"})(),L=(function(){return/./[y]?/./[y]("a","$0")==="":!1})(),D=!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 $=L?"$":"$0";return[function(U,Q){var k=p(this),W=s(U)?h(U,y):void 0;return W?t(W,U,k,Q):t(P,d(k),U,Q)},function(Y,U){var Q=o(this),k=d(Y);if(typeof U=="string"&&N(U,$)===-1&&N(U,"$<")===-1){var W=K(P,Q,k,U);if(W.done)return W.value}var J=a(U);J||(U=d(U));var ee=d(m(Q)),j=N(ee,"g")!==-1,G;j&&(G=N(ee,"u")!==-1,Q.lastIndex=0);for(var H=[],q;q=b(Q,k),!(q===null||(I(H,q),!j));){var X=d(q[0]);X===""&&(Q.lastIndex=v(k,u(Q.lastIndex),G))}for(var ne="",te=0,ue=0;ue<H.length;ue++){q=H[ue];for(var re=d(q[0]),ge=_(S(c(q.index),k.length),0),de=[],xe,se=1;se<q.length;se++)I(de,A(q[se]));var le=q.groups;if(J){var we=E([re],de,ge,k);le!==void 0&&I(we,le),xe=d(e(U,void 0,we))}else xe=x(re,k,ge,de,le,U);ge>=te&&(ne+=T(k,te,ge)+xe,te=ge+re.length)}return ne+T(k,te)}]},!D||!B||L),d2}Ose();function Ti(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function uu(e){return!e||!e.ownerDocument?document:e.ownerDocument}var Go=null,v2=null;dF&&window.addEventListener("resize",function(){v2!==window.devicePixelRatio&&(v2=window.devicePixelRatio,Go=null)});function g2(e){if(Go===null){var t=uu(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 $u=(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=uu(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=Rj(this.recalculate.bind(this),64),this.onMouseMove=Rj(this.onMouseMove.bind(this),64),this.hideScrollbars=Tj(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Tj(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=Fae(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=uu(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),dF&&(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||lse;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=uu(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 m(){if(v===-1){if(d>h){var b;d-=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((b={},b[o.axis[i].offsetAttr]=d,b)),a.requestAnimationFrame(m)}}else if(d<h){var w;d+=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((w={},w[o.axis[i].offsetAttr]=d,w)),a.requestAnimationFrame(m)}};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:g2(this.el)}catch{return g2(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})();$u.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};$u.instances=new WeakMap;function m2(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?m2(Object(r),!0).forEach(function(n){Cse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cse(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 Ise(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 Rse(e,t){if(e==null)return{};var r=Ise(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 Nse=["children","scrollableNodeProps","tag"],Tse=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},$d=O.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=Rse(e,Nse),c=a,u,d=O.useRef(),p=O.useRef(),v=O.useRef(),h={},x={},m=[];return Object.keys(s).forEach(function(b){Object.prototype.hasOwnProperty.call($u.defaultOptions,b)?h[b]=s[b]:b.match(/data-simplebar-(.+)/)&&b!=="data-simplebar-direction"?m.push({name:b,value:s[b]}):x[b]=s[b]}),m.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
|
|
107
|
+
Valid keys: `+JSON.stringify(Object.keys(k),null," "));var re=ue(q,te,j,G,H+"."+te,r);if(re)return re}return null}return b(W)}function P(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(P);if(k===null||s(k))return!0;var W=p(k);if(W){var J=W.call(k),ee;if(W!==k.entries){for(;!(ee=J.next()).done;)if(!P(ee.value))return!1}else for(;!(ee=J.next()).done;){var j=ee.value;if(j&&!P(j[1]))return!1}}else return!1;return!0;default:return!1}}function K(k,W){return k==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function $(k){var W=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":K(W,k)?"symbol":W}function Y(k){if(typeof k>"u"||k===null)return""+k;var W=$(k);if(W==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return W}function U(k){var W=Y(k);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function Q(k){return!k.constructor||!k.constructor.name?v:k.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},Ry}var Ny,JA;function Boe(){if(JA)return Ny;JA=1;var e=D_();function t(){}function r(){}return r.resetWarningCache=t,Ny=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},Ny}var QA;function Foe(){if(QA)return $c.exports;if(QA=1,process.env.NODE_ENV!=="production"){var e=CB(),t=!0;$c.exports=zoe()(e.isElement,t)}else $c.exports=Boe()();return $c.exports}var $oe=Foe();const hs=Li($oe);var eM={},vs,tM;function Wt(){if(tM)return vs;tM=1;var e=function(t){return t&&t.Math===Math&&t};return vs=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof At=="object"&&At)||e(typeof vs=="object"&&vs)||(function(){return this})()||Function("return this")(),vs}var Ty={},Py,rM;function _t(){return rM||(rM=1,Py=function(e){try{return!!e()}catch{return!0}}),Py}var ky,nM;function An(){if(nM)return ky;nM=1;var e=_t();return ky=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ky}var Ay,iM;function Pd(){if(iM)return Ay;iM=1;var e=_t();return Ay=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Ay}var My,oM;function zr(){if(oM)return My;oM=1;var e=Pd(),t=Function.prototype.call;return My=e?t.bind(t):function(){return t.apply(t,arguments)},My}var Dy={},aM;function RB(){if(aM)return Dy;aM=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Dy.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,Dy}var jy,sM;function j_(){return sM||(sM=1,jy=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),jy}var qy,lM;function bt(){if(lM)return qy;lM=1;var e=Pd(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return qy=e?n:function(i){return function(){return r.apply(i,arguments)}},qy}var Ly,cM;function Bi(){if(cM)return Ly;cM=1;var e=bt(),t=e({}.toString),r=e("".slice);return Ly=function(n){return r(t(n),8,-1)},Ly}var zy,uM;function kd(){if(uM)return zy;uM=1;var e=bt(),t=_t(),r=Bi(),n=Object,i=e("".split);return zy=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,zy}var By,dM;function ul(){return dM||(dM=1,By=function(e){return e==null}),By}var Fy,fM;function yo(){if(fM)return Fy;fM=1;var e=ul(),t=TypeError;return Fy=function(r){if(e(r))throw new t("Can't call method on "+r);return r},Fy}var $y,pM;function Ca(){if(pM)return $y;pM=1;var e=kd(),t=yo();return $y=function(r){return e(t(r))},$y}var Hy,hM;function Jt(){if(hM)return Hy;hM=1;var e=typeof document=="object"&&document.all;return Hy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},Hy}var Vy,vM;function sr(){if(vM)return Vy;vM=1;var e=Jt();return Vy=function(t){return typeof t=="object"?t!==null:e(t)},Vy}var Wy,gM;function Ad(){if(gM)return Wy;gM=1;var e=Wt(),t=Jt(),r=function(n){return t(n)?n:void 0};return Wy=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},Wy}var Uy,mM;function Md(){if(mM)return Uy;mM=1;var e=bt();return Uy=e({}.isPrototypeOf),Uy}var Gy,bM;function NB(){if(bM)return Gy;bM=1;var e=Wt(),t=e.navigator,r=t&&t.userAgent;return Gy=r?String(r):"",Gy}var Ky,yM;function q_(){if(yM)return Ky;yM=1;var e=Wt(),t=NB(),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]))),Ky=s,Ky}var Yy,xM;function TB(){if(xM)return Yy;xM=1;var e=q_(),t=_t(),r=Wt(),n=r.String;return Yy=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Yy}var Xy,wM;function PB(){if(wM)return Xy;wM=1;var e=TB();return Xy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Xy}var Zy,_M;function kB(){if(_M)return Zy;_M=1;var e=Ad(),t=Jt(),r=Md(),n=PB(),i=Object;return Zy=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},Zy}var Jy,EM;function L_(){if(EM)return Jy;EM=1;var e=String;return Jy=function(t){try{return e(t)}catch{return"Object"}},Jy}var Qy,SM;function dl(){if(SM)return Qy;SM=1;var e=Jt(),t=L_(),r=TypeError;return Qy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Qy}var e0,OM;function fl(){if(OM)return e0;OM=1;var e=dl(),t=ul();return e0=function(r,n){var i=r[n];return t(i)?void 0:e(i)},e0}var t0,CM;function Hoe(){if(CM)return t0;CM=1;var e=zr(),t=Jt(),r=sr(),n=TypeError;return t0=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")},t0}var r0={exports:{}},n0,IM;function Dd(){return IM||(IM=1,n0=!1),n0}var i0,RM;function z_(){if(RM)return i0;RM=1;var e=Wt(),t=Object.defineProperty;return i0=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},i0}var NM;function B_(){if(NM)return r0.exports;NM=1;var e=Dd(),t=Wt(),r=z_(),n="__core-js_shared__",i=r0.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"}),r0.exports}var o0,TM;function F_(){if(TM)return o0;TM=1;var e=B_();return o0=function(t,r){return e[t]||(e[t]=r||{})},o0}var a0,PM;function Ia(){if(PM)return a0;PM=1;var e=yo(),t=Object;return a0=function(r){return t(e(r))},a0}var s0,kM;function gn(){if(kM)return s0;kM=1;var e=bt(),t=Ia(),r=e({}.hasOwnProperty);return s0=Object.hasOwn||function(i,o){return r(t(i),o)},s0}var l0,AM;function $_(){if(AM)return l0;AM=1;var e=bt(),t=0,r=Math.random(),n=e(1.1.toString);return l0=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},l0}var c0,MM;function Sr(){if(MM)return c0;MM=1;var e=Wt(),t=F_(),r=gn(),n=$_(),i=TB(),o=PB(),a=e.Symbol,s=t("wks"),c=o?a.for||a:a&&a.withoutSetter||n;return c0=function(u){return r(s,u)||(s[u]=i&&r(a,u)?a[u]:c("Symbol."+u)),s[u]},c0}var u0,DM;function Voe(){if(DM)return u0;DM=1;var e=zr(),t=sr(),r=kB(),n=fl(),i=Hoe(),o=Sr(),a=TypeError,s=o("toPrimitive");return u0=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)},u0}var d0,jM;function AB(){if(jM)return d0;jM=1;var e=Voe(),t=kB();return d0=function(r){var n=e(r,"string");return t(n)?n:n+""},d0}var f0,qM;function H_(){if(qM)return f0;qM=1;var e=Wt(),t=sr(),r=e.document,n=t(r)&&t(r.createElement);return f0=function(i){return n?r.createElement(i):{}},f0}var p0,LM;function MB(){if(LM)return p0;LM=1;var e=An(),t=_t(),r=H_();return p0=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),p0}var zM;function DB(){if(zM)return Ty;zM=1;var e=An(),t=zr(),r=RB(),n=j_(),i=Ca(),o=AB(),a=gn(),s=MB(),c=Object.getOwnPropertyDescriptor;return Ty.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])},Ty}var h0={},v0,BM;function jB(){if(BM)return v0;BM=1;var e=An(),t=_t();return v0=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),v0}var g0,FM;function mn(){if(FM)return g0;FM=1;var e=sr(),t=String,r=TypeError;return g0=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},g0}var $M;function hi(){if($M)return h0;$M=1;var e=An(),t=MB(),r=jB(),n=mn(),i=AB(),o=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",u="configurable",d="writable";return h0.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 m=s(v,h);m&&m[d]&&(v[h]=x.value,x={configurable:u in x?x[u]:m[u],enumerable:c in x?x[c]:m[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},h0}var m0,HM;function pl(){if(HM)return m0;HM=1;var e=An(),t=hi(),r=j_();return m0=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},m0}var b0={exports:{}},y0,VM;function V_(){if(VM)return y0;VM=1;var e=An(),t=gn(),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 y0={EXISTS:i,PROPER:o,CONFIGURABLE:a},y0}var x0,WM;function qB(){if(WM)return x0;WM=1;var e=bt(),t=Jt(),r=B_(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),x0=r.inspectSource,x0}var w0,UM;function LB(){if(UM)return w0;UM=1;var e=Wt(),t=Jt(),r=e.WeakMap;return w0=t(r)&&/native code/.test(String(r)),w0}var _0,GM;function W_(){if(GM)return _0;GM=1;var e=F_(),t=$_(),r=e("keys");return _0=function(n){return r[n]||(r[n]=t(n))},_0}var E0,KM;function jd(){return KM||(KM=1,E0={}),E0}var S0,YM;function Ra(){if(YM)return S0;YM=1;var e=LB(),t=Wt(),r=sr(),n=pl(),i=gn(),o=B_(),a=W_(),s=jd(),c="Object already initialized",u=t.TypeError,d=t.WeakMap,p,v,h,x=function(y){return h(y)?v(y):p(y,{})},m=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 b=o.state||(o.state=new d);b.get=b.get,b.has=b.has,b.set=b.set,p=function(y,_){if(b.has(y))throw new u(c);return _.facade=y,b.set(y,_),_},v=function(y){return b.get(y)||{}},h=function(y){return b.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 S0={set:p,get:v,has:h,enforce:x,getterFor:m},S0}var XM;function zB(){if(XM)return b0.exports;XM=1;var e=bt(),t=_t(),r=Jt(),n=gn(),i=An(),o=V_().CONFIGURABLE,a=qB(),s=Ra(),c=s.enforce,u=s.get,d=String,p=Object.defineProperty,v=e("".slice),h=e("".replace),x=e([].join),m=i&&!t(function(){return p(function(){},"length",{value:8}).length!==8}),b=String(String).split("String"),w=b0.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=_),m&&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(b,typeof _=="string"?_:"")),y};return Function.prototype.toString=w(function(){return r(this)&&u(this).source||a(this)},"toString"),b0.exports}var O0,ZM;function xo(){if(ZM)return O0;ZM=1;var e=Jt(),t=hi(),r=zB(),n=z_();return O0=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},O0}var C0={},I0,JM;function Woe(){if(JM)return I0;JM=1;var e=Math.ceil,t=Math.floor;return I0=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},I0}var R0,QM;function qd(){if(QM)return R0;QM=1;var e=Woe();return R0=function(t){var r=+t;return r!==r||r===0?0:e(r)},R0}var N0,eD;function Uoe(){if(eD)return N0;eD=1;var e=qd(),t=Math.max,r=Math.min;return N0=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},N0}var T0,tD;function U_(){if(tD)return T0;tD=1;var e=qd(),t=Math.min;return T0=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},T0}var P0,rD;function Ld(){if(rD)return P0;rD=1;var e=U_();return P0=function(t){return e(t.length)},P0}var k0,nD;function Goe(){if(nD)return k0;nD=1;var e=Ca(),t=Uoe(),r=Ld(),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 k0={includes:n(!0),indexOf:n(!1)},k0}var A0,iD;function BB(){if(iD)return A0;iD=1;var e=bt(),t=gn(),r=Ca(),n=Goe().indexOf,i=jd(),o=e([].push);return A0=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},A0}var M0,oD;function G_(){return oD||(oD=1,M0=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),M0}var aD;function K_(){if(aD)return C0;aD=1;var e=BB(),t=G_(),r=t.concat("length","prototype");return C0.f=Object.getOwnPropertyNames||function(i){return e(i,r)},C0}var D0={},sD;function FB(){return sD||(sD=1,D0.f=Object.getOwnPropertySymbols),D0}var j0,lD;function Koe(){if(lD)return j0;lD=1;var e=Ad(),t=bt(),r=K_(),n=FB(),i=mn(),o=t([].concat);return j0=e("Reflect","ownKeys")||function(s){var c=r.f(i(s)),u=n.f;return u?o(c,u(s)):c},j0}var q0,cD;function Yoe(){if(cD)return q0;cD=1;var e=gn(),t=Koe(),r=DB(),n=hi();return q0=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))}},q0}var L0,uD;function $B(){if(uD)return L0;uD=1;var e=_t(),t=Jt(),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 L0=n,L0}var z0,dD;function Fi(){if(dD)return z0;dD=1;var e=Wt(),t=DB().f,r=pl(),n=xo(),i=z_(),o=Yoe(),a=$B();return z0=function(s,c){var u=s.target,d=s.global,p=s.stat,v,h,x,m,b,w;if(d?h=e:p?h=e[u]||i(u,{}):h=e[u]&&e[u].prototype,h)for(x in c){if(b=c[x],s.dontCallGetSet?(w=t(h,x),m=w&&w.value):m=h[x],v=a(d?x:u+(p?".":"#")+x,s.forced),!v&&m!==void 0){if(typeof b==typeof m)continue;o(b,m)}(s.sham||m&&m.sham)&&r(b,"sham",!0),n(h,x,b,s)}},z0}var B0,fD;function Y_(){if(fD)return B0;fD=1;var e=Sr(),t=e("toStringTag"),r={};return r[t]="z",B0=String(r)==="[object z]",B0}var F0,pD;function zd(){if(pD)return F0;pD=1;var e=Y_(),t=Jt(),r=Bi(),n=Sr(),i=n("toStringTag"),o=Object,a=r((function(){return arguments})())==="Arguments",s=function(c,u){try{return c[u]}catch{}};return F0=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},F0}var $0,hD;function wo(){if(hD)return $0;hD=1;var e=zd(),t=String;return $0=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},$0}var H0,vD;function HB(){return vD||(vD=1,H0=`
|
|
108
|
+
\v\f\r \u2028\u2029\uFEFF`),H0}var V0,gD;function Xoe(){if(gD)return V0;gD=1;var e=bt(),t=yo(),r=wo(),n=HB(),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 W0,mD;function Zoe(){if(mD)return W0;mD=1;var e=Wt(),t=_t(),r=bt(),n=wo(),i=Xoe().trim,o=HB(),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 W0=p?function(h,x){var m=i(n(h));return a(m,x>>>0||(d(u,m)?16:10))}:a,W0}var bD;function Joe(){if(bD)return eM;bD=1;var e=Fi(),t=Zoe();return e({global:!0,forced:parseInt!==t},{parseInt:t}),eM}Joe();var yD={},U0,xD;function VB(){if(xD)return U0;xD=1;var e=BB(),t=G_();return U0=Object.keys||function(n){return e(n,t)},U0}var G0,wD;function Qoe(){if(wD)return G0;wD=1;var e=An(),t=bt(),r=zr(),n=_t(),i=VB(),o=FB(),a=RB(),s=Ia(),c=kd(),u=Object.assign,d=Object.defineProperty,p=t([].concat);return G0=!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"),m="abcdefghijklmnopqrst";return v[x]=7,m.split("").forEach(function(b){h[b]=b}),u({},v)[x]!==7||i(u({},h)).join("")!==m})?function(h,x){for(var m=s(h),b=arguments.length,w=1,y=o.f,_=a.f;b>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))&&(m[T]=S[T]);return m}:u,G0}var _D;function eae(){if(_D)return yD;_D=1;var e=Fi(),t=Qoe();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),yD}eae();var ED={},K0,SD;function tae(){if(SD)return K0;SD=1;var e=Bi(),t=bt();return K0=function(r){if(e(r)==="Function")return t(r)},K0}var Y0,OD;function WB(){if(OD)return Y0;OD=1;var e=tae(),t=dl(),r=Pd(),n=e(e.bind);return Y0=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},Y0}var X0,CD;function rae(){if(CD)return X0;CD=1;var e=Bi();return X0=Array.isArray||function(r){return e(r)==="Array"},X0}var Z0,ID;function nae(){if(ID)return Z0;ID=1;var e=bt(),t=_t(),r=Jt(),n=zd(),i=Ad(),o=qB(),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,Z0=!s||t(function(){var h;return p(p.call)||!p(Object)||!p(function(){h=!0})||h})?v:p,Z0}var J0,RD;function iae(){if(RD)return J0;RD=1;var e=rae(),t=nae(),r=sr(),n=Sr(),i=n("species"),o=Array;return J0=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},J0}var Q0,ND;function oae(){if(ND)return Q0;ND=1;var e=iae();return Q0=function(t,r){return new(e(t))(r===0?0:r)},Q0}var ex,TD;function UB(){if(TD)return ex;TD=1;var e=WB(),t=bt(),r=kd(),n=Ia(),i=Ld(),o=oae(),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,m=c===5||h;return function(b,w,y,_){for(var S=n(b),E=r(S),I=i(E),N=e(w,y),T=0,A=_||o,B=u?A(b,I):d||x?A(b,0):void 0,L,D;I>T;T++)if((m||T in E)&&(L=E[T],D=N(L,T,S),c))if(u)B[T]=D;else if(D)switch(c){case 3:return!0;case 5:return L;case 6:return T;case 2:a(B,L)}else switch(c){case 4:return!1;case 7:a(B,L)}return h?-1:p||v?v:B}};return ex={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},ex}var tx,PD;function aae(){if(PD)return tx;PD=1;var e=_t(),t=Sr(),r=q_(),n=t("species");return tx=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},tx}var kD;function sae(){if(kD)return ED;kD=1;var e=Fi(),t=UB().filter,r=aae(),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)}}),ED}sae();var AD={},rx,MD;function lae(){if(MD)return rx;MD=1;var e=Y_(),t=zd();return rx=e?{}.toString:function(){return"[object "+t(this)+"]"},rx}var DD;function cae(){if(DD)return AD;DD=1;var e=Y_(),t=xo(),r=lae();return e||t(Object.prototype,"toString",r,{unsafe:!0}),AD}cae();var nx={},jD;function uae(){if(jD)return nx;jD=1;var e=An(),t=jB(),r=hi(),n=mn(),i=Ca(),o=VB();return nx.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},nx}var ix,qD;function dae(){if(qD)return ix;qD=1;var e=Ad();return ix=e("document","documentElement"),ix}var ox,LD;function Bd(){if(LD)return ox;LD=1;var e=mn(),t=uae(),r=G_(),n=jd(),i=dae(),o=H_(),a=W_(),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,_},m=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},b,w=function(){try{b=new ActiveXObject("htmlfile")}catch{}w=typeof document<"u"?document.domain&&b?x(b):m():x(b);for(var y=r.length;y--;)delete w[u][r[y]];return w()};return n[p]=!0,ox=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)},ox}var ax,zD;function fae(){if(zD)return ax;zD=1;var e=Sr(),t=Bd(),r=hi().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),ax=function(o){i[n][o]=!0},ax}var sx,BD;function hl(){return BD||(BD=1,sx={}),sx}var lx,FD;function pae(){if(FD)return lx;FD=1;var e=_t();return lx=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),lx}var cx,$D;function GB(){if($D)return cx;$D=1;var e=gn(),t=Jt(),r=Ia(),n=W_(),i=pae(),o=n("IE_PROTO"),a=Object,s=a.prototype;return cx=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},cx}var ux,HD;function KB(){if(HD)return ux;HD=1;var e=_t(),t=Jt(),r=sr(),n=Bd(),i=GB(),o=xo(),a=Sr(),s=Dd(),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}),ux={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:u},ux}var dx,VD;function Fd(){if(VD)return dx;VD=1;var e=hi().f,t=gn(),r=Sr(),n=r("toStringTag");return dx=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},dx}var fx,WD;function hae(){if(WD)return fx;WD=1;var e=KB().IteratorPrototype,t=Bd(),r=j_(),n=Fd(),i=hl(),o=function(){return this};return fx=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},fx}var px,UD;function vae(){if(UD)return px;UD=1;var e=bt(),t=dl();return px=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},px}var hx,GD;function gae(){if(GD)return hx;GD=1;var e=sr();return hx=function(t){return e(t)||t===null},hx}var vx,KD;function mae(){if(KD)return vx;KD=1;var e=gae(),t=String,r=TypeError;return vx=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},vx}var gx,YD;function YB(){if(YD)return gx;YD=1;var e=vae(),t=sr(),r=yo(),n=mae();return gx=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),gx}var mx,XD;function XB(){if(XD)return mx;XD=1;var e=Fi(),t=zr(),r=Dd(),n=V_(),i=Jt(),o=hae(),a=GB(),s=YB(),c=Fd(),u=pl(),d=xo(),p=Sr(),v=hl(),h=KB(),x=n.PROPER,m=n.CONFIGURABLE,b=h.IteratorPrototype,w=h.BUGGY_SAFARI_ITERATORS,y=p("iterator"),_="keys",S="values",E="entries",I=function(){return this};return mx=function(N,T,A,B,L,D,z){o(A,T,B);var P=function(j){if(j===L&&Q)return Q;if(!w&&j&&j in Y)return Y[j];switch(j){case _:return function(){return new A(this,j)};case S:return function(){return new A(this,j)};case E:return function(){return new A(this,j)}}return function(){return new A(this)}},K=T+" Iterator",$=!1,Y=N.prototype,U=Y[y]||Y["@@iterator"]||L&&Y[L],Q=!w&&U||P(L),k=T==="Array"&&Y.entries||U,W,J,ee;if(k&&(W=a(k.call(new N)),W!==Object.prototype&&W.next&&(!r&&a(W)!==b&&(s?s(W,b):i(W[y])||d(W,y,I)),c(W,K,!0,!0),r&&(v[K]=I))),x&&L===S&&U&&U.name!==S&&(!r&&m?u(Y,"name",S):($=!0,Q=function(){return t(U,this)})),L)if(J={values:P(S),keys:D?Q:P(_),entries:P(E)},z)for(ee in J)(w||$||!(ee in Y))&&d(Y,ee,J[ee]);else e({target:T,proto:!0,forced:w||$},J);return(!r||z)&&Y[y]!==Q&&d(Y,y,Q,{name:L}),v[T]=Q,J},mx}var bx,ZD;function ZB(){return ZD||(ZD=1,bx=function(e,t){return{value:e,done:t}}),bx}var yx,JD;function JB(){if(JD)return yx;JD=1;var e=Ca(),t=fae(),r=hl(),n=Ra(),i=hi().f,o=XB(),a=ZB(),s=Dd(),c=An(),u="Array Iterator",d=n.set,p=n.getterFor(u);yx=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,m=h.index++;if(!x||m>=x.length)return h.target=null,a(void 0,!0);switch(h.kind){case"keys":return a(m,!1);case"values":return a(x[m],!1)}return a([m,x[m]],!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 yx}JB();var QD={},xx,ej;function QB(){if(ej)return xx;ej=1;var e=bt(),t=qd(),r=wo(),n=yo(),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,m;return v<0||v>=h?c?"":void 0:(x=o(p,v),x<55296||x>56319||v+1===h||(m=o(p,v+1))<56320||m>57343?c?i(p,v):x:c?a(p,v,v+2):(x-55296<<10)+(m-56320)+65536)}};return xx={codeAt:s(!1),charAt:s(!0)},xx}var tj;function bae(){if(tj)return QD;tj=1;var e=QB().charAt,t=wo(),r=Ra(),n=XB(),i=ZB(),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))}),QD}bae();var rj={},nj={},wx,ij;function eF(){if(ij)return wx;ij=1;var e=_t();return wx=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),wx}var _x,oj;function tF(){if(oj)return _x;oj=1;var e=xo();return _x=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},_x}var Ex={exports:{}},Sx={},Ox,aj;function yae(){if(aj)return Ox;aj=1;var e=bt();return Ox=e([].slice),Ox}var sj;function xae(){if(sj)return Sx;sj=1;var e=Bi(),t=Ca(),r=K_().f,n=yae(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return Sx.f=function(s){return i&&e(s)==="Window"?o(s):r(t(s))},Sx}var Cx,lj;function wae(){if(lj)return Cx;lj=1;var e=_t();return Cx=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),Cx}var Ix,cj;function _ae(){if(cj)return Ix;cj=1;var e=_t(),t=sr(),r=Bi(),n=wae(),i=Object.isExtensible,o=e(function(){});return Ix=o||n?function(s){return!t(s)||n&&r(s)==="ArrayBuffer"?!1:i?i(s):!0}:i,Ix}var uj;function X_(){if(uj)return Ex.exports;uj=1;var e=Fi(),t=bt(),r=jd(),n=sr(),i=gn(),o=hi().f,a=K_(),s=xae(),c=_ae(),u=$_(),d=eF(),p=!1,v=u("meta"),h=0,x=function(S){o(S,v,{value:{objectID:"O"+h++,weakData:{}}})},m=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},b=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),A=0,B=T.length;A<B;A++)if(T[A]===v){E(T,A,1);break}return T},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},_=Ex.exports={enable:y,fastKey:m,getWeakData:b,onFreeze:w};return r[v]=!0,Ex.exports}var Rx,dj;function Eae(){if(dj)return Rx;dj=1;var e=Sr(),t=hl(),r=e("iterator"),n=Array.prototype;return Rx=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},Rx}var Nx,fj;function rF(){if(fj)return Nx;fj=1;var e=zd(),t=fl(),r=ul(),n=hl(),i=Sr(),o=i("iterator");return Nx=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},Nx}var Tx,pj;function Sae(){if(pj)return Tx;pj=1;var e=zr(),t=dl(),r=mn(),n=L_(),i=rF(),o=TypeError;return Tx=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")},Tx}var Px,hj;function Oae(){if(hj)return Px;hj=1;var e=zr(),t=mn(),r=fl();return Px=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},Px}var kx,vj;function nF(){if(vj)return kx;vj=1;var e=WB(),t=zr(),r=mn(),n=L_(),i=Eae(),o=Ld(),a=Md(),s=Sae(),c=rF(),u=Oae(),d=TypeError,p=function(h,x){this.stopped=h,this.result=x},v=p.prototype;return kx=function(h,x,m){var b=m&&m.that,w=!!(m&&m.AS_ENTRIES),y=!!(m&&m.IS_RECORD),_=!!(m&&m.IS_ITERATOR),S=!!(m&&m.INTERRUPTED),E=e(x,b),I,N,T,A,B,L,D,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,A=o(h);A>T;T++)if(B=P(h[T]),B&&a(v,B))return B;return new p(!1)}I=s(h,N)}for(L=y?h.next:I.next;!(D=t(L,I)).done;){try{B=P(D.value)}catch(K){u(I,"throw",K)}if(typeof B=="object"&&B&&a(v,B))return B}return new p(!1)},kx}var Ax,gj;function iF(){if(gj)return Ax;gj=1;var e=Md(),t=TypeError;return Ax=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},Ax}var Mx,mj;function Cae(){if(mj)return Mx;mj=1;var e=Sr(),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 Dx,bj;function Iae(){if(bj)return Dx;bj=1;var e=Jt(),t=sr(),r=YB();return Dx=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},Dx}var jx,yj;function Rae(){if(yj)return jx;yj=1;var e=Fi(),t=Wt(),r=bt(),n=$B(),i=xo(),o=X_(),a=nF(),s=iF(),c=Jt(),u=ul(),d=sr(),p=_t(),v=Cae(),h=Fd(),x=Iae();return jx=function(m,b,w){var y=m.indexOf("Map")!==-1,_=m.indexOf("Weak")!==-1,S=y?"set":"add",E=t[m],I=E&&E.prototype,N=E,T={},A=function($){var Y=r(I[$]);i(I,$,$==="add"?function(Q){return Y(this,Q===0?0:Q),this}:$==="delete"?function(U){return _&&!d(U)?!1:Y(this,U===0?0:U)}:$==="get"?function(Q){return _&&!d(Q)?void 0:Y(this,Q===0?0:Q)}:$==="has"?function(Q){return _&&!d(Q)?!1:Y(this,Q===0?0:Q)}:function(Q,k){return Y(this,Q===0?0:Q,k),this})},B=n(m,!c(E)||!(_||I.forEach&&!p(function(){new E().entries().next()})));if(B)N=w.getConstructor(b,m,y,S),o.enable();else if(n(m,!0)){var L=new N,D=L[S](_?{}:-0,1)!==L,z=p(function(){L.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=b(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)&&(A("delete"),A("has"),y&&A("get")),(K||D)&&A(S),_&&I.clear&&delete I.clear}return T[m]=N,e({global:!0,constructor:!0,forced:N!==E},T),h(N,m),_||w.setStrong(N,m,y),N},jx}var qx,xj;function Nae(){if(xj)return qx;xj=1;var e=bt(),t=tF(),r=X_().getWeakData,n=iF(),i=mn(),o=ul(),a=sr(),s=nF(),c=UB(),u=gn(),d=Ra(),p=d.set,v=d.getterFor,h=c.find,x=c.findIndex,m=e([].splice),b=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&&m(this.entries,E,1),!!~E}},qx={getConstructor:function(S,E,I,N){var T=S(function(D,z){n(D,A),p(D,{type:E,id:b++,frozen:null}),o(z)||s(z,D[N],{that:D,AS_ENTRIES:I})}),A=T.prototype,B=v(E),L=function(D,z,P){var K=B(D),$=r(i(z),!0);return $===!0?w(K).set(z,P):$[K.id]=P,D};return t(A,{delete:function(D){var z=B(this);if(!a(D))return!1;var P=r(D);return P===!0?w(z).delete(D):P&&u(P,z.id)&&delete P[z.id]},has:function(z){var P=B(this);if(!a(z))return!1;var K=r(z);return K===!0?w(P).has(z):K&&u(K,P.id)}}),t(A,I?{get:function(z){var P=B(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 L(this,z,P)}}:{add:function(z){return L(this,z,!0)}}),T}},qx}var wj;function Tae(){if(wj)return nj;wj=1;var e=eF(),t=Wt(),r=bt(),n=tF(),i=X_(),o=Rae(),a=Nae(),s=sr(),c=Ra().enforce,u=_t(),d=LB(),p=Object,v=Array.isArray,h=p.isExtensible,x=p.isFrozen,m=p.isSealed,b=p.freeze,w=p.seal,y=!t.ActiveXObject&&"ActiveXObject"in t,_,S=function(D){return function(){return D(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 D=b([]);return N(new E,D,1),!x(D)})};if(d)if(y){_=a.getConstructor(S,"WeakMap",!0),i.enable();var A=r(I.delete),B=r(I.has),L=r(I.get);n(I,{delete:function(D){if(s(D)&&!h(D)){var z=c(this);return z.frozen||(z.frozen=new _),A(this,D)||z.frozen.delete(D)}return A(this,D)},has:function(z){if(s(z)&&!h(z)){var P=c(this);return P.frozen||(P.frozen=new _),B(this,z)||P.frozen.has(z)}return B(this,z)},get:function(z){if(s(z)&&!h(z)){var P=c(this);return P.frozen||(P.frozen=new _),B(this,z)?L(this,z):P.frozen.get(z)}return L(this,z)},set:function(z,P){if(s(z)&&!h(z)){var K=c(this);K.frozen||(K.frozen=new _),B(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=b:m(z)&&(K=w)),N(this,z,P),K&&K(z),this}});return nj}var _j;function Pae(){return _j||(_j=1,Tae()),rj}Pae();var Ej={},Lx,Sj;function kae(){return Sj||(Sj=1,Lx={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}),Lx}var zx,Oj;function Aae(){if(Oj)return zx;Oj=1;var e=H_(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return zx=r===Object.prototype?void 0:r,zx}var Cj;function Mae(){if(Cj)return Ej;Cj=1;var e=Wt(),t=kae(),r=Aae(),n=JB(),i=pl(),o=Fd(),a=Sr(),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"),Ej}Mae();var Bx,Ij;function Dae(){if(Ij)return Bx;Ij=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,m=function(){return d.Date.now()};function b(I,N,T){var A,B,L,D,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,L=Y?h(E(T.maxWait)||0,N):L,U="trailing"in T?!!T.trailing:U);function Q(X){var ne=A,te=B;return A=B=void 0,K=X,D=I.apply(te,ne),D}function k(X){return K=X,z=setTimeout(ee,N),$?Q(X):D}function W(X){var ne=X-P,te=X-K,ue=N-ne;return Y?x(ue,L-te):ue}function J(X){var ne=X-P,te=X-K;return P===void 0||ne>=N||ne<0||Y&&te>=L}function ee(){var X=m();if(J(X))return j(X);z=setTimeout(ee,W(X))}function j(X){return z=void 0,U&&A?Q(X):(A=B=void 0,D)}function G(){z!==void 0&&clearTimeout(z),K=0,A=P=B=z=void 0}function H(){return z===void 0?D:j(m())}function q(){var X=m(),ne=J(X);if(A=arguments,B=this,P=X,ne){if(z===void 0)return k(P);if(Y)return z=setTimeout(ee,N),Q(P)}return z===void 0&&(z=setTimeout(ee,N)),D}return q.cancel=G,q.flush=H,q}function w(I,N,T){var A=!0,B=!0;if(typeof I!="function")throw new TypeError(e);return y(T)&&(A="leading"in T?!!T.leading:A,B="trailing"in T?!!T.trailing:B),b(I,N,{leading:A,maxWait:N,trailing:B})}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 Bx=w,Bx}var jae=Dae();const Rj=Li(jae);var Fx,Nj;function qae(){if(Nj)return Fx;Nj=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,m=function(){return d.Date.now()};function b(E,I,N){var T,A,B,L,D,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,B=$?h(S(N.maxWait)||0,I):B,Y="trailing"in N?!!N.trailing:Y);function U(q){var X=T,ne=A;return T=A=void 0,P=q,L=E.apply(ne,X),L}function Q(q){return P=q,D=setTimeout(J,I),K?U(q):L}function k(q){var X=q-z,ne=q-P,te=I-X;return $?x(te,B-ne):te}function W(q){var X=q-z,ne=q-P;return z===void 0||X>=I||X<0||$&&ne>=B}function J(){var q=m();if(W(q))return ee(q);D=setTimeout(J,k(q))}function ee(q){return D=void 0,Y&&T?U(q):(T=A=void 0,L)}function j(){D!==void 0&&clearTimeout(D),P=0,T=z=A=D=void 0}function G(){return D===void 0?L:ee(m())}function H(){var q=m(),X=W(q);if(T=arguments,A=this,z=q,X){if(D===void 0)return Q(z);if($)return D=setTimeout(J,I),U(z)}return D===void 0&&(D=setTimeout(J,I)),L}return H.cancel=j,H.flush=G,H}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 Fx=b,Fx}var Lae=qae();const Tj=Li(Lae);var $x,Pj;function zae(){if(Pj)return $x;Pj=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(se,le){return se==null?void 0:se[le]}function d(se){var le=!1;if(se!=null&&typeof se.toString!="function")try{le=!!(se+"")}catch{}return le}var p=Array.prototype,v=Function.prototype,h=Object.prototype,x=c["__core-js_shared__"],m=(function(){var se=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||"");return se?"Symbol(src)_1."+se:""})(),b=v.toString,w=h.hasOwnProperty,y=h.toString,_=RegExp("^"+b.call(w).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=p.splice,E=X(c,"Map"),I=X(Object,"create");function N(se){var le=-1,we=se?se.length:0;for(this.clear();++le<we;){var Oe=se[le];this.set(Oe[0],Oe[1])}}function T(){this.__data__=I?I(null):{}}function A(se){return this.has(se)&&delete this.__data__[se]}function B(se){var le=this.__data__;if(I){var we=le[se];return we===t?void 0:we}return w.call(le,se)?le[se]:void 0}function L(se){var le=this.__data__;return I?le[se]!==void 0:w.call(le,se)}function D(se,le){var we=this.__data__;return we[se]=I&&le===void 0?t:le,this}N.prototype.clear=T,N.prototype.delete=A,N.prototype.get=B,N.prototype.has=L,N.prototype.set=D;function z(se){var le=-1,we=se?se.length:0;for(this.clear();++le<we;){var Oe=se[le];this.set(Oe[0],Oe[1])}}function P(){this.__data__=[]}function K(se){var le=this.__data__,we=G(le,se);if(we<0)return!1;var Oe=le.length-1;return we==Oe?le.pop():S.call(le,we,1),!0}function $(se){var le=this.__data__,we=G(le,se);return we<0?void 0:le[we][1]}function Y(se){return G(this.__data__,se)>-1}function U(se,le){var we=this.__data__,Oe=G(we,se);return Oe<0?we.push([se,le]):we[Oe][1]=le,this}z.prototype.clear=P,z.prototype.delete=K,z.prototype.get=$,z.prototype.has=Y,z.prototype.set=U;function Q(se){var le=-1,we=se?se.length:0;for(this.clear();++le<we;){var Oe=se[le];this.set(Oe[0],Oe[1])}}function k(){this.__data__={hash:new N,map:new(E||z),string:new N}}function W(se){return q(this,se).delete(se)}function J(se){return q(this,se).get(se)}function ee(se){return q(this,se).has(se)}function j(se,le){return q(this,se).set(se,le),this}Q.prototype.clear=k,Q.prototype.delete=W,Q.prototype.get=J,Q.prototype.has=ee,Q.prototype.set=j;function G(se,le){for(var we=se.length;we--;)if(ge(se[we][0],le))return we;return-1}function H(se){if(!xe(se)||te(se))return!1;var le=de(se)||d(se)?_:o;return le.test(ue(se))}function q(se,le){var we=se.__data__;return ne(le)?we[typeof le=="string"?"string":"hash"]:we.map}function X(se,le){var we=u(se,le);return H(we)?we:void 0}function ne(se){var le=typeof se;return le=="string"||le=="number"||le=="symbol"||le=="boolean"?se!=="__proto__":se===null}function te(se){return!!m&&m in se}function ue(se){if(se!=null){try{return b.call(se)}catch{}try{return se+""}catch{}}return""}function re(se,le){if(typeof se!="function"||le&&typeof le!="function")throw new TypeError(e);var we=function(){var Oe=arguments,Te=le?le.apply(this,Oe):Oe[0],qe=we.cache;if(qe.has(Te))return qe.get(Te);var Ue=se.apply(this,Oe);return we.cache=qe.set(Te,Ue),Ue};return we.cache=new(re.Cache||Q),we}re.Cache=Q;function ge(se,le){return se===le||se!==se&&le!==le}function de(se){var le=xe(se)?y.call(se):"";return le==r||le==n}function xe(se){var le=typeof se;return!!se&&(le=="object"||le=="function")}return $x=re,$x}var Bae=zae();const Fae=Li(Bae);var co=[],$ae=function(){return co.some(function(e){return e.activeTargets.length>0})},Hae=function(){return co.some(function(e){return e.skippedTargets.length>0})},kj="ResizeObserver loop completed with undelivered notifications.",Vae=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:kj}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=kj),window.dispatchEvent(e)},Ws;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ws||(Ws={}));var uo=function(e){return Object.freeze(e)},Wae=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,uo(this)}return e})(),oF=(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,uo(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})(),Z_=function(e){return e instanceof SVGElement&&"getBBox"in e},aF=function(e){if(Z_(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)},Aj=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)},Uae=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},Ps=typeof window<"u"?window:{},Vc=new WeakMap,Mj=/auto|scroll/,Gae=/^tb|vertical/,Kae=/msie|trident/i.test(Ps.navigator&&Ps.navigator.userAgent),Ln=function(e){return parseFloat(e||"0")},ia=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new Wae((r?t:e)||0,(r?e:t)||0)},Dj=uo({devicePixelContentBoxSize:ia(),borderBoxSize:ia(),contentBoxSize:ia(),contentRect:new oF(0,0,0,0)}),sF=function(e,t){if(t===void 0&&(t=!1),Vc.has(e)&&!t)return Vc.get(e);if(aF(e))return Vc.set(e,Dj),Dj;var r=getComputedStyle(e),n=Z_(e)&&e.ownerSVGElement&&e.getBBox(),i=!Kae&&r.boxSizing==="border-box",o=Gae.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),m=n?0:Ln(r.borderLeftWidth),b=p+u,w=c+d,y=m+h,_=v+x,S=s?e.offsetHeight-_-e.clientHeight:0,E=a?e.offsetWidth-y-e.clientWidth:0,I=i?b+y:0,N=i?w+_:0,T=n?n.width:Ln(r.width)-I-E,A=n?n.height:Ln(r.height)-N-S,B=T+b+E+y,L=A+w+S+_,D=uo({devicePixelContentBoxSize:ia(Math.round(T*devicePixelRatio),Math.round(A*devicePixelRatio),o),borderBoxSize:ia(B,L,o),contentBoxSize:ia(T,A,o),contentRect:new oF(p,c,T,A)});return Vc.set(e,D),D},lF=function(e,t,r){var n=sF(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case Ws.DEVICE_PIXEL_CONTENT_BOX:return a;case Ws.BORDER_BOX:return i;default:return o}},Yae=(function(){function e(t){var r=sF(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=uo([r.borderBoxSize]),this.contentBoxSize=uo([r.contentBoxSize]),this.devicePixelContentBoxSize=uo([r.devicePixelContentBoxSize])}return e})(),cF=function(e){if(aF(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},Xae=function(){var e=1/0,t=[];co.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new Yae(u.target),p=cF(u.target);s.push(d),u.lastReportedSize=lF(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},jj=function(e){co.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(cF(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},Zae=function(){var e=0;for(jj(e);$ae();)e=Xae(),jj(e);return Hae()&&Vae(),e>0},Hx,uF=[],Jae=function(){return uF.splice(0).forEach(function(e){return e()})},Qae=function(e){if(!Hx){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Jae()}).observe(r,n),Hx=function(){r.textContent="".concat(t?t--:t++)}}uF.push(e),Hx()},ese=function(e){Qae(function(){requestAnimationFrame(e)})},cu=0,tse=function(){return!!cu},rse=250,nse={attributes:!0,characterData:!0,childList:!0,subtree:!0},qj=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Lj=function(e){return e===void 0&&(e=0),Date.now()+e},Vx=!1,ise=(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=rse),!Vx){Vx=!0;var n=Lj(t);ese(function(){var i=!1;try{i=Zae()}finally{if(Vx=!1,t=n-Lj(),!tse())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,nse)};document.body?r():Ps.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),qj.forEach(function(r){return Ps.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),qj.forEach(function(r){return Ps.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),$w=new ise,zj=function(e){!cu&&e>0&&$w.start(),cu+=e,!cu&&$w.stop()},ose=function(e){return!Z_(e)&&!Uae(e)&&getComputedStyle(e).display==="inline"},ase=(function(){function e(t,r){this.target=t,this.observedBox=r||Ws.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=lF(this.target,this.observedBox,!0);return ose(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),sse=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Wc=new WeakMap,Bj=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 sse(t,r);Wc.set(t,n)},e.observe=function(t,r,n){var i=Wc.get(t),o=i.observationTargets.length===0;Bj(i.observationTargets,r)<0&&(o&&co.push(i),i.observationTargets.push(new ase(r,n&&n.box)),zj(1),$w.schedule())},e.unobserve=function(t,r){var n=Wc.get(t),i=Bj(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&co.splice(co.indexOf(n),1),n.observationTargets.splice(i,1),zj(-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})(),lse=(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(!Aj(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(!Aj(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})(),Wx,Fj;function cse(){if(Fj)return Wx;Fj=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return Wx=e,Wx}var use=cse();const dF=Li(use);var $j={},Ux,Hj;function dse(){if(Hj)return Ux;Hj=1;var e=dl(),t=Ia(),r=kd(),n=Ld(),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 m=s?x-1:0,b=s?-1:1;if(d<2)for(;;){if(m in h){p=h[m],m+=b;break}if(m+=b,s?m<0:x<=m)throw new i(o)}for(;s?m>=0:x>m;m+=b)m in h&&(p=u(p,h[m],m,v));return p}};return Ux={left:a(!1),right:a(!0)},Ux}var Gx,Vj;function fse(){if(Vj)return Gx;Vj=1;var e=_t();return Gx=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},Gx}var Kx,Wj;function pse(){if(Wj)return Kx;Wj=1;var e=Wt(),t=NB(),r=Bi(),n=function(i){return t.slice(0,i.length)===i};return Kx=(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"})(),Kx}var Yx,Uj;function hse(){if(Uj)return Yx;Uj=1;var e=pse();return Yx=e==="NODE",Yx}var Gj;function vse(){if(Gj)return $j;Gj=1;var e=Fi(),t=dse().left,r=fse(),n=q_(),i=hse(),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)}}),$j}vse();var Kj={},Xx,Yj;function fF(){if(Yj)return Xx;Yj=1;var e=mn();return Xx=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},Xx}var Zx,Xj;function gse(){if(Xj)return Zx;Xj=1;var e=_t(),t=Wt(),r=t.RegExp,n=e(function(){var a=r("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),i=n||e(function(){return!r("a","y").sticky}),o=n||e(function(){var a=r("^r","gy");return a.lastIndex=2,a.exec("str")!==null});return Zx={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},Zx}var Jx,Zj;function mse(){if(Zj)return Jx;Zj=1;var e=_t(),t=Wt(),r=t.RegExp;return Jx=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
|
|
109
|
+
`)&&n.flags==="s")}),Jx}var Qx,Jj;function bse(){if(Jj)return Qx;Jj=1;var e=_t(),t=Wt(),r=t.RegExp;return Qx=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),Qx}var ew,Qj;function J_(){if(Qj)return ew;Qj=1;var e=zr(),t=bt(),r=wo(),n=fF(),i=gse(),o=F_(),a=Bd(),s=Ra().get,c=mse(),u=bse(),d=o("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,v=p,h=t("".charAt),x=t("".indexOf),m=t("".replace),b=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),A=r(I),B=T.raw,L,D,z,P,K,$,Y;if(B)return B.lastIndex=N.lastIndex,L=e(v,B,A),N.lastIndex=B.lastIndex,L;var U=T.groups,Q=y&&N.sticky,k=e(n,N),W=N.source,J=0,ee=A;if(Q&&(k=m(k,"y",""),x(k,"g")===-1&&(k+="g"),ee=b(A,N.lastIndex),N.lastIndex>0&&(!N.multiline||N.multiline&&h(A,N.lastIndex-1)!==`
|
|
110
|
+
`)&&(W="(?: "+W+")",ee=" "+ee,J++),D=new RegExp("^(?:"+W+")",k)),_&&(D=new RegExp("^"+W+"$(?!\\s)",k)),w&&(z=N.lastIndex),P=e(p,Q?D:N,ee),Q?P?(P.input=b(P.input,J),P[0]=b(P[0],J),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],D,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}),ew=v,ew}var e2;function pF(){if(e2)return Kj;e2=1;var e=Fi(),t=J_();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),Kj}pF();var t2={},tw,r2;function hF(){if(r2)return tw;r2=1,pF();var e=zr(),t=xo(),r=J_(),n=_t(),i=Sr(),o=pl(),a=i("species"),s=RegExp.prototype;return tw=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 m=/./[v],b=u(v,""[c],function(w,y,_,S,E){var I=y.exec;return I===r||I===s.exec?h&&!E?{done:!0,value:e(m,y,_,S)}:{done:!0,value:e(w,_,y,S)}:{done:!1}});t(String.prototype,c,b[0]),t(s,v,b[1])}p&&o(s[v],"sham",!0)},tw}var rw,n2;function vF(){if(n2)return rw;n2=1;var e=QB().charAt;return rw=function(t,r,n){return r+(n?e(t,r).length:1)},rw}var nw,i2;function yse(){if(i2)return nw;i2=1;var e=Wt(),t=_t(),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 nw={correct:n},nw}var iw,o2;function gF(){if(o2)return iw;o2=1;var e=zr(),t=gn(),r=Md(),n=yse(),i=fF(),o=RegExp.prototype;return iw=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},iw}var ow,a2;function mF(){if(a2)return ow;a2=1;var e=zr(),t=mn(),r=Jt(),n=Bi(),i=J_(),o=TypeError;return ow=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")},ow}var s2;function xse(){if(s2)return t2;s2=1;var e=zr(),t=bt(),r=hF(),n=mn(),i=sr(),o=U_(),a=wo(),s=yo(),c=fl(),u=vF(),d=gF(),p=mF(),v=t("".indexOf);return r("match",function(h,x,m){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(b){var w=n(this),y=a(b),_=m(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 A=a(T[0]);I[N]=A,A===""&&(w.lastIndex=u(y,o(w.lastIndex),E)),N++}return N===0?null:I}]}),t2}xse();var l2={},aw,c2;function wse(){if(c2)return aw;c2=1;var e=zB(),t=hi();return aw=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)},aw}var u2;function _se(){if(u2)return l2;u2=1;var e=An(),t=V_().EXISTS,r=bt(),n=wse(),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""}}}),l2}_se();var d2={},sw,f2;function Ese(){if(f2)return sw;f2=1;var e=Pd(),t=Function.prototype,r=t.apply,n=t.call;return sw=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),sw}var lw,p2;function Sse(){if(p2)return lw;p2=1;var e=bt(),t=Ia(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return lw=function(c,u,d,p,v,h){var x=d+c.length,m=p.length,b=s;return v!==void 0&&(v=t(v),b=a),i(h,b,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>m){var E=r(S/10);return E===0?w:E<=m?p[E-1]===void 0?n(y,1):p[E-1]+n(y,1):w}_=p[S-1]}return _===void 0?"":_})},lw}var h2;function Ose(){if(h2)return d2;h2=1;var e=Ese(),t=zr(),r=bt(),n=hF(),i=_t(),o=mn(),a=Jt(),s=sr(),c=qd(),u=U_(),d=wo(),p=yo(),v=vF(),h=fl(),x=Sse(),m=gF(),b=mF(),w=Sr(),y=w("replace"),_=Math.max,S=Math.min,E=r([].concat),I=r([].push),N=r("".indexOf),T=r("".slice),A=function(z){return z===void 0?z:String(z)},B=(function(){return"a".replace(/./,"$0")==="$0"})(),L=(function(){return/./[y]?/./[y]("a","$0")==="":!1})(),D=!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 $=L?"$":"$0";return[function(U,Q){var k=p(this),W=s(U)?h(U,y):void 0;return W?t(W,U,k,Q):t(P,d(k),U,Q)},function(Y,U){var Q=o(this),k=d(Y);if(typeof U=="string"&&N(U,$)===-1&&N(U,"$<")===-1){var W=K(P,Q,k,U);if(W.done)return W.value}var J=a(U);J||(U=d(U));var ee=d(m(Q)),j=N(ee,"g")!==-1,G;j&&(G=N(ee,"u")!==-1,Q.lastIndex=0);for(var H=[],q;q=b(Q,k),!(q===null||(I(H,q),!j));){var X=d(q[0]);X===""&&(Q.lastIndex=v(k,u(Q.lastIndex),G))}for(var ne="",te=0,ue=0;ue<H.length;ue++){q=H[ue];for(var re=d(q[0]),ge=_(S(c(q.index),k.length),0),de=[],xe,se=1;se<q.length;se++)I(de,A(q[se]));var le=q.groups;if(J){var we=E([re],de,ge,k);le!==void 0&&I(we,le),xe=d(e(U,void 0,we))}else xe=x(re,k,ge,de,le,U);ge>=te&&(ne+=T(k,te,ge)+xe,te=ge+re.length)}return ne+T(k,te)}]},!D||!B||L),d2}Ose();function Ti(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function uu(e){return!e||!e.ownerDocument?document:e.ownerDocument}var Ko=null,v2=null;dF&&window.addEventListener("resize",function(){v2!==window.devicePixelRatio&&(v2=window.devicePixelRatio,Ko=null)});function g2(e){if(Ko===null){var t=uu(e);if(typeof t>"u")return Ko=0,Ko;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),Ko=i}return Ko}var $u=(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=uu(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=Rj(this.recalculate.bind(this),64),this.onMouseMove=Rj(this.onMouseMove.bind(this),64),this.hideScrollbars=Tj(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Tj(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=Fae(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=uu(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),dF&&(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||lse;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=uu(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 m(){if(v===-1){if(d>h){var b;d-=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((b={},b[o.axis[i].offsetAttr]=d,b)),a.requestAnimationFrame(m)}}else if(d<h){var w;d+=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((w={},w[o.axis[i].offsetAttr]=d,w)),a.requestAnimationFrame(m)}};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:g2(this.el)}catch{return g2(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})();$u.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};$u.instances=new WeakMap;function m2(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?m2(Object(r),!0).forEach(function(n){Cse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cse(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 Ise(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 Rse(e,t){if(e==null)return{};var r=Ise(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 Nse=["children","scrollableNodeProps","tag"],Tse=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},$d=O.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=Rse(e,Nse),c=a,u,d=O.useRef(),p=O.useRef(),v=O.useRef(),h={},x={},m=[];return Object.keys(s).forEach(function(b){Object.prototype.hasOwnProperty.call($u.defaultOptions,b)?h[b]=s[b]:b.match(/data-simplebar-(.+)/)&&b!=="data-simplebar-direction"?m.push({name:b,value:s[b]}):x[b]=s[b]}),m.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
|
|
111
111
|
'data-simplebar-auto-hide="false"' —> 'autoHide="false"'
|
|
112
|
-
`),O.useEffect(function(){return d=i.ref||d,p.current&&(u=new $u(p.current,Gc(Gc(Gc(Gc({},Tse(m)),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)}},[]),O.createElement(c,Hu({ref:p,"data-simplebar":!0},x),O.createElement("div",{className:"simplebar-wrapper"},O.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},O.createElement("div",{className:"simplebar-height-auto-observer"})),O.createElement("div",{className:"simplebar-mask"},O.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:d,contentNodeRef:v}):O.createElement("div",Hu({},i,{className:"simplebar-content-wrapper".concat(i.className?" ".concat(i.className):"")}),O.createElement("div",{className:"simplebar-content"},r)))),O.createElement("div",{className:"simplebar-placeholder"})),O.createElement("div",{className:"simplebar-track simplebar-horizontal"},O.createElement("div",{className:"simplebar-scrollbar"})),O.createElement("div",{className:"simplebar-track simplebar-vertical"},O.createElement("div",{className:"simplebar-scrollbar"})))});$d.displayName="SimpleBar";$d.propTypes={children:hs.oneOfType([hs.node,hs.func]),scrollableNodeProps:hs.object,tag:hs.string};const bF=e=>{switch(e){case fe.EPermissionType.DATACLASS:return C.jsx(_e.FdTableHeader,{className:"h-6 w-6"});case fe.EPermissionType.SINGLETON:return C.jsx(_e.FdSingleton,{className:"h-6 w-6"});case fe.EPermissionType.DATASTORE:return C.jsx(_e.FdModel3,{className:"h-6 w-6"});case fe.EPermissionType.ATTRIBUTE:return C.jsx(_e.FdTableColumn,{className:"h-6 w-6"});case fe.EPermissionType.METHOD:return C.jsx(_e.FdCode,{className:"h-6 w-6"});case fe.EPermissionType.SINGLETON_METHOD:return C.jsx(_e.FdFunctionSingleton,{className:"h-6 w-6"});case fe.ESubPermissionType.ENTITY_SEL_METHOD:return C.jsx(_e.FdFunctionSelection,{className:"h-6 w-6"});case fe.ESubPermissionType.ENTITY_METHOD:return C.jsx(_e.FdFunctionEntity,{className:"h-6 w-6"});case fe.ESubPermissionType.DS_METHOD:return C.jsx(_e.FdFunctionDatastore,{className:"h-6 w-6"});case fe.ESubPermissionType.DATACLASS_METHOD:return C.jsx(_e.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(_e.FdTableHeader,{className:"h-6 w-6"})}},b2=({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",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-inactive-text",children:[C.jsx(_e.FdInfoBold,{className:"h-10 w-10"}),C.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?C.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[C.jsx(or,{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}),C.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)&&C.jsx(C.Fragment,{children:C.jsx(Kr,{container:xr(),delay:100,label:C.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?C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{className:"flex flex-col gap-y-2",children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:c.from.map(u=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[u].id),children:a[u].privilege}))})]})]}):null,c.info&&C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"})," ",C.jsx("span",{className:"flex-1 min-w-0 break-words whitespace-normal text-left",children:c.info})]})]}),children:C.jsx(_e.FdInfoBold,{className:"h-4 w-4 "})})}),(c.checked||c.from.length>0)&&["execute"].includes(t)&&!!(i!=null&&i.length)&&C.jsx(Kr,{container:xr(),delay:100,label:C.jsx("div",{className:"space-y-1 p-1",children:C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(_e.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Function is promoted with: "}),i==null?void 0:i.map(u=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[u].id),children:a[u].privilege}))]})]})}),children:C.jsx(_e.FdCrown,{className:"h-3 w-3 "})})]})]}):null},Pse=({privilegeId:e,privileges:t})=>{const r=pr(),n=r.getCatalogMethods(),i=r.getDataclasses(),o=r.getSingletons(),a=t[e],[s,c]=O.useState([]),[u,d]=O.useState("");O.useEffect(()=>{d("")},[e]),O.useEffect(()=>{const h=a.resources.map(({resource:m,type:b,subType:w})=>({type:b,applyTo:m,subType:w})),x=k_(u.toLowerCase(),n,Object.values(i),Object.values(o));c(x.filter(({applyTo:m,type:b,subType:w})=>!ha.find(h,{applyTo:m,type:b,subType:w})))},[u,a.resources]);const[p,v]=O.useState(!1);return C.jsx(xC.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:C.jsx(xC.Field,{formatOptionLabel:h=>C.jsxs("div",{className:"flex items-center space-x-2",children:[bF(h.type),C.jsx("span",{children:h.applyTo})]}),placeholder:"Create a permission"})})};function kse(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 Ase=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n})=>{const[i,o]=O.useState(null),[a,s]=O.useState(null),{styles:c,attributes:u}=rd(i,a,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),d=pr(),[p,v]=O.useState([]),[h,x]=O.useState(""),{id:m}=e,b=O.useMemo(()=>fe.getInheritedResources(m,n),[m,n[m].includes,n[m].resources]),w=O.useMemo(()=>fe.getPromotions(m,n),[n[m]]);function y(D){v(z=>z.some(P=>D.includes(P))?z.filter(P=>!D.includes(P)):[...z,...D])}const _=async D=>{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,D,n);d.actions.updatePrivileges(P)}},S=async()=>{const{confirmed:D}=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(D){const z=fe.resetResources(e.id,n);d.actions.updatePrivileges(z)}},I=b.filter(D=>p.length===0?!0:p.includes(D.type)).filter(({resource:D})=>h?new RegExp(ha.escapeRegExp(h),"i").test(D):!0),N=kse(I),T=N.filter(D=>{const z=D.permissions.every(P=>!P.checked)&&D.permissions.some(P=>P.from.length>0);return r||!z}),A=(D,z)=>{const P=fe.togglePermission(e.id,D,z,n);d.actions.updatePrivileges(P)},B=O.useMemo(()=>T.some(D=>D.exists===!1),[T]),L=async()=>{const{confirmed:D}=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(D){const P=fe.removeMultiplePermissions(z,n);d.actions.updatePrivileges(P)}};return C.jsxs($d,{className:"z-20 h-full flex-1 overflow-auto 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-panel-1",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("div",{className:"relative w-56",children:C.jsx(wt.Root,{children:C.jsxs(wt.Group,{children:[C.jsx(wt.Icon,{children:C.jsx(_e.FdSearch,{})}),C.jsx(wt.Field,{type:"text",placeholder:"Search available permissions",value:h,onChange:D=>{x(D.target.value)}}),C.jsx(un.Popover,{className:"flex items-center",children:({open:D})=>C.jsxs(C.Fragment,{children:[C.jsx(un.Popover.Button,{ref:o,children:C.jsx(wt.Icon,{isAction:!0,children:C.jsx(_e.FdAdjust,{})})}),D&&C.jsx(Td,{children:C.jsx(un.Popover.Panel,{ref:s,style:c.popper,...u.popper,className:"z-50",static:!0,children:C.jsxs(dr,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5",children:[C.jsx("h5",{className:"mb-2 text-sm",children:"Filter"}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:p.includes("datastore"),onChange:()=>{y(["datastore"])},label:"Datastore",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:p.includes("dataclass"),onChange:()=>{y(["dataclass"])},label:"Dataclass",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:p.includes("singleton"),onChange:()=>{y(["singleton"])},label:"Singleton",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:p.some(z=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes(z)),onChange:()=>{y(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:p.includes("attribute"),onChange:()=>{y(["attribute"])},label:"Attribute",size:"sm"})})]})]})})})]})})]})})}),C.jsx(Pse,{privilegeId:m,privileges:n}),C.jsx("div",{children:C.jsx(Kr,{label:`Resetting the privilege will remove all configured\r
|
|
113
|
-
ressources`,container:xr(),children:C.jsx(Zt,{color:"white",variant:"ghost",onClick:S,children:C.jsx(_e.FdReload,{})})})}),C.jsx(Kr,{icon:C.jsx(_e.FdBulb,{}),label:"Delete all the non existing resources from privileges",container:xr(),children:C.jsx(Zt,{color:"white",variant:"ghost",onClick:L,disabled:!B,children:C.jsx(_e.FdClean,{className:"h-4 w-4"})})})]})}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Read"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Promote"})]})}),T.length?C.jsx("tbody",{children:T.map((D,z)=>{const P=D.permissions.some(K=>K.from.length>0);return C.jsxs("tr",{className:Yr("group even:bg-white/5 hover:bg-input-bg",{"opacity-60":D.exists===!1}),children:[C.jsxs("td",{className:Yr("group flex items-center gap-3 py-2 text-xs group-hover:rounded-l group-hover:bg-input-bg ",D.exists===!1?"text-negative-text":""),children:[bF(D.type),D.resource,C.jsx(Kr,{label:"Remove Permission",container:xr(),children:C.jsx(Zt,{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:D.resource,type:D.type})},className:"opacity-0 group-hover:opacity-100",children:C.jsx(_e.FdPlus,{className:"h-4 w-4 rotate-45 transform"})})})]}),C.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:C.jsx(Wo,{permissions:D.permissions,showIncluded:r,label:"read",onToggle:K=>A(D,K),onSelect:t,privileges:n,exists:D.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:C.jsx(Wo,{permissions:D.permissions,showIncluded:r,label:"create",onToggle:K=>A(D,K),onSelect:t,privileges:n,exists:D.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:C.jsx(Wo,{permissions:D.permissions,showIncluded:r,label:"update",onToggle:K=>A(D,K),onSelect:t,privileges:n,exists:D.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:C.jsx(Wo,{permissions:D.permissions,showIncluded:r,label:"drop",onToggle:K=>A(D,K),onSelect:t,privileges:n,exists:D.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:C.jsx(Wo,{promoted:w[D.resource],permissions:D.permissions,showIncluded:r,label:"execute",onToggle:K=>A(D,K),onSelect:t,privileges:n,exists:D.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-input-bg",children:C.jsx(Wo,{permissions:D.permissions,showIncluded:r,label:"promote",onToggle:K=>A(D,K),onSelect:t,privileges:n,exists:D.exists})})]},z)})}):null]}),!N.length&&h?C.jsx(b2,{children:"The Permission you're looking for can't be found "}):null,!N.length&&!h?C.jsxs(b2,{children:["This Privilege has no Permissions configured yet ",C.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},Mse=({onCreate:e})=>{const t=pr(),r=t.getPrivileges(),[n,i]=O.useState(null),[o,a]=O.useState(null),[s,c]=O.useState(""),[u,d]=O.useState(null),{styles:p,attributes:v}=rd(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});O.useEffect(()=>{c(""),d(null)},[o]);const h=x=>{d(null);try{const m=fe.createPrivilege(s,r),b=Object.values(m).find(w=>w.privilege===s);t.actions.updatePrivileges(m),b&&e(b),setTimeout(()=>{x()},0)}catch(m){d(m.message)}};return C.jsx(un.Popover,{children:({open:x,close:m})=>C.jsxs(C.Fragment,{children:[C.jsx(un.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",ref:i,children:C.jsx(Zt,{variant:"ghost",color:"white",children:C.jsx(_e.FdPlus,{className:"h-4 w-4"})})}),x&&C.jsx(Td,{children:C.jsx(un.Popover.Panel,{ref:a,style:p.popper,...v.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:C.jsxs(dr,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Privilege"}),C.jsx("div",{className:"mt-2",children:C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{children:"Name"}),C.jsxs(wt.Root,{className:"w-full",color:u?"negative":"primary",children:[C.jsx(wt.Group,{children:C.jsx(wt.Field,{autoFocus:!0,value:s,onChange:b=>c(b.target.value),onKeyDown:b=>{b.key==="Enter"&&h(m)},type:"text"})}),u&&C.jsx(wt.Message,{children:u})]})]})}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx(Zt,{onClick:()=>{h(m)},children:"Create"}),C.jsx(Zt,{color:"white",variant:"outline",onClick:()=>m(),children:"Cancel"})]})]})})})]})})},Dse=()=>{const e=pr(),t=e.getCatalog(),r=e.getPrivileges(),n=O.useMemo(()=>{if(t===null)return r;const u=fB(r,Object.values((t==null?void 0:t.dataClasses)??{}));return pB(u,t)},[r,t]),[i,o]=O.useState(null),a=O.useMemo(()=>Object.keys(n),[n]);O.useEffect(()=>{i&&n[i.id]||!a.length||o(n[a[0]])},[n]),O.useEffect(()=>{a.length<2&&c(!0)},[a.length]);const[s,c]=O.useState(!0);return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs(dr,{depth:1,className:"flex h-full w-[356px] flex-col",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1",children:[C.jsx("span",{children:C.jsx(_e.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),C.jsx(Mse,{onCreate:u=>{o(u)}})]}),C.jsx(Moe,{privileges:n,selectedPrivilege:i,selectPrivilege:u=>{o(u)}})]}),i&&n[i.id]?C.jsxs(dr,{depth:1,className:"privileges-container relative flex flex-1 flex-col overflow-x-auto border-l-[0.5px]",children:[C.jsxs("div",{className:"mb-1 flex h-full w-full flex-col items-stretch",children:[i.privilege!=="guest"?C.jsx(koe,{privileges:n,selectedPrivilege:i,onSelect:u=>o(r[u]),setShowIncluded:c,showIncluded:s}):null,C.jsx(Ase,{privileges:n,selectedPrivilege:i,onSelect:u=>o(r[u]),showIncluded:s})]}),C.jsx(jse,{privileges:n,selectedPrivilege:i,setSelectedPrivilege:o})]}):C.jsx(ZL,{tab:"Privilege"})]})},jse=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=O.useState(!1);return C.jsx(fe.Panel,{path:fe.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(dr,{depth:2,className:"h-full w-full rounded",children:C.jsx($ie,{dict:e,data:fe.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})},qse=({role:e})=>{var E;const t=pr(),[r,n]=O.useState(e),[i,o]=O.useState(e.role),[a,s]=O.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}=Y1(),[h,x]=O.useState(!1),m=fe.useOutsideClick(()=>{h&&w()});fe.useDidMountEffect(()=>{i!==e.role&&o(e.role)},[e.role]),O.useEffect(()=>{e.role||x(!0)},[]),O.useEffect(()=>{n(e)},[e]);const b=()=>{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),A=T.indexOf(r.id),B=Math.max(0,A-1),L=T[B];A===0?v(N[0]):I[L]?v(L):v(N[0])}t.actions.updateRoles(I)},S=(I=null)=>{if(I&&I.stopPropagation(),!e.role){_();return}x(!1),o(e.role)};return C.jsx(C.Fragment,{children:C.jsxs(dr,{depth:4,borderType:p===r.id?"primary":p!==r.id?"light":"default",className:Yr("rounded border p-2"),role:"button","data-cy":"privilegeCard",onClick:()=>{v(r.id)},ref:m,children:[C.jsx("div",{className:"flex items-center justify-between",children:C.jsxs("div",{className:"flex flex-1 items-center",children:[C.jsx("span",{className:"mr-4",children:C.jsx(_e.FdGroup,{className:"h-6 w-6"})}),h?C.jsxs(wt.Root,{color:a?"negative":"primary",className:"flex-1 mr-2",children:[C.jsx(wt.Group,{children:C.jsx(wt.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&&C.jsx(wt.Message,{children:a})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",title:i,children:r.role}),C.jsx("div",{className:Yr("justify-between ml-auto flex w-fit items-center gap-x-2"),children:h?C.jsxs(C.Fragment,{children:[C.jsx(Zt,{color:"white",variant:"ghost",onClick:w,children:C.jsx(_e.FdSave,{className:"h-4 w-4"})}),C.jsx(Zt,{color:"white",variant:"ghost",onClick:S,children:C.jsx(_e.FdClose,{className:"h-4 w-4"})})]}):C.jsxs(C.Fragment,{children:[C.jsx(Zt,{color:"white",variant:"ghost",onClick:b,children:C.jsx(_e.FdPen,{className:"h-4 w-4"})}),C.jsx(Zt,{color:"white",variant:"ghost",onClick:I=>y(I),children:C.jsx(_e.FdTrash,{className:"h-4 w-4"})})]})})]})}),C.jsxs("span",{className:Yr("ml-[43px] py-1 text-xs"),children:[u," Privilege",u>1?"s":""]})]})})},yF=(e,t)=>e?t[e]:null,y2=(e,t,r)=>{const n=yF(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},Lse=()=>{const e=pr(),t=e.getPrivileges(),r=e.getRoles(),{selectedRole:n}=Y1(),i=yF(n,r),o=(a,s)=>s&&s.privileges.includes(a.id);return C.jsxs(dr,{depth:1,className:"w-full border-b p-4 ",children:[C.jsx("div",{className:"mb-4 flex items-center gap-x-5",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(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)=>C.jsxs(Zc,{"data-cy":"item=>Permisions",color:"primary",onClick:()=>{const c=y2(i.id,a.id,r);e.actions.updateRoles(c)},children:[a.privilege,C.jsx(_e.FdPlus,{className:"rotate-45 transform"})]},s)),Object.values(t).filter(a=>!o(a,i)&&a.privilege!=="guest").map((a,s)=>C.jsxs(Zc,{"data-cy":"item=>Permisions",color:"dark",onClick:()=>{const c=y2(i.id,a.id,r);e.actions.updateRoles(c)},children:[a.privilege,C.jsx(_e.FdPlus,{})]},s))]})]})},zse=({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",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-inactive-text",children:[C.jsx(_e.FdInfoBold,{className:"absolute -right-full h-10 w-10 translate-x-1"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})}),Hw=(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=Hw(e,t,{[v]:a[v]},n);Object.values(h.permissions).forEach(m=>{c[m.name].explicitly||(!c[m.name].from.includes(a[v].privilege)&&m.checked&&c[m.name].from.push(a[v].privilege),c[m.name].inherited=c[m.name].inherited||x[m.name].value||x[m.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=Hw(p,t,r,n),h=x=>{let m=c[x].value;return n?!c[x].value&&!c[x].explicitly&&(m=v[x].value):c[x].value&&!c[x].explicitly&&(m=v[x].value),{value:m,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}},Bse=e=>{switch(e){case"dataclass":return C.jsx(_e.FdTableHeader,{className:"h-6 w-6"});case"singleton":return C.jsx(_e.FdSingleton,{className:"h-6 w-6"});case"datastore":return C.jsx(_e.FdModel3,{className:"h-6 w-6"});case"attribute":return C.jsx(_e.FdTableColumn,{className:"h-6 w-6"});case"method":return C.jsx(_e.FdCode,{className:"h-6 w-6"});case"singletonMethod":return C.jsx(_e.FdFunctionSingleton,{className:"h-6 w-6"});case"entityselMethod":return C.jsx(_e.FdFunctionSelection,{className:"h-6 w-6"});case"entityMethod":return C.jsx(_e.FdFunctionEntity,{className:"h-6 w-6"});case"dsMethod":return C.jsx(_e.FdFunctionDatastore,{className:"h-6 w-6"});case"dataclassMethod":return C.jsx(_e.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.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=O.useMemo(()=>Hw(t,e.otherPrivs,e.rolePrivs,u),[e,t,u]);return C.jsxs("tr",{className:Yr("group even:bg-white/5 hover:bg-input-bg",o),children:[C.jsxs("td",{className:Yr("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,m)=>C.jsx("div",{className:Yr("ml-1.5 mr-1 w-[2px] bg-grey-100",{"mr-0.5":i})},m)),C.jsxs("div",{className:"flex items-center gap-3 py-2",children:[r&&C.jsx("button",{onClick:s,className:"w-3",children:c?C.jsx(_e.FdRight,{className:"inline h-4 w-4"}):C.jsx(_e.FdDown,{className:"inline h-4 w-4"})}),Bse(t.type),a?t.applyTo:v||p]})]}),C.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)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(or,{value:h.read.value||h.read.inherited,onClick:d,isDisabled:!0}),C.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?C.jsx(Kr,{container:xr(),delay:100,label:C.jsx("div",{className:"space-y-1 p-1",children:h.read.from.length?C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{className:"flex flex-col gap-y-2",children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:h.read.from.map((x,m)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):null}),children:C.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})}),C.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)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(or,{value:h.create.value||h.create.inherited,onClick:d,isDisabled:!0}),C.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?C.jsx(Kr,{container:xr(),delay:100,label:C.jsx("div",{className:"space-y-1 p-1",children:h.read.from.length?C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{className:"flex flex-col gap-y-2",children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:h.read.from.map((x,m)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):null}),children:C.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})}),C.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)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(or,{value:h.update.value||h.update.inherited,onClick:d,isDisabled:!0}),C.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?C.jsx(Kr,{container:xr(),delay:100,label:C.jsx("div",{className:"space-y-1 p-1",children:h.update.from.length?C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{className:"flex flex-col gap-y-2",children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:h.update.from.map((x,m)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):null}),children:C.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})}),C.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)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(or,{value:h.drop.value||h.drop.inherited,onClick:d,isDisabled:!0}),C.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?C.jsx(Kr,{container:xr(),delay:100,label:C.jsx("div",{className:"space-y-1 p-1",children:h.drop.from.length?C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{className:"flex flex-col gap-y-2",children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:h.drop.from.map((x,m)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):null}),children:C.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-input-bg",children:t.type!=="attribute"&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(or,{value:h.execute.value||h.execute.inherited,onClick:d,isDisabled:!0}),C.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?C.jsx(Kr,{container:xr(),delay:100,label:C.jsx("div",{className:"space-y-1 p-1",children:h.execute.from.length?C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{className:"flex flex-col gap-y-2",children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:h.execute.from.map((x,m)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):null}),children:C.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})})]})},x2=({depth:e,permission:t,privileges:r,childCollapsed:n,didChildCollapsed:i,toastMessageCallback:o})=>{const[a,s]=O.useState(n),c=pr(),u=c.getRestrictedByDefault(),d=c.getPrivileges();return O.useEffect(()=>{n===!0&&s(!0)},[n]),C.jsxs(C.Fragment,{children:[C.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&&C.jsxs(C.Fragment,{children:[t.attributes.map((p,v)=>C.jsx(ia,{privileges:r,permission:p,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:o},`${p.type}-${v}`)),t.methods.map((p,v)=>C.jsx(ia,{privileges:r,permission:p,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:o},`${p.type}-${v}`))]})]})},Fse=({selectedRole:e})=>{const[t,r]=O.useState(null),[n,i]=O.useState(null),{styles:o,attributes:a}=rd(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),s=pr(),c=s.getRestrictedByDefault(),u=s.getPrivileges(),[d,p]=O.useState([]),[v,h]=O.useState(""),x=s.getCatalogMethods(),m=s.getDataclasses(),b=s.getSingletons(),[w,y]=O.useState({}),[_,S]=O.useState([]);O.useEffect(()=>{const $=Vie(x,Object.values(m),Object.values(b));y($)},[e]);function E($){const Y=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"];return $.sort((U,Q)=>{const k=Y.indexOf(U.type),W=Y.indexOf(Q.type);return k!==W?k-W:U.applyTo.toLowerCase()>Q.applyTo.toLowerCase()?1:-1})}O.useEffect(()=>{S(E(k_(v,x,Object.values(m),Object.values(b)).filter($=>d.length?d.includes($.type):!0)))},[d,v]);const[I,N]=O.useState(!1),T=$=>{p(Y=>Y.some(U=>$.includes(U))?Y.filter(U=>!$.includes(U)):[...Y,...$])},A=s.getRoles(),B={toggleAllCollapsed:$=>{$.allCollapsed=!$.allCollapsed},toggleChildCollapsed:$=>{$.childCollapsed=!$.childCollapsed},setAllCollapsed:($,Y)=>{$.allCollapsed=Y},setChildCollapsed:($,Y)=>{$.childCollapsed=Y}},L=O.useMemo(()=>{const $=Object.values(u).find(W=>W.privilege==="guest"),Y=A[e],U=Y?Object.fromEntries(Y.privileges.map(W=>[W,u[W]]).filter(([,W])=>!!W)):{};if(c)return{rolePrivs:U,otherPrivs:$?{[$.id]:$}:{}};const Q=$?{[$.id]:{...$,active:!0}}:{},k=Object.fromEntries(Object.entries(u).filter(([W])=>W!==($==null?void 0:$.id)&&!(Y!=null&&Y.privileges.includes(W))).map(([W,J])=>[W,{...J,active:!1}]));return{rolePrivs:U,otherPrivs:{...Q,...k}}},[u,A,e,c]),{state:{allCollapsed:D,childCollapsed:z},dispatch:P}=fe.useEnhancedState({allCollapsed:!1,childCollapsed:!1},B,"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 C.jsxs($d,{className:"z-20 h-full flex-1 overflow-auto 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-panel-1",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(fe.Tooltip,{label:"Collapse All",placement:"top",container:xr(),children:C.jsx(Zt,{color:"white",variant:"ghost",disabled:D,onClick:()=>{z?(P.setAllCollapsed(!0),N(!0)):P.setChildCollapsed(!0)},children:C.jsx(_e.FdCollapseAll,{})})}),C.jsx("div",{className:"relative w-56",children:C.jsx(wt.Root,{children:C.jsxs(wt.Group,{children:[C.jsx(wt.Icon,{children:C.jsx(_e.FdSearch,{})}),C.jsx(wt.Field,{type:"text",placeholder:"Search",value:v,onChange:$=>{h($.target.value)}}),C.jsx(un.Popover,{className:"flex items-center",children:({open:$})=>C.jsxs(C.Fragment,{children:[C.jsx(un.Popover.Button,{ref:r,children:C.jsx(wt.Icon,{isAction:!0,children:C.jsx(_e.FdAdjust,{})})}),$&&C.jsx(Td,{children:C.jsx(un.Popover.Panel,{ref:i,style:o.popper,...a.popper,className:"z-50",static:!0,children:C.jsxs(dr,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5 text-xs",children:[C.jsx("h5",{className:"mb-2 text-sm",children:"Filter"}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:d.includes("datastore"),onChange:()=>{T(["datastore"])},label:"Datastore",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:d.includes("dataclass"),onChange:()=>{T(["dataclass"])},label:"Dataclass",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:d.includes("singleton"),onChange:()=>{T(["singleton"])},label:"Singleton",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:d.some(Y=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes(Y)),onChange:()=>{T(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:d.includes("attribute"),onChange:()=>{T(["attribute"])},label:"Attribute",size:"sm"})})]})]})})})]})})]})})})]})}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"read"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"})]})}),C.jsx("tbody",{className:"relative",children:d.length||v?_.map(($,Y)=>C.jsx(ia,{privileges:L,permission:$,depth:0,inSearch:!0,isRestrictedByDefault:c,allPrivileges:u,toastMessageCallback:K},`${$.type}-${Y}`)):Object.values(w).map(($,Y)=>C.jsxs(O.Fragment,{children:[C.jsx(ia,{privileges:L,permission:$,isRestrictedByDefault:c,allPrivileges:u,hasChild:!0,depth:0,toggleCollapse:()=>{const U=!I;N(U),P.setAllCollapsed(!U&&D?!1:D)},collapsed:I,toastMessageCallback:K}),$.type==="datastore"&&!I?C.jsxs(C.Fragment,{children:[$.methods.map((U,Q)=>C.jsx(ia,{privileges:L,isRestrictedByDefault:c,allPrivileges:u,permission:U,depth:1,collapsed:D||!1,toastMessageCallback:K},`${U.type}-${Q}`)),$.dataClasses.map((U,Q)=>C.jsx(x2,{depth:1,privileges:L,permission:U,childCollapsed:z,didChildCollapsed:k=>{P.setChildCollapsed(k?z:!1)},toastMessageCallback:K},`${U.type}-${Q}`))]}):null,$.singletons.map((U,Q)=>C.jsx(x2,{depth:0,privileges:L,permission:U,childCollapsed:D,didChildCollapsed:k=>{P.setAllCollapsed(k?D:!1)},toastMessageCallback:K},`${U.type}-${Q}`))]},`${$.type}-${Y}`))})]}),(v||d.length)&&!_.length?C.jsx(zse,{children:"The Permission you're looking for can't be found "}):null]})},$se=()=>{const e=pr(),t=e.getRoles(),[r,n]=O.useState(null),[i,o]=O.useState(null),[a,s]=O.useState(""),[c,u]=O.useState(null),{styles:d,attributes:p}=rd(r,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});O.useEffect(()=>{s(""),u(null)},[i]);const v=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(t).find(b=>b.role.toLowerCase()===a.toLowerCase()))throw new Error(`A role with the name ${a} already exists`);const x=EB.generate(),m=fe.createRole(x,a,t);e.actions.updateRoles(m)};return C.jsx(un.Popover,{children:({open:h,close:x})=>{const m=()=>{u(null);try{fe.validateName(a),v(),x()}catch(b){u(b.message)}};return C.jsxs(C.Fragment,{children:[C.jsx(un.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",ref:n,children:C.jsx(Zt,{variant:"ghost",color:"white",children:C.jsx(_e.FdPlus,{className:"h-4 w-4"})})}),h&&C.jsx(Td,{children:C.jsx(un.Popover.Panel,{ref:o,style:d.popper,...p.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:C.jsxs(dr,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Role"}),C.jsx("div",{className:"mt-2",children:C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{children:"Name"}),C.jsxs(wt.Root,{color:c?"negative":"primary",className:"w-full",children:[C.jsx(wt.Group,{children:C.jsx(wt.Field,{autoFocus:!0,value:a,onChange:b=>s(b.target.value),onKeyDown:b=>{b.key==="Enter"&&m()},type:"text"})}),c&&C.jsx(wt.Message,{children:c})]})]})}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx(Zt,{onClick:()=>{m()},children:"Create"}),C.jsx(Zt,{color:"white",variant:"outline",onClick:()=>x(),children:"Cancel"})]})]})})})]})}})},Hse=()=>{const t=pr().getRoles(),{selectedRole:r}=Y1();return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs(dr,{depth:1,className:"flex h-full w-[356px] flex-col",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1",children:[C.jsx("span",{children:C.jsx(_e.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),C.jsx($se,{})]}),C.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)=>C.jsx(qse,{role:n},i)):C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsx("div",{className:"flex flex-1 items-center justify-center text-inactive-text",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4",children:[C.jsx(_e.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(_e.FdPlus,{className:"ml-2 inline h-4 w-4"})]})]})})})})]}),C.jsx(dr,{depth:1,className:Yr("relative flex h-full w-full flex-1 flex-col items-stretch overflow-x-auto",{"border-l-[0.5px]":r}),children:C.jsx("div",{className:"flex h-full w-full select-none flex-col",children:r?C.jsxs(C.Fragment,{children:[C.jsx(Lse,{}),C.jsx(Fse,{selectedRole:r})]}):C.jsx(ZL,{tab:"Role"})})})]})},xF=()=>{const e=pr(),t=e.getQodly(),r=e.getSelectedTab(),n=e.getForceLogin(),i=e.getRestrictedByDefault(),o=O.useRef();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","data-cy":"Roles&Privileges-editor-cy",ref:a=>o.current=a,children:C.jsxs("div",{className:"flex w-full flex-col",children:[C.jsx(OK,{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"?C.jsx(CK,{children:C.jsx(Hse,{})}):C.jsx(Dse,{})]})})})},Vse=()=>{const{modals:e,closeModal:t,editModal:r}=Poe();return C.jsx(C.Fragment,{children:e.map((n,i)=>C.jsx(fe.Modal,{hasOverlay:i===0,...n,onClose:t,onEdit:r,container:xr()},n.id))})},wF=e=>{if(!e)return fe.rolesToAPI(fe.sanitizeRoles({}));try{return fe.rolesToAPI(fe.sanitizeRoles(JSON.parse(e)))}catch{return fe.rolesToAPI(fe.sanitizeRoles({}))}},Wse=({initialValue:e,onChange:t,...r})=>{const n=pr(),i=n.getRolesFlags(),o=n.getRolesAndPrivileges(),a=O.useMemo(()=>wF(e),[e]),s=O.useRef(a);return O.useEffect(()=>{s.current=a,!ha.isEqual(a,o)&&n.actions.setRolesContent({content:a,flags:{touched:!1}})},[n,o,a]),fe.useDidMountEffect(()=>{if(!(!t||!i.touched)&&!ha.isEqual(o,s.current))try{const c=JSON.stringify(o,null,2);t(c),s.current=o}catch(c){console.error("[Roles Editor Standalone] Error on value stringify:",c)}},[o,i.touched,t]),C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"relative h-screen z-10 overflow-hidden",children:C.jsx(xF,{...r})}),C.jsx(Vse,{})]})},Use=e=>{const t=Toe();return C.jsx(vB,{adapter:t,children:C.jsx(fe.TipsProvider,{children:C.jsx(Wse,{...e})})})},Gse=({initialValue:e,...t})=>{const r=O.useMemo(()=>({...fe.sanitizeRoles(wF(e)),flags:{touched:!1}}),[e]);return C.jsx(Noe,{initialState:r,children:C.jsx(Use,{initialValue:e,...t})})};exports.ROLES_EDITOR_SCOPE_CLASS=w2.ROLES_EDITOR_SCOPE_CLASS;exports.EditorStateAdapterProvider=vB;exports.Roles=xF;exports.Standalone=Gse;exports.useReduxAdapter=Yie;
|
|
112
|
+
`),O.useEffect(function(){return d=i.ref||d,p.current&&(u=new $u(p.current,Gc(Gc(Gc(Gc({},Tse(m)),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)}},[]),O.createElement(c,Hu({ref:p,"data-simplebar":!0},x),O.createElement("div",{className:"simplebar-wrapper"},O.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},O.createElement("div",{className:"simplebar-height-auto-observer"})),O.createElement("div",{className:"simplebar-mask"},O.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:d,contentNodeRef:v}):O.createElement("div",Hu({},i,{className:"simplebar-content-wrapper".concat(i.className?" ".concat(i.className):"")}),O.createElement("div",{className:"simplebar-content"},r)))),O.createElement("div",{className:"simplebar-placeholder"})),O.createElement("div",{className:"simplebar-track simplebar-horizontal"},O.createElement("div",{className:"simplebar-scrollbar"})),O.createElement("div",{className:"simplebar-track simplebar-vertical"},O.createElement("div",{className:"simplebar-scrollbar"})))});$d.displayName="SimpleBar";$d.propTypes={children:hs.oneOfType([hs.node,hs.func]),scrollableNodeProps:hs.object,tag:hs.string};const bF=e=>{switch(e){case fe.EPermissionType.DATACLASS:return C.jsx(_e.FdTableHeader,{className:"h-6 w-6"});case fe.EPermissionType.SINGLETON:return C.jsx(_e.FdSingleton,{className:"h-6 w-6"});case fe.EPermissionType.DATASTORE:return C.jsx(_e.FdModel3,{className:"h-6 w-6"});case fe.EPermissionType.ATTRIBUTE:return C.jsx(_e.FdTableColumn,{className:"h-6 w-6"});case fe.EPermissionType.METHOD:return C.jsx(_e.FdCode,{className:"h-6 w-6"});case fe.EPermissionType.SINGLETON_METHOD:return C.jsx(_e.FdFunctionSingleton,{className:"h-6 w-6"});case fe.ESubPermissionType.ENTITY_SEL_METHOD:return C.jsx(_e.FdFunctionSelection,{className:"h-6 w-6"});case fe.ESubPermissionType.ENTITY_METHOD:return C.jsx(_e.FdFunctionEntity,{className:"h-6 w-6"});case fe.ESubPermissionType.DS_METHOD:return C.jsx(_e.FdFunctionDatastore,{className:"h-6 w-6"});case fe.ESubPermissionType.DATACLASS_METHOD:return C.jsx(_e.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(_e.FdTableHeader,{className:"h-6 w-6"})}},b2=({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",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-inactive-text",children:[C.jsx(_e.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})}),Uo=({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?C.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[C.jsx(or,{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}),C.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)&&C.jsx(C.Fragment,{children:C.jsx(Kr,{container:xr(),delay:100,label:C.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?C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{className:"flex flex-col gap-y-2",children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:c.from.map(u=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[u].id),children:a[u].privilege}))})]})]}):null,c.info&&C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"})," ",C.jsx("span",{className:"flex-1 min-w-0 break-words whitespace-normal text-left",children:c.info})]})]}),children:C.jsx(_e.FdInfoBold,{className:"h-4 w-4 "})})}),(c.checked||c.from.length>0)&&["execute"].includes(t)&&!!(i!=null&&i.length)&&C.jsx(Kr,{container:xr(),delay:100,label:C.jsx("div",{className:"space-y-1 p-1",children:C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(_e.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Function is promoted with: "}),i==null?void 0:i.map(u=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[u].id),children:a[u].privilege}))]})]})}),children:C.jsx(_e.FdCrown,{className:"h-3 w-3 "})})]})]}):null},Pse=({privilegeId:e,privileges:t})=>{const r=pr(),n=r.getCatalogMethods(),i=r.getDataclasses(),o=r.getSingletons(),a=t[e],[s,c]=O.useState([]),[u,d]=O.useState("");O.useEffect(()=>{d("")},[e]),O.useEffect(()=>{const h=a.resources.map(({resource:m,type:b,subType:w})=>({type:b,applyTo:m,subType:w})),x=k_(u.toLowerCase(),n,Object.values(i),Object.values(o));c(x.filter(({applyTo:m,type:b,subType:w})=>!lo.find(h,{applyTo:m,type:b,subType:w})))},[u,a.resources]);const[p,v]=O.useState(!1);return C.jsx(xC.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:C.jsx(xC.Field,{formatOptionLabel:h=>C.jsxs("div",{className:"flex items-center space-x-2",children:[bF(h.type),C.jsx("span",{children:h.applyTo})]}),placeholder:"Create a permission"})})};function kse(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 Ase=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n})=>{const[i,o]=O.useState(null),[a,s]=O.useState(null),{styles:c,attributes:u}=rd(i,a,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),d=pr(),[p,v]=O.useState([]),[h,x]=O.useState(""),{id:m}=e,b=O.useMemo(()=>fe.getInheritedResources(m,n),[m,n[m].includes,n[m].resources]),w=O.useMemo(()=>fe.getPromotions(m,n),[n[m]]);function y(D){v(z=>z.some(P=>D.includes(P))?z.filter(P=>!D.includes(P)):[...z,...D])}const _=async D=>{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,D,n);d.actions.updatePrivileges(P)}},S=async()=>{const{confirmed:D}=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(D){const z=fe.resetResources(e.id,n);d.actions.updatePrivileges(z)}},I=b.filter(D=>p.length===0?!0:p.includes(D.type)).filter(({resource:D})=>h?new RegExp(lo.escapeRegExp(h),"i").test(D):!0),N=kse(I),T=N.filter(D=>{const z=D.permissions.every(P=>!P.checked)&&D.permissions.some(P=>P.from.length>0);return r||!z}),A=(D,z)=>{const P=fe.togglePermission(e.id,D,z,n);d.actions.updatePrivileges(P)},B=O.useMemo(()=>T.some(D=>D.exists===!1),[T]),L=async()=>{const{confirmed:D}=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(D){const P=fe.removeMultiplePermissions(z,n);d.actions.updatePrivileges(P)}};return C.jsxs($d,{className:"z-20 h-full flex-1 overflow-auto 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-panel-1",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("div",{className:"relative w-56",children:C.jsx(wt.Root,{children:C.jsxs(wt.Group,{children:[C.jsx(wt.Icon,{children:C.jsx(_e.FdSearch,{})}),C.jsx(wt.Field,{type:"text",placeholder:"Search available permissions",value:h,onChange:D=>{x(D.target.value)}}),C.jsx(un.Popover,{className:"flex items-center",children:({open:D})=>C.jsxs(C.Fragment,{children:[C.jsx(un.Popover.Button,{ref:o,children:C.jsx(wt.Icon,{isAction:!0,children:C.jsx(_e.FdAdjust,{})})}),D&&C.jsx(Td,{children:C.jsx(un.Popover.Panel,{ref:s,style:c.popper,...u.popper,className:"z-50",static:!0,children:C.jsxs(dr,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5",children:[C.jsx("h5",{className:"mb-2 text-sm",children:"Filter"}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:p.includes("datastore"),onChange:()=>{y(["datastore"])},label:"Datastore",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:p.includes("dataclass"),onChange:()=>{y(["dataclass"])},label:"Dataclass",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:p.includes("singleton"),onChange:()=>{y(["singleton"])},label:"Singleton",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:p.some(z=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes(z)),onChange:()=>{y(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:p.includes("attribute"),onChange:()=>{y(["attribute"])},label:"Attribute",size:"sm"})})]})]})})})]})})]})})}),C.jsx(Pse,{privilegeId:m,privileges:n}),C.jsx("div",{children:C.jsx(Kr,{label:`Resetting the privilege will remove all configured\r
|
|
113
|
+
ressources`,container:xr(),children:C.jsx(Zt,{color:"white",variant:"ghost",onClick:S,children:C.jsx(_e.FdReload,{})})})}),C.jsx(Kr,{icon:C.jsx(_e.FdBulb,{}),label:"Delete all the non existing resources from privileges",container:xr(),children:C.jsx(Zt,{color:"white",variant:"ghost",onClick:L,disabled:!B,children:C.jsx(_e.FdClean,{className:"h-4 w-4"})})})]})}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Read"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Promote"})]})}),T.length?C.jsx("tbody",{children:T.map((D,z)=>{const P=D.permissions.some(K=>K.from.length>0);return C.jsxs("tr",{className:Yr("group even:bg-white/5 hover:bg-input-bg",{"opacity-60":D.exists===!1}),children:[C.jsxs("td",{className:Yr("group flex items-center gap-3 py-2 text-xs group-hover:rounded-l group-hover:bg-input-bg ",D.exists===!1?"text-negative-text":""),children:[bF(D.type),D.resource,C.jsx(Kr,{label:"Remove Permission",container:xr(),children:C.jsx(Zt,{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:D.resource,type:D.type})},className:"opacity-0 group-hover:opacity-100",children:C.jsx(_e.FdPlus,{className:"h-4 w-4 rotate-45 transform"})})})]}),C.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:C.jsx(Uo,{permissions:D.permissions,showIncluded:r,label:"read",onToggle:K=>A(D,K),onSelect:t,privileges:n,exists:D.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:C.jsx(Uo,{permissions:D.permissions,showIncluded:r,label:"create",onToggle:K=>A(D,K),onSelect:t,privileges:n,exists:D.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:C.jsx(Uo,{permissions:D.permissions,showIncluded:r,label:"update",onToggle:K=>A(D,K),onSelect:t,privileges:n,exists:D.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:C.jsx(Uo,{permissions:D.permissions,showIncluded:r,label:"drop",onToggle:K=>A(D,K),onSelect:t,privileges:n,exists:D.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:C.jsx(Uo,{promoted:w[D.resource],permissions:D.permissions,showIncluded:r,label:"execute",onToggle:K=>A(D,K),onSelect:t,privileges:n,exists:D.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-input-bg",children:C.jsx(Uo,{permissions:D.permissions,showIncluded:r,label:"promote",onToggle:K=>A(D,K),onSelect:t,privileges:n,exists:D.exists})})]},z)})}):null]}),!N.length&&h?C.jsx(b2,{children:"The Permission you're looking for can't be found "}):null,!N.length&&!h?C.jsxs(b2,{children:["This Privilege has no Permissions configured yet ",C.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},Mse=({onCreate:e})=>{const t=pr(),r=t.getPrivileges(),[n,i]=O.useState(null),[o,a]=O.useState(null),[s,c]=O.useState(""),[u,d]=O.useState(null),{styles:p,attributes:v}=rd(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});O.useEffect(()=>{c(""),d(null)},[o]);const h=x=>{d(null);try{const m=fe.createPrivilege(s,r),b=Object.values(m).find(w=>w.privilege===s);t.actions.updatePrivileges(m),b&&e(b),setTimeout(()=>{x()},0)}catch(m){d(m.message)}};return C.jsx(un.Popover,{children:({open:x,close:m})=>C.jsxs(C.Fragment,{children:[C.jsx(un.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",ref:i,children:C.jsx(Zt,{variant:"ghost",color:"white",children:C.jsx(_e.FdPlus,{className:"h-4 w-4"})})}),x&&C.jsx(Td,{children:C.jsx(un.Popover.Panel,{ref:a,style:p.popper,...v.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:C.jsxs(dr,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Privilege"}),C.jsx("div",{className:"mt-2",children:C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{children:"Name"}),C.jsxs(wt.Root,{className:"w-full",color:u?"negative":"primary",children:[C.jsx(wt.Group,{children:C.jsx(wt.Field,{autoFocus:!0,value:s,onChange:b=>c(b.target.value),onKeyDown:b=>{b.key==="Enter"&&h(m)},type:"text"})}),u&&C.jsx(wt.Message,{children:u})]})]})}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx(Zt,{onClick:()=>{h(m)},children:"Create"}),C.jsx(Zt,{color:"white",variant:"outline",onClick:()=>m(),children:"Cancel"})]})]})})})]})})},Dse=()=>{const e=pr(),t=e.getCatalog(),r=e.getPrivileges(),n=O.useMemo(()=>{if(t===null)return r;const u=fB(r,Object.values((t==null?void 0:t.dataClasses)??{}));return pB(u,t)},[r,t]),[i,o]=O.useState(null),a=O.useMemo(()=>Object.keys(n),[n]);O.useEffect(()=>{i&&n[i.id]||!a.length||o(n[a[0]])},[n]),O.useEffect(()=>{a.length<2&&c(!0)},[a.length]);const[s,c]=O.useState(!0);return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs(dr,{depth:1,className:"flex h-full w-[356px] flex-col",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1",children:[C.jsx("span",{children:C.jsx(_e.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),C.jsx(Mse,{onCreate:u=>{o(u)}})]}),C.jsx(Moe,{privileges:n,selectedPrivilege:i,selectPrivilege:u=>{o(u)}})]}),i&&n[i.id]?C.jsxs(dr,{depth:1,className:"privileges-container relative flex flex-1 flex-col overflow-x-auto border-l-[0.5px]",children:[C.jsxs("div",{className:"mb-1 flex h-full w-full flex-col items-stretch",children:[i.privilege!=="guest"?C.jsx(koe,{privileges:n,selectedPrivilege:i,onSelect:u=>o(r[u]),setShowIncluded:c,showIncluded:s}):null,C.jsx(Ase,{privileges:n,selectedPrivilege:i,onSelect:u=>o(r[u]),showIncluded:s})]}),C.jsx(jse,{privileges:n,selectedPrivilege:i,setSelectedPrivilege:o})]}):C.jsx(ZL,{tab:"Privilege"})]})},jse=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=O.useState(!1);return C.jsx(fe.Panel,{path:fe.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(dr,{depth:2,className:"h-full w-full rounded",children:C.jsx($ie,{dict:e,data:fe.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})},qse=({role:e})=>{var E;const t=pr(),[r,n]=O.useState(e),[i,o]=O.useState(e.role),[a,s]=O.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}=Y1(),[h,x]=O.useState(!1),m=fe.useOutsideClick(()=>{h&&w()});fe.useDidMountEffect(()=>{i!==e.role&&o(e.role)},[e.role]),O.useEffect(()=>{e.role||x(!0)},[]),O.useEffect(()=>{n(e)},[e]);const b=()=>{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),A=T.indexOf(r.id),B=Math.max(0,A-1),L=T[B];A===0?v(N[0]):I[L]?v(L):v(N[0])}t.actions.updateRoles(I)},S=(I=null)=>{if(I&&I.stopPropagation(),!e.role){_();return}x(!1),o(e.role)};return C.jsx(C.Fragment,{children:C.jsxs(dr,{depth:4,borderType:p===r.id?"primary":p!==r.id?"light":"default",className:Yr("rounded border p-2"),role:"button","data-cy":"privilegeCard",onClick:()=>{v(r.id)},ref:m,children:[C.jsx("div",{className:"flex items-center justify-between",children:C.jsxs("div",{className:"flex flex-1 items-center",children:[C.jsx("span",{className:"mr-4",children:C.jsx(_e.FdGroup,{className:"h-6 w-6"})}),h?C.jsxs(wt.Root,{color:a?"negative":"primary",className:"flex-1 mr-2",children:[C.jsx(wt.Group,{children:C.jsx(wt.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&&C.jsx(wt.Message,{children:a})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",title:i,children:r.role}),C.jsx("div",{className:Yr("justify-between ml-auto flex w-fit items-center gap-x-2"),children:h?C.jsxs(C.Fragment,{children:[C.jsx(Zt,{color:"white",variant:"ghost",onClick:w,children:C.jsx(_e.FdSave,{className:"h-4 w-4"})}),C.jsx(Zt,{color:"white",variant:"ghost",onClick:S,children:C.jsx(_e.FdClose,{className:"h-4 w-4"})})]}):C.jsxs(C.Fragment,{children:[C.jsx(Zt,{color:"white",variant:"ghost",onClick:b,children:C.jsx(_e.FdPen,{className:"h-4 w-4"})}),C.jsx(Zt,{color:"white",variant:"ghost",onClick:I=>y(I),children:C.jsx(_e.FdTrash,{className:"h-4 w-4"})})]})})]})}),C.jsxs("span",{className:Yr("ml-[43px] py-1 text-xs"),children:[u," Privilege",u>1?"s":""]})]})})},yF=(e,t)=>e?t[e]:null,y2=(e,t,r)=>{const n=yF(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},Lse=()=>{const e=pr(),t=e.getPrivileges(),r=e.getRoles(),{selectedRole:n}=Y1(),i=yF(n,r),o=(a,s)=>s&&s.privileges.includes(a.id);return C.jsxs(dr,{depth:1,className:"w-full border-b p-4 ",children:[C.jsx("div",{className:"mb-4 flex items-center gap-x-5",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(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)=>C.jsxs(Zc,{"data-cy":"item=>Permisions",color:"primary",onClick:()=>{const c=y2(i.id,a.id,r);e.actions.updateRoles(c)},children:[a.privilege,C.jsx(_e.FdPlus,{className:"rotate-45 transform"})]},s)),Object.values(t).filter(a=>!o(a,i)&&a.privilege!=="guest").map((a,s)=>C.jsxs(Zc,{"data-cy":"item=>Permisions",color:"dark",onClick:()=>{const c=y2(i.id,a.id,r);e.actions.updateRoles(c)},children:[a.privilege,C.jsx(_e.FdPlus,{})]},s))]})]})},zse=({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",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-inactive-text",children:[C.jsx(_e.FdInfoBold,{className:"absolute -right-full h-10 w-10 translate-x-1"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})}),Hw=(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=Hw(e,t,{[v]:a[v]},n);Object.values(h.permissions).forEach(m=>{c[m.name].explicitly||(!c[m.name].from.includes(a[v].privilege)&&m.checked&&c[m.name].from.push(a[v].privilege),c[m.name].inherited=c[m.name].inherited||x[m.name].value||x[m.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=Hw(p,t,r,n),h=x=>{let m=c[x].value;return n?!c[x].value&&!c[x].explicitly&&(m=v[x].value):c[x].value&&!c[x].explicitly&&(m=v[x].value),{value:m,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}},Bse=e=>{switch(e){case"dataclass":return C.jsx(_e.FdTableHeader,{className:"h-6 w-6"});case"singleton":return C.jsx(_e.FdSingleton,{className:"h-6 w-6"});case"datastore":return C.jsx(_e.FdModel3,{className:"h-6 w-6"});case"attribute":return C.jsx(_e.FdTableColumn,{className:"h-6 w-6"});case"method":return C.jsx(_e.FdCode,{className:"h-6 w-6"});case"singletonMethod":return C.jsx(_e.FdFunctionSingleton,{className:"h-6 w-6"});case"entityselMethod":return C.jsx(_e.FdFunctionSelection,{className:"h-6 w-6"});case"entityMethod":return C.jsx(_e.FdFunctionEntity,{className:"h-6 w-6"});case"dsMethod":return C.jsx(_e.FdFunctionDatastore,{className:"h-6 w-6"});case"dataclassMethod":return C.jsx(_e.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(_e.FdTableHeader,{className:"h-6 w-6"})}},oa=({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=O.useMemo(()=>Hw(t,e.otherPrivs,e.rolePrivs,u),[e,t,u]);return C.jsxs("tr",{className:Yr("group even:bg-white/5 hover:bg-input-bg",o),children:[C.jsxs("td",{className:Yr("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,m)=>C.jsx("div",{className:Yr("ml-1.5 mr-1 w-[2px] bg-grey-100",{"mr-0.5":i})},m)),C.jsxs("div",{className:"flex items-center gap-3 py-2",children:[r&&C.jsx("button",{onClick:s,className:"w-3",children:c?C.jsx(_e.FdRight,{className:"inline h-4 w-4"}):C.jsx(_e.FdDown,{className:"inline h-4 w-4"})}),Bse(t.type),a?t.applyTo:v||p]})]}),C.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)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(or,{value:h.read.value||h.read.inherited,onClick:d,isDisabled:!0}),C.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?C.jsx(Kr,{container:xr(),delay:100,label:C.jsx("div",{className:"space-y-1 p-1",children:h.read.from.length?C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{className:"flex flex-col gap-y-2",children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:h.read.from.map((x,m)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):null}),children:C.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})}),C.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)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(or,{value:h.create.value||h.create.inherited,onClick:d,isDisabled:!0}),C.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?C.jsx(Kr,{container:xr(),delay:100,label:C.jsx("div",{className:"space-y-1 p-1",children:h.read.from.length?C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{className:"flex flex-col gap-y-2",children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:h.read.from.map((x,m)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):null}),children:C.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})}),C.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)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(or,{value:h.update.value||h.update.inherited,onClick:d,isDisabled:!0}),C.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?C.jsx(Kr,{container:xr(),delay:100,label:C.jsx("div",{className:"space-y-1 p-1",children:h.update.from.length?C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{className:"flex flex-col gap-y-2",children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:h.update.from.map((x,m)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):null}),children:C.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})}),C.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)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(or,{value:h.drop.value||h.drop.inherited,onClick:d,isDisabled:!0}),C.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?C.jsx(Kr,{container:xr(),delay:100,label:C.jsx("div",{className:"space-y-1 p-1",children:h.drop.from.length?C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{className:"flex flex-col gap-y-2",children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:h.drop.from.map((x,m)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):null}),children:C.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-input-bg",children:t.type!=="attribute"&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(or,{value:h.execute.value||h.execute.inherited,onClick:d,isDisabled:!0}),C.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?C.jsx(Kr,{container:xr(),delay:100,label:C.jsx("div",{className:"space-y-1 p-1",children:h.execute.from.length?C.jsxs("div",{className:"flex items-start",children:[C.jsx(_e.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{className:"flex flex-col gap-y-2",children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:h.execute.from.map((x,m)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):null}),children:C.jsx(_e.FdInfoBold,{className:"h-4 w-4"})}):""})]})})]})},x2=({depth:e,permission:t,privileges:r,childCollapsed:n,didChildCollapsed:i,toastMessageCallback:o})=>{const[a,s]=O.useState(n),c=pr(),u=c.getRestrictedByDefault(),d=c.getPrivileges();return O.useEffect(()=>{n===!0&&s(!0)},[n]),C.jsxs(C.Fragment,{children:[C.jsx(oa,{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&&C.jsxs(C.Fragment,{children:[t.attributes.map((p,v)=>C.jsx(oa,{privileges:r,permission:p,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:o},`${p.type}-${v}`)),t.methods.map((p,v)=>C.jsx(oa,{privileges:r,permission:p,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:o},`${p.type}-${v}`))]})]})},Fse=({selectedRole:e})=>{const[t,r]=O.useState(null),[n,i]=O.useState(null),{styles:o,attributes:a}=rd(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),s=pr(),c=s.getRestrictedByDefault(),u=s.getPrivileges(),[d,p]=O.useState([]),[v,h]=O.useState(""),x=s.getCatalogMethods(),m=s.getDataclasses(),b=s.getSingletons(),[w,y]=O.useState({}),[_,S]=O.useState([]);O.useEffect(()=>{const $=Vie(x,Object.values(m),Object.values(b));y($)},[e]);function E($){const Y=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"];return $.sort((U,Q)=>{const k=Y.indexOf(U.type),W=Y.indexOf(Q.type);return k!==W?k-W:U.applyTo.toLowerCase()>Q.applyTo.toLowerCase()?1:-1})}O.useEffect(()=>{S(E(k_(v,x,Object.values(m),Object.values(b)).filter($=>d.length?d.includes($.type):!0)))},[d,v]);const[I,N]=O.useState(!1),T=$=>{p(Y=>Y.some(U=>$.includes(U))?Y.filter(U=>!$.includes(U)):[...Y,...$])},A=s.getRoles(),B={toggleAllCollapsed:$=>{$.allCollapsed=!$.allCollapsed},toggleChildCollapsed:$=>{$.childCollapsed=!$.childCollapsed},setAllCollapsed:($,Y)=>{$.allCollapsed=Y},setChildCollapsed:($,Y)=>{$.childCollapsed=Y}},L=O.useMemo(()=>{const $=Object.values(u).find(W=>W.privilege==="guest"),Y=A[e],U=Y?Object.fromEntries(Y.privileges.map(W=>[W,u[W]]).filter(([,W])=>!!W)):{};if(c)return{rolePrivs:U,otherPrivs:$?{[$.id]:$}:{}};const Q=$?{[$.id]:{...$,active:!0}}:{},k=Object.fromEntries(Object.entries(u).filter(([W])=>W!==($==null?void 0:$.id)&&!(Y!=null&&Y.privileges.includes(W))).map(([W,J])=>[W,{...J,active:!1}]));return{rolePrivs:U,otherPrivs:{...Q,...k}}},[u,A,e,c]),{state:{allCollapsed:D,childCollapsed:z},dispatch:P}=fe.useEnhancedState({allCollapsed:!1,childCollapsed:!1},B,"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 C.jsxs($d,{className:"z-20 h-full flex-1 overflow-auto 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-panel-1",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(fe.Tooltip,{label:"Collapse All",placement:"top",container:xr(),children:C.jsx(Zt,{color:"white",variant:"ghost",disabled:D,onClick:()=>{z?(P.setAllCollapsed(!0),N(!0)):P.setChildCollapsed(!0)},children:C.jsx(_e.FdCollapseAll,{})})}),C.jsx("div",{className:"relative w-56",children:C.jsx(wt.Root,{children:C.jsxs(wt.Group,{children:[C.jsx(wt.Icon,{children:C.jsx(_e.FdSearch,{})}),C.jsx(wt.Field,{type:"text",placeholder:"Search",value:v,onChange:$=>{h($.target.value)}}),C.jsx(un.Popover,{className:"flex items-center",children:({open:$})=>C.jsxs(C.Fragment,{children:[C.jsx(un.Popover.Button,{ref:r,children:C.jsx(wt.Icon,{isAction:!0,children:C.jsx(_e.FdAdjust,{})})}),$&&C.jsx(Td,{children:C.jsx(un.Popover.Panel,{ref:i,style:o.popper,...a.popper,className:"z-50",static:!0,children:C.jsxs(dr,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5 text-xs",children:[C.jsx("h5",{className:"mb-2 text-sm",children:"Filter"}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:d.includes("datastore"),onChange:()=>{T(["datastore"])},label:"Datastore",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:d.includes("dataclass"),onChange:()=>{T(["dataclass"])},label:"Dataclass",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:d.includes("singleton"),onChange:()=>{T(["singleton"])},label:"Singleton",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:d.some(Y=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes(Y)),onChange:()=>{T(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(or,{value:d.includes("attribute"),onChange:()=>{T(["attribute"])},label:"Attribute",size:"sm"})})]})]})})})]})})]})})})]})}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"read"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"})]})}),C.jsx("tbody",{className:"relative",children:d.length||v?_.map(($,Y)=>C.jsx(oa,{privileges:L,permission:$,depth:0,inSearch:!0,isRestrictedByDefault:c,allPrivileges:u,toastMessageCallback:K},`${$.type}-${Y}`)):Object.values(w).map(($,Y)=>C.jsxs(O.Fragment,{children:[C.jsx(oa,{privileges:L,permission:$,isRestrictedByDefault:c,allPrivileges:u,hasChild:!0,depth:0,toggleCollapse:()=>{const U=!I;N(U),P.setAllCollapsed(!U&&D?!1:D)},collapsed:I,toastMessageCallback:K}),$.type==="datastore"&&!I?C.jsxs(C.Fragment,{children:[$.methods.map((U,Q)=>C.jsx(oa,{privileges:L,isRestrictedByDefault:c,allPrivileges:u,permission:U,depth:1,collapsed:D||!1,toastMessageCallback:K},`${U.type}-${Q}`)),$.dataClasses.map((U,Q)=>C.jsx(x2,{depth:1,privileges:L,permission:U,childCollapsed:z,didChildCollapsed:k=>{P.setChildCollapsed(k?z:!1)},toastMessageCallback:K},`${U.type}-${Q}`))]}):null,$.singletons.map((U,Q)=>C.jsx(x2,{depth:0,privileges:L,permission:U,childCollapsed:D,didChildCollapsed:k=>{P.setAllCollapsed(k?D:!1)},toastMessageCallback:K},`${U.type}-${Q}`))]},`${$.type}-${Y}`))})]}),(v||d.length)&&!_.length?C.jsx(zse,{children:"The Permission you're looking for can't be found "}):null]})},$se=()=>{const e=pr(),t=e.getRoles(),[r,n]=O.useState(null),[i,o]=O.useState(null),[a,s]=O.useState(""),[c,u]=O.useState(null),{styles:d,attributes:p}=rd(r,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});O.useEffect(()=>{s(""),u(null)},[i]);const v=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(t).find(b=>b.role.toLowerCase()===a.toLowerCase()))throw new Error(`A role with the name ${a} already exists`);const x=EB.generate(),m=fe.createRole(x,a,t);e.actions.updateRoles(m)};return C.jsx(un.Popover,{children:({open:h,close:x})=>{const m=()=>{u(null);try{fe.validateName(a),v(),x()}catch(b){u(b.message)}};return C.jsxs(C.Fragment,{children:[C.jsx(un.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",ref:n,children:C.jsx(Zt,{variant:"ghost",color:"white",children:C.jsx(_e.FdPlus,{className:"h-4 w-4"})})}),h&&C.jsx(Td,{children:C.jsx(un.Popover.Panel,{ref:o,style:d.popper,...p.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:C.jsxs(dr,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Role"}),C.jsx("div",{className:"mt-2",children:C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{children:"Name"}),C.jsxs(wt.Root,{color:c?"negative":"primary",className:"w-full",children:[C.jsx(wt.Group,{children:C.jsx(wt.Field,{autoFocus:!0,value:a,onChange:b=>s(b.target.value),onKeyDown:b=>{b.key==="Enter"&&m()},type:"text"})}),c&&C.jsx(wt.Message,{children:c})]})]})}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx(Zt,{onClick:()=>{m()},children:"Create"}),C.jsx(Zt,{color:"white",variant:"outline",onClick:()=>x(),children:"Cancel"})]})]})})})]})}})},Hse=()=>{const t=pr().getRoles(),{selectedRole:r}=Y1();return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs(dr,{depth:1,className:"flex h-full w-[356px] flex-col",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1",children:[C.jsx("span",{children:C.jsx(_e.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),C.jsx($se,{})]}),C.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)=>C.jsx(qse,{role:n},i)):C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsx("div",{className:"flex flex-1 items-center justify-center text-inactive-text",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4",children:[C.jsx(_e.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(_e.FdPlus,{className:"ml-2 inline h-4 w-4"})]})]})})})})]}),C.jsx(dr,{depth:1,className:Yr("relative flex h-full w-full flex-1 flex-col items-stretch overflow-x-auto",{"border-l-[0.5px]":r}),children:C.jsx("div",{className:"flex h-full w-full select-none flex-col",children:r?C.jsxs(C.Fragment,{children:[C.jsx(Lse,{}),C.jsx(Fse,{selectedRole:r})]}):C.jsx(ZL,{tab:"Role"})})})]})},xF=()=>{const e=pr(),t=e.getQodly(),r=e.getSelectedTab(),n=e.getForceLogin(),i=e.getRestrictedByDefault(),o=O.useRef();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","data-cy":"Roles&Privileges-editor-cy",ref:a=>o.current=a,children:C.jsxs("div",{className:"flex w-full flex-col",children:[C.jsx(OK,{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"?C.jsx(CK,{children:C.jsx(Hse,{})}):C.jsx(Dse,{})]})})})},Vse="object",Wse={forceLogin:{type:"boolean"},restrictedByDefault:{type:"boolean"},privileges:{type:"array",items:{$ref:"#/definitions/Privilege"}},roles:{type:"array",items:{$ref:"#/definitions/Role"}},permissions:{type:"object",properties:{allowed:{type:"array",items:{$ref:"#/definitions/Permission"}}}}},Use={Privilege:{type:"object",properties:{id:{type:"string"},privilege:{type:"string"},includes:{type:"array",items:{type:"string"}}},required:["privilege"]},Role:{type:"object",properties:{id:{type:"string"},role:{type:"string"},privileges:{type:"array",items:{type:"string"}}},required:["role"]},Permission:{type:"object",properties:{applyTo:{type:"string"},type:{enum:["dataclass","method","attribute","datastore","singleton","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"]},subType:{enum:["dsMethod","dataclassMethod","entityMethod","entityselMethod"]},read:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},create:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},update:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},drop:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},execute:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},promote:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},required:["applyTo","type"]}},Gse={type:Vse,properties:Wse,definitions:Use},Kse=()=>{const{modals:e,closeModal:t,editModal:r}=Poe();return C.jsx(C.Fragment,{children:e.map((n,i)=>C.jsx(fe.Modal,{hasOverlay:i===0,...n,onClose:t,onEdit:r,container:xr()},n.id))})},wF=e=>{if(!e)return fe.rolesToAPI(fe.sanitizeRoles({}));try{return fe.rolesToAPI(fe.sanitizeRoles(JSON.parse(e)))}catch{return fe.rolesToAPI(fe.sanitizeRoles({}))}},Yse=({initialValue:e,onChange:t,...r})=>{const n=pr(),i=n.getRolesFlags(),o=n.getRolesAndPrivileges(),a=O.useMemo(()=>wF(e),[e]),s=O.useRef(o),c=O.useRef(a),u=O.useRef(a);return O.useEffect(()=>{s.current=o},[o]),O.useEffect(()=>{lo.isEqual(a,u.current)||(u.current=a,c.current=a,!lo.isEqual(a,s.current)&&n.actions.setRolesContent({content:a,flags:{touched:!1}}))},[n,a]),fe.useDidMountEffect(()=>{if(!(!t||!i.touched)&&!lo.isEqual(o,c.current))try{const d=JSON.stringify(o,null,2);t(d),c.current=o}catch(d){console.error("[Roles Editor Standalone] Error on value stringify:",d)}},[o,i.touched,t]),C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"relative h-screen z-10 overflow-hidden",children:C.jsx(xF,{...r})}),C.jsx(Kse,{})]})},Xse=e=>{const t=Toe();return C.jsx(vB,{adapter:t,children:C.jsx(fe.TipsProvider,{children:C.jsx(Yse,{...e})})})},Zse=({initialValue:e,...t})=>{const r=O.useMemo(()=>({...fe.sanitizeRoles(wF(e)),flags:{touched:!1}}),[e]);return C.jsx(Noe,{initialState:r,children:C.jsx(Xse,{initialValue:e,...t})})};exports.ROLES_EDITOR_SCOPE_CLASS=w2.ROLES_EDITOR_SCOPE_CLASS;exports.EditorStateAdapterProvider=vB;exports.Roles=xF;exports.Standalone=Zse;exports.jsonSchema=Gse;exports.useReduxAdapter=Yie;
|
|
114
114
|
//# sourceMappingURL=index.cjs.js.map
|