1import{j as e,m as x,a1 as C,af as f,ag as m,c as F,ah as B}from"./vendor-ui-yUq4lLaR.js";import{r as n}from"./vendor-react-Cj1-pPku.js";import{g as S,s as j}from"./index-BIypEwxg.js";import"./vendor-charts-CKKTw-wt.js";import"./vendor-utils-Cwd5pBxD.js";import"./vendor-pdf-GbLtMStn.js";import"./vendor-ai-CZZ1HbHH.js";const A=async(r,h)=>{const t=` 2 You are the Anima AI Ultra-Premium Web Architect. 3 Your goal is to create a website that feels like a top-tier SaaS or Digital Agency landing page (e.g., Apple, Stripe, Linear). 4 5 PROJECT DATA: 6 - Project Name: ${r.projectName||"AI Hive Premium Project"} 7 - Activity: ${r.activityType} 8 - Language: ${r.language} (If Arabic: use 'Cairo' font and ensure perfect RTL layout) 9 - Design Style: ${r.style} (Interpret this as an ultra-modern version) 10 - Typography: ${r.fontStyle} 11 - Colors: Primary(${r.primaryColor}), Secondary(${r.secondaryColor}) 12 - Pages: ${r.pageCount} 13 - Sections: ${r.sections.join(", ")} 14 - Blog Integration: ${r.hasBlog} 15 16 ADDITIONAL CONTEXT: "${h||"Create the most attractive version possible."}" 17 18 DESIGN DIRECTIVES (MANDATORY): 19 1. **Aesthetics**: Use Glassmorphism (semi-transparent backgrounds with backdrop-blur), soft gradients, and high-end drop shadows. 20 2. **Animations**: Use Framer Motion attributes (initial, animate, whileHover) or Tailwind animate- utilities for subtle entrance effects. 21 3. **Layout**: Don't use standard boxes. Use asymmetric grids, large whitespace (breathing room), and modern bento-style layouts. 22 4. **Typography**: Use 'Inter' for English or 'Cairo' for Arabic. Vary font weights (black vs light) for hierarchy. 23 5. **Micro-interactions**: Every button and card must have a smooth hover/active scale or illumination effect. 24 6. **Imagery**: Use high-quality Unsplash source URLs for backgrounds/icons that match the activity. 25 7. **Navigation**: MUST be functional (anchor links + smooth scroll). 26 27 REQUIREMENTS: 28 - Use Tailwind CSS 3.4+. 29 - Output ONLY a JSON: 30 { 31 "html": "Fully valid HTML5 with Tailwind CDN, Lucide Icons, and Framer Motion CDN", 32 "css": "Any custom keyframe animations or glassmorphism utilities", 33 "js": "Smooth scrolling logic and Framer Motion initialization if needed" 34 } 35 36 This website MUST WOW the user and look like it cost $10k to build. 37 `;try{const a=await S(t);if(a.startsWith("ØØ¯Ø« خطأ")||a.includes("عذراÙ")||a.startsWith("خطأ:"))throw new Error(a);let l="";const c=a.match(/```(?:json)?\s*([\s\S]*?)\s*```/);if(c&&c[1])l=c[1];else{const i=a.indexOf("{"),o=a.lastIndexOf("}");i!==-1&&o!==-1&&o>i&&(l=a.substring(i,o+1))}if(l)try{return JSON.parse(l)}catch(i){console.error("Anima JSON Parse Error:",i,` 38Original String: 39`,l)}throw new Error("ÙÙ ÙØªÙ ÙÙ Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·Ùاع٠٠٠تÙÙÙØ¯ ØªÙØ³Ù٠اÙÙÙØ¯ Ø§ÙØµØÙØ. ÙØ±Ø¬Ù اÙÙ ØØ§ÙÙØ© ٠رة أخرÙ.")}catch(a){return console.error("Anima Engine Critical Failure:",a),{html:`<div class="p-10 text-white bg-red-900/20 border border-red-500 rounded-2xl text-center"> 40 <h2 class="text-2xl font-black mb-4">خطأ ÙÙ Ù ØØ±Ù Anima</h2> 41 <p>${a.message||"Ø¹Ø°Ø±Ø§ÙØ ØØ¯Ø« خطأ Ø£Ø«ÙØ§Ø¡ تÙÙÙØ¯ اÙÙÙØ¯."}</p> 42 </div>`,css:"",js:""}}},M=({hasBooked:r,onBooking:h})=>{const[t,a]=n.useState({projectName:"",activityType:"business",language:"Arabic",primaryColor:"#3b82f6",secondaryColor:"#1e293b",style:"modern",fontStyle:"sans",pageCount:1,sections:["hero","features","contact"],hasBlog:!1,url:""}),[l,c]=n.useState(""),[i,o]=n.useState("desktop"),[p,b]=n.useState(!1),[d,g]=n.useState(null),[u,y]=n.useState("preview"),w=async()=>{if(!r){h("تص٠Ù٠٠تجرÙ","coding",`Ø§ÙØ§Ø³Ù : ${t.projectName} | اÙÙØ´Ø§Ø·: ${t.activityType} | Ø§ÙØ£ÙÙØ§Ù: ${t.primaryColor}/${t.secondaryColor} | اÙÙØµÙ: ${l}`);return}b(!0),g(null);try{const{data:{user:s}}=await j.auth.getUser(),N=localStorage.getItem("user_phone");await j.from("customers_data").insert([{user_id:s?.id,phone:N,project_type:"تص٠Ù٠٠تجرÙ",message:`Ø§ÙØ§Ø³Ù : ${t.projectName} | اÙÙØ´Ø§Ø·: ${t.activityType} | Ø§ÙØ£ÙÙØ§Ù: ${t.primaryColor}/${t.secondaryColor} | اÙÙØµÙ: ${l}`,status:"Ø¬Ø¯ÙØ¯"}]);const k=await A(t,l);g(k)}catch(s){console.error("Design Generation Error:",s)}finally{b(!1)}},v=` 43 <!DOCTYPE html> 44 <html> 45 <head> 46 <meta charset="UTF-8"> 47 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 48 <script src="https://cdn.tailwindcss.com"><\/script> 49 <style>${d?.css}</style> 50 </head> 51 <body class="bg-black text-white"> 52 ${d?.html} 53 <script>${d?.js}<\/script> 54 </body> 55 </html> 56 `;return e.jsxs("div",{className:"flex flex-col xl:flex-row h-auto xl:h-[calc(100vh-100px)] gap-6 py-6 overflow-hidden px-4 xl:px-0",children:[e.jsxs(x.div,{initial:{opacity:0,x:40}
56,animate:{opacity:1,x:0},className:"w-full xl:w-[400px] flex flex-col bg-[#020D08] border border-[#05B46F]/50 rounded-[2.5rem] overflow-hidden shadow-[0_0_40px_rgba(5,180,111,0.15)] relative",children:[e.jsxs("div",{className:"p-6 border-b border-[#05B46F]/10 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-[#05B46F]/10 border border-[#05B46F]/20 flex items-center justify-center",children:e.jsx(C,{className:"w-5 h-5 text-hive-accent"})}),e.jsx("div",{children:e.jsx("h3",{className:"text-xl font-black text-white",children:"تصÙ
ÙÙ
Ù
تجرÙ"})})]}),d&&e.jsx("div",{className:"flex gap-2",children:e.jsx("button",{onClick:()=>y(u==="preview"?"code":"preview"),className:"p-2 rounded-lg bg-white/5 border border-white/10 text-hive-accent hover:bg-hive-accent/10 transition-all",children:u==="preview"?e.jsx(f,{className:"w-4 h-4"}):e.jsx(m,{className:"w-4 h-4"})})})]}),e.jsx("div",{className:"flex-1 p-6 overflow-y-auto custom-scrollbar",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("label",{className:"text-xs font-black text-white uppercase tracking-widest",children:"Ø£Ø³Ø§Ø³ÙØ§Øª اÙÙ
Ø´Ø±ÙØ¹"}),e.jsx("input",{type:"text",placeholder:"اسÙ
اÙÙ
Ø´Ø±ÙØ¹",value:t.projectName,onChange:s=>a({...t,projectName:s.target.value}),className:"w-full bg-black border border-[#05B46F]/10 rounded-xl p-3 text-xs text-white outline-none focus:border-[#05B46F]/50 transition-all text-right",dir:"rtl"}),e.jsx("input",{type:"text",placeholder:"رابط اÙÙ
تجر Ø§ÙØØ§ÙÙ (Ø¥Ù ÙØ¬Ø¯)",value:t.url,onChange:s=>a({...t,url:s.target.value}),className:"w-full bg-black border border-[#05B46F]/10 rounded-xl p-3 text-xs text-white outline-none focus:border-[#05B46F]/50 transition-all text-right",dir:"rtl"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("select",{value:t.activityType,onChange:s=>a({...t,activityType:s.target.value}),className:"bg-black border border-[#05B46F]/10 rounded-xl p-3 text-xs text-white outline-none focus:border-[#05B46F]/50 transition-all",children:[e.jsx("option",{value:"business",children:"Ø´Ø±ÙØ© خدÙ
ات"}),e.jsx("option",{value:"restaurant",children:"Ù
طعÙ
"}),e.jsx("option",{value:"store",children:"Ù
تجر Ø¥ÙÙØªØ±ÙÙÙ"}),e.jsx("option",{value:"portfolio",children:"Ø¨ÙØ±ØªÙÙÙÙÙ"})]}),e.jsxs("select",{value:t.language,onChange:s=>a({...t,language:s.target.value}),className:"bg-black border border-[#05B46F]/10 rounded-xl p-3 text-xs text-white outline-none focus:border-[#05B46F]/50 transition-all",children:[e.jsx("option",{value:"Arabic",children:"Ø§ÙØ¹Ø±Ø¨ÙØ©"}),e.jsx("option",{value:"English",children:"English"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("label",{className:"text-xs font-black text-white uppercase tracking-widest",children:"Ø§ÙØªØµÙ
ÙÙ
"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-[10px] text-slate-500",children:"Primary Color"}),e.jsx("input",{type:"color",value:t.primaryColor,onChange:s=>a({...t,primaryColor:s.target.value}),className:"w-full h-10 bg-black border border-[#05B46F]/10 rounded-xl p-1 outline-none cursor-pointer"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-[10px] text-slate-500",children:"Secondary Color"}),e.jsx("input",{type:"color",value:t.secondaryColor,onChange:s=>a({...t,secondaryColor:s.target.value}),className:"w-full h-10 bg-black border border-[#05B46F]/10 rounded-xl p-1 outline-none cursor-pointer"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("select",{value:t.style,onChange:s=>a({...t,style:s.target.value}),className:"bg-black border border-[#05B46F]/10 rounded-xl p-3 text-xs text-white outline-none focus:border-[#05B46F]/50 transition-all",children:[e.jsx("option",{value:"modern",children:"Modern"}),e.jsx("option",{value:"minimal",children:"Minimal"}),e.jsx("option",{value:"luxury",children:"Luxury"}),e.jsx("option",{value:"playful",children:"Playful"})]}),e.jsxs("select",{value:t.fontStyle,onChange:s=>a({...t,fontStyle:s.target.value}),className:"bg-black border border-[#05B46F]/10 rounded-xl p-3 text-xs text-white outline-none focus:border-[#05B46F]/50 transition-all",children:[e.jsx("option",{value:"sans",children:"Sans"}),e.jsx("option",{value:"serif",children:"Serif"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("label",{className:"text-xs font-black text-white uppercase tracking-widest",children:"اÙÙ
ØØªÙÙ"}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-[10px] text-slate-500",children:[e.jsx("span",{children:"عدد Ø§ÙØµÙØØ§Øª"}),e.jsx("span",{children:t.pageCount})]}),e.jsx("input",{type:"range",min:"1",max:"5",value:t.pageCount,onChange:s=>
56a({...t,pageCount:parseInt(s.target.value)}),className:"w-full accent-hive-accent"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"hasBlog",checked:t.hasBlog,onChange:s=>a({...t,hasBlog:s.target.checked}),className:"w-4 h-4 rounded border-[#05B46F]/20 bg-black text-[#05B46F] focus:ring-[#05B46F]"}),e.jsx("label",{htmlFor:"hasBlog",className:"text-xs text-slate-300",children:"Ø¥Ø¶Ø§ÙØ© Blog ÙÙÙ
ÙÙØ¹"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("label",{className:"text-xs font-black text-white uppercase tracking-widest",children:"ÙØµÙ إضاÙÙ (Ø§Ø®ØªÙØ§Ø±Ù)"}),e.jsx("div",{className:"relative bg-black border border-[#05B46F]/10 rounded-2xl p-2 focus-within:border-[#05B46F]/50 transition-all",children:e.jsx("textarea",{value:l,onChange:s=>c(s.target.value),placeholder:"Ø£Ø¶Ù ØªÙØ§ØµÙÙ Ø£Ø®Ø±Ù ØªØ±ÙØ¯Ùا ÙÙ Ø§ÙØªØµÙ
ÙÙ
...",className:"w-full bg-transparent p-3 text-xs text-white outline-none resize-none h-24"})})]})]})}),e.jsx("div",{className:"p-6 border-t border-hive-border bg-black/20",children:e.jsxs("button",{onClick:w,disabled:p,className:"group w-full text-white font-bold py-4 rounded-2xl hover:scale-[1.02] active:scale-[0.98] transition-all shadow-lg shadow-[#05B46F]/30 disabled:opacity-50 flex items-center justify-center gap-3 border border-[#05B46F]/20",style:{background:"linear-gradient(to right, #05B46F 0%, #07533A 100%)"},children:[e.jsx("span",{children:"Ø¥ÙØ´Ø§Ø¡ Ø§ÙØªØµÙ
ÙÙ
Ø§ÙØ¢Ù"}),e.jsx(x.div,{animate:{x:[0,-4,0]},transition:{repeat:1/0,duration:1.5,ease:"easeInOut"},children:e.jsx(F,{className:"w-5 h-5"})})]})})]}),e.jsxs(x.div,{initial:{opacity:0,x:-40},animate:{opacity:1,x:0},className:"flex-1 min-h-[500px] xl:min-h-0 flex flex-col bg-[#020D08] border border-[#05B46F]/50 rounded-[2.5rem] overflow-hidden shadow-[0_0_40px_rgba(5,180,111,0.15)] relative",children:[e.jsxs("div",{className:"p-5 border-b border-hive-border flex justify-between items-center bg-black/40",children:[e.jsx("div",{className:"flex gap-2",children:e.jsx("button",{className:"flex items-center gap-2 px-4 py-1.5 bg-white/5 border border-hive-border rounded-lg text-[10px] font-bold text-white",children:"Ù
عاÙÙØ© Ø§ÙØªØµÙ
ÙÙ
"})}),e.jsxs("div",{className:"flex items-center gap-2 bg-black/60 p-1 rounded-xl border border-hive-border",children:[e.jsx("button",{onClick:()=>o("mobile"),className:`p-2 rounded-lg transition-all ${i==="mobile"?"bg-[#05B46F]/10 border border-[#05B46F] text-white shadow-[0_0_15px_rgba(5,180,111,0.2)]":"text-slate-500 border border-transparent hover:text-white"}`,children:e.jsx(B,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>o("desktop"),className:`p-2 rounded-lg transition-all ${i==="desktop"?"bg-[#05B46F]/10 border border-[#05B46F] text-white shadow-[0_0_15px_rgba(5,180,111,0.2)]":"text-slate-500 border border-transparent hover:text-white"}`,children:e.jsx(m,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center relative overflow-hidden bg-[#050505]",children:[p&&e.jsxs("div",{className:"absolute inset-0 z-50 flex flex-col items-center justify-center space-y-6 bg-black/80 backdrop-blur-md",children:[e.jsxs("div",{className:"relative",children:[e.jsx(f,{className:"w-20 h-20 text-hive-accent animate-pulse"}),e.jsx("div",{className:"absolute -inset-4 border-2 border-hive-accent/20 border-t-hive-accent rounded-full animate-spin"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-2xl font-black text-white",children:"Ø¬Ø§Ø±Ù Ø¥ÙØ´Ø§Ø¡ اÙÙ
تجر..."}),e.jsx("p",{className:"text-hive-accent/60 text-sm animate-pulse",children:"ÙØªÙ
Ø§ÙØ¢Ù تØÙÙ٠اÙÙØµÙ Ø¥ÙÙ ÙÙØ¯ برÙ
ج٠Ù
ØªÙØ§Ù
Ù"})]})]}),!d&&!p?e.jsxs("div",{className:"flex flex-col items-center justify-center space-y-8 opacity-20",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-32 h-32 bg-[#05B46F]/5 border border-[#05B46F]/20 rounded-full flex items-center justify-center",children:e.jsx(m,{className:"w-16 h-16 text-[#05B46F] drop-shadow-[0_0_15px_rgba(5,180,111,0.5)]"})}),e.jsx(x.div,{animate:{scale:[1,1.2,1],opacity:[.5,1,.5]},transition:{repeat:1/0,duration:2},className:"absolute -top-2 -right-2 w-8 h-8 bg-[#05B46F] rounded-full flex items-center justify-center text-black font-black text-xs shadow-[0_0_15px_rgba(5,180,111,0.4)]",children:"?"})]}),e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx("p",{className:"text-2xl font-black text-white tracking-widest uppercase",children:"Ø¨Ø§ÙØªØ¸Ø§Ø± Ø§ÙØ¨ÙØ§ÙØ§Øª..."}),e.jsx("p",{className:"text-[10px] text-slate-500 font-mono tracking-[0.4em] uppercase",children:"READY TO TRANSFORM YOUR VISION INTO CODE"})]})]}):e.jsx("div",{className:`w-full h-full transition-all duration-700 flex items-center justify-center ${i==="mobile"?"max-w-[375px]":"max-w-full"}`,children:u==="preview"?e.jsx("iframe",{srcDoc:v,className:"w-full h-full border-none bg-white rounded-t-xl md:rounded-none",title:"Anima Preview"}):e.jsx("div",{className:"w-full h-full p-6 overflow-auto font-mono text-xs text-slate-300 bg-[#0a0a0a]",children:e.jsx("pre",{children:v})})})]})]})]})};export{M 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.