@vervstack/chures 0.0.29 → 0.0.33

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.
Files changed (27) hide show
  1. package/dist/chures.js +1098 -665
  2. package/dist/chures.umd.cjs +2 -2
  3. package/dist/components/FlyoutMenu/FlyoutMenu.d.ts +14 -0
  4. package/dist/components/FlyoutMenu/FlyoutPanel.d.ts +11 -0
  5. package/dist/components/FlyoutMenu/MenuList.d.ts +10 -0
  6. package/dist/components/FlyoutMenu/MenuRow.d.ts +9 -0
  7. package/dist/components/FlyoutMenu/MenuSearchField.d.ts +8 -0
  8. package/dist/components/FlyoutMenu/MenuSkeleton.d.ts +6 -0
  9. package/dist/components/FlyoutMenu/index.d.ts +12 -0
  10. package/dist/components/FlyoutMenu/menuMeasuredContext.d.ts +2 -0
  11. package/dist/components/FlyoutMenu/menuModel.d.ts +18 -0
  12. package/dist/components/FlyoutMenu/partitionBySubstring.d.ts +5 -0
  13. package/dist/components/FlyoutMenu/partitionBySubstring.test.d.ts +1 -0
  14. package/dist/components/FlyoutMenu/positionMenu.d.ts +15 -0
  15. package/dist/components/FlyoutMenu/positionMenu.test.d.ts +1 -0
  16. package/dist/components/FlyoutMenu/positionSubmenu.d.ts +10 -0
  17. package/dist/components/FlyoutMenu/positionSubmenu.test.d.ts +1 -0
  18. package/dist/components/FlyoutMenu/useFloatingMenu.d.ts +34 -0
  19. package/dist/components/FlyoutMenu/useTrackedPlacement.d.ts +1 -0
  20. package/dist/components/FlyoutMenu/useTypeToSearch.d.ts +4 -0
  21. package/dist/components/SideDrawer/SideDrawer.d.ts +13 -0
  22. package/dist/components/SideDrawer/index.d.ts +2 -0
  23. package/dist/hooks/overlayBack/overlayBackStack.d.ts +3 -0
  24. package/dist/hooks/overlayBack/useBackableOverlay.d.ts +1 -0
  25. package/dist/index.d.ts +13 -0
  26. package/dist/theme/ComponentClassNamesContext.d.ts +1 -1
  27. package/package.json +1 -1
