1import{r as s,u as te,b as v,j as e,H as Re}from"./app-DP13319Q.js";import{D as $e}from"./DraggableMenu-Bk7Spryo.js";import"./model-viewer-BNdxy5m2.js";import{F as m,h as ae,ax as U,al as Ue,aU as Ie,ba as Be,aH as De,w as He,be as qe}from"./index-CtyZ6W6U.js";import{M as Oe}from"./react-tooltip.min-DW3XhwOj.js";/* empty css */import"./index-DQkUn08L.js";function Ke(){var G,K,X;const[le,oe]=s.useState(!0);te().props,s.useRef(null);const{auth:M,template:i,initialFunnels:C}=te().props,[se,ie]=s.useState(0),[re,w]=s.useState([]),[N,ne]=s.useState(""),[E,de]=s.useState(""),[b,I]=s.useState("fuzzy"),[P,B]=s.useState(1),[ce,_]=s.useState(!0),[j,f]=s.useState(!1),[D,g]=s.useState(""),[H,F]=s.useState(""),[h,q]=s.useState(null),[d,ue]=s.useState({userTemplates:[],defaultTemplates:[],paidTemplates:[]}),[O,A]=s.useState(!1),[y,R]=s.useState({flySign:!1,eyeTracking:!1}),[x,k]=s.useState([{id:1,movingEffect:"bee",movingPattern:"none",brandMessage:"",avatarLink:"",landingPage:"",flySignOption1:"Hide",flySignOption2:"Hide"}]),[c,S]=s.useState({mode:"Select Mode",theme:[],freestyleMode:""}),V=t=>{S(n=>n.theme.includes(t)?{...n,theme:n.theme.filter(u=>u!==t)}:{...n,theme:[...n.theme,t]});const l=parseInt(t,10);let a=0;const o=d.defaultTemplates.find(n=>n.id===l);o&&o.price&&(a=o.price);const r=d.userTemplates.find(n=>n.id===l);if(r&&r.price&&(a=r.price),d.paidTemplates){const n=d.paidTemplates.find(u=>u.id===l);n&&(a=n.price)}ie(a)},pe=t=>{t<=0||S(l=>{const a=[...l.theme];return[a[t],a[t-1]]=[a[t-1],a[t]],{...l,theme:a}})},me=t=>{S(l=>{if(t>=l.theme.length-1)return l;const a=[...l.theme];return[a[t],a[t+1]]=[a[t+1],a[t]],{...l,theme:a}})};s.useEffect(()=>{const t=setTimeout(()=>{de(N)},500);return()=>{clearTimeout(t)}},[N]);const ge=s.useCallback(()=>{k(t=>[...t,{id:t.length+1,movingEffect:"bee",movingPattern:"none",brandMessage:"",avatarLink:"",landingPage:"",flySignOption1:"Hide",flySignOption2:"Hide"}])},[]),he=s.useCallback(t=>{x.length>1&&k(l=>l.filter(a=>a.id!==t))},[x.length]),z=s.useCallback((t,l,a)=>{k(o=>o.map(r=>r.id===t?{...r,[l]:a}:r))},[]),Y=s.useCallback((t,l)=>{(t==="mode"||t==="freestyleMode")&&S(a=>({...a,[t]:l}))},[]);s.useEffect(()=>{const t=async()=>{A(!0);
1try{const l=await v.get("/paidtemplates");ue(l.data)}catch(l){console.error("Error fetching templates:",l)}finally{A(!1)}};M.user&&t()},[M.user]),s.useEffect(()=>{C&&(w(C.data),_(C.next_page_url!==null))},[C]);const L=s.useCallback(async()=>{try{const t=await v.get("/search-ez-funnels",{params:{query:E,type:b,page:1}});w(t.data.data),B(1),_(t.data.next_page_url!==null)}catch(t){console.error("Search error:",t),g("Failed to search funnels. Please try again."),setTimeout(()=>g(""),5e3)}},[E,b]);s.useEffect(()=>{E&&L()},[E,L]);const fe=s.useCallback(async()=>{var t,l,a;try{f(!0);const o=((t=document.querySelector('meta[name="csrf-token"]'))==null?void 0:t.getAttribute("content"))||"",r=await v.get("/search-ez-funnels",{params:{query:N,type:b,page:P+1,with:"customDomains,handleDomains"},headers:{"X-CSRF-TOKEN":o,"Content-Type":"application/json"}});r.data&&r.data.data&&(w(n=>[...n,...r.data.data]),B(P+1),_(r.data.next_page_url!==null))}catch(o){console.error("Load more error:",o),g(((a=(l=o.response)==null?void 0:l.data)==null?void 0:a.message)||"Failed to load more items. Please try again."),setTimeout(()=>g(""),5e3)}finally{f(!1)}},[N,b,P]),xe=s.useCallback(async t=>{try{f(!0);const a=(await v.get(`/edit-ez-funnel/${t}`)).data;q(a),R({flySign:a.fly_sign||!1,eyeTracking:a.eye_tracking||!1}),S({mode:a.mode||"Select Mode",theme:a.theme?a.theme.split(","):[],freestyleMode:""}),a.effect_settings&&a.effect_settings.length>0?k(a.effect_settings.map((o,r)=>({id:o.id||r+1,movingEffect:o.moving_effect,movingPattern:o.moving_pattern,brandMessage:o.brand_message,avatarLink:o.avatar_link,landingPage:o.landing_page,flySignOption1:"Hide",flySignOption2:"Hide"}))):k([{id:1,movingEffect:"bee",movingPattern:"none",brandMessage:"",avatarLink:"",landingPage:"",flySignOption1:"Hide",flySignOption2:"Hide"}])}catch(l){console.error("Error loading funnel data:",l),g("Failed to load funnel data. Please try again."),setTimeout(()=>g(""),5e3)}finally{f(!1)}},[]),ye=s.useCallback(async t=>{var l,a;if(t.preventDefault(),f(!0),!!h)try{const o=await v.put("/update-eztheme-funnel",{id:h.id,flySign:y.flySign,eyeTracking:y.eyeTracking,effectSettings:x.length>0?x.map(r=>({id:r.id,movingEffect:r.movingEffect,movingPattern:r.movingPattern,brandMessage:r.brandMessage,avatarLink:r.avatarLink,landingPage:r.landingPage})):null});w(r=>r.map(n=>n.id===h.id?{...n,fly_sign:y.flySign,eye_tracking:y.eyeTracking,effect_settings:x.map(u=>({id:u.id,moving_effect:u.movingEffect,moving_pattern:u.movingPattern,brand_message:u.brandMessage,avatar_link:u.avatarLink,landing_page:u.landingPage}))}:n)),F("Funnel updated successfully!"),setTimeout(()=>F(""),5e3)}catch(o){console.error("Update error:",o),g(((a=(l=o.response)==null?void 0:l.data)==null?void 0:a.message)||"Failed to update funnel. Please try again."),setTimeout(()=>g(""),5e3)}finally{f(!1)}},[h,y,x]),be=s.useCallback(async()=>{var t,l;if(h){f(!0);try{const a=c.freestyleMode===""?c.mode:c.freestyleMode,o=await v.put("/update-ez-funnel-theme",{id:h.id,theme:c.theme.join(","),mode:a});w(r=>r.map(n=>n.id===h.id?{...n,theme:c.theme.join(","),mode:a}:n)),F("Theme claimed successfully!"),setTimeout(()=>F(""),5e3)}catch(a){console.error("Claim theme error:",a),g(((l=(t=a.response)==null?void 0:t.data)==null?void 0:l.message)||"Failed to claim theme. Please try again."),setTimeout(()=>g(""),5e3)}finally{f(!1)}}},[h,c]),je=s.useCallback(t=>new Date(t).toLocaleDateString("en-US",{weekday:"short",day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}),[]),Q=s.useCallback(t=>{try{return new URL(t),!0}catch{return!1}},[]),$=s.useCallback(t=>{var a;return(a=t.split("?")[0].split(".").pop())==null?void 0:a.toLowerCase()},[]),Z=s.useCallback(t=>t?["jpg","jpeg","png","gif","bmp","tiff","tif","webp","apng","svg","ico"].includes(t):!1,[]),ve=s.useMemo(()=>{if(!(i!=null&&i.image))return null;const t=$(i.image);return Z(t)?e.jsx("style",{children:` 2 .blur-bg { 3 background: url('${i.user_id===0?"https://admin.ez3d.ai/":"https://ez.wiki/"}${i.image}') no-repeat center center; 4 background-size: cover; 5 } 6 `}):null},[i,$,Z]),W=s.useCallback(()=>{var ee;if(!i)return null;const t=((ee=i.image.split(".").pop())==null?void 0:ee.toLowerCase())||"",a=`${i.user_id===0?"https://admin.ez3d.ai/":"https://ez.wiki/"}${i.image}`,o=["jpg","jpeg","png","gif","bmp","tiff","tif","webp","apng","svg","ico"],r=["ppt","pptx","pdf","xls","xlsx","doc","docx","pages","ai","psd","eps","ttf","dxf","xps","rar","zip","ods","odt","odp"],n=/(?:youtube(?:-nocookie)?\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?/ ]{11})/i,u=/(?:https?:\/\/)?(?:www\.)?linkedin\.com\/(?:in|posts|company|feed|showcase|embed\/feed\/update\/urn:li:[^/]+:[^"&?/ ]+)/i,Ne=/^https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)(?:[?]?.*)$/im,ke=/^(https?:\/\/)?(www\.)?fb\.watch\/[a-zA-Z0-9(\.\?)?]/,Se=/^(https?:\/\/)?(www\.)?facebook\.com\/[a-zA-Z0-9(\.\?)?]/,ze=/<iframe.*?src=["'](.*?)["'].*?>.*?<\/iframe>/is,Te=/<blockquote/,T=i.image.match(n),Ce=i.image.match(u),J=i.image.match(Ne),Ee=i.image.match(ke),Fe=i.image.match(Se),Le=i.image.match(ze)||Te.test(i.image),Me=new Blob([i.image],{type:"text/html"}),Pe=URL.createObjectURL(Me);if(o.includes(t))return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:` 7 .blur-overlay { 8 position: fixed; 9 top: 0; 10 left: 0; 11 width: 100%; 12 height: 100%; 13 backdrop-filter: blur(20px); 14 z-index: -1; 15 } 16 `}),e.jsx("div",{className:"blur-overlay"}
16),e.jsx("img",{src:a,alt:"Background",className:"absolute inset-0 max-w-full max-h-full m-auto z-0 rounded-lg",onError:p=>console.error("Image failed to load",p)})]});if(r.includes(t))return e.jsx("iframe",{src:`https://docs.google.com/viewer?url=${a}&embedded=true`,className:"fixed top-0 left-0 w-full h-full",frameBorder:"0",loading:"lazy",allow:"autoplay; fullscreen",allowFullScreen:!0,sandbox:"allow-scripts allow-same-origin",title:"Document Viewer",scrolling:"yes"});if(Le){const p=i.image.replace(/<(iframe|blockquote)([^>]*)\s(height|width|style)=["'][^"']*["']([^>]*)>/gi,'<$1$2$4 class="fixed top-0 left-0 w-full h-full" scrolling="yes">').replace(/class="([^"]*)"/g,'class="$1 absolute inset-0 m-auto"'),_e=/<(iframe|blockquote)[^>]*class="/i.test(p)?p:p.replace(/<(iframe|blockquote)/g,'<$1 scrolling="yes" class="absolute w-full h-full inset-0 m-auto"');return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:` 17 .blur-overlay { 18 position: fixed; 19 top: 0; 20 left: 0; 21 width: 100%; 22 height: 100%; 23 backdrop-filter: blur(20px); 24 z-index: -2; 25 } 26 .twitter-tweet { 27 position: fixed; 28 top: 0; 29 left: 0; 30 width: 100vw; 31 height: 100vh; 32 object-fit: cover; 33 z-index: 0; 34 border: none; 35 } 36 `}),e.jsx("div",{className:"blur-overlay"}),e.jsx("div",{className:"fixed top-0 left-0 w-full h-full object-cover",dangerouslySetInnerHTML:{__html:_e}})]})}if(T){const p=i.option==="autoplay"?"autoplay=1":i.option==="mute"?"autoplay=1&mute=1":"mute=1";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed top-0 left-0 w-full h-full z-[-2]",children:e.jsx("iframe",{loading:"lazy",src:`https://www.youtube.com/embed/${T[1]}?${p}&loop=1&playlist=${T[1]}&controls=0&showinfo=0&modestbranding=1&iv_load_policy=3`,className:"w-full h-full object-cover",frameBorder:"0",allow:"autoplay; fullscreen",allowFullScreen:!0})}),e.jsx("style",{children:` 37 .blur-overlay { 38 position: fixed; 39 top: 0; 40 left: 0; 41 width: 100%; 42 height: 100%; 43 backdrop-filter: blur(20px); 44 z-index: -1; 45 } 46 `}),e.jsx("div",{className:"blur-overlay"}),e.jsx("iframe",{id:"bgVideo",loading:"lazy",className:"fixed top-0 left-0 w-full h-full object-cover",src:`https://www.youtube.com/embed/${T[1]}?${i.option}=1&mute=1&loop=1&playlist=${T[1]}`,title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0})]})}if(Ce){let p=i.image;return p.includes("?compact=1")||(p+=(p.includes("?")?"&":"?")+"compact=1"),e.jsx("div",{className:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black",children:e.jsx("iframe",{id:"bgVideo",src:p,className:"w-full h-full",frameBorder:"0",allowFullScreen:!0,title:"Embedded LinkedIn Post",scrolling:"yes"})})}return J?e.jsxs(e.Fragment,{children:[e.jsx("style",{children:` 47 .blur-overlay { 48 position: fixed; 49 top: 0; 50 left: 0; 51 width: 100%; 52 height: 100%; 53 backdrop-filter: blur(20px); 54 z-index: -1; 55 } 56 `}),e.jsx("div",{className:"blur-overlay"}),e.jsx("iframe",{loading:"lazy",id:"bgVideo",allow:"camera; microphone; fullscreen; display-capture; autoplay",src:`https://player.vimeo.com/video/${J[3]}?h=33160d1512&color=de0101`,className:"fixed top-0 left-0 w-full h-full object-cover",frameBorder:"0",allowFullScreen:!0})]}):Ee||Fe&&!i.image.includes("groups")?e.jsx("div",{className:"fixed top-0 left-0 w-full h-full",children:e.jsx("div",{className:"fb-post","data-href":i.image,"data-width":"1400","data-show-text":"true"})}):t==="mp4"?e.jsxs(e.Fragment,{children:[e.jsxs("video",{autoPlay:!0,loop:!0,muted:!0,playsInl
56ine:!0,className:"fixed top-0 left-0 w-full h-full object-cover z-[-3]",children:[e.jsx("source",{src:a,type:"video/mp4"}),"Your browser does not support the video tag."]}),e.jsx("style",{children:` 57 .blur-overlay { 58 position: fixed; 59 top: 0; 60 left: 0; 61 width: 100%; 62 height: 100%; 63 backdrop-filter: blur(20px); 64 z-index: -2; 65 } 66 `}),e.jsx("div",{className:"blur-overlay"}),e.jsxs("video",{id:"bgVideo",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"absolute inset-0 max-w-full max-h-full m-auto",controls:!0,children:[e.jsx("source",{src:a,type:"video/mp4"}),"Your browser does not support the video tag."]})]}):t==="glb"?e.jsxs(e.Fragment,{children:[e.jsx("style",{children:` 67 .blur-overlay { 68 position: fixed; 69 top: 0; 70 left: 0; 71 width: 100%; 72 height: 100%; 73 backdrop-filter: blur(20px); 74 z-index: -1; 75 } 76 `}),e.jsx("div",{className:"blur-overlay"}),e.jsx("model-viewer",{src:a,alt:"3D model",className:"fixed top-0 left-0 w-full h-full",ar:!0,"auto-rotate":!0,"camera-controls":!0,"shadow-intensity":"1"})]}):Q(i.image)?e.jsxs(e.Fragment,{children:[e.jsx("style",{children:` 77 .blur-overlay { 78 position: fixed; 79 top: 0; 80 left: 0; 81 width: 100%; 82 height: 100%; 83 backdrop-filter: blur(20px); 84 z-index: -1; 85 } 86 `}),e.jsx("div",{className:"blur-overlay"}),e.jsx("iframe",{loading:"lazy",id:"bgVideo",allow:"camera; microphone; fullscreen; display-capture; autoplay",src:i.image,className:"fixed top-0 left-0 w-full h-full",frameBorder:"0",allowFullScreen:!0,scrolling:"yes"})]}):e.jsx("iframe",{src:Pe,className:"fixed top-0 left-0 w-full h-full border-none",allow:"microphone *; camera *; autoplay *; fullscreen *; display-capture *;",sandbox:`allow-forms allow-modals allow-orientation-lock allow-pointer-lock 87 allow-popups allow-popups-to-escape-sandbox allow-presentation 88 allow-same-origin allow-scripts allow-top-navigation 89 allow-top-navigation-by-user-activation allow-downloads allow-storage-access-by-user-activation`,allowFullScreen:!0,loading:"lazy",name:"binauralMixerFrame",allowTransparency:"true",scrolling:"yes"})},[i,$,Q]),we=s.useMemo(()=>W(),[W]);return e.jsxs(e.Fragment,{children:[e.jsxs(Re,{children:[e.jsx("title",{children:"EZ UI - Customize Your Funnel UI"}),ve,e.jsx("style",{children:` 90 .react-tooltip { 91 z-index: 99999 !important; 92 opacity: 1 !important; 93 font-size: 12px; 94 padding: 4px 8px; 95 } 96 `})]}),e.jsx(Oe,{id:"ezui-tooltip"}),e.jsx($e,{auth:M}),e.jsxs("main",{className:`relative flex justify-end p-4 min-h-screen overflow-hidden ${(G=i==null?void 0:i.image.split(".").pop())!=null&&G.toLowerCase()&&["jpg","jpeg","png","gif","bmp","tiff","tif","webp","apng","svg","ico"].includes(((K=i.image.split(".").pop())==null?void 0:K.toLowerCase())||"")?"blur-bg":""}`,children:[e.jsx("div",{className:"absolute inset-0 z-0",children:we}),le&&e.jsxs("div",{className:"relative mt-4 mx-auto bottom-4 z-50 backdrop-blur-sm p-4 rounded-xl border border-white-700 overflow-y-auto shadow-2xl",children:[e.jsx("button",{onClick:()=>oe(!1),className:"absolute top-2 right-2 w-8 h-8 bg-black rounded-full flex items-center justify-center z-50 hover:bg-gray-800 transition-colors focus:outline-none focus:ring-2 focus:ring-white","aria-label":"Close panel","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Close this panel",children:e.jsx(m,{icon:ae,className:"text-white text-lg",style:{textShadow:"0.7px 0.7px 0 rgb(255,0,0), -0.7px -0.7px 0 rgb(0,255,255)"}})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-gray-800/80 border border-gray-700 rounded-lg p-4 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("input",{type:"text",placeholder:"Search by token",className:"flex-grow bg-white text-gray-900 px-3 py-2 rounded-md focus:outline-none focus:ring-2 focus:ring-yellow-400 min-w-0",value:N,onChange:t=>ne(t.target.value),"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Search for a funnel by its token"}),e.jsxs("div",{className:"flex items-center",children:[e.jsxs("button",{className:`font-semibold px-3 py-2 flex items-center gap-1.5 whitespace-nowrap rounded-l-md border-r transition-colors ${b==="fuzzy"?"bg-green-600 text-white border-green-700 hover:bg-green-700":"bg-gray-600 text-gray-300 border-gray-700 hover:bg-gray-700"}`,onClick:()=>{I("fuzzy"),L()},"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Fuzzy search: finds partial matches",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),"Fuzzy"]}),e.jsxs("button",{className:`font-semibold px-3 py-2 flex items-center gap-1.5 whitespace-nowrap rounded-r-md transition-colors ${b==="exact"?"bg-green-600 text-white hover:bg-green-700":"bg-gray-600 text-gray-300 hover:bg-gray-700"}`,onClick:()=>{I("exact"),L()},"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Exact search: finds only exact token matches",children:[e.jsx("span",{className:"text-sm",children:"ð"}),"Exact"]})]})]}),e.jsx("div",{className:"max-h-[65vh] overflow-y-auto custom-scrollbar space-y-2",children:re.map(t=>{var l,a;return e.jsxs("div",{className:"flex items-center p-4 gap-1 bg-[#5d0f6e] rounded-lg",children:[e.jsx("span",{className:"text-4xl select-none",children:"ð"}),e.jsx("div",{className:"flex-grow min-w-0",children:e.jsxs("div",{className:"flex flex-col gap-y-2",children:[e.jsxs("a",{href:`https://ez.wiki/${encodeURIComponent(t.token)}`,target:"_blank",className:"text-yellow-400 font-semibold truncate",rel:"noopener noreferrer","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Open this URL in a new tab",children:["https://ez.wiki/",t.token]}),(l=t.handle_domains)==null?void 0:l.map(o=>e.jsxs("a",{href:`https://${o.domain}.${o.domainselected}`,target:"_blank",className:"text-yellow-400 font-semibold truncate",rel:"noopener noreferrer","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Open this URL in a new tab",children:["https://",o.domain,".",o.domainselected]},o.id)),(a=t.custom_domains)==null?void 0:a.map(o=>e.jsxs("a",{href:`https://${o.domainselected}/${o.domain}`,target:"_blank",className:"text-yellow-400 font-semibold truncate",rel:"noopener noreferrer","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Open this URL in a new tab",children:["https://",o.domainselected,"/",o.domain]},o.id)),e.jsx("p",{className:"text-purple-300 text-sm whitespace-nowrap",children:je(t.created_at)})]})}),e.jsx("button",{className:"bg-yellow-400 text-black font-bold py-1 px-5 rounded-md text-sm hover:bg-yellow-500 transition-colors whitespace-nowrap",onClick:()=>xe(t.id),"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Customize the UI and theme for this funnel",children:"Edit UI"})]},t.id)})}),ce&&e.jsx("div",{className:"flex justify-center mt-4",children:e.jsx("button",{className:"bg-black text-white border border-white px-8 py-2 rounded-md font-semibold hover:bg-white hover:text-black transition-colors",onClick:fe,disabled:j,"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Load more funnels",children:j?"Loading...":"Load More"})})]}),h?e.jsxs("div",{className:"bg-gray-800/80 border border-gray-700 rounded-lg p-6 space-y-6",children:[H&&e.jsx("div",{className:"bg-green-500 text-white p-3 rounded-lg mb-4",children:H}),D&&e.jsx("div",{className:"bg-red-500 text-white p-3 rounded-lg mb-4",children:D}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("h2",{className:"text-yellow-400 text-xl font-bold",children:["Editing: ",h.token]}),e.jsx("button",{onClick:()=>q(null),className:"text-gray-300 hover:text-white","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Close editor and return to list",children:e.jsx(m,{icon:ae})})]}),e.jsx("hr",{className:"border-t border-gray-700"}),e.jsxs("form",{onSubmit:ye,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("h1",{className:"text-yellow-400 text-xl font-bold",children:"Effect Settings"}),e.jsx("hr",{className:"border-t border-gray-700"}),e.jsxs("div",{className:"space-y-4",children:[x.map(t=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-yellow-400 text-sm font-semibold",children:"Moving Effect"}),e.jsxs("select",{className:"w-full rounded-lg border border-gray-600 bg-gray-700 text-white text-sm px-4 py-2 focus:ring-2 focus:ring-yellow-400 focus:border-transparent",value:t.movingEffect,onChange:l=>z(t.id,"movingEffect",l.target.value),"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Select the type of flying object",children:[e.jsx("option",{value:"none",children:"Exter
96nal link"}),e.jsx("option",{selected:"",value:"bee",children:"Flying Bee"}),e.jsx("option",{value:"saucer",children:"Flying Saucer"}),e.jsx("option",{value:"bird",children:"Flying Bird"}),e.jsx("option",{value:"plane",children:"Flying Plane"}),e.jsx("option",{value:"superhero",children:"Flying Superhero"}),e.jsx("option",{value:"qr",children:"Flying Qrcode"}),e.jsx("option",{value:"real",children:"Flying Real Estate"}),e.jsx("option",{value:"coffee",children:"Flying Coffee"}),e.jsx("option",{value:"time",children:"Flying Time"}),e.jsx("option",{value:"fire",children:"Flying Camp Fire"}),e.jsx("option",{value:"burger",children:"Flying Burger"}),e.jsx("option",{value:"ball",children:"Flying Ball"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-yellow-400 text-sm font-semibold",children:"Moving Pattern"}),e.jsxs("select",{className:"w-full rounded-lg border border-gray-600 bg-gray-700 text-white text-sm px-4 py-2 focus:ring-2 focus:ring-yellow-400 focus:border-transparent",value:t.movingPattern,onChange:l=>z(t.id,"movingPattern",l.target.value),"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Select the flight path for the object",children:[e.jsx("option",{value:"none",children:"Hovering"}),e.jsx("option",{value:"top",children:"Top to Bottom"}),e.jsx("option",{value:"bottom",children:"Bottom to Top"}),e.jsx("option",{value:"left",children:"Left to Right"}),e.jsx("option",{value:"right",children:"Right to Left"}),e.jsx("option",{value:"topright",children:"TopLeft to Rightbottom"}),e.jsx("option",{value:"bottomleft",children:"Rightbottom to Topleft"}),e.jsx("option",{value:"lefttop",children:"Leftbottom to Righttop"}),e.jsx("option",{value:"leftbottom",children:"Righttop to Leftbottom"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-yellow-400 text-sm font-semibold",children:"Fly Sign Message"}),e.jsx("input",{type:"text",placeholder:"Enter your brand message",className:"w-full rounded-lg border border-gray-600 bg-gray-700 text-white text-sm px-4 py-2 focus:ring-2 focus:ring-yellow-400 focus:border-transparent",value:t.brandMessage,onChange:l=>z(t.id,"brandMessage",l.target.value),"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Message displayed by the flying object"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("label",{className:"text-yellow-400 text-sm font-semibold",children:"Avatar Link"}),e.jsx(m,{icon:U,className:"text-yellow-400 hover:text-yellow-300 cursor-help transition-colors text-sm","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Link to your avatar image"})]}),e.jsx("input",{type:"text",placeholder:"Enter avatar image URL",className:"w-full rounded-lg border border-gray-600 bg-gray-700 text-white text-sm px-4 py-2 focus:ring-2 focus:ring-yellow-400 focus:border-transparent",value:t.avatarLink,onChange:l=>z(t.id,"avatarLink",l.target.value),"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"URL for your avatar image"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-yellow-400 text-sm font-semibold",children:"Landing Page"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"text",placeholder:"Enter landing page URL",className:"w-full rounded-lg border border-gray-600 bg-gray-700 text-white text-sm pl-10 pr-4 py-2 focus:ring-2 focus:ring-yellow-400 focus:border-transparent",value:t.landingPage,onChange:l=>z(t.id,"landingPage",l.target.value),"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"URL the user is sent to when clicking the object"}),e.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-gray-400",children:e.jsx(m,{icon:Ue})})]})]}),x.length>1&&e.jsxs("button",{type:"button",className:"w-full bg-red-500 text-white rounded-lg px-4 py-2 flex items-center justify-center gap-2 font-medium hover:bg-red-600 transition-all duration-200",onClick:()=>he(t.id),"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Delete this effect configuration",children:[e.jsx(m,{icon:Ie,className:"text-lg"}),"Remove this effect"]}),e.jsx("hr",{className:"border-t border-gray-700"})]},t.id)),e.jsxs("button",{type:"button",className:"w-full bg-gradient-to-r from-yellow-500 to-yellow-400 text-gray-900 rounded-lg px-4 py-2 flex items-center justify-center gap-2 font-medium hover:shadow-lg hover:from-yellow-400 hover:to-yellow-300 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-yellow-500",onClick:ge,"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Add another flying effect to the page",children:[e.jsx(m,{icon:Be,className:"text-lg"}),"Add more effect"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-2",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx("label",{className:"text-yellow-400 text-sm font-semibold text-center",children:"Fly-Sign"}),e.jsx(m,{icon:U,className:"text-yellow-400 hover:text-yellow-300 cursor-help transition-colors text-xs","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Toggle the visibility of the flying signature"})]}),e.jsx("div",{className:"flex items-center justify-center gap-2",children:e.jsxs("label",{htmlFor:"flySignToggle",className:"inline-flex items-center cursor-pointer","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Enable or disable the flying object",children:[e.jsx("input",{type:"checkbox",id:"flySignToggle",className:"sr-only peer",checked:y.flySign,onChange:()=>R(t=>({...t,flySign:!t.flySign}))}),e.jsx("div",{className:"relative w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-rose-400"})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx("label",{className:"text-yellow-400 text-sm font-semibold text-center",children:"Eye Tracking"}),e.jsx(m,{icon:U,className:"text-yellow-400 hover:text-yellow-300 cursor-help transition-colors text-xs","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Toggle eye tracking visualization"})]}),e.jsx("div",{className:"flex items-center justify-center gap-2",children:e.jsxs("label",{htmlFor:"eyeTrackingToggle",className:"inline-flex items-center cursor-pointer","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Enable or disable the eye-tracking visualization",children:[e.jsx("input",{type:"checkbox",id:"eyeTrackingToggle",className:"sr-only peer",checked:y.eyeTracking,onChange:()=>R(t=>({...t,eyeTracking:!t.eyeTracking}))}),e.jsx("div",{className:"relative w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-rose-400"})]})})]})]}),e.jsx("div",{className:"text-center pt-2",children:e.jsx("button",{type:"submit",className:"bg-gradient-to-r from-green-600 to-green-500 text-white font-bold py-2 px-12 rounded-lg hover:from-green-700 hover:to-green-600 transition-all duration-200",disabled:j,"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Save all effect settings and toggle states",children:j?"Saving...":"Save Changes"})})]})]}),e.jsx("hr",{className:"border-t border-gray-700 mt-4 mb-4"}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-yellow-400 text-xl font-bold",children:"EZTheme Setting"}),e.jsx("hr",{className:"border-t border-gray-700"}),e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-yellow-400 text-sm font-semibold",children:"Select Mode:"}),e.jsxs("select",{className:"w-full rounded-lg border border-gray-600 bg-gray-700 text-white text-sm px-4 py-2 focus:ring-2 focus:ring-yellow-400 focus:border-transparent",value:c.mode,onCh
96ange:t=>Y("mode",t.target.value),"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Choose a pre-defined layout for your themes",children:[e.jsx("option",{children:"Select Mode"}),e.jsx("option",{children:"L"}),e.jsx("option",{children:"L,R"}),e.jsx("option",{children:"L,L,C,R"})]})]}),e.jsx("div",{className:"text-center pt-2",children:e.jsx("p",{className:"text-yellow-400 font-bold text-lg",children:"OR"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-yellow-400 text-sm font-semibold",children:"Freestyle Mode:"}),e.jsx("input",{type:"text",placeholder:"Enter freestyle mode (e.g., L,R)",className:"w-full rounded-lg border border-gray-600 bg-gray-700 text-white text-sm px-4 py-2 focus:ring-2 focus:ring-yellow-400 focus:border-transparent",value:c.freestyleMode,onChange:t=>Y("freestyleMode",t.target.value),"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Manually define a custom layout (e.g., L,C,R)"})]})]}),e.jsx("div",{className:"flex flex-col",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-yellow-400 text-sm font-semibold",children:"Select Themes:"}),e.jsx("div",{className:"mb-3 space-y-2",children:c.theme.length>0?c.theme.map((t,l)=>{var o;const a=[...d.defaultTemplates||[],...d.userTemplates||[],...d.paidTemplates||[]].find(r=>r.id.toString()===t);return a?e.jsxs("div",{className:"flex items-center gap-2 bg-gray-700 p-2 rounded",children:[e.jsx("button",{onClick:()=>pe(l),disabled:l===0,className:"text-gray-400 hover:text-white disabled:opacity-30","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Move theme up",children:"â"}),e.jsx("button",{onClick:()=>me(l),disabled:l===c.theme.length-1,className:"text-gray-400 hover:text-white disabled:opacity-30","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Move theme down",children:"â"}),e.jsxs("span",{className:"flex-1 text-white",children:[a.title," (",a.unique_id,")",((o=d.paidTemplates)==null?void 0:o.some(r=>r.id.toString()===t))&&` - $${a.price}`]}),e.jsx("button",{onClick:()=>V(t),className:"text-red-400 hover:text-red-300","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Remove this theme",children:"Ã"})]},`${t}-${l}`):null}):e.jsx("div",{className:"text-gray-400 text-sm py-2 text-center",children:"No theme selected"})}),e.jsx("div",{className:"relative",children:e.jsxs("select",{className:"w-full rounded-lg border border-gray-600 bg-gray-700 text-white text-sm px-4 py-2 focus:ring-2 focus:ring-yellow-400 focus:border-transparent",onChange:t=>{const l=t.target.value;l&&!c.theme.includes(l)&&V(l),t.target.value=""},value:"",disabled:O,"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Add a theme to your funnel's layout",children:[e.jsx("option",{value:"",children:"Add a theme..."}),O?e.jsx("option",{children:"Loading templates..."}):e.jsxs(e.Fragment,{children:[d.defaultTemplates.length>0&&e.jsx("optgroup",{label:"Default Templates",children:d.defaultTemplates.map(t=>e.jsxs("option",{value:t.id,disabled:c.theme.includes(t.id.toString()),children:[t.title," (",t.unique_id,")"]},t.id))}),d.userTemplates.length>0&&e.jsx("optgroup",{label:"Your Templates",children:d.userTemplates.map(t=>e.jsxs("option",{value:t.id,disabled:c.theme.includes(t.id.toString()),children:[t.title," (",t.unique_id,")"]},t.id))}),d.paidTemplates&&d.paidTemplates.length>0&&e.jsx("optgroup",{label:"Paid Templates",children:d.paidTemplates.map(t=>e.jsxs("option",{value:t.id,disabled:c.theme.includes(t.id.toString()),children:[t.title," (",t.unique_id,") - $",t.price]},t.id))})]})]})})]})})]})})]}),e.jsxs("div",{className:"space-y-4 pt-4",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs("a",{href:c.theme.length>0?`https://ez.wiki/${((X=d.defaultTemplates.concat(d.userTemplates,d.paidTemplates||[]).find(t=>t.id===parseInt(c.theme[0])))==null?void 0:X.unique_id)||"#"}`:"#",target:"_blank",rel:"noopener noreferrer",className:"flex px-4 py-2 text-sm bg-blue-500 font-bold text-white rounded hover:bg-blue-600 transition-colors items-center","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Preview the first selected theme",children:[e.jsxs("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),"Preview"]}),e.jsxs("div",{className:"flex-grow bg-gradient-to-r from-green-600 to-green-500 text-white font-semibold py-2 px-4 roun
96ded-lg flex items-center justify-center space-x-2","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Name Your Price in Bee Points for this theme",children:[e.jsx(m,{icon:De}),e.jsxs("span",{children:["NYP EZ$ : ",se]})]})]}),e.jsx("div",{className:"text-center pt-2",children:e.jsxs("button",{className:"bg-gradient-to-r from-yellow-500 to-yellow-400 text-gray-900 font-bold py-2 px-4 rounded-lg flex items-center justify-center space-x-2 w-2/3 mx-auto hover:from-yellow-400 hover:to-yellow-300 transition-all duration-200",onClick:be,disabled:j,"data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Apply the selected themes and layout to your funnel",children:[e.jsx(m,{icon:He}),e.jsx("span",{children:j?"Claiming...":"Claim Theme"})]})})]})]})]}):e.jsx("div",{className:"bg-gray-800/80 border border-gray-700 rounded-lg p-6 space-y-6 flex flex-col items-center justify-center h-full",children:e.jsxs("div",{className:"text-center",children:[e.jsx(m,{icon:qe,className:"text-yellow-400 text-5xl mb-4 animate-bounce","data-tooltip-id":"ezui-tooltip","data-tooltip-content":"Select a funnel from the list on the left to begin editing."}),e.jsx("h2",{className:"text-yellow-400 text-xl font-bold mb-2",children:"Select a Funnel to Edit"}),e.jsx("p",{className:"text-gray-300",children:'Click the "Edit UI" button on any funnel to customize its settings'}),e.jsx("div",{className:"mt-6",children:e.jsxs("div",{className:"bg-gray-700/50 p-4 rounded-lg border border-dashed border-gray-600",children:[e.jsx("h3",{className:"text-yellow-400 font-semibold mb-2",children:"Quick Tips:"}),e.jsxs("ul",{className:"text-gray-300 text-sm space-y-1 text-left",children:[e.jsx("li",{children:"⢠Customize flying effects and patterns"}),e.jsx("li",{children:"⢠Set your brand message and avatar"}),e.jsx("li",{children:"⢠Configure landing page destinations"}),e.jsx("li",{children:"⢠Toggle Fly-Sign and Eye Tracking features"}),e.jsx("li",{children:"⢠Select from multiple theme options"})]})]})})]})})]})]})]})]})}export{Ke 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.