2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
|
import{r as g,j as r,k as $,c as w,T as _e,b as i,B as b,i as f,U as xe,V as ve,W as ee,X as te,e as C,Y as ge,F as T,Z as be,$ as ne,a0 as M,y as D,a1 as we,a2 as re,a3 as O,a4 as oe,a5 as H,a6 as U,a7 as Ce,a8 as ke,u as q,a9 as Pe,aa as Se,ab as Ne,h as se,C as ae,z as V,ac as $e,m as W,d as Ae,ad as Le,ae as Oe,af as Te,ag as De}from"./index.171f553a.js";import{C as Be}from"./chevron-down.dd238e96.js";import{F as Ie,p as Fe,A as je,I as Re}from"./Fab.ef67ff10.js";import{R as ze,a as Me,T as He}from"./TextFitler.61537a57.js";import{f as Ue}from"./index.92e2d967.js";import{S as qe}from"./Select.6c389032.js";import"./debounce.c2d20996.js";function Ee(e,t){if(e==null)return{};var n=Ke(e,t),o,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)o=a[s],!(t.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,o)||(n[o]=e[o]))}return n}function Ke(e,t){if(e==null)return{};var n={},o=Object.keys(e),s,a;for(a=0;a<o.length;a++)s=o[a],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}var E=g.exports.forwardRef(function(e,t){var n=e.color,o=n===void 0?"currentColor":n,s=e.size,a=s===void 0?24:s,l=Ee(e,["color","size"]);return r("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...l,children:r("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})});E.propTypes={color:$.exports.string,size:$.exports.oneOfType([$.exports.string,$.exports.number])};E.displayName="Zap";const Z=E;function le(e){const t=e.size||24,n=w({[_e.animate]:e.animate});return r("svg",{className:n,xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}const Ve="_FlexCenter_1380a_1",We={FlexCenter:Ve};function Ze({children:e}){return r("div",{className:We.FlexCenter,children:e})}const{useRef:G,useEffect:Ge}=f;function Ye({onClickPrimaryButton:e,onClickSecondaryButton:t}){const n=G(null),o=G(null);return Ge(()=>{n.current.focus()},[]),i("div",{onKeyDown:a=>{a.keyCode===39?o.current.focus():a.keyCode===37&&n.current.focus()},children:[r("h2",{children:"Close Connections?"}),r("p",{children:'Click "Yes" to close those connections that are still using the old selected proxy in this group'}),r("div",{style:{height:30}}),i(Ze,{children:[r(b,{onClick:e,ref:n,children:"Yes"}),r("div",{style:{width:20}}),r(b,{onClick:t,ref:o,children:"No"})]})]})}const Xe="_header_1y9js_1",Je="_arrow_1y9js_8",Qe="_isOpen_1y9js_13",et="_btn_1y9js_20",tt="_qty_1y9js_25",k={header:Xe,arrow:Je,isOpen:Qe,btn:et,qty:tt};function ce({name:e,type:t,toggle:n,isOpen:o,qty:s}){const a=g.exports.useCallback(l=>{l.preventDefault(),(l.key==="Enter"||l.key===" ")&&n()},[n]);return i("div",{className:k.header,onClick:n,style:{cursor:"pointer"},tabIndex:0,onKeyDown:a,role:"button",children:[r("div",{children:r(xe,{name:e,type:t})}),typeof s=="number"?r("span",{className:k.qty,children:s}):null,r(b,{kind:"minimal",onClick:n,className:k.btn,title:"Toggle collapsible section",children:r("span",{className:w(k.arrow,{[k.isOpen]:o}),children:r(Be,{size:20})})})]})}const{useMemo:nt}=f;function rt(e,t){return e.filter(n=>{const o=t[n];return o===void 0?!0:o.number!==0})}const A=(e,t)=>{if(e&&typeof e.number=="number"&&e.number>0)return e.number;const n=t&&t.type;return n&&te.indexOf(n)>-1?-1:999999},ot={Natural:e=>e,LatencyAsc:(e,t,n)=>e.sort((o,s)=>{const a=A(t[o],n&&n[o]),l=A(t[s],n&&n[s]);return a-l}),LatencyDesc:(e,t,n)=>e.sort((o,s)=>{const a=A(t[o],n&&n[o]);return A(t[s],n&&n[s])-a}),NameAsc:e=>e.sort(),NameDesc:e=>e.sort((t,n)=>t>n?-1:t<n?1:0)};function st(e,t){const n=t.toLowerCase().split(" ").map(o=>o.trim()).filter(o=>!!o);return n.length===0?e:e.filter(o=>{let s=0;for(;s<n.length;s++){const a=n[s];if(o.toLowerCase().indexOf(a)>-1)return!0}return!1})}function at(e,t,n,o,s,a){let l=[...e];return n&&(l=rt(e,t)),typeof o=="string"&&o!==""&&(l=st(l,o)),ot[s
|