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.216.236
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 : ClientDashboardPage-BFRChU8j.js
import{b as ge,u as fe,a as ye,e as je,r as l,c as w,j as e,L as J}from"./index-CTlm15d2.js";import{A as we,P as te}from"./AccountDock-McBBbuGp.js";import{B as X,A as se}from"./Button-DPbE3uKx.js";import{u as Ne,M as ke,O as ve,W as Se}from"./usePortalSocket-BunRYVgj.js";import{L as Y}from"./loader-circle-DMRH_mR_.js";import{L as Pe}from"./user-plus-DHnwp5UO.js";import{R as Ce}from"./refresh-cw-B3cmlBmt.js";import{C as ae}from"./circle-check-u9adkwRC.js";import{C as M}from"./credit-card-AIrys0eB.js";import{c as Oe}from"./createLucideIcon-BWeLwUUK.js";import{S as ie}from"./user-round-DU-BBHF0.js";import{X as Ie}from"./x-BmeVBLEj.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 $e=Oe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);function G(s){return s==null||s===""?"Not priced":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(s)}function re(s){return s?new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(s)):"No date"}function q(s){return{pending_review:"Pending review",awaiting_payment:"Awaiting payment",completed:"Completed",active:"Active",cancelled:"Cancelled",expired:"Expired"}[s]||s}function H(s){return{pending_review:"border-amber-200 bg-amber-50 text-amber-800",awaiting_payment:"border-cyan-200 bg-cyan-50 text-cyan-800",completed:"border-emerald-200 bg-emerald-50 text-emerald-800",active:"border-emerald-200 bg-emerald-50 text-emerald-800",cancelled:"border-slate-200 bg-slate-50 text-slate-600",expired:"border-red-200 bg-red-50 text-red-700"}[s]||"border-slate-200 bg-slate-50 text-slate-700"}function W(s,d){return(s.some(n=>n.id===d.id)?s.map(n=>n.id===d.id?{...n,...d}:n):[d,...s]).sort((n,m)=>new Date(m.updatedAt||m.createdAt)-new Date(n.updatedAt||n.createdAt))}function Te(s,d){return s.filter(c=>c.id!==d)}function ne(s,d,c){return s.map(p=>{if(p.id!==d)return p;const n=p.messages||[];return n.some(m=>m.id===c.id)?p:{...p,messages:[...n,c],updatedAt:c.createdAt}})}function Ae(s){return[["Project",s.projectName],["Business",s.businessType],["Timeline",s.timeline],["Budget",s.budgetRange],["Contact",s.contactPreference]].filter(([,d])=>d)}function le(s){var c,p;const d=(s==null?void 0:s.providers)||{};return[(c=d.paypal)!=null&&c.enabled?["paypal",d.paypal.label||"PayPal",Se]:null,(p=d.stripe)!=null&&p.enabled?["stripe",d.stripe.label||"Stripe",M]:null].filter(Boolean)}function I(s,d){var c;for(const p of d){const n=(c=s.get(p))==null?void 0:c.trim();if(n)return n}return""}function $(s,d,c){c&&(s[d]=c)}function ze({order:s,paymentSettings:d,onClose:c,onOrderPaid:p}){var v,z;const n=l.useMemo(()=>le(d),[d]),[m,g]=l.useState(((v=n[0])==null?void 0:v[0])||""),[P,T]=l.useState(!1),[k,N]=l.useState("");l.useEffect(()=>{n.length&&!n.some(([u])=>u===m)&&g(n[0][0])},[m,n]);async function A(){var u;if(!m){N("No payment provider is enabled right now.");return}T(!0),N("");try{const y=await w(`/api/portal/orders/${s.id}/checkout`,{method:"POST",body:JSON.stringify({provider:m})});if(!((u=y.checkout)!=null&&u.url)){N("Checkout could not be created. Please try again or contact support.");return}window.location.assign(y.checkout.url)}catch(y){N(y.message)}finally{T(!1)}}return e.jsx("div",{className:"fixed inset-0 z-[80] grid place-items-center overflow-y-auto bg-slate-950/75 px-4 py-6 backdrop-blur-sm",children:e.jsxs("section",{className:"w-full max-w-lg overflow-hidden rounded-lg border border-white/15 bg-white shadow-2xl",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 bg-slate-950 p-5 text-white",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-black uppercase text-cyan-100",children:[e.jsx(ie,{size:16,"aria-hidden":"true"}),(d==null?void 0:d.appName)||"Secure checkout"]}),e.jsx("h2",{className:"mt-2 text-2xl font-black",children:"Pay to get your product"}),e.jsx("p",{className:"mt-2 text-sm font-semibold text-zinc-300",children:(z=s.product)==null?void 0:z.title})]}),e.jsx("button",{type:"button",onClick:c,className:"grid h-10 w-10 place-items-center rounded-md border border-white/20 transition hover:bg-white/10","aria-label":"Close payment",children:e.jsx(Ie,{size:18,"aria-hidden":"true"})})]}),e.jsxs("div",{className:"space-y-5 p-5",children:[e.jsxs("div",{className:"rounded-lg border border-slate-200 bg-slate-50 p-4",children:[e.jsx("span",{className:"block text-xs font-black uppercase text-slate-500",children:"Final negotiated price"}),e.jsx("strong",{className:"mt-1 block text-3xl font-black text-slate-950",children:G(s.negotiatedPrice)})]}),e.jsx("div",{className:"grid gap-2 sm:grid-cols-3",children:n.map(([u,y,C])=>e.jsxs("button",{type:"button",onClick:()=>{N(""),g(u)},className:`inline-flex min-h-11 items-center justify-center gap-2 rounded-md border px-3 text-sm font-black transition ${m===u?"border-slate-950 bg-slate-950 text-white":"border-slate-300 bg-white text-slate-700 hover:border-slate-500"}`,children:[e.jsx(C,{size:16,"aria-hidden":"true"}),y]},u))}),n.length===0&&e.jsx("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-4 text-sm font-semibold leading-6 text-amber-800",children:"Online payments are disabled. Please contact the admin to enable PayPal or Stripe."}),k&&e.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-3 text-sm font-semibold text-red-700",children:k}),e.jsxs(X,{type:"button",onClick:A,className:"w-full rounded-xl bg-cyan-700 hover:bg-cyan-800",disabled:P||n.length===0,children:[P?e.jsx(Y,{className:"animate-spin",size:17,"aria-hidden":"true"}):e.jsx(M,{size:17,"aria-hidden":"true"}),"Continue to checkout"]})]})]})})}function We(){var ee;const{user:s,loading:d}=ge(),c=fe(),p=ye(),[n]=je(),[m,g]=l.useState([]),[P,T]=l.useState([]),[k,N]=l.useState(null),[A,v]=l.useState(n.get("order")||""),[z,u]=l.useState(!0),[y,C]=l.useState(null),[E,L]=l.useState(""),[R,j]=l.useState(""),[B,O]=l.useState(""),[de,K]=l.useState(!0),[oe,Q]=l.useState(!1),[ce,V]=l.useState({}),S=l.useRef({}),x=l.useMemo(()=>m.find(t=>t.id===A)||m[0]||null,[m,A]),me=l.useMemo(()=>m.filter(t=>t.status!=="completed"),[m]),Z=l.useMemo(()=>le(k),[k]),h=l.useCallback(async(t={})=>{if(!s)return;const a=(t==null?void 0:t.silent)===!0;a||(u(!0),j(""));try{const[r,i,o]=await Promise.all([w("/api/portal/orders"),w("/api/portal/subscriptions"),w("/api/site/payment-settings")]),b=(r==null?void 0:r.orders)||[];g(b),T((i==null?void 0:i.products)||[]),N(o==null?void 0:o.payment),v(f=>{var _;return b.some(be=>be.id===f)?f:n.get("order")||((_=b[0])==null?void 0:_.id)||""})}catch(r){a||j(r.message)}finally{a||u(!1)}},[n,s]),U=l.useCallback((t,a)=>{V(r=>{const i={...r[t]||{}};if(delete i[a],Object.keys(i).length===0){const o={...r};return delete o[t],o}return{...r,[t]:i}})},[]),D=l.useCallback((t,a)=>{var o;const r=(o=t.payload)==null?void 0:o.user;if(!t.orderId||!(r!=null&&r.id)||r.id===(s==null?void 0:s.id))return;const i=`${t.orderId}:${r.id}`;if(window.clearTimeout(S.current[i]),!a){delete S.current[i],U(t.orderId,r.id);return}V(b=>({...b,[t.orderId]:{...b[t.orderId]||{},[r.id]:r.name||"SignalTech"}})),S.current[i]=window.setTimeout(()=>{delete S.current[i],U(t.orderId,r.id)},3200)},[U,s==null?void 0:s.id]),xe=l.useCallback(t=>{var a,r;if(t.type==="connected"&&K(((a=t.payload)==null?void 0:a.adminOnline)??!0),(t.type==="order.created"||t.type==="order.updated")&&g(i=>W(i,t.payload.order)),t.type==="order.deleted"){const i=((r=t.payload)==null?void 0:r.orderId)||t.orderId;g(o=>Te(o,i)),v(o=>o===i?"":o)}t.type==="chat.message"&&g(i=>ne(i,t.orderId,t.payload.message)),t.type==="typing.start"&&D(t,!0),t.type==="typing.stop"&&D(t,!1),t.type==="subscription.updated"&&h()},[h,D]),{connected:F,sendJson:pe}=Ne(!!s,xe);l.useEffect(()=>{if(!s)return;let t=!1;async function a(){var i;try{const o=await w("/api/portal/presence",{method:"POST",body:JSON.stringify({})});t||(Q(!0),K(((i=o.presence)==null?void 0:i.adminOnline)??!0))}catch{t||Q(!1)}}a();const r=window.setInterval(a,2e4);return()=>{t=!0,window.clearInterval(r)}},[s]),l.useEffect(()=>{if(!s||F)return;const t=window.setInterval(()=>{h({silent:!0})},3500);return()=>window.clearInterval(t)},[h,F,s]),l.useEffect(()=>()=>{Object.values(S.current).forEach(t=>window.clearTimeout(t)),S.current={}},[]),l.useEffect(()=>{!d&&!s&&u(!1)},[d,s]),l.useEffect(()=>{h()},[h]),l.useEffect(()=>{const t=n.get("provider"),a=n.get("orderId"),r=I(n,["token","paypalOrderId"]),i=I(n,["session_id","sessionId"]);if(n.get("payment")==="success"&&a&&["paypal","stripe"].includes(t)){const o={provider:t};$(o,"paypalOrderId",r),$(o,"sessionId",i),w(`/api/portal/orders/${a}/payments/confirm-success`,{method:"POST",body:JSON.stringify(o)}).then(b=>{g(f=>W(f,b.order)),O("Payment successful. Product delivery is unlocked."),c("/dashboard",{replace:!0})}).catch(b=>j(b.message))}},[c,n]),l.useEffect(()=>{const t=n.get("provider"),a=n.get("productId"),r=(()=>{try{return JSON.parse(sessionStorage.getItem(`management_checkout_${a}`)||"null")}catch{return null}})(),i=I(n,["subscription_id","subscriptionId"]),o=I(n,["token","paypalOrderId"])||((r==null?void 0:r.provider)==="paypal"?r.id:""),b=I(n,["session_id","sessionId"]);if(n.get("subscription")==="success"&&a&&["paypal","stripe"].includes(t)){const f={provider:t};$(f,"paypalOrderId",o),$(f,"paypalSubscriptionId",i),$(f,"sessionId",b),w(`/api/portal/subscriptions/${a}/confirm-success`,{method:"POST",body:JSON.stringify(f)}).then(()=>{sessionStorage.removeItem(`management_checkout_${a}`),O("30-day management package is active. You can renew before or after it expires."),c("/dashboard",{replace:!0}),h()}).catch(_=>j(_.message))}},[h,c,n]);async function ue(t,a){var r;L(`${t}-${a}`),j("");try{const i=await w(`/api/portal/subscriptions/${t}/start`,{method:"POST",body:JSON.stringify({provider:a})});if(((r=i.checkout)==null?void 0:r.mode)==="hosted"){if(!i.checkout.url){j("Checkout could not be created. Please try again or contact support.");return}sessionStorage.setItem(`management_checkout_${t}`,JSON.stringify({provider:a,id:i.checkout.id})),window.location.assign(i.checkout.url);return}O("Management subscription activated."),h()}catch(i){j(i.message)}finally{L("")}}async function he(t){if(window.confirm("Are you sure you want to cancel this subscription?")){L(`${t}-cancel`),j("");try{await w(`/api/portal/subscriptions/${t}`,{method:"DELETE"}),O("Management subscription cancelled."),h()}catch(r){j(r.message)}finally{L("")}}}return d||z?e.jsx("main",{className:"grid min-h-screen place-items-center bg-slate-950 text-white",children:e.jsx(Y,{className:"animate-spin","aria-hidden":"true"})}):s?e.jsxs("main",{className:"min-h-screen overflow-x-hidden bg-[#f5efe6]",children:[e.jsx(we,{}),e.jsx("section",{className:"bg-slate-950 px-4 py-7 text-white sm:px-6 lg:px-8",children:e.jsxs("div",{className:"mx-auto flex max-w-[1500px] flex-wrap items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs(J,{to:"/",className:"inline-flex items-center gap-2 text-sm font-bold text-cyan-100 hover:text-white",children:[e.jsx(se,{size:16,"aria-hidden":"true"}),"Products"]}),e.jsx("h1",{className:"mt-4 text-3xl font-black leading-tight sm:text-5xl",children:"Client Dashboard"}),e.jsx("p",{className:"mt-3 max-w-2xl text-sm leading-6 text-zinc-300",children:"Orders, active projects, live consultation, payments, delivery, and management subscriptions."})]}),e.jsxs("button",{type:"button",onClick:h,className:"inline-flex min-h-11 items-center gap-2 rounded-md border border-white/20 px-4 text-sm font-black transition hover:bg-white/10",children:[e.jsx(Ce,{size:16,"aria-hidden":"true"}),"Refresh"]})]})}),e.jsx("section",{className:"mx-auto grid max-w-[1500px] gap-4 px-4 py-6 sm:px-6 md:grid-cols-3 lg:px-8",children:[["Orders",m.length,te],["Active projects",me.length,ke],["Completed",m.filter(t=>t.status==="completed").length,ae]].map(([t,a,r])=>e.jsxs("div",{className:"rounded-lg border border-slate-200 bg-white p-4 shadow-sm",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 text-xs font-black uppercase text-slate-500",children:[e.jsx(r,{size:15,"aria-hidden":"true"}),t]}),e.jsx("strong",{className:"mt-2 block text-3xl font-black text-slate-950",children:a})]},t))}),e.jsxs("section",{className:"mx-auto grid max-w-[1500px] gap-6 px-4 pb-10 sm:px-6 lg:px-8 xl:grid-cols-[minmax(280px,380px)_minmax(0,1fr)]",children:[e.jsxs("aside",{className:"min-w-0 rounded-lg border border-slate-200 bg-white p-4 shadow-xl shadow-slate-200/70 xl:sticky xl:top-6 xl:self-start",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-black uppercase text-cyan-800",children:[e.jsx(te,{size:16,"aria-hidden":"true"}),"Order history"]}),e.jsxs("div",{className:"mt-4 grid auto-cols-[minmax(250px,82vw)] grid-flow-col gap-3 overflow-x-auto pb-2 xl:auto-cols-auto xl:grid-flow-row xl:overflow-visible xl:pb-0",children:[m.map(t=>{var a;return e.jsxs("button",{type:"button",onClick:()=>v(t.id),className:`h-full min-w-0 rounded-lg border p-3 text-left transition ${(x==null?void 0:x.id)===t.id?"border-cyan-500 bg-cyan-50":"border-slate-200 bg-white hover:border-slate-400"}`,children:[e.jsx("span",{className:"clamp-2 block text-sm font-black leading-5 text-slate-950",children:(a=t.product)==null?void 0:a.title}),e.jsx("span",{className:`mt-2 inline-flex rounded-full border px-2 py-1 text-xs font-black uppercase tracking-normal ${H(t.status)}`,children:q(t.status)}),e.jsx("span",{className:"mt-2 block text-xs font-bold text-slate-500",children:re(t.updatedAt||t.createdAt)})]},t.id)}),m.length===0&&e.jsx("div",{className:"rounded-lg border border-slate-200 bg-slate-50 p-5 text-sm font-semibold text-slate-600",children:"No orders yet."})]})]}),e.jsxs("section",{className:"min-w-0 overflow-hidden rounded-lg border border-slate-200 bg-white shadow-xl shadow-slate-200/70",children:[!x&&e.jsx("div",{className:"p-6 text-sm font-semibold text-slate-600",children:"Select an order to open the workspace."}),x&&e.jsxs("div",{className:"grid min-h-0 xl:min-h-[720px] xl:grid-cols-[minmax(280px,340px)_minmax(0,1fr)]",children:[e.jsxs("aside",{className:"min-w-0 border-b border-slate-200 p-4 sm:p-5 xl:border-b-0 xl:border-r",children:[e.jsx("span",{className:`inline-flex rounded-full border px-3 py-1 text-xs font-black uppercase ${H(x.status)}`,children:q(x.status)}),e.jsx("h2",{className:"mt-4 text-xl font-black leading-tight text-slate-950 sm:text-2xl",children:(ee=x.product)==null?void 0:ee.title}),e.jsx("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 xl:grid-cols-1",children:Ae(x.formData||{}).map(([t,a])=>e.jsxs("div",{className:"rounded-lg border border-slate-200 bg-slate-50 p-3",children:[e.jsx("span",{className:"block text-xs font-black uppercase text-slate-500",children:t}),e.jsx("span",{className:"mt-1 block break-words text-sm font-semibold text-slate-800",children:a})]},t))}),e.jsxs("div",{className:"mt-4 rounded-lg border border-slate-200 p-3",children:[e.jsx("span",{className:"block text-xs font-black uppercase text-slate-500",children:"Final price"}),e.jsx("strong",{className:"mt-1 block text-2xl font-black text-slate-950",children:G(x.negotiatedPrice)})]}),x.status==="awaiting_payment"&&e.jsxs("button",{type:"button",onClick:()=>C(x),className:"mt-4 inline-flex min-h-12 w-full items-center justify-center gap-2 rounded-xl bg-amber-400 px-4 text-sm font-black text-slate-950 shadow-xl shadow-amber-200/70 transition hover:-translate-y-0.5 hover:bg-amber-300",children:[e.jsx(M,{size:17,"aria-hidden":"true"}),"Pay to get your product"]}),x.status==="completed"&&e.jsxs("div",{className:"mt-4 rounded-lg border border-emerald-200 bg-emerald-50 p-4 text-sm font-semibold text-emerald-800",children:[e.jsxs("div",{className:"flex items-center gap-2 font-black",children:[e.jsx(ae,{size:17,"aria-hidden":"true"}),"Product delivery unlocked"]}),x.deliveryAssetsUrl?e.jsxs("a",{href:x.deliveryAssetsUrl,target:"_blank",rel:"noreferrer",className:"mt-3 inline-flex min-h-10 items-center gap-2 rounded-md bg-emerald-700 px-3 text-xs font-black text-white transition hover:bg-emerald-800",children:[e.jsx($e,{size:15,"aria-hidden":"true"}),"Open delivery assets"]}):e.jsx("p",{className:"mt-2 leading-6",children:"The admin has not attached delivery assets yet."})]})]}),e.jsx(ve,{order:x,currentUser:s,title:"Live chat",placeholder:"Message your SignalTech expert",counterpartLabel:"SignalTech Admin",counterpartOnline:de,counterpartStatus:"Online 24/7",typingUsers:Object.values(ce[x.id]||{}),socketConnected:F||oe,sendSocketEvent:pe,messageEndpoint:t=>`/api/portal/orders/${t}/messages`,onMessageSent:t=>g(a=>ne(a,x.id,t)),minHeightClass:"h-[620px] max-h-[calc(100vh-120px)] sm:h-[680px] xl:h-[720px] xl:max-h-none",actionBar:x.status==="awaiting_payment"?e.jsx("div",{className:"border-t border-amber-200 bg-amber-50 p-4",children:e.jsxs("button",{type:"button",onClick:()=>C(x),className:"inline-flex min-h-12 w-full items-center justify-center gap-2 rounded-xl bg-amber-400 px-4 text-sm font-black text-slate-950 transition hover:bg-amber-300",children:[e.jsx(M,{size:17,"aria-hidden":"true"}),"Pay to get your product"]})}):null})]})]})]}),e.jsx("section",{className:"mx-auto max-w-[1500px] px-4 pb-12 sm:px-6 lg:px-8",children:e.jsxs("section",{className:"rounded-lg border border-slate-200 bg-white p-5 shadow-xl shadow-slate-200/70",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-black uppercase text-cyan-800",children:[e.jsx(ie,{size:16,"aria-hidden":"true"}),"Subscriptions"]}),e.jsxs("div",{className:"mt-5 grid gap-3",children:[P.map(({product:t,subscription:a})=>e.jsxs("div",{className:"grid gap-3 rounded-lg border border-slate-200 p-4 lg:grid-cols-[1fr_auto] lg:items-center",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-black text-slate-950",children:t.title}),e.jsxs("p",{className:"mt-1 text-sm font-semibold text-slate-600",children:["24/7 Website Management & Handling: ",G(t.defaultSubscriptionPrice),"/30 days"]}),a?e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:`inline-flex rounded-full border px-2 py-1 text-xs font-black uppercase ${H(a.status)}`,children:q(a.status)}),a.status==="active"&&e.jsxs("span",{className:"text-xs font-black uppercase text-cyan-800",children:[a.daysRemaining," day",a.daysRemaining===1?"":"s"," left"]}),a.expiresAt&&e.jsxs("span",{className:"text-xs font-bold text-slate-500",children:["Expires ",re(a.expiresAt)]})]}):e.jsx("p",{className:"mt-2 text-xs font-black uppercase text-slate-500",children:"Not purchased yet"})]}),e.jsxs("div",{className:"grid gap-2",children:[Z.length?e.jsx("div",{className:"grid grid-cols-2 gap-2",children:Z.map(([r,i,o])=>e.jsxs("button",{type:"button",onClick:()=>ue(t.id,r),disabled:E===`${t.id}-${r}`,className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-md bg-slate-950 px-3 text-xs font-black capitalize text-white transition hover:bg-slate-800 disabled:opacity-60",children:[E===`${t.id}-${r}`?e.jsx(Y,{className:"animate-spin",size:15,"aria-hidden":"true"}):e.jsx(o,{size:15,"aria-hidden":"true"}),a?`Renew 30 days with ${i}`:`Buy 30 days with ${i}`]},r))}):e.jsx("div",{className:"rounded-md border border-slate-200 bg-slate-50 px-3 py-2 text-xs font-bold text-slate-600",children:"Payment providers are disabled."}),(a==null?void 0:a.status)==="active"&&e.jsx("button",{type:"button",onClick:()=>he(t.id),disabled:E===`${t.id}-cancel`,className:"inline-flex min-h-10 items-center justify-center rounded-md border border-red-200 px-3 text-xs font-black text-red-700 transition hover:bg-red-50 disabled:opacity-60",children:E===`${t.id}-cancel`?"Cancelling":"Cancel"})]})]},t.id)),P.length===0&&e.jsx("div",{className:"rounded-lg border border-slate-200 bg-slate-50 p-5 text-sm font-semibold text-slate-600",children:"Completed purchases will appear here with optional management subscriptions."})]})]})}),(R||B)&&e.jsxs("div",{className:"fixed bottom-4 left-1/2 z-[90] w-[min(92vw,560px)] -translate-x-1/2 rounded-lg border border-slate-200 bg-white p-4 text-sm font-semibold shadow-2xl",children:[B&&e.jsx("p",{className:"text-emerald-700",children:B}),R&&e.jsx("p",{className:"text-red-700",children:R})]}),y&&e.jsx(ze,{order:y,paymentSettings:k,onClose:()=>C(null),onOrderPaid:t=>{g(a=>W(a,t)),O("Payment received. Delivery is unlocked."),h()}})]}):e.jsx("main",{className:"grid min-h-screen place-items-center bg-slate-950 px-4 text-white",children:e.jsxs("section",{className:"w-full max-w-lg rounded-lg border border-white/15 bg-white/10 p-7 shadow-2xl backdrop-blur",children:[e.jsx("h1",{className:"text-3xl font-black",children:"Client Login Required"}),e.jsx("p",{className:"mt-3 text-sm leading-6 text-zinc-200",children:"Login or create an account to see your orders, chat, payments, and product delivery."}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsx(J,{to:`/auth?mode=login&returnTo=${encodeURIComponent(p.pathname+p.search)}`,children:e.jsxs(X,{className:"rounded-xl",children:[e.jsx(Pe,{size:17,"aria-hidden":"true"}),"Login"]})}),e.jsx(J,{to:"/",children:e.jsxs(X,{variant:"light",className:"rounded-xl",children:[e.jsx(se,{size:17,"aria-hidden":"true"}),"Products"]})})]})]})})}export{We as ClientDashboardPage};
Close