PageSourceSearch

https://www.creatop.ai/assets/BannedWordsBasicChecker-CX2gQtV8.js

js creatop.ai collected 2026-10-02 01:11:30 UTC 13,213 bytes, 1 lines download raw bytes

1import{r as c,j as e,h as T,i as $,aW as g,g as v}from"./index-CXUX1T7T.js";import{T as m}from"./ToolPanel-B5_WLYiG.js";import{C as B}from"./CopyButton-DAk_RL2l.js";import{R as w}from"./ResultStat-CNVXIeSq.js";import{E as k}from"./EmptyState-CjXhKZDK.js";import"./copy-GEPvUP1R.js";const N={violence:{category:"Violence & Harm",severity:"critical",words:[{word:"kill",alternatives:["eliminate","defeat","overcome"]},{word:"die",alternatives:["pass away","end","stop"]},{word:"hurt",alternatives:["injure","upset","bother"]},{word:"fight",alternatives:["compete","debate","challenge"]},{word:"attack",alternatives:["criticize","address","target"]},{word:"shoot",alternatives:["film","capture","photograph"]},{word:"bomb",alternatives:["surprise","amaze","delight"]},{word:"gun",alternatives:["weapon","tool","device"]},{word:"knife",alternatives:["blade","cutter","tool"]},{word:"murder",alternatives:["end","stop","terminate"]},{word:"blood",alternatives:["injury","wound","damage"]},{word:"dead",alternatives:["gone","passed","ended"]}]},adult:{category:"Adult Content",severity:"critical",words:[{word:"porn",alternatives:["adult content","mature content"]},{word:"sex",alternatives:["intimacy","relationship"]},{word:"xxx",alternatives:["explicit","mature"]},{word:"nudes",alternatives:["photos","images"]},{word:"nude",alternatives:["bare","natural"]},{word:"naked",alternatives:["unclothed","bare"]},{word:"orgasm",alternatives:["climax","peak"]},{word:"cock",alternatives:["rooster","male bird"]},{word:"dick",alternatives:["detective","male name"]}]},drugs:{category:"Drugs & Controlled Substances",severity:"critical",words:[{word:"cocaine",alternatives:["drug","substance"]},{word:"heroin",alternatives:["substance","drug"]},{word:"marijuana",alternatives:["cannabis","hemp"]},{word:"weed",alternatives:["plant","cannabis"]},{word:"meth",alternatives:["methamphetamine","drug"]},{word:"acid",alternatives:["lsd","chemical","substance"]},{word:"ecstasy",alternatives:["mdma","substance"]},{word:"molly",alternatives:["substance","drug"]},{word:"xanax",alternatives:["medication","prescription"]},{word:"oxy",alternatives:["oxycodone","medication"]},{word:"lean",alternatives:["dxm","cough syrup"]},{word:"shroom",alternatives:["psilocybin","mushroom"]}]},gambling:{category:"Gambling & Betting",severity:"high",words:[{word:"betting",alternatives:["wagering","gaming"]},{word:"gamble",alternatives:["take a chance","risk"]},{word:"casino",alternatives:["gaming venue","entertainment"]},{word:"slots",alternatives:["slot machines","gaming"]},{word:"poker",alternatives:["card game","game"]},{word:"bookie",alternatives:["bookmaker","sports betting"]},{word:"odds",alternatives:["probability","chances"]},{word:"jackpot",alternatives:["prize","big win"]},{word:"sports betting",alternatives:["sports gaming","wagering"]}]},political:{category:"Political Content",severity:"high",words:[{word:"election fraud",alternatives:["election dispute","election challenge"]},{word:"vote rigging",alternatives:["voting concerns","election issues"]},{word:"conspiracy",alternatives:["theory","alleged plot"]},{word:"coup",alternatives:["overthrow","takeover"]},{word:"dictator",alternatives:["authoritarian leader","ruler"]},{word:"propaganda",alternatives:["messaging","information"]},{word:"incite",alternatives:["encourage","inspire"]},{word:"riot",alternatives:["protest","demonstration"]}]},financial:{category:"Financial Claims",severity:"high",words:[{word:"guaranteed income",alternatives:["potential earnings","possible income"]},{word:"get rich",alternatives:["build wealth","earn money"]},{word:"fast money",alternatives:["quick earnings","side income"]},{word:"make thousands",alternatives:["earn more","boost income"]},{word:"crypto guaranteed",alternatives:["crypto potential","cryptocurrency opportunity"]},{word:"stock tips",alternatives:["market insights","investment ideas"]},{word:"investment guaranteed",alternatives:["investment opportunity","investment potential"]},{word:"make millions",alternatives:["build wealth","financial growth"]}]},health:{category:"Health Claims",severity:"high",words:[{word:"cure cancer",alternatives:["cancer treatment","cancer support"]},{word:"cure covid",alternatives:["covid treatment","covid prevention"]},{word:"cure diabetes",alternatives:["diabetes management","diabetes treatment"]},{word:"miracle cure",alternatives:["effective treatment","medical breakthrough"]},{word:"reverse aging",alternatives:["anti-aging","age management"]},{word:"lose weight",alternatives:["weight management","fitness goal"]},{word:"detox",alternatives:["cleanse","wellness"]},{word:"prevent disease",alternatives:["health maintenance","wellness"]}]},spam:{category:"Spam & Manipulation",severity:"medium",words:[{word:"click here",alternatives:["explore","learn more"]},{word:"dm me",alternatives:["send a message","contact me"]},{word:"follow back",alternatives:["follow","follow for more"]},{word:"rate me",alternatives:["share your thoughts","feedback"]},{word:"tag a friend",alternatives:["share with friends","recommend"]},{word:"comment below",alternatives:["share your thoughts","engage"]}]}},z=r=>{switch(r){case"critical":return"bg-red-500/20 text-red-700 dark:text-red-300";
1case"high":return"bg-amber-500/20 text-amber-700 dark:text-amber-300";case"medium":return"bg-yellow-500/20 text-yellow-700 dark:text-yellow-300";default:return"bg-violet-500/20 text-violet-700 dark:text-violet-300"}},C=r=>{switch(r){case"critical":return"bg-red-500/10 text-red-600 border-red-500/30";case"high":return"bg-amber-500/10 text-amber-600 border-amber-500/30";case"medium":return"bg-yellow-500/10 text-yellow-600 border-yellow-500/30";default:return"bg-violet-500/10 text-violet-600 border-violet-500/30"}},S=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),A=()=>{const[r,b]=c.useState(""),[h,E]=c.useState(""),[x,f]=c.useState(!1),[l,R]=c.useState(null),i=c.useMemo(()=>{if(!r.trim())return[];const t=[],n=r.toLowerCase();return Object.entries(N).forEach(([,s])=>{s.words.forEach(a=>{const o=new RegExp(`\\b${S(a.word)}\\b`,"gi"),u=n.match(o);u&&t.push({word:a.word,count:u.length,category:s.category,severity:s.severity,alternatives:a.alternatives})})}),t},[r]),W=c.useMemo(()=>{if(!r)return null;if(i.length===0)return e.jsx("span",{children:r});const t=new Map;i.forEach(d=>t.set(d.word.toLowerCase(),d.severity));const n=new RegExp(`\\b(${i.map(d=>S(d.word)).join("|")})\\b`,"gi"),s=[];let a=0,o,u=0;for(;(o=n.exec(r))!==null;){o.index>a&&s.push(r.slice(a,o.index));const d=t.get(o[0].toLowerCase())||"medium";s.push(e.jsx("mark",{className:`rounded px-1 ${z(d)}`,children:o[0]},`m-${u++}`)),a=o.index+o[0].length}return a<r.length&&s.push(r.slice(a)),e.jsx(e.Fragment,{children:s})},[r,i]),y=()=>{const t=h.toLowerCase().trim();let n=null;for(const[,s]of Object.entries(N)){const a=s.words.find(o=>o.word===t);if(a){n={word:a.word,category:s.category,severity:s.severity,alternatives:a.alternatives};break}}R(n)},p={critical:i.filter(t=>t.severity==="critical").length,high:i.filter(t=>t.severity==="high").length,medium:i.filter(t=>t.severity==="medium").length},j=i.length;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"inline-flex rounded-full border border-border/60 bg-background/80 p-1 backdrop-blur",children:[e.jsx("button",{type:"button",onClick:()=>f(!1),className:`rounded-full px-5 py-2 text-sm font-medium transition ${x?"text-muted-foreground hover:text-foreground":"bg-violet-600 text-white shadow-lg shadow-violet-500/25"}`,children:"Scan text"}),e.jsx("button",{type:"button",onClick:()=>f(!0),className:`rounded-full px-5 py-2 text-sm font-medium transition ${x?"bg-violet-600 text-white shadow-lg shadow-violet-500/25":"text-muted-foreground hover:text-foreground"}`,children:"Search word"})]}),x?e.jsxs(m,{title:"Search a word",description:"Check whether a single word or phrase is risky.",icon:e.jsx(v,{className:"h-5 w-5"}),children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"text",value:h,onChange:t=>E(t.target.value),onKeyDown:t=>t.key==="Enter"&&y(),placeholder:"Enter a word to check...",className:"flex-1 rounded-2xl border border-border/60 bg-background px-5 py-3 text-base text-foreground placeholder:text-muted-foreground/60 focus:outline-none focus:ring-2 focus:ring-violet-500/30 focus:border-violet-500/40 transition"}),e.jsxs("button",{type:"button",onClick:y,className:"inline-flex items-center gap-2 rounded-xl bg-violet-600 px-5 py-3 text-sm font-semibold text-white shadow-lg shadow-violet-500/25 hover:bg-violet-700 transition",children:[e.jsx(v,{className:"h-4 w-4"}),"Search"]})]}),e.jsx("div",{className:"mt-5",children:l?e.jsxs("div",{className:"rounded-2xl border border-border/60 bg-background/80 p-5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-lg font-semibold text-foreground",children:['"',l.word,'"']}
1),e.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:l.category})]}),e.jsx("span",{className:`rounded-full border px-3 py-1 text-xs font-bold uppercase tracking-wider ${C(l.severity)}`,children:l.severity})]}),e.jsxs("div",{className:"mt-4",children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground mb-2",children:"Safe alternatives"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:l.alternatives.map((t,n)=>e.jsx("span",{className:"rounded-full border border-border/60 bg-muted/40 px-3 py-1 text-sm text-foreground",children:t},n))})]})]}):h?e.jsxs("div",{className:"rounded-2xl border border-emerald-500/30 bg-emerald-500/10 p-5 text-center",children:[e.jsx(g,{className:"mx-auto h-6 w-6 text-emerald-600"}),e.jsx("p",{className:"mt-2 text-sm font-semibold text-emerald-700 dark:text-emerald-300",children:"This word is safe to use"})]}):e.jsx(k,{icon:e.jsx(v,{className:"h-5 w-5"}),title:"Type a word to check",description:"We'll tell you if it's flagged and suggest safer alternatives."})})]}):e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsx(m,{title:"Your text",description:"Paste a caption or script — we'll flag risky words as you type.",icon:e.jsx(T,{className:"h-5 w-5"}),toolbar:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>b(""),className:"rounded-xl border border-border/60 bg-background px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground hover:border-violet-400/50 transition",children:"Clear"}),e.jsx(B,{value:r,label:"Copy"})]}),children:e.jsx("textarea",{value:r,onChange:t=>b(t.target.value),placeholder:"Paste your TikTok caption, script, or description here...",className:"w-full min-h-[240px] resize-y rounded-2xl border border-border/60 bg-background px-5 py-4 text-base leading-relaxed text-foreground placeholder:text-muted-foreground/60 focus:outline-none focus:ring-2 focus:ring-violet-500/30 focus:border-violet-500/40 transition"})}),r&&e.jsx(m,{title:"Live preview",description:"Risky words are highlighted by severity.",size:"compact",children:e.jsx("div",{className:"rounded-2xl bg-muted/40 p-5 text-base leading-relaxed text-foreground whitespace-pre-wrap break-words",children:W})})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(m,{title:"Risk summary",icon:j>0?e.jsx($,{className:"h-5 w-5"}):e.jsx(g,{className:"h-5 w-5"}),size:"compact",children:r.trim()?j===0?e.jsxs("div",{className:"rounded-2xl bg-emerald-500/10 border border-emerald-500/30 p-5 text-center",children:[e.jsx(g,{className:"mx-auto h-8 w-8 text-emerald-600"}),e.jsx("p",{className:"mt-2 text-sm font-semibold text-emerald-700 dark:text-emerald-300",children:"No violations found"}),e.jsx("p",{className:"mt-1 text-xs text-emerald-600/80",children:"Your content looks safe to post."})]}):e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsx(w,{label:"Critical",value:p.critical,tone:"warning"}),e.jsx(w,{label:"High",value:p.high,tone:"warning"}),e.jsx(w,{label:"Medium",value:p.medium,tone:"default"})]}):e.jsx(k,{icon:e.jsx(g,{className:"h-5 w-5"}),title:"Nothing to scan yet",description:"Paste your text on the left to see live results."})}),i.length>0&&e.jsx(m,{title:"Flagged words",size:"compact",children:e.jsx("div",{className:"space-y-3 max-h-[420px] overflow-y-auto pr-1",children:i.map((t,n)=>e.jsxs("div",{className:"rounded-2xl border border-border/60 bg-background/80 p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("p",{className:"font-semibold text-foreground truncate",children:['"',t.word,'"']}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:t.category})]}),e.jsxs("span",{className:`shrink-0 rounded-full border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider ${C(t.severity)}`,children:[t.severity," · ",t.count]})]}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:t.alternatives.map((s,a)=>e.jsx("span",{className:"rounded-full border border-border/60 bg-muted/40 px-2.5 py-1 text-xs text-foreground",children:s},a))})]},n))})})]})]})]})};export{A 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.