@vervstack/chures 0.0.27 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chures.js +443 -432
- package/dist/chures.umd.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +4 -3
- package/dist/components/Dropdown/Dropdown.types.d.ts +6 -0
- package/dist/components/Dropdown/DropdownPanel.d.ts +4 -2
- package/dist/components/Dropdown/index.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/chures.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
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
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { AnimatePresence as
|
|
5
|
-
import { create as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
function
|
|
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) {
|
|
8
8
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
9
9
|
}
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
return
|
|
10
|
+
var ie = { exports: {} };
|
|
11
|
+
var fe;
|
|
12
|
+
function Ae() {
|
|
13
|
+
return fe || (fe = 1, (function(e) {
|
|
14
14
|
(function() {
|
|
15
15
|
var n = {}.hasOwnProperty;
|
|
16
16
|
function o() {
|
|
@@ -39,53 +39,53 @@ function Ee() {
|
|
|
39
39
|
}
|
|
40
40
|
e.exports ? (o.default = o, e.exports = o) : window.classNames = o;
|
|
41
41
|
})();
|
|
42
|
-
})(
|
|
42
|
+
})(ie)), ie.exports;
|
|
43
43
|
}
|
|
44
|
-
var
|
|
45
|
-
const
|
|
46
|
-
LoaderContainer:
|
|
47
|
-
sm:
|
|
48
|
-
md:
|
|
49
|
-
lg:
|
|
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
50
|
Arc1: Oe,
|
|
51
|
-
Arc2:
|
|
52
|
-
Arc3:
|
|
53
|
-
spin:
|
|
54
|
-
Ring1:
|
|
55
|
-
Ring2:
|
|
56
|
-
Ring3:
|
|
57
|
-
ripple:
|
|
58
|
-
Dot1:
|
|
59
|
-
Dot2:
|
|
60
|
-
Dot3:
|
|
61
|
-
dotPulse:
|
|
62
|
-
Wave1:
|
|
63
|
-
Wave2:
|
|
64
|
-
Wave3:
|
|
65
|
-
Wave4:
|
|
66
|
-
Wave5:
|
|
67
|
-
waveBounce:
|
|
68
|
-
},
|
|
69
|
-
function
|
|
70
|
-
const o =
|
|
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
71
|
return n ?? o[e];
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function tn(e, n) {
|
|
74
74
|
switch (e) {
|
|
75
75
|
case "ripple":
|
|
76
|
-
return /* @__PURE__ */ _(
|
|
76
|
+
return /* @__PURE__ */ _(b, { children: [
|
|
77
77
|
/* @__PURE__ */ t("div", { className: n.Ring1 }),
|
|
78
78
|
/* @__PURE__ */ t("div", { className: n.Ring2 }),
|
|
79
79
|
/* @__PURE__ */ t("div", { className: n.Ring3 })
|
|
80
80
|
] });
|
|
81
81
|
case "dots":
|
|
82
|
-
return /* @__PURE__ */ _(
|
|
82
|
+
return /* @__PURE__ */ _(b, { children: [
|
|
83
83
|
/* @__PURE__ */ t("div", { className: n.Dot1 }),
|
|
84
84
|
/* @__PURE__ */ t("div", { className: n.Dot2 }),
|
|
85
85
|
/* @__PURE__ */ t("div", { className: n.Dot3 })
|
|
86
86
|
] });
|
|
87
87
|
case "wave":
|
|
88
|
-
return /* @__PURE__ */ _(
|
|
88
|
+
return /* @__PURE__ */ _(b, { children: [
|
|
89
89
|
/* @__PURE__ */ t("div", { className: n.Wave1 }),
|
|
90
90
|
/* @__PURE__ */ t("div", { className: n.Wave2 }),
|
|
91
91
|
/* @__PURE__ */ t("div", { className: n.Wave3 }),
|
|
@@ -93,50 +93,50 @@ function nn(e, n) {
|
|
|
93
93
|
/* @__PURE__ */ t("div", { className: n.Wave5 })
|
|
94
94
|
] });
|
|
95
95
|
default:
|
|
96
|
-
return /* @__PURE__ */ _(
|
|
96
|
+
return /* @__PURE__ */ _(b, { children: [
|
|
97
97
|
/* @__PURE__ */ t("div", { className: n.Arc1 }),
|
|
98
98
|
/* @__PURE__ */ t("div", { className: n.Arc2 }),
|
|
99
99
|
/* @__PURE__ */ t("div", { className: n.Arc3 })
|
|
100
100
|
] });
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
const a =
|
|
103
|
+
function on({ variant: e = "arcs", size: n = "md", color: o, className: r }) {
|
|
104
|
+
const a = I("Loader", r);
|
|
105
105
|
return /* @__PURE__ */ t(
|
|
106
106
|
"div",
|
|
107
107
|
{
|
|
108
|
-
className:
|
|
108
|
+
className: f(ee.LoaderContainer, ee[n], ee[e], a),
|
|
109
109
|
role: "status",
|
|
110
110
|
"aria-label": "Loading",
|
|
111
111
|
style: o ? { "--chures-accent": o } : void 0,
|
|
112
|
-
children:
|
|
112
|
+
children: tn(e, ee)
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
|
-
const
|
|
117
|
-
LoadingWrapperContainer:
|
|
118
|
-
SkeletonWrapper:
|
|
116
|
+
const rn = "_LoadingWrapperContainer_1q0w7_1", sn = "_SkeletonWrapper_1q0w7_9", pe = {
|
|
117
|
+
LoadingWrapperContainer: rn,
|
|
118
|
+
SkeletonWrapper: sn
|
|
119
119
|
};
|
|
120
|
-
function
|
|
121
|
-
const s =
|
|
122
|
-
return e ? o ? /* @__PURE__ */ t("div", { className:
|
|
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
123
|
}
|
|
124
|
-
const
|
|
125
|
-
function
|
|
126
|
-
const { botId: n, redirectUri: o, requestAccess: r = "write" } = e, a =
|
|
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
127
|
a.current = e.onSuccess;
|
|
128
|
-
const s =
|
|
129
|
-
|
|
128
|
+
const s = Y(!1), [i, d] = T(!1), [p, u] = T(!1);
|
|
129
|
+
G(function() {
|
|
130
130
|
if (!n) return;
|
|
131
131
|
const m = o ?? window.location.origin;
|
|
132
132
|
u(!0), d(!1);
|
|
133
133
|
const g = document.createElement("script");
|
|
134
|
-
return g.src =
|
|
135
|
-
const
|
|
136
|
-
|
|
134
|
+
return g.src = an, g.async = !0, g.onload = function() {
|
|
135
|
+
const w = window.Telegram;
|
|
136
|
+
w && (w.Login.init(
|
|
137
137
|
{ client_id: n, redirect_uri: m },
|
|
138
|
-
function(
|
|
139
|
-
s.current || (s.current = !0, a.current(
|
|
138
|
+
function(B) {
|
|
139
|
+
s.current || (s.current = !0, a.current(B));
|
|
140
140
|
}
|
|
141
141
|
), d(!0)), u(!1);
|
|
142
142
|
}, g.onerror = function() {
|
|
@@ -152,22 +152,22 @@ function an(e) {
|
|
|
152
152
|
const g = o ?? window.location.origin;
|
|
153
153
|
m.Login.auth(
|
|
154
154
|
{ client_id: n, redirect_uri: g, request_access: r },
|
|
155
|
-
function(
|
|
156
|
-
s.current || (s.current = !0, a.current(
|
|
155
|
+
function(w) {
|
|
156
|
+
s.current || (s.current = !0, a.current(w));
|
|
157
157
|
}
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
|
-
return { login: h, isReady: i, isLoading:
|
|
160
|
+
return { login: h, isReady: i, isLoading: p };
|
|
161
161
|
}
|
|
162
|
-
const
|
|
163
|
-
TelegramSignInButtonContainer:
|
|
164
|
-
FullSize:
|
|
165
|
-
Icon:
|
|
166
|
-
},
|
|
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 = {
|
|
167
167
|
en: "Continue with Telegram",
|
|
168
168
|
ru: "Войти через Telegram"
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function fn() {
|
|
171
171
|
return /* @__PURE__ */ t(
|
|
172
172
|
"svg",
|
|
173
173
|
{
|
|
@@ -176,7 +176,7 @@ function _n() {
|
|
|
176
176
|
height: "20",
|
|
177
177
|
fill: "currentColor",
|
|
178
178
|
"aria-hidden": "true",
|
|
179
|
-
className:
|
|
179
|
+
className: ce.Icon,
|
|
180
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" })
|
|
181
181
|
}
|
|
182
182
|
);
|
|
@@ -190,19 +190,19 @@ function pn({
|
|
|
190
190
|
fullSize: s,
|
|
191
191
|
className: i
|
|
192
192
|
}) {
|
|
193
|
-
|
|
193
|
+
G(function() {
|
|
194
194
|
const h = "comfortaa-font";
|
|
195
195
|
if (document.getElementById(h)) return;
|
|
196
196
|
const m = document.createElement("link");
|
|
197
197
|
m.id = h, m.rel = "stylesheet", m.href = "https://fonts.googleapis.com/css2?family=Comfortaa:wght@600&display=swap", document.head.appendChild(m);
|
|
198
198
|
}, []);
|
|
199
|
-
const d = a ?? r ??
|
|
199
|
+
const d = a ?? r ?? _n[o], p = I("TelegramSignInButton", i), u = f(ce.TelegramSignInButtonContainer, { [ce.FullSize]: s }, p);
|
|
200
200
|
return /* @__PURE__ */ _("button", { type: "button", className: u, onClick: e, disabled: n, children: [
|
|
201
|
-
/* @__PURE__ */ t(
|
|
201
|
+
/* @__PURE__ */ t(fn, {}),
|
|
202
202
|
d
|
|
203
203
|
] });
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function mo({
|
|
206
206
|
botId: e,
|
|
207
207
|
onSuccess: n,
|
|
208
208
|
lang: o,
|
|
@@ -212,11 +212,11 @@ function ho({
|
|
|
212
212
|
children: i,
|
|
213
213
|
className: d
|
|
214
214
|
}) {
|
|
215
|
-
const { login:
|
|
216
|
-
return i ? /* @__PURE__ */ t(
|
|
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
217
|
pn,
|
|
218
218
|
{
|
|
219
|
-
onClick:
|
|
219
|
+
onClick: p,
|
|
220
220
|
disabled: !u,
|
|
221
221
|
lang: o,
|
|
222
222
|
title: r,
|
|
@@ -224,11 +224,11 @@ function ho({
|
|
|
224
224
|
}
|
|
225
225
|
);
|
|
226
226
|
}
|
|
227
|
-
let
|
|
228
|
-
const
|
|
227
|
+
let hn = 0;
|
|
228
|
+
const ge = ke((e, n) => ({
|
|
229
229
|
toasts: [],
|
|
230
230
|
bake: (o) => {
|
|
231
|
-
const r =
|
|
231
|
+
const r = hn++;
|
|
232
232
|
e((a) => ({ toasts: [...a.toasts, { ...o, id: r }] })), setTimeout(() => {
|
|
233
233
|
n().dismiss(r);
|
|
234
234
|
}, 5e3);
|
|
@@ -238,117 +238,117 @@ const he = Re((e, n) => ({
|
|
|
238
238
|
toasts: r.toasts.filter((a) => a.id !== o)
|
|
239
239
|
}));
|
|
240
240
|
}
|
|
241
|
-
})),
|
|
242
|
-
ToastContainer:
|
|
243
|
-
Toast:
|
|
244
|
-
error:
|
|
245
|
-
warn:
|
|
246
|
-
info:
|
|
247
|
-
Description:
|
|
248
|
-
DismissButton:
|
|
249
|
-
slideIn:
|
|
250
|
-
slideOut:
|
|
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
|
|
251
251
|
};
|
|
252
|
-
function
|
|
253
|
-
const { toasts: n } =
|
|
254
|
-
return /* @__PURE__ */ t("div", { className:
|
|
255
|
-
|
|
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,
|
|
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(
|
|
262
|
+
children: /* @__PURE__ */ t(Tn, { ...r })
|
|
263
263
|
},
|
|
264
264
|
r.id
|
|
265
265
|
)) }) });
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
const [s, i] =
|
|
269
|
-
return
|
|
267
|
+
function Tn({ id: e, title: n, description: o, level: r, isDismissable: a }) {
|
|
268
|
+
const [s, i] = T(!1), d = ge();
|
|
269
|
+
return G(() => () => {
|
|
270
270
|
i(!0);
|
|
271
271
|
}, []), /* @__PURE__ */ _(
|
|
272
272
|
"div",
|
|
273
273
|
{
|
|
274
|
-
className:
|
|
275
|
-
[
|
|
276
|
-
[
|
|
277
|
-
[
|
|
278
|
-
[
|
|
279
|
-
[
|
|
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
|
|
280
280
|
}),
|
|
281
281
|
children: [
|
|
282
282
|
/* @__PURE__ */ t("div", { children: n }),
|
|
283
|
-
/* @__PURE__ */ t("div", { className:
|
|
284
|
-
a && e !== void 0 && /* @__PURE__ */ t("div", { className:
|
|
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: "×" })
|
|
285
285
|
]
|
|
286
286
|
}
|
|
287
287
|
);
|
|
288
288
|
}
|
|
289
|
-
const
|
|
290
|
-
InputContainer:
|
|
291
|
-
InputField:
|
|
292
|
-
hasStartIcon:
|
|
293
|
-
hasEndIcon:
|
|
294
|
-
StartIcon:
|
|
295
|
-
EndIcon:
|
|
296
|
-
hasError:
|
|
297
|
-
disabled:
|
|
298
|
-
Label:
|
|
299
|
-
lifted:
|
|
300
|
-
ErrorText:
|
|
301
|
-
Skeleton:
|
|
302
|
-
},
|
|
303
|
-
const [
|
|
304
|
-
return a ? /* @__PURE__ */ t("div", { className:
|
|
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
305
|
h && /* @__PURE__ */ t("span", { className: v.StartIcon, children: h }),
|
|
306
306
|
/* @__PURE__ */ t(
|
|
307
307
|
"input",
|
|
308
308
|
{
|
|
309
|
-
ref:
|
|
310
|
-
className:
|
|
309
|
+
ref: w,
|
|
310
|
+
className: f(v.InputField, { [v.hasStartIcon]: !!h, [v.hasEndIcon]: !!m }, u),
|
|
311
311
|
type: s,
|
|
312
312
|
value: n,
|
|
313
313
|
onChange: (C) => o(C.target.value),
|
|
314
314
|
onFocus: (C) => {
|
|
315
|
-
|
|
315
|
+
x(!0), W?.(C);
|
|
316
316
|
},
|
|
317
317
|
onBlur: (C) => {
|
|
318
|
-
|
|
318
|
+
x(!1), H?.(C);
|
|
319
319
|
},
|
|
320
320
|
disabled: i,
|
|
321
|
-
...
|
|
321
|
+
...M
|
|
322
322
|
}
|
|
323
323
|
),
|
|
324
|
-
r && /* @__PURE__ */ t("label", { className:
|
|
324
|
+
r && /* @__PURE__ */ t("label", { className: f(v.Label, { [v.lifted]: q }), children: r }),
|
|
325
325
|
m && /* @__PURE__ */ t("span", { className: v.EndIcon, children: m }),
|
|
326
326
|
d && /* @__PURE__ */ t("span", { className: v.ErrorText, children: d })
|
|
327
327
|
] });
|
|
328
|
-
}), On = "_ToggleContainer_1jetc_6",
|
|
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
329
|
ToggleContainer: On,
|
|
330
|
-
disabled:
|
|
331
|
-
Track:
|
|
332
|
-
on:
|
|
333
|
-
Thumb:
|
|
334
|
-
Label:
|
|
335
|
-
LabelSkeleton:
|
|
336
|
-
Skeleton:
|
|
330
|
+
disabled: zn,
|
|
331
|
+
Track: Mn,
|
|
332
|
+
on: Un,
|
|
333
|
+
Thumb: Fn,
|
|
334
|
+
Label: Gn,
|
|
335
|
+
LabelSkeleton: qn,
|
|
336
|
+
Skeleton: Hn
|
|
337
337
|
};
|
|
338
|
-
function
|
|
339
|
-
const
|
|
340
|
-
return s ?
|
|
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
341
|
r === "left" && h,
|
|
342
342
|
/* @__PURE__ */ t("div", { className: L.Skeleton, "aria-hidden": "true" }),
|
|
343
343
|
r === "right" && h
|
|
344
|
-
] }) : /* @__PURE__ */ t("div", { className:
|
|
344
|
+
] }) : /* @__PURE__ */ t("div", { className: f(L.Skeleton, u), "aria-hidden": "true" }) : /* @__PURE__ */ _("label", { className: f(L.ToggleContainer, { [L.disabled]: a }, u), children: [
|
|
345
345
|
r === "left" && h,
|
|
346
346
|
/* @__PURE__ */ t(
|
|
347
347
|
"button",
|
|
348
348
|
{
|
|
349
349
|
role: "switch",
|
|
350
350
|
"aria-checked": e,
|
|
351
|
-
className:
|
|
351
|
+
className: f(L.Track, { [L.on]: e }),
|
|
352
352
|
onClick: () => !a && n(!e),
|
|
353
353
|
disabled: a,
|
|
354
354
|
type: "button",
|
|
@@ -358,12 +358,12 @@ function Co({ checked: e, onChange: n, label: o, labelPosition: r = "right", dis
|
|
|
358
358
|
r === "right" && h
|
|
359
359
|
] });
|
|
360
360
|
}
|
|
361
|
-
function
|
|
362
|
-
const [e, n] =
|
|
361
|
+
function $n() {
|
|
362
|
+
const [e, n] = T(!1), o = Y(null), r = _e(() => n((s) => !s), []), a = _e(() => n(!1), []);
|
|
363
363
|
return { isOpen: e, triggerRef: o, toggleOpen: r, close: a };
|
|
364
364
|
}
|
|
365
|
-
function
|
|
366
|
-
|
|
365
|
+
function Vn(e, n, o) {
|
|
366
|
+
G(() => {
|
|
367
367
|
function r(s) {
|
|
368
368
|
const i = s.target;
|
|
369
369
|
e.current?.contains(i) || o?.current?.contains(i) || n();
|
|
@@ -376,9 +376,9 @@ function $n(e, n, o) {
|
|
|
376
376
|
};
|
|
377
377
|
}, [n, e, o]);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
const [o, r] =
|
|
381
|
-
return
|
|
379
|
+
function Kn(e, n) {
|
|
380
|
+
const [o, r] = T([]);
|
|
381
|
+
return G(() => {
|
|
382
382
|
if (!n) return;
|
|
383
383
|
let a = !1;
|
|
384
384
|
return n(e).then((s) => {
|
|
@@ -388,64 +388,64 @@ function Vn(e, n) {
|
|
|
388
388
|
};
|
|
389
389
|
}, [e, n]), o;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function X(e) {
|
|
392
392
|
return typeof e == "object" && e !== null && "group" in e;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
return e.flatMap((n) =>
|
|
394
|
+
function Ce(e) {
|
|
395
|
+
return e.flatMap((n) => X(n) ? n.options : [n]);
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function N(e) {
|
|
398
398
|
return typeof e == "string" ? e : e.id;
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function oe(e) {
|
|
401
401
|
return typeof e == "string" ? e : e.name;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
404
|
-
return e.map((o) => n.find((r) =>
|
|
403
|
+
function Xn(e, n) {
|
|
404
|
+
return e.map((o) => n.find((r) => N(r) === o) ?? o);
|
|
405
405
|
}
|
|
406
|
-
const
|
|
407
|
-
DropdownContainer:
|
|
408
|
-
PanelWrapper:
|
|
409
|
-
Portal:
|
|
410
|
-
PanelContainer:
|
|
411
|
-
Glass:
|
|
412
|
-
Label:
|
|
413
|
-
lifted:
|
|
414
|
-
TriggerContainer:
|
|
415
|
-
Open:
|
|
416
|
-
TriggerPlaceholder:
|
|
417
|
-
TriggerValue:
|
|
418
|
-
TriggerIcon:
|
|
419
|
-
ChipsWrapper:
|
|
420
|
-
Expand:
|
|
421
|
-
MultiSelect:
|
|
422
|
-
ExpandHeight:
|
|
423
|
-
Chip:
|
|
424
|
-
SearchRow:
|
|
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
425
|
SearchBox: pt,
|
|
426
|
-
SearchIcon:
|
|
427
|
-
SearchInput:
|
|
428
|
-
ResultsList:
|
|
429
|
-
OptionRow:
|
|
430
|
-
Selected:
|
|
431
|
-
Indented:
|
|
432
|
-
GroupHeader:
|
|
433
|
-
Checkmark:
|
|
434
|
-
CreateRow:
|
|
435
|
-
WithBorder:
|
|
436
|
-
CreateIcon:
|
|
437
|
-
CreateLabel:
|
|
438
|
-
EmptyHint:
|
|
439
|
-
SkeletonRow:
|
|
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
|
|
440
440
|
};
|
|
441
|
-
function
|
|
441
|
+
function kt({ query: e, withBorder: n, onCreate: o }) {
|
|
442
442
|
function r(a) {
|
|
443
443
|
a.preventDefault(), o();
|
|
444
444
|
}
|
|
445
445
|
return /* @__PURE__ */ _(
|
|
446
446
|
"div",
|
|
447
447
|
{
|
|
448
|
-
className:
|
|
448
|
+
className: f(l.CreateRow, n && l.WithBorder),
|
|
449
449
|
onMouseDown: r,
|
|
450
450
|
children: [
|
|
451
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: [
|
|
@@ -461,26 +461,26 @@ function Rt({ query: e, withBorder: n, onCreate: o }) {
|
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function jt({ label: e }) {
|
|
465
465
|
return /* @__PURE__ */ t("div", { className: l.GroupHeader, children: e });
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function he({ opt: e, isSelected: n, multiSelect: o, onPick: r, indented: a = !1 }) {
|
|
468
468
|
function s(i) {
|
|
469
469
|
i.preventDefault(), r(e);
|
|
470
470
|
}
|
|
471
471
|
return /* @__PURE__ */ _(
|
|
472
472
|
"div",
|
|
473
473
|
{
|
|
474
|
-
className:
|
|
474
|
+
className: f(l.OptionRow, n && l.Selected, a && l.Indented),
|
|
475
475
|
onMouseDown: s,
|
|
476
476
|
children: [
|
|
477
477
|
o && n && /* @__PURE__ */ t("span", { className: l.Checkmark, children: "✓" }),
|
|
478
|
-
|
|
478
|
+
oe(e)
|
|
479
479
|
]
|
|
480
480
|
}
|
|
481
481
|
);
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function Et({ inputRef: e, query: n, onChange: o, onKeyDown: r, placeholder: a }) {
|
|
484
484
|
return /* @__PURE__ */ t("div", { className: l.SearchRow, children: /* @__PURE__ */ _("div", { className: l.SearchBox, children: [
|
|
485
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
486
|
/* @__PURE__ */ t("circle", { cx: "5", cy: "5", r: "3.5" }),
|
|
@@ -499,10 +499,10 @@ function jt({ inputRef: e, query: n, onChange: o, onKeyDown: r, placeholder: a }
|
|
|
499
499
|
)
|
|
500
500
|
] }) });
|
|
501
501
|
}
|
|
502
|
-
function
|
|
503
|
-
return /* @__PURE__ */ t(
|
|
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)) });
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function bt({
|
|
506
506
|
onSearch: e,
|
|
507
507
|
onCreate: n,
|
|
508
508
|
onPick: o,
|
|
@@ -511,113 +511,122 @@ function At({
|
|
|
511
511
|
placeholder: s,
|
|
512
512
|
options: i = [],
|
|
513
513
|
excluded: d = [],
|
|
514
|
-
selected:
|
|
514
|
+
selected: p = [],
|
|
515
515
|
multiSelect: u = !1,
|
|
516
516
|
selectedAtTop: h = !1,
|
|
517
517
|
isLoading: m = !1,
|
|
518
518
|
emptyHint: g = "no results found",
|
|
519
|
-
skeletonRowCount:
|
|
520
|
-
onError:
|
|
521
|
-
glass:
|
|
522
|
-
portal:
|
|
519
|
+
skeletonRowCount: w = 4,
|
|
520
|
+
onError: B = console.error,
|
|
521
|
+
glass: x = !1,
|
|
522
|
+
portal: q = !1,
|
|
523
|
+
renderOption: D
|
|
523
524
|
}) {
|
|
524
|
-
const [
|
|
525
|
-
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
if (!
|
|
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;
|
|
529
530
|
function c() {
|
|
530
|
-
a?.current &&
|
|
531
|
+
a?.current && $(a.current.getBoundingClientRect());
|
|
531
532
|
}
|
|
532
533
|
return c(), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
|
|
533
534
|
window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
|
|
534
535
|
};
|
|
535
|
-
}, [
|
|
536
|
-
|
|
537
|
-
}, [
|
|
538
|
-
const
|
|
539
|
-
if (
|
|
540
|
-
const
|
|
541
|
-
return
|
|
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 }] : [];
|
|
542
543
|
}
|
|
543
|
-
return d.includes(
|
|
544
|
-
}),
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
] :
|
|
548
|
-
(c) =>
|
|
549
|
-
),
|
|
550
|
-
async function
|
|
551
|
-
!y ||
|
|
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)));
|
|
552
553
|
}
|
|
553
|
-
function
|
|
554
|
+
function U(c) {
|
|
554
555
|
o(c), u || r();
|
|
555
556
|
}
|
|
556
|
-
function
|
|
557
|
-
|
|
557
|
+
function ve(c) {
|
|
558
|
+
H(c.target.value);
|
|
558
559
|
}
|
|
559
|
-
function
|
|
560
|
-
c.key === "Enter" && (c.preventDefault(),
|
|
560
|
+
function Ne(c) {
|
|
561
|
+
c.key === "Enter" && (c.preventDefault(), O.length > 0 ? U(O[0]) : se && de());
|
|
561
562
|
}
|
|
562
|
-
const
|
|
563
|
-
if (
|
|
564
|
-
const
|
|
563
|
+
const Ie = s ?? (n ? "search or add new…" : "search…");
|
|
564
|
+
if (A && !S) return null;
|
|
565
|
+
const ue = /* @__PURE__ */ t(
|
|
565
566
|
"div",
|
|
566
567
|
{
|
|
567
|
-
ref:
|
|
568
|
-
className:
|
|
569
|
-
style:
|
|
570
|
-
children: /* @__PURE__ */ _("div", { className:
|
|
571
|
-
|
|
572
|
-
|
|
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,
|
|
573
574
|
{
|
|
574
|
-
inputRef:
|
|
575
|
-
query:
|
|
576
|
-
onChange:
|
|
577
|
-
onKeyDown:
|
|
578
|
-
placeholder:
|
|
575
|
+
inputRef: V,
|
|
576
|
+
query: W,
|
|
577
|
+
onChange: ve,
|
|
578
|
+
onKeyDown: Ne,
|
|
579
|
+
placeholder: Ie
|
|
579
580
|
}
|
|
580
581
|
),
|
|
581
|
-
/* @__PURE__ */ t("div", { className: l.ResultsList, children: m ? /* @__PURE__ */ t(
|
|
582
|
-
|
|
583
|
-
/* @__PURE__ */ t(
|
|
584
|
-
c.options.map((
|
|
585
|
-
|
|
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)),
|
|
587
|
+
multiSelect: u,
|
|
588
|
+
indented: !0,
|
|
589
|
+
onPick: () => U(R)
|
|
590
|
+
}) : /* @__PURE__ */ t(
|
|
591
|
+
he,
|
|
586
592
|
{
|
|
587
|
-
opt:
|
|
588
|
-
isSelected:
|
|
593
|
+
opt: R,
|
|
594
|
+
isSelected: p.includes(N(R)),
|
|
589
595
|
multiSelect: u,
|
|
590
|
-
onPick:
|
|
596
|
+
onPick: U,
|
|
591
597
|
indented: !0
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
598
|
+
}
|
|
599
|
+
) }, N(R)))
|
|
600
|
+
] }, `group:${c.group}`) : /* @__PURE__ */ t(ae, { children: D ? D(c, {
|
|
601
|
+
isSelected: p.includes(N(c)),
|
|
602
|
+
multiSelect: u,
|
|
603
|
+
indented: !1,
|
|
604
|
+
onPick: () => U(c)
|
|
605
|
+
}) : /* @__PURE__ */ t(
|
|
606
|
+
he,
|
|
597
607
|
{
|
|
598
608
|
opt: c,
|
|
599
|
-
isSelected:
|
|
609
|
+
isSelected: p.includes(N(c)),
|
|
600
610
|
multiSelect: u,
|
|
601
|
-
onPick:
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
Rt,
|
|
611
|
+
onPick: U
|
|
612
|
+
}
|
|
613
|
+
) }, N(c))),
|
|
614
|
+
se && /* @__PURE__ */ t(
|
|
615
|
+
kt,
|
|
607
616
|
{
|
|
608
617
|
query: y,
|
|
609
|
-
withBorder:
|
|
610
|
-
onCreate:
|
|
618
|
+
withBorder: O.length > 0,
|
|
619
|
+
onCreate: de
|
|
611
620
|
}
|
|
612
621
|
),
|
|
613
|
-
|
|
622
|
+
O.length === 0 && !se && /* @__PURE__ */ t("div", { className: l.EmptyHint, children: g })
|
|
614
623
|
] }) })
|
|
615
624
|
] })
|
|
616
625
|
}
|
|
617
626
|
);
|
|
618
|
-
return
|
|
627
|
+
return A ? je(ue, document.body) : ue;
|
|
619
628
|
}
|
|
620
|
-
function
|
|
629
|
+
function Bt({ size: e = 14, strokeWidth: n = 2, className: o }) {
|
|
621
630
|
return /* @__PURE__ */ t(
|
|
622
631
|
"svg",
|
|
623
632
|
{
|
|
@@ -634,7 +643,7 @@ function bt({ size: e = 14, strokeWidth: n = 2, className: o }) {
|
|
|
634
643
|
}
|
|
635
644
|
);
|
|
636
645
|
}
|
|
637
|
-
function
|
|
646
|
+
function No({ size: e = 18, strokeWidth: n = 2.5, shrink: o = !0 }) {
|
|
638
647
|
return /* @__PURE__ */ t(
|
|
639
648
|
"svg",
|
|
640
649
|
{
|
|
@@ -651,7 +660,7 @@ function vo({ size: e = 18, strokeWidth: n = 2.5, shrink: o = !0 }) {
|
|
|
651
660
|
}
|
|
652
661
|
);
|
|
653
662
|
}
|
|
654
|
-
function
|
|
663
|
+
function Io() {
|
|
655
664
|
return /* @__PURE__ */ _(
|
|
656
665
|
"svg",
|
|
657
666
|
{
|
|
@@ -670,7 +679,7 @@ function No() {
|
|
|
670
679
|
}
|
|
671
680
|
);
|
|
672
681
|
}
|
|
673
|
-
function
|
|
682
|
+
function wo() {
|
|
674
683
|
return /* @__PURE__ */ _(
|
|
675
684
|
"svg",
|
|
676
685
|
{
|
|
@@ -689,7 +698,7 @@ function Io() {
|
|
|
689
698
|
}
|
|
690
699
|
);
|
|
691
700
|
}
|
|
692
|
-
function
|
|
701
|
+
function yo({ size: e = 14, strokeWidth: n = 2, className: o }) {
|
|
693
702
|
return /* @__PURE__ */ _(
|
|
694
703
|
"svg",
|
|
695
704
|
{
|
|
@@ -709,14 +718,14 @@ function wo({ size: e = 14, strokeWidth: n = 2, className: o }) {
|
|
|
709
718
|
}
|
|
710
719
|
);
|
|
711
720
|
}
|
|
712
|
-
function
|
|
721
|
+
function xt({ triggerRef: e, isOpen: n, onClick: o, selectedOptions: r, multiSelect: a, placeholder: s, onOverflow: i = "scroll" }) {
|
|
713
722
|
const d = i === "expand";
|
|
714
723
|
return /* @__PURE__ */ _(
|
|
715
724
|
"button",
|
|
716
725
|
{
|
|
717
726
|
type: "button",
|
|
718
727
|
ref: e,
|
|
719
|
-
className:
|
|
728
|
+
className: f(
|
|
720
729
|
l.TriggerContainer,
|
|
721
730
|
n && l.Open,
|
|
722
731
|
a && l.MultiSelect,
|
|
@@ -726,13 +735,13 @@ function Bt({ triggerRef: e, isOpen: n, onClick: o, selectedOptions: r, multiSel
|
|
|
726
735
|
"aria-expanded": n,
|
|
727
736
|
"aria-haspopup": "listbox",
|
|
728
737
|
children: [
|
|
729
|
-
a && r.length > 0 ? /* @__PURE__ */ t("div", { className:
|
|
730
|
-
/* @__PURE__ */ t("span", { className: l.TriggerIcon, children: /* @__PURE__ */ t(
|
|
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 }) })
|
|
731
740
|
]
|
|
732
741
|
}
|
|
733
742
|
);
|
|
734
743
|
}
|
|
735
|
-
function
|
|
744
|
+
function Lo({
|
|
736
745
|
options: e = [],
|
|
737
746
|
value: n,
|
|
738
747
|
onChange: o,
|
|
@@ -741,108 +750,110 @@ function yo({
|
|
|
741
750
|
excluded: s,
|
|
742
751
|
multiSelect: i = !1,
|
|
743
752
|
selectedAtTop: d = !1,
|
|
744
|
-
onOverflow:
|
|
753
|
+
onOverflow: p = "scroll",
|
|
745
754
|
label: u,
|
|
746
755
|
placeholder: h = "select…",
|
|
747
756
|
searchPlaceholder: m,
|
|
748
757
|
emptyHint: g,
|
|
749
|
-
isLoading:
|
|
750
|
-
skeletonRowCount:
|
|
751
|
-
onError:
|
|
752
|
-
className:
|
|
753
|
-
glass:
|
|
754
|
-
portal:
|
|
755
|
-
|
|
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
|
|
756
766
|
}) {
|
|
757
|
-
const { isOpen:
|
|
758
|
-
function
|
|
759
|
-
const y =
|
|
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);
|
|
760
770
|
o(
|
|
761
|
-
i ? n.includes(y) ? n.filter((
|
|
771
|
+
i ? n.includes(y) ? n.filter((re) => re !== y) : [...n, y] : [y]
|
|
762
772
|
);
|
|
763
773
|
}
|
|
764
|
-
const
|
|
765
|
-
ref:
|
|
766
|
-
onClick:
|
|
767
|
-
"aria-expanded":
|
|
774
|
+
const Z = {
|
|
775
|
+
ref: S,
|
|
776
|
+
onClick: $,
|
|
777
|
+
"aria-expanded": C,
|
|
768
778
|
"aria-haspopup": "listbox"
|
|
769
779
|
};
|
|
770
|
-
return /* @__PURE__ */ _("div", { className:
|
|
771
|
-
u && /* @__PURE__ */ t("label", { className:
|
|
772
|
-
|
|
773
|
-
|
|
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,
|
|
774
784
|
{
|
|
775
|
-
triggerRef:
|
|
776
|
-
isOpen:
|
|
777
|
-
onClick:
|
|
778
|
-
selectedOptions:
|
|
785
|
+
triggerRef: S,
|
|
786
|
+
isOpen: C,
|
|
787
|
+
onClick: $,
|
|
788
|
+
selectedOptions: P,
|
|
779
789
|
multiSelect: i,
|
|
780
|
-
onOverflow:
|
|
781
|
-
placeholder:
|
|
790
|
+
onOverflow: p,
|
|
791
|
+
placeholder: A
|
|
782
792
|
}
|
|
783
793
|
),
|
|
784
|
-
|
|
785
|
-
|
|
794
|
+
C && /* @__PURE__ */ t(
|
|
795
|
+
bt,
|
|
786
796
|
{
|
|
787
797
|
options: e,
|
|
788
798
|
onSearch: r,
|
|
789
799
|
onCreate: a,
|
|
790
|
-
onPick:
|
|
791
|
-
onClose:
|
|
792
|
-
anchorRef:
|
|
800
|
+
onPick: K,
|
|
801
|
+
onClose: V,
|
|
802
|
+
anchorRef: S,
|
|
793
803
|
excluded: s,
|
|
794
804
|
multiSelect: i,
|
|
795
805
|
selectedAtTop: d,
|
|
796
806
|
selected: n,
|
|
797
807
|
placeholder: m,
|
|
798
808
|
emptyHint: g,
|
|
799
|
-
isLoading:
|
|
800
|
-
skeletonRowCount:
|
|
801
|
-
onError:
|
|
802
|
-
glass:
|
|
803
|
-
portal:
|
|
809
|
+
isLoading: w,
|
|
810
|
+
skeletonRowCount: B,
|
|
811
|
+
onError: x,
|
|
812
|
+
glass: D,
|
|
813
|
+
portal: W,
|
|
814
|
+
renderOption: H
|
|
804
815
|
}
|
|
805
816
|
)
|
|
806
817
|
] });
|
|
807
818
|
}
|
|
808
|
-
const
|
|
809
|
-
Btn:
|
|
810
|
-
Primary:
|
|
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,
|
|
811
822
|
Secondary: Ot,
|
|
812
|
-
Ghost:
|
|
813
|
-
IconDanger:
|
|
814
|
-
Danger:
|
|
815
|
-
},
|
|
816
|
-
primary:
|
|
817
|
-
secondary:
|
|
818
|
-
danger:
|
|
819
|
-
ghost:
|
|
820
|
-
iconDanger:
|
|
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
|
|
821
832
|
};
|
|
822
|
-
function
|
|
823
|
-
const a =
|
|
833
|
+
function To({ variant: e = "default", className: n, children: o, ...r }) {
|
|
834
|
+
const a = I("Button", n), s = e === "unstyled";
|
|
824
835
|
return /* @__PURE__ */ t(
|
|
825
836
|
"button",
|
|
826
837
|
{
|
|
827
838
|
type: "button",
|
|
828
839
|
...r,
|
|
829
|
-
className:
|
|
840
|
+
className: f(!s && F.Btn, !s && Ft[e], a),
|
|
830
841
|
children: o
|
|
831
842
|
}
|
|
832
843
|
);
|
|
833
844
|
}
|
|
834
|
-
const
|
|
835
|
-
ConfirmWrapper:
|
|
836
|
-
ConfirmContainer:
|
|
837
|
-
Glass:
|
|
838
|
-
ConfirmTitle:
|
|
839
|
-
ConfirmMessage:
|
|
840
|
-
ConfirmActions:
|
|
841
|
-
BtnCancel:
|
|
842
|
-
BtnConfirm:
|
|
843
|
-
BtnDanger:
|
|
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
|
|
844
855
|
};
|
|
845
|
-
function
|
|
856
|
+
function Do({
|
|
846
857
|
title: e,
|
|
847
858
|
message: n,
|
|
848
859
|
confirmLabel: o = "Confirm",
|
|
@@ -851,23 +862,23 @@ function To({
|
|
|
851
862
|
onConfirm: s,
|
|
852
863
|
onClose: i,
|
|
853
864
|
className: d,
|
|
854
|
-
glass:
|
|
865
|
+
glass: p = !1
|
|
855
866
|
}) {
|
|
856
|
-
const [u, h] =
|
|
867
|
+
const [u, h] = T(!1), m = I("ConfirmDialog", d);
|
|
857
868
|
function g() {
|
|
858
869
|
h(!0), Promise.resolve(s()).finally(() => {
|
|
859
870
|
h(!1), i();
|
|
860
871
|
});
|
|
861
872
|
}
|
|
862
|
-
return /* @__PURE__ */ t("div", { className:
|
|
863
|
-
/* @__PURE__ */ t("h2", { className:
|
|
864
|
-
/* @__PURE__ */ t("p", { className:
|
|
865
|
-
/* @__PURE__ */ _("div", { className:
|
|
866
|
-
/* @__PURE__ */ t("button", { className:
|
|
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 }),
|
|
867
878
|
/* @__PURE__ */ t(
|
|
868
879
|
"button",
|
|
869
880
|
{
|
|
870
|
-
className:
|
|
881
|
+
className: f(a ? k.BtnDanger : k.BtnConfirm),
|
|
871
882
|
type: "button",
|
|
872
883
|
onClick: g,
|
|
873
884
|
disabled: u,
|
|
@@ -877,25 +888,25 @@ function To({
|
|
|
877
888
|
] })
|
|
878
889
|
] }) });
|
|
879
890
|
}
|
|
880
|
-
const
|
|
881
|
-
InfoWrapper:
|
|
882
|
-
InfoContainer:
|
|
883
|
-
Glass:
|
|
884
|
-
InfoTitle:
|
|
885
|
-
InfoMessage:
|
|
886
|
-
InfoActions:
|
|
887
|
-
BtnClose:
|
|
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
|
|
888
899
|
};
|
|
889
|
-
function
|
|
890
|
-
const s =
|
|
891
|
-
return /* @__PURE__ */ t("div", { className:
|
|
892
|
-
/* @__PURE__ */ t("h2", { className:
|
|
893
|
-
/* @__PURE__ */ t("p", { className:
|
|
894
|
-
/* @__PURE__ */ t("div", { className:
|
|
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" }) })
|
|
895
906
|
] }) });
|
|
896
907
|
}
|
|
897
|
-
function
|
|
898
|
-
const o =
|
|
908
|
+
function Ro({ buttons: e, containerClassName: n }) {
|
|
909
|
+
const o = I("ModalActions", n);
|
|
899
910
|
return /* @__PURE__ */ t("div", { className: o, children: e.map((r, a) => /* @__PURE__ */ t(
|
|
900
911
|
"button",
|
|
901
912
|
{
|
|
@@ -908,8 +919,8 @@ function So({ buttons: e, containerClassName: n }) {
|
|
|
908
919
|
a
|
|
909
920
|
)) });
|
|
910
921
|
}
|
|
911
|
-
function
|
|
912
|
-
const r =
|
|
922
|
+
function ko({ onClick: e, disabled: n, className: o }) {
|
|
923
|
+
const r = I("ModalClose", o);
|
|
913
924
|
return /* @__PURE__ */ t(
|
|
914
925
|
"button",
|
|
915
926
|
{
|
|
@@ -937,109 +948,109 @@ function Ro({ onClick: e, disabled: n, className: o }) {
|
|
|
937
948
|
}
|
|
938
949
|
);
|
|
939
950
|
}
|
|
940
|
-
function
|
|
941
|
-
return /* @__PURE__ */ t(
|
|
951
|
+
function jo({ classNames: e, children: n }) {
|
|
952
|
+
return /* @__PURE__ */ t(me.Provider, { value: e, children: n });
|
|
942
953
|
}
|
|
943
|
-
var
|
|
944
|
-
const
|
|
945
|
-
function
|
|
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) {
|
|
946
957
|
return typeof e == "object" && e !== null;
|
|
947
958
|
}
|
|
948
|
-
function
|
|
959
|
+
function j(e) {
|
|
949
960
|
return typeof e == "string" ? e : "";
|
|
950
961
|
}
|
|
951
|
-
function
|
|
952
|
-
if (!
|
|
962
|
+
function co(e) {
|
|
963
|
+
if (!ne(e))
|
|
953
964
|
return { kind: "Unknown", typeUrl: "", raw: e };
|
|
954
|
-
const n =
|
|
965
|
+
const n = j(e["@type"]);
|
|
955
966
|
switch (n) {
|
|
956
|
-
case
|
|
957
|
-
const o =
|
|
967
|
+
case so: {
|
|
968
|
+
const o = ne(e.metadata) ? e.metadata : {}, r = {};
|
|
958
969
|
for (const a of Object.keys(o))
|
|
959
|
-
r[a] =
|
|
970
|
+
r[a] = j(o[a]);
|
|
960
971
|
return {
|
|
961
972
|
kind: "ErrorInfo",
|
|
962
|
-
reason:
|
|
963
|
-
domain:
|
|
973
|
+
reason: j(e.reason),
|
|
974
|
+
domain: j(e.domain),
|
|
964
975
|
metadata: r
|
|
965
976
|
};
|
|
966
977
|
}
|
|
967
|
-
case
|
|
978
|
+
case ao:
|
|
968
979
|
return { kind: "BadRequest", fieldViolations: (Array.isArray(e.fieldViolations) ? e.fieldViolations : []).map((a) => {
|
|
969
|
-
const s =
|
|
980
|
+
const s = ne(a) ? a : {};
|
|
970
981
|
return {
|
|
971
|
-
field:
|
|
972
|
-
description:
|
|
982
|
+
field: j(s.field),
|
|
983
|
+
description: j(s.description)
|
|
973
984
|
};
|
|
974
985
|
}) };
|
|
975
|
-
case
|
|
986
|
+
case io:
|
|
976
987
|
return { kind: "PreconditionFailure", violations: (Array.isArray(e.violations) ? e.violations : []).map((a) => {
|
|
977
|
-
const s =
|
|
988
|
+
const s = ne(a) ? a : {};
|
|
978
989
|
return {
|
|
979
|
-
type:
|
|
980
|
-
subject:
|
|
981
|
-
description:
|
|
990
|
+
type: j(s.type),
|
|
991
|
+
subject: j(s.subject),
|
|
992
|
+
description: j(s.description)
|
|
982
993
|
};
|
|
983
994
|
}) };
|
|
984
995
|
default:
|
|
985
996
|
return { kind: "Unknown", typeUrl: n, raw: e };
|
|
986
997
|
}
|
|
987
998
|
}
|
|
988
|
-
function
|
|
999
|
+
function Eo(e) {
|
|
989
1000
|
return e.kind === "ErrorInfo";
|
|
990
1001
|
}
|
|
991
|
-
function
|
|
1002
|
+
function Ao(e) {
|
|
992
1003
|
return e.kind === "BadRequest";
|
|
993
1004
|
}
|
|
994
|
-
function
|
|
1005
|
+
function bo(e) {
|
|
995
1006
|
return e.kind === "PreconditionFailure";
|
|
996
1007
|
}
|
|
997
|
-
class
|
|
1008
|
+
class te extends Error {
|
|
998
1009
|
constructor(n) {
|
|
999
1010
|
super(n.title), this.isRetryable = n.isRetryable ?? !1, this.grpcCode = n.grpcCode, this.details = n.details ?? [];
|
|
1000
1011
|
}
|
|
1001
1012
|
}
|
|
1002
|
-
function
|
|
1003
|
-
if (e instanceof
|
|
1013
|
+
function Bo(e) {
|
|
1014
|
+
if (e instanceof te) return e;
|
|
1004
1015
|
if (e instanceof Error && e.message === "Failed to fetch")
|
|
1005
|
-
return new
|
|
1016
|
+
return new te({ title: "Server unavailable. Try again later", isRetryable: !0 });
|
|
1006
1017
|
if (typeof e == "object" && e !== null && "code" in e) {
|
|
1007
|
-
const n = e, o = n.code ===
|
|
1008
|
-
return new
|
|
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 });
|
|
1009
1020
|
}
|
|
1010
|
-
return new
|
|
1021
|
+
return new te({ title: String(e), isRetryable: !1 });
|
|
1011
1022
|
}
|
|
1012
1023
|
export {
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
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,
|
|
1034
1045
|
pn as TelegramSignInButton,
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
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
|
|
1045
1056
|
};
|