package/dist/chures.js CHANGED
@@ -1,174 +1,174 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode("@layer chures-defaults{:root{--chures-accent: #229ED9;--chures-accent-muted: rgb(34 158 217 / 50%);--chures-btn-from: #2AABEE;--chures-btn-to: #229ED9;--chures-button-bg: var(--chures-accent);--chures-error: #ef4444;--chures-warn: #f59e0b;--chures-bg: #000000;--chures-fg: #ffffff;--chures-fg-muted: #9ca3af;--chures-surface: #000000;--chures-font-sm: .875rem;--chures-font-xs: .75rem;--chures-input-bg: #111111;--chures-input-height: 3rem;--chures-input-radius: .75rem;--chures-skeleton-shine: #1e1e1e;--chures-toggle-width: 2.75rem;--chures-toggle-height: 1.5rem;--chures-toggle-thumb: 1.125rem;--chures-toggle-bg-off: rgb(255 255 255 / 13%);--chures-toggle-bg-on: var(--chures-accent);--chures-toggle-thumb-color: #ffffff;--chures-toggle-label-skeleton-w: 5rem;--chures-dropdown-bg: var(--chures-bg);--chures-dropdown-radius: .75rem;--chures-dropdown-row-radius: .375rem;--chures-dropdown-border: var(--chures-accent);--chures-dropdown-border-subtle: var(--chures-accent-muted);--chures-dropdown-hover: rgb(255 255 255 / 8%);--chures-dropdown-create-bg: rgb(34 158 217 / 12%);--chures-dropdown-create-bg-hover: rgb(34 158 217 / 20%);--chures-dropdown-trigger-border: rgb(255 255 255 / 22%);--chures-dropdown-trigger-border-hover: rgb(255 255 255 / 38%);--chures-dropdown-trigger-focus-ring: rgb(34 158 217 / 15%);--chures-dropdown-chip-border: rgb(34 158 217 / 30%);--chures-dropdown-panel-gap: .375rem;--chures-dropdown-glass-bg: rgb(255 255 255 / 6%);--chures-dropdown-glass-blur: 1.25rem;--chures-dialog-glass-bg: rgb(255 255 255 / 6%);--chures-dialog-glass-blur: 1.25rem}}@keyframes _spin_wa8op_1{to{transform:rotate(360deg)}}@keyframes _ripple_wa8op_1{0%{transform:scale(.08);opacity:.9}to{transform:scale(1);opacity:0}}@keyframes _dotPulse_wa8op_1{0%,to{transform:translate(-50%,-50%) scale(.55);opacity:.3}50%{transform:translate(-50%,calc(-50% - var(--sz) * .1)) scale(1);opacity:1}}@keyframes _waveBounce_wa8op_1{0%,55%,to{transform:translate(-50%,-50%) scale(.8);opacity:.4}27%{transform:translate(-50%,calc(-50% - var(--sz) * .28)) scale(1);opacity:1}}._LoaderContainer_wa8op_24{position:relative;flex-shrink:0}._sm_wa8op_31{width:1.5rem;height:1.5rem;--sz: 1.5rem;--arc-gap: .2rem;--arc-bw: .125rem}._md_wa8op_32{width:2.5rem;height:2.5rem;--sz: 2.5rem;--arc-gap: .35rem;--arc-bw: .1875rem}._lg_wa8op_33{width:4rem;height:4rem;--sz: 4rem;--arc-gap: .55rem;--arc-bw: .25rem}._Arc1_wa8op_37,._Arc2_wa8op_38,._Arc3_wa8op_39{position:absolute;border-radius:50%;border:var(--arc-bw) solid transparent}._Arc1_wa8op_37{inset:0;border-top-color:var(--chures-accent, #229ED9);border-left-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 1.2s linear infinite;filter:drop-shadow(0 0 .25rem var(--chures-accent, #229ED9))}._Arc2_wa8op_38{inset:var(--arc-gap);border-bottom-color:var(--chures-accent, #229ED9);border-right-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 1.8s linear infinite reverse;opacity:.8}._Arc3_wa8op_39{inset:calc(var(--arc-gap) * 2);border-top-color:var(--chures-accent, #229ED9);border-right-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 2.4s linear infinite;opacity:.6}._Ring1_wa8op_71,._Ring2_wa8op_72,._Ring3_wa8op_73{position:absolute;inset:0;border-radius:50%;border:var(--arc-bw) solid var(--chures-accent, #229ED9);animation:_ripple_wa8op_1 1.8s ease-out infinite both}._Ring2_wa8op_72{animation-delay:.6s}._Ring3_wa8op_73{animation-delay:1.2s}._Dot1_wa8op_86,._Dot2_wa8op_87,._Dot3_wa8op_88{position:absolute;top:50%;border-radius:50%;width:calc(var(--sz) * .2);height:calc(var(--sz) * .2);background:var(--chures-accent, #229ED9);box-shadow:0 0 calc(var(--sz) * .14) var(--chures-accent, #229ED9);animation:_dotPulse_wa8op_1 1.1s ease-in-out infinite both}._Dot1_wa8op_86{left:22%}._Dot2_wa8op_87{left:50%;animation-delay:.18s}._Dot3_wa8op_88{left:78%;animation-delay:.36s}._Wave1_wa8op_105,._Wave2_wa8op_106,._Wave3_wa8op_107,._Wave4_wa8op_108,._Wave5_wa8op_109{position:absolute;top:50%;border-radius:50%;width:calc(var(--sz) * .16);height:calc(var(--sz) * .16);background:var(--chures-accent, #229ED9);box-shadow:0 0 calc(var(--sz) * .1) var(--chures-accent, #229ED9);animation:_waveBounce_wa8op_1 1s ease-in-out infinite both}._Wave1_wa8op_105{left:10%}._Wave2_wa8op_106{left:28%;animation-delay:.12s}._Wave3_wa8op_107{left:46%;animation-delay:.24s}._Wave4_wa8op_108{left:64%;animation-delay:.36s}._Wave5_wa8op_109{left:82%;animation-delay:.48s}._LoadingWrapperContainer_1q0w7_1{display:flex;align-items:center;justify-content:center;width:100%;min-height:4rem}._SkeletonWrapper_1q0w7_9{width:100%}._TelegramSignInButtonContainer_10wun_1{display:inline-flex;align-items:center;justify-content:center;gap:.625rem;width:100%;padding:1rem 1.375rem;background:linear-gradient(180deg,var(--chures-btn-from, #2AABEE) 0%,var(--chures-btn-to, #229ED9) 100%);border:0;border-radius:.875rem;color:#fff;font-family:Comfortaa,sans-serif;font-weight:600;font-size:1rem;letter-spacing:-.005em;cursor:pointer;box-shadow:inset 0 .0625rem #ffffff26,0 .75rem 2rem -.75rem #2aabee8c;transition:transform .14s ease,box-shadow .2s ease,filter .16s ease}._TelegramSignInButtonContainer_10wun_1:hover{transform:translateY(-.0625rem);box-shadow:inset 0 .0625rem #ffffff2e,0 1.125rem 2.375rem -.75rem #2aabeea6;filter:brightness(1.05)}._TelegramSignInButtonContainer_10wun_1:active{transform:translateY(0);filter:brightness(.97)}._TelegramSignInButtonContainer_10wun_1:focus-visible{outline:.125rem solid rgba(255,255,255,.8);outline-offset:.125rem}._TelegramSignInButtonContainer_10wun_1:disabled{opacity:.6;cursor:not-allowed}._FullSize_10wun_46{height:100%}._Icon_10wun_50{flex-shrink:0}._ToastContainer_1tme2_1{position:fixed;right:1.5rem;top:1.5rem;width:clamp(25vw,24.5rem,95vw);display:flex;flex-direction:column;gap:1rem;z-index:9999}._Toast_1tme2_1{min-height:4rem;border:var(--chures-accent, #229ED9) 1px solid;border-radius:1rem;padding:1rem;box-sizing:border-box;position:relative;background:var(--chures-surface, #000000);display:flex;flex-direction:column}._Toast_1tme2_1>div:first-child{font-weight:700;font-size:var(--chures-font-sm, .875rem);color:var(--chures-fg, #ffffff)}._Toast_1tme2_1._error_1tme2_33{border-color:var(--chures-error, #ef4444)}._Toast_1tme2_1._error_1tme2_33>div:first-child{color:var(--chures-error, #ef4444)}._Toast_1tme2_1._warn_1tme2_41{border-color:var(--chures-warn, #f59e0b)}._Toast_1tme2_1._warn_1tme2_41>div:first-child{color:var(--chures-warn, #f59e0b)}._Toast_1tme2_1._info_1tme2_49{border-color:var(--chures-accent, #229ED9)}._Toast_1tme2_1 ._Description_1tme2_53{color:var(--chures-fg-muted, #9ca3af);font-size:var(--chures-font-xs, .75rem);margin-top:.125rem}._Toast_1tme2_1 ._DismissButton_1tme2_59{position:absolute;width:1rem;height:1rem;display:flex;justify-content:center;align-items:center;top:0;right:1%;cursor:pointer;font-size:1.5rem;color:var(--chures-fg-muted, #9ca3af)}._slideIn_1tme2_79{animation:_slideIn_1tme2_79 .2s ease forwards}._slideOut_1tme2_83{animation:_slideOut_1tme2_83 .2s ease forwards}@keyframes _slideIn_1tme2_79{0%{opacity:0;transform:translate(2rem)}to{opacity:1;transform:translate(0)}}@keyframes _slideOut_1tme2_83{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(2rem)}}@keyframes _shimmer_1uu20_1{0%{background-position:-200% 0}to{background-position:200% 0}}:where(._InputContainer_1uu20_15){position:relative;width:100%;height:var(--chures-input-height, 3rem)}:where(._InputField_1uu20_21){width:100%;height:100%;background:var(--chures-input-bg, #111111);border:.0625rem solid rgb(255 255 255 / 13%);border-radius:var(--chures-input-radius, .75rem);color:var(--chures-fg, #ffffff);font-size:var(--chures-font-sm, .875rem);padding:0 .875rem;outline:none;transition:border-color .18s ease;box-sizing:border-box}:where(._InputField_1uu20_21._hasStartIcon_1uu20_35){padding-left:2.25rem}:where(._InputField_1uu20_21._hasEndIcon_1uu20_39){padding-right:2.25rem}:where(._StartIcon_1uu20_43){position:absolute;left:.875rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;color:var(--chures-fg-muted, #9ca3af);pointer-events:none}:where(._EndIcon_1uu20_54){position:absolute;right:.875rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;color:var(--chures-fg-muted, #9ca3af);pointer-events:none}:where(._InputField_1uu20_21):focus{border-color:#ffffff59}:where(._hasError_1uu20_69 ._InputField_1uu20_21),:where(._hasError_1uu20_69 ._InputField_1uu20_21):focus{border-color:var(--chures-error, #ef4444)}:where(._disabled_1uu20_74 ._InputField_1uu20_21){opacity:.45;cursor:not-allowed}:where(._Label_1uu20_79){position:absolute;left:.875rem;top:50%;transform:translateY(-50%);transform-origin:left center;color:var(--chures-fg-muted, #9ca3af);font-size:var(--chures-font-sm, .875rem);pointer-events:none;transition:all .18s ease;padding:0 .25rem;border-radius:.1875rem}:where(._Label_1uu20_79._lifted_1uu20_93){top:0;transform:translateY(-50%) scale(.82);background:var(--chures-input-bg, #111111);color:var(--chures-fg-muted, #9ca3af)}:where(._hasError_1uu20_69 ._Label_1uu20_79._lifted_1uu20_93){color:var(--chures-error, #ef4444)}:where(._ErrorText_1uu20_104){display:block;margin-top:.25rem;padding-left:.875rem;font-size:var(--chures-font-xs, .75rem);color:var(--chures-error, #ef4444)}:where(._Skeleton_1uu20_112){width:100%;height:var(--chures-input-height, 3rem);border-radius:var(--chures-input-radius, .75rem);background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1uu20_1 1.5s ease-in-out infinite}@keyframes _shimmer_1jetc_1{0%{background-position:-200% 0}to{background-position:200% 0}}._ToggleContainer_1jetc_6{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer}._disabled_1jetc_13{opacity:.45;cursor:not-allowed}._Track_1jetc_18{position:relative;width:var(--chures-toggle-width, 2.75rem);height:var(--chures-toggle-height, 1.5rem);border-radius:624.9375rem;background:var(--chures-toggle-bg-off, rgb(255 255 255 / 13%));border:none;padding:0;cursor:pointer;transition:background .2s ease;flex-shrink:0}._Track_1jetc_18._on_1jetc_31{background:var(--chures-toggle-bg-on, var(--chures-accent, #229ED9))}._disabled_1jetc_13 ._Track_1jetc_18{cursor:not-allowed}._Thumb_1jetc_39{position:absolute;top:0;bottom:0;margin:auto 0;left:.1875rem;width:var(--chures-toggle-thumb, 1.125rem);height:var(--chures-toggle-thumb, 1.125rem);border-radius:50%;background:var(--chures-toggle-thumb-color, #ffffff);transition:left .2s ease;pointer-events:none}._Track_1jetc_18._on_1jetc_31 ._Thumb_1jetc_39{left:calc(var(--chures-toggle-width, 2.75rem) - var(--chures-toggle-thumb, 1.125rem) - .1875rem)}._Label_1jetc_57{font-size:var(--chures-font-sm, .875rem);color:var(--chures-fg, #ffffff);-webkit-user-select:none;user-select:none}._LabelSkeleton_1jetc_63{display:inline-block;width:var(--chures-toggle-label-skeleton-w, 5rem);height:var(--chures-font-sm, .875rem);border-radius:624.9375rem;background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1jetc_1 1.5s ease-in-out infinite}._Skeleton_1jetc_78{width:var(--chures-toggle-width, 2.75rem);height:var(--chures-toggle-height, 1.5rem);border-radius:624.9375rem;background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1jetc_1 1.5s ease-in-out infinite}@layer chures-defaults{:root{--chures-accent: #229ED9;--chures-accent-muted: rgb(34 158 217 / 50%);--chures-btn-from: #2AABEE;--chures-btn-to: #229ED9;--chures-button-bg: var(--chures-accent);--chures-error: #ef4444;--chures-warn: #f59e0b;--chures-bg: #000000;--chures-fg: #ffffff;--chures-fg-muted: #9ca3af;--chures-surface: #000000;--chures-font-sm: .875rem;--chures-font-xs: .75rem;--chures-input-bg: #111111;--chures-input-height: 3rem;--chures-input-radius: .75rem;--chures-skeleton-shine: #1e1e1e;--chures-toggle-width: 2.75rem;--chures-toggle-height: 1.5rem;--chures-toggle-thumb: 1.125rem;--chures-toggle-bg-off: rgb(255 255 255 / 13%);--chures-toggle-bg-on: var(--chures-accent);--chures-toggle-thumb-color: #ffffff;--chures-toggle-label-skeleton-w: 5rem;--chures-dropdown-bg: var(--chures-bg);--chures-dropdown-radius: .75rem;--chures-dropdown-row-radius: .375rem;--chures-dropdown-border: var(--chures-accent);--chures-dropdown-border-subtle: var(--chures-accent-muted);--chures-dropdown-hover: rgb(255 255 255 / 8%);--chures-dropdown-create-bg: rgb(34 158 217 / 12%);--chures-dropdown-create-bg-hover: rgb(34 158 217 / 20%);--chures-dropdown-trigger-border: rgb(255 255 255 / 22%);--chures-dropdown-trigger-border-hover: rgb(255 255 255 / 38%);--chures-dropdown-trigger-focus-ring: rgb(34 158 217 / 15%);--chures-dropdown-chip-border: rgb(34 158 217 / 30%);--chures-dropdown-panel-gap: .375rem;--chures-dropdown-glass-bg: rgb(255 255 255 / 6%);--chures-dropdown-glass-blur: 1.25rem;--chures-dialog-glass-bg: rgb(255 255 255 / 6%);--chures-dialog-glass-blur: 1.25rem}}@keyframes _panelIn_1jz2j_1{0%{opacity:0;transform:scale(.96) translateY(6px)}to{opacity:1;transform:none}}@keyframes _shimmer_1jz2j_1{0%{background-position:-200% center}to{background-position:200% center}}._DropdownContainer_1jz2j_13{position:relative;width:100%}._PanelWrapper_1jz2j_20{position:absolute;top:calc(100% + var(--chures-dropdown-panel-gap));left:0;width:100%;animation:_panelIn_1jz2j_1 .14s ease}._PanelWrapper_1jz2j_20._Portal_1jz2j_34{position:fixed;width:auto;margin-top:var(--chures-dropdown-panel-gap)}._PanelContainer_1jz2j_18{background:var(--chures-dropdown-bg);border:1px solid var(--chures-dropdown-border);border-radius:var(--chures-dropdown-radius);overflow:hidden;box-shadow:0 1rem 3rem #000c}._PanelContainer_1jz2j_18._Glass_1jz2j_48{background:var(--chures-dropdown-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dropdown-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dropdown-glass-blur, 1.25rem))}._Label_1jz2j_54{position:absolute;left:.875rem;top:50%;transform:translateY(-50%);transform-origin:left center;color:var(--chures-fg-muted);font-size:var(--chures-font-sm);pointer-events:none;transition:all .18s ease;padding:0 .25rem;border-radius:.1875rem}._Label_1jz2j_54._lifted_1jz2j_68{top:0;transform:translateY(-50%) scale(.82);background:var(--chures-input-bg);color:var(--chures-fg-muted)}._TriggerContainer_1jz2j_75{width:100%;height:var(--chures-input-height);background:var(--chures-input-bg);border:1px solid var(--chures-dropdown-trigger-border);border-radius:var(--chures-input-radius);color:var(--chures-fg);font-size:var(--chures-font-sm);font-family:inherit;padding:0 .875rem;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:.5rem;text-align:left;overflow:hidden;transition:border-color .15s ease,box-shadow .15s ease}._TriggerContainer_1jz2j_75:hover{border-color:var(--chures-dropdown-trigger-border-hover)}._TriggerContainer_1jz2j_75._Open_1jz2j_99{border-color:var(--chures-accent);box-shadow:0 0 0 .1875rem var(--chures-dropdown-trigger-focus-ring)}._TriggerPlaceholder_1jz2j_104{color:var(--chures-fg-muted);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerValue_1jz2j_112{color:var(--chures-fg);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerIcon_1jz2j_120{color:var(--chures-fg-muted);flex-shrink:0;display:flex;align-items:center}._ChipsWrapper_1jz2j_127{display:flex;flex-wrap:nowrap;gap:.25rem;flex:1;overflow-x:auto;overflow-y:hidden;min-width:0;align-items:center;margin:.375rem 0;scrollbar-width:none;-ms-overflow-style:none}._ChipsWrapper_1jz2j_127::-webkit-scrollbar{display:none}._ChipsWrapper_1jz2j_127._Expand_1jz2j_145{flex-wrap:wrap;overflow:visible;row-gap:.25rem}._TriggerContainer_1jz2j_75._MultiSelect_1jz2j_151 ._TriggerIcon_1jz2j_120{align-self:flex-start;height:var(--chures-input-height)}._TriggerContainer_1jz2j_75._ExpandHeight_1jz2j_156{height:auto;min-height:var(--chures-input-height)}._Chip_1jz2j_127{display:inline-flex;align-items:center;flex-shrink:0;background:var(--chures-dropdown-create-bg);border:1px solid var(--chures-dropdown-chip-border);border-radius:624.9375rem;padding:.15rem .5rem;font-size:var(--chures-font-xs);color:var(--chures-fg);white-space:nowrap;line-height:1.4}._SearchRow_1jz2j_175{padding:.5rem;border-bottom:1px solid var(--chures-dropdown-border-subtle)}._SearchBox_1jz2j_180{display:flex;align-items:center;gap:.5rem;background:var(--chures-input-bg);border:1px solid var(--chures-dropdown-border-subtle);border-radius:var(--chures-dropdown-row-radius);padding:.4rem .625rem}._SearchIcon_1jz2j_190{display:flex;align-items:center;color:var(--chures-fg-muted);flex-shrink:0}._SearchInput_1jz2j_197{flex:1;background:transparent;border:none;outline:none;font-size:var(--chures-font-sm);color:var(--chures-fg);font-family:inherit}._SearchInput_1jz2j_197::placeholder{color:var(--chures-fg-muted)}._ResultsList_1jz2j_211{max-height:13rem;overflow-y:auto}._OptionRow_1jz2j_216{padding:.5625rem .875rem;font-size:var(--chures-font-sm);color:var(--chures-fg-muted);cursor:pointer;transition:background .1s ease,color .1s ease;display:flex;align-items:center;gap:.5rem}._OptionRow_1jz2j_216:hover{background:var(--chures-dropdown-hover);color:var(--chures-fg)}._OptionRow_1jz2j_216._Selected_1jz2j_231{color:var(--chures-fg)}._OptionRow_1jz2j_216._Indented_1jz2j_235{padding-left:1.875rem}._GroupHeader_1jz2j_240{padding:.5625rem .875rem .25rem;font-size:var(--chures-font-xs);color:var(--chures-fg-muted);text-transform:uppercase;letter-spacing:.03em}._GroupHeader_1jz2j_240:not(:first-child){margin-top:.25rem;border-top:1px solid var(--chures-dropdown-border-subtle)}._Checkmark_1jz2j_253{color:var(--chures-accent);font-size:var(--chures-font-xs);flex-shrink:0}._CreateRow_1jz2j_259{display:flex;align-items:center;gap:.625rem;padding:.5625rem .875rem;cursor:pointer;background:var(--chures-dropdown-create-bg);transition:background .1s ease}._CreateRow_1jz2j_259:hover{background:var(--chures-dropdown-create-bg-hover)}._CreateRow_1jz2j_259._WithBorder_1jz2j_272{border-top:1px solid var(--chures-dropdown-border-subtle)}._CreateIcon_1jz2j_277{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;border-radius:50%;background:var(--chures-accent);color:#fff;flex-shrink:0}._CreateLabel_1jz2j_289{font-size:var(--chures-font-sm);font-weight:600;color:var(--chures-fg)}._EmptyHint_1jz2j_295{padding:.75rem .875rem;font-size:var(--chures-font-sm);color:var(--chures-fg-muted);font-style:italic}._SkeletonRow_1jz2j_302{height:2rem;margin:.375rem .875rem;border-radius:var(--chures-dropdown-row-radius);background:linear-gradient(90deg,var(--chures-dropdown-bg) 25%,var(--chures-skeleton-shine) 50%,var(--chures-dropdown-bg) 75%);background-size:200% 100%;animation:_shimmer_1jz2j_1 1.4s infinite linear}:where(._Btn_1tozl_10){display:inline-flex;align-items:center;justify-content:center;gap:.375rem;border-radius:.625rem;border:1px solid transparent;font-family:inherit;font-size:.8125rem;font-weight:500;cursor:pointer;padding:.625rem 1rem;transition:all .16s ease;white-space:nowrap;color:var(--chures-fg, #ffffff);background:var(--chures-button-bg)}:where(._Btn_1tozl_10):disabled{opacity:.4;cursor:not-allowed}:where(._Primary_1tozl_35){background:var(--chures-accent, #229ED9);border-color:var(--chures-accent, #229ED9);color:#fff;font-weight:600;padding:.625rem 1.125rem;box-shadow:0 10px 28px -12px var(--chures-accent-muted, rgb(34 158 217 / 50%));transition:filter .16s ease,opacity .16s ease}:where(._Primary_1tozl_35):hover:not(:disabled){filter:brightness(1.06)}:where(._Secondary_1tozl_50){background:transparent;border-color:#ffffff24;color:var(--chures-fg-muted, #9ca3af)}:where(._Secondary_1tozl_50):hover:not(:disabled){color:var(--chures-fg, #ffffff);border-color:#ffffff47}:where(._Ghost_1tozl_62){background:transparent;border-color:#ffffff24;color:var(--chures-fg-muted, #9ca3af)}:where(._Ghost_1tozl_62):hover:not(:disabled){color:var(--chures-fg, #ffffff);border-color:#ffffff47}:where(._IconDanger_1tozl_74){width:1.375rem;height:1.375rem;padding:0;border:0;border-radius:.375rem;background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:1rem;line-height:1;justify-content:center;flex-shrink:0;transition:background .14s ease,color .14s ease}:where(._IconDanger_1tozl_74):hover:not(:disabled){background:#ef44441f;color:var(--chures-error, #ef4444)}:where(._Danger_1tozl_95){background:transparent;border-color:#ef444466;color:var(--chures-error, #ef4444);transition:background .16s ease,border-color .16s ease}:where(._Danger_1tozl_95):hover:not(:disabled){background:#ef44441a;border-color:var(--chures-error, #ef4444)}._ConfirmWrapper_1tq4o_4{width:100%;max-width:24rem;animation:_confirmIn_1tq4o_1 .28s cubic-bezier(.2,.7,.2,1) both}@keyframes _confirmIn_1tq4o_1{0%{opacity:0;transform:translateY(.75rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}._ConfirmContainer_1tq4o_1{width:100%;background:var(--chures-surface, #000000);border:1px solid rgb(255 255 255 / 14%);border-radius:1.25rem;padding:1.75rem 1.75rem 1.5rem;box-shadow:0 32px 80px -20px #000c}._Glass_1tq4o_24{background:var(--chures-dialog-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem))}._ConfirmTitle_1tq4o_30{font-size:1.25rem;font-weight:600;letter-spacing:-.02em;color:var(--chures-fg, #ffffff);margin-bottom:.75rem}._ConfirmMessage_1tq4o_38{font-size:.875rem;color:var(--chures-fg-muted, #9ca3af);line-height:1.5;letter-spacing:-.005em}._ConfirmActions_1tq4o_45{display:flex;align-items:center;justify-content:flex-end;gap:.625rem;margin-top:1.5rem}._BtnCancel_1tq4o_53{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(255 255 255 / 14%);background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:.8125rem;font-weight:500;font-family:inherit;cursor:pointer;transition:background .16s ease,color .16s ease}._BtnCancel_1tq4o_53:hover:not(:disabled){background:#ffffff14;color:var(--chures-fg, #ffffff)}._BtnConfirm_1tq4o_73{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid var(--chures-accent, #229ED9);background:var(--chures-accent, #229ED9);color:#fff;font-size:.8125rem;font-weight:600;font-family:inherit;cursor:pointer;transition:filter .16s ease,opacity .16s ease}._BtnConfirm_1tq4o_73:hover:not(:disabled){filter:brightness(1.06)}._BtnDanger_1tq4o_92{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(239 68 68 / 40%);background:transparent;color:var(--chures-error, #ef4444);font-size:.8125rem;font-weight:600;font-family:inherit;cursor:pointer;transition:background .16s ease,border-color .16s ease}._BtnDanger_1tq4o_92:hover:not(:disabled){background:#ef44441a;border-color:var(--chures-error, #ef4444)}._BtnConfirm_1tq4o_73:disabled,._BtnDanger_1tq4o_92:disabled,._BtnCancel_1tq4o_53:disabled{opacity:.4;cursor:not-allowed}._InfoWrapper_cqv58_4{width:100%;max-width:24rem;animation:_infoIn_cqv58_1 .28s cubic-bezier(.2,.7,.2,1) both}@keyframes _infoIn_cqv58_1{0%{opacity:0;transform:translateY(.75rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}._InfoContainer_cqv58_1{width:100%;background:var(--chures-surface, #000000);border:1px solid rgb(255 255 255 / 14%);border-radius:1.25rem;padding:1.75rem 1.75rem 1.5rem;box-shadow:0 32px 80px -20px #000c}._Glass_cqv58_24{background:var(--chures-dialog-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem))}._InfoTitle_cqv58_30{font-size:1.25rem;font-weight:600;letter-spacing:-.02em;color:var(--chures-fg, #ffffff);margin-bottom:.75rem}._InfoMessage_cqv58_38{font-size:.875rem;color:var(--chures-fg-muted, #9ca3af);line-height:1.5;letter-spacing:-.005em}._InfoActions_cqv58_45{display:flex;align-items:center;justify-content:flex-end;margin-top:1.5rem}._BtnClose_cqv58_52{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(255 255 255 / 14%);background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:.8125rem;font-weight:500;font-family:inherit;cursor:pointer;transition:background .16s ease,color .16s ease}._BtnClose_cqv58_52:hover{background:#ffffff14;color:var(--chures-fg, #ffffff)}")),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { jsx as t, jsxs as _, Fragment as b } from "react/jsx-runtime";
3
- import { createContext as ye, useContext as Le, useRef as Y, useState as T, useEffect as G, forwardRef as Te, useCallback as _e, useLayoutEffect as De, Fragment as ae } from "react";
4
- import { AnimatePresence as Se, motion as Re } from "framer-motion";
5
- import { create as ke } from "zustand";
6
- import { createPortal as je } from "react-dom";
7
- function Ee(e) {
1
+ (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@layer chures-defaults{:root{--chures-accent: #229ED9;--chures-accent-muted: rgb(34 158 217 / 50%);--chures-btn-from: #2AABEE;--chures-btn-to: #229ED9;--chures-button-bg: var(--chures-accent);--chures-error: #ef4444;--chures-warn: #f59e0b;--chures-bg: #000000;--chures-fg: #ffffff;--chures-fg-muted: #9ca3af;--chures-surface: #000000;--chures-font-sm: .875rem;--chures-font-xs: .75rem;--chures-input-bg: #111111;--chures-input-height: 3rem;--chures-input-radius: .75rem;--chures-skeleton-shine: #1e1e1e;--chures-toggle-width: 2.75rem;--chures-toggle-height: 1.5rem;--chures-toggle-thumb: 1.125rem;--chures-toggle-bg-off: rgb(255 255 255 / 13%);--chures-toggle-bg-on: var(--chures-accent);--chures-toggle-thumb-color: #ffffff;--chures-toggle-label-skeleton-w: 5rem;--chures-dropdown-bg: var(--chures-bg);--chures-dropdown-radius: .75rem;--chures-dropdown-row-radius: .375rem;--chures-dropdown-border: var(--chures-accent);--chures-dropdown-border-subtle: var(--chures-accent-muted);--chures-dropdown-hover: rgb(255 255 255 / 8%);--chures-dropdown-create-bg: rgb(34 158 217 / 12%);--chures-dropdown-create-bg-hover: rgb(34 158 217 / 20%);--chures-dropdown-trigger-border: rgb(255 255 255 / 22%);--chures-dropdown-trigger-border-hover: rgb(255 255 255 / 38%);--chures-dropdown-trigger-focus-ring: rgb(34 158 217 / 15%);--chures-dropdown-chip-border: rgb(34 158 217 / 30%);--chures-dropdown-panel-gap: .375rem;--chures-dropdown-glass-bg: rgb(255 255 255 / 6%);--chures-dropdown-glass-blur: 1.25rem;--chures-dialog-glass-bg: rgb(255 255 255 / 6%);--chures-dialog-glass-blur: 1.25rem;--chures-overlay: rgb(0 0 0 / 58%);--chures-side-drawer-size: 22rem;--chures-flyout-bg: #0d0d0d;--chures-flyout-min-width: 10rem;--chures-flyout-border: rgb(255 255 255 / 11%);--chures-flyout-radius: .5rem;--chures-flyout-shadow: rgb(0 0 0 / 80%);--chures-flyout-fg: rgb(255 255 255 / 55%);--chures-flyout-fg-strong: rgb(255 255 255 / 92%);--chures-flyout-fg-muted: rgb(255 255 255 / 32%);--chures-flyout-hover: rgb(255 255 255 / 4%);--chures-flyout-skeleton: rgb(255 255 255 / 7%);--chures-flyout-font: .8125rem;--chures-flyout-font-sm: .6875rem;--chures-flyout-font-md: .75rem;--chures-flyout-font-mono: "JetBrains Mono", ui-monospace, sfmono-regular, menlo, monospace}}@keyframes _spin_wa8op_1{to{transform:rotate(360deg)}}@keyframes _ripple_wa8op_1{0%{transform:scale(.08);opacity:.9}to{transform:scale(1);opacity:0}}@keyframes _dotPulse_wa8op_1{0%,to{transform:translate(-50%,-50%) scale(.55);opacity:.3}50%{transform:translate(-50%,calc(-50% - var(--sz) * .1)) scale(1);opacity:1}}@keyframes _waveBounce_wa8op_1{0%,55%,to{transform:translate(-50%,-50%) scale(.8);opacity:.4}27%{transform:translate(-50%,calc(-50% - var(--sz) * .28)) scale(1);opacity:1}}._LoaderContainer_wa8op_24{position:relative;flex-shrink:0}._sm_wa8op_31{width:1.5rem;height:1.5rem;--sz: 1.5rem;--arc-gap: .2rem;--arc-bw: .125rem}._md_wa8op_32{width:2.5rem;height:2.5rem;--sz: 2.5rem;--arc-gap: .35rem;--arc-bw: .1875rem}._lg_wa8op_33{width:4rem;height:4rem;--sz: 4rem;--arc-gap: .55rem;--arc-bw: .25rem}._Arc1_wa8op_37,._Arc2_wa8op_38,._Arc3_wa8op_39{position:absolute;border-radius:50%;border:var(--arc-bw) solid transparent}._Arc1_wa8op_37{inset:0;border-top-color:var(--chures-accent, #229ED9);border-left-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 1.2s linear infinite;filter:drop-shadow(0 0 .25rem var(--chures-accent, #229ED9))}._Arc2_wa8op_38{inset:var(--arc-gap);border-bottom-color:var(--chures-accent, #229ED9);border-right-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 1.8s linear infinite reverse;opacity:.8}._Arc3_wa8op_39{inset:calc(var(--arc-gap) * 2);border-top-color:var(--chures-accent, #229ED9);border-right-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 2.4s linear infinite;opacity:.6}._Ring1_wa8op_71,._Ring2_wa8op_72,._Ring3_wa8op_73{position:absolute;inset:0;border-radius:50%;border:var(--arc-bw) solid var(--chures-accent, #229ED9);animation:_ripple_wa8op_1 1.8s ease-out infinite both}._Ring2_wa8op_72{animation-delay:.6s}._Ring3_wa8op_73{animation-delay:1.2s}._Dot1_wa8op_86,._Dot2_wa8op_87,._Dot3_wa8op_88{position:absolute;top:50%;border-radius:50%;width:calc(var(--sz) * .2);height:calc(var(--sz) * .2);background:var(--chures-accent, #229ED9);box-shadow:0 0 calc(var(--sz) * .14) var(--chures-accent, #229ED9);animation:_dotPulse_wa8op_1 1.1s ease-in-out infinite both}._Dot1_wa8op_86{left:22%}._Dot2_wa8op_87{left:50%;animation-delay:.18s}._Dot3_wa8op_88{left:78%;animation-delay:.36s}._Wave1_wa8op_105,._Wave2_wa8op_106,._Wave3_wa8op_107,._Wave4_wa8op_108,._Wave5_wa8op_109{position:absolute;top:50%;border-radius:50%;width:calc(var(--sz) * .16);height:calc(var(--sz) * .16);background:var(--chures-accent, #229ED9);box-shadow:0 0 calc(var(--sz) * .1) var(--chures-accent, #229ED9);animation:_waveBounce_wa8op_1 1s ease-in-out infinite both}._Wave1_wa8op_105{left:10%}._Wave2_wa8op_106{left:28%;animation-delay:.12s}._Wave3_wa8op_107{left:46%;animation-delay:.24s}._Wave4_wa8op_108{left:64%;animation-delay:.36s}._Wave5_wa8op_109{left:82%;animation-delay:.48s}._LoadingWrapperContainer_1q0w7_1{display:flex;align-items:center;justify-content:center;width:100%;min-height:4rem}._SkeletonWrapper_1q0w7_9{width:100%}._TelegramSignInButtonContainer_10wun_1{display:inline-flex;align-items:center;justify-content:center;gap:.625rem;width:100%;padding:1rem 1.375rem;background:linear-gradient(180deg,var(--chures-btn-from, #2AABEE) 0%,var(--chures-btn-to, #229ED9) 100%);border:0;border-radius:.875rem;color:#fff;font-family:Comfortaa,sans-serif;font-weight:600;font-size:1rem;letter-spacing:-.005em;cursor:pointer;box-shadow:inset 0 .0625rem #ffffff26,0 .75rem 2rem -.75rem #2aabee8c;transition:transform .14s ease,box-shadow .2s ease,filter .16s ease}._TelegramSignInButtonContainer_10wun_1:hover{transform:translateY(-.0625rem);box-shadow:inset 0 .0625rem #ffffff2e,0 1.125rem 2.375rem -.75rem #2aabeea6;filter:brightness(1.05)}._TelegramSignInButtonContainer_10wun_1:active{transform:translateY(0);filter:brightness(.97)}._TelegramSignInButtonContainer_10wun_1:focus-visible{outline:.125rem solid rgba(255,255,255,.8);outline-offset:.125rem}._TelegramSignInButtonContainer_10wun_1:disabled{opacity:.6;cursor:not-allowed}._FullSize_10wun_46{height:100%}._Icon_10wun_50{flex-shrink:0}._ToastContainer_1tme2_1{position:fixed;right:1.5rem;top:1.5rem;width:clamp(25vw,24.5rem,95vw);display:flex;flex-direction:column;gap:1rem;z-index:9999}._Toast_1tme2_1{min-height:4rem;border:var(--chures-accent, #229ED9) 1px solid;border-radius:1rem;padding:1rem;box-sizing:border-box;position:relative;background:var(--chures-surface, #000000);display:flex;flex-direction:column}._Toast_1tme2_1>div:first-child{font-weight:700;font-size:var(--chures-font-sm, .875rem);color:var(--chures-fg, #ffffff)}._Toast_1tme2_1._error_1tme2_33{border-color:var(--chures-error, #ef4444)}._Toast_1tme2_1._error_1tme2_33>div:first-child{color:var(--chures-error, #ef4444)}._Toast_1tme2_1._warn_1tme2_41{border-color:var(--chures-warn, #f59e0b)}._Toast_1tme2_1._warn_1tme2_41>div:first-child{color:var(--chures-warn, #f59e0b)}._Toast_1tme2_1._info_1tme2_49{border-color:var(--chures-accent, #229ED9)}._Toast_1tme2_1 ._Description_1tme2_53{color:var(--chures-fg-muted, #9ca3af);font-size:var(--chures-font-xs, .75rem);margin-top:.125rem}._Toast_1tme2_1 ._DismissButton_1tme2_59{position:absolute;width:1rem;height:1rem;display:flex;justify-content:center;align-items:center;top:0;right:1%;cursor:pointer;font-size:1.5rem;color:var(--chures-fg-muted, #9ca3af)}._slideIn_1tme2_79{animation:_slideIn_1tme2_79 .2s ease forwards}._slideOut_1tme2_83{animation:_slideOut_1tme2_83 .2s ease forwards}@keyframes _slideIn_1tme2_79{0%{opacity:0;transform:translate(2rem)}to{opacity:1;transform:translate(0)}}@keyframes _slideOut_1tme2_83{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(2rem)}}@keyframes _shimmer_1uu20_1{0%{background-position:-200% 0}to{background-position:200% 0}}:where(._InputContainer_1uu20_15){position:relative;width:100%;height:var(--chures-input-height, 3rem)}:where(._InputField_1uu20_21){width:100%;height:100%;background:var(--chures-input-bg, #111111);border:.0625rem solid rgb(255 255 255 / 13%);border-radius:var(--chures-input-radius, .75rem);color:var(--chures-fg, #ffffff);font-size:var(--chures-font-sm, .875rem);padding:0 .875rem;outline:none;transition:border-color .18s ease;box-sizing:border-box}:where(._InputField_1uu20_21._hasStartIcon_1uu20_35){padding-left:2.25rem}:where(._InputField_1uu20_21._hasEndIcon_1uu20_39){padding-right:2.25rem}:where(._StartIcon_1uu20_43){position:absolute;left:.875rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;color:var(--chures-fg-muted, #9ca3af);pointer-events:none}:where(._EndIcon_1uu20_54){position:absolute;right:.875rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;color:var(--chures-fg-muted, #9ca3af);pointer-events:none}:where(._InputField_1uu20_21):focus{border-color:#ffffff59}:where(._hasError_1uu20_69 ._InputField_1uu20_21),:where(._hasError_1uu20_69 ._InputField_1uu20_21):focus{border-color:var(--chures-error, #ef4444)}:where(._disabled_1uu20_74 ._InputField_1uu20_21){opacity:.45;cursor:not-allowed}:where(._Label_1uu20_79){position:absolute;left:.875rem;top:50%;transform:translateY(-50%);transform-origin:left center;color:var(--chures-fg-muted, #9ca3af);font-size:var(--chures-font-sm, .875rem);pointer-events:none;transition:all .18s ease;padding:0 .25rem;border-radius:.1875rem}:where(._Label_1uu20_79._lifted_1uu20_93){top:0;transform:translateY(-50%) scale(.82);background:var(--chures-input-bg, #111111);color:var(--chures-fg-muted, #9ca3af)}:where(._hasError_1uu20_69 ._Label_1uu20_79._lifted_1uu20_93){color:var(--chures-error, #ef4444)}:where(._ErrorText_1uu20_104){display:block;margin-top:.25rem;padding-left:.875rem;font-size:var(--chures-font-xs, .75rem);color:var(--chures-error, #ef4444)}:where(._Skeleton_1uu20_112){width:100%;height:var(--chures-input-height, 3rem);border-radius:var(--chures-input-radius, .75rem);background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1uu20_1 1.5s ease-in-out infinite}@keyframes _shimmer_1jetc_1{0%{background-position:-200% 0}to{background-position:200% 0}}._ToggleContainer_1jetc_6{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer}._disabled_1jetc_13{opacity:.45;cursor:not-allowed}._Track_1jetc_18{position:relative;width:var(--chures-toggle-width, 2.75rem);height:var(--chures-toggle-height, 1.5rem);border-radius:624.9375rem;background:var(--chures-toggle-bg-off, rgb(255 255 255 / 13%));border:none;padding:0;cursor:pointer;transition:background .2s ease;flex-shrink:0}._Track_1jetc_18._on_1jetc_31{background:var(--chures-toggle-bg-on, var(--chures-accent, #229ED9))}._disabled_1jetc_13 ._Track_1jetc_18{cursor:not-allowed}._Thumb_1jetc_39{position:absolute;top:0;bottom:0;margin:auto 0;left:.1875rem;width:var(--chures-toggle-thumb, 1.125rem);height:var(--chures-toggle-thumb, 1.125rem);border-radius:50%;background:var(--chures-toggle-thumb-color, #ffffff);transition:left .2s ease;pointer-events:none}._Track_1jetc_18._on_1jetc_31 ._Thumb_1jetc_39{left:calc(var(--chures-toggle-width, 2.75rem) - var(--chures-toggle-thumb, 1.125rem) - .1875rem)}._Label_1jetc_57{font-size:var(--chures-font-sm, .875rem);color:var(--chures-fg, #ffffff);-webkit-user-select:none;user-select:none}._LabelSkeleton_1jetc_63{display:inline-block;width:var(--chures-toggle-label-skeleton-w, 5rem);height:var(--chures-font-sm, .875rem);border-radius:624.9375rem;background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1jetc_1 1.5s ease-in-out infinite}._Skeleton_1jetc_78{width:var(--chures-toggle-width, 2.75rem);height:var(--chures-toggle-height, 1.5rem);border-radius:624.9375rem;background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1jetc_1 1.5s ease-in-out infinite}@layer chures-defaults{:root{--chures-accent: #229ED9;--chures-accent-muted: rgb(34 158 217 / 50%);--chures-btn-from: #2AABEE;--chures-btn-to: #229ED9;--chures-button-bg: var(--chures-accent);--chures-error: #ef4444;--chures-warn: #f59e0b;--chures-bg: #000000;--chures-fg: #ffffff;--chures-fg-muted: #9ca3af;--chures-surface: #000000;--chures-font-sm: .875rem;--chures-font-xs: .75rem;--chures-input-bg: #111111;--chures-input-height: 3rem;--chures-input-radius: .75rem;--chures-skeleton-shine: #1e1e1e;--chures-toggle-width: 2.75rem;--chures-toggle-height: 1.5rem;--chures-toggle-thumb: 1.125rem;--chures-toggle-bg-off: rgb(255 255 255 / 13%);--chures-toggle-bg-on: var(--chures-accent);--chures-toggle-thumb-color: #ffffff;--chures-toggle-label-skeleton-w: 5rem;--chures-dropdown-bg: var(--chures-bg);--chures-dropdown-radius: .75rem;--chures-dropdown-row-radius: .375rem;--chures-dropdown-border: var(--chures-accent);--chures-dropdown-border-subtle: var(--chures-accent-muted);--chures-dropdown-hover: rgb(255 255 255 / 8%);--chures-dropdown-create-bg: rgb(34 158 217 / 12%);--chures-dropdown-create-bg-hover: rgb(34 158 217 / 20%);--chures-dropdown-trigger-border: rgb(255 255 255 / 22%);--chures-dropdown-trigger-border-hover: rgb(255 255 255 / 38%);--chures-dropdown-trigger-focus-ring: rgb(34 158 217 / 15%);--chures-dropdown-chip-border: rgb(34 158 217 / 30%);--chures-dropdown-panel-gap: .375rem;--chures-dropdown-glass-bg: rgb(255 255 255 / 6%);--chures-dropdown-glass-blur: 1.25rem;--chures-dialog-glass-bg: rgb(255 255 255 / 6%);--chures-dialog-glass-blur: 1.25rem;--chures-overlay: rgb(0 0 0 / 58%);--chures-side-drawer-size: 22rem;--chures-flyout-bg: #0d0d0d;--chures-flyout-min-width: 10rem;--chures-flyout-border: rgb(255 255 255 / 11%);--chures-flyout-radius: .5rem;--chures-flyout-shadow: rgb(0 0 0 / 80%);--chures-flyout-fg: rgb(255 255 255 / 55%);--chures-flyout-fg-strong: rgb(255 255 255 / 92%);--chures-flyout-fg-muted: rgb(255 255 255 / 32%);--chures-flyout-hover: rgb(255 255 255 / 4%);--chures-flyout-skeleton: rgb(255 255 255 / 7%);--chures-flyout-font: .8125rem;--chures-flyout-font-sm: .6875rem;--chures-flyout-font-md: .75rem;--chures-flyout-font-mono: "JetBrains Mono", ui-monospace, sfmono-regular, menlo, monospace}}@keyframes _panelIn_1jz2j_1{0%{opacity:0;transform:scale(.96) translateY(6px)}to{opacity:1;transform:none}}@keyframes _shimmer_1jz2j_1{0%{background-position:-200% center}to{background-position:200% center}}._DropdownContainer_1jz2j_13{position:relative;width:100%}._PanelWrapper_1jz2j_20{position:absolute;top:calc(100% + var(--chures-dropdown-panel-gap));left:0;width:100%;animation:_panelIn_1jz2j_1 .14s ease}._PanelWrapper_1jz2j_20._Portal_1jz2j_34{position:fixed;width:auto;margin-top:var(--chures-dropdown-panel-gap)}._PanelContainer_1jz2j_18{background:var(--chures-dropdown-bg);border:1px solid var(--chures-dropdown-border);border-radius:var(--chures-dropdown-radius);overflow:hidden;box-shadow:0 1rem 3rem #000c}._PanelContainer_1jz2j_18._Glass_1jz2j_48{background:var(--chures-dropdown-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dropdown-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dropdown-glass-blur, 1.25rem))}._Label_1jz2j_54{position:absolute;left:.875rem;top:50%;transform:translateY(-50%);transform-origin:left center;color:var(--chures-fg-muted);font-size:var(--chures-font-sm);pointer-events:none;transition:all .18s ease;padding:0 .25rem;border-radius:.1875rem}._Label_1jz2j_54._lifted_1jz2j_68{top:0;transform:translateY(-50%) scale(.82);background:var(--chures-input-bg);color:var(--chures-fg-muted)}._TriggerContainer_1jz2j_75{width:100%;height:var(--chures-input-height);background:var(--chures-input-bg);border:1px solid var(--chures-dropdown-trigger-border);border-radius:var(--chures-input-radius);color:var(--chures-fg);font-size:var(--chures-font-sm);font-family:inherit;padding:0 .875rem;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:.5rem;text-align:left;overflow:hidden;transition:border-color .15s ease,box-shadow .15s ease}._TriggerContainer_1jz2j_75:hover{border-color:var(--chures-dropdown-trigger-border-hover)}._TriggerContainer_1jz2j_75._Open_1jz2j_99{border-color:var(--chures-accent);box-shadow:0 0 0 .1875rem var(--chures-dropdown-trigger-focus-ring)}._TriggerPlaceholder_1jz2j_104{color:var(--chures-fg-muted);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerValue_1jz2j_112{color:var(--chures-fg);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerIcon_1jz2j_120{color:var(--chures-fg-muted);flex-shrink:0;display:flex;align-items:center}._ChipsWrapper_1jz2j_127{display:flex;flex-wrap:nowrap;gap:.25rem;flex:1;overflow-x:auto;overflow-y:hidden;min-width:0;align-items:center;margin:.375rem 0;scrollbar-width:none;-ms-overflow-style:none}._ChipsWrapper_1jz2j_127::-webkit-scrollbar{display:none}._ChipsWrapper_1jz2j_127._Expand_1jz2j_145{flex-wrap:wrap;overflow:visible;row-gap:.25rem}._TriggerContainer_1jz2j_75._MultiSelect_1jz2j_151 ._TriggerIcon_1jz2j_120{align-self:flex-start;height:var(--chures-input-height)}._TriggerContainer_1jz2j_75._ExpandHeight_1jz2j_156{height:auto;min-height:var(--chures-input-height)}._Chip_1jz2j_127{display:inline-flex;align-items:center;flex-shrink:0;background:var(--chures-dropdown-create-bg);border:1px solid var(--chures-dropdown-chip-border);border-radius:624.9375rem;padding:.15rem .5rem;font-size:var(--chures-font-xs);color:var(--chures-fg);white-space:nowrap;line-height:1.4}._SearchRow_1jz2j_175{padding:.5rem;border-bottom:1px solid var(--chures-dropdown-border-subtle)}._SearchBox_1jz2j_180{display:flex;align-items:center;gap:.5rem;background:var(--chures-input-bg);border:1px solid var(--chures-dropdown-border-subtle);border-radius:var(--chures-dropdown-row-radius);padding:.4rem .625rem}._SearchIcon_1jz2j_190{display:flex;align-items:center;color:var(--chures-fg-muted);flex-shrink:0}._SearchInput_1jz2j_197{flex:1;background:transparent;border:none;outline:none;font-size:var(--chures-font-sm);color:var(--chures-fg);font-family:inherit}._SearchInput_1jz2j_197::placeholder{color:var(--chures-fg-muted)}._ResultsList_1jz2j_211{max-height:13rem;overflow-y:auto}._OptionRow_1jz2j_216{padding:.5625rem .875rem;font-size:var(--chures-font-sm);color:var(--chures-fg-muted);cursor:pointer;transition:background .1s ease,color .1s ease;display:flex;align-items:center;gap:.5rem}._OptionRow_1jz2j_216:hover{background:var(--chures-dropdown-hover);color:var(--chures-fg)}._OptionRow_1jz2j_216._Selected_1jz2j_231{color:var(--chures-fg)}._OptionRow_1jz2j_216._Indented_1jz2j_235{padding-left:1.875rem}._GroupHeader_1jz2j_240{padding:.5625rem .875rem .25rem;font-size:var(--chures-font-xs);color:var(--chures-fg-muted);text-transform:uppercase;letter-spacing:.03em}._GroupHeader_1jz2j_240:not(:first-child){margin-top:.25rem;border-top:1px solid var(--chures-dropdown-border-subtle)}._Checkmark_1jz2j_253{color:var(--chures-accent);font-size:var(--chures-font-xs);flex-shrink:0}._CreateRow_1jz2j_259{display:flex;align-items:center;gap:.625rem;padding:.5625rem .875rem;cursor:pointer;background:var(--chures-dropdown-create-bg);transition:background .1s ease}._CreateRow_1jz2j_259:hover{background:var(--chures-dropdown-create-bg-hover)}._CreateRow_1jz2j_259._WithBorder_1jz2j_272{border-top:1px solid var(--chures-dropdown-border-subtle)}._CreateIcon_1jz2j_277{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;border-radius:50%;background:var(--chures-accent);color:#fff;flex-shrink:0}._CreateLabel_1jz2j_289{font-size:var(--chures-font-sm);font-weight:600;color:var(--chures-fg)}._EmptyHint_1jz2j_295{padding:.75rem .875rem;font-size:var(--chures-font-sm);color:var(--chures-fg-muted);font-style:italic}._SkeletonRow_1jz2j_302{height:2rem;margin:.375rem .875rem;border-radius:var(--chures-dropdown-row-radius);background:linear-gradient(90deg,var(--chures-dropdown-bg) 25%,var(--chures-skeleton-shine) 50%,var(--chures-dropdown-bg) 75%);background-size:200% 100%;animation:_shimmer_1jz2j_1 1.4s infinite linear}:where(._Btn_1tozl_10){display:inline-flex;align-items:center;justify-content:center;gap:.375rem;border-radius:.625rem;border:1px solid transparent;font-family:inherit;font-size:.8125rem;font-weight:500;cursor:pointer;padding:.625rem 1rem;transition:all .16s ease;white-space:nowrap;color:var(--chures-fg, #ffffff);background:var(--chures-button-bg)}:where(._Btn_1tozl_10):disabled{opacity:.4;cursor:not-allowed}:where(._Primary_1tozl_35){background:var(--chures-accent, #229ED9);border-color:var(--chures-accent, #229ED9);color:#fff;font-weight:600;padding:.625rem 1.125rem;box-shadow:0 10px 28px -12px var(--chures-accent-muted, rgb(34 158 217 / 50%));transition:filter .16s ease,opacity .16s ease}:where(._Primary_1tozl_35):hover:not(:disabled){filter:brightness(1.06)}:where(._Secondary_1tozl_50){background:transparent;border-color:#ffffff24;color:var(--chures-fg-muted, #9ca3af)}:where(._Secondary_1tozl_50):hover:not(:disabled){color:var(--chures-fg, #ffffff);border-color:#ffffff47}:where(._Ghost_1tozl_62){background:transparent;border-color:#ffffff24;color:var(--chures-fg-muted, #9ca3af)}:where(._Ghost_1tozl_62):hover:not(:disabled){color:var(--chures-fg, #ffffff);border-color:#ffffff47}:where(._IconDanger_1tozl_74){width:1.375rem;height:1.375rem;padding:0;border:0;border-radius:.375rem;background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:1rem;line-height:1;justify-content:center;flex-shrink:0;transition:background .14s ease,color .14s ease}:where(._IconDanger_1tozl_74):hover:not(:disabled){background:#ef44441f;color:var(--chures-error, #ef4444)}:where(._Danger_1tozl_95){background:transparent;border-color:#ef444466;color:var(--chures-error, #ef4444);transition:background .16s ease,border-color .16s ease}:where(._Danger_1tozl_95):hover:not(:disabled){background:#ef44441a;border-color:var(--chures-error, #ef4444)}._ConfirmWrapper_1tq4o_4{width:100%;max-width:24rem;animation:_confirmIn_1tq4o_1 .28s cubic-bezier(.2,.7,.2,1) both}@keyframes _confirmIn_1tq4o_1{0%{opacity:0;transform:translateY(.75rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}._ConfirmContainer_1tq4o_1{width:100%;background:var(--chures-surface, #000000);border:1px solid rgb(255 255 255 / 14%);border-radius:1.25rem;padding:1.75rem 1.75rem 1.5rem;box-shadow:0 32px 80px -20px #000c}._Glass_1tq4o_24{background:var(--chures-dialog-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem))}._ConfirmTitle_1tq4o_30{font-size:1.25rem;font-weight:600;letter-spacing:-.02em;color:var(--chures-fg, #ffffff);margin-bottom:.75rem}._ConfirmMessage_1tq4o_38{font-size:.875rem;color:var(--chures-fg-muted, #9ca3af);line-height:1.5;letter-spacing:-.005em}._ConfirmActions_1tq4o_45{display:flex;align-items:center;justify-content:flex-end;gap:.625rem;margin-top:1.5rem}._BtnCancel_1tq4o_53{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(255 255 255 / 14%);background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:.8125rem;font-weight:500;font-family:inherit;cursor:pointer;transition:background .16s ease,color .16s ease}._BtnCancel_1tq4o_53:hover:not(:disabled){background:#ffffff14;color:var(--chures-fg, #ffffff)}._BtnConfirm_1tq4o_73{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid var(--chures-accent, #229ED9);background:var(--chures-accent, #229ED9);color:#fff;font-size:.8125rem;font-weight:600;font-family:inherit;cursor:pointer;transition:filter .16s ease,opacity .16s ease}._BtnConfirm_1tq4o_73:hover:not(:disabled){filter:brightness(1.06)}._BtnDanger_1tq4o_92{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(239 68 68 / 40%);background:transparent;color:var(--chures-error, #ef4444);font-size:.8125rem;font-weight:600;font-family:inherit;cursor:pointer;transition:background .16s ease,border-color .16s ease}._BtnDanger_1tq4o_92:hover:not(:disabled){background:#ef44441a;border-color:var(--chures-error, #ef4444)}._BtnConfirm_1tq4o_73:disabled,._BtnDanger_1tq4o_92:disabled,._BtnCancel_1tq4o_53:disabled{opacity:.4;cursor:not-allowed}._InfoWrapper_cqv58_4{width:100%;max-width:24rem;animation:_infoIn_cqv58_1 .28s cubic-bezier(.2,.7,.2,1) both}@keyframes _infoIn_cqv58_1{0%{opacity:0;transform:translateY(.75rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}._InfoContainer_cqv58_1{width:100%;background:var(--chures-surface, #000000);border:1px solid rgb(255 255 255 / 14%);border-radius:1.25rem;padding:1.75rem 1.75rem 1.5rem;box-shadow:0 32px 80px -20px #000c}._Glass_cqv58_24{background:var(--chures-dialog-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem))}._InfoTitle_cqv58_30{font-size:1.25rem;font-weight:600;letter-spacing:-.02em;color:var(--chures-fg, #ffffff);margin-bottom:.75rem}._InfoMessage_cqv58_38{font-size:.875rem;color:var(--chures-fg-muted, #9ca3af);line-height:1.5;letter-spacing:-.005em}._InfoActions_cqv58_45{display:flex;align-items:center;justify-content:flex-end;margin-top:1.5rem}._BtnClose_cqv58_52{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(255 255 255 / 14%);background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:.8125rem;font-weight:500;font-family:inherit;cursor:pointer;transition:background .16s ease,color .16s ease}._BtnClose_cqv58_52:hover{background:#ffffff14;color:var(--chures-fg, #ffffff)}:where(._Backdrop_1w1e3_7){position:fixed;inset:0;background:var(--chures-overlay, rgb(0 0 0 / 58%));opacity:0;pointer-events:none;transition:opacity .26s ease}:where(._BackdropOpen_1w1e3_16){opacity:1;pointer-events:auto}:where(._Panel_1w1e3_21){position:fixed;display:flex;flex-direction:column;overflow:hidden;background:var(--chures-surface, #000000);box-shadow:0 0 3rem #00000059;transition:transform .28s cubic-bezier(.32,0,0,1)}:where(._Right_1w1e3_31){top:0;right:0;bottom:0;width:var(--chures-side-drawer-size, 22rem);max-width:100vw;transform:translate(100%)}:where(._Left_1w1e3_40){top:0;bottom:0;left:0;width:var(--chures-side-drawer-size, 22rem);max-width:100vw;transform:translate(-100%)}:where(._Top_1w1e3_49){top:0;left:0;right:0;height:var(--chures-side-drawer-size, 22rem);max-height:100vh;transform:translateY(-100%)}:where(._Bottom_1w1e3_58){left:0;right:0;bottom:0;height:var(--chures-side-drawer-size, 22rem);max-height:100vh;transform:translateY(100%)}:where(._PanelOpen_1w1e3_67){transform:translate(0)}@layer chures-defaults{:root{--chures-accent: #229ED9;--chures-accent-muted: rgb(34 158 217 / 50%);--chures-btn-from: #2AABEE;--chures-btn-to: #229ED9;--chures-button-bg: var(--chures-accent);--chures-error: #ef4444;--chures-warn: #f59e0b;--chures-bg: #000000;--chures-fg: #ffffff;--chures-fg-muted: #9ca3af;--chures-surface: #000000;--chures-font-sm: .875rem;--chures-font-xs: .75rem;--chures-input-bg: #111111;--chures-input-height: 3rem;--chures-input-radius: .75rem;--chures-skeleton-shine: #1e1e1e;--chures-toggle-width: 2.75rem;--chures-toggle-height: 1.5rem;--chures-toggle-thumb: 1.125rem;--chures-toggle-bg-off: rgb(255 255 255 / 13%);--chures-toggle-bg-on: var(--chures-accent);--chures-toggle-thumb-color: #ffffff;--chures-toggle-label-skeleton-w: 5rem;--chures-dropdown-bg: var(--chures-bg);--chures-dropdown-radius: .75rem;--chures-dropdown-row-radius: .375rem;--chures-dropdown-border: var(--chures-accent);--chures-dropdown-border-subtle: var(--chures-accent-muted);--chures-dropdown-hover: rgb(255 255 255 / 8%);--chures-dropdown-create-bg: rgb(34 158 217 / 12%);--chures-dropdown-create-bg-hover: rgb(34 158 217 / 20%);--chures-dropdown-trigger-border: rgb(255 255 255 / 22%);--chures-dropdown-trigger-border-hover: rgb(255 255 255 / 38%);--chures-dropdown-trigger-focus-ring: rgb(34 158 217 / 15%);--chures-dropdown-chip-border: rgb(34 158 217 / 30%);--chures-dropdown-panel-gap: .375rem;--chures-dropdown-glass-bg: rgb(255 255 255 / 6%);--chures-dropdown-glass-blur: 1.25rem;--chures-dialog-glass-bg: rgb(255 255 255 / 6%);--chures-dialog-glass-blur: 1.25rem;--chures-overlay: rgb(0 0 0 / 58%);--chures-side-drawer-size: 22rem;--chures-flyout-bg: #0d0d0d;--chures-flyout-min-width: 10rem;--chures-flyout-border: rgb(255 255 255 / 11%);--chures-flyout-radius: .5rem;--chures-flyout-shadow: rgb(0 0 0 / 80%);--chures-flyout-fg: rgb(255 255 255 / 55%);--chures-flyout-fg-strong: rgb(255 255 255 / 92%);--chures-flyout-fg-muted: rgb(255 255 255 / 32%);--chures-flyout-hover: rgb(255 255 255 / 4%);--chures-flyout-skeleton: rgb(255 255 255 / 7%);--chures-flyout-font: .8125rem;--chures-flyout-font-sm: .6875rem;--chures-flyout-font-md: .75rem;--chures-flyout-font-mono: "JetBrains Mono", ui-monospace, sfmono-regular, menlo, monospace}}._FlyoutMenuContainer_1q0ma_5{display:contents}._Backdrop_1q0ma_9{position:fixed;inset:0}._Panel_1q0ma_14{position:fixed;display:flex;flex-direction:column;min-width:var(--chures-flyout-min-width);padding:.35rem;background:var(--chures-flyout-bg);border:1px solid var(--chures-flyout-border);border-radius:var(--chures-flyout-radius);box-shadow:0 1rem 2.5rem -.75rem var(--chures-flyout-shadow);overflow-y:auto}._Submenu_1q0ma_27{position:fixed;display:flex;flex-direction:column;min-width:var(--chures-flyout-min-width);background:var(--chures-flyout-bg);border:1px solid var(--chures-flyout-border);border-radius:var(--chures-flyout-radius);box-shadow:0 1rem 2.5rem -.75rem var(--chures-flyout-shadow);overflow-y:auto}._FlyoutPanelContainer_1q0ma_41{display:flex;flex-direction:column;gap:.15rem}._Back_1q0ma_9{display:flex;align-items:center;justify-content:flex-start;gap:.4rem;padding:.4rem .55rem;border:1px solid transparent;border-radius:var(--chures-flyout-radius);background:transparent;color:var(--chures-flyout-fg);font-size:var(--chures-flyout-font);text-align:left;cursor:pointer;transition:background .14s ease,color .14s ease}._Back_1q0ma_9:hover{background:var(--chures-flyout-hover);color:var(--chures-flyout-fg-strong)}._Chevron_1q0ma_68{flex-shrink:0;color:var(--chures-flyout-fg-muted)}._MenuListContainer_1q0ma_75{display:flex;flex-direction:column;gap:.15rem}._Heading_1q0ma_81{padding:.35rem .55rem .25rem;color:var(--chures-flyout-fg-muted);font-family:var(--chures-flyout-font-mono);font-size:var(--chures-flyout-font-sm);letter-spacing:.06rem;text-transform:uppercase}._Divider_1q0ma_90{height:1px;margin:.3rem .2rem;background:var(--chures-flyout-border)}._MenuRowContainer_1q0ma_98{display:flex}._MenuRowContainer_1q0ma_98._Dim_1q0ma_102{opacity:.5}._Row_1q0ma_106{display:flex;flex:1;min-width:0;align-items:center;justify-content:flex-start;gap:.5rem;padding:.4rem .55rem;overflow:hidden;border:1px solid transparent;border-radius:var(--chures-flyout-radius);background:transparent;color:var(--chures-flyout-fg);font-size:var(--chures-flyout-font);text-align:left;cursor:pointer;transition:background .14s ease,color .14s ease}._Row_1q0ma_106:hover:not(:disabled){background:var(--chures-flyout-hover);color:var(--chures-flyout-fg-strong)}._Row_1q0ma_106:disabled{color:var(--chures-flyout-fg-muted);cursor:default}._Icon_1q0ma_135{display:flex;flex-shrink:0}._Label_1q0ma_140{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._Arrow_1q0ma_148{flex-shrink:0;color:var(--chures-flyout-fg-muted);font-size:var(--chures-flyout-font-md)}._MenuSkeletonContainer_1q0ma_156{display:flex;flex-direction:column;gap:.15rem;padding:.35rem .5rem}._MenuSkeletonRow_1q0ma_163{height:1.75rem;border-radius:var(--chures-flyout-radius);background:var(--chures-flyout-skeleton);animation:_churesFlyoutSkeletonPulse_1q0ma_1 1.5s ease-in-out infinite}._MenuSkeletonRow_1q0ma_163:nth-child(2){animation-delay:.15s}._MenuSkeletonRow_1q0ma_163:nth-child(3){animation-delay:.3s}@keyframes _churesFlyoutSkeletonPulse_1q0ma_1{0%,to{opacity:1}50%{opacity:.4}}._MenuSearchFieldContainer_1q0ma_191{overflow:hidden;padding-bottom:.35rem}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import { jsx as o, jsxs as m, Fragment as H } from "react/jsx-runtime";
3
+ import { createContext as je, useContext as Pe, useRef as T, useState as S, useEffect as b, forwardRef as Je, useCallback as E, useLayoutEffect as Ne, Fragment as he, useMemo as Me } from "react";
4
+ import { AnimatePresence as le, motion as oe } from "framer-motion";
5
+ import { create as Ze } from "zustand";
6
+ import { createPortal as Ie } from "react-dom";
7
+ function en(e) {
8
8
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
9
9
  }
10
- var ie = { exports: {} };
11
- var fe;
12
- function Ae() {
13
- return fe || (fe = 1, (function(e) {
10
+ var me = { exports: {} };
11
+ var Re;
12
+ function nn() {
13
+ return Re || (Re = 1, (function(e) {
14
14
  (function() {
15
15
  var n = {}.hasOwnProperty;
16
- function o() {
17
- for (var s = "", i = 0; i < arguments.length; i++) {
18
- var d = arguments[i];
19
- d && (s = a(s, r(d)));
16
+ function r() {
17
+ for (var a = "", i = 0; i < arguments.length; i++) {
18
+ var c = arguments[i];
19
+ c && (a = s(a, t(c)));
20
20
  }
21
- return s;
21
+ return a;
22
22
  }
23
- function r(s) {
24
- if (typeof s == "string" || typeof s == "number")
25
- return s;
26
- if (typeof s != "object")
23
+ function t(a) {
24
+ if (typeof a == "string" || typeof a == "number")
25
+ return a;
26
+ if (typeof a != "object")
27
27
  return "";
28
- if (Array.isArray(s))
29
- return o.apply(null, s);
30
- if (s.toString !== Object.prototype.toString && !s.toString.toString().includes("[native code]"))
31
- return s.toString();
28
+ if (Array.isArray(a))
29
+ return r.apply(null, a);
30
+ if (a.toString !== Object.prototype.toString && !a.toString.toString().includes("[native code]"))
31
+ return a.toString();
32
32
  var i = "";
33
- for (var d in s)
34
- n.call(s, d) && s[d] && (i = a(i, d));
33
+ for (var c in a)
34
+ n.call(a, c) && a[c] && (i = s(i, c));
35
35
  return i;
36
36
  }
37
- function a(s, i) {
38
- return i ? s ? s + " " + i : s + i : s;
37
+ function s(a, i) {
38
+ return i ? a ? a + " " + i : a + i : a;
39
39
  }
40
- e.exports ? (o.default = o, e.exports = o) : window.classNames = o;
40
+ e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
41
41
  })();
42
- })(ie)), ie.exports;
43
- }
44
- var be = Ae();
45
- const f = /* @__PURE__ */ Ee(be), Be = "_LoaderContainer_wa8op_24", xe = "_sm_wa8op_31", We = "_md_wa8op_32", Pe = "_lg_wa8op_33", Oe = "_Arc1_wa8op_37", ze = "_Arc2_wa8op_38", Me = "_Arc3_wa8op_39", Ue = "_spin_wa8op_1", Fe = "_Ring1_wa8op_71", Ge = "_Ring2_wa8op_72", qe = "_Ring3_wa8op_73", He = "_ripple_wa8op_1", $e = "_Dot1_wa8op_86", Ve = "_Dot2_wa8op_87", Ke = "_Dot3_wa8op_88", Xe = "_dotPulse_wa8op_1", Ye = "_Wave1_wa8op_105", Qe = "_Wave2_wa8op_106", Je = "_Wave3_wa8op_107", Ze = "_Wave4_wa8op_108", en = "_Wave5_wa8op_109", nn = "_waveBounce_wa8op_1", ee = {
46
- LoaderContainer: Be,
47
- sm: xe,
48
- md: We,
49
- lg: Pe,
50
- Arc1: Oe,
51
- Arc2: ze,
52
- Arc3: Me,
53
- spin: Ue,
54
- Ring1: Fe,
55
- Ring2: Ge,
56
- Ring3: qe,
57
- ripple: He,
58
- Dot1: $e,
59
- Dot2: Ve,
60
- Dot3: Ke,
61
- dotPulse: Xe,
62
- Wave1: Ye,
63
- Wave2: Qe,
64
- Wave3: Je,
65
- Wave4: Ze,
66
- Wave5: en,
67
- waveBounce: nn
68
- }, me = ye({});
69
- function I(e, n) {
70
- const o = Le(me);
71
- return n ?? o[e];
72
- }
73
- function tn(e, n) {
42
+ })(me)), me.exports;
43
+ }
44
+ var tn = nn();
45
+ const g = /* @__PURE__ */ en(tn), on = "_LoaderContainer_wa8op_24", rn = "_sm_wa8op_31", sn = "_md_wa8op_32", an = "_lg_wa8op_33", cn = "_Arc1_wa8op_37", ln = "_Arc2_wa8op_38", un = "_Arc3_wa8op_39", dn = "_spin_wa8op_1", _n = "_Ring1_wa8op_71", fn = "_Ring2_wa8op_72", hn = "_Ring3_wa8op_73", mn = "_ripple_wa8op_1", pn = "_Dot1_wa8op_86", gn = "_Dot2_wa8op_87", Cn = "_Dot3_wa8op_88", vn = "_dotPulse_wa8op_1", wn = "_Wave1_wa8op_105", yn = "_Wave2_wa8op_106", Nn = "_Wave3_wa8op_107", In = "_Wave4_wa8op_108", Sn = "_Wave5_wa8op_109", kn = "_waveBounce_wa8op_1", ae = {
46
+ LoaderContainer: on,
47
+ sm: rn,
48
+ md: sn,
49
+ lg: an,
50
+ Arc1: cn,
51
+ Arc2: ln,
52
+ Arc3: un,
53
+ spin: dn,
54
+ Ring1: _n,
55
+ Ring2: fn,
56
+ Ring3: hn,
57
+ ripple: mn,
58
+ Dot1: pn,
59
+ Dot2: gn,
60
+ Dot3: Cn,
61
+ dotPulse: vn,
62
+ Wave1: wn,
63
+ Wave2: yn,
64
+ Wave3: Nn,
65
+ Wave4: In,
66
+ Wave5: Sn,
67
+ waveBounce: kn
68
+ }, Oe = je({});
69
+ function L(e, n) {
70
+ const r = Pe(Oe);
71
+ return n ?? r[e];
72
+ }
73
+ function Rn(e, n) {
74
74
  switch (e) {
75
75
  case "ripple":
76
- return /* @__PURE__ */ _(b, { children: [
77
- /* @__PURE__ */ t("div", { className: n.Ring1 }),
78
- /* @__PURE__ */ t("div", { className: n.Ring2 }),
79
- /* @__PURE__ */ t("div", { className: n.Ring3 })
76
+ return /* @__PURE__ */ m(H, { children: [
77
+ /* @__PURE__ */ o("div", { className: n.Ring1 }),
78
+ /* @__PURE__ */ o("div", { className: n.Ring2 }),
79
+ /* @__PURE__ */ o("div", { className: n.Ring3 })
80
80
  ] });
81
81
  case "dots":
82
- return /* @__PURE__ */ _(b, { children: [
83
- /* @__PURE__ */ t("div", { className: n.Dot1 }),
84
- /* @__PURE__ */ t("div", { className: n.Dot2 }),
85
- /* @__PURE__ */ t("div", { className: n.Dot3 })
82
+ return /* @__PURE__ */ m(H, { children: [
83
+ /* @__PURE__ */ o("div", { className: n.Dot1 }),
84
+ /* @__PURE__ */ o("div", { className: n.Dot2 }),
85
+ /* @__PURE__ */ o("div", { className: n.Dot3 })
86
86
  ] });
87
87
  case "wave":
88
- return /* @__PURE__ */ _(b, { children: [
89
- /* @__PURE__ */ t("div", { className: n.Wave1 }),
90
- /* @__PURE__ */ t("div", { className: n.Wave2 }),
91
- /* @__PURE__ */ t("div", { className: n.Wave3 }),
92
- /* @__PURE__ */ t("div", { className: n.Wave4 }),
93
- /* @__PURE__ */ t("div", { className: n.Wave5 })
88
+ return /* @__PURE__ */ m(H, { children: [
89
+ /* @__PURE__ */ o("div", { className: n.Wave1 }),
90
+ /* @__PURE__ */ o("div", { className: n.Wave2 }),
91
+ /* @__PURE__ */ o("div", { className: n.Wave3 }),
92
+ /* @__PURE__ */ o("div", { className: n.Wave4 }),
93
+ /* @__PURE__ */ o("div", { className: n.Wave5 })
94
94
  ] });
95
95
  default:
96
- return /* @__PURE__ */ _(b, { children: [
97
- /* @__PURE__ */ t("div", { className: n.Arc1 }),
98
- /* @__PURE__ */ t("div", { className: n.Arc2 }),
99
- /* @__PURE__ */ t("div", { className: n.Arc3 })
96
+ return /* @__PURE__ */ m(H, { children: [
97
+ /* @__PURE__ */ o("div", { className: n.Arc1 }),
98
+ /* @__PURE__ */ o("div", { className: n.Arc2 }),
99
+ /* @__PURE__ */ o("div", { className: n.Arc3 })
100
100
  ] });
101
101
  }
102
102
  }
103
- function on({ variant: e = "arcs", size: n = "md", color: o, className: r }) {
104
- const a = I("Loader", r);
105
- return /* @__PURE__ */ t(
103
+ function Tn({ variant: e = "arcs", size: n = "md", color: r, className: t }) {
104
+ const s = L("Loader", t);
105
+ return /* @__PURE__ */ o(
106
106
  "div",
107
107
  {
108
- className: f(ee.LoaderContainer, ee[n], ee[e], a),
108
+ className: g(ae.LoaderContainer, ae[n], ae[e], s),
109
109
  role: "status",
110
110
  "aria-label": "Loading",
111
- style: o ? { "--chures-accent": o } : void 0,
112
- children: tn(e, ee)
111
+ style: r ? { "--chures-accent": r } : void 0,
112
+ children: Rn(e, ae)
113
113
  }
114
114
  );
115
115
  }
116
- const rn = "_LoadingWrapperContainer_1q0w7_1", sn = "_SkeletonWrapper_1q0w7_9", pe = {
117
- LoadingWrapperContainer: rn,
118
- SkeletonWrapper: sn
116
+ const bn = "_LoadingWrapperContainer_1q0w7_1", Ln = "_SkeletonWrapper_1q0w7_9", Te = {
117
+ LoadingWrapperContainer: bn,
118
+ SkeletonWrapper: Ln
119
119
  };
120
- function ho({ isLoading: e, children: n, skeleton: o, loaderProps: r, className: a }) {
121
- const s = I("LoadingWrapper", a);
122
- return e ? o ? /* @__PURE__ */ t("div", { className: f(pe.SkeletonWrapper, s), children: o }) : /* @__PURE__ */ t("div", { className: f(pe.LoadingWrapperContainer, s), children: /* @__PURE__ */ t(on, { ...r }) }) : /* @__PURE__ */ t(b, { children: n });
123
- }
124
- const an = "https://oauth.telegram.org/js/telegram-login.js?3";
125
- function cn(e) {
126
- const { botId: n, redirectUri: o, requestAccess: r = "write" } = e, a = Y(e.onSuccess);
127
- a.current = e.onSuccess;
128
- const s = Y(!1), [i, d] = T(!1), [p, u] = T(!1);
129
- G(function() {
120
+ function Mr({ isLoading: e, children: n, skeleton: r, loaderProps: t, className: s }) {
121
+ const a = L("LoadingWrapper", s);
122
+ return e ? r ? /* @__PURE__ */ o("div", { className: g(Te.SkeletonWrapper, a), children: r }) : /* @__PURE__ */ o("div", { className: g(Te.LoadingWrapperContainer, a), children: /* @__PURE__ */ o(Tn, { ...t }) }) : /* @__PURE__ */ o(H, { children: n });
123
+ }
124
+ const Dn = "https://oauth.telegram.org/js/telegram-login.js?3";
125
+ function En(e) {
126
+ const { botId: n, redirectUri: r, requestAccess: t = "write" } = e, s = T(e.onSuccess);
127
+ s.current = e.onSuccess;
128
+ const a = T(!1), [i, c] = S(!1), [d, u] = S(!1);
129
+ b(function() {
130
130
  if (!n) return;
131
- const m = o ?? window.location.origin;
132
- u(!0), d(!1);
133
- const g = document.createElement("script");
134
- return g.src = an, g.async = !0, g.onload = function() {
135
- const w = window.Telegram;
136
- w && (w.Login.init(
137
- { client_id: n, redirect_uri: m },
138
- function(B) {
139
- s.current || (s.current = !0, a.current(B));
131
+ const _ = r ?? window.location.origin;
132
+ u(!0), c(!1);
133
+ const p = document.createElement("script");
134
+ return p.src = Dn, p.async = !0, p.onload = function() {
135
+ const C = window.Telegram;
136
+ C && (C.Login.init(
137
+ { client_id: n, redirect_uri: _ },
138
+ function(y) {
139
+ a.current || (a.current = !0, s.current(y));
140
140
  }
141
- ), d(!0)), u(!1);
142
- }, g.onerror = function() {
141
+ ), c(!0)), u(!1);
142
+ }, p.onerror = function() {
143
143
  u(!1);
144
- }, document.head.appendChild(g), function() {
145
- document.head.contains(g) && document.head.removeChild(g), d(!1), u(!1);
144
+ }, document.head.appendChild(p), function() {
145
+ document.head.contains(p) && document.head.removeChild(p), c(!1), u(!1);
146
146
  };
147
- }, [n, o]);
148
- function h() {
149
- const m = window.Telegram;
150
- if (!i || !m) return;
151
- s.current = !1;
152
- const g = o ?? window.location.origin;
153
- m.Login.auth(
154
- { client_id: n, redirect_uri: g, request_access: r },
155
- function(w) {
156
- s.current || (s.current = !0, a.current(w));
147
+ }, [n, r]);
148
+ function l() {
149
+ const _ = window.Telegram;
150
+ if (!i || !_) return;
151
+ a.current = !1;
152
+ const p = r ?? window.location.origin;
153
+ _.Login.auth(
154
+ { client_id: n, redirect_uri: p, request_access: t },
155
+ function(C) {
156
+ a.current || (a.current = !0, s.current(C));
157
157
  }
158
158
  );
159
159
  }
160
- return { login: h, isReady: i, isLoading: p };
160
+ return { login: l, isReady: i, isLoading: d };
161
161
  }
162
- const ln = "_TelegramSignInButtonContainer_10wun_1", dn = "_FullSize_10wun_46", un = "_Icon_10wun_50", ce = {
163
- TelegramSignInButtonContainer: ln,
164
- FullSize: dn,
165
- Icon: un
166
- }, _n = {
162
+ const Bn = "_TelegramSignInButtonContainer_10wun_1", An = "_FullSize_10wun_46", xn = "_Icon_10wun_50", ge = {
163
+ TelegramSignInButtonContainer: Bn,
164
+ FullSize: An,
165
+ Icon: xn
166
+ }, jn = {
167
167
  en: "Continue with Telegram",
168
168
  ru: "Войти через Telegram"
169
169
  };
170
- function fn() {
171
- return /* @__PURE__ */ t(
170
+ function Pn() {
171
+ return /* @__PURE__ */ o(
172
172
  "svg",
173
173
  {
174
174
  viewBox: "0 0 24 24",
@@ -176,283 +176,283 @@ function fn() {
176
176
  height: "20",
177
177
  fill: "currentColor",
178
178
  "aria-hidden": "true",
179
- className: ce.Icon,
180
- children: /* @__PURE__ */ t("path", { d: "M22 3.5L2.5 11l5 1.7L18 6 9.7 14l-.4 5.5 3.4-3.2 5.5 4c.9.5 1.5.2 1.7-.8L22 4.3c.2-.7-.2-1.1-.9-.8z" })
179
+ className: ge.Icon,
180
+ children: /* @__PURE__ */ o("path", { d: "M22 3.5L2.5 11l5 1.7L18 6 9.7 14l-.4 5.5 3.4-3.2 5.5 4c.9.5 1.5.2 1.7-.8L22 4.3c.2-.7-.2-1.1-.9-.8z" })
181
181
  }
182
182
  );
183
183
  }
184
- function pn({
184
+ function Mn({
185
185
  onClick: e,
186
186
  disabled: n,
187
- lang: o = "en",
188
- title: r,
189
- label: a,
190
- fullSize: s,
187
+ lang: r = "en",
188
+ title: t,
189
+ label: s,
190
+ fullSize: a,
191
191
  className: i
192
192
  }) {
193
- G(function() {
194
- const h = "comfortaa-font";
195
- if (document.getElementById(h)) return;
196
- const m = document.createElement("link");
197
- m.id = h, m.rel = "stylesheet", m.href = "https://fonts.googleapis.com/css2?family=Comfortaa:wght@600&display=swap", document.head.appendChild(m);
193
+ b(function() {
194
+ const l = "comfortaa-font";
195
+ if (document.getElementById(l)) return;
196
+ const _ = document.createElement("link");
197
+ _.id = l, _.rel = "stylesheet", _.href = "https://fonts.googleapis.com/css2?family=Comfortaa:wght@600&display=swap", document.head.appendChild(_);
198
198
  }, []);
199
- const d = a ?? r ?? _n[o], p = I("TelegramSignInButton", i), u = f(ce.TelegramSignInButtonContainer, { [ce.FullSize]: s }, p);
200
- return /* @__PURE__ */ _("button", { type: "button", className: u, onClick: e, disabled: n, children: [
201
- /* @__PURE__ */ t(fn, {}),
202
- d
199
+ const c = s ?? t ?? jn[r], d = L("TelegramSignInButton", i), u = g(ge.TelegramSignInButtonContainer, { [ge.FullSize]: a }, d);
200
+ return /* @__PURE__ */ m("button", { type: "button", className: u, onClick: e, disabled: n, children: [
201
+ /* @__PURE__ */ o(Pn, {}),
202
+ c
203
203
  ] });
204
204
  }
205
- function mo({
205
+ function Or({
206
206
  botId: e,
207
207
  onSuccess: n,
208
- lang: o,
209
- title: r,
210
- redirectUri: a,
211
- requestAccess: s,
208
+ lang: r,
209
+ title: t,
210
+ redirectUri: s,
211
+ requestAccess: a,
212
212
  children: i,
213
- className: d
213
+ className: c
214
214
  }) {
215
- const { login: p, isReady: u } = cn({ botId: e, onSuccess: n, redirectUri: a, requestAccess: s });
216
- return i ? /* @__PURE__ */ t(b, { children: i({ login: p, isReady: u }) }) : /* @__PURE__ */ t(
217
- pn,
215
+ const { login: d, isReady: u } = En({ botId: e, onSuccess: n, redirectUri: s, requestAccess: a });
216
+ return i ? /* @__PURE__ */ o(H, { children: i({ login: d, isReady: u }) }) : /* @__PURE__ */ o(
217
+ Mn,
218
218
  {
219
- onClick: p,
219
+ onClick: d,
220
220
  disabled: !u,
221
- lang: o,
222
- title: r,
223
- className: d
221
+ lang: r,
222
+ title: t,
223
+ className: c
224
224
  }
225
225
  );
226
226
  }
227
- let hn = 0;
228
- const ge = ke((e, n) => ({
227
+ let On = 0;
228
+ const We = Ze((e, n) => ({
229
229
  toasts: [],
230
- bake: (o) => {
231
- const r = hn++;
232
- e((a) => ({ toasts: [...a.toasts, { ...o, id: r }] })), setTimeout(() => {
233
- n().dismiss(r);
230
+ bake: (r) => {
231
+ const t = On++;
232
+ e((s) => ({ toasts: [...s.toasts, { ...r, id: t }] })), setTimeout(() => {
233
+ n().dismiss(t);
234
234
  }, 5e3);
235
235
  },
236
- dismiss: (o) => {
237
- e((r) => ({
238
- toasts: r.toasts.filter((a) => a.id !== o)
236
+ dismiss: (r) => {
237
+ e((t) => ({
238
+ toasts: t.toasts.filter((s) => s.id !== r)
239
239
  }));
240
240
  }
241
- })), mn = "_ToastContainer_1tme2_1", gn = "_Toast_1tme2_1", Cn = "_error_1tme2_33", vn = "_warn_1tme2_41", Nn = "_info_1tme2_49", In = "_Description_1tme2_53", wn = "_DismissButton_1tme2_59", yn = "_slideIn_1tme2_79", Ln = "_slideOut_1tme2_83", E = {
242
- ToastContainer: mn,
243
- Toast: gn,
244
- error: Cn,
245
- warn: vn,
246
- info: Nn,
247
- Description: In,
248
- DismissButton: wn,
249
- slideIn: yn,
250
- slideOut: Ln
241
+ })), Wn = "_ToastContainer_1tme2_1", Fn = "_Toast_1tme2_1", qn = "_error_1tme2_33", zn = "_warn_1tme2_41", Hn = "_info_1tme2_49", Un = "_Description_1tme2_53", Gn = "_DismissButton_1tme2_59", $n = "_slideIn_1tme2_79", Vn = "_slideOut_1tme2_83", z = {
242
+ ToastContainer: Wn,
243
+ Toast: Fn,
244
+ error: qn,
245
+ warn: zn,
246
+ info: Hn,
247
+ Description: Un,
248
+ DismissButton: Gn,
249
+ slideIn: $n,
250
+ slideOut: Vn
251
251
  };
252
- function go({ className: e } = {}) {
253
- const { toasts: n } = ge(), o = I("Toaster", e);
254
- return /* @__PURE__ */ t("div", { className: f(E.ToastContainer, o), children: /* @__PURE__ */ t(Se, { children: n.map((r) => /* @__PURE__ */ t(
255
- Re.div,
252
+ function Wr({ className: e } = {}) {
253
+ const { toasts: n } = We(), r = L("Toaster", e);
254
+ return /* @__PURE__ */ o("div", { className: g(z.ToastContainer, r), children: /* @__PURE__ */ o(le, { children: n.map((t) => /* @__PURE__ */ o(
255
+ oe.div,
256
256
  {
257
257
  layout: !0,
258
258
  initial: { opacity: 0, x: 100, y: 50 },
259
259
  animate: { opacity: 1, x: 0, y: 0 },
260
260
  exit: { opacity: 0, y: -50 },
261
261
  transition: { type: "spring", stiffness: 300, damping: 20 },
262
- children: /* @__PURE__ */ t(Tn, { ...r })
262
+ children: /* @__PURE__ */ o(Kn, { ...t })
263
263
  },
264
- r.id
264
+ t.id
265
265
  )) }) });
266
266
  }
267
- function Tn({ id: e, title: n, description: o, level: r, isDismissable: a }) {
268
- const [s, i] = T(!1), d = ge();
269
- return G(() => () => {
267
+ function Kn({ id: e, title: n, description: r, level: t, isDismissable: s }) {
268
+ const [a, i] = S(!1), c = We();
269
+ return b(() => () => {
270
270
  i(!0);
271
- }, []), /* @__PURE__ */ _(
271
+ }, []), /* @__PURE__ */ m(
272
272
  "div",
273
273
  {
274
- className: f(E.Toast, {
275
- [E.error]: r === "Error",
276
- [E.warn]: r === "Warn",
277
- [E.info]: r == null || r === "Info",
278
- [E.slideIn]: !s,
279
- [E.slideOut]: s
274
+ className: g(z.Toast, {
275
+ [z.error]: t === "Error",
276
+ [z.warn]: t === "Warn",
277
+ [z.info]: t == null || t === "Info",
278
+ [z.slideIn]: !a,
279
+ [z.slideOut]: a
280
280
  }),
281
281
  children: [
282
- /* @__PURE__ */ t("div", { children: n }),
283
- /* @__PURE__ */ t("div", { className: E.Description, children: o }),
284
- a && e !== void 0 && /* @__PURE__ */ t("div", { className: E.DismissButton, onClick: () => d.dismiss(e), children: "×" })
282
+ /* @__PURE__ */ o("div", { children: n }),
283
+ /* @__PURE__ */ o("div", { className: z.Description, children: r }),
284
+ s && e !== void 0 && /* @__PURE__ */ o("div", { className: z.DismissButton, onClick: () => c.dismiss(e), children: "×" })
285
285
  ]
286
286
  }
287
287
  );
288
288
  }
289
- const Dn = "_InputContainer_1uu20_15", Sn = "_InputField_1uu20_21", Rn = "_hasStartIcon_1uu20_35", kn = "_hasEndIcon_1uu20_39", jn = "_StartIcon_1uu20_43", En = "_EndIcon_1uu20_54", An = "_hasError_1uu20_69", bn = "_disabled_1uu20_74", Bn = "_Label_1uu20_79", xn = "_lifted_1uu20_93", Wn = "_ErrorText_1uu20_104", Pn = "_Skeleton_1uu20_112", v = {
290
- InputContainer: Dn,
291
- InputField: Sn,
292
- hasStartIcon: Rn,
293
- hasEndIcon: kn,
294
- StartIcon: jn,
295
- EndIcon: En,
296
- hasError: An,
297
- disabled: bn,
298
- Label: Bn,
299
- lifted: xn,
300
- ErrorText: Wn,
301
- Skeleton: Pn
302
- }, Co = Te(function({ value: n, setValue: o, label: r, isLoader: a, type: s = "text", disabled: i, error: d, className: p, inputClassName: u, startIcon: h, endIcon: m, ...g }, w) {
303
- const [B, x] = T(!1), q = B || n.length > 0, D = I("Input", p), { onFocus: W, onBlur: H, ...M } = g;
304
- return a ? /* @__PURE__ */ t("div", { className: f(v.Skeleton, D), "aria-hidden": "true" }) : /* @__PURE__ */ _("div", { className: f(v.InputContainer, { [v.hasError]: !!d, [v.disabled]: i }, D), children: [
305
- h && /* @__PURE__ */ t("span", { className: v.StartIcon, children: h }),
306
- /* @__PURE__ */ t(
289
+ const Xn = "_InputContainer_1uu20_15", Qn = "_InputField_1uu20_21", Yn = "_hasStartIcon_1uu20_35", Jn = "_hasEndIcon_1uu20_39", Zn = "_StartIcon_1uu20_43", et = "_EndIcon_1uu20_54", nt = "_hasError_1uu20_69", tt = "_disabled_1uu20_74", ot = "_Label_1uu20_79", rt = "_lifted_1uu20_93", st = "_ErrorText_1uu20_104", at = "_Skeleton_1uu20_112", D = {
290
+ InputContainer: Xn,
291
+ InputField: Qn,
292
+ hasStartIcon: Yn,
293
+ hasEndIcon: Jn,
294
+ StartIcon: Zn,
295
+ EndIcon: et,
296
+ hasError: nt,
297
+ disabled: tt,
298
+ Label: ot,
299
+ lifted: rt,
300
+ ErrorText: st,
301
+ Skeleton: at
302
+ }, it = Je(function({ value: n, setValue: r, label: t, isLoader: s, type: a = "text", disabled: i, error: c, className: d, inputClassName: u, startIcon: l, endIcon: _, ...p }, C) {
303
+ const [y, k] = S(!1), x = y || n.length > 0, R = L("Input", d), { onFocus: M, onBlur: V, ...U } = p;
304
+ return s ? /* @__PURE__ */ o("div", { className: g(D.Skeleton, R), "aria-hidden": "true" }) : /* @__PURE__ */ m("div", { className: g(D.InputContainer, { [D.hasError]: !!c, [D.disabled]: i }, R), children: [
305
+ l && /* @__PURE__ */ o("span", { className: D.StartIcon, children: l }),
306
+ /* @__PURE__ */ o(
307
307
  "input",
308
308
  {
309
- ref: w,
310
- className: f(v.InputField, { [v.hasStartIcon]: !!h, [v.hasEndIcon]: !!m }, u),
311
- type: s,
309
+ ref: C,
310
+ className: g(D.InputField, { [D.hasStartIcon]: !!l, [D.hasEndIcon]: !!_ }, u),
311
+ type: a,
312
312
  value: n,
313
- onChange: (C) => o(C.target.value),
314
- onFocus: (C) => {
315
- x(!0), W?.(C);
313
+ onChange: (v) => r(v.target.value),
314
+ onFocus: (v) => {
315
+ k(!0), M?.(v);
316
316
  },
317
- onBlur: (C) => {
318
- x(!1), H?.(C);
317
+ onBlur: (v) => {
318
+ k(!1), V?.(v);
319
319
  },
320
320
  disabled: i,
321
- ...M
321
+ ...U
322
322
  }
323
323
  ),
324
- r && /* @__PURE__ */ t("label", { className: f(v.Label, { [v.lifted]: q }), children: r }),
325
- m && /* @__PURE__ */ t("span", { className: v.EndIcon, children: m }),
326
- d && /* @__PURE__ */ t("span", { className: v.ErrorText, children: d })
324
+ t && /* @__PURE__ */ o("label", { className: g(D.Label, { [D.lifted]: x }), children: t }),
325
+ _ && /* @__PURE__ */ o("span", { className: D.EndIcon, children: _ }),
326
+ c && /* @__PURE__ */ o("span", { className: D.ErrorText, children: c })
327
327
  ] });
328
- }), On = "_ToggleContainer_1jetc_6", zn = "_disabled_1jetc_13", Mn = "_Track_1jetc_18", Un = "_on_1jetc_31", Fn = "_Thumb_1jetc_39", Gn = "_Label_1jetc_57", qn = "_LabelSkeleton_1jetc_63", Hn = "_Skeleton_1jetc_78", L = {
329
- ToggleContainer: On,
330
- disabled: zn,
331
- Track: Mn,
332
- on: Un,
333
- Thumb: Fn,
334
- Label: Gn,
335
- LabelSkeleton: qn,
336
- Skeleton: Hn
328
+ }), ct = "_ToggleContainer_1jetc_6", lt = "_disabled_1jetc_13", ut = "_Track_1jetc_18", dt = "_on_1jetc_31", _t = "_Thumb_1jetc_39", ft = "_Label_1jetc_57", ht = "_LabelSkeleton_1jetc_63", mt = "_Skeleton_1jetc_78", P = {
329
+ ToggleContainer: ct,
330
+ disabled: lt,
331
+ Track: ut,
332
+ on: dt,
333
+ Thumb: _t,
334
+ Label: ft,
335
+ LabelSkeleton: ht,
336
+ Skeleton: mt
337
337
  };
338
- function vo({ checked: e, onChange: n, label: o, labelPosition: r = "right", disabled: a, isLoader: s, isLoadingLabel: i, className: d }) {
339
- const p = !!o || i, u = I("Toggle", d), h = i ? /* @__PURE__ */ t("span", { className: L.LabelSkeleton, "aria-hidden": "true" }) : o ? /* @__PURE__ */ t("span", { className: L.Label, children: o }) : null;
340
- return s ? p ? /* @__PURE__ */ _("div", { className: f(L.ToggleContainer, u), children: [
341
- r === "left" && h,
342
- /* @__PURE__ */ t("div", { className: L.Skeleton, "aria-hidden": "true" }),
343
- r === "right" && h
344
- ] }) : /* @__PURE__ */ t("div", { className: f(L.Skeleton, u), "aria-hidden": "true" }) : /* @__PURE__ */ _("label", { className: f(L.ToggleContainer, { [L.disabled]: a }, u), children: [
345
- r === "left" && h,
346
- /* @__PURE__ */ t(
338
+ function Fr({ checked: e, onChange: n, label: r, labelPosition: t = "right", disabled: s, isLoader: a, isLoadingLabel: i, className: c }) {
339
+ const d = !!r || i, u = L("Toggle", c), l = i ? /* @__PURE__ */ o("span", { className: P.LabelSkeleton, "aria-hidden": "true" }) : r ? /* @__PURE__ */ o("span", { className: P.Label, children: r }) : null;
340
+ return a ? d ? /* @__PURE__ */ m("div", { className: g(P.ToggleContainer, u), children: [
341
+ t === "left" && l,
342
+ /* @__PURE__ */ o("div", { className: P.Skeleton, "aria-hidden": "true" }),
343
+ t === "right" && l
344
+ ] }) : /* @__PURE__ */ o("div", { className: g(P.Skeleton, u), "aria-hidden": "true" }) : /* @__PURE__ */ m("label", { className: g(P.ToggleContainer, { [P.disabled]: s }, u), children: [
345
+ t === "left" && l,
346
+ /* @__PURE__ */ o(
347
347
  "button",
348
348
  {
349
349
  role: "switch",
350
350
  "aria-checked": e,
351
- className: f(L.Track, { [L.on]: e }),
352
- onClick: () => !a && n(!e),
353
- disabled: a,
351
+ className: g(P.Track, { [P.on]: e }),
352
+ onClick: () => !s && n(!e),
353
+ disabled: s,
354
354
  type: "button",
355
- children: /* @__PURE__ */ t("span", { className: L.Thumb })
355
+ children: /* @__PURE__ */ o("span", { className: P.Thumb })
356
356
  }
357
357
  ),
358
- r === "right" && h
358
+ t === "right" && l
359
359
  ] });
360
360
  }
361
- function $n() {
362
- const [e, n] = T(!1), o = Y(null), r = _e(() => n((s) => !s), []), a = _e(() => n(!1), []);
363
- return { isOpen: e, triggerRef: o, toggleOpen: r, close: a };
361
+ function pt() {
362
+ const [e, n] = S(!1), r = T(null), t = E(() => n((a) => !a), []), s = E(() => n(!1), []);
363
+ return { isOpen: e, triggerRef: r, toggleOpen: t, close: s };
364
364
  }
365
- function Vn(e, n, o) {
366
- G(() => {
367
- function r(s) {
368
- const i = s.target;
369
- e.current?.contains(i) || o?.current?.contains(i) || n();
365
+ function gt(e, n, r) {
366
+ b(() => {
367
+ function t(a) {
368
+ const i = a.target;
369
+ e.current?.contains(i) || r?.current?.contains(i) || n();
370
370
  }
371
- function a(s) {
372
- s.key === "Escape" && n();
371
+ function s(a) {
372
+ a.key === "Escape" && n();
373
373
  }
374
- return document.addEventListener("mousedown", r, !0), document.addEventListener("keydown", a), () => {
375
- document.removeEventListener("mousedown", r, !0), document.removeEventListener("keydown", a);
374
+ return document.addEventListener("mousedown", t, !0), document.addEventListener("keydown", s), () => {
375
+ document.removeEventListener("mousedown", t, !0), document.removeEventListener("keydown", s);
376
376
  };
377
- }, [n, e, o]);
377
+ }, [n, e, r]);
378
378
  }
379
- function Kn(e, n) {
380
- const [o, r] = T([]);
381
- return G(() => {
379
+ function Ct(e, n) {
380
+ const [r, t] = S([]);
381
+ return b(() => {
382
382
  if (!n) return;
383
- let a = !1;
384
- return n(e).then((s) => {
385
- a || r(s);
383
+ let s = !1;
384
+ return n(e).then((a) => {
385
+ s || t(a);
386
386
  }), () => {
387
- a = !0;
387
+ s = !0;
388
388
  };
389
- }, [e, n]), o;
389
+ }, [e, n]), r;
390
390
  }
391
- function X(e) {
391
+ function te(e) {
392
392
  return typeof e == "object" && e !== null && "group" in e;
393
393
  }
394
- function Ce(e) {
395
- return e.flatMap((n) => X(n) ? n.options : [n]);
394
+ function Fe(e) {
395
+ return e.flatMap((n) => te(n) ? n.options : [n]);
396
396
  }
397
- function N(e) {
397
+ function B(e) {
398
398
  return typeof e == "string" ? e : e.id;
399
399
  }
400
- function oe(e) {
400
+ function ue(e) {
401
401
  return typeof e == "string" ? e : e.name;
402
402
  }
403
- function Xn(e, n) {
404
- return e.map((o) => n.find((r) => N(r) === o) ?? o);
405
- }
406
- const Yn = "_DropdownContainer_1jz2j_13", Qn = "_PanelWrapper_1jz2j_20", Jn = "_Portal_1jz2j_34", Zn = "_PanelContainer_1jz2j_18", et = "_Glass_1jz2j_48", nt = "_Label_1jz2j_54", tt = "_lifted_1jz2j_68", ot = "_TriggerContainer_1jz2j_75", rt = "_Open_1jz2j_99", st = "_TriggerPlaceholder_1jz2j_104", at = "_TriggerValue_1jz2j_112", it = "_TriggerIcon_1jz2j_120", ct = "_ChipsWrapper_1jz2j_127", lt = "_Expand_1jz2j_145", dt = "_MultiSelect_1jz2j_151", ut = "_ExpandHeight_1jz2j_156", _t = "_Chip_1jz2j_127", ft = "_SearchRow_1jz2j_175", pt = "_SearchBox_1jz2j_180", ht = "_SearchIcon_1jz2j_190", mt = "_SearchInput_1jz2j_197", gt = "_ResultsList_1jz2j_211", Ct = "_OptionRow_1jz2j_216", vt = "_Selected_1jz2j_231", Nt = "_Indented_1jz2j_235", It = "_GroupHeader_1jz2j_240", wt = "_Checkmark_1jz2j_253", yt = "_CreateRow_1jz2j_259", Lt = "_WithBorder_1jz2j_272", Tt = "_CreateIcon_1jz2j_277", Dt = "_CreateLabel_1jz2j_289", St = "_EmptyHint_1jz2j_295", Rt = "_SkeletonRow_1jz2j_302", l = {
407
- DropdownContainer: Yn,
408
- PanelWrapper: Qn,
409
- Portal: Jn,
410
- PanelContainer: Zn,
411
- Glass: et,
412
- Label: nt,
413
- lifted: tt,
414
- TriggerContainer: ot,
415
- Open: rt,
416
- TriggerPlaceholder: st,
417
- TriggerValue: at,
418
- TriggerIcon: it,
419
- ChipsWrapper: ct,
420
- Expand: lt,
421
- MultiSelect: dt,
422
- ExpandHeight: ut,
423
- Chip: _t,
424
- SearchRow: ft,
425
- SearchBox: pt,
426
- SearchIcon: ht,
427
- SearchInput: mt,
428
- ResultsList: gt,
429
- OptionRow: Ct,
430
- Selected: vt,
431
- Indented: Nt,
432
- GroupHeader: It,
433
- Checkmark: wt,
434
- CreateRow: yt,
435
- WithBorder: Lt,
436
- CreateIcon: Tt,
437
- CreateLabel: Dt,
438
- EmptyHint: St,
439
- SkeletonRow: Rt
403
+ function vt(e, n) {
404
+ return e.map((r) => n.find((t) => B(t) === r) ?? r);
405
+ }
406
+ const wt = "_DropdownContainer_1jz2j_13", yt = "_PanelWrapper_1jz2j_20", Nt = "_Portal_1jz2j_34", It = "_PanelContainer_1jz2j_18", St = "_Glass_1jz2j_48", kt = "_Label_1jz2j_54", Rt = "_lifted_1jz2j_68", Tt = "_TriggerContainer_1jz2j_75", bt = "_Open_1jz2j_99", Lt = "_TriggerPlaceholder_1jz2j_104", Dt = "_TriggerValue_1jz2j_112", Et = "_TriggerIcon_1jz2j_120", Bt = "_ChipsWrapper_1jz2j_127", At = "_Expand_1jz2j_145", xt = "_MultiSelect_1jz2j_151", jt = "_ExpandHeight_1jz2j_156", Pt = "_Chip_1jz2j_127", Mt = "_SearchRow_1jz2j_175", Ot = "_SearchBox_1jz2j_180", Wt = "_SearchIcon_1jz2j_190", Ft = "_SearchInput_1jz2j_197", qt = "_ResultsList_1jz2j_211", zt = "_OptionRow_1jz2j_216", Ht = "_Selected_1jz2j_231", Ut = "_Indented_1jz2j_235", Gt = "_GroupHeader_1jz2j_240", $t = "_Checkmark_1jz2j_253", Vt = "_CreateRow_1jz2j_259", Kt = "_WithBorder_1jz2j_272", Xt = "_CreateIcon_1jz2j_277", Qt = "_CreateLabel_1jz2j_289", Yt = "_EmptyHint_1jz2j_295", Jt = "_SkeletonRow_1jz2j_302", h = {
407
+ DropdownContainer: wt,
408
+ PanelWrapper: yt,
409
+ Portal: Nt,
410
+ PanelContainer: It,
411
+ Glass: St,
412
+ Label: kt,
413
+ lifted: Rt,
414
+ TriggerContainer: Tt,
415
+ Open: bt,
416
+ TriggerPlaceholder: Lt,
417
+ TriggerValue: Dt,
418
+ TriggerIcon: Et,
419
+ ChipsWrapper: Bt,
420
+ Expand: At,
421
+ MultiSelect: xt,
422
+ ExpandHeight: jt,
423
+ Chip: Pt,
424
+ SearchRow: Mt,
425
+ SearchBox: Ot,
426
+ SearchIcon: Wt,
427
+ SearchInput: Ft,
428
+ ResultsList: qt,
429
+ OptionRow: zt,
430
+ Selected: Ht,
431
+ Indented: Ut,
432
+ GroupHeader: Gt,
433
+ Checkmark: $t,
434
+ CreateRow: Vt,
435
+ WithBorder: Kt,
436
+ CreateIcon: Xt,
437
+ CreateLabel: Qt,
438
+ EmptyHint: Yt,
439
+ SkeletonRow: Jt
440
440
  };
441
- function kt({ query: e, withBorder: n, onCreate: o }) {
442
- function r(a) {
443
- a.preventDefault(), o();
441
+ function Zt({ query: e, withBorder: n, onCreate: r }) {
442
+ function t(s) {
443
+ s.preventDefault(), r();
444
444
  }
445
- return /* @__PURE__ */ _(
445
+ return /* @__PURE__ */ m(
446
446
  "div",
447
447
  {
448
- className: f(l.CreateRow, n && l.WithBorder),
449
- onMouseDown: r,
448
+ className: g(h.CreateRow, n && h.WithBorder),
449
+ onMouseDown: t,
450
450
  children: [
451
- /* @__PURE__ */ t("span", { className: l.CreateIcon, children: /* @__PURE__ */ _("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", children: [
452
- /* @__PURE__ */ t("line", { x1: "5", y1: "1", x2: "5", y2: "9" }),
453
- /* @__PURE__ */ t("line", { x1: "1", y1: "5", x2: "9", y2: "5" })
451
+ /* @__PURE__ */ o("span", { className: h.CreateIcon, children: /* @__PURE__ */ m("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", children: [
452
+ /* @__PURE__ */ o("line", { x1: "5", y1: "1", x2: "5", y2: "9" }),
453
+ /* @__PURE__ */ o("line", { x1: "1", y1: "5", x2: "9", y2: "5" })
454
454
  ] }) }),
455
- /* @__PURE__ */ _("span", { className: l.CreateLabel, children: [
455
+ /* @__PURE__ */ m("span", { className: h.CreateLabel, children: [
456
456
  "create “",
457
457
  e,
458
458
  "”"
@@ -461,173 +461,173 @@ function kt({ query: e, withBorder: n, onCreate: o }) {
461
461
  }
462
462
  );
463
463
  }
464
- function jt({ label: e }) {
465
- return /* @__PURE__ */ t("div", { className: l.GroupHeader, children: e });
464
+ function eo({ label: e }) {
465
+ return /* @__PURE__ */ o("div", { className: h.GroupHeader, children: e });
466
466
  }
467
- function he({ opt: e, isSelected: n, multiSelect: o, onPick: r, indented: a = !1 }) {
468
- function s(i) {
469
- i.preventDefault(), r(e);
467
+ function be({ opt: e, isSelected: n, multiSelect: r, onPick: t, indented: s = !1 }) {
468
+ function a(i) {
469
+ i.preventDefault(), t(e);
470
470
  }
471
- return /* @__PURE__ */ _(
471
+ return /* @__PURE__ */ m(
472
472
  "div",
473
473
  {
474
- className: f(l.OptionRow, n && l.Selected, a && l.Indented),
475
- onMouseDown: s,
474
+ className: g(h.OptionRow, n && h.Selected, s && h.Indented),
475
+ onMouseDown: a,
476
476
  children: [
477
- o && n && /* @__PURE__ */ t("span", { className: l.Checkmark, children: "✓" }),
478
- oe(e)
477
+ r && n && /* @__PURE__ */ o("span", { className: h.Checkmark, children: "✓" }),
478
+ ue(e)
479
479
  ]
480
480
  }
481
481
  );
482
482
  }
483
- function Et({ inputRef: e, query: n, onChange: o, onKeyDown: r, placeholder: a }) {
484
- return /* @__PURE__ */ t("div", { className: l.SearchRow, children: /* @__PURE__ */ _("div", { className: l.SearchBox, children: [
485
- /* @__PURE__ */ t("span", { className: l.SearchIcon, children: /* @__PURE__ */ _("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", children: [
486
- /* @__PURE__ */ t("circle", { cx: "5", cy: "5", r: "3.5" }),
487
- /* @__PURE__ */ t("line", { x1: "8", y1: "8", x2: "11", y2: "11" })
483
+ function no({ inputRef: e, query: n, onChange: r, onKeyDown: t, placeholder: s }) {
484
+ return /* @__PURE__ */ o("div", { className: h.SearchRow, children: /* @__PURE__ */ m("div", { className: h.SearchBox, children: [
485
+ /* @__PURE__ */ o("span", { className: h.SearchIcon, children: /* @__PURE__ */ m("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", children: [
486
+ /* @__PURE__ */ o("circle", { cx: "5", cy: "5", r: "3.5" }),
487
+ /* @__PURE__ */ o("line", { x1: "8", y1: "8", x2: "11", y2: "11" })
488
488
  ] }) }),
489
- /* @__PURE__ */ t(
489
+ /* @__PURE__ */ o(
490
490
  "input",
491
491
  {
492
492
  ref: e,
493
- className: l.SearchInput,
493
+ className: h.SearchInput,
494
494
  value: n,
495
- onChange: o,
496
- onKeyDown: r,
497
- placeholder: a
495
+ onChange: r,
496
+ onKeyDown: t,
497
+ placeholder: s
498
498
  }
499
499
  )
500
500
  ] }) });
501
501
  }
502
- function At({ count: e }) {
503
- return /* @__PURE__ */ t(b, { children: Array.from({ length: e }).map((n, o) => /* @__PURE__ */ t("div", { className: l.SkeletonRow }, o)) });
502
+ function to({ count: e }) {
503
+ return /* @__PURE__ */ o(H, { children: Array.from({ length: e }).map((n, r) => /* @__PURE__ */ o("div", { className: h.SkeletonRow }, r)) });
504
504
  }
505
- function bt({
505
+ function oo({
506
506
  onSearch: e,
507
507
  onCreate: n,
508
- onPick: o,
509
- onClose: r,
510
- anchorRef: a,
511
- placeholder: s,
508
+ onPick: r,
509
+ onClose: t,
510
+ anchorRef: s,
511
+ placeholder: a,
512
512
  options: i = [],
513
- excluded: d = [],
514
- selected: p = [],
513
+ excluded: c = [],
514
+ selected: d = [],
515
515
  multiSelect: u = !1,
516
- selectedAtTop: h = !1,
517
- isLoading: m = !1,
518
- emptyHint: g = "no results found",
519
- skeletonRowCount: w = 4,
520
- onError: B = console.error,
521
- glass: x = !1,
522
- portal: q = !1,
523
- renderOption: D
516
+ selectedAtTop: l = !1,
517
+ isLoading: _ = !1,
518
+ emptyHint: p = "no results found",
519
+ skeletonRowCount: C = 4,
520
+ onError: y = console.error,
521
+ glass: k = !1,
522
+ portal: x = !1,
523
+ renderOption: R
524
524
  }) {
525
- const [W, H] = T(""), [M, C] = T(!1), [S, $] = T(null), V = Y(null), Q = Y(null), P = !!e, J = Kn(W, e);
526
- Vn(Q, r, a);
527
- const A = x || q;
528
- De(() => {
529
- if (!A) return;
530
- function c() {
531
- a?.current && $(a.current.getBoundingClientRect());
525
+ const [M, V] = S(""), [U, v] = S(!1), [A, K] = S(null), X = T(null), Z = T(null), O = !!e, I = Ct(M, e);
526
+ gt(Z, t, s);
527
+ const w = k || x;
528
+ Ne(() => {
529
+ if (!w) return;
530
+ function f() {
531
+ s?.current && K(s.current.getBoundingClientRect());
532
532
  }
533
- return c(), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
534
- window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
533
+ return f(), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
534
+ window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
535
535
  };
536
- }, [A, a]), G(() => {
537
- P && V.current?.focus();
538
- }, [P]);
539
- const K = (e ? J : i).flatMap((c) => {
540
- if (X(c)) {
541
- const R = c.options.filter((we) => !d.includes(N(we)));
542
- return R.length > 0 ? [{ ...c, options: R }] : [];
536
+ }, [w, s]), b(() => {
537
+ O && X.current?.focus();
538
+ }, [O]);
539
+ const Q = (e ? I : i).flatMap((f) => {
540
+ if (te(f)) {
541
+ const W = f.options.filter((Ye) => !c.includes(B(Ye)));
542
+ return W.length > 0 ? [{ ...f, options: W }] : [];
543
543
  }
544
- return d.includes(N(c)) ? [] : [c];
545
- }), Z = h ? [
546
- ...K.filter((c) => !X(c) && p.includes(N(c))),
547
- ...K.filter((c) => X(c) || !p.includes(N(c)))
548
- ] : K, O = Ce(Z), y = W.trim(), re = O.some(
549
- (c) => oe(c).toLowerCase() === y.toLowerCase()
550
- ), se = !!n && y.length > 0 && !re;
551
- async function de() {
552
- !y || M || !n || (C(!0), n(y).then(U).catch(B).finally(() => C(!1)));
544
+ return c.includes(B(f)) ? [] : [f];
545
+ }), se = l ? [
546
+ ...Q.filter((f) => !te(f) && d.includes(B(f))),
547
+ ...Q.filter((f) => te(f) || !d.includes(B(f)))
548
+ ] : Q, Y = Fe(se), j = M.trim(), _e = Y.some(
549
+ (f) => ue(f).toLowerCase() === j.toLowerCase()
550
+ ), fe = !!n && j.length > 0 && !_e;
551
+ async function Se() {
552
+ !j || U || !n || (v(!0), n(j).then(ee).catch(y).finally(() => v(!1)));
553
553
  }
554
- function U(c) {
555
- o(c), u || r();
554
+ function ee(f) {
555
+ r(f), u || t();
556
556
  }
557
- function ve(c) {
558
- H(c.target.value);
557
+ function Ke(f) {
558
+ V(f.target.value);
559
559
  }
560
- function Ne(c) {
561
- c.key === "Enter" && (c.preventDefault(), O.length > 0 ? U(O[0]) : se && de());
560
+ function Xe(f) {
561
+ f.key === "Enter" && (f.preventDefault(), Y.length > 0 ? ee(Y[0]) : fe && Se());
562
562
  }
563
- const Ie = s ?? (n ? "search or add new…" : "search…");
564
- if (A && !S) return null;
565
- const ue = /* @__PURE__ */ t(
563
+ const Qe = a ?? (n ? "search or add new…" : "search…");
564
+ if (w && !A) return null;
565
+ const ke = /* @__PURE__ */ o(
566
566
  "div",
567
567
  {
568
- ref: Q,
569
- className: f(l.PanelWrapper, { [l.Portal]: A }),
570
- style: A && S ? { top: S.bottom, left: S.left, width: S.width } : void 0,
571
- children: /* @__PURE__ */ _("div", { className: f(l.PanelContainer, { [l.Glass]: x }), children: [
572
- P && /* @__PURE__ */ t(
573
- Et,
568
+ ref: Z,
569
+ className: g(h.PanelWrapper, { [h.Portal]: w }),
570
+ style: w && A ? { top: A.bottom, left: A.left, width: A.width } : void 0,
571
+ children: /* @__PURE__ */ m("div", { className: g(h.PanelContainer, { [h.Glass]: k }), children: [
572
+ O && /* @__PURE__ */ o(
573
+ no,
574
574
  {
575
- inputRef: V,
576
- query: W,
577
- onChange: ve,
578
- onKeyDown: Ne,
579
- placeholder: Ie
575
+ inputRef: X,
576
+ query: M,
577
+ onChange: Ke,
578
+ onKeyDown: Xe,
579
+ placeholder: Qe
580
580
  }
581
581
  ),
582
- /* @__PURE__ */ t("div", { className: l.ResultsList, children: m ? /* @__PURE__ */ t(At, { count: w }) : /* @__PURE__ */ _(b, { children: [
583
- Z.map((c) => X(c) ? /* @__PURE__ */ _(ae, { children: [
584
- /* @__PURE__ */ t(jt, { label: c.group }),
585
- c.options.map((R) => /* @__PURE__ */ t(ae, { children: D ? D(R, {
586
- isSelected: p.includes(N(R)),
582
+ /* @__PURE__ */ o("div", { className: h.ResultsList, children: _ ? /* @__PURE__ */ o(to, { count: C }) : /* @__PURE__ */ m(H, { children: [
583
+ se.map((f) => te(f) ? /* @__PURE__ */ m(he, { children: [
584
+ /* @__PURE__ */ o(eo, { label: f.group }),
585
+ f.options.map((W) => /* @__PURE__ */ o(he, { children: R ? R(W, {
586
+ isSelected: d.includes(B(W)),
587
587
  multiSelect: u,
588
588
  indented: !0,
589
- onPick: () => U(R)
590
- }) : /* @__PURE__ */ t(
591
- he,
589
+ onPick: () => ee(W)
590
+ }) : /* @__PURE__ */ o(
591
+ be,
592
592
  {
593
- opt: R,
594
- isSelected: p.includes(N(R)),
593
+ opt: W,
594
+ isSelected: d.includes(B(W)),
595
595
  multiSelect: u,
596
- onPick: U,
596
+ onPick: ee,
597
597
  indented: !0
598
598
  }
599
- ) }, N(R)))
600
- ] }, `group:${c.group}`) : /* @__PURE__ */ t(ae, { children: D ? D(c, {
601
- isSelected: p.includes(N(c)),
599
+ ) }, B(W)))
600
+ ] }, `group:${f.group}`) : /* @__PURE__ */ o(he, { children: R ? R(f, {
601
+ isSelected: d.includes(B(f)),
602
602
  multiSelect: u,
603
603
  indented: !1,
604
- onPick: () => U(c)
605
- }) : /* @__PURE__ */ t(
606
- he,
604
+ onPick: () => ee(f)
605
+ }) : /* @__PURE__ */ o(
606
+ be,
607
607
  {
608
- opt: c,
609
- isSelected: p.includes(N(c)),
608
+ opt: f,
609
+ isSelected: d.includes(B(f)),
610
610
  multiSelect: u,
611
- onPick: U
611
+ onPick: ee
612
612
  }
613
- ) }, N(c))),
614
- se && /* @__PURE__ */ t(
615
- kt,
613
+ ) }, B(f))),
614
+ fe && /* @__PURE__ */ o(
615
+ Zt,
616
616
  {
617
- query: y,
618
- withBorder: O.length > 0,
619
- onCreate: de
617
+ query: j,
618
+ withBorder: Y.length > 0,
619
+ onCreate: Se
620
620
  }
621
621
  ),
622
- O.length === 0 && !se && /* @__PURE__ */ t("div", { className: l.EmptyHint, children: g })
622
+ Y.length === 0 && !fe && /* @__PURE__ */ o("div", { className: h.EmptyHint, children: p })
623
623
  ] }) })
624
624
  ] })
625
625
  }
626
626
  );
627
- return A ? je(ue, document.body) : ue;
627
+ return w ? Ie(ke, document.body) : ke;
628
628
  }
629
- function Bt({ size: e = 14, strokeWidth: n = 2, className: o }) {
630
- return /* @__PURE__ */ t(
629
+ function ro({ size: e = 14, strokeWidth: n = 2, className: r }) {
630
+ return /* @__PURE__ */ o(
631
631
  "svg",
632
632
  {
633
633
  viewBox: "0 0 24 24",
@@ -638,13 +638,13 @@ function Bt({ size: e = 14, strokeWidth: n = 2, className: o }) {
638
638
  strokeWidth: n,
639
639
  strokeLinecap: "round",
640
640
  strokeLinejoin: "round",
641
- className: o,
642
- children: /* @__PURE__ */ t("polyline", { points: "6 9 12 15 18 9" })
641
+ className: r,
642
+ children: /* @__PURE__ */ o("polyline", { points: "6 9 12 15 18 9" })
643
643
  }
644
644
  );
645
645
  }
646
- function No({ size: e = 18, strokeWidth: n = 2.5, shrink: o = !0 }) {
647
- return /* @__PURE__ */ t(
646
+ function qr({ size: e = 18, strokeWidth: n = 2.5, shrink: r = !0 }) {
647
+ return /* @__PURE__ */ o(
648
648
  "svg",
649
649
  {
650
650
  viewBox: "0 0 24 24",
@@ -655,13 +655,13 @@ function No({ size: e = 18, strokeWidth: n = 2.5, shrink: o = !0 }) {
655
655
  strokeWidth: n,
656
656
  strokeLinecap: "round",
657
657
  strokeLinejoin: "round",
658
- style: o ? { flexShrink: 0 } : void 0,
659
- children: /* @__PURE__ */ t("polyline", { points: "20 6 9 17 4 12" })
658
+ style: r ? { flexShrink: 0 } : void 0,
659
+ children: /* @__PURE__ */ o("polyline", { points: "20 6 9 17 4 12" })
660
660
  }
661
661
  );
662
662
  }
663
- function Io() {
664
- return /* @__PURE__ */ _(
663
+ function zr() {
664
+ return /* @__PURE__ */ m(
665
665
  "svg",
666
666
  {
667
667
  viewBox: "0 0 24 24",
@@ -673,14 +673,14 @@ function Io() {
673
673
  strokeLinecap: "round",
674
674
  strokeLinejoin: "round",
675
675
  children: [
676
- /* @__PURE__ */ t("path", { d: "M12 20h9" }),
677
- /* @__PURE__ */ t("path", { d: "M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4z" })
676
+ /* @__PURE__ */ o("path", { d: "M12 20h9" }),
677
+ /* @__PURE__ */ o("path", { d: "M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4z" })
678
678
  ]
679
679
  }
680
680
  );
681
681
  }
682
- function wo() {
683
- return /* @__PURE__ */ _(
682
+ function Hr() {
683
+ return /* @__PURE__ */ m(
684
684
  "svg",
685
685
  {
686
686
  viewBox: "0 0 24 24",
@@ -692,14 +692,14 @@ function wo() {
692
692
  strokeLinecap: "round",
693
693
  strokeLinejoin: "round",
694
694
  children: [
695
- /* @__PURE__ */ t("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
696
- /* @__PURE__ */ t("circle", { cx: "12", cy: "7", r: "4" })
695
+ /* @__PURE__ */ o("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
696
+ /* @__PURE__ */ o("circle", { cx: "12", cy: "7", r: "4" })
697
697
  ]
698
698
  }
699
699
  );
700
700
  }
701
- function yo({ size: e = 14, strokeWidth: n = 2, className: o }) {
702
- return /* @__PURE__ */ _(
701
+ function so({ size: e = 14, strokeWidth: n = 2, className: r }) {
702
+ return /* @__PURE__ */ m(
703
703
  "svg",
704
704
  {
705
705
  viewBox: "0 0 24 24",
@@ -710,226 +710,226 @@ function yo({ size: e = 14, strokeWidth: n = 2, className: o }) {
710
710
  strokeWidth: n,
711
711
  strokeLinecap: "round",
712
712
  strokeLinejoin: "round",
713
- className: o,
713
+ className: r,
714
714
  children: [
715
- /* @__PURE__ */ t("circle", { cx: "11", cy: "11", r: "7" }),
716
- /* @__PURE__ */ t("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
715
+ /* @__PURE__ */ o("circle", { cx: "11", cy: "11", r: "7" }),
716
+ /* @__PURE__ */ o("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
717
717
  ]
718
718
  }
719
719
  );
720
720
  }
721
- function xt({ triggerRef: e, isOpen: n, onClick: o, selectedOptions: r, multiSelect: a, placeholder: s, onOverflow: i = "scroll" }) {
722
- const d = i === "expand";
723
- return /* @__PURE__ */ _(
721
+ function ao({ triggerRef: e, isOpen: n, onClick: r, selectedOptions: t, multiSelect: s, placeholder: a, onOverflow: i = "scroll" }) {
722
+ const c = i === "expand";
723
+ return /* @__PURE__ */ m(
724
724
  "button",
725
725
  {
726
726
  type: "button",
727
727
  ref: e,
728
- className: f(
729
- l.TriggerContainer,
730
- n && l.Open,
731
- a && l.MultiSelect,
732
- d && l.ExpandHeight
728
+ className: g(
729
+ h.TriggerContainer,
730
+ n && h.Open,
731
+ s && h.MultiSelect,
732
+ c && h.ExpandHeight
733
733
  ),
734
- onClick: o,
734
+ onClick: r,
735
735
  "aria-expanded": n,
736
736
  "aria-haspopup": "listbox",
737
737
  children: [
738
- a && r.length > 0 ? /* @__PURE__ */ t("div", { className: f(l.ChipsWrapper, d && l.Expand), children: r.map((p, u) => /* @__PURE__ */ t("span", { className: l.Chip, children: oe(p) }, u)) }) : /* @__PURE__ */ t("span", { className: r.length === 0 ? l.TriggerPlaceholder : l.TriggerValue, children: r.length === 0 ? s : r.map(oe).join(", ") }),
739
- /* @__PURE__ */ t("span", { className: l.TriggerIcon, children: /* @__PURE__ */ t(Bt, { size: 12 }) })
738
+ s && t.length > 0 ? /* @__PURE__ */ o("div", { className: g(h.ChipsWrapper, c && h.Expand), children: t.map((d, u) => /* @__PURE__ */ o("span", { className: h.Chip, children: ue(d) }, u)) }) : /* @__PURE__ */ o("span", { className: t.length === 0 ? h.TriggerPlaceholder : h.TriggerValue, children: t.length === 0 ? a : t.map(ue).join(", ") }),
739
+ /* @__PURE__ */ o("span", { className: h.TriggerIcon, children: /* @__PURE__ */ o(ro, { size: 12 }) })
740
740
  ]
741
741
  }
742
742
  );
743
743
  }
744
- function Lo({
744
+ function Ur({
745
745
  options: e = [],
746
746
  value: n,
747
- onChange: o,
748
- onSearch: r,
749
- onCreate: a,
750
- excluded: s,
747
+ onChange: r,
748
+ onSearch: t,
749
+ onCreate: s,
750
+ excluded: a,
751
751
  multiSelect: i = !1,
752
- selectedAtTop: d = !1,
753
- onOverflow: p = "scroll",
752
+ selectedAtTop: c = !1,
753
+ onOverflow: d = "scroll",
754
754
  label: u,
755
- placeholder: h = "select…",
756
- searchPlaceholder: m,
757
- emptyHint: g,
758
- isLoading: w,
759
- skeletonRowCount: B,
760
- onError: x,
761
- className: q,
762
- glass: D = !1,
763
- portal: W = !1,
764
- renderOption: H,
765
- children: M
755
+ placeholder: l = "select…",
756
+ searchPlaceholder: _,
757
+ emptyHint: p,
758
+ isLoading: C,
759
+ skeletonRowCount: y,
760
+ onError: k,
761
+ className: x,
762
+ glass: R = !1,
763
+ portal: M = !1,
764
+ renderOption: V,
765
+ children: U
766
766
  }) {
767
- const { isOpen: C, triggerRef: S, toggleOpen: $, close: V } = $n(), Q = I("Dropdown", q), P = Xn(n, Ce(e)), J = C || P.length > 0, A = u && !J ? "" : h;
768
- function K(O) {
769
- const y = N(O);
770
- o(
771
- i ? n.includes(y) ? n.filter((re) => re !== y) : [...n, y] : [y]
767
+ const { isOpen: v, triggerRef: A, toggleOpen: K, close: X } = pt(), Z = L("Dropdown", x), O = vt(n, Fe(e)), I = v || O.length > 0, w = u && !I ? "" : l;
768
+ function Q(Y) {
769
+ const j = B(Y);
770
+ r(
771
+ i ? n.includes(j) ? n.filter((_e) => _e !== j) : [...n, j] : [j]
772
772
  );
773
773
  }
774
- const Z = {
775
- ref: S,
776
- onClick: $,
777
- "aria-expanded": C,
774
+ const se = {
775
+ ref: A,
776
+ onClick: K,
777
+ "aria-expanded": v,
778
778
  "aria-haspopup": "listbox"
779
779
  };
780
- return /* @__PURE__ */ _("div", { className: f(l.DropdownContainer, Q), children: [
781
- u && /* @__PURE__ */ t("label", { className: f(l.Label, { [l.lifted]: J }), children: u }),
782
- M ? M({ selectedOptions: P, isOpen: C, toggleOpen: $, close: V, triggerProps: Z }) : /* @__PURE__ */ t(
783
- xt,
780
+ return /* @__PURE__ */ m("div", { className: g(h.DropdownContainer, Z), children: [
781
+ u && /* @__PURE__ */ o("label", { className: g(h.Label, { [h.lifted]: I }), children: u }),
782
+ U ? U({ selectedOptions: O, isOpen: v, toggleOpen: K, close: X, triggerProps: se }) : /* @__PURE__ */ o(
783
+ ao,
784
784
  {
785
- triggerRef: S,
786
- isOpen: C,
787
- onClick: $,
788
- selectedOptions: P,
785
+ triggerRef: A,
786
+ isOpen: v,
787
+ onClick: K,
788
+ selectedOptions: O,
789
789
  multiSelect: i,
790
- onOverflow: p,
791
- placeholder: A
790
+ onOverflow: d,
791
+ placeholder: w
792
792
  }
793
793
  ),
794
- C && /* @__PURE__ */ t(
795
- bt,
794
+ v && /* @__PURE__ */ o(
795
+ oo,
796
796
  {
797
797
  options: e,
798
- onSearch: r,
799
- onCreate: a,
800
- onPick: K,
801
- onClose: V,
802
- anchorRef: S,
803
- excluded: s,
798
+ onSearch: t,
799
+ onCreate: s,
800
+ onPick: Q,
801
+ onClose: X,
802
+ anchorRef: A,
803
+ excluded: a,
804
804
  multiSelect: i,
805
- selectedAtTop: d,
805
+ selectedAtTop: c,
806
806
  selected: n,
807
- placeholder: m,
808
- emptyHint: g,
809
- isLoading: w,
810
- skeletonRowCount: B,
811
- onError: x,
812
- glass: D,
813
- portal: W,
814
- renderOption: H
807
+ placeholder: _,
808
+ emptyHint: p,
809
+ isLoading: C,
810
+ skeletonRowCount: y,
811
+ onError: k,
812
+ glass: R,
813
+ portal: M,
814
+ renderOption: V
815
815
  }
816
816
  )
817
817
  ] });
818
818
  }
819
- const Wt = "_Btn_1tozl_10", Pt = "_Primary_1tozl_35", Ot = "_Secondary_1tozl_50", zt = "_Ghost_1tozl_62", Mt = "_IconDanger_1tozl_74", Ut = "_Danger_1tozl_95", F = {
820
- Btn: Wt,
821
- Primary: Pt,
822
- Secondary: Ot,
823
- Ghost: zt,
824
- IconDanger: Mt,
825
- Danger: Ut
826
- }, Ft = {
827
- primary: F.Primary,
828
- secondary: F.Secondary,
829
- danger: F.Danger,
830
- ghost: F.Ghost,
831
- iconDanger: F.IconDanger
819
+ const io = "_Btn_1tozl_10", co = "_Primary_1tozl_35", lo = "_Secondary_1tozl_50", uo = "_Ghost_1tozl_62", _o = "_IconDanger_1tozl_74", fo = "_Danger_1tozl_95", ne = {
820
+ Btn: io,
821
+ Primary: co,
822
+ Secondary: lo,
823
+ Ghost: uo,
824
+ IconDanger: _o,
825
+ Danger: fo
826
+ }, ho = {
827
+ primary: ne.Primary,
828
+ secondary: ne.Secondary,
829
+ danger: ne.Danger,
830
+ ghost: ne.Ghost,
831
+ iconDanger: ne.IconDanger
832
832
  };
833
- function To({ variant: e = "default", className: n, children: o, ...r }) {
834
- const a = I("Button", n), s = e === "unstyled";
835
- return /* @__PURE__ */ t(
833
+ function qe({ variant: e = "default", className: n, children: r, ...t }) {
834
+ const s = L("Button", n), a = e === "unstyled";
835
+ return /* @__PURE__ */ o(
836
836
  "button",
837
837
  {
838
838
  type: "button",
839
- ...r,
840
- className: f(!s && F.Btn, !s && Ft[e], a),
841
- children: o
839
+ ...t,
840
+ className: g(!a && ne.Btn, !a && ho[e], s),
841
+ children: r
842
842
  }
843
843
  );
844
844
  }
845
- const Gt = "_ConfirmWrapper_1tq4o_4", qt = "_ConfirmContainer_1tq4o_1", Ht = "_Glass_1tq4o_24", $t = "_ConfirmTitle_1tq4o_30", Vt = "_ConfirmMessage_1tq4o_38", Kt = "_ConfirmActions_1tq4o_45", Xt = "_BtnCancel_1tq4o_53", Yt = "_BtnConfirm_1tq4o_73", Qt = "_BtnDanger_1tq4o_92", k = {
846
- ConfirmWrapper: Gt,
847
- ConfirmContainer: qt,
848
- Glass: Ht,
849
- ConfirmTitle: $t,
850
- ConfirmMessage: Vt,
851
- ConfirmActions: Kt,
852
- BtnCancel: Xt,
853
- BtnConfirm: Yt,
854
- BtnDanger: Qt
845
+ const mo = "_ConfirmWrapper_1tq4o_4", po = "_ConfirmContainer_1tq4o_1", go = "_Glass_1tq4o_24", Co = "_ConfirmTitle_1tq4o_30", vo = "_ConfirmMessage_1tq4o_38", wo = "_ConfirmActions_1tq4o_45", yo = "_BtnCancel_1tq4o_53", No = "_BtnConfirm_1tq4o_73", Io = "_BtnDanger_1tq4o_92", F = {
846
+ ConfirmWrapper: mo,
847
+ ConfirmContainer: po,
848
+ Glass: go,
849
+ ConfirmTitle: Co,
850
+ ConfirmMessage: vo,
851
+ ConfirmActions: wo,
852
+ BtnCancel: yo,
853
+ BtnConfirm: No,
854
+ BtnDanger: Io
855
855
  };
856
- function Do({
856
+ function Gr({
857
857
  title: e,
858
858
  message: n,
859
- confirmLabel: o = "Confirm",
860
- cancelLabel: r = "Cancel",
861
- danger: a = !1,
862
- onConfirm: s,
859
+ confirmLabel: r = "Confirm",
860
+ cancelLabel: t = "Cancel",
861
+ danger: s = !1,
862
+ onConfirm: a,
863
863
  onClose: i,
864
- className: d,
865
- glass: p = !1
864
+ className: c,
865
+ glass: d = !1
866
866
  }) {
867
- const [u, h] = T(!1), m = I("ConfirmDialog", d);
868
- function g() {
869
- h(!0), Promise.resolve(s()).finally(() => {
870
- h(!1), i();
867
+ const [u, l] = S(!1), _ = L("ConfirmDialog", c);
868
+ function p() {
869
+ l(!0), Promise.resolve(a()).finally(() => {
870
+ l(!1), i();
871
871
  });
872
872
  }
873
- return /* @__PURE__ */ t("div", { className: k.ConfirmWrapper, children: /* @__PURE__ */ _("div", { className: f(k.ConfirmContainer, { [k.Glass]: p }, m), role: "dialog", "aria-modal": "true", children: [
874
- /* @__PURE__ */ t("h2", { className: k.ConfirmTitle, children: e }),
875
- /* @__PURE__ */ t("p", { className: k.ConfirmMessage, children: n }),
876
- /* @__PURE__ */ _("div", { className: k.ConfirmActions, children: [
877
- /* @__PURE__ */ t("button", { className: k.BtnCancel, type: "button", onClick: i, disabled: u, children: r }),
878
- /* @__PURE__ */ t(
873
+ return /* @__PURE__ */ o("div", { className: F.ConfirmWrapper, children: /* @__PURE__ */ m("div", { className: g(F.ConfirmContainer, { [F.Glass]: d }, _), role: "dialog", "aria-modal": "true", children: [
874
+ /* @__PURE__ */ o("h2", { className: F.ConfirmTitle, children: e }),
875
+ /* @__PURE__ */ o("p", { className: F.ConfirmMessage, children: n }),
876
+ /* @__PURE__ */ m("div", { className: F.ConfirmActions, children: [
877
+ /* @__PURE__ */ o("button", { className: F.BtnCancel, type: "button", onClick: i, disabled: u, children: t }),
878
+ /* @__PURE__ */ o(
879
879
  "button",
880
880
  {
881
- className: f(a ? k.BtnDanger : k.BtnConfirm),
881
+ className: g(s ? F.BtnDanger : F.BtnConfirm),
882
882
  type: "button",
883
- onClick: g,
883
+ onClick: p,
884
884
  disabled: u,
885
- children: u ? "…" : o
885
+ children: u ? "…" : r
886
886
  }
887
887
  )
888
888
  ] })
889
889
  ] }) });
890
890
  }
891
- const Jt = "_InfoWrapper_cqv58_4", Zt = "_InfoContainer_cqv58_1", eo = "_Glass_cqv58_24", no = "_InfoTitle_cqv58_30", to = "_InfoMessage_cqv58_38", oo = "_InfoActions_cqv58_45", ro = "_BtnClose_cqv58_52", z = {
892
- InfoWrapper: Jt,
893
- InfoContainer: Zt,
894
- Glass: eo,
895
- InfoTitle: no,
896
- InfoMessage: to,
897
- InfoActions: oo,
898
- BtnClose: ro
891
+ const So = "_InfoWrapper_cqv58_4", ko = "_InfoContainer_cqv58_1", Ro = "_Glass_cqv58_24", To = "_InfoTitle_cqv58_30", bo = "_InfoMessage_cqv58_38", Lo = "_InfoActions_cqv58_45", Do = "_BtnClose_cqv58_52", J = {
892
+ InfoWrapper: So,
893
+ InfoContainer: ko,
894
+ Glass: Ro,
895
+ InfoTitle: To,
896
+ InfoMessage: bo,
897
+ InfoActions: Lo,
898
+ BtnClose: Do
899
899
  };
900
- function So({ title: e, message: n, onClose: o, className: r, glass: a = !1 }) {
901
- const s = I("InfoDialog", r);
902
- return /* @__PURE__ */ t("div", { className: z.InfoWrapper, children: /* @__PURE__ */ _("div", { className: f(z.InfoContainer, { [z.Glass]: a }, s), role: "dialog", "aria-modal": "true", children: [
903
- /* @__PURE__ */ t("h2", { className: z.InfoTitle, children: e }),
904
- /* @__PURE__ */ t("p", { className: z.InfoMessage, children: n }),
905
- /* @__PURE__ */ t("div", { className: z.InfoActions, children: /* @__PURE__ */ t("button", { className: z.BtnClose, type: "button", onClick: o, children: "Got it" }) })
900
+ function $r({ title: e, message: n, onClose: r, className: t, glass: s = !1 }) {
901
+ const a = L("InfoDialog", t);
902
+ return /* @__PURE__ */ o("div", { className: J.InfoWrapper, children: /* @__PURE__ */ m("div", { className: g(J.InfoContainer, { [J.Glass]: s }, a), role: "dialog", "aria-modal": "true", children: [
903
+ /* @__PURE__ */ o("h2", { className: J.InfoTitle, children: e }),
904
+ /* @__PURE__ */ o("p", { className: J.InfoMessage, children: n }),
905
+ /* @__PURE__ */ o("div", { className: J.InfoActions, children: /* @__PURE__ */ o("button", { className: J.BtnClose, type: "button", onClick: r, children: "Got it" }) })
906
906
  ] }) });
907
907
  }
908
- function Ro({ buttons: e, containerClassName: n }) {
909
- const o = I("ModalActions", n);
910
- return /* @__PURE__ */ t("div", { className: o, children: e.map((r, a) => /* @__PURE__ */ t(
908
+ function Vr({ buttons: e, containerClassName: n }) {
909
+ const r = L("ModalActions", n);
910
+ return /* @__PURE__ */ o("div", { className: r, children: e.map((t, s) => /* @__PURE__ */ o(
911
911
  "button",
912
912
  {
913
- className: r.className,
913
+ className: t.className,
914
914
  type: "button",
915
- onClick: r.onClick,
916
- disabled: r.disabled,
917
- children: r.label
915
+ onClick: t.onClick,
916
+ disabled: t.disabled,
917
+ children: t.label
918
918
  },
919
- a
919
+ s
920
920
  )) });
921
921
  }
922
- function ko({ onClick: e, disabled: n, className: o }) {
923
- const r = I("ModalClose", o);
924
- return /* @__PURE__ */ t(
922
+ function Kr({ onClick: e, disabled: n, className: r }) {
923
+ const t = L("ModalClose", r);
924
+ return /* @__PURE__ */ o(
925
925
  "button",
926
926
  {
927
- className: r,
927
+ className: t,
928
928
  type: "button",
929
929
  onClick: e,
930
930
  disabled: n,
931
931
  "aria-label": "Close",
932
- children: /* @__PURE__ */ _(
932
+ children: /* @__PURE__ */ m(
933
933
  "svg",
934
934
  {
935
935
  viewBox: "0 0 24 24",
@@ -940,117 +940,550 @@ function ko({ onClick: e, disabled: n, className: o }) {
940
940
  strokeWidth: "1.8",
941
941
  strokeLinecap: "round",
942
942
  children: [
943
- /* @__PURE__ */ t("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
944
- /* @__PURE__ */ t("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
943
+ /* @__PURE__ */ o("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
944
+ /* @__PURE__ */ o("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
945
945
  ]
946
946
  }
947
947
  )
948
948
  }
949
949
  );
950
950
  }
951
- function jo({ classNames: e, children: n }) {
952
- return /* @__PURE__ */ t(me.Provider, { value: e, children: n });
951
+ const Eo = "_Backdrop_1w1e3_7", Bo = "_BackdropOpen_1w1e3_16", Ao = "_Panel_1w1e3_21", xo = "_Right_1w1e3_31", jo = "_Left_1w1e3_40", Po = "_Top_1w1e3_49", Mo = "_Bottom_1w1e3_58", Oo = "_PanelOpen_1w1e3_67", $ = {
952
+ Backdrop: Eo,
953
+ BackdropOpen: Bo,
954
+ Panel: Ao,
955
+ Right: xo,
956
+ Left: jo,
957
+ Top: Po,
958
+ Bottom: Mo,
959
+ PanelOpen: Oo
960
+ }, re = [];
961
+ let Wo = 1, de = !1, Ce = 0;
962
+ function ze() {
963
+ if (Ce > 0) {
964
+ Ce -= 1;
965
+ return;
966
+ }
967
+ const e = re.pop();
968
+ He(), e && e.onBack();
969
+ }
970
+ function Fo() {
971
+ de || (de = !0, window.addEventListener("popstate", ze));
972
+ }
973
+ function He() {
974
+ re.length > 0 || !de || (de = !1, window.removeEventListener("popstate", ze));
975
+ }
976
+ function qo(e) {
977
+ const n = Wo++;
978
+ return re.push({ handle: n, onBack: e }), Fo(), window.history.pushState({ churesOverlayBackHandle: n }, ""), n;
979
+ }
980
+ function Le(e) {
981
+ const n = re.findIndex((t) => t.handle === e);
982
+ n === -1 || (re.splice(n, 1), He(), window.history.state?.churesOverlayBackHandle !== e) || (Ce += 1, window.history.back());
983
+ }
984
+ function zo(e, n) {
985
+ const r = T([]), t = T(n);
986
+ t.current = n, b(() => {
987
+ const s = r.current;
988
+ for (; s.length < e; )
989
+ s.push(qo(() => t.current()));
990
+ for (; s.length > e; ) {
991
+ const a = s.pop();
992
+ a !== void 0 && Le(a);
993
+ }
994
+ }, [e]), b(() => () => {
995
+ const s = r.current;
996
+ for (; s.length > 0; ) {
997
+ const a = s.pop();
998
+ a !== void 0 && Le(a);
999
+ }
1000
+ }, []);
1001
+ }
1002
+ const Ho = {
1003
+ top: $.Top,
1004
+ right: $.Right,
1005
+ bottom: $.Bottom,
1006
+ left: $.Left
1007
+ };
1008
+ let G = null, pe = 0;
1009
+ function De() {
1010
+ return G || (G = document.createElement("div"), G.setAttribute("data-chures-side-drawer-root", ""), document.body.appendChild(G)), G;
1011
+ }
1012
+ function Xr({ open: e, onClose: n, children: r, side: t = "right", backdropBlur: s = 0, className: a }) {
1013
+ const [i, c] = S(!1), d = L("SideDrawer", a);
1014
+ zo(e ? 1 : 0, n), Ne(() => {
1015
+ if (!e) {
1016
+ c(!1);
1017
+ return;
1018
+ }
1019
+ document.body.appendChild(De());
1020
+ const l = requestAnimationFrame(() => c(!0));
1021
+ return () => cancelAnimationFrame(l);
1022
+ }, [e]), b(() => (pe += 1, () => {
1023
+ pe -= 1, pe === 0 && G && (G.remove(), G = null);
1024
+ }), []);
1025
+ const u = s > 0 ? { backdropFilter: `blur(${s}rem)`, WebkitBackdropFilter: `blur(${s}rem)` } : void 0;
1026
+ return Ie(
1027
+ /* @__PURE__ */ m(H, { children: [
1028
+ /* @__PURE__ */ o(
1029
+ "div",
1030
+ {
1031
+ className: g($.Backdrop, i && $.BackdropOpen),
1032
+ style: u,
1033
+ onClick: n
1034
+ }
1035
+ ),
1036
+ /* @__PURE__ */ o("div", { className: g($.Panel, Ho[t], i && $.PanelOpen, d), children: r })
1037
+ ] }),
1038
+ De()
1039
+ );
1040
+ }
1041
+ const ve = je(!0);
1042
+ function Uo() {
1043
+ return Pe(ve);
1044
+ }
1045
+ const Go = "_FlyoutMenuContainer_1q0ma_5", $o = "_Backdrop_1q0ma_9", Vo = "_Panel_1q0ma_14", Ko = "_Submenu_1q0ma_27", Xo = "_FlyoutPanelContainer_1q0ma_41", Qo = "_Back_1q0ma_9", Yo = "_Chevron_1q0ma_68", Jo = "_MenuListContainer_1q0ma_75", Zo = "_Heading_1q0ma_81", er = "_Divider_1q0ma_90", nr = "_MenuRowContainer_1q0ma_98", tr = "_Dim_1q0ma_102", or = "_Row_1q0ma_106", rr = "_Icon_1q0ma_135", sr = "_Label_1q0ma_140", ar = "_Arrow_1q0ma_148", ir = "_MenuSkeletonContainer_1q0ma_156", cr = "_MenuSkeletonRow_1q0ma_163", lr = "_MenuSearchFieldContainer_1q0ma_191", N = {
1046
+ FlyoutMenuContainer: Go,
1047
+ Backdrop: $o,
1048
+ Panel: Vo,
1049
+ Submenu: Ko,
1050
+ FlyoutPanelContainer: Xo,
1051
+ Back: Qo,
1052
+ Chevron: Yo,
1053
+ MenuListContainer: Jo,
1054
+ Heading: Zo,
1055
+ Divider: er,
1056
+ MenuRowContainer: nr,
1057
+ Dim: tr,
1058
+ Row: or,
1059
+ Icon: rr,
1060
+ Label: sr,
1061
+ Arrow: ar,
1062
+ MenuSkeletonContainer: ir,
1063
+ MenuSkeletonRow: cr,
1064
+ MenuSearchFieldContainer: lr
1065
+ }, ur = { duration: 0.15, ease: [0.2, 0.7, 0.2, 1] };
1066
+ function Ee({ item: e, menu: n, dim: r }) {
1067
+ const t = Uo(), s = e.submenu;
1068
+ function a(i) {
1069
+ if (s) {
1070
+ n.toggleSubmenuFrom(i.currentTarget, s);
1071
+ return;
1072
+ }
1073
+ e.disabled || n.selectItem(e);
1074
+ }
1075
+ return /* @__PURE__ */ o(oe.div, { layout: t, transition: ur, className: g(N.MenuRowContainer, r && N.Dim), children: /* @__PURE__ */ m(
1076
+ qe,
1077
+ {
1078
+ variant: "unstyled",
1079
+ className: N.Row,
1080
+ disabled: e.disabled,
1081
+ "aria-haspopup": s ? "menu" : void 0,
1082
+ onClick: a,
1083
+ onMouseEnter: s ? (i) => n.openSubmenuFrom(i.currentTarget, s) : void 0,
1084
+ onMouseLeave: s ? n.closeSubmenuSoon : void 0,
1085
+ children: [
1086
+ e.icon && /* @__PURE__ */ o("span", { className: N.Icon, children: e.icon }),
1087
+ /* @__PURE__ */ o("span", { className: N.Label, children: e.label }),
1088
+ s && /* @__PURE__ */ o("span", { className: N.Arrow, children: "▸" })
1089
+ ]
1090
+ }
1091
+ ) });
1092
+ }
1093
+ function Be({ items: e, menu: n, heading: r, rest: t }) {
1094
+ const s = !!t && t.length > 0;
1095
+ return /* @__PURE__ */ m("div", { className: N.MenuListContainer, children: [
1096
+ r && /* @__PURE__ */ o("span", { className: N.Heading, children: r }),
1097
+ e.map((a) => /* @__PURE__ */ o(Ee, { item: a, menu: n }, a.key)),
1098
+ s && /* @__PURE__ */ o("div", { className: N.Divider }),
1099
+ t?.map((a) => /* @__PURE__ */ o(Ee, { item: a, menu: n, dim: !0 }, a.key))
1100
+ ] });
1101
+ }
1102
+ function dr({ count: e = 3 }) {
1103
+ const n = Me(() => Array.from({ length: Math.max(0, e) }, (r, t) => t), [e]);
1104
+ return /* @__PURE__ */ o("div", { className: N.MenuSkeletonContainer, children: n.map((r) => /* @__PURE__ */ o("div", { className: N.MenuSkeletonRow, role: "presentation" }, r)) });
1105
+ }
1106
+ const _r = { duration: 0.15, ease: [0.2, 0.7, 0.2, 1] };
1107
+ function fr({ value: e, onChange: n, placeholder: r }) {
1108
+ function t(s) {
1109
+ s.key === "Escape" && n("");
1110
+ }
1111
+ return /* @__PURE__ */ o(
1112
+ oe.div,
1113
+ {
1114
+ className: N.MenuSearchFieldContainer,
1115
+ initial: { opacity: 0, height: 0 },
1116
+ animate: { opacity: 1, height: "auto" },
1117
+ exit: { opacity: 0, height: 0 },
1118
+ transition: _r,
1119
+ children: /* @__PURE__ */ o(
1120
+ it,
1121
+ {
1122
+ value: e,
1123
+ setValue: n,
1124
+ placeholder: r ?? "Search",
1125
+ autoFocus: !0,
1126
+ onKeyDown: t,
1127
+ startIcon: /* @__PURE__ */ o(so, { size: 14 })
1128
+ }
1129
+ )
1130
+ }
1131
+ );
1132
+ }
1133
+ function hr(e, n, r) {
1134
+ const t = n.trim().toLowerCase();
1135
+ if (!t) return { matches: e, rest: [] };
1136
+ const s = [], a = [];
1137
+ for (const i of e)
1138
+ r(i).toLowerCase().includes(t) ? s.push(i) : a.push(i);
1139
+ return { matches: s, rest: a };
1140
+ }
1141
+ function mr(e) {
1142
+ return e instanceof HTMLElement ? e.tagName === "INPUT" || e.tagName === "TEXTAREA" || e.isContentEditable : !1;
1143
+ }
1144
+ function pr(e) {
1145
+ const [n, r] = S("");
1146
+ return b(() => {
1147
+ if (!e) return;
1148
+ function t(s) {
1149
+ if (!mr(document.activeElement)) {
1150
+ if (s.key === "Backspace") {
1151
+ r((a) => a.slice(0, -1));
1152
+ return;
1153
+ }
1154
+ s.key.length === 1 && !s.ctrlKey && !s.metaKey && !s.altKey && (r((a) => a + s.key), s.preventDefault());
1155
+ }
1156
+ }
1157
+ return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
1158
+ }, [e]), { query: n, setQuery: r };
1159
+ }
1160
+ function gr(e) {
1161
+ return e.searchText !== void 0 ? e.searchText : typeof e.label == "string" ? e.label : "";
1162
+ }
1163
+ function Ae({ section: e, menu: n, onBack: r, skeletonCount: t, active: s }) {
1164
+ const a = !!e.searchable && !!e.items, { query: i, setQuery: c } = pr(!!s && a);
1165
+ b(() => c(""), [e, c]);
1166
+ const { matches: d, rest: u } = Me(
1167
+ () => hr(e.items ?? [], i, gr),
1168
+ [e.items, i]
1169
+ ), l = r ? void 0 : e.title;
1170
+ let _;
1171
+ return e.loading ? _ = /* @__PURE__ */ o(dr, { count: t }) : e.renderPanel ? _ = e.renderPanel() : a ? _ = /* @__PURE__ */ o(Be, { items: d, rest: u, menu: n, heading: l }) : _ = /* @__PURE__ */ o(Be, { items: e.items ?? [], menu: n, heading: l }), /* @__PURE__ */ m("div", { className: N.FlyoutPanelContainer, children: [
1172
+ r && /* @__PURE__ */ m(qe, { variant: "unstyled", className: N.Back, onClick: r, children: [
1173
+ /* @__PURE__ */ o("span", { className: N.Chevron, children: "‹" }),
1174
+ e.title ?? "Back"
1175
+ ] }),
1176
+ a && /* @__PURE__ */ o(le, { children: i !== "" && /* @__PURE__ */ o(fr, { value: i, onChange: c }) }),
1177
+ _
1178
+ ] });
1179
+ }
1180
+ function Cr(e, n, r, t, s) {
1181
+ const a = r.width - 2 * t, i = Math.max(t, r.width - t - n.width), c = Math.min(Math.max(e.right - n.width, t), i), d = e.top - s - t, u = r.height - t - e.bottom - s;
1182
+ if (n.height > d && u > d)
1183
+ return { top: e.bottom + s, left: c, maxHeight: u, maxWidth: a };
1184
+ const l = e.top - s - n.height;
1185
+ return { top: l < t ? t : l, left: c, maxHeight: d, maxWidth: a };
1186
+ }
1187
+ function vr(e, n, r, t, s) {
1188
+ if (s) return { side: "collapse" };
1189
+ const a = e.right + n.width <= r.width - t, i = e.left - n.width, c = a ? "right" : i >= t ? "left" : null;
1190
+ if (!c) return { side: "collapse" };
1191
+ const d = c === "right" ? e.right : i, u = r.height - t - e.top, l = e.bottom - t;
1192
+ if (u >= n.height || u >= l)
1193
+ return { side: c, left: d, top: e.top, maxHeight: u };
1194
+ const _ = Math.max(e.bottom - n.height, t);
1195
+ return { side: c, left: d, top: _, maxHeight: l };
1196
+ }
1197
+ function Ue(e, n, r) {
1198
+ const [t, s] = S(null), a = T(n), i = T(r);
1199
+ a.current = n, i.current = r;
1200
+ const c = T(null);
1201
+ return Ne(() => {
1202
+ if (!e) {
1203
+ c.current = null, s(null);
1204
+ return;
1205
+ }
1206
+ let d = 0;
1207
+ function u() {
1208
+ const l = a.current();
1209
+ if (l !== null) {
1210
+ const _ = c.current;
1211
+ (_ === null || !i.current(_, l)) && (c.current = l, s(l));
1212
+ }
1213
+ d = requestAnimationFrame(u);
1214
+ }
1215
+ return u(), () => {
1216
+ cancelAnimationFrame(d), c.current = null, s(null);
1217
+ };
1218
+ }, [e]), t;
1219
+ }
1220
+ const Ge = 8, wr = 8, yr = 150, Nr = 3;
1221
+ function $e() {
1222
+ return { width: window.innerWidth, height: window.innerHeight };
1223
+ }
1224
+ function we() {
1225
+ return window.matchMedia("(orientation: portrait)").matches;
1226
+ }
1227
+ function Ve(e) {
1228
+ return { width: e.scrollWidth || e.offsetWidth, height: e.scrollHeight || e.offsetHeight };
1229
+ }
1230
+ function Ir(e, n) {
1231
+ return e.top === n.top && e.left === n.left && e.maxHeight === n.maxHeight && e.maxWidth === n.maxWidth;
1232
+ }
1233
+ function Sr(e, n) {
1234
+ return e === "collapse" || n === "collapse" ? e === n : e.side === n.side && e.top === n.top && e.left === n.left && e.maxHeight === n.maxHeight;
1235
+ }
1236
+ function kr(e, n, r) {
1237
+ return Ue(
1238
+ e,
1239
+ () => {
1240
+ const t = n.current, s = r.current;
1241
+ return !t || !s ? null : Cr(t.getBoundingClientRect(), Ve(s), $e(), Ge, wr);
1242
+ },
1243
+ Ir
1244
+ );
1245
+ }
1246
+ function Rr(e, n, r) {
1247
+ return Ue(
1248
+ e,
1249
+ () => {
1250
+ const t = n.current, s = r.current;
1251
+ if (!t || !s) return null;
1252
+ const a = vr(s.getBoundingClientRect(), Ve(t), $e(), Ge, we());
1253
+ return a.side === "collapse" ? "collapse" : a;
1254
+ },
1255
+ Sr
1256
+ );
1257
+ }
1258
+ function Tr(e) {
1259
+ const { anchorRef: n, panelRef: r, submenuRef: t, open: s, onOpenChange: a } = e, [i, c] = S(!1), d = s ?? i, [u, l] = S([]), [_, p] = S(null), C = T(null), y = T(void 0), k = E((I) => {
1260
+ c(I), a?.(I);
1261
+ }, [a]), x = E((I) => {
1262
+ p(null), l((w) => w.length >= Nr ? w : [...w, I]);
1263
+ }, []);
1264
+ b(() => {
1265
+ d || (l([]), p(null), C.current = null, y.current && clearTimeout(y.current));
1266
+ }, [d]);
1267
+ const R = E((I, w) => {
1268
+ if (y.current && clearTimeout(y.current), C.current = I, we()) {
1269
+ x(w);
1270
+ return;
1271
+ }
1272
+ p({ section: w, placement: null });
1273
+ }, [x]), M = E((I, w) => {
1274
+ if (we()) {
1275
+ u[u.length - 1] === w ? l((Q) => Q.slice(0, -1)) : R(I, w);
1276
+ return;
1277
+ }
1278
+ _ && _.section === w ? p(null) : R(I, w);
1279
+ }, [u, _, R]), V = E(() => {
1280
+ y.current && clearTimeout(y.current), y.current = setTimeout(() => p(null), yr);
1281
+ }, []), U = E(() => {
1282
+ y.current && clearTimeout(y.current);
1283
+ }, []), v = Rr(!!_, t, C), A = kr(d, n, r);
1284
+ b(() => {
1285
+ if (!(!_ || !v)) {
1286
+ if (v === "collapse") {
1287
+ x(_.section);
1288
+ return;
1289
+ }
1290
+ _.placement !== v && p({ section: _.section, placement: v });
1291
+ }
1292
+ }, [v, _, x]);
1293
+ const K = E(() => l((I) => I.slice(0, -1)), []), X = E(() => k(!1), [k]), Z = E(() => k(!d), [k, d]), O = E((I) => {
1294
+ I.onSelect?.(), k(!1);
1295
+ }, [k]);
1296
+ return {
1297
+ open: d,
1298
+ toggle: Z,
1299
+ close: X,
1300
+ back: K,
1301
+ selectItem: O,
1302
+ openSubmenuFrom: R,
1303
+ toggleSubmenuFrom: M,
1304
+ closeSubmenuSoon: V,
1305
+ holdSubmenu: U,
1306
+ frame: u[u.length - 1] ?? null,
1307
+ menuPlacement: A,
1308
+ submenu: _
1309
+ };
1310
+ }
1311
+ const xe = { duration: 0.15, ease: [0.2, 0.7, 0.2, 1] };
1312
+ function Qr(e) {
1313
+ const { anchorRef: n, open: r, onClose: t, items: s, rootTitle: a, skeletonCount: i } = e, c = T(null), d = T(null);
1314
+ function u(y) {
1315
+ y || t();
1316
+ }
1317
+ const l = Tr({ anchorRef: n, panelRef: c, submenuRef: d, open: r, onOpenChange: u }), _ = l.frame ?? { title: a, items: s, searchable: e.searchable }, p = l.menuPlacement, C = l.submenu?.placement ?? null;
1318
+ return Ie(
1319
+ /* @__PURE__ */ m("div", { className: N.FlyoutMenuContainer, children: [
1320
+ r && /* @__PURE__ */ o("div", { className: N.Backdrop, onClick: t }),
1321
+ /* @__PURE__ */ o(le, { children: r && /* @__PURE__ */ o(
1322
+ oe.div,
1323
+ {
1324
+ ref: c,
1325
+ className: N.Panel,
1326
+ style: p ? { top: p.top, left: p.left, maxHeight: p.maxHeight, maxWidth: p.maxWidth } : { visibility: "hidden" },
1327
+ initial: { opacity: 0, scale: 0.94, y: 6 },
1328
+ animate: { opacity: 1, scale: 1, y: 0 },
1329
+ exit: { opacity: 0, scale: 0.94, y: 6 },
1330
+ transition: xe,
1331
+ children: /* @__PURE__ */ o(ve.Provider, { value: !!p, children: /* @__PURE__ */ o(
1332
+ Ae,
1333
+ {
1334
+ section: _,
1335
+ menu: l,
1336
+ onBack: l.frame ? l.back : void 0,
1337
+ skeletonCount: i,
1338
+ active: !l.submenu
1339
+ }
1340
+ ) })
1341
+ },
1342
+ "flyout-panel"
1343
+ ) }),
1344
+ /* @__PURE__ */ o(le, { children: r && l.submenu && /* @__PURE__ */ o(
1345
+ oe.div,
1346
+ {
1347
+ ref: d,
1348
+ className: N.Submenu,
1349
+ style: C ? { top: C.top, left: C.left, maxHeight: C.maxHeight } : { visibility: "hidden" },
1350
+ onMouseEnter: l.holdSubmenu,
1351
+ onMouseLeave: l.closeSubmenuSoon,
1352
+ initial: { opacity: 0, scale: 0.94, x: 6 },
1353
+ animate: { opacity: 1, scale: 1, x: 0 },
1354
+ exit: { opacity: 0, scale: 0.94, x: 6 },
1355
+ transition: xe,
1356
+ children: /* @__PURE__ */ o(ve.Provider, { value: !!C, children: /* @__PURE__ */ o(
1357
+ Ae,
1358
+ {
1359
+ section: l.submenu.section,
1360
+ menu: l,
1361
+ skeletonCount: i,
1362
+ active: !0
1363
+ }
1364
+ ) })
1365
+ },
1366
+ "flyout-submenu"
1367
+ ) })
1368
+ ] }),
1369
+ document.body
1370
+ );
1371
+ }
1372
+ function Yr({ classNames: e, children: n }) {
1373
+ return /* @__PURE__ */ o(Oe.Provider, { value: e, children: n });
953
1374
  }
954
- var le = /* @__PURE__ */ ((e) => (e[e.OK = 0] = "OK", e[e.CANCELLED = 1] = "CANCELLED", e[e.UNKNOWN = 2] = "UNKNOWN", e[e.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT", e[e.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", e[e.NOT_FOUND = 5] = "NOT_FOUND", e[e.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", e[e.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", e[e.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED", e[e.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", e[e.ABORTED = 10] = "ABORTED", e[e.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", e[e.UNIMPLEMENTED = 12] = "UNIMPLEMENTED", e[e.INTERNAL = 13] = "INTERNAL", e[e.UNAVAILABLE = 14] = "UNAVAILABLE", e[e.DATA_LOSS = 15] = "DATA_LOSS", e[e.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", e))(le || {});
955
- const so = "type.googleapis.com/google.rpc.ErrorInfo", ao = "type.googleapis.com/google.rpc.BadRequest", io = "type.googleapis.com/google.rpc.PreconditionFailure";
956
- function ne(e) {
1375
+ var ye = /* @__PURE__ */ ((e) => (e[e.OK = 0] = "OK", e[e.CANCELLED = 1] = "CANCELLED", e[e.UNKNOWN = 2] = "UNKNOWN", e[e.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT", e[e.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", e[e.NOT_FOUND = 5] = "NOT_FOUND", e[e.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", e[e.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", e[e.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED", e[e.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", e[e.ABORTED = 10] = "ABORTED", e[e.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", e[e.UNIMPLEMENTED = 12] = "UNIMPLEMENTED", e[e.INTERNAL = 13] = "INTERNAL", e[e.UNAVAILABLE = 14] = "UNAVAILABLE", e[e.DATA_LOSS = 15] = "DATA_LOSS", e[e.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", e))(ye || {});
1376
+ const br = "type.googleapis.com/google.rpc.ErrorInfo", Lr = "type.googleapis.com/google.rpc.BadRequest", Dr = "type.googleapis.com/google.rpc.PreconditionFailure";
1377
+ function ie(e) {
957
1378
  return typeof e == "object" && e !== null;
958
1379
  }
959
- function j(e) {
1380
+ function q(e) {
960
1381
  return typeof e == "string" ? e : "";
961
1382
  }
962
- function co(e) {
963
- if (!ne(e))
1383
+ function Er(e) {
1384
+ if (!ie(e))
964
1385
  return { kind: "Unknown", typeUrl: "", raw: e };
965
- const n = j(e["@type"]);
1386
+ const n = q(e["@type"]);
966
1387
  switch (n) {
967
- case so: {
968
- const o = ne(e.metadata) ? e.metadata : {}, r = {};
969
- for (const a of Object.keys(o))
970
- r[a] = j(o[a]);
1388
+ case br: {
1389
+ const r = ie(e.metadata) ? e.metadata : {}, t = {};
1390
+ for (const s of Object.keys(r))
1391
+ t[s] = q(r[s]);
971
1392
  return {
972
1393
  kind: "ErrorInfo",
973
- reason: j(e.reason),
974
- domain: j(e.domain),
975
- metadata: r
1394
+ reason: q(e.reason),
1395
+ domain: q(e.domain),
1396
+ metadata: t
976
1397
  };
977
1398
  }
978
- case ao:
979
- return { kind: "BadRequest", fieldViolations: (Array.isArray(e.fieldViolations) ? e.fieldViolations : []).map((a) => {
980
- const s = ne(a) ? a : {};
1399
+ case Lr:
1400
+ return { kind: "BadRequest", fieldViolations: (Array.isArray(e.fieldViolations) ? e.fieldViolations : []).map((s) => {
1401
+ const a = ie(s) ? s : {};
981
1402
  return {
982
- field: j(s.field),
983
- description: j(s.description)
1403
+ field: q(a.field),
1404
+ description: q(a.description)
984
1405
  };
985
1406
  }) };
986
- case io:
987
- return { kind: "PreconditionFailure", violations: (Array.isArray(e.violations) ? e.violations : []).map((a) => {
988
- const s = ne(a) ? a : {};
1407
+ case Dr:
1408
+ return { kind: "PreconditionFailure", violations: (Array.isArray(e.violations) ? e.violations : []).map((s) => {
1409
+ const a = ie(s) ? s : {};
989
1410
  return {
990
- type: j(s.type),
991
- subject: j(s.subject),
992
- description: j(s.description)
1411
+ type: q(a.type),
1412
+ subject: q(a.subject),
1413
+ description: q(a.description)
993
1414
  };
994
1415
  }) };
995
1416
  default:
996
1417
  return { kind: "Unknown", typeUrl: n, raw: e };
997
1418
  }
998
1419
  }
999
- function Eo(e) {
1420
+ function Jr(e) {
1000
1421
  return e.kind === "ErrorInfo";
1001
1422
  }
1002
- function Ao(e) {
1423
+ function Zr(e) {
1003
1424
  return e.kind === "BadRequest";
1004
1425
  }
1005
- function bo(e) {
1426
+ function es(e) {
1006
1427
  return e.kind === "PreconditionFailure";
1007
1428
  }
1008
- class te extends Error {
1429
+ class ce extends Error {
1009
1430
  constructor(n) {
1010
1431
  super(n.title), this.isRetryable = n.isRetryable ?? !1, this.grpcCode = n.grpcCode, this.details = n.details ?? [];
1011
1432
  }
1012
1433
  }
1013
- function Bo(e) {
1014
- if (e instanceof te) return e;
1434
+ function ns(e) {
1435
+ if (e instanceof ce) return e;
1015
1436
  if (e instanceof Error && e.message === "Failed to fetch")
1016
- return new te({ title: "Server unavailable. Try again later", isRetryable: !0 });
1437
+ return new ce({ title: "Server unavailable. Try again later", isRetryable: !0 });
1017
1438
  if (typeof e == "object" && e !== null && "code" in e) {
1018
- const n = e, o = n.code === le.UNAVAILABLE || n.code === le.INTERNAL, r = (n.details ?? []).map(co);
1019
- return new te({ title: n.message, isRetryable: o, grpcCode: n.code, details: r });
1439
+ const n = e, r = n.code === ye.UNAVAILABLE || n.code === ye.INTERNAL, t = (n.details ?? []).map(Er);
1440
+ return new ce({ title: n.message, isRetryable: r, grpcCode: n.code, details: t });
1020
1441
  }
1021
- return new te({ title: String(e), isRetryable: !1 });
1442
+ return new ce({ title: String(e), isRetryable: !1 });
1022
1443
  }
1023
1444
  export {
1024
- wo as AvatarFallbackIcon,
1025
- ao as BAD_REQUEST_TYPE_URL,
1026
- To as Button,
1027
- No as CheckmarkIcon,
1028
- Bt as ChevronDownIcon,
1029
- jo as ChuresConfigProvider,
1030
- Do as ConfirmDialog,
1031
- Lo as Dropdown,
1032
- so as ERROR_INFO_TYPE_URL,
1033
- Io as EditPencilIcon,
1034
- le as Errors,
1035
- So as InfoDialog,
1036
- Co as Input,
1037
- on as Loader,
1038
- ho as LoadingWrapper,
1039
- Ro as ModalActions,
1040
- ko as ModalClose,
1041
- io as PRECONDITION_FAILURE_TYPE_URL,
1042
- yo as SearchIcon,
1043
- te as ServiceError,
1044
- mo as TelegramAuth,
1045
- pn as TelegramSignInButton,
1046
- go as Toaster,
1047
- vo as Toggle,
1048
- Ao as isBadRequest,
1049
- Eo as isErrorInfo,
1050
- bo as isPreconditionFailure,
1051
- co as parseErrorDetail,
1052
- Bo as parseGrpcError,
1053
- I as useComponentClassName,
1054
- cn as useTelegramLogin,
1055
- ge as useToaster
1445
+ Hr as AvatarFallbackIcon,
1446
+ Lr as BAD_REQUEST_TYPE_URL,
1447
+ qe as Button,
1448
+ qr as CheckmarkIcon,
1449
+ ro as ChevronDownIcon,
1450
+ Yr as ChuresConfigProvider,
1451
+ Gr as ConfirmDialog,
1452
+ Ur as Dropdown,
1453
+ br as ERROR_INFO_TYPE_URL,
1454
+ zr as EditPencilIcon,
1455
+ ye as Errors,
1456
+ Qr as FlyoutMenu,
1457
+ $r as InfoDialog,
1458
+ it as Input,
1459
+ Tn as Loader,
1460
+ Mr as LoadingWrapper,
1461
+ ve as MenuMeasuredContext,
1462
+ fr as MenuSearchField,
1463
+ dr as MenuSkeleton,
1464
+ Vr as ModalActions,
1465
+ Kr as ModalClose,
1466
+ Dr as PRECONDITION_FAILURE_TYPE_URL,
1467
+ so as SearchIcon,
1468
+ ce as ServiceError,
1469
+ Xr as SideDrawer,
1470
+ Or as TelegramAuth,
1471
+ Mn as TelegramSignInButton,
1472
+ Wr as Toaster,
1473
+ Fr as Toggle,
1474
+ Zr as isBadRequest,
1475
+ Jr as isErrorInfo,
1476
+ es as isPreconditionFailure,
1477
+ gr as menuItemText,
1478
+ Er as parseErrorDetail,
1479
+ ns as parseGrpcError,
1480
+ hr as partitionBySubstring,
1481
+ Le as popOverlayBack,
1482
+ qo as pushOverlayBack,
1483
+ zo as useBackableOverlay,
1484
+ L as useComponentClassName,
1485
+ Uo as useMenuMeasured,
1486
+ En as useTelegramLogin,
1487
+ We as useToaster,
1488
+ pr as useTypeToSearch
1056
1489
  };