@vervstack/chures 0.0.20 → 0.0.21
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 +566 -487
- package/dist/chures.umd.cjs +1 -1
- package/dist/grpc/codes.d.ts +19 -0
- package/dist/grpc/errdetails.d.ts +36 -0
- package/dist/grpc/index.d.ts +6 -0
- package/dist/grpc/parseGrpcError.d.ts +7 -0
- package/dist/grpc/parseGrpcError.test.d.ts +1 -0
- package/dist/grpc/serviceError.d.ts +12 -0
- package/dist/index.d.ts +1 -0
- package/package.json +3 -1
package/dist/chures.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
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_p7cfo_1{0%{opacity:0;transform:scale(.96) translateY(6px)}to{opacity:1;transform:none}}@keyframes _shimmer_p7cfo_1{0%{background-position:-200% center}to{background-position:200% center}}._DropdownContainer_p7cfo_13{position:relative;width:100%}._PanelWrapper_p7cfo_20{position:absolute;top:calc(100% + var(--chures-dropdown-panel-gap));left:0;width:100%;animation:_panelIn_p7cfo_1 .14s ease}._PanelWrapper_p7cfo_20._Portal_p7cfo_34{position:fixed;width:auto;margin-top:var(--chures-dropdown-panel-gap)}._PanelContainer_p7cfo_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_p7cfo_18._Glass_p7cfo_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_p7cfo_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_p7cfo_54._lifted_p7cfo_68{top:0;transform:translateY(-50%) scale(.82);background:var(--chures-input-bg);color:var(--chures-fg-muted)}._TriggerContainer_p7cfo_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_p7cfo_75:hover{border-color:var(--chures-dropdown-trigger-border-hover)}._TriggerContainer_p7cfo_75._Open_p7cfo_99{border-color:var(--chures-accent);box-shadow:0 0 0 .1875rem var(--chures-dropdown-trigger-focus-ring)}._TriggerPlaceholder_p7cfo_104{color:var(--chures-fg-muted);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerValue_p7cfo_112{color:var(--chures-fg);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerIcon_p7cfo_120{color:var(--chures-fg-muted);flex-shrink:0;display:flex;align-items:center}._ChipsWrapper_p7cfo_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_p7cfo_127::-webkit-scrollbar{display:none}._ChipsWrapper_p7cfo_127._Expand_p7cfo_145{flex-wrap:wrap;overflow:visible;row-gap:.25rem}._TriggerContainer_p7cfo_75._MultiSelect_p7cfo_151 ._TriggerIcon_p7cfo_120{align-self:flex-start;height:var(--chures-input-height)}._TriggerContainer_p7cfo_75._ExpandHeight_p7cfo_156{height:auto;min-height:var(--chures-input-height)}._Chip_p7cfo_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_p7cfo_175{padding:.5rem;border-bottom:1px solid var(--chures-dropdown-border-subtle)}._SearchBox_p7cfo_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_p7cfo_190{display:flex;align-items:center;color:var(--chures-fg-muted);flex-shrink:0}._SearchInput_p7cfo_197{flex:1;background:transparent;border:none;outline:none;font-size:var(--chures-font-sm);color:var(--chures-fg);font-family:inherit}._SearchInput_p7cfo_197::placeholder{color:var(--chures-fg-muted)}._ResultsList_p7cfo_211{max-height:13rem;overflow-y:auto}._OptionRow_p7cfo_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_p7cfo_216:hover{background:var(--chures-dropdown-hover);color:var(--chures-fg)}._OptionRow_p7cfo_216._Selected_p7cfo_231{color:var(--chures-fg)}._Checkmark_p7cfo_236{color:var(--chures-accent);font-size:var(--chures-font-xs);flex-shrink:0}._CreateRow_p7cfo_242{display:flex;align-items:center;gap:.625rem;padding:.5625rem .875rem;cursor:pointer;background:var(--chures-dropdown-create-bg);transition:background .1s ease}._CreateRow_p7cfo_242:hover{background:var(--chures-dropdown-create-bg-hover)}._CreateRow_p7cfo_242._WithBorder_p7cfo_255{border-top:1px solid var(--chures-dropdown-border-subtle)}._CreateIcon_p7cfo_260{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_p7cfo_272{font-size:var(--chures-font-sm);font-weight:600;color:var(--chures-fg)}._EmptyHint_p7cfo_278{padding:.75rem .875rem;font-size:var(--chures-font-sm);color:var(--chures-fg-muted);font-style:italic}._SkeletonRow_p7cfo_285{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_p7cfo_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
|
|
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 u, Fragment as A } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as me, useContext as he, useRef as K, useState as L, useEffect as j, forwardRef as ge, useCallback as ie, useLayoutEffect as Ce } from "react";
|
|
4
|
+
import { AnimatePresence as ve, motion as Ne } from "framer-motion";
|
|
5
|
+
import { create as Ie } from "zustand";
|
|
6
|
+
import { createPortal as we } from "react-dom";
|
|
7
|
+
function ye(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 te = { exports: {} };
|
|
11
|
+
var ce;
|
|
12
|
+
function Le() {
|
|
13
|
+
return ce || (ce = 1, (function(e) {
|
|
14
14
|
(function() {
|
|
15
|
-
var
|
|
15
|
+
var n = {}.hasOwnProperty;
|
|
16
16
|
function o() {
|
|
17
|
-
for (var s = "",
|
|
18
|
-
var
|
|
19
|
-
|
|
17
|
+
for (var s = "", i = 0; i < arguments.length; i++) {
|
|
18
|
+
var c = arguments[i];
|
|
19
|
+
c && (s = a(s, r(c)));
|
|
20
20
|
}
|
|
21
21
|
return s;
|
|
22
22
|
}
|
|
@@ -29,146 +29,146 @@ function we() {
|
|
|
29
29
|
return o.apply(null, s);
|
|
30
30
|
if (s.toString !== Object.prototype.toString && !s.toString.toString().includes("[native code]"))
|
|
31
31
|
return s.toString();
|
|
32
|
-
var
|
|
33
|
-
for (var
|
|
34
|
-
|
|
35
|
-
return
|
|
32
|
+
var i = "";
|
|
33
|
+
for (var c in s)
|
|
34
|
+
n.call(s, c) && s[c] && (i = a(i, c));
|
|
35
|
+
return i;
|
|
36
36
|
}
|
|
37
|
-
function a(s,
|
|
38
|
-
return
|
|
37
|
+
function a(s, i) {
|
|
38
|
+
return i ? s ? s + " " + i : s + i : s;
|
|
39
39
|
}
|
|
40
40
|
e.exports ? (o.default = o, e.exports = o) : window.classNames = o;
|
|
41
41
|
})();
|
|
42
|
-
})(
|
|
43
|
-
}
|
|
44
|
-
var
|
|
45
|
-
const _ = /* @__PURE__ */
|
|
46
|
-
LoaderContainer:
|
|
47
|
-
sm:
|
|
48
|
-
md:
|
|
49
|
-
lg:
|
|
50
|
-
Arc1:
|
|
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 =
|
|
71
|
-
return
|
|
72
|
-
}
|
|
73
|
-
function
|
|
42
|
+
})(te)), te.exports;
|
|
43
|
+
}
|
|
44
|
+
var Te = Le();
|
|
45
|
+
const _ = /* @__PURE__ */ ye(Te), Se = "_LoaderContainer_wa8op_24", De = "_sm_wa8op_31", Re = "_md_wa8op_32", ke = "_lg_wa8op_33", Ee = "_Arc1_wa8op_37", Ae = "_Arc2_wa8op_38", be = "_Arc3_wa8op_39", Be = "_spin_wa8op_1", xe = "_Ring1_wa8op_71", We = "_Ring2_wa8op_72", Oe = "_Ring3_wa8op_73", Pe = "_ripple_wa8op_1", Me = "_Dot1_wa8op_86", Ue = "_Dot2_wa8op_87", Fe = "_Dot3_wa8op_88", je = "_dotPulse_wa8op_1", qe = "_Wave1_wa8op_105", Ge = "_Wave2_wa8op_106", Ve = "_Wave3_wa8op_107", $e = "_Wave4_wa8op_108", He = "_Wave5_wa8op_109", ze = "_waveBounce_wa8op_1", Q = {
|
|
46
|
+
LoaderContainer: Se,
|
|
47
|
+
sm: De,
|
|
48
|
+
md: Re,
|
|
49
|
+
lg: ke,
|
|
50
|
+
Arc1: Ee,
|
|
51
|
+
Arc2: Ae,
|
|
52
|
+
Arc3: be,
|
|
53
|
+
spin: Be,
|
|
54
|
+
Ring1: xe,
|
|
55
|
+
Ring2: We,
|
|
56
|
+
Ring3: Oe,
|
|
57
|
+
ripple: Pe,
|
|
58
|
+
Dot1: Me,
|
|
59
|
+
Dot2: Ue,
|
|
60
|
+
Dot3: Fe,
|
|
61
|
+
dotPulse: je,
|
|
62
|
+
Wave1: qe,
|
|
63
|
+
Wave2: Ge,
|
|
64
|
+
Wave3: Ve,
|
|
65
|
+
Wave4: $e,
|
|
66
|
+
Wave5: He,
|
|
67
|
+
waveBounce: ze
|
|
68
|
+
}, de = me({});
|
|
69
|
+
function N(e, n) {
|
|
70
|
+
const o = he(de);
|
|
71
|
+
return n ?? o[e];
|
|
72
|
+
}
|
|
73
|
+
function Ke(e, n) {
|
|
74
74
|
switch (e) {
|
|
75
75
|
case "ripple":
|
|
76
|
-
return /* @__PURE__ */ u(
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
77
|
+
/* @__PURE__ */ t("div", { className: n.Ring1 }),
|
|
78
|
+
/* @__PURE__ */ t("div", { className: n.Ring2 }),
|
|
79
|
+
/* @__PURE__ */ t("div", { className: n.Ring3 })
|
|
80
80
|
] });
|
|
81
81
|
case "dots":
|
|
82
|
-
return /* @__PURE__ */ u(
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
83
|
+
/* @__PURE__ */ t("div", { className: n.Dot1 }),
|
|
84
|
+
/* @__PURE__ */ t("div", { className: n.Dot2 }),
|
|
85
|
+
/* @__PURE__ */ t("div", { className: n.Dot3 })
|
|
86
86
|
] });
|
|
87
87
|
case "wave":
|
|
88
|
-
return /* @__PURE__ */ u(
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ u(A, { 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 })
|
|
94
94
|
] });
|
|
95
95
|
default:
|
|
96
|
-
return /* @__PURE__ */ u(
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
96
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
97
|
+
/* @__PURE__ */ t("div", { className: n.Arc1 }),
|
|
98
|
+
/* @__PURE__ */ t("div", { className: n.Arc2 }),
|
|
99
|
+
/* @__PURE__ */ t("div", { className: n.Arc3 })
|
|
100
100
|
] });
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
const a =
|
|
105
|
-
return /* @__PURE__ */
|
|
103
|
+
function Xe({ variant: e = "arcs", size: n = "md", color: o, className: r }) {
|
|
104
|
+
const a = N("Loader", r);
|
|
105
|
+
return /* @__PURE__ */ t(
|
|
106
106
|
"div",
|
|
107
107
|
{
|
|
108
|
-
className: _(
|
|
108
|
+
className: _(Q.LoaderContainer, Q[n], Q[e], a),
|
|
109
109
|
role: "status",
|
|
110
110
|
"aria-label": "Loading",
|
|
111
111
|
style: o ? { "--chures-accent": o } : void 0,
|
|
112
|
-
children:
|
|
112
|
+
children: Ke(e, Q)
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
|
-
const
|
|
117
|
-
LoadingWrapperContainer:
|
|
118
|
-
SkeletonWrapper:
|
|
116
|
+
const Ye = "_LoadingWrapperContainer_1q0w7_1", Qe = "_SkeletonWrapper_1q0w7_9", le = {
|
|
117
|
+
LoadingWrapperContainer: Ye,
|
|
118
|
+
SkeletonWrapper: Qe
|
|
119
119
|
};
|
|
120
|
-
function
|
|
121
|
-
const s =
|
|
122
|
-
return e ? o ? /* @__PURE__ */
|
|
120
|
+
function ro({ isLoading: e, children: n, skeleton: o, loaderProps: r, className: a }) {
|
|
121
|
+
const s = N("LoadingWrapper", a);
|
|
122
|
+
return e ? o ? /* @__PURE__ */ t("div", { className: _(le.SkeletonWrapper, s), children: o }) : /* @__PURE__ */ t("div", { className: _(le.LoadingWrapperContainer, s), children: /* @__PURE__ */ t(Xe, { ...r }) }) : /* @__PURE__ */ t(A, { children: n });
|
|
123
123
|
}
|
|
124
|
-
const
|
|
125
|
-
function
|
|
126
|
-
const { botId:
|
|
124
|
+
const Je = "https://oauth.telegram.org/js/telegram-login.js?3";
|
|
125
|
+
function Ze(e) {
|
|
126
|
+
const { botId: n, redirectUri: o, requestAccess: r = "write" } = e, a = K(e.onSuccess);
|
|
127
127
|
a.current = e.onSuccess;
|
|
128
|
-
const s =
|
|
128
|
+
const s = K(!1), [i, c] = L(!1), [p, d] = L(!1);
|
|
129
129
|
j(function() {
|
|
130
|
-
if (!
|
|
131
|
-
const
|
|
132
|
-
d(!0),
|
|
130
|
+
if (!n) return;
|
|
131
|
+
const h = o ?? window.location.origin;
|
|
132
|
+
d(!0), c(!1);
|
|
133
133
|
const g = document.createElement("script");
|
|
134
|
-
return g.src =
|
|
134
|
+
return g.src = Je, g.async = !0, g.onload = function() {
|
|
135
135
|
const I = window.Telegram;
|
|
136
136
|
I && (I.Login.init(
|
|
137
|
-
{ client_id:
|
|
138
|
-
function(
|
|
139
|
-
s.current || (s.current = !0, a.current(
|
|
137
|
+
{ client_id: n, redirect_uri: h },
|
|
138
|
+
function(b) {
|
|
139
|
+
s.current || (s.current = !0, a.current(b));
|
|
140
140
|
}
|
|
141
|
-
),
|
|
141
|
+
), c(!0)), d(!1);
|
|
142
142
|
}, g.onerror = function() {
|
|
143
143
|
d(!1);
|
|
144
144
|
}, document.head.appendChild(g), function() {
|
|
145
|
-
document.head.contains(g) && document.head.removeChild(g),
|
|
145
|
+
document.head.contains(g) && document.head.removeChild(g), c(!1), d(!1);
|
|
146
146
|
};
|
|
147
|
-
}, [
|
|
148
|
-
function
|
|
149
|
-
const
|
|
150
|
-
if (!
|
|
147
|
+
}, [n, o]);
|
|
148
|
+
function m() {
|
|
149
|
+
const h = window.Telegram;
|
|
150
|
+
if (!i || !h) return;
|
|
151
151
|
s.current = !1;
|
|
152
152
|
const g = o ?? window.location.origin;
|
|
153
|
-
|
|
154
|
-
{ client_id:
|
|
153
|
+
h.Login.auth(
|
|
154
|
+
{ client_id: n, redirect_uri: g, request_access: r },
|
|
155
155
|
function(I) {
|
|
156
156
|
s.current || (s.current = !0, a.current(I));
|
|
157
157
|
}
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
|
-
return { login:
|
|
160
|
+
return { login: m, isReady: i, isLoading: p };
|
|
161
161
|
}
|
|
162
|
-
const
|
|
163
|
-
TelegramSignInButtonContainer:
|
|
164
|
-
FullSize:
|
|
165
|
-
Icon:
|
|
166
|
-
},
|
|
162
|
+
const en = "_TelegramSignInButtonContainer_10wun_1", nn = "_FullSize_10wun_46", tn = "_Icon_10wun_50", oe = {
|
|
163
|
+
TelegramSignInButtonContainer: en,
|
|
164
|
+
FullSize: nn,
|
|
165
|
+
Icon: tn
|
|
166
|
+
}, on = {
|
|
167
167
|
en: "Continue with Telegram",
|
|
168
168
|
ru: "Войти через Telegram"
|
|
169
169
|
};
|
|
170
|
-
function
|
|
171
|
-
return /* @__PURE__ */
|
|
170
|
+
function rn() {
|
|
171
|
+
return /* @__PURE__ */ t(
|
|
172
172
|
"svg",
|
|
173
173
|
{
|
|
174
174
|
viewBox: "0 0 24 24",
|
|
@@ -176,61 +176,61 @@ function en() {
|
|
|
176
176
|
height: "20",
|
|
177
177
|
fill: "currentColor",
|
|
178
178
|
"aria-hidden": "true",
|
|
179
|
-
className:
|
|
180
|
-
children: /* @__PURE__ */
|
|
179
|
+
className: oe.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" })
|
|
181
181
|
}
|
|
182
182
|
);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function sn({
|
|
185
185
|
onClick: e,
|
|
186
|
-
disabled:
|
|
186
|
+
disabled: n,
|
|
187
187
|
lang: o = "en",
|
|
188
188
|
title: r,
|
|
189
189
|
label: a,
|
|
190
190
|
fullSize: s,
|
|
191
|
-
className:
|
|
191
|
+
className: i
|
|
192
192
|
}) {
|
|
193
193
|
j(function() {
|
|
194
|
-
const
|
|
195
|
-
if (document.getElementById(
|
|
196
|
-
const
|
|
197
|
-
|
|
194
|
+
const m = "comfortaa-font";
|
|
195
|
+
if (document.getElementById(m)) return;
|
|
196
|
+
const h = document.createElement("link");
|
|
197
|
+
h.id = m, h.rel = "stylesheet", h.href = "https://fonts.googleapis.com/css2?family=Comfortaa:wght@600&display=swap", document.head.appendChild(h);
|
|
198
198
|
}, []);
|
|
199
|
-
const
|
|
200
|
-
return /* @__PURE__ */ u("button", { type: "button", className: d, onClick: e, disabled:
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
|
|
199
|
+
const c = a ?? r ?? on[o], p = N("TelegramSignInButton", i), d = _(oe.TelegramSignInButtonContainer, { [oe.FullSize]: s }, p);
|
|
200
|
+
return /* @__PURE__ */ u("button", { type: "button", className: d, onClick: e, disabled: n, children: [
|
|
201
|
+
/* @__PURE__ */ t(rn, {}),
|
|
202
|
+
c
|
|
203
203
|
] });
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function so({
|
|
206
206
|
botId: e,
|
|
207
|
-
onSuccess:
|
|
207
|
+
onSuccess: n,
|
|
208
208
|
lang: o,
|
|
209
209
|
title: r,
|
|
210
210
|
redirectUri: a,
|
|
211
211
|
requestAccess: s,
|
|
212
|
-
children:
|
|
213
|
-
className:
|
|
212
|
+
children: i,
|
|
213
|
+
className: c
|
|
214
214
|
}) {
|
|
215
|
-
const { login: p, isReady: d } =
|
|
216
|
-
return
|
|
217
|
-
|
|
215
|
+
const { login: p, isReady: d } = Ze({ botId: e, onSuccess: n, redirectUri: a, requestAccess: s });
|
|
216
|
+
return i ? /* @__PURE__ */ t(A, { children: i({ login: p, isReady: d }) }) : /* @__PURE__ */ t(
|
|
217
|
+
sn,
|
|
218
218
|
{
|
|
219
219
|
onClick: p,
|
|
220
220
|
disabled: !d,
|
|
221
221
|
lang: o,
|
|
222
222
|
title: r,
|
|
223
|
-
className:
|
|
223
|
+
className: c
|
|
224
224
|
}
|
|
225
225
|
);
|
|
226
226
|
}
|
|
227
|
-
let
|
|
228
|
-
const
|
|
227
|
+
let an = 0;
|
|
228
|
+
const ue = Ie((e, n) => ({
|
|
229
229
|
toasts: [],
|
|
230
230
|
bake: (o) => {
|
|
231
|
-
const r =
|
|
231
|
+
const r = an++;
|
|
232
232
|
e((a) => ({ toasts: [...a.toasts, { ...o, id: r }] })), setTimeout(() => {
|
|
233
|
-
|
|
233
|
+
n().dismiss(r);
|
|
234
234
|
}, 5e3);
|
|
235
235
|
},
|
|
236
236
|
dismiss: (o) => {
|
|
@@ -238,211 +238,211 @@ const ce = ge((e, t) => ({
|
|
|
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
|
+
})), cn = "_ToastContainer_1tme2_1", ln = "_Toast_1tme2_1", dn = "_error_1tme2_33", un = "_warn_1tme2_41", _n = "_info_1tme2_49", fn = "_Description_1tme2_53", pn = "_DismissButton_1tme2_59", mn = "_slideIn_1tme2_79", hn = "_slideOut_1tme2_83", D = {
|
|
242
|
+
ToastContainer: cn,
|
|
243
|
+
Toast: ln,
|
|
244
|
+
error: dn,
|
|
245
|
+
warn: un,
|
|
246
|
+
info: _n,
|
|
247
|
+
Description: fn,
|
|
248
|
+
DismissButton: pn,
|
|
249
|
+
slideIn: mn,
|
|
250
|
+
slideOut: hn
|
|
251
251
|
};
|
|
252
|
-
function
|
|
253
|
-
const { toasts:
|
|
254
|
-
return /* @__PURE__ */
|
|
255
|
-
|
|
252
|
+
function ao({ className: e } = {}) {
|
|
253
|
+
const { toasts: n } = ue(), o = N("Toaster", e);
|
|
254
|
+
return /* @__PURE__ */ t("div", { className: _(D.ToastContainer, o), children: /* @__PURE__ */ t(ve, { children: n.map((r) => /* @__PURE__ */ t(
|
|
255
|
+
Ne.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__ */
|
|
262
|
+
children: /* @__PURE__ */ t(gn, { ...r })
|
|
263
263
|
},
|
|
264
264
|
r.id
|
|
265
265
|
)) }) });
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
const [s,
|
|
267
|
+
function gn({ id: e, title: n, description: o, level: r, isDismissable: a }) {
|
|
268
|
+
const [s, i] = L(!1), c = ue();
|
|
269
269
|
return j(() => () => {
|
|
270
|
-
|
|
270
|
+
i(!0);
|
|
271
271
|
}, []), /* @__PURE__ */ u(
|
|
272
272
|
"div",
|
|
273
273
|
{
|
|
274
|
-
className: _(
|
|
275
|
-
[
|
|
276
|
-
[
|
|
277
|
-
[
|
|
278
|
-
[
|
|
279
|
-
[
|
|
274
|
+
className: _(D.Toast, {
|
|
275
|
+
[D.error]: r === "Error",
|
|
276
|
+
[D.warn]: r === "Warn",
|
|
277
|
+
[D.info]: r == null || r === "Info",
|
|
278
|
+
[D.slideIn]: !s,
|
|
279
|
+
[D.slideOut]: s
|
|
280
280
|
}),
|
|
281
281
|
children: [
|
|
282
|
-
/* @__PURE__ */
|
|
283
|
-
/* @__PURE__ */
|
|
284
|
-
a && e !== void 0 && /* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ t("div", { children: n }),
|
|
283
|
+
/* @__PURE__ */ t("div", { className: D.Description, children: o }),
|
|
284
|
+
a && e !== void 0 && /* @__PURE__ */ t("div", { className: D.DismissButton, onClick: () => c.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__ */
|
|
305
|
-
|
|
306
|
-
/* @__PURE__ */
|
|
289
|
+
const Cn = "_InputContainer_1uu20_15", vn = "_InputField_1uu20_21", Nn = "_hasStartIcon_1uu20_35", In = "_hasEndIcon_1uu20_39", wn = "_StartIcon_1uu20_43", yn = "_EndIcon_1uu20_54", Ln = "_hasError_1uu20_69", Tn = "_disabled_1uu20_74", Sn = "_Label_1uu20_79", Dn = "_lifted_1uu20_93", Rn = "_ErrorText_1uu20_104", kn = "_Skeleton_1uu20_112", v = {
|
|
290
|
+
InputContainer: Cn,
|
|
291
|
+
InputField: vn,
|
|
292
|
+
hasStartIcon: Nn,
|
|
293
|
+
hasEndIcon: In,
|
|
294
|
+
StartIcon: wn,
|
|
295
|
+
EndIcon: yn,
|
|
296
|
+
hasError: Ln,
|
|
297
|
+
disabled: Tn,
|
|
298
|
+
Label: Sn,
|
|
299
|
+
lifted: Dn,
|
|
300
|
+
ErrorText: Rn,
|
|
301
|
+
Skeleton: kn
|
|
302
|
+
}, io = ge(function({ value: n, setValue: o, label: r, isLoader: a, type: s = "text", disabled: i, error: c, className: p, inputClassName: d, startIcon: m, endIcon: h, ...g }, I) {
|
|
303
|
+
const [b, B] = L(!1), q = b || n.length > 0, R = N("Input", p), { onFocus: G, onBlur: M, ...w } = g;
|
|
304
|
+
return a ? /* @__PURE__ */ t("div", { className: _(v.Skeleton, R), "aria-hidden": "true" }) : /* @__PURE__ */ u("div", { className: _(v.InputContainer, { [v.hasError]: !!c, [v.disabled]: i }, R), children: [
|
|
305
|
+
m && /* @__PURE__ */ t("span", { className: v.StartIcon, children: m }),
|
|
306
|
+
/* @__PURE__ */ t(
|
|
307
307
|
"input",
|
|
308
308
|
{
|
|
309
309
|
ref: I,
|
|
310
|
-
className: _(v.InputField, { [v.hasStartIcon]: !!
|
|
310
|
+
className: _(v.InputField, { [v.hasStartIcon]: !!m, [v.hasEndIcon]: !!h }, d),
|
|
311
311
|
type: s,
|
|
312
|
-
value:
|
|
312
|
+
value: n,
|
|
313
313
|
onChange: (C) => o(C.target.value),
|
|
314
314
|
onFocus: (C) => {
|
|
315
|
-
|
|
315
|
+
B(!0), G?.(C);
|
|
316
316
|
},
|
|
317
317
|
onBlur: (C) => {
|
|
318
|
-
|
|
318
|
+
B(!1), M?.(C);
|
|
319
319
|
},
|
|
320
|
-
disabled:
|
|
321
|
-
...
|
|
320
|
+
disabled: i,
|
|
321
|
+
...w
|
|
322
322
|
}
|
|
323
323
|
),
|
|
324
|
-
r && /* @__PURE__ */
|
|
325
|
-
|
|
326
|
-
|
|
324
|
+
r && /* @__PURE__ */ t("label", { className: _(v.Label, { [v.lifted]: q }), children: r }),
|
|
325
|
+
h && /* @__PURE__ */ t("span", { className: v.EndIcon, children: h }),
|
|
326
|
+
c && /* @__PURE__ */ t("span", { className: v.ErrorText, children: c })
|
|
327
327
|
] });
|
|
328
|
-
}),
|
|
329
|
-
ToggleContainer:
|
|
330
|
-
disabled:
|
|
331
|
-
Track:
|
|
332
|
-
on:
|
|
333
|
-
Thumb:
|
|
334
|
-
Label:
|
|
335
|
-
LabelSkeleton:
|
|
336
|
-
Skeleton:
|
|
328
|
+
}), En = "_ToggleContainer_1jetc_6", An = "_disabled_1jetc_13", bn = "_Track_1jetc_18", Bn = "_on_1jetc_31", xn = "_Thumb_1jetc_39", Wn = "_Label_1jetc_57", On = "_LabelSkeleton_1jetc_63", Pn = "_Skeleton_1jetc_78", y = {
|
|
329
|
+
ToggleContainer: En,
|
|
330
|
+
disabled: An,
|
|
331
|
+
Track: bn,
|
|
332
|
+
on: Bn,
|
|
333
|
+
Thumb: xn,
|
|
334
|
+
Label: Wn,
|
|
335
|
+
LabelSkeleton: On,
|
|
336
|
+
Skeleton: Pn
|
|
337
337
|
};
|
|
338
|
-
function
|
|
339
|
-
const p = !!o ||
|
|
340
|
-
return s ? p ? /* @__PURE__ */ u("div", { className: _(
|
|
341
|
-
r === "left" &&
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
-
r === "right" &&
|
|
344
|
-
] }) : /* @__PURE__ */
|
|
345
|
-
r === "left" &&
|
|
346
|
-
/* @__PURE__ */
|
|
338
|
+
function co({ checked: e, onChange: n, label: o, labelPosition: r = "right", disabled: a, isLoader: s, isLoadingLabel: i, className: c }) {
|
|
339
|
+
const p = !!o || i, d = N("Toggle", c), m = i ? /* @__PURE__ */ t("span", { className: y.LabelSkeleton, "aria-hidden": "true" }) : o ? /* @__PURE__ */ t("span", { className: y.Label, children: o }) : null;
|
|
340
|
+
return s ? p ? /* @__PURE__ */ u("div", { className: _(y.ToggleContainer, d), children: [
|
|
341
|
+
r === "left" && m,
|
|
342
|
+
/* @__PURE__ */ t("div", { className: y.Skeleton, "aria-hidden": "true" }),
|
|
343
|
+
r === "right" && m
|
|
344
|
+
] }) : /* @__PURE__ */ t("div", { className: _(y.Skeleton, d), "aria-hidden": "true" }) : /* @__PURE__ */ u("label", { className: _(y.ToggleContainer, { [y.disabled]: a }, d), children: [
|
|
345
|
+
r === "left" && m,
|
|
346
|
+
/* @__PURE__ */ t(
|
|
347
347
|
"button",
|
|
348
348
|
{
|
|
349
349
|
role: "switch",
|
|
350
350
|
"aria-checked": e,
|
|
351
|
-
className: _(
|
|
352
|
-
onClick: () => !a &&
|
|
351
|
+
className: _(y.Track, { [y.on]: e }),
|
|
352
|
+
onClick: () => !a && n(!e),
|
|
353
353
|
disabled: a,
|
|
354
354
|
type: "button",
|
|
355
|
-
children: /* @__PURE__ */
|
|
355
|
+
children: /* @__PURE__ */ t("span", { className: y.Thumb })
|
|
356
356
|
}
|
|
357
357
|
),
|
|
358
|
-
r === "right" &&
|
|
358
|
+
r === "right" && m
|
|
359
359
|
] });
|
|
360
360
|
}
|
|
361
|
-
function
|
|
362
|
-
const [e,
|
|
361
|
+
function Mn() {
|
|
362
|
+
const [e, n] = L(!1), o = K(null), r = ie(() => n((s) => !s), []), a = ie(() => n(!1), []);
|
|
363
363
|
return { isOpen: e, triggerRef: o, toggleOpen: r, close: a };
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function Un(e, n, o) {
|
|
366
366
|
j(() => {
|
|
367
367
|
function r(s) {
|
|
368
|
-
const
|
|
369
|
-
e.current?.contains(
|
|
368
|
+
const i = s.target;
|
|
369
|
+
e.current?.contains(i) || o?.current?.contains(i) || n();
|
|
370
370
|
}
|
|
371
371
|
function a(s) {
|
|
372
|
-
s.key === "Escape" &&
|
|
372
|
+
s.key === "Escape" && n();
|
|
373
373
|
}
|
|
374
374
|
return document.addEventListener("mousedown", r, !0), document.addEventListener("keydown", a), () => {
|
|
375
375
|
document.removeEventListener("mousedown", r, !0), document.removeEventListener("keydown", a);
|
|
376
376
|
};
|
|
377
|
-
}, [
|
|
377
|
+
}, [n, e, o]);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
const [o, r] =
|
|
379
|
+
function Fn(e, n) {
|
|
380
|
+
const [o, r] = L([]);
|
|
381
381
|
return j(() => {
|
|
382
|
-
if (!
|
|
382
|
+
if (!n) return;
|
|
383
383
|
let a = !1;
|
|
384
|
-
return
|
|
384
|
+
return n(e).then((s) => {
|
|
385
385
|
a || r(s);
|
|
386
386
|
}), () => {
|
|
387
387
|
a = !0;
|
|
388
388
|
};
|
|
389
|
-
}, [e,
|
|
389
|
+
}, [e, n]), o;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function P(e) {
|
|
392
392
|
return typeof e == "string" ? e : e.id;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function ee(e) {
|
|
395
395
|
return typeof e == "string" ? e : e.name;
|
|
396
396
|
}
|
|
397
|
-
function
|
|
398
|
-
return e.map((o) =>
|
|
399
|
-
}
|
|
400
|
-
const
|
|
401
|
-
DropdownContainer:
|
|
402
|
-
PanelWrapper:
|
|
403
|
-
Portal:
|
|
404
|
-
PanelContainer:
|
|
405
|
-
Glass:
|
|
406
|
-
Label:
|
|
407
|
-
lifted:
|
|
408
|
-
TriggerContainer:
|
|
409
|
-
Open:
|
|
410
|
-
TriggerPlaceholder:
|
|
411
|
-
TriggerValue:
|
|
412
|
-
TriggerIcon:
|
|
413
|
-
ChipsWrapper:
|
|
414
|
-
Expand:
|
|
415
|
-
MultiSelect:
|
|
416
|
-
ExpandHeight:
|
|
417
|
-
Chip:
|
|
418
|
-
SearchRow:
|
|
419
|
-
SearchBox:
|
|
420
|
-
SearchIcon:
|
|
421
|
-
SearchInput:
|
|
422
|
-
ResultsList:
|
|
423
|
-
OptionRow:
|
|
424
|
-
Selected:
|
|
425
|
-
Checkmark:
|
|
426
|
-
CreateRow:
|
|
427
|
-
WithBorder:
|
|
428
|
-
CreateIcon:
|
|
429
|
-
CreateLabel:
|
|
430
|
-
EmptyHint:
|
|
431
|
-
SkeletonRow:
|
|
397
|
+
function jn(e, n) {
|
|
398
|
+
return e.map((o) => n.find((r) => P(r) === o) ?? o);
|
|
399
|
+
}
|
|
400
|
+
const qn = "_DropdownContainer_p7cfo_13", Gn = "_PanelWrapper_p7cfo_20", Vn = "_Portal_p7cfo_34", $n = "_PanelContainer_p7cfo_18", Hn = "_Glass_p7cfo_48", zn = "_Label_p7cfo_54", Kn = "_lifted_p7cfo_68", Xn = "_TriggerContainer_p7cfo_75", Yn = "_Open_p7cfo_99", Qn = "_TriggerPlaceholder_p7cfo_104", Jn = "_TriggerValue_p7cfo_112", Zn = "_TriggerIcon_p7cfo_120", et = "_ChipsWrapper_p7cfo_127", nt = "_Expand_p7cfo_145", tt = "_MultiSelect_p7cfo_151", ot = "_ExpandHeight_p7cfo_156", rt = "_Chip_p7cfo_127", st = "_SearchRow_p7cfo_175", at = "_SearchBox_p7cfo_180", it = "_SearchIcon_p7cfo_190", ct = "_SearchInput_p7cfo_197", lt = "_ResultsList_p7cfo_211", dt = "_OptionRow_p7cfo_216", ut = "_Selected_p7cfo_231", _t = "_Checkmark_p7cfo_236", ft = "_CreateRow_p7cfo_242", pt = "_WithBorder_p7cfo_255", mt = "_CreateIcon_p7cfo_260", ht = "_CreateLabel_p7cfo_272", gt = "_EmptyHint_p7cfo_278", Ct = "_SkeletonRow_p7cfo_285", l = {
|
|
401
|
+
DropdownContainer: qn,
|
|
402
|
+
PanelWrapper: Gn,
|
|
403
|
+
Portal: Vn,
|
|
404
|
+
PanelContainer: $n,
|
|
405
|
+
Glass: Hn,
|
|
406
|
+
Label: zn,
|
|
407
|
+
lifted: Kn,
|
|
408
|
+
TriggerContainer: Xn,
|
|
409
|
+
Open: Yn,
|
|
410
|
+
TriggerPlaceholder: Qn,
|
|
411
|
+
TriggerValue: Jn,
|
|
412
|
+
TriggerIcon: Zn,
|
|
413
|
+
ChipsWrapper: et,
|
|
414
|
+
Expand: nt,
|
|
415
|
+
MultiSelect: tt,
|
|
416
|
+
ExpandHeight: ot,
|
|
417
|
+
Chip: rt,
|
|
418
|
+
SearchRow: st,
|
|
419
|
+
SearchBox: at,
|
|
420
|
+
SearchIcon: it,
|
|
421
|
+
SearchInput: ct,
|
|
422
|
+
ResultsList: lt,
|
|
423
|
+
OptionRow: dt,
|
|
424
|
+
Selected: ut,
|
|
425
|
+
Checkmark: _t,
|
|
426
|
+
CreateRow: ft,
|
|
427
|
+
WithBorder: pt,
|
|
428
|
+
CreateIcon: mt,
|
|
429
|
+
CreateLabel: ht,
|
|
430
|
+
EmptyHint: gt,
|
|
431
|
+
SkeletonRow: Ct
|
|
432
432
|
};
|
|
433
|
-
function
|
|
433
|
+
function vt({ query: e, withBorder: n, onCreate: o }) {
|
|
434
434
|
function r(a) {
|
|
435
435
|
a.preventDefault(), o();
|
|
436
436
|
}
|
|
437
437
|
return /* @__PURE__ */ u(
|
|
438
438
|
"div",
|
|
439
439
|
{
|
|
440
|
-
className: _(l.CreateRow,
|
|
440
|
+
className: _(l.CreateRow, n && l.WithBorder),
|
|
441
441
|
onMouseDown: r,
|
|
442
442
|
children: [
|
|
443
|
-
/* @__PURE__ */
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ t("span", { className: l.CreateIcon, children: /* @__PURE__ */ u("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", children: [
|
|
444
|
+
/* @__PURE__ */ t("line", { x1: "5", y1: "1", x2: "5", y2: "9" }),
|
|
445
|
+
/* @__PURE__ */ t("line", { x1: "1", y1: "5", x2: "9", y2: "5" })
|
|
446
446
|
] }) }),
|
|
447
447
|
/* @__PURE__ */ u("span", { className: l.CreateLabel, children: [
|
|
448
448
|
"create “",
|
|
@@ -453,34 +453,34 @@ function ht({ query: e, withBorder: t, onCreate: o }) {
|
|
|
453
453
|
}
|
|
454
454
|
);
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function Nt({ opt: e, isSelected: n, multiSelect: o, onPick: r }) {
|
|
457
457
|
function a(s) {
|
|
458
458
|
s.preventDefault(), r(e);
|
|
459
459
|
}
|
|
460
460
|
return /* @__PURE__ */ u(
|
|
461
461
|
"div",
|
|
462
462
|
{
|
|
463
|
-
className: _(l.OptionRow,
|
|
463
|
+
className: _(l.OptionRow, n && l.Selected),
|
|
464
464
|
onMouseDown: a,
|
|
465
465
|
children: [
|
|
466
|
-
o &&
|
|
467
|
-
|
|
466
|
+
o && n && /* @__PURE__ */ t("span", { className: l.Checkmark, children: "✓" }),
|
|
467
|
+
ee(e)
|
|
468
468
|
]
|
|
469
469
|
}
|
|
470
470
|
);
|
|
471
471
|
}
|
|
472
|
-
function
|
|
473
|
-
return /* @__PURE__ */
|
|
474
|
-
/* @__PURE__ */
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */
|
|
472
|
+
function It({ inputRef: e, query: n, onChange: o, onKeyDown: r, placeholder: a }) {
|
|
473
|
+
return /* @__PURE__ */ t("div", { className: l.SearchRow, children: /* @__PURE__ */ u("div", { className: l.SearchBox, children: [
|
|
474
|
+
/* @__PURE__ */ t("span", { className: l.SearchIcon, children: /* @__PURE__ */ u("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", children: [
|
|
475
|
+
/* @__PURE__ */ t("circle", { cx: "5", cy: "5", r: "3.5" }),
|
|
476
|
+
/* @__PURE__ */ t("line", { x1: "8", y1: "8", x2: "11", y2: "11" })
|
|
477
477
|
] }) }),
|
|
478
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ t(
|
|
479
479
|
"input",
|
|
480
480
|
{
|
|
481
481
|
ref: e,
|
|
482
482
|
className: l.SearchInput,
|
|
483
|
-
value:
|
|
483
|
+
value: n,
|
|
484
484
|
onChange: o,
|
|
485
485
|
onKeyDown: r,
|
|
486
486
|
placeholder: a
|
|
@@ -488,109 +488,109 @@ function gt({ inputRef: e, query: t, onChange: o, onKeyDown: r, placeholder: a }
|
|
|
488
488
|
)
|
|
489
489
|
] }) });
|
|
490
490
|
}
|
|
491
|
-
function
|
|
492
|
-
return /* @__PURE__ */
|
|
491
|
+
function wt({ count: e }) {
|
|
492
|
+
return /* @__PURE__ */ t(A, { children: Array.from({ length: e }).map((n, o) => /* @__PURE__ */ t("div", { className: l.SkeletonRow }, o)) });
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function yt({
|
|
495
495
|
onSearch: e,
|
|
496
|
-
onCreate:
|
|
496
|
+
onCreate: n,
|
|
497
497
|
onPick: o,
|
|
498
498
|
onClose: r,
|
|
499
499
|
anchorRef: a,
|
|
500
500
|
placeholder: s,
|
|
501
|
-
options:
|
|
502
|
-
excluded:
|
|
501
|
+
options: i = [],
|
|
502
|
+
excluded: c = [],
|
|
503
503
|
selected: p = [],
|
|
504
504
|
multiSelect: d = !1,
|
|
505
|
-
selectedAtTop:
|
|
506
|
-
isLoading:
|
|
505
|
+
selectedAtTop: m = !1,
|
|
506
|
+
isLoading: h = !1,
|
|
507
507
|
emptyHint: g = "no results found",
|
|
508
508
|
skeletonRowCount: I = 4,
|
|
509
|
-
onError:
|
|
510
|
-
glass:
|
|
511
|
-
portal:
|
|
509
|
+
onError: b = console.error,
|
|
510
|
+
glass: B = !1,
|
|
511
|
+
portal: q = !1
|
|
512
512
|
}) {
|
|
513
|
-
const [
|
|
514
|
-
|
|
515
|
-
const
|
|
516
|
-
|
|
517
|
-
if (!
|
|
513
|
+
const [R, G] = L(""), [M, w] = L(!1), [C, V] = L(null), $ = K(null), X = K(null), x = !!e, Y = Fn(R, e);
|
|
514
|
+
Un(X, r, a);
|
|
515
|
+
const k = B || q;
|
|
516
|
+
Ce(() => {
|
|
517
|
+
if (!k) return;
|
|
518
518
|
function f() {
|
|
519
|
-
a?.current &&
|
|
519
|
+
a?.current && V(a.current.getBoundingClientRect());
|
|
520
520
|
}
|
|
521
521
|
return f(), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
|
|
522
522
|
window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
523
523
|
};
|
|
524
|
-
}, [
|
|
525
|
-
|
|
526
|
-
}, [
|
|
527
|
-
const H = (e ?
|
|
528
|
-
(f) => !
|
|
529
|
-
),
|
|
530
|
-
...H.filter((f) => p.includes(
|
|
531
|
-
...H.filter((f) => !p.includes(
|
|
532
|
-
] : H,
|
|
533
|
-
(f) =>
|
|
534
|
-
),
|
|
535
|
-
async function
|
|
536
|
-
!
|
|
524
|
+
}, [k, a]), j(() => {
|
|
525
|
+
x && $.current?.focus();
|
|
526
|
+
}, [x]);
|
|
527
|
+
const H = (e ? Y : i).filter(
|
|
528
|
+
(f) => !c.includes(P(f))
|
|
529
|
+
), E = m ? [
|
|
530
|
+
...H.filter((f) => p.includes(P(f))),
|
|
531
|
+
...H.filter((f) => !p.includes(P(f)))
|
|
532
|
+
] : H, W = R.trim(), U = E.some(
|
|
533
|
+
(f) => ee(f).toLowerCase() === W.toLowerCase()
|
|
534
|
+
), z = !!n && W.length > 0 && !U;
|
|
535
|
+
async function se() {
|
|
536
|
+
!W || M || !n || (w(!0), n(W).then(ne).catch(b).finally(() => w(!1)));
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function ne(f) {
|
|
539
539
|
o(f), d || r();
|
|
540
540
|
}
|
|
541
|
-
function
|
|
542
|
-
|
|
541
|
+
function _e(f) {
|
|
542
|
+
G(f.target.value);
|
|
543
543
|
}
|
|
544
|
-
function
|
|
545
|
-
f.key === "Enter" && (f.preventDefault(),
|
|
544
|
+
function fe(f) {
|
|
545
|
+
f.key === "Enter" && (f.preventDefault(), E.length > 0 ? ne(E[0]) : z && se());
|
|
546
546
|
}
|
|
547
|
-
const
|
|
548
|
-
if (
|
|
549
|
-
const
|
|
547
|
+
const pe = s ?? (n ? "search or add new…" : "search…");
|
|
548
|
+
if (k && !C) return null;
|
|
549
|
+
const ae = /* @__PURE__ */ t(
|
|
550
550
|
"div",
|
|
551
551
|
{
|
|
552
|
-
ref:
|
|
553
|
-
className: _(l.PanelWrapper, { [l.Portal]:
|
|
554
|
-
style:
|
|
555
|
-
children: /* @__PURE__ */ u("div", { className: _(l.PanelContainer, { [l.Glass]:
|
|
556
|
-
|
|
557
|
-
|
|
552
|
+
ref: X,
|
|
553
|
+
className: _(l.PanelWrapper, { [l.Portal]: k }),
|
|
554
|
+
style: k && C ? { top: C.bottom, left: C.left, width: C.width } : void 0,
|
|
555
|
+
children: /* @__PURE__ */ u("div", { className: _(l.PanelContainer, { [l.Glass]: B }), children: [
|
|
556
|
+
x && /* @__PURE__ */ t(
|
|
557
|
+
It,
|
|
558
558
|
{
|
|
559
|
-
inputRef:
|
|
560
|
-
query:
|
|
561
|
-
onChange:
|
|
562
|
-
onKeyDown:
|
|
563
|
-
placeholder:
|
|
559
|
+
inputRef: $,
|
|
560
|
+
query: R,
|
|
561
|
+
onChange: _e,
|
|
562
|
+
onKeyDown: fe,
|
|
563
|
+
placeholder: pe
|
|
564
564
|
}
|
|
565
565
|
),
|
|
566
|
-
/* @__PURE__ */
|
|
567
|
-
|
|
568
|
-
|
|
566
|
+
/* @__PURE__ */ t("div", { className: l.ResultsList, children: h ? /* @__PURE__ */ t(wt, { count: I }) : /* @__PURE__ */ u(A, { children: [
|
|
567
|
+
E.map((f) => /* @__PURE__ */ t(
|
|
568
|
+
Nt,
|
|
569
569
|
{
|
|
570
570
|
opt: f,
|
|
571
|
-
isSelected: p.includes(
|
|
571
|
+
isSelected: p.includes(P(f)),
|
|
572
572
|
multiSelect: d,
|
|
573
|
-
onPick:
|
|
573
|
+
onPick: ne
|
|
574
574
|
},
|
|
575
|
-
|
|
575
|
+
P(f)
|
|
576
576
|
)),
|
|
577
|
-
|
|
578
|
-
|
|
577
|
+
z && /* @__PURE__ */ t(
|
|
578
|
+
vt,
|
|
579
579
|
{
|
|
580
|
-
query:
|
|
581
|
-
withBorder:
|
|
582
|
-
onCreate:
|
|
580
|
+
query: W,
|
|
581
|
+
withBorder: E.length > 0,
|
|
582
|
+
onCreate: se
|
|
583
583
|
}
|
|
584
584
|
),
|
|
585
|
-
|
|
585
|
+
E.length === 0 && !z && /* @__PURE__ */ t("div", { className: l.EmptyHint, children: g })
|
|
586
586
|
] }) })
|
|
587
587
|
] })
|
|
588
588
|
}
|
|
589
589
|
);
|
|
590
|
-
return
|
|
590
|
+
return k ? we(ae, document.body) : ae;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
return /* @__PURE__ */
|
|
592
|
+
function Lt({ size: e = 14, strokeWidth: n = 2, className: o }) {
|
|
593
|
+
return /* @__PURE__ */ t(
|
|
594
594
|
"svg",
|
|
595
595
|
{
|
|
596
596
|
viewBox: "0 0 24 24",
|
|
@@ -598,16 +598,16 @@ function wt({ size: e = 14, strokeWidth: t = 2, className: o }) {
|
|
|
598
598
|
height: e,
|
|
599
599
|
fill: "none",
|
|
600
600
|
stroke: "currentColor",
|
|
601
|
-
strokeWidth:
|
|
601
|
+
strokeWidth: n,
|
|
602
602
|
strokeLinecap: "round",
|
|
603
603
|
strokeLinejoin: "round",
|
|
604
604
|
className: o,
|
|
605
|
-
children: /* @__PURE__ */
|
|
605
|
+
children: /* @__PURE__ */ t("polyline", { points: "6 9 12 15 18 9" })
|
|
606
606
|
}
|
|
607
607
|
);
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
return /* @__PURE__ */
|
|
609
|
+
function lo({ size: e = 18, strokeWidth: n = 2.5, shrink: o = !0 }) {
|
|
610
|
+
return /* @__PURE__ */ t(
|
|
611
611
|
"svg",
|
|
612
612
|
{
|
|
613
613
|
viewBox: "0 0 24 24",
|
|
@@ -615,15 +615,15 @@ function no({ size: e = 18, strokeWidth: t = 2.5, shrink: o = !0 }) {
|
|
|
615
615
|
height: e,
|
|
616
616
|
fill: "none",
|
|
617
617
|
stroke: "currentColor",
|
|
618
|
-
strokeWidth:
|
|
618
|
+
strokeWidth: n,
|
|
619
619
|
strokeLinecap: "round",
|
|
620
620
|
strokeLinejoin: "round",
|
|
621
621
|
style: o ? { flexShrink: 0 } : void 0,
|
|
622
|
-
children: /* @__PURE__ */
|
|
622
|
+
children: /* @__PURE__ */ t("polyline", { points: "20 6 9 17 4 12" })
|
|
623
623
|
}
|
|
624
624
|
);
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function uo() {
|
|
627
627
|
return /* @__PURE__ */ u(
|
|
628
628
|
"svg",
|
|
629
629
|
{
|
|
@@ -636,13 +636,13 @@ function to() {
|
|
|
636
636
|
strokeLinecap: "round",
|
|
637
637
|
strokeLinejoin: "round",
|
|
638
638
|
children: [
|
|
639
|
-
/* @__PURE__ */
|
|
640
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ t("path", { d: "M12 20h9" }),
|
|
640
|
+
/* @__PURE__ */ t("path", { d: "M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4z" })
|
|
641
641
|
]
|
|
642
642
|
}
|
|
643
643
|
);
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function _o() {
|
|
646
646
|
return /* @__PURE__ */ u(
|
|
647
647
|
"svg",
|
|
648
648
|
{
|
|
@@ -655,13 +655,13 @@ function oo() {
|
|
|
655
655
|
strokeLinecap: "round",
|
|
656
656
|
strokeLinejoin: "round",
|
|
657
657
|
children: [
|
|
658
|
-
/* @__PURE__ */
|
|
659
|
-
/* @__PURE__ */
|
|
658
|
+
/* @__PURE__ */ t("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
|
|
659
|
+
/* @__PURE__ */ t("circle", { cx: "12", cy: "7", r: "4" })
|
|
660
660
|
]
|
|
661
661
|
}
|
|
662
662
|
);
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function fo({ size: e = 14, strokeWidth: n = 2, className: o }) {
|
|
665
665
|
return /* @__PURE__ */ u(
|
|
666
666
|
"svg",
|
|
667
667
|
{
|
|
@@ -670,19 +670,19 @@ function ro({ size: e = 14, strokeWidth: t = 2, className: o }) {
|
|
|
670
670
|
height: e,
|
|
671
671
|
fill: "none",
|
|
672
672
|
stroke: "currentColor",
|
|
673
|
-
strokeWidth:
|
|
673
|
+
strokeWidth: n,
|
|
674
674
|
strokeLinecap: "round",
|
|
675
675
|
strokeLinejoin: "round",
|
|
676
676
|
className: o,
|
|
677
677
|
children: [
|
|
678
|
-
/* @__PURE__ */
|
|
679
|
-
/* @__PURE__ */
|
|
678
|
+
/* @__PURE__ */ t("circle", { cx: "11", cy: "11", r: "7" }),
|
|
679
|
+
/* @__PURE__ */ t("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
|
680
680
|
]
|
|
681
681
|
}
|
|
682
682
|
);
|
|
683
683
|
}
|
|
684
|
-
function
|
|
685
|
-
const
|
|
684
|
+
function Tt({ triggerRef: e, isOpen: n, onClick: o, selectedOptions: r, multiSelect: a, placeholder: s, onOverflow: i = "scroll" }) {
|
|
685
|
+
const c = i === "expand";
|
|
686
686
|
return /* @__PURE__ */ u(
|
|
687
687
|
"button",
|
|
688
688
|
{
|
|
@@ -690,156 +690,156 @@ function It({ triggerRef: e, isOpen: t, onClick: o, selectedOptions: r, multiSel
|
|
|
690
690
|
ref: e,
|
|
691
691
|
className: _(
|
|
692
692
|
l.TriggerContainer,
|
|
693
|
-
|
|
693
|
+
n && l.Open,
|
|
694
694
|
a && l.MultiSelect,
|
|
695
|
-
|
|
695
|
+
c && l.ExpandHeight
|
|
696
696
|
),
|
|
697
697
|
onClick: o,
|
|
698
|
-
"aria-expanded":
|
|
698
|
+
"aria-expanded": n,
|
|
699
699
|
"aria-haspopup": "listbox",
|
|
700
700
|
children: [
|
|
701
|
-
a && r.length > 0 ? /* @__PURE__ */
|
|
702
|
-
/* @__PURE__ */
|
|
701
|
+
a && r.length > 0 ? /* @__PURE__ */ t("div", { className: _(l.ChipsWrapper, c && l.Expand), children: r.map((p, d) => /* @__PURE__ */ t("span", { className: l.Chip, children: ee(p) }, d)) }) : /* @__PURE__ */ t("span", { className: r.length === 0 ? l.TriggerPlaceholder : l.TriggerValue, children: r.length === 0 ? s : r.map(ee).join(", ") }),
|
|
702
|
+
/* @__PURE__ */ t("span", { className: l.TriggerIcon, children: /* @__PURE__ */ t(Lt, { size: 12 }) })
|
|
703
703
|
]
|
|
704
704
|
}
|
|
705
705
|
);
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function po({
|
|
708
708
|
options: e = [],
|
|
709
|
-
value:
|
|
709
|
+
value: n,
|
|
710
710
|
onChange: o,
|
|
711
711
|
onSearch: r,
|
|
712
712
|
onCreate: a,
|
|
713
713
|
excluded: s,
|
|
714
|
-
multiSelect:
|
|
715
|
-
selectedAtTop:
|
|
714
|
+
multiSelect: i = !1,
|
|
715
|
+
selectedAtTop: c = !1,
|
|
716
716
|
onOverflow: p = "scroll",
|
|
717
717
|
label: d,
|
|
718
|
-
placeholder:
|
|
719
|
-
searchPlaceholder:
|
|
718
|
+
placeholder: m = "select…",
|
|
719
|
+
searchPlaceholder: h,
|
|
720
720
|
emptyHint: g,
|
|
721
721
|
isLoading: I,
|
|
722
|
-
skeletonRowCount:
|
|
723
|
-
onError:
|
|
724
|
-
className:
|
|
725
|
-
glass:
|
|
726
|
-
portal:
|
|
722
|
+
skeletonRowCount: b,
|
|
723
|
+
onError: B,
|
|
724
|
+
className: q,
|
|
725
|
+
glass: R = !1,
|
|
726
|
+
portal: G = !1,
|
|
727
727
|
children: M
|
|
728
728
|
}) {
|
|
729
|
-
const { isOpen:
|
|
730
|
-
function H(
|
|
731
|
-
const
|
|
729
|
+
const { isOpen: w, triggerRef: C, toggleOpen: V, close: $ } = Mn(), X = N("Dropdown", q), x = jn(n, e), Y = w || x.length > 0, k = d && !Y ? "" : m;
|
|
730
|
+
function H(W) {
|
|
731
|
+
const U = P(W);
|
|
732
732
|
o(
|
|
733
|
-
|
|
733
|
+
i ? n.includes(U) ? n.filter((z) => z !== U) : [...n, U] : [U]
|
|
734
734
|
);
|
|
735
735
|
}
|
|
736
|
-
const
|
|
736
|
+
const E = {
|
|
737
737
|
ref: C,
|
|
738
|
-
onClick:
|
|
739
|
-
"aria-expanded":
|
|
738
|
+
onClick: V,
|
|
739
|
+
"aria-expanded": w,
|
|
740
740
|
"aria-haspopup": "listbox"
|
|
741
741
|
};
|
|
742
|
-
return /* @__PURE__ */ u("div", { className: _(l.DropdownContainer,
|
|
743
|
-
d && /* @__PURE__ */
|
|
744
|
-
M ? M({ selectedOptions:
|
|
745
|
-
|
|
742
|
+
return /* @__PURE__ */ u("div", { className: _(l.DropdownContainer, X), children: [
|
|
743
|
+
d && /* @__PURE__ */ t("label", { className: _(l.Label, { [l.lifted]: Y }), children: d }),
|
|
744
|
+
M ? M({ selectedOptions: x, isOpen: w, toggleOpen: V, close: $, triggerProps: E }) : /* @__PURE__ */ t(
|
|
745
|
+
Tt,
|
|
746
746
|
{
|
|
747
747
|
triggerRef: C,
|
|
748
|
-
isOpen:
|
|
749
|
-
onClick:
|
|
750
|
-
selectedOptions:
|
|
751
|
-
multiSelect:
|
|
748
|
+
isOpen: w,
|
|
749
|
+
onClick: V,
|
|
750
|
+
selectedOptions: x,
|
|
751
|
+
multiSelect: i,
|
|
752
752
|
onOverflow: p,
|
|
753
|
-
placeholder:
|
|
753
|
+
placeholder: k
|
|
754
754
|
}
|
|
755
755
|
),
|
|
756
|
-
|
|
757
|
-
|
|
756
|
+
w && /* @__PURE__ */ t(
|
|
757
|
+
yt,
|
|
758
758
|
{
|
|
759
759
|
options: e,
|
|
760
760
|
onSearch: r,
|
|
761
761
|
onCreate: a,
|
|
762
762
|
onPick: H,
|
|
763
|
-
onClose:
|
|
763
|
+
onClose: $,
|
|
764
764
|
anchorRef: C,
|
|
765
765
|
excluded: s,
|
|
766
|
-
multiSelect:
|
|
767
|
-
selectedAtTop:
|
|
768
|
-
selected:
|
|
769
|
-
placeholder:
|
|
766
|
+
multiSelect: i,
|
|
767
|
+
selectedAtTop: c,
|
|
768
|
+
selected: n,
|
|
769
|
+
placeholder: h,
|
|
770
770
|
emptyHint: g,
|
|
771
771
|
isLoading: I,
|
|
772
|
-
skeletonRowCount:
|
|
773
|
-
onError:
|
|
774
|
-
glass:
|
|
775
|
-
portal:
|
|
772
|
+
skeletonRowCount: b,
|
|
773
|
+
onError: B,
|
|
774
|
+
glass: R,
|
|
775
|
+
portal: G
|
|
776
776
|
}
|
|
777
777
|
)
|
|
778
778
|
] });
|
|
779
779
|
}
|
|
780
|
-
const
|
|
781
|
-
Btn:
|
|
782
|
-
Primary:
|
|
783
|
-
Secondary:
|
|
784
|
-
Ghost:
|
|
785
|
-
IconDanger:
|
|
786
|
-
Danger:
|
|
787
|
-
},
|
|
788
|
-
primary:
|
|
789
|
-
secondary:
|
|
790
|
-
danger:
|
|
791
|
-
ghost:
|
|
792
|
-
iconDanger:
|
|
780
|
+
const St = "_Btn_1tozl_10", Dt = "_Primary_1tozl_35", Rt = "_Secondary_1tozl_50", kt = "_Ghost_1tozl_62", Et = "_IconDanger_1tozl_74", At = "_Danger_1tozl_95", F = {
|
|
781
|
+
Btn: St,
|
|
782
|
+
Primary: Dt,
|
|
783
|
+
Secondary: Rt,
|
|
784
|
+
Ghost: kt,
|
|
785
|
+
IconDanger: Et,
|
|
786
|
+
Danger: At
|
|
787
|
+
}, bt = {
|
|
788
|
+
primary: F.Primary,
|
|
789
|
+
secondary: F.Secondary,
|
|
790
|
+
danger: F.Danger,
|
|
791
|
+
ghost: F.Ghost,
|
|
792
|
+
iconDanger: F.IconDanger
|
|
793
793
|
};
|
|
794
|
-
function
|
|
795
|
-
const a =
|
|
796
|
-
return /* @__PURE__ */
|
|
794
|
+
function mo({ variant: e = "default", className: n, children: o, ...r }) {
|
|
795
|
+
const a = N("Button", n), s = e === "unstyled";
|
|
796
|
+
return /* @__PURE__ */ t(
|
|
797
797
|
"button",
|
|
798
798
|
{
|
|
799
799
|
type: "button",
|
|
800
800
|
...r,
|
|
801
|
-
className: _(!s &&
|
|
801
|
+
className: _(!s && F.Btn, !s && bt[e], a),
|
|
802
802
|
children: o
|
|
803
803
|
}
|
|
804
804
|
);
|
|
805
805
|
}
|
|
806
|
-
const
|
|
807
|
-
ConfirmWrapper:
|
|
808
|
-
ConfirmContainer:
|
|
809
|
-
Glass:
|
|
810
|
-
ConfirmTitle:
|
|
811
|
-
ConfirmMessage:
|
|
812
|
-
ConfirmActions:
|
|
813
|
-
BtnCancel:
|
|
814
|
-
BtnConfirm:
|
|
815
|
-
BtnDanger:
|
|
806
|
+
const Bt = "_ConfirmWrapper_1tq4o_4", xt = "_ConfirmContainer_1tq4o_1", Wt = "_Glass_1tq4o_24", Ot = "_ConfirmTitle_1tq4o_30", Pt = "_ConfirmMessage_1tq4o_38", Mt = "_ConfirmActions_1tq4o_45", Ut = "_BtnCancel_1tq4o_53", Ft = "_BtnConfirm_1tq4o_73", jt = "_BtnDanger_1tq4o_92", T = {
|
|
807
|
+
ConfirmWrapper: Bt,
|
|
808
|
+
ConfirmContainer: xt,
|
|
809
|
+
Glass: Wt,
|
|
810
|
+
ConfirmTitle: Ot,
|
|
811
|
+
ConfirmMessage: Pt,
|
|
812
|
+
ConfirmActions: Mt,
|
|
813
|
+
BtnCancel: Ut,
|
|
814
|
+
BtnConfirm: Ft,
|
|
815
|
+
BtnDanger: jt
|
|
816
816
|
};
|
|
817
|
-
function
|
|
817
|
+
function ho({
|
|
818
818
|
title: e,
|
|
819
|
-
message:
|
|
819
|
+
message: n,
|
|
820
820
|
confirmLabel: o = "Confirm",
|
|
821
821
|
cancelLabel: r = "Cancel",
|
|
822
822
|
danger: a = !1,
|
|
823
823
|
onConfirm: s,
|
|
824
|
-
onClose:
|
|
825
|
-
className:
|
|
824
|
+
onClose: i,
|
|
825
|
+
className: c,
|
|
826
826
|
glass: p = !1
|
|
827
827
|
}) {
|
|
828
|
-
const [d,
|
|
828
|
+
const [d, m] = L(!1), h = N("ConfirmDialog", c);
|
|
829
829
|
function g() {
|
|
830
|
-
|
|
831
|
-
|
|
830
|
+
m(!0), Promise.resolve(s()).finally(() => {
|
|
831
|
+
m(!1), i();
|
|
832
832
|
});
|
|
833
833
|
}
|
|
834
|
-
return /* @__PURE__ */
|
|
835
|
-
/* @__PURE__ */
|
|
836
|
-
/* @__PURE__ */
|
|
837
|
-
/* @__PURE__ */ u("div", { className:
|
|
838
|
-
/* @__PURE__ */
|
|
839
|
-
/* @__PURE__ */
|
|
834
|
+
return /* @__PURE__ */ t("div", { className: T.ConfirmWrapper, children: /* @__PURE__ */ u("div", { className: _(T.ConfirmContainer, { [T.Glass]: p }, h), role: "dialog", "aria-modal": "true", children: [
|
|
835
|
+
/* @__PURE__ */ t("h2", { className: T.ConfirmTitle, children: e }),
|
|
836
|
+
/* @__PURE__ */ t("p", { className: T.ConfirmMessage, children: n }),
|
|
837
|
+
/* @__PURE__ */ u("div", { className: T.ConfirmActions, children: [
|
|
838
|
+
/* @__PURE__ */ t("button", { className: T.BtnCancel, type: "button", onClick: i, disabled: d, children: r }),
|
|
839
|
+
/* @__PURE__ */ t(
|
|
840
840
|
"button",
|
|
841
841
|
{
|
|
842
|
-
className: _(a ?
|
|
842
|
+
className: _(a ? T.BtnDanger : T.BtnConfirm),
|
|
843
843
|
type: "button",
|
|
844
844
|
onClick: g,
|
|
845
845
|
disabled: d,
|
|
@@ -849,26 +849,26 @@ function co({
|
|
|
849
849
|
] })
|
|
850
850
|
] }) });
|
|
851
851
|
}
|
|
852
|
-
const
|
|
853
|
-
InfoWrapper:
|
|
854
|
-
InfoContainer:
|
|
855
|
-
Glass:
|
|
856
|
-
InfoTitle:
|
|
857
|
-
InfoMessage:
|
|
858
|
-
InfoActions:
|
|
859
|
-
BtnClose:
|
|
852
|
+
const qt = "_InfoWrapper_cqv58_4", Gt = "_InfoContainer_cqv58_1", Vt = "_Glass_cqv58_24", $t = "_InfoTitle_cqv58_30", Ht = "_InfoMessage_cqv58_38", zt = "_InfoActions_cqv58_45", Kt = "_BtnClose_cqv58_52", O = {
|
|
853
|
+
InfoWrapper: qt,
|
|
854
|
+
InfoContainer: Gt,
|
|
855
|
+
Glass: Vt,
|
|
856
|
+
InfoTitle: $t,
|
|
857
|
+
InfoMessage: Ht,
|
|
858
|
+
InfoActions: zt,
|
|
859
|
+
BtnClose: Kt
|
|
860
860
|
};
|
|
861
|
-
function
|
|
862
|
-
const s =
|
|
863
|
-
return /* @__PURE__ */
|
|
864
|
-
/* @__PURE__ */
|
|
865
|
-
/* @__PURE__ */
|
|
866
|
-
/* @__PURE__ */
|
|
861
|
+
function go({ title: e, message: n, onClose: o, className: r, glass: a = !1 }) {
|
|
862
|
+
const s = N("InfoDialog", r);
|
|
863
|
+
return /* @__PURE__ */ t("div", { className: O.InfoWrapper, children: /* @__PURE__ */ u("div", { className: _(O.InfoContainer, { [O.Glass]: a }, s), role: "dialog", "aria-modal": "true", children: [
|
|
864
|
+
/* @__PURE__ */ t("h2", { className: O.InfoTitle, children: e }),
|
|
865
|
+
/* @__PURE__ */ t("p", { className: O.InfoMessage, children: n }),
|
|
866
|
+
/* @__PURE__ */ t("div", { className: O.InfoActions, children: /* @__PURE__ */ t("button", { className: O.BtnClose, type: "button", onClick: o, children: "Got it" }) })
|
|
867
867
|
] }) });
|
|
868
868
|
}
|
|
869
|
-
function
|
|
870
|
-
const o =
|
|
871
|
-
return /* @__PURE__ */
|
|
869
|
+
function Co({ buttons: e, containerClassName: n }) {
|
|
870
|
+
const o = N("ModalActions", n);
|
|
871
|
+
return /* @__PURE__ */ t("div", { className: o, children: e.map((r, a) => /* @__PURE__ */ t(
|
|
872
872
|
"button",
|
|
873
873
|
{
|
|
874
874
|
className: r.className,
|
|
@@ -880,15 +880,15 @@ function lo({ buttons: e, containerClassName: t }) {
|
|
|
880
880
|
a
|
|
881
881
|
)) });
|
|
882
882
|
}
|
|
883
|
-
function
|
|
884
|
-
const r =
|
|
885
|
-
return /* @__PURE__ */
|
|
883
|
+
function vo({ onClick: e, disabled: n, className: o }) {
|
|
884
|
+
const r = N("ModalClose", o);
|
|
885
|
+
return /* @__PURE__ */ t(
|
|
886
886
|
"button",
|
|
887
887
|
{
|
|
888
888
|
className: r,
|
|
889
889
|
type: "button",
|
|
890
890
|
onClick: e,
|
|
891
|
-
disabled:
|
|
891
|
+
disabled: n,
|
|
892
892
|
"aria-label": "Close",
|
|
893
893
|
children: /* @__PURE__ */ u(
|
|
894
894
|
"svg",
|
|
@@ -901,38 +901,117 @@ function uo({ onClick: e, disabled: t, className: o }) {
|
|
|
901
901
|
strokeWidth: "1.8",
|
|
902
902
|
strokeLinecap: "round",
|
|
903
903
|
children: [
|
|
904
|
-
/* @__PURE__ */
|
|
905
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ t("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
905
|
+
/* @__PURE__ */ t("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
906
906
|
]
|
|
907
907
|
}
|
|
908
908
|
)
|
|
909
909
|
}
|
|
910
910
|
);
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
return /* @__PURE__ */
|
|
912
|
+
function No({ classNames: e, children: n }) {
|
|
913
|
+
return /* @__PURE__ */ t(de.Provider, { value: e, children: n });
|
|
914
|
+
}
|
|
915
|
+
var re = /* @__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))(re || {});
|
|
916
|
+
const Xt = "type.googleapis.com/google.rpc.ErrorInfo", Yt = "type.googleapis.com/google.rpc.BadRequest", Qt = "type.googleapis.com/google.rpc.PreconditionFailure";
|
|
917
|
+
function J(e) {
|
|
918
|
+
return typeof e == "object" && e !== null;
|
|
919
|
+
}
|
|
920
|
+
function S(e) {
|
|
921
|
+
return typeof e == "string" ? e : "";
|
|
922
|
+
}
|
|
923
|
+
function Jt(e) {
|
|
924
|
+
if (!J(e))
|
|
925
|
+
return { kind: "Unknown", typeUrl: "", raw: e };
|
|
926
|
+
const n = S(e["@type"]);
|
|
927
|
+
switch (n) {
|
|
928
|
+
case Xt: {
|
|
929
|
+
const o = J(e.metadata) ? e.metadata : {}, r = {};
|
|
930
|
+
for (const a of Object.keys(o))
|
|
931
|
+
r[a] = S(o[a]);
|
|
932
|
+
return {
|
|
933
|
+
kind: "ErrorInfo",
|
|
934
|
+
reason: S(e.reason),
|
|
935
|
+
domain: S(e.domain),
|
|
936
|
+
metadata: r
|
|
937
|
+
};
|
|
938
|
+
}
|
|
939
|
+
case Yt:
|
|
940
|
+
return { kind: "BadRequest", fieldViolations: (Array.isArray(e.fieldViolations) ? e.fieldViolations : []).map((a) => {
|
|
941
|
+
const s = J(a) ? a : {};
|
|
942
|
+
return {
|
|
943
|
+
field: S(s.field),
|
|
944
|
+
description: S(s.description)
|
|
945
|
+
};
|
|
946
|
+
}) };
|
|
947
|
+
case Qt:
|
|
948
|
+
return { kind: "PreconditionFailure", violations: (Array.isArray(e.violations) ? e.violations : []).map((a) => {
|
|
949
|
+
const s = J(a) ? a : {};
|
|
950
|
+
return {
|
|
951
|
+
type: S(s.type),
|
|
952
|
+
subject: S(s.subject),
|
|
953
|
+
description: S(s.description)
|
|
954
|
+
};
|
|
955
|
+
}) };
|
|
956
|
+
default:
|
|
957
|
+
return { kind: "Unknown", typeUrl: n, raw: e };
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
function Io(e) {
|
|
961
|
+
return e.kind === "ErrorInfo";
|
|
962
|
+
}
|
|
963
|
+
function wo(e) {
|
|
964
|
+
return e.kind === "BadRequest";
|
|
965
|
+
}
|
|
966
|
+
function yo(e) {
|
|
967
|
+
return e.kind === "PreconditionFailure";
|
|
968
|
+
}
|
|
969
|
+
class Z extends Error {
|
|
970
|
+
constructor(n) {
|
|
971
|
+
super(n.title), this.isRetryable = n.isRetryable ?? !1, this.grpcCode = n.grpcCode, this.details = n.details ?? [];
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
function Lo(e) {
|
|
975
|
+
if (e instanceof Z) return e;
|
|
976
|
+
if (e instanceof Error && e.message === "Failed to fetch")
|
|
977
|
+
return new Z({ title: "Server unavailable. Try again later", isRetryable: !0 });
|
|
978
|
+
if (typeof e == "object" && e !== null && "code" in e) {
|
|
979
|
+
const n = e, o = n.code === re.UNAVAILABLE || n.code === re.INTERNAL, r = (n.details ?? []).map(Jt);
|
|
980
|
+
return new Z({ title: n.message, isRetryable: o, grpcCode: n.code, details: r });
|
|
981
|
+
}
|
|
982
|
+
return new Z({ title: String(e), isRetryable: !1 });
|
|
914
983
|
}
|
|
915
984
|
export {
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
ro as
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
985
|
+
_o as AvatarFallbackIcon,
|
|
986
|
+
Yt as BAD_REQUEST_TYPE_URL,
|
|
987
|
+
mo as Button,
|
|
988
|
+
lo as CheckmarkIcon,
|
|
989
|
+
Lt as ChevronDownIcon,
|
|
990
|
+
No as ChuresConfigProvider,
|
|
991
|
+
ho as ConfirmDialog,
|
|
992
|
+
po as Dropdown,
|
|
993
|
+
Xt as ERROR_INFO_TYPE_URL,
|
|
994
|
+
uo as EditPencilIcon,
|
|
995
|
+
re as Errors,
|
|
996
|
+
go as InfoDialog,
|
|
997
|
+
io as Input,
|
|
998
|
+
Xe as Loader,
|
|
999
|
+
ro as LoadingWrapper,
|
|
1000
|
+
Co as ModalActions,
|
|
1001
|
+
vo as ModalClose,
|
|
1002
|
+
Qt as PRECONDITION_FAILURE_TYPE_URL,
|
|
1003
|
+
fo as SearchIcon,
|
|
1004
|
+
Z as ServiceError,
|
|
1005
|
+
so as TelegramAuth,
|
|
1006
|
+
sn as TelegramSignInButton,
|
|
1007
|
+
ao as Toaster,
|
|
1008
|
+
co as Toggle,
|
|
1009
|
+
wo as isBadRequest,
|
|
1010
|
+
Io as isErrorInfo,
|
|
1011
|
+
yo as isPreconditionFailure,
|
|
1012
|
+
Jt as parseErrorDetail,
|
|
1013
|
+
Lo as parseGrpcError,
|
|
1014
|
+
N as useComponentClassName,
|
|
1015
|
+
Ze as useTelegramLogin,
|
|
1016
|
+
ue as useToaster
|
|
938
1017
|
};
|