PageSourceSearch

https://redgo.in/assets/js/ThirdParty-CrObvyeu.js

js redgo.in collected 2026-09-24 15:04:27 UTC 6,820 bytes, 1 lines download raw bytes

1import{r as c,j as e}from"./index-Cf_ajVON.js";import{S}from"./settings-BEH2D0zs.js";import{C}from"./circle-check-big-BK3mOZpE.js";import{C as $}from"./circle-x-D6gX1se3.js";import{E as K}from"./eye-off-CoDAbRMZ.js";import{E as P}from"./eye-DP9IZTXG.js";const A=(...r)=>{},E=[{id:1,name:"Stripe",category:"Payment Gateway",description:"Online payment processing",enabled:!0,configured:!0,fields:[{key:"publishableKey",label:"Publishable Key",value:"pk_test_...",type:"password"},{key:"secretKey",label:"Secret Key",value:"sk_test_...",type:"password"}]},{id:2,name:"PayPal",category:"Payment Gateway",description:"PayPal payment integration",enabled:!0,configured:!0,fields:[{key:"clientId",label:"Client ID",value:"AeA1QIZXiflr1...",type:"text"},{key:"clientSecret",label:"Client Secret",value:"ECm...",type:"password"}]},{id:3,name:"Razorpay",category:"Payment Gateway",description:"Razorpay payment gateway",enabled:!1,configured:!1,fields:[{key:"keyId",label:"Key ID",value:"",type:"text"},{key:"keySecret",label:"Key Secret",value:"",type:"password"}]},{id:4,name:"Twilio",category:"SMS Service",description:"SMS and messaging service",enabled:!0,configured:!0,fields:[{key:"accountSid",label:"Account SID",value:"AC...",type:"text"},{key:"authToken",label:"Auth Token",value:"...",type:"password"},{key:"phoneNumber",label:"Phone Number",value:"+1234567890",type:"text"}]},{id:5,name:"SendGrid",category:"Email Service",description:"Transactional email service",enabled:!1,configured:!1,fields:[{key:"apiKey",label:"API Key",value:"",type:"password"},{key:"fromEmail",label:"From Email",value:"",type:"email"}]},{id:6,name:"Google Maps",category:"Map Service",description:"Google Maps API integration",enabled:!0,configured:!0,fields:[{key:"apiKey",label:"API Key",value:"AIzaSy...",type:"password"}]},{id:7,name:"AWS S3",category:"Storage Service",description:"Amazon S3 file storage",enabled:!1,configured:!1,fields:[{key:"accessKeyId",label:"Access Key ID",value:"",type:"text"},{key:"secretAccessKey",label:"Secret Access Key",value:"",type:"password"},{key:"bucketName",label:"Bucket Name",value:"",type:"text"},{key:"region",label:"Region",value:"",type:"text"}]}];function F({enabled:r,onToggle:d}){return e.jsx("button",{type:"button",onClick:d,className:`inline-flex items-center w-11 h-6 rounded-full border transition-all ${r?"bg-blue-600 border-blue-600 justify-end":"bg-slate-200 border-slate-300 justify-start"}`,children:e.jsx("span",{className:"h-5 w-5 rounded-full bg-white shadow-sm"})})}function z(){const[r,d]=c.useState(E),[u,x]=c.useState(null),[b,g]=c.useState({}),[m,p]=c.useState(r.reduce((s,l)=>(l.fields.forEach(t=>{s[`${l.id}-${t.key}`]=t.value}),s),{})),h=s=>{d(l=>l.map(t=>t.id===s?{...t,enabled:!t.enabled}:t))},f=(s,l,t)=>{const a=`${s}-${l}`;p(i=>({...i,[a]:t}));const n=r.find(i=>i.id===s);n.fields.some(i=>{const o=`${s}-${i.key}`;return m[o]||i.key===o.split("-")[1]&&t})&&!n.configured&&d(i=>i.map(o=>o.id===s?{...o,configured:!0}:o))},j=(s,l)=>{const t=`${s}-${l}`;g(a=>({...a,[t]:!a[t]}))},k=s=>{const l=r.find(a=>a.id===s),t=l.fields.map(a=>({key:a.key,value:m[`${s}-${a.key}`]||a.value}));A("Saving service:",l.name,t),alert(`${l.name} configuration saved successfully!`),d(a=>a.map(n=>n.id===s?{...n,configured:!0}:n))},v=s=>{r.find(t=>t.id===s).fields.forEach(t=>{const a=`${s}-${t.key}`;p(n=>({...n,[a]:t.value||""}))})},w=[...new Set(r.map(s=>s.category))];return e.jsx("div",{className:"p-2 lg:p-3 bg-slate-50 min-h-screen",children:e.jsxs("div",{className:"w-full mx-auto max-w-6xl",children:[e.jsx("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-3 mb-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-7 h-7 rounded-lg bg-blue-500 flex items-center justify-center",children:e.jsx(S,{className:"w-3.5 h-3.5 text-white"})}),e.jsx("h1",{className:"text-lg font-bold text-slate-900",children:"3rd Party Configuration"})]})}),e.jsx("div",{className:"space-y-4",children:w.map(s=>{const l=r.filter(t=>t.category===s);return e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-slate-200 p-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-slate-900 mb-3",children:s}),e.jsx("div",{className:"space-y-3",children:l.map(t=>e.jsxs("div",{className:"border border-slate-200 rounded-lg p-3 hover:border-slate-300 transition-colors",children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{className:"text-xs font-semibold text-slate-900",children:t.name}),e.jsx("div",{className:"flex items-center gap-1",children:t.configured?e.jsxs(e.Fragment,{children:[e.jsx(C,{className:"w-3.5 h-3.5 text-green-600"}),e.jsx("span",{className:"text-[10px] text-green-600",children:"Configured"})]}):e.jsxs(e.Fragment,{children:[e.jsx($,{className:"w-3.5 h-3.5 text-red-600"}),e.jsx("span",{className:"text-[10px] text-red-600",children:"Not Configured"})]})})]}),e.jsx("p",{className:"text-[10px] text-slate-600",children:t.description})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(F,{enabled:t.enabled,onToggle:()=>h(t.id)}),e.jsx("button",{type:"button",onClick:()=>x(u===t.id?null:t.id),className:"text-xs text-blue-600 hover:text-blue-700 font-medium",children:u===t.id?"Hide":"Configure"})]})]}),u===t.id&&e.jsxs("div",{className:"mt-3 pt-3 border-t border-slate-200 space-y-3",children:[t.fields.map(a=>{const n=`${t.id}-${a.key}`,y=a.type==="password",i=b[n],o=m[n]||a.value||"";return e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-700 mb-1.5",children:a.label}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:y&&!i?"password":"text",value:o,onChange:N=>f(t.id,a.key,N.target.value),placeholder:`Enter ${a.label.toLowerCase()}`,className:"w-full px-3 py-2 pr-10 text-xs border border-slate-300 rounded-lg bg-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"}),y&&e.jsx("button",{type:"button",onClick:()=>j(t.id,a.key),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-slate-400 hover:text-slate-600",children:i?e.jsx(K,{className:"w-3.5 h-3.5"}):e.jsx(P,{className:"w-3.5 h-3.5"})})]})]},a.key)}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx("button",{type:"button",onClick:()=>v(t.id),className:"px-3 py-1.5 text-xs font-medium bg-white border border-slate-300 text-slate-700 rounded-lg hover:bg-slate-50 transition-colors",children:"Reset"}),e.jsx("button",{type:"button",onClick:()=>k(t.id),className:"px-3 py-1.5 text-xs font-medium bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Save"})]})]})]},t.id))})]},s)})})]})})}export{z as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.