import{k as T,j as e,p as a}from"./silentshield-vendor-lib-BOYiOmBi.js";import{c as _,u as C,_ as r,n as L,B as M,I as h,R as j,s as u,m as y,C as B,f as A,h as I,l as D,i as R}from"./silentshield-admin.js";import{L as l,S as w}from"./silentshield-label-CMPShFf3.js";import{C as O,a as z,b as V,S as N,T as G,c as $}from"./silentshield-collapsible-C-9b6eGf.js";import{C as H}from"./silentshield-chevron-down-DZwGJKhU.js";import{I as E}from"./silentshield-info-BOcn7Nfl.js";import{G as F}from"./silentshield-globe-DaHeodoC.js";import{C as K}from"./silentshield-check-JbCO-ozo.js";import"./silentshield-vendor-ui-BEc9V-_C.js";import"./silentshield-vendor-charts-CfxhkB09.js";/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const W=_("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const q=_("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]),k=c=>Number(c)===1,S=c=>c?1:0;function g({icon:c,label:s,description:n,settingKey:i,children:p}){var m;const{settings:o,updateGlobal:t}=C(),b=k((m=o==null?void 0:o.global)==null?void 0:m[i]);return a(B,{children:[e(A,{className:"pb-4",children:a("div",{className:"flex items-center justify-between",children:[a("div",{className:"flex items-center gap-3",children:[e("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-primary/10",children:e(c,{className:"h-4 w-4 text-primary"})}),a("div",{children:[e(I,{className:"text-sm font-medium",children:s}),e(D,{className:"text-xs",children:n})]})]}),e(w,{checked:b,onCheckedChange:P=>t(i,S(P))})]})}),b&&p&&e(R,{className:"border-t pt-4 space-y-4",children:p})]})}function J(){return a("div",{className:"space-y-6",children:[a("div",{children:[e(y,{className:"h-8 w-64 mb-2"}),e(y,{className:"h-4 w-96"})]}),[1,2,3,4,5].map(c=>e(y,{className:"h-24 w-full rounded-lg"},c))]})}const f=a("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e("path",{d:"M21 2v6h-6"}),e("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),e("path",{d:"M3 22v-6h6"}),e("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]}),v=e("span",{className:"inline-flex items-center justify-center shrink-0",style:{backgroundColor:"#2196f3",borderRadius:3,padding:2,lineHeight:0},children:a("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e("path",{d:"M21 2v6h-6"}),e("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),e("path",{d:"M3 22v-6h6"}),e("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]})}),x=e("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})});function d({method:c,variant:s}){return c==="image"?e("span",{className:`font-mono text-xs font-bold tracking-widest ${s==="dark"?"text-gray-200":"text-gray-800"}`,style:{fontFamily:"'Courier New', monospace",fontStyle:"italic",letterSpacing:3},children:"L7Ad6E"}):e("span",{className:`font-mono text-sm font-semibold tracking-wide ${s==="dark"?"text-gray-200":"text-gray-800"}`,style:{fontFamily:"'Courier New', monospace"},children:"2 × 10 = ?"})}function U({method:c}){return a("div",{className:"space-y-1.5",children:[a("div",{className:"flex items-center gap-1.5",children:[e("div",{className:"bg-gray-100 rounded px-2 py-1",children:e(d,{method:c,variant:"light"})}),e("span",{className:"text-[9px] text-gray-500",children:"Captcha"}),e("span",{className:"text-gray-400",children:f}),e("span",{className:"text-gray-400",children:x})]}),e("input",{type:"text",disabled:!0,className:"w-full h-6 text-[9px] bg-white border border-gray-200 rounded px-2 text-gray-400 placeholder:text-gray-300",placeholder:"Captcha"})]})}function X({method:c}){return a("div",{className:"bg-white border border-gray-200 rounded p-2 space-y-1",children:[c!=="image"&&e("span",{className:"text-[9px] text-gray-400 block",children:"Captcha"}),a("div",{className:"flex items-center gap-1 border border-gray-200 rounded px-1.5 py-1",children:[a("div",{className:"flex-1 flex items-center gap-1",children:[e("div",{className:"shrink-0",children:e(d,{method:c,variant:"light"})}),c==="image"&&e("span",{className:"text-[8px] text-gray-400",children:"Code"}),e("input",{type:"text",disabled:!0,className:"flex-1 min-w-0 h-4 text-[9px] bg-transparent border-0 text-gray-400 placeholder:text-gray-300 outline-none p-0",placeholder:c==="image"?"":"Antwort"})]}),e("span",{className:"text-gray-400 shrink-0",children:f}),e("span",{className:"text-gray-400 shrink-0",children:x})]})]})}function Q({method:c}){return a("div",{className:"space-y-1.5",children:[a("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"text-[9px] text-gray-500",children:"Captcha"}),e("div",{className:"bg-gray-50 rounded px-2 py-1",children:e(d,{method:c,variant:"light"})}),e("span",{className:"text-gray-400",children:f}),e("span",{className:"text-gray-400",children:x})]}),e("input",{type:"text",disabled:!0,className:"w-full h-6 text-[9px] bg-white border border-gray-200 rounded px-2 text-gray-400 placeholder:text-gray-300",placeholder:"Captcha"})]})}function Y({method:c}){return a("div",{className:"rounded-lg p-3 space-y-2",style:{backgroundColor:"#2b3a42"},children:[a("div",{className:"flex items-center gap-1.5",children:[e("div",{className:"rounded-md px-2 py-1",style:{backgroundColor:"#f0f0f0"},children:e(d,{method:c,variant:"light"})}),e("span",{className:"text-[9px]",style:{color:"#c8d6de"},children:"Captcha"}),e("span",{style:{color:"#c8d6de",opacity:.7},children:f}),e("span",{style:{color:"#c8d6de",opacity:.7},children:x})]}),e("input",{type:"text",disabled:!0,className:"w-full h-6 text-[9px] rounded-md px-2 border placeholder:text-gray-400",style:{backgroundColor:"#fff",borderColor:"rgba(255,255,255,0.1)",color:"#333",letterSpacing:2,textTransform:"uppercase"},placeholder:"Code eingeben"})]})}function Z({method:c}){return a("div",{className:"rounded-lg p-3 space-y-2",style:{background:"linear-gradient(145deg, #1e2d3a, #16232e)"},children:[a("div",{className:"flex items-center gap-1.5",children:[e("div",{className:"rounded-md px-2 py-1",style:{border:"1px solid rgba(255,255,255,0.15)",background:"rgba(255,255,255,0.04)"},children:e(d,{method:c,variant:"dark"})}),e("span",{className:"text-[9px]",style:{color:"#8a9baa"},children:"Captcha"}),e("span",{style:{color:"#8a9baa",opacity:.7},children:f}),e("span",{style:{color:"#8a9baa",opacity:.7},children:x})]}),e("input",{type:"text",disabled:!0,className:"w-full h-6 text-[9px] rounded-md px-2 border",style:{backgroundColor:"rgba(255,255,255,0.06)",borderColor:"rgba(255,255,255,0.12)",color:"#d0dbe4"},placeholder:"Antwort eingeben"})]})}function ee({method:c}){return a("div",{className:"space-y-1.5",children:[a("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"text-[9px] text-gray-500",children:"Captcha"}),e(d,{method:c,variant:"light"}),v]}),e("input",{type:"text",disabled:!0,className:"w-full h-6 text-[9px] bg-white border border-gray-300 rounded-sm px-2 text-gray-400 placeholder:text-gray-300",placeholder:"Captcha"})]})}function ae({method:c}){return a("div",{className:"bg-white border border-gray-300 rounded-sm p-2 space-y-0.5",children:[c!=="image"&&e("span",{className:"text-[9px] text-gray-500 block",children:"Captcha"}),a("div",{className:"flex items-center gap-1 border border-gray-300 rounded-sm px-1.5 py-1",children:[a("div",{className:"flex-1 flex items-center gap-1",children:[e("div",{className:"shrink-0",children:e(d,{method:c,variant:"light"})}),e("input",{type:"text",disabled:!0,className:"flex-1 min-w-0 h-4 text-[9px] bg-transparent border-0 text-gray-400 placeholder:text-gray-300 outline-none p-0",placeholder:c==="image"?"Code":"Antwort"})]}),e("span",{className:"shrink-0",children:v})]})]})}function te({method:c}){return a("div",{className:"space-y-1.5",children:[a("div",{className:"flex items-center gap-1.5",children:[e("div",{className:"text-[9px] text-gray-500",children:"Captcha"}),e(d,{method:c,variant:"light"}),v]}),e("input",{type:"text",disabled:!0,className:"w-full h-6 text-[9px] bg-white border border-gray-300 rounded-sm px-2 text-gray-400 placeholder:text-gray-300",placeholder:"Captcha"})]})}const re=[{heading:r("Templates","captcha-for-contact-form-7"),templates:{5:{label:"Standard",component:U},6:{label:"Compact",component:X},7:{label:"Clean",component:Q},8:{label:"Dark Card",component:Y},9:{label:"Gradient Dark",component:Z}}},{heading:r("Classic Templates","captcha-for-contact-form-7"),templates:{0:{label:"Classic",component:ee},1:{label:"Classic Boxed",component:ae},2:{label:"Classic Label",component:te}}}];function ce({selected:c,method:s,onSelect:n}){return e("div",{className:"space-y-4",children:re.map(({heading:i,templates:p})=>a("div",{children:[e("span",{className:"block text-xs text-muted-foreground font-medium mb-2",children:i}),e("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:Object.entries(p).map(([o,{label:t,component:b}])=>{const m=c===o;return a("button",{type:"button",onClick:()=>n(o),className:`group relative rounded-xl border-2 p-2 text-left transition-all hover:border-primary/50 ${m?"border-primary ring-2 ring-primary/20":"border-border"}`,children:[m&&e("div",{className:"absolute -top-1.5 -right-1.5 z-10 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:e(K,{className:"h-3 w-3"})}),e("div",{className:"pointer-events-none select-none",children:e(b,{method:s})}),e("span",{className:`block text-center text-[11px] mt-2 font-medium ${m?"text-primary":"text-muted-foreground"}`,children:t})]},o)})})]},i))})}function ge(){const{settings:c,isLoading:s,updateGlobal:n}=C(),[i,p]=T(!1);if(s||!c)return e(J,{});const o=c.global??{};return a("div",{className:"space-y-6",children:[a("div",{children:[e("h1",{className:"text-2xl font-bold tracking-tight",children:r("Protection Settings","captcha-for-contact-form-7")}),e("p",{className:"text-muted-foreground",children:r("Configure captcha modules and detection methods","captcha-for-contact-form-7")})]}),e(g,{icon:L,label:r("Captcha Module","captcha-for-contact-form-7"),description:r("Protects forms with various captcha methods","captcha-for-contact-form-7"),settingKey:"protection_captcha_enable",children:a("div",{className:"space-y-4",children:[a("div",{className:"space-y-2",children:[e(l,{className:"text-xs font-medium",children:r("Method","captcha-for-contact-form-7")}),e("div",{className:"grid grid-cols-3 gap-2",children:[{value:"honey",label:r("Honeypot","captcha-for-contact-form-7"),desc:r("Invisible, recommended","captcha-for-contact-form-7")},{value:"math",label:r("Math Problem","captcha-for-contact-form-7"),desc:r("Addition/Subtraction","captcha-for-contact-form-7")},{value:"image",label:r("Image Captcha","captcha-for-contact-form-7"),desc:r("Distorted Text","captcha-for-contact-form-7")}].map(t=>a("button",{onClick:()=>n("protection_captcha_method",t.value),className:`rounded-lg border p-3 text-left transition-colors ${o.protection_captcha_method===t.value?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,children:[e("div",{className:"text-sm font-medium",children:t.label}),e("div",{className:"text-[10px] text-muted-foreground",children:t.desc}),t.value==="honey"&&e(M,{variant:"secondary",className:"mt-1 text-[9px] px-1",children:r("Recommended","captcha-for-contact-form-7")})]},t.value))})]}),a("div",{className:"grid gap-4 sm:grid-cols-2",children:[a("div",{className:"space-y-2",children:[e(l,{className:"text-xs",children:r("Label","captcha-for-contact-form-7")}),e(h,{value:o.protection_captcha_label??"",onChange:t=>n("protection_captcha_label",t.target.value),className:"h-9"})]}),a("div",{className:"space-y-2",children:[e(l,{className:"text-xs",children:r("Placeholder","captcha-for-contact-form-7")}),e(h,{value:o.protection_captcha_placeholder??"",onChange:t=>n("protection_captcha_placeholder",t.target.value),className:"h-9"})]}),a("div",{className:"space-y-2 sm:col-span-2",children:[e(l,{className:"text-xs",children:r("Template","captcha-for-contact-form-7")}),e(ce,{selected:String(o.protection_captcha_template??7),method:o.protection_captcha_method??"math",onSelect:t=>n("protection_captcha_template",Number(t))})]}),a("div",{className:"space-y-2",children:[e(l,{className:"text-xs",children:r("Field Name","captcha-for-contact-form-7")}),e(h,{value:o.protection_captcha_field_name??"",onChange:t=>n("protection_captcha_field_name",t.target.value),className:"h-9 font-mono text-xs"})]})]}),a("div",{className:"flex items-center justify-between rounded-lg border p-3",children:[a("div",{className:"flex items-center gap-2",children:[e(q,{className:"h-4 w-4 text-muted-foreground"}),a("div",{children:[e(l,{className:"text-xs font-medium",children:r("Audio Support","captcha-for-contact-form-7")}),e("p",{className:"text-[10px] text-muted-foreground",children:r("Web Speech API for accessibility","captcha-for-contact-form-7")})]})]}),e(w,{checked:k(o.protection_captcha_audio_enable),onCheckedChange:t=>n("protection_captcha_audio_enable",S(t))})]}),a(O,{open:i,onOpenChange:p,children:[a(z,{className:"flex w-full items-center justify-between rounded-lg border p-3 hover:bg-accent transition-colors",children:[a("div",{className:"flex items-center gap-2",children:[e(j,{className:"h-4 w-4 text-muted-foreground"}),e(l,{className:"text-xs font-medium cursor-pointer",children:r("Reload Button Styling","captcha-for-contact-form-7")})]}),e(H,{className:`h-4 w-4 transition-transform ${i?"rotate-180":""}`})]}),a(V,{className:"mt-2 space-y-3 rounded-lg border p-4",children:[a("div",{className:"grid gap-3 sm:grid-cols-2",children:[a("div",{className:"space-y-2",children:[e(l,{className:"text-xs",children:r("Background Color","captcha-for-contact-form-7")}),a("div",{className:"flex gap-2",children:[e("input",{type:"color",value:o.protection_captcha_reload_bg_color||"#2196f3",onChange:t=>n("protection_captcha_reload_bg_color",t.target.value),className:"h-9 w-12 rounded border cursor-pointer"}),e(h,{value:o.protection_captcha_reload_bg_color||"#2196f3",onChange:t=>n("protection_captcha_reload_bg_color",t.target.value),className:"h-9 font-mono text-xs"})]})]}),a("div",{className:"space-y-2",children:[e(l,{className:"text-xs",children:r("Border Color","captcha-for-contact-form-7")}),a("div",{className:"flex gap-2",children:[e("input",{type:"color",value:o.protection_captcha_reload_border_color||"#1976d2",onChange:t=>n("protection_captcha_reload_border_color",t.target.value),className:"h-9 w-12 rounded border cursor-pointer"}),e(h,{value:o.protection_captcha_reload_border_color||"#1976d2",onChange:t=>n("protection_captcha_reload_border_color",t.target.value),className:"h-9 font-mono text-xs"})]})]})]}),a("div",{className:"space-y-2",children:[e(l,{className:"text-xs",children:u(r("Padding: %spx","captcha-for-contact-form-7"),o.protection_captcha_reload_padding||3)}),e(N,{value:[Number(o.protection_captcha_reload_padding)||3],onValueChange:([t])=>n("protection_captcha_reload_padding",String(t)),min:0,max:20,step:1})]}),a("div",{className:"space-y-2",children:[e(l,{className:"text-xs",children:u(r("Border Radius: %spx","captcha-for-contact-form-7"),o.protection_captcha_reload_border_radius||3)}),e(N,{value:[Number(o.protection_captcha_reload_border_radius)||3],onValueChange:([t])=>n("protection_captcha_reload_border_radius",String(t)),min:0,max:20,step:1})]}),a("div",{className:"space-y-2",children:[e(l,{className:"text-xs",children:u(r("Icon Size: %spx","captcha-for-contact-form-7"),o.protection_captcha_reload_icon_size||16)}),e(N,{value:[Number(o.protection_captcha_reload_icon_size)||16],onValueChange:([t])=>n("protection_captcha_reload_icon_size",String(t)),min:8,max:32,step:1})]}),a("div",{className:"space-y-2",children:[e(l,{className:"text-xs",children:r("Icon Color","captcha-for-contact-form-7")}),e("div",{className:"flex gap-2",children:["black","white"].map(t=>e("button",{onClick:()=>n("protection_captcha_reload_icon",t),className:`rounded-lg border px-4 py-2 text-xs capitalize transition-colors ${o.protection_captcha_reload_icon===t?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,children:t==="black"?r("Black","captcha-for-contact-form-7"):r("White","captcha-for-contact-form-7")},t))})]})]})]})]})}),e(g,{icon:G,label:r("Timer Protection (Minimum Fill Time)","captcha-for-contact-form-7"),description:r("Detects bots that submit forms in under X milliseconds","captcha-for-contact-form-7"),settingKey:"protection_time_enable",children:a("div",{className:"space-y-4",children:[a("div",{className:"space-y-2",children:[e("div",{className:"flex items-center justify-between",children:e(l,{className:"text-xs",children:u(r("Minimum Time: %sms","captcha-for-contact-form-7"),o.protection_time_ms)})}),e(N,{value:[Number(o.protection_time_ms)||500],onValueChange:([t])=>n("protection_time_ms",t),min:100,max:5e3,step:50})]}),a("div",{className:"space-y-2",children:[e(l,{className:"text-xs",children:r("Field Name","captcha-for-contact-form-7")}),e(h,{value:o.protection_time_field_name??"",onChange:t=>n("protection_time_field_name",t.target.value),className:"h-9 font-mono text-xs"})]}),a("div",{className:"flex items-start gap-2 rounded-lg bg-accent p-3",children:[e(E,{className:"h-4 w-4 text-muted-foreground mt-0.5 shrink-0"}),e("p",{className:"text-xs text-muted-foreground",children:u(r("Detects bots that submit forms in under %s milliseconds","captcha-for-contact-form-7"),o.protection_time_ms)})]})]})}),e(g,{icon:$,label:r("JavaScript Detection","captcha-for-contact-form-7"),description:r("Blocks submissions from clients without JavaScript support","captcha-for-contact-form-7"),settingKey:"protection_javascript_enable"}),e(g,{icon:F,label:r("Browser Detection","captcha-for-contact-form-7"),description:r("Validates the user agent for real browsers","captcha-for-contact-form-7"),settingKey:"protection_browser_enable"}),e(g,{icon:W,label:r("Multiple Submission Protection","captcha-for-contact-form-7"),description:r("Prevents rapid repeated form submissions","captcha-for-contact-form-7"),settingKey:"protection_multiple_submission_enable"})]})}export{ge as default};
