!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3197788d-f4d5-4100-927c-2e97de3618f9",e._sentryDebugIdIdentifier="sentry-dbid-3197788d-f4d5-4100-927c-2e97de3618f9")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7763],{18919:function(e,t){t.Z={src:"/_next/static/media/ad-creation.7267a413.png",height:500,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAWlBMVEVMaXFHWV8ACh5Xd4VdZmZcbXAuODoyREtET1E5REY5U2BVfY94lqJVXFlbY2NTYWNhcHQ+SEwWJi6Ejo0sOj8iMzstOj8aOkuw1+T///88YXI5XnMeMjosc5shI+w+AAAAHHRSTlMA/g2ZwfY7/fz+02BAbJx9p3+g/t4e/vwnCN6fgoUdtAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAEBJREFUeJwVxEcSgDAMALFNtVPoHcL/v8mggwDo+n+iDwNg3RJGP0F5jYrMUEX3ZFbLlZNqahGcSDvyBvV+ygkfQa4CTDAAZ74AAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},61467:function(e,t){t.Z={src:"/_next/static/media/customer-support.5ab4ea81.png",height:500,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAVFBMVEVMaXEGFlECSIMKHFkGL2ZKR2/r3tsHK1wXUYIACkUFD0cRHlIgPHA1TnsaJ1hCTHobH0oQJmowMFM3UoFNX5I7bYo4aok4W4ckQ5AtOW1vco7Wz9LDkqiZAAAAF3RSTlMAR/ydvjj5KXwTmNna293+k7iJvbL8/ArlpaEAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAA/SURBVHicFclJEoAgDADBAQIJuK+g/v+fFtduQM0UIMs0SgZ0Xp6hk9WUqvXav3ftFY/rlgiczfu2AS6UEhw/R74CFcorGsAAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},52444:function(e,t){t.Z={src:"/_next/static/media/email-marketing.b8f350d3.png",height:500,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAQlBMVEVMaXErUlgdVX4AKmAQVpwOI0AABAgBCyRHXFwbwuwABR0DFUIYQm4JJkIAe88Ag9gABQ0AAgoYaIkXSocBMXAgOlwu7BYiAAAAEnRSTlMAjKn4/qk6yoX+qv77pvv7X1/f9cT1AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAPElEQVR4nD3LWQ7AIAgFwIeCAtrF7f5XNTFp53+ATyJVVUqQbmbWLwSO9xM5QEYtpQ6BL56Tl6Pl4/33Bjy5Ac+faeAKAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},53518:function(e,t){t.Z={src:"/_next/static/media/fulfillment.2b25fb43.png",height:500,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAV1BMVEVMaXEaHihGXmxDZGQgKjQnOUgbKTMfJzWN187///8tO0YoNkAwQEoSZHwhISlBv9tbfog+YGcRDxg3Nz4xU2ESFB0YiaYzN0EtND8nQVI/hJlgqLkMMECWB0DmAAAAGXRSTlMApP0Pt/zf/QcB0m0v/D36yCX8j/t6/ICuo0qJswAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAEFJREFUeJwFwQcCgCAMALFDWsp0L9T/v9MEICYS1OvOIiO4durwzB73NR2md8PZan3vhcPMTLWwZAlBQiURo4+JH1avAmLB2shuAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},74062:function(e,t){t.Z={src:"/_next/static/media/meta-ads.96c8700b.png",height:500,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAPFBMVEVMaXEAg/wAhf0AcfIAg/0AZeYAjP8AANQAdvMAffkAZecAfvcAb+8Ah/0Ab/UAZ+cAY9QAg/8Aif0Ah/2c01ZgAAAAFHRSTlMAZZeLyF8iATyoxi/RgrmtErKtqyTL1UcAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAA9SURBVHicHctLFsAgCMDAICigtvZz/7v22SxmF5w/h7qiFYHaa89RhDPISXsxpKjyYIe1a+pNZMDI2J9vPi7eAWEHdYs8AAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},27168:function(e,t){t.Z={src:"/_next/static/media/product-selection.1652e018.png",height:500,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAATlBMVEVMaXEEIToJFiwRKkoNDioKIUAKHjkDJ0QQAhEZIzsufKscIjMcU3QjCwsWGCglEBcKR2YAa6EDLWcGYaQsh7gSAxUPITglbpUcUHUDTIKMgaaOAAAAFXRSTlMA/pX9+G+k+34o/ZbiC5tPGRP6+/vIPzTCAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAQUlEQVR4nBXGRxKAIBAAwUHiEk0r+P+PWvapgTZGA6TXPGsRyrrXzDbR3+vR0yW2aI06/RONqiYkRKMuCLB7f8AHZnACoK2ZzHcAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},83359:function(e,t){t.Z={src:"/_next/static/media/store-setup.30324ea3.png",height:500,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAATlBMVEUVHy4RN2AYO2A+TF0fMUQxQVIyU3ZMaXEbLUMRERwOLU4XM1I0TWgRN18WQm8nTXQYKz5ASVVmg6MoN0ktWIZDUWCIma6gtc5LWGZyjKnIJcCgAAAAFnRSTlMOq8P5z/r+ABoG+O6feHvCnqf7+/v+I1QMHQAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAEFJREFUeJwdxFcSgCAQBcGHhFmCWVDvf1Gr7I8WYAYoL85HNyPWFGOaUA6P7z1ksd/XOTZEG0d6G7Kp1FqCJNPfB1InAjz5uUhvAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},35493:function(e,t){t.Z={src:"/_next/static/media/tiktok-ads2.a3e63643.png",height:512,width:512,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAV1BMVEVMaXEY+PDmhZ3ZjaD/qLnX8/P/gpvhv8kf+fXg////2eLl9vaN7uv/hZz8Yn38RmgT////xtP/iaBF//f/19/Hip/l/Pz/s8Jd9vHUw836///V/Pz/3ui4yZmKAAAAGnRSTlMAIz8bxPihBDj8scu2LHppGoeHQoF9teWWyN5pZrQAAAAJcEhZcwAADsQAAA7EAZUrDhsAAABBSURBVHicHctHFoAgDEDBj4IJNuwl8f7n9OluNgMw9RUCQsgtgARN1tVw+Z3iPKB+7t4grLaofZDD8lP+tcVR4AVOWwJ8UHfdnQAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},74501:function(e,t){t.Z={src:"/_next/static/media/tiktok-organic.e0e99a2b.png",height:500,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAATlBMVEVMaXEWKj4DGjUBJUkEDR8UHCoRHC8PHzoABBQGI0AAAABhd4YjVXQvVm4gTGcZaZwGJ0IKRmwedKV2dHcQDxtLrt5Sockjh7stMD1fXmTZf7QzAAAAEnRSTlMAJ/v9LP05GvjTDMvQ6ur6VPwlnsPEAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAPUlEQVR4nCXISRKAIAwAwQEMJO6CoP7/o5Zy62oYp2WdExBbzUf8cOXgd8Bt4dQBSP4u8kPL00dFOszMHC9MawHq7N0a8AAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},53093:function(e,t){t.Z={src:"/_next/static/media/shop-logo.24e5218b.png",height:2737,width:2400,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAAYFBMVEXM/zSDrz+KuTOWwERejj6TvkWQvEWz1HKWwUKVv0aUvkTu9OJ8rDrk8suSvEZZjD+HtEFjlEG51YJgkD7B245ejj1gjz5lmEJZijx9qUOPvzSOuzxjlkPR6aPH5o2s0mCXiwQzAAAAHHRSTlMB+6P7lJTt/sNYQ/r8/TYU/kr9av2BrNTB4Iltxf0YIwAAAAlwSFlzAAAQKgAAECoBWMHDYgAAAD5JREFUeJwFwYUBgDAQALErdcOdL+y/JQkQbQ+QuuDMQNTejzJxv3lWstC1qpUYgs9rkR3X6lfkID02XOf2A0pOAujByTPcAAAAAElFTkSuQmCC",blurWidth:7,blurHeight:8}},30884:function(e,t){t.Z={src:"/_next/static/media/small-g.abfaa800.png",height:786,width:1193,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAATlBMVEX///79ICD/cnJMaXH5///zxcn/q6n+/v7M9P9B0vr8/f8/1P/mlZoAn/SS8P97fJ3/vr1Fz//h////AAD/IyOz9v/y///V////9fP/1ta7Vb/OAAAAFnRSTlP+NMcAa3fx8vR2+mC8GNS492DrAWutlRpvigAAAAlwSFlzAAAsSgAALEoBd3p0TQAAADJJREFUeJwFwQcCgCAMALFjliKKstT/f5QE9yREsJzXV7wPBn1jbfIPdN1hrmg4EmRs3yIvAY06fDzbAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:5}},91580:function(e,t,a){var s=a(85893);a(67294),t.Z=function(){let e={display:"inline-block",width:"10px",height:"10px",borderRadius:"50%",backgroundColor:"#bbb",margin:"0 5px",animation:"pulse 1.5s infinite"};return(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:[(0,s.jsx)("div",{style:{...e,animationDelay:"0.75s"}}),(0,s.jsx)("div",{style:{...e,animationDelay:"0s"}}),(0,s.jsx)("div",{style:{...e,animationDelay:"0.75s"}}),(0,s.jsx)("style",{children:"\n          @keyframes pulse {\n            0%, 100% {\n              transform: scale(1);\n              background-color: #bbb;\n            }\n            50% {\n              transform: scale(1.5);\n              background-color: #fff;\n            }\n          }\n        "})]})}},12773:function(e,t,a){a.d(t,{Z:function(){return ShopifyBanner}});var s=a(85893),r=a(25675),n=a.n(r),i=a(70279),o=a(13140),l=a(62469);function ShopifyBanner(){return(0,s.jsxs)("div",{onClick:()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank")},className:"p-3 lg:px-5 lg:p-5 w-full border border-accent relative bg-primary-foreground overflow-hidden rounded-[.1rem] flex flex-row items-center justify-between gap-5 lg:shadow-xl shadow-slate-950 cursor-pointer","data-sentry-component":"ShopifyBanner","data-sentry-source-file":"shopify-banner.jsx",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-5 ",children:[(0,s.jsx)(n(),{src:i.Z,alt:"shopify logo affiliate promo",className:"w-[100px] lg:w-[135px] z-10","data-sentry-element":"Image","data-sentry-source-file":"shopify-banner.jsx"}),(0,s.jsx)("div",{className:"hidden lg:block text-2xl scale-x-[250%] font-chakra-semibold text-muted-foreground/50 z-10",children:" - "}),(0,s.jsx)("div",{className:"hidden lg:block lg:text-foreground text-muted-foreground font-chakra-regular z-10",children:" $1 for the first month"})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2 z-10",children:(0,s.jsxs)(o.z,{size:window.innerWidth<768?"sm":"",className:"bg-[#64943e] hover:bg-[#64943e]/90",onClick:()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank")},"data-sentry-element":"Button","data-sentry-source-file":"shopify-banner.jsx",children:["Create Your Store ",(0,s.jsx)(l.s7Z,{className:"ml-1","data-sentry-element":"ArrowTopRightIcon","data-sentry-source-file":"shopify-banner.jsx"})]})})]})}},1368:function(e,t,a){a.d(t,{AG:function(){return m},At:function(){return u},Jb:function(){return c},aG:function(){return l},bg:function(){return BreadcrumbSeparator},gN:function(){return d}});var s=a(85893),r=a(67294),n=a(62469),i=a(88426),o=a(31504);let l=r.forwardRef((e,t)=>{let{...a}=e;return(0,s.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...a})});l.displayName="Breadcrumb";let c=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("ol",{ref:t,className:(0,o.cn)("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",a),...r})});c.displayName="BreadcrumbList";let d=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("li",{ref:t,className:(0,o.cn)("inline-flex items-center gap-1.5",a),...r})});d.displayName="BreadcrumbItem";let u=r.forwardRef((e,t)=>{let{asChild:a,className:r,...n}=e,l=a?i.g7:"a";return(0,s.jsx)(l,{ref:t,className:(0,o.cn)("transition-colors hover:text-foreground",r),...n})});u.displayName="BreadcrumbLink";let m=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:(0,o.cn)("font-normal text-foreground",a),...r})});m.displayName="BreadcrumbPage";let BreadcrumbSeparator=e=>{let{children:t,className:a,...r}=e;return(0,s.jsx)("li",{role:"presentation","aria-hidden":"true",className:(0,o.cn)("[&>svg]:size-3.5",a),...r,"data-sentry-component":"BreadcrumbSeparator","data-sentry-source-file":"breadcrumb.jsx",children:null!=t?t:(0,s.jsx)(n.XCv,{})})};BreadcrumbSeparator.displayName="BreadcrumbSeparator"},56006:function(e,t,a){a.d(t,{$F:function(){return c},AW:function(){return m},Ju:function(){return f},VD:function(){return x},Xi:function(){return h},h_:function(){return l}});var s=a(85893),r=a(67294),n=a(93133),i=a(62469),o=a(31504);let l=n.fC,c=n.xz;n.ZA,n.Uv,n.Tr,n.Ee;let d=r.forwardRef((e,t)=>{let{className:a,inset:r,children:l,...c}=e;return(0,s.jsxs)(n.fF,{ref:t,className:(0,o.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",r&&"pl-8",a),...c,children:[l,(0,s.jsx)(i.XCv,{className:"ml-auto h-4 w-4"})]})});d.displayName=n.fF.displayName;let u=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.tu,{ref:t,className:(0,o.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...r})});u.displayName=n.tu.displayName;let m=r.forwardRef((e,t)=>{let{className:a,sideOffset:r=4,...i}=e;return(0,s.jsx)(n.Uv,{children:(0,s.jsx)(n.VY,{ref:t,sideOffset:r,className:(0,o.cn)("z-50 min-w-[8rem] font-chakra-regular overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...i})})});m.displayName=n.VY.displayName;let h=r.forwardRef((e,t)=>{let{className:a,inset:r,...i}=e;return(0,s.jsx)(n.ck,{ref:t,className:(0,o.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r&&"pl-8",a),...i})});h.displayName=n.ck.displayName;let p=r.forwardRef((e,t)=>{let{className:a,children:r,checked:l,...c}=e;return(0,s.jsxs)(n.oC,{ref:t,className:(0,o.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),checked:l,...c,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(n.wU,{children:(0,s.jsx)(i.nQG,{className:"h-4 w-4"})})}),r]})});p.displayName=n.oC.displayName;let g=r.forwardRef((e,t)=>{let{className:a,children:r,...l}=e;return(0,s.jsxs)(n.Rk,{ref:t,className:(0,o.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...l,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(n.wU,{children:(0,s.jsx)(i.jXb,{className:"h-4 w-4 fill-current"})})}),r]})});g.displayName=n.Rk.displayName;let f=r.forwardRef((e,t)=>{let{className:a,inset:r,...i}=e;return(0,s.jsx)(n.__,{ref:t,className:(0,o.cn)("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",a),...i})});f.displayName=n.__.displayName;let x=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.Z0,{ref:t,className:(0,o.cn)("-mx-1 my-1 h-px bg-muted",a),...r})});x.displayName=n.Z0.displayName},1930:function(e,t,a){a.d(t,{E:function(){return o}});var s=a(85893),r=a(67294),n=a(37483),i=a(31504);let o=r.forwardRef((e,t)=>{let{className:a,value:r,...o}=e;return(0,s.jsx)(n.fC,{ref:t,className:(0,i.cn)("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",a),...o,children:(0,s.jsx)(n.z$,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:"translateX(-".concat(100-(r||0),"%)")}})})});o.displayName=n.fC.displayName},64812:function(e,t,a){a.d(t,{O:function(){return Skeleton}});var s=a(85893),r=a(31504);function Skeleton(e){let{className:t,variant:a="default",...n}=e;return(0,s.jsx)("div",{className:(0,r.cn)("rounded-md","default"===a?"skeleton-pulse":"skeleton-pulse-2",t),...n,"data-sentry-component":"Skeleton","data-sentry-source-file":"skeleton.jsx"})}},20839:function(e,t,a){a.d(t,{_v:function(){return d},aJ:function(){return c},pn:function(){return o},u:function(){return l}});var s=a(85893),r=a(67294),n=a(66908),i=a(31504);let o=n.zt,l=n.fC,c=n.xz,d=r.forwardRef((e,t)=>{let{className:a,sideOffset:r=4,...o}=e;return(0,s.jsx)(n.VY,{ref:t,sideOffset:r,className:(0,i.cn)("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...o})});d.displayName=n.VY.displayName},87763:function(e,t,a){a.r(t),a.d(t,{MatrixGrid:function(){return MatrixGrid},default:function(){return Dashboard}});var s=a(85893),r=a(12332),n=a.n(r),i=a(67294),o=a(11163),l=a(25675),c=a.n(l),d=a(2049),u=a(49098),m=a(90553),h=a(28463),p=a(69283),g=a(71408),f=a(62469),x=a(13140),b=a(4553),w=a(17373),y=a(45691);function DashboardBar(e){let t=(0,o.useRouter)(),[a,r]=(0,i.useState)(!1),[n,l]=(0,i.useState)(""),[d,v]=(0,i.useState)(""),[j,k]=(0,i.useState)(""),N={"AI Product Finder":"top-products","AI Product Database":"product-db","Import Products":"import-products","Saved Products":"my-products","Glitch Mode":"automatic-mode","Store Builder":"store-builder","AI Product Image Editor":"ai-image-editor","Dropshipping Course":"course","Account Settings":"account-settings",Integrations:"integrations",Support:"contact-us","Case Study":"course&caseStudy=true",Resources:"course&resources=true","Report Bug":"report-bug","Find Competitors":"find-competitors","Find TikToks":"find-tiktoks","Logo Maker":"logo-maker"},handleSubMenuClick=s=>{if("Discord Community"===s){"no"!==e.subscribed?e.discordInfo&&(e.discordInfo.userName||e.discordInfo.discordId)?window.open("https://discord.com/channels/1118318515460522005","_blank"):(window.location.href="https://discord.com/oauth2/authorize?client_id=1223067356192964628&response_type=code&redirect_uri=https%3A%2F%2Fwww.glitching.ai%2Fdashboard%3Flocation%3Ddashboard&scope=identify+guilds.join+guilds.members.read",trackEvent("dashboard_discordconnect",AnyTrack("atclid"))):t.push("/choose-plan");return}let n=N[s];if(n){let e;let i=AnyTrack("atclid");switch(s){case"AI Product Database":e="dashboard_bar_product_db";break;case"AI Product Finder":e="dashboard_bar_top_products";break;case"Import Products":e="dashboard_bar_import_products";break;case"Saved Products":e="dashboard_bar_saved_products";break;case"Glitch Mode":e="dashboard_bar_glitch_mode";break;case"Store Builder":e="dashboard_bar_store_builder";break;case"AI Product Image Editor":e="dashboard_bar_ai_image_editor";break;case"Dropshipping Course":e="dashboard_bar_course";break;case"Case Study":e="dashboard_bar_case_study";break;case"Resources":e="dashboard_bar_resources";break;case"Account Settings":e="dashboard_bar_account_settings";break;case"Integrations":e="dashboard_bar_integrations";break;case"Support":e="dashboard_bar_contact_us";break;case"Report Bug":e="dashboard_bar_report_bug";break;case"Find Competitors":e="dashboard_bar_find_competitors";break;case"Find TikToks":e="dashboard_bar_find_tiktoks";break;case"Logo Maker":e="dashboard_bar_logo_maker";break;default:e="dashboard_bar_".concat(s.toLowerCase().replace(/\s+/g,"_"))}trackEvent(e,i),t.push("/dashboard?location=".concat(n)),a&&r(!1);return}};async function trackEvent(e,t){await fetch("/api/anytrack?event=".concat(e,"&id=").concat(t))}return(0,i.useEffect)(()=>{if("dashboard"===t.query.location){l("Dashboard");return}},[t.query.location]),(0,i.useEffect)(()=>{let e;let a=t.query.location,s=t.query.caseStudy,r=t.query.resources;if(e="course"===a&&s?Object.entries(N).find(e=>{let[t,s]=e;return s==="".concat(a,"&caseStudy=true")}):"course"===a&&r?Object.entries(N).find(e=>{let[t,s]=e;return s==="".concat(a,"&resources=true")}):Object.entries(N).find(e=>{let[t,s]=e;return s.split("?")[0]===a})){let t="";["AI Product Database","Import Products","Saved Products","Find Competitors","Find TikToks"].includes(e[0])?(l("Find Products"),t="item-1"):["Glitch Mode","Store Builder","AI Product Image Editor","Logo Maker"].includes(e[0])?(l("Generate With AI"),t="item-2"):["Dropshipping Course","Discord Community","Case Study","Resources"].includes(e[0])?(l("Learn & Grow"),t="item-3"):["Integrations","Account Settings","Support","Report Bug"].includes(e[0])&&(l("Manage Account"),t="item-6"),v(e[0]),k(t)}else v(""),k("")},[t.query.location,t.query.caseStudy,t.query.resources]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"hidden dark min-w-[17rem] max-w-[17rem] bg-background border-r border-accent h-screen sticky top-0 z-50 relative px-8 overflow-auto lg:flex flex-col shadow-xl shadow-slate-950 overflow-auto overflow-x-hidden",children:[(0,s.jsx)("div",{className:"flex items-center justify-between w-full py-8",children:(0,s.jsx)(c(),{onClick:()=>t.push("/"),src:u.Z,alt:"Glitching Logo",className:"w-[140px]","data-sentry-element":"Image","data-sentry-source-file":"dashboard-bar.jsx"})}),(0,s.jsxs)("div",{onClick:()=>{t.push("/dashboard?location=dashboard")},className:"font-chakra-semibold  text-muted-foreground text-[.9rem] flex items-center mb-4 hover:text-primary cursor-pointer",children:[(0,s.jsx)(f.QGC,{className:"w-3.5 h-3.5 mr-2  ".concat("dashboard"===t.query.location?"text-primary":"text-muted-foreground"),"data-sentry-element":"DashboardIcon","data-sentry-source-file":"dashboard-bar.jsx"})," Dashboard"]}),(0,s.jsxs)(m.UQ,{type:"single",collapsible:!0,value:j,onValueChange:k,className:"flex flex-col gap-1.5","data-sentry-element":"Accordion","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsxs)(m.Qd,{value:"item-1",className:"border-b-[0px]","data-sentry-element":"AccordionItem","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsx)(m.o4,{className:"hover:no-underline text-muted-foreground hover:text-primary text-[.9rem]","data-sentry-element":"AccordionTrigger","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(h.Z,{className:"w-3.5 h-3.5 mr-2 ".concat("AI Product Database"===d||"Import Products"===d||"Saved Products"===d||"Find Competitors"===d||"Find TikToks"===d?"text-primary":"text-muted-foreground"),"data-sentry-element":"Package","data-sentry-source-file":"dashboard-bar.jsx"}),"Products"]})}),(0,s.jsx)(m.vF,{"data-sentry-element":"AccordionContent","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsxs)("div",{className:"flex flex-row gap-4 h-full ml-[6px] mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/5)] transition-all duration-100 ease-in ".concat("AI Product Database"===d?"bg-primary":"bg-white")}),(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/5)] transition-all duration-100 ease-in ".concat("Import Products"===d?"bg-primary":"bg-white")}),(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/5)] transition-all duration-100 ease-in ".concat("Saved Products"===d?"bg-primary":"bg-white")}),(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/5)] transition-all duration-100 ease-in ".concat("Find Competitors"===d?"bg-primary":"bg-white")}),(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/5)] transition-all duration-100 ease-in ".concat("Find TikToks"===d?"bg-primary":"bg-white")})]}),(0,s.jsx)("div",{className:"flex flex-col gap-4 text-muted-foreground/75",children:["AI Product Database","Import Products","Saved Products","Find Competitors","Find TikToks"].map((e,t)=>(0,s.jsx)("div",{children:(0,s.jsx)("h1",{className:"cursor-pointer hover:text-primary ".concat(d===e?"text-primary":""),onClick:()=>handleSubMenuClick(e),children:e})},t))})]})})]}),(0,s.jsxs)(m.Qd,{value:"item-2",className:"border-b-[0px]","data-sentry-element":"AccordionItem","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsx)(m.o4,{className:"hover:no-underline text-muted-foreground hover:text-primary text-[.9rem]","data-sentry-element":"AccordionTrigger","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(f.$2U,{className:"w-3.5 h-3.5 mr-2 ".concat("Glitch Mode"===d||"Store Builder"===d||"AI Product Image Editor"===d||"Logo Maker"===d?"text-primary":"text-muted-foreground"),"data-sentry-element":"MagicWandIcon","data-sentry-source-file":"dashboard-bar.jsx"})," Generate With AI"]})}),(0,s.jsx)(m.vF,{"data-sentry-element":"AccordionContent","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsxs)("div",{className:"flex flex-row gap-4 h-full ml-[6px] mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/4)] transition-all duration-100 ease-in ".concat("Glitch Mode"===d?"bg-primary":"bg-white")}),(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/4)] transition-all duration-100 ease-in ".concat("Store Builder"===d?"bg-primary":"bg-white")}),(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/4)] transition-all duration-100 ease-in ".concat("AI Product Image Editor"===d?"bg-primary":"bg-white")}),(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/4)] transition-all duration-100 ease-in ".concat("Logo Maker"===d?"bg-primary":"bg-white")})]}),(0,s.jsx)("div",{className:"flex flex-col gap-4 text-muted-foreground/75",children:["Glitch Mode","Store Builder","AI Product Image Editor","Logo Maker"].map((e,t)=>(0,s.jsx)("div",{children:(0,s.jsx)("h1",{className:"cursor-pointer hover:text-primary ".concat(d===e?"text-primary":""),onClick:()=>handleSubMenuClick(e),children:e})},t))})]})})]}),(0,s.jsxs)(m.Qd,{value:"item-3",className:"border-b-[0px]","data-sentry-element":"AccordionItem","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsx)(m.o4,{className:"hover:no-underline text-muted-foreground hover:text-primary text-[.9rem]","data-sentry-element":"AccordionTrigger","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(p.Z,{className:"w-3.5 h-3.5 mr-2 ".concat("Dropshipping Course"===d||"Discord Community"===d||"Case Study"===d||"Resources"===d?"text-primary":"text-muted-foreground"),"data-sentry-element":"GraduationCapIcon","data-sentry-source-file":"dashboard-bar.jsx"})," Learn & Grow"]})}),(0,s.jsx)(m.vF,{"data-sentry-element":"AccordionContent","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsxs)("div",{className:"flex flex-row gap-4 h-full ml-[6px] mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/4)] transition-all duration-100 ease-in ".concat("Dropshipping Course"===d?"bg-primary":"bg-white")}),(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/4)] transition-all duration-100 ease-in ".concat("Discord Community"===d?"bg-primary":"bg-white")}),(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/4)] transition-all duration-100 ease-in ".concat("Case Study"===d?"bg-primary":"bg-white")}),(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/4)] transition-all duration-100 ease-in ".concat("Resources"===d?"bg-primary":"bg-white")})]}),(0,s.jsx)("div",{className:"flex flex-col gap-4 text-muted-foreground/75",children:["Dropshipping Course","Discord Community","Case Study","Resources"].map((e,t)=>(0,s.jsx)("div",{children:(0,s.jsx)("h1",{className:"cursor-pointer hover:text-primary ".concat(d===e?"text-primary":""),onClick:()=>handleSubMenuClick(e),children:e})},t))})]})})]}),(0,s.jsxs)(m.Qd,{value:"item-6",className:"border-b-[0px]","data-sentry-element":"AccordionItem","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsx)(m.o4,{className:"hover:no-underline text-muted-foreground hover:text-primary text-[.9rem]","data-sentry-element":"AccordionTrigger","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(g.Z,{className:"w-3.5 h-3.5 mr-2 ".concat("Integrations"===d||"Account Settings"===d||"Support"===d||"Report Bug"===d?"text-primary":"text-muted-foreground"),"data-sentry-element":"Settings","data-sentry-source-file":"dashboard-bar.jsx"})," Account & Support"]})}),(0,s.jsx)(m.vF,{"data-sentry-element":"AccordionContent","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsxs)("div",{className:"flex flex-row gap-4 h-full ml-[6px] mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/4)] transition-all duration-100 ease-in ".concat("Integrations"===d?"bg-primary":"bg-white")}),(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/4)] transition-all duration-100 ease-in ".concat("Account Settings"===d?"bg-primary":"bg-white")}),(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/4)] transition-all duration-100 ease-in ".concat("Support"===d?"bg-primary":"bg-white")}),(0,s.jsx)("div",{className:"w-[0.5px] h-[calc(100%/4)] transition-all duration-100 ease-in ".concat("Report Bug"===d?"bg-primary":"bg-white")})]}),(0,s.jsx)("div",{className:"flex flex-col gap-4 text-muted-foreground/75",children:["Integrations","Account Settings","Support","Report Bug"].map((e,t)=>(0,s.jsx)("div",{children:(0,s.jsx)("h1",{className:"cursor-pointer hover:text-primary ".concat(d===e?"text-primary":""),onClick:()=>handleSubMenuClick(e),children:e})},t))})]})})]})]}),(0,s.jsxs)(w.Zb,{className:"border-accent mt-auto bg-transparent mb-6 relative","data-sentry-element":"Card","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsx)(y.MatrixGrid,{"data-sentry-element":"MatrixGrid","data-sentry-source-file":"dashboard-bar.jsx"}),(0,s.jsxs)(w.Ol,{className:"p-3 pb-0 ","data-sentry-element":"CardHeader","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsx)(w.ll,{"data-sentry-element":"CardTitle","data-sentry-source-file":"dashboard-bar.jsx",children:"Join The Discord"}),(0,s.jsx)(w.SZ,{className:"text-[.75rem]","data-sentry-element":"CardDescription","data-sentry-source-file":"dashboard-bar.jsx",children:"Join thousands of dropshippers hustling every day."})]}),(0,s.jsx)(w.eW,{className:"p-3","data-sentry-element":"CardFooter","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsxs)(x.z,{onClick:()=>{"no"!==e.subscribed?e.discordInfo&&(e.discordInfo.userName||e.discordInfo.discordId)?window.open("https://discord.com/channels/1118318515460522005","_blank"):(window.location.href="https://discord.com/oauth2/authorize?client_id=1223067356192964628&response_type=code&redirect_uri=https%3A%2F%2Fwww.glitching.ai%2Fdashboard%3Flocation%3Ddashboard&scope=identify+guilds.join+guilds.members.read",trackEvent("dashboard_discordconnect",AnyTrack("atclid"))):t.push("/choose-plan")},className:"w-full",size:"sm","data-sentry-element":"Button","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsx)(f.dsO,{className:"w-4 h-4 mr-1.5","data-sentry-element":"DiscordLogoIcon","data-sentry-source-file":"dashboard-bar.jsx"})," ",e.discordInfo&&(e.discordInfo.userName||e.discordInfo.discordId)?"Go to Channel":"Join Now"]})})]})]}),(0,s.jsxs)("div",{className:"lg:hidden flex flex-row items-center gap-5 p-4 fixed top-0 w-full z-50 shadow-md shadow-slate-950 bg-background transition-all duration-300 ease-in-out border-b border-accent",children:[(0,s.jsx)(c(),{onClick:()=>t.push("/"),src:u.Z,className:"w-[130px]","data-sentry-element":"Image","data-sentry-source-file":"dashboard-bar.jsx"}),(0,s.jsxs)(b.dy,{open:a,onOpenChange:r,"data-sentry-element":"Drawer","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsx)(b.Qz,{asChild:!0,className:"lg:hidden ml-auto outline-none border-none","data-sentry-element":"DrawerTrigger","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsx)(x.z,{variant:"ghost",className:"","data-sentry-element":"Button","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsx)(f.RYk,{className:"w-6 h-6 text-foreground","data-sentry-element":"HamburgerMenuIcon","data-sentry-source-file":"dashboard-bar.jsx"})})}),(0,s.jsxs)(b.sc,{className:"px-5 z-[999999]","data-sentry-element":"DrawerContent","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsx)("div",{className:"flex flex-col pt-4",children:(0,s.jsxs)("div",{onClick:()=>{a&&r(!1),t.push("/dashboard?location=dashboard")},className:"font-chakra-semibold text-muted-foreground text-[.9rem] flex items-center mb-4 cursor-pointer",children:[(0,s.jsx)(f.QGC,{className:"w-3.5 h-3.5 mr-2 ".concat("dashboard"===t.query.location?"text-primary":"text-muted-foreground"),"data-sentry-element":"DashboardIcon","data-sentry-source-file":"dashboard-bar.jsx"}),"Dashboard"]})}),(0,s.jsxs)(m.UQ,{type:"single",collapsible:!0,value:j,onValueChange:k,className:"flex flex-col gap-1.5","data-sentry-element":"Accordion","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsxs)(m.Qd,{value:"item-1",className:"border-b-[0px]","data-sentry-element":"AccordionItem","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsx)(m.o4,{className:"hover:no-underline text-muted-foreground text-[.9rem]","data-sentry-element":"AccordionTrigger","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(h.Z,{className:"w-3.5 h-3.5 mr-2 ".concat("AI Product Database"===d||"Import Products"===d||"Saved Products"===d||"Find Competitors"===d||"Find TikToks"===d?"text-primary":"text-muted-foreground"),"data-sentry-element":"Package","data-sentry-source-file":"dashboard-bar.jsx"}),"Products"]})}),(0,s.jsx)(m.vF,{"data-sentry-element":"AccordionContent","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsx)("div",{className:"flex flex-col gap-4 text-muted-foreground/75 ml-5",children:["AI Product Database","Import Products","Saved Products","Find Competitors","Find TikToks"].map((e,t)=>(0,s.jsx)("div",{children:(0,s.jsx)("h1",{className:"cursor-pointer hover:text-primary ".concat(d===e?"text-primary":""),onClick:()=>handleSubMenuClick(e),children:e})},t))})})]}),(0,s.jsxs)(m.Qd,{value:"item-2",className:"border-b-[0px]","data-sentry-element":"AccordionItem","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsx)(m.o4,{className:"hover:no-underline text-muted-foreground text-[.9rem]","data-sentry-element":"AccordionTrigger","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(f.$2U,{className:"w-3.5 h-3.5 mr-2 ".concat("Glitch Mode"===d||"Store Builder"===d||"AI Product Image Editor"===d||"Logo Maker"===d?"text-primary":"text-muted-foreground"),"data-sentry-element":"MagicWandIcon","data-sentry-source-file":"dashboard-bar.jsx"})," Generate With AI"]})}),(0,s.jsx)(m.vF,{"data-sentry-element":"AccordionContent","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsx)("div",{className:"flex flex-col gap-4 text-muted-foreground/75 ml-5",children:["Glitch Mode","Store Builder","AI Product Image Editor","Logo Maker"].map((e,t)=>(0,s.jsx)("div",{children:(0,s.jsx)("h1",{className:"cursor-pointer hover:text-primary ".concat(d===e?"text-primary":""),onClick:()=>handleSubMenuClick(e),children:e})},t))})})]}),(0,s.jsxs)(m.Qd,{value:"item-3",className:"border-b-[0px]","data-sentry-element":"AccordionItem","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsx)(m.o4,{className:"hover:no-underline text-muted-foreground text-[.9rem]","data-sentry-element":"AccordionTrigger","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(p.Z,{className:"w-3.5 h-3.5 mr-2 ".concat("Dropshipping Course"===d||"Discord Community"===d||"Case Study"===d||"Resources"===d?"text-primary":"text-muted-foreground"),"data-sentry-element":"GraduationCapIcon","data-sentry-source-file":"dashboard-bar.jsx"})," Learn & Grow"]})}),(0,s.jsx)(m.vF,{"data-sentry-element":"AccordionContent","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsx)("div",{className:"flex flex-col gap-4 text-muted-foreground/75 ml-5",children:["Dropshipping Course","Discord Community","Case Study","Resources"].map((e,t)=>(0,s.jsx)("div",{children:(0,s.jsx)("h1",{className:"cursor-pointer hover:text-primary ".concat(d===e?"text-primary":""),onClick:()=>handleSubMenuClick(e),children:e})},t))})})]}),(0,s.jsxs)(m.Qd,{value:"item-6",className:"border-b-[0px]","data-sentry-element":"AccordionItem","data-sentry-source-file":"dashboard-bar.jsx",children:[(0,s.jsx)(m.o4,{className:"hover:no-underline text-muted-foreground text-[.9rem]","data-sentry-element":"AccordionTrigger","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(g.Z,{className:"w-3.5 h-3.5 mr-2 ".concat("Integrations"===d||"Account Settings"===d||"Support"===d||"Report Bug"===d?"text-primary":"text-muted-foreground"),"data-sentry-element":"Settings","data-sentry-source-file":"dashboard-bar.jsx"})," Account & Support"]})}),(0,s.jsx)(m.vF,{"data-sentry-element":"AccordionContent","data-sentry-source-file":"dashboard-bar.jsx",children:(0,s.jsx)("div",{className:"flex flex-col gap-4 text-muted-foreground/75 ml-5",children:["Integrations","Account Settings","Support","Report Bug"].map((e,t)=>(0,s.jsx)("div",{children:(0,s.jsx)("h1",{className:"cursor-pointer hover:text-primary ".concat(d===e?"text-primary":""),onClick:()=>handleSubMenuClick(e),children:e})},t))})})]})]})]})]})]})]})}var v=a(8971),j=a(82701),k=a(48183),N=a(46561),A=a(83138),S=a(55727),T=a(70444),C=a(36316),P=a(9589),D=a(56452),z=a(45077),I=a(47);function ContactForm(e){(0,i.useRef)(null);let t=(0,I.ac)({query:"(max-width: 768px)"}),{currentUser:a,paddleCtmId:r,getDiscordInfo:n}=(0,d.a)();(0,i.useEffect)(()=>{a&&n(a).then(e=>{e&&g(!0)})},[a]);let[o,l]=(0,i.useState)(!1),[c,u]=(0,i.useState)(!1),[m,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{m&&(()=>{if(t)window.scrollTo({top:0});else{let e=document.getElementById("scrollable-element");e&&e.scrollIntoView({block:"start",behavior:"smooth"})}})()},[m]),(0,i.useEffect)(()=>{m?(l(!1),setTimeout(()=>{u(!0)},100)):(u(!1),setTimeout(()=>{l(!0)},100))},[m]);let[p,g]=(0,i.useState)(!1),[b,y]=(0,i.useState)({fullName:"",email:"",reason:"",message:""}),[E,F]=(0,i.useState)({}),[B,_]=(0,i.useState)(!1),[O,Z]=(0,i.useState)(null),handleInputChange=e=>{let{id:t,value:a}=e.target;y({...b,[t]:a}),E[t]&&F({...E,[t]:""})},validateForm=()=>{let e={};return b.fullName.trim()||(e.fullName="Full name is required"),b.email.trim()?/\S+@\S+\.\S+/.test(b.email)||(e.email="Email is invalid"):e.email="Email is required",b.reason||(e.reason="Please select a reason"),b.message.trim()||(e.message="Message is required"),F(e),0===Object.keys(e).length},handleSubmit=async t=>{if(t.preventDefault(),validateForm()){_(!0),Z(null),e.toast({title:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin text-muted-foreground"})," Message sending..."]}),description:"This may take up to 30 seconds"});try{let t=await fetch("/api/misc/mail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:b.email,name:b.fullName,message:b.message,reason:b.reason,id:r})});t.ok?(e.toast({title:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Message sent successfully!"]}),description:"We will respond within 24-48 hours"}),Z("success"),y({fullName:"",email:"",reason:"",message:""})):(Z("error"),e.toast({title:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(D.Z,{className:"w-4 h-4 text-foreground/80"})," Failed to send message."]}),description:"Please refresh and try again",variant:"destructive"}))}catch(t){Z("error"),e.toast({title:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(D.Z,{className:"w-4 h-4 text-foreground/80"})," Failed to send message."]}),description:"Please refresh and try again",variant:"destructive"})}finally{_(!1)}}},[M,U]=(0,i.useState)({subscriptionCancel:!1,refund:!1,paddleNet:!1,accountIssue:!1,duplicateCharge:!1,glitchingFree:!1}),toggleVisibility=e=>{U(t=>({...Object.keys(t).reduce((e,t)=>(e[t]=!1,e),{}),[e]:!t[e]}))};return m?(0,s.jsxs)("div",{id:"scrollable-element",className:"animated-element w-full flex flex-col justify-center gap-5 p-5 lg:p-8 lg:h-screen lg:overflow-auto overflow-x-hidden relative",children:[(0,s.jsx)(MatrixGrid,{}),(0,s.jsx)("div",{className:"w-full flex flex-col gap-5 items-center",children:(0,s.jsxs)("div",{className:"z-20 w-full lg:w-[65rem] mx-auto flex lg:flex-row flex-col gap-6",children:[(0,s.jsx)("div",{className:"w-full lg:w-1/2 flex flex-col gap-5 rounded-[.1rem]",children:(0,s.jsxs)(w.Zb,{className:"border-accent bg-background w-full  transition-transform duration-1000 ".concat(c?"opacity-100 lg:translate-x-0 translate-y-0":"opacity-0 lg:-translate-x-20 translate-y-20 lg:translate-y-0"),children:[(0,s.jsxs)(w.Ol,{children:[(0,s.jsx)(w.ll,{children:"Please fill out the form below"}),(0,s.jsxs)(w.SZ,{className:"flex items-center",children:[(0,s.jsx)(z.Z,{className:"w-3 h-3 mr-1.5 -translate-y-0.6"})," 24-48 hours response time"]})]}),(0,s.jsx)(w.aY,{children:(0,s.jsxs)("form",{onSubmit:handleSubmit,children:[(0,s.jsxs)("div",{className:"w-full flex flex-col gap-2 mb-5",children:[(0,s.jsx)(A._,{htmlFor:"fullName",children:"Full Name"}),(0,s.jsx)(N.I,{type:"text",id:"fullName",placeholder:"Enter your full name",value:b.fullName,onChange:handleInputChange,className:E.fullName?"border-red-500":""}),E.fullName&&(0,s.jsx)("p",{className:"text-red-500 text-sm",children:E.fullName})]}),(0,s.jsxs)("div",{className:"w-full flex flex-col gap-2",children:[(0,s.jsx)(A._,{htmlFor:"email",children:"Email"}),(0,s.jsx)(N.I,{type:"email",id:"email",placeholder:"Email",value:b.email,onChange:handleInputChange,className:E.email?"border-red-500":""}),E.email&&(0,s.jsx)("p",{className:"text-red-500 text-sm",children:E.email})]}),(0,s.jsxs)("div",{className:"w-full flex flex-col gap-2 my-5",children:[(0,s.jsx)(A._,{htmlFor:"reasonSelect",children:"Reason For Contacting Us"}),(0,s.jsxs)(S.Ph,{onValueChange:e=>handleInputChange({target:{id:"reason",value:e}}),children:[(0,s.jsx)(S.i4,{className:"w-full ".concat(E.reason?"border-red-500":""),id:"reasonSelect",children:(0,s.jsx)(S.ki,{placeholder:"Select a reason"})}),(0,s.jsx)(S.Bw,{children:(0,s.jsxs)(S.DI,{children:[(0,s.jsx)(S.n5,{children:"Select a reason"}),(0,s.jsx)(S.Ql,{value:"cancel_subscription",children:"Cancel Subscription"}),(0,s.jsx)(S.Ql,{value:"refund",children:"Refund"}),(0,s.jsx)(S.Ql,{value:"account_issue",children:"Account Issue"}),(0,s.jsx)(S.Ql,{value:"duplicate_charge",children:"Duplicate Charge"}),(0,s.jsx)(S.Ql,{value:"general_question",children:"General Question"})]})})]}),E.reason&&(0,s.jsx)("p",{className:"text-red-500 text-sm",children:E.reason})]}),(0,s.jsxs)("div",{className:"w-full flex flex-col gap-2",children:[(0,s.jsx)(A._,{htmlFor:"message",children:"Message"}),(0,s.jsx)(T.g,{id:"message",className:"h-[15rem] ".concat(E.message?"border-red-500":""),placeholder:"Message",value:b.message,onChange:handleInputChange}),E.message&&(0,s.jsx)("p",{className:"text-red-500 text-sm",children:E.message})]}),(0,s.jsx)(w.eW,{className:"px-0 pt-5",children:(0,s.jsx)(x.z,{type:"submit",disabled:B,children:B?"Submitting...":"Submit"})})]})})]})}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/2 border-accent  transition-transform duration-1000 delay-[1000ms] ".concat(c?"opacity-100 lg:translate-x-0 translate-y-0":"opacity-0 lg:translate-x-20 translate-y-20 lg:translate-y-0"),children:[(0,s.jsxs)(w.Ol,{children:[(0,s.jsx)(w.ll,{className:"",children:"Frequently Asked Questions"}),(0,s.jsx)(w.SZ,{className:"text-sm",children:"Here are some common questions and answers"})]}),(0,s.jsxs)(w.aY,{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{onClick:()=>toggleVisibility("subscriptionCancel"),className:"bg-background border border-accent transition-all ease-in duration-100 hover:bg-primary-foreground p-4 cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between w-full font-chakra-semibold text-[.9rem]",children:["I want to cancel my subscription.",(0,s.jsx)(v.Z,{className:"h-4 w-4"})]}),M.subscriptionCancel&&(0,s.jsxs)("div",{className:"fade mt-2 text-sm text-muted-foreground font-chakra-regular",children:[(0,s.jsxs)("p",{children:["You can cancel your subscription by going in your ",(0,s.jsx)("a",{href:"/dashboard?location=account-settings",onClick:e=>{e.stopPropagation()},className:"underline hover:text-primary",children:"account settings"}),"."]}),(0,s.jsx)("p",{className:"mt-1",children:"You can also contact our support team to cancel your subscription for you."})]})]}),(0,s.jsxs)("div",{onClick:()=>toggleVisibility("refund"),className:"bg-background border border-accent transition-all ease-in duration-100 hover:bg-primary-foreground p-4 cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between w-full font-chakra-semibold text-[.9rem]",children:["I want a refund.",(0,s.jsx)(v.Z,{className:"h-4 w-4"})]}),M.refund&&(0,s.jsxs)("div",{className:"fade mt-2 text-sm text-muted-foreground font-chakra-regular",children:[(0,s.jsxs)("p",{children:["Glitching has a ",(0,s.jsx)("a",{href:"/legal/refund",onClick:e=>{e.stopPropagation()},className:"underline hover:text-primary",children:"30-day moneyback guarantee policy"}),"."]}),(0,s.jsx)("p",{className:"mt-1",children:"If you want a refund, simply contact our customer support team to do it for you."}),(0,s.jsx)("p",{className:"mt-1",children:"Refunds take 5-10 days to process."})]})]}),(0,s.jsxs)("div",{onClick:()=>toggleVisibility("paddleNet"),className:"bg-background border border-accent transition-all ease-in duration-100 hover:bg-primary-foreground p-4 cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between w-full font-chakra-semibold text-[.9rem]",children:["What's Paddle.net?",(0,s.jsx)(v.Z,{className:"h-4 w-4"})]}),M.paddleNet&&(0,s.jsxs)("div",{className:"fade mt-2 text-sm text-muted-foreground font-chakra-regular",children:[(0,s.jsx)("p",{children:"Glitching processes payments through Paddle.net."}),(0,s.jsx)("p",{className:"mt-1",children:"If you see a charge from Paddle, don't worry, it's from Glitching."})]})]}),(0,s.jsxs)("div",{onClick:()=>toggleVisibility("accountIssue"),className:"bg-background border border-accent transition-all ease-in duration-100 hover:bg-primary-foreground p-4 cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between w-full font-chakra-semibold text-[.9rem]",children:["There's an issue with my account.",(0,s.jsx)(v.Z,{className:"h-4 w-4"})]}),M.accountIssue&&(0,s.jsxs)("div",{className:"fade mt-2 text-sm text-muted-foreground font-chakra-regular",children:[(0,s.jsx)("p",{children:"If you have an issue with your account, contact our customer support team."}),(0,s.jsx)("p",{className:"mt-1",children:"The issue will be resolved within 24-48 hours."})]})]}),(0,s.jsxs)("div",{onClick:()=>toggleVisibility("duplicateCharge"),className:"bg-background border border-accent transition-all ease-in duration-100 hover:bg-primary-foreground p-4 cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between w-full font-chakra-semibold text-[.9rem]",children:["I got a duplicate charge.",(0,s.jsx)(v.Z,{className:"h-4 w-4"})]}),M.duplicateCharge&&(0,s.jsxs)("div",{className:"fade mt-2 text-sm text-muted-foreground font-chakra-regular",children:[(0,s.jsx)("p",{children:"If you got a duplicate charge for one subscription, we will give you a full refund."}),(0,s.jsx)("p",{className:"mt-1",children:"Simply contact our customer support team, they will respond within 24-48 hours."})]})]})]})]})]})})]},m):(0,s.jsxs)("div",{className:"animated-element w-full flex flex-col items-center justify-center gap-5 p-5 lg:p-8 lg:h-screen lg:overflow-auto overflow-x-hidden relative","data-sentry-component":"ContactForm","data-sentry-source-file":"contact-us.jsx",children:[(0,s.jsx)(MatrixGrid,{"data-sentry-element":"MatrixGrid","data-sentry-source-file":"contact-us.jsx"}),(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row gap-6 rounded-[.1rem]",children:[(0,s.jsxs)("div",{className:"flex flex-col border border-accent shadow-xl shadow-slate-950 bg-background w-full lg:w-[28rem] rounded-[.1rem] p-8 rounded-[.1rem]  transition-transform duration-1000 ".concat(o?"opacity-100 translate-x-0":"opacity-0 -translate-x-20"),children:[(0,s.jsx)(f.dsO,{className:"w-24 h-24 text-primary/90","data-sentry-element":"DiscordLogoIcon","data-sentry-source-file":"contact-us.jsx"}),(0,s.jsx)("div",{className:"bg-accent text-foreground font-chakra-regular px-2 p-0.5 rounded-[.1rem] w-[4rem] text-center mt-6 text-[.8rem] ",children:"⚡️ Fast"}),(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-white mt-3",children:"Get Support on Discord"}),(0,s.jsx)("div",{className:"text-muted-foreground font-chakra-regular mt-2",children:"Open a support ticket in our discord server"}),(0,s.jsxs)(x.z,{onClick:()=>{a&&(p?window.open("https://discord.com/channels/1118318515460522005/1202980395109580860","_blank"):window.open("https://discord.com/oauth2/authorize?client_id=1223067356192964628&response_type=code&redirect_uri=https%3A%2F%2Fwww.glitching.ai%2Fdashboard%3Flocation%3Ddashboard&scope=identify+guilds.join+guilds.members.read","_blank"))},size:"xl",className:"mt-8 text-[1rem] group","data-sentry-element":"Button","data-sentry-source-file":"contact-us.jsx",children:["Get Support On Discord",(0,s.jsx)(j.Z,{className:"w-4 h-4 ml-1.5 transition-all ease-in duration-100 group-hover:translate-x-1","data-sentry-element":"ArrowRightIcon","data-sentry-source-file":"contact-us.jsx"})]})]}),(0,s.jsxs)("div",{className:"flex flex-col border border-accent shadow-xl shadow-slate-950 bg-background w-full lg:w-[28rem] rounded-[.1rem] p-8 rounded-[.1rem]  transition-transform duration-1000 ".concat(o?"opacity-100 translate-x-0":"opacity-0 translate-x-20"),children:[(0,s.jsx)(k.Z,{className:"w-24 h-24 text-primary/90","data-sentry-element":"MessageCircleQuestion","data-sentry-source-file":"contact-us.jsx"}),(0,s.jsx)("div",{className:"bg-accent text-foreground font-chakra-regular px-2 p-0.5 rounded-[.1rem] w-[9rem] text-center mt-6 text-[.8rem]",children:"\uD83D\uDD5A 1-2 Business Days"}),(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-white mt-3",children:"Contact Us"}),(0,s.jsx)("div",{className:"text-muted-foreground font-chakra-regular mt-2",children:"Contact one of our support agents by email"}),(0,s.jsxs)(x.z,{onClick:()=>h(!0),size:"xl",className:"mt-8 text-[1rem] group","data-sentry-element":"Button","data-sentry-source-file":"contact-us.jsx",children:["Contact Us",(0,s.jsx)(j.Z,{className:"w-4 h-4 ml-1.5 transition-all ease-in duration-100 group-hover:translate-x-1","data-sentry-element":"ArrowRightIcon","data-sentry-source-file":"contact-us.jsx"})]})]})]})]})}var E=a(27168),F=a(83359),B=a(18919),_=a(74501),O=a(35493),Z=a(74062),M=a(53518),U=a(52444),R=a(61467),G=a(19042),L=a(30884),V=a(41664),H=a.n(V),q={src:"/_next/static/media/shopifywhite.d2671c2f.png",height:286,width:1e3,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAACCAMAAABSSm3fAAAAIVBMVEX+//7////////6+v19p0aszHH////q7u53okj///+00X0s3UImAAAAC3RSTlNuYTosm7BXS8965o8ws8IAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAaSURBVHicY2BlYWZjZmJkYuDiYGdg4GRgBAACVAA+PTiHfAAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:2},W=a(36244),Q={src:"/_next/static/media/looxreview.9b6fac19.png",height:299,width:951,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAAIVBMVEX///////////////////////////////////9MaXH///+wHrUMAAAAC3RSTlNjTVY1iyE9EW4ApwIBSwQAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAgSURBVHicY2Bn5GBmYmBkYmBm4GRhY2XgYmBgYgCLAAAEXgBIdSbelQAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:3},Y={src:"/_next/static/media/shrineLogo3.0bab992a.png",height:500,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAANlBMVEVMaXH/Rlb/Rlf79Pf8/fz9+/z9+fr++/z9+Pn++/vo6Oj/y9H8z9X8ztT79PT/09j9+vr79/gaXpkfAAAAEnRSTlMAeNw7bFZ1YYS8C09cf5CSq6BiXXNHAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAOklEQVR4nD3LSQ7AIAzFUAMJ+aED7f0vi1i0Xj7J8NUU7qHGeDIz3wGS2d2BHmAB6Kp1bomjlNP/mQUr6gEfavy2uQAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8},J={src:"/_next/static/media/upcart-logo-good.475b156b.png",height:200,width:700,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAACCAMAAABSSm3fAAAAG1BMVEUBPCwCOytpupIAKCE/tbIAMCIAdWMAe287sazZeld+AAAACXRSTlNKVfMm5CVzZeeblinWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGklEQVR4nGNgYWJjYGRgZGXgYGJnZGBgYAYAAZoAKVjUpBMAAAAASUVORK5CYII=",blurWidth:8,blurHeight:2},K={src:"/_next/static/media/upwork.6c2e411c.png",height:1104,width:4096,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAACCAMAAABSSm3fAAAAD1BMVEUSpgARpgASpgASqgASowCbX/woAAAABXRSTlNQXGZ8OJxxQJYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAZSURBVHicBcEBAQAACIMw4PbP7AZZDJwp9wDQABhbSC76AAAAAElFTkSuQmCC",blurWidth:8,blurHeight:2},X={src:"/_next/static/media/aftersell.f9bef830.png",height:215,width:1040,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAACCAMAAABSSm3fAAAAD1BMVEVcd3BLaWFqg3xSbmYyU0qDMXfjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGUlEQVR4nAXBAQEAAAgCINT+bw40dRaG1AMA3QAUMamVnwAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:2},$=a(70279),ee={src:"/_next/static/media/e-book.1aac792c.png",height:500,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAS1BMVEVMaXFoeagaJV4vPHaYovVZXnlVWXoYI04qN3Bxd5ZhY3haaZoAAACqqvBeZYKao+xcZYoeLWd3f8MlL2B7fZVGVJGAjr5tcIc6RnOT3OfBAAAAFnRSTlMAVGd5Of0mNf3+/e4QEuAc961AlvxtZn4RdwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAD1JREFUeJw9y0sCwBAMBcCHRJKqT0tx/5N2Z/YDHNGJuAjcZaY0m0DWMrvMwzPbYO4IqnurPshEX3ipnv0DQQIB6DwbwNgAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8},et={src:"/_next/static/media/tiktok-white-logo.43d67340.png",height:142,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAACCAMAAABSSm3fAAAAHlBMVEX7/P3i6+/69Pf58fRVqsbSytTrzdj15evzvNLgscI122pDAAAACnRSTlNEQS1cCYlDUBeoCHSptgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABpJREFUeJxjYGFlY2BgYGdiYOTkYGBmZGYCAAHvADT69VcBAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:2},ea={src:"/_next/static/media/googleads.a8463220.png",height:512,width:512,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAWlBMVEVMaXE9j+BPrkk6rlPouxo4itUqh+pNkN48jNo9jtw8jdw7i9twmZ2iqGz/wQD/xgD9vgbvvQrnuQ0+rFI0p1AzqFI7jd88itc8j+JCme7/xwBLkMm5vCMxvGDB8LPPAAAAGHRSTlMA87r33iJPBZDeunNx+x1Nk/c3JVKdOJzLjwhGAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAQElEQVR4nAXBBwKAIAwAsWMWcOC2oP7/myaApCSAMLY2IDD7R3MAlj6pJtjW7rOaC+veGlUL7rNQmuE4dwh3/AFcAALFLAU1uAAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8},es=a(73510),er=a(19858),en=a(53219),ei=a(99606),eo=a(56006);function Course(e){let{currentUser:t,contextChargeDeclined:a,getLessonsCompleted:r,getPopupTriggered:n,getCaseStudyPurchase:l}=(0,d.a)(),u=(0,i.useRef)(null),m=(0,I.ac)({query:"(max-width: 768px)"}),h=(0,o.useRouter)(),[g,b]=(0,i.useState)(!0),[y,k]=(0,i.useState)([]);(0,i.useEffect)(()=>{if(!h.query.fromGlitchMode&&!h.query.fromDigitalDropshipping)return;let e=parseInt(h.query.module),t=parseInt(h.query.lesson);D(e),V(t)},[h]),(0,i.useEffect)(()=>{null!==t&&(r(t).then(e=>{e&&k(e)}),n(t).then(e=>{if(!e){b(!1);return}}),l(t).then(t=>{if(!t){e.setAccessGranted(!1);return}e.setAccessGranted(!0)}))},[t]);let N=[{module1:[{title:"Welcome To Glitching (Start Here)",summary:'The transcript is from a tutorial video made by Steven and Thomas, who are experienced drop shippers with about five years of experience each. They introduce viewers to "glitching," a method or tool designed to aid in the process of drop shipping by providing a comprehensive suite of features to streamline the creation and operation of a drop shipping business.\n\nSteven and Thomas highlight their successful drop shipping backgrounds, mentioning significant revenue figures ($90,000 in one day, $79,000 in a single day). They then dive into the features of "glitching," which includes:\n\nProduct Selection and Evaluation: The tool automates the process of finding products to drop ship. It assesses products based on several criteria, such as "wow factor" and market saturation, to ensure users focus on potentially profitable items.\n\nWebsite and Ad Creation: Glitching offers automated website creation tailored for the selected products, including product descriptions, images, and reviews. It also provides ready-to-use advertising creatives and scripts for different platforms like TikTok and Facebook (Meta), aiming to simplify the marketing process for users.\n\nMarket and Demographic Analysis: The tool suggests specific demographics and marketing platforms (Facebook for older demographics, TikTok for younger ones) based on the product chosen, helping users target their ads more effectively.\n\nComprehensive Course and Support: They mention an included course that covers all aspects of running a drop shipping business, from setting up the store to customer support and advertising. The course also includes access to mentors and a private Discord community for further support.\n\nAI Product Finder: An additional feature that uses AI to discover products, again evaluating them on various criteria to ensure they meet the user\'s needs.\n\nExecution Plan: Glitching provides a step-by-step plan on what users should do from setting up their store to advertising products.\n\nSteven and Thomas emphasize that glitching is designed to be a foundational tool for both beginners and experienced drop shippers, allowing users to quickly launch and efficiently manage their drop shipping businesses by reducing the time and effort needed for product research, website creation, and marketing.\n\n',thumbnail:"/thumbnails/imageX.png"},{title:"How to Open Your Shopify Store",summary:"The transcript is a step-by-step tutorial on how to create a Shopify account. It begins with launching the app and navigating to a specific link offering Shopify for $1 for three months. The viewer is instructed to click a link below the video, exit full-screen mode, and follow a promotional banner. They should then enter their email, start a free trial, and create a password to establish their Shopify account. The process is described as quick, taking about 5 to 10 seconds to load. The tutorial concludes with advice to choose the basic plan for $1 for the first month and to enter payment details to start building their store. The video ends with a thank you and a prompt for the next video.",thumbnail:"/thumbnails/imageY.png"},{title:"Mindset & Expectations",summary:'The transcript from the course tutorial emphasizes the importance of having the right mindset and expectations for success in dropshipping. The speakers caution against following the advice of many online "gurus" who often mislead and complicate the journey, making it harder and longer. Instead, they advocate for seeking guidance from those who have real experience and can provide straightforward, effective strategies to move from point A to point B more easily and quickly. They highlight that success in dropshipping is achievable with the right information, which is often obscured by the widespread dissemination of incorrect or false information. Additionally, the speakers stress the importance of being prepared to test multiple products and leverage modern technologies like AI to streamline processes that used to take weeks or months, such as product testing, building a store, and creating ads. They encourage taking advantage of the unique opportunity that AI presents, allowing even beginners to test multiple products weekly, a feat previously impossible. The tutorial concludes with an invitation to engage with the course and ask questions, promising further guidance throughout.',thumbnail:"/thumbnails/imageZ.png"}]},{module2:[{title:"Product Selection Introduction",summary:'Summary of A-Z Drop Shipping Course Introduction:\n\nThe course introduction emphasizes the proven success of the course creators in the drop shipping industry, highlighting their significant single-day revenue achievements of over $44,000 and $25,000. The key components of a successful drop shipping business are outlined as follows:\n\n1. Knowledge: The importance of having the correct information is stressed, as it enables individuals to make informed decisions and execute effective strategies in drop shipping.\n\n2. Tools: Access to the right tools is presented as essential, with a specific mention of a tool named "Glitch" created by the course instructors to facilitate success in drop shipping.\n\nThe instructor promises comprehensive training, covering all aspects of the drop shipping process, from product selection and store setup to ad creation and utilization of user-generated content (UGC) for marketing. Students are encouraged to engage actively with the course by taking notes and applying the teachings to maximize their learning experience.\n\nIn summary, the A-Z Drop Shipping Course is designed to provide participants with both the knowledge and tools necessary for success in the drop shipping market, as demonstrated by the instructors\' own achievements. The course aims to be thorough and actionable, with the expectation that students will actively participate and apply what they learn.',thumbnail:"/thumbnails/image0.png"},{title:"Winning Product Criteria",summary:"The video delves into the essential criteria for identifying a winning product in the e-commerce space. The speaker breaks down each factor, providing a comprehensive explanation of why these elements are crucial for a product's success. Product-market fit: The first and most important aspect is ensuring that the product satisfies a specific demand or need for a target audience. Conducting thorough market research, especially using platforms like Reddit, can help determine if there is a genuine interest in the product.\nProblem-solving: Winning products often address a problem that customers face. These products are generally easier to sell because they provide a solution to a common issue. For instance, the speaker gives an example of a lint remover that solves the problem of removing small particles from clothes.\nPassionate audience: If a product doesn't necessarily solve a problem, it can still be successful if it caters to a passionate audience. Examples of such audiences include golfers, anime enthusiasts, and cannabis users. Although selling to these groups may be more challenging than selling problem-solving products, there is still significant potential for profit.\nGood margins: To ensure profitability, aim for a 3-4x markup on the product's cost when selling through paid advertising. For organic sales, a 2-3x markup can suffice. It's essential to sell products that don't appear cheap, as customers are more likely to purchase products with a higher perceived value. The speaker contrasts a portable light (low perceived value) with an iPhone (high perceived value) to illustrate this point.\nSaturation: While some argue that market saturation doesn't matter, the speaker emphasizes that it does, particularly when many competitors are selling similar products. However, if the competitors are not well-established or lack quality, it is possible to outperform them. To stand out in a saturated market, consider offering a unique angle, a slightly different product, or targeting a more niche audience.\nWow factor: Products that are easily shareable and have the potential to go viral are more likely to succeed. These products often have a unique or impressive feature that encourages people to share them with friends, boosting the product's visibility and increasing sales.\nThe video then presents several examples of successful e-commerce websites and analyzes how their products meet the winning criteria:\nNZT: A brain-enhancing pill inspired by the movie \"Limitless.\" It has high margins (around 80-90%), solves the problem of mental clarity and focus, and has viral potential due to its movie-inspired branding.\nStops Chocolate: A product designed to solve sexual problems. It has high margins ($30 for three chocolates), can easily go viral on platforms like TikTok, and targets a specific issue that couples face.\nBlim: A pain-free, affordable hair removal solution that uses a crystal hair eraser. It solves the common problem of removing hair without expensive treatments like laser surgery, has good margins ($29 retail price), and has a wow factor due to its innovative design.\nVenom Scent: A pheromone perfume that attracts attention from men. It has high margins ($36 retail price), solves the problem of women wanting more attention, and has viral potential due to its unique selling proposition.\nThe speaker emphasizes the importance of analyzing successful products and websites to understand what makes them winning products. By applying these lessons when searching for your own winning product or brand, you can increase your chances of success in the e-commerce industry. The video concludes by encouraging viewers to ask questions and seek help from the community to further their understanding of winning product criteria.",thumbnail:"/thumbnails/imageWinningProduct.png"},{title:"How to find a winning product using Glitching",summary:"Summary of \"How to Select Your Product\" Video Transcript:\n\n**Main Topic:**\n- The video is the first part of a course on dropshipping, specifically focused on selecting products using a software called Glitching. \n\n**Specific Instructions and Significant Details:**\n\n1. **Product Selection:**\n   - Product selection is critical for the success of a dropshipping business.\n   - The video demonstrates the use of the AI Product Finder feature within the Glitching software to identify potential products to sell.\n\n2. **Product Analysis:**\n   - The instructor examines products, emphasizing the importance of profitability and marketability.\n   - The analysis includes examining the cost, selling price, and profit margin, with an example of a pheromone perfume.\n   - The instructor explains that the actual cost on AliExpress may include additional shipping fees, affecting the total cost and potential profit.\n\n3. **Vendor and Store Evaluation:**\n   - The instructor reviews a store selling the pheromone perfume, noting the revenue data isn't available yet.\n   - The evaluation includes checking the product page instead of the home page, as most traffic goes directly to the product page.\n   - The instructor advises optimizing the site for mobile viewing, as over 80% of traffic is from mobile devices.\n\n4. **Site Improvement Tips:**\n   - The instructor gives tips on improving the store's website, including adding multiple product images, adjusting the header size, and ensuring the logo design matches the product style.\n   - The importance of a well-branded site with clear pricing, key points, and a good description is emphasized.\n   - The instructor highlights the need for sensible and relevant customer reviews.\n\n5. **Product Viability:**\n   - The instructor dismisses other products like a folding towel rack and feet massage slippers due to poor websites and lack of appeal.\n   - Products with high margins and high perceived value, like a lamp, are considered viable options.\n\n6. **Criteria for a Good Product:**\n   - To summarize, a good product should have good margins, high perceived value, and inherent quality.\n\n7. **Course Direction:**\n   - The instructor selects the pheromone perfume as the product to focus on for the course.\n   - Future videos will cover building a store and making money with the selected product.\n\n**Conclusion:**\nThe video provides an overview of how to select a profitable dropshipping product using the Glitching software. It covers product analysis, store and website evaluation, and offers practical tips for improving online stores. The pheromone perfume was chosen for the course based on its high margins, high perceived value, and quality, and future lessons will delve into how to build a successful store around this product.",thumbnail:"/thumbnails/image1.png"},{title:"Finding products on Instagram & Facebook",summary:"The video demonstrates how to find potential winning products while scrolling through Instagram and Facebook feeds. The main points covered are:\nInstagram:\nStart scrolling through your Instagram feed and interact with the ads that appear.\nCheck the websites of the products being advertised to get ideas and assess their potential.\nExamples of products found include a bacteria removal product for food, a sleep mask, and a head shaver.\nPay attention to the ad quality, website design, and pricing to gauge the product's potential success.\nEngaging with various products and websites can lead to Instagram showing you higher-quality ads, tailored to your perceived interests.\nFacebook:\nSimilarly, scroll through your Facebook feed and look for ads.\nEven if an ad is of poor quality, it can still provide an opportunity to improve upon the product and outperform competitors.\nExamples of products found include a magic belt, a bathroom organizer, and a joint oil for dogs.\nLook for ads with high engagement (likes, comments, views) as an indication of the product's potential.\nSome ads may use an advertorial format, which is an article-like post that promotes the product and leads to the website for purchase.\nKey Takeaways:\nConsistently interact with ads and websites to refine the types of products shown to you.\nDon't dismiss poor-quality ads; instead, view them as opportunities to improve and succeed with the same product.\nAnalyze the ad quality, website design, pricing, and engagement to assess a product's potential.\nKeep scrolling through your feeds to find various products and ideas for your own e-commerce ventures.\nThe video encourages viewers to use this scrolling method on Instagram and Facebook to discover potential winning products they can sell in their own stores.",thumbnail:"/thumbnails/imageProductsMeta.png"},{title:"How to find products on Tiktok",summary:"The video demonstrates a method for optimizing your TikTok feed to discover dropshipping products. The main steps are:\nSearch for \"TikTok made me buy it\" in the TikTok search bar to find dropshipping products.\nInteract with the dropshipping websites by visiting the site, adding products to the cart, and proceeding to checkout. This signals to TikTok that you are interested in these types of products.\nLike and comment on dropshipping videos to further optimize your feed.\nContinue scrolling through your feed, and TikTok will start showing you more dropshipping products.\nThe video also provides examples of dropshipping products found using this method:\nA ring keeper necklace with a unique design, but the website's checkout is modified due to Shopify Plus.\nA multi-functional flashlight that can charge devices, with comments confirming it's a dropshipping product.\nA soothing otter toy for babies, but the website has some design flaws, such as poor color choices and font.\nA hydro back muster water gun, but the creator didn't include a link to the product.\nA purple haze iridescent suitcase with a matching beauty case, showcased on a high-quality website called Hayes.\nA spice dispenser shaped like a camera lens, with a good video ad but a poorly designed website that doesn't match the product.\nA smart protein shaker bottle, but the website has some branding inconsistencies and an overly dark design.\nThe key takeaways from the video are:\nOptimizing your TikTok feed can help you discover potential dropshipping products.\nInteracting with dropshipping websites and engaging with related content will signal to TikTok to show you more of these products.\nWhen evaluating a potential product, consider the quality of the video ad and the website design.\nLook for opportunities to outcompete other dropshippers by creating better website designs and branding.\nThe video concludes by emphasizing the simplicity of the method and encouraging viewers to reach out for help if needed.",thumbnail:"/thumbnails/imageProductsTiktok.png"}]},{module3:[{title:"Store Setup Introduction",summary:'Summary:\n\nThe transcript is from the introduction to a store setup module within a course, presumably aimed at individuals looking to create online stores that are optimized for conversions. The main focus of the module includes:\n\n1. Website Conversion Optimization:\n   - The course instructors claim extensive experience, having created over 100 stores, and intend to share their knowledge on designing stores with high conversion rates.\n\n2. Store Design Elements:\n   - Detailed instructions will be provided on crafting effective product descriptions and titles.\n\n3. Shopify Platform Guidance:\n   - The module will offer comprehensive guidance on navigating and configuring the various Shopify settings, acknowledging that it can be overwhelming for beginners.\n\n4. Product Imagery:\n   - The course will teach how to obtain quality product images.\n   - Instructions will be given on editing images using both Photoshop and artificial intelligence technologies.\n\n5. Use of AI Technology:\n   - AI tools, like the one named "Journey," will be introduced as a means to gain a competitive advantage in the market.\n\nThe summary captures the essence of the transcript, focusing on the key elements of the store setup module that the course will cover, along with the promise of expert guidance and the use of advanced technologies to improve an online store\'s performance.',thumbnail:"/thumbnails/image2.png"},{title:"Gmail Account Creation",summary:"Summary:\n\nThe video provides a tutorial on how to create a Gmail account. Here are the key points and instructions summarized:\n\n1. **Starting the Account Creation Process:**\n   - Navigate to the Google account creation webpage by typing \"create Gmail account\" into a search engine and clicking on the first link.\n\n2. **Entering Personal Details:**\n   - Fill in the first name field. It's not mandatory to use your real name; the example used is \"Glitching Course V2.\"\n   - Enter your birthday. While the presenter suggests that the specific date doesn't matter for the example, they note it's important to use the real birthday to recover the account if necessary.\n\n3. **Setting Up Account Credentials:**\n   - Choose an email address for the new account.\n   - Create a secure password.\n\n4. **Optional Recovery Information:**\n   - Recovery email: It's recommended to add one, although it's skipped in the video.\n   - Phone number: The tutorial also skips adding a phone number, but this can be useful for account recovery.\n\n5. **Finalizing the Account Creation:**\n   - After entering the necessary information, proceed with the account creation by clicking \"next\" and agreeing to the terms of service.\n   - Once agreed, you can access the Gmail inbox by navigating to the Gmail tab.\n\n6. **Verification of Account Creation:**\n   - The presenter confirms that the Gmail account has been successfully created by opening the inbox.\n\nThe video emphasizes that while you can skip adding a recovery email and phone number during the account setup (as done in the demonstration), it's advisable to include this information to aid in account recovery if you forget your login details.",thumbnail:"/thumbnails/image3.png"},{title:"Shopify Signup",summary:'Summary:\n\nThe provided transcript is a step-by-step guide on how to create a Shopify account after setting up a Gmail account. Here is a breakdown of the key points:\n\n1. **Starting the Process:**\n   - Use Google to search for "create Shopify account."\n   - Click on the first link that appears in the search results.\n\n2. **Creating the Account:**\n   - Enter the newly created Gmail address when prompted.\n   - Follow the on-screen instructions, which include:\n     - Selecting "I\'m just starting."\n     - Choosing "online store" as the business type.\n     - Selecting "Drop Shipping" for products.\n     - Entering your country of operation.\n\n3. **Setting up a Shopify ID:**\n   - Opt to "continue with email" rather than using the Google account option.\n   - Type in the Gmail address and create a password for the Shopify ID.\n   - The option to save the password is available.\n\n4. **Account Verification:**\n   - After creating the account, return to the Gmail account.\n   - Open the confirmation email from Shopify.\n   - Click on "confirm email" to verify the email address associated with the Shopify account.\n\n5. **Completion:**\n   - The account creation process is complete once the email has been verified.\n\nThe narrator suggests using the email option for Shopify login rather than the Google account for ease of managing multiple stores. They conclude by demonstrating the email confirmation step and indicating that the process to create a Shopify account is straightforward. The next video will presumably continue with further instructions or information.',thumbnail:"/thumbnails/image4.png"},{title:"Shopify Settings & Domain",summary:"### Summary of Shopify Settings Tutorial\n\n**Account Creation and Store Setup:**\n- Begin by creating an account on Shopify.\n- Enter store details including the store name (e.g., Fire Tire) and contact information.\n  - Phone number can be real or fake, but using a real number may lead to customer calls.\n  - Store email should be the one created for the store.\n  - Billing address should be entered (presenter uses a random address for privacy).\n- Set the store currency to USD (United States Dollars) since it's the main reserve currency.\n- Select the appropriate time zone (presenter is in the Eastern Time Zone).\n\n**Plans and Payments:**\n- After the trial period, select a paid plan (suggested: the lowest plan is $1 for three months).\n- Enter billing information and payment details.\n- Activate Shopify Payments and fill in the required information such as bank details.\n- If using PayPal, manage and activate PayPal settings.\n\n**Checkout and Shipping Settings:**\n- Under checkout settings:\n  - Require email and first and last names.\n  - Set address line two to optional.\n  - Shipping phone number can be optional or not included (not including may increase conversion rates).\n  - Select marketing options and tipping preferences.\n- For shipping and delivery:\n  - Create shipping zones for top countries (e.g., USA, Canada, Australia, New Zealand, UK).\n  - Set up shipping rates such as free shipping or conditional shipping based on order price.\n  - Add a worldwide shipping zone if applicable.\n\n**Market and Domain Configuration:**\n- Under Market settings, ensure that the store is set to active in both the United States and International markets with USD as the currency.\n- Purchase a domain for the store and check its availability (e.g., shopfirestore.com).\n- Set up email forwarding for a professional appearance (e.g., support@[yourstore].com).\n\n**Additional Settings and Final Steps:**\n- Employees can be added under user permissions once they are hired.\n- No immediate action is needed for tax and duties, locations, gift cards, or certain market settings.\n- Branding and notifications can be set up later once sales begin.\n- The policies section will be covered in another video.\n- Store activity doesn't require adjustments at this stage.\n\nThe presenter emphasizes that these initial settings are crucial for starting a Shopify store and will cover more advanced topics in future videos.",thumbnail:"/thumbnails/image5.png"},{title:"Creating your Aliexpress & Dsers Account",summary:'Summary:\n\nThe provided transcript outlines the process of setting up an AliExpress account and integrating it with a Shopify store using an app called DSers. The following are the main points and instructions grouped by topic:\n\nCreating an AliExpress Account:\n1. Navigate to aliexpress.com and register for an account.\n2. Enter the email address created for the course and choose a password.\n3. Verify the account by checking the email for a verification code and entering it on the AliExpress website.\n\nInstalling DSers on Shopify:\n1. In the Shopify store\'s search bar, type "DSers" and search for it in the Shopify app store.\n2. Select the DSers app with high star ratings and numerous reviews.\n3. Install DSers by clicking "Install" and following the prompts.\n4. If you already have an account, the app may detect it; otherwise, create a new account.\n5. Once the account is created, select the free plan and click "Get Started."\n6. Link the newly created AliExpress account by clicking on "AliExpress" and authorizing DSers to connect.\n\nAdding Products to Shopify Using DSers:\n1. To add a product, go to the DSers dashboard and either select a saved product or search for a product on AliExpress.\n2. Copy the AliExpress product link.\n3. In DSers, go to the "Import List" and paste the link in the "Import Search" field to pull the items.\n4. Push the product to the Shopify store by checking the necessary boxes and clicking "Push to Store."\n5. If there are issues, check all the boxes, including the last one, which may resolve the problem.\n6. Verify that the product has been added to the Shopify store by checking the "Product" section.\n\nThe transcript mentions that there will be a future video explaining the steps for editing images, product titles, and descriptions.\n\nNote: The transcript includes some typos and unclear references (e.g., "glitching," "lure colog," "cre Link alexpress account with the sers") that are likely due to transcription errors or informal language. The summary has interpreted these to the best of the context provided.',thumbnail:"/thumbnails/image-aliexpress.png"},{title:"How to buy Shrine Theme",summary:'Summary of Transcript - "How to Buy the Best Team on the Market Right Now"\n\nMain Topics:\n1. Introduction to the Shrine Team 2. Benefits and Conversion Rate Improvements 3. Discount Offer Details 4. Steps to Purchase the Team 5. Types of Shrine Teams Available 6. Installation Instructions Preview\n\nSpecific Instructions and Significant Details:\n- The video promotes the Shrine Team as the best on the market, emphasizing its positive impact on conversion rates and sales.\n- A special 25% discount is available, automatically applied via a banner above the video.\n- Three versions of the Shrine Team are available: Shrine Normal, Shrine Pro, and Shrine Light, with Shrine Light recommended for those with limited funds.\n- The purchase process involves clicking on the banner, selecting the desired team version, adding it to the cart, and proceeding to checkout. The discount code "glitch" is automatically applied, providing over $10 in savings.\n- Optional lifetime support is offered but not necessary.\n- After completing the purchase, an email with installation instructions will be sent. The next video will provide a step-by-step installation guide.\n\nSummary:\nThe transcript details how to purchase the Shrine Team, highlighting its benefits for improving conversion rates and sales. It offers a special discount and provides clear steps for buying the team, with options based on budget. Installation instructions are provided in the following video. The overall message emphasizes the value and ease of acquiring the Shrine Team for better sales performance.',thumbnail:"/thumbnails/buyShrine.png"},{title:"How to install Shrine",summary:"### Summary of the Transcript: Main Topics: 1. Update on switching to the Shrine theme from Debutify for Shopify stores. 2. Benefits and features of the Shrine theme for product pages. 3. Detailed instructions for purchasing, installing, and setting up the Shrine theme. Specific Instructions & Significant Details: - The speaker explains the transition from Debutify to Shrine due to the latter's simplicity and cost-effectiveness. - Shrine theme is recommended for its clean design and useful features such as bullet points, trust badges, testimonials, and customizable elements. - The Shrine theme is highlighted as affordable, costing $49 with a 25% discount available through the course. - Detailed steps are provided for purchasing and setting up the Shrine theme, including creating an account, entering the license key, and installing the theme on Shopify. - Emphasis on copying the main domain and Shopify URL correctly, including troubleshooting tips if initial attempts fail. - The speaker notes that Shrine provides video tutorials to guide users through the installation process. - After installation, users need to authenticate the theme using a token to unlock its full features. - The speaker promises a future video for an in-depth overview and customization tips for the Shrine theme. Summary: The speaker announces an update to the course, recommending the Shrine theme over Debutify for Shopify stores due to its user-friendliness and affordability. They provide a step-by-step guide for purchasing, installing, and setting up the Shrine theme, including troubleshooting tips and authentication steps. The Shrine theme's key features, such as customizable product pages, trust badges, and testimonials, are highlighted. Future content will include further customization tips.",thumbnail:"/thumbnails/shrineInstall.png"},{title:"Shrine Theme Setup",summary:"### Summary of the Transcript:\n\n**Main Topics:**\n1. Customizing the Shrine theme for Shopify.\n2. Importance of focusing on the product page over the homepage.\n3. Practical tips for layout and design to enhance the product page.\n4. Utilizing tools like Glitching for efficient product import and page setup.\n5. Enhancing product images and descriptions for better appeal.\n6. Incorporating reviews and trust badges to build credibility.\n7. Adjusting color schemes and logos to match the product's aesthetic.\n8. Testing and iterating to ensure functionality and visual appeal.\n\n**Specific Instructions & Significant Details:**\n- The speaker demonstrates importing a product from AliExpress via Glitching to Shopify.\n- Emphasis on the product page as the key element, as most visitors bypass the homepage.\n- Detailed customization steps for the product name, price, and images.\n- Use of Photoshop to enhance product images sourced from AliExpress.\n- Selecting the appropriate product template in Shopify customization settings.\n- Ensuring mobile view optimization since the majority of traffic is mobile-based.\n- Adding a logo for branding and adjusting the color scheme to match the product, generally keeping the background white.\n- Using an image color picker tool for consistent accent colors.\n- Enabling announcement bars and trust badges for added credibility.\n- Implementing a quantity discount feature to encourage bulk purchases.\n- Adding comprehensive product descriptions and a reviews widget via Loox.\n- Final touches include checking alignment, functionality, and visual appeal.\n- Encouragement to test the store thoroughly and make iterative improvements.\n\n**Summary:**\nThe speaker provides a comprehensive guide on customizing the Shrine theme for Shopify, emphasizing the critical role of the product page in driving sales. Key advice includes enhancing product images, maintaining a consistent color scheme, and using reviews and trust badges for credibility. Practical steps are given for setting up the product page, importing products, and optimizing for mobile view. The importance of continuous testing and customization is highlighted to ensure a professional and effective store presentation.",thumbnail:"/thumbnails/shrineSetup.png"},{title:"How to Install Reviews on Your Store",summary:"### Summary of the Transcript: **Main Topics:** 1. Instructions on installing Loox reviews for Shopify stores using the Shrine theme. 2. Benefits and features of using Loox reviews for authenticity. 3. Detailed steps for hiding default reviews, installing, and customizing Loox reviews. **Specific Instructions & Significant Details:** - The speaker explains hiding the default Shrine reviews as they appear fake and replacing them with Loox reviews for better authenticity. - Step-by-step guide to installing Loox reviews from the provided link, offering a two-week free trial. - Detailed instructions on enabling Loox in the Shopify store, including ensuring Shrine is the active theme. - Tips on customizing the appearance of review stars to match the store’s color scheme. - Adding the rating widget and review widget to the product page and ensuring proper placement above the price and below the description. - Emphasis on the importance of having over 100 reviews with pictures or videos for credibility. - Instructions on importing reviews via a spreadsheet, utilizing ChatGPT to generate fake names, reviews, and other necessary details. - Ensuring the product handle matches the specific product in the store. - Downloading the completed spreadsheet as a CSV and uploading it to Loox to efficiently add reviews. - The speaker highlights the importance of having good reviews and offers support through Discord for any questions. **Summary:** The speaker provides a comprehensive guide on installing and customizing Loox reviews for Shopify stores using the Shrine theme, highlighting the need for authentic reviews over default ones. Detailed steps include hiding default reviews, installing Loox, customizing review appearance, and importing reviews efficiently using a spreadsheet and ChatGPT for generating content. The importance of having over 100 reviews with visual content for credibility is emphasized, and support is offered through Discord.",thumbnail:"/thumbnails/loox2.png"},{title:"Creating the store header",summary:'Summary of Transcript: Setting Up the Main Menu of Your Store\n\n1. Creating the "Contact Us" Page:\n   - Navigate to Online Store > Pages, then click on "Add Page."\n   - Create a page titled "Contact Us."\n   - In the theme template section, select "Contact."\n   - Additional information is optional as the page will display a contact form for customers.\n\n2. Constructing the Main Menu:\n   - Go to Navigation > Main Menu.\n   - Ensure the menu includes four key items:\n     a. Homepage link (already included by default).\n     b. Catalog or Collection link to all products.\n     c. "Track Your Order" page link (temporary setup).\n        - Use the "Contact Us" page for now; a dedicated video will explain setting up the tracking app later.\n     d. "Contact Us" page link.\n   - Apply changes and save the menu.\n\n3. Finalizing the Menu Setup:\n   - Access Online Store > Themes > Customize.\n   - Focus on the product page, considered the most important.\n   - In the left menu, select "Drawer Menu."\n   - Remove any unwanted elements such as phone numbers or secondary menus for a cleaner look.\n   - Optional: Remove the email display if it appears off.\n   - Save the changes to finalize the main menu setup.\n\n4. Upcoming Instructions:\n   - A subsequent video will cover the creation of the submenu for the store.\n\nThe transcript provides step-by-step instructions for setting up the main menu of an online store, emphasizing the creation of a "Contact Us" page, the inclusion of essential menu items, and the customization of the menu for a clean appearance. It also hints at future guidance regarding the "Track Your Order" feature and submenu creation.',thumbnail:"/thumbnails/image10.png"},{title:"Creating the policies & store footer",summary:"Summary:\n\nCreating and Implementing Policy Pages:\n\n1. Accessing Policy Settings:\n- Navigate to the 'Settings' section in the bottom left of the interface.\n- Select 'Policies' to begin creating your policy pages.\n\n2. Policy Creation:\n- Use the 'Create from template' option for each policy type.\n- Customize the policies to suit your site, paying extra attention to the 'Return and Refund Policy' which will depend on your specific business practices.\n- For returns, provide instructions for the customer to return the product to a post office.\n- Offer a refund option either upon product return or without needing the product back, depending on customer satisfaction.\n\n3. Adding Policies to the Footer:\n- Access the footer menu by going to 'Online Store,' then 'Customize,' and navigate to 'Products' and 'Default Products.'\n- Scroll down to find the footer menu.\n- Update the footer menu by adding policy links (Refund Policy, Terms of Service, Privacy Policy) in a logical order that looks visually appealing.\n- Include contact information in the footer for customer convenience.\n\n4. Shipping Policy:\n- Consider offering free shipping initially and provide an estimated shipping time.\n- Customize the shipping policy template provided in the video description or in the Discord channel.\n- Update the footer menu to incorporate the 'Shipping Policy,' ensuring it is listed in a logical sequence with the other policies.\n\n5. Finalizing the Footer Menu:\n- Once all policies (Shipping Policy, Refund Policy, Privacy Policy, and Terms of Service) are added, save the menu.\n- Refresh the store page to confirm that the footer menu reflects the updates and displays all policies correctly.\n\nThe video provides a step-by-step guide on creating, customizing, and adding policy pages to a Shopify store's footer menu, with particular emphasis on the importance of the Return and Refund Policy. Instructions on how to access the relevant settings, templates, and customization options are included, ensuring a comprehensive overview for successfully implementing policy pages on an e-commerce site.",thumbnail:"/thumbnails/image11.png"},{title:"How to create good product images",summary:"Summary:\n\nThe transcript provides a guide on how to improve product images for marketing purposes, focusing on finding and creating high-quality visuals. The main topics covered include sourcing better images from platforms like AliExpress and Amazon, enhancing pictures with AI tools, reducing file sizes to improve website loading times, and customizing images using Photoshop.\n\nKey points and instructions outlined in the transcript are:\n\n1. Sourcing Images:\n   - AliExpress often has poor-quality images, but by clicking through links, you can occasionally find better ones.\n   - Amazon is another resource where high-quality images might be available.\n\n2. Image Enhancement:\n   - Use an AI tool named PWI to enhance the quality of the images you have saved.\n   - After AI enhancement, use a compression site to reduce the image file size, which helps your website load faster.\n\n3. Customization with Photoshop:\n   - Photoshop can be used to tailor images to your brand and audience, such as changing colors or adding elements.\n   - For those with limited resources, learning Photoshop on YouTube is suggested, while those with more funds can outsource the work on platforms like Upwork.\n\n4. AI Image Generation:\n   - The AI tool Mid Journey can be used to generate images based on prompts, creating backgrounds that align with the website's theme.\n   - Photoshop can then be used to superimpose product images onto these AI-generated backgrounds for a cohesive look.\n\n5. Marketing Considerations:\n   - The brand \"Lure\" is used as an example, with a focus on attracting a male audience.\n   - It's important not to mix messages, so products targeted at different genders should be marketed separately.\n   - The speaker emphasizes the importance of reading marketing books to enhance one's knowledge.\n\n6. Practical Advice:\n   - Even if you don't have access to professional photography, you can still create quality images using the mentioned tools and platforms.\n   - The combination of AI, Photoshop, AliExpress, and Amazon can lead to professional-looking images without the need for professional photography.\n\nThe summary encapsulates the strategies discussed for obtaining and refining product images for better online presentation and marketing.",thumbnail:"/thumbnails/image13.png"},{title:"Order Tracking Setup",summary:'### Summary of the Transcript\n\n#### Installation of Tracking Software\n- The primary topic discussed is the installation of the "17 Track" order tracking software on a Shopify store.\n- Specific instructions for installing the app include:\n  - Go to the Shopify App Store, search for "17 Track," and press "install."\n  - After installation, navigate to the tracking page within the app.\n\n#### Setting Up the Tracking Page\n- Steps for setting up the tracking page are provided:\n  - Copy the tracking page URL from the "17 Track" app.\n  - Go to the online store\'s navigation settings, specifically the main menu.\n  - Edit the "Track Your Order" menu item by replacing the existing link with the copied URL.\n  - Save the changes to the menu.\n\n#### Customizing the Tracking Page\n- The transcript emphasizes the importance of customizing the tracking page for a cohesive look:\n  - Access the design settings through the "17 Track" app.\n  - Customize the colors and design to match the store\'s brand and aesthetic.\n  - Additional features like product recommendations can be added to enhance the page.\n\n#### Order Tracking for Customers\n- Once set up, customers can track their orders using their order number and email or the tracking number.\n- The tracking number is automatically sent to customers when their orders are shipped, which does not require manual intervention.\n\n#### Support\n- The speaker offers assistance with any questions through a Discord channel.\n\n### Organized Overview\n1. **Installation Process:**\n   - Search and install "17 Track" on the Shopify App Store.\n   - Access the installed app\'s tracking page.\n\n2. **Setting Up Tracking on the Store:**\n   - Copy the tracking page URL from the "17 Track" app.\n   - Replace the "Track Your Order" link in the store\'s main menu navigation with the new URL.\n   - Save the updated menu.\n\n3. **Customization of the Tracking Page:**\n   - Customize the design and colors through the app to match the store\'s branding.\n   - Optionally add features like product recommendations.\n\n4. **Customer Experience:**\n   - Customers can track their orders using their order number, email, or tracking number.\n   - Tracking numbers are sent automatically to customers upon shipment.\n\n5. **Additional Support:**\n   - The speaker offers help through a Discord channel for any further questions.\n\nThis summary condenses the key points of the transcript, focusing on the steps for installing, setting up, and customizing the tracking software, as well as providing information about customer order tracking and available support.',thumbnail:"/thumbnails/image14.png"},{title:"OCU Setup",summary:'Summary of Installing and Using OCU on Shopify:\n\n**Main Topic:**\n- The main topic of the transcript is a tutorial on installing and using the One Click Upsell (OCU) app by Zipify in a Shopify store to create post-purchase upsells, which ultimately increases revenue.\n\n**Installation Instructions:**\n1. Navigate to the Shopify app store via "Apps" and "Sales Channel Settings".\n2. Search for OCU and select "One Click Upsell - Zipify OCU".\n3. Install the app and answer the initial setup questions about store revenue and products sold.\n\n**Configuring OCU Settings:**\n1. Go to "Settings" and then "Checkout".\n2. Scroll down to "Post Purchase Page" and ensure "One Click Upsell - Zipify OCU" is checked.\n3. Save the changes.\n\n**Creating the First Funnel:**\n1. Add a new funnel and set the trigger to "Any Product" for broader applicability.\n2. Avoid pre-purchase upsells to reduce friction before purchase.\n3. Focus on post-purchase upsells by adding the first upsell offer, ideally the same product initially purchased, especially if it\'s consumable.\n\n**Customizing the Upsell Offer:**\n1. Edit the offer, maintaining a fixed layout with a timer set to 5 minutes.\n2. Modify the buy box with a star rating (suggested 4.9 instead of 5.0) and remove unnecessary elements like the border and bottom divider for a cleaner look.\n3. Start without a discount and consider offering free shipping.\n4. Customize the text, images, and remove large blocks of unnecessary text for clarity.\n\n**Split Testing:**\n1. Create a split test by duplicating the offer and apply a discount (e.g., 25%) to version B.\n2. Split traffic 50/50 to determine which offer performs better based on revenue per visit.\n3. Use the data to select the winning offer.\n\n**Additional Upsell Strategies:**\n1. After the first upsell, introduce a second upsell with a different product, such as a pocket sprayer or leak protection, to add more revenue.\n2. Use downsells with a bigger discount if the initial upsell is declined.\n3. Lastly, consider using a thank-you page upsell for additional products.\n\n**Additional Information:**\n- The transcript emphasizes the importance of testing and adjusting offers based on customer response.\n- For further assistance, users are directed to join a Discord community.\n\n**Conclusion:**\nThe transcript provides a step-by-step guide for Shopify store owners to install and effectively use the OCU app to increase revenue through strategic post-purchase upsells. It highlights the importance of creating clean and appealing offers, split testing to optimize upsell performance, and continuously refining the upsell funnel based on customer behavior.',thumbnail:"/thumbnails/image15.png"},{title:"Upcart Setup",summary:'Summary:\n\n**Installation and Activation:**\n- The transcript starts with a guide to installing and activating upCart, an app designed to increase eCommerce revenue.\n- The app is located in the "apps and sales channel" section of the Shopify App Store and has a high user rating.\n- After installation, the app is activated by going to "open team settings," selecting "app embeds," and turning on the upCart switch, followed by saving the settings.\n\n**Customization of upCart:**\n- The speaker emphasizes the importance of customizing the cart page to match the theme and colors of the store, as mismatched design can reduce customer trust and negatively impact sales.\n- The cart editor feature is used to ensure that the appearance of the cart aligns with the store\'s branding.\n\n**Features of upCart:**\n- Announcements: The speaker advises against using the announcement feature, particularly the default timer, as it is seen as outdated and can diminish trust.\n- Rewards: This feature is recommended for encouraging customers to add more items to their cart to unlock benefits such as free shipping or discounts.\n- Upsells: Users are guided on how to configure upsells by adding products that will appear on the cart page when specific items are added to the cart, like the "pocket sprayer" example used to complement the "Fon cologne."\n- Add-Ons: The speaker discusses creating additional products like "leak protection," which can be automatically included in the cart, increasing revenue without actual cost. The importance of contacting upCart support for design adjustments is also mentioned.\n- Additional Features: The speaker reviews additional features such as notes, discount codes, and subscriptions, but generally suggests avoiding them or seeking appropriate apps for subscriptions.\n- Trust Badge: A trust badge is recommended for instilling customer confidence at checkout, with the suggestion to place it at the bottom of the page.\n- Express Payments: It is suggested to disable express payment options to avoid cluttering the cart page with too many buttons.\n- Pricing Display: The speaker advises removing the price from the checkout button to reduce friction and improve conversion rates.\n\n**Advice and Support:**\n- The speaker offers advice on further customization and encourages reaching out for support via Discord.\n- upCart support is praised for its responsiveness and willingness to assist with changes.\n- The speaker does not recommend the "sticky cart" feature, focusing instead on the cart editor as the most valuable aspect of upCart.\n\n**Conclusion:**\n- The transcript provides a walkthrough of installing and optimizing the upCart app to improve the checkout experience and increase average order value for an eCommerce store on Shopify. The speaker highlights the importance of customization, strategic use of rewards and upsells, and the availability of support from upCart to improve the cart page\'s effectiveness.',thumbnail:"/thumbnails/image16.png"},{title:"Funnel Troubleshooting",summary:"Summary:\n\n**Funnel Troubleshooting Guide:**\n\n1. **Advertising Platforms (TikTok and Facebook)**\n   - Main Metric: Cost Per Click (CPC) is crucial for determining the effectiveness of creatives.\n   - Ideal CPC Range: Between 10 and 50 cents. Above 80 cents indicates poor creatives.\n   - CPC Analysis: \n     - High CPC -> Issue with creatives.\n     - Good CPC but poor conversion -> Issue with the website.\n\n2. **Improving Creatives:**\n   - Test Hooks: Modify and test 4-5 different hooks to retain viewer attention beyond the first few seconds.\n   - Video Quality: Ensure high-quality clips are used in the ads.\n   - Review Training: Revisit the ad creative module for a deeper understanding of what constitutes good creatives.\n\n3. **Shopify Website Optimization:**\n   - Conversion Benchmarks: \n     - Add to Cart (ATC) Rate: Aim for 6-10%.\n     - Initiate Checkout Rate: Should be half of the ATC rate.\n     - Purchase Rate: Should be half of the checkout rate.\n   - Exceptional Results: Ideally, each step should not drop by half; better retention is a sign of good offer, audience targeting, and website design.\n\n4. **Troubleshooting Website Issues:**\n   - Low ATC Rate: Could be due to a lack of congruence in website design, poor targeting, or inadequate offers. Make sure the website, product descriptions, images, and offers align with the target audience.\n   - High ATC but Low Initiated Checkouts: Indicates issues on the cart page such as non-functional buttons or inconsistent design elements.\n   - Low Purchase Rate After High Initiated Checkouts: Typically a sign of a lack of trust. Improve trust by ensuring a congruent color scheme, adding trust badges, testimonials, and ensuring shipping settings are correct.\n\n**Instructions for Further Assistance:**\n\n- Join the Discord for additional support and questions.\n\nThe summary excludes redundant phrases and focuses on the actionable steps for troubleshooting and improving the sales funnel for online advertising and e-commerce website optimization.",thumbnail:"/thumbnails/image17.png"}]},{module4:[{title:"Fulfillment Intro",summary:'Summary:\n\nThe transcript is from a course, specifically the Fulfillment section, which the speaker acknowledges may appear boring but emphasizes as critically important for successful customer service and business operation.\n\nMain Topics and Specific Instructions:\n1. Importance of Timely Order Fulfillment: The speaker underlines the significance of avoiding late deliveries to maintain customer satisfaction.\n\nSignificant Details:\n- A low Facebook feedback score resulting from late deliveries could lead to being banned from the platform.\n- Late deliveries can lead to an increase in chargebacks, which have serious consequences including:\n  a. Losing the ability to process payments through Shopify, affecting the capability to run any stores on the platform.\n  b. Incurring additional fees due to chargebacks.\n- Maintaining high-quality products and services is essential for the longevity of the business.\n\nOverall, the speaker instructs course participants to pay close attention to the content of the Fulfillment section and to implement the advised practices to avoid "deep trouble" in the future. The emphasis throughout the transcript is on the necessity of efficient and prompt fulfillment processes to ensure business sustainability and to prevent significant operational issues.',thumbnail:"/thumbnails/image47.png"},{title:"How Fullfilment Works",summary:"Detailed Summary of the Video on Fulfillment in Dropshipping\n\nThe video provides an in-depth explanation of the fulfillment process in dropshipping, aimed at beginners. Here's a detailed summary of the steps and key points covered in the video:\n\nIntroduction:\n\nThe video welcomes viewers to the topic of fulfillment in dropshipping.\nThe presenter notes that many viewers might be new to dropshipping and explains the purpose of the video: to clarify how the fulfillment process works.\nUnderstanding Dropshipping:\n\nDropshipping is described as a process where a customer orders a product from your website.\nThe seller takes a profit from the sale, then pays the supplier to ship the product directly to the customer.\nIt is emphasized that while this process can be confusing initially, it becomes straightforward once understood.\nHandling Payments:\n\nSellers can use the customer's payment to pay the supplier or use their own money for faster processing.\nChallenges with AliExpress:\n\nAliExpress, a popular Chinese platform owned by Alibaba, has been used for dropshipping for years.\nHowever, the platform has several drawbacks: risk of scams, language barriers, poor website quality, unreliable suppliers, long shipping times, and potential for lost shipments.\nAlternative Solutions:\n\nTwo main alternatives are suggested: AutoDS and private agents.\nPrivate Agents:\n\nUsing private agents is generally not recommended for beginners.\nIt requires handling at least 30 orders per day, involves trust issues, and payments are made via wire transfers without guarantees.\nAutoDS:\n\nAutoDS is recommended as a beginner-friendly solution.\nIt offers English customer support, a money-back guarantee, and is widely used by dropshippers.\nPartnership with AutoDS:\n\nThe presenter mentions a partnership with AutoDS and plans to show viewers how to create an AutoDS account, connect it to a Shopify store, and fulfill orders in the next video.\nConclusion:\n\nThe video concludes by encouraging viewers to watch the next video for a detailed tutorial on using AutoDS for order fulfillment.\nOverall, the video aims to demystify the dropshipping fulfillment process, offering practical advice on choosing reliable suppliers and tools to streamline operations for beginners.",thumbnail:"/thumbnails/image61.png"},{title:"How to Create & Connect Your AutoDS Account:",summary:"Detailed Summary of the Video on Creating and Linking an AutoDS Account\n\nThe video provides a step-by-step guide on how to create an AutoDS account and link it with a Shopify store, aimed at helping viewers streamline their dropshipping fulfillment process. Here's a detailed summary of the steps and key points covered in the video:\n\nIntroduction:\n\nThe video welcomes viewers and outlines the goal: to demonstrate how to create an AutoDS account and link it with a Shopify store.\nConnecting Shopify Store:\n\nThe first step is to navigate to the Integrations section and select Shopify store.\nThe presenter emphasizes the importance of connecting the Shopify store first, as it is a prerequisite for linking AutoDS.\nViewers are directed to a tutorial video for detailed instructions on connecting Shopify.\nCreating AutoDS Account:\n\nMost viewers will need to create a new AutoDS account.\nThe presenter guides viewers through the process: pressing 'Create AutoDS Account,' selecting 'Get Started,' and noting the 30-day trial (later corrected to 21 days).\nA step-by-step demonstration of creating an account, including entering email, name, and password, is provided.\nChoosing a Plan:\n\nViewers are informed about the pricing options: 99 cents for the first 30 days with a free trial and the choice between monthly and annual plans.\nThe presenter explains the payment process and highlights the money-back guarantee.\nLinking AutoDS Account to Shopify Store:\n\nAfter account creation, the next step is to link the Shopify store.\nThe presenter shows how to add a store on AutoDS, press continue, and install the AutoDS app on Shopify.\nThe installation process is demonstrated, including logging into the newly created AutoDS account.\nConnecting the Accounts:\n\nOnce the AutoDS account is set up, the presenter shows how to connect it to the Shopify store.\nThe importance of completing step three (connecting the store) is emphasized, as many people forget this step.\nA successful connection message is shown, indicating the store is now linked with AutoDS.\nConclusion:\n\nThe video concludes by summarizing the process, highlighting the simplicity and speed (3-4 minutes) of setting up and linking the accounts.\nThe presenter teases the next video, which will cover finding suppliers and fulfilling orders.\nOverall, the video provides a clear, concise guide for beginners to create and link an AutoDS account with their Shopify store, ensuring a smooth dropshipping fulfillment process.",thumbnail:"/thumbnails/image62.png"},{title:"How to Fulfil Orders with AutoDS",summary:"Detailed Summary of the Video on Fulfilling Orders with AutoDS\n\nThe video provides a comprehensive guide on how to fulfill orders using AutoDS, aimed at helping viewers streamline their dropshipping process. Here's a detailed summary of the steps and key points covered in the video:\n\nIntroduction:\n\nThe video welcomes viewers and outlines the goal: to demonstrate how to link products and orders to a supplier in AutoDS and automate the shipping process.\nLinking Products and Orders:\n\nOnce an order is received, users should log in to AutoDS and navigate to the Orders section.\nThe video shows an example order, highlighting the 'Unmonitored' status and the 'Request Sourcing' button.\nViewers are instructed to press 'Request Sourcing' to begin the process, which takes up to two days for AutoDS to find a supplier on AliExpress.\nReviewing and Linking Products:\n\nAfter sourcing, AutoDS will display the found supplier and associated costs, including shipping.\nThe presenter demonstrates how to calculate the total product price by adding the shipping cost.\nUsers are shown how to link the product, selecting the appropriate variant if there are multiple options.\nManaging Account Balance:\n\nTo fulfill orders, users need to add credit to their AutoDS account.\nThe video shows how to navigate to the 'Manage Balance' section and load funds, recommending an initial balance of $50.\nOnce the balance is added, users should press 'Send to Auto Order' to automate order fulfillment.\nBenefits of AutoDS:\n\nAutoDS is recommended for beginners due to its ease of use and automation features.\nThe platform helps find the best price for products, reduces the risk of scams, and automates the fulfillment process.\nCustomer Support:\n\nViewers are encouraged to join the Discord for questions and support.\nAutoDS offers 24/7 customer support to help with any issues.\nConclusion:\n\nThe video concludes by summarizing the simplicity and efficiency of using AutoDS for order fulfillment.\nThe presenter encourages viewers to use the platform to streamline their dropshipping operations and seek help if needed.\nOverall, the video provides a step-by-step guide to linking products, managing account balances, and automating the fulfillment process using AutoDS, making it a valuable resource for dropshipping beginners.",thumbnail:"/thumbnails/image63.png"}]},{module5:[{title:"Ad Creation Intro",summary:"This introduction covers a wide range of topics related to product promotion and the creation of high-quality video advertisements. They emphasize the importance of using proper filming equipment, understanding user-generated content (UGC), and researching competitors to make well-informed marketing decisions. The transcripts also provide helpful instructions and step-by-step guides on writing engaging ad scripts, studying successful ad components, and utilizing editing tools such as CapCut. Throughout these discussions, the focus remains on ensuring authentic product presentations, captivating target audiences, and leveraging various platforms for maximum reach and revenue generation.",thumbnail:"/thumbnails/image-ad-intro.png"},{title:"Filming Equipment",summary:"Summary of Transcript on Filming Equipment for Product Videos:\n\n1. Importance of Quality Filming Equipment:\n   - Using just an iPhone is common but may not yield the best results.\n   - High-quality videos can lead to increased revenue.\n\n2. Essential Filming Equipment:\n   - Camera: The iPhone is recommended for its ability to produce native-looking content, which is less ad-like and more genuine.\n   - Tripod (referred to as filming stick): Essential for stability and ease when filming alone, useful for b-roll footage and talking head segments.\n   - Ring Light: Important for ensuring high-quality lighting and improving video quality, especially in poorly lit environments.\n\n3. Recommendations and Tips:\n   - The video should look like an authentic user review, not an ad.\n   - Avoid two-in-one ring light/tripod combos; it's better to have them separate for flexibility in positioning.\n   - A USB wall plug is necessary to power the ring light.\n\n4. Filming Process:\n   - Demonstrate the product in use to show its functionality.\n   - B-rolls and talking heads are mentioned but will be discussed in a separate video regarding creating effective ads.\n\n5. Importance of Personal Involvement:\n   - Initially, product creators should film their own ads to understand the process and save costs.\n   - Outsourcing to user-generated content creators (UGC) is an option once the business scales.\n\n6. Additional Support:\n   - Offers help through a Discord community for any questions about the equipment.\n\nThe transcript emphasizes the significance of using proper filming equipment to create high-quality product videos and provides specific recommendations for essential gear, including an iPhone, a tripod, and a ring light. It also underscores the importance of personal involvement in the early stages of product promotion and offers additional support through a Discord community.",thumbnail:"/thumbnails/image18.png"},{title:"What are UGCs and why you should use them",summary:"### Summary of UGC Video Transcript\n\n#### Definition and Importance of UGC\n- **UGC (User-Generated Content)**: The video begins by explaining that UGC typically involves people filming themselves or a product to demonstrate its use. The use of UGC is crucial for scaling products due to its authentic appeal.\n\n#### Benefits of UGC\n1. **Authenticity**: UGC adds trust to a brand by showing real people using the product.\n2. **Social Proof**: Incorporating multiple UGCs can make a brand appear popular and widely used.\n3. **Increased Engagement**: UGC can be strategically scripted to trigger viewer reactions, prompting comments and interactions, which can boost the post on social platforms.\n4. **Increased Conversion Rates**: Seeing an actual person using the product can significantly enhance trust and, consequently, conversion rates.\n\n#### Strategies and Types of UGC\n- UGCs can be posted under the brand's name or the content creator's name, though some may prefer anonymity, leading to the creation of fake profiles to maintain engagement.\n- The video promises to show what constitutes a good UGC and discuss pricing and content creation in future modules.\n\n#### Example of Effective UGC\n- The video presents an example from \"High Smile,\" highlighting how showing different people using a product increases trust.\n- It also emphasizes the variety in UGC styles, such as using AI voices and opting not to show faces, which can be product and brand-specific.\n\n#### Conclusion\n- The video concludes with a brief overview of what UGCs are and their benefits, indicating that more in-depth information will be provided in subsequent videos.\n\n#### Action Items\n- No specific instructions are provided for immediate action, but viewers are encouraged to anticipate further explanations in upcoming content.",thumbnail:"/thumbnails/image19.png"},{title:"How to write scripts",summary:"The transcript covers a detailed discussion on three research methods to improve advertising strategies, specifically for products like colognes and perfumes. Here's a summary organized by each method: Reddit for Audience Insights: The speaker emphasizes using Reddit to understand the target audience, exemplified by searching terms like -lonely male Reddit- or -pheromone cologne Reddit-. Analyzing discussions and questions on Reddit helps gather insights. For instance, a query about pheromone perfumes indicates an interest in social proof or reviews. The recommendation is to incorporate these insights into ad scripts, like adding reviews for credibility. Amazon Reviews for Product Feedback: Amazon reviews provide direct feedback on products. Understanding what customers like or dislike can refine advertising messages. For example, if a cologne is praised for its long-lasting scent, that feature should be highlighted in ads. Glitching and TikTok Ads for Tailored Scripts: Glitching offers audience insights, like age range, income bracket, and interests, through its audience insight tool. The platform, designed by experienced drop shippers, provides comprehensive data to tailor marketing strategies. TikTok Ads can generate a base script for an advertisement, detailing scene-by-scene instructions, which can be a starting point for ad creation. Additionally, AI tools can be used to refine scripts, offering suggestions to improve them. Additional Points:  The importance of studying successful past campaigns, like analyzing popular videos related to the product on TikTok, is highlighted. Emphasis on practice and continuous learning about the product, audience, and marketing angles to improve advertising effectiveness. The transcript concludes with an invitation to join a Discord community for further assistance. Overall, the transcript provides a comprehensive guide on using online platforms and AI tools to gather audience insights and create effective ad scripts for products, with an emphasis on continuous learning and improvement.",thumbnail:"/thumbnails/image20.png"},{title:"What makes a good ad",summary:"Detailed Summary:\n\nThe transcript provides an instructional overview on creating effective advertisements. The main topics include the essential components of an ad, the importance of each, and the process of constructing an ad that captures attention and prompts action. Here's a structured summary of the key points:\n\n1. Components of an Advertisement:\n   - B-Rolls: Footage showcasing the product or a feature of the product without showing a person's face. It's the most crucial element for an ad.\n   - Talking Heads: Someone speaking directly to the camera, which helps the ad look more organic and relatable.\n   - Animations: These can enhance an ad but are not necessary initially due to the high cost.\n\n2. Order of Importance:\n   - B-Rolls are the most critical, as they can be used with voiceovers to create effective ads.\n   - Talking Heads add a personal touch but are less crucial than B-Rolls.\n   - Animations are helpful but the least important due to cost and can make an ad look less human.\n\n3. Creating the Ad Structure:\n   - Hook: An eye-catching element that stops people from scrolling and calls out to the audience. It's critical as it's the first thing viewers see.\n   - Problem: After the hook, the ad must address a problem that the target audience can relate to.\n   - Solution: Presenting the solution to the highlighted problem to maintain viewer interest.\n   - Features and Unique Selling Proposition (USP): Doubling down on the solution by explaining how the product works and what makes it unique.\n   - Social Proof: Including testimonials or demonstrations from other users to validate the product's effectiveness.\n   - Call To Action (CTA): A prompt for immediate viewer response, often using urgency or a special offer to incentivize action.\n\n4. Examples and Analysis:\n   - The transcript includes analysis of successful ads from companies like HiSmile and PetLab Co., breaking down how they utilize the above elements.\n   - It emphasizes the importance of a well-constructed hook and how to seamlessly transition from the hook to the problem and solution.\n   - The need for social proof and a strong CTA is highlighted, with examples demonstrating how these components work in practice.\n\n5. Additional Tips:\n   - Mixing B-Rolls and Talking Heads is recommended to avoid monotony.\n   - Animations should not be a priority at the beginning due to their cost.\n   - Direct response marketing is encouraged as an effective strategy, especially for drop shipping businesses.\n\n6. Conclusion and Further Resources:\n   - The speaker suggests joining their Discord for additional help and indicates that future videos will cover ad editing techniques and strategies for generating significant revenue through advertising.\n\nIn summary, the transcript provides a comprehensive guide to creating ads that are visually appealing, relatable, and compelling. The emphasis is on showcasing the product, addressing the audience's problems, and offering clear solutions, all while ensuring the ad feels organic and prompts the viewer to take action.",thumbnail:"/thumbnails/image22.png"},{title:"How to study your Competitors",summary:"Summary of Transcript - \"How to Study Your Competitors for Product Selling\"\n\nMain Topics:\n1. Conducting Competitor Research\n2. Analyzing Marketing Strategies\n3. Evaluating Competitors' Online Presence and Performance\n4. Identifying Market Demand\n5. Considering Alternative Marketing Angles\n\nSpecific Instructions and Significant Details:\n- The primary product focus is the selling of \"L cologne\".\n- Initial research involves searching for the product on TikTok to understand marketing strategies used by others, such as user-generated content (UGC) and specific \"angles\" or hooks that attract viewers.\n- One video with 1.5 million views suggests that attracting female attention is a successful marketing angle, despite it featuring a different branded product.\n- It’s advised to visit competitors' profiles and websites to assess their followings and potential sales strategies.\n- One website was analyzed and speculated to be using Funnelish, aimed at increasing average order value (AOV), though pricing strategies seemed unclear.\n- The Facebook Ads Library is recommended to check the number and activity of a competitor's ads, with an estimation that 100-150 active ads could correlate with significant daily sales.\n- The importance of ad content is emphasized, with another video's success (500k views) indicating the effectiveness of the attraction angle.\n- Reading comments on videos can reveal consumer interest and demand.\n- An alternative to manual research is using tools like PP Ads for more in-depth analysis.\n- It's important to consider alternative marketing angles if the current successful angle seems saturated; for example, targeting different demographics.\n- Analyzing competitors' websites for professionalism and branding can identify opportunities for improvement and market entry.\n- SimilarWeb can be used to analyze website traffic, showing potential success and trends.\n- The tool also suggests related competitors based on website traffic, providing broader market insight.\n\nSummary:\nThe transcript outlines a detailed strategy for studying competitors when planning to sell a product, in this case, \"L cologne\". It suggests beginning with searching on TikTok to identify successful marketing angles, with the example provided indicating that attracting female attention garners substantial views. Competitors' profiles and websites should be examined for follower count, branding, and sales tactics. Tools like the Facebook Ads Library and PP Ads can provide insights into ad performance and strategies. The discussion includes the importance of considering alternative angles to differentiate one's approach in a saturated market. Website analysis highlights the significance of a professional appearance and the potential to outperform competitors with better branding and presentation. Finally, SimilarWeb is recommended for assessing website traffic and discovering potential competitors. The transcript emphasizes the importance of combining free and paid tools to comprehensively understand and potentially outperform competitors in the market.",thumbnail:"/thumbnails/image23.png"},{title:"ElevenLabs Tutorial",summary:"Summary:\n\nThe transcript is from a short instructional video focusing on ElevenLabs, a tool used for creating AI voices. The speaker emphasizes the following key points:\n\n1. Purpose of the Video:\n   - The video is designed to introduce and explain the use of 11 LS for generating AI voices.\n\n2. Features of 11 LS:\n   - Voice Selection: Users can choose from a variety of voices.\n   - Voice Settings: The tool offers customization options such as style and stability, with a recommendation to start with default settings and adjust to find the best sound.\n   - Language Options: 11 LS is capable of creating voices in different languages, which is beneficial for targeting non-English speaking markets such as Europe.\n   - Voice Lab: This feature allows users to import their own voices or create voices of other people, providing extensive flexibility and creative possibilities.\n\n3. Demonstration:\n   - The speaker provides an example by using a popular voice named Adam, demonstrating the output quality and confirming that users can input any text they wish.\n\n4. Call to Action:\n   - The speaker encourages the audience to explore 11 LS and directs them to the 11 labs website for further information.\n\nThe video serves as a brief guide to 11 LS, highlighting its utility for diverse voice generation in various languages and its customization features, which can be tailored to individual user needs or project requirements.",thumbnail:"/thumbnails/image24.png"},{title:"How to use CapCut to edit ads",summary:'Summary of the Transcript:\n\n**Main Topics:**\n1. Editing ads using software tools.\n2. Targeting specific audiences.\n3. Tips and techniques for creating effective video ads.\n4. Utilizing user-generated content (UGC).\n5. Exporting and formatting ads for different platforms.\n\n**Specific Instructions:**\n- Use Premier Pro or CapCut (a free alternative) for editing ads.\n- Install CapCut if not already installed and start a new project.\n- Select the hook and ad content for the project.\n- Edit the video by cutting unnecessary parts and improving the hook.\n- Remove CapCut branding at the end of the video.\n- Add and adjust subtitles for clarity and visibility.\n- Optimize subtitle text size and style, including adding stroke and adjusting word count per line.\n- Fast forward through repetitive editing steps.\n- Export the video for TikTok, ensuring the correct format and visibility of text.\n- Modify the video format for Facebook ads, adjusting the scale and placement of text.\n- Choose copyright-free music and ensure appropriate volume levels.\n\n**Significant Details:**\n- The ad is for "L cologne" and targets young men.\n- The hook uses a video of Kina to attract the target audience.\n- The goal is to lower CPMS and increase reach by leveraging the TikTok algorithm.\n- The ad includes a skit where a user demonstrates the cologne\'s effect.\n- Editing should focus on creating engaging content without overcomplicating it.\n- Understanding the target audience and using the right angles is crucial.\n- UGC actors should not edit videos; raw footage is preferred for personal editing.\n- Emojis and text size should be tailored to the demographic.\n- For TikTok, avoid placing subtitles where text will appear on the ad.\n- For Facebook, the text can be positioned lower as there is no overlay text.\n- Technical issues with CapCut are mentioned, suggesting a manual workaround may be needed.\n- Copyright-free music is essential to avoid legal issues.\n\n**Conclusion:**\nThe transcript provides a guide for creating and editing video ads using CapCut, focusing on engaging a specific target audience and ensuring the content is formatted correctly for platforms like TikTok and Facebook. It emphasizes the importance of a compelling hook, clear subtitles, and the strategic use of user-generated content while also addressing technical aspects of video editing and export.',thumbnail:"/thumbnails/image25.png"}]},{module6:[{title:"TikTok Ads Introduction",summary:'Summary:\n\nThe transcript is from an introductory segment of a course focused on utilizing TikTok for advertising purposes. The speaker emphasizes the significance of TikTok, known here as "Stick Talk," as a major platform for marketing. They suggest that it is currently easier to start advertising on TikTok compared to using Facebook ads. The course promises to teach participants how to create effective TikTok advertisements. Additionally, the speaker plans to reveal and demonstrate the actual process of running TikTok ads for a specific store featured within the course. The summary of the speaker\'s key points is as follows:\n\n1. TikTok is highlighted as a significant and advantageous platform for advertising.\n2. The course aims to provide easier entry into TikTok advertising compared to starting with Facebook ads.\n3. The course will cover the creation of effective TikTok ads.\n4. The instructor will share their personal experience by showcasing the use of TikTok ads for a store that will be revealed during the course.\n5. The speaker invites participants to join the course for further insights ("I\'ll see you on the inside").',thumbnail:"/thumbnails/image26.png"},{title:"TikTok Algo & Policies",summary:"The provided transcript is from a training session focused on understanding the TikTok algorithm and advertising policies for running successful ad campaigns on the platform. The key points from the transcript are summarized below:\n\n**Understanding TikTok's Goals:**\n- TikTok aims to keep users engaged on the platform to collect data and sell it to advertisers.\n- Advertisers, like the speaker, can leverage TikTok's desire for user addiction to their advantage, as TikTok's algorithm understands who is likely to buy their products.\n\n**Algorithm Insights:**\n- Before spending on ads, the algorithm reviews and analyzes the ad content using AI to determine the target audience.\n- The speaker stresses that the algorithm is designed to help advertisers succeed by matching ads with the appropriate audience.\n\n**Ad Campaign Strategies:**\n- The speaker advises testing different angles and audiences for a single product to determine the most effective approach.\n- Three angles for selling a cologne with pheromones are proposed: targeting teenagers looking for a girlfriend, appealing to a gay audience, and suggesting the product stimulates more affection in a relationship.\n\n**Audience Segmentation:**\n- It's important to identify specific audience segments and tailor ads to those groups.\n- Initially, advertisers should test various ads to let the algorithm identify the winning audience.\n\n**Bidding War and Video Quality:**\n- The advertising platform is described as a bidding war, where the quality of the ad videos can give advertisers an edge over competitors.\n- Creating better video ads is essential to outperform other brands selling similar products.\n\n**TikTok Advertising Policies:**\n- Avoiding account suspension is crucial, as recovery can be difficult and may require using VPNs or proxies.\n- Specific policies to follow include limiting profanity, not showing too much skin, avoiding ripping off content for too long, and steering clear of adult products or copyrighted merchandise.\n\n**Content Creation and Copyright:**\n- Advertisers should initially use varied content to gauge potential and then create original content to avoid bans and legal issues.\n- Copyright infringement, particularly with merchandise related to celebrities or popular brands, can result in legal consequences.\n\n**Conclusion:**\n- The speaker encourages understanding that the algorithm is an ally and that success comes from working with it rather than against it.\n- Advertisers should focus on making appealing videos for different audience segments to discover the most effective strategy.\n\nAdditionally, the speaker offers help and feedback through a Discord channel for further discussion or questions regarding TikTok advertising.",thumbnail:"/thumbnails/image27.png"},{title:"TikTok Ads Metrics & Columns",summary:"Summary of the TikTok Ad Metrics Video Transcript:\n\n**Main Topics:**\n1. Understanding TikTok Ad Metrics\n2. Importance of Cost Per Acquisition (CPA)\n3. Return on Ad Spend (ROAS) and its accuracy\n4. Click-Through Rate (CTR) and Cost Per Click (CPC)\n5. Cost Per Mille (CPM) and Total Cost\n6. Setting up Custom Columns in TikTok Ads Manager\n7. Analyzing an example ad set\n\n**Specific Instructions:**\n1. Learn to interpret CPA for individual ad sets and the overall account.\n2. Calculate the Break Even ROAS to ensure profitability.\n3. Aim for a CTR of at least 2%.\n4. Keep CPC below $1 if possible.\n5. CPM is variable and less crucial to track.\n6. Use the TikTok Ads Manager to set up custom columns for easy ad analysis.\n7. Join the Discord for further assistance.\n\n**Significant Details:**\n- CPA is the cost to acquire a purchase on TikTok, vital for determining profitability.\n- The video presenter shows how to calculate profit by subtracting CPA and cost of goods from the selling price.\n- ROAS may not be accurate on TikTok; therefore, CPA is a more reliable metric.\n- Break Even ROAS is calculated by dividing the selling price by the selling price minus the product cost.\n- CTR indicates the percentage of viewers who click an ad, and a higher CTR usually results in a lower CPC.\n- CPM varies based on the audience and isn't a key performance indicator.\n- Total Cost helps to understand overall spend versus returns.\n- An example ad set breakdown is provided to demonstrate the analysis of TikTok ad performance.\n- It is recommended to copy the presenter's custom column setup for effective monitoring of ad metrics.\n\n**Comprehensive Overview:**\nThe video guides viewers on how to interpret and utilize TikTok ad metrics effectively to optimize ad performance and profitability. The focus is on understanding the cost per acquisition (CPA) for individual ad sets and the overall account, as well as calculating the break-even return on ad spend (ROAS) to ensure ads remain profitable. While the presenter notes that ROAS on TikTok can be inaccurate, they stress the importance of CPA as a more reliable metric. For click-through rate (CTR), the goal is to maintain a rate of at least 2%, and ideally, the cost per click (CPC) should be under $1. The presenter deems cost per mille (CPM) less critical due to its variability. They also walk through setting up custom columns in TikTok Ads Manager for easier analysis, and offer an example of how to evaluate an ad set's performance, including metrics like CTR, CPC, and conversion rate. Finally, the video encourages viewers to join a Discord community for additional support.",thumbnail:"/thumbnails/image28.png"},{title:"TikTok Ads Setup, Pixel & general overview",summary:"**Summary of TikTok Business Account Setup and Ad Structure Overview**\n\n**Main Topics:**\n1. Creating a TikTok business account\n2. Setting up TikTok Ads Manager\n3. Installing the TikTok pixel\n4. Overview of TikTok ad structure\n\n**Specific Instructions:**\n- Install TikTok Pixel:\n  - Access through Shopify app store.\n  - Search for TikTok and install the relevant app.\n  - Pin the app for easy access.\n  - Connect your TikTok business account.\n  - Sign up for an account if you don't have one, using the store's email and a verification code received by email.\n\n- Create Ads Manager:\n  - Select your country, currency, and business name (can use default or change).\n  - Input your phone number and industry (though industry selection is not critical).\n  - Accept terms and conditions to sign up.\n  - Set data sharing to the maximum level.\n  - Confirm the automatically created pixel.\n  - Complete company information and set up payment preferences (automatic payments are recommended).\n\n- Accessing and Navigating TikTok Business Center:\n  - Log into the TikTok Business Center using the newly created account.\n  - Navigate to Ads Manager and accept terms and conditions.\n  - Choose custom mode for ad setup.\n\n**Ad Structure Overview:**\n- Campaigns: Set up a new campaign with a focus on website conversions. Name the campaign without adjusting other settings.\n- Ad Groups:\n  - Name the ad group (e.g., broad one).\n  - Select the TikTok pixel created on Shopify.\n  - Choose an optimization event (e.g., complete payment).\n  - Opt for manual placements, excluding low-quality apps.\n  - Adjust advanced settings, enabling user comments while disabling video download and sharing to protect content and maintain engagement.\n  - Keep targeting broad, including locations, gender, age, language, interest, and device settings.\n  - Set a starting budget (e.g., $20) and schedule ads to start at midnight the next day for even spending, adjusting day parting for specific time zones.\n  - Maintain conversion as the optimization goal and maximum delivery for bid strategy.\n- Ads:\n  - Enable smart creatives for easier testing.\n  - Name the ad appropriately.\n  - Upload ad content, create a text and call to action (e.g., \"Shop Now\").\n  - Input website URL.\n  - Ignore tracking settings at the bottom.\n\n**Conclusion:**\nThe transcript provides step-by-step guidance on setting up a TikTok business account, installing the TikTok pixel, and creating an ads manager. It further explains the structure of TikTok ad campaigns, including campaign creation, ad group settings, and individual ad setup. The overview includes recommendations for payment settings, ad targeting, scheduling, and optimization to ensure effective ad performance. The presenter promises to show actual ad creation, strategy, and results in a future phase.",thumbnail:"/thumbnails/image29.png"},{title:"CBO vs ABO",summary:"Summary:\n\nThe transcript is from an instructional video focused on explaining the difference between Campaign Budget Optimization (CBO) and non-CBO strategies in the context of digital advertising, specifically on Facebook. The speaker emphasizes the importance of understanding CBO for future discussions in upcoming videos.\n\nMain topics and specific instructions:\n\n1. Explanation of Ad Structure:\n   - The speaker references a previous video about ad account structure, which includes campaigns, ad sets, and ads. In this explanation, the focus is on campaigns and ad sets, where ads are not the primary concern.\n\n2. Non-CBO Strategy:\n   - Without CBO, budgets are set at the ad set level. In the given example, there are three ad sets each with a $10 budget, totaling $30.\n\n3. CBO Strategy:\n   - With CBO, the budget is set at the campaign level instead of the ad set level. The total budget remains the same, but its allocation is different.\n   - An example is provided to illustrate the difference in conversion outcomes between non-CBO and CBO strategies. In non-CBO, each ad set receives an equal budget regardless of performance, leading to a total of 10 conversions across three ad sets. In contrast, CBO dynamically allocates the budget towards the best-performing ad sets, resulting in 15 conversions with the same overall budget.\n\nSignificant Details:\n\n1. Optimization with CBO:\n   - The speaker notes that CBO allows for better budget utilization by allocating more funds to ad sets that perform better, thus potentially increasing the total number of conversions.\n\n2. Encouragement to Review the Concept:\n   - The speaker acknowledges that the concept of CBO might be confusing initially and encourages viewers to rewatch the video to fully grasp the concept.\n\n3. Preparation for Future Content:\n   - Understanding CBO is presented as crucial for the audience to follow along with future instructional content.\n\nThe summary organizes the key elements of the transcript into a coherent overview, detailing the distinction between non-CBO and CBO strategies, the significance of budget optimization in advertising performance, and the importance of familiarizing oneself with the concept for further learning.",thumbnail:"/thumbnails/image30.png"},{title:"TikTok Strategy Phase 1 (Testing Ads)",summary:"Summary of TikTok Ads Phase One - Testing Strategy:\n\n1. **Objective of Phase One**: The initial phase of TikTok advertising is focused on testing ads to identify which ones perform well. \n\n2. **Budget Considerations**: It is recommended to start with a small budget, particularly for those with financial constraints. To make the most of a limited budget, it is advised to create only one campaign with three ad sets.\n\n3. **Number of Creatives**: Although one can have three to five creatives per ad set, starting with three is suggested to ensure adequate budget allocation for each ad, allowing for quicker determination of ad performance.\n\n4. **Campaign Setup Instructions**:\n   - Use the Ads Manager to create a new campaign.\n   - Select 'website conversions' as the objective and name it 'campaign one.'\n   - Name the ad group (e.g., 'broad one'), select the pixel, and set the conversion event to 'complete payment.'\n   - For placements, deselect the last two options in the Advent settings.\n   - Target top five wealthy countries (Australia, Canada, United States, United Kingdom, and New Zealand). If limited, choose the best available options.\n   - Keep the gender and age targeting broad.\n   - Set a daily budget of $20 (the minimum on TikTok) and schedule ads to start running at midnight the next day.\n   - For countries like Canada and the United States, consider running ads from 6:00 a.m. to midnight. For multiple time zones, run ads all day.\n   - Keep the conversion goal and delivery settings on default.\n\n5. **Creating the Ads**:\n   - Upload three creatives to the Smart creative ads section.\n   - Add an enticing offer or highlight a key product feature in the ad text, using tools like Glitching for inspiration.\n   - Ensure a clear call-to-action, such as 'shop now,' and include the store URL.\n   - Select visually appealing thumbnails for each video, ensuring they are eye-catching and encourage engagement.\n\n6. **Monitoring and Analysis**:\n   - After the ads have run for two days, evaluate the results by examining the cost per click (CPC) and cost per action (CPA).\n   - Determine the profitability of the ads and identify issues by analyzing whether the CPC or website might be affecting performance. Additional resources like a funnel troubleshooting video may help with this analysis.\n   - If the ads are profitable, proceed to phase two of the advertising strategy.\n\n7. **Additional Considerations**:\n   - Be aware of potential TikTok bugs, such as the appearance of black bars on thumbnails, which do not reflect formatting errors.\n   - Adjust your strategy based on the ads' performance and the insights gathered during this testing phase.\n\nThe transcript provides a step-by-step guide for setting up and testing TikTok ads, with a focus on managing a low budget, targeting effectively, and optimizing ad creatives for maximum engagement and conversion.",thumbnail:"/thumbnails/image31.png"},{title:"TikTok Strategy Phase 2 (Scaling Winners)",summary:'Summary of the TikTok Ads Phase Two Transcript:\n\n**Phase Two Overview:**\nThe speaker is addressing individuals who have completed Phase One of a TikTok ads strategy. The focus is now on scaling successful creatives (ads) identified in Phase One.\n\n**Key Instructions:**\n- The first step in Phase Two involves setting up a Campaign Budget Optimization (CBO) with a budget of $50.\n- Within this CBO, create three different ad sets, all targeting broad audiences.\n- Place the winning creative(s) from Phase One into each ad set.\n- It is recommended to have at least three winning creatives to avoid ad fatigue and to reach different audience pockets effectively.\n- After setting up, let the campaign run for two days to gauge profitability.\n\n**Scaling Process:**\n- If the ad sets are profitable after two days, the next step is to increase the CBO budget to $100.\n- If continued success is observed with the increased budget, proceed to Phase Three, which involves a technique called "surfing," to be discussed in a later phase.\n\n**Additional Considerations:**\n- The speaker mentions the importance of understanding that you are scaling ads, not just the product.\n- They highlight the role of machine learning and AI in platforms like TikTok and Facebook, which simplifies the scaling process.\n\n**Technical Issues & Support:**\n- The speaker cannot demonstrate how to create Phase Two ads in the TikTok ad manager due to their accounts being banned.\n- There is an upcoming separate video planned to address the issue of dealing with TikTok ad account bans.\n- It is suggested to watch the Phase One video for guidance on creating the initial campaign structure, which is similar for Phase Two.\n- The speaker invites questions and offers help through a Discord channel.\n\n**Summary:**\nIn summary, the transcript outlines the Phase Two process for scaling successful TikTok ads by using a CBO with broad targeting and multiple ad sets. The speaker emphasizes the need for multiple winning creatives to prevent ad fatigue and to target different audience segments. They also assure listeners that ad platforms\' advanced technologies make scaling simpler. Due to a ban on their TikTok accounts, the speaker is unable to provide a live demonstration but promises a future video on handling bans and encourages viewers to seek help on Discord if needed.',thumbnail:"/thumbnails/image32.png"},{title:"TikTok Strategy Phase 3 (Winning CBOs)",summary:"### Summary of TikTok Ads Phase Three: Surfing Phase\n\n#### Key Points:\n1. **Objective of Surfing Phase**: \n   - The purpose of phase three is to significantly scale up successful TikTok ad campaigns.\n\n2. **Recap of Previous Phases**: \n   - Phase one involves finding winning creative content for ads.\n   - Phase two is about beginning the scaling process for these successful creatives.\n\n3. **Criteria for Surfing**:\n   - Surf only campaigns that are performing exceptionally well, indicated by three or more 'A+' ratings (Ras).\n   - Eliminate campaigns that are not profitable to avoid financial loss.\n\n4. **Concept of Surfing**:\n   - Surfing is based on the observation that sales tend to increase towards the end of the day, creating a wave-like pattern in revenue graphs.\n   - The technique involves progressively increasing the ad budget throughout the day to capitalize on this pattern.\n\n5. **Techniques for Increasing Budget**:\n   - There is no one-size-fits-all approach; strategies vary based on margins, product type, and selling price.\n   - Some suggested methods include:\n     - Increasing the budget by $100 every hour for a conservative approach.\n     - Doubling the budget every hour or after every three purchases for more aggressive scaling.\n\n6. **Resetting the Budget**:\n   - Reset the budget at midnight to start fresh for the next day.\n\n7. **Testing and Adapting**:\n   - Each ad account may respond differently to scaling techniques, so it is essential to test what works best for your specific account and product.\n\n8. **Alternative to Surfing**:\n   - For those who are hesitant about aggressive scaling, a more moderate approach is to increase the budget by $100 daily until the optimal budget level is found.\n   - In this case, there is no need to reset the budget for the following day.\n\n#### Summary:\nIn the Surfing Phase of TikTok ad management, the goal is to dramatically scale up the most successful campaigns. Surfing should only be applied to highly profitable campaigns and involves incrementally increasing the ad budget throughout the day to leverage peak sales times. Techniques vary, with some advertisers opting for a cautious $100 hourly increase, while others may double the budget more aggressively. The strategy should be customized based on individual campaign performance and product characteristics. Testing is essential to determine the best approach for each ad account. An alternative for those wary of aggressive scaling is to gradually increase the budget daily. For additional support, joining the Discord community is recommended.",thumbnail:"/thumbnails/image33.png"},{title:"Cost Cap and advanced TikTok Settings",summary:"Summary of the TikTok Ad Advanced Techniques Video:\n\nMain Topics:\n1. Importance of testing ad account settings\n2. Explanation of the cost cap strategy\n3. Creation and scaling of ad sets\n4. Evaluating and finding the cost cap \"sweet spot\"\n5. Demonstrating successful results from the speaker's experience\n6. Instructions on setting up cost cap in TikTok Ads Manager\n7. Discussion of other settings: Smart Performance Campaign and Spending Power\n8. Combining cost cap with value optimization\n\nSpecific Instructions and Significant Details:\n- The speaker emphasizes the necessity of testing each setting on one’s ad account due to the variance in results between different accounts.\n- The cost cap is presented as a key technique for scaling ads, defined as the target cost per conversion. It is calculated by subtracting the cost of goods and an additional $10 from the selling price.\n- An example is given: for a product selling at $30 with a cost of $10, the cost cap would start at $10.\n- The speaker suggests creating 20 ad sets, each with an incrementally higher cost cap by $1, to identify the range that yields the best results.\n- A \"sweet spot\" is found by incrementally adjusting the cost cap within a specific range, in this case between $11 and $13, and testing further within that range.\n- Results from the speaker's account show a CPA (Cost Per Acquisition) of $1.81, with conversions under $1, and a CPC (Cost Per Click) of 10 cents, indicating the effectiveness of this approach.\n- The speaker advises where to set up the cost cap in TikTok’s Ads Manager, under the ad set level.\n- The Smart Performance Campaign setting is mentioned, with the speaker noting personal unsuccessfulness but still encouraging testing.\n- Spending Power is another setting discussed; it was not effective for the speaker due to the lower price point of their products but is recommended for testing with higher-priced items.\n- It is mentioned that the cost cap can be combined with 'value' optimization once 50 purchases have been made on the pixel, which may yield better results than conversion optimization alone.\n- The video concludes with an invitation to join a Discord community for further questions and assistance.\n\nThe video is a tutorial on advanced ad techniques for TikTok, focusing on cost cap strategy as a means to optimize and scale advertising efforts effectively. The speaker shares their personal results and encourages viewers to test various settings and strategies to find what works best for their specific products and ad accounts.",thumbnail:"/thumbnails/image34.png"},{title:"How to deal with TikTok Ban",summary:"**Summary of TikTok Ban Video Transcript**\n\n**Main Topic:**\n- The video is a guide for TikTok users who have experienced account bans, providing strategies on how to set up a new account and run ads without getting banned again.\n\n**Specific Instructions and Significant Details:**\n\n1. **New Business Manager and Ad Account:**\n   - Create a new business manager to reduce the risk of being banned again.\n   - Using another ad account under the same business manager could result in a ban; however, using a new ad account with a new business manager is recommended.\n\n2. **Agency Account Option:**\n   - Consider using an agency account from a service like Rock ads, which would not be under your personal name, to further decrease the likelihood of getting banned.\n\n3. **Different Credit Card:**\n   - Do not use the same credit card linked to the previously banned account or business manager.\n   - Alternative options include:\n     - Ordering a new physical credit card.\n     - Using a service like Wise to obtain virtual credit cards for free.\n     - Avoid using PayPal as it doesn't link with TikTok and doesn't provide points for purchases.\n\n4. **New Pixel and TikTok App Connection:**\n   - Avoid using the same TikTok pixel that was associated with the banned account.\n   - Instead of the official TikTok app, use an alternative app like Tixel to connect a new TikTok pixel to your Shopify store, which can help prevent another ban.\n\n5. **New Domain:**\n   - If the previous domain was banned, it's necessary to purchase a new domain to avoid repeating the ban.\n   - Domains can be bought through GoDaddy, Shopify, or similar services.\n\n6. **New Computer (Last Resort):**\n   - If all other steps fail, using a different computer may be necessary as TikTok may blacklist hardware associated with multiple bans.\n   - The speaker advises that a cheap or unused laptop can be enough for this purpose and plans to test this theory with a friend's old laptop.\n\n**Community Support:**\n- Joining the speaker's Discord is encouraged for further assistance and to join a community where members help each other with issues related to TikTok bans.\n\n**Conclusion:**\n- The speaker promises to update the Discord community on the results of their testing and thanks the viewers for watching the video.\n\nThe transcript provides a step-by-step guide on how to potentially avoid a TikTok ban after an account has been previously banned, emphasizing the need for new business management tools, credit cards, pixels, domains, and possibly new hardware. The video also invites viewers to join a Discord community for additional support.",thumbnail:"/thumbnails/image35.png"}]},{module7:[{title:"TikTok Organic Introduction",summary:"Summary:\n\nThis transcript is an introduction to a bonus section on organic growth on TikTok, aimed at individuals with limited financial resources for starting a business or brand online. The speaker highlights the advantages of using TikTok's organic reach to gain viral attention without spending money on advertisements. The key requirement mentioned is to order a product to one's house to get started with creating content. The speaker promises to provide a comprehensive guide on everything the audience needs to know about organic growth on TikTok in the upcoming section of the course. The summary of the transcript is as follows:\n\n- The section is a bonus addition focusing on organic growth strategies on TikTok.\n- It is particularly beneficial for those with limited budgets.\n- The potential for videos to go viral without ad spend is emphasized.\n- The only initial step required is to acquire a product for content creation.\n- The speaker commits to teaching the audience all the necessary details about TikTok's organic growth in the forthcoming lessons.",thumbnail:"/thumbnails/image36.png"},{title:"TikTok organic algorithm",summary:'### Summary of the TikTok Organic Algorithm Transcript\n\n#### Key Differences Between TikTok Organic and Ad Algorithms\n- The presenter emphasizes the importance of understanding the distinct differences between TikTok\'s organic and ad algorithms.\n\n#### Importance of a Clear Angle and Niche\n- Having a clear angle and niche is crucial due to high competition.\n- The presenter establishes their credibility by showing their successful TikTok organic view counts for their YouTube channel related to League of Legends.\n- They highlight that the organic approach really works, as evidenced by the viewership of the course itself.\n\n#### Strategies for Starting with Organic Content\n- Beginners should emulate successful pages to understand what works.\n- Examples are given, such as "Hypco" and "Mini Movie," who have effectively used TikTok organically to promote products like mini projectors.\n- Copying successful models is recommended initially until one understands their own angle and niche.\n\n#### Understanding the Viral Formula\n- The presenter talks about the importance of high retention rates (watch time).\n- Suggestions for increasing retention include calling out the target audience visually, with text, or voiceovers, within the first few seconds of a video.\n- The hook should provide a compelling reason to watch the entire video, affecting how TikTok boosts content based on user engagement and retention.\n\n#### Engagement and Going Viral\n- Engagement (likes, comments, shares) is critical for organic success.\n- TikTok\'s goal is to keep users on the platform longer to collect data and sell to advertisers.\n- The presenter promises to explain how to create effective hooks in a future lesson.\n\n#### Posting Strategy and Frequency\n- Beginners should start posting once daily to focus on quality over quantity.\n- As proficiency improves, increase to two posts a day (3 PM and 7 PM local time) and eventually three posts a day (adding 10 AM).\n- The presenter explains that the posting time is not as crucial as content quality.\n\n#### Geographical Considerations\n- Content reach can be affected by the creator\'s location.\n- For creators in non-tier one countries, using a US SIM card and VPN is suggested to reach US audiences.\n- An alternative is to use Instagram Reels, which is also powerful but takes longer to build.\n\n#### Leveraging Comments for Engagement\n- Replying to comments on viral videos can boost subsequent posts.\n- Baiting comments is suggested to increase engagement.\n\n#### Carousel Posts\n- Carousel posts are underrated and can naturally boost engagement.\n- The presenter advises alternating between videos and carousels.\n\n#### Music and Cultural Trends\n- Using trending music can help content go viral.\n- The presenter describes personal observation rather than tools to identify trends.\n\n#### Avoiding "Window Shopper" Products\n- Products that are gimmicky and don\'t offer value are less likely to sell, despite high views.\n- The "Woody Hoodie" is provided as an example of a product that may get attention but not necessarily sales.\n\n#### Conclusion and Additional Resources\n- TikTok organic',thumbnail:"/thumbnails/image37.png"},{title:"Successful TikTok Organic Pages",summary:"Summary:\n\nThe provided transcript is from a video tutorial discussing successful organic TikTok pages that have gained popularity and continue to perform well. The main topics include:\n\n1. Case Studies of Successful TikTok Pages:\n   - The Drencher: A page with 194,000 followers and 5.7 million likes that sells water guns with customizable features. The branding is consistent across the page and product descriptions. The speaker highlights the simplicity of the store's design and suggests that even a basic looking store can generate significant revenue.\n   - High Peak: A page with 224,000 followers and 5.8 million likes that sells mini projectors. The speaker notes that consistent posting leads to high viewership and that the page's success could be amplified by reaching out to influencers to post their products.\n   - Tabs Chocolate: A brand selling 'sex chocolate' that utilizes influencers to promote their products, achieving high levels of engagement and views.\n\n2. Organic Growth and Content Creation:\n   - The speaker emphasizes the importance of organic growth on platforms like TikTok, particularly for those with limited budgets for dropshipping.\n   - The role of content quality in going viral and generating organic traffic is discussed.\n   - The potential for selling a successful page or store is mentioned, with an example of a page that likely changed ownership due to a noticeable difference in the person featured in the videos.\n   \n3. Dropshipping and E-Commerce Store Management:\n   - The transcript provides insights into managing a dropshipping store, highlighting that success is a mix of various skills, not just one.\n   - The importance of a well-designed website is discussed, with critiques on the High Peak store's layout and design.\n   \n4. Recommendations and Advice:\n   - The speaker suggests checking out the work of a person named Mike, who is skilled in organic growth strategies.\n   - The importance of consistency and quality in video creation is emphasized.\n   - The speaker advises against getting caught up in minor details like hashtags or posting times and instead focuses on creating good content and maintaining a strong bio.\n\n5. Course Information:\n   - The transcript appears to be part of an educational course on organic growth and dropshipping, possibly named 'Glitching.'\n   - The speaker encourages applying the knowledge shared in the course and joining a Discord community for further support.\n\nIn summary, the video provides a comprehensive analysis of successful organic TikTok pages, emphasizing the importance of content quality, branding consistency, influencer partnerships, and website design in achieving success in dropshipping and e-commerce. The speaker also shares insights on organic growth strategies and the value of the educational content provided in the course.",thumbnail:"/thumbnails/image38.png"},{title:"How to post on TikTok Organic",summary:'Summary:\n\nWelcome and Introduction:\n- The course focuses on organic posting on TikTok.\n- The speaker has created a TikTok account for their store, "lyrical."\n\nAccount Setup:\n- Ensure that the TikTok account is set to a personal account, not a business account. This allows access to popular sounds which are not available for business accounts.\n- Navigate to settings and privacy to check the account type.\n\nCreating a Bio:\n- Access the bio section through the "Edit Profile" option.\n- The bio should include the name of the store, which can only be added once the account reaches 1000 followers.\n- Followers can be gained through a viral post or by paying, though paying is not recommended due to cost.\n\nVideo Upload Tips:\n- Editing videos with CapCut before uploading to TikTok may result in more views due to the same company owning both platforms.\n- The direct upload from CapCut is mentioned as potentially beneficial for algorithm promotion.\n\nPosting a Video:\n- Select a viral sound to add to the video.\n- Choose a cover image for the profile, though it does not significantly impact post promotion.\n- Write the video description and hashtags in the Notes app for better layout.\n- Recommended to use 3-5 hashtags to avoid overloading the post.\n- Ensure the post is high quality in the \'more options\' section before posting.\n- First videos often receive more views as TikTok promotes them to encourage new users.\n\nConsistency and Luck:\n- Encourages consistent uploading and improving video creation skills.\n- Acknowledges a degree of luck in organic growth on TikTok, described as "calculated luck" where chances increase with continued effort.\n\nConclusion:\n- The process is straightforward and simpler than some "gurus" make it seem.\n- The bio issue experienced was a temporary bug that resolved itself.\n\nThe speaker concludes by emphasizing the importance of using sounds, considering editing with CapCut, being consistent, and practicing video creation for better chances at success on TikTok. They downplay the complexity of the process and convey an encouraging message to the viewers.',thumbnail:"/thumbnails/image39.png"},{title:"How to target USA on organic",summary:"The video provides a comprehensive guide on how to target the USA audience on social media platforms like Instagram and TikTok, specifically for users from other countries. The speaker, who is from Canada, shares two methods that he has personally tested and found effective.\nThe VPN Method (Not Recommended): The speaker strongly advises against using a VPN to target the USA audience, as it can lead to shadow banning and low views. Despite some people praising this method, the speaker's experience suggests that it is not effective and can harm your account's performance.\nThe SIM Card Method (Recommended for those with a budget): This method involves ordering a US SIM card from Amazon, preferably from Verizon, which costs around $15 to $20. Before inserting the SIM card, you should factory reset your phone. Once the phone is reset and turned off, insert the US SIM card (activation is not necessary). Then, turn on your phone and create a new TikTok or Instagram account. To confirm that the method has worked, check if the US country code (+1) appears when signing up for a new account using your phone number.\nThe Free Method (For those with no budget): This method requires strict adherence to the guidelines provided. First, create a new Instagram account and follow 10 to 20 USA-based accounts only. To verify if an account is from the USA, go to their profile, press the three dots, and then click on \"About this account.\" If the account is based in the United States, follow them and interact with their content by liking and commenting. This interaction signals to the platform that you are interested in the US market. Additionally, ensure that your username is in English and avoid using your native language. Finally, post high-quality content in English to further establish your account as US-based.\nThe speaker emphasizes that these are the only methods you need and warns against falling for YouTube or TikTok videos that promote the use of proxies or other complicated techniques. The VPN method does not work, while the SIM card method and the free method have proven to be effective. If you have any further questions, the speaker encourages you to join their Discord community for assistance.",thumbnail:"/thumbnails/imageTargetUsa.png"}]},{module8:[{title:"Facebook Ads Introduction",summary:"Summary:\n\nWelcome Message and Introduction:\n- The speaker greets participants and welcomes them to the Facebook Ads module, which is a part of a broader course.\n\nModule Focus:\n- The module will focus on Facebook ads, with an emphasis on understanding the key differences between Facebook and TikTok advertising platforms.\n\nObjective:\n- The goal is to highlight the unique aspects of Facebook that differ from TikTok, which can lead to improved advertising results.\n\nAnticipation of Participation:\n- The speaker expresses enthusiasm about seeing the participants inside the module, indicating an upcoming interactive or instructional session.\n\nIn summary, the transcript is an introductory message for a course module on Facebook Ads. It emphasizes the importance of understanding the distinctions between Facebook and TikTok advertising to achieve better results. The speaker is looking forward to engaging with the course participants in the module.",thumbnail:"/thumbnails/image40.png"},{title:"Creation of Ads manager and overview",summary:"Summary:\n\nThe transcript provides a step-by-step guide on how to set up a Facebook ad account, which is crucial for running Facebook and Instagram ads. Below is a structured summary of the key points covered:\n\n1. **Accessing the Ad Account Creation Link**:\n   - A link will be provided to start creating the ad account.\n\n2. **Setting Up a Business**:\n   - If the user has no existing businesses, they will create a new one.\n   - Accurate information must be entered, including correct currency and time zone based on the user's location.\n\n3. **Creating a New Ad Account**:\n   - Under 'Accounts', select 'Add accounts'.\n   - Create a new ad account by specifying the currency and time zone.\n   - Indicate that the account is for business use.\n\n4. **Adding a Facebook Page and Managing the Ad Account**:\n   - Add a Facebook page to manage the ad account.\n   - Assign appropriate roles for account management.\n\n5. **Payment Information**:\n   - Input payment details, with a recommendation to use a credit card for reward points.\n   - PayPal is also an option.\n\n6. **Connecting Instagram Account**:\n   - Navigate to 'Instagram Accounts' and connect the previously created Instagram account.\n   - Under 'Connected Assets', add the new ad account.\n\n7. **Adding Facebook Pixel**:\n   - Go to 'Data Sources' and select 'Pixels'.\n   - Add the Facebook Pixel (created with Shopify) to the ad account.\n\n8. **Accessing Ads Manager**:\n   - To use the Ads Manager, select the ad account and open it.\n\nThe transcript emphasizes the importance of correctly entering business details, choosing the appropriate currency and time zone, and connecting the ad account with payment information, Facebook Pixel, and Instagram account to successfully create and manage ads through the Facebook Ads Manager.",thumbnail:"/thumbnails/image41.png"},{title:"Facebook Ads Manager Columns",summary:'Summary:\n\nThe transcript provides a tutorial on customizing columns in Facebook ads and a brief mention of resources for understanding the overview of Facebook ad structures.\n\nMain Topics:\n1. Customizing Columns in Facebook Ad Manager\n2. Overview of Facebook Ad Structure\n3. Additional Resources for Learning\n\nSpecific Instructions:\n1. Navigate to the "Columns" section in the Facebook Ad Manager and select "Customize Columns."\n2. Clear all existing columns.\n3. Use the search bar to add specific column metrics (not detailed in the transcript, but presumably shown on-screen).\n4. Ensure that all checkboxes within each added metric are unchecked to avoid creating excess columns.\n5. Save the customized columns as a preset with a chosen name (e.g., "Glitching").\n\nSignificant Details:\n- The presenter advises viewers to delete all pre-existing columns before adding new ones.\n- A slow scroll is provided in the video to allow viewers to copy the setup.\n- An emphasis is placed on ensuring no additional boxes are checked to maintain a simplified column view.\n- The preset feature allows for the customized column setup to be saved for future use.\n- For understanding the overview, viewers are directed to watch a TikTok ads overview video, as TikTok\'s ad system closely mirrors Facebook\'s.\n- The presenter also suggests watching their "phase one" video for a detailed guide on creating Facebook ads.\n\nOverall, the transcript encourages users to start with a clean slate in their columns setup, add only necessary metrics, and save the configuration for consistency. It also points viewers to additional resources for a deeper understanding of Facebook and TikTok ad structures and creation.',thumbnail:"/thumbnails/image42.png"},{title:"How the Facebook algorithm works",summary:"Summary:\n\n**Facebook and TikTok Algorithms and Policies:**\n- The speaker mentions that TikTok's algorithm and policies are essentially a copy of Facebook's, suggesting that viewers refer to a previous video on TikTok policy and algorithm for detailed information.\n- A key difference between Facebook and TikTok is the audience demographics, with Facebook having an older audience (60-70 years old) and TikTok having a younger user base.\n\n**Product Testing and Advertisements:**\n- When testing products on these platforms, it's important to consider the target audience. Products aimed at older demographics (like a knee massager for boomers) may perform better on Facebook than TikTok.\n- The speaker encourages testing different products and strategies despite the differences because unexpected successes can occur.\n\n**TikTok Algorithm Specifics:**\n- TikTok's goal is to keep users engaged on the platform to collect user data and sell it to advertisers.\n- The algorithm uses AI to review ads and determine the target audience. It's described as an ally that helps advertisers succeed.\n- Advertisers should test different angles and audiences with their ads to find the best-performing approach.\n\n**Example of Advertising on TikTok:**\n- A cologne ad is used as an example, with different angles targeting teenagers looking for a girlfriend, gay men, and boyfriends wanting to increase affection.\n- It's important to tailor ads to specific audience segments to increase effectiveness.\n- Advertisers are in a bidding war with others selling similar products, so creating better video ads is crucial for success.\n\n**TikTok Ad Policies:**\n- Advertisers should avoid profanity in ads to prevent raising CPMs (cost per mile).\n- Ads should not show too much skin or overt affection, as TikTok's ad platform is stricter than its organic content standards.\n- Using ripped content (content taken from others) is risky. If done, it should only be for initial testing and not prolonged use to avoid account penalties.\n- Adult products, tobacco, weed, CBD, and copyrighted merchandise (like rapper's merch) should be avoided as they are likely to get ads banned.\n\n**Conclusion:**\n- Understanding that the algorithm is designed to work with advertisers is key.\n- It's essential to create ads that appeal to different audiences and test various angles.\n- If there are further questions or feedback, the speaker invites viewers to join a Discord community for assistance.\n\nThe transcript emphasizes the importance of understanding the target audience, testing various advertising strategies, creating compelling ad content, and following platform policies to succeed in advertising on social media platforms like Facebook and TikTok.",thumbnail:"/thumbnails/image43.png"},{title:"Facebook Ads Strategy Phase 1 (Ads)",summary:"Summary of Facebook Ads Phase One Course Transcript:\n\nIntroduction:\n- The course aims to teach participants how to test Facebook ads and structure their campaigns. \n\nCampaign Setup:\n1. Creation of a campaign:\n   - Start with one Auction Objective (AO) campaign.\n   - Set up two ad sets within the campaign, each with a $20 budget.\n   - Within each ad set, test two different ads, totaling four ads across both ad sets.\n\n2. Detailed Campaign Configuration:\n   - Navigate to the Ads Manager, create a new campaign, and select 'Sales'.\n   - Choose 'Manual Sales' and proceed with campaign setup.\n   - Name the campaign (e.g., \"LUR\") and disable any unnecessary settings.\n   - Select 'Website' as the campaign type and name the ad set (e.g., \"Ad Broad\").\n   - Choose the correct Facebook Pixel for tracking.\n   - Set the conversion event to 'Purchase'.\n   - Schedule the ads to launch at midnight, two days in advance, to allow time for ad approval (especially for new accounts).\n   - Define the target locations, recommending either 'Top Five' countries (Canada, United States, United Kingdom, Australia, New Zealand) or a broader list of 'Yen Express' countries, depending on shipping capabilities.\n\n3. Ad Set Configuration:\n   - Set a budget of $20 and choose an age range (default is 18-65+).\n   - For products appealing to younger demographics (e.g., perfume targeting young men), adjust the age range accordingly (e.g., starting at age 16).\n   - Leave gender targeting broad and skip interest targeting if the age is set below 18.\n   - Keep language targeting broad to allow Facebook to optimize.\n\n4. Ad Creation:\n   - Select the appropriate Facebook and Instagram pages.\n   - Create the first ad by uploading media (e.g., a video) and crafting the ad copy using a tool like Glitching to generate Meta ads.\n   - Edit the generated ad copy for clarity and relevance.\n   - Add a headline and a description, ensuring they align with the brand message.\n   - Choose 'Shop Now' as the call-to-action and insert the product page URL (not the homepage URL).\n   - Duplicate the ad within the ad set to create a second variation.\n\n5. Expansion of the Campaign:\n   - If the budget allows, create another ad set with specific interests to target a different audience segment.\n   - For example, target people interested in McDonald's, aiming for a potential audience size of at least 10 million.\n   - Name the ad set after the interest (e.g., \"McDonald's Adset\") for easy identification.\n\nFinal Steps:\n- Review and publish the ads.\n- Monitor the campaign for results the following day.\n\nThe instructor emphasizes the importance of proper targeting, budget allocation, and ad timing for approval. Additionally, the instructor provides insight into targeting strategies that consider the potential customer's lifestyle and interests",thumbnail:"/thumbnails/image44.png"},{title:"Facebook Ads Strategy Phase 2 (Interests)",summary:"Summary of the Transcript:\n\n**Phase Two - Launching and Analyzing Facebook Ads:**\n- The speaker has launched two types of Facebook ad sets: Broad and Interest.\n- The Broad ad set is performing significantly better than the Interest ad set (McDonald).\n- The Broad ad set resulted in four purchases, while the Interest ad set only secured one purchase, indicating that the Broad set is more profitable.\n- The speaker recommends focusing on Broad ad sets as they tend to perform better due to Facebook's ability to target the right audience using the pixel.\n\n**Calculating Profitability:**\n- The speaker provides instructions on how to calculate profitability using Canadian dollars as an example.\n- They emphasize checking the cost of shipping on AliExpress and ensuring all costs are considered in USD before converting to Canadian currency.\n- After considering fees, the speaker suggests a safe margin of $28 CAD per product.\n- They demonstrate how to record margins on a notepad and analyze the profitability of each ad. The Broad ad set is identified as profitable.\n\n**Analyzing Funnel Performance:**\n- The speaker instructs viewers on analyzing the funnel by looking at costs for add to cart, checkout, and purchase events.\n- The Broad ad set shows lower costs across these metrics, indicating good performance.\n\n**Phase Two - Optimization and Scaling:**\n- If an ad set is profitable, it moves to Phase Two; if not, it must return to Phase One for optimization.\n- The goal of Phase Two is to identify winning ads and scale them.\n- The speaker advises duplicating the successful Broad ad set multiple times, depending on the budget, and testing new ads within these ad sets.\n- Ads can be either one or two per ad set, based on budget constraints.\n- The speaker provides a step-by-step guide on how to duplicate ad sets, adjust settings, and upload new ads.\n\n**Turning Off Unprofitable Ads:**\n- The speaker demonstrates how to turn off unprofitable ads, such as the McDonald ad set, using the Ads Manager interface.\n\n**Preparing for Phase Three:**\n- The importance of testing multiple ads is emphasized to find several winning ads before moving to Phase Three.\n- Phase Three involves further scaling and is dependent on having a collection of successful ads.\n\n**Additional Tips and Troubleshooting:**\n- The speaker suggests rewatching course content and viewing troubleshooting videos if ads are not performing well.\n- They highlight the importance of improving ad creatives and funnel design.\n\n**Community Engagement:**\n- The speaker invites viewers to join their Discord for questions and further discussion.\n\n**Next Steps:**\n- The speaker plans to film a TikTok video and promises to return with a demonstration of Phase Three in a future video.\n\n**Call to Action:**\n- The speaker encourages viewers to watch the next video and take care of their ad campaigns.",thumbnail:"/thumbnails/image45.png"},{title:"Facebook Ads Strategy Phase 3 (scaling)",summary:"Summary of Transcript:\n\n**Main Topics:**\n1. **Ad Campaign Testing and Progression:**\n   - The speaker has been testing ads and launching new ad sets over the past few days.\n   - They are now entering phase three, the scaling phase.\n\n2. **Campaign Analysis:**\n   - A specific campaign on August 14th was analyzed.\n   - An ineffective ad set targeting McDonald's interest was cut.\n   - A new broad interest ad set was launched to test new ads.\n\n3. **Performance Metrics and Profitability:**\n   - The ad set that was spent on the previous day achieved four purchases at $5 per purchase.\n   - The Return on Ad Spend (ROAS) was 8.\n   - Profit margins are $28 for profitability.\n   - A calculation was demonstrated to determine the break-even ROAS, considering the cost of the product ($8.12) and the selling price ($30), resulting in a margin of $21.88 and a break-even ROAS of 1.40.\n\n4. **Scaling Strategy (Phase Three):**\n   - Winning ad sets are to be divided into separate ad sets for scaling.\n   - The speaker intends to create a new campaign with a Campaign Budget Optimization (CBO) of $100, split into two ad sets (Ad 1 and Ad 2).\n\n5. **Technical Instructions for Campaign Setup:**\n   - A new campaign is created with advanced CBO activated at $100.\n   - Ad sets are configured individually to contain only one ad each.\n   - The speaker demonstrates how to duplicate ad sets and delete unwanted ads.\n   - Instructions are given on how to retain existing post engagement by using existing posts in the ad setup.\n\n6. **Final Steps and Follow-Up:**\n   - The new campaign is reviewed and published.\n   - The speaker plans to reassess the campaign's profitability in two days and will provide an update in the next video.\n\n7. **Community Engagement:**\n   - The speaker encourages viewers with questions to join their Discord community for support.\n\n**Specific Instructions:**\n1. Divide winning ad sets into separate ad sets for scaling.\n2. Create a new campaign with a CBO of $100.\n3. Duplicate ad sets and ensure each ad set contains only one ad.\n4. Use the advanced campaign budget feature for the new campaign.\n5. Retain post engagement by using existing posts via post IDs.\n6. Review and publish the new campaign.\n7. Reassess campaign profitability in two days.\n\n**Significant Details:**\n- The speaker is experienced with ad campaign management, evidenced by the use of industry terms and concepts such as ROAS and CBO.\n- The speaker provides a practical example of calculating profitability based on product cost and selling price.\n- The campaign's profitability is not just about ad performance but also includes managing costs and understanding margins.\n- The technical process of setting up and scaling ad campaigns is described in detail, indicating the speaker",thumbnail:"/thumbnails/image46.png"}]},{module9:[{title:"Email/SMS Introduction",summary:'Summary:\n\nThe speaker in the video is addressing a group referred to as "Brothers" and is about to provide a tutorial on setting up email and SMS marketing. The central focus of the video is to emphasize the importance of this setup for online businesses. The rationale behind the setup is to recover potential customers who visit a website but leave without making a purchase or taking desired action. The speaker likens the process to patching holes in a bucket, suggesting that a proper email and SMS marketing strategy can help in retaining traffic and increasing conversions. The speaker is preparing to delve into the instructional content of the course.',thumbnail:"/thumbnails/image51.png"},{title:"Abandoned Cart",summary:'Summary of Installing Klaviyo and Creating an Abandoned Cart Flow:\n\n1. Installation:\n   - Go to Shopify App Store, search for Klaviyo, and install it.\n   - First-time users need to create an account and answer sign-up questions about the business.\n\n2. Klaviyo Dashboard Overview:\n   - Contains the Home tab, Campaigns tab, and Flows tab.\n   - Work will primarily be done in the Flows and Campaigns tabs.\n\n3. Creating an Abandoned Cart Flow:\n   - Click "Create Flow" in the top right corner and choose "Create from Scratch."\n   - Set up the trigger to only include customers who added items to their cart but didn\'t complete a purchase.\n   - Click "Metric," select "Checkout Started," and then filter out customers who have already made a purchase.\n\n4. Time Delay and Email Setup:\n   - Add a 30-minute time delay to give customers time to return and complete their purchase.\n   - After the delay, set up an email to notify customers who have abandoned their carts.\n   - Configure the email content, including the name (for internal use), subject line, preview text, and sender name.\n   - Make the email visually appealing using Photoshop or Canva for templates, avoiding a cheap appearance.\n\n5. Design and Content Tips:\n   - Use a direct link to the checkout page in the email to reduce friction and encourage completion of the purchase.\n   - Provide a reminder of the abandoned product in the email.\n   - Ensure the email is branded and looks professional, adding trustworthiness.\n\n6. Testing and Optimizing:\n   - Preview and test the email, checking it doesn\'t land in spam and looks good on both desktop and mobile.\n   - Optimize for open rates and click-through rates by creating A/B tests with different subject lines.\n\n7. Email Sequence:\n   - Set up a sequence of three initial emails: the first one after the time delay, the second with a discount code the following day, and the third reminding the customer that the discount code is expiring.\n   - As the product proves successful, consider adding two more emails: one upgrading the discount and another emphasizing the urgency of the expiring discount.\n\n8. Next Steps:\n   - The next video will cover post-purchase flows.\n\nThis summary captures the key steps and considerations for setting up an abandoned cart flow using Klaviyo, emphasizing the importance of a visually appealing email, strategic timing, and A/B testing to optimize customer engagement.',thumbnail:"/thumbnails/image52.png"},{title:"Post Purchase",summary:'Summary:\n\nThe transcript outlines the creation of a post-purchase email flow designed for customers who have recently placed an order on a website. The purpose of this flow is to engage customers with a series of emails and to incentivize future purchases or actions. The key steps and details of the flow are as follows:\n\n1. **Creating the Flow**:\n   - Navigate to the "Create a flow" section and select "Create from scratch."\n   - Name the flow "Post Purchase" and set it up using the "Metric" option to trigger when a customer places an order.\n   \n2. **Timing and Content of Emails**:\n   - **First Email (1-hour delay):** A thank you message to the customer for their order, an introduction to the \'lure Club\' (or similar community aspect), and a teaser for the next email.\n   - **Second Email (1-day delay):** An offer containing a significant discount code either for the customer\'s next order or to share with a friend, aimed at encouraging repeat or referral purchases.\n   - **Third Email (30-day delay):** A request for a video review of the product they received, with an incentive such as a free low-ticket item or a discount on their order. This email is sent after ensuring the customer has had time to receive and try the product.\n\n3. **Incentives for Video Reviews**:\n   - The transcript suggests offering a free product or a significant discount in exchange for a video review, emphasizing the value of organic video content for marketing purposes like ads and retargeting.\n\n4. **Trigger Split for Personalization**:\n   - Before the 30-day email, a trigger split is recommended to determine if the customer has already purchased a specific product (e.g., a pocket sprayer).\n   - If the customer has not purchased the item mentioned, they are offered it for free in exchange for a video review.\n   - If they have already purchased the item, they receive a different incentive, such as a $10 refund or a 50% discount on their next order.\n\n5. **Testing Variations**:\n   - The speaker emphasizes the importance of testing different approaches to find the most effective variation of the offers and incentives provided in the emails.\n\n6. **Next Steps**:\n   - The transcript concludes with a mention that the next video will cover the newsletter flow.\n\nThe transcript\'s focus is on establishing a three-part email sequence with strategic timing and tailored incentives to cultivate customer loyalty, encourage repeat business, and gather valuable user-generated content for marketing.',thumbnail:"/thumbnails/image53.png"},{title:"Newsletter",summary:"Summary:\n\nThe transcript outlines the process of creating a newsletter flow to collect emails and generate revenue from an email list. Here are the main points and specific instructions detailed in the transcript, grouped logically:\n\n**Creating the Signup Form:**\n1. Add a popup signup form on the site to collect emails.\n2. Incentivize users with a discount for providing their email.\n3. Navigate to 'signup forms' and create a new form using a template.\n4. Select the 'newsletter' as the email subscriber list, which should be automatically created; if not, manually create it.\n\n**Customizing the Form:**\n1. Customize the form to match the brand, including imagery and color schemes.\n2. Upload a branded image and change the button color to the brand's yellow. Adjust the text color for visibility.\n3. Ensure the form's appearance is consistent with the site's branding.\n\n**Form Behavior and Content:**\n1. Delete the 'teaser' to avoid an unattractive tab on the form.\n2. Set the form to display based on time spent on the page or page scroll percentage.\n3. Edit text to offer a 5% discount for first orders and promote special offers and updates.\n4. Remove unnecessary elements from the form.\n\n**Success Page:**\n1. Customize the success message to thank users for signing up.\n2. Provide a clear call to action, instructing them to check their inbox for the discount code.\n3. Adjust the message size for readability and change images to match the brand theme.\n\n**Creating the Newsletter Email:**\n1. Publish the popup and consider A/B testing to optimize performance.\n2. Create a new flow for the newsletter and set the trigger to the 'newsletter' list.\n3. Send a discount code to subscribers immediately upon signup, without delay.\n4. Make the discount code prominent in the email content.\n\n**Discount Code Creation:**\n1. Create a discount code in Shopify, naming it '5 off' for a 5% discount.\n2. Save the code and use the sharable link feature to ensure it is automatically applied at checkout.\n\n**Follow-up Emails:**\n1. Set a time delay for one day, then send a follow-up email to create urgency by stating the discount code is expiring.\n2. Include customer reviews to build trust and encourage purchases.\n\n**Campaigns and Future Marketing:**\n1. The presenter will cover campaigns in the next video, emphasizing the use of collected emails for future sales events like Black Friday and Christmas.\n2. The newsletter allows for ongoing marketing to customers who showed initial interest but did not make a purchase.\n\nThe transcript provides a step-by-step guide to creating an effective newsletter flow to build an email list, incentivize signups, and convert subscribers into customers through targeted emails and strategic marketing campaigns.",thumbnail:"/thumbnails/image54.png"},{title:"Campaign",summary:"Summary of Transcript Content:\n\nMain Topic:\n- The transcript provides instructions on how to create an email campaign targeting customers interested in gaining confidence and attracting more women.\n\nSpecific Instructions:\n1. Create an Audience:\n   - Navigate to 'audience list and segments'.\n   - Create a new list by naming it 'all customers' and clicking 'create list'.\n\n2. Upload Contacts:\n   - Export your customer list to receive an email with the contacts.\n   - Drag and drop the CSV file into the designated area.\n   - Map the fields, ensuring 'first name', 'last name', and 'email' are correctly aligned.\n   - Disable 'accepts email marketing' for unnecessary fields.\n   - Verify that the 'email marketing' option is accepted where relevant to comply with regulations and avoid fines.\n\n3. Import Contacts:\n   - Click 'import' and wait for the list to upload, acknowledging that some records may not be imported.\n\n4. Create an Email Campaign:\n   - Go back to campaigns and click on 'create campaign'.\n   - Select a date for sending out the email (e.g., Friday).\n   - Choose to send to the 'all customers' list, making sure certain options are unchecked for compliance.\n   - Continue to content creation.\n\n5. Design the Email Content:\n   - Customize the email content according to the purpose (e.g., providing discounts or informative writing).\n\nSignificant Details:\n- Ensure that email marketing regulations are followed to avoid penalties.\n- The process involves exporting contacts, mapping fields correctly, and customizing email content.\n- Some records may not import, which is considered acceptable.\n- The content of the email should be tailored to the campaign's goals, such as offering discounts or advice.\n\nOrganized Overview:\nThe transcript outlines a process for creating an email campaign aimed at customers seeking to improve their confidence and dating success. The steps involve creating an audience list named 'all customers', uploading and mapping contact details from a CSV file while ensuring compliance with email marketing laws, and importing the contacts. Once the list is ready, an email campaign is set up, with a specific send-out date and content tailored to the audience's interests, such as discounts or informative articles. It is essential to adhere to regulations when sending marketing emails to prevent fines.",thumbnail:"/thumbnails/image55.png"},{title:"SMS",summary:"**Summary of Transcript on SMS Marketing Using SMS Bump**\n\n**Main Topics Covered:**\n- Introduction to SMS Marketing\n- Using SMS Bump for marketing\n- Setting up an abandoned cart flow\n\n**Specific Instructions and Significant Details:**\n1. **SMS Marketing vs. Email Marketing**:\n   - SMS marketing is highlighted as superior to email marketing in terms of response rates due to its personalized nature and notification alerts.\n\n2. **App Installation**:\n   - The app used for SMS marketing is SMS Bump, which can be found in the Shopify App Store.\n   - The speaker encounters issues with Chrome and switches to Edge to use SMS Bump.\n\n3. **Account Setup**:\n   - Upon landing on SMS Bump for the first time, the user is prompted to answer questions and sign up for an account, described as straightforward.\n\n4. **Cost Implications**:\n   - Each SMS sent costs a few cents, which is deducted from the user's balance within SMS Bump.\n\n5. **Creating an Abandoned Cart Flow**:\n   - The user is instructed to create a single flow, specifically for abandoned checkouts.\n   - Steps to create the flow:\n     a. Click 'create flow from scratch'.\n     b. Choose the 'abandon checkout' trigger.\n     c. Add a 30-minute delay after checkout abandonment.\n     d. Add an SMS message as the first action, with suggested personalized content.\n     e. Add a one-day delay followed by a second SMS message with a discount offer.\n     f. Add another one-day delay and a final SMS message reminding about the discount expiry.\n   - The flow is saved and must be active for use.\n\n6. **Flow Limitations**:\n   - There's a mention of a popup indicating that only US customers will receive the first SMS message, while others globally will receive all messages.\n\n7. **Support and Assistance**:\n   - If users have any questions, they are encouraged to seek help on Discord, where they can receive immediate support.\n\n**Essential Takeaways:**\n- SMS Bump is the recommended app for creating SMS marketing campaigns within Shopify.\n- Users must install SMS Bump and create an account to start.\n- The focus of the tutorial is setting up an abandoned cart flow, which includes personalized messaging and incentivization through discounts.\n- There are costs associated with each message sent.\n- Only US customers may be limited to receiving the initial SMS due to unspecified restrictions.\n- Support is available on Discord for any questions or issues that arise.\n\nThe transcript offers a step-by-step guide on setting up an effective SMS marketing flow aimed at recovering abandoned carts, emphasizing the importance of personalization and timely follow-ups with potential customers.",thumbnail:"/thumbnails/image56.png"}]},{module10:[{title:"Customer Support Introduction",summary:"Summary:\n\nThe transcript addresses the importance of customer service in e-commerce as the final section of a course. Key points include:\n\n- Customer service is often underrated in e-commerce but is crucial for business success.\n- Proper customer service setup is essential; failure to maintain it can lead to the collapse of the business.\n- Dissatisfied customers who do not receive orders or responses to emails may initiate chargebacks.\n- Chargebacks can result in the loss of payment processing capabilities.\n- The loss of payment processing equates to the inability to conduct business transactions.\n- The course will provide guidance on properly setting up customer service and avoiding account suspension.\n\nIn summary, the transcript emphasizes the critical role of customer service in sustaining an e-commerce business and the severe consequences of neglecting it. The forthcoming instruction aims to teach how to establish effective customer service and maintain operational accounts.",thumbnail:"/thumbnails/image57.png"},{title:"Best practices",summary:"Summary of Best Customer Service Practices:\n\n1. **30-Day Money-Back Guarantee**:\n   - Offer customers a full refund if they are dissatisfied with the product, provided they communicate this within the trial period.\n   - This policy helps to prevent chargebacks by giving customers a risk-free purchasing experience.\n\n2. **Transparency in Shipping Times**:\n   - Clearly communicate expected shipping durations to set accurate expectations for customers.\n   - Avoid customer frustration and potential chargebacks by being upfront about how long the delivery process takes.\n\n3. **Prompt Email Responses**:\n   - Ensure that customer inquiries via email are addressed within 24 hours.\n   - Timely responses prevent confusion and distrust, mitigating the perception that the customer may have been scammed.\n\n4. **Tutorial Videos for Complicated Products**:\n   - Provide customers with instructional content to assist with product setup or use.\n   - This guidance enhances user experience, reduces confusion, and builds trust in the product and company.\n\n5. **Quality of Product**:\n   - Focus on selling products that are functional, reliable, and as advertised.\n   - High-quality products lead to customer satisfaction, reducing the likelihood of chargebacks and enhancing the company's reputation.\n\n**Overall Summary**: To deliver excellent customer service, it is essential to offer a money-back guarantee, be transparent about shipping times, respond to emails quickly, provide instructional support for complex products, and prioritize the sale of high-quality goods. These practices collectively contribute to a trustworthy and positive customer experience, which is critical to the success and sustainability of a business.",thumbnail:"/thumbnails/image58.png"},{title:"How to hire a customer support agent",summary:'### Summary of Transcript Content:\n\n#### Main Topics:\n- Hiring a customer support agent for a dropshipping store.\n- Utilizing Upwork to find and hire a virtual assistant (VA).\n- Setting up a job post and filtering applicants.\n- Onboarding and integrating the VA into the business systems.\n\n#### Specific Instructions:\n1. Use Upwork to create a job post for a customer service expert.\n2. Add specific skills required for the job, such as customer service support, dropshipping knowledge, and experience with Freshdesk.\n3. Include a unique instruction in the job description (e.g., mentioning the word "blue") to filter candidates based on attention to detail.\n4. Set a budget for the hourly rate and indicate the potential for full-time work.\n5. Review applicants based on their cover letter, price, earnings, job success, and the unique instruction compliance.\n6. Once a VA is selected, set their hourly rate and weekly hour limit.\n7. Fill out address and billing information to finalize the hiring process.\n8. Set up the VA in Freshdesk and Shopify with appropriate permissions and access.\n9. Monitor the VA\'s performance and provide necessary information and training about the store.\n\n#### Significant Details:\n- Upwork is recommended for its efficiency and ease in finding quality candidates.\n- The job post should be clear and include relevant skills and software knowledge.\n- The unique instruction (word "blue") is a test to ensure candidates are detail-oriented.\n- Starting hourly rates are suggested at $4-6, with the possibility of increasing based on performance.\n- The filtering process emphasizes attention to detail, job success, and relevant experience.\n- Once a VA is trained, they can potentially train additional VAs as the business scales.\n- The integration process includes granting the VA access to Freshdesk and Shopify and setting permissions for order management.\n- The importance of monitoring the VA\'s work and providing adequate training is stressed.\n\n### Comprehensive Overview:\nThe transcript provides a step-by-step guide on hiring a customer support agent for a dropshipping store using Upwork. The speaker emphasizes the importance of a clean and efficient hiring process, starting with creating a detailed job post that includes specific skills and software knowledge. A unique instruction, such as including a specific word ("blue") in the application, is used to filter candidates for attention to detail. The speaker suggests a starting hourly rate of $4-6 and discusses the potential for increasing pay based on performance.\n\nApplicants are evaluated based on their attention to the unique instruction, job success rate, earnings, and relevant experience. After selecting a suitable VA, the onboarding process involves setting up the VA with access to Freshdesk and Shopify, with appropriate permissions for managing orders and other tasks. It\'s important to monitor the VA\'s work closely, especially in the first few weeks, and provide all the necessary information and training about the store. The speaker also notes the efficiency of having trained VAs help scale the business by training new VAs as they are',thumbnail:"/thumbnails/image59.png"},{title:"How to set up freshdesk",summary:"**Summary of Customer Service Course Transcript:**\n\n**Introduction:**\n- The speaker, Stephen, and his colleague Thomas have experience scaling multiple stores to over seven figures.\n- Stephen emphasizes the importance of customer service for the long-term success of a brand, despite it not being the \"sexy\" part of the business.\n- He warns of the consequences of poor customer service, such as chargebacks and negative online reviews, which can lead to payment processors like Shopify Payments refusing to work with the business and difficulty scaling the brand.\n\n**Setting Up Customer Support:**\n- Stephen is going to demonstrate how to set up customer support and hire the first support agent.\n\n**Using Freshdesk:**\n- Freshdesk is a ticketing system that helps organize customer interactions for support agents (VAs - Virtual Assistants).\n- Stephen provides step-by-step instructions on integrating Freshdesk with a Shopify store:\n   1. Sign up for a free trial of Freshdesk by searching for it on Google and entering relevant information.\n   2. Set up the brand name in Freshdesk.\n   3. Connect the store's email to Freshdesk by signing in with Google and verifying the support email.\n   4. Integrate Shopify with Freshdesk by installing the app from the Freshdesk dashboard, entering the store URL, and connecting it to streamline viewing customer orders, tracking numbers, and enabling refunds.\n   5. Test the integration by sending a test ticket from the store's contact form and verifying that it is received and can be replied to in Freshdesk.\n\n**Conclusion:**\n- The process of setting up Freshdesk with Shopify is made clear, highlighting its efficiency for managing customer service.\n- The next video in the series will cover how to hire the first support agent.\n\nThis summary provides a structured overview of the crucial information and instructions presented by Stephen on setting up customer support using Freshdesk for a Shopify store. It omits redundant instructions and focuses on the key steps and their purpose.",thumbnail:"/thumbnails/image60.png"}]},{module11:[{title:"How To Create Your Digital Product",summary:'Detailed Summary of the Course Video on Dropshipping Digital Products (eBooks)\n\nThe video provides a comprehensive guide on how to dropship digital products, specifically focusing on eBooks. Here\'s a detailed summary of the steps and key points covered in the course:\n\nIntroduction:\n\nThe course is introduced as a full guide to AI Digital Dropshipping.\nThe instructor sets the stage for creating a digital product, specifically an eBook.\nCreating a Digital Product:\n\nThe process begins with the creation of a new digital product.\nUsers are prompted to select the niche for their eBook. In the example provided, the niche chosen is "seduction for women," which is highlighted as a marketable topic, particularly on Instagram.\nGenerating eBook Options:\n\nThe platform generates three different options for the eBook, each with a unique title and cover.\nUsers can select their preferred option based on appeal. In the example, the instructor chooses a cover and title they find attractive.\nAI Assistance in Content Creation:\n\nThe AI tool then generates the table of contents for the eBook, creating chapters and formatting the content appropriately.\nThe process is highlighted as quick and efficient, taking about 20 seconds to complete.\nFormatting and Downloading the eBook:\n\nThe importance of downloading the PDF version of the eBook is emphasized, as this format will be used for listing the product on Shopify.\nThe PDF is shown to be well-formatted, including the cover, table of contents, and all chapters.\nListing the eBook on Shopify:\n\nAfter downloading the eBook, users are guided on how to upload and list the eBook on their Shopify store.\nDetails on setting up the product page, pricing, and other essential elements for selling the eBook are provided.\nMarketing Strategies:\n\nThe instructor discusses effective marketing strategies for digital products, with a focus on organic marketing via Instagram.\nThe potential for high sales due to the demand for the selected niche (seduction for women) is highlighted.\nAdditional Tips:\n\nPractical advice on maximizing sales and ensuring a professional presentation of the eBook is given.\nEmphasis is placed on the quality of the eBook cover and title to attract potential buyers.\nConclusion:\n\nThe video wraps up by summarizing the process and encouraging users to apply the steps outlined to create and sell their digital products successfully.\nOverall, the course video provides a step-by-step guide to creating, formatting, and selling eBooks through dropshipping, leveraging AI tools for efficiency and effectiveness. The focus on niche selection, marketing, and professional presentation is aimed at helping users achieve success in the digital products market. ​',thumbnail:"/thumbnails/image-digital-product-1.png"},{title:"How To Install Filemonk (eBook Shopify App)",summary:"Detailed Summary of the Course on Dropshipping Digital Products (E-books)\n\nIntroduction and Store Setup\n\nCreating Your Shopify Store:\n\nBegin by creating a Shopify store. This involves signing up on Shopify, which offers a $1 for the first month promotion.\nEnter your email and other necessary information to set up the store.\n\nInstalling Necessary Apps:\n\nDownload and install the required app for uploading your e-book to the Shopify store (Filemonk).\n\nProduct Creation and Upload\n\nPreparing Your E-book:\n\nEnsure your e-book is ready for upload. This includes formatting and finalizing the content.\nConvert your e-book into a suitable format (PDF, ePub, etc.) for distribution.\n\nUploading Your E-book:\n\nUse the installed app to upload your e-book to your Shopify store.\nFollow the app instructions to complete the upload process.\n\nStore Customization and Optimization\n\nCustomizing Your Store:\n\nCustomize your Shopify store to match your brand. This includes choosing a theme, adding logos, and creating a professional layout.\nMake sure your store is visually appealing and user-friendly to attract and retain customers.\n\nProduct Pages:\n\nCreate detailed product pages for your e-books. Include descriptions, cover images, and previews.\nOptimize your product pages for SEO to increase visibility on search engines.\n\nMarketing and Sales Strategies\n\nMarketing Your E-books:\n\nImplement various marketing strategies to promote your e-books. This can include social media marketing, email marketing, and content marketing.\nUtilize paid advertising options like Google Ads and Facebook Ads to reach a wider audience.\n\nSales Funnels:\n\nSet up sales funnels to guide potential customers through the buying process.\nUse lead magnets, such as free chapters or excerpts, to capture email addresses and nurture leads.\n\nOrder Fulfillment and Customer Service\n\nOrder Processing:\n\nEnsure your Shopify store is set up to handle orders efficiently. This includes setting up automated order confirmations and delivery of the e-books.\nUse Shopify’s tools to track orders and manage inventory.\n\nCustomer Support:\n\nProvide excellent customer support to handle any issues or queries related to your e-books.\nUse tools like chatbots, FAQs, and customer service emails to assist your customers.\n\nAdvanced Tips and Tricks\n\nAnalytics and Performance Tracking:\n\nUse Shopify’s analytics tools to track your store’s performance.\nMonitor key metrics such as sales, traffic, and customer behavior to make data-driven decisions.\n\nScaling Your Business:\n\nExplore ways to scale your dropshipping business by adding more digital products.\nConsider collaborations, affiliate marketing, and expanding your product line to increase revenue.\n\nConclusion\n\nThe course provides a comprehensive guide to setting up and running a successful dropshipping business for digital products, specifically e-books. It covers everything from creating a Shopify store and uploading products to marketing and customer service. By following the steps outlined in the course, you can effectively launch and grow your e-book dropshipping business.",thumbnail:"/thumbnails/image-digital-product-2.png"},{title:"How To Make Your eBook Store Look Good",summary:"Key Points and Instructions\n\nIntroduction to Shrine Theme:\n\nShrine is highlighted as the preferred theme for the store customization.\n\nThe instructor mentions having used Shrine in a previous physical drop-shipping course, where a product was scaled to $1,000 in sales per day.\n\nShrine is praised for being the best theme available, supported by a partnership offering a 25% discount.\n\nSetting Up Shopify Store:\n\nThe process begins by accessing the Shopify store, navigating to the online store section, and selecting the Shrine theme.\n\nCustomization options within the Shrine theme are explored to enhance the store's appearance and functionality.\n\nCustomization Techniques:\n\nThe instructor demonstrates various customization techniques within the Shrine theme to make the store visually appealing and user-friendly.\n\nEmphasis is placed on the theme's flexibility, allowing users to tailor it to their specific needs.\n\nBenefits of Shrine Theme:\n\nThe Shrine theme is touted for its comprehensive features and ease of use, making it suitable for both beginners and experienced users.\n\nThe partnership with Shrine offers a financial incentive (25% off), making it an attractive choice for users.\n\nPractical Application:\n\nPractical steps are provided for users to implement the recommended customizations in their own Shopify stores.\n\nThe instructor provides real-world examples and tips to help users achieve the best results.\n\nAdditional Insights\n\nThe course is structured to be accessible for users with varying levels of experience with Shopify.\n\nThe instructor provides a blend of theoretical knowledge and practical application, ensuring that users can follow along and apply the techniques to their own stores.\n\nThe partnership with Shrine adds value by offering a discount, making the premium theme more affordable.\n\nConclusion\n\nThe course effectively guides users through the process of customizing their Shopify store using the Shrine theme, with detailed instructions and practical examples. The emphasis on Shrine's features and the offered discount makes it a compelling choice for users looking to enhance their online store's appearance and functionality.",thumbnail:"/thumbnails/image-digital-product-3.png"},{title:"How To Do Organic Marketing For An eBook",summary:"Email Account Creation:\n\nThe tutorial begins with creating an email account on Microsoft. This email will be used for managing all business-related activities.\nThe instructor navigates to Microsoft's website, selects the option to create a new account, and demonstrates the step-by-step process of setting up the email.\n\nSetting Up Social Media Accounts:\n\nThe focus then shifts to creating Instagram and TikTok accounts, crucial for marketing and engaging with customers.\nThe detailed process for setting up an Instagram account is demonstrated:\nOpening Instagram and selecting 'Create New Account'.\nSigning up with the newly created email, verifying it with a code, and setting a password.\nEntering birthdate and naming the store.\nCreating a username that reflects the store’s brand.\n\nInstagram Account Details:\n\nAfter setting up the account, the instructor emphasizes the importance of using a professional email and consistent branding.\nTips include not saving login details for security reasons and choosing a store name and username that align with the brand.\n\nTransition to Phone for Further Setup:\n\nThe instructor transitions from the computer to a phone to continue the setup process, showing flexibility in managing accounts across devices.\nThis part covers verifying the email on the phone, creating a password, and completing the Instagram setup.\n\nSetting Up TikTok:\n\nA similar process is followed for creating a TikTok account:\nSigning up with the email, verifying it, and creating a password.\nEntering details such as birthdate and username.\nEmphasizing the importance of a professional and brand-aligned username.\n\nPosting on Instagram and TikTok:\n\nThe instructor explains how to start posting on these platforms to engage with potential customers.\nTips include:\nPosting three times a day.\nUsing high-quality images and captions.\nEnsuring posts are made at optimal times for maximum engagement.\n\nBest Practices and Tips:\n\nThe video is filled with practical tips and best practices:\nConsistency in posting and branding.\nUsing high-quality uploads.\nAvoiding the myth of account warming; instead, posting immediately to engage with the audience.\nSharing personal experiences and successful practices, like posting right away without warming up the account, which yielded successful results.\n\nAdditional Insights:\n\nThe instructor emphasizes the importance of engaging with the audience through comments and interactions on posts.\nHighlighting the use of analytics tools provided by Instagram and TikTok to track engagement and adjust strategies accordingly.\nEncouraging viewers to continuously learn and adapt their strategies based on what works best for their specific niche and audience.",thumbnail:"/thumbnails/image-digital-product-5.png"},{title:"Why You Should Join Our Discord",summary:"Introduction and Overview\n\nMini-Course Completion: The speaker mentions that the entire mini-course on digital drop shipping is completed.\n\nInvitation to Discord: The speaker invites viewers to join a private Discord server, emphasizing its benefits and features.\n\nDiscord Server Features\n\nCommunity Interaction: The Discord server is highly active, with daily interactions and responses from the community and the speaker.\n\nChannels and Activities:\n\nPay Chat: A general chat area for members.\n\nStore Reviews: A channel for getting feedback on digital stores.\n\nWins: A channel for sharing successes and achievements.\n\nAd Reviews: A channel for getting feedback on advertisements.\n\nIntroduction: A channel for new members to introduce themselves.\n\nSupport and Resources: Members can ask questions about various topics such as eBooks, physical products, store management, and advertisements. The speaker assures that questions are answered daily.\n\nAdditional Resources\n\nPDFs and Guides: The Discord server provides access to various PDFs and guides that can help members with their digital products and marketing strategies.\n\nPractical Demonstrations\n\nNavigating Discord: The speaker demonstrates how to navigate and use the Discord server effectively, showing different channels and their purposes.\n\nLogging In and Interaction: An example of logging in and interacting with the community is provided, highlighting the engagement and support available.\n\nEncouragement and Call to Action\n\nJoin the Community: The speaker encourages viewers to join the Discord community to take advantage of the support and resources offered.\n\nStay Active: Viewers are urged to stay active in the community, engage with others, and utilize the available resources to improve their digital products and marketing efforts.",thumbnail:"/thumbnails/image-digital-product-4.png"}]},{module12:[{title:"Google Ads Intro",summary:"The speaker introduces the Google Ads section of the course, focusing on setting up a brand search campaign. This type of campaign is crucial for scaling a product that is already working, ensuring your brand appears first in search results when users search for it after seeing ads on platforms like TikTok or Instagram. The speaker explains that without a brand search campaign, other brands' ads may appear above yours. Setting up a brand search campaign makes your brand the first result. The speaker recommends only setting up a brand search campaign once you have a winning product and are actively scaling, as setting it up during the testing phase would be a waste of resources. In the following video, the speaker will demonstrate",thumbnail:"/thumbnails/adsintro.png"},{title:"What Is Brand Search",summary:"The speaker explains the concept of a brand search campaign, which will be used in conjunction with ads run on Facebook, Instagram, and TikTok. When people see your ad on these platforms, they may not go directly to your website but will often Google your brand instead. Without a brand search campaign, competitors may appear in the search results instead of your website, leading potential customers to click on other brands. A brand search campaign ensures that your brand's ad appears at the top of the search results when someone Googles your brand name, like 'L Colog.' However, the speaker emphasizes that this campaign should only be set up if you already have significant traffic and are spending around $200 to $300 a day on ads. If you're still testing a product and not running ads at this level, it's not worth setting up the brand search campaign yet; you should return to it once your traffic and ad spend increase.",thumbnail:"/thumbnails/whatisbrand.png"},{title:"Integration and Tracking",summary:"In this video, the speaker guides you through the process of setting up Google Ads, creating an account, and connecting it to your Shopify store. The steps begin with signing in to Google Ads, setting up your account settings based on your location and currency, and adding a payment method. Afterward, you configure your Google Ads account by setting up a tag on your website. This involves copying a code provided by Google Ads and pasting it into the theme file of your Shopify store under the head tag. Once the code is added, the connection is tested, and enhanced conversions are enabled. Next, the video covers tracking conversion events by setting up Google Analytics within Shopify. This includes creating a Google Analytics property, configuring your account details, and linking it to your Shopify store. The speaker also demonstrates setting up a Google Merchant Center account, which is required even if you don't plan to use it immediately. After entering your phone number for verification and specifying your target country and language, the integration is completed. The video concludes with the confirmation that conversion tracking is turned on and the setup is complete.",thumbnail:"/thumbnails/integration.png"},{title:"Campaign Creation",summary:"In this video, the speaker walks you through setting up a bronze search campaign in Google Ads. The process begins by accessing your Google Ads manager, creating a new campaign, and selecting the campaign goal as 'Sales.' The campaign type is set to 'Search,' and the website URL is entered. The campaign is named 'Brand Search,' and the focus is set to conversions, with the 'Display Network' unchecked and only the 'Search Network' enabled.The speaker then specifies targeting countries—United States, Canada, Australia, New Zealand, and the United Kingdom—based on the locations targeted in Facebook and TikTok ads. The language is set to English, and broad match keywords are turned off. The start date for the campaign is set to the next day at midnight. The speaker proceeds to add keywords related to the brand, such as 'lur cologne,' 'lur pheromone cologne,' and related terms. These keywords are then processed through AdWords Wrapper to ensure they are correctly formatted for phrase and exact matches. Broad match is avoided to focus only on leads familiar with the brand. Next, the video covers creating ads within the campaign. The final URL is set to the product page rather than the homepage, and the display path and ad copy are tailored to include the brand name and promotional offers like '50% off today only' and 'free shipping.' Site links and callouts are added to enhance the ad's visibility, with links to sections like 'Shop Now' and 'Track Your Order.' Finally, the speaker explains the budgeting process for the campaign, noting that Google Ads will spend based on the number of clicks rather than the full budget amount. The suggested approach is to start with a modest budget, such as $100, and adjust based on performance. The campaign is then published.",thumbnail:"/thumbnails/createcampaign.png"}]}],A=N.flatMap(e=>Object.values(e).flatMap(e=>e.map(e=>e.title))),S=Math.round(y.length/74*100),T=["Welcome To Glitching","Product Selection","Store Setup","Fulfillment","Ad Creation","TikTok Ads","TikTok Organic","Facebook Ads","Email & SMS Marketing","Customer Support","Digital Dropshipping","Google Ads"],[C,D]=(0,i.useState)(null),[z,V]=(0,i.useState)(null),[el,ec]=(0,i.useState)(!1),[ed,eu]=(0,i.useState)(!1),[em,eh]=(0,i.useState)(!1),[ep,eg]=(0,i.useState)(!1);async function completeLesson(a,r,n){if(r>0){let t=N[n]["module".concat(n+1)][r-1].title;if(!y.includes(t)){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"You must complete all previous lessons first.",variant:"destructive"});return}}else if(n>0){let t=N[n-1],a=t["module".concat(n)],r=a[a.length-1].title;if(!y.includes(r)){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"You must complete all previous lessons first.",variant:"destructive"});return}}k([...y,a]);let i=new Headers;i.append("Content-Type","application/json"),i.append("Authorization","Bearer ".concat(t.accessToken)),await fetch("/api/course/completeLesson?uid=".concat(t.uid),{method:"POST",headers:i,body:JSON.stringify({lessonName:a})})}async function callPopupTriggered(){fetch("/api/tracking/popupTriggered?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t.accessToken}}),b(!0)}async function trackEvent(e,t){await fetch("/api/anytrack?event=".concat(e,"&id=").concat(t))}async function encharge(){fetch("/api/encharge?uid=".concat(t.uid,"&fromUseEffect=true"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t.accessToken},body:JSON.stringify({email:t.email,tag:{name:"made account (case study) - no trial",status:"active"}})})}async function buyCaseStudy(){e.setCaseStudyPopup(!0)}if((0,i.useEffect)(()=>{u.current&&(m?setTimeout(()=>{window.scrollBy(0,-9999999999)},10):u.current.scrollTo({top:0}))},[C,z]),(0,i.useEffect)(()=>{let handleVisibility=()=>{let{caseStudy:e,resources:t}=h.query,a=!e&&!t;ec(a&&!C),eu(a&&C),eh(!!e),eg(!!t)};handleVisibility();let e=setTimeout(()=>{handleVisibility()},100);return()=>clearTimeout(e)},[C,h.query]),"true"===h.query.caseStudy)return(encharge(),!0===e.accessGranted)?(0,s.jsxs)("div",{className:"animated-element w-full max-h-screen flex flex-col items-center justify-center gap-5 p-5 lg:pt-12 lg:overflow-auto relative",children:[(0,s.jsx)(MatrixGrid,{}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-[60rem] flex flex-col border border-accent shadow-xl shadow-slate-950 transition-all duration-1000",children:[(0,s.jsxs)(w.Ol,{children:[(0,s.jsx)(w.ll,{className:"text-xl lg:text-2xl",children:"Case Study"}),(0,s.jsx)(w.SZ,{className:"lg:text-[1rem]",children:"Learn exactly how one of our founders made $90,000 in a single day."})]}),(0,s.jsx)(w.aY,{children:(0,s.jsx)("div",{className:"w-full h-[14rem] lg:h-[32.1rem] -my-1 bg-background rounded-[.1rem] relative overflow-hidden",children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/911931021",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})})})]})]},h.query):(0,s.jsxs)("div",{className:"animated-element w-full max-h-screen flex flex-col items-center justify-center gap-5 p-5 lg:pt-12 lg:overflow-auto relative ",children:[(0,s.jsx)(MatrixGrid,{}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-[60rem] flex flex-col border border-accent shadow-xl shadow-slate-950 transition-all duration-1000 ".concat(em?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),children:[(0,s.jsxs)(w.Ol,{children:[(0,s.jsx)(w.ll,{className:"text-xl lg:text-2xl",children:"Glitching Case Study"}),(0,s.jsx)(w.SZ,{className:"lg:text-[1rem]",children:"Learn exactly how one of our founders made $90,000 in a single day."})]}),(0,s.jsx)(w.aY,{children:(0,s.jsxs)("div",{className:"w-full h-[14rem] lg:h-[32.1rem] -my-1 bg-background rounded-[.1rem] relative overflow-hidden",children:[(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/905785283?badge=0&autopause=0&player_id=0&app_id=58479 ",height:"100%",width:"100%",allow:"autoplay; fullscreen; picture-in-picture",className:"hidden lg:block z-20 rounded-[.1rem] overflow-hidden "}),(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/905785283?badge=0&autopause=0&player_id=0&app_id=58479 ",allow:"autoplay; fullscreen; picture-in-picture",className:"lg:hidden w-full z-20 scale-[125%] my-6 overflow-hidden"})]}),(0,s.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-black opacity-50"}),(0,s.jsx)("div",{className:"absolute top-0 left-0 w-full h-full flex items-center justify-center",children:(0,s.jsx)(f.khe,{className:"text-white w-24 h-24 transition-transform transform 300 hover:scale-110"})})]})}),(0,s.jsxs)(w.eW,{children:[(0,s.jsx)("div",{className:"hidden p-1 lg:block lg:text-2xl text-xl items-center justify-center w-[90%] mx-auto text-white rounded-[.1rem]   flex flex-row",children:(0,s.jsxs)("button",{onClick:async()=>{buyCaseStudy()},className:" bg-primary transition-all ease-in duration-100 hover:bg-primary/95 text-2xl font-chakra-bold items-center justify-center w-full text-white p-4 rounded-[.1rem]  flex flex-row",children:["I want to learn how to make $90,000 in a day ",(0,s.jsx)(er.Z,{className:"ml-2"})]})}),(0,s.jsx)("div",{className:"lg:hidden text-xl items-center justify-center w-full text-white rounded-[.1rem]   flex flex-row p-1 mt-5 ",children:(0,s.jsxs)("button",{onClick:async()=>{buyCaseStudy()},className:"bg-primary transition-all ease-in duration-100 hover:bg-primary/95 text-xl items-center justify-center w-full text-white py-2 px-3 rounded-[.1rem]  flex flex-row font-chakra-bold",children:["Unlock the Case Study ",(0,s.jsx)(er.Z,{className:"ml-2"})]})})]})]})]},h.query);if("true"===h.query.resources)return(0,s.jsxs)("div",{className:"animated-element w-full lg:max-h-screen flex flex-col items-center lg:justify-center justify-start gap-5 p-5  relative overflow-x-hidden",children:[(0,s.jsx)(MatrixGrid,{}),(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col lg:w-[68rem] w-full gap-5 transition-all duration-1000 ".concat(ep?"opacity-100 lg:translate-x-0 translate-y-0":"opacity-0 translate-y-20 lg:-translate-x-20 lg:translate-y-0"),children:[(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/4 rounded-[.1rem] lg:h-[15rem] bg-background border border-accent shadow-xl shadow-slate-950 flex flex-col items-center",children:[(0,s.jsxs)(w.Ol,{className:"flex flex-col items-center",children:[(0,s.jsx)(w.ll,{children:(0,s.jsx)(c(),{src:q,alt:"import product to shopify",width:150,className:"mb-2",target:"_blank",rel:"noopener noreferrer"})}),(0,s.jsx)(w.SZ,{children:(0,s.jsx)("div",{className:"font-chakra-regular  text-center text-muted-foreground lg:text-lg",children:"Shopify - $1 for a month"})})]}),(0,s.jsx)(w.eW,{className:"mt-auto lg:w-full",children:(0,s.jsx)(x.z,{className:"group w-full",children:(0,s.jsxs)(H(),{href:"http://shopify.pxf.io/PyNVMq",target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:["Go to Shopify ",(0,s.jsx)(j.Z,{className:"w-4 h-4 ml-1 transition-all ease-in duration-100 group-hover:translate-x-0.5"})]})})})]}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/4 rounded-[.1rem] lg:h-[15rem] bg-background border border-accent shadow-xl shadow-slate-950 flex flex-col items-center",children:[(0,s.jsxs)(w.Ol,{className:"flex flex-col items-center",children:[(0,s.jsx)(w.ll,{children:(0,s.jsx)(c(),{src:Y,alt:"how to make a nice shopify store",width:70})}),(0,s.jsx)(w.SZ,{children:(0,s.jsx)("div",{className:"font-chakra-regular  text-center text-muted-foreground lg:text-lg",children:"Shrine - 25% Off "})})]}),(0,s.jsx)(w.eW,{className:"mt-auto lg:w-full",children:(0,s.jsx)(x.z,{className:"group w-full",children:(0,s.jsxs)(H(),{href:"https://shrinetheme.com/discount/GLITCH?ref=glitching",target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:["Go to Shrine ",(0,s.jsx)(j.Z,{className:"w-4 h-4 ml-1 transition-all ease-in duration-100 group-hover:translate-x-0.5"})]})})})]}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/4 rounded-[.1rem] lg:h-[15rem] bg-background border border-accent shadow-xl shadow-slate-950 flex flex-col items-center",children:[(0,s.jsxs)(w.Ol,{className:"flex flex-col items-center",children:[(0,s.jsx)(w.ll,{children:(0,s.jsx)(c(),{src:W.Z,alt:"automated fulfillments",width:150,className:"mb-2",target:"_blank",rel:"noopener noreferrer"})}),(0,s.jsx)(w.SZ,{children:(0,s.jsx)("div",{className:"font-chakra-regular  text-center text-muted-foreground lg:text-lg",children:"AutoDS - Free for 30 Days"})})]}),(0,s.jsx)(w.eW,{className:"mt-auto lg:w-full",children:(0,s.jsx)(x.z,{className:"group w-full",children:(0,s.jsxs)(H(),{href:"https://platform.autods.com/register?ref=MTEwNDk4OQ==",target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:["Go to AutoDS ",(0,s.jsx)(j.Z,{className:"w-4 h-4 ml-1 transition-all ease-in duration-100 group-hover:translate-x-0.5"})]})})})]}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/4 rounded-[.1rem] lg:h-[15rem] bg-background border border-accent shadow-xl shadow-slate-950 flex flex-col items-center",children:[(0,s.jsxs)(w.Ol,{className:"flex flex-col items-center",children:[(0,s.jsx)(w.ll,{children:(0,s.jsx)(c(),{src:et,alt:"how to make organic tiktok ads",width:150,className:"mb-2",target:"_blank",rel:"noopener noreferrer"})}),(0,s.jsx)(w.SZ,{children:(0,s.jsx)("div",{className:"font-chakra-regular  text-center text-muted-foreground lg:text-lg",children:"Ads - Get 35% Cashback on Ad Spend"})})]}),(0,s.jsx)(w.eW,{className:"mt-auto lg:w-full",children:(0,s.jsx)(x.z,{className:"group w-full",children:(0,s.jsxs)(H(),{href:"https://getstartedtiktok.pxf.io/c/5175916/2108631/16372",target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:["Go to TikTok Ads ",(0,s.jsx)(j.Z,{className:"w-4 h-4 ml-1 transition-all ease-in duration-100 group-hover:translate-x-0.5"})]})})})]})]}),(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col lg:w-[68rem] w-full gap-5 transition-all duration-1000 ".concat(ep?"opacity-100 lg:translate-x-0 translate-y-0":"opacity-0 translate-y-20 lg:translate-x-20 lg:translate-y-0"),children:[(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/4 rounded-[.1rem] lg:h-[15rem] bg-background border border-accent shadow-xl shadow-slate-950 flex flex-col items-center",children:[(0,s.jsxs)(w.Ol,{className:"flex flex-col items-center",children:[(0,s.jsx)(w.ll,{children:(0,s.jsx)(c(),{src:Q,alt:"product reviews from loox",width:150,className:"mb-2"})}),(0,s.jsx)(w.SZ,{children:(0,s.jsx)("div",{className:"font-chakra-regular text-center text-muted-foreground lg:text-lg",children:"Loox - Free for 7 Days"})})]}),(0,s.jsx)(w.eW,{className:"mt-auto lg:w-full",children:(0,s.jsx)(x.z,{className:"group w-full",children:(0,s.jsxs)(H(),{href:"https://loox.io/app/glitching",target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:["Go to Loox ",(0,s.jsx)(j.Z,{className:"w-4 h-4 ml-1 transition-all ease-in duration-100 group-hover:translate-x-0.5"})]})})})]}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/4 rounded-[.1rem] lg:h-[15rem] bg-background border border-accent shadow-xl shadow-slate-950 flex flex-col items-center",children:[(0,s.jsxs)(w.Ol,{className:"flex flex-col items-center",children:[(0,s.jsx)(w.ll,{children:(0,s.jsx)(c(),{src:J,alt:"upcart logo",width:150,className:"mb-2"})}),(0,s.jsx)(w.SZ,{children:(0,s.jsx)("div",{className:"font-chakra-regular text-center text-muted-foreground lg:text-lg",children:"UpCart - Free for 14 Days"})})]}),(0,s.jsx)(w.eW,{className:"mt-auto lg:w-full",children:(0,s.jsx)(x.z,{className:"group w-full",children:(0,s.jsxs)(H(),{href:"http://slide.upcart.app/signup?via=glitchingai",target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:["Go to UpCart ",(0,s.jsx)(j.Z,{className:"w-4 h-4 ml-1 transition-all ease-in duration-100 group-hover:translate-x-0.5"})]})})})]}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/4 rounded-[.1rem] lg:h-[15rem] bg-background border border-accent shadow-xl shadow-slate-950 flex flex-col items-center",children:[(0,s.jsxs)(w.Ol,{className:"flex flex-col items-center",children:[(0,s.jsx)(w.ll,{children:(0,s.jsx)(c(),{src:K,alt:"upwork logo",width:150,className:"mb-2"})}),(0,s.jsx)(w.SZ,{children:(0,s.jsx)("div",{className:"font-chakra-regular text-center text-muted-foreground lg:text-lg",children:"Upwork - Find Freelancers"})})]}),(0,s.jsx)(w.eW,{className:"mt-auto lg:w-full",children:(0,s.jsx)(x.z,{className:"group w-full",children:(0,s.jsxs)(H(),{href:"https://www.upwork.com/ab/account-security/login?redir=%2Fhire%2F%3Fref%3Dglitching",target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:["Go to Upwork ",(0,s.jsx)(j.Z,{className:"w-4 h-4 ml-1 transition-all ease-in duration-100 group-hover:translate-x-0.5"})]})})})]}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/4 rounded-[.1rem] lg:h-[15rem] bg-background border border-accent shadow-xl shadow-slate-950 flex flex-col items-center",children:[(0,s.jsxs)(w.Ol,{className:"flex flex-col items-center",children:[(0,s.jsx)(w.ll,{children:(0,s.jsx)(c(),{src:X,alt:"aftersell logo",width:150,className:"mb-2"})}),(0,s.jsx)(w.SZ,{children:(0,s.jsx)("div",{className:"font-chakra-regular text-center text-muted-foreground lg:text-lg",children:"AfterSell - Post-Purchase Upsells"})})]}),(0,s.jsx)(w.eW,{className:"mt-auto lg:w-full",children:(0,s.jsx)(x.z,{className:"group w-full",children:(0,s.jsxs)(H(),{href:"https://apps.shopify.com/aftersell?ref=glitching",target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:["Go to AfterSell ",(0,s.jsx)(j.Z,{className:"w-4 h-4 ml-1 transition-all ease-in duration-100 group-hover:translate-x-0.5"})]})})})]})]})]},h.query);if(C){var ef;return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{ref:u,className:"animated-element text-white font-bold min-h-screen max-h-screen w-full relative flex flex-col items-center py-5 px-5 lg:py-12 lg:p-8 lg:overflow-x-hidden lg:overflow-auto relative",children:[(0,s.jsx)(MatrixGrid,{}),(0,s.jsx)("h1",{className:"w-full lg:min-w-[68rem] lg:max-w-[68rem] text-xl lg:text-3xl flex items-center justify-between transition-transform duration-1000 ".concat(ed?"opacity-100 translate-y-0":"opacity-0 translate-y-5"),children:(0,s.jsxs)(x.z,{onClick:()=>{D(null),V(null)},variant:"outline",className:"group",children:[(0,s.jsx)(en.Z,{className:"w-4 h-4 group-hover:-translate-x-1 transition-all duration-100 ease-in mr-1"})," Back"]})}),(0,s.jsx)("div",{className:"w-full lg:min-w-[68rem] lg:max-w-[68rem] hidden lg:block my-5 transition-transform duration-1000 ".concat(ed?"opacity-100 translate-y-0":"opacity-0 translate-y-10"),children:5===C||6===C||7===C?(0,s.jsxs)("div",{className:"p-6 w-full bg-primary-foreground border border-accent text-muted-foreground rounded-[.1rem] flex flex-col lg:flex-row items-center lg:justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-5 ",children:[(0,s.jsx)(c(),{src:et,alt:"tiktok affiliate offer",className:"lg:w-[150px]"}),(0,s.jsx)("div",{className:"hidden lg:block text-lg text-muted-foreground/50 scale-x-[250%]",children:" - "}),(0,s.jsx)("h1",{className:"text-xl text-foreground font-chakra-regular",children:" Get 35% Cashback on Ad Spend "})]}),(0,s.jsxs)(x.z,{onClick:()=>{window.open("https://getstartedtiktok.pxf.io/c/5175916/2108631/16372","_blank")},children:["Create My Account ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})]}):3===C&&(6===z||7===z||8===z)?(0,s.jsxs)("div",{className:"p-6 w-full bg-primary-foreground border border-accent text-muted-foreground rounded-[.1rem] flex flex-col lg:flex-row items-center lg:justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-5 ",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-2 ",children:[(0,s.jsx)(c(),{src:Y,alt:"Shrine logo",className:"lg:w-[50px]"}),(0,s.jsx)("h1",{className:"text-xl text-foreground font-chakra-regular",children:"Shrine"})]}),(0,s.jsx)("div",{className:"hidden lg:block text-lg text-muted-foreground/50 scale-x-[250%]",children:" - "}),(0,s.jsx)("h1",{className:"text-xl text-foreground font-chakra-regular",children:" 25% Off Discount (Automatically Applied) "})]}),(0,s.jsxs)(x.z,{onClick:()=>{window.open("https://shrinetheme.com/discount/GLITCH?ref=glitching","_blank")},children:["Claim Offer ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})]}):3===C&&9===z?(0,s.jsxs)("div",{className:"p-6 w-full bg-primary-foreground border border-accent text-muted-foreground rounded-[.1rem] flex flex-col lg:flex-row items-center lg:justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-5 ",children:[(0,s.jsx)(c(),{src:Q,alt:"loox logo",className:"lg:w-[150px]"}),(0,s.jsx)("div",{className:"hidden lg:block text-lg text-muted-foreground/50 scale-x-[250%]",children:" - "}),(0,s.jsx)("h1",{className:"text-xl text-foreground font-chakra-regular",children:" Free for 7 Days "})]}),(0,s.jsxs)(x.z,{onClick:()=>{window.open("https://loox.io/app/glitching","_blank")},children:["Claim Offer ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})]}):11===C?(0,s.jsxs)("div",{className:"p-6 w-full bg-primary-foreground border border-accent text-muted-foreground rounded-[.1rem] flex flex-col lg:flex-row items-center lg:justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-5 ",children:[(0,s.jsxs)("span",{className:"flex items-center gap-2 text-2xl",children:[(0,s.jsx)("img",{src:"https://cdn.shopify.com/app-store/listing_images/458e34ee37c29fba9bd7253c99407afe/icon/CKvv0OCYq4ADEAE=.png",className:"shadow-lg rounded-[.1rem] w-[3rem] border-[2px] border-slate-200"}),"Filemonk"]}),(0,s.jsx)("div",{className:"hidden lg:block text-lg text-muted-foreground/50 scale-x-[250%]",children:" - "}),(0,s.jsx)("h1",{className:"text-xl text-foreground font-chakra-regular",children:" Get 20% Off The eBook Shopify App "})]}),(0,s.jsxs)(x.z,{onClick:()=>{window.open("https://apps.shopify.com/filemonk?mref=bkgzafpb","_blank")},children:["Claim Offer ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})]}):4===C?(0,s.jsxs)("div",{className:"p-6 w-full bg-primary-foreground border border-accent text-muted-foreground rounded-[.1rem] flex flex-col lg:flex-row items-center lg:justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-5 ",children:[(0,s.jsx)(c(),{src:W.Z,alt:"autods logo affiliate promo",className:"lg:w-[150px]"}),(0,s.jsx)("div",{className:"hidden lg:block text-lg text-muted-foreground/50 scale-x-[250%]",children:" - "}),(0,s.jsx)("h1",{className:"text-xl text-foreground font-chakra-regular",children:" Automatic Fulfillment"})]}),(0,s.jsxs)(x.z,{onClick:()=>{window.open("https://www.autods.com/integrate/?response_type=code&ref=MTEwNDk4OQ==&client_id=gn67mhm71v24p8kpkpu7janqb&redirect_uri=https://www.glitching.ai/dashboard?location=integrations","_blank")},children:["Fulfill My Orders ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})]}):(0,s.jsxs)("div",{className:"p-6 w-full bg-primary-foreground border border-accent text-muted-foreground rounded-[.1rem] flex flex-col lg:flex-row items-center lg:justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-5 ",children:[(0,s.jsx)(c(),{src:$.Z,alt:"shopify logo affiliate promo",className:"lg:w-[150px] -translate-y-0.5"}),(0,s.jsx)("div",{className:"hidden lg:block text-lg text-muted-foreground/50 scale-x-[250%]",children:" - "}),(0,s.jsx)("h1",{className:"text-xl text-foreground font-chakra-regular",children:" $1 for the first month"})]}),(0,s.jsxs)(x.z,{className:"bg-[#64943e] hover:bg-[#64943e]/90",onClick:()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank")},children:["Create My Store ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})]})}),(0,s.jsx)("div",{className:"w-full lg:min-w-[68rem] lg:max-w-[68rem] lg:hidden my-5 transition-transform duration-1000 ".concat(ed?"opacity-100 translate-y-0":"opacity-0 translate-y-10"),children:5===C||6===C||7===C?(0,s.jsxs)("div",{onClick:()=>{window.open("https://getstartedtiktok.pxf.io/c/5175916/2108631/16372","_blank")},className:"px-5 p-3 w-full border border-accent bg-primary-foreground rounded-[.1rem] flex flex-row items-center justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-5 ",children:[(0,s.jsx)(c(),{src:et,alt:"tiktok logo affiliate promo",className:"w-[115px] "}),(0,s.jsx)("div",{className:"hidden lg:block text-2xl scale-x-[250%] font-chakra-semibold",children:" - "})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2 ",children:(0,s.jsxs)(x.z,{onClick:()=>{window.open("https://getstartedtiktok.pxf.io/c/5175916/2108631/16372","_blank")},size:"sm",children:["Create Account ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})})]}):3===C&&(6===z||7===z||8===z)?(0,s.jsxs)("div",{onClick:()=>{window.open("https://shrinetheme.com/discount/GLITCH?ref=glitching","_blank")},className:"px-5 p-3 w-full border border-accent bg-primary-foreground rounded-[.1rem] flex flex-row items-center justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2 ",children:[(0,s.jsx)(c(),{src:Y,alt:"shrine logo affiliate promo",className:"w-[50px] "}),(0,s.jsx)("h1",{className:"text-lg",children:"Shrine"}),(0,s.jsx)("div",{className:"hidden lg:block text-2xl scale-x-[250%] font-chakra-semibold",children:" - "})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2 ",children:(0,s.jsxs)(x.z,{onClick:()=>{window.open("https://shrinetheme.com/discount/GLITCH?ref=glitching","_blank")},size:"sm",children:["Claim Offer ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})})]}):3===C&&9===z?(0,s.jsxs)("div",{onClick:()=>{window.open("https://loox.io/app/glitching","_blank")},className:"px-5 p-3 w-full border border-accent bg-primary-foreground rounded-[.1rem] flex flex-row items-center justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2 ",children:[(0,s.jsx)(c(),{src:Q,alt:"loox logo affiliate promo",className:"w-[100px] "}),(0,s.jsx)("div",{className:"hidden lg:block text-2xl scale-x-[250%] font-chakra-semibold",children:" - "})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2 ",children:(0,s.jsxs)(x.z,{onClick:()=>{window.open("https://loox.io/app/glitching","_blank")},size:"sm",children:["Claim Offer ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})})]}):11===C?(0,s.jsxs)("div",{onClick:()=>{window.open("https://apps.shopify.com/filemonk?mref=bkgzafpb","_blank")},className:"px-5 p-3 w-full border border-accent bg-primary-foreground rounded-[.1rem] flex flex-row items-center justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-5 ",children:[(0,s.jsxs)("span",{className:"flex items-center gap-2 text-xl",children:[(0,s.jsx)("img",{src:"https://cdn.shopify.com/app-store/listing_images/458e34ee37c29fba9bd7253c99407afe/icon/CKvv0OCYq4ADEAE=.png",className:"shadow-lg rounded-[.1rem] w-[2rem] border-[2px] border-slate-200"}),"Filemonk"]}),(0,s.jsx)("div",{className:"hidden lg:block text-2xl scale-x-[250%] font-chakra-semibold",children:" - "})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2 ",children:(0,s.jsxs)(x.z,{onClick:()=>{window.open("https://apps.shopify.com/filemonk?mref=bkgzafpb","_blank")},size:"sm",children:["Claim Offer ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})})]}):4===C?(0,s.jsxs)("div",{onClick:()=>{window.open("https://www.autods.com/integrate/?response_type=code&ref=MTEwNDk4OQ==&client_id=gn67mhm71v24p8kpkpu7janqb&redirect_uri=https://www.glitching.ai/dashboard?location=integrations","_blank")},className:"px-5 p-3 w-full border border-accent bg-primary-foreground rounded-[.1rem] flex flex-row items-center justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-5 ",children:[(0,s.jsx)(c(),{src:W.Z,alt:"autods logo affiliate promo",className:"w-[115px] "}),(0,s.jsx)("div",{className:"hidden lg:block text-2xl scale-x-[250%] font-chakra-semibold",children:" - "})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2 ",children:(0,s.jsxs)(x.z,{onClick:()=>{window.open("https://www.autods.com/integrate/?response_type=code&ref=MTEwNDk4OQ==&client_id=gn67mhm71v24p8kpkpu7janqb&redirect_uri=https://www.glitching.ai/dashboard?location=integrations","_blank")},size:"sm",children:["Fulfill Orders ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})})]}):(0,s.jsxs)("div",{onClick:()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank")},className:"px-5 p-3 w-full border border-accent bg-primary-foreground rounded-[.1rem] flex flex-row items-center justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-5 ",children:[(0,s.jsx)(c(),{src:$.Z,alt:"shopify logo affiliate promo",className:"w-[115px] "}),(0,s.jsx)("div",{className:"hidden lg:block text-2xl scale-x-[250%] font-chakra-semibold",children:" - "})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2 ",children:(0,s.jsxs)(x.z,{className:"bg-[#64943e] hover:bg-[#64943e]/90",onClick:()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank")},size:"sm",children:["Create Store ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})})]})}),(0,s.jsx)("div",{className:"w-full lg:min-w-[68rem] lg:max-w-[68rem] lg:min-h-[38.25rem] flex gap-5 transition-transform duration-1000 ".concat(ed?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),children:(0,s.jsxs)("div",{className:"w-full h-[13rem] lg:h-full bg-slate-900 border border-accent shadow-lg shadow-slate-950 rounded-[.1rem] relative",children:[(0,s.jsxs)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 right-0 w-full bg-background/50 backdrop-blur-sm rounded-b-[.1rem] text-white text-left lg:text-xl text-[.75rem] flex flex-row gap-2 font-bold lg:p-3 p-1 px-2 rounded-t-[.1rem] items-center ",children:[(0,s.jsx)(f.o1U,{className:"lg:w-5 lg:h-5 w-4 h-4"}),(0,s.jsx)("p",{className:"font-chakra-semibold text-center",children:(null===(ef=N[C-1]["module".concat(C)][z-1])||void 0===ef?void 0:ef.title)||"Select a lesson"})]}),1===C&&1===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/867526593?badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),1===C&&2===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/930033656?h=20e24e9265&badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),1===C&&3===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/920231231?badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),2===C&&1===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/867526541?badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),2===C&&2===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/930105227?h=b0efa740e9&badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),2===C&&3===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/921402661?badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),2===C&&4===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/930057616?h=995c1b7d28&badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),2===C&&5===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/930017451?h=9c181349ba&badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&1===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884232306?h=d87a22fb0d",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&2===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884624220?h=3c88e1fb79",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&3===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884881957?h=8c9144ef9b",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&4===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884926966?h=d63e1e5653",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&5===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884884941?h=a1244ee3db",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&6===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/970921755?h=baaf265b99",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&7===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/954137081?h=9985356034",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&8===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/967292364?h=04073d3c51",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&9===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/954118749?h=e990f022f3&",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&10===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884625277?h=bc7b43fac4",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&11===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884625608?h=d4d1df127a",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&12===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884626052?h=51ec5434ec",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&13===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884889025?h=d6c51ed6ad",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&14===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884626276?h=d326cde747",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&15===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/991056781",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),3===C&&16===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/885320165?h=f35520e2d4",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),4===C&&1===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884220673?h=28d774da73",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),4===C&&2===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/979457570?h=c36151ec16",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),4===C&&3===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/979456449?h=b2c0ea9d4e",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),4===C&&4===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/985177558?h=98be06c000",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),5===C&&1===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884218892?h=4ef40af9a7",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),5===C&&2===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/885346303?h=371e897613",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),5===C&&3===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/885318744?h=580ac8c320",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),5===C&&4===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884207280?h=faea7b8d97",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),5===C&&5===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884214370?h=db4ae8dacb",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),5===C&&6===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884204818?h=1fd65ed311",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),5===C&&7===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/885852014?h=693705273f",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),5===C&&8===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884154167?h=3fd97d81b1",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),6===C&&1===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884246944?h=ef0156f7ad",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),6===C&&2===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/895578011?h=77b737c874",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),6===C&&3===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884900676?h=4f01015707",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),6===C&&4===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884930556?h=3c623fe70b",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),6===C&&5===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884158847?h=e9561ba6c2",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),6===C&&6===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884912027?h=dedb92a230",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),6===C&&7===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884903663?h=f12b663d38",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),6===C&&8===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884904102?h=29cf7ea186",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),6===C&&9===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/895449165?h=cf7253a4e9",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),6===C&&10===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/885322563?h=21bf41b8a2",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),7===C&&1===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884252427?h=6208aa617c",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),7===C&&2===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/885328594?h=8a4cf53cb4",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),7===C&&3===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/885332056?h=87bd66da1f",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),7===C&&4===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884252968?h=cc971ae8a8",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),7===C&&5===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/930493324?badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),8===C&&1===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884869592?h=1e3aced883",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),8===C&&2===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884916704?h=1d5f370e62",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),8===C&&3===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884881324?h=9b4d6fbd8a",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),8===C&&4===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/885308231?h=5c9e90fb69",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),8===C&&5===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884862643?h=f5f4e06109",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),8===C&&6===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884875867?h=52bfedb46b",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),8===C&&7===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/884878485?h=ff2e404fd1",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),9===C&&1===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/895629381?h=ca63105598",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),9===C&&2===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/895632061?h=587f8876d8",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),9===C&&3===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/895590063?h=9ed734dc49",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),9===C&&4===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/895554530?h=a7f4ec211a",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),9===C&&5===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/895554116?h=f5fa420d3f",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),9===C&&6===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/895553892?h=02bb558277",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),10===C&&1===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/895633640?h=581371ca28",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),10===C&&2===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/895640578?h=58a2ecab00",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),10===C&&3===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/895555165?h=e7a673e312",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),10===C&&4===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/895555378?h=4bbd73e381",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),11===C&&1===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/971835337?h=fc5347cb07&badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),11===C&&2===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/971855895?h=2476e9afa5&badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),11===C&&3===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/971856183?h=8d55d07e55&badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),11===C&&4===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/971855262?h=efccd5484d&badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),11===C&&5===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/971856632?h=950986a6b0&badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture",className:"w-full h-full rounded-[.1rem]"})}),12===C&&1===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/996381409?title=0&byline=0&portrait=0&badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture; clipboard-write",className:"w-full h-full rounded-[.1rem]"})}),12===C&&2===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/996377860?title=0&byline=0&portrait=0&badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture; clipboard-write",className:"w-full h-full rounded-[.1rem]"})}),12===C&&3===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/996377813?title=0&byline=0&portrait=0&badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture; clipboard-write",className:"w-full h-full rounded-[.1rem]"})}),12===C&&4===z&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/996377874?title=0&byline=0&portrait=0&badge=0&autopause=0&player_id=0&app_id=58479",allow:"autoplay; fullscreen; picture-in-picture; clipboard-write",className:"w-full h-full rounded-[.1rem]"})})]})}),(0,s.jsxs)("div",{className:"w-full lg:min-w-[68rem] lg:max-w-[68rem] bg-background border border-b-[0px] border-accent p-5 text-white max-h-[4.1rem] lg:text-xl flex items-center justify-between shadow-lg rounded-t-[.1rem] mt-5 relative transition-transform duration-1000 ".concat(ed?"opacity-100 translate-y-0":"opacity-0 translate-y-[100px]"),children:[(0,s.jsxs)("span",{className:"lg:text-xl hidden lg:block font-chakra-semibold",children:["Module ",C,": ",T[C-1]]}),(0,s.jsx)("span",{className:"lg:text-xl lg:hidden font-chakra-semibold",children:T[C-1]}),(0,s.jsx)("div",{className:"relative",children:(0,s.jsxs)(eo.h_,{children:[(0,s.jsx)(eo.$F,{asChild:!0,children:(0,s.jsxs)(x.z,{variant:"outline",children:["Modules ",(0,s.jsx)(v.Z,{className:"ml-1.5 w-4 h-4"})]})}),(0,s.jsx)(eo.AW,{className:"dark w-[16.5rem] bg-background border border-accent z-[100] rounded-[.1rem] shadow-lg shadow-slate-950 lg:-translate-x-10 -translate-x-5",children:(0,s.jsx)("div",{className:"flex flex-col gap-1 text-[.85rem] lg:text-[1rem]",children:T.map((t,r)=>(0,s.jsxs)(eo.Xi,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){e.setTrialPopup(!0),g||(trackEvent("popup_triggered_course",AnyTrack("atclid")),callPopupTriggered());return}D(r+1),V(1)},className:"".concat(C===r+1?"bg-blue-700 rounded-[.1rem] shadow-lg shadow-blue-950":"hover:text-slate-400"," cursor-pointer flex items-center gap-1"),children:[C===r+1&&(0,s.jsx)(f.yr4,{}),t]},r))})})]})})]}),(0,s.jsx)("div",{className:"w-full lg:min-w-[68rem] lg:max-w-[68rem] min-h-[35rem] flex flex-col bg-background border border-accent shadow-lg shadow-slate-950 rounded-[.1rem] rounded-t-[0rem] relative transition-all duration-1000 ".concat(ed?"opacity-100 translate-y-0":"opacity-0 translate-y-[100px]"),children:(0,s.jsx)("div",{className:"flex flex-col lg:flex-row lg:flex-wrap gap-5 p-5 pb-8 h-full w-full overflow-auto",children:N[C-1]["module".concat(C)].map((t,r)=>(0,s.jsxs)("div",{className:"flex flex-col gap-3 max-h-[13.5rem] w-full lg:max-h-1/2 lg:w-[32%] relative",children:[(0,s.jsxs)("div",{onClick:()=>{completeLesson(t.title,r,C-1)},className:"z-10 absolute top-3 right-3 transition-all ease-in duration-100 ".concat(y.includes(t.title)?"bg-primary border-primary":"bg-background border-accent"," rounded-[.1rem] font-chakra-medium hover:bg-primary-foreground border p-1 px-2 text-sm flex items-center gap-1  cursor-pointer"),children:[y.includes(t.title)?(0,s.jsxs)(s.Fragment,{children:["Completed ",(0,s.jsx)(P.Z,{className:"text-white w-4 h-4"})]}):(0,s.jsxs)(s.Fragment,{children:["Complete Lesson ",(0,s.jsx)(P.Z,{className:"text-emerald-500 w-4 h-4"})]})," "]}),(0,s.jsx)("div",{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){e.setTrialPopup(!0),g||(trackEvent("popup_triggered_course",AnyTrack("atclid")),callPopupTriggered());return}V(r+1)},className:"w-full h-full bg-slate-950 rounded-[.1rem] shadow-lg cursor-pointer   border-[2px] hover:border-blue-700 transition-all duration-100 ease-in ".concat(z===r+1?"border-blue-700 shadow-blue-950":"border-transparent shadow-slate-950"),children:(0,s.jsx)("img",{src:"".concat(t.thumbnail),alt:"best dropshipping course",className:"max-h-full max-w-full object-cover ".concat(z===r+1?"":"brightness-[60%] grayscale")})}),(0,s.jsxs)("h1",{className:"font-bold text-white text-[.85rem] flex items-center gap-2",children:[(0,s.jsx)("span",{className:"bg-slate-700 h-5 w-5 rounded-[.1rem] flex items-center justify-center",children:r+1})," ",t.title]})]}))})}),(0,s.jsx)("div",{className:"lg:hidden opacity-0",children:"s"})]},C)})}return(0,s.jsxs)("div",{className:"animated-element text-white font-bold min-h-screen max-h-screen w-full relative flex flex-col gap-8 items-center py-5 px-5 lg:py-12 lg:px-8 lg:overflow-auto relative","data-sentry-component":"Course","data-sentry-source-file":"course.jsx",children:[(0,s.jsx)(MatrixGrid,{"data-sentry-element":"MatrixGrid","data-sentry-source-file":"course.jsx"}),(0,s.jsx)("div",{className:"flex flex-col gap-2 rounded-[.1rem] w-full lg:min-w-[68rem] lg:max-w-[68rem] transition-transform duration-1000 ".concat(el?"opacity-100 translate-y-0":"opacity-0 translate-y-10"),children:(0,s.jsxs)("h1",{className:"text-2xl lg:text-3xl font-chakra-bold text-white flex items-center lg:justify-start justify-center gap-4",children:[(0,s.jsx)(p.Z,{"data-sentry-element":"GraduationCap","data-sentry-source-file":"course.jsx"})," Dropshipping Course"]})}),(0,s.jsxs)("div",{className:"p-5 border border-accent bg-background rounded-[.1rem] w-full lg:min-w-[68rem] lg:max-w-[68rem] flex flex-col gap-5 shadow-xl shadow-slate-950 transition-transform duration-1000 ".concat(el?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),children:[(0,s.jsxs)("div",{className:"w-full flex flex-col lg:flex-row items-center lg:justify-between lg:gap-0 gap-5",children:[(0,s.jsxs)("h1",{className:"font-bold text-2xl flex lg:flex-row flex-col lg:items-start items-center  text-center gap-2 lg:gap-3 font-chakra-semibold",children:[(0,s.jsx)("span",{className:"bg-accent rounded-[.1rem] py-1.5 p-2 text-sm flex items-center font-chakra-medium ",children:"Current Lesson"}),0===y.length&&"Product Selection Introduction",y.length>0&&(0,s.jsx)(s.Fragment,{children:A[A.indexOf(y[y.length-1])+1]})]}),y.length>0&&(0,s.jsxs)(x.z,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){e.setTrialPopup(!0),g||(trackEvent("popup_triggered_course",AnyTrack("atclid")),callPopupTriggered());return}D(function(e){for(let t=0;t<N.length;t++){let a=N[t],s=Object.values(a)[0];for(let a=0;a<s.length;a++)if(s[a].title===e)return t+1}return null}(A[A.indexOf(y[y.length-1])+1])),V(function(e){for(let t=0;t<N.length;t++){let a=N[t],s=Object.values(a)[0];for(let t=0;t<s.length;t++)if(s[t].title===e)return t+1}return null}(A[A.indexOf(y[y.length-1])+1]))},children:["Continue Lesson ",(0,s.jsx)(G.Fd8,{className:"text-xl"})]}),0===y.length&&(0,s.jsxs)("button",{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){e.setTrialPopup(!0),g||(trackEvent("popup_triggered_course",AnyTrack("atclid")),callPopupTriggered());return}D(1),V(1)},className:"lg:w-auto w-2/3 bg-blue-700 border-[2px] border-blue-700 hover:border-blue-500 p-3 rounded-[.1rem] flex items-center justify-center gap-1 shadow-lg shadow-blue-950 font-chakra-medium  ",children:["Start Course ",(0,s.jsx)(G.Fd8,{className:"text-xl "})]})]}),(0,s.jsxs)("div",{className:"flex w-full border-t-[1px] border-slate-800 pt-5",children:[(0,s.jsx)("div",{className:"bg-primary/10 grow p-1 rounded-full flex gap-3",children:(0,s.jsx)("div",{style:{width:"".concat(S,"%")},className:"p-2 bg-blue-500 rounded-full relative"})}),(0,s.jsxs)("div",{className:"lg:mt-0 mt-[1px] pl-2 lg:pl-4 font-chakra-regular text-muted-foreground lg:text-[1rem] text-[.75rem]",children:[S,"% Completed"]})]})]}),(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row justify-between w-full gap-5 lg:gap-8  lg:min-w-[68rem] lg:max-w-[68rem] transition-transform duration-1000 ".concat(el?"opacity-100 translate-y-0":"opacity-0 translate-y-[100px]"),children:[(0,s.jsxs)("div",{className:"w-full lg:w-1/3 bg-background border border-accent p-5 rounded-[.1rem] flex flex-col gap-2 shadow-xl shadow-slate-950 ",children:[(0,s.jsxs)("h1",{className:"font-chakra-bold text-2xl flex flex-col items-center gap-3",children:[(0,s.jsx)(ei.C,{variant:"secondary",className:"pointer-events-nonefont-chakra-regular text-sm text-foreground","data-sentry-element":"Badge","data-sentry-source-file":"course.jsx",children:"Module 1"})," Welcome To Glitching"]}),(0,s.jsx)(c(),{src:L.Z,alt:"dropship product finder",className:"w-[150px] mx-auto scale-[105%] py-[25px] translate-y-5","data-sentry-element":"Image","data-sentry-source-file":"course.jsx"}),(0,s.jsx)(x.z,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){if(e.setTrialPopup(!0),!g){var t=AnyTrack("atclid");trackEvent("popup_triggered_course",t),callPopupTriggered()}return}var t=AnyTrack("atclid");trackEvent("module_welcome_to_glitching_clicked",t),D(1),V(1)},size:"xl",className:"text-[1rem] lg:mt-14 mt-12 translate-y-1","data-sentry-element":"Button","data-sentry-source-file":"course.jsx",children:"Get Started"})]}),(0,s.jsxs)("div",{className:"w-full lg:w-1/3 bg-background border border-accent p-5 rounded-[.1rem] flex flex-col gap-2 shadow-xl shadow-slate-950",children:[(0,s.jsxs)("h1",{className:"font-chakra-bold text-2xl flex flex-col items-center gap-3",children:[(0,s.jsx)(ei.C,{variant:"secondary",className:"pointer-events-nonefont-chakra-regular text-sm text-foreground","data-sentry-element":"Badge","data-sentry-source-file":"course.jsx",children:"Module 2"})," Product Selection"]}),(0,s.jsx)(c(),{src:E.Z,alt:"ai product finder",className:"w-[150px] mx-auto scale-[105%] py-[25px]","data-sentry-element":"Image","data-sentry-source-file":"course.jsx"}),(0,s.jsx)(x.z,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){if(e.setTrialPopup(!0),!g){var t=AnyTrack("atclid");trackEvent("popup_triggered_course",t),callPopupTriggered()}return}var t=AnyTrack("atclid");trackEvent("module_product_selection_clicked",t),D(2),V(1)},size:"xl",className:"text-[1rem] mt-2","data-sentry-element":"Button","data-sentry-source-file":"course.jsx",children:"Get Started"})]}),(0,s.jsxs)("div",{className:"w-full lg:w-1/3 bg-background border border-accent p-5 rounded-[.1rem] flex flex-col gap-2 shadow-xl shadow-slate-950",children:[(0,s.jsxs)("h1",{className:"font-chakra-bold text-2xl flex flex-col items-center gap-3",children:[(0,s.jsx)(ei.C,{variant:"secondary",className:"pointer-events-nonefont-chakra-regular text-sm text-foreground","data-sentry-element":"Badge","data-sentry-source-file":"course.jsx",children:"Module 3"})," Store Setup"]}),(0,s.jsx)(c(),{src:F.Z,alt:"shopify store setup",className:"w-[150px] mx-auto scale-[105%] py-[25px]","data-sentry-element":"Image","data-sentry-source-file":"course.jsx"}),(0,s.jsx)(x.z,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){if(e.setTrialPopup(!0),!g){var t=AnyTrack("atclid");trackEvent("popup_triggered_course",t),callPopupTriggered()}return}var t=AnyTrack("atclid");trackEvent("module_store_setup_clicked",t),D(3),V(1)},size:"xl",className:"text-[1rem] mt-2","data-sentry-element":"Button","data-sentry-source-file":"course.jsx",children:"Get Started"})]})]}),(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row justify-between w-full gap-5 lg:gap-8  lg:min-w-[68rem] lg:max-w-[68rem] transition-transform duration-1000 ".concat(el?"opacity-100 translate-y-0":"opacity-0 translate-y-[100px]"),children:[(0,s.jsxs)("div",{className:"w-full lg:w-1/3 bg-background border border-accent p-5 rounded-[.1rem] flex flex-col gap-2 shadow-xl shadow-slate-950",children:[(0,s.jsxs)("h1",{className:"font-chakra-bold text-2xl flex flex-col items-center gap-3",children:[(0,s.jsx)(ei.C,{variant:"secondary",className:"pointer-events-nonefont-chakra-regular text-sm text-foreground","data-sentry-element":"Badge","data-sentry-source-file":"course.jsx",children:"Module 4"})," Fulfillment"]}),(0,s.jsx)(c(),{src:M.Z,alt:"dropshipping fulfillment",className:"w-[150px] mx-auto scale-[105%] py-[25px]","data-sentry-element":"Image","data-sentry-source-file":"course.jsx"}),(0,s.jsx)(x.z,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){if(e.setTrialPopup(!0),!g){var t=AnyTrack("atclid");trackEvent("popup_triggered_course",t),callPopupTriggered()}return}var t=AnyTrack("atclid");trackEvent("module_fulfillment_clicked",t),D(4),V(1)},size:"xl",className:"text-[1rem] mt-2","data-sentry-element":"Button","data-sentry-source-file":"course.jsx",children:"Get Started"})]}),(0,s.jsxs)("div",{className:"w-full lg:w-1/3 bg-background border border-accent p-5 rounded-[.1rem] flex flex-col gap-2 shadow-xl shadow-slate-950",children:[(0,s.jsxs)("h1",{className:"font-chakra-bold text-2xl flex flex-col items-center gap-3",children:[(0,s.jsx)(ei.C,{variant:"secondary",className:"pointer-events-nonefont-chakra-regular text-sm text-foreground","data-sentry-element":"Badge","data-sentry-source-file":"course.jsx",children:"Module 5"})," Ad Creation"]}),(0,s.jsx)(c(),{src:B.Z,alt:"how to make a converting ad",className:"w-[150px] mx-auto scale-[105%] py-[25px]","data-sentry-element":"Image","data-sentry-source-file":"course.jsx"}),(0,s.jsx)(x.z,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){if(e.setTrialPopup(!0),!g){var t=AnyTrack("atclid");trackEvent("popup_triggered_course",t),callPopupTriggered()}return}var t=AnyTrack("atclid");trackEvent("module_ad_creation_clicked",t),D(5),V(1)},size:"xl",className:"text-[1rem] mt-2","data-sentry-element":"Button","data-sentry-source-file":"course.jsx",children:"Get Started"})]}),(0,s.jsxs)("div",{className:"w-full lg:w-1/3 bg-background border border-accent p-5 rounded-[.1rem] flex flex-col gap-2 shadow-xl shadow-slate-950",children:[(0,s.jsxs)("h1",{className:"font-chakra-bold text-2xl flex flex-col items-center gap-3",children:[(0,s.jsx)(ei.C,{variant:"secondary",className:"pointer-events-nonefont-chakra-regular text-sm text-foreground","data-sentry-element":"Badge","data-sentry-source-file":"course.jsx",children:"Module 6"})," TikTok Ads"]}),(0,s.jsx)(c(),{src:O.Z,alt:"ai tiktok video maker",className:"w-[150px] mx-auto scale-[105%] py-[25px]","data-sentry-element":"Image","data-sentry-source-file":"course.jsx"}),(0,s.jsx)(x.z,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){if(e.setTrialPopup(!0),!g){var t=AnyTrack("atclid");trackEvent("popup_triggered_course",t),callPopupTriggered()}return}var t=AnyTrack("atclid");trackEvent("module_tiktok_ads_clicked",t),D(6),V(1)},size:"xl",className:"text-[1rem] mt-2","data-sentry-element":"Button","data-sentry-source-file":"course.jsx",children:"Get Started"})]})]}),(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row justify-between w-full gap-5 lg:gap-8  lg:min-w-[68rem] lg:max-w-[68rem] transition-transform duration-1000 ".concat(el?"opacity-100 translate-y-0":"opacity-0 translate-y-[100px]"),children:[(0,s.jsxs)("div",{className:"w-full lg:w-1/3 bg-background border border-accent p-5 rounded-[.1rem] flex flex-col gap-2 shadow-xl shadow-slate-950",children:[(0,s.jsxs)("h1",{className:"font-chakra-bold text-2xl flex flex-col items-center gap-3",children:[(0,s.jsx)(ei.C,{variant:"secondary",className:"pointer-events-nonefont-chakra-regular text-sm text-foreground","data-sentry-element":"Badge","data-sentry-source-file":"course.jsx",children:"Module 7"})," TikTok Organic"]}),(0,s.jsx)(c(),{src:_.Z,alt:"tiktok hook generator",className:"w-[150px] mx-auto scale-[105%] py-[25px]","data-sentry-element":"Image","data-sentry-source-file":"course.jsx"}),(0,s.jsx)(x.z,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){if(e.setTrialPopup(!0),!g){var t=AnyTrack("atclid");trackEvent("popup_triggered_course",t),callPopupTriggered()}return}var t=AnyTrack("atclid");trackEvent("module_tiktok_organic_clicked",t),D(7),V(1)},size:"xl",className:"text-[1rem] mt-2","data-sentry-element":"Button","data-sentry-source-file":"course.jsx",children:"Get Started"})]}),(0,s.jsxs)("div",{className:"w-full lg:w-1/3 bg-background border border-accent p-5 rounded-[.1rem] flex flex-col gap-2 shadow-xl shadow-slate-950",children:[(0,s.jsxs)("h1",{className:"font-chakra-bold text-2xl flex flex-col items-center gap-3",children:[(0,s.jsx)(ei.C,{variant:"secondary",className:"pointer-events-nonefont-chakra-regular text-sm text-foreground","data-sentry-element":"Badge","data-sentry-source-file":"course.jsx",children:"Module 8"})," Facebook Ads"]}),(0,s.jsx)(c(),{src:Z.Z,alt:"ai for fb ads",className:"w-[150px] mx-auto scale-[105%] py-[25px]","data-sentry-element":"Image","data-sentry-source-file":"course.jsx"}),(0,s.jsx)(x.z,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){if(e.setTrialPopup(!0),!g){var t=AnyTrack("atclid");trackEvent("popup_triggered_course",t),callPopupTriggered()}return}var t=AnyTrack("atclid");trackEvent("module_facebook_ads_clicked",t),D(8),V(1)},size:"xl",className:"text-[1rem] mt-2","data-sentry-element":"Button","data-sentry-source-file":"course.jsx",children:"Get Started"})]}),(0,s.jsxs)("div",{className:"w-full lg:w-1/3 bg-background border border-accent p-5 rounded-[.1rem] flex flex-col gap-2 shadow-xl shadow-slate-950",children:[(0,s.jsxs)("h1",{className:"font-chakra-bold text-2xl flex flex-col items-center gap-3",children:[(0,s.jsx)(ei.C,{variant:"secondary",className:"pointer-events-nonefont-chakra-regular text-sm text-foreground","data-sentry-element":"Badge","data-sentry-source-file":"course.jsx",children:"Module 9"})," Email & SMS Marketing"]}),(0,s.jsx)(c(),{src:U.Z,alt:"dropshipping email marketing",className:"w-[150px] mx-auto scale-[105%] py-[25px]","data-sentry-element":"Image","data-sentry-source-file":"course.jsx"}),(0,s.jsx)(x.z,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){if(e.setTrialPopup(!0),!g){var t=AnyTrack("atclid");trackEvent("popup_triggered_course",t),callPopupTriggered()}return}var t=AnyTrack("atclid");trackEvent("module_email_sms_clicked",t),D(9),V(1)},size:"xl",className:"text-[1rem] mt-2","data-sentry-element":"Button","data-sentry-source-file":"course.jsx",children:"Get Started"})]})]}),(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row justify-center w-full gap-5 lg:gap-8  lg:min-w-[68rem] lg:max-w-[68rem]",children:[(0,s.jsxs)("div",{className:"w-full lg:w-1/3 bg-background border border-accent p-5 rounded-[.1rem] flex flex-col gap-2 shadow-xl shadow-slate-950",children:[(0,s.jsxs)("h1",{className:"font-chakra-bold text-2xl flex flex-col items-center gap-3",children:[(0,s.jsx)(ei.C,{variant:"secondary",className:"pointer-events-nonefont-chakra-regular text-sm text-foreground","data-sentry-element":"Badge","data-sentry-source-file":"course.jsx",children:"Module 10"})," Customer Support"]}),(0,s.jsx)(c(),{src:R.Z,alt:"dropshipping customer service",className:"w-[150px] mx-auto scale-[105%] py-[25px]","data-sentry-element":"Image","data-sentry-source-file":"course.jsx"}),(0,s.jsx)(x.z,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){if(e.setTrialPopup(!0),!g){var t=AnyTrack("atclid");trackEvent("popup_triggered_course",t),callPopupTriggered()}return}var t=AnyTrack("atclid");trackEvent("module_customer_support_clicked",t),D(10),V(1)},size:"xl",className:"text-[1rem] mt-2","data-sentry-element":"Button","data-sentry-source-file":"course.jsx",children:"Get Started"})]}),(0,s.jsxs)("div",{className:"w-full lg:w-1/3 bg-background border border-accent p-5 rounded-[.1rem] flex flex-col gap-2 shadow-xl shadow-slate-950",children:[(0,s.jsxs)("h1",{className:"font-chakra-bold text-2xl flex flex-col items-center gap-3",children:[(0,s.jsx)(ei.C,{variant:"secondary",className:"pointer-events-nonefont-chakra-regular text-sm text-foreground","data-sentry-element":"Badge","data-sentry-source-file":"course.jsx",children:"Module 11"})," Digital Products"]}),(0,s.jsx)(c(),{src:ee,alt:"dropshipping customer service",className:"w-[150px] mx-auto scale-[105%] py-[25px]","data-sentry-element":"Image","data-sentry-source-file":"course.jsx"}),(0,s.jsx)(x.z,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){if(e.setTrialPopup(!0),!g){var t=AnyTrack("atclid");trackEvent("popup_triggered_course",t),callPopupTriggered()}return}var t=AnyTrack("atclid");trackEvent("module_digital_products_clicked",t),D(11),V(1)},size:"xl",className:"text-[1rem] mt-2","data-sentry-element":"Button","data-sentry-source-file":"course.jsx",children:"Get Started"})]}),(0,s.jsxs)("div",{className:"w-full lg:w-1/3 bg-background border border-accent p-5 rounded-[.1rem] flex flex-col gap-2 shadow-xl shadow-slate-950",children:[(0,s.jsxs)("h1",{className:"font-chakra-bold text-2xl flex flex-col items-center gap-3",children:[(0,s.jsx)(ei.C,{variant:"secondary",className:"pointer-events-nonefont-chakra-regular text-sm text-foreground","data-sentry-element":"Badge","data-sentry-source-file":"course.jsx",children:"Module 12"})," Google Ads"]}),(0,s.jsx)(c(),{src:ea,alt:"dropshipping customer service",className:"w-[150px] mx-auto scale-[105%] py-[25px]","data-sentry-element":"Image","data-sentry-source-file":"course.jsx"}),(0,s.jsx)(x.z,{onClick:()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){if(e.setTrialPopup(!0),!g){var t=AnyTrack("atclid");trackEvent("popup_triggered_course",t),callPopupTriggered()}return}var t=AnyTrack("atclid");trackEvent("module_google_ads_clicked",t),D(12),V(1)},size:"xl",className:"text-[1rem] mt-2","data-sentry-element":"Button","data-sentry-source-file":"course.jsx",children:"Get Started"})]})]}),(0,s.jsx)("div",{className:"lg:hidden opacity-0",children:"s"})]})}var el=a(68809),ec=a(55392),ed=a(58261),eu=a(31864),em=a(91846),eh=a(81427),ep=a(13671),eg=a(34824),ef=a(55907),ex=a(69539),eb=a(93168),ew=a(22700),ey=a(28761),ev=a(34622),ej=a(75283),ek=a(79503),eN=a(48135),eA=a(7489),eS={src:"/_next/static/media/aliexpress-logo.466d216a.png",height:512,width:512,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAIVBMVEXlLgT/mQDnLgTmKADtRwPjPBr/mQDtZUfve2DoSybugGU3Rx6XAAAAAnRSTlPq6+Xa7a4AAAAJcEhZcwAACxMAAAsTAQCanBgAAAAxSURBVHicLYkBCgAgEMLMVVf9/8FhNBgOVJuPpv4RYxDFPnA2MrVWYdk5nDDYVip7ASfnAPc2dYhoAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8},eT={src:"/_next/static/media/amazon-logo.ee964395.png",height:512,width:512,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAARVBMVEUWEhIlICBhQRsYGSAkHyElIiNzcHEhHiAiHiBMaXFqUztST1AgICAsJybFxsg+Lh+Eg4StrKzb2tqgnZ1jYGB9bVyQjo9DmRP5AAAADXRSTlP+L/34LvP9suoA/fov1d8niAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAD9JREFUeJwFwYkBgCAMBMEFApeoPL79l+oMYQJZkLy31j0h9vNqiMpzj0Wlssb4qKjnd9umSD5znn4QplJk8QNFqwIA4xR8ZgAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8},eC=a(74891),eP=a(40116),eD=a(53093),ez=a(82658),eI={src:"/_next/static/media/tutorial-product-1.f4cdd20b.png",height:500,width:1100,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAAG1BMVEX29/by8/Ls7e/6+vpcXFzh5OdmZmZoaGhjY2N0MbjIAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAJUlEQVR4nBXGuREAIAwEsb3Hhv4rZlAkbtueXYwFCWNZCT9jpAcHrgBZIUVwMwAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:4},eE={src:"/_next/static/media/autods-guide-step.0937692b.png",height:500,width:1500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAAElBMVEX4+fr8/Pvy9vCIjaL86+F7fZCW6bMwAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAG0lEQVR4nAXBgQEAIAjAIKb2/8uBNYSFyou5fAFHABoKwe12AAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3};function ImportProductOnly(e){let{toast:t,selectedProduct:a}=e,r=(0,o.useRouter)(),{currentUser:n,getShopifyInfo:l,getAutoDsInfo:u}=(0,d.a)(),[m,h]=(0,i.useState)(!1),[p,g]=(0,i.useState)(!1),[b,w]=(0,i.useState)(!1),[y,v]=(0,i.useState)(""),[j,k]=(0,i.useState)(null),[S,T]=(0,i.useState)(null),[D,z]=(0,i.useState)(null),[I,E]=(0,i.useState)(null),[F,B]=(0,i.useState)(null),[_,O]=(0,i.useState)(!1),[Z,M]=(0,i.useState)(""),[U,R]=(0,i.useState)(""),[G,L]=(0,i.useState)(!1),[V,H]=(0,i.useState)(!1);async function connectStore(){if(0===Z.length||0===U.length){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Cannot connect store. Please fill out both fields.",variant:"destructive"});return}if(!U.includes("shpat_")){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Invalid app token.",variant:"destructive"});return}if(!function(e){if(e.startsWith("http://")||e.startsWith("https://"))return console.log("URL should not start with http:// or https://"),!1;let t=/^([\w-]+(\.[\w-]+)+)([/\w- .]*)*\/?$/.test(e);return t}(Z)){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Invalid store URL.",variant:"destructive"});return}t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Connecting"]}),description:"Connecting your store to Glitching..."}),h(!0);let e=await fetch("/api/shopify/createShopifyDocument?uid=".concat(n.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+n.accessToken},body:JSON.stringify({shopifyUrl:Z,appToken:U})});if(!e.ok){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Could not connect your store to Glitching. Contact support for assistance.",variant:"destructive"}),h(null);return}let a=await l(n);O(!0),M(a.url),t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Connected your store to Glitching!"}),h(null)}async function importToShopify(){t({title:(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("span",{className:"flex flex-row items-center gap-1.5 bg-yellow-300 text-yellow-800 font-chakra-medium rounded-[.1rem] text-[.7rem] px-1 w-fit mb-2",children:[(0,s.jsx)(eP.Z,{className:"lg:w-4 lg:h-4 w-3 h-3 text-yellow-800"})," DO NOT LEAVE THIS PAGE"]}),(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Importing..."]})]}),description:"Please stay on this page while we import your product to Shopify."}),L(!0);let e=await fetch("/api/shopify/import?uid=".concat(n.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+n.accessToken},body:JSON.stringify({title:a.productName,cost:a.aliexpressPrice,images:a.images,price:a.amazonPrice})});if(!e.ok){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Couldn't import product. Click here for help.",action:(0,s.jsx)(x.z,{size:"sm",variant:"destructive",className:"border border-foreground/20",onClick:()=>{r.push("/dashboard?location=integrations&to=shopify-store&help=true")},children:"Help"}),variant:"destructive"}),L(!1);return}t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Product imported to Shopify!"}),L(!1),g(!0),w(!0),v("shopify")}async function importWithAutoDs(){if(!a.aliexpressLink){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(c(),{src:W.Z,alt:"AutoDS Logo",width:60}),"AutoDS Error"]}),description:"This product was not imported from AliExpress so it cannot be imported to AutoDS.",action:(0,s.jsx)(x.z,{size:"sm",variant:"destructive",className:"border border-foreground/20",onClick:()=>{r.push("/dashboard?location=integrations&to=auto-ds&help=true")},children:"Help"}),variant:"destructive"});return}t({title:(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("span",{className:"flex flex-row items-center gap-1.5 bg-yellow-300 text-yellow-800 font-chakra-medium rounded-[.1rem] text-[.7rem] px-1 w-fit mb-2",children:[(0,s.jsx)(eP.Z,{className:"lg:w-4 lg:h-4 w-3 h-3 text-yellow-800"})," DO NOT LEAVE THIS PAGE"]}),(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Importing..."]})]}),description:"Please stay on this page while we import your product to AutoDS and Shopify."}),L(!0);let e=await fetch("/api/auto-ds/importProduct?uid=".concat(n.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+n.accessToken},body:JSON.stringify({encryptedIdToken:j,idTokenTimestamp:D,encryptedRefreshToken:S,aliexpressTitle:a.productName,productPrice:a.amazonPrice,aliexpressAsin:function(e){let t=e.match(/\/(\d+\.html)/);return t&&t[1]?t[1].replace(".html",""):null}(a.aliexpressLink)})});if(!e.ok){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(c(),{src:W.Z,alt:"AutoDS Logo",width:60})," AutoDS Error"]}),description:"Couldn't import product to AutoDS. Click here for help.",action:(0,s.jsx)(x.z,{size:"sm",variant:"destructive",className:"border border-foreground/20",onClick:()=>{r.push("/dashboard?location=integrations&to=auto-ds&help=true")},children:"Help"}),variant:"destructive"}),L(!1);return}t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Product imported to AutoDS. It will automatically import to Shopify in ~3 minutes."}),L(!1),g(!0),w(!0),v("autods")}return(0,i.useEffect)(()=>{n&&(l(n).then(e=>{if(!e){O(!1);return}O(!0),M(e.url),R(e.token)}),u(n).then(e=>{if(!e){B(!1);return}k(e.encryptedIdToken),T(e.encryptedRefreshToken),z(e.idTokenTimestamp),E(e.storeUrl),B(!0)}))},[n]),(0,s.jsx)(s.Fragment,{children:_?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eA.Vq,{open:p,onOpenChange:e=>{g(e),e&&(w(!1),v(""))},children:(0,s.jsxs)(eA.cZ,{className:"border-accent",children:[(0,s.jsxs)("h1",{className:"font-chakra-semibold text-foreground text-lg lg:text-xl flex items-center gap-1",children:[(0,s.jsx)(P.Z,{className:"min-w-5 h-5 mr-1.5 text-green-500"})," How to view your imported product"]}),(0,s.jsx)("div",{className:"font-chakra-regular",children:(0,s.jsxs)("ol",{className:"list-decimal list-inside space-y-4",children:["autods"===y&&(0,s.jsx)("li",{className:"text-muted-foreground",children:"Wait for your product to import on AutoDS (~3 minutes)."}),(0,s.jsx)("li",{className:"text-muted-foreground",children:"Go to your Shopify admin dashboard."}),(0,s.jsx)("li",{className:"text-muted-foreground",children:'Click on "Products" tab on the navbar to view your product.'})]})}),"shopify"===y&&(0,s.jsx)(c(),{src:eI,className:"w-full h-full",alt:"Imported Product Page"}),"autods"===y&&(0,s.jsx)(c(),{src:eE,className:"w-full h-full",alt:"Imported Product Page"})]})}),(0,s.jsx)(x.z,{disabled:G,onClick:async()=>{F&&I?await importWithAutoDs():await importToShopify()},variant:"secondary",className:"w-full",children:G?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 mr-2 animate-spin"}),"Importing"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c(),{src:eD.Z,alt:"Shopify Logo",width:15,className:"mr-2"})," Import To Shopify"]})})]}):(0,s.jsxs)(eA.Vq,{children:[(0,s.jsx)(eA.hg,{asChild:!0,children:(0,s.jsxs)(x.z,{variant:"secondary",className:"w-full",children:[(0,s.jsx)(c(),{src:eD.Z,alt:"Shopify Logo",width:15,className:"mr-2"})," Import To Shopify"]})}),(0,s.jsxs)(eA.cZ,{className:"border-accent max-w-[600px]",children:[(0,s.jsx)(eA.fK,{children:(0,s.jsx)(eA.$N,{children:"Connect Your Store"})}),(0,s.jsxs)("div",{onClick:()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank")},className:"p-2 lg:p-3 lg:px-5 w-full bg-primary-foreground border border-accent rounded-[.1rem] flex flex-row items-center justify-between gap-5 shadow-xl shadow-slate-950 ",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-4",children:[(0,s.jsx)(c(),{src:$.Z,alt:"shopify logo affiliate promo",className:"w-[80px] lg:w-[100px] "}),(0,s.jsx)("div",{className:"hidden lg:block scale-x-[250%] font-chakra-semibold text-muted-foreground/50",children:" - "}),(0,s.jsx)("div",{className:"hidden lg:block lg:text-foreground text-sm text-muted-foreground font-chakra-regular",children:" $1 for the first month"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 ",children:[(0,s.jsxs)(x.z,{size:"sm",className:"hidden lg:flex bg-[#64943e] hover:bg-[#64943e]/90",onClick:()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank")},children:["Create Your Store ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]}),(0,s.jsxs)(x.z,{size:"xs",className:"lg:hidden text-[.7rem] p-1 px-2 bg-[#64943e] hover:bg-[#64943e]/90",onClick:()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank")},children:["Create Store ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})]})]}),(0,s.jsx)("div",{className:"w-full lg:h-[20rem] rounded-[.1rem]",children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/1021186133?h=a10e07238a&badge=0&autopause=0&player_id=0&app_id=58479",frameborder:"2",allow:"autoplay; fullscreen; clipboard-write",title:"Glitching Shopify Integration",className:"h-full w-full"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(A._,{children:"Store URL"}),(0,s.jsx)(N.I,{type:"text",placeholder:"example.myshopify.com",value:Z,onChange:e=>M(e.target.value)})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(A._,{children:"App Token"}),(0,s.jsx)(N.I,{type:"text",placeholder:"shpat_example123",value:U,onChange:e=>R(e.target.value)})]}),(0,s.jsx)(eA.cN,{children:(0,s.jsx)(x.z,{disabled:m,onClick:connectStore,children:m?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 mr-1.5 animate-spin"})," Connecting "]}):"Connect Store"})})]})]})})}var eF=a(52091),eB=a(20839);function ConnectAutoDs(){let e=(0,o.useRouter)(),{currentUser:t,getAutoDsInfo:a,getShopifyInfo:r}=(0,d.a)(),[n,l]=(0,i.useState)(null),[u,m]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{t&&(a(t).then(e=>{if(!e){l(!1);return}l(!0)}),r(t).then(e=>{if(!e){m(!1);return}m(!0)}))},[t]),(0,s.jsx)(s.Fragment,{children:n?(0,s.jsxs)(x.z,{onClick:()=>{e.push("/dashboard?location=integrations&to=auto-ds")},size:"sm",variant:"outline",className:"text-foreground flex items-center gap-2 group",children:[" ",(0,s.jsx)(c(),{src:W.Z,className:"w-[45px] scale-[117%] saturate-[200%]"})," AutoDS Connected "]}):(0,s.jsx)(eB.pn,{delayDuration:10,children:(0,s.jsxs)(eB.u,{children:[(0,s.jsx)(eB.aJ,{asChild:!0,children:(0,s.jsxs)(x.z,{onClick:()=>{u?e.push("/dashboard?location=integrations&to=auto-ds"):e.push("/dashboard?location=integrations")},size:"sm",variant:"outline",className:"text-foreground flex items-center gap-2 group",children:[" ",(0,s.jsx)(c(),{src:W.Z,className:"w-[45px] scale-[117%] saturate-[200%]"})," Get Supplier "]})}),(0,s.jsxs)(eB._v,{className:"bg-background text-foreground border border-accent w-[13rem] p-3 flex flex-col gap-2 translate-x-7",children:[(0,s.jsx)(c(),{src:W.Z,className:"w-[45px] scale-[117%] saturate-[200%]"}),(0,s.jsx)("h1",{className:"text-foreground font-chakra-bold text-[.9rem]",children:"Fulfill your orders with AutoDS"}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-regular text-[.8rem]",children:"Find suppliers & fulfill your orders with ease."})]})]})})})}var e_=a(12773);function MyProducts(e){let{currentUser:t,getSavedProducts2:a,getCompetitors:r,getTiktoks:n,getSavedProductPages:l,getGlitches:u}=(0,d.a)(),h=(0,o.useRouter)(),[p,g]=(0,i.useState)(!1),[b,y]=(0,i.useState)(!1);(0,i.useEffect)(()=>{y(!0)},[]);let[v,k]=(0,i.useState)(null);(0,i.useEffect)(()=>{v&&v.on("select",()=>{I(v.selectedScrollSnap())})},[v]);let[N,A]=(0,i.useState)(!1),[T,D]=(0,i.useState)([]),[z,I]=(0,i.useState)(0),[E,F]=(0,i.useState)(8),[B,_]=(0,i.useState)(0),[O,Z]=(0,i.useState)(null),[M,U]=(0,i.useState)(null),[R,G]=(0,i.useState)(null),[L,V]=(0,i.useState)(null),[H,q]=(0,i.useState)(null),[W,Q]=(0,i.useState)(null),[Y,J]=(0,i.useState)("Store Builder"),[K,X]=(0,i.useState)(!1),[$,ee]=(0,i.useState)(!1),[et,ea]=(0,i.useState)(!1),[er,ei]=(0,i.useState)([]),[eo,ey]=(0,i.useState)([]),[ev,ej]=(0,i.useState)([]),[ek,eC]=(0,i.useState)([]),eP={"Find Competitors":{description:"Find competitors that sell products similar to this one.",icon:(0,s.jsx)(el.Z,{className:"w-16 h-16 text-primary"}),buttonCta:"Find Competitors"},"Find TikToks":{description:"Find TikTok videos for products similar to this one.",icon:(0,s.jsx)(f.ZDN,{className:"w-16 h-16 text-primary"}),buttonCta:"Find TikToks"},"Store Builder":{description:"Generate an entire Shopify store to sell this product.",icon:(0,s.jsx)(ec.Z,{className:"w-16 h-16 text-primary"}),buttonCta:"Generate Store"},"Glitch Mode":{description:"All you need to start dropshipping, in one click.",icon:(0,s.jsx)(ed.Z,{className:"w-16 h-16 text-primary"}),buttonCta:"Start Glitching"}};async function deleteImportedProduct(e){D(t=>t.filter(t=>t.id!==e)),fetch("/api/my-products/deleteImportedProduct?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t.accessToken},body:JSON.stringify({id:e})})}async function updatePreviouslyImportedProduct(e){await fetch("/api/my-products/updatePreviouslyImportedProduct?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t.accessToken},body:JSON.stringify({product:e,id:e.id})})}async function updateMarketInsightsAndDescription(a){try{console.log(a),ee(!0),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Updating product data"]}),description:"This can take up to 30 seconds."});let r=await fetch("/api/my-products/updateMarketInsightsAndDescription?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t.accessToken},body:JSON.stringify({productName:a.productName,productImages:a.images})});if(!r.ok)throw Error("Failed to update market insights");let n=await r.json(),i={...a,report:n.report,productDescription:n.productDescription};return await updatePreviouslyImportedProduct(i),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Product data updated."}),ee(!1),D(e=>e.map(e=>e.id===i.id?i:e)),Z(i),X(!0),i}catch(t){console.log(t),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Failed to update product data.",variant:"destructive"}),ee(!1);return}}return(0,i.useEffect)(()=>{T.length>0&&_(Math.ceil(T.length/E))},[T,E]),(0,i.useEffect)(()=>{t&&(a(t).then(e=>{if(e){A(!0),D(e.reverse());return}fetch("/api/my-products/createProductsUser?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t.accessToken}})}),r(t).then(e=>{e&&ei(e)}),n(t).then(e=>{e&&ey(e)}),l(t).then(e=>{if(e){ej(e);return}fetch("/api/product-page/createProductPageUser?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t.accessToken}})}),u(t).then(e=>{e&&eC(e.filter(e=>2===e.version))}))},[t]),(0,i.useEffect)(()=>{if(O){let e=er.find(e=>e.id===O.id);e&&U(e);let t=eo.find(e=>e.id===O.id);t&&G(t);let a=ev.find(e=>e.id===O.id&&e.brandColor);a&&V(a);let s=ek.find(e=>e.id===O.id);s&&q(s)}},[O,er,eo,ev]),(0,s.jsxs)("div",{className:"animated-element w-full lg:h-screen flex flex-col items-center lg:justify-center lg:gap-0 relative lg:p-0 p-5 lg:overflow-hidden",children:[(0,s.jsx)(MatrixGrid,{}),(0,s.jsxs)("h1",{className:"text-2xl lg:text-3xl font-chakra-bold text-foreground w-full lg:w-[60rem] text-left mb-5 flex items-center gap-2 transition-all duration-1000 ".concat(b?"opacity-100 translate-y-0":"opacity-0 translate-y-10"),children:[(0,s.jsx)(eu.Z,{})," Saved Products"]}),e.showBanner&&(0,s.jsx)("div",{className:"w-full lg:w-[60rem] mb-5 ".concat(b?"opacity-100 translate-y-0":"opacity-0 translate-y-16"," transition-all duration-1000"),children:(0,s.jsx)(e_.Z,{})}),(0,s.jsxs)(eN.lr,{className:"w-full lg:w-auto",setApi:k,onSlideChange:e=>I(e),children:[(0,s.jsx)(eN.Pz,{className:"hidden"}),(0,s.jsx)(eN.am,{className:"hidden"}),(0,s.jsxs)(w.Zb,{className:"lg:w-[60rem] lg:min-h-[35.5rem] lg:max-h-[35.5rem] bg-background border-accent shadow-xl shadow-slate-950 transition-all duration-1000 ".concat(b?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),children:[(0,s.jsx)(w.Ol,{className:"border-b border-accent flex items-center justify-between w-full",children:(0,s.jsxs)(w.ll,{className:"flex lg:flex-row flex-col lg:items-center lg:justify-between w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 lg:mb-0 mb-2",children:[(0,s.jsxs)(x.z,{onClick:()=>{null==v||v.scrollPrev()},variant:"ghost",size:"icon",className:"text-foreground",children:[" ",(0,s.jsx)(en.Z,{className:"w-4 h-4 "})," "]}),(0,s.jsxs)("div",{className:"text-foreground",children:[z+1," of ",T.length>0?B:1]}),(0,s.jsxs)(x.z,{onClick:()=>{null==v||v.scrollNext()},variant:"ghost",size:"icon",className:"text-foreground",children:[" ",(0,s.jsx)(j.Z,{className:"w-4 h-4"})," "]})]}),(0,s.jsxs)(x.z,{onClick:()=>{h.push("/dashboard?location=import-products")},children:[(0,s.jsx)(em.Z,{className:"w-4 h-4 mr-1.5"}),"Import Products"]})]})}),(0,s.jsx)(w.aY,{className:"relative lg:min-h-auto lg:min-w-auto min-h-[30rem] lg:max-h-[30rem] lg:overflow-hidden",children:(0,s.jsxs)(eN.KI,{children:[0===T.length&&N&&(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center grow lg:min-h-[28rem] lg:mt-0 mt-6",children:[(0,s.jsx)(f.BHL,{className:"lg:w-24 lg:h-24 w-20 h-20 text-muted-foreground/30"}),(0,s.jsx)("h1",{className:"font-chakra-medium text-muted-foreground mt-3",children:"No saved products"}),(0,s.jsx)("div",{className:"text-muted-foreground/75 text-sm mt-1",children:"Find & save a product to get started"}),(0,s.jsxs)(x.z,{size:"sm",variant:"outline",className:"mt-3",onClick:()=>{h.push("/dashboard?location=product-db")},children:[(0,s.jsx)(eh.Z,{className:"w-4 h-4 mr-1.5"})," AI Product Database"]})]}),Array.from({length:Math.ceil(T.length/8)}).map((t,a)=>(0,s.jsx)(eN.d$,{children:(0,s.jsx)("div",{className:"flex flex-row flex-wrap gap-5 max-h-full overflow-y-auto pt-5 transition-all duration-1000",children:T.slice(8*a,(a+1)*8).map((t,a)=>(0,s.jsxs)(eA.Vq,{onOpenChange:e=>{if(!e){Z(null),V(null),U(null),G(null),q(null),X(!1),ea(!1),Q(null);return}},children:[(0,s.jsx)(eA.hg,{asChild:!0,children:(0,s.jsxs)("div",{onClick:()=>Z(t),className:"w-[46.4%] lg:w-[calc(25%-1rem)] h-[10rem] lg:h-[13rem] border border-accent rounded-md p-2 transition-all ease-in duration-100 cursor-pointer relative group overflow-hidden ".concat(p===a?"border-destructive":"hover:border-primary"),children:[(0,s.jsx)(x.z,{onClick:e=>{e.stopPropagation(),deleteImportedProduct(t.id)},onMouseEnter:()=>g(a),onMouseLeave:()=>g(!1),variant:"destructive",size:"icon",className:"text-foreground absolute top-3 right-3",children:(0,s.jsx)(ep.Z,{className:"w-4 h-4 transition-transform ease-in duration-100 ".concat(p===a?"rotate-[-5deg]":"")})}),(0,s.jsx)("div",{className:"absolute top-[-3rem] left-3 transition-all duration-200 z-[20] p-2 rounded-[.1rem] bg-primary opacity-0 group-hover:opacity-100 ".concat(p===a?"top-[-3rem]":"group-hover:top-3"),children:(0,s.jsx)(eg.Z,{className:"w-4 h-4"})}),(0,s.jsx)("img",{src:t.images?t.images[0]:"",className:"object-cover h-full w-full",alt:t.productName}),(0,s.jsx)("div",{className:"text-[.7rem] w-full p-2 font-chakra-medium absolute bottom-0 left-0 text-center px-3 bg-background",children:t.productName.length>30?t.productName.slice(0,30)+"...":t.productName})]})}),(0,s.jsx)(eA.cZ,{className:"dialog-content outline-none min-h-[85vh] min-w-[90vw] max-h-[85vh] max-w-[90vw] lg:max-w-[2000px] lg:min-w-[1050px] lg:min-h-[710px] lg:max-h-[710px] lg:max-w-[1000px] border-accent  ".concat(et?"overflow-hidden":"overflow-y-auto overflow-x-hidden lg:overflow-y-hidden"),children:O&&(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row gap-5 w-full",children:[K?(0,s.jsxs)("div",{className:"flex flex-col gap-2 w-full lg:w-1/2 lg:border-r border-accent lg:pr-5",children:[(0,s.jsx)("div",{children:(0,s.jsxs)(x.z,{onClick:()=>{X(!1)},variant:"outline",className:"group",children:[(0,s.jsx)(en.Z,{className:"w-4 h-4 group-hover:-translate-x-1 transition-all duration-100 ease-in mr-1"})," Back"]})}),(0,s.jsxs)(m.UQ,{type:"single",collapsible:!0,defaultValue:"item-1",children:[(0,s.jsxs)(m.Qd,{value:"item-1",children:[(0,s.jsx)(m.o4,{children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(f.Tk0,{}),(0,s.jsx)("span",{className:"text-white font-chakra-semibold text-[1rem] lg:text-lg",children:"Who Would Buy This"})]})}),(0,s.jsx)(m.vF,{children:(0,s.jsxs)("div",{className:"flex flex-col gap-3 text-[.85rem] font-chakra-regular",children:[(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Age Range:"})," ",O&&O.report.demographics.age_range]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Gender:"})," ",O&&O.report.demographics.gender]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Income:"})," ",O&&O.report.demographics.income_level]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Lifestyle:"})," ",O&&O.report.demographics.lifestyle]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Location:"})," ",O&&O.report.demographics.location]})]})})]}),(0,s.jsxs)(m.Qd,{value:"item-2",children:[(0,s.jsx)(m.o4,{children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(ex.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{className:"text-white font-chakra-semibold text-[1rem] lg:text-lg",children:"Buying Motivation"})]})}),(0,s.jsx)(m.vF,{children:(0,s.jsxs)("div",{className:"flex flex-col gap-3 text-[.85rem] font-chakra-regular lg:max-h-[22rem] overflow-auto",children:[(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Buying motivation 1:"})," ",O&&O.report.buyingMotivations.motivation1]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Buying motivation 2:"})," ",O&&O.report.buyingMotivations.motivation2]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Buying motivation 3:"})," ",O&&O.report.buyingMotivations.motivation3]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Buying motivation 4:"})," ",O&&O.report.buyingMotivations.motivation4]})]})})]}),(0,s.jsxs)(m.Qd,{value:"item-3",children:[(0,s.jsx)(m.o4,{children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(eb.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{className:"text-white font-chakra-semibold text-[1rem] lg:text-lg",children:"Customer Pain Points"})]})}),(0,s.jsx)(m.vF,{children:(0,s.jsxs)("div",{className:"flex flex-col gap-3 text-[.85rem] font-chakra-regular",children:[(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Pain point 1:"})," ",O&&O.report.painPoints.pain_point1]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Pain point 2:"})," ",O&&O.report.painPoints.pain_point2]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Pain point 3:"})," ",O&&O.report.painPoints.pain_point3]})]})})]}),(0,s.jsxs)(m.Qd,{value:"item-4",children:[(0,s.jsx)(m.o4,{children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(ew.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{className:"text-white font-chakra-semibold text-[1rem] lg:text-lg",children:"How To Advertise"})]})}),(0,s.jsx)(m.vF,{children:(0,s.jsx)("div",{className:"flex flex-col gap-2 text-muted-foreground font-chakra-regular text-[.85rem]",children:function(e){let t=e.split("\n").filter(e=>""!==e.trim());return t.map((e,a)=>{let r=e.split(/(\*\*.*?\*\*)/g);return(0,s.jsxs)("span",{children:[r.map((e,t)=>/^\*\*.*\*\*$/.test(e)?(0,s.jsx)("span",{className:"font-bold text-blue-400 mx-[1px]",children:e.slice(2,-2)},t):e),a!==t.length-1&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"mb-1"})})]},a)})}(O&&O.report.marketingAngles)})})]})]})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-5 w-full lg:w-1/2 lg:border-b-[0px] lg:border-r border-accent lg:pr-5 ".concat(et?"hidden":""),children:[(0,s.jsxs)("div",{className:"flex flex-row items-center w-[80%] lg:hidden",children:[(0,s.jsxs)(x.z,{onClick:()=>{ea(!1)},variant:et?"outline":"default",size:"sm",className:"w-[9rem] rounded-r-none ".concat(et?"border-r-[0px]":""),children:[(0,s.jsx)(f.FMB,{className:"w-3 h-3 mr-1.5"}),"Product Data"]}),(0,s.jsxs)(x.z,{onClick:()=>{ea(!0)},variant:et?"default":"outline",size:"sm",className:"w-[9rem] rounded-l-none ".concat(et?"border-l-[0px]":""),children:[(0,s.jsx)(f.WCv,{className:"w-3 h-3 mr-1.5"}),"Built-in features"]})]}),(0,s.jsxs)("div",{className:"flex flex-row gap-3 w-full ",children:[(0,s.jsx)("div",{className:"flex flex-col gap-2 max-h-[7rem] lg:max-h-[9.5rem] overflow-y-auto",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:O&&O.images.map((e,t)=>(0,s.jsx)("div",{className:"lg:min-h-[3rem] lg:w-[3rem] min-h-[2rem] w-[2rem] bg-white rounded-[.1rem] cursor-pointer border-[2px]  ".concat(e===W?"border-primary":"border-transparent hover:border-primary"),onClick:()=>{e!==W&&Q(e)},children:(0,s.jsx)("img",{src:e,className:"w-full h-full object-cover rounded-[.1rem]",alt:"Product thumbnail"})},t))}),(0,s.jsx)("div",{className:"lg:h-[9.5rem] lg:w-[9.5rem] h-[7rem] w-[7rem] bg-white rounded-[.1rem]",children:(0,s.jsx)("img",{src:O&&W||(O.images[0]?O.images[0]:""),className:"w-full h-full object-cover rounded-[.1rem]"})})]}),(0,s.jsxs)("div",{className:"w-full flex flex-col lg:w-auto w-full lg:flex-row gap-3",children:[(0,s.jsx)(ImportProductOnly,{toast:e.toast,selectedProduct:O}),O.aliexpressLink?(0,s.jsxs)(x.z,{onClick:()=>{window.open(function(e){let t=e.match(/\/item\/(\d+)\.html/);return t&&t[1]?"https://www.aliexpress.us/item/".concat(t[1],".html"):e}(O.aliexpressLink),"_blank")},variant:"outline",className:"w-full",children:[(0,s.jsx)(c(),{src:eS,alt:"aliexpress logo",className:"w-4 h-4 object-contain rounded-[.1rem] saturate-[150%] mr-1.5"}),"View On AliExpress"]}):!O.aliexpressLink&&O.amazonLink?(0,s.jsxs)(x.z,{onClick:()=>{window.open(O.amazonLink,"_blank")},variant:"outline",className:"w-full",children:[(0,s.jsx)(c(),{src:eT,alt:"amazon logo",className:"w-4 h-4 object-contain rounded-[.1rem] saturate-[150%] mr-1.5"}),"View On Amazon"]}):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsx)("h1",{className:"font-chakra-semibold text-foreground lg:text-[1rem] text-[.85rem]",children:O.productName.slice(0,50)+(O.productName.length>50?"...":"")}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row w-full gap-3",children:[(0,s.jsxs)(w.Zb,{className:"w-[33%] bg-primary-foreground border-accent p-1.5 lg:p-3 rounded-[.1rem]",children:[(0,s.jsx)("div",{className:"text-[.6rem] lg:text-[.8rem] text-red-400 font-chakra-regular",children:"Estimated Cost"}),(0,s.jsxs)("div",{className:"text-white text-[.8rem] lg:text-[1rem] font-chakra-medium",children:["$",O&&O.aliexpressPrice.toFixed(2)]})]}),(0,s.jsxs)(w.Zb,{className:"w-[33%] bg-primary-foreground border-accent p-1.5 lg:p-3 rounded-[.1rem]",children:[(0,s.jsx)("div",{className:"text-[.6rem] lg:text-[.8rem] text-blue-400 font-chakra-regular",children:"Sale Price"}),(0,s.jsxs)("div",{className:"text-white text-[.8rem] lg:text-[1rem] font-chakra-medium",children:["$",O&&O.amazonPrice.toFixed(2)]})]}),(0,s.jsxs)(w.Zb,{className:"w-[33%] bg-primary-foreground border-accent p-1.5 lg:p-3 rounded-[.1rem]",children:[(0,s.jsx)("div",{className:"text-[.6rem] lg:text-[.8rem] text-green-400 font-chakra-regular",children:"Profit"}),(0,s.jsxs)("div",{className:"text-white text-[.8rem] lg:text-[1rem] font-chakra-medium",children:["$",O&&O.profit?O.profit.toFixed(2):O&&!O.profit?(O.amazonPrice-O.aliexpressPrice).toFixed(2):"-"]})]})]}),(0,s.jsx)("div",{className:"text-slate-400 text-[.8rem] flex items-center gap-1 font-chakra-regular",children:"The cost, sale price & profit are estimates and may not be entirely accurate."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent p-1.5 lg:p-3 rounded-[.1rem] w-1/2",children:[(0,s.jsx)("div",{className:"text-white font-chakra-semibold text-[.75rem] lg:text-[.8rem]",children:"\uD83E\uDD75 Saturation"}),(0,s.jsx)("div",{className:"w-full p-0.5 bg-background rounded-[.1rem] mt-1",children:(0,s.jsx)("div",{style:{width:"".concat(O&&O.saturation,"%")},className:"p-1 ".concat(O&&O.saturation<61?"bg-gradient-to-r from-emerald-600 to-emerald-500":O&&O.saturation>60&&O.saturation<66?"bg-gradient-to-r from-yellow-600 to-amber-500":"bg-gradient-to-r from-red-600 to-red-500"," rounded-[.1rem]")})})]}),(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent p-1.5 lg:p-3 rounded-[.1rem] w-1/2",children:[(0,s.jsx)("div",{className:"text-white font-chakra-semibold text-[.75rem] lg:text-[.8rem]",children:"\uD83E\uDD2F Wow Factor"}),(0,s.jsx)("div",{className:"w-full p-0.5 bg-background rounded-[.1rem] mt-1",children:(0,s.jsx)("div",{style:{width:"".concat(O&&O.wowFactor,"%")},className:"".concat(O&&O.wowFactor<31?"bg-gradient-to-r from-red-600 to-red-500":O&&O.wowFactor>30&&O.wowFactor<41?"bg-gradient-to-r from-yellow-600 to-amber-500":"bg-gradient-to-r from-emerald-600 to-emerald-500"," p-1 rounded-[.1rem]")})})]})]}),(0,s.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent p-1.5 lg:p-3 rounded-[.1rem] w-1/2",children:[(0,s.jsx)("div",{className:"text-white font-chakra-semibold text-[.75rem] lg:text-[.8rem]",children:"\uD83E\uDD11 Profit Margin"}),(0,s.jsx)("div",{className:"w-full p-0.5 bg-background rounded-[.1rem] mt-1",children:(0,s.jsx)("div",{style:{width:"".concat(O&&O.profit,"%")},className:"".concat(O&&"bg-gradient-to-r ".concat(O.profit||O.amazonPrice-O.aliexpressPrice<10?"from-red-600 to-red-500":O.profit||O.amazonPrice-O.aliexpressPrice>10&&O.profit||O.amazonPrice-O.aliexpressPrice<20?"from-yellow-600 to-amber-500":"from-emerald-600 to-emerald-500")," p-1 rounded-[.1rem]")})})]}),(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent p-1.5 lg:p-3 rounded-[.1rem] w-1/2",children:[(0,s.jsx)("div",{className:"text-white font-chakra-semibold text-[.75rem] lg:text-[.8rem]",children:"\uD83C\uDFAF Product Market Fit"}),(0,s.jsx)("div",{className:"w-full p-0.5 bg-background rounded-[.1rem] mt-1",children:(0,s.jsx)("div",{style:{width:"".concat(O&&O.pmf,"%")},className:"".concat(O&&O.pmf<31?"bg-gradient-to-r from-red-600 to-red-500":O&&O.pmf>30&&O.pmf<41?"bg-gradient-to-r from-yellow-600 to-amber-500":"bg-gradient-to-r from-emerald-600 to-emerald-500"," p-1 rounded-[.1rem]")})})]})]}),(0,s.jsx)(x.z,{disabled:$,onClick:async()=>{if(!t.report.demographics){await updateMarketInsightsAndDescription(t);return}X(!0)},className:"text-foreground flex items-center gap-2 group mt-6 w-full",size:"xl",children:$?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"w-5 h-5 animate-spin"}),"Updating Data"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ef.Z,{className:"w-5 h-5"}),"Show Market Insights"]})}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(ConnectAutoDs,{})})]})]}),(0,s.jsxs)("div",{className:"lg:flex flex-col gap-5 w-full lg:w-1/2 ".concat(et?"flex h-full":"hidden"),children:[(0,s.jsxs)("div",{className:"flex flex-row items-center w-[80%] ".concat(et?"":"hidden"),children:[(0,s.jsxs)(x.z,{onClick:()=>{ea(!1)},variant:et?"outline":"default",size:"sm",className:"w-[9rem] lg:hidden rounded-r-none ".concat(et?"border-r-[0px]":""),children:[(0,s.jsx)(f.FMB,{className:"w-3 h-3 mr-1.5"}),"Product Data"]}),(0,s.jsxs)(x.z,{onClick:()=>{ea(!0)},variant:et?"default":"outline",size:"sm",className:"w-[9rem] lg:hidden rounded-l-none ".concat(et?"border-l-[0px]":""),children:[(0,s.jsx)(f.WCv,{className:"w-3 h-3 mr-1.5"}),"Built-in features"]})]}),(0,s.jsx)("h1",{className:"text-xl lg:text-2xl font-chakra-semibold text-foreground",children:"Built-in features"}),(0,s.jsxs)(S.Ph,{value:Y,onValueChange:e=>J(e),defaultValue:"Store Builder",children:[(0,s.jsx)(S.i4,{className:"lg:w-[35%] text-foreground",children:(0,s.jsx)(S.ki,{placeholder:"Select an option"})}),(0,s.jsxs)(S.Bw,{children:[(0,s.jsx)(S.Ql,{value:"Store Builder",children:"Store Builder"}),(0,s.jsx)(S.Ql,{value:"Find TikToks",children:"Find TikToks"}),(0,s.jsx)(S.Ql,{value:"Find Competitors",children:"Find Competitors"}),(0,s.jsx)(S.Ql,{value:"Glitch Mode",children:"Glitch Mode"})]})]}),(0,s.jsxs)("div",{className:"flex flex-col w-full h-full rounded-[.1rem]",children:["Store Builder"===Y&&L?(0,s.jsx)(SavedStorePreview,{selectedProductPage:L,selectedProduct:O,router:h}):"Store Builder"!==Y||L?null:(0,s.jsxs)("div",{className:"flex flex-col h-full items-center justify-center border border-accent  p-5",children:[eP[Y].icon,(0,s.jsx)("h1",{className:"text-2xl font-chakra-semibold text-foreground mt-3",children:Y}),(0,s.jsx)("div",{className:"w-full text-[.85rem] text-center text-muted-foreground font-chakra-regular mt-1",children:eP[Y].description}),(0,s.jsx)(x.z,{onClick:()=>{h.push("/dashboard?location=store-builder&id="+O.id)},size:"lg",className:"w-[75%] mt-5 mb-10",children:eP[Y].buttonCta})]}),"Find Competitors"===Y&&M&&M.competitorList.length>0?(0,s.jsx)(SavedCompetitorsPreview,{selectedCompetitors:M,selectedProduct:O,router:h}):"Find Competitors"!==Y||M?"Find Competitors"===Y&&M&&0===M.competitorList.length?(0,s.jsxs)("div",{className:"flex flex-col h-full items-center justify-center border border-accent  p-5",children:[eP[Y].icon,(0,s.jsx)("h1",{className:"text-2xl font-chakra-semibold text-foreground mt-3",children:Y}),(0,s.jsx)("div",{className:"w-full text-[.85rem] text-center text-muted-foreground font-chakra-regular mt-1",children:eP[Y].description}),(0,s.jsx)(x.z,{onClick:()=>{h.push("/dashboard?location=find-competitors&id="+O.id+"&update=true")},size:"lg",className:"w-[75%] mt-5 mb-10",children:eP[Y].buttonCta})]}):null:(0,s.jsxs)("div",{className:"flex flex-col h-full items-center justify-center border border-accent  p-5",children:[eP[Y].icon,(0,s.jsx)("h1",{className:"text-2xl font-chakra-semibold text-foreground mt-3",children:Y}),(0,s.jsx)("div",{className:"w-full text-[.85rem] text-center text-muted-foreground font-chakra-regular mt-1",children:eP[Y].description}),(0,s.jsx)(x.z,{onClick:()=>{h.push("/dashboard?location=find-competitors&id="+O.id)},size:"lg",className:"w-[75%] mt-5 mb-10",children:eP[Y].buttonCta})]}),"Find TikToks"===Y&&R&&R.tiktoks.length>0?(0,s.jsx)(SavedTikTokAdsPreview,{selectedTiktoks:R,selectedProduct:O,router:h}):"Find TikToks"!==Y||R?"Find TikToks"===Y&&R&&0===R.tiktoks.length?(0,s.jsxs)("div",{className:"flex flex-col h-full items-center justify-center border border-accent  p-5",children:[eP[Y].icon,(0,s.jsx)("h1",{className:"text-2xl font-chakra-semibold text-foreground mt-3",children:Y}),(0,s.jsx)("div",{className:"w-full text-[.85rem] text-center text-muted-foreground font-chakra-regular mt-1",children:eP[Y].description}),(0,s.jsx)(x.z,{onClick:()=>{h.push("/dashboard?location=find-tiktoks&id="+O.id+"&update=true")},size:"lg",className:"w-[75%] mt-5 mb-10",children:eP[Y].buttonCta})]}):null:(0,s.jsxs)("div",{className:"flex flex-col h-full items-center justify-center border border-accent  p-5",children:[eP[Y].icon,(0,s.jsx)("h1",{className:"text-2xl font-chakra-semibold text-foreground mt-3",children:Y}),(0,s.jsx)("div",{className:"w-full text-[.85rem] text-center text-muted-foreground font-chakra-regular mt-1",children:eP[Y].description}),(0,s.jsx)(x.z,{onClick:()=>{h.push("/dashboard?location=find-tiktoks&id="+O.id)},size:"lg",className:"w-[75%] mt-5 mb-10",children:eP[Y].buttonCta})]}),"Glitch Mode"===Y&&H?(0,s.jsx)(SavedGlitchPreview,{selectedGlitch:H,selectedProduct:O,router:h}):"Glitch Mode"!==Y||H?null:(0,s.jsxs)("div",{className:"flex flex-col h-full items-center justify-center border border-accent p-5",children:[eP[Y].icon,(0,s.jsx)("h1",{className:"text-2xl font-chakra-semibold text-foreground mt-3",children:Y}),(0,s.jsx)("div",{className:"w-full text-[.85rem] text-center text-muted-foreground font-chakra-regular mt-1",children:eP[Y].description}),(0,s.jsx)(x.z,{onClick:()=>{h.push("/dashboard?location=automatic-mode&id="+O.id)},size:"lg",className:"w-[75%] mt-5 mb-10",children:eP[Y].buttonCta})]})]})]})]})})]},a))})},a))]})})]})]})]})}function SavedStorePreview(e){let{selectedProductPage:t,selectedProduct:a,router:r}=e;return(0,s.jsxs)("div",{className:"flex flex-col w-full h-full relative",children:[(0,s.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-gradient-to-b from-background/60 to-background z-10"}),(0,s.jsxs)(x.z,{onClick:()=>{r.push("/dashboard?location=store-builder&id="+a.id)},className:"shadow-lg absolute top-44 lg:top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 z-20",children:["View Saved Store ",(0,s.jsx)(f.s7Z,{className:"ml-1.5 w-4 h-4"})]}),(0,s.jsx)("div",{style:{backgroundColor:t.brandColor[2]},className:"bg-primary-foreground p-3 font-chakra-semibold text-center w-full tracking-wider text-[.85rem] text-foreground outline-none",children:t.offer}),(0,s.jsxs)("div",{className:"bg-primary-foreground p-5 text-foreground font-chakra-semibold text-center w-full tracking-wider flex items-center justify-between relative",children:[(0,s.jsx)(f.RYk,{className:"w-6 h-6 text-foreground/60"}),(0,s.jsx)("img",{src:t.logos[0].startsWith("https://")?t.logos[0]:"data:image/png;base64,".concat(t.logos[0]),alt:"Generated Logo",className:"w-[100px] scale-[150%] saturate-[110%]"}),(0,s.jsx)(ex.Z,{className:"w-6 h-6 text-foreground/60"})]}),(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row h-full p-5 w-full gap-4 bg-foreground",children:[(0,s.jsx)("div",{className:"min-w-full lg:h-[10rem] lg:min-w-[10rem] rounded-[.1rem] overflow-hidden",children:(0,s.jsx)("img",{src:a.images?a.images[0]:"",className:"h-full w-full object-cover",alt:"Product"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[[void 0,void 0,void 0,void 0,void 0].map((e,a)=>(0,s.jsx)(eF.QJe,{style:{color:t.brandColor[2]},className:"w-3 h-3"},a)),(0,s.jsx)("span",{className:"text-muted text-xs",children:"(583)"})]}),(0,s.jsx)("div",{className:"text-lg font-bold text-black outline-none",children:t.viralProductName}),(0,s.jsx)("div",{className:"text-xs font-bold text-black outline-none",children:t.hook}),(0,s.jsx)("div",{className:"text-xs text-black flex flex-col gap-2",children:t.benefits.slice(0,4).map((e,t)=>(0,s.jsx)("div",{className:"flex items-center gap-1",children:e},t))}),(0,s.jsx)("button",{style:{backgroundColor:t.brandColor[2]},className:"p-2 rounded-[.1rem] text-white text-sm mt-2",children:"ADD TO CART"}),(0,s.jsx)("div",{className:"flex justify-between mt-2 text-xs",children:[{text:"Free Shipping",icon:(0,s.jsx)(ey.Z,{className:"w-4 h-4"})},{text:"30 Day Guarantee",icon:(0,s.jsx)(ev.Z,{className:"w-4 h-4"})},{text:"Free Returns",icon:(0,s.jsx)(h.Z,{className:"w-4 h-4"})}].map((e,t)=>{let{text:a,icon:r}=e;return(0,s.jsxs)("div",{className:"flex flex-col items-center",children:[r,(0,s.jsx)("div",{className:"text-center text-[.6rem]",children:a})]},t)})})]})]})]})}function SavedCompetitorsPreview(e){let{selectedCompetitors:t,selectedProduct:a,router:r}=e;return(0,s.jsxs)("div",{className:"flex flex-col w-full h-full lg:max-h-[32rem] overflow-hidden relative",children:[(0,s.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-gradient-to-b from-background/60 to-background z-10"}),(0,s.jsxs)(x.z,{onClick:()=>{r.push("/dashboard?location=find-competitors&id="+a.id)},className:"shadow-lg absolute top-44 lg:top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 z-20",children:["View Saved Competitors ",(0,s.jsx)(f.s7Z,{className:"ml-1.5 w-4 h-4"})]}),t.competitorList.map((e,t)=>(0,s.jsxs)(w.Zb,{className:"mb-4 p-3 lg:p-4 bg-primary-foreground border-accent",children:[(0,s.jsx)("div",{className:"flex items-center gap-4",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"lg:text-xl text-lg font-chakra-bold",children:e.storeName}),(0,s.jsx)("span",{className:"text-sm text-muted-foreground font-chakra-regular mb-1 transition-colors ease-in duration-100 lg:hover:text-foreground",children:e.websiteUrl}),(0,s.jsxs)("p",{className:"text-sm text-primary font-chakra-regular",children:[" ",(0,s.jsx)("span",{className:"inline text-muted-foreground/75",children:"Theme: "}),e.theme||"N/A"]})]})}),(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsxs)("h3",{className:"lg:text-[1rem] text-[.8rem] font-chakra-semibold flex items-center gap-1 lg:gap-2",children:[" ",(0,s.jsx)(eu.Z,{className:"w-4 h-4 text-muted-foreground"})," Relevant products sold by this store"]}),(0,s.jsx)(eC.Z,{className:"my-2"}),e.products.map((t,a)=>(0,s.jsxs)("div",{className:"flex gap-3 p-3 rounded-[.1rem] cursor-pointer transition-all ease-in duration-100 lg:hover:bg-accent",children:[(0,s.jsxs)("div",{className:"lg:min-h-[4rem] lg:min-w-[4rem] min-h-[3rem] min-w-[3rem] lg:max-h-[4rem] lg:max-w-[4rem] max-w-[3rem] max-h-[3rem] rounded-[.1rem] overflow-hidden",children:[!t.imageSrc&&(0,s.jsx)(ej.Z,{className:"w-full h-full text-muted-foreground/75 bg-slate-800 p-1 rounded-[.1rem]"}),(0,s.jsx)("img",{src:t.imageSrc,className:"object-cover w-full"})]}),(0,s.jsxs)("div",{className:"flex flex-col w-full",children:[(0,s.jsxs)("h1",{className:"font-chakra-semibold text-lg text-blue-400 flex items-start justify-between w-full",children:["$"+t.price,(0,s.jsx)(f.s7Z,{className:"text-slate-400 text-2xl"})]}),(0,s.jsx)("div",{className:"text-white font-chakra-medium text-[.85rem]",children:t.name}),(0,s.jsxs)("div",{className:"text-muted-foreground font-chakra-regular text-[.7rem] break-all",children:[e.websiteUrl,"/products/",t.handle]})]})]}))]})]},t))]})}function SavedTikTokAdsPreview(e){let{selectedTiktoks:t,selectedProduct:a,router:r}=e;return(0,s.jsxs)("div",{className:"flex flex-col w-full h-full lg:max-h-[32rem] overflow-hidden relative",children:[(0,s.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-gradient-to-b from-background/60 to-background z-10"}),(0,s.jsxs)(x.z,{onClick:()=>{r.push("/dashboard?location=find-tiktoks&id="+a.id)},className:"shadow-lg absolute top-44 lg:top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 z-20",children:["View Saved TikToks",(0,s.jsx)(f.s7Z,{className:"ml-1.5 w-4 h-4"})]}),t.tiktoks.map((e,t)=>(0,s.jsx)(w.Zb,{className:"mb-4 bg-primary-foreground border-accent lg:p-0 p-3",children:(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row gap-4",children:[(0,s.jsx)("div",{className:"lg:w-1/3 w-1/2 relative",children:(0,s.jsx)("img",{src:e.thumbnailSrc,className:"rounded-[.1rem]"})}),(0,s.jsxs)("div",{className:"lg:w-2/3 w-full flex flex-col gap-1 lg:py-4",children:[e.caption&&(0,s.jsx)("h2",{className:"text-[.9rem] lg:text-[1rem] font-chakra-medium mb-1",children:e.caption.length>200?"".concat(e.caption.slice(0,200),"..."):e.caption}),(0,s.jsxs)("span",{className:"text-sm text-muted-foreground font-chakra-regular mb-1 transition-colors ease-in duration-100 lg:hover:text-foreground",children:["@",e.username]}),(0,s.jsxs)("p",{className:"text-sm text-primary font-chakra-regular",children:[(0,s.jsx)("span",{className:"inline text-muted-foreground/75",children:"Uploaded - "}),e.uploadDate]}),(0,s.jsxs)("p",{className:"text-sm text-primary font-chakra-regular",children:[(0,s.jsx)("span",{className:"inline text-muted-foreground/75",children:" Views: "}),e.views]}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:e.hashtags.map((e,t)=>(0,s.jsx)("span",{className:"text-xs text-blue-500 font-chakra-regular",children:e},t))})]})]})},t))]})}function SavedGlitchPreview(e){let{selectedGlitch:t,selectedProduct:a,router:r}=e;return(0,s.jsxs)("div",{className:"flex flex-col w-full h-full lg:max-h-[32rem] overflow-hidden relative",children:[(0,s.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-gradient-to-b from-background/50 to-background z-10"}),(0,s.jsxs)(x.z,{onClick:()=>{r.push("/dashboard?location=automatic-mode&id="+a.id)},className:"shadow-lg absolute top-44 lg:top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 z-20",children:["View Glitch ",(0,s.jsx)(f.s7Z,{className:"ml-1.5 w-4 h-4"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-4 w-full h-full",children:[(0,s.jsxs)("div",{className:"flex flex-row lg:items-center gap-2 relative cursor-pointer ml-0.5",children:[(0,s.jsx)("div",{className:"lg:min-w-[2.3rem] lg:min-h-[2.3rem] min-w-[1.9rem] min-h-[1.9rem] w-[1.9rem] h-[1.9rem] lg:w-[2.3rem] lg:h-[2.3rem] bg-white rounded-[.1rem] overflow-hidden",children:(0,s.jsx)("img",{src:a.images?a.images[0]:"",className:"w-full h-full object-cover"})}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("div",{className:"font-chakra-regular text-primary lg:text-[.85rem] text-[.6rem]",children:"Selected Product"}),(0,s.jsx)("div",{className:"font-chakra-bold lg:text-[1rem] text-[.8rem] text-foreground flex items-center gap-3",children:window.innerWidth>=1024?a.productName.length>50?"".concat(a.productName.slice(0,50),"..."):a.productName:a.productName.length>30?"".concat(a.productName.slice(0,30),"..."):a.productName})]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 w-full h-full bg-background border border-accent rounded-[.1rem]",children:[(0,s.jsx)("div",{className:"w-full h-[4rem] bg-background border-b border-accent p-4",children:(0,s.jsx)("h1",{className:"text-2xl font-chakra-semibold text-foreground",children:"Execution Plan"})}),(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)("span",{className:"font-chakra-regular text-primary text-sm mb-3",children:"PHASE 1"}),(0,s.jsx)("h2",{className:"font-chakra-bold text-xl mb-4 text-foreground",children:"Online Store Setup"}),(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(w.Zb,{className:"border-accent shadow-xl shadow-slate-950",children:(0,s.jsxs)(w.Ol,{children:[(0,s.jsx)(w.ll,{className:"text-lg mb-1 font-chakra-semibold",children:"Step 1: Sign Up for Shopify"}),(0,s.jsx)(w.SZ,{className:"text-[1rem]",children:"Shopify is a leading e-commerce platform that allows you to create and manage your online store without needing extensive technical knowledge."})]})}),(0,s.jsx)("div",{children:(0,s.jsxs)("ol",{className:"list-inside",children:[(0,s.jsxs)("li",{className:"border border-t-0 border-accent p-6 bg-primary-foreground/70 relative",children:[(0,s.jsx)(v.Z,{className:"w-5 h-5 -top-[11.2px] absolute left-6 bg-accent rounded-[.1rem] z-2 text-muted-foreground"}),(0,s.jsx)(v.Z,{className:"w-5 h-5 -bottom-[11.2px] absolute left-6 bg-accent rounded-[.1rem] z-2 text-muted-foreground"}),(0,s.jsx)("strong",{className:"font-chakra-semibold text-foreground",children:"Get Shopify - $1 For A Month"}),(0,s.jsx)("p",{className:"mt-1 text-muted-foreground font-chakra-regular text-[.9rem]",children:"Go to http://shopify.pxf.io/PyNVMq to claim your discount and create your shopify store."})]}),(0,s.jsxs)("li",{className:"border border-t-0 border-accent p-6 bg-primary-foreground/70 relative",children:[(0,s.jsx)(v.Z,{className:"w-5 h-5 -bottom-[11.2px] absolute left-6 bg-accent rounded-[.1rem] z-2 text-muted-foreground"}),(0,s.jsx)("strong",{className:"font-chakra-semibold text-foreground",children:"Start Free Trial"}),(0,s.jsx)("p",{className:"mt-1 text-muted-foreground font-chakra-regular text-[.9rem]",children:'Click on the "Start free trial" button and enter your email, password, and store name.'})]}),(0,s.jsxs)("li",{className:"border border-t-0 border-accent p-6 bg-primary-foreground/70 relative",children:[(0,s.jsx)(v.Z,{className:"w-5 h-5 -bottom-[11.2px] absolute left-6 bg-accent rounded-[.1rem] z-2 text-muted-foreground"}),(0,s.jsx)("strong",{className:"font-chakra-semibold text-foreground",children:"Answer Setup Questions"}),(0,s.jsx)("p",{className:"mt-1 text-muted-foreground font-chakra-regular text-[.9rem]",children:"Shopify will ask a few questions about your business to tailor your experience."})]}),(0,s.jsxs)("li",{className:"border border-t-0 border-accent p-6 bg-primary-foreground/70 relative",children:[(0,s.jsx)("strong",{className:"font-chakra-semibold text-foreground",children:"Complete Account Setup"}),(0,s.jsx)("p",{className:"mt-1 text-muted-foreground font-chakra-regular text-[.9rem]",children:"Follow the prompts to set up your account details, including your business address and contact information."})]})]})}),(0,s.jsxs)("div",{className:"mb-8 bg-primary/20 border border-t-0 border-accent p-6",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2 -translate-x-1 mb-3",children:[(0,s.jsx)(ek.Z,{className:"w-5 h-5 text-yellow-400"}),(0,s.jsx)("h4",{className:"font-chakra-bold text-lg",children:"Tips"})]}),(0,s.jsxs)("ul",{className:"list-disc list-inside space-y-1 font-chakra-regular text-muted-foreground",children:[(0,s.jsx)("li",{children:"Choose a memorable and relevant store name that reflects your brand."}),(0,s.jsx)("li",{children:"Utilize Shopify's 14-day free trial to explore features before committing."})]})]})]})]})]})]})]})}var eO=a(86650),eZ=a(2934),eM=a(76915),eU=a(13025),eR=a(64812),eG=a(61512),eL=a.n(eG),eV=JSON.parse('{"v":"5.5.4","fr":25,"ip":0,"op":20,"w":1500,"h":1000,"nm":"Composition 1","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":270,"ix":10},"p":{"a":0,"k":[900,364,0],"ix":2},"a":{"a":0,"k":[-10,-56,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-10,-56],[-10,-268]],"c":false},"ix":2},"nm":"Trac\xe9 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.1451,0.3882,0.9216,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":15,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Forme 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":8.23,"s":[0]},{"t":14,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":4,"s":[0]},{"t":9,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"R\xe9duire les trac\xe9s 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":4,"op":62,"st":4,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":270,"ix":10},"p":{"a":0,"k":[800,404,0],"ix":2},"a":{"a":0,"k":[-10,-56,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-10,-56],[-10,-268]],"c":false},"ix":2},"nm":"Trac\xe9 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.1451,0.3882,0.9216,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":15,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Forme 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":5.23,"s":[0]},{"t":11,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":1,"s":[0]},{"t":6,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"R\xe9duire les trac\xe9s 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":1,"op":59,"st":1,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":270,"ix":10},"p":{"a":0,"k":[740,444,0],"ix":2},"a":{"a":0,"k":[-10,-56,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-10,-56],[-10,-268]],"c":false},"ix":2},"nm":"Trac\xe9 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.1451,0.3882,0.9216,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":15,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Forme 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":8.23,"s":[0]},{"t":14,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":4,"s":[0]},{"t":9,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"R\xe9duire les trac\xe9s 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":4,"op":62,"st":4,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":270,"ix":10},"p":{"a":0,"k":[840,484,0],"ix":2},"a":{"a":0,"k":[-10,-56,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-10,-56],[-10,-268]],"c":false},"ix":2},"nm":"Trac\xe9 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.1451,0.3882,0.9216,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":15,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Forme 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":4.23,"s":[0]},{"t":10,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"t":5,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"R\xe9duire les trac\xe9s 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":58,"st":0,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"Pr\xe9comp. 2","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-90,"ix":10},"p":{"a":0,"k":[758,508,0],"ix":2},"a":{"a":0,"k":[750,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":21,"nm":"Remplir","np":9,"mn":"ADBE Fill","ix":1,"en":1,"ef":[{"ty":10,"nm":"Remplir le masque","mn":"ADBE Fill-0001","ix":1,"v":{"a":0,"k":0,"ix":1}},{"ty":7,"nm":"Tous les masques","mn":"ADBE Fill-0007","ix":2,"v":{"a":0,"k":0,"ix":2}},{"ty":2,"nm":"Couleur","mn":"ADBE Fill-0002","ix":3,"v":{"a":0,"k":[0.259,0.4813,0.961,1],"ix":3}},{"ty":7,"nm":"Inversion","mn":"ADBE Fill-0006","ix":4,"v":{"a":0,"k":0,"ix":4}},{"ty":0,"nm":"Contour progressif horizontal","mn":"ADBE Fill-0003","ix":5,"v":{"a":0,"k":0,"ix":5}},{"ty":0,"nm":"Contour progressif vertical","mn":"ADBE Fill-0004","ix":6,"v":{"a":0,"k":0,"ix":6}},{"ty":0,"nm":"Opacit\xe9 ","mn":"ADBE Fill-0005","ix":7,"v":{"a":0,"k":1,"ix":7}}]}],"w":1500,"h":1000,"ip":3,"op":23,"st":3,"bm":0},{"ddd":0,"ind":2,"ty":0,"nm":"Pr\xe9comp. 2","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-90,"ix":10},"p":{"a":0,"k":[918,508,0],"ix":2},"a":{"a":0,"k":[750,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1500,"h":1000,"ip":0,"op":20,"st":0,"bm":0}],"markers":[]}'),eH=a(79464),eq=a(42297),eW=a(1368),eQ={src:"/_next/static/media/current-theme.f976a582.png",height:500,width:1500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAAJ1BMVEXJx8ehjn9dV1KoiXqGa1pvd3WhnZqff213amCYhoC5uLd1YFitqqjAvXERAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAIElEQVR4nGNgAAEuHgYGdkZGZmZODjYGJhYWbiZWVjYABGYAZHftUhYAAAAASUVORK5CYII=",blurWidth:8,blurHeight:3},eY={src:"/_next/static/media/pulsing-circle.126fb9a2.svg",height:40,width:40,blurWidth:0,blurHeight:0},eJ={src:"/_next/static/media/tutorial-product-2.1bff26fa.png",height:500,width:1100,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAAD1BMVEX19fXs7Oz5+vvN4fvg6fWjmcb4AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAGklEQVR4nGNgAAEWEMHIwMTADKLBgAksAQYAAY8AE12k9l0AAAAASUVORK5CYII=",blurWidth:8,blurHeight:4},eK={src:"/_next/static/media/tutorial-product-3.b4699894.png",height:500,width:1100,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAAD1BMVEX5+fjz8/P9/f7n6+7W5Pacgl6RAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAIUlEQVR4nBXHsQ0AMBCEMOB+/5mjuDNT3USAO6hi/QLiAwNUACc2AI7pAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:4},eX={src:"/_next/static/media/default-home-page.0f9ce3a3.png",height:1428,width:2938,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAAMFBMVEWPdGI/SkiTeWwkPz06ZGkzW1yBbmRPODRSbWqGaV5RWVlzW1RcYl5wYlowOTU3VFP63PfWAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAJ0lEQVR4nAXBhwEAIAgEsXuKYN1/XBP2xMAMrQHjHjKjWxIR/tyrPgorAJnIpAPUAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:4};function ImportToShopifyButton(e){let{toast:t,brandColor:a,storeName:r,viralProductName:n,logos:l,selectedLogo:u,selectedProduct:m,editHook:h,editBenefit1:p,editBenefit2:g,editBenefit3:b,editBenefit4:w,editHeadline1:y,editDescription1:v,editHeadline2:j,editDescription2:k,editHeadline3:T,editDescription3:D,editHeadline4:z,editDescription4:I,editCta:E,editOffer:F}=e,B=(0,o.useRouter)(),{currentUser:_,getShopifyInfo:O,getAutoDsInfo:Z}=(0,d.a)(),[M,U]=(0,i.useState)(!1),[R,G]=(0,i.useState)(!1),[L,V]=(0,i.useState)(""),[H,q]=(0,i.useState)(!1),[Q,Y]=(0,i.useState)(null),[J,K]=(0,i.useState)(null),[X,ee]=(0,i.useState)(null),[et,ea]=(0,i.useState)(null),[es,er]=(0,i.useState)(null),[en,ei]=(0,i.useState)(!1),[eo,el]=(0,i.useState)("Dawn"),[ec,ed]=(0,i.useState)(""),[eu,em]=(0,i.useState)(""),[eh,ep]=(0,i.useState)(!1),[eg,ef]=(0,i.useState)(""),[eb,ew]=(0,i.useState)(""),[ey,ev]=(0,i.useState)(!1),[ej,ek]=(0,i.useState)(!1),[eS,eT]=(0,i.useState)(null);(0,i.useRef)(eS);let[eF,e_]=(0,i.useState)(0),[eU,eR]=(0,i.useState)("no"),[eG,eL]=(0,i.useState)("no");(0,i.useRef)(null);let[eV,eH]=(0,i.useState)(null),[e$,e0]=(0,i.useState)(0);async function connectStore(){if(0===eg.length||0===eb.length){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Cannot connect store. Please fill out both fields.",variant:"destructive"});return}if(!eb.includes("shpat_")){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Invalid app token.",variant:"destructive"});return}if(!function(e){if(e.startsWith("http://")||e.startsWith("https://"))return console.log("URL should not start with http:// or https://"),!1;let t=/^([\w-]+(\.[\w-]+)+)([/\w- .]*)*\/?$/.test(e);return t}(eg)){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Invalid store URL.",variant:"destructive"});return}t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Connecting"]}),description:"Connecting your store to Glitching..."}),q(!0);let e=await fetch("/api/shopify/createShopifyDocument?uid=".concat(_.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+_.accessToken},body:JSON.stringify({shopifyUrl:eg,appToken:eb})});if(!e.ok){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Could not connect your store to Glitching. Contact support for assistance.",variant:"destructive"}),q(null);return}let a=await O(_);await fetchPublishedTheme(a.url),ei(!0),ef(a.url),t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Connected your store to Glitching!"}),q(null)}async function importToShopify(){t({title:(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("span",{className:"flex flex-row items-center gap-1.5 bg-yellow-300 text-yellow-800 font-chakra-medium rounded-[.1rem] text-[.7rem] px-1 w-fit mb-2",children:[(0,s.jsx)(eP.Z,{className:"lg:w-4 lg:h-4 w-3 h-3 text-yellow-800"})," DO NOT LEAVE THIS PAGE"]}),(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Importing..."]})]}),description:"Please stay on this page while we import your store to Shopify."}),ev(!0);let e="",i=Date.now();if(e="glitching-".concat(("no"===eU?m.productName.replace(/'/g,""):n).replace(/[^\w\s]/g,"").replace(/\s+/g,"-").toLowerCase(),"-").concat(i),es&&et){if(!m.aliexpressLink){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(c(),{src:W.Z,alt:"AutoDS Logo",width:60}),"AutoDS Error"]}),description:"This product was not imported from AliExpress so it cannot be imported to AutoDS.",action:(0,s.jsx)(x.z,{size:"sm",variant:"destructive",className:"border border-foreground/20",onClick:()=>{B.push("/dashboard?location=integrations&to=auto-ds&help=true")},children:"Help"}),variant:"destructive"}),ev(!1);return}let i=await fetch("/api/shopify/createImages?uid=".concat(_.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+_.accessToken},body:JSON.stringify({images:m.images})});if(!i.ok){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Couldn't import product. Click here for help.",action:(0,s.jsx)(x.z,{size:"sm",variant:"destructive",className:"border border-foreground/20",onClick:()=>{B.push("/dashboard?location=integrations&to=shopify-store&help=true")},children:"Help"}),variant:"destructive"}),ev(!1);return}let o=await i.json(),d=o.map(e=>/^[A-Za-z0-9]{20,}\.jpg$/.test(e)?e.replace(/\.jpg$/,".webp"):e),f=await fetch("/api/auto-ds/importProduct?uid=".concat(_.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+_.accessToken},body:JSON.stringify({encryptedIdToken:Q,idTokenTimestamp:X,encryptedRefreshToken:J,aliexpressTitle:m.productName,productPrice:m.amazonPrice,aliexpressAsin:function(e){let t=e.match(/\/(\d+\.html)/);return t&&t[1]?t[1].replace(".html",""):null}(m.aliexpressLink)})});if(!f.ok){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(c(),{src:W.Z,alt:"AutoDS Logo",width:60}),"AutoDS Error"]}),description:"Couldn't import product. Click here for help.",action:(0,s.jsx)(x.z,{size:"sm",variant:"destructive",className:"border border-foreground/20",onClick:()=>{B.push("/dashboard?location=integrations&to=auto-ds&help=true")},children:"Help"}),variant:"destructive"}),ev(!1);return}let N=await fetch("/api/shopify/theme?uid=".concat(_.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+_.accessToken},body:JSON.stringify({themeName:ec,themeId:eu,editProductName:"no"===eU?m.productName.replace(/'/g,""):n,editHook:h,editBenefit1:p,editBenefit2:g,editBenefit3:b,editBenefit4:w,editHeadline1:y,editDescription1:v,editHeadline2:j,editDescription2:k,editHeadline3:T,editDescription3:D,editHeadline4:z,editDescription4:I,editCta:E,images:m.images,imageLocations:d,cost:m.aliexpressPrice,price:m.amazonPrice,templateName:e,brandColor:a})}),A=null;if("yes"===eU){let e=await fetch("/api/shopify/theme-settings?uid=".concat(_.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+_.accessToken},body:JSON.stringify({themeName:ec,themeId:eu,logoLocation:l,selectedLogo:u,brandColor:a})});if(!e.ok){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Couldn't import product. Theme settings couldn't be saved. Click here for help.",variant:"destructive"}),ev(!1);return}let r=await e.json();A=r.formattedLogoUrl}if("yes"===eG){let e=await fetchHomePageImage();if(eT(e),e)try{let t=await fetch("/api/shopify/home-page?uid=".concat(_.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+_.accessToken},body:JSON.stringify({themeName:ec,themeId:eu,painPoints:m.report.painPoints,productDescription:m.productDescription,editProductName:"no"===eU?m.productName.replace(/'/g,""):n,homePageImage:e,logoId:A,storeName:r})});if(!t.ok)throw Error("Home page couldn't be saved")}catch(e){if(console.error("Error importing home page: ".concat(e.message)),retryCount===maxRetries-1){console.error("Max retries reached. Home page import failed."),t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Couldn't import product. Home page couldn't be saved. Click here for help.",variant:"destructive"}),ev(!1);return}}}if(!N.ok){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Couldn't import product. Click here for help.",action:(0,s.jsx)(x.z,{size:"sm",variant:"destructive",className:"border border-foreground/20",onClick:()=>{B.push("/dashboard?location=integrations&to=shopify-store&help=true")},children:"Help"}),variant:"destructive"}),ev(!1);return}t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Store importing to Shopify, it will take ~3 minutes to complete."}),ev(!1),G(!0),V("autods"),U(!0),e_(0);return}{let i=await fetch("/api/shopify/uploadTheme?uid=".concat(_.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+_.accessToken},body:JSON.stringify({themeName:ec,themeId:eu,templateName:e,editProductName:"no"===eU?m.productName.replace(/'/g,""):n,editHook:h,editBenefit1:p,editBenefit2:g,editBenefit3:b,editBenefit4:w,editHeadline1:y,editDescription1:v,editHeadline2:j,editDescription2:k,editHeadline3:T,editDescription3:D,editHeadline4:z,editDescription4:I,editCta:E,images:m.images,cost:m.aliexpressPrice,price:m.amazonPrice,brandColor:a})});if(!i.ok){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Couldn't import product. Click here for help.",action:(0,s.jsx)(x.z,{size:"sm",variant:"destructive",className:"border border-foreground/20",onClick:()=>{B.push("/dashboard?location=integrations&to=shopify-store&help=true")},children:"Help"}),variant:"destructive"}),ev(!1);return}let o=await fetch("/api/shopify/import?uid=".concat(_.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+_.accessToken},body:JSON.stringify({editProductName:"no"===eU?m.productName.replace(/'/g,""):n,cost:m.aliexpressPrice,images:m.images.slice(0,5),price:m.amazonPrice,templateName:e})});if(!o.ok){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Couldn't import product. Click here for help.",action:(0,s.jsx)(x.z,{size:"sm",variant:"destructive",className:"border border-foreground/20",onClick:()=>{B.push("/dashboard?location=integrations&to=shopify-store&help=true")},children:"Help"}),variant:"destructive"}),t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Store imported to Shopify!"});return}let c=await o.json(),d=await fetch("/api/shopify/theme?uid=".concat(_.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+_.accessToken},body:JSON.stringify({themeName:ec,themeId:eu,editProductName:"no"===eU?m.productName.replace(/'/g,""):n,editHook:h,editBenefit1:p,editBenefit2:g,editBenefit3:b,editBenefit4:w,editHeadline1:y,editDescription1:v,editHeadline2:j,editDescription2:k,editHeadline3:T,editDescription3:D,editHeadline4:z,editDescription4:I,editCta:E,imageLocations:c,cost:m.aliexpressPrice,price:m.amazonPrice,templateName:e,brandColor:a})}),f=null;if("yes"===eU){let e=await fetch("/api/shopify/theme-settings?uid=".concat(_.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+_.accessToken},body:JSON.stringify({themeName:ec,themeId:eu,logoLocation:l,selectedLogo:u,brandColor:a,editOffer:F})});if(!e.ok){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Couldn't import product. Theme settings couldn't be saved. Click here for help.",variant:"destructive"}),ev(!1);return}let r=await e.json();f=r.formattedLogoUrl}if("yes"===eG){let e=await fetchHomePageImage();if(eT(e),e)try{let t=await fetch("/api/shopify/home-page?uid=".concat(_.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+_.accessToken},body:JSON.stringify({themeName:ec,themeId:eu,painPoints:m.report.painPoints,productDescription:m.productDescription,editProductName:"no"===eU?m.productName.replace(/'/g,""):n,homePageImage:e,logoId:f,storeName:r})});if(!t.ok)throw Error("Home page couldn't be saved")}catch(e){if(console.error("Error importing home page: ".concat(e.message)),retryCount===maxRetries-1){console.error("Max retries reached. Home page import failed."),t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Couldn't import product. Home page couldn't be saved. Click here for help.",variant:"destructive"}),ev(!1);return}}}if(!d.ok){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Couldn't import product. Click here for help.",action:(0,s.jsx)(x.z,{size:"sm",variant:"destructive",className:"border border-foreground/20",onClick:()=>{B.push("/dashboard?location=integrations&to=shopify-store&help=true")},children:"Help"}),variant:"destructive"}),ev(!1);return}t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Storeimported to Shopify!"}),ev(!1),G(!0),V("shopify"),U(!0),e_(0);return}}async function fetchPublishedTheme(e){let t=await fetch("/api/shopify/getPublishedTheme?uid=".concat(_.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+_.accessToken},body:JSON.stringify({url:e})}),a=await t.json(),s=a.themeObject;if(!s)return;let r=s.themeName;"SHRINE-THEME-LITE"===r&&(r="SHRINE-LITE"),ed(r),em(s.themeId),el("".concat(r))}(0,i.useEffect)(()=>{eV&&(e0(eV.selectedScrollSnap()+1),eV.on("select",()=>{e0(eV.selectedScrollSnap()+1)}))},[eV]),(0,i.useEffect)(()=>{_&&(O(_).then(e=>{if(!e){ei(!1);return}ei(!0),ef(e.url),ew(e.token),fetchPublishedTheme(e.url)}),Z(_).then(e=>{if(!e){er(!1);return}Y(e.encryptedIdToken),K(e.encryptedRefreshToken),ee(e.idTokenTimestamp),ea(e.storeUrl),er(!0)}))},[_]);let fetchHomePageImage=async()=>{try{let e=await fetch("/api/misc/home-page-image?uid=".concat(_.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+_.accessToken},body:JSON.stringify({description:m.productDescription})});if(!e.ok)throw Error("Failed to create image");let t=await e.json(),a=await uploadBase64ImageToFirebase(t.imageUrl,_.uid);return a}catch(e){return}};async function uploadBase64ImageToFirebase(e,t){try{let a=Math.random().toString(36).substring(2,15),s=(0,eO.iH)(eZ.t,"/users/".concat(t,"/").concat(a,".png")),r=e,n="image/png";if(r.startsWith("data:")){let e=r.match(/^data:(.+);base64,(.*)$/);if(e)n=e[1],r=e[2];else throw Error("Invalid base64 data URL")}let i=atob(r),o=Array(i.length);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);let l=new Uint8Array(o),c=new Blob([l],{type:n}),d=await (0,eO.KV)(s,c),u=await (0,eO.Jt)(d.ref);return u}catch(e){throw console.error("Error uploading image to Firebase:",e),e}}return(0,s.jsx)(s.Fragment,{children:en?(0,s.jsxs)(eA.Vq,{open:M,onOpenChange:e=>{U(e),e&&(G(!1),V(""))},children:[(0,s.jsx)(eA.hg,{asChild:!0,children:(0,s.jsx)(x.z,{disabled:ey,variant:"secondary",size:"lg",className:"w-[12rem]",children:ey?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 mr-1.5 animate-spin"})," Importing "]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c(),{src:eD.Z,alt:"Shopify Logo",width:15,className:"mr-2"})," Import To Shopify"]})})}),(0,s.jsxs)(eA.cZ,{className:"border-accent flex flex-col gap-0",children:[!R&&(0,s.jsx)(eW.aG,{children:(0,s.jsxs)(eW.Jb,{className:"font-chakra-regular mt-2 lg:text-[.9rem] text-[.8rem]",children:[(0,s.jsx)(eW.gN,{className:0===eF?"text-primary font-bold cursor-pointer":"transition-all ease-in duration-100 hover:text-foreground cursor-pointer",onClick:()=>e_(0),children:"Theme"}),(0,s.jsx)(eW.bg,{}),(0,s.jsx)(eW.gN,{className:1===eF?"text-primary font-bold cursor-pointer":"transition-all ease-in duration-100 hover:text-foreground cursor-pointer",onClick:()=>eF>1?e_(1):null,children:"Branding"}),(0,s.jsx)(eW.bg,{}),(0,s.jsx)(eW.gN,{className:2===eF?"text-primary font-bold cursor-pointer":"transition-all ease-in duration-100 hover:text-foreground cursor-pointer",onClick:()=>eF>2?e_(2):null,children:"Home Page"}),(0,s.jsx)(eW.bg,{}),(0,s.jsx)(eW.gN,{className:3===eF?"text-primary font-bold cursor-pointer":"transition-all ease-in duration-100 hover:text-foreground cursor-pointer",onClick:()=>eF>3?e_(3):null,children:"Import"})]})}),0===eF&&!R&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h1",{className:"font-chakra-semibold text-white mt-4",children:"Select Your Theme"}),(0,s.jsxs)("p",{className:"font-chakra-regular mt-1 bg-yellow-300 text-yellow-900 p-2 flex items-center gap-1 text-[.75rem] rounded-[.1rem]",children:[(0,s.jsx)(eP.Z,{className:"min-w-4 h-4 mr-1.5"})," The theme you select must be the same as your store's published theme!"]}),(0,s.jsx)("div",{className:"relative w-full mt-3",children:(0,s.jsx)(c(),{src:eQ,alt:"ai that makes a product page",className:"rounded-t-[.1rem]"})}),(0,s.jsxs)("div",{className:"w-full flex flex-row items-center justify-between bg-slate-800 rounded-b-[.1rem]  px-3",children:[(0,s.jsxs)("div",{className:"hidden font-chakra-regular text-slate-400 text-[.7rem] lg:text-[.8rem] lg:flex items-center gap-1",children:["Your store's published theme - ",(0,s.jsx)("span",{className:"text-white",children:ec})," ",(0,s.jsx)(c(),{src:eY,alt:"high converting product pages",className:"-translate-x-4 lg:-translate-x-3 scale-[40%] lg:scale-[50%]"}),"  "]}),(0,s.jsxs)("div",{className:"lg:hidden font-chakra-regular text-slate-400 text-[.7rem] lg:text-[.8rem] flex items-center gap-1",children:["Your store's theme: ",(0,s.jsx)("span",{className:"text-white",children:ec})," ",(0,s.jsx)(c(),{src:eY,alt:"high converting product pages",className:"-translate-x-4 lg:-translate-x-3 scale-[40%] lg:scale-[50%]"}),"  "]}),(0,s.jsx)(x.z,{onClick:async()=>{ep(!0),await fetchPublishedTheme(eg),ep(!1)},size:"sm",className:"h-[1.5rem]",children:eh?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 mr-1.5 animate-spin"})," Loading "]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eq.Z,{className:"w-4 h-4 mr-1.5"})," Refresh"]})})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2 w-full relative mt-3",children:(0,s.jsxs)(S.Ph,{value:eo,onValueChange:el,defaultValue:"Dawn",children:[(0,s.jsx)(S.i4,{className:"text-foreground",children:(0,s.jsx)(S.ki,{})}),(0,s.jsxs)(S.Bw,{children:[(0,s.jsx)(S.Ql,{value:"Dawn",children:"Dawn"}),(0,s.jsx)(S.Ql,{value:"Sense",children:"Sense"}),(0,s.jsx)(S.Ql,{value:"Refresh",children:"Refresh"}),(0,s.jsx)(S.Ql,{value:"Craft",children:"Craft"}),(0,s.jsx)(S.Ql,{value:"Spotlight",children:"Spotlight"}),(0,s.jsx)(S.Ql,{value:"Shrine LITE",children:"Shrine LITE"}),(0,s.jsx)(S.Ql,{value:"Shrine",children:"Shrine"}),(0,s.jsx)(S.Ql,{value:"Shrine PRO",children:"Shrine PRO"})]})]})}),(0,s.jsx)(x.z,{onClick:()=>{if(""===eu){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"We couldn't fetch your store's information. Make sure your store is not password protected.",variant:"destructive"});return}if("Dawn"!==ec&&"Sense"!==ec&&"Refresh"!==ec&&"Craft"!==ec&&"Spotlight"!==ec&&"Shrine"!==ec&&"Shrine LITE"!==ec&&"Shrine PRO"!==ec){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Your store's theme is not supported. Please use one of the selectable options.",variant:"destructive"});return}if(ec!==eo){t({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(ez.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Your store's theme does not match the selected theme.",variant:"destructive"});return}e_(1)},className:"w-full mt-8",children:"Next Step"})]}),1===eF&&!R&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h1",{className:"font-chakra-semibold text-foreground mt-4",children:"Do you want to import the branding to your store?"}),(0,s.jsxs)("p",{className:"font-chakra-regular mt-1 bg-yellow-300 text-yellow-900 p-2 flex items-center gap-1 text-[.75rem] rounded-[.1rem]",children:[(0,s.jsx)(eP.Z,{className:"min-w-4 h-4 mr-1.5"})," This will override the current color settings in your store. "]}),(0,s.jsx)("div",{className:"w-full flex flex-col gap-2 bg-primary-foreground border border-accent p-3 mt-3",children:(0,s.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("h2",{className:"font-chakra-semibold text-foreground text-[.9rem]",children:"Selected Logo"}),l&&l.length>0&&(0,s.jsx)("img",{src:l[u].startsWith("https://")?l[u]:"data:image/png;base64,".concat(l[u]),alt:"Selected Logo",width:120,height:120,objectFit:"cover",className:"border border-accent"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("h2",{className:"font-chakra-semibold text-foreground text-[.9rem]",children:"Brand Colors"}),(0,s.jsx)("div",{className:"flex flex-row flex-wrap gap-3",children:a.map((e,t)=>(0,s.jsx)(eB.pn,{delayDuration:10,children:(0,s.jsxs)(eB.u,{children:[(0,s.jsx)(eB.aJ,{asChild:!0,children:(0,s.jsx)("div",{className:"w-6 h-6 rounded-[.1rem] border border-accent cursor-pointer",style:{backgroundColor:e},onClick:()=>navigator.clipboard.writeText(e)})}),(0,s.jsx)(eB._v,{onClick:()=>navigator.clipboard.writeText(e),className:"bg-background text-foreground border border-accent cursor-pointer",children:(0,s.jsxs)("p",{className:"flex items-center gap-1",children:[" ",(0,s.jsx)(eM.Z,{className:"w-4 h-4 text-muted-foreground"}),e]})})]})},t))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"font-chakra-semibold text-foreground text-[.9rem]",children:"Store Name"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:r})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"font-chakra-semibold text-foreground text-[.9rem]",children:"Product Name"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:n})]})]})}),(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3",children:[(0,s.jsxs)(x.z,{onClick:()=>{eR("no"),e_(2)},variant:"secondary",className:"w-full mt-8",children:[(0,s.jsx)(f.Pxu,{className:"w-4 h-4 mr-2"})," No"]}),(0,s.jsxs)(x.z,{onClick:()=>{eR("yes"),e_(2)},className:"w-full mt-8",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 mr-2"})," Yes"]})]})]}),2===eF&&!R&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h1",{className:"font-chakra-semibold text-foreground mt-4",children:"Do you want to Glitching to import a homepage aswell?"}),(0,s.jsxs)("p",{className:"font-chakra-regular mt-1 bg-yellow-300 text-yellow-900 p-2 flex items-center gap-1 text-[.75rem] rounded-[.1rem]",children:[(0,s.jsx)(eP.Z,{className:"min-w-4 h-4 mr-1.5"})," This will override your current homepage. "]}),(0,s.jsxs)("div",{className:"w-full flex flex-col border border-accent mt-3",children:[(0,s.jsx)("div",{style:{backgroundColor:a[2]},className:"bg-primary-foreground p-3 text-foreground font-chakra-semibold text-center w-full tracking-wider text-[.75rem]",children:"Free Shipping + Money Back Guarantee"}),(0,s.jsxs)("div",{className:"bg-black p-3 text-foreground font-chakra-semibold text-center w-full tracking-wider flex items-center justify-between",children:[(0,s.jsx)(f.RYk,{className:"w-4 h-4 text-foreground"}),(0,s.jsx)("img",{src:l[u].startsWith("https://")?l[u]:"data:image/png;base64,".concat(l[u]),alt:"Generated Logo",className:"w-[100px] scale-[150%] saturate-[110%]"}),(0,s.jsx)(ex.Z,{className:"w-4 h-4 text-foreground"})]}),(0,s.jsx)("div",{className:"w-full overflow-hidden relative bg-white",children:(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"relative w-full h-auto ",children:[(0,s.jsx)(c(),{src:eX,alt:"Home page badge",className:"w-full h-auto min-h-[16.5rem] object-cover opacity-75"}),(0,s.jsx)("div",{className:"absolute inset-0 bg-black opacity-25"})]})})})]}),(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3",children:[(0,s.jsxs)(x.z,{onClick:()=>{eL("no"),e_(3)},variant:"secondary",className:"w-full mt-8",children:[(0,s.jsx)(f.Pxu,{className:"w-4 h-4 mr-2"})," No"]}),(0,s.jsxs)(x.z,{onClick:()=>{eL("yes"),e_(3)},className:"w-full mt-8",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 mr-2"})," Yes"]})]})]}),3===eF&&!R&&(0,s.jsxs)("div",{className:"text-foreground",children:[(0,s.jsx)("h1",{className:"font-chakra-semibold text-foreground mt-4",children:"Ready to import"}),(0,s.jsxs)("div",{className:"flex flex-col gap-4 mt-4 p-5 bg-primary-foreground border border-accent rounded-[.1rem]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{className:"font-chakra-regular text-muted-foreground",children:"Theme"}),(0,s.jsx)("span",{className:"font-chakra-semibold",children:eo})]}),(0,s.jsx)(eC.Z,{className:"w-full my-2"}),(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{className:"font-chakra-regular text-muted-foreground",children:"Branding"}),(0,s.jsx)("span",{className:"font-chakra-semibold",children:"yes"===eU?"Yes":"No"})]}),(0,s.jsx)(eC.Z,{className:"w-full my-2"}),(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{className:"font-chakra-regular text-muted-foreground",children:"Homepage"}),(0,s.jsx)("span",{className:"font-chakra-semibold",children:"yes"===eG?"Yes":"No"})]})]}),(0,s.jsx)(x.z,{onClick:importToShopify,className:"w-full mt-6",disabled:ey,children:ey?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 mr-2 animate-spin"}),"Importing"]}):(0,s.jsx)(s.Fragment,{children:"Import to Shopify"})})]}),R&&(0,s.jsxs)("div",{className:"text-foreground",children:[(0,s.jsxs)("h1",{className:"font-chakra-semibold text-foreground mb-4 text-lg lg:text-xl flex items-center gap-1",children:[(0,s.jsx)(P.Z,{className:"min-w-5 h-5 mr-1.5 text-green-500"})," How to view your imported store"]}),(0,s.jsx)("div",{className:"font-chakra-regular",children:(0,s.jsx)("ol",{className:"list-decimal list-inside space-y-4",children:"autods"===L?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("li",{className:"text-muted-foreground",children:["Wait for your product to import on AutoDS ",(0,s.jsx)("span",{className:"font-chakra-semibold text-foreground",children:"(~3 minutes)"})]}),(0,s.jsx)("li",{className:"text-muted-foreground",children:'Click on "Products" tab in the Shopify admin dashboard to view your product.'}),(0,s.jsx)("li",{className:"text-muted-foreground",children:"Select the theme template with your product name in it."}),(0,s.jsx)("li",{className:"text-muted-foreground",children:'Click on "Preview" to see your product page.'})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("li",{className:"text-muted-foreground",children:["Go to your store: ",(0,s.jsx)("a",{href:eg.startsWith("https://")?eg:"https://".concat(eg),target:"_blank",className:"ml-0.5 text-foreground z-10 underline",children:eg})]}),(0,s.jsx)("li",{className:"text-muted-foreground",children:"Check out your homepage."}),(0,s.jsxs)("li",{className:"text-muted-foreground",children:["Go to your ",(0,s.jsx)("a",{href:"".concat(eg.startsWith("https://")?eg:"https://".concat(eg),"/collections/all"),target:"_blank",className:"text-foreground underline",children:"collections"})," & click on the imported product"]}),(0,s.jsx)("li",{className:"text-muted-foreground",children:"Check out your product page."})]})})}),(0,s.jsx)("div",{className:"relative mt-4",children:"autods"!==L?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{style:{backgroundColor:a[2]},className:"bg-primary-foreground p-3 text-foreground font-chakra-semibold text-center w-full tracking-wider text-[.75rem]",children:"Free Shipping + Money Back Guarantee"}),(0,s.jsxs)("div",{className:"bg-black p-3 text-foreground font-chakra-semibold text-center w-full tracking-wider flex items-center justify-between",children:[(0,s.jsx)(f.RYk,{className:"w-4 h-4 text-foreground"}),(0,s.jsx)("img",{src:l[u].startsWith("https://")?l[u]:"data:image/png;base64,".concat(l[u]),alt:"Generated Logo",className:"w-[100px] scale-[150%] saturate-[110%]"}),(0,s.jsx)(ex.Z,{className:"w-4 h-4 text-foreground"})]}),(0,s.jsxs)("div",{className:"relative w-full h-auto ",children:[(0,s.jsx)("img",{src:eS,alt:"Home page badge",className:"w-full h-auto lg:min-h-[17rem] object-cover opacity-75"}),(0,s.jsx)("div",{className:"absolute inset-0 bg-black opacity-25"})]}),(0,s.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-white translate-y-10",children:[(0,s.jsx)("h2",{className:"text-xl text-center lg:text-3xl font-chakra-bold mb-4",children:"Browse Our Latest Products"}),(0,s.jsx)(x.z,{className:"px-6 py-3 font-semibold rounded pointer-events-none",style:{backgroundColor:a[2]},children:"Shop Now"})]})]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(eN.lr,{setApi:eH,children:[(0,s.jsxs)(eN.KI,{children:[(0,s.jsx)(eN.d$,{children:(0,s.jsx)(c(),{src:eE,alt:"autods guide",className:"w-full h-auto"})}),(0,s.jsx)(eN.d$,{children:(0,s.jsx)(c(),{src:eI,alt:"autods guide step 1",className:"w-full h-auto"})}),(0,s.jsx)(eN.d$,{children:(0,s.jsx)(c(),{src:eJ,alt:"autods guide step 2",className:"w-full h-auto"})}),(0,s.jsx)(eN.d$,{children:(0,s.jsx)(c(),{src:eK,alt:"autods guide step 3",className:"w-full h-auto"})})]}),(0,s.jsxs)("div",{className:"w-full flex justify-center items-center gap-2 mt-4",children:[(0,s.jsx)(x.z,{variant:"outline",size:"icon",className:"h-8 w-8 rounded-[.1rem]",onClick:()=>null==eV?void 0:eV.scrollPrev(),children:(0,s.jsx)(f.Y4O,{className:"h-4 w-4"})}),[1,2,3,4].map(e=>(0,s.jsx)(x.z,{variant:e$===e?"default":"outline",size:"icon",className:"h-8 w-8 rounded-[.1rem]",onClick:()=>null==eV?void 0:eV.scrollTo(e-1),children:e},e)),(0,s.jsx)(x.z,{variant:"outline",size:"icon",className:"h-8 w-8 rounded-[.1rem]",onClick:()=>null==eV?void 0:eV.scrollNext(),children:(0,s.jsx)(f.LZ3,{className:"h-4 w-4"})})]})]})})})]})]})]}):(0,s.jsxs)(eA.Vq,{children:[(0,s.jsx)(eA.hg,{asChild:!0,children:(0,s.jsxs)(x.z,{variant:"secondary",size:"lg",className:"w-[12rem]",children:[(0,s.jsx)(c(),{src:eD.Z,alt:"Shopify Logo",width:15,className:"mr-2"})," Import To Shopify"]})}),(0,s.jsxs)(eA.cZ,{className:"border-accent max-w-[600px]",children:[(0,s.jsx)(eA.fK,{children:(0,s.jsx)(eA.$N,{children:"Connect Your Store"})}),(0,s.jsxs)("div",{onClick:()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank")},className:"p-2 lg:p-3 lg:px-5 w-full bg-primary-foreground border border-accent rounded-[.1rem] flex flex-row items-center justify-between gap-5 shadow-xl shadow-slate-950 ",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-4",children:[(0,s.jsx)(c(),{src:$.Z,alt:"shopify logo affiliate promo",className:"w-[80px] lg:w-[100px] "}),(0,s.jsx)("div",{className:"hidden lg:block scale-x-[250%] font-chakra-semibold text-muted-foreground/50",children:" - "}),(0,s.jsx)("div",{className:"hidden lg:block lg:text-foreground text-sm text-muted-foreground font-chakra-regular",children:" $1 for the first month"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 ",children:[(0,s.jsxs)(x.z,{size:"sm",className:"hidden lg:flex bg-[#64943e] hover:bg-[#64943e]/90",onClick:()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank")},children:["Create Your Store ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]}),(0,s.jsxs)(x.z,{size:"xs",className:"lg:hidden text-[.7rem] p-1 px-2 bg-[#64943e] hover:bg-[#64943e]/90",onClick:()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank")},children:["Create Store ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})]})]}),(0,s.jsx)("div",{className:"w-full lg:h-[20rem] rounded-[.1rem]",children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/1021186133?h=a10e07238a&badge=0&autopause=0&player_id=0&app_id=58479",frameborder:"2",allow:"autoplay; fullscreen; clipboard-write",title:"Glitching Shopify Integration",className:"h-full w-full"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(A._,{children:"Store URL"}),(0,s.jsx)(N.I,{type:"text",placeholder:"example.myshopify.com",value:eg,onChange:e=>ef(e.target.value)})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(A._,{children:"App Token"}),(0,s.jsx)(N.I,{type:"text",placeholder:"shpat_example123",value:eb,onChange:e=>ew(e.target.value)})]}),(0,s.jsx)(eA.cN,{children:(0,s.jsx)(x.z,{disabled:H,onClick:connectStore,children:H?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 mr-1.5 animate-spin"})," Connecting "]}):"Connect Store"})})]})]})})}function ProductPage(e){let t={loop:!0,autoplay:!0,animationData:eV,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}},[a,r]=(0,i.useState)(null),[n,l]=(0,i.useState)(null);(0,i.useEffect)(()=>{let e=new AbortController;return r(e),l(e.signal),()=>{e.abort()}},[]);let{currentUser:c,getSavedProducts2:u,getSavedProductPages:m,contextChargeDeclined:p,getPopupTriggered:g}=(0,d.a)(),[b,y]=(0,i.useState)(!1);(0,i.useEffect)(()=>{setTimeout(()=>{y(!0)},100)},[]);let v=(0,o.useRouter)(),k=(0,i.useRef)(null),N=(0,i.useRef)(null),[A,S]=(0,i.useState)(!1),[T,C]=(0,i.useState)(!0),[P,D]=(0,i.useState)(!1),[z,I]=(0,i.useState)(null),[E,F]=(0,i.useState)(""),[B,_]=(0,i.useState)(""),[O,Z]=(0,i.useState)(""),[M,U]=(0,i.useState)([]),[R,G]=(0,i.useState)([]),[L,V]=(0,i.useState)(0),[H,q]=(0,i.useState)("Free Shipping + Money Back Guarantee"),[W,Q]=(0,i.useState)(""),[Y,J]=(0,i.useState)(""),[K,X]=(0,i.useState)(""),[$,ee]=(0,i.useState)(""),[et,ea]=(0,i.useState)(""),[er,ei]=(0,i.useState)(""),[eo,el]=(0,i.useState)(""),[ed,eu]=(0,i.useState)(""),[ef,eb]=(0,i.useState)(""),[ew,ej]=(0,i.useState)(""),[ek,eA]=(0,i.useState)(""),[eS,eT]=(0,i.useState)(""),[eC,eP]=(0,i.useState)(""),[eD,ez]=(0,i.useState)(""),[eI,eE]=(0,i.useState)(""),[eG,eq]=(0,i.useState)(!1),[eW,eQ]=(0,i.useState)({x:0,y:0}),[eY,eJ]=(0,i.useState)(!1),[eK,eX]=(0,i.useState)(!1),[e$,e0]=(0,i.useState)(!1);(0,i.useEffect)(()=>{c&&g(c).then(e=>{if(!e){C(!1);return}})},[c]);let[e1,e2]=(0,i.useState)([]),[e5,e4]=(0,i.useState)(0),[e3,e8]=(0,i.useState)(8),[e6,e7]=(0,i.useState)(0),[e9,te]=(0,i.useState)([]),[tt,ta]=(0,i.useState)({}),ts=function(e,t){let[a,s]=(0,i.useState)(e);return(0,i.useEffect)(()=>{let a=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(a)}},[e,t]),a}(tt,2e3);(0,i.useEffect)(()=>{Object.keys(ts).length>0&&handleContentEdit(ts)},[ts]);let tr=(0,i.useCallback)((e,t)=>{ta(a=>({...a,[e]:t}))},[]);async function handleContentEdit(e){let t=e9.find(e=>e.id===z.id);if(!t)return;let a={...t};Object.entries(e).forEach(e=>{let[t,s]=e;switch(t){case"hook":a.hook=s;break;case"benefit1":case"benefit2":case"benefit3":case"benefit4":let r=parseInt(t.slice(-1))-1;a.benefits[r]=s;break;case"headline1":case"headline2":case"headline3":case"headline4":case"description1":case"description2":case"description3":case"description4":let n=parseInt(t.slice(-1))-1,i=t.startsWith("headline");a.productPage[2*n+(i?0:1)]=s;break;case"cta":a.cta=s;break;case"productName":a.viralProductName=s;break;case"offer":a.offer=s}}),await updateProductPage(a,z.id),te(e=>e.map(e=>e.id===z.id?a:e)),ta({})}async function craftProductPage(t,a,r,i){try{eq(!0);let[e,s]=await Promise.all([fetch("/api/product-page/description?uid=".concat(c.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+c.accessToken},body:JSON.stringify({report:t}),signal:n}),fetch("/api/automatic-mode/build-store?uid=".concat(c.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+c.accessToken},body:JSON.stringify({productName:a.productName,productDescription:a.productDescription}),signal:n})]);if(!e.ok||!s.ok)throw Error("Error product page");let o=await e.json(),l=await s.json(),d=o.productPage,u=o.hook,m=o.benefits,h=o.cta;_(l.viralProductName),F(l.storeName),U(l.brandColor),Z(l.chosenTheme),Q(l.viralProductName),J(u),X(m[0]),ee(m[1]),ea(m[2]),ei(m[3]),el(d[0]),eA(d[1]),eu(d[2]),eT(d[3]),eb(d[4]),eP(d[5]),ej(d[6]),ez(d[7]),eE(h);let p=await Promise.all(l.logoBuffers.map(e=>uploadBase64ImageToFirebase(e,c.uid)));G(p),i?await updateProductPage({hook:u,benefits:m,productPage:d,cta:h,viralProductName:l.viralProductName,storeName:l.storeName,chosenTheme:l.chosenTheme,brandColor:l.brandColor,logos:p,offer:H},r):await saveProductPage({hook:u,benefits:m,productPage:d,cta:h,viralProductName:l.viralProductName,storeName:l.storeName,chosenTheme:l.chosenTheme,brandColor:l.brandColor,logos:p,offer:H},r),eq(!1),gtag("event","product_page_tokens",{value:o.tokensUsed,event_category:"Engagement",event_label:"Token Usage"}),gtag("event","total_tokens",{value:o.totalTokensUsed,event_category:"Engagement",event_label:"Token Usage"});return}catch(t){if("AbortError"===t.name)return;e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error"]}),description:"Error creating product page. Refresh and try again.",variant:"destructive"}),goBack();return}}async function saveProductPage(e,t){await fetch("/api/product-page/saveProductPage?uid=".concat(c.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+c.accessToken},body:JSON.stringify({productPage:e,id:t})});let a=await m(c);te(a)}async function updateProductPage(e,t){await fetch("/api/product-page/updateProductPage?uid=".concat(c.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+c.accessToken},body:JSON.stringify({productPage:e,id:t})});let a=await m(c);te(a)}async function deleteImportedProduct(e){e2(t=>t.filter(t=>t.id!==e)),fetch("/api/my-products/deleteImportedProduct?uid=".concat(c.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+c.accessToken},body:JSON.stringify({id:e})})}async function uploadBase64ImageToFirebase(e,t){try{let a=Math.random().toString(36).substring(2,15),s=(0,eO.iH)(eZ.t,"/users/".concat(t,"/").concat(a,".png")),r=e,n="image/png";if(r.startsWith("data:")){let e=r.match(/^data:(.+);base64,(.*)$/);if(e)n=e[1],r=e[2];else throw Error("Invalid base64 data URL")}let i=atob(r),o=Array(i.length);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);let l=new Uint8Array(o),c=new Blob([l],{type:n}),d=await (0,eO.KV)(s,c),u=await (0,eO.Jt)(d.ref);return u}catch(e){throw Error("Error images upload")}}(0,i.useEffect)(()=>{if(!v.query.id||!A)return;let e=v.query.id,t=e1.find(t=>t.id===e),a=null;if(e9.length>0&&(a=e9.find(t=>t.id===e)),a){if(!a.logos){console.log("outdated"),I(t),craftProductPage({productName:t.productName,reviews:t.reviews,productDescription:t.productDescription,report:t.report},t,t.id,!0);return}I(t),Q(a.viralProductName),q(a.offer),J(a.hook),X(a.benefits[0]),ee(a.benefits[1]),ea(a.benefits[2]),ei(a.benefits[3]),el(a.productPage[0]),eA(a.productPage[1]),eu(a.productPage[2]),eT(a.productPage[3]),eb(a.productPage[4]),eP(a.productPage[5]),ej(a.productPage[6]),ez(a.productPage[7]),eE(a.cta),_(a.viralProductName),F(a.storeName),U(a.brandColor),Z(a.chosenTheme),G(a.logos)}else{I(t),craftProductPage({productName:t.productName,reviews:t.reviews,productDescription:t.productDescription,report:t.report},t,t.id,!1);return}},[v,A]),(0,i.useEffect)(()=>{e1.length>0&&e7(Math.ceil(e1.length/e3))},[e1,e3]),(0,i.useEffect)(()=>{c&&(u(c).then(e=>{if(e){S(!0),e2(e.reverse());return}S(!0),fetch("/api/my-products/createProductsUser?uid=".concat(c.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+c.accessToken}})}),m(c).then(e=>{if(e){te(e);return}fetch("/api/product-page/createProductPageUser?uid=".concat(c.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+c.accessToken}})}))},[c]);let goBack=()=>{if(v.query.id){let{id:e,...t}=v.query;v.replace({pathname:v.pathname,query:t},void 0,{shallow:!0})}eq(!1),e4(0),I(null),Q(""),J(""),X(""),ee(""),ea(""),ei(""),el(""),eA(""),eu(""),eT(""),eb(""),eP(""),ej(""),ez(""),eE(""),V(0),_(""),F(""),Z(""),U([]),G([]),a.abort();let e=new AbortController;r(e),l(e.signal)},[tn,ti]=(0,i.useState)(null);return((0,i.useEffect)(()=>{tn&&tn.on("select",()=>{e4(tn.selectedScrollSnap())})},[tn]),z)?(0,s.jsxs)("div",{className:"animated-element w-full lg:h-screen flex flex-col items-center lg:gap-0 relative lg:p-8 p-5 lg:overflow-auto ".concat(z&&!eG?"lg:pt-0":""),children:[(0,s.jsx)(MatrixGrid,{}),eG&&(0,s.jsx)("div",{className:"mb-5 lg:w-[65rem] w-full fade-in-translate-y",children:(0,s.jsxs)(x.z,{onClick:goBack,variant:"outline",size:"lg",className:"group",children:[(0,s.jsx)(en.Z,{className:"w-4 h-4 group-hover:-translate-x-1 transition-all duration-100 ease-in mr-1"})," Back"]})}),!eG&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-row gap-2 items-center justify-between w-full lg:w-[65rem] lg:border-b-[0px] lg:border-t-[0px] lg:bg-background bg-transparent lg:p-6 lg:border lg:border-accent lg:rounded-t-[.1rem] fade-in-translate-y-invert lg:mb-0 mb-3",children:[(0,s.jsxs)(x.z,{onClick:goBack,variant:"outline",size:"lg",className:"group",children:[(0,s.jsx)(en.Z,{className:"w-4 h-4 group-hover:-translate-x-1 transition-all duration-100 ease-in mr-1"})," Back"]}),!eG&&(0,s.jsx)(ImportToShopifyButton,{toast:e.toast,brandColor:M,storeName:E,viralProductName:B,chosenTheme:O,logos:R,selectedLogo:L,selectedProduct:z,editBenefit1:K,editBenefit2:$,editBenefit3:et,editBenefit4:er,editHeadline1:eo,editDescription1:ek,editHeadline2:ed,editDescription2:eS,editHeadline3:ef,editDescription3:eC,editHeadline4:ew,editDescription4:eD,editHook:Y,editCta:eI,editOffer:H})]}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-[65rem] border-accent flex flex-col mb-3 lg:mb-5 p-3 lg:p-6 fade-in-translate-y-invert shadow-md shadow-slate-950 relative",children:[(0,s.jsxs)("div",{className:"flex flex-row flex-wrap gap-5 lg:gap-12 lg:mb-8 mb-5",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("div",{className:"text-muted-foreground text-[.8rem] lg:text-sm font-chakra-regular",children:"Product Name"}),(0,s.jsx)("div",{className:"text-foreground font-chakra-bold lg:text-[1rem] text-[.85rem]",children:B})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("div",{className:"text-muted-foreground text-[.8rem] lg:text-sm font-chakra-regular",children:"Store Name"}),(0,s.jsx)("div",{className:"text-foreground font-chakra-bold lg:text-[1rem] text-[.85rem]",children:E})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("div",{className:"text-muted-foreground text-[.8rem] lg:text-sm font-chakra-regular",children:"Recommended Theme"}),(0,s.jsx)("div",{className:"text-foreground font-chakra-bold lg:text-[1rem] text-[.85rem]",children:O&&O.charAt(0).toUpperCase()+O.slice(1)})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("div",{className:"text-muted-foreground text-[.8rem] lg:text-sm font-chakra-regular",children:"Brand Color Palette"}),(0,s.jsx)("div",{className:"flex flex-row flex-wrap gap-2 lg:text-[.9rem] text-[.85rem]",children:M.map((e,t)=>(0,s.jsx)(eB.pn,{delayDuration:10,children:(0,s.jsxs)(eB.u,{children:[(0,s.jsx)(eB.aJ,{asChild:!0,children:(0,s.jsx)("div",{className:"w-6 h-6 rounded-[.1rem] border border-accent cursor-pointer",style:{backgroundColor:e},onClick:()=>navigator.clipboard.writeText(e)},t)}),(0,s.jsx)(eB._v,{onClick:()=>navigator.clipboard.writeText(e),className:"bg-background text-foreground border border-accent cursor-pointer",children:(0,s.jsxs)("p",{className:"flex items-center gap-1",children:[" ",(0,s.jsx)(eM.Z,{className:"w-4 h-4 text-muted-foreground"}),e]})})]})}))})]})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-3",children:[(0,s.jsx)("div",{className:"text-muted-foreground text-[.8rem] font-chakra-regular",children:"Logo"}),(0,s.jsxs)("div",{className:"flex flex-row gap-3 lg:max-w-auto max-w-full overflow-x-auto",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:[(0,s.jsxs)("div",{className:"relative lg:min-w-[10rem] lg:max-w-[10rem] min-w-1/3 max-w-1/3 overflow-hidden",children:[(0,s.jsx)("img",{onClick:()=>V(0),src:R[0].startsWith("https://")?R[0]:"data:image/png;base64,".concat(R[0]),alt:"Generated Logo",className:"w-full saturate-[110%] border border-accent p-2 cursor-pointer rounded-[.1rem] ".concat(0===L?"border-primary bg-primary/10":"")}),(0,s.jsx)("button",{onClick:()=>{let e=document.createElement("a");e.href=R[0].startsWith("https://")?R[0]:"data:image/png;base64,".concat(R[0]),e.download="logo1.png",e.click()},className:"absolute top-0 right-0 bg-primary text-white p-1 rounded-[.1rem]",children:(0,s.jsx)(eU.Z,{className:"w-3.5 h-3.5"})})]}),(0,s.jsxs)("div",{className:"relative lg:min-w-[10rem] lg:max-w-[10rem] min-w-1/3 max-w-1/3 overflow-hidden",children:[(0,s.jsx)("img",{onClick:()=>V(1),src:R[1].startsWith("https://")?R[1]:"data:image/png;base64,".concat(R[1]),alt:"Generated Logo",className:"w-full saturate-[110%] border border-accent p-2 cursor-pointer rounded-[.1rem] ".concat(1===L?"border-primary bg-primary/10":"")}),(0,s.jsx)("button",{onClick:()=>{let e=document.createElement("a");e.href=R[1].startsWith("https://")?R[1]:"data:image/png;base64,".concat(R[1]),e.download="logo2.png",e.click()},className:"absolute top-0 right-0 bg-primary text-white p-1 rounded-[.1rem]",children:(0,s.jsx)(eU.Z,{className:"w-3.5 h-3.5"})})]}),(0,s.jsxs)("div",{className:"relative lg:min-w-[10rem] lg:max-w-[10rem] min-w-1/3 max-w-1/3 overflow-hidden",children:[(0,s.jsx)("img",{onClick:()=>V(2),src:R[2].startsWith("https://")?R[2]:"data:image/png;base64,".concat(R[2]),alt:"Generated Logo",className:"w-full saturate-[110%] border border-accent p-2 cursor-pointer rounded-[.1rem] ".concat(2===L?"border-primary bg-primary/10":"")}),(0,s.jsx)("button",{onClick:()=>{let e=document.createElement("a");e.href=R[2].startsWith("https://")?R[2]:"data:image/png;base64,".concat(R[2]),e.download="logo3.png",e.click()},className:"absolute top-0 right-0 bg-primary text-white p-1 rounded-[.1rem]",children:(0,s.jsx)(eU.Z,{className:"w-3.5 h-3.5"})})]})]})]})]})]}),(0,s.jsx)(w.Zb,{onMouseMove:e=>{eQ({x:e.clientX,y:e.clientY})},onMouseEnter:()=>{eJ(!0)},onMouseLeave:()=>{eJ(!1)},className:"w-full lg:w-[65rem] flex flex-row border-accent shadow-xl shadow-slate-950 fade-in-translate-y",children:(0,s.jsxs)("div",{className:"w-full h-full ".concat(eG?"":"animated-element"),children:[(eY&&!eG||window.innerWidth<768&&!eG)&&(0,s.jsxs)("div",{style:{position:"fixed",top:window.innerWidth>=768?eW.y-40:"auto",left:window.innerWidth>=768?eW.x+20:"110px",bottom:window.innerWidth<768?"8px ":"auto",transform:window.innerWidth>=768?"none":"translateX(-50%)",padding:"5px 10px",borderRadius:"0.1rem",pointerEvents:"none",zIndex:1e3},className:"min-w-[10.2rem] fade bg-background/90 border border-accent text-foreground text-[.8rem] font-chakra-regular flex items-center",children:[(0,s.jsx)(f.oqE,{className:"w-4 h-4 mr-1.5"}),"Click the text to edit"]}),eG?(0,s.jsx)("div",{style:{backgroundColor:""},className:"bg-primary-foreground p-3 font-chakra-semibold text-center w-full tracking-wider text-[.85rem] skeleton-pulse-2 text-muted",children:H}):(0,s.jsx)(eL(),{html:H,onChange:e=>{q(e.target.value),tr("offer",e.target.value)},style:{backgroundColor:M[2]},className:"bg-primary-foreground p-3 font-chakra-semibold text-center w-full tracking-wider text-[.85rem] text-foreground outline-none"}),(0,s.jsxs)("div",{className:"bg-primary-foreground p-5 lg:p-10 text-foreground font-chakra-semibold text-center w-full tracking-wider flex items-center justify-between relative",children:[(0,s.jsx)(f.RYk,{className:"w-6 h-6 text-foreground"}),eG?(0,s.jsx)("div",{className:"font-chakra-bold lg:text-2xl",children:"[ STORE LOGO HERE ]"}):(0,s.jsx)("img",{src:R[L].startsWith("https://")?R[L]:"data:image/png;base64,".concat(R[L]),alt:"Generated Logo",className:"w-[150px] scale-[150%] saturate-[110%]"}),(0,s.jsx)(ex.Z,{className:"w-6 h-6 text-foreground"})]}),eG?(0,s.jsxs)("div",{className:"bg-foreground lg:p-5 lg:px-10 p-3 rounded-[.1rem] overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row w-full gap-8 lg:gap-20 lg:mt-5",children:[(0,s.jsxs)("div",{style:{animationDelay:"300ms"},className:"lg:min-h-[27rem] lg:max-h-[27rem] lg:min-w-[27rem] lg:max-w-[27rem] rounded-[.1rem] overflow-hidden fade-in-left-translate-x relative",children:[(0,s.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-[60%] w-full opacity-[40%] scale-[180%]",children:(0,s.jsx)(eH.Z,{options:t})}),(0,s.jsx)(eR.O,{variant:"light",className:"lg:min-h-[27rem] min-h-[19rem] min-w-full"})]}),(0,s.jsxs)("div",{style:{animationDelay:"300ms"},className:"flex flex-col gap-3 w-full fade-in-right-translate-x",children:[(0,s.jsx)(eR.O,{variant:"light",className:"w-48 h-4"}),(0,s.jsx)(eR.O,{variant:"light",className:"h-6 w-3/4 mb-3"})," ",(0,s.jsx)(eR.O,{variant:"light",className:"h-4 w-1/2 mb-3"})," ",(0,s.jsx)("div",{className:"flex flex-col gap-2",children:[void 0,void 0,void 0,void 0].map((e,t)=>(0,s.jsx)(eR.O,{variant:"light",className:"h-4 w-full"},t))}),(0,s.jsx)(eR.O,{variant:"light",className:"h-14 w-full mt-5"})," ",(0,s.jsx)("div",{className:"flex items-center justify-between mt-3",children:[void 0,void 0,void 0].map((e,t)=>(0,s.jsx)("div",{className:"flex flex-col gap-1",children:(0,s.jsx)(eR.O,{variant:"light",className:"w-20 h-4"})},t))})]})]}),[void 0,void 0,void 0,void 0].map((e,a)=>(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row w-full lg:w-[60rem] gap-8 lg:gap-20 lg:mt-24 mt-16",children:[(0,s.jsxs)("div",{style:{animationDelay:"300ms"},className:"h-[19rem] lg:h-[27rem] w-full lg:min-w-[27rem] ".concat(a%2==0?"lg:order-2":"lg:order-1"," rounded-[.1rem] overflow-hidden fade-in-").concat(a%2==0?"right":"left","-translate-x relative"),children:[(0,s.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-[60%] w-full opacity-[40%] scale-[180%]",children:(0,s.jsx)(eH.Z,{options:t})}),(0,s.jsx)(eR.O,{variant:"light",className:"h-full w-full"})]}),(0,s.jsxs)("div",{style:{animationDelay:"300ms"},className:"flex flex-col gap-3 w-full ".concat(a%2==0?"lg:order-1":"lg:order-2"," fade-in-").concat(a%2==0?"left":"right","-translate-x"),children:[(0,s.jsx)(eR.O,{variant:"light",className:"h-6 w-3/4 mb-3"})," ",(0,s.jsx)(eR.O,{variant:"light",className:"h-4 w-full"})," ",(0,s.jsx)(eR.O,{variant:"light",className:"h-4 w-full"})," ",(0,s.jsx)(eR.O,{variant:"light",className:"h-4 w-full"})," ",(0,s.jsx)(eR.O,{variant:"light",className:"h-4 w-full"})," ",(0,s.jsx)(eR.O,{variant:"light",className:"h-4 w-full"})," ",(0,s.jsx)(eR.O,{variant:"light",className:"h-14 w-full mt-5"})," "]})]},a)),(0,s.jsxs)("div",{style:{animationDelay:"300ms"},className:"flex flex-col items-center justify-center w-full lg:w-[60rem] lg:mt-24 mt-16 pb-5 fade-in-translate-y",children:[(0,s.jsx)(eR.O,{variant:"light",className:"h-6 w-3/4 mb-8 "}),(0,s.jsx)(eR.O,{variant:"light",className:"h-4 w-1/2 mb-5"}),(0,s.jsx)(eR.O,{variant:"light",className:"h-4 w-1/2"}),(0,s.jsx)(eR.O,{variant:"light",className:"h-14 w-full lg:w-[25rem] mt-8"})]})]}):(0,s.jsxs)("div",{className:"bg-foreground lg:p-5 lg:px-10 p-3 rounded-[.1rem]",children:[(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row w-full lg:w-[60rem] gap-8 lg:gap-20 lg:mt-5",children:[(0,s.jsx)("div",{className:"lg:h-[27rem] lg:max-h-[27rem] max-h-[23rem] lg:min-w-[27rem] lg:max-w-[27rem] rounded-[.1rem] overflow-hidden relative",children:(0,s.jsx)("img",{src:z.images?z.images[0]:"",className:" h-full w-full object-cover brightness-[85%] "})}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-row gap-2 items-center",children:[(0,s.jsx)(eF.QJe,{style:{color:M[2]}}),(0,s.jsx)(eF.QJe,{style:{color:M[2]}}),(0,s.jsx)(eF.QJe,{style:{color:M[2]}}),(0,s.jsx)(eF.QJe,{style:{color:M[2]}}),(0,s.jsx)(eF.QJe,{style:{color:M[2]}}),(0,s.jsx)("div",{className:"text-muted",children:"(583)"})]}),(0,s.jsx)(eL(),{html:W,onChange:e=>{Q(e.target.value),tr("productName",e.target.value)},className:"text-3xl font-bold text-black outline-none  lg:hover:text-blue-500 "}),(0,s.jsx)(eL(),{html:Y,onChange:e=>{J(e.target.value),tr("hook",e.target.value)},className:"font-bold text-black outline-none  lg:hover:text-blue-500 "}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 text-black",children:[(0,s.jsx)(eL(),{html:K,onChange:e=>{X(e.target.value),tr("benefit1",e.target.value)},className:"flex flex-row text-black gap-2 outline-none  lg:hover:text-blue-500 "}),(0,s.jsx)(eL(),{html:$,onChange:e=>{ee(e.target.value),tr("benefit2",e.target.value)},className:"flex flex-row text-black gap-2 outline-none  lg:hover:text-blue-500 "}),(0,s.jsx)(eL(),{html:et,onChange:e=>{ea(e.target.value),tr("benefit3",e.target.value)},className:"flex flex-row text-black gap-2 outline-none  lg:hover:text-blue-500 "}),(0,s.jsx)(eL(),{html:er,onChange:e=>{ei(e.target.value),tr("benefit4",e.target.value)},className:"flex flex-row text-black gap-2 outline-none  lg:hover:text-blue-500 "})]}),(0,s.jsx)("button",{style:{backgroundColor:M[2]},className:"p-3 rounded-[.1rem] text-white tracking-wide mt-5",children:"ADD TO CART"}),(0,s.jsxs)("div",{className:"flex items-center justify-between mt-3",children:[(0,s.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,s.jsx)(ey.Z,{className:"text-2xl text-black"}),(0,s.jsx)("div",{className:"text-[.8rem] text-black",children:"Free Shipping"})]}),(0,s.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,s.jsx)(ev.Z,{className:"text-2xl text-black"}),(0,s.jsx)("div",{className:"text-[.8rem] text-black",children:"30 Day Guarantee"})]}),(0,s.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,s.jsx)(h.Z,{className:"text-2xl text-black"}),(0,s.jsx)("div",{className:"text-[.8rem] text-black",children:"Free Returns"})]})]})]})]}),(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col w-full lg:w-[60rem] gap-8 lg:gap-20 lg:mt-24 mt-16",children:[(0,s.jsx)("div",{className:"max-h-[23rem] w-full lg:hidden rounded-[.1rem] overflow-hidden",children:(0,s.jsx)("img",{src:z.images[1],className:" h-full w-full object-cover brightness-[85%]"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 lg:w-full",children:[(0,s.jsx)(eL(),{html:eo?eo.replace(/\*/g,""):"",onChange:e=>{el(e.target.value),tr("headline1",e.target.value)},className:"text-2xl lg:text-3xl font-bold text-black outline-none  lg:hover:text-blue-500 "}),(0,s.jsx)(eL(),{html:ek||"",onChange:e=>{eA(e.target.value),tr("description1",e.target.value)},className:" leading-8 text-black outline-none  lg:hover:text-blue-500 "}),(0,s.jsx)("button",{style:{backgroundColor:M[2]},className:"p-3 rounded-[.1rem] text-white tracking-wide mt-5",children:"ADD TO CART"})]}),(0,s.jsx)("div",{className:"lg:h-[27rem] lg:min-w-[27rem] hidden lg:block rounded-[.1rem] overflow-hidden",children:(0,s.jsx)("img",{src:z.images[1],className:"rounded-[.1rem] h-full w-full object-cover brightness-[85%]"})})]}),(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col w-full lg:w-[60rem] gap-8 lg:gap-20 lg:mt-24 mt-16",children:[(0,s.jsx)("div",{className:"lg:h-[27rem] lg:max-h-[27rem] lg:min-w-[27rem] max-h-[23rem] w-full rounded-[.1rem] overflow-hidden",children:(0,s.jsx)("img",{src:z.images[2],className:" h-full w-full object-cover brightness-[85%]"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 lg:w-full",children:[(0,s.jsx)(eL(),{html:ed?ed.replace(/\*/g,""):"",onChange:e=>{eu(e.target.value),tr("headline2",e.target.value)},className:"text-2xl lg:text-3xl font-bold text-black outline-none  lg:hover:text-blue-500 "}),(0,s.jsx)(eL(),{html:eS||"",onChange:e=>{eT(e.target.value),tr("description2",e.target.value)},className:" leading-8 text-black outline-none  lg:hover:text-blue-500 "}),(0,s.jsx)("button",{style:{backgroundColor:M[2]},className:"p-3 rounded-[.1rem] text-white tracking-wide mt-5",children:"ADD TO CART"})]})]}),(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col w-full lg:w-[60rem] gap-8 lg:gap-20 lg:mt-24 mt-16",children:[(0,s.jsx)("div",{className:"lg:h-[27rem] lg:min-w-[27rem] max-h-[23rem] lg:hidden rounded-[.1rem] overflow-hidden",children:(0,s.jsx)("img",{src:z.images[3],className:"rounded-[.1rem] h-full w-full object-cover brightness-[85%]"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 lg:w-full",children:[(0,s.jsx)(eL(),{html:ef?ef.replace(/\*/g,""):"",onChange:e=>{eb(e.target.value),tr("headline3",e.target.value)},className:"text-2xl lg:text-3xl font-bold text-black outline-none  lg:hover:text-blue-500 "}),(0,s.jsx)(eL(),{html:eC||"",onChange:e=>{eP(e.target.value),tr("description3",e.target.value)},className:" leading-8 text-black outline-none  lg:hover:text-blue-500 "}),(0,s.jsx)("button",{style:{backgroundColor:M[2]},className:"p-3 rounded-[.1rem] text-white tracking-wide mt-5",children:"ADD TO CART"})]}),(0,s.jsx)("div",{className:"lg:h-[27rem] lg:min-w-[27rem] rounded-[.1rem] overflow-hidden hidden lg:block",children:(0,s.jsx)("img",{src:z.images[3],className:" h-full w-full object-cover brightness-[85%]"})})]}),(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row w-full lg:w-[60rem] gap-8 lg:gap-20  lg:mt-24 mt-16",children:[(0,s.jsx)("div",{className:"lg:h-[27rem] lg:max-h-[27rem] lg:min-w-[27rem] max-h-[23rem] rounded-[.1rem] overflow-hidden",children:(0,s.jsx)("img",{src:z.images[4],className:" h-full w-full object-cover brightness-[85%]"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 lg:w-full",children:[(0,s.jsx)(eL(),{html:ew?ew.replace(/\*/g,""):"",onChange:e=>{ej(e.target.value),tr("headline4",e.target.value)},className:"text-2xl lg:text-3xl font-bold text-black outline-none  lg:hover:text-blue-500 "}),(0,s.jsx)(eL(),{html:eD||"",onChange:e=>{ez(e.target.value),tr("description4",e.target.value)},className:" leading-8 text-black outline-none  lg:hover:text-blue-500 "}),(0,s.jsx)("button",{style:{backgroundColor:M[2]},className:"p-3 rounded-[.1rem] text-white tracking-wide mt-5",children:"ADD TO CART"})]})]}),(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center w-full lg:w-[60rem] gap-8 lg:mt-24 mt-16 pb-5",children:[(0,s.jsx)("div",{className:"text-center text-2xl lg:text-3xl text-black font-bold outline-none cursor-not-allowed",children:"Try ".concat(W," for 30 days or get your money back guaranteed!")}),(0,s.jsx)(eL(),{className:"text-center text-black italic outline-none  lg:hover:text-blue-500 ",html:eI,onChange:e=>{eE(e.target.value),tr("cta",e.target.value)}}),(0,s.jsx)("button",{style:{backgroundColor:M[2]},className:"lg:px-48 w-full lg:w-auto p-3 rounded-[.1rem] text-white tracking-wide",children:"ADD TO CART"})]})]})]})}),(0,s.jsx)("div",{className:"lg:hidden pb-5 opacity-0 h-0 overflow-hidden",children:"This div is to put a padding bottom on the page, is not visible and only appears on mobile."})]}):(0,s.jsxs)("div",{className:"animated-element w-full lg:h-screen flex flex-col items-center lg:justify-center lg:overflow-x-hidden lg:gap-0 relative lg:p-0 p-5 ".concat(!A&&v.query.id?"hidden":""," lg:overflow-hidden"),children:[(0,s.jsx)(MatrixGrid,{}),(0,s.jsxs)("h1",{className:"text-2xl lg:text-3xl font-chakra-bold text-foreground w-full lg:w-[60rem] text-left mb-5 flex items-center gap-2 transition-all duration-1000 ".concat(b?"opacity-100 translate-y-0":"opacity-0 translate-y-10"),children:[(0,s.jsx)(ec.Z,{className:"mr-1.5 w-5 h-5"})," Store Builder "]}),e.showBanner&&(0,s.jsx)("div",{className:"w-full lg:w-[60rem] mb-5 ".concat(b?"opacity-100 translate-y-0":"opacity-0 translate-y-16"," transition-all duration-1000"),children:(0,s.jsx)(e_.Z,{})}),(0,s.jsxs)(eN.lr,{className:"w-full lg:w-auto",setApi:ti,onSlideChange:e=>e4(e),children:[(0,s.jsx)(eN.Pz,{className:"hidden",ref:k}),(0,s.jsx)(eN.am,{className:"hidden",ref:N}),(0,s.jsxs)(w.Zb,{className:"lg:w-[60rem] lg:min-h-[35.5rem] lg:max-h-[35.5rem] bg-background border-accent shadow-xl shadow-slate-950 transition-all duration-1000 ".concat(b?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),children:[(0,s.jsx)(w.Ol,{className:"border-b border-accent flex items-center justify-between w-full",children:(0,s.jsxs)(w.ll,{className:"flex lg:flex-row flex-col lg:items-center lg:justify-between w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 lg:mb-0 mb-2",children:[(0,s.jsxs)(x.z,{onClick:()=>{null==tn||tn.scrollPrev()},variant:"ghost",size:"icon",className:"text-foreground",children:[" ",(0,s.jsx)(en.Z,{className:"w-4 h-4 "})," "]}),(0,s.jsxs)("div",{className:"text-foreground",children:[e5+1," of ",e1.length>0?e6:1]}),(0,s.jsxs)(x.z,{onClick:()=>{null==tn||tn.scrollNext()},variant:"ghost",size:"icon",className:"text-foreground",children:[" ",(0,s.jsx)(j.Z,{className:"w-4 h-4"})," "]})]}),(0,s.jsxs)(x.z,{onClick:()=>{v.push("/dashboard?location=import-products")},children:[(0,s.jsx)(em.Z,{className:"w-4 h-4 mr-1.5"}),"Import Products"]})]})}),(0,s.jsx)(w.aY,{className:"relative lg:min-h-auto lg:min-w-auto min-h-[30rem] lg:max-h-[30rem] lg:overflow-hidden",children:(0,s.jsxs)(eN.KI,{children:[0===e1.length&&A&&(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center grow lg:min-h-[28rem] lg:mt-0 mt-5",children:[(0,s.jsx)(f.BHL,{className:"lg:w-24 lg:h-24 w-20 h-20 text-muted-foreground/30"}),(0,s.jsx)("h1",{className:"font-chakra-medium text-muted-foreground mt-3",children:"No saved products"}),(0,s.jsx)("div",{className:"text-muted-foreground/75 text-sm mt-1",children:"Find & save a product to get started"}),(0,s.jsxs)(x.z,{size:"sm",variant:"outline",className:"mt-3",onClick:()=>{v.push("/dashboard?location=product-db")},children:[(0,s.jsx)(eh.Z,{className:"w-4 h-4 mr-1.5"})," AI Product Database"]})]}),Array.from({length:Math.ceil(e1.length/8)}).map((t,a)=>(0,s.jsx)(eN.d$,{children:(0,s.jsx)("div",{className:"flex flex-row flex-wrap gap-5 max-h-full overflow-y-auto pt-5 transition-all duration-1000",children:e1.slice(8*a,(a+1)*8).map((t,a)=>(0,s.jsxs)("div",{onClick:async()=>{if(!c)return;if(p){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){e.setTrialPopup(!0);return}let a=e9.find(e=>e.id===t.id);if(a){if(!a.logos){console.log("outdated"),I(t),await craftProductPage({productName:t.productName,reviews:t.reviews,productDescription:t.productDescription,report:t.report},t,t.id,!0);return}q(a.offer||""),I(t),Q(a.viralProductName||""),J(a.hook||""),X(a.benefits[0]||""),ee(a.benefits[1]||""),ea(a.benefits[2]||""),ei(a.benefits[3]||""),el(a.productPage[0]||""),eA(a.productPage[1]||""),eu(a.productPage[2]||""),eT(a.productPage[3]||""),eb(a.productPage[4]||""),eP(a.productPage[5]||""),ej(a.productPage[6]||""),ez(a.productPage[7]||""),eE(a.cta||""),_(a.viralProductName||""),F(a.storeName||""),U(a.brandColor||[]),Z(a.chosenTheme||""),G(a.logos||[]);return}I(t),await craftProductPage({productName:t.productName,reviews:t.reviews,productDescription:t.productDescription,report:t.report},t,t.id,!1)},className:"w-[46.4%] lg:w-[calc(25%-1rem)] h-[10rem] lg:h-[13rem] border border-accent rounded-md p-2 transition-all ease-in duration-100 cursor-pointer relative group overflow-hidden ".concat(e$===a?"border-destructive":"hover:border-primary"),children:[(0,s.jsxs)(x.z,{onClick:e=>{e.stopPropagation(),deleteImportedProduct(t.id)},onMouseEnter:()=>e0(a),onMouseLeave:()=>e0(!1),variant:"destructive",size:"icon",className:"text-foreground absolute top-3 right-3",children:[" ",(0,s.jsx)(ep.Z,{className:"w-4 h-4 transition-transform ease-in duration-100 ".concat(e$===a?"rotate-[-5deg]":"")})," "]}),(0,s.jsx)("div",{className:"absolute  top-[-3rem] left-3 transition-all duration-200 z-[20] p-2 rounded-[.1rem] bg-primary opacity-0 group-hover:opacity-100 ".concat(e$===a?"top-[-3rem]":"group-hover:top-3"),children:(0,s.jsx)(eg.Z,{className:"w-4 h-4"})}),(0,s.jsx)("img",{src:t.images?t.images[0]:"",className:"object-cover h-full w-full"}),(0,s.jsx)("div",{className:"text-[.7rem] w-full p-2 font-chakra-medium absolute bottom-0 left-0 text-center px-3 bg-background",children:t.productName.length>30?t.productName.slice(0,30)+"...":t.productName})]},a))})},a))]})})]})]})]})}var e$=a(58621);function PaddleAccountSettings(e){let{currentUser:t,getTrialStatus:a,getSubscription:r,getChargeDeclined:n,getSubscriptionCancelled:l,getPaddleSubscription:c,getDiscordInfo:u,billingPeriodEndDate:m}=(0,d.a)(),[h,p]=(0,i.useState)(!1);(0,i.useEffect)(()=>{setTimeout(()=>{p(!0)},100)},[]);let[g,b]=(0,i.useState)(!1),[y,v]=(0,i.useState)(""),[k,N]=(0,i.useState)(!1),[A,S]=(0,i.useState)(!1),[T,D]=(0,i.useState)(!1),[z,I]=(0,i.useState)(!1),[E,F]=(0,i.useState)(!1),[B,_]=(0,i.useState)(!1),[O,Z]=(0,i.useState)(!1),[M,U]=(0,i.useState)(null),[R,G]=(0,i.useState)(null),L=(0,o.useRouter)();async function payWithDifferentCard(){G(!0);let a=await c(t),r=await fetch("/api/paddle-api/latestPastDue?uid=".concat(t.uid),{method:"POST",headers:{Authorization:"Bearer ".concat(t.accessToken),"Content-Type":"application/json"},body:JSON.stringify({subscriptionId:a})}),n=await r.json();if(!r.ok){console.log("error",n),e.toast({title:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"}),"Error"]}),description:"An error has occurred. Contact support for assistance.",variant:"destructive"}),G(!1);return}let i=n.txn_id;L.push("/pay?_ptxn=".concat(i)),G(!1)}async function updatePaymentMethod(){G(!0);let a=await c(t),r=await fetch("/api/paddle-api/updatePaymentMethod?uid=".concat(t.uid),{method:"POST",headers:{Authorization:"Bearer ".concat(t.accessToken),"Content-Type":"application/json"},body:JSON.stringify({subscriptionId:a})});if(!r.ok){e.toast({title:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"}),"Error"]}),description:"An error has occurred. Contact support for assistance.",variant:"destructive"}),G(!1);return}let n=await r.json(),i=n.txn_id;L.push("/pay?_ptxn=".concat(i,"&update_payment_method=true")),G(!1)}async function getLast4(t){let a=await c(t),r=await fetch("/api/paddle-api/getPaymentMethod?uid=".concat(t.uid),{method:"POST",headers:{Authorization:"Bearer ".concat(t.accessToken),"Content-Type":"application/json"},body:JSON.stringify({subscriptionId:a})});if(!r.ok){e.toast({title:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"}),"Error"]}),description:"An error has occurred. Could not fetch card on file.",variant:"destructive"});return}let n=await r.json();return n.cardLast4}return(0,i.useEffect)(()=>{Promise.all([a(t).then(e=>{b(null===e||e)}),r(t).then(e=>{v(e)}),n(t).then(e=>{N(e)}),l(t).then(e=>{S(e)}),getLast4(t).then(e=>{U(e)}),u(t).then(e=>{if(null===e.userName||null===e.id||void 0===e.userName||void 0===e.id){F(!1);return}F(!0)}).catch(e=>{console.error("Failed to fetch or decrypt Discord information:",e),F(!1)})]).then(()=>{D(!0),_(!0)}).catch(e=>{console.error("Error loading initial data:",e),D(!0)})},[t]),(0,i.useEffect)(()=>{e.cancelledFromPopup&&(S(!0),N(!1))},[e.cancelledFromPopup]),(0,i.useEffect)(()=>{e.reactivatedFromPopup&&S(!1)},[e.reactivatedFromPopup]),(0,i.useEffect)(()=>{if(!B){console.log("Data not loaded");return}let a=new URLSearchParams(window.location.search),s=a.get("code");if(!s)return;let r=new URL(window.location.href);r.searchParams.delete("code");let n=r.toString(),i=k||"no"===y?"Inactive":"yes"===y?"Active":"Inactive",o=setTimeout(()=>{fetch("/api/discord/discord-oauth?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t.accessToken)},body:JSON.stringify({code:s,role:i,url:n})}).then(e=>e.json()).then(t=>{console.log("Response:",t),t.username&&e.setDiscordUserName(t.username)}).catch(e=>{console.error("Error:",e)}),e.setDiscordPopup(!0)},500);return()=>{clearTimeout(o),F(!0)}},[location.search,B]),(0,i.useEffect)(()=>{let t=new URLSearchParams(window.location.search),a=t.get("payment_method_updated");"true"===a?e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success! "]}),description:"Payment method updated successfully."}):"false"===a&&e.toast({title:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"}),"Error"]}),description:"An error has occurred. Contact support for assistance.",variant:"destructive"})},[]),(0,s.jsxs)("div",{className:"animated-element w-full flex flex-col items-center justify-center gap-5 p-5 lg:p-8 lg:py-10 lg:pb-0 pb-14 text-slate-400 lg:max-h-screen lg:overflow-auto overflow-x-hidden relative pb-16","data-sentry-component":"PaddleAccountSettings","data-sentry-source-file":"paddle-account-settings.jsx",children:[(0,s.jsx)(MatrixGrid,{"data-sentry-element":"MatrixGrid","data-sentry-source-file":"paddle-account-settings.jsx"}),(0,s.jsxs)(w.Zb,{className:"border-accent shadow-xl shadow-slate-950 w-full max-w-[50rem] transition-all duration-1000 ".concat(h?"opacity-100 translate-y-0":"opacity-0 translate-y-10"),"data-sentry-element":"Card","data-sentry-source-file":"paddle-account-settings.jsx",children:[(0,s.jsxs)(w.Ol,{"data-sentry-element":"CardHeader","data-sentry-source-file":"paddle-account-settings.jsx",children:[(0,s.jsx)(w.ll,{className:"flex flex-row gap-2 items-center","data-sentry-element":"CardTitle","data-sentry-source-file":"paddle-account-settings.jsx",children:" Integrations"}),(0,s.jsx)(w.SZ,{className:"mt-1","data-sentry-element":"CardDescription","data-sentry-source-file":"paddle-account-settings.jsx",children:"Connect your Shopify store or your AutoDS account to Glitching"})]}),(0,s.jsx)(w.aY,{"data-sentry-element":"CardContent","data-sentry-source-file":"paddle-account-settings.jsx",children:(0,s.jsxs)(x.z,{onClick:()=>{L.push("/dashboard?location=integrations")},variant:"outline",className:"w-[12rem] group","data-sentry-element":"Button","data-sentry-source-file":"paddle-account-settings.jsx",children:["Go To Integrations ",(0,s.jsx)(j.Z,{className:"w-4 h-4 ml-1.5 transition-all ease-in duration-100 group-hover:translate-x-1","data-sentry-element":"ArrowRightIcon","data-sentry-source-file":"paddle-account-settings.jsx"})]})})]}),(0,s.jsxs)(w.Zb,{className:"shadow-xl shadow-slate-950 rounded-[.1rem] flex flex-col z-20 w-full max-w-[50rem] border border-accent transition-all duration-1000 ".concat(h?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),"data-sentry-element":"Card","data-sentry-source-file":"paddle-account-settings.jsx",children:[(0,s.jsxs)(w.Ol,{"data-sentry-element":"CardHeader","data-sentry-source-file":"paddle-account-settings.jsx",children:[(0,s.jsx)(w.ll,{className:"flex flex-row gap-2 items-center","data-sentry-element":"CardTitle","data-sentry-source-file":"paddle-account-settings.jsx",children:" Account Settings "}),(0,s.jsx)(w.SZ,{className:"mt-1","data-sentry-element":"CardDescription","data-sentry-source-file":"paddle-account-settings.jsx",children:"Manage your account settings"})]}),(0,s.jsx)("div",{className:"flex flex-col gap-3 p-6 pt-0",children:(0,s.jsxs)("div",{className:"border border-accent p-4",children:[(0,s.jsx)("div",{className:"text-sm font-chakra-regular text-muted-foreground",children:"E-mail"}),(0,s.jsx)("div",{className:"font-chakra-semibold text-white",children:t&&(0,s.jsx)(s.Fragment,{children:t.email})}),(0,s.jsx)("div",{className:"text-sm mt-8 font-chakra-regular text-muted-foreground",children:"Subscription Status"}),(0,s.jsx)("div",{children:(0,s.jsx)(ei.C,{variant:T?k?"destructive":A&&"yes"===y?"secondary":"no"===y?"secondary":g?"default":"yes"===y?"default":"":"secondary",size:"xl",className:"pointer-events-none text-foreground flex items-center gap-1 w-auto max-w-[9rem] flex justify-center mt-2 font-chakra-medium text-[.9rem]","data-sentry-element":"Badge","data-sentry-source-file":"paddle-account-settings.jsx",children:T?(0,s.jsx)(s.Fragment,{children:k?"Card Declined":A&&"yes"===y?"Ending on ".concat(new Date(m).toLocaleString("default",{day:"2-digit",month:"2-digit"})):"no"===y?"Inactive":g?"Free Trial":"yes"===y?"Active":""}):(0,s.jsxs)(s.Fragment,{children:["Loading",(0,s.jsx)(C.Z,{className:"w-4 h-4 ml-1.5 animate-spin"})]})})})]})}),(0,s.jsx)("div",{className:"flex flex-col gap-3 px-6 pb-6 ",children:(0,s.jsxs)("div",{className:"border border-accent p-4",children:[(0,s.jsx)("div",{className:"font-chakra-regular text-muted-foreground text-sm",children:"Actions"}),(0,s.jsxs)("div",{className:"flex flex-row flex-wrap gap-3 mt-2",children:[E?(0,s.jsxs)(x.z,{className:"pointer-events-none",variant:"outline",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 mr-1.5 text-green-500"}),"Discord Linked"]}):(0,s.jsx)(x.z,{onClick:async()=>{if("no"===y){e.setTrialPopup(!0);return}window.location.href="https://discord.com/oauth2/authorize?client_id=1223067356192964628&response_type=code&redirect_uri=https%3A%2F%2Fwww.glitching.ai%2Fdashboard%3Flocation%3Daccount-settings&scope=identify+guilds.join+guilds.members.read"},variant:"outline",children:z?(0,s.jsx)("span",{children:"Loading..."}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.dsO,{className:"w-4 h-4 mr-1.5"}),"Link Discord "]})}),k?(0,s.jsx)(x.z,{onClick:async()=>{await payWithDifferentCard()},className:"gap-1.5",children:R?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e$.Z,{className:"w-4 h-4"}),"Pay with different card",(0,s.jsx)(C.Z,{className:"w-4 h-4 ml-1.5 animate-spin"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e$.Z,{className:"w-4 h-4"}),"Pay with different card ",M&&"(".concat(M,")")]})}):"yes"===y&&A?(0,s.jsx)(s.Fragment,{}):"no"===y?(0,s.jsx)(s.Fragment,{}):(0,s.jsx)(x.z,{onClick:async()=>{await updatePaymentMethod()},className:"gap-1.5",children:T?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e$.Z,{className:"w-4 h-4"})," Update Payment Info ",M&&"(".concat(M,")")," "]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e$.Z,{className:"w-4 h-4"})," Update Payment Info ",(0,s.jsx)(C.Z,{className:"w-4 h-4 ml-1.5 animate-spin"})]})}),!A||"yes"!==y||g||k?(0,s.jsxs)(x.z,{variant:A&&g?"secondary":"no"!==y||k?A&&"yes"===y&&!g?"secondary":"destructive":"secondary",disabled:("no"===y||A)&&!k,onClick:async()=>{e.setCancelPopup(!0)},children:[" ",A&&g?"Cancelling At End Of Trial":"no"!==y||k?A&&"yes"===y&&!g?"Cancelling At End Of Cycle":(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.Pxu,{className:"w-4 h-4 mr-1.5"}),"Cancel Subscription"]}):"Subscription Inactive"]}):(0,s.jsx)(x.z,{disabled:O,onClick:async()=>{e.setReactivationPopup(!0)},children:O?(0,s.jsxs)(s.Fragment,{children:[" Loading ",(0,s.jsx)(C.Z,{className:"w-4 h-4 ml-1.5 animate-spin"})," "]}):"Reactivate Subscription"})]})]})})]})]})}var e0=a(34187);function CancelSubPaddle(e){let{currentUser:t,getSubscription:a,getChargeDeclined:r,getPaddleSubscription:n}=(0,d.a)(),[o,l]=(0,i.useState)(1),[c,u]=(0,i.useState)(""),[m,h]=(0,i.useState)(""),[p,g]=(0,i.useState)(""),[f,b]=(0,i.useState)(!1),[w,y]=(0,i.useState)("");async function cancelSubscription(){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Loading..."]}),description:"Please wait while we cancel your subscription."});let[r,i]=await Promise.all([a(t),n(t)]),o=await fetch("/api/paddle-api/cancel_subscription?uid=".concat(t.uid),{method:"POST",headers:{Authorization:"Bearer ".concat(t.accessToken),"Content-Type":"application/json"},body:JSON.stringify({subscriptionId:i})});if(!o.ok){b(!1),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Couldn't cancel your subscription. Please contact support for assistance.",variant:"destructive"});return}if("yes"===r){b(!1),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Your subscription will automatically cancel at the end of your cycle."}),e.setCancelledFromPopup(!0),e.setCancelPopup(!1);return}b(!1),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Your subscription has been cancelled."}),e.setCancelledFromPopup(!0),e.setCancelPopup(!1)}async function removeAccess(){let a=await n(t),r=await fetch("/api/paddle-api/removeAccess?uid=".concat(t.uid),{method:"POST",headers:{Authorization:"Bearer ".concat(t.accessToken),"Content-Type":"application/json"},body:JSON.stringify({subscriptionId:a})});if(!r.ok){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Couldn't cancel your subscription. Please contact support for assistance.",variant:"destructive"}),b(!1);return}b(!1),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Your subscription has been cancelled."}),e.setCancelPopup(!1),e.setCancelledFromPopup(!0)}return(0,i.useEffect)(()=>{let e=localStorage.getItem("userSplitTestLetter");y(e)},[w]),(0,s.jsx)(eA.Vq,{open:e.cancelPopup,onOpenChange:()=>{e.setCancelPopup(!e.cancelPopup),setTimeout(()=>{l(1),u(""),h(""),g("")},100)},children:(0,s.jsx)(eA.cZ,{className:"outline-none border-accent max-h-[85vh] overflow-auto",children:(0,s.jsx)("div",{className:"flex flex-col lg:w-full w-full items-center justify-center gap-3 rounded-[.4rem] z-20",children:1===o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h1",{className:"font-chakra-bold text-white text-2xl lg:text-3xl",children:"We're sorry to see you go "}),(0,s.jsx)("div",{className:"lg:text-lg text-muted-foreground font-chakra-regular text-center",children:"Please help us improve Glitching! Can you tell us why you're leaving?"}),(0,s.jsxs)("div",{className:"w-full flex flex-col gap-5 mt-3",children:[(0,s.jsxs)("div",{onClick:()=>{u("budget"),h("")},className:"p-3 rounded-[.1rem] ".concat("budget"===c?"bg-primary-foreground border border-blue-700":"bg-background border border-accent transition-all ease-in 200 lg:hover:bg-primary-foreground"," flex items-center gap-3 cursor-pointer"),children:[(0,s.jsx)("div",{className:"p-1 rounded-[.1rem] bg-blue-600 w-[2.1rem] flex items-center justify-center text-white font-bold",children:"budget"===c?(0,s.jsx)(P.Z,{className:"text-white text-2xl p-1 fade"}):"A"}),(0,s.jsx)("span",{className:"font-chakra-semibold ".concat("budget"===c?"text-blue-500":"text-white"),children:"It's out of my budget \uD83D\uDCB0"})]}),(0,s.jsxs)("div",{onClick:()=>{u("technical-issues"),h("")},className:"p-3 rounded-[.1rem] ".concat("technical-issues"===c?"bg-primary-foreground border border-blue-700":"bg-background border border-accent transition-all ease-in 200 lg:hover:bg-primary-foreground"," flex items-center gap-3 cursor-pointer"),children:[(0,s.jsx)("div",{className:"p-1 rounded-[.1rem] bg-blue-600 w-[2.1rem] flex items-center justify-center text-white font-bold",children:"technical-issues"===c?(0,s.jsx)(P.Z,{className:"text-white text-2xl p-1 fade"}):"B"}),(0,s.jsx)("span",{className:"font-chakra-semibold ".concat("technical-issues"===c?"text-blue-500":"text-white"),children:"I'm having technical difficulties ⚙️"})]}),(0,s.jsxs)("div",{onClick:()=>{u("not-used"),h("")},className:"p-3 rounded-[.1rem] ".concat("not-used"===c?"bg-primary-foreground border border-blue-700":"bg-background border border-accent transition-all ease-in 200 lg:hover:bg-primary-foreground"," flex items-center gap-3 cursor-pointer"),children:[(0,s.jsx)("div",{className:"p-1 rounded-[.1rem] bg-blue-600 w-[2.1rem] flex items-center justify-center text-white font-bold",children:"not-used"===c?(0,s.jsx)(P.Z,{className:"text-white text-2xl p-1 fade"}):"C"}),(0,s.jsx)("span",{className:"font-chakra-semibold ".concat("not-used"===c?"text-blue-500":"text-white"),children:"I don't use it enough \uD83E\uDD1D"})]}),(0,s.jsxs)("div",{onClick:()=>{u("temporary"),h("")},className:"p-3 rounded-[.1rem] ".concat("temporary"===c?"bg-primary-foreground border border-blue-700":"bg-background border border-accent transition-all ease-in 200 lg:hover:bg-primary-foreground"," flex items-center gap-3 cursor-pointer"),children:[(0,s.jsx)("div",{className:"p-1 rounded-[.1rem] bg-blue-600 w-[2.1rem] flex items-center justify-center text-white font-bold",children:"temporary"===c?(0,s.jsx)(P.Z,{className:"text-white text-2xl p-1 fade"}):"D"}),(0,s.jsx)("span",{className:"font-chakra-semibold ".concat("temporary"===c?"text-blue-500":"text-white"),children:"I'm temporarily cancelling, I'll be back!"})]})]}),c&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("h1",{className:"font-chakra-semibold mt-3 text-white",children:["budget"===c&&"How much would you be willing to pay for Glitching?","technical-issues"===c&&"We'll let our developers know. What issues did you experience?","not-used"===c&&"What improvements/features would make you stay?","temporary"===c&&"We totally get it! Can you tell us why you're leaving?"]}),(0,s.jsx)("textarea",{onInput:e=>h(e.target.value),placeholder:"budget"===c?"Enter the amount here":"technical-issues"===c?"Describe the issue here":"not-used"===c?"Describe the improvements here":"Tell us why you're leaving",className:"mt-1 w-full rounded-[.1rem] border border-accent bg-background font-chakra-regular text-slate-400 outline-none placeholder-slate-600 resize-none min-h-[6rem] p-2"}),(0,s.jsxs)("div",{className:"w-full flex justify-end text-slate-400 font-chakra-regular text-[.8rem]",children:[m.length," / 5"]})]}),(0,s.jsx)("div",{className:"w-full border-t-[.8px] border-slate-600 mt-5 mb-5"}),(0,s.jsxs)("div",{className:"w-full flex items-center justify-between",children:[(0,s.jsx)(x.z,{variant:"secondary",onClick:()=>{e.setCancelPopup(!1)},children:"Go Back"}),(0,s.jsx)(x.z,{onClick:()=>{l(2)},disabled:!m||m.length<5,children:"Next"})]})]}):2===o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h1",{className:"font-chakra-bold text-white text-2xl lg:text-3xl",children:"What can we do better?"}),(0,s.jsx)("div",{className:"text-muted-foreground font-chakra-regular text-center my-1",children:"Your honest feedback is super valuable to us and will help us improve Glitching."}),(0,s.jsx)("textarea",{onInput:e=>g(e.target.value),placeholder:"Tell us what we can improve",className:"mt-1 w-full rounded-[.1rem] border border-accent bg-background font-chakra-regular text-slate-400 outline-none placeholder-slate-600 resize-none min-h-[6rem] p-2"}),(0,s.jsxs)("div",{className:"w-full flex justify-end text-[.8rem] text-muted-foreground font-chakra-regular",children:[p.length," / 5"]}),(0,s.jsx)("div",{className:"w-full border-t-[.8px] border-slate-600 mt-5 mb-5"}),(0,s.jsxs)("div",{className:"w-full flex items-center justify-between",children:[(0,s.jsx)(x.z,{variant:"secondary",onClick:()=>{l(1),g("")},children:"Go Back"}),(0,s.jsx)(x.z,{onClick:()=>{l(3)},disabled:!p||p.length<5,children:"Next"})]})]}):3===o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h1",{className:"font-chakra-bold text-white text-2xl lg:text-3xl",children:"Are you sure?"}),(0,s.jsxs)("div",{className:"text-muted-foreground font-chakra-regular text-center my-1 flex flex-col gap-2",children:["If you choose to cancel, your subscription will be terminated. ",(0,s.jsx)("span",{children:"Our tech team is working hard and we've got some major upgrades soon."})," ",(0,s.jsx)("strong",{className:"text-slate-100",children:" Just a heads up, our prices will be increasing soon."})]}),(0,s.jsx)("div",{className:"w-full border-t-[.8px] border-slate-600 mt-5 mb-5"}),(0,s.jsxs)("div",{className:"w-full flex items-center justify-between",children:[(0,s.jsx)(x.z,{variant:"secondary",disabled:f,onClick:()=>{l(2),g("")},children:"Go Back"}),(0,s.jsx)(x.z,{onClick:async()=>{b(!0);let e=await r(t);e?await removeAccess():await cancelSubscription()},disabled:f,children:f?(0,s.jsxs)(s.Fragment,{children:["Cancelling ",(0,s.jsx)(C.Z,{className:"ml-2 animate-spin w-4 h-4"})]}):(0,s.jsx)(s.Fragment,{children:"Confirm & Cancel"})})]})]}):null})})})}var e1=a(37921);function SavePayment(e){let{currentUser:t,getPaddleSubscription:a}=(0,d.a)(),r=(0,o.useRouter)(),[n,l]=(0,i.useState)(null);async function payWithDifferentCard(){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Loading..."]}),description:"Preparing for billing update."}),l(!0);let n=await a(t),i=await fetch("/api/paddle-api/latestPastDue?uid=".concat(t.uid),{method:"POST",headers:{Authorization:"Bearer ".concat(t.accessToken),"Content-Type":"application/json"},body:JSON.stringify({subscriptionId:n})});if(!i.ok){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"An error has occurred. Contact support for assistance.",variant:"destructive"}),l(!1);return}let o=await i.json(),c=o.txn_id;r.push("/pay?_ptxn=".concat(c)),l(!1)}return(0,s.jsx)(eA.Vq,{open:e.payDifferentCard,onOpenChange:e.setPayDifferentCard,children:(0,s.jsx)(eA.cZ,{className:"outline-none border-accent",children:(0,s.jsxs)("div",{className:"flex flex-col lg:w-full w-full items-center justify-center gap-3 rounded-[.4rem] z-20",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(e$.Z,{className:"w-28 h-28 text-destructive"}),(0,s.jsx)(e1.Z,{className:"absolute bottom-2 -right-1 text-foreground w-12 h-12 bg-background rounded-full p-1"})]}),(0,s.jsx)("h1",{className:"font-bold text-white text-xl lg:text-2xl text-center font-chakra-bold",children:"Your Payment Was Declined"}),(0,s.jsx)("div",{className:"text-slate-400 lg:text-lg text-center font-chakra-regular mb-3",children:"Use a different card to access Glitching."}),(0,s.jsx)(x.z,{size:"xl",disabled:n,className:"text-[1rem] w-full flex items-center gap-2",onClick:async()=>{await payWithDifferentCard()},children:n?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eF.ypE,{})," Update Payment Info"]})})]})})})}var e2=a(71581),e5=a(32801),e4=a(82278),e3=a(34464),e8=a(57420),e6=a(5097),e7=a(57307),e9=a(98082),te=a(1930),tt={src:"/_next/static/media/tiktok.75db302e.png",height:500,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAATlBMVEVMaXH/pr3EpLn/ZpGT9vQl4ODK6u0N+u//EFDq4uzN9fD/DlXR/fy8aIvC8/MA//n/NnD909/3bZb/hqmvsMQI//+n8vH/mbj28/b33OtxyWAFAAAAGXRSTlMAQmCs0ATwIDbyMxL7WMoyS6RksKlY89j1lsfRQwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAD1JREFUeJwdi0kSgCAQxIIyDLixuKD//6g15JRUVwOIYgj6OMRUt3cCsr/C2QDf91BsOOqdosmSvnm8WEf/MwcBece06EoAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8},ta={src:"/_next/static/media/meta.dba6e8f2.png",height:500,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAANlBMVEUAAOEAg/8Ae/kAhP8AffsAaOsAdfVMaXEAgPwAefgAhf8Ai/8Ahf8AaewAZekAYuQAZucAW+Cw/7wqAAAAEnRSTlMBVoHArVHNAKY0PiGTn8ZqxxkSFb3xAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAPUlEQVR4nBXLSRLAIAwEsTEY2mYJyf8/m0J3SYBAou2cy1B7zhsjTN7wToa6bO2Cq5Y6v15cGQMyUrfe/wM9BwGnPAbJpQAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8},ts=a(78633);function AutomaticMode(e){let[t,a]=(0,i.useState)(null),[r,n]=(0,i.useState)(null);(0,i.useEffect)(()=>{let e=new AbortController;return a(e),n(e.signal),()=>{e.abort()}},[]);let{currentUser:l,contextChargeDeclined:u,getSavedProducts2:m,getGlitches:g,getRandomGlitchModeProduct:b}=(0,d.a)();(0,i.useEffect)(()=>{if(l){if(u){e.setPayDifferentCard(!0);return}"no"===e.subscribed&&e.setTrialPopup(!0)}},[u,e.subscribed,l]);let y=(0,o.useRouter)(),[v,k]=(0,i.useState)(!1),[N,A]=(0,i.useState)([]),[S,T]=(0,i.useState)(!1),[D,z]=(0,i.useState)(!1),[I,E]=(0,i.useState)(!1),[F,B]=(0,i.useState)(!1),[_,O]=(0,i.useState)(!1),[Z,M]=(0,i.useState)(!1),[U,R]=(0,i.useState)(!1),[G,L]=(0,i.useState)(!1),[V,H]=(0,i.useState)(0),[q,W]=(0,i.useState)(!1),[Q,Y]=(0,i.useState)([]),[J,K]=(0,i.useState)(null),[X,$]=(0,i.useState)(null),[ee,et]=(0,i.useState)(!1),[ea,er]=(0,i.useState)(!1),[eo,el]=(0,i.useState)(!1),[ed,em]=(0,i.useState)(!1),[ef,eN]=(0,i.useState)(!1),[eP,ez]=(0,i.useState)(null),[eI,eE]=(0,i.useState)(null),[eU,eR]=(0,i.useState)(null),[eG,eL]=(0,i.useState)(null),[eV,eH]=(0,i.useState)(null),[eq,eW]=(0,i.useState)(null),[eQ,eY]=(0,i.useState)(0),[eJ,eK]=(0,i.useState)(""),[eX,e$]=(0,i.useState)(""),[e0,e1]=(0,i.useState)(""),[tn,ti]=(0,i.useState)(""),[to,tl]=(0,i.useState)(""),[tc,td]=(0,i.useState)(""),[tu,tm]=(0,i.useState)(""),[th,tp]=(0,i.useState)(""),[tg,tf]=(0,i.useState)(""),[tx,tb]=(0,i.useState)(""),[tw,ty]=(0,i.useState)(""),[tv,tj]=(0,i.useState)(""),[tk,tN]=(0,i.useState)(""),[tA,tS]=(0,i.useState)(""),[tT,tC]=(0,i.useState)([]),[tP,tD]=(0,i.useState)("tiktok"),[tz,tI]=(0,i.useState)(null),[tE,tF]=(0,i.useState)(null),[tB,t_]=(0,i.useState)(null),[tO,tZ]=(0,i.useState)(null),[tM,tU]=(0,i.useState)([]),[tR,tG]=(0,i.useState)(null),[tL,tV]=(0,i.useState)(null),tH=(0,i.useRef)(null),tq=(0,i.useRef)(null),[tW,tQ]=(0,i.useState)(1),[tY,tJ]=(0,i.useState)(!1),[tK,tX]=(0,i.useState)(!1),handleCardSelection=e=>{ez(t=>t===e?t:e)};(0,i.useEffect)(()=>{setTimeout(()=>{em(!0)},10)},[]),(0,i.useEffect)(()=>{ee&&setTimeout(()=>{eN(!0)},10)},[ee]),(0,i.useEffect)(()=>{let e;if(D){let t=0;e=setInterval(()=>{H(Math.min(t+=.5,100)),t>=100&&clearInterval(e)},300)}else e&&clearInterval(e);return()=>{clearInterval(e)}},[D]),(0,i.useEffect)(()=>{l&&(m(l).then(e=>{if(e){W(!0),Y(e.reverse());return}fetch("/api/my-products/createProductsUser?uid=".concat(l.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+l.accessToken}})}),g(l).then(e=>{e&&A(e.filter(e=>2===e.version).reverse())}))},[l]);let t$=["Searching For Competitors","Extracting Relevant Competitors","Analyzing Store Data","Extracting Store Information","Extracting Product Information","Finalizing"],[t0,t1]=(0,i.useState)(0);async function craftProductPage(e,t,a){try{let[s,n]=await Promise.all([fetch("/api/product-page/description?uid=".concat(l.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+l.accessToken},body:JSON.stringify({report:e}),signal:r}),fetch("/api/automatic-mode/build-store?uid=".concat(l.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+l.accessToken},body:JSON.stringify({productName:t,productDescription:a}),signal:r})]);if(!s.ok||!n.ok)throw Error();let i=await s.json(),o=await n.json(),c=i.productPage,d=i.hook,u=i.benefits,m=i.cta;eK(i.hook),e$(i.benefits[0]),e1(i.benefits[1]),ti(i.benefits[2]),tl(i.benefits[3]),td(i.productPage[0].replace(/\*/g,"")),tm(i.productPage[1].replace(/\*/g,"")),tp(i.productPage[2].replace(/\*/g,"")),tf(i.productPage[3].replace(/\*/g,"")),tb(i.productPage[4].replace(/\*/g,"")),ty(i.productPage[5].replace(/\*/g,"")),tj(i.productPage[6].replace(/\*/g,"")),tN(i.productPage[7].replace(/\*/g,"")),tS(i.cta),eR(o.viralProductName),eE(o.storeName),eH(o.brandColor),eL(o.chosenTheme);let h=await Promise.all(o.logoBuffers.map(e=>uploadBase64ImageToFirebase(e,l.uid)));return eW(h),E(!0),{productPage:c,hook:d,benefits:u,cta:m,tokensUsed:i.totalTokensUsed+o.tokensUsed,viralProductName:o.viralProductName,storeName:o.storeName,brandColor:o.brandColor,chosenTheme:o.chosenTheme,logos:h}}catch(e){if("AbortError"===e.name)throw Error("AbortError");throw Error("There was an error generating your store.")}}async function sellingPlan(e){try{let t=await fetch("/api/automatic-mode/selling-plan?uid=".concat(l.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+l.accessToken},body:JSON.stringify({productName:e.productName,productDescription:e.productDescription||e.report.marketingAngles,signal:r})});if(t.ok){let e=await t.json();return tV(e.howToAdvertise),tG(e.chosenPlatform),setTimeout(()=>{B(!0)},9e3),{howToAdvertise:e.howToAdvertise,chosenPlatform:e.chosenPlatform,tokensUsed:e.tokensUsed}}throw Error()}catch(e){if("AbortError"===e.name)throw Error("AbortError");throw Error("There was an error generating your marketing insights.")}}(0,i.useEffect)(()=>{if(!ee)return;let e=setInterval(()=>{t1(t=>t<t$.length-1?t+1:(clearInterval(e),t))},3e3);return()=>clearInterval(e)},[ee]);let fetchTiktokVideos=async(e,t)=>{try{let a=await fetch("/api/find-tiktoks/tiktok-vids?uid=".concat(l.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+l.accessToken},body:JSON.stringify({productName:e,productImage:t}),signal:r});if(!a.ok)throw Error();let s=await a.json();O(!0);let n=await Promise.all(s.result.map(async e=>{try{let[t,a]=await Promise.all([uploadImageToStorage(e.thumbnailSrc,l.uid),uploadImageToStorage(e.userProfilePic,l.uid)]);return{...e,thumbnailSrc:t,userProfilePic:a}}catch(t){return console.error("Error uploading thumbnail:",t),e}}));return tU(n),n}catch(e){if("AbortError"===e.name)throw Error("AbortError");throw Error("There was an error finding relevant TikToks.")}};async function generateMetaAd(e){try{let fetchMetaAd=async()=>{let t=await fetch("/api/creatives/meta/ad-copy?uid=".concat(l.uid,"&glitch_mode=true"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+l.accessToken},body:JSON.stringify({productObject:e}),signal:r});if(!t.ok)throw Error();return await t.json()},[t,a]=await Promise.all([fetchMetaAd(),fetchMetaAd()]);return M(!0),tI(t.copy),t_(t.headline),tF(a.copy),tZ(a.headline),{metaCopy:t.copy,metaHeadline:t.headline,metaCopy2:a.copy,metaHeadline2:a.headline}}catch(e){if("AbortError"===e.name)throw Error("AbortError");throw Error("There was an error generating your Meta Ads.")}}async function listCompetitors(e){try{let t=await fetch("/api/find-competitors/list-competitors?uid=".concat(l.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+l.accessToken},body:JSON.stringify({productName:e}),signal:r});if(!t.ok)throw Error();let a=await t.json();return R(!0),tC(a.competitorList),a.competitorList}catch(e){if("AbortError"===e.name)throw Error("AbortError");throw Error("There was an error finding your competitors.")}}async function fetchAllData(t,a){z(!0);try{setTimeout(()=>{L(!0)},15e3);let[e,s,r,n,i]=await Promise.all([craftProductPage(a,t.productName,t.productDescription),sellingPlan(t),fetchTiktokVideos(t.productName,t.images[0]),generateMetaAd(t),listCompetitors(t.productName)]);z(!1),saveGlitch({sellingPlan:{howToAdvertise:s.howToAdvertise,chosenPlatform:s.chosenPlatform},store:e,competitors:i,ads:{meta:n,tiktoks:r},product:t,version:2,id:t.id});return}catch(t){if("AbortError"===t.message){console.log("abort error got through");return}goBack(),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:t.message,variant:"destructive"});return}}function formatContent(e){let t=e.split("\n").filter(e=>""!==e.trim());return t.map((e,a)=>{let r=e.split(/(\*\*.*?\*\*)/g);return(0,s.jsxs)("span",{className:"translate-y-2",children:[r.map((e,t)=>/^\*\*.*\*\*$/.test(e)?(0,s.jsx)("span",{className:"font-bold text-blue-400 mx-[1px]",children:e.slice(2,-2)},t):e),a!==t.length-1&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"mb-2"})})]},a)})}async function saveGlitch(e){await fetch("/api/automatic-mode/save-glitch?uid=".concat(l.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(l.accessToken)},body:JSON.stringify({glitch:e})});let t=await g(l);t&&A(t.filter(e=>2===e.version).reverse())}function loadSavedGlitch(e){K(e.product),eR(e.store.viralProductName),eE(e.store.storeName),eH(e.store.brandColor),eL(e.store.chosenTheme),eW(e.store.logos),eK(e.store.hook),e$(e.store.benefits[0]),e1(e.store.benefits[1]),ti(e.store.benefits[2]),tl(e.store.benefits[3]),td(e.store.productPage[0].replace(/\*/g,"")),tm(e.store.productPage[1].replace(/\*/g,"")),tp(e.store.productPage[2].replace(/\*/g,"")),tf(e.store.productPage[3].replace(/\*/g,"")),tb(e.store.productPage[4].replace(/\*/g,"")),ty(e.store.productPage[5].replace(/\*/g,"")),tj(e.store.productPage[6].replace(/\*/g,"")),tN(e.store.productPage[7].replace(/\*/g,"")),tS(e.store.cta),tV(e.sellingPlan.howToAdvertise),tG(e.sellingPlan.chosenPlatform),tI(e.ads.meta.metaCopy),t_(e.ads.meta.metaHeadline),tF(e.ads.meta.metaCopy2),tZ(e.ads.meta.metaHeadline2),tU(e.ads.tiktoks),tC(e.competitors),ez("Store Builder"),E(!0),B(!0),M(!0),R(!0),O(!0),L(!0)}async function uploadBase64ImageToFirebase(e,t){try{let a=Math.random().toString(36).substring(2,15),s=(0,eO.iH)(eZ.t,"/users/".concat(t,"/").concat(a,".png")),r=e,n="image/png";if(r.startsWith("data:")){let e=r.match(/^data:(.+);base64,(.*)$/);if(e)n=e[1],r=e[2];else throw Error("Invalid base64 data URL")}let i=atob(r),o=Array(i.length);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);let l=new Uint8Array(o),c=new Blob([l],{type:n}),d=await (0,eO.KV)(s,c),u=await (0,eO.Jt)(d.ref);return u}catch(e){throw Error("There was an error uploading your image.")}}async function deleteGlitch(e){A(N.filter(t=>t.id!==e)),fetch("/api/automatic-mode/delete-glitch?uid=".concat(l.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(l.accessToken)},body:JSON.stringify({id:e})})}async function saveProduct(e){let t=await fetch("/api/my-products/saveImportedProduct?uid=".concat(l.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+l.accessToken},body:JSON.stringify({product:e})}),a=await t.json(),s=await m(l);return Y(s.reverse()),a.id}async function updateMarketInsightsAndDescription(t){try{k(!1),tX(!0),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Updating product data"]}),description:"This can take up to 30 seconds."});let a=await fetch("/api/my-products/updateMarketInsightsAndDescription?uid=".concat(l.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+l.accessToken},body:JSON.stringify({productName:t.productName,productImages:t.images})});if(!a.ok)throw Error("Failed to update market insights");let r=await a.json(),n={...t,report:r.report,productDescription:r.productDescription};return await updatePreviouslyImportedProduct(n),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Product data updated."}),tX(!1),Y(e=>e.map(e=>e.id===n.id?n:e)),n}catch(t){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Failed to update product data.",variant:"destructive"}),tX(!1);return}}async function updatePreviouslyImportedProduct(e){await fetch("/api/my-products/updatePreviouslyImportedProduct?uid=".concat(l.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+l.accessToken},body:JSON.stringify({product:e,id:e.id})})}function goBack(){if(y.query.id){let{id:e,...t}=y.query;y.replace({pathname:y.pathname,query:t},void 0,{shallow:!0})}k(!1),er(!1),el(!1),et(null),z(!1),L(!1),R(!1),M(!1),B(!1),E(!1),O(!1),eK(""),e$(""),e1(""),ti(""),tl(""),td(""),tm(""),tp(""),tf(""),tb(""),ty(""),tj(""),tN(""),tS(""),eR(""),eE(""),eH(""),eL(""),eW([]),tV(""),tG(""),tU([]),tI(""),t_(""),tF(""),tZ(""),tC([]),t1(0),K(null),ez("Store Builder"),$(null),eY(0),tD("tiktok"),eN(!1),H(0),t.abort();let e=new AbortController;a(e),n(e.signal)}async function uploadImageToStorage(e,t){try{let a=Math.random().toString(36).substring(2,15),s=(0,eO.iH)(eZ.t,"/users/".concat(t,"/").concat(a,".png"));if("string"!=typeof e||!e.startsWith("http"))throw Error("Invalid image data format. Expected URL string.");let r=await fetch(e);if(!r.ok)throw Error("Failed to fetch image from URL");let n=await r.blob(),i=await (0,eO.KV)(s,n),o=await (0,eO.Jt)(i.ref);return o}catch(t){return console.error("Error uploading image:",t),e}}return((0,i.useEffect)(()=>{if(!y.query.id||!q)return;let e=y.query.id,t=N.find(t=>t.id===e);if(console.log(t),t){et(!0),loadSavedGlitch(t);return}{let t=Q.find(t=>t.id===e);t&&(et(!0),K(t),ez("Store Builder"),fetchAllData(t,{productName:t.productName,reviews:t.reviews,productDescription:t.productDescription,report:t.report}))}},[y.query.id,q]),ee)?(0,s.jsxs)("div",{className:"dark animated-element w-full flex flex-col items-center 2xl:justify-center gap-5 relative lg:p-12 p-5 lg:overflow-auto","data-sentry-component":"AutomaticMode","data-sentry-source-file":"automatic-mode.jsx",children:[(0,s.jsx)(MatrixGrid,{"data-sentry-element":"MatrixGrid","data-sentry-source-file":"automatic-mode.jsx"}),(0,s.jsxs)("div",{className:"w-full lg:w-[65rem] lg:min-h-[50rem] flex flex-col gap-5",children:[(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row lg:justify-between lg:items-center gap-3 py-3 border-b border-accent ".concat(ef?"opacity-100 translate-y-0":"opacity-0 translate-y-10"," transition-all duration-1000 "),children:[(0,s.jsxs)("div",{className:"h-full flex flex-row lg:items-center gap-2 relative cursor-pointer",children:[(0,s.jsxs)(x.z,{variant:"outline",onClick:goBack,size:window.innerWidth<768?"sm":"lg",className:"group lg:mr-2","data-sentry-element":"Button","data-sentry-source-file":"automatic-mode.jsx",children:[(0,s.jsx)(en.Z,{className:"w-4 h-4 group-hover:-translate-x-1 transition-all duration-100 ease-in mr-1","data-sentry-element":"ArrowLeftIcon","data-sentry-source-file":"automatic-mode.jsx"})," Back"]}),(0,s.jsx)("div",{className:"lg:min-w-[2.3rem] lg:min-h-[2.3rem] min-w-[1.9rem] min-h-[1.9rem] w-[1.9rem] h-[1.9rem] lg:w-[2.3rem] lg:h-[2.3rem] bg-white rounded-[.1rem] overflow-hidden",children:(0,s.jsx)("img",{src:J.images[0]||"",className:"w-full h-full object-cover"})}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("div",{className:"font-chakra-regular text-primary lg:text-[.85rem] text-[.6rem]",children:"Selected Product"}),(0,s.jsx)("div",{className:"font-chakra-bold lg:text-[1rem] text-[.8rem] text-foreground flex items-center gap-3",children:window.innerWidth>=1024?J.productName.length>50?"".concat(J.productName.slice(0,50),"..."):J.productName:J.productName.length>30?"".concat(J.productName.slice(0,30),"..."):J.productName})]})]}),D?(0,s.jsx)("div",{className:V>=100?"pulsing-border-glow-thin rounded-full":"",children:(0,s.jsx)(te.E,{className:"w-[20rem] h-[.75rem]",value:V})}):(0,s.jsxs)(eA.Vq,{children:[(0,s.jsx)(eA.hg,{asChild:!0,children:(0,s.jsxs)(x.z,{className:"text-foreground",children:[" ",(0,s.jsx)(h.Z,{className:"w-4 h-4 mr-2"})," View Product Details"]})}),(0,s.jsxs)(eA.cZ,{className:"sm:max-w-[450px] border-accent",children:[(0,s.jsxs)("div",{className:"flex flex-row gap-3 mb-2 lg:mb-3",children:[(0,s.jsx)("div",{className:"flex flex-col gap-2 max-h-[7rem] lg:max-h-[9.5rem] overflow-y-auto",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:J&&J.images.map((e,t)=>(0,s.jsx)("div",{className:"lg:min-h-[3rem] lg:w-[3rem] min-h-[2rem] w-[2rem] bg-white rounded-[.1rem] cursor-pointer border-[2px]  ".concat(e===X?"border-primary":"border-transparent hover:border-primary"),onClick:()=>{e!==X&&$(e)},children:(0,s.jsx)("img",{src:e,className:"w-full h-full object-cover rounded-[.1rem]",alt:"Product thumbnail"})},t))}),(0,s.jsx)("div",{className:"lg:h-[9.5rem] lg:w-[9.5rem] h-[7rem] w-[7rem] bg-white rounded-[.1rem]",children:(0,s.jsx)("img",{src:J&&X||(J.images?J.images[0]:""),className:"w-full h-full object-cover rounded-[.1rem]"})})]}),J.aliexpressLink?(0,s.jsxs)(x.z,{onClick:()=>{window.open(function(e){let t=e.match(/\/item\/(\d+)\.html/);return t&&t[1]?"https://www.aliexpress.us/item/".concat(t[1],".html"):e}(J.aliexpressLink),"_blank")},variant:"outline",className:"w-full",children:[(0,s.jsx)(c(),{src:eS,alt:"aliexpress logo",className:"w-4 h-4 object-contain rounded-[.1rem] saturate-[150%] mr-1.5"}),"View On AliExpress"]}):!J.aliexpressLink&&J.amazonLink?(0,s.jsxs)(x.z,{onClick:()=>{window.open(J.amazonLink,"_blank")},variant:"outline",className:"w-full",children:[(0,s.jsx)(c(),{src:eT,alt:"amazon logo",className:"w-4 h-4 object-contain rounded-[.1rem] saturate-[150%] mr-1.5"}),"View On Amazon"]}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)("div",{className:"font-chakra-semibold text-foreground lg:text-[1rem] text-[.85rem]",children:J&&(J.productName.length>60?J.productName.slice(0,60)+"...":J.productName)}),(0,s.jsxs)("div",{className:"flex flex-row w-full gap-3  mt-2 lg:mt-3",children:[(0,s.jsxs)(w.Zb,{className:"w-[33%] bg-primary-foreground border-accent p-1.5 lg:p-3 rounded-[.1rem]",children:[(0,s.jsx)("div",{className:"text-[.6rem] lg:text-[.8rem] text-red-400 font-chakra-regular",children:"Estimated Cost"}),(0,s.jsxs)("div",{className:"text-white text-[.8rem] lg:text-[1rem] font-chakra-medium",children:["$",J&&J.aliexpressPrice.toFixed(2)]})]}),(0,s.jsxs)(w.Zb,{className:"w-[33%] bg-primary-foreground border-accent p-1.5 lg:p-3 rounded-[.1rem]",children:[(0,s.jsx)("div",{className:"text-[.6rem] lg:text-[.8rem] text-blue-400 font-chakra-regular",children:"Sale Price"}),(0,s.jsxs)("div",{className:"text-white text-[.8rem] lg:text-[1rem] font-chakra-medium",children:["$",J&&J.amazonPrice.toFixed(2)]})]}),(0,s.jsxs)(w.Zb,{className:"w-[33%] bg-primary-foreground border-accent p-1.5 lg:p-3 rounded-[.1rem]",children:[(0,s.jsx)("div",{className:"text-[.6rem] lg:text-[.8rem] text-green-400 font-chakra-regular",children:"Profit"}),(0,s.jsxs)("div",{className:"text-white text-[.8rem] lg:text-[1rem] font-chakra-medium",children:["$",J&&J.profit?J.profit.toFixed(2):J&&!J.profit?(J.amazonPrice-J.aliexpressPrice).toFixed(2):"-"]})]})]}),(0,s.jsx)("div",{className:"text-slate-400 text-[.7rem] flex items-center gap-1 font-chakra-regular",children:"The cost, sale price & profit are estimates and may not be entirely accurate."}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full mt-2 lg:mt-3",children:[(0,s.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent p-1.5 lg:p-3 rounded-[.1rem] w-1/2",children:[(0,s.jsx)("div",{className:"text-white font-chakra-semibold text-[.75rem] lg:text-[.8rem]",children:"\uD83E\uDD75 Saturation"}),(0,s.jsx)("div",{className:"w-full p-0.5 bg-background rounded-[.1rem] mt-1",children:(0,s.jsx)("div",{style:{width:"".concat(J&&J.saturation,"%")},className:"p-1 ".concat(J&&J.saturation<61?"bg-gradient-to-r from-emerald-600 to-emerald-500":J&&J.saturation>60&&J.saturation<66?"bg-gradient-to-r from-yellow-600 to-amber-500":"bg-gradient-to-r from-red-600 to-red-500"," rounded-[.1rem]")})})]}),(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent p-1.5 lg:p-3 rounded-[.1rem] w-1/2",children:[(0,s.jsx)("div",{className:"text-white font-chakra-semibold text-[.75rem] lg:text-[.8rem]",children:"\uD83E\uDD2F Wow Factor"}),(0,s.jsx)("div",{className:"w-full p-0.5 bg-background rounded-[.1rem] mt-1",children:(0,s.jsx)("div",{style:{width:"".concat(J&&J.wowFactor,"%")},className:"".concat(J&&J.wowFactor<31?"bg-gradient-to-r from-red-600 to-red-500":J&&J.wowFactor>30&&J.wowFactor<41?"bg-gradient-to-r from-yellow-600 to-amber-500":"bg-gradient-to-r from-emerald-600 to-emerald-500"," p-1 rounded-[.1rem]")})})]})]}),(0,s.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent p-1.5 lg:p-3 rounded-[.1rem] w-1/2",children:[(0,s.jsx)("div",{className:"text-white font-chakra-semibold text-[.75rem] lg:text-[.8rem]",children:"\uD83E\uDD11 Profit Margin"}),(0,s.jsx)("div",{className:"w-full p-0.5 bg-background rounded-[.1rem] mt-1",children:(0,s.jsx)("div",{style:{width:"".concat(J&&J.profit,"%")},className:"".concat(J&&"bg-gradient-to-r ".concat(J.profit||J.amazonPrice-J.aliexpressPrice<10?"from-red-600 to-red-500":J.profit||J.amazonPrice-J.aliexpressPrice>10&&J.profit||J.amazonPrice-J.aliexpressPrice<20?"from-yellow-600 to-amber-500":"from-emerald-600 to-emerald-500")," p-1 rounded-[.1rem]")})})]}),(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent p-1.5 lg:p-3 rounded-[.1rem] w-1/2",children:[(0,s.jsx)("div",{className:"text-white font-chakra-semibold text-[.75rem] lg:text-[.8rem]",children:"\uD83C\uDFAF Product Market Fit"}),(0,s.jsx)("div",{className:"w-full p-0.5 bg-background rounded-[.1rem] mt-1",children:(0,s.jsx)("div",{style:{width:"".concat(J&&J.pmf,"%")},className:"".concat(J&&J.pmf<31?"bg-gradient-to-r from-red-600 to-red-500":J&&J.pmf>30&&J.pmf<41?"bg-gradient-to-r from-yellow-600 to-amber-500":"bg-gradient-to-r from-emerald-600 to-emerald-500"," p-1 rounded-[.1rem]")})})]})]})]}),(0,s.jsx)("div",{className:"w-[12rem]",children:(0,s.jsx)(ConnectAutoDs,{})})]})]})]}),e.showBanner&&(0,s.jsx)("div",{className:"w-full lg:w-[65rem] ".concat(ef?"opacity-100 translate-y-0":"opacity-0 translate-y-16"," transition-all duration-1000"),children:(0,s.jsx)(e_.Z,{})}),(0,s.jsxs)("div",{className:"flex flex-row flex-wrap max-w-full gap-3 ".concat(ef?"opacity-100 translate-y-0":"opacity-0 translate-y-20"," transition-all duration-1000 "),children:[(0,s.jsxs)(w.Zb,{onClick:()=>handleCardSelection("Store Builder"),onKeyPress:e=>{("Enter"===e.key||" "===e.key)&&handleCardSelection("Store Builder")},tabIndex:0,className:"lg:h-full lg:p-3 p-1 lg:px-3 px-2 border-accent shadow-xl shadow-slate-950 flex flex-row items-center gap-2 lg:grow cursor-pointer transition-all ease-in duration-100 ".concat("Store Builder"===eP?"border-primary/20 bg-primary/10 backdrop-blur-md hover:none":"hover:bg-primary-foreground"),"data-sentry-element":"Card","data-sentry-source-file":"automatic-mode.jsx",children:[(0,s.jsx)("div",{className:"lg:w-[2rem] lg:h-[2rem] w-4 h-4 rounded-[.1rem]",children:I?(0,s.jsx)(P.Z,{className:"w-full h-full text-blue-500 scale-[95%]"}):(0,s.jsx)(C.Z,{className:"animate-spin w-full h-full text-primary"})}),(0,s.jsxs)("div",{className:"flex flex-col",children:[I?(0,s.jsx)("div",{className:"font-chakra-regular text-muted-foreground text-[.7rem] hidden lg:block",children:"Finished"}):(0,s.jsx)("div",{className:"font-chakra-regular text-muted-foreground text-[.7rem] hidden lg:block",children:"Loading..."}),(0,s.jsx)("div",{className:"font-chakra-bold text-[.8rem] lg:text-[.85rem]",children:"Store Builder"})]})]}),(0,s.jsxs)(w.Zb,{onClick:()=>handleCardSelection("Ads"),onKeyPress:e=>{("Enter"===e.key||" "===e.key)&&handleCardSelection("Ads")},tabIndex:0,className:"lg:h-full lg:p-3 p-1 lg:px-3 px-2 border-accent shadow-xl shadow-slate-950 flex flex-row items-center gap-2 lg:grow cursor-pointer transition-all ease-in duration-100 ".concat("Ads"===eP?"border-primary/20 bg-primary/10 backdrop-blur-md hover:none":"hover:bg-primary-foreground"),"data-sentry-element":"Card","data-sentry-source-file":"automatic-mode.jsx",children:[(0,s.jsx)("div",{className:"lg:w-[2rem] lg:h-[2rem] w-4 h-4 rounded-[.1rem]",children:Z&&_?(0,s.jsx)(P.Z,{className:"w-full h-full text-blue-500 scale-[95%]"}):(0,s.jsx)(C.Z,{className:"animate-spin w-full h-full text-primary"})}),(0,s.jsxs)("div",{className:"flex flex-col",children:[Z&&_?(0,s.jsx)("div",{className:"font-chakra-regular text-muted-foreground text-[.7rem] hidden lg:block",children:"Finished"}):(0,s.jsx)("div",{className:"font-chakra-regular text-muted-foreground text-[.7rem] hidden lg:block",children:"Loading..."}),(0,s.jsx)("div",{className:"font-chakra-bold text-[.8rem] lg:text-[.85rem]",children:"Ads"})]})]}),(0,s.jsxs)(w.Zb,{onClick:()=>handleCardSelection("Competitors"),onKeyPress:e=>{("Enter"===e.key||" "===e.key)&&handleCardSelection("Competitors")},tabIndex:0,className:"lg:h-full lg:p-3 p-1 lg:px-3 px-2 border-accent shadow-xl shadow-slate-950 flex flex-row items-center gap-2 lg:grow cursor-pointer transition-all ease-in duration-100 ".concat("Competitors"===eP?"border-primary/20 bg-primary/10 backdrop-blur-md hover:none":"hover:bg-primary-foreground"),"data-sentry-element":"Card","data-sentry-source-file":"automatic-mode.jsx",children:[(0,s.jsx)("div",{className:"lg:w-[2rem] lg:h-[2rem] w-4 h-4 rounded-[.1rem]",children:U?(0,s.jsx)(P.Z,{className:"w-full h-full text-blue-500 scale-[95%]"}):(0,s.jsx)(C.Z,{className:"animate-spin w-full h-full text-primary"})}),(0,s.jsxs)("div",{className:"flex flex-col",children:[U?(0,s.jsx)("div",{className:"font-chakra-regular text-muted-foreground text-[.7rem] hidden lg:block",children:"Finished"}):(0,s.jsx)("div",{className:"font-chakra-regular text-muted-foreground text-[.7rem] hidden lg:block",children:"Loading..."}),(0,s.jsx)("div",{className:"font-chakra-bold text-[.8rem] lg:text-[.85rem]",children:"Competitors"})]})]}),(0,s.jsxs)(w.Zb,{onClick:()=>handleCardSelection("Marketing Insights"),onKeyPress:e=>{("Enter"===e.key||" "===e.key)&&handleCardSelection("Marketing Insights")},tabIndex:0,className:"lg:h-full lg:p-3 p-1 lg:px-3 px-2 border-accent shadow-xl shadow-slate-950 flex flex-row items-center gap-2 lg:grow cursor-pointer transition-all ease-in duration-100 ".concat("Marketing Insights"===eP?"border-primary/20 bg-primary/10 backdrop-blur-md hover:none":"hover:bg-primary-foreground"),"data-sentry-element":"Card","data-sentry-source-file":"automatic-mode.jsx",children:[(0,s.jsx)("div",{className:"lg:w-[2rem] lg:h-[2rem] w-4 h-4 rounded-[.1rem]",children:F?(0,s.jsx)(P.Z,{className:"w-full h-full text-blue-500 scale-[95%]"}):(0,s.jsx)(C.Z,{className:"animate-spin w-full h-full text-primary"})}),(0,s.jsxs)("div",{className:"flex flex-col",children:[F?(0,s.jsx)("div",{className:"font-chakra-regular text-muted-foreground text-[.7rem] hidden lg:block",children:"Finished"}):(0,s.jsx)("div",{className:"font-chakra-regular text-muted-foreground text-[.7rem] hidden lg:block",children:"Loading..."}),(0,s.jsx)("div",{className:"font-chakra-bold text-[.8rem] lg:text-[.85rem]",children:"Marketing Insights"})]})]}),(0,s.jsxs)(w.Zb,{onClick:()=>handleCardSelection("Execution Plan"),onKeyPress:e=>{("Enter"===e.key||" "===e.key)&&handleCardSelection("Execution Plan")},tabIndex:0,className:"lg:h-full lg:p-3 lg:px-3 px-2 p-1 border-accent shadow-xl shadow-slate-950 flex flex-row items-center gap-2 lg:grow cursor-pointer transition-all ease-in duration-100  ".concat("Execution Plan"===eP?"border-primary/20 bg-primary/10 backdrop-blur-md hover:none":"hover:bg-primary-foreground"),"data-sentry-element":"Card","data-sentry-source-file":"automatic-mode.jsx",children:[(0,s.jsx)("div",{className:"lg:w-[2rem] lg:h-[2rem] w-4 h-4 rounded-[.1rem]",children:G?(0,s.jsx)(P.Z,{className:"w-full h-full text-blue-500 scale-[95%]"}):(0,s.jsx)(C.Z,{className:"animate-spin w-full h-full text-primary"})}),(0,s.jsxs)("div",{className:"flex flex-col",children:[G?(0,s.jsx)("div",{className:"font-chakra-regular text-muted-foreground text-[.7rem] hidden lg:block",children:"Finished"}):(0,s.jsx)("div",{className:"font-chakra-regular text-muted-foreground text-[.7rem] hidden lg:block",children:"Loading..."}),(0,s.jsx)("div",{className:"font-chakra-bold text-[.8rem] lg:text-[.85rem]",children:"Execution Plan"})]})]})]}),(0,s.jsx)(w.Zb,{className:"min-h-[40rem] max-h-[40rem] border-accent shadow-xl shadow-slate-950 ".concat(ef?"opacity-100 translate-y-0":"opacity-0 translate-y-[100px]"," transition-all duration-1000 "),"data-sentry-element":"Card","data-sentry-source-file":"automatic-mode.jsx",children:(0,s.jsxs)("div",{className:"flex flex-col h-full w-full",children:[(0,s.jsxs)("h1",{className:"font-chakra-bold text-2xl border-b border-accent p-5 flex flex-col lg:flex-row lg:gap-3 gap-2 lg:items-center lg:justify-between w-full",children:[eP,(0,s.jsx)("div",{className:"".concat(I&&"Store Builder"===eP?"":"overflow-hidden h-0 opacity-0 pointer-events-none hidden lg:block"),children:(0,s.jsx)(ImportToShopifyButton,{toast:e.toast,brandColor:eV,storeName:eI,viralProductName:eU,chosenTheme:eG,logos:eq,selectedLogo:eQ,selectedProduct:J,editBenefit1:eX,editBenefit2:e0,editBenefit3:tn,editBenefit4:to,editHeadline1:tc,editDescription1:tu,editHeadline2:th,editDescription2:tg,editHeadline3:tx,editDescription3:tw,editHeadline4:tv,editDescription4:tk,editHook:eJ,editCta:tA,"data-sentry-element":"ImportToShopifyButton","data-sentry-source-file":"automatic-mode.jsx"})})]}),(0,s.jsxs)("div",{className:"flex flex-col lg:max-h-auto max-h-[35.3rem] h-full overflow-auto ".concat("Store Builder"!==eP?"lg:px-8 px-5":""),children:["Store Builder"===eP&&(0,s.jsx)(s.Fragment,{children:I?(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row",children:[(0,s.jsxs)("div",{className:"sticky top-0 w-full lg:w-[22.5%] z-10 h-fit mr-4 p-5 flex lg:flex-col flex-row flex-wrap gap-5 lg:overflow-auto",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("div",{className:"text-muted-foreground text-[.8rem] font-chakra-regular",children:"Product Name"}),(0,s.jsx)("div",{className:"text-foreground font-chakra-bold",children:eU})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("div",{className:"text-muted-foreground text-[.8rem] font-chakra-regular",children:"Store Name"}),(0,s.jsx)("div",{className:"text-foreground font-chakra-bold",children:eI})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("div",{className:"text-muted-foreground text-[.8rem] font-chakra-regular",children:"Recommended Theme"}),(0,s.jsx)("div",{className:"text-foreground font-chakra-bold",children:eG&&eG.charAt(0).toUpperCase()+eG.slice(1)})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("div",{className:"text-muted-foreground text-[.8rem] font-chakra-regular",children:"Brand Color Palette"}),(0,s.jsx)("div",{className:"flex flex-row flex-wrap gap-3",children:eV.map((e,t)=>(0,s.jsx)(eB.pn,{delayDuration:10,children:(0,s.jsxs)(eB.u,{children:[(0,s.jsx)(eB.aJ,{asChild:!0,children:(0,s.jsx)("div",{className:"w-6 h-6 rounded-[.1rem] border border-accent cursor-pointer",style:{backgroundColor:e},onClick:()=>navigator.clipboard.writeText(e)},t)}),(0,s.jsx)(eB._v,{onClick:()=>navigator.clipboard.writeText(e),className:"bg-background text-foreground border border-accent cursor-pointer",children:(0,s.jsxs)("p",{className:"flex items-center gap-1",children:[" ",(0,s.jsx)(eM.Z,{className:"w-4 h-4 text-muted-foreground"}),e]})})]})}))})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-3",children:[(0,s.jsx)("div",{className:"text-muted-foreground text-[.8rem] font-chakra-regular",children:"Logo"}),(0,s.jsxs)("div",{className:"relative w-1/2 lg:w-[82%]",children:[(0,s.jsx)("img",{onClick:()=>eY(0),src:eq[0].startsWith("https://")?eq[0]:"data:image/png;base64,".concat(eq[0]),alt:"Generated Logo",className:"w-full saturate-[110%] border border-accent p-2 cursor-pointer rounded-[.1rem] ".concat(0===eQ?"border-primary bg-primary/10":"")}),(0,s.jsx)("button",{onClick:()=>{let e=document.createElement("a");e.href=eq[0].startsWith("https://")?eq[0]:"data:image/png;base64,".concat(eq[0]),e.download="logo1.png",e.click()},className:"absolute top-0 right-0 bg-primary text-white p-1 rounded-[.1rem]",children:(0,s.jsx)(f._8t,{className:"w-3.5 h-3.5"})})]}),(0,s.jsxs)("div",{className:"relative w-1/2 lg:w-[82%]",children:[(0,s.jsx)("img",{onClick:()=>eY(1),src:eq[1].startsWith("https://")?eq[1]:"data:image/png;base64,".concat(eq[1]),alt:"Generated Logo",className:"w-full saturate-[110%] border border-accent p-2 cursor-pointer rounded-[.1rem] ".concat(1===eQ?"border-primary bg-primary/10":"")}),(0,s.jsx)("button",{onClick:()=>{let e=document.createElement("a");e.href=eq[1].startsWith("https://")?eq[1]:"data:image/png;base64,".concat(eq[1]),e.download="logo2.png",e.click()},className:"absolute top-0 right-0 bg-primary text-white p-1 rounded-[.1rem]",children:(0,s.jsx)(f._8t,{className:"w-3.5 h-3.5"})})]}),(0,s.jsxs)("div",{className:"relative w-1/2 lg:w-[82%]",children:[(0,s.jsx)("img",{onClick:()=>eY(2),src:eq[2].startsWith("https://")?eq[2]:"data:image/png;base64,".concat(eq[2]),alt:"Generated Logo",className:"w-full saturate-[110%] border border-accent p-2 cursor-pointer rounded-[.1rem] ".concat(2===eQ?"border-primary bg-primary/10":"")}),(0,s.jsx)("button",{onClick:()=>{let e=document.createElement("a");e.href=eq[2].startsWith("https://")?eq[2]:"data:image/png;base64,".concat(eq[2]),e.download="logo3.png",e.click()},className:"absolute top-0 right-0 bg-primary text-white p-1 rounded-[.1rem]",children:(0,s.jsx)(f._8t,{className:"w-3.5 h-3.5"})})]})]})]}),(0,s.jsxs)("div",{className:"animated-element z-20  w-full lg:w-[77.5%]  lg:p-0 bg-white rounded-[.1rem] flex flex-col gap-3",children:[(0,s.jsx)("div",{style:{backgroundColor:eV[2]},className:"bg-primary-foreground p-3 text-foreground font-chakra-semibold text-center w-full tracking-wider text-[.85rem]",children:" Free Shipping + Money Back Guarantee "}),(0,s.jsxs)("div",{className:"bg-primary-foreground p-5 -translate-y-3 text-foreground font-chakra-semibold text-center w-full tracking-wider flex items-center justify-between",children:[(0,s.jsx)(f.RYk,{className:"w-6 h-6 text-foreground"}),(0,s.jsx)("img",{src:eq[eQ].startsWith("https://")?eq[eQ]:"data:image/png;base64,".concat(eq[eQ]),alt:"Generated Logo",className:"w-[150px] scale-[150%] saturate-[110%]"}),(0,s.jsx)(ex.Z,{className:"w-6 h-6 text-foreground"})]}),(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row w-full gap-5 lg:gap-8  mt-3 lg:mt-8 px-5",children:[(0,s.jsx)("div",{className:"lg:min-w-[23rem] lg:min-h-[23rem] lg:max-h-[23rem] bg-slate-800 rounded-[.1rem]",children:(0,s.jsx)("img",{src:J.images[0]||"",className:"rounded-[.1rem] h-full w-full object-cover brightness-[85%]"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 text-[.85rem]",children:[(0,s.jsxs)("div",{className:"flex flex-row gap-2 items-center",children:[(0,s.jsx)(eF.QJe,{style:{color:eV[2]}}),(0,s.jsx)(eF.QJe,{style:{color:eV[2]}}),(0,s.jsx)(eF.QJe,{style:{color:eV[2]}}),(0,s.jsx)(eF.QJe,{style:{color:eV[2]}}),(0,s.jsx)(eF.QJe,{style:{color:eV[2]}}),(0,s.jsx)("div",{className:"text-muted",children:"(583)"})]}),(0,s.jsx)("div",{className:"text-xl font-bold text-black outline-none",children:eU}),(0,s.jsx)("div",{className:"font-bold text-[.9rem] text-black outline-none",children:eJ}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 text-slate-400",children:[(0,s.jsx)("div",{className:"flex flex-row text-muted gap-2 outline-none",children:eX}),(0,s.jsx)("div",{className:"flex flex-row text-muted gap-2 outline-none",children:e0}),(0,s.jsx)("div",{className:"flex flex-row text-muted gap-2 outline-none",children:tn}),(0,s.jsx)("div",{className:"flex flex-row text-muted gap-2 outline-none",children:to})]}),(0,s.jsx)("button",{style:{backgroundColor:eV[2]},className:"p-3 rounded-[.1rem] text-white tracking-wide mt-3",children:"ADD TO CART"}),(0,s.jsxs)("div",{className:"flex items-center justify-between mt-3",children:[(0,s.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,s.jsx)(ey.Z,{className:"text-[1.1rem] text-black"}),(0,s.jsx)("div",{className:"text-[.6rem] lg:text-[.8rem] text-muted",children:"Free Shipping"})]}),(0,s.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,s.jsx)(ev.Z,{className:"text-[1.1rem] text-black"}),(0,s.jsx)("div",{className:"text-[.6rem] lg:text-[.8rem] text-muted",children:"30 Day Trial"})]}),(0,s.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,s.jsx)(h.Z,{className:"text-[1.1rem] text-black"}),(0,s.jsx)("div",{className:"text-[.6rem] lg:text-[.8rem] text-muted",children:"Free Returns"})]})]})]})]}),(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col w-full gap-5 lg:gap-8  mt-8 lg:mt-16 px-5",children:[(0,s.jsx)("div",{className:"max-h-[23rem] w-full bg-slate-800 lg:hidden ",children:(0,s.jsx)("img",{src:J.images[1]||"",className:"rounded-[.1rem] h-full w-full object-cover brightness-[85%]"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,s.jsx)("div",{className:"text-xl font-bold text-black outline-none ",children:tc}),(0,s.jsx)("div",{className:"text-[.9rem] lg:leading-8 text-muted outline-none ",children:tu}),(0,s.jsx)("button",{className:"p-3 text-[.9rem] rounded-[.1rem] text-white tracking-wide mt-2",style:{backgroundColor:eV[2]},children:"ADD TO CART"})]}),(0,s.jsx)("div",{className:"lg:h-[23rem] lg:min-w-[23rem] bg-slate-800 hidden lg:block rounded-[.1rem]",children:(0,s.jsx)("img",{src:J.images[1]||"",className:"rounded-[.1rem] h-full w-full object-cover brightness-[85%]"})})]}),(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col w-full gap-5 lg:gap-8  mt-8 lg:mt-16 px-5",children:[(0,s.jsx)("div",{className:"lg:h-[23rem] lg:max-h-[23rem] lg:min-w-[23rem] max-h-[23rem] w-full bg-slate-800 rounded-[.1rem]",children:(0,s.jsx)("img",{src:J.images[2]||"",className:"rounded-[.1rem] h-full w-full object-cover brightness-[85%]"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("div",{className:"text-xl font-bold text-black outline-none ",children:th}),(0,s.jsx)("div",{className:"text-[.9rem] lg:leading-8 text-muted outline-none ",children:tg}),(0,s.jsx)("button",{style:{backgroundColor:eV[2]},className:"p-3 text-[.9rem] rounded-[.1rem] text-white tracking-wide mt-2",children:"ADD TO CART"})]})]}),(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col w-full gap-5 lg:gap-8  mt-8 lg:mt-16 px-5",children:[(0,s.jsx)("div",{className:"lg:h-[27rem] lg:min-w-[27rem] max-h-[23rem] bg-slate-800 lg:hidden",children:(0,s.jsx)("img",{src:J.images[3]||"",className:"rounded-[.1rem] h-full w-full object-cover brightness-[85%]"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("div",{className:"text-xl font-bold text-black outline-none ",children:tx}),(0,s.jsx)("div",{className:"text-[.9rem] lg:leading-8 text-muted outline-none ",children:tw}),(0,s.jsx)("button",{style:{backgroundColor:eV[2]},className:"p-3 text-[.9rem] rounded-[.1rem] text-white tracking-wide mt-2",children:"ADD TO CART"})]}),(0,s.jsx)("div",{className:"lg:h-[23rem] lg:min-w-[23rem] bg-slate-800 hidden lg:block rounded-[.1rem]",children:(0,s.jsx)("img",{src:J.images[3]||"",className:"rounded-[.1rem] h-full w-full object-cover brightness-[85%]"})})]}),(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col w-full gap-5 lg:gap-8  mt-8 lg:mt-16 px-5",children:[(0,s.jsx)("div",{className:"lg:h-[23rem] lg:max-h-[23rem] lg:min-w-[23rem] max-h-[23rem] w-full bg-slate-800 rounded-[.1rem]",children:(0,s.jsx)("img",{src:J.images[4]||"",className:"rounded-[.1rem] h-full w-full object-cover brightness-[85%]"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("div",{className:"text-xl font-bold text-black outline-none ",children:tv}),(0,s.jsx)("div",{className:"text-[.9rem] lg:leading-8 text-muted outline-none ",children:tk}),(0,s.jsx)("button",{style:{backgroundColor:eV[2]},className:"p-3 text-[.9rem] rounded-[.1rem] text-white tracking-wide mt-2",children:"ADD TO CART"})]})]}),(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center w-full gap-5 lg:gap-8  mt-8 lg:mt-16 pb-5 px-5",children:[(0,s.jsxs)("div",{className:"text-center text-xl text-black font-bold outline-none ",children:["Try ",eU," for 30 days or get your money back guaranteed!"]}),(0,s.jsx)("div",{className:"text-center text-muted  text-[.85rem] lg:leading-8 outline-none ",children:tA}),(0,s.jsx)("button",{style:{backgroundColor:eV[2]},className:"lg:px-48 w-full lg:w-auto p-3 rounded-[.1rem] text-white tracking-wide text-[.9rem]",children:"ADD TO CART"})]})]})]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"flex flex-col gap-4 lg:gap-5 p-4 lg:p-5",children:["Creating Brand Kit","Finalizing Brand Kit","Generating Product Page","Styling Product Page","Formatting Product Page","Finalizing"].map((e,t)=>(0,s.jsxs)("div",{style:{fontFamily:"monospace"},className:"mt-2 text-white font-[500] text-[.9rem] flex flex-row items-center gap-1 transition-all duration-1000 ".concat(t<=t0?"opacity-100":"opacity-0"," overflow-hidden"),children:[(0,s.jsx)(f.QUb,{className:"w-[1.2rem] h-[1.2rem] ".concat(t<=t0?"text-primary":"text-muted-foreground")}),(0,s.jsx)("span",{className:t===t0?"animate-blink":"",children:e})]},t))})})}),"Ads"===eP&&(0,s.jsx)("div",{children:Z&&_?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex mb-5 mt-5 lg:mt-8 fade",children:(0,s.jsxs)("div",{className:"inline-flex rounded-[.1rem] overflow-hidden border border-accent",role:"group",children:[(0,s.jsxs)(x.z,{variant:"ghost",onClick:()=>tD("tiktok"),className:"px-4 py-2 text-sm font-medium rounded-r-[.1rem] ".concat("tiktok"===tP?"bg-accent":""),children:[(0,s.jsx)(c(),{src:tt,width:20,className:"mr-1"}),"TikToks"]}),(0,s.jsxs)(x.z,{variant:"ghost",onClick:()=>tD("meta"),className:"px-4 py-2 text-sm font-medium rounded-l-[.1rem] ".concat("meta"===tP?"bg-accent":""),children:[(0,s.jsx)(c(),{src:ta,width:20,className:"mr-2"}),"Meta Ad Creatives"]})]})}),"meta"===tP&&(0,s.jsxs)("div",{className:"fade flex lg:flex-row flex-col gap-4",children:[(0,s.jsxs)("div",{className:"w-full lg:w-1/2  bg-primary-foreground border border-accent rounded-[.1rem] relative overflow-hidden lg:mb-8 font-chakra-regular",children:[(0,s.jsxs)("div",{className:"flex flex-row gap-3 pt-3 lg:pt-5 px-3 lg:px-5",children:[(0,s.jsx)("div",{className:"h-10 w-10 bg-white rounded-full flex items-center justify-center ",children:(0,s.jsx)(c(),{src:eD.Z,alt:"ai meta ad creator",width:25,className:"-translate-y-[2px]"})}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("h1",{className:"font-bold text-white text-[.85rem]",children:eI}),(0,s.jsxs)("p",{className:"text-slate-400 text-[.8rem] flex items-center gap-1",children:["Sponsored ",(0,s.jsx)(f.n9J,{})]})]})]}),(0,s.jsx)("div",{className:"pb-6 pt-3",children:tz.map((e,t)=>(0,s.jsx)("div",{className:"text-slate-400 text-[.85rem] pt-1 font-normal px-3 lg:px-5 mt-1 outline-none",children:tz[t]}))}),(0,s.jsx)("div",{className:"w-full bg-slate-300 overflow-hidden max-h-[28.5rem]",children:(0,s.jsx)("img",{src:J.images[0]||"",className:"w-full object-cover"})}),(0,s.jsxs)("div",{className:"lg:min-h-[5rem]  w-full flex items-center justify-between px-3 lg:px-5 lg:py-0 py-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("div",{className:"text-[.7rem] text-slate-400 flex items-center gap-1",children:["store.com ",(0,s.jsx)(f.n9J,{})," "]}),(0,s.jsx)("div",{className:"text-[.85rem] text-white outline-none",children:tB})]}),(0,s.jsx)("div",{className:"text-[.7rem] lg:text-[.8rem] min-w-[6rem] text-center lg:min-w-[6.3rem] p-1 px-3 rounded-[.1rem] text-slate-400 border-accent bg-accent rounded-[.1rem] border-[2px] ml-1 lg:ml-3",children:"SHOP NOW"})]})]}),(0,s.jsxs)("div",{className:"w-full lg:w-1/2  bg-primary-foreground border border-accent rounded-[.1rem] relative overflow-hidden mb-8 font-chakra-regular",children:[(0,s.jsxs)("div",{className:"flex flex-row gap-3 pt-3 lg:pt-5 px-3 lg:px-5",children:[(0,s.jsx)("div",{className:"h-10 w-10 bg-white rounded-full flex items-center justify-center ",children:(0,s.jsx)(c(),{src:eD.Z,alt:"ai meta ad creator",width:25,className:"-translate-y-[2px]"})}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("h1",{className:"font-bold text-white text-[.85rem]",children:eI}),(0,s.jsxs)("p",{className:"text-slate-400 text-[.8rem] flex items-center gap-1",children:["Sponsored ",(0,s.jsx)(f.n9J,{})]})]})]}),(0,s.jsx)("div",{className:"pb-6 pt-3",children:tE.map((e,t)=>(0,s.jsx)("div",{className:"text-slate-400 text-[.85rem] pt-1 font-normal px-3 lg:px-5 mt-1 outline-none",children:tE[t]}))}),(0,s.jsx)("div",{className:"w-full bg-slate-300 overflow-hidden max-h-[28.5rem]",children:(0,s.jsx)("img",{src:"".concat(J.images[1])||"",className:"w-full object-cover "})}),(0,s.jsxs)("div",{className:"lg:min-h-[5rem]  w-full flex items-center justify-between px-3 lg:px-5 lg:py-0 py-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("div",{className:"text-[.7rem] text-slate-400 flex items-center gap-1",children:["store.com ",(0,s.jsx)(f.n9J,{})," "]}),(0,s.jsx)("div",{className:"text-[.85rem] text-white outline-none",children:tO})]}),(0,s.jsx)("div",{className:"text-[.7rem] lg:text-[.8rem] min-w-[6rem] text-center lg:min-w-[6.3rem] p-1 px-3 rounded-[.1rem] text-slate-400 border-accent bg-accent rounded-[.1rem] border-[2px] ml-1 lg:ml-3",children:"SHOP NOW"})]})]})]}),"tiktok"===tP&&(0,s.jsx)(s.Fragment,{children:0===tM.length?(0,s.jsxs)("div",{className:"mt-[14%]",children:[(0,s.jsx)(f.BHL,{className:"lg:w-24 lg:h-24 w-20 h-20 text-muted-foreground/30 mx-auto"}),(0,s.jsx)("h1",{className:"font-chakra-medium text-muted-foreground mt-3 text-center",children:"No TikTok videos found"}),(0,s.jsx)("div",{className:"text-muted-foreground/75 text-sm mt-1 text-center",children:"Couldn't find any TikTok videos for this product"})]}):(0,s.jsx)("div",{className:"fade tiktok-video-list overflow-x-hiddens",children:tM.map((e,t)=>(0,s.jsx)(w.Zb,{className:"mb-4 p-3 lg:p-4 bg-primary-foreground border-accent",children:(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row gap-4",children:[(0,s.jsxs)("div",{className:"lg:w-1/3 w-full relative group",children:[(0,s.jsxs)(x.z,{onClick:()=>window.open(e.href,"_blank"),variant:"ghost",className:"absolute bottom-3 w-[90%] lg:left-0 lg:translate-x-0 left-1/2 -translate-x-1/2 lg:bottom-0 lg:w-full bg-background lg:group-hover:h-full lg:group-hover:bg-background/90 transition-all duration-300 py-5 lg:border-none border border-accent",children:[(0,s.jsx)(c(),{src:tt,className:"w-4 h-4 mr-1"}),"  View TikTok",(0,s.jsx)(f.s7Z,{className:"w-4 h-4 absolute right-2 top-2 opacity-0 group-hover:opacity-100 transition-all duration-300 hidden lg:block"})]}),(0,s.jsx)("img",{src:e.thumbnailSrc,className:"rounded-[.1rem]"})]}),(0,s.jsxs)("div",{className:"lg:w-2/3 w-full flex flex-col gap-2",children:[(0,s.jsxs)("a",{href:"https://www.tiktok.com/@".concat(e.username),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 border-b border-accent pb-2 group relative w-full",children:[(0,s.jsx)("img",{src:e.userProfilePic,className:"w-8 h-8 rounded-full object-cover"}),(0,s.jsxs)("div",{className:"flex flex-col items-start justify-start",children:[(0,s.jsxs)("span",{className:"text-sm text-foreground font-chakra-regular",children:["@",e.username]}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground/75 font-chakra-regular underline group-hover:text-foreground transition-all duration-100 ease-in",children:"View Profile"})]})]}),e.caption&&(0,s.jsx)("h2",{className:"text-[.9rem] lg:text-[1rem] font-chakra-medium mb-1",children:e.caption.length>200?"".concat(e.caption.slice(0,200),"..."):e.caption}),(0,s.jsxs)("p",{className:"text-sm font-chakra-regular mb-1.5",children:[(0,s.jsx)("span",{className:"inline text-muted-foreground/75",children:"Uploaded - "}),new Date(e.uploadDate).toLocaleString()]}),(0,s.jsxs)("p",{className:"text-sm font-chakra-regular flex items-center gap-1",children:[(0,s.jsxs)("span",{className:" text-muted-foreground/75 flex items-center gap-1",children:[" ",(0,s.jsx)(e3.Z,{className:"w-3 h-3 inline text-primary"})," Views:  "]})," ",e.views?e.views:"-"]}),(0,s.jsxs)("p",{className:"text-sm font-chakra-regular flex items-center gap-1",children:[(0,s.jsxs)("span",{className:" text-muted-foreground/75 flex items-center gap-1",children:[" ",(0,s.jsx)(e8.Z,{className:"w-3 h-3 inline text-primary"})," Likes:  "]})," ",e.likes?e.likes:"-"]}),(0,s.jsxs)("p",{className:"text-sm font-chakra-regular flex items-center gap-1",children:[(0,s.jsxs)("span",{className:" text-muted-foreground/75 flex items-center gap-1",children:[" ",(0,s.jsx)(e6.Z,{className:"w-3 h-3 inline text-primary"})," Comments:  "]})," ",e.comments?e.comments:"-"]}),(0,s.jsxs)("p",{className:"text-sm font-chakra-regular flex items-center gap-1",children:[(0,s.jsxs)("span",{className:" text-muted-foreground/75 flex items-center gap-1",children:[" ",(0,s.jsx)(e7.Z,{className:"w-3 h-3 inline text-primary"})," Shares:  "]})," ",e.shares?e.shares:"-"]}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:e.hashtags.map((e,t)=>(0,s.jsx)("span",{className:"text-xs text-blue-500 font-chakra-regular",children:e},t))})]})]})},t))})})]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"flex flex-col gap-4 lg:gap-5 lg:pt-5 pt-4 -translate-x-1 lg:-translate-x-3",children:["Searching Tiktok","Extracting Relevant Tiktoks","Generating Meta Ad Creative","Merging Ads","Formatting Ads","Finalizing"].map((e,t)=>(0,s.jsxs)("div",{style:{fontFamily:"monospace"},className:"mt-2 text-white font-[500] text-[.9rem] flex flex-row items-center gap-1 transition-all duration-1000 ".concat(t<=t0?"opacity-100":"opacity-0"," overflow-hidden"),children:[(0,s.jsx)(f.QUb,{className:"w-[1.2rem] h-[1.2rem] ".concat(t<=t0?"text-primary":"text-muted-foreground")}),(0,s.jsx)("span",{className:t===t0?"animate-blink":"",children:e})]},t))})})}),"Competitors"===eP&&(0,s.jsx)("div",{children:U?(0,s.jsx)("div",{className:"flex flex-col  w-full mt-5 lg:mt-8 overflow-auto fade",children:0===tT.length?(0,s.jsxs)("div",{className:"mt-[14%]",children:[(0,s.jsx)(f.BHL,{className:"lg:w-24 lg:h-24 w-20 h-20 text-muted-foreground/30 mx-auto"}),(0,s.jsx)("h1",{className:"font-chakra-medium text-muted-foreground mt-3 text-center",children:"No competitors found"}),(0,s.jsx)("div",{className:"text-muted-foreground/75 text-sm mt-1 text-center",children:"Couldn't find any competitors for this product"})]}):(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)("div",{className:"flex flex-col gap-4 font-chakra-regular",children:tT.map((e,t)=>(0,s.jsxs)(w.Zb,{className:"lg:mb-4 p-3 lg:p-4 bg-primary-foreground border-accent",children:[(0,s.jsx)("div",{className:"flex items-center gap-4",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"lg:text-xl text-lg font-chakra-bold",children:e.storeName}),(0,s.jsx)("a",{href:e.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-muted-foreground font-chakra-regular mb-1 transition-colors ease-in duration-100 lg:hover:text-foreground",children:e.websiteUrl}),(0,s.jsxs)("p",{className:"text-sm text-primary font-chakra-regular",children:[" ",(0,s.jsx)("span",{className:"inline text-muted-foreground/75",children:"Theme: "}),e.theme||"N/A"]})]})}),(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsxs)("h3",{className:"lg:text-[1rem] text-[.8rem] font-chakra-semibold flex items-center gap-1 lg:gap-2",children:[" ",(0,s.jsx)(eu.Z,{className:"w-4 h-4 text-muted-foreground"})," Relevant products sold by this store"]}),(0,s.jsx)(eC.Z,{className:"my-2"}),e.products.map((t,a)=>(0,s.jsxs)("a",{href:"".concat(e.websiteUrl,"/products/").concat(t.handle),target:"_blank",rel:"noopener noreferrer",className:"flex gap-3 p-3 rounded-[.1rem] cursor-pointer transition-all ease-in duration-100 lg:hover:bg-accent",children:[(0,s.jsxs)("div",{className:"lg:min-h-[4rem] lg:min-w-[4rem] min-h-[3rem] min-w-[3rem] lg:max-h-[4rem] lg:max-w-[4rem] max-w-[3rem] max-h-[3rem] rounded-[.1rem] overflow-hidden",children:[!t.imageSrc&&(0,s.jsx)(ej.Z,{className:"w-full h-full text-muted-foreground/75 bg-slate-800 p-1 rounded-[.1rem]"}),t.imageSrc&&(0,s.jsx)("img",{src:t.imageSrc,className:"object-cover w-full",alt:t.name})]}),(0,s.jsxs)("div",{className:"flex flex-col w-full",children:[(0,s.jsxs)("h1",{className:"font-chakra-semibold text-lg text-blue-400 flex items-start justify-between w-full",children:["$",t.price,(0,s.jsx)(f._8t,{className:"text-slate-400 text-2xl"})]}),(0,s.jsx)("div",{className:"text-white font-chakra-medium text-[.85rem]",children:t.name}),(0,s.jsxs)("div",{className:"text-muted-foreground font-chakra-regular text-[.7rem] break-all",children:[e.websiteUrl,"/products/",t.handle]})]})]},a))]})]},t))})})}):(0,s.jsx)("div",{className:"flex flex-col gap-4 lg:gap-5 lg:pt-5 pt-4 -translate-x-1 lg:-translate-x-3",children:t$.map((e,t)=>(0,s.jsxs)("div",{style:{fontFamily:"monospace"},className:"mt-2 text-white font-[500] text-[.9rem] flex flex-row items-center gap-1 transition-all duration-1000 ".concat(t<=t0?"opacity-100":"opacity-0"," overflow-hidden"),children:[(0,s.jsx)(f.QUb,{className:"w-[1.2rem] h-[1.2rem] ".concat(t<=t0?"text-primary":"text-muted-foreground")}),(0,s.jsx)("span",{className:t===t0?"animate-blink":"",children:e})]},t))})}),"Marketing Insights"===eP&&(0,s.jsx)("div",{children:F?(0,s.jsxs)("div",{ref:tH,className:"fade flex flex-col gap-5 w-full mt-5 lg:mt-8 overflow-auto pb-8",children:[(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent rounded-[.1rem] w-full p-4",children:[(0,s.jsx)("div",{className:"w-full flex items-center justify-between",children:(0,s.jsxs)("h1",{className:"w-full flex items-center gap-2 text-white font-chakra-semibold text-[1rem] lg:text-xl",children:[" ",(0,s.jsx)(f.Tk0,{})," Who Would Buy This"]})}),(0,s.jsxs)("div",{className:"flex flex-col gap-4 mt-4 font-chakra-regular lg:translate-y-0 translate-y-1",children:[(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Age Range:"})," ",J&&J.report.demographics.age_range]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Gender:"})," ",J&&J.report.demographics.gender]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Income:"})," ",J&&J.report.demographics.income_level]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Lifestyle:"})," ",J&&J.report.demographics.lifestyle]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Location:"})," ",J&&J.report.demographics.location]})]})]}),(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent rounded-[.1rem] w-full p-4",children:[(0,s.jsx)("div",{className:"flex items-center justify-between gap-2",children:(0,s.jsxs)("h1",{className:"w-full flex items-center gap-2 text-white font-chakra-semibold text-[1rem] lg:text-xl",children:[" ",(0,s.jsx)(ex.Z,{className:"w-4 h-4"})," Buying Motivation"]})}),(0,s.jsxs)("div",{className:"flex flex-col gap-4 mt-4 font-chakra-regular lg:translate-y-0 translate-y-1",children:[(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Buying motivation 1:"})," ",J&&J.report.buyingMotivations.motivation1]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Buying motivation 2:"})," ",J&&J.report.buyingMotivations.motivation2]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Buying motivation 3:"})," ",J&&J.report.buyingMotivations.motivation3]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Buying motivation 4:"})," ",J&&J.report.buyingMotivations.motivation4]})]})]}),(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent rounded-[.1rem] w-full p-4",children:[(0,s.jsx)("div",{className:"flex items-center justify-between gap-2",children:(0,s.jsxs)("h1",{className:"flex items-center gap-2 text-white font-chakra-semibold text-[1rem] lg:text-xl",children:[" ",(0,s.jsx)(eb.Z,{className:"w-4 h-4"})," Customer Pain Points"]})}),(0,s.jsxs)("div",{className:"flex flex-col gap-4 mt-4 font-chakra-regular lg:translate-y-0 translate-y-1",children:[(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Pain point 1:"})," ",J&&J.report.painPoints.pain_point1]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Pain point 2:"})," ",J&&J.report.painPoints.pain_point2]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Pain point 3:"})," ",J&&J.report.painPoints.pain_point3]})]})]}),(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent rounded-[.1rem] w-full p-4",children:[(0,s.jsx)("div",{className:"flex items-center justify-between gap-2",children:(0,s.jsxs)("h1",{className:"flex items-center gap-2 text-white font-chakra-semibold text-[1rem] lg:text-xl",children:[" ",(0,s.jsx)(ew.Z,{className:"w-4 h-4"})," How To Advertise"]})}),(0,s.jsx)("div",{className:"flex flex-col gap-2 mt-3 text-muted-foreground font-chakra-regular mb-3",children:formatContent(J&&J.report.marketingAngles)})]}),(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent rounded-[.1rem] w-full p-4",children:[(0,s.jsx)("div",{className:"flex items-center justify-between gap-2",children:(0,s.jsxs)("h1",{className:"flex items-center gap-2 text-white font-chakra-semibold text-[1rem] lg:text-xl",children:[(0,s.jsx)(f.n9J,{className:"w-4 h-4"})," Countries To Target"]})}),(0,s.jsx)("div",{className:"flex flex-wrap gap-4 mt-4",children:["United States","United Kingdom","Canada","Australia","New Zealand"].map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("div",{className:"w-6 h-6 flex items-center justify-center",children:["United States"===e&&(0,s.jsx)("span",{className:"text-xl",children:"\uD83C\uDDFA\uD83C\uDDF8"}),"United Kingdom"===e&&(0,s.jsx)("span",{className:"text-xl",children:"\uD83C\uDDEC\uD83C\uDDE7"}),"Canada"===e&&(0,s.jsx)("span",{className:"text-xl",children:"\uD83C\uDDE8\uD83C\uDDE6"}),"Australia"===e&&(0,s.jsx)("span",{className:"text-xl",children:"\uD83C\uDDE6\uD83C\uDDFA"}),"New Zealand"===e&&(0,s.jsx)("span",{className:"text-xl",children:"\uD83C\uDDF3\uD83C\uDDFF"})]}),(0,s.jsx)("span",{className:"text-foreground font-chakra-medium",children:e})]},t))}),(0,s.jsxs)("div",{className:"mt-4 font-chakra-regular text-muted-foreground",children:[(0,s.jsx)(f.H4u,{className:"inline-block w-4 h-4 mr-2 text-primary -translate-y-[1.5px]"}),"It is recommended to advertise to the 5 countries listed here when starting out, as their citizens spend the most online."]})]}),(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent rounded-[.1rem] w-full p-4",children:[(0,s.jsx)("div",{className:"flex items-center justify-between gap-2",children:(0,s.jsxs)("h1",{className:"flex items-center gap-2 text-white font-chakra-semibold text-[1rem] lg:text-xl",children:[(0,s.jsx)(e9.Z,{className:"w-4 h-4"})," Recommended Ad Platform"]})}),(0,s.jsxs)("div",{className:"text-white rounded-[.1rem] flex items-center justify-between gap-2 font-bold mt-4",children:["f"===tR.trim().toLowerCase()&&(0,s.jsxs)("div",{className:"flex items-center gap-2 font-chakra-semibold",children:[" ",(0,s.jsx)(eF.Am9,{className:"text-blue-500 bg-foreground rounded-full text-xl p-[1px]"})," Facebook Ads"]}),"t"===tR.trim().toLowerCase()&&(0,s.jsxs)("div",{className:"flex items-center gap-2 font-chakra-semibold",children:[" ",(0,s.jsx)(eF.nTm,{className:"bg-black rounded-full text-xl p-[3px]"})," TikTok Ads"]})]}),(0,s.jsx)("div",{className:"text-muted-foreground font-chakra-regular mt-4 flex items-start gap-2.5",children:(0,s.jsx)("div",{children:formatContent(tL)})})]})]}):(0,s.jsx)("div",{className:"flex flex-col gap-4 lg:gap-5 lg:pt-5 pt-4 -translate-x-1 lg:-translate-x-3",children:["Identifying Audience","Generating Marketing Insights","Finding Ads Platform","Finalizing"].map((e,t)=>(0,s.jsxs)("div",{style:{fontFamily:"monospace"},className:"mt-2 text-white font-[500] text-[.9rem] flex flex-row items-center gap-1 transition-all duration-1000 ".concat(t<=t0?"opacity-100":"opacity-0"," overflow-hidden"),children:[(0,s.jsx)(f.QUb,{className:"w-[1.2rem] h-[1.2rem] ".concat(t<=t0?"text-primary":"text-muted-foreground")}),(0,s.jsx)("span",{className:t===t0?"animate-blink":"",children:e})]},t))})}),"Execution Plan"===eP&&(0,s.jsx)(s.Fragment,{children:G?(0,s.jsxs)("div",{className:"flex flex-row fade",children:[(0,s.jsx)("nav",{className:"w-1/5 pr-4 sticky top-0 h-screen overflow-auto border-r border-accent pt-5 lg:block hidden",children:(0,s.jsx)("ul",{className:"space-y-4 ",children:tr.phases.map(e=>(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"text-[.8rem] font-chakra-regular text-muted-foreground",children:["Phase ",e.phase_number]}),(0,s.jsx)("a",{href:"#phase-".concat(e.phase_number),className:"text-[.9rem] mt-1 hover:underline cursor-pointer font-chakra-medium transition-all ease-in duration-100 ".concat(tW===e.phase_number?"text-primary":"text-slate-200"),children:e.phase_title})]},e.phase_number))})}),(0,s.jsx)("div",{ref:tq,className:"w-full lg:w-4/5 execution-plan-container grid gap-6 lg:pl-5 pt-5",children:tr.phases.map(e=>(0,s.jsxs)(w.Zb,{className:"border-none shadow-xl shadow-slate-950",id:"phase-".concat(e.phase_number),children:[(0,s.jsxs)("span",{ref:t=>{if(t){let a=new IntersectionObserver(t=>{let[a]=t;a.isIntersecting&&(tQ(e.phase_number),console.log("xd"))},{root:null,rootMargin:"0px",threshold:.5});return a.observe(t),()=>a.disconnect()}},className:"font-chakra-regular text-primary text-sm mb-3",children:["PHASE ",e.phase_number]}),(0,s.jsx)("h2",{className:"font-chakra-bold text-xl lg:text-2xl mb-4",children:e.phase_title}),e.sections.map(e=>(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(w.Zb,{className:"border-accent shadow-xl shadow-slate-950",children:(0,s.jsxs)(w.Ol,{children:[(0,s.jsxs)(w.ll,{className:"text-lg lg:text-xl mb-1 font-chakra-semibold",children:["Step ",e.section_number,": ",e.section_title]}),(0,s.jsx)(w.SZ,{className:"text-[1rem] lg:text-lg",children:e.explanation})]})}),(0,s.jsx)("div",{children:(0,s.jsx)("ol",{className:"list-inside",children:e.steps.map((t,a)=>(0,s.jsxs)("li",{className:"border border-t-0 border-accent p-6 bg-primary-foreground/70 relative",children:[0===a&&(0,s.jsx)(f.v4q,{className:"w-5 h-5 -top-[11.2px] absolute left-6 bg-accent rounded-[.1rem] z-20 text-muted-foreground"}),a!==e.steps.length-1&&(0,s.jsx)(f.v4q,{className:"w-5 h-5 -bottom-[11.2px] absolute left-6 bg-accent rounded-[.1rem] z-20 text-muted-foreground"}),(0,s.jsx)("strong",{className:"font-chakra-semibold",children:t.step_title}),(0,s.jsx)("p",{className:"mt-1 text-muted-foreground font-chakra-regular",children:t.description}),t.substeps&&t.substeps.length>0&&(0,s.jsx)("ol",{className:"list-disc list-inside ml-5 mt-2 space-y-1",children:t.substeps.map((e,t)=>(0,s.jsxs)("li",{className:"font-chakra-regular text-muted-foreground",children:[(0,s.jsx)("span",{className:"font-chakra-semibold text-foreground",children:e.substep_title}),": ",e.description]},t))})]},a))})}),e.tips&&e.tips.length>0&&(0,s.jsxs)("div",{className:"mb-8 bg-primary/20 border border-t-0 border-accent p-6",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2 -translate-x-1 mb-3",children:[(0,s.jsx)(ek.Z,{className:"w-5 h-5 text-yellow-400"}),(0,s.jsx)("h4",{className:"font-chakra-bold text-lg",children:"Tips"})]}),(0,s.jsxs)("ul",{className:"list-disc list-inside space-y-1 font-chakra-regular text-muted-foreground",children:[e.tips.map((e,t)=>(0,s.jsx)("li",{children:e},t)),e.additional_tips&&e.additional_tips.length>0&&(0,s.jsx)(s.Fragment,{children:e.additional_tips.map((e,t)=>(0,s.jsx)("li",{children:e},t))})]})]})]},e.section_number)),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("h1",{className:"text-lg lg:text-xl font-chakra-semibold flex items-center gap-2",children:[" ",(0,s.jsx)(p.Z,{className:"w-6 h-6 text-blue-500"})," Recommended Course Content"]}),(0,s.jsxs)(w.Zb,{className:"border border-accent relative w-full lg:w-1/2",children:[(0,s.jsxs)(w.Ol,{children:[1===e.phase_number?(0,s.jsx)(ec.Z,{className:"w-16 h-16 text-primary/80 bg-primary/10 p-2 rounded-[.1rem] mb-2"}):2===e.phase_number?(0,s.jsx)("img",{src:"/thumbnails/image49.png",width:200,className:"rounded-[.1rem] mb-2"}):3===e.phase_number?(0,s.jsx)(e9.Z,{className:"w-16 h-16 text-primary/80 bg-primary/10 p-2 rounded-[.1rem] mb-2"}):4===e.phase_number?(0,s.jsx)(eF.nTm,{className:"w-16 h-16 text-primary/80 bg-primary/10 p-2 rounded-[.1rem] mb-2"}):5===e.phase_number?(0,s.jsx)(eF.nTm,{className:"w-16 h-16 text-primary/80 bg-primary/10 p-2 rounded-[.1rem] mb-2"}):6===e.phase_number?(0,s.jsx)(ts.pby,{className:"w-16 h-16 text-primary/80 bg-primary/10 p-2 rounded-[.1rem] mb-2"}):7===e.phase_number?(0,s.jsx)(ey.Z,{className:"w-16 h-16 text-primary/80 bg-primary/10 p-2 rounded-[.1rem] mb-2"}):8===e.phase_number?(0,s.jsx)("img",{src:"/thumbnails/image17.png",width:200,className:"rounded-[.1rem] mb-2"}):(0,s.jsx)(ec.Z,{className:"w-16 h-16 text-primary/80 bg-primary/10 p-2 rounded-[.1rem] mb-2"}),(0,s.jsx)(w.ll,{className:"flex flex-row items-center flex-wrap gap-2 text-lg",children:1===e.phase_number?(0,s.jsxs)(s.Fragment,{children:["Store Setup",(0,s.jsx)(ei.C,{className:"bg-accent text-foreground pointer-events-none",children:"Module 3"})]}):2===e.phase_number?(0,s.jsxs)(s.Fragment,{children:["Finding a Supplier",(0,s.jsx)(ei.C,{className:"bg-accent text-foreground pointer-events-none",children:"Module 4"}),(0,s.jsx)(ei.C,{className:"bg-primary/20 text-foreground pointer-events-none",children:"Lesson 3"})]}):3===e.phase_number?(0,s.jsxs)(s.Fragment,{children:["Ads Creation",(0,s.jsx)(ei.C,{className:"bg-accent text-foreground pointer-events-none",children:"Module 5"})]}):4===e.phase_number?(0,s.jsxs)(s.Fragment,{children:["TikTok Organic",(0,s.jsx)(ei.C,{className:"bg-accent text-foreground pointer-events-none",children:"Module 6"})]}):5===e.phase_number?(0,s.jsxs)(s.Fragment,{children:["Paid Ads (TikTok)",(0,s.jsx)(ei.C,{className:"bg-accent text-foreground pointer-events-none",children:"Module 7"})]}):6===e.phase_number?(0,s.jsxs)(s.Fragment,{children:["Paid Ads (Facebook)",(0,s.jsx)(ei.C,{className:"bg-accent text-foreground pointer-events-none",children:"Module 8"})]}):7===e.phase_number?(0,s.jsxs)(s.Fragment,{children:["Fulfillment",(0,s.jsx)(ei.C,{className:"bg-accent text-foreground pointer-events-none",children:"Module 4"})]}):8===e.phase_number?(0,s.jsxs)(s.Fragment,{children:["Funnel Troubleshooting",(0,s.jsx)(ei.C,{className:"bg-accent text-foreground pointer-events-none",children:"Module 3"}),(0,s.jsx)(ei.C,{className:"bg-primary/20 text-foreground pointer-events-none",children:"Lesson 16"})]}):null}),(0,s.jsx)(w.SZ,{className:"text-[1rem]",children:1===e.phase_number?"Set up a professional Shopify store.":2===e.phase_number?"Find reliable suppliers for quality products.":3===e.phase_number?"Create compelling ads to attract customers.":4===e.phase_number?"Use TikTok's organic reach for free promotion.":5===e.phase_number?"Run effective paid TikTok ad campaigns.":6===e.phase_number?"Create successful Facebook ad campaigns.":7===e.phase_number?"Streamline order fulfillment for customer satisfaction.":8===e.phase_number?"Optimize your sales funnel for better conversions.":"Master this e-commerce phase."})]}),(0,s.jsx)(w.eW,{children:(0,s.jsx)(x.z,{onClick:()=>{switch(e.phase_number){case 1:y.push("/dashboard?location=course&fromGlitchMode=true&module=3&lesson=1");break;case 2:y.push("/dashboard?location=course&fromGlitchMode=true&module=4&lesson=3");break;case 3:y.push("/dashboard?location=course&fromGlitchMode=true&module=5&lesson=1");break;case 4:y.push("/dashboard?location=course&fromGlitchMode=true&module=7&lesson=1");break;case 5:y.push("/dashboard?location=course&fromGlitchMode=true&module=6&lesson=1");break;case 6:y.push("/dashboard?location=course&fromGlitchMode=true&module=8&lesson=1");break;case 7:y.push("/dashboard?location=course&fromGlitchMode=true&module=4&lesson=1");break;case 8:y.push("/dashboard?location=course&fromGlitchMode=true&module=3&lesson=16");break;default:console.error("Unknown phase number")}},children:2===e.phase_number||8===e.phase_number?"Watch The Lesson \uD83C\uDFAC":"Learn How To Do It \uD83D\uDC49"})})]}),(0,s.jsx)("div",{})]})]},e.phase_number))})]}):(0,s.jsx)("div",{className:"flex flex-col gap-4 lg:gap-5 lg:pt-5 pt-4 -translate-x-1 lg:-translate-x-3",children:["Creating Execution Outline","Ordering Steps","Searching For Course Content","Formatting Plan","Finalizing"].map((e,t)=>(0,s.jsxs)("div",{style:{fontFamily:"monospace"},className:"mt-2 text-white font-[500] text-[.9rem] flex flex-row items-center gap-1 transition-all duration-1000 ".concat(t<=t0?"opacity-100":"opacity-0"," overflow-hidden"),children:[(0,s.jsx)(f.QUb,{className:"w-[1.2rem] h-[1.2rem] ".concat(t<=t0?"text-primary":"text-muted-foreground")}),(0,s.jsx)("span",{className:t===t0?"animate-blink":"",children:e})]},t))})})]})]})})]})]}):(0,s.jsxs)("div",{className:"dark animated-element w-full h-screen flex flex-col items-center gap-5 relative lg:p-12 p-5 lg:overflow-auto",children:[(0,s.jsx)(MatrixGrid,{}),(0,s.jsxs)(eA.Vq,{open:v,onOpenChange:()=>{ea&&setTimeout(()=>{er(!1)},200),eo&&setTimeout(()=>{el(!1)},200),k(!v)},children:[(0,s.jsx)(eA.hg,{asChild:!0,children:(0,s.jsx)(x.z,{onClick:e=>{if(tK){e.preventDefault();return}k(!0)},className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 lg:-translate-y-1/2 -translate-y-[7.5rem] font-chakra-bold text-4xl lg:text-6xl h-[6rem] lg:h-[8rem] px-10 lg:px-16 ".concat(!q&&y.query.id?"hidden":""),children:tK?(0,s.jsxs)(s.Fragment,{children:["Updating Data ",(0,s.jsx)(C.Z,{className:"w-12 h-12 animate-spin ml-3"})]}):"Start Glitching"})}),(0,s.jsxs)(eA.cZ,{className:"border-accent",children:[(0,s.jsx)(eA.fK,{children:(0,s.jsx)(eA.$N,{className:"text-2xl",children:ea?"Choose Product":eo?"Saved Glitches":"Choose Option"})}),ea||eo?ea&&!eo?(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"h-[26rem] w-full overflow-auto flex flex-col gap-3",children:[0===Q.length&&(0,s.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center gap-2",children:[(0,s.jsx)(f.BHL,{className:"w-24 h-24 text-muted-foreground"}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-medium text-lg",children:"No saved products found"}),(0,s.jsx)("p",{className:"text-muted-foreground/75 font-chakra-regular text-[1rem]",children:"Save a product you like and come back."}),(0,s.jsxs)(x.z,{size:"sm",variant:"outline",className:"mt-3",onClick:()=>{y.push("/dashboard?location=product-db")},children:[(0,s.jsx)(eh.Z,{className:"w-4 h-4 mr-1.5"})," AI Product Database"]})]}),Q.map((e,t)=>(0,s.jsxs)(x.z,{variant:"outline",className:"w-full min-h-16 lg:min-h-20 bg-slate-950 backdrop-brightness-[120%] border-accent flex flex-row items-center justify-start gap-2 overflow-hidden relative",onClick:async()=>{if(!e.report.demographics){let t=await updateMarketInsightsAndDescription(e);e=t}if(N.length>0){let t=N.find(t=>t.product.id===e.id);if(t){et(!0),loadSavedGlitch(t);return}}et(!0),K(e),ez("Store Builder"),await fetchAllData(e,{productName:e.productName,reviews:e.reviews,productDescription:e.productDescription,report:e.report})},children:[(0,s.jsx)(eg.Z,{className:"w-4 h-4 absolute right-2 top-2"}),(0,s.jsx)("img",{src:e.images?e.images[0]:"",className:"lg:w-10 lg:h-10 w-8 h-8 object-cover"}),(0,s.jsxs)("div",{className:"flex flex-col items-start justify-start lg:gap-1",children:[(0,s.jsxs)("p",{className:"text-md font-bold",children:[window.innerWidth>=1024?e.productName.slice(0,40):e.productName.slice(0,25),"..."]}),(0,s.jsx)("p",{className:"text-muted-foreground text-[.8rem]",children:"Click product to start glitch mode"})]})]},t))]})}):eo&&!ea?(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"h-[26rem] w-full overflow-auto flex flex-col gap-3",children:[0===N.length&&(0,s.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center gap-2",children:[(0,s.jsx)(f.BHL,{className:"w-24 h-24 text-muted-foreground"}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-medium text-lg",children:"No glitches found"}),(0,s.jsx)("p",{className:"text-muted-foreground/75 font-chakra-regular text-[1rem]",children:"Create one and come back"})]}),N.map((e,t)=>(0,s.jsxs)(x.z,{className:"w-full min-h-16 lg:min-h-20 border-accent flex flex-row items-center justify-start gap-2 overflow-hidden relative ".concat(tY===t?"border-destructive":""),onClick:()=>{et(!0),loadSavedGlitch(e)},variant:"outline",children:[(0,s.jsx)("img",{src:e.product.images?e.product.images[0]:"",className:"lg:w-10 lg:h-10 w-8 h-8 object-cover"}),(0,s.jsxs)("div",{className:"flex flex-col items-start justify-start lg:gap-1",children:[(0,s.jsxs)("p",{className:"text-md font-bold text-foreground",children:[window.innerWidth>=1024?e.product.productName.slice(0,40):e.product.productName.slice(0,20),"..."]}),(0,s.jsx)("p",{className:"text-muted-foreground text-[.8rem]",children:"Click to load this saved glitch"})]}),(0,s.jsx)(eg.Z,{className:"w-4 h-4 absolute right-2 top-2"}),(0,s.jsx)(ep.Z,{onClick:t=>{t.stopPropagation(),deleteGlitch(e.id)},onMouseEnter:()=>tJ(t),onMouseLeave:()=>tJ(!1),className:"w-4 h-4 absolute top-8 right-2 transition-transform ease-in duration-100 ".concat(tY===t?"rotate-[-5deg] text-destructive":"")})]},t))]})}):(0,s.jsx)(s.Fragment,{}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"w-full bg-primary-foreground lg:h-[8rem] border border-accent rounded-md p-4 hover:bg-primary/10 hover:border-primary/20 cursor-pointer transition-all duration-100 ease-in relative group",onClick:async()=>{if(!S)try{T(!0),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Finding your glitch mode product..."]}),description:"This can take up to 10 seconds."});let t=await b(),a=t.product,r=await saveProduct(a);a.id=r,K(a),et(!0),ez("Store Builder"),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Found your product!"]}),description:"Glitch mode will now begin."}),T(!1),await fetchAllData(a,{productName:a.productName,reviews:a.reviews,productDescription:a.productDescription,report:a.report});return}catch(e){T(!1);return}},children:[(0,s.jsx)(j.Z,{className:"w-5 h-5 text-muted-foreground absolute top-3 right-3 group-hover:translate-x-1 group-hover:text-foreground transition-all ease-in duration-100"}),(0,s.jsx)(e2.Z,{className:"w-9 h-9 text-primary"}),(0,s.jsx)("h1",{className:"font-chakra-semibold text-xl text-foreground mt-1",children:"Automatic"}),(0,s.jsx)("div",{className:"text-muted-foreground font-chakra-regular",children:"Glitch mode will automatically find your product."})]}),(0,s.jsxs)("div",{className:"w-full bg-primary-foreground lg:h-[8rem] border border-accent rounded-md p-4 hover:bg-primary/10 hover:border-primary/20 cursor-pointer transition-all duration-100 ease-in relative group",onClick:()=>{S||er(!0)},children:[(0,s.jsx)(j.Z,{className:"w-5 h-5 text-muted-foreground absolute top-3 right-3 group-hover:translate-x-1 group-hover:text-foreground transition-all ease-in duration-100"}),(0,s.jsx)(e5.Z,{className:"w-9 h-9 text-primary"}),(0,s.jsx)("h1",{className:"font-chakra-semibold text-xl text-foreground mt-1",children:"Manual"}),(0,s.jsx)("div",{className:"text-muted-foreground font-chakra-regular",children:"Insert a product of your choice into glitch mode."})]}),(0,s.jsxs)("div",{className:"w-full bg-primary-foreground lg:h-[8rem] border border-accent rounded-md p-4 hover:bg-primary/10 hover:border-primary/20 cursor-pointer transition-all duration-100 ease-in relative group",onClick:()=>{S||el(!0)},children:[(0,s.jsx)(j.Z,{className:"w-5 h-5 text-muted-foreground absolute top-3 right-3 group-hover:translate-x-1 group-hover:text-foreground transition-all ease-in duration-100"}),(0,s.jsx)(e4.Z,{className:"w-9 h-9 text-primary"}),(0,s.jsx)("h1",{className:"font-chakra-semibold text-xl text-foreground mt-1",children:"Saved Glitches"}),(0,s.jsx)("div",{className:"text-muted-foreground font-chakra-regular",children:"View your saved Glitches."})]})]})]})]})]})}let tr={phases:[{phase_number:1,phase_title:"Online Store Setup",sections:[{section_number:1,section_title:"Sign Up for Shopify",explanation:"Shopify is a leading e-commerce platform that allows you to create and manage your online store without needing extensive technical knowledge.",steps:[{step_title:"Get Shopify - $1 For A Month",description:"Go to http://shopify.pxf.io/PyNVMq to claim your discount and create your shopify store."},{step_title:"Start Free Trial",description:'Click on the "Start free trial" button and enter your email, password, and store name.'},{step_title:"Answer Setup Questions",description:"Shopify will ask a few questions about your business to tailor your experience."},{step_title:"Complete Account Setup",description:"Follow the prompts to set up your account details, including your business address and contact information."}],tips:["Choose a memorable and relevant store name that reflects your brand.","Utilize Shopify's 14-day free trial to explore features before committing."]},{section_number:2,section_title:"Import Your Product and Product Page",explanation:"Adding products to your store is essential. This includes importing product details, images, pricing, and descriptions.",steps:[{step_title:"Find a Product to Sell",description:"Use the product in Glitch mode, or find a product in Glitching's AI product database."},{step_title:"Import Your Product Page",description:"Import the product page generated by Glitch mode to your store, this will also import your product, your logo and your brand kit."}],tips:["Use SEO-friendly keywords in product titles and descriptions to improve search visibility.","Organize products into collections/categories for easier navigation."]},{section_number:3,section_title:"Enable Shopify Payments to Accept Customer Payments",explanation:"Setting up payment gateways allows you to accept payments from customers securely.",steps:[{step_title:"Access Payment Settings",description:'In your Shopify dashboard, go to "Settings" > "Payments."'},{step_title:"Choose Shopify Payments",description:"Select Shopify Payments as your primary payment processor."},{step_title:"Enter Business Details",description:"Provide necessary information, including your business type, bank account details, and tax information."},{step_title:"Configure Payment Methods",description:"Enable credit cards, Apple Pay, Google Pay, etc., based on your target audience preferences."},{step_title:"Set Up Payment Policies",description:"Define refund, shipping, and privacy policies to ensure transparency."}],tips:["Compare transaction fees of different payment gateways to choose the most cost-effective option.","Ensure compliance with local and international payment regulations."]}]},{phase_number:2,phase_title:"Find a Supplier",sections:[{section_number:1,section_title:"Find a Reliable Supplier on AliExpress",explanation:"Choosing the right supplier is crucial for product quality, shipping times, and overall customer satisfaction.",steps:[{step_title:"Research Products",description:"Identify the products you want to sell based on market demand and niche."},{step_title:"Search for Suppliers",description:"Use AliExpress's search bar to find suppliers offering your chosen products."},{step_title:"Evaluate Suppliers",substeps:[{substep_title:"Ratings and Reviews",description:"Look for suppliers with high ratings (4.8+ stars) and positive reviews."},{substep_title:"Order Volume",description:"Suppliers with a high number of orders are typically more reliable."},{substep_title:"Response Rate",description:"Ensure the supplier responds promptly to inquiries."}]},{step_title:"Check Product Quality",description:"Review product images, descriptions, and customer feedback for quality assurance."}],tips:["Communicate directly with potential suppliers to gauge responsiveness and willingness to cooperate.","Look for suppliers that offer ePacket shipping for faster delivery times."]},{section_number:2,section_title:"Order a Sample Product to Your Address to Check Quality and Create Your Ads",explanation:"Ordering samples allows you to verify product quality firsthand and develop authentic marketing content.",steps:[{step_title:"Select Products for Sampling",description:"Choose a few products to order as samples based on their potential popularity and quality."},{step_title:"Place Sample Orders",description:"Order the samples from your selected suppliers on AliExpress."},{step_title:"Evaluate the Samples",substeps:[{substep_title:"Quality Check",description:"Assess the material, functionality, and overall build quality."},{substep_title:"Packaging",description:"Ensure the packaging is presentable and professional."},{substep_title:"Shipping Time",description:"Note the delivery time to set accurate customer expectations."}]},{step_title:"Create Ads Using Samples",substeps:[{substep_title:"Photography",description:"Take high-quality photos of the products from various angles."},{substep_title:"Video Content",description:"Create short videos showcasing product features and usage."},{substep_title:"Reviews",description:"Use personal experiences and honest reviews in your marketing materials."}]}],tips:["Order samples well in advance to allow time for evaluation and content creation.","Provide feedback to suppliers for any improvements or issues encountered with the samples."]}]},{phase_number:3,phase_title:"Ads Creation",sections:[{section_number:1,section_title:"Research Your Target Market and Competitors",explanation:"Understanding your target audience and competitors helps you tailor your marketing strategies effectively.",steps:[{step_title:"Define Your Target Audience",substeps:[{substep_title:"Demographics",description:"Age, gender, location, income level."},{substep_title:"Psychographics",description:"Interests, behaviors, lifestyle, values."}]},{step_title:"Analyze Competitors",substeps:[{substep_title:"Identify Key Competitors",description:"Look for other stores selling similar products."},{substep_title:"Study Their Marketing Strategies",description:"Analyze their ads, social media presence, pricing, and customer engagement."},{substep_title:"Identify Gaps",description:"Find areas where you can differentiate your offerings or improve upon competitors’ strategies."}]}],tips:["Use tools like Google Analytics, Facebook Audience Insights, and SEMrush for in-depth market research.","Create buyer personas to visualize and understand your ideal customers better."]},{section_number:2,section_title:"Analyze Viral Posts for Insights",explanation:"Examining viral content provides valuable insights into what resonates with your audience and can inform your ad creation.",steps:[{step_title:"Identify Viral Content",description:"Look for posts related to your niche that have high engagement (likes, shares, comments)."},{step_title:"Analyze Elements",substeps:[{substep_title:"Content Type",description:"Videos, images, infographics, etc."},{substep_title:"Messaging",description:"Tone, language, value propositions."},{substep_title:"Visuals",description:"Colors, layouts, imagery used."},{substep_title:"Engagement Tactics",description:"Calls-to-action, contests, user-generated content."}]},{step_title:"Extract Key Insights",description:"Determine what aspects contributed to the content’s virality and consider how to incorporate similar elements into your ads."}],tips:["Follow industry influencers and popular pages within your niche to stay updated on trending content.","Use platforms like BuzzSumo to discover high-performing content in your category."]},{section_number:3,section_title:"Download the Ads in the ‘Ads & Creative’ Section",explanation:"Accessing pre-made ads and creative assets can expedite the ad creation process and provide inspiration.",steps:[{step_title:"Access Ad Libraries",description:"Utilize platforms like Facebook Ads Library or TikTok Ads Library to explore existing ads in your niche."},{step_title:"Download Ads",description:"Save ads that perform well and align with your brand for reference."},{step_title:"Organize Your Collection",description:"Categorize downloaded ads based on themes, styles, and performance metrics."}],tips:["Analyze why certain ads perform well and how you can adapt those strategies to your campaigns.","Stay compliant with copyright laws by using downloaded ads solely for inspiration, not direct copying."]},{section_number:4,section_title:"Create Your Own Ads Using Provided Templates",explanation:"Using templates can streamline the ad creation process while ensuring consistency and professionalism.",steps:[{step_title:"Choose an Ad Creation Tool",description:"Use platforms like Canva, Adobe Spark, or specialized ad creators like Bannersnack."},{step_title:"Select a Template",description:"Pick a template that matches your desired ad format (e.g., video, carousel, single image)."},{step_title:"Customize the Template",substeps:[{substep_title:"Images/Videos",description:"Insert your product images or videos."},{substep_title:"Text",description:"Add compelling headlines, descriptions, and calls-to-action."},{substep_title:"Branding",description:"Incorporate your logo, brand colors, and fonts."}]},{step_title:"Optimize for Platforms",description:"Adjust dimensions and formats based on the platform (Facebook, TikTok, Instagram, etc.)."},{step_title:"Preview and Test",description:"Ensure the ad looks good on all devices and make necessary adjustments."}],tips:["Keep your messaging clear and concise to capture attention quickly.","A/B test different ad variations to determine which performs best with your audience."]}]},{phase_number:4,phase_title:"TikTok Organic",sections:[{section_number:1,section_title:"Create a Free TikTok Account on Your Phone",explanation:"TikTok is a powerful platform for reaching a younger, highly engaged audience through organic content.",steps:[{step_title:"Download the App",description:"Install TikTok from the App Store (iOS) or Google Play Store (Android)."},{step_title:"Sign Up",description:"Use your email, phone number, or social media accounts to create an account."},{step_title:"Set Up Your Profile",substeps:[{substep_title:"Username",description:"Choose a name that reflects your brand."},{substep_title:"Profile Picture",description:"Use your logo or a recognizable brand image."},{substep_title:"Bio",description:"Write a concise and engaging bio that highlights your value proposition."}]},{step_title:"Switch to Pro Account (Optional)",description:"Gain access to analytics by switching to a TikTok Pro account in settings."}],tips:["Keep your username consistent across all social media platforms for brand recognition.","Use relevant keywords in your bio to improve discoverability."]},{section_number:2,section_title:"Learn the TikTok Algorithm and Policies",explanation:"Understanding how TikTok’s algorithm works and adhering to its policies ensures your content reaches the right audience without any compliance issues.",steps:[{step_title:"Algorithm Insights",substeps:[{substep_title:"For You Page (FYP)",description:"TikTok’s main feed where content is recommended based on user interactions."},{substep_title:"Engagement Factors",description:"Likes, comments, shares, watch time, and completion rates influence content visibility."},{substep_title:"Content Relevance",description:"TikTok analyzes video details (hashtags, captions, sounds) to match with user interests."}]},{step_title:"Study TikTok Policies",substeps:[{substep_title:"Community Guidelines",description:"Familiarize yourself with rules regarding prohibited content, copyright, and user interactions."},{substep_title:"Ad Policies",description:"If you plan to run ads, understand the requirements and restrictions."}]},{step_title:"Stay Updated",description:"Regularly check TikTok’s official resources for updates on algorithm changes and policy modifications."}],tips:["Engage with trending content and challenges to increase visibility.","Avoid violating guidelines to prevent content removal or account suspension."]},{section_number:3,section_title:"Post 1-3 Videos a Day",explanation:"Consistent posting increases your chances of being discovered and growing your follower base organically.",steps:[{step_title:"Plan Content Calendar",description:"Schedule your posts to maintain consistency and cover various content types."},{step_title:"Create Diverse Content",substeps:[{substep_title:"Product Demos",description:"Showcase how your products work."},{substep_title:"Behind-the-Scenes",description:"Share glimpses of your business operations."},{substep_title:"User-Generated Content",description:"Feature customer reviews and testimonials."},{substep_title:"Educational Content",description:"Provide tips and information related to your niche."}]},{step_title:"Optimize Posting Times",description:"Post when your target audience is most active, typically in the evenings and weekends."},{step_title:"Engage with Trends",description:"Participate in trending challenges, use popular sounds, and incorporate viral hashtags."}],tips:["Use TikTok’s scheduling feature or third-party tools like Later to plan and automate your posts.","Monitor performance analytics to identify the best times and types of content that resonate with your audience."]},{section_number:4,section_title:"TikTok Organic: AI for TikTok Content",explanation:"Utilizing AI tools can enhance your content creation process, making it more efficient and engaging.",steps:[{step_title:"Content Generation",substeps:[{substep_title:"Idea Generation",description:"Use AI tools like ChatGPT to brainstorm video ideas and scripts."},{substep_title:"Editing Assistance",description:"Employ AI-powered video editors like InVideo or Magisto for professional-looking videos."}]},{step_title:"Automated Posting",description:"Use scheduling tools integrated with AI to optimize posting times based on audience activity."},{step_title:"Analytics and Insights",description:"Leverage AI analytics tools to gain deeper insights into content performance and audience behavior."},{step_title:"Personalization",substeps:[{substep_title:"Dynamic Content",description:"Create personalized content recommendations based on user interactions."},{substep_title:"Chatbots",description:"Implement AI chatbots to engage with viewers and answer common questions in real-time."}]}],tips:["Experiment with different AI tools to find the ones that best fit your workflow and content style.","Use AI to analyze competitor content and identify successful strategies you can adapt."]}]},{phase_number:5,phase_title:"Paid Ads (TikTok)",sections:[{section_number:1,section_title:"Create a TikTok Business Account",explanation:"A TikTok Business account provides access to advanced features, analytics, and advertising tools tailored for businesses.",steps:[{step_title:"Convert to Business Account",substeps:[{substep_title:"Access Settings",description:"In the TikTok app, go to your profile and tap the three dots (⋯) to access settings."},{substep_title:"Manage Account",description:'Select "Manage Account" and then "Switch to Pro Account."'}]},{step_title:"Choose a Business Category",description:"Select the category that best describes your business to optimize ad targeting."},{step_title:"Complete Profile Setup",description:"Add relevant business information, including website URL and contact details."}],tips:["Ensure your business category accurately reflects your niche for better ad targeting.","Regularly update your profile with new information and content to keep it engaging."]},{section_number:2,section_title:"Add a Payment Method to the Account",explanation:"Adding a payment method is necessary to fund your advertising campaigns on TikTok.",steps:[{step_title:"Access Ads Manager",description:"Go to TikTok Ads Manager by visiting ads.tiktok.com and log in."},{step_title:"Navigate to Payment Settings",description:'In the Ads Manager dashboard, go to "Settings" > "Payment."'},{step_title:"Add Payment Method",description:"Choose your preferred payment method (credit/debit card, PayPal, etc.) and enter the required details."},{step_title:"Verify Payment Method",description:"Complete any necessary verification steps to activate your payment method."}],tips:["Use a separate business account for payments to keep personal and business finances distinct.","Monitor your payment methods regularly to ensure there are no issues with transactions."]},{section_number:3,section_title:"Create a Campaign at $20 a Day Using 3-5 Ads",explanation:"Launching a well-structured ad campaign with multiple creatives increases the likelihood of finding high-performing ads.",steps:[{step_title:"Access Campaigns",description:'In TikTok Ads Manager, click on "Campaign" and then "Create.".'},{step_title:"Set Campaign Objective",description:"Choose objectives like Traffic, Conversions, or App Install based on your goals."},{step_title:"Define Budget",description:"Set a daily budget of $20 for your campaign."},{step_title:"Create Ad Groups",substeps:[{substep_title:"Targeting",description:"Define your target audience based on demographics, interests, and behaviors."},{substep_title:"Placements",description:"Choose automatic placements or select specific placements where your ads will appear."},{substep_title:"Bidding Strategy",description:"Select a bidding strategy that aligns with your campaign goals (e.g., Lowest Cost, Bid Cap)."}]},{step_title:"Develop Ad Creatives",substeps:[{substep_title:"Create 3-5 Unique Ads",description:"Use different visuals, messages, and calls-to-action to diversify your ad creatives."},{substep_title:"Optimize for Performance",description:"Ensure each ad follows TikTok’s best practices for video length, format, and engagement."}]},{step_title:"Launch the Campaign",description:"Review all settings and launch your campaign."}],tips:["Start with a small budget to test different ad creatives and optimize based on performance.","Use eye-catching visuals and clear messaging to capture attention quickly."]},{section_number:4,section_title:"Let It Run for 3 Days and Optimize",explanation:"Allowing your campaign to run for a few days provides sufficient data to analyze performance and make informed optimizations.",steps:[{step_title:"Monitor Performance Metrics",substeps:[{substep_title:"Impressions",description:"Number of times your ads are shown."},{substep_title:"Clicks",description:"Number of clicks your ads receive."},{substep_title:"CTR (Click-Through Rate)",description:"Percentage of impressions that result in clicks."},{substep_title:"CPC (Cost Per Click)",description:"Average cost for each click."},{substep_title:"Conversions",description:"Number of desired actions (e.g., purchases) resulting from the ads."}]},{step_title:"Analyze Ad Performance",substeps:[{substep_title:"Identify Top Performers",description:"Determine which ads are generating the best results."},{substep_title:"Assess Underperformers",description:"Identify ads that are not meeting expectations."}]},{step_title:"Make Data-Driven Optimizations",substeps:[{substep_title:"Adjust Targeting",description:"Refine your audience based on the performance data."},{substep_title:"Modify Ad Creatives",description:"Enhance visuals, tweak messaging, or test different calls-to-action."},{substep_title:"Reallocate Budget",description:"Shift more budget towards high-performing ads and reduce spend on underperformers."}]},{step_title:"Test New Variations",description:"Continuously experiment with new ad creatives and strategies to improve results."}],tips:["Use TikTok’s built-in analytics tools for real-time performance tracking.","Document your optimizations to understand what strategies work best over time."],additional_tips:["Leverage Influencers: Collaborate with TikTok influencers to amplify your reach.","Utilize Hashtags: Incorporate trending and relevant hashtags to increase discoverability.","Engage with Comments: Respond to comments on your ads to foster community and trust."]}]},{phase_number:6,phase_title:"Paid Ads (Facebook)",sections:[{section_number:1,section_title:"Create a Facebook Business Account",explanation:"A Facebook Business account allows you to manage your Facebook Pages, ad accounts, and assets efficiently.",steps:[{step_title:"Visit Facebook Business Manager",description:"Go to business.facebook.com."},{step_title:"Create Account",description:'Click "Create New Account" and enter your business name, your name, and your business email address.'},{step_title:"Set Up Business Details",description:"Add your business address, phone number, and other relevant information."},{step_title:"Add Facebook Pages",description:"Link your existing Facebook Pages or create new ones for your business."},{step_title:"Assign Roles",description:"Grant access to team members or partners with appropriate permissions."}],tips:["Use a professional email address associated with your business for account creation.","Regularly update your business information to keep it current and accurate."]},{section_number:2,section_title:"Add a Payment Method to the Account",explanation:"Adding a payment method enables you to fund your Facebook advertising campaigns.",steps:[{step_title:"Access Payment Settings",description:'In Ads manager, navigate to "Business Tools" > "Billing" > "Payment Settings".'},{step_title:"Add Payment Method",description:'Click "Add Payment Method" and choose from options like credit/debit cards, PayPal, or direct bank transfers.'},{step_title:"Enter Payment Details",description:"Provide the necessary payment information and save it securely."},{step_title:"Set Primary Payment Method",description:"Designate a primary payment method for your ad campaigns."}],tips:["Use a dedicated business credit card to manage ad expenses separately from personal finances.","Monitor your payment methods regularly to prevent unauthorized transactions."]},{section_number:3,section_title:"Create a Campaign at $20 a Day Using 3-5 Ads",explanation:"Launching a structured Facebook ad campaign with multiple creatives helps identify high-performing ads and optimize your strategy.",steps:[{step_title:"Access Ads Manager",description:"Go to Facebook Ads Manager via Business Manager."},{step_title:"Create a New Campaign",description:'Click on "Create" to start a new campaign.'},{step_title:"Set Campaign Objective",description:"Choose objectives such as Traffic, Conversions, or Brand Awareness based on your goals."},{step_title:"Define Campaign Budget",description:"Set a daily budget of $20 for your campaign."},{step_title:"Create Ad Sets",substeps:[{substep_title:"Audience Targeting",description:"Define your target audience using demographics, interests, behaviors, and custom audiences."},{substep_title:"Placements",description:"Choose automatic placements or manually select where your ads will appear."},{substep_title:"Budget Allocation",description:"Distribute your budget evenly across ad sets or allocate based on initial performance."}]},{step_title:"Develop Ad Creatives",substeps:[{substep_title:"Create 3-5 Unique Ads",description:"Design different ad creatives with varying images/videos, headlines, and calls-to-action."},{substep_title:"Use Carousel or Video Formats",description:"Experiment with different ad formats to see what resonates best with your audience."}]},{step_title:"Launch the Campaign",description:"Review all settings and launch your campaign."}],tips:["Utilize Facebook’s Audience Insights tool to better understand and target your ideal customers.","Ensure your ad creatives are visually appealing and align with your brand’s messaging."]},{section_number:4,section_title:"Let It Run for 3 Days and Optimize",explanation:"Allowing your Facebook ad campaign to run for a few days provides enough data to evaluate performance and make necessary adjustments.",steps:[{step_title:"Monitor Key Metrics",substeps:[{substep_title:"Impressions",description:"Number of times your ads are displayed."},{substep_title:"Clicks",description:"Number of clicks your ads receive."},{substep_title:"CTR (Click-Through Rate)",description:"Percentage of impressions that result in clicks."},{substep_title:"CPC (Cost Per Click)",description:"Average cost for each click."},{substep_title:"Conversions",description:"Number of desired actions (e.g., purchases) resulting from the ads."}]},{step_title:"Analyze Ad Performance",substeps:[{substep_title:"Identify High Performers",description:"Determine which ads are generating the best results."},{substep_title:"Assess Low Performers",description:"Identify ads that are underperforming."}]},{step_title:"Optimize Based on Data",substeps:[{substep_title:"Refine Targeting",description:"Adjust your audience parameters to better align with high-performing segments."},{substep_title:"Enhance Ad Creatives",description:"Improve visuals, tweak messaging, or test different calls-to-action."},{substep_title:"Reallocate Budget",description:"Increase budget allocation to successful ads and decrease spending on underperforming ones."}]},{step_title:"Test New Variations",description:"Continuously experiment with new ad creatives and strategies to enhance performance."}],tips:["Utilize Facebook’s automated rules to manage your budget and bids based on performance criteria.","Keep detailed records of your optimizations to understand what strategies yield the best results over time."],additional_tips:["Use Lookalike Audiences: Expand your reach by targeting audiences similar to your existing customers.","Implement Retargeting: Re-engage users who have interacted with your website or ads but haven’t converted.","Leverage Dynamic Ads: Automatically show relevant products to users based on their interactions with your website or app."]}]},{phase_number:7,phase_title:"Fulfillment",sections:[{section_number:1,section_title:"When Orders Start Coming In, Fulfill Them in 24 Hours",explanation:"Timely order fulfillment ensures customer satisfaction and reduces the risk of order cancellations or negative reviews.",steps:[{step_title:"Receive Order Notifications",description:"Set up notifications in Shopify to alert you of new orders."},{step_title:"Process Orders Promptly",substeps:[{substep_title:"Verify Payment",description:"Ensure the payment has been successfully processed."},{substep_title:"Place Order with Supplier",description:"Use the supplier’s AliExpress link or integrate with apps like Oberlo or DSers for automatic order placement."},{substep_title:"Enter Shipping Details",description:"Provide the customer’s shipping address and choose the appropriate shipping method."}]},{step_title:"Confirm Order Placement",description:"Ensure the supplier has received and confirmed the order."},{step_title:"Update Order Status",description:"Mark the order as fulfilled in Shopify and notify the customer."}],tips:["Use automation tools like Shopify Flow to streamline order processing.","Maintain clear communication with your supplier to handle orders efficiently."]},{section_number:2,section_title:"Make Sure Every Customer Receives a Tracking Number",explanation:"Providing tracking information enhances transparency, allows customers to monitor their orders, and reduces inquiries about order status.",steps:[{step_title:"Obtain Tracking Information",description:"After placing the order with your supplier, get the tracking number from AliExpress or your dropshipping app."},{step_title:"Update Shopify Order",substeps:[{substep_title:"Add Tracking Number",description:"Enter the tracking number in the order details within Shopify."},{substep_title:"Select Shipping Carrier",description:"Specify the shipping carrier associated with the tracking number."}]},{step_title:"Notify the Customer",substeps:[{substep_title:"Automated Emails",description:"Set up automated email notifications to send tracking information to customers once the order is fulfilled."},{substep_title:"Manual Communication",description:"If necessary, manually send tracking details to customers via email or messaging apps."}]}],tips:["Use Shopify apps like AfterShip or Trackify to automate tracking updates and notifications.","Provide estimated delivery dates based on the shipping method and supplier’s processing time."]},{section_number:3,section_title:"Answer Customer Emails in Under 24 Hours",explanation:"Prompt customer support fosters trust, enhances the customer experience, and can lead to repeat business.",steps:[{step_title:"Set Up Support Channels",description:"Use email (e.g., support@yourstore.com), live chat, and social media channels for customer inquiries."},{step_title:"Implement Support Tools",description:"Utilize helpdesk software like Zendesk, Freshdesk, or Shopify’s built-in customer support tools."},{step_title:"Create a Response Plan",substeps:[{substep_title:"Prioritize Inquiries",description:"Address urgent issues (e.g., order problems) first."},{substep_title:"Provide Clear Responses",description:"Answer questions clearly and concisely, addressing all customer concerns."},{substep_title:"Offer Solutions",description:"Resolve issues by providing refunds, replacements, or other appropriate solutions."}]},{step_title:"Monitor Support Channels",description:"Regularly check and respond to messages across all support platforms."}],tips:["Create a comprehensive FAQ section on your website to address common questions and reduce the volume of inquiries.","Use canned responses for frequently asked questions to save time while maintaining personalization."],additional_tips:["Use Reliable Shipping Methods: Choose shipping options that offer tracking and reasonable delivery times to ensure customer satisfaction.","Monitor Inventory Levels: Keep track of supplier inventory to prevent selling out-of-stock products.","Handle Returns Efficiently: Establish a clear return policy and process to manage returns smoothly and maintain customer trust."]}]},{phase_number:8,phase_title:"Funnel Troubleshooting",sections:[{section_number:1,section_title:"Look at Your Ads and Website to See What Needs Improvements",explanation:"Regularly evaluating your marketing funnel helps identify and address issues that may hinder conversions.",steps:[{step_title:"Audit Your Ads",substeps:[{substep_title:"Performance Metrics",description:"Review key metrics like CTR, CPC, CPM, and conversion rates."},{substep_title:"Ad Creatives",description:"Assess the effectiveness of your visuals, messaging, and calls-to-action."},{substep_title:"Targeting",description:"Evaluate whether your ads are reaching the intended audience."}]},{step_title:"Evaluate Your Website",substeps:[{substep_title:"User Experience (UX)",description:"Ensure your website is easy to navigate, mobile-friendly, and visually appealing."},{substep_title:"Load Speed",description:"Use tools like Google PageSpeed Insights to check and improve your website’s loading time."},{substep_title:"Checkout Process",description:"Simplify the checkout process to reduce cart abandonment rates."},{substep_title:"Content Quality",description:"Ensure product descriptions, images, and videos are high quality and persuasive."}]},{step_title:"Analyze Customer Feedback",description:"Gather and review feedback from customers to identify pain points and areas for improvement."}],tips:["Use heatmaps and session recordings (e.g., Hotjar, Crazy Egg) to understand user behavior on your website.","Regularly update and optimize your website based on analytics and feedback."]},{section_number:2,section_title:"If Your Metrics Are Bad (CPC, CPM, CTR), Test New Ads and Hooks",explanation:"Poor ad performance metrics indicate that your ads may not be effectively engaging your target audience, necessitating changes in strategy.",steps:[{step_title:"Identify Underperforming Ads",description:"Pinpoint which ads have low CTR, high CPC, or high CPM."},{step_title:"Test New Ad Creatives",substeps:[{substep_title:"Visuals",description:"Experiment with different images, videos, colors, and layouts."},{substep_title:"Messaging",description:"Try different headlines, descriptions, and value propositions."},{substep_title:"Calls-to-Action",description:"Test various CTAs to see which ones drive more engagement."}]},{step_title:"Experiment with New Hooks",substeps:[{substep_title:"Emotional Appeals",description:"Use storytelling or evoke emotions like happiness, surprise, or urgency."},{substep_title:"Unique Selling Propositions (USPs)",description:"Highlight what makes your product stand out."},{substep_title:"Problem-Solution",description:"Address a common problem and present your product as the solution."}]},{step_title:"A/B Testing",description:"Run A/B tests to compare different versions of ads and determine which performs better."},{step_title:"Optimize Ad Placement",description:"Experiment with different ad placements to see where your ads perform best."}],tips:["Keep testing multiple variables simultaneously to identify which changes have the most significant impact.","Monitor test results closely and implement the best-performing elements into your main campaigns."]},{section_number:3,section_title:"If You're Getting Traffic but No Conversions, Fix Your Landing Page",explanation:"High traffic with low conversions suggests issues with your website’s ability to persuade visitors to take action.",steps:[{step_title:"Assess Landing Page Design",substeps:[{substep_title:"Visual Appeal",description:"Ensure the design is clean, professional, and aligned with your brand."},{substep_title:"Mobile Optimization",description:"Confirm that your landing page is fully functional and visually appealing on mobile devices."}]},{step_title:"Improve User Experience (UX)",substeps:[{substep_title:"Navigation",description:"Simplify navigation to help users find information quickly."},{substep_title:"Load Speed",description:"Optimize images and scripts to reduce page load times."}]},{step_title:"Enhance Content",substeps:[{substep_title:"Headlines",description:"Use clear and compelling headlines that grab attention."},{substep_title:"Product Descriptions",description:"Provide detailed, benefits-focused descriptions that address customer needs."},{substep_title:"Visuals",description:"Use high-quality images and videos to showcase your products effectively."}]},{step_title:"Optimize Call-to-Action (CTA)",substeps:[{substep_title:"Placement",description:"Position CTAs prominently and make them easily accessible."},{substep_title:"Clarity",description:"Use action-oriented language that clearly states what the user should do next."},{substep_title:"Contrast",description:"Ensure CTAs stand out visually from the rest of the page."}]},{step_title:"Build Trust",substeps:[{substep_title:"Social Proof",description:"Include customer reviews, testimonials, and ratings."},{substep_title:"Trust Badges",description:"Display security seals, money-back guarantees, and other trust indicators."},{substep_title:"Transparent Policies",description:"Clearly outline your shipping, return, and privacy policies."}]},{step_title:"Simplify Checkout Process",substeps:[{substep_title:"Reduce Steps",description:"Minimize the number of steps required to complete a purchase."},{substep_title:"Guest Checkout",description:"Offer a guest checkout option to streamline the process."},{substep_title:"Form Optimization",description:"Use auto-fill and clear labels to make form completion easier."}]}],tips:["Use analytics tools like Google Analytics and Shopify’s built-in analytics to identify where users drop off in the funnel.","Implement heatmaps and session recordings to visualize user interactions and identify usability issues."],additional_tips:["Retargeting Campaigns: Use retargeting ads to re-engage visitors who didn’t convert on their first visit.","Email Marketing: Implement email follow-ups for cart abandoners and nurture leads towards conversion.","Continuous Improvement: Regularly review and optimize each stage of your funnel to enhance overall performance."]}]}]};a(90109);var tn=a(91580);function DiscordPopup(e){let[t,a]=(0,i.useState)(!0);return((0,i.useEffect)(()=>{e.discordUserName&&a(!1)},[e.discordUserName]),t&&e.discordPopup)?(0,s.jsx)("div",{className:"fixed inset-0 flex justify-center items-center",children:(0,s.jsx)("div",{className:"text-white",children:(0,s.jsx)(tn.Z,{})})}):(0,s.jsx)(eA.Vq,{open:e.discordPopup,onOpenChange:e.setDiscordPopup,children:(0,s.jsx)(eA.cZ,{className:"outline-none border-accent",children:(0,s.jsxs)("div",{className:"flex flex-col lg:w-full w-full items-center justify-center gap-3 rounded-[.4rem] z-20",children:[(0,s.jsx)(c(),{src:u.Z,className:"lg:w-[250px] w-[200px]"}),(0,s.jsxs)("h1",{className:"text-xl font-bold text-white flex flex-col items-center gap-3 mt-2 text-center font-chakra-semibold",children:[(0,s.jsx)("span",{className:"flex flex-row gap-1",children:(0,s.jsxs)("div",{children:[" Discord ",(0,s.jsx)("span",{className:"text-blue-500",children:e.discordUserName})," Successfully Linked "]})}),(0,s.jsx)(P.Z,{className:"text-green-500 w-32 h-32 my-5"})]}),(0,s.jsxs)(x.z,{size:"xl",className:"w-full text-[1rem]",onClick:()=>{window.open("https://discord.com/channels/1118318515460522005","_blank"),e.setDiscordPopup(!1)},children:["Go to Discord Channel ",(0,s.jsx)(f.dsO,{className:"ml-1.5 text-2xl text-white"})]})]})})})}var ti=a(60554),to=a(9008),tl=a.n(to),tc=a(71646),td=a(87764),tu=a(67587);function NewDashboard(e){let{currentUser:t,getLessonsCompleted:a,getSubscription:r,getChargeDeclined:n,getDiscordInfo:l,getShopifyInfo:u}=(0,d.a)(),[m,h]=(0,i.useState)(!1),[g,b]=(0,i.useState)([]),[y,v]=(0,i.useState)(!1),[j,k]=(0,i.useState)(!1),[N,A]=(0,i.useState)(!1),[S,T]=(0,i.useState)(!1),[C,P]=(0,i.useState)(0),[D,z]=(0,i.useState)(null),I=(0,o.useRouter)();(0,i.useEffect)(()=>{setTimeout(()=>{h(!0)},10)},[]),(0,i.useEffect)(()=>{null!==t&&Promise.all([a(t).then(e=>{e&&b(e)}),l(t).then(e=>{if(null===e.userName||null===e.id||void 0===e.userName||void 0===e.id){A(!1);return}A(!0)}).catch(e=>{console.error("Failed to fetch or decrypt Discord information:",e)}),r(t).then(e=>{v(e)}),n(t).then(e=>{k(e)}),u(t).then(e=>{z(e)})]).then(()=>{T(!0)})},[t]),(0,i.useEffect)(()=>{if(!S)return;let a=new URLSearchParams(window.location.search),s=a.get("code");if(!s)return;let r=new URL(window.location.href);r.searchParams.delete("code");let n=r.toString(),i=j||"no"===y?"Inactive":"yes"===y?"Active":"Inactive",o=setTimeout(()=>{fetch("/api/discord/discord-oauth?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t.accessToken)},body:JSON.stringify({code:s,role:i,url:n})}).then(e=>e.json()).then(t=>{console.log("Response:",t),t.username&&e.setDiscordUserName(t.username)}).catch(e=>{console.error("Error:",e)}),e.setDiscordPopup(!0)},500);return()=>{clearTimeout(o),A(!0)}},[location.search,S]);let calculateTimeLeft=()=>{let e=new Date,t=new Date(e);t.setDate(e.getDate()+(7-e.getDay())%7),t.setHours(19,0,0,0),0===e.getDay()&&e.getHours()>=19&&t.setDate(e.getDate()+7);let a=t-e,s={};return a>0&&(s={days:Math.floor(a/864e5),hours:Math.floor(a/36e5%24),minutes:Math.floor(a/6e4%60),seconds:Math.floor(a/1e3%60)}),s},[E,F]=(0,i.useState)(calculateTimeLeft());async function trackEvent(e,t){await fetch("/api/anytrack?event=".concat(e,"&id=").concat(t))}(0,i.useEffect)(()=>{let e=setTimeout(()=>{F(calculateTimeLeft())},1e3);return()=>clearTimeout(e)});let B=[{content:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(w.Ol,{children:[(0,s.jsx)(w.ll,{children:(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-foreground w-[65rem] flex flex-row gap-1 items-center",children:"AutoDS"})}),(0,s.jsx)(w.SZ,{className:"text-[1rem]",children:"30 Days Free - Fulfill Your Orders"})]}),(0,s.jsx)(w.aY,{children:(0,s.jsx)(c(),{src:W.Z,alt:"Glitching x AutoDs",className:"w-[60%]"})}),(0,s.jsx)(w.eW,{children:(0,s.jsxs)(x.z,{onClick:async()=>{window.open("https://platform.autods.com/register?ref=MTEwNDk4OQ==","_blank"),trackEvent("dashboard_autoDs",AnyTrack("atclid"))},className:"w-full text-md",size:"xl",children:[(0,s.jsx)(tc.Z,{className:"w-5 h-5 mr-2"})," Claim Offer"]})})]})},{content:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(w.Ol,{children:[(0,s.jsx)(w.ll,{children:(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-foreground w-[65rem] flex flex-row gap-1 items-center",children:" Shopify Theme"})}),(0,s.jsx)(w.SZ,{className:"text-[1rem]",children:"25% off Shrine Theme"})]}),(0,s.jsx)(w.aY,{children:(0,s.jsx)(c(),{src:Y,alt:"Shrine shopify theme affiliate promo",className:"w-[4rem] scale-[150%] translate-x-3"})}),(0,s.jsx)(w.eW,{children:(0,s.jsxs)(x.z,{onClick:async()=>{window.open("https://shrinetheme.com/discount/GLITCH?ref=glitching","_blank"),trackEvent("dashboard_shrine",AnyTrack("atclid"))},className:"w-full text-md",size:"xl",children:[(0,s.jsx)(tc.Z,{className:"w-5 h-5 mr-2"}),"Claim Offer"]})})]})},{content:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(w.Ol,{children:[(0,s.jsx)(w.ll,{children:(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-foreground w-[65rem] flex flex-row gap-1 items-center",children:"TikTok Ads"})}),(0,s.jsx)(w.SZ,{className:"text-[1rem]",children:"35% Cashback - Exclusive Glitching Offer"})]}),(0,s.jsx)(w.aY,{children:(0,s.jsx)(c(),{src:et,alt:"Tiktok Ads affiliate promo",className:"w-[60%]"})}),(0,s.jsx)(w.eW,{children:(0,s.jsxs)(x.z,{onClick:async()=>{window.open("https://getstartedtiktok.pxf.io/c/5175916/2108631/16372","_blank"),trackEvent("dashboard_tiktok",AnyTrack("atclid"))},className:"w-full text-md",size:"xl",children:[(0,s.jsx)(tc.Z,{className:"w-5 h-5 mr-2"}),"Claim Offer"]})})]})}];return(0,i.useEffect)(()=>{let e=setInterval(()=>{P(e=>(e+1)%B.length)},8e3);return()=>clearInterval(e)},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(tl(),{"data-sentry-element":"Head","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsx)("script",{async:!0,src:"https://fast.wistia.com/embed/medias/gemt563rb8.jsonp"}),(0,s.jsx)("script",{async:!0,src:"https://fast.wistia.com/assets/external/E-v1.js"})]}),(0,s.jsxs)("div",{id:"scrollableDiv",className:" animated-element w-full  flex flex-col justify-start items-center gap-7 p-5 lg:p-8 pt-6 lg:pt-12 overflow-auto overflow-x-hidden relative",children:[(0,s.jsx)(MatrixGrid,{"data-sentry-element":"MatrixGrid","data-sentry-source-file":"dashboard.jsx"}),(0,s.jsxs)("div",{className:"lg:w-[65rem] lg:max-w-[65rem] w-full max-w-full flex flex-col lg:flex-row lg:min-h-[30rem] gap-5",children:[(0,s.jsxs)(w.Zb,{className:"lg:w-3/5 lg:max-w-3/5 w-full max-w-full border-accent shadow-xl shadow-slate-950 transition-all duration-1000 ".concat(m?"opacity-100 translate-x-0":"opacity-0 -translate-x-40"),"data-sentry-element":"Card","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.Ol,{"data-sentry-element":"CardHeader","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsx)(w.ll,{"data-sentry-element":"CardTitle","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-foreground w-[65rem]",children:"Dropshipping Course"})}),(0,s.jsx)(w.SZ,{className:"text-[1rem]","data-sentry-element":"CardDescription","data-sentry-source-file":"dashboard.jsx",children:"Learn EXACTLY how we scaled a product to $1000 a day in sales."})]}),(0,s.jsx)(w.aY,{className:"saturate-[150%] brightness-[110%]","data-sentry-element":"CardContent","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsx)("div",{className:"wistia_responsive_padding",style:{padding:"56.25% 0 0 0",position:"relative"},children:(0,s.jsx)("div",{className:"wistia_responsive_wrapper",style:{height:"100%",left:"0",position:"absolute",top:"0",width:"100%"},children:(0,s.jsx)("div",{className:"wistia_embed wistia_async_gemt563rb8 seo=true videoFoam=true",style:{height:"100%",position:"relative",width:"100%"},children:(0,s.jsx)("div",{className:"wistia_swatch",style:{height:"100%",left:"0",opacity:"0",overflow:"hidden",position:"absolute",top:"0",transition:"opacity 200ms",width:"100%"},children:(0,s.jsx)("img",{src:"https://fast.wistia.com/embed/medias/gemt563rb8/swatch",style:{filter:"blur(5px)",height:"100%",objectFit:"contain",width:"100%"},alt:"how to start a dropshipping business","aria-hidden":"true",onLoad:e=>e.target.parentNode.style.opacity=1})})})})})}),(0,s.jsx)(w.eW,{"data-sentry-element":"CardFooter","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsxs)(x.z,{onClick:()=>{trackEvent("dashboard_course",AnyTrack("atclid")),I.push("/dashboard?location=course")},size:"xl",className:"w-full text-md","data-sentry-element":"Button","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsx)(p.Z,{className:"min-w-5 w-5 h-5 mr-2","data-sentry-element":"GraduationCap","data-sentry-source-file":"dashboard.jsx"}),0===g.length?"Go to Dropshipping Course":"Continue Watching Course"]})})]}),(0,s.jsxs)("div",{className:"lg:w-2/5 lg:max-w-2/5 w-full max-w-full h-full flex flex-col gap-5 transition-all duration-1000 ".concat(m?"opacity-100 translate-x-0":"opacity-0 translate-x-40"),children:[(0,s.jsxs)(w.Zb,{className:"w-full lg:h-1/2 border-accent shadow-xl shadow-slate-950","data-sentry-element":"Card","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.Ol,{"data-sentry-element":"CardHeader","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsx)(w.ll,{"data-sentry-element":"CardTitle","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-foreground w-[65rem] flex flex-row gap-1 items-center",children:" Private Discord"})}),(0,s.jsx)(w.SZ,{className:"text-[1rem]","data-sentry-element":"CardDescription","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsxs)("div",{className:"flex flex-row gap-1 items-center ",children:[E.days>0?(0,s.jsxs)("span",{className:"rounded-[.1rem]",children:[E.days," ",1===E.days?"Day":"Days"]}):E.hours>0?(0,s.jsxs)("span",{className:"rounded-[.1rem]",children:[E.hours," ",1===E.hours?"Hour":"Hours"]}):E.minutes>0?(0,s.jsxs)("span",{className:"rounded-[.1rem]",children:[E.minutes," ",1===E.minutes?"Minute":"Minutes"]}):(0,s.jsxs)("span",{className:"rounded-[.1rem]",children:[E.seconds," ",1===E.seconds?"Second":"Seconds"]}),(0,s.jsx)("span",{className:"font-bold",children:"Until Weekly Call"})]})})]}),(0,s.jsx)(w.aY,{"data-sentry-element":"CardContent","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsxs)("div",{class:"flex items-center space-x-2",children:[(0,s.jsxs)("div",{class:"flex -space-x-5",children:[(0,s.jsx)("div",{class:"w-10 h-10 rounded-full border-[2px] lg:border-[3px] border-blue-950",children:(0,s.jsx)("img",{src:"/dino-b.png",alt:"dropshipping ai",class:"object-cover rounded-full h-full w-full"})}),(0,s.jsx)("div",{class:"w-10 h-10 rounded-full border-[2px] lg:border-[3px] border-blue-950",children:(0,s.jsx)("img",{src:"/robertl.jpeg",alt:"dropshipping product finder",class:"object-cover rounded-full h-full w-full"})}),(0,s.jsx)("div",{class:"w-10 h-10 rounded-full border-[2px] lg:border-[3px] border-blue-950",children:(0,s.jsx)("img",{src:"/thomast.jpeg",alt:"dropshipping winning products finder",class:"object-cover rounded-full h-full w-full"})}),(0,s.jsx)("div",{class:"w-10 h-10 rounded-full bg-slate-200 text-slate-600 flex justify-center items-center  text-[.8rem] font-semibold border-[3px] border-blue-950",children:"+100"})]}),(0,s.jsx)("div",{class:"text-sm font-chakra-medium text-muted-foreground",children:"Join 8,000+ dropshippers"})]})}),(0,s.jsx)(w.eW,{"data-sentry-element":"CardFooter","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsxs)(x.z,{onClick:async()=>{if("no"===e.subscribed){e.setTrialPopup(!0);return}N?window.open("https://discord.com/channels/1118318515460522005","_blank"):(window.location.href="https://discord.com/oauth2/authorize?client_id=1223067356192964628&response_type=code&redirect_uri=https%3A%2F%2Fwww.glitching.ai%2Fdashboard%3Flocation%3Ddashboard&scope=identify+guilds.join+guilds.members.read",trackEvent("dashboard_discordconnect",AnyTrack("atclid")))},className:"w-full text-md",size:"xl","data-sentry-element":"Button","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsx)(f.dsO,{className:"w-5 h-5 mr-2","data-sentry-element":"DiscordLogoIcon","data-sentry-source-file":"dashboard.jsx"}),N?"Go to Channel":"Join The Discord"]})})]}),(0,s.jsxs)(w.Zb,{className:"w-full lg:h-1/2 border-accent shadow-xl shadow-slate-950 relative","data-sentry-element":"Card","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsx)(ei.C,{className:"absolute top-4 right-4 text-blue-300 bg-blue-900 pointer-events-none","data-sentry-element":"Badge","data-sentry-source-file":"dashboard.jsx",children:"Special Offer"}),D?(0,s.jsx)(s.Fragment,{children:B[C].content}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(w.Ol,{children:[(0,s.jsx)(w.ll,{children:(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-foreground w-[65rem] flex flex-row gap-1 items-center",children:"Shopify For $1"})}),(0,s.jsx)(w.SZ,{className:"text-[1rem]",children:"Exclusive Glitching Offer"})]}),(0,s.jsx)(w.aY,{children:(0,s.jsx)("div",{className:"text-sm font-[500] text-slate-300 flex flex-row gap-2 items-center justify-center",children:(0,s.jsx)(c(),{src:ti.Z,alt:"Glitching x Shopify",className:"w-[70%] mr-auto"})})}),(0,s.jsx)(w.eW,{children:(0,s.jsxs)(x.z,{onClick:async()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank"),trackEvent("dashboard_shopify",AnyTrack("atclid"))},size:"xl",className:"w-full text-[1rem]",children:[(0,s.jsx)(tc.Z,{className:"w-5 h-5 mr-2"})," Claim Offer"]})})]})]})]})]}),(0,s.jsx)("h1",{className:"lg:text-3xl text-2xl font-chakra-bold text-foreground w-full lg:w-[65rem] mt-5 transition-all duration-1000 ".concat(m?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),children:"Glitching Tools"}),(0,s.jsxs)("div",{className:"lg:w-[65rem] w-full flex lg:flex-row flex-col gap-5",children:[(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/2 border-accent shadow-xl shadow-slate-950 transition-all duration-1000 ".concat(m?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),"data-sentry-element":"Card","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.Ol,{"data-sentry-element":"CardHeader","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.ll,{"data-sentry-element":"CardTitle","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsx)(eh.Z,{className:"w-12 h-12 mr-2 text-primary mb-3","data-sentry-element":"PackageSearch","data-sentry-source-file":"dashboard.jsx"}),(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-foreground w-[65rem] flex flex-row gap-1 items-center",children:"AI Product Database"})]}),(0,s.jsx)(w.SZ,{className:"text-[1rem]","data-sentry-element":"CardDescription","data-sentry-source-file":"dashboard.jsx",children:"Find thousands of winning products with our exclusive AI database."})]}),(0,s.jsx)(w.eW,{"data-sentry-element":"CardFooter","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsx)(x.z,{onClick:()=>{trackEvent("dashboard_productdb",AnyTrack("atclid")),I.push("/dashboard?location=product-db")},size:"xl",className:"w-full text-md","data-sentry-element":"Button","data-sentry-source-file":"dashboard.jsx",children:"Go to AI Product Database"})})]}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/2 border-accent shadow-xl shadow-slate-950 transition-all duration-1000 ".concat(m?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),"data-sentry-element":"Card","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.Ol,{"data-sentry-element":"CardHeader","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.ll,{"data-sentry-element":"CardTitle","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsx)(ed.Z,{className:"w-12 h-12 mr-2 text-primary mb-3","data-sentry-element":"SquareTerminal","data-sentry-source-file":"dashboard.jsx"}),(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-foreground w-[65rem] flex flex-row gap-1 items-center",children:"Glitch Mode"})]}),(0,s.jsx)(w.SZ,{className:"text-[1rem]","data-sentry-element":"CardDescription","data-sentry-source-file":"dashboard.jsx",children:"Find a product, create your store, create your ads, and learn dropshipping in one click."})]}),(0,s.jsx)(w.eW,{"data-sentry-element":"CardFooter","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsx)(x.z,{onClick:()=>{trackEvent("dashboard_glitchMode",AnyTrack("atclid")),I.push("/dashboard?location=automatic-mode")},size:"xl",className:"w-full text-md","data-sentry-element":"Button","data-sentry-source-file":"dashboard.jsx",children:"Go to Glitch Mode"})})]})]}),(0,s.jsxs)("div",{className:"lg:w-[65rem] w-full flex lg:flex-row flex-col gap-5",children:[(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/2 border-accent shadow-xl shadow-slate-950 transition-all duration-1000 ".concat(m?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),"data-sentry-element":"Card","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.Ol,{"data-sentry-element":"CardHeader","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.ll,{"data-sentry-element":"CardTitle","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsx)(ec.Z,{className:"w-12 h-12 mr-2 text-primary mb-3","data-sentry-element":"StoreIcon","data-sentry-source-file":"dashboard.jsx"}),(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-foreground w-[65rem] flex flex-row gap-1 items-center",children:"Store Builder"})]}),(0,s.jsx)(w.SZ,{className:"text-[1rem]","data-sentry-element":"CardDescription","data-sentry-source-file":"dashboard.jsx",children:"Generate a Shopify store with AI."})]}),(0,s.jsx)(w.eW,{"data-sentry-element":"CardFooter","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsx)(x.z,{onClick:()=>{trackEvent("dashboard_storeBuilder",AnyTrack("atclid")),I.push("/dashboard?location=store-builder")},size:"xl",className:"w-full text-md","data-sentry-element":"Button","data-sentry-source-file":"dashboard.jsx",children:"Go to Store Builder"})})]}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/2 border-accent shadow-xl shadow-slate-950 transition-all duration-1000 ".concat(m?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),"data-sentry-element":"Card","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.Ol,{"data-sentry-element":"CardHeader","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.ll,{"data-sentry-element":"CardTitle","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsx)(f.xmR,{className:"w-12 h-12 mr-2 text-primary mb-3","data-sentry-element":"CameraIcon","data-sentry-source-file":"dashboard.jsx"}),(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-foreground w-[65rem] flex flex-row gap-1 items-center",children:"AI Product Image Editor"})]}),(0,s.jsx)(w.SZ,{className:"text-[1rem]","data-sentry-element":"CardDescription","data-sentry-source-file":"dashboard.jsx",children:"Edit your product images with AI."})]}),(0,s.jsx)(w.eW,{"data-sentry-element":"CardFooter","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsx)(x.z,{onClick:()=>{trackEvent("dashboard_aiImageEditor",AnyTrack("atclid")),I.push("/dashboard?location=ai-image-editor")},size:"xl",className:"w-full text-md","data-sentry-element":"Button","data-sentry-source-file":"dashboard.jsx",children:"Go to AI Product Image Editor"})})]})]}),(0,s.jsxs)("div",{className:"lg:w-[65rem] w-full flex lg:flex-row flex-col gap-5",children:[(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/2 border-accent shadow-xl shadow-slate-950 transition-all duration-1000 ".concat(m?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),"data-sentry-element":"Card","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.Ol,{"data-sentry-element":"CardHeader","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.ll,{"data-sentry-element":"CardTitle","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsx)(td.Z,{className:"w-12 h-12 mr-2 text-primary mb-3","data-sentry-element":"Search","data-sentry-source-file":"dashboard.jsx"}),(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-foreground w-[65rem] flex flex-row gap-1 items-center",children:"Find Competitors"})]}),(0,s.jsx)(w.SZ,{className:"text-[1rem]","data-sentry-element":"CardDescription","data-sentry-source-file":"dashboard.jsx",children:"Find competitors and analyze their products."})]}),(0,s.jsx)(w.eW,{"data-sentry-element":"CardFooter","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsx)(x.z,{onClick:()=>{trackEvent("dashboard_findCompetitors",AnyTrack("atclid")),I.push("/dashboard?location=find-competitors")},size:"xl",className:"w-full text-md","data-sentry-element":"Button","data-sentry-source-file":"dashboard.jsx",children:"Go to Find Competitors"})})]}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/2 border-accent shadow-xl shadow-slate-950 transition-all duration-1000 ".concat(m?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),"data-sentry-element":"Card","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.Ol,{"data-sentry-element":"CardHeader","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.ll,{"data-sentry-element":"CardTitle","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsx)(f.ZDN,{className:"w-12 h-12 mr-2 text-primary mb-3","data-sentry-element":"ResumeIcon","data-sentry-source-file":"dashboard.jsx"}),(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-foreground w-[65rem] flex flex-row gap-1 items-center",children:"Find TikToks"})]}),(0,s.jsx)(w.SZ,{className:"text-[1rem]","data-sentry-element":"CardDescription","data-sentry-source-file":"dashboard.jsx",children:"Find TikTok videos relevant to your product."})]}),(0,s.jsx)(w.eW,{"data-sentry-element":"CardFooter","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsx)(x.z,{onClick:()=>{trackEvent("dashboard_findTiktoks",AnyTrack("atclid")),I.push("/dashboard?location=find-tiktoks")},size:"xl",className:"w-full text-md","data-sentry-element":"Button","data-sentry-source-file":"dashboard.jsx",children:"Go to Find TikToks"})})]})]}),(0,s.jsx)("div",{className:"lg:w-[65rem] w-full flex lg:flex-row flex-col gap-5",children:(0,s.jsxs)(w.Zb,{className:"w-full lg:w-1/2 border-accent shadow-xl shadow-slate-950 transition-all duration-1000 ".concat(m?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),"data-sentry-element":"Card","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.Ol,{"data-sentry-element":"CardHeader","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsxs)(w.ll,{"data-sentry-element":"CardTitle","data-sentry-source-file":"dashboard.jsx",children:[(0,s.jsx)(tu.Z,{className:"w-12 h-12 mr-2 text-primary mb-3","data-sentry-element":"Paintbrush","data-sentry-source-file":"dashboard.jsx"}),(0,s.jsx)("h1",{className:"text-2xl font-chakra-bold text-foreground w-[65rem] flex flex-row gap-1 items-center",children:"Logo Maker"})]}),(0,s.jsx)(w.SZ,{className:"text-[1rem]","data-sentry-element":"CardDescription","data-sentry-source-file":"dashboard.jsx",children:"Generate professional logos with AI."})]}),(0,s.jsx)(w.eW,{"data-sentry-element":"CardFooter","data-sentry-source-file":"dashboard.jsx",children:(0,s.jsx)(x.z,{onClick:()=>{trackEvent("dashboard_logoMaker",AnyTrack("atclid")),I.push("/dashboard?location=logo-maker")},size:"xl",className:"w-full text-md","data-sentry-element":"Button","data-sentry-source-file":"dashboard.jsx",children:"Go to Logo Maker"})})]})})]})]})}var tm={src:"/_next/static/media/auto-ds.07ca70d4.jpeg",height:400,width:400,blurDataURL:"data:image/jpeg;base64,/9j/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCAAIAAgDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAeEAABBAEFAAAAAAAAAAAAAAAAAQMREjECBRNCcv/EABUBAQEAAAAAAAAAAAAAAAAAAAMF/8QAFREBAQAAAAAAAAAAAAAAAAAAABH/2gAMAwEAAhEDEQA/AJkurbaQjT9q55O0ecSAChBv/9k=",blurWidth:8,blurHeight:8},th=a(85106),tp=a(49457),tg=a(27270),tf=a(6775);function Integrations(e){let t=(0,I.ac)({query:"(max-width: 768px)"}),{currentUser:a,getShopifyInfo:r,getAutoDsInfo:n}=(0,d.a)(),l=(0,o.useRouter)(),[h,p]=(0,i.useState)(!1),[g,b]=(0,i.useState)(!1),[y,v]=(0,i.useState)(!1),[k,S]=(0,i.useState)(!0),[T,D]=(0,i.useState)("");(0,i.useEffect)(()=>{"shopify"===T?(v(!1),p(!1),setTimeout(()=>{b(!0)},100)):"autods"===T?(b(!1),p(!1),setTimeout(()=>{v(!0)},100)):(b(!1),v(!1),setTimeout(()=>{p(!0)},100))},[T]);let[z,E]=(0,i.useState)(null),[F,B]=(0,i.useState)(!1),[_,O]=(0,i.useState)(""),[Z,M]=(0,i.useState)(""),[U,R]=(0,i.useState)(null),[G,L]=(0,i.useState)(null),[V,H]=(0,i.useState)(null),[q,Q]=(0,i.useState)(null),[Y,J]=(0,i.useState)(!1),[K,X]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(!1),[ea,er]=(0,i.useState)(1),[ei,eo]=(0,i.useState)(null),[el,ed]=(0,i.useState)(null),eu=(0,i.useRef)(null),em=(0,i.useRef)(null);async function connectStore(){if(0===_.length||0===Z.length){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Cannot connect store. Please fill out both fields.",variant:"destructive"});return}if(!Z.includes("shpat_")){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Invalid app token.",variant:"destructive"});return}if(!function(e){if(e.startsWith("http://")||e.startsWith("https://"))return console.log("URL should not start with http:// or https://"),!1;let t=/^([\w-]+(\.[\w-]+)+)([/\w- .]*)*\/?$/.test(e);return t}(_)){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Invalid store URL",variant:"destructive"});return}e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Connecting your store..."]}),description:"Please wait on this page while we connect your store to Glitching."}),ed(!0);let t=await fetch("/api/shopify/createShopifyDocument?uid=".concat(a.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+a.accessToken},body:JSON.stringify({shopifyUrl:_,appToken:Z})});if(!t.ok){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Could not connect your store to Glitching. Contact support for assistance.",variant:"destructive"}),ed(null);return}let n=await r(a);B(!0),O(n.url),trackEvent("autods_connected_store",AnyTrack("atclid")),e.setShowBanner(!1),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Connected your store to Glitching!"}),ed(null)}async function disconnectStore(){ed(!0),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Disconnecting your store..."]}),description:"Please wait on this page while we disconnect your store from Glitching."});let t=await fetch("/api/shopify/deleteShopifyDocument?uid=".concat(a.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+a.accessToken}});if(!t.ok){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Could not disconnect your store to Glitching. Contact support for assistance.",variant:"destructive"}),ed(null);return}B(!1),O(""),M(""),ed(null),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Disconnected your store from Glitching!"})}async function callDisconnectApi(){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Disconnecting AutoDS..."]}),description:"Please wait on this page while we disconnect AutoDS."}),ed(!0);let t=await fetch("/api/auto-ds/disconnect?uid=".concat(a.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+a.accessToken}});if(!t.ok){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Could not disconnect your store. Please try again or contact support.",variant:"destructive"}),ed(null);return}e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Successfully disconnected AutoDS!"}),J(null),X(null),ed(null)}async function fetchAutoDsStoreInfo(){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Fetching AutoDS store..."]}),description:"Please wait on this page while we fetch your AutoDS store."}),eo(!0);let t=await fetch("/api/auto-ds/getStore?uid=".concat(a.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+a.accessToken},body:JSON.stringify({encryptedIdToken:U,encryptedRefreshToken:G,idTokenTimestamp:V,shopifyUrl:_})});if(!t.ok){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Error fetching AutoDS connected store.",variant:"destructive"}),em.current.scrollIntoView({behavior:"smooth"}),eo(null);return}let r=await t.json();if("different stores"===r.error){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Your Glitching & AutoDS connected stores are different. They must be the same.",variant:"destructive"}),em.current.scrollIntoView({behavior:"smooth"}),eo(null);return}e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Successfully connected your AutoDS store information!"}),X(!0),eo(null)}async function trackEvent(e,t){await fetch("/api/anytrack?event=".concat(e,"&id=").concat(t))}if((0,i.useEffect)(()=>{a&&(r(a).then(t=>{if(!t){B(!1),E(!0),e.setShowBanner(!0);return}B(!0),e.setShowBanner(!1),O(t.url),E(!0)}),n(a).then(e=>{if(!e){J(!1),et(!0);return}R(e.encryptedIdToken),L(e.encryptedRefreshToken),H(e.idTokenTimestamp),e.storeUrl&&X(!0),J(!0),et(!0)}))},[a]),(0,i.useEffect)(()=>{if("shopify-store"===l.query.to){S(!1),D("shopify");return}if("auto-ds"===l.query.to){S(!1),D("autods");return}},[l.query]),(0,i.useEffect)(()=>{"shopify"===T&&"true"===l.query.help&&eu.current.scrollIntoView(),"autods"===T&&"true"===l.query.help&&em.current.scrollIntoView()},[T,l.query.help]),(0,i.useEffect)(()=>{(async function(){if(l.query.code&&a&&!Y&&ee){S(!1),D("autods");try{e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Connecting AutoDS..."]}),description:"Please wait on this page while we connect to AutoDS."}),Q(!0);let r=await fetch("/api/auto-ds/storeToken?uid=".concat(a.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(a.accessToken)},body:JSON.stringify({code:l.query.code})});if(!r.ok){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Failed to connect AutoDS account.",variant:"destructive"}),Q(null);return}let i=await n(a);var t=AnyTrack("atclid");trackEvent("autods_account_connected",t),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"AutoDS account connected. Watch the tutorial for the next steps."}),Q(null),R(i.encryptedIdToken),L(i.encryptedRefreshToken),H(i.idTokenTimestamp),J(!0)}catch(t){e.setWarning("Couldn't connect AutoDS account"),Q(null);return}}})()},[l.query,a,ee]),(0,i.useEffect)(()=>{"autods"===T&&t&&setTimeout(()=>{window.scrollBy(0,-9999999999)},10)},[T]),!k&&"shopify"===T)return(0,s.jsxs)("div",{className:"animated-element w-full flex flex-col items-center gap-5 p-5 lg:p-8 lg:py-10 pb-14 text-slate-400 lg:max-h-screen lg:overflow-auto overflow-x-hidden relative pb-16",children:[(0,s.jsx)(MatrixGrid,{}),(0,s.jsx)("div",{className:"w-full lg:w-[60rem] transition-all duration-1000 ".concat(g?"opacity-100 translate-y-0":"opacity-0 translate-y-10"),children:(0,s.jsxs)(x.z,{onClick:()=>{S(!0),D("")},variant:"outline",className:"group",children:[(0,s.jsx)(en.Z,{className:"w-4 h-4 group-hover:-translate-x-1 transition-all duration-100 ease-in mr-1"})," Back"]})}),(0,s.jsxs)("div",{onClick:()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank")},className:"p-3 lg:px-5 lg:p-5 w-full lg:w-[60rem] border border-accent bg-primary-foreground relative rounded-[.1rem] flex flex-row items-center justify-between gap-5 shadow-xl shadow-slate-950 transition-all duration-1000 ".concat(g?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-5 ",children:[(0,s.jsx)(c(),{src:$.Z,alt:"shopify logo affiliate promo",className:"w-[100px] lg:w-[135px] "}),(0,s.jsx)("div",{className:"hidden lg:block text-2xl scale-x-[250%] font-chakra-semibold text-muted-foreground/50",children:" - "}),(0,s.jsx)("div",{className:"hidden lg:block lg:text-foreground text-muted-foreground font-chakra-regular",children:" $1 for the first month"})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2 ",children:(0,s.jsxs)(x.z,{size:window.innerWidth<768?"sm":"",className:"bg-[#64943e] hover:bg-[#64943e]/90",onClick:()=>{window.open("http://shopify.pxf.io/PyNVMq","_blank")},children:["Create Your Store ",(0,s.jsx)(f.s7Z,{className:"ml-1"})]})})]}),(0,s.jsx)("div",{className:"w-full max-w-[60rem] bg-background border border-accent shadow-xl shadow-slate-950 z-20 rounded-[.1rem] flex flex-col gap-5 transition-all duration-1000 ".concat(g?"opacity-100 translate-y-0":"opacity-0 translate-y-28"),children:(0,s.jsxs)("div",{className:"w-full rounded-[.1rem] z-20 flex flex-col gap-7 p-5 lg:p-8",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mx-auto",children:[(0,s.jsx)(c(),{src:$.Z,alt:"shopify partnership promo",className:"w-[100px] lg:w-[160px]"}),(0,s.jsx)(th.Z,{className:"lg:w-[32px] lg:h-[32px] w-[24px] h-[24px] rotate-[90deg] text-primary"}),(0,s.jsx)(c(),{src:u.Z,alt:"best product finder method",className:"w-[120px] lg:w-[200px] ml-1 mt-0.5"})]}),(0,s.jsx)("div",{className:" lg:h-[400px] h-[150px]  rounded-[.1rem] overflow-hidden  my-5",children:(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/1023078927?title=0&byline=0&portrait=0&badge=0&autopause=0&player_id=0&app_id=58479",frameborder:"2",allow:"autoplay; fullscreen; clipboard-write",title:"Glitching Shopify Integration",className:"h-full w-full"})}),!F&&(0,s.jsxs)("div",{className:"w-full flex flex-col lg:flex-row lg:items-end mx-auto gap-5 rounded-[.1rem]",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 w-full lg:w-2/5",children:[(0,s.jsx)(A._,{className:"font-bold text-white",children:"Store URL"}),(0,s.jsx)(N.I,{className:"h-[2.5rem]",type:"text",onInput:e=>{O(e.target.value)},placeholder:"example-abc123.myshopify.com"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 w-full lg:w-2/5",children:[(0,s.jsx)(A._,{className:"font-bold text-white",children:"App Token"}),(0,s.jsx)(N.I,{className:"h-[2.5rem]",type:"text",onInput:e=>{M(e.target.value)},placeholder:"shpat_example123456"})]}),(0,s.jsxs)(x.z,{className:"lg:w-1/5 h-[2.5rem]",onClick:async()=>{await connectStore()},children:[" ",el?(0,s.jsxs)(s.Fragment,{children:[" ",(0,s.jsx)(C.Z,{className:"w-4 h-4 mr-1.5"})," Connecting"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tp.Z,{className:"w-4 h-4 mr-1.5"})," Connect"]})," "]})]}),F&&(0,s.jsxs)("div",{className:"w-full flex flex-col lg:flex-row lg:items-end gap-5 rounded-[.1rem]",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 w-full lg:w-2/5",children:[(0,s.jsx)(A._,{className:"font-bold text-white",children:"Store URL"}),(0,s.jsx)(N.I,{className:"h-[2.5rem] text-slate-400",type:"text",value:_,disabled:!0})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 w-full lg:w-2/5",children:[(0,s.jsx)(A._,{className:"font-bold text-white",children:"App Token"}),(0,s.jsx)(N.I,{className:"h-[2.5rem] text-slate-400",type:"password",value:"***********************",disabled:!0})]}),(0,s.jsx)(x.z,{className:"lg:w-1/5 h-[2.5rem] text-white",variant:"destructive",onClick:async()=>{await disconnectStore()},children:el?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 mr-1.5 animate-spin"})," Disconnecting"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tg.Z,{className:"w-4 h-4 mr-1.5"})," Disconnect"]})})]})]})}),(0,s.jsxs)("div",{ref:eu,className:"shadow-xl shadow-slate-950 w-full lg:max-w-[60rem] bg-background border border-accent z-20 rounded-[.1rem] flex flex-col transition-all duration-1000 ".concat(g?"opacity-100 translate-y-0":"opacity-0 translate-y-40"),children:[(0,s.jsxs)("h1",{className:"flex items-center gap-2 text-xl font-chakra-bold text-white p-5 border-b border-accent",children:[(0,s.jsx)(f.pjG,{className:"w-5 h-5"})," Help Section"]}),(0,s.jsx)("div",{className:"w-full flex flex-col px-5 gap-3 lg:gap-5",children:(0,s.jsxs)(m.UQ,{type:"single",collapsible:!0,className:"w-full",children:[(0,s.jsxs)(m.Qd,{value:"item-1",children:[(0,s.jsx)(m.o4,{className:"font-bold text-white lg:text-[1rem]",children:"I can't import my product!"}),(0,s.jsx)(m.vF,{children:(0,s.jsxs)("p",{children:["Steps to follow: ",(0,s.jsx)("div",{className:"mt-3"})," 1. Make sure your store is not password protected. ",(0,s.jsx)("div",{className:"mt-4"})," 2. If your store is not password protected, disconnect your store from glitching. ",(0,s.jsx)("div",{className:"mt-4"})," 3. Rewatch the tutorial and follow all the steps VERY CLOSELY (you might have configured the app wrong). ",(0,s.jsx)("div",{className:"mt-4"})," 4. If it still doesn't work, contact customer support  ",(0,s.jsx)("a",{href:"https://www.glitching.ai/dashboard?location=contact-us",className:"underline",target:"_blank",rel:"noopener noreferrer",children:"here."})]})})]}),(0,s.jsxs)(m.Qd,{value:"item-2",className:"",children:[(0,s.jsx)(m.o4,{className:"font-bold text-white lg:text-[1rem]",children:"I can't import my product page!"}),(0,s.jsx)(m.vF,{children:(0,s.jsxs)("p",{children:["Steps to follow: ",(0,s.jsx)("div",{className:"mt-3"}),'1. If your theme is "Debutify", please contact customer support ',(0,s.jsx)("a",{href:"https://www.glitching.ai/dashboard?location=contact-us",className:"underline",target:"_blank",rel:"noopener noreferrer",children:"here"}),", as some releases break the theme functionality. ",(0,s.jsx)("div",{className:"mt-4"})," 2. Make sure your store is not password protected. ",(0,s.jsx)("div",{className:"mt-4"})," 3. If your store is not password protected, disconnect your store from glitching. ",(0,s.jsx)("div",{className:"mt-4"})," 4. Rewatch the tutorial and follow all the steps VERY CLOSELY (you might have configured the app wrong). ",(0,s.jsx)("div",{className:"mt-4"})," 5. If it still doesn't work, contact customer support  ",(0,s.jsx)("a",{href:"https://www.glitching.ai/dashboard?location=contact-us",className:"underline",target:"_blank",rel:"noopener noreferrer",children:"here."})]})})]}),(0,s.jsxs)(m.Qd,{value:"item-3",className:"border-none",children:[(0,s.jsx)(m.o4,{className:"font-bold text-white lg:text-[1rem]",children:"How do I disconnect my store?"}),(0,s.jsx)(m.vF,{children:(0,s.jsxs)("div",{children:["To disconnect your store from Glitching, follow these steps:",(0,s.jsx)("div",{className:"mt-3"}),"1. Navigate to the Shopify integration section on this page.",(0,s.jsx)("div",{className:"mt-2"}),'2. Look for the "Disconnect" button next to your store details.',(0,s.jsx)("div",{className:"mt-2"}),'3. Click the "Disconnect" button.']})})]})]})})]})]},T);if(k||"autods"!==T)return(0,s.jsxs)("div",{className:"animated-element w-full flex flex-col items-center justify-center gap-5 p-5 lg:p-8 lg:py-10 pb-14 text-slate-400 lg:max-h-screen lg:overflow-auto overflow-x-hidden relative pb-16",children:[(0,s.jsx)(MatrixGrid,{}),(0,s.jsxs)("div",{className:"w-full lg:w-[57rem] flex lg:flex-row flex-col gap-6 z-20",children:[(0,s.jsxs)(w.Zb,{className:"border-accent w-full lg:w-1/2 transition-all duration-1000 ".concat(h?"opacity-100 translate-x-0":"opacity-0 -translate-x-20"),children:[(0,s.jsxs)(w.Ol,{children:[(0,s.jsx)(c(),{src:eD.Z,alt:"ai shopify store setup",className:"lg:w-[125px] w-[80px] mb-3"}),(0,s.jsx)(w.ll,{className:"text-2xl",children:"Shopify Store Connect"}),(0,s.jsx)(w.SZ,{children:(0,s.jsx)("p",{className:"text-slate-400 text-[1rem] mt-1",children:"Manage your Shopify store connection with Glitching. Start importing your products to your store."})})]}),(0,s.jsx)(w.aY,{children:(0,s.jsxs)(x.z,{onClick:()=>{S(!1),D("shopify")},size:"xl",className:"group w-full text-[1rem]",children:["Continue ",(0,s.jsx)(j.Z,{className:"w-4 h-4 ml-1.5 transition-all ease-in duration-100 group-hover:translate-x-1"})]})})]}),(0,s.jsxs)(w.Zb,{className:"border-accent w-full lg:w-1/2 relative transition-all duration-1000 ".concat(h?"opacity-100 translate-x-0":"opacity-0 translate-x-20"),children:[(0,s.jsxs)(w.Ol,{children:[(0,s.jsx)(c(),{src:tm,alt:"ai product finder and fulfillment",className:"lg:w-[140px] w-[80px] mb-3.5 rounded-[.1rem]"}),(0,s.jsx)(w.ll,{className:"text-2xl",children:"AutoDS Connect (Fulfillment)"}),(0,s.jsx)(w.SZ,{children:(0,s.jsx)("p",{className:"text-slate-400 text-[1rem] mt-1",children:"Manage your AutoDS connection with Glitching. Find suppliers and fulfill your orders."})})]}),(0,s.jsxs)(w.aY,{children:[(0,s.jsxs)(x.z,{size:"xl",className:"group w-full text-[1rem]",disabled:!z||!F,onClick:()=>{if(!F){e.setWarning("You must connect your Shopify store first.");return}S(!1),D("autods")},children:["Continue",(0,s.jsx)(j.Z,{className:"w-4 h-4 ml-1.5 transition-all ease-in duration-100 group-hover:translate-x-1"})]}),!F&&z&&(0,s.jsx)("p",{className:"text-[.75rem] text-foreground absolute top-4 font-chakra-regular right-4",children:"\uD83D\uDD12 Connect Shopify Store First"})]})]})]})]});{let e=" https://www.autods.com/integrate/?response_type=code&ref=MTEwNDk4OQ==&client_id=gn67mhm71v24p8kpkpu7janqb&redirect_uri=".concat("https://www.glitching.ai/dashboard?location=integrations");return(0,s.jsxs)("div",{className:"animated-element w-full flex flex-col items-center gap-5 p-5 lg:p-8 lg:py-10 pb-14 text-slate-400 lg:max-h-screen lg:overflow-auto overflow-x-hidden relative pb-16",children:[(0,s.jsx)(MatrixGrid,{}),(0,s.jsx)("div",{className:"w-full lg:w-[60rem] ",children:(0,s.jsxs)(x.z,{onClick:()=>{S(!0),D("")},variant:"outline",className:"group transition-all duration-1000 ".concat(y?"opacity-100 translate-y-0":"opacity-0 translate-y-10"),children:[(0,s.jsx)(en.Z,{className:"w-4 h-4 group-hover:-translate-x-1 transition-all duration-100 ease-in mr-1"})," Back"]})}),(0,s.jsxs)("div",{className:"shadow-xl shadow-slate-950 w-full max-w-[60rem] bg-background border border-accent z-20 rounded-[.1rem] flex flex-col gap-5 p-5 lg:p-8 transition-all duration-1000 ".concat(y?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 justify-center z-20 mb-6 lg:mb-10 mr-auto",children:[(0,s.jsx)(c(),{src:W.Z,alt:"autods automated fulfillment service",className:"w-[100px] lg:w-[160px]"}),(0,s.jsx)(th.Z,{className:"lg:w-[32px] lg:h-[32px] w-[24px] h-[24px] rotate-[90deg] text-primary"}),(0,s.jsx)(c(),{src:u.Z,alt:"winning product finder",className:"w-[120px] lg:w-[200px] ml-1 mt-0.5"})]}),(0,s.jsxs)("div",{className:"w-full rounded-[.1rem] z-20 flex flex-col gap-5 ",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)("div",{className:" px-2 lg:px-3 py-0.5 rounded-[.1rem] text-foreground font-chakra-regular bg-primary-foreground",children:[(0,s.jsx)("span",{className:"hidden lg:inline",children:"Step"})," 1"]}),(0,s.jsx)("h1",{className:"font-chakra-semibold text-white text-lg lg:text-2xl",children:"Create Your AutoDS Account"})]}),(0,s.jsx)(eC.Z,{}),(0,s.jsx)("div",{className:"w-full  rounded-[.1rem] flex flex-col justify-between gap-5 lg:mt-3",children:(0,s.jsxs)("div",{className:"p-5 w-full bg-primary-foreground border border-accent rounded-[.1rem] flex flex-col lg:flex-row items-center lg:justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-5 ",children:[(0,s.jsx)(c(),{src:W.Z,alt:"import winning products with autods",className:"w-[150px]"}),(0,s.jsx)("div",{className:"hidden lg:block text-2xl scale-x-[250%]",children:" - "}),(0,s.jsx)("h1",{className:"text-xl text-white font-chakra-regular",children:" Try It Now"})]}),(0,s.jsx)(x.z,{onClick:()=>{trackEvent("autods_started_process",AnyTrack("atclid"))},asChild:!0,children:(0,s.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5",children:["Create AutoDS Account",(0,s.jsx)(f.s7Z,{className:"w-4 h-4"})]})})]})})]}),(0,s.jsxs)("div",{className:"w-full rounded-[.1rem] z-20 flex flex-col gap-5 mt-5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)("div",{className:"px-2 lg:px-3 py-0.5 rounded-[.1rem] text-foreground font-chakra-regular bg-primary-foreground",children:[(0,s.jsx)("span",{className:"hidden lg:inline",children:"Step"})," 2"]}),(0,s.jsx)("h1",{className:"font-chakra-semibold text-white text-lg lg:text-2xl",children:"Connect Your Account To AutoDS"})]}),(0,s.jsx)(eC.Z,{}),(0,s.jsx)("div",{className:"w-full rounded-[.1rem] flex flex-col justify-between gap-5 lg:mt-3",children:(0,s.jsxs)("div",{className:"p-5 w-full bg-primary-foreground border border-accent rounded-[.1rem] flex flex-col lg:flex-row items-center lg:justify-between gap-5",children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col items-center gap-2 font-chakra-regular",children:[(0,s.jsx)(tf.Z,{className:"w-6 h-6 text-primary"}),(0,s.jsx)("h1",{className:"text-xl text-white",children:"AutoDS Account"})]}),q&&!Y&&(0,s.jsxs)(x.z,{disabled:!0,className:"flex items-center gap-1.5",children:[(0,s.jsx)(C.Z,{className:"h-4 w-4 animate-spin"}),"Connecting"]}),Y&&(0,s.jsx)(x.z,{onClick:async()=>{await callDisconnectApi()},variant:"destructive",className:"flex items-center gap-1.5",children:el?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"h-4 w-4 animate-spin"}),"Disconnecting"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tg.Z,{className:"h-4 w-4"}),"Disconnect"]})}),!Y&&!q&&(0,s.jsx)(x.z,{asChild:!0,className:"flex items-center gap-1.5",children:(0,s.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[(0,s.jsx)(tp.Z,{className:"h-4 w-4"}),"Connect Account"]})})]})})]}),(0,s.jsxs)("div",{className:"w-full flex flex-col items-center justify-between gap-1.5 lg:gap-5 mt-5 ",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 w-full",children:[(0,s.jsxs)("div",{className:"px-2 lg:px-3 py-0.5 rounded-[.1rem] text-foreground font-chakra-regular bg-primary-foreground",children:[(0,s.jsx)("span",{className:"hidden lg:inline",children:"Step"})," 3"]}),(0,s.jsx)("h1",{className:"font-bold text-white text-lg lg:text-2xl font-chakra-bold",children:"Connect Your Store To AutoDS"})]}),(0,s.jsx)(eC.Z,{})]}),(0,s.jsxs)("div",{className:"flex flex-col w-full gap-3 lg:gap-5",children:[(0,s.jsxs)("div",{className:"w-full text-xl text-white font-bold  p-5 px-5 bg-primary-foreground border border-accent rounded-[.1rem] flex flex-col gap-3 lg:gap-0 lg:flex-row items-center lg:justify-between",children:[(0,s.jsxs)("span",{className:"flex lg:flex-row flex-col items-center gap-2 font-chakra-regular",children:[" ",(0,s.jsx)(ec.Z,{className:"w-6 h-6 text-primary"})," AutoDS Store"]}),!Y&&!K&&(0,s.jsx)(x.z,{variant:"secondary",disabled:!0,className:"flex items-center gap-1.5",children:"Not Connected"}),Y&&K&&(0,s.jsx)(x.z,{onClick:async()=>{await callDisconnectApi()},variant:"destructive",className:"flex items-center gap-1.5",children:el?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"h-4 w-4 animate-spin"}),"Disconnecting"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tg.Z,{className:"h-4 w-4"}),"Disconnect"]})}),Y&&!K&&(0,s.jsx)(x.z,{onClick:async()=>{await fetchAutoDsStoreInfo()},className:"flex items-center gap-1.5",children:ei?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"h-4 w-4 animate-spin"}),"Connecting"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tp.Z,{className:"h-4 w-4"}),"Connect"]})})]}),(0,s.jsx)("div",{className:"flex flex-col gap-3 mt-3",children:(0,s.jsx)("h1",{className:"text-lg lg:text-2xl font-chakra-bold text-white",children:"Tutorial: How to connect Glitching to AutoDS"})}),(0,s.jsx)("iframe",{src:"https://player.vimeo.com/video/1023078846?badge=0&autopause=0&player_id=0&app_id=58479",className:"h-[200px] lg:h-[500px] rounded-[.1rem] mb-8 w-full bg-black text-2xl lg:text-4xl flex items-center justify-center text-white font-bold"})]})]}),(0,s.jsxs)("div",{ref:em,className:"shadow-xl shadow-slate-950 w-full lg:max-w-[60rem] bg-background border border-accent z-20 rounded-[.1rem] flex flex-col transition-all duration-1000 ".concat(y?"opacity-100 translate-y-0":"opacity-0 translate-y-28"),children:[(0,s.jsxs)("h1",{className:"flex items-center gap-2 text-xl font-chakra-bold text-white p-5 border-b border-accent",children:[(0,s.jsx)(f.pjG,{className:"w-5 h-5"})," Help Section"]}),(0,s.jsx)("div",{className:"w-full flex flex-col px-5 gap-3 lg:gap-5",children:(0,s.jsxs)(m.UQ,{type:"single",collapsible:!0,className:"w-full",children:[(0,s.jsxs)(m.Qd,{value:"item-1",children:[(0,s.jsx)(m.o4,{className:"font-bold text-white text-[1rem] text-left",children:(0,s.jsx)("span",{className:"mr-5",children:"Does AutoDS fulfill my orders?"})}),(0,s.jsx)(m.vF,{children:(0,s.jsxs)("p",{children:['Yes, AutoDS can automatically fulfill your orders. Simply purchase "Auto Order Credits" ',(0,s.jsx)("a",{href:"https://platform.autods.com/orders",className:"underline",target:"_blank",rel:"noopener noreferrer",children:"here"})," to get started."]})})]}),(0,s.jsxs)(m.Qd,{value:"item-2",children:[(0,s.jsx)(m.o4,{className:"font-bold text-white text-[1rem] text-left",children:(0,s.jsx)("span",{className:"mr-5",children:"Can Glitching import my products to AutoDS?"})}),(0,s.jsx)(m.vF,{children:(0,s.jsx)("p",{children:"Yes, if you have connected to AutoDS properly, Glitching will send the products you import to both AutoDS & Shopify."})})]}),(0,s.jsxs)(m.Qd,{value:"item-3",children:[(0,s.jsx)(m.o4,{className:"font-bold text-white text-[1rem] text-left",children:(0,s.jsx)("span",{className:"mr-5",children:"I can't connect my store to AutoDS!"})}),(0,s.jsx)(m.vF,{children:(0,s.jsxs)("p",{children:["Steps to follow: ",(0,s.jsx)("div",{className:"mt-4"})," 1. Rewatch & follow the tutorial steps VERY CLOSELY. ",(0,s.jsx)("div",{className:"mt-4"})," 2. Make sure that the store you connected to Glitching is the same store you connected to AutoDS. ",(0,s.jsx)("div",{className:"mt-4"})," 3. If it still doesn't work, contact customer support ",(0,s.jsx)("a",{href:"https://www.glitching.ai/dashboard?location=contact-us",className:"underline",target:"_blank",rel:"noopener noreferrer",children:"here."})]})})]}),(0,s.jsxs)(m.Qd,{value:"item-4",children:[(0,s.jsx)(m.o4,{className:"font-bold text-white text-[1rem] text-left",children:(0,s.jsx)("span",{className:"mr-5",children:"I can't import my product to AutoDS!"})}),(0,s.jsx)(m.vF,{children:(0,s.jsxs)("p",{children:["Steps to follow: ",(0,s.jsx)("div",{className:"mt-4"})," 1. Make sure you connected your store to AutoDS as shown in the tutorial. ",(0,s.jsx)("div",{className:"mt-4"})," 2. Make sure that the store you connected to Glitching is the same store you connected to AutoDS. ",(0,s.jsx)("div",{className:"mt-4"})," 3. If it still doesn't work, contact customer support ",(0,s.jsx)("a",{href:"https://www.glitching.ai/dashboard?location=contact-us",className:"underline",target:"_blank",rel:"noopener noreferrer",children:"here."})," ",(0,s.jsx)("div",{className:"mt-4"})," ",(0,s.jsx)("span",{className:"italic",children:"*Note that products imported from Amazon cannot be imported to AutoDS."})]})})]}),(0,s.jsxs)(m.Qd,{value:"item-5",children:[(0,s.jsx)(m.o4,{className:"font-bold text-white text-[1rem] text-left",children:(0,s.jsx)("span",{className:"mr-5",children:"The buy & sell price is way too high when I import to AutoDS!"})}),(0,s.jsx)(m.vF,{children:(0,s.jsxs)("p",{children:["Read this AutoDS support article: ",(0,s.jsx)("a",{href:"https://help.autods.com/why-does-my-listing-have-a-very-high-source-price",className:"underline",target:"_blank",rel:"noopener noreferrer",children:"https://help.autods.com/why-does-my-listing-have-a-very-high-source-price"})]})})]}),(0,s.jsxs)(m.Qd,{value:"item-6",className:"border-none",children:[(0,s.jsx)(m.o4,{className:"font-bold text-white text-[1rem] text-left",children:(0,s.jsx)("span",{className:"mr-5",children:"I want to stop using AutoDS on Glitching!"})}),(0,s.jsx)(m.vF,{children:(0,s.jsx)("p",{children:'Simply click the "Disconnect" button above to disconnect AutoDS from Glitching.'})})]})]})})]})]},T)}}var tx=a(56953);function join_discord_DiscordPopup(e){let{currentUser:t}=(0,d.a)();async function trackEvent(e,t){await fetch("/api/anytrack?event=".concat(e,"&id=").concat(t))}let a=0;async function complete(){await fetch("/api/discord/popup?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t.accessToken)},body:JSON.stringify({discordPopupNumber:a})}),e.setJoinDiscordPopup(!1),e.setCurrentPopup(null),e.setPopupInteracted(!0),e.setPopupDate(new Date().toISOString())}"popup1"===e.currentPopup?a=1:"popup2"===e.currentPopup?a=2:"popup3"===e.currentPopup?a=3:"popup4"===e.currentPopup?a=4:"popup5"===e.currentPopup&&(a=5);let handleClosePopup=async()=>{e.currentPopup&&(e.setDiscordInfo(t=>({...t,[e.currentPopup]:!0})),complete(),e.setJoinDiscordPopup(!1),e.setCurrentPopup(null),e.setPopupInteracted(!0),e.setPopupDate(new Date().toISOString()))};return"popup1"===e.currentPopup?(0,s.jsx)(eA.Vq,{open:e.joinDiscordPopup,onOpenChange:handleClosePopup,children:(0,s.jsx)(eA.cZ,{className:"outline-none border-accent",children:(0,s.jsxs)("div",{className:"flex flex-col lg:w-full w-full items-center justify-center gap-3 rounded-[.4rem] z-20",children:[(0,s.jsxs)("h1",{className:"text-3xl font-extrabold text-white flex flex-col items-center gap-3 text-center font-chakra-semibold",children:[(0,s.jsx)(f.dsO,{className:"text-primary w-[5rem] h-[5rem] rounded-[.1rem]"}),(0,s.jsx)("span",{className:"flex flex-row gap-1",children:(0,s.jsx)("div",{children:"You've Been Invited!"})})]}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-regular text-center text-md mb-3",children:"Hey, you've been invited to join our Private Discord Channel."}),(0,s.jsxs)(x.z,{size:"xl",className:"w-full text-[1rem]",onClick:()=>{trackEvent("DiscordPopup1",AnyTrack("atclid")),window.location.href="https://discord.com/oauth2/authorize?client_id=1223067356192964628&response_type=code&redirect_uri=https%3A%2F%2Fwww.glitching.ai%2Fdashboard%3Flocation%3Ddashboard&scope=identify+guilds.join+guilds.members.read",complete()},children:["Join Discord ",(0,s.jsx)(f.dsO,{className:"ml-1.5 text-2xl text-white"})]})]})})}):"popup2"===e.currentPopup?(0,s.jsx)(eA.Vq,{open:e.joinDiscordPopup,onOpenChange:handleClosePopup,children:(0,s.jsx)(eA.cZ,{className:"outline-none border-accent",children:(0,s.jsxs)("div",{className:"flex flex-col lg:w-full w-full items-center justify-center gap-3 rounded-[.4rem] z-20",children:[(0,s.jsxs)("h1",{className:"text-3xl font-extrabold text-white flex flex-col items-center gap-3 text-center font-chakra-semibold",children:[(0,s.jsx)(tx.Z,{className:"text-primary w-[5rem] h-[5rem] rounded-[.1rem]"}),(0,s.jsx)("span",{className:"flex flex-row gap-1",children:(0,s.jsx)("div",{children:"Special Invite"})})]}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-regular text-center text-md mb-3",children:"You want to make money dropshipping... But only 1% of people actually make it."}),(0,s.jsxs)("p",{className:"text-muted-foreground font-chakra-regular text-center text-md mb-3",children:["The difference? ",(0,s.jsx)("span",{className:"font-bold",children:"Knowledge"})]}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-regular text-center text-md mb-3",children:"Inside our Discord, the founders of Glitching are there to help you 1-on-1 with any questions you have, providing personalized advice and exclusive insights."}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-regular text-center text-md mb-3",children:"Don't miss this opportunity to be part of the top 1%."}),(0,s.jsxs)(x.z,{size:"xl",className:"w-full text-[1rem]",onClick:()=>{trackEvent("DiscordPopup2",AnyTrack("atclid")),window.location.href="https://discord.com/oauth2/authorize?client_id=1223067356192964628&response_type=code&redirect_uri=https%3A%2F%2Fwww.glitching.ai%2Fdashboard%3Flocation%3Ddashboard&scope=identify+guilds.join+guilds.members.read",complete()},children:["Join Discord ",(0,s.jsx)(f.dsO,{className:"ml-1.5 text-2xl text-white"})]})]})})}):"popup3"===e.currentPopup?(0,s.jsx)(eA.Vq,{open:e.joinDiscordPopup,onOpenChange:handleClosePopup,children:(0,s.jsx)(eA.cZ,{className:"outline-none border-accent",children:(0,s.jsxs)("div",{className:"flex flex-col lg:w-full w-full items-center justify-center gap-3 rounded-[.4rem] z-20",children:[(0,s.jsxs)("h1",{className:"text-3xl font-extrabold text-white flex flex-col items-center gap-3 text-center font-chakra-semibold",children:[(0,s.jsx)(f.dsO,{className:"text-primary w-[5rem] h-[5rem] rounded-[.1rem]"}),(0,s.jsx)("span",{className:"flex flex-row gap-1",children:(0,s.jsx)("div",{children:"Join our Live Dropshipping Q&A"})})]}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-regular text-center text-md mb-3",children:"Every Sunday, the founders of Glitching host Live Calls."}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-regular text-center text-md mb-3",children:"We build and review stores, answer questions, drop insane value and so much more."}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-regular text-center text-md mb-3",children:"Join to Get Expert Advice \uD83D\uDC47"}),(0,s.jsxs)(x.z,{size:"xl",className:"w-full text-[1rem]",onClick:()=>{trackEvent("DiscordPopup3",AnyTrack("atclid")),window.location.href="https://discord.com/oauth2/authorize?client_id=1223067356192964628&response_type=code&redirect_uri=https%3A%2F%2Fwww.glitching.ai%2Fdashboard%3Flocation%3Ddashboard&scope=identify+guilds.join+guilds.members.read",complete()},children:["Join Discord ",(0,s.jsx)(f.dsO,{className:"ml-1.5 text-2xl text-white"})]})]})})}):"popup4"===e.currentPopup?(0,s.jsx)(eA.Vq,{open:e.joinDiscordPopup,onOpenChange:handleClosePopup,children:(0,s.jsx)(eA.cZ,{className:"outline-none border-accent",children:(0,s.jsxs)("div",{className:"flex flex-col lg:w-full w-full items-center justify-center gap-3 rounded-[.4rem] z-20",children:[(0,s.jsxs)("h1",{className:"text-3xl font-extrabold text-white flex flex-col items-center gap-3 text-center font-chakra-semibold",children:[(0,s.jsx)(f.dsO,{className:"text-primary w-[5rem] h-[5rem] rounded-[.1rem]"}),(0,s.jsx)("span",{className:"flex flex-row gap-1",children:(0,s.jsx)("div",{children:"No One Succeeds Alone"})})]}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-regular text-center text-md mb-3",children:"Join the Glitching Discord to connect with experienced mentors and a supportive community."}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-regular text-center text-md mb-3",children:"Become Part of Our Network \uD83D\uDC47"}),(0,s.jsxs)(x.z,{size:"xl",className:"w-full text-[1rem]",onClick:()=>{trackEvent("DiscordPopup4",AnyTrack("atclid")),window.location.href="https://discord.com/oauth2/authorize?client_id=1223067356192964628&response_type=code&redirect_uri=https%3A%2F%2Fwww.glitching.ai%2Fdashboard%3Flocation%3Ddashboard&scope=identify+guilds.join+guilds.members.read",complete()},children:["Join Discord ",(0,s.jsx)(f.dsO,{className:"ml-1.5 text-2xl text-white"})]})]})})}):"popup5"===e.currentPopup?(0,s.jsx)(eA.Vq,{open:e.joinDiscordPopup,onOpenChange:handleClosePopup,children:(0,s.jsx)(eA.cZ,{className:"outline-none border-accent",children:(0,s.jsxs)("div",{className:"flex flex-col lg:w-full w-full items-center justify-center gap-3 rounded-[.4rem] z-20",children:[(0,s.jsxs)("h1",{className:"text-3xl font-extrabold text-white flex flex-col items-center gap-3 text-center font-chakra-semibold",children:[(0,s.jsx)(f.dsO,{className:"text-primary w-[5rem] h-[5rem] rounded-[.1rem]"}),(0,s.jsx)("span",{className:"flex flex-row gap-1",children:(0,s.jsx)("div",{children:"Reminder: Limited Spots Left"})})]}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-regular text-center text-md mb-3",children:"Our Discord is almost at capacity, and will be locked soon."}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-regular text-center text-md mb-3",children:"This is your last chance to get the mentorship, support, and exclusive content you need to succeed."}),(0,s.jsx)("p",{className:"text-muted-foreground font-chakra-regular text-center text-md mb-3",children:"Don't Miss Out – Secure Your Spot Now \uD83D\uDC47"}),(0,s.jsxs)(x.z,{size:"xl",className:"w-full text-[1rem]",onClick:()=>{trackEvent("DiscordPopup5",AnyTrack("atclid")),window.location.href="https://discord.com/oauth2/authorize?client_id=1223067356192964628&response_type=code&redirect_uri=https%3A%2F%2Fwww.glitching.ai%2Fdashboard%3Flocation%3Ddashboard&scope=identify+guilds.join+guilds.members.read",complete()},children:["Join Discord ",(0,s.jsx)(f.dsO,{className:"ml-1.5 text-2xl text-white"})]})]})})}):void 0}var tb=a(20550),tw=a(18318),ty=a(86204),tv=JSON.parse('{"v":"5.7.4","fr":60,"ip":696,"op":762,"w":600,"h":600,"nm":"Final","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":3,"ty":0,"nm":"position+scale","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[200,300,0],"ix":2,"l":2},"a":{"a":0,"k":[300,300,0],"ix":1,"l":2},"s":{"a":0,"k":[53,53,100],"ix":6,"l":2}},"ao":0,"w":600,"h":600,"ip":20,"op":1520,"st":20,"bm":0},{"ddd":0,"ind":4,"ty":0,"nm":"position+scale","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,300,0],"ix":2,"l":2},"a":{"a":0,"k":[300,300,0],"ix":1,"l":2},"s":{"a":0,"k":[53,53,100],"ix":6,"l":2}},"ao":0,"w":600,"h":600,"ip":30,"op":1530,"st":30,"bm":0},{"ddd":0,"ind":5,"ty":0,"nm":"position+scale","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[300,300,0],"ix":2,"l":2},"a":{"a":0,"k":[300,300,0],"ix":1,"l":2},"s":{"a":0,"k":[53,53,100],"ix":6,"l":2}},"ao":0,"w":600,"h":600,"ip":40,"op":1540,"st":40,"bm":0},{"ddd":0,"ind":6,"ty":0,"nm":"position+scale","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[350,300,0],"ix":2,"l":2},"a":{"a":0,"k":[300,300,0],"ix":1,"l":2},"s":{"a":0,"k":[53,53,100],"ix":6,"l":2}},"ao":0,"w":600,"h":600,"ip":50,"op":1550,"st":50,"bm":0},{"ddd":0,"ind":7,"ty":0,"nm":"position+scale","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[400,300,0],"ix":2,"l":2},"a":{"a":0,"k":[300,300,0],"ix":1,"l":2},"s":{"a":0,"k":[53,53,100],"ix":6,"l":2}},"ao":0,"w":600,"h":600,"ip":60,"op":1560,"st":60,"bm":0},{"ddd":0,"ind":8,"ty":0,"nm":"position+scale","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[450,300,0],"ix":2,"l":2},"a":{"a":0,"k":[300,300,0],"ix":1,"l":2},"s":{"a":0,"k":[53,53,100],"ix":6,"l":2}},"ao":0,"w":600,"h":600,"ip":70,"op":1570,"st":70,"bm":0},{"ddd":0,"ind":9,"ty":0,"nm":"position+scale","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,300,0],"ix":2,"l":2},"a":{"a":0,"k":[300,300,0],"ix":1,"l":2},"s":{"a":0,"k":[53,53,100],"ix":6,"l":2}},"ao":0,"w":600,"h":600,"ip":80,"op":1580,"st":80,"bm":0}]},{"id":"comp_1","layers":[{"ddd":0,"ind":1,"ty":0,"nm":"asset","refId":"comp_2","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.333],"y":[0]},"t":615,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":632,"s":[30]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":645,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":657,"s":[30]},{"t":680,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":615,"s":[300,415,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":680,"s":[300,171,0],"to":[0,0,0],"ti":[0,0,0]},{"t":745,"s":[300,415,0]}],"ix":2,"l":2},"a":{"a":0,"k":[300,300,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,1.298]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":615,"s":[75,75,100]},{"i":{"x":[0.833,0.833,0.833],"y":[1,1,0.845]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,-0.057]},"t":632,"s":[55,55,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.645]},"o":{"x":[0.167,0.167,0.167],"y":[0,0,0.143]},"t":645,"s":[46,46,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":657,"s":[55,55,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,8.727]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":680,"s":[75,75,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":699,"s":[90,90,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":714,"s":[100,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":726,"s":[100,100,100]},{"t":745,"s":[75,75,100]}],"ix":6,"l":2}},"ao":0,"w":600,"h":600,"ip":0,"op":1500,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":0,"nm":"asset","refId":"comp_2","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":615,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.333],"y":[0]},"t":680,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":697,"s":[30]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":710,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":722,"s":[30]},{"t":745,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":615,"s":[300,171,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":680,"s":[300,415,0],"to":[0,0,0],"ti":[0,0,0]},{"t":745,"s":[300,171,0]}],"ix":2,"l":2},"a":{"a":0,"k":[300,300,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,8.727]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":615,"s":[75,75,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":634,"s":[90,90,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":647,"s":[100,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":659,"s":[100,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":680,"s":[75,75,100]},{"i":{"x":[0.833,0.833,0.833],"y":[1,1,1]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0]},"t":697,"s":[55,55,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,1]},"o":{"x":[0.167,0.167,0.167],"y":[0,0,0]},"t":710,"s":[46,46,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":722,"s":[55,55,100]},{"t":745,"s":[75,75,100]}],"ix":6,"l":2}},"ao":0,"w":600,"h":600,"ip":-65,"op":1435,"st":-65,"bm":0}]},{"id":"comp_2","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Round 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[300,300,0],"ix":2,"l":2},"a":{"a":0,"k":[-74,-14,0],"ix":1,"l":2},"s":{"a":0,"k":[129,129,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[60,60],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.1451,0.3882,0.9216,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-74,-14],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1500,"st":0,"bm":0}]}],"layers":[{"ddd":0,"ind":2,"ty":0,"nm":"sequance","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[248,300,0],"ix":2,"l":2},"a":{"a":0,"k":[300,300,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"w":600,"h":600,"ip":0,"op":1500,"st":0,"bm":0}],"markers":[]}'),tj=a(98814);function ProductDb(e){let{currentUser:t,getDbProducts:a,getSavedProducts2:r,contextChargeDeclined:n}=(0,d.a)(),l={loop:!0,autoplay:!0,animationData:tv,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}},[u,m]=(0,i.useState)(1),[h,p]=(0,i.useState)(0),[g,b]=(0,i.useState)(!1),[y,j]=(0,i.useState)([]),[k,A]=(0,i.useState)(!1),[S,T]=(0,i.useState)(""),[D,z]=(0,i.useState)(null),[I,E]=(0,i.useState)(""),[F,B]=(0,i.useState)(!1),[_,O]=(0,i.useState)(!1),[Z,M]=(0,i.useState)(!1),U=(0,o.useRouter)();(0,i.useEffect)(()=>{setTimeout(()=>{M(!0)},10)},[]),(0,i.useEffect)(()=>{t&&fetchProducts(1)},[t]),(0,i.useEffect)(()=>{if(!I&&F){handleSearch(),B(!1);return}},[I,F]),(0,i.useEffect)(()=>{if(t){if(n){e.setPayDifferentCard(!0);return}"no"===e.subscribed&&e.setTrialPopup(!0)}},[n,e.subscribed,t]);let[R,L]=(0,i.useState)(null),fetchProducts=async(e,s)=>{O(!0),m(e);let{products:r,totalPages:n}=await a(t,s||R||{niches:[],property:null},12,e,I);r&&(H(r),p(n)),O(!1)},applyFilters=async(e,t)=>{O(!0),b(!1),A(!1),m(1);let a=e.length>0?eK.find(t=>t.label===e[0]):null,s={niches:t?[t]:[],property:a};L(s),await fetchProducts(1,s),O(!1)},handleSearch=()=>{m(1),L(null),fetchProducts(1)};(0,i.useEffect)(()=>{t&&r(t).then(e=>{if(e){ec(!0),ey(e.filter(e=>"product-db"===e.from).reverse());return}fetch("/api/my-products/createProductsUser?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t.accessToken}})})},[t]);let[V,H]=(0,i.useState)([]),[q,W]=(0,i.useState)(null),[Q,Y]=(0,i.useState)(null),[J,K]=(0,i.useState)(null),[X,$]=(0,i.useState)(""),[ee,et]=(0,i.useState)(!1),[ea,es]=(0,i.useState)(!1),[er,ei]=(0,i.useState)("section-1"),[el,ec]=(0,i.useState)(!1),[ed,ep]=(0,i.useState)(!1),[eg,ey]=(0,i.useState)([]),[ev,ej]=(0,i.useState)(null),[ek,eN]=(0,i.useState)(null),[eA,eT]=(0,i.useState)(null),[eC,eP]=(0,i.useState)(null),[eD,ez]=(0,i.useState)(null),[eI,eE]=(0,i.useState)(null),[eF,eB]=(0,i.useState)(!0),[eO,eZ]=(0,i.useState)(!1),[eM,eR]=(0,i.useState)(!1),[eG,eL]=(0,i.useState)(""),[eV,eq]=(0,i.useState)(""),[eW,eQ]=(0,i.useState)(!1),[eY,eJ]=(0,i.useState)(!1),eK=[{label:"Sale Price: Low To High",key:"amazonPrice",order:"asc"},{label:"Sale Price: High To Low",key:"amazonPrice",order:"desc"},{label:"Cost: Low To High",key:"aliexpressPrice",order:"asc"},{label:"Cost: High To Low",key:"aliexpressPrice",order:"desc"},{label:"Potential Profit: Low To High",key:"profit",order:"asc"},{label:"Potential Profit: High To Low",key:"profit",order:"desc"},{label:"Saturation: Low To High",key:"saturation",order:"asc"},{label:"Saturation: High To Low",key:"saturation",order:"desc"},{label:"Wow Factor: Low To High",key:"wowFactor",order:"asc"},{label:"Wow Factor: High To Low",key:"wowFactor",order:"desc"},{label:"Product Market Fit: Low To High",key:"pmf",order:"asc"},{label:"Product Market Fit: High To Low",key:"pmf",order:"desc"}],handleFilterToggle=async e=>{j(t=>{let a=t.includes(e)?[]:[e];return applyFilters(a,S),a})},handleNicheToggle=async e=>{let t=S===e?"":e;T(t),applyFilters(y,t)},renderProductCard=(e,t)=>{let a,r,n=e.product.profit?e.product.profit:e.product.amazonPrice-e.product.aliexpressPrice;return a=n<10.01?"from-red-600 to-red-500":n>=10.01&&n<20.01?"from-yellow-600 to-amber-500":"from-emerald-600 to-emerald-500",r=Math.min(n/35*100,100),(0,s.jsxs)("div",{className:"product-card w-[45%] h-[8rem] lg:w-[14.5rem] lg:h-[14.5rem] relative rounded-[.1rem]  border border-transparent transition-all duration-100 ease-in hover:border-primary relative overflow-hidden cursor-pointer",onClick:()=>{et(!0),es(!1),W(e.product),Y(r),K(a),$(e.product.images[0])},onMouseEnter:()=>z(t),onMouseLeave:()=>z(null),children:[(0,s.jsx)("img",{src:e.product.images[0],className:"w-full h-full object-cover absolute brightness-[85%]"}),(0,s.jsx)("div",{className:"absolute w-[90%] p-1.5 bg-background font-[600] rounded-[.1rem] text-white text-[.5rem] lg:text-[.85rem] text-center lg:bottom-3 bottom-2 left-[50%] translate-x-[-50%]",children:e.product.productName.length>(window.innerWidth>=768?20:16)?"".concat(e.product.productName.slice(0,window.innerWidth>=768?20:16),"..."):e.product.productName}),(0,s.jsxs)("div",{className:"hidden bg-black bg-opacity-[90%] w-full h-full lg:flex flex-col items-start p-3 z-20 absolute top-0 transition-all duration-100 ease-in ".concat(D===t?"opacity-100":"opacity-0"),children:[(0,s.jsxs)("div",{className:"text-white text-center text-sm font-bold flex flex-row items-center justify-center gap-2",children:[(0,s.jsx)(G.xHd,{})," Click to view details"]}),(0,s.jsxs)("div",{className:"flex flex-row w-full gap-2 mt-2",children:[(0,s.jsxs)("div",{className:"bg-accent p-1 w-[33%] text-[.65rem] text-white rounded-[.1rem]",children:[(0,s.jsx)("div",{className:"text-red-300",children:"Cost"}),(0,s.jsxs)("div",{className:"font-[600]",children:["$",e.product.aliexpressPrice]})]}),(0,s.jsxs)("div",{className:"bg-accent p-1 w-[33%] text-[.65rem] text-white rounded-[.1rem]",children:[(0,s.jsx)("div",{className:"text-green-300",children:"Sale Price"}),(0,s.jsxs)("div",{className:"font-[600]",children:["$",e.product.amazonPrice]})]}),(0,s.jsxs)("div",{className:"bg-accent p-1 w-[33%] text-[.65rem] text-white rounded-[.1rem]",children:[(0,s.jsx)("div",{className:"text-blue-300",children:"Profit"}),(0,s.jsxs)("div",{className:"font-[600]",children:["$",e.product.profit?e.product.profit.toFixed(2):(e.product.amazonPrice-e.product.aliexpressPrice).toFixed(2)]})]})]}),(0,s.jsxs)("div",{className:"flex flex-col w-full mt-2 gap-1",children:[(0,s.jsxs)("div",{className:"text-white text-[.65rem] w-full",children:[(0,s.jsx)("div",{children:"Saturation"}),(0,s.jsx)("div",{className:"w-full bg-background p-1 rounded-[.15rem]",children:(0,s.jsx)("div",{style:{width:"".concat(e.product.saturation,"%")},className:"p-1 ".concat(e.product.saturation<61?"bg-gradient-to-r from-emerald-600 to-emerald-500":e.product.saturation>60&&e.product.saturation<66?"bg-gradient-to-r from-yellow-600 to-amber-500":"bg-gradient-to-r from-red-600 to-red-500","  rounded-[.15rem]")})})]}),(0,s.jsxs)("div",{className:"text-white text-[.65rem] w-full",children:[(0,s.jsx)("div",{children:"Wow Factor"}),(0,s.jsx)("div",{className:"w-full bg-background p-1 rounded-[.15rem]",children:(0,s.jsx)("div",{style:{width:"".concat(e.product.wowFactor,"%")},className:"p-1 ".concat(e.product.wowFactor<31?"bg-gradient-to-r from-red-600 to-red-500":e.product.wowFactor>30&&e.product.wowFactor<41?"bg-gradient-to-r from-yellow-600 to-amber-500":"bg-gradient-to-r from-emerald-600 to-emerald-500"," rounded-[.15rem]")})})]}),(0,s.jsxs)("div",{className:"text-white text-[.65rem] w-full",children:[(0,s.jsx)("div",{children:"Profit Margin"}),(0,s.jsx)("div",{className:"w-full bg-background p-1 rounded-[.15rem]",children:(0,s.jsx)("div",{style:{width:"".concat(r,"%")},className:"p-1 bg-gradient-to-r ".concat(a," rounded-[.15rem]")})})]})]})]})]},t)},handleClick=async e=>{if(e<1||e>h)return;let t=document.querySelector(".scroll-component");t&&t.scrollTo({top:0,behavior:"smooth"}),O(!0),await fetchProducts(e),O(!1)},renderPageNumbers=()=>{let e;let t=[],a=Math.max(1,u-Math.floor((e=window.innerWidth<768?3:7)/2)),r=Math.min(h,a+e-1);r-a+1<e&&(a=Math.max(1,r-e+1)),a>1&&(t.push((0,s.jsx)(x.z,{variant:"secondary",size:"icon",onClick:()=>handleClick(1),children:"1"},1)),a>2&&t.push((0,s.jsx)(x.z,{className:"pointer-events-none",variant:"secondary",size:"icon",children:"..."},"start-ellipsis")));for(let e=a;e<=r;e++)t.push((0,s.jsx)(x.z,{onClick:()=>handleClick(e),variant:"secondary",size:"icon",className:u===e?"border border-primary":"",children:e},e));return t};async function saveProduct(a){ep(!0);let n=await fetch("/api/my-products/saveImportedProduct?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t.accessToken},body:JSON.stringify({product:a})}),i=await n.json(),o=await r(t);return ey(o.reverse()),ep(!1),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Product Saved"]}),description:'Click "View" to view it in saved products',variant:"default",action:(0,s.jsx)(x.z,{size:"sm",variant:"outline",className:"-translate-x-1",onClick:()=>{U.push("/dashboard?location=my-products")},children:"View"})}),i.id}let handleOutsideClick=e=>{if(!(ee&&e.target.closest(".product-card"))&&ee&&!e.target.closest(".product-panel")){et(!1),es(!1),W(null),Y(null),K(null),$("");return}};(0,i.useEffect)(()=>(document.addEventListener("mousedown",handleOutsideClick),()=>{document.removeEventListener("mousedown",handleOutsideClick)}),[ee]);let handleClickOutside=e=>{g&&!e.target.closest(".filter-popup")&&b(!1),k&&!e.target.closest(".niche-popup")&&A(!1)};return(0,i.useEffect)(()=>(document.addEventListener("mousedown",handleClickOutside),()=>{document.removeEventListener("mousedown",handleClickOutside)}),[g,k]),(0,s.jsxs)("div",{className:"dark scroll-component animated-element w-full h-screen flex flex-col items-center gap-5 lg:p-0 p-5 pb-8 lg:py-12 relative lg:overflow-auto",children:[(0,s.jsx)("div",{style:{transform:ee?window.innerWidth<=768?"translateY(0)":"translateX(0)":window.innerWidth<=768?"translateY(100%)":"translateX(100%)"},className:"product-panel overflow-auto ".concat(""," border-l lg:border-t-[0px] lg:border-r-[0px] border-t border-r border-accent fixed h-[75vh] w-full lg:w-[35rem] lg:h-full bg-background right-0 bottom-0 top-auto lg:bottom-auto lg:top-0 z-[9999] rounded-t-[1rem] lg:rounded-tr-[0rem] lg:rounded-l-[.1rem] shadow-xl shadow-slate-950 lg:p-8 p-4 transition-transform duration-300 ease-in-out "),children:ea?ea?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(x.z,{onClick:()=>{es(!1)},variant:"outline",className:"text-foreground flex items-center gap-1 group",children:[" ",(0,s.jsx)(en.Z,{className:"transition-transform ease-in duration-100 group-hover:translate-x-[-.2rem] w-4 h-4"})," Back"]}),(0,s.jsxs)("div",{className:"flex flex-row gap-3 mt-7",children:[(0,s.jsx)("div",{className:"min-w-[3rem] min-h-[3rem] max-h-[3rem] max-w-[3rem] bg-white rounded-[.1rem]",children:(0,s.jsx)("img",{src:q&&X,className:"w-full h-full object-cover rounded-[.1rem]"})}),(0,s.jsx)("div",{className:"flex flex-col",children:(0,s.jsx)("div",{className:"text-white font-bold lg:text-[1rem] text-[.85rem] font-chakra-semibold",children:q&&q.productName.slice(0,60)+(q.productName.length>60?"...":"")})})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full mt-5 overflow-auto",children:[(0,s.jsxs)("div",{onClick:()=>{"section-1"===er?ei(""):ei("section-1")},id:"section-1",style:{transition:"max-height 0.5s ease-in-out, padding 0.3s ease-in-out, background-color 0.3s ease-in-out",maxHeight:"section-1"===er?"1000px":"3.9rem",overflow:"hidden"},className:"bg-background border-b border-accent rounded-[.1rem] w-full p-4 hover:bg-primary-foreground cursor-pointer",children:[(0,s.jsxs)("div",{className:"w-full flex items-center jusitfy-between",children:[(0,s.jsxs)("h1",{className:"w-full flex items-center gap-2 text-white font-chakra-semibold text-[1rem] lg:text-lg",children:[" ",(0,s.jsx)(f.Tk0,{})," Who Would Buy This"]}),(0,s.jsx)(v.Z,{className:"text-xl text-slate-400 transition-transform ".concat("section-1"===er?"rotate-180":"")})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-4 mt-4 text-[.85rem] font-chakra-regular lg:translate-y-0 translate-y-1",children:[(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Age Range:"})," ",q&&q.report.demographics.age_range]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Gender:"})," ",q&&q.report.demographics.gender]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Income:"})," ",q&&q.report.demographics.income_level]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Lifestyle:"})," ",q&&q.report.demographics.lifestyle]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Location:"})," ",q&&q.report.demographics.location]})]})]}),(0,s.jsxs)("div",{onClick:()=>{"section-2"===er?ei(""):ei("section-2")},id:"section-2",style:{transition:"max-height 0.5s ease-in-out, padding 0.3s ease-in-out, background-color 0.3s ease-in-out",maxHeight:"section-2"===er?"1000px":"3.9rem",overflow:"hidden"},className:"bg-background border-b border-accent rounded-[.1rem] w-full p-4 hover:bg-primary-foreground cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsxs)("h1",{className:"w-full flex items-center gap-2 text-white font-chakra-semibold text-[1rem] lg:text-lg",children:[" ",(0,s.jsx)(ex.Z,{className:"w-4 h-4"})," Buying Motivation"]}),(0,s.jsx)(v.Z,{className:"text-xl text-slate-400 transition-transform ".concat("section-2"===er?"rotate-180":"")})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-4 mt-4 text-[.85rem] font-chakra-regular lg:translate-y-0 translate-y-1",children:[(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Buying motivation 1:"})," ",q&&q.report.buyingMotivations.motivation1]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Buying motivation 2:"})," ",q&&q.report.buyingMotivations.motivation2]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Buying motivation 3:"})," ",q&&q.report.buyingMotivations.motivation3]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Buying motivation 4:"})," ",q&&q.report.buyingMotivations.motivation4]})]})]}),(0,s.jsxs)("div",{onClick:()=>{"section-3"===er?ei(""):ei("section-3")},id:"section-3",style:{transition:"max-height 0.5s ease-in-out, padding 0.3s ease-in-out, background-color 0.3s ease-in-out",maxHeight:"section-3"===er?"1000px":"3.9rem",overflow:"hidden"},className:"bg-background border-b border-accent rounded-[.1rem] w-full p-4 hover:bg-primary-foreground cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsxs)("h1",{className:"flex items-center gap-2 text-white font-chakra-semibold text-[1rem] lg:text-lg",children:[" ",(0,s.jsx)(eb.Z,{className:"w-4 h-4"})," Customer Pain Points"]}),(0,s.jsx)(v.Z,{className:"text-xl text-slate-400 transition-transform ".concat("section-3"===er?"rotate-180":"")})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-4 mt-4 text-[.85rem] font-chakra-regular lg:translate-y-0 translate-y-1",children:[(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Pain point 1:"})," ",q&&q.report.painPoints.pain_point1]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Pain point 2:"})," ",q&&q.report.painPoints.pain_point2]}),(0,s.jsxs)("div",{className:"text-muted-foreground",children:["• ",(0,s.jsx)("span",{className:"text-blue-400 font-[600]",children:"Pain point 3:"})," ",q&&q.report.painPoints.pain_point3]})]})]}),(0,s.jsxs)("div",{onClick:()=>{"section-4"===er?ei(""):ei("section-4")},id:"section-4",style:{transition:"max-height 0.5s ease-in-out, padding 0.3s ease-in-out, background-color 0.3s ease-in-out",maxHeight:"section-4"===er?"1000px":"3.9rem",overflow:"hidden"},className:"bg-background border-b border-accent rounded-[.1rem] w-full p-4 hover:bg-primary-foreground cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsxs)("h1",{className:"flex items-center gap-2 text-white font-chakra-semibold text-[1rem] lg:text-lg",children:[" ",(0,s.jsx)(ew.Z,{className:"w-4 h-4"})," How To Advertise"]}),(0,s.jsx)(v.Z,{className:"text-xl text-slate-400 transition-transform ".concat("section-4"===er?"rotate-180":"")})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2 mt-3 text-muted-foreground font-chakra-regular text-[.85rem]",children:function(e){let t=e.split("\n").filter(e=>""!==e.trim());return t.map((e,a)=>{let r=e.split(/(\*\*.*?\*\*)/g);return(0,s.jsxs)("span",{className:"translate-y-2",children:[r.map((e,t)=>/^\*\*.*\*\*$/.test(e)?(0,s.jsx)("span",{className:"font-bold text-blue-400 mx-[1px]",children:e.slice(2,-2)},t):e),a!==t.length-1&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"mb-2"})})]},a)})}(q&&q.report.marketingAngles)})]})]})]}):(0,s.jsx)(s.Fragment,{}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)(f.ypG,{className:"text-slate-400 text-3xl  hover:text-white transition-all duration-100 ease-in cursor-pointer",onClick:()=>{et(!1),es(!1),W(null),Y(null),K(null),$("")}}),(0,s.jsx)("div",{className:"flex items-center gap-3",children:(0,s.jsx)(x.z,{onClick:async()=>{await saveProduct(q)},children:ed?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 mr-1 animate-spin"}),(0,s.jsx)("span",{className:"mr-1",children:"Saving"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eU.Z,{className:"w-4 h-4 mr-1"}),"Save"]})})})]}),(0,s.jsxs)("div",{className:"flex flex-col mt-7",children:[(0,s.jsxs)("div",{className:"flex flex-row gap-3 mb-5",children:[(0,s.jsx)("div",{className:"flex flex-col gap-2 max-h-[7rem] lg:max-h-[11rem] overflow-y-auto",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:q&&q.images.map((e,t)=>(0,s.jsx)("div",{className:"lg:min-h-[3rem] lg:w-[3rem] min-h-[2rem] w-[2rem] bg-white rounded-[.1rem] cursor-pointer border-[2px]  ".concat(e===X?"border-primary":"border-transparent hover:border-primary"),onClick:()=>{e!==X&&$(e)},children:(0,s.jsx)("img",{src:e,className:"w-full h-full object-cover rounded-[.1rem]",alt:"Product thumbnail"})},t))}),(0,s.jsx)("div",{className:"lg:h-[11rem] lg:w-[11rem] h-[7rem] w-[7rem] bg-white rounded-[.1rem]",children:(0,s.jsx)("img",{src:q&&X,className:"w-full h-full object-cover rounded-[.1rem]"})})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row w-full gap-3",children:[(0,s.jsx)("div",{className:"lg:w-1/2 w-full",children:(0,s.jsx)(ImportProductOnly,{toast:e.toast,selectedProduct:q})}),(0,s.jsxs)(x.z,{onClick:()=>{q&&q.aliexpressLink&&window.open(function(e){let t=e.match(/\/item\/(\d+)\.html/);return t&&t[1]?"https://www.aliexpress.us/item/".concat(t[1],".html"):e}(q.aliexpressLink),"_blank")},variant:"outline",className:"lg:w-1/2 w-full",children:[(0,s.jsx)(c(),{src:eS,alt:"aliexpress logo",className:"w-4 h-4 object-contain rounded-[.1rem] saturate-[150%] mr-1.5"}),"View On AliExpress"]})]}),(0,s.jsx)("div",{className:"lg:text-[1rem] text-[.85rem] text-slate-100 flex flex-row gap-2 font-chakra-semibold",children:q&&q.productName})]}),(0,s.jsxs)("div",{className:"flex flex-row w-full gap-3 lg:mt-4 mt-3",children:[(0,s.jsxs)(w.Zb,{className:"w-[33%] bg-primary-foreground border-accent p-1.5 lg:p-3 rounded-[.1rem]",children:[(0,s.jsx)("div",{className:"lg:text-[.8rem] text-[.7rem] text-red-400 font-chakra-regular",children:"Estimated Cost"}),(0,s.jsxs)("div",{className:"text-white text-[.8rem] lg:text-[1rem] font-chakra-medium",children:["$",q&&q.aliexpressPrice]})]}),(0,s.jsxs)(w.Zb,{className:"w-[33%] bg-primary-foreground border-accent p-1.5 lg:p-3 rounded-[.1rem]",children:[(0,s.jsx)("div",{className:"lg:text-[.8rem] text-[.7rem] text-blue-400 font-chakra-regular",children:"Sale Price"}),(0,s.jsxs)("div",{className:"text-white text-[.8rem] lg:text-[1rem] font-chakra-medium",children:["$",q&&q.amazonPrice]})]}),(0,s.jsxs)(w.Zb,{className:"w-[33%] bg-primary-foreground border-accent p-1.5 lg:p-3 rounded-[.1rem]",children:[(0,s.jsx)("div",{className:"lg:text-[.8rem] text-[.7rem] text-green-400 font-chakra-regular",children:"Profit"}),(0,s.jsxs)("div",{className:"text-white text-[.8rem] lg:text-[1rem] font-chakra-medium",children:["$",q&&q.profit?q.profit.toFixed(2):q&&!q.profit?(q.amazonPrice-q.aliexpressPrice).toFixed(2):"-"]})]})]}),(0,s.jsx)("div",{className:"text-slate-400 text-[.8rem] mt-2 flex items-center gap-1 font-chakra-regular",children:"The cost, sale price & profit are estimates and may not be entirely accurate."}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 w-full mt-3 lg:mt-6",children:[(0,s.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent p-1.5 lg:p-3 rounded-[.1rem] w-1/2",children:[(0,s.jsx)("div",{className:"text-white font-chakra-semibold lg:text-[1rem] text-[.8rem]",children:"\uD83E\uDD75 Saturation"}),(0,s.jsx)("div",{className:"w-full p-1 bg-background rounded-[.1rem] mt-1",children:(0,s.jsx)("div",{style:{width:"".concat(q&&q.saturation,"%")},className:"p-1 ".concat(q&&q.saturation<61?"bg-gradient-to-r from-emerald-600 to-emerald-500":q&&q.saturation>60&&q.saturation<66?"bg-gradient-to-r from-yellow-600 to-amber-500":"bg-gradient-to-r from-red-600 to-red-500"," rounded-[.1rem]")})})]}),(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent p-1.5 lg:p-3 rounded-[.1rem] w-1/2",children:[(0,s.jsx)("div",{className:"text-white font-chakra-semibold lg:text-[1rem] text-[.8rem]",children:"\uD83E\uDD2F Wow Factor"}),(0,s.jsx)("div",{className:"w-full p-1 bg-background rounded-[.1rem] mt-1",children:(0,s.jsx)("div",{style:{width:"".concat(q&&q.wowFactor,"%")},className:"".concat(q&&q.wowFactor<31?"bg-gradient-to-r from-red-600 to-red-500":q&&q.wowFactor>30&&q.wowFactor<41?"bg-gradient-to-r from-yellow-600 to-amber-500":"bg-gradient-to-r from-emerald-600 to-emerald-500"," p-1 rounded-[.1rem]")})})]})]}),(0,s.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent p-1.5 lg:p-3 rounded-[.1rem] w-1/2",children:[(0,s.jsx)("div",{className:"text-white font-chakra-semibold lg:text-[1rem] text-[.8rem]",children:"\uD83E\uDD11 Profit Margin"}),(0,s.jsx)("div",{className:"w-full p-1 bg-background rounded-[.1rem] mt-1",children:(0,s.jsx)("div",{style:{width:"".concat(q&&Q,"%")},className:"".concat(q&&"bg-gradient-to-r ".concat(J)," p-1 rounded-[.1rem]")})})]}),(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent p-1.5 lg:p-3 rounded-[.1rem] w-1/2",children:[(0,s.jsx)("div",{className:"text-white font-chakra-semibold lg:text-[1rem] text-[.8rem]",children:"\uD83C\uDFAF Product Market Fit"}),(0,s.jsx)("div",{className:"w-full p-1 bg-background rounded-[.1rem] mt-1",children:(0,s.jsx)("div",{style:{width:"".concat(q&&q.pmf,"%")},className:"".concat(q&&q.pmf<31?"bg-gradient-to-r from-red-600 to-red-500":q&&q.pmf>30&&q.pmf<41?"bg-gradient-to-r from-yellow-600 to-amber-500":"bg-gradient-to-r from-emerald-600 to-emerald-500"," p-1 rounded-[.1rem]")})})]})]})]}),(0,s.jsxs)(x.z,{onClick:()=>{es(!0),ei("section-1")},className:"text-foreground flex items-center gap-2 group mt-6 w-full",size:"xl",children:[(0,s.jsx)(ef.Z,{className:"w-5 h-5"})," Show Market Insights"]}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(ConnectAutoDs,{})})]})]})}),(0,s.jsx)(MatrixGrid,{}),(0,s.jsxs)("div",{className:"w-full lg:w-[64.4rem] flex flex-col lg:flex-row items-center lg:justify-between transition-all duration-100 ".concat(Z?"opacity-100 translate-y-0":"opacity-0 translate-y-10"," transition-all duration-1000"),children:[(0,s.jsxs)("h1",{className:"text-2xl lg:text-3xl font-chakra-bold text-white lg:flex items-center gap-4 hidden",children:[" ",(0,s.jsx)(eh.Z,{className:"lg:scale-110"})," Product Database"]}),(0,s.jsxs)("h1",{className:"text-2xl font-chakra-bold text-white flex items-center gap-2 lg:hidden",children:[" ",(0,s.jsx)(eh.Z,{className:"lg:scale-110"})," Product DB"]}),e.showBanner&&(0,s.jsx)("div",{className:"lg:hidden w-full lg:w-[64.4rem] lg:mt-0 mt-3 transition-all duration-1000",children:(0,s.jsx)(e_.Z,{})}),(0,s.jsxs)("div",{className:"flex flex-row items-center gap-3 w-full lg:w-auto lg:mt-0 mt-5 lg:bg-transparent bg-background lg:border-none border lg:p-0 p-3 border-accent lg:rounded-[.1rem] lg:shadow-none shadow-xl shadow-slate-950",children:[(0,s.jsxs)(x.z,{onClick:()=>{U.push("/dashboard?location=my-products")},variant:"outline",className:"w-1/2 lg:py-[18px] lg:text-[.85rem] text-[.8rem]",children:[(0,s.jsx)(eu.Z,{className:"w-4 h-4 mr-1.5"}),"Saved Products"]}),(0,s.jsxs)(x.z,{onClick:()=>{U.push("/dashboard?location=import-products")},className:"w-1/2 lg:text-[.85rem] text-[.8rem]",children:[(0,s.jsx)(em.Z,{className:"w-4 h-4 mr-1.5"}),"Import Product"]})]})]}),e.showBanner&&(0,s.jsx)("div",{className:"hidden lg:block w-full lg:w-[64.4rem] ".concat(Z?"opacity-100 translate-y-0":"opacity-0 translate-y-16"," transition-all duration-1000"),children:(0,s.jsx)(e_.Z,{})}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-[64.4rem] flex lg:flex-row flex-col lg:items-center gap-3 p-3 shadow-xl shadow-slate-950 border border-accent ".concat(Z?"opacity-100 translate-y-0":"opacity-0 translate-y-20"," transition-all duration-1000"),children:[(0,s.jsxs)("div",{className:"flex flex-row gap-3 h-full lg:w-auto w-full",children:[(0,s.jsxs)(eo.h_,{children:[(0,s.jsx)(eo.$F,{asChild:!0,children:(0,s.jsxs)(x.z,{className:"lg:w-[11rem] w-1/2",children:[(()=>{if(0===y.length)return"Filter By";let e=y[0],[t,a]=e.split(":");return(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"text-[.6rem] bg-blue-500 p-0.5 px-1 text-white mr-1",children:a.includes("High To Low")?"Desc":"Asc"}),(0,s.jsx)("span",{children:t.slice(0,8)}),(0,s.jsx)("span",{className:"text-[.5rem] translate-y-0.5",children:"..."})]})})()," ",(0,s.jsx)(v.Z,{className:"ml-1.5 w-4 h-4"})]})}),(0,s.jsx)(eo.AW,{className:"w-[15rem] dark border-accent rounded-[.1rem]",children:(0,s.jsx)("div",{className:"flex-grow overflow-y-auto max-h-[20rem]",children:eK.map((e,t)=>(0,s.jsxs)("label",{className:"flex items-center w-full text-white p-3 hover:bg-primary-foreground rounded-[.1rem] text-[.85rem] cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:y.includes(e.label),onChange:()=>handleFilterToggle(e.label),className:"mr-2"}),e.label]},t))})})]}),(0,s.jsxs)(eo.h_,{children:[(0,s.jsx)(eo.$F,{asChild:!0,children:(0,s.jsxs)(x.z,{className:"lg:w-[11rem] w-1/2",children:[S?S.slice(0,14)+(S.length>10?"...":""):"Niches"," ",(0,s.jsx)(v.Z,{className:"ml-1.5 w-4 h-4"})]})}),(0,s.jsx)(eo.AW,{className:"w-[15rem] dark border-accent rounded-[.1rem] flex flex-col shadow-lg shadow-slate-950",children:(0,s.jsx)("div",{className:"flex-grow overflow-y-auto max-h-[20rem]",children:["Food","Home Appliances","Computer & Office","Home Improvement","Home & Garden","Sports & Entertainment","Education & Office Supplies","Toys & Hobbies","Security & Protection","Automobiles & Motorcycles","Lights & Lighting","Consumer Electronics","Beauty & Health","Shoes","Electronic Components & Supplies","Cellphones & Telecommunications","Tools","Mother & Kids","Furniture","Jewelry & Accessories","Watches","Luggage & Bags","Hair Extensions & Wigs","Virtual Goods","Novelty & Special Use","Weddings & Events","Women's Clothing","Men's Clothing","Apparel Accessories","Underwear & Sleepwear","Other","Pet Products","Gift"].map((e,t)=>(0,s.jsxs)("label",{className:"flex items-center w-full text-white p-3 hover:bg-primary-foreground rounded-[.1rem] text-[.85rem] cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:S===e,onChange:()=>handleNicheToggle(e),className:"mr-2"}),e]},t))})})]})]}),(0,s.jsxs)("div",{className:"relative w-full",children:[(0,s.jsx)(f._Ve,{className:"w-4 h-4 absolute left-3 top-1/2 transform -translate-y-1/2 text-white text-xl"}),(0,s.jsx)(N.I,{type:"text",onKeyDown:e=>{"Enter"===e.key&&handleSearch()},onInput:e=>{E(e.target.value)},value:I,className:"pl-8 py-[17.5px]",placeholder:"Search for a product"}),I&&(0,s.jsx)(x.z,{variant:"ghost",size:"icon",onClick:()=>{E(""),B(!0)},className:"absolute right-9 top-1/2 transform -translate-y-1/2",children:(0,s.jsx)(tw.bjh,{className:"w-5 h-5"})}),(0,s.jsx)(x.z,{onClick:handleSearch,variant:"ghost",size:"icon",className:"".concat(I?"border-accent":"border-transparent"," border-l  absolute right-0 top-1/2 transform -translate-y-1/2"),children:(0,s.jsx)(ty.dhL,{})})]})]}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-[64.4rem] lg:min-h-[53.5rem] border-accent flex flex-col items-center justify-between lg:overflow-hidden shadow-xl shadow-slate-950 ".concat(Z?"opacity-100 translate-y-0":"opacity-0 translate-y-[100px]"," transition-all duration-1000"),children:[_?(0,s.jsxs)("div",{className:"h-full flex flex-col gap-5 items-center lg:justify-center",children:[(0,s.jsx)("div",{className:"lg:hidden mt-12",children:(0,s.jsx)(eH.Z,{options:l,width:350})}),(0,s.jsx)("div",{className:"hidden lg:block",children:(0,s.jsx)(eH.Z,{options:l,width:500})})]}):(0,s.jsx)("div",{className:"lg:w-auto w-full rounded-[.1rem] flex flex-row flex-wrap gap-5 p-5",children:V.map((e,t)=>renderProductCard(e,t))}),(0,s.jsx)("div",{className:"bg-primary-foreground w-full hidden min-h-[5rem] lg:flex items-center justify-center  px-8",children:(0,s.jsxs)("div",{className:"flex items-center space-x-1.5 text-[.85rem]",children:[(0,s.jsx)(x.z,{size:"icon",onClick:()=>handleClick(u-1),disabled:1===u,children:(0,s.jsx)(tj.Z,{className:"mx-auto w-5 h-5"})}),renderPageNumbers(),(0,s.jsx)(x.z,{size:"icon",onClick:()=>handleClick(u+1),disabled:u===h,children:(0,s.jsx)(f.XCv,{className:"mx-auto w-5 h-5"})})]})})]}),(0,s.jsx)("div",{className:"bg-primary-foreground border border-accent w-full z-10 lg:hidden min-h-[4rem] shadow-xl shadow-slate-950 flex items-center justify-center rounded-[.1rem]  px-8 shadow-xl shadow-slate-950",children:(0,s.jsxs)("div",{className:"flex items-center space-x-1.5 text-[.85rem]",children:[(0,s.jsx)(x.z,{size:"icon",onClick:()=>handleClick(u-1),disabled:1===u,children:(0,s.jsx)(tj.Z,{className:"mx-auto w-5 h-5"})}),renderPageNumbers(),(0,s.jsx)(x.z,{size:"icon",onClick:()=>handleClick(u+1),disabled:u===h,children:(0,s.jsx)(f.XCv,{className:"mx-auto w-5 h-5"})})]})}),(0,s.jsx)("div",{className:"lg:hidden pb-5 opacity-0 h-0 overflow-hidden",children:"This div is to put a padding bottom on the page, is not visible and only appears on mobile."})]})}var tk=a(21285),tN=a(46021);function ImportProducts(e){let{currentUser:t,contextChargeDeclined:a}=(0,d.a)(),r=(0,o.useRouter)(),[n,l]=(0,i.useState)(!1),[u,m]=(0,i.useState)(!1),[h,p]=(0,i.useState)(!0),[g,f]=(0,i.useState)(!1),[b,y]=(0,i.useState)(""),[v,j]=(0,i.useState)("");async function importAmazon(n){if(m(!0),a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){e.setTrialPopup(!0);return}if(!/^https?:\/\/(www\.)?amazon\.([a-zA-Z\.]{2,6})\/(?:[\w-]+\/)*dp\/[A-Z0-9]{10}(\/|\?|$)/.test(n)){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Invalid Amazon URL"]}),description:"Please enter a valid Amazon product URL.",variant:"destructive"}),m(!1);return}e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"animate-spin w-4 h-4"})," Importing Product"]}),description:"Please wait, this may take up to 30 seconds",variant:"default"});let i=new Headers;i.append("Content-Type","application/json"),i.append("Authorization","Bearer ".concat(t.accessToken));let o=await fetch("/api/my-products/importAmazon?uid=".concat(t.uid),{method:"POST",headers:i,body:JSON.stringify({url:n})});if(!o.ok){m(!1),y(""),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Import failed"]}),description:"Please try again later.",variant:"destructive"});return}let l=await o.json(),c={productName:l.productName.replace(/[^\w\s]/gi,"").trim(),aliexpressPrice:l.costOfGoods,amazonPrice:l.price,profit:l.price-l.costOfGoods,aliexpressLink:null,amazonLink:n,productDescription:l.productDescription,images:l.images,report:l.report,wowFactor:l.wowFactor,pmf:l.pmf,saturation:l.saturation},d=await saveImportedProduct(c);m(!1),y(""),c.id=d,e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)("img",{src:l.images[0],className:"w-6 h-6 text-green-500 rounded-[.1rem]"})," Product Imported"]}),description:'Click "View" to view it in saved products',variant:"default",action:(0,s.jsx)(x.z,{size:"sm",variant:"outline",className:"-translate-x-1",onClick:()=>{r.push("/dashboard?location=my-products")},children:"View"})})}async function importAliexpressProduct(n){if(m(!0),a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){e.setTrialPopup(!0);return}if(!/^https?:\/\/(?:[\w-]+\.)?aliexpress\.[a-z]{2,3}\/item\/\d+\.html(?:\?.*)?$/.test(n)){m(!1),j(""),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Invalid AliExpress URL"]}),description:"Please enter a valid product page URL.",variant:"destructive"});return}e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"animate-spin w-4 h-4"})," Importing Product"]}),description:"Please wait, this may take up to 30 seconds",variant:"default"});let i=await fetch("/api/my-products/importAliexpress?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t.accessToken},body:JSON.stringify({url:n})});if(!i.ok){m(!1),j(""),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Import failed"]}),description:"Please try again later.",variant:"destructive"});return}let o=await i.json(),l={productName:o.productName.replace(/[^\w\s]/gi,"").trim(),aliexpressPrice:o.costOfGoods,amazonPrice:o.price,profit:o.price-o.costOfGoods,aliexpressLink:n,productDescription:o.productDescription,images:o.images,report:o.report,wowFactor:o.wowFactor,pmf:o.pmf,saturation:o.saturation},c=await saveImportedProduct(l);return m(!1),j(""),l.id=c,e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)("img",{src:o.images[0],className:"w-6 h-6"})," Product Imported"]}),description:'Click "View" to view it in saved products',variant:"default",action:(0,s.jsx)(x.z,{size:"sm",variant:"outline",className:"-translate-x-1",onClick:()=>{r.push("/dashboard?location=my-products")},children:"View"})}),o}async function saveImportedProduct(e){let a=await fetch("/api/my-products/saveImportedProduct?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t.accessToken},body:JSON.stringify({product:e})}),s=await a.json();return s.id}return(0,i.useEffect)(()=>{setTimeout(()=>{l(!0)},10)},[]),(0,s.jsxs)("div",{className:"dark animated-element w-full h-screen flex flex-col items-center lg:justify-center gap-5 relative lg:p-0 p-5 lg:overflow-hidden",children:[(0,s.jsx)(MatrixGrid,{}),e.showBanner&&(0,s.jsx)("div",{className:"w-full lg:w-[50rem] ".concat(n?"opacity-100 translate-y-0":"opacity-0 translate-y-10"," transition-all duration-1000"),children:(0,s.jsx)(e_.Z,{})}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-[50rem] p-3 border-accent shadow-xl shadow-slate-950 ".concat(n?"opacity-100 translate-y-0":"opacity-0  ".concat(e.showBanner?"translate-y-16":"translate-y-10")," transition-all duration-1000"),children:[(0,s.jsxs)(x.z,{onClick:()=>{p(!0),f(!1)},variant:h?"default":"ghost",className:" w-1/2 lg:text-[.9rem] text-xs",children:[(0,s.jsx)(c(),{src:eS,alt:"aliexpress dropshipping",className:"w-[25px] mr-2 scale-[80%] hidden lg:block "}),"Import From AliExpress"]}),(0,s.jsxs)(x.z,{onClick:()=>{p(!1),f(!0)},variant:g?"default":"ghost",className:" w-1/2 lg:text-[.9rem] text-xs",children:[(0,s.jsx)(c(),{src:eT,alt:"amazon product shopify store",className:"w-[25px] mr-2 scale-[80%] hidden lg:block"}),"Import From Amazon"]})]}),(0,s.jsxs)(w.Zb,{className:"w-full lg:w-[50rem] shadow-xl shadow-slate-950 border-accent p-5 lg:p-8 rounded-[.1rem] flex flex-col gap-3 ".concat(n?"opacity-100 translate-y-0":"opacity-0 translate-y-20"," transition-all duration-1000 delay-[300ms]"),children:[h&&(0,s.jsx)(c(),{src:eS,alt:"aliexpress dropshipping",className:"lg:w-[50px] w-[40px] brightness-110 shadow-lg shadow-slate-950 shadow-md"}),g&&(0,s.jsx)(c(),{src:eT,alt:"aliexpress dropshipping",className:"lg:w-[50px] w-[40px] brightness-110 scale-[130%]"}),(0,s.jsx)("h1",{className:"text-xl lg:text-2xl font-chakra-bold text-foreground mt-4 z-10",children:h?"Import From AliExpress":"Import From Amazon"}),(0,s.jsxs)("div",{className:"relative w-full",children:[(0,s.jsx)(N.I,{placeholder:"Paste product page URL here",type:"text",className:"pr-12",value:h?v:b,onChange:e=>{h?j(e.target.value):y(e.target.value)},onKeyDown:e=>{u||"Enter"!==e.key||(h?importAliexpressProduct(v):importAmazon(b))}}),(0,s.jsx)(x.z,{disabled:u,onClick:()=>h?importAliexpressProduct(v):importAmazon(b),variant:"ghost",className:"absolute top-1/2 -translate-y-1/2 right-0",children:u?(0,s.jsx)(e0.Z,{}):(0,s.jsx)(ty.dhL,{})})]}),(0,s.jsx)(w.Zb,{className:"mt-2  p-3 bg-primary-foreground border-accent",children:(0,s.jsxs)("div",{className:"flex flex-col justify-start w-full gap-0.5",children:[(0,s.jsx)("h1",{className:"font-chakra-semibold text-white text-lg",children:"Step 1"}),(0,s.jsx)("div",{className:"text-muted-foreground font-chakra-regular lg:flex hidden text-md",children:"Go to your product's page"}),h?(0,s.jsxs)("div",{className:"text-muted-foreground font-chakra-regular flex lg:hidden text-sm",children:["Go to your product's ",(0,s.jsx)("span",{children:(0,s.jsx)(c(),{src:tN.Z,alt:"aliexpress product shopify store",className:"w-[60px] mx-2 translate-y-[5px]"})})," page"]}):(0,s.jsxs)("div",{className:"text-muted-foreground font-chakra-regular flex lg:hidden text-sm",children:["Go to your product's ",(0,s.jsx)("span",{children:(0,s.jsx)(c(),{src:tk.Z,alt:"amazon prodcut shopify store",className:"w-[50px] mx-2 translate-y-[6px]"})})," page"]}),(0,s.jsxs)("p",{className:"text-[.75rem] text-muted-foreground/75 pb-2",children:["Example:",h?(0,s.jsxs)("a",{className:"ml-1 underline lg:hover:text-blue-500 transition-all ease-out 300",href:"https://www.aliexpress.us/item/3256806201471335.html?spm=a2g0o.productlist.main.3.41e6bf0b1G4Rj8&algo_pvid=53c20645-56a3-4232-87a0-b196faf4861b&algo_exp_id=53c20645-56a3-4232-87a0-b196faf4861b-1&pdp_npi=4%40dis%21EUR%2113.93%219.75%21%21%21106.63%21%21%40210318bb17043098836641164e9250%2112000036988262225%21sea%21US%210%21AB&curPageLogUid=Ac7nv6Q9R81f",target:"_blank",rel:"noreferrer",children:["https://www.aliexpress.us/item/3256806201471335.html?spm=a2g0o.productlist.main.3.41e6bf0b1G4Rj8&algo_pvid=53c20645-56a3-4232-87a0-b196faf4861b&algo_exp_id=53c20645-56a3-4232-87a0-b196faf4861b-1&pdp_npi=4%40dis%21EUR%2113.93%219.75%21%21%21106.63%21%21%40210318bb17043098836641164e9250%2112000036988262225%21sea%21US%210%21AB&curPageLogUid=Ac7nv6Q9R81f".slice(0,30),"..."]}):(0,s.jsxs)("a",{className:"ml-1 underline lg:hover:text-blue-500 transition-all ease-out 300",href:"https://www.amazon.com/Slushy-Squeeze-Portable-Smoothie-Friends/dp/B0CBK1RKF9/ref=sr_1_3?keywords=slushie%2Bmaker&qid=1699902519&sr=8-3&th=1",target:"_blank",rel:"noreferrer",children:["https://www.amazon.com/Slushy-Squeeze-Portable-Smoothie-Friends/dp/B0CBK1RKF9/ref=sr_1_3?keywords=slushie%2Bmaker&qid=1699902519&sr=8-3&th=1".slice(0,30),"..."]})]}),(0,s.jsx)("h1",{className:"font-chakra-semibold text-white mt-2 text-lg",children:"Step 2"}),(0,s.jsx)("div",{className:"text-muted-foreground font-chakra-regular pb-3 text-sm lg:text-md",children:"Copy the URL"}),(0,s.jsx)("h1",{className:"font-chakra-semibold text-white mt-2 text-lg",children:"Step 3"}),(0,s.jsx)("div",{className:"text-muted-foreground font-chakra-regular text-sm lg:text-md",children:"Paste the URL below, and click the arrow"})]})})]})]})}var tA=a(10381),tS=a(80433),tT=a(75976),tC=a(76277),tP=a(27114),tD=a(9560);function ReportBug(e){var t,a;let{currentUser:r,contextChargeDeclined:n,getBugSubmissions:o}=(0,d.a)(),[l,c]=(0,i.useState)(!1);(0,i.useEffect)(()=>{setTimeout(()=>{c(!0)},100)},[]);let[u,m]=(0,i.useState)("date"),sortBugs=e=>"date"===u?[...e].sort((e,t)=>t.createdAt-e.createdAt):[...e].sort((e,t)=>t.upvotes-e.upvotes),[h,p]=(0,i.useState)(""),[g,b]=(0,i.useState)("");(0,i.useEffect)(()=>{r&&(p(r.uid.slice(0,6)),b("G7x1yv"))},[r]);let[w,y]=(0,i.useState)(!0),[v,k]=(0,i.useState)(!1),[D,z]=(0,i.useState)("completed"),[I,E]=(0,i.useState)(null),[F,B]=(0,i.useState)(""),[_,O]=(0,i.useState)(""),[Z,M]=(0,i.useState)(""),[U,R]=(0,i.useState)([]),[G,L]=(0,i.useState)(""),[V,H]=(0,i.useState)(""),[q,W]=(0,i.useState)(!1),[Q,Y]=(0,i.useState)(""),[J,K]=(0,i.useState)(""),[X,$]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(!1),[ea,er]=(0,i.useState)(!1),[ei,eo]=(0,i.useState)({}),[el,ec]=(0,i.useState)(!1);(0,i.useEffect)(()=>{r&&o().then(e=>{if(!e)return;let t=e.filter(e=>"new-submission"===e.status),a=e.filter(e=>"in-progress"===e.status),s=e.filter(e=>"completed"===e.status);eg(t),eu(a),eh(s)})},[r]),(0,i.useEffect)(()=>{if(r){if(n){e.setPayDifferentCard(!0);return}"no"===e.subscribed&&e.setTrialPopup(!0)}},[n,e.subscribed,r]),(0,i.useEffect)(()=>{let e;return ea&&(e=setTimeout(()=>{er(!1)},1e4)),()=>clearTimeout(e)},[ea]);let[ed,eu]=(0,i.useState)([]),[em,eh]=(0,i.useState)([]),[ep,eg]=(0,i.useState)([]),handleMediaUpload=e=>{let t=Array.from(e.target.files),a=t.filter(e=>["image/png","image/jpeg","image/jpg"].includes(e.type));R([...U,...a])},handleSubmitBugReport=async t=>{let a;if(X)return;t.preventDefault(),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Submitting Bug Report"]}),description:"Please wait while we submit your bug report.",variant:"default"}),$(!0);try{a=await Promise.all(U.map(e=>uploadImageToFirebase(e)))}catch(t){B(""),O(""),M(""),R([]),L(""),H(""),$(!1),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error Submitting Bug Report"]}),description:"Error submitting your bug report. Refresh and try again.",variant:"destructive"});return}let n={title:F,location:_,description:Z,mediaUrls:a,device:G,browser:V},i=await fetch("/api/bug-report/filter-bug?uid=".concat(r.uid),{method:"POST",headers:{Authorization:"Bearer ".concat(r.accessToken),"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok){B(""),O(""),M(""),R([]),L(""),H(""),$(!1),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error Submitting Bug Report"]}),description:"Error submitting your bug report. Refresh and try again.",variant:"destructive"});return}let o=await i.json();if(o.success){let t={...n,id:o.id,createdAt:new Date,upvotes:0,upvotedBy:[],comments:[],status:"new-submission"};eg(e=>[t,...e]),B(""),O(""),M(""),R([]),L(""),H(""),$(!1),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Bug Report Submitted"]}),description:"Click here to view your submission",variant:"default",action:(0,s.jsx)(x.z,{onClick:()=>{y(!1),k(!0),z("new"),er(!1)},size:"sm",variant:"outline",className:"-translate-x-1",children:"View"})});return}B(""),O(""),M(""),R([]),L(""),H(""),$(!1),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error Submitting Bug Report"]}),description:o.message,variant:"destructive"})},uploadImageToFirebase=async e=>{try{let t=Math.random().toString(36).substring(2,15),a=(0,eO.iH)(eZ.t,"/bug_report_images/".concat(t,".png")),s={customMetadata:{ownerId:r.uid}},n=await (0,eO.KV)(a,e,s),i=await (0,eO.Jt)(n.ref);return i}catch(e){throw Error("Error")}},handleUpvoteBugReport=async e=>{try{let t=r.uid.slice(0,6),updateSubmissionList=a=>a.map(a=>{if(a.id===e){let e=a.upvotes+1,s=[...a.upvotedBy||[],t];return{...a,upvotes:e,upvotedBy:s}}return a});eg(updateSubmissionList),eh(updateSubmissionList),eu(updateSubmissionList),q&&q.id===e&&W(e=>({...e,upvotes:e.upvotes+1,upvotedBy:[...e.upvotedBy||[],t]})),await fetch("/api/bug-report/upvote?uid=".concat(r.uid),{method:"POST",headers:{Authorization:"Bearer ".concat(r.accessToken),"Content-Type":"application/json"},body:JSON.stringify({docId:e})})}catch(e){return}},handleAddComment=async(t,a)=>{K(!0);let n=await fetch("/api/bug-report/add-comment?uid=".concat(r.uid),{method:"POST",headers:{Authorization:"Bearer ".concat(r.accessToken),"Content-Type":"application/json"},body:JSON.stringify({docId:t,comment:a})});if(!n.ok){K(!1),Y(""),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error Sending Comment"]}),description:"Error sending your comment. Refresh and try again",variant:"destructive"});return}let i=await n.json();if(!i.success){K(!1),Y(""),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error Sending Comment"]}),description:"Your comment was flagged as inappropriate.",variant:"destructive"});return}let o={id:i.commentId,text:a,author:r.uid.slice(0,6),date:new Date};eg(e=>e.map(e=>e.id===t?{...e,comments:[...e.comments||[],o]}:e)),q&&q.id===t&&W(e=>({...e,comments:[...e.comments||[],o]})),K(!1),Y("")},handleMarkAsComplete=async t=>{try{eo(e=>({...e,[t]:{...e[t],complete:!0}}));let e=await fetch("/api/bug-report/mark-complete?uid=".concat(r.uid),{method:"POST",headers:{Authorization:"Bearer ".concat(r.accessToken),"Content-Type":"application/json"},body:JSON.stringify({docId:t})});if(!e.ok)throw Error("Error");let a=ep.find(e=>e.id===t)||ed.find(e=>e.id===t);a&&(eg(e=>e.filter(e=>e.id!==t)),eu(e=>e.filter(e=>e.id!==t)),eh(e=>[...e,{...a,status:"completed"}]))}catch(t){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error Marking Bug Report as Complete"]}),description:"Error marking bug report as complete. Please try again.",variant:"destructive"})}finally{eo(e=>({...e,[t]:{...e[t],complete:!1}}));return}},handleMarkAsInProgress=async t=>{try{eo(e=>({...e,[t]:{...e[t],inProgress:!0}}));let e=await fetch("/api/bug-report/mark-in-progress?uid=".concat(r.uid),{method:"POST",headers:{Authorization:"Bearer ".concat(r.accessToken),"Content-Type":"application/json"},body:JSON.stringify({docId:t})});if(!e.ok)throw Error("Error");let a=ep.find(e=>e.id===t)||em.find(e=>e.id===t);a&&(eg(e=>e.filter(e=>e.id!==t)),eh(e=>e.filter(e=>e.id!==t)),eu(e=>[...e,{...a,status:"in-progress"}]))}catch(t){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error Marking Bug Report as In Progress"]}),description:"Error marking bug report as in progress. Please try again.",variant:"destructive"})}finally{eo(e=>({...e,[t]:{...e[t],inProgress:!1}}));return}},handleDeletePost=async t=>{try{eo(e=>({...e,[t]:{...e[t],delete:!0}}));let e=await fetch("/api/bug-report/delete?uid=".concat(r.uid),{method:"POST",headers:{Authorization:"Bearer ".concat(r.accessToken),"Content-Type":"application/json"},body:JSON.stringify({docId:t})});if(!e.ok)throw Error("Error");eg(e=>e.filter(e=>e.id!==t)),eu(e=>e.filter(e=>e.id!==t)),eh(e=>e.filter(e=>e.id!==t)),q&&q.id===t&&W(null)}catch(t){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error Deleting Bug Report"]}),description:"Error deleting bug report. Please try again.",variant:"destructive"})}finally{eo(e=>({...e,[t]:{...e[t],delete:!1}}));return}},handleDeleteComment=async(t,a,n)=>{try{ec(n);let e=await fetch("/api/bug-report/delete-comment?uid=".concat(r.uid),{method:"POST",headers:{Authorization:"Bearer ".concat(r.accessToken),"Content-Type":"application/json"},body:JSON.stringify({docId:t,commentId:a})});if(!e.ok)throw Error("Error");let updateBugReport=e=>e.id===t?{...e,comments:e.comments.filter(e=>e.id!==a)}:e;eg(e=>e.map(updateBugReport)),eu(e=>e.map(updateBugReport)),eh(e=>e.map(updateBugReport)),q&&q.id===t&&W(e=>({...e,comments:e.comments.filter(e=>e.id!==a)})),ec(!1)}catch(t){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error Deleting Comment"]}),description:"Error deleting comment. Please try again.",variant:"destructive"})}finally{ec(!1);return}};return(0,s.jsxs)("div",{className:"animated-element w-full h-screen flex flex-col items-center gap-5 relative p-5 lg:overflow-auto lg:pt-10",children:[(0,s.jsx)(MatrixGrid,{}),(0,s.jsxs)("div",{className:"w-full lg:w-[50rem] bg-background border border-accent shadow-xl shadow-slate-950 p-3 lg:text-[1rem] text-[.85rem] rounded-[.1rem] flex flex-row shadow-md shadow-slate-950 transition-all duration-1000 ".concat(l?"opacity-100 translate-y-0":"opacity-0 translate-y-10"),children:[(0,s.jsx)(x.z,{onClick:()=>{y(!0),k(!1)},variant:w?"default":"ghost",className:"w-1/2",size:"lg",children:"Report Bug"}),(0,s.jsx)(x.z,{onClick:()=>{y(!1),k(!0)},variant:v?"default":"ghost",className:"w-1/2",size:"lg",children:"Bug Submissions"})]}),(0,s.jsxs)("div",{className:"w-full lg:w-[50rem] flex flex-col gap-5 dark",children:[w&&(0,s.jsxs)("div",{className:"w-full bg-background border border-accent rounded-[.1rem] p-5 lg:p-10 shadow-md shadow-slate-950 transition-all duration-1000 ".concat(l?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),children:[(0,s.jsxs)("h1",{className:"text-white text-xl lg:text-2xl font-chakra-semibold flex items-center gap-2",children:[" ",(0,s.jsx)(tA.Z,{})," Report a bug"]}),(0,s.jsxs)("form",{onSubmit:handleSubmitBugReport,className:"flex flex-col gap-2 lg:mt-8 mt-6",children:[(0,s.jsx)(A._,{className:"lg:text-lg",children:"Post title"}),(0,s.jsx)(N.I,{type:"text",placeholder:"Enter a brief title for your bug report...",value:F,onChange:e=>B(e.target.value)}),(0,s.jsx)(A._,{className:"mt-6 lg:text-lg text-muted-foreground",children:"Where did the bug occur?"}),(0,s.jsxs)(S.Ph,{className:"text-foreground",value:_,onValueChange:e=>O(e),children:[(0,s.jsx)(S.i4,{className:"w-full text-foreground",children:(0,s.jsx)(S.ki,{placeholder:"Select location"})}),(0,s.jsxs)(S.Bw,{className:"text-foreground",children:[(0,s.jsx)(S.Ql,{value:"Homepage",children:"Homepage"}),(0,s.jsx)(S.Ql,{value:"Dashboard",children:"Dashboard"}),(0,s.jsx)(S.Ql,{value:"AI Product Database",children:"AI Product Database"}),(0,s.jsx)(S.Ql,{value:"Import Products",children:"Import Products"}),(0,s.jsx)(S.Ql,{value:"Saved Products",children:"Saved Products"}),(0,s.jsx)(S.Ql,{value:"Glitch Mode",children:"Glitch Mode"}),(0,s.jsx)(S.Ql,{value:"Store Builder",children:"Store Builder"}),(0,s.jsx)(S.Ql,{value:"Ads",children:"Ads"}),(0,s.jsx)(S.Ql,{value:"Dropshipping Course",children:"Dropshipping Course"}),(0,s.jsx)(S.Ql,{value:"Connect To Shopify",children:"Connect To Shopify"}),(0,s.jsx)(S.Ql,{value:"Connect To AutoDS",children:"Connect To AutoDS"})]})]}),(0,s.jsxs)("div",{className:"flex gap-4 mt-6",children:[(0,s.jsxs)("div",{className:"w-1/2 flex flex-col gap-2",children:[(0,s.jsx)(A._,{className:"lg:text-lg",children:"Device"}),(0,s.jsxs)(S.Ph,{value:G,onValueChange:e=>L(e),children:[(0,s.jsx)(S.i4,{className:"w-full text-foreground",children:(0,s.jsx)(S.ki,{placeholder:"Select device"})}),(0,s.jsxs)(S.Bw,{children:[(0,s.jsx)(S.Ql,{value:"desktop",children:"Desktop"}),(0,s.jsx)(S.Ql,{value:"mobile",children:"Mobile"})]})]})]}),(0,s.jsxs)("div",{className:"w-1/2 flex flex-col gap-2",children:[(0,s.jsx)(A._,{className:"lg:text-lg",children:"Browser"}),(0,s.jsxs)(S.Ph,{value:V,onValueChange:e=>H(e),children:[(0,s.jsx)(S.i4,{className:"w-full text-foreground",children:(0,s.jsx)(S.ki,{placeholder:"Select browser"})}),(0,s.jsxs)(S.Bw,{children:[(0,s.jsx)(S.Ql,{value:"chrome",children:"Chrome"}),(0,s.jsx)(S.Ql,{value:"firefox",children:"Firefox"}),(0,s.jsx)(S.Ql,{value:"safari",children:"Safari"}),(0,s.jsx)(S.Ql,{value:"edge",children:"Edge"}),(0,s.jsx)(S.Ql,{value:"opera",children:"Opera"}),(0,s.jsx)(S.Ql,{value:"other",children:"Other"})]})]})]})]}),(0,s.jsx)(A._,{className:"mt-6 lg:text-lg text-muted-foreground",children:"Describe what went wrong:"}),(0,s.jsx)(T.g,{className:"h-[15rem] text-foreground",placeholder:"Enter your bug report here...",value:Z,onChange:e=>M(e.target.value)}),(0,s.jsx)(A._,{className:"mt-4 lg:text-lg text-muted-foreground",children:"Add media (screenshots - PNG, JPG only):"}),(0,s.jsx)("div",{className:"flex lg:flex-row flex-col gap-2 mb-4",children:[1,2,3].map(e=>(0,s.jsxs)("div",{className:"w-full lg:w-1/3 h-[12rem] aspect-video bg-primary-foreground border border-accent rounded-[.1rem] flex items-center justify-center cursor-pointer hover:border-blue-700 relative overflow-hidden transition-all ease-in duration-100",children:[(0,s.jsx)("input",{type:"file",accept:".png,.jpg,.jpeg",className:"hidden",onChange:handleMediaUpload,id:"media-upload-".concat(e)}),(0,s.jsx)("label",{htmlFor:"media-upload-".concat(e),className:"w-full h-full flex items-center justify-center cursor-copy",children:U[e-1]?(0,s.jsx)("img",{src:URL.createObjectURL(U[e-1]),alt:"Uploaded screenshot ".concat(e),className:"w-full h-full object-cover"}):(0,s.jsx)("div",{className:"relative",children:(0,s.jsx)("span",{className:"text-slate-500 text-4xl absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",children:(0,s.jsx)(tS.Z,{className:"w-10 h-10"})})})})]},e))}),(0,s.jsx)("div",{className:"flex w-full mt-6 gap-4",children:(0,s.jsx)(x.z,{type:"submit",size:"xl",className:"w-full text-[1rem]",children:"Submit"})})]})]}),v&&(0,s.jsxs)("div",{className:"w-full min-h-[45rem] bg-background border border-accent shadow-xl rounded-[.1rem] shadow-slate-950 p-5 lg:p-10 transition-all duration-1000 ".concat(l?"opacity-100 translate-y-0":"opacity-0 translate-y-20"),children:[(0,s.jsxs)("div",{className:"flex lg:flex-row flex-col lg:items-center lg:justify-between",children:[(0,s.jsxs)("h2",{className:"text-white text-xl lg:text-2xl font-chakra-semibold lg:mb-6 flex items-center gap-2",children:[" ",(0,s.jsx)(tT.Z,{className:"w-6 h-6"})," Bug Submissions"]}),!q&&(0,s.jsx)("div",{className:"relative my-3 lg:my-0",children:(0,s.jsxs)(S.Ph,{onValueChange:e=>m(e),value:u,children:[(0,s.jsx)(S.i4,{className:"text-foreground mr-2 cursor-pointer",children:(0,s.jsx)(S.ki,{placeholder:"Sort by"})}),(0,s.jsxs)(S.Bw,{children:[(0,s.jsx)(S.Ql,{value:"date",className:"cursor-pointer",children:"Sort by Date"}),(0,s.jsx)(S.Ql,{value:"upvotes",className:"cursor-pointer",children:"Sort by Upvotes"})]})]})})]}),q?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex gap-3 mb-5 mt-3 lg:mt-0 font-bold",children:(0,s.jsxs)(x.z,{onClick:()=>W(!1),variant:"outline",className:"group",children:[(0,s.jsx)(en.Z,{className:"w-4 h-4 group-hover:-translate-x-1 transition-all duration-100 ease-in mr-1"})," Back"]})}),(0,s.jsxs)("div",{className:"w-full flex flex-col gap-1 rounded-[.1rem]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("button",{onClick:()=>{var e;(null===(e=q.upvotedBy)||void 0===e?void 0:e.includes(h))||handleUpvoteBugReport(q.id)},className:"".concat((null===(t=q.upvotedBy)||void 0===t?void 0:t.includes(h))?"text-blue-400 cursor-not-allowed":"text-slate-400 hover:text-blue-400 cursor-pointer"," flex items-center gap-1"),disabled:null===(a=q.upvotedBy)||void 0===a?void 0:a.includes(h),children:[(0,s.jsx)(tC.Z,{className:"w-6 h-6"}),(0,s.jsx)("span",{className:"text-muted-foreground font-chakra-regular",children:q.upvotes})]}),"completed"===D?(0,s.jsxs)("div",{className:"p-0.5 text-[.8rem] px-2 bg-green-600 text-white font-bold flex items-center gap-1 rounded-[.1rem] font-chakra-regular",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4"})," This issue has been resolved"]}):"inProgress"===D?(0,s.jsxs)("div",{className:"p-0.5 text-[.8rem] px-2 bg-amber-600 text-white font-bold flex items-center gap-1 rounded-[.1rem] font-chakra-regular",children:[(0,s.jsx)(tP.Z,{className:"w-4 h-4"})," We are resolving this issue"]}):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)("div",{className:"flex lg:flex-row lg:items-center flex-wrap gap-3 mt-3 font-chakra-regular",children:[(0,s.jsxs)("div",{className:"bg-blue-700 text-[.85rem] text-white p-0.5 px-2 rounded-[.1rem]",children:["Location - ",q.location.charAt(0).toUpperCase()+q.location.slice(1)]}),(0,s.jsxs)("div",{className:"bg-blue-700 text-[.85rem] text-white p-0.5 px-2 rounded-[.1rem]",children:["Device - ",q.device.charAt(0).toUpperCase()+q.device.slice(1)]}),(0,s.jsxs)("div",{className:"bg-blue-700 text-[.85rem] text-white p-0.5 px-2 rounded-[.1rem]",children:["Browser - ",q.browser.charAt(0).toUpperCase()+q.browser.slice(1)]}),(0,s.jsx)("div",{className:"text-slate-400 text-[.85rem]",children:q.createdAt&&(isNaN(new Date(1e3*q.createdAt.seconds).getTime())?new Date(q.createdAt).toLocaleString():new Date(1e3*q.createdAt.seconds).toLocaleString())})]}),(0,s.jsx)("h1",{className:"text-white text-xl font-bold mt-2 font-chakra-semibold",children:q.title}),(0,s.jsx)("div",{className:"text-muted-foreground mt-1 font-chakra-regular",children:q.description}),q.mediaUrls.length>0&&(0,s.jsx)("div",{className:"flex lg:flex-row flex-col lg:items-center gap-3",children:q.mediaUrls.map((e,t)=>(0,s.jsxs)(eA.Vq,{children:[(0,s.jsx)(eA.hg,{asChild:!0,children:(0,s.jsx)("img",{src:e,className:"lg:max-w-1/3 lg:w-1/3 w-full rounded-[.1rem] h-[13.5rem] object-cover mt-3 cursor-pointer border border-accent transition-all ease-in duration-100 hover:border-blue-700 cursor-pointer",alt:"Bug report image ".concat(t+1)},t)}),(0,s.jsx)(eA.cZ,{className:"border-accent",children:(0,s.jsx)("div",{className:"p-5",children:(0,s.jsx)("img",{src:e,className:"max-h-[80vh]",alt:"Bug report image ".concat(t+1)},t)})})]}))}),(0,s.jsxs)("div",{className:"bg-primary-foreground border border-accent p-3 mt-4 rounded-[.1rem]",children:[(0,s.jsxs)("h1",{className:"text-white text-lg font-bold flex items-center gap-2 mb-2 font-chakra-semibold",children:[" ",(0,s.jsx)(f.mTE,{}),"Comments"]}),(0,s.jsx)("div",{className:"space-y-3",children:q.comments.sort((e,t)=>e.author===g?-1:t.author===g?1:0).map((e,t)=>(0,s.jsxs)("div",{className:"bg-accent border border-accent p-2 relative pr-8",children:[g===h&&(0,s.jsx)("button",{onClick:()=>handleDeleteComment(q.id,e.id,t),className:"text-red-400 hover:text-red-600 lg:text-xl absolute top-2 right-2",disabled:el===t,children:el===t?(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin ml-1"}):(0,s.jsx)(f.XHJ,{className:"w-4 h-4"})}),(0,s.jsxs)("p",{className:"text-slate-400 font-chakra-regular lg:text-[.9rem] text-[.8rem] flex gap-2",children:[(0,s.jsx)("span",{className:"".concat(e.author===h?"text-indigo-400":"text-blue-400"),children:e.author===g?(0,s.jsxs)("span",{className:"flex items-center text-green-400 gap-1",children:[(0,s.jsx)(tD.Z,{className:"w-4 h-4"})," Admin "]}):e.author===h?"You":"User ".concat(e.author)}),new Date(e.date).toLocaleString()]}),(0,s.jsx)("p",{className:"text-white lg:text-[1rem] text-[.85rem] font-chakra-regular",children:e.text})]},t))}),(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsx)(T.g,{className:"h-[12rem] text-foreground",placeholder:"Add a comment...",rows:"3",value:Q,onChange:e=>Y(e.target.value)}),(0,s.jsx)(x.z,{className:"mt-4",disabled:J,onClick:()=>handleAddComment(q.id,Q),children:J?(0,s.jsxs)(s.Fragment,{children:["Sending Comment ",(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin ml-1"})]}):(0,s.jsx)(s.Fragment,{children:"Add Comment"})})]})]})]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex gap-3 mb-4 font-bold lg:text-[1rem] text-[.8rem]",children:[(0,s.jsx)(x.z,{variant:"completed"===D?"default":"outline",onClick:()=>z("completed"),children:"Completed"}),(0,s.jsx)(x.z,{variant:"inProgress"===D?"default":"outline",onClick:()=>z("inProgress"),children:"In Progress"}),(0,s.jsx)(x.z,{variant:"new"===D?"default":"outline",onClick:()=>z("new"),children:"New"})]}),(0,s.jsxs)("ul",{className:"w-full",children:["inProgress"===D&&sortBugs(ed).map(e=>{var t,a,r,n,i,o;return(0,s.jsxs)("li",{onClick:()=>W(e),className:"mb-3 rounded-[.1rem] flex flex-row items-center gap-2 lg:gap-5 text-slate-300 p-3 px-3 lg:px-5 bg-background border border-accent group transition-all ease-in duration-100 hover:border-primary cursor-pointer",children:[(0,s.jsxs)("button",{onClick:t=>{var a;t.stopPropagation(),(null===(a=e.upvotedBy)||void 0===a?void 0:a.includes(h))||handleUpvoteBugReport(e.id)},className:"".concat((null===(t=e.upvotedBy)||void 0===t?void 0:t.includes(h))?"text-blue-400 cursor-not-allowed":"text-slate-400 hover:text-blue-400 cursor-pointer"," translate-y-1 flex flex-col items-center w-auto"),disabled:null===(a=e.upvotedBy)||void 0===a?void 0:a.includes(h),children:[(0,s.jsx)(tC.Z,{className:"w-6 h-6"}),(0,s.jsx)("span",{className:"text-muted-foreground font-chakra-regular text-[.8rem]",children:e.upvotes})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 cursor-pointer max-w-[85%]",onClick:()=>E(e),children:[(0,s.jsx)("div",{className:"min-w-[8px] w-[8px] h-[8px] bg-yellow-400 rounded-full"}),(0,s.jsx)("span",{className:"truncate text-white lg:text-[1rem] text-[.85rem] font-chakra-regular",children:e.title})]}),h===g&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{onClick:t=>{t.stopPropagation(),handleMarkAsComplete(e.id)},className:"bg-green-600 hover:bg-green-700 text-white px-2 text-[.9rem] flex items-center gap-1",disabled:null===(r=ei[e.id])||void 0===r?void 0:r.complete,children:(null===(n=ei[e.id])||void 0===n?void 0:n.complete)?(0,s.jsxs)(s.Fragment,{children:["Completing ",(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin ml-1"})]}):"Complete"}),(0,s.jsx)("button",{onClick:t=>{t.stopPropagation(),handleDeletePost(e.id)},className:"bg-red-600 hover:bg-red-700 text-white px-2 text-[.9rem] flex items-center gap-1",disabled:null===(i=ei[e.id])||void 0===i?void 0:i.delete,children:(null===(o=ei[e.id])||void 0===o?void 0:o.delete)?(0,s.jsxs)(s.Fragment,{children:["Deleting ",(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin ml-1"})]}):"Delete"})]}),(0,s.jsx)(j.Z,{className:"w-4 h-4 hidden lg:block ml-auto transition-transform duration-300 group-hover:translate-x-1"})]},e.id)}),"completed"===D&&sortBugs(em).map(e=>{var t,a,r,n,i,o;return(0,s.jsxs)("li",{onClick:()=>W(e),className:"mb-3 rounded-[.1rem] flex flex-row items-center gap-2 lg:gap-5 text-slate-300 p-3 px-3 lg:px-5 bg-background border border-accent group transition-all ease-in duration-100 hover:border-primary cursor-pointer",children:[(0,s.jsxs)("button",{onClick:t=>{var a;t.stopPropagation(),(null===(a=e.upvotedBy)||void 0===a?void 0:a.includes(h))||handleUpvoteBugReport(e.id)},className:"".concat((null===(t=e.upvotedBy)||void 0===t?void 0:t.includes(h))?"text-blue-400 cursor-not-allowed":"text-slate-400 hover:text-blue-400 cursor-pointer"," translate-y-1 flex flex-col items-center w-auto"),disabled:null===(a=e.upvotedBy)||void 0===a?void 0:a.includes(h),children:[(0,s.jsx)(tC.Z,{className:"w-6 h-6"}),(0,s.jsx)("span",{className:"text-muted-foreground font-chakra-regular text-[.8rem]",children:e.upvotes})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 cursor-pointer max-w-[85%]",onClick:()=>E(e),children:[(0,s.jsx)("div",{className:"min-w-[8px] w-[8px] h-[8px] bg-green-400 rounded-full"}),(0,s.jsx)("span",{className:"truncate text-white lg:text-[1rem] text-[.85rem] font-chakra-regular",children:e.title})]}),h===g&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{onClick:t=>{t.stopPropagation(),handleMarkAsInProgress(e.id)},className:"bg-yellow-600 hover:bg-yellow-700 text-white px-2 text-[.9rem] flex items-center gap-1",disabled:null===(r=ei[e.id])||void 0===r?void 0:r.inProgress,children:(null===(n=ei[e.id])||void 0===n?void 0:n.inProgress)?(0,s.jsxs)(s.Fragment,{children:["Marking In Progress ",(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin ml-1"})]}):"In Progress"}),(0,s.jsx)("button",{onClick:t=>{t.stopPropagation(),handleDeletePost(e.id)},className:"bg-red-600 hover:bg-red-700 text-white px-2 text-[.9rem] flex items-center gap-1",disabled:null===(i=ei[e.id])||void 0===i?void 0:i.delete,children:(null===(o=ei[e.id])||void 0===o?void 0:o.delete)?(0,s.jsxs)(s.Fragment,{children:["Deleting ",(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin ml-1"})]}):"Delete"})]}),(0,s.jsx)(j.Z,{className:"w-4 h-4 hidden lg:block ml-auto transition-transform duration-300 group-hover:translate-x-1"})]},e.id)}),"new"===D&&sortBugs(ep).map(e=>{var t,a,r,n,i,o,l,c;return(0,s.jsxs)("li",{onClick:()=>W(e),className:"mb-3 rounded-[.1rem] flex flex-row items-center gap-2 lg:gap-5 text-slate-300 p-3 px-3 lg:px-5 bg-background border border-accent group transition-all ease-in duration-100 hover:border-primary cursor-pointer",children:[(0,s.jsxs)("button",{onClick:t=>{var a;t.stopPropagation(),(null===(a=e.upvotedBy)||void 0===a?void 0:a.includes(h))||handleUpvoteBugReport(e.id)},className:"".concat((null===(t=e.upvotedBy)||void 0===t?void 0:t.includes(h))?"text-blue-400 cursor-not-allowed":"text-slate-400 hover:text-blue-400 cursor-pointer"," translate-y-1 flex flex-col items-center w-auto"),disabled:null===(a=e.upvotedBy)||void 0===a?void 0:a.includes(h),children:[(0,s.jsx)(tC.Z,{className:"w-6 h-6"}),(0,s.jsx)("span",{className:"text-muted-foreground font-chakra-regular text-[.8rem]",children:e.upvotes})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 cursor-pointer max-w-[85%]",onClick:()=>E(e),children:[(0,s.jsx)("div",{className:"min-w-[8px] w-[8px] h-[8px] ".concat("inProgress"===D?"bg-yellow-400":"completed"===D?"bg-green-400":"bg-blue-400"," rounded-full")}),(0,s.jsx)("span",{className:"truncate text-white lg:text-[1rem] text-[.85rem] font-chakra-regular",children:e.title})]}),h===g&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{onClick:t=>{t.stopPropagation(),handleMarkAsComplete(e.id)},className:"bg-green-600 hover:bg-green-700 text-white px-2 text-[.9rem] flex items-center gap-1",disabled:null===(r=ei[e.id])||void 0===r?void 0:r.complete,children:(null===(n=ei[e.id])||void 0===n?void 0:n.complete)?(0,s.jsxs)(s.Fragment,{children:["Completing ",(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin ml-1"})]}):"Complete"}),(0,s.jsx)("button",{onClick:t=>{t.stopPropagation(),handleMarkAsInProgress(e.id)},className:"bg-yellow-600 hover:bg-yellow-700 text-white px-2 text-[.9rem] flex items-center gap-1",disabled:null===(i=ei[e.id])||void 0===i?void 0:i.inProgress,children:(null===(o=ei[e.id])||void 0===o?void 0:o.inProgress)?(0,s.jsxs)(s.Fragment,{children:["Marking In Progress ",(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin ml-1"})]}):"In Progress"}),(0,s.jsx)("button",{onClick:t=>{t.stopPropagation(),handleDeletePost(e.id)},className:"bg-red-600 hover:bg-red-700 text-white px-2 text-[.9rem] flex items-center gap-1",disabled:null===(l=ei[e.id])||void 0===l?void 0:l.delete,children:(null===(c=ei[e.id])||void 0===c?void 0:c.delete)?(0,s.jsxs)(s.Fragment,{children:["Deleting ",(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin ml-1"})]}):"Delete"})]}),(0,s.jsx)(j.Z,{className:"w-4 h-4 hidden lg:block ml-auto transition-transform duration-300 group-hover:translate-x-1"})]},e.id)})]})]})]})]}),(0,s.jsx)("div",{className:"lg:hidden pb-5 opacity-0 h-0 overflow-hidden",children:"This div is to put a padding bottom on the page, is not visible and only appears on mobile."})]})}var tz=a(33748),tI=a.n(tz),tE=a(4755),tF=a(26048);function ReactivationPopup(e){let{currentUser:t,getPaddleSubscription:a,paddleCurrencyCode:r,paddleTotal:n,billingPeriodEndDate:o}=(0,d.a)(),[l,c]=(0,i.useState)(!1),reactivateSubscription=async()=>{e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Loading..."]}),description:"Reactivating your subscription."}),c(!0);try{let r=await a(t);if(!r)throw Error("No sub id");let n=await fetch("/api/paddle-api/resumeSubscription?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t.accessToken)},body:JSON.stringify({subscriptionId:r})});if(!n.ok)throw Error("HTTP error! status: ".concat(n.status));c(!1),e.setReactivatedFromPopup(!0),e.setReactivationPopup(!1),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Success"]}),description:"Subscription reactivated successfully!"})}catch(t){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Failed to reactivate subscription. Contact support for assistance.",variant:"destructive"}),c(!1),e.setReactivationPopup(!1);return}};return(0,s.jsx)(eA.Vq,{open:e.reactivationPopup,onOpenChange:e.setReactivationPopup,children:(0,s.jsx)(eA.cZ,{className:"outline-none border-accent",children:(0,s.jsxs)("div",{className:"flex flex-col lg:w-full w-full items-center justify-center gap-3 rounded-[.4rem] z-20",children:[(0,s.jsx)("div",{className:"relative",children:(0,s.jsx)(tE.Z,{className:"w-24 h-24 text-primary"})}),(0,s.jsx)("h1",{className:"font-bold text-white text-xl lg:text-2xl text-center font-chakra-bold",children:"Reactivate Your Subscription"}),(0,s.jsx)("div",{className:"text-slate-400 lg:text-lg text-center font-chakra-regular mb-3",children:"This will reactivate your subscription. You will not be charged now."}),(0,s.jsxs)("div",{className:"bg-background border border-accent p-5 w-full rounded-t-[.1rem] flex items-center justify-between shadow-lg shadow-slate-950 text-[.85rem]",children:[(0,s.jsxs)("div",{className:"font-chakra-bold text-white lg:text-lg text-sm flex items-center gap-2",children:[(0,s.jsx)(tF.Z,{className:"text-xl text-primary"})," Amount Due Now  "]}),(0,s.jsx)("div",{className:"text-white font-chakra-semibold lg:text-lg rounded-[.1rem]",children:tI().format(0,{code:r})})]}),(0,s.jsx)("div",{className:"bg-primary-foreground border border-accent p-3 px-5 w-full rounded-b-[.1rem] flex flex-col shadow-lg shadow-slate-950 text-[.9rem] lg:text-[1rem]",children:(0,s.jsxs)("div",{className:"w-full flex items-center justify-between text-white font-bold ",children:[(0,s.jsx)("div",{className:"flex flex-col items-start justify-center",children:(0,s.jsxs)("span",{className:"text-white font-chakra-bold lg:text-sm text-xs",children:["Payment due on ",new Date(o).toLocaleString("default",{month:"long",day:"numeric"})]})}),(0,s.jsx)("div",{className:"flex flex-row gap-2 items-center justify-center font-chakra-semibold",children:(0,s.jsx)("div",{className:"",children:tI().format(n,{code:r})})})]})}),(0,s.jsx)(x.z,{size:"xl",disabled:l,className:"text-[1rem] w-full flex items-center gap-2 mt-5",onClick:async()=>{await reactivateSubscription()},children:l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," "]}):(0,s.jsx)(s.Fragment,{children:"Renew My Plan"})})]})})})}var tB=a(8029),t_=a(47237);function FindCompetitors(e){var t;let[a,r]=(0,i.useState)(null),[n,l]=(0,i.useState)(null);(0,i.useEffect)(()=>{let e=new AbortController;return r(e),l(e.signal),()=>{e.abort()}},[]);let{currentUser:c,contextChargeDeclined:u,getSavedProducts2:m,getCompetitors:h}=(0,d.a)(),p=(0,o.useRouter)(),[g,b]=(0,i.useState)(!1),[y,v]=(0,i.useState)([]),[j,k]=(0,i.useState)(!1),[N,A]=(0,i.useState)([]),[S,T]=(0,i.useState)([]),[D,z]=(0,i.useState)(""),[I,E]=(0,i.useState)(!1),[F,B]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!p.query.id||!j)return;let e=p.query.id,t=N.find(t=>t.id===e);handleProductClick(t),B(!0)},[p,j]),(0,i.useEffect)(()=>{if(F&&"true"===p.query.update){let e="product-".concat(p.query.id);regenerateCompetitors(e),B(!1)}},[F]),(0,i.useEffect)(()=>{let handleResize=()=>{E(window.innerWidth<=768)};return handleResize(),window.addEventListener("resize",handleResize),()=>window.removeEventListener("resize",handleResize)},[]),(0,i.useEffect)(()=>{setTimeout(()=>{b(!0)},10)},[]),(0,i.useEffect)(()=>{c&&(m(c).then(e=>{if(e){k(!0),A(e.reverse());return}fetch("/api/my-products/createProductsUser?uid=".concat(c.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+c.accessToken}})}),h(c).then(e=>{e&&v(e)}))},[c]);let handleProductClick=async e=>{let t=S.find(t=>t.id==="product-".concat(e.id));if(t){z(t.id);return}let a={id:"product-".concat(e.id),label:e.productName.slice(0,25)+"...",image:e.images[0],loading:!0,competitorList:null,product:e},s=I?4:10;T(e=>{let t=[...e,a];return e.length>=s&&(t=t.slice(1)),t}),z(a.id);let r=y.find(t=>t.id===e.id);if(console.log(r),r){T(e=>e.map(e=>e.id===a.id?{...e,loading:!1,competitorList:r.competitorList}:e));return}try{let t=await listCompetitors(e);T(e=>e.map(e=>e.id===a.id?{...e,loading:!1,competitorList:t}:e))}catch(e){T(e=>e.map(e=>e.id===a.id?{...e,loading:!1,competitorList:[]}:e))}},regenerateCompetitors=async e=>{console.log("Regenerating competitors for tab:",e);let t=S.find(t=>t.id===e);if(!t||!t.product){console.error("Tab or product not found for regeneration");return}T(t=>t.map(t=>t.id===e?{...t,loading:!0,competitorList:null}:t));try{let a=await listCompetitors(t.product);console.log("Fetched new competitors:",a),T(t=>t.map(t=>t.id===e?{...t,loading:!1,competitorList:a}:t))}catch(t){console.error("Error fetching competitors:",t),T(t=>t.map(t=>t.id===e?{...t,loading:!1,competitorList:[]}:t))}};async function listCompetitors(t){try{e.toast({title:(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("span",{className:"flex flex-row items-center gap-1.5 bg-yellow-300 text-yellow-800 font-chakra-medium rounded-[.1rem] text-[.7rem] px-1 w-fit mb-2",children:[(0,s.jsx)(eP.Z,{className:"lg:w-4 lg:h-4 w-3 h-3 text-yellow-800"})," DO NOT LEAVE THIS PAGE"]}),(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Fetching competitors..."]})]}),description:"Please stay on this page while we fetch the competitors for ".concat(t.productName.length>25?t.productName.slice(0,25)+"...":t.productName)});let a=await fetch("/api/find-competitors/list-competitors?uid=".concat(c.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+c.accessToken},body:JSON.stringify({productName:t.productName}),signal:n});if(!a.ok)throw Error("Failed to fetch competitors");let r=await a.json();if(r.competitorList.length>0){await saveCompetitors(t.id,r.competitorList);let a=await h(c);return v(a),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Found competitors for ",t.productName.length>25?t.productName.slice(0,25)+"...":t.productName]}),description:"We found ".concat(r.competitorList.length," competitors for this product")}),r.competitorList}{await saveCompetitors(t.id,r.competitorList);let a=await h(c);return v(a),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," No competitors found for ",t.productName.length>25?t.productName.slice(0,25)+"...":t.productName]}),description:"We couldn't find any competitors for this product"}),r.competitorList}}catch(t){if("AbortError"===t.name)return;return e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error finding competitors"]}),description:"An error occurred while searching for competitors."}),[]}}let saveCompetitors=async(e,t)=>{try{let a=await fetch("/api/find-competitors/save?uid=".concat(c.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+c.accessToken},body:JSON.stringify({id:e,competitors:t})});if(!a.ok)throw Error("Failed to save competitors");let s=await a.json();return s.id}catch(e){return}};return(0,s.jsxs)("div",{className:"dark animated-element w-full h-screen flex flex-col items-center gap-5 relative lg:p-0 lg:py-10 ".concat(e.showBanner?"":"2xl:py-20"," p-5 pb-12 lg:overflow-auto overflow-x-hidden"),"data-sentry-component":"FindCompetitors","data-sentry-source-file":"find-competitors.jsx",children:[(0,s.jsx)(MatrixGrid,{"data-sentry-element":"MatrixGrid","data-sentry-source-file":"find-competitors.jsx"}),e.showBanner&&(0,s.jsx)("div",{className:"w-full lg:w-[68.3rem] ".concat(g?"opacity-100 translate-y-0":"opacity-0 -translate-y-10"," transition-all duration-1000"),children:(0,s.jsx)(e_.Z,{})}),(0,s.jsxs)("div",{className:"flex lg:w-auto w-full lg:h-full flex-col lg:flex-row lg:items-center gap-5 bg-transparent",children:[(0,s.jsxs)(w.Zb,{className:"w-full lg:w-[23rem] h-[20rem] lg:h-full border-accent transition-all duration-1000 overflow-hidden ".concat(g?"opacity-100 translate-x-0":"opacity-0 -translate-x-20"," shadow-xl shadow-slate-950"),"data-sentry-element":"Card","data-sentry-source-file":"find-competitors.jsx",children:[(0,s.jsxs)(w.Ol,{"data-sentry-element":"CardHeader","data-sentry-source-file":"find-competitors.jsx",children:[(0,s.jsx)(w.ll,{className:"flex flex-row items-center justify-between gap-2","data-sentry-element":"CardTitle","data-sentry-source-file":"find-competitors.jsx",children:(0,s.jsx)("h1",{className:"text-xl lg:text-2xl font-bold",children:"Choose Product"})}),(0,s.jsx)(w.SZ,{className:"".concat(N.length>0||!j?"hidden lg:block":""),"data-sentry-element":"CardDescription","data-sentry-source-file":"find-competitors.jsx",children:0===N.length&&j?(0,s.jsxs)("div",{className:"flex flex-col items-start border-t border-accent pt-3 mt-1",children:[(0,s.jsx)("div",{className:"flex flex-row items-center gap-2 text-[.9rem]",children:(0,s.jsx)("p",{children:"No saved products"})}),(0,s.jsx)("div",{className:"text-muted-foreground/75 text-sm mt-1",children:"Find & save a product to get started"}),(0,s.jsxs)(x.z,{size:"sm",variant:"outline",className:"mt-3",onClick:()=>{p.push("/dashboard?location=product-db")},children:[(0,s.jsx)(eh.Z,{className:"w-4 h-4 mr-1.5"})," AI Product Database"]})]}):(0,s.jsx)("div",{className:"flex flex-row items-center gap-2 text-[.9rem]",children:(0,s.jsx)("p",{children:"Select a product to find competitors"})})})]}),(0,s.jsx)(w.aY,{className:"h-full w-full overflow-auto flex flex-col gap-5","data-sentry-element":"CardContent","data-sentry-source-file":"find-competitors.jsx",children:N.map((t,a)=>(0,s.jsxs)(x.z,{variant:"outline",className:"w-full min-h-16 lg:min-h-20 bg-slate-950 backdrop-brightness-[120%] border-accent flex flex-row items-center justify-start gap-2 overflow-hidden relative",onClick:()=>{if(c){if(u){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){e.setTrialPopup(!0);return}handleProductClick(t)}},children:[(0,s.jsx)(eg.Z,{className:"w-4 h-4 absolute right-2 top-2"}),(0,s.jsx)("img",{src:t.images?t.images[0]:"",className:"lg:w-10 lg:h-10 w-8 h-8 object-cover"}),(0,s.jsxs)("div",{className:"flex flex-col items-start justify-start lg:gap-1",children:[(0,s.jsxs)("p",{className:"text-md font-bold",children:[t.productName.slice(0,25),"..."]}),(0,s.jsx)("p",{className:"text-muted-foreground text-[.8rem]",children:"Click product to find competitors"})]})]},a))})]}),(0,s.jsxs)("div",{className:"w-full lg:w-[44rem] lg:h-full border-accent transition-all duration-1000 overflow-hidden bg-background rounded-[.1rem] border flex flex-col gap-2 p-6 shadow-xl shadow-slate-950 ".concat(g?"opacity-100 translate-x-0":"opacity-0 translate-x-20"," relative"),children:[(0,s.jsx)("h1",{className:"text-xl lg:text-2xl font-chakra-semibold text-foreground",children:"Competitors"}),(0,s.jsx)("div",{className:"hidden lg:block text-[.9rem] text-muted-foreground font-chakra-regular mb-3",children:" List of competitors will be displayed here"}),D&&!(null===(t=S.find(e=>e.id===D))||void 0===t?void 0:t.loading)&&(0,s.jsxs)(x.z,{onClick:()=>{c&&!u&&"no"!==e.subscribed&&regenerateCompetitors(D)},className:"absolute top-6 right-6",variant:"default",size:"sm",children:[(0,s.jsx)(eq.Z,{className:"w-4 h-4 mr-1.5"}),"Update"]}),(0,s.jsx)("div",{className:"tabs-list flex flex-row items-center gap-5 border-b border-accent",children:S.map(e=>(0,s.jsx)("button",{className:"flex flex-row items-center gap-2 p-2 border-b-2 ".concat(D===e.id?"border-primary text-primary":"border-transparent text-muted-foreground"),onClick:()=>z(e.id),children:(0,s.jsx)("img",{src:e.image,className:"w-8 h-8 object-cover rounded"})},e.id))}),(0,s.jsxs)("div",{className:"tabs-content lg:h-full h-[30rem] w-full border-accent border rounded-[.1rem] mt-4 flex flex-col gap-5 p-3 lg:p-5 overflow-auto",children:[0===S.length&&(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-full w-full font-chakra-regular",children:[(0,s.jsx)(f.BHL,{className:"lg:w-24 lg:h-24 w-20 h-20 text-muted-foreground/30"}),(0,s.jsx)("h1",{className:"font-chakra-medium text-muted-foreground mt-3",children:"No products selected"}),(0,s.jsx)("div",{className:"text-muted-foreground/75 text-sm mt-1",children:"Select a product to find competitors"})]}),S.map(e=>D===e.id&&(0,s.jsx)("div",{className:"tab-panel",children:e.loading?(0,s.jsxs)(w.Zb,{className:"mb-4 p-3 lg:p-4 bg-primary-foreground border-accent w-full",children:[(0,s.jsx)("div",{className:"flex items-center gap-4",children:(0,s.jsx)(eR.O,{className:"h-4 lg:w-32 w-20 rounded-[.1rem]"})}),(0,s.jsx)("div",{className:"flex items-center mt-4",children:(0,s.jsx)(eR.O,{className:"h-4 lg:w-48 w-32 rounded-[.1rem]"})}),(0,s.jsx)("div",{className:"flex items-center mt-4",children:(0,s.jsx)(eR.O,{className:"h-4 lg:w-16 w-12 rounded-[.1rem]"})}),(0,s.jsxs)("div",{className:"mt-8",children:[(0,s.jsx)(eR.O,{className:"h-4 lg:w-64 w-48 rounded-[.1rem]"}),(0,s.jsx)(eC.Z,{className:"my-4"}),Array.from({length:2}).map((e,t)=>(0,s.jsxs)("div",{className:"flex gap-3 p-3 rounded-[.1rem]",children:[(0,s.jsx)(eR.O,{className:"lg:h-16 h-12 rounded-[.1rem] lg:min-w-16 min-w-12"}),(0,s.jsxs)("div",{className:"flex flex-col w-full gap-3",children:[(0,s.jsx)(eR.O,{className:"h-4 lg:w-24 w-16 rounded-[.1rem]"}),(0,s.jsx)(eR.O,{className:"h-4 lg:w-48 w-32 rounded-[.1rem]"}),(0,s.jsx)(eR.O,{className:"h-4 lg:w-36 w-24 rounded-[.1rem]"})]})]},t))]})]}):e.competitorList&&e.competitorList.length>0?(0,s.jsx)("div",{className:"competitor-list",children:e.competitorList.map((e,t)=>(0,s.jsxs)(w.Zb,{className:"mb-4 p-3 lg:p-4 bg-primary-foreground border-accent",children:[(0,s.jsx)("div",{className:"flex items-center gap-4",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"lg:text-xl text-lg font-chakra-bold",children:e.storeName}),(0,s.jsx)("a",{href:e.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-muted-foreground font-chakra-regular mb-1 transition-colors ease-in duration-100 lg:hover:text-foreground",children:e.websiteUrl}),(0,s.jsxs)("p",{className:"text-sm text-primary font-chakra-regular",children:[" ",(0,s.jsx)("span",{className:"inline text-muted-foreground/75",children:"Theme: "}),e.theme||"N/A"]})]})}),(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsxs)("h3",{className:"lg:text-[1rem] text-[.8rem] font-chakra-semibold flex items-center gap-1 lg:gap-2",children:[" ",(0,s.jsx)(eu.Z,{className:"w-4 h-4 text-muted-foreground"})," Relevant products sold by this store"]}),(0,s.jsx)(eC.Z,{className:"my-2"}),e.products.map((t,a)=>(0,s.jsxs)("a",{href:"".concat(e.websiteUrl,"/products/").concat(t.handle),target:"_blank",rel:"noopener noreferrer",className:"flex gap-3 p-3 rounded-[.1rem] cursor-pointer transition-all ease-in duration-100 lg:hover:bg-accent",children:[(0,s.jsxs)("div",{className:"lg:min-h-[4rem] lg:min-w-[4rem] min-h-[3rem] min-w-[3rem] lg:max-h-[4rem] lg:max-w-[4rem] max-w-[3rem] max-h-[3rem] rounded-[.1rem] overflow-hidden",children:[!t.imageSrc&&(0,s.jsx)(f.XBm,{className:"w-full h-full text-muted-foreground/75 bg-slate-800 p-1 rounded-[.1rem]"}),(0,s.jsx)("img",{src:t.imageSrc,className:"object-cover w-full"})]}),(0,s.jsxs)("div",{className:"flex flex-col w-full",children:[(0,s.jsxs)("h1",{className:"font-chakra-semibold text-lg text-blue-400 flex items-start justify-between w-full",children:["$"+t.price,(0,s.jsx)(f.s7Z,{className:"text-slate-400 text-2xl"})]}),(0,s.jsx)("div",{className:"text-white font-chakra-medium text-[.85rem]",children:t.name}),(0,s.jsxs)("div",{className:"text-muted-foreground font-chakra-regular text-[.7rem] break-all",children:[e.websiteUrl,"/products/",t.handle]})]})]}))]})]},t))}):e.competitorList&&0!==e.competitorList.length?(0,s.jsx)(s.Fragment,{}):(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-full w-full font-chakra-regular mt-20 -translate-y-2",children:[(0,s.jsx)(f.BHL,{className:"lg:w-24 lg:h-24 w-20 h-20 text-muted-foreground/30"}),(0,s.jsx)("h1",{className:"font-chakra-medium text-muted-foreground mt-3",children:"No competitors found"}),(0,s.jsx)("div",{className:"text-muted-foreground/75 text-sm mt-1 text-center",children:"Couldn't find any competitors for this product"})]})},e.id))]})]})]})]})}function FindTikToks(e){var t;let[a,r]=(0,i.useState)(null),[n,l]=(0,i.useState)(null);(0,i.useEffect)(()=>{let e=new AbortController;return r(e),l(e.signal),()=>{e.abort()}},[]);let{currentUser:u,contextChargeDeclined:m,getSavedProducts2:h,getTiktoks:p}=(0,d.a)(),g=(0,o.useRouter)(),[b,y]=(0,i.useState)(!1),[v,j]=(0,i.useState)([]),[k,N]=(0,i.useState)(!1),[A,S]=(0,i.useState)([]),[T,D]=(0,i.useState)([]),[z,I]=(0,i.useState)(""),[E,F]=(0,i.useState)(!1),[B,_]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!g.query.id||!k)return;let e=g.query.id,t=A.find(t=>t.id===e);handleProductClick(t),_(!0)},[g,k]),(0,i.useEffect)(()=>{if(B&&"true"===g.query.update){let e="product-".concat(g.query.id);regenerateTikToks(e),_(!1)}},[B]),(0,i.useEffect)(()=>{let handleResize=()=>{F(window.innerWidth<=768)};return handleResize(),window.addEventListener("resize",handleResize),()=>window.removeEventListener("resize",handleResize)},[]),(0,i.useEffect)(()=>{setTimeout(()=>{y(!0)},10)},[]),(0,i.useEffect)(()=>{u&&(h(u).then(e=>{if(e){N(!0),S(e.reverse());return}fetch("/api/my-products/createProductsUser?uid=".concat(u.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+u.accessToken}})}),p(u).then(e=>{e&&j(e)}))},[u]);let handleProductClick=async e=>{let t=T.find(t=>t.id==="product-".concat(e.id));if(t){I(t.id);return}let a={id:"product-".concat(e.id),label:e.productName.slice(0,25)+"...",image:e.images[0],loading:!0,tiktokVideos:null,product:e},s=E?4:10;D(e=>{let t=[...e,a];return e.length>=s&&(t=t.slice(1)),t}),I(a.id);let r=v.find(t=>t.id===e.id);if(r){D(e=>e.map(e=>e.id===a.id?{...e,loading:!1,tiktokVideos:r.tiktoks}:e));return}try{let t=await fetchTiktokVideos(e);D(e=>e.map(e=>e.id===a.id?{...e,loading:!1,tiktokVideos:t}:e))}catch(e){D(e=>e.map(e=>e.id===a.id?{...e,loading:!1,tiktokVideos:[]}:e))}},regenerateTikToks=async e=>{let t=T.find(t=>t.id===e);if(!t||!t.product){console.error("Tab or product not found for regeneration");return}D(t=>t.map(t=>t.id===e?{...t,loading:!0,tiktokVideos:null}:t));try{let a=await fetchTiktokVideos(t.product);D(t=>t.map(t=>t.id===e?{...t,loading:!1,tiktokVideos:a}:t))}catch(t){D(t=>t.map(t=>t.id===e?{...t,loading:!1,tiktokVideos:[]}:t))}},fetchTiktokVideos=async t=>{try{e.toast({title:(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("span",{className:"flex flex-row items-center gap-1.5 bg-yellow-300 text-yellow-800 font-chakra-medium rounded-[.1rem] text-[.7rem] px-1 w-fit mb-2",children:[(0,s.jsx)(eP.Z,{className:"lg:w-4 lg:h-4 w-3 h-3 text-yellow-800"})," DO NOT LEAVE THIS PAGE"]}),(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 animate-spin"})," Fetching TikTok videos..."]})]}),description:"Please stay on this page while we fetch the TikTok videos for ".concat(t.productName.length>25?t.productName.slice(0,25)+"...":t.productName)});let a=await fetch("/api/find-tiktoks/tiktok-vids?uid=".concat(u.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+u.accessToken},body:JSON.stringify({productName:t.productName,productImage:t.images[0]}),signal:n});if(!a.ok)throw Error("Failed to fetch TikTok videos");let r=await a.json();await saveTiktoks(t.id,r.result);let i=await p(u);return j(i),e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"w-4 h-4 text-green-500"})," Found TikTok videos for ",t.productName.length>25?t.productName.slice(0,25)+"...":t.productName]}),description:"We found ".concat(r.result.length," TikTok videos for this product")}),r.result}catch(t){if("AbortError"===t.name)return;return e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error fetching TikTok videos"]}),description:"An error occurred while fetching TikTok videos.",variant:"destructive"}),[]}},saveTiktoks=async(e,t)=>{let a=await Promise.all(t.map(async e=>{try{let[t,a]=await Promise.all([uploadImageToStorage(e.thumbnailSrc,u.uid),uploadImageToStorage(e.userProfilePic,u.uid)]);return{...e,thumbnailSrc:t,userProfilePic:a}}catch(t){return console.error("Error uploading thumbnail:",t),e}}));t=a;try{let a=await fetch("/api/find-tiktoks/save?uid=".concat(u.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+u.accessToken},body:JSON.stringify({id:e,tiktoks:t})});if(!a.ok)throw Error("Failed to save tiktoks");let s=await a.json();return s.id}catch(e){return}};async function uploadImageToStorage(e,t){try{let a=Math.random().toString(36).substring(2,15),s=(0,eO.iH)(eZ.t,"/users/".concat(t,"/").concat(a,".png"));if("string"!=typeof e||!e.startsWith("http"))throw Error("Invalid image data format. Expected URL string.");let r=await fetch(e);if(!r.ok)throw Error("Failed to fetch image from URL");let n=await r.blob(),i=await (0,eO.KV)(s,n),o=await (0,eO.Jt)(i.ref);return o}catch(t){return console.error("Error uploading image:",t),e}}return(0,s.jsxs)("div",{className:"dark animated-element w-full h-screen flex flex-col items-center gap-5 relative lg:p-0 lg:py-10 ".concat(e.showBanner?"":"2xl:py-20"," p-5 pb-12 lg:overflow-auto overflow-x-hidden"),"data-sentry-component":"FindTikToks","data-sentry-source-file":"find-tiktoks.jsx",children:[(0,s.jsx)(MatrixGrid,{"data-sentry-element":"MatrixGrid","data-sentry-source-file":"find-tiktoks.jsx"}),e.showBanner&&(0,s.jsx)("div",{className:"w-full lg:w-[68.3rem] ".concat(b?"opacity-100 translate-y-0":"opacity-0 -translate-y-10"," transition-all duration-1000"),children:(0,s.jsx)(e_.Z,{})}),(0,s.jsxs)("div",{className:"flex lg:w-auto w-full lg:h-full flex-col lg:flex-row lg:items-center gap-5 bg-transparent",children:[(0,s.jsxs)(w.Zb,{className:"w-full lg:w-[23rem] h-[20rem] lg:h-full border-accent transition-all duration-1000 overflow-hidden ".concat(b?"opacity-100 translate-x-0":"opacity-0 -translate-x-20"," shadow-xl shadow-slate-950"),"data-sentry-element":"Card","data-sentry-source-file":"find-tiktoks.jsx",children:[(0,s.jsxs)(w.Ol,{"data-sentry-element":"CardHeader","data-sentry-source-file":"find-tiktoks.jsx",children:[(0,s.jsx)(w.ll,{className:"flex flex-row items-center justify-between gap-2","data-sentry-element":"CardTitle","data-sentry-source-file":"find-tiktoks.jsx",children:(0,s.jsx)("h1",{className:"text-xl lg:text-2xl font-bold",children:"Choose Product"})}),(0,s.jsx)(w.SZ,{className:"".concat(A.length>0||!k?"hidden lg:block":""),"data-sentry-element":"CardDescription","data-sentry-source-file":"find-tiktoks.jsx",children:0===A.length&&k?(0,s.jsxs)("div",{className:"flex flex-col items-start border-t border-accent pt-3 mt-1",children:[(0,s.jsx)("div",{className:"flex flex-row items-center gap-2 text-[.9rem]",children:(0,s.jsx)("p",{children:"No saved products"})}),(0,s.jsx)("div",{className:"text-muted-foreground/75 text-sm mt-1",children:"Find & save a product to get started"}),(0,s.jsxs)(x.z,{size:"sm",variant:"outline",className:"mt-3",onClick:()=>{g.push("/dashboard?location=product-db")},children:[(0,s.jsx)(eh.Z,{className:"w-4 h-4 mr-1.5"})," AI Product Database"]})]}):(0,s.jsx)("div",{className:"flex flex-row items-center gap-2 text-[.9rem]",children:(0,s.jsx)("p",{children:"Select a product to find competitors"})})})]}),(0,s.jsx)(w.aY,{className:"h-full w-full overflow-auto flex flex-col gap-5","data-sentry-element":"CardContent","data-sentry-source-file":"find-tiktoks.jsx",children:A.map((t,a)=>(0,s.jsxs)(x.z,{variant:"outline",className:"w-full min-h-16 lg:min-h-20 bg-slate-950 backdrop-brightness-[120%] border-accent flex flex-row items-center justify-start gap-2 overflow-hidden relative",onClick:()=>{if(u){if(m){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){e.setTrialPopup(!0);return}handleProductClick(t)}},children:[(0,s.jsx)(eg.Z,{className:"w-4 h-4 absolute right-2 top-2"}),(0,s.jsx)("img",{src:t.images?t.images[0]:"",className:"lg:w-10 lg:h-10 w-8 h-8 object-cover rounded-[.1rem]"}),(0,s.jsxs)("div",{className:"flex flex-col items-start justify-start lg:gap-1",children:[(0,s.jsxs)("p",{className:"text-md font-bold",children:[t.productName.slice(0,25),"..."]}),(0,s.jsx)("p",{className:"text-muted-foreground text-[.8rem]",children:"Click product to find TikToks"})]})]},a))})]}),(0,s.jsxs)("div",{className:"w-full lg:w-[44rem] lg:h-full border-accent transition-all duration-1000 overflow-hidden bg-background rounded-[.1rem] border flex flex-col gap-2 p-6 shadow-xl shadow-slate-950 ".concat(b?"opacity-100 translate-x-0":"opacity-0 translate-x-20"),children:[(0,s.jsx)("h1",{className:"text-xl lg:text-2xl font-chakra-semibold text-foreground",children:"TikTok Videos"}),(0,s.jsx)("div",{className:"hidden lg:block text-[.9rem] text-muted-foreground font-chakra-regular mb-3",children:" List of TikTok videos will be displayed here"}),z&&!(null===(t=T.find(e=>e.id===z))||void 0===t?void 0:t.loading)&&(0,s.jsxs)(x.z,{onClick:()=>{u&&!m&&"no"!==e.subscribed&&regenerateTikToks(z)},className:"absolute top-6 right-6",variant:"default",size:"sm",children:[(0,s.jsx)(eq.Z,{className:"w-4 h-4 mr-1.5"}),"Update"]}),(0,s.jsx)("div",{className:"tabs-list flex flex-row items-center gap-5 border-b border-accent",children:T.map(e=>(0,s.jsx)("button",{className:"flex flex-row items-center gap-2 p-2 border-b-2 ".concat(z===e.id?"border-primary text-primary":"border-transparent text-muted-foreground"),onClick:()=>I(e.id),children:(0,s.jsx)("img",{src:e.image,className:"w-8 h-8 object-cover rounded-[.1rem]"})},e.id))}),(0,s.jsxs)("div",{className:"tabs-content lg:h-full h-[30rem] w-full border-accent border rounded-[.1rem] mt-4 flex flex-col gap-5 p-3 lg:p-5 overflow-auto",children:[0===T.length&&(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-full w-full font-chakra-regular",children:[(0,s.jsx)(f.BHL,{className:"lg:w-24 lg:h-24 w-20 h-20 text-muted-foreground/30"}),(0,s.jsx)("h1",{className:"font-chakra-medium text-muted-foreground mt-3",children:"No products selected"}),(0,s.jsx)("div",{className:"text-muted-foreground/75 text-sm mt-1",children:"Select a product to find TikTok videos"})]}),T.map(e=>z===e.id&&(0,s.jsx)("div",{className:"tab-panel",children:e.loading?(0,s.jsx)(w.Zb,{className:"mb-4 p-3 lg:p-4 bg-primary-foreground border-accent w-full",children:(0,s.jsx)("div",{className:"flex flex-col gap-4",children:Array.from({length:2}).map((e,t)=>(0,s.jsx)(w.Zb,{className:"mb-4 p-3 lg:p-4 bg-primary-foreground border-accent",children:(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row gap-4",children:[(0,s.jsx)("div",{className:"lg:w-1/3 w-full relative",children:(0,s.jsx)(eR.O,{className:"rounded-[.1rem] lg:w-full w-full h-40"})}),(0,s.jsxs)("div",{className:"lg:w-2/3 w-full flex flex-col gap-2",children:[(0,s.jsx)(eR.O,{className:"h-4 lg:w-24 w-16 rounded-[.1rem]"}),(0,s.jsx)(eR.O,{className:"h-4 lg:w-48 w-32 rounded-[.1rem]"}),(0,s.jsx)(eR.O,{className:"h-4 lg:w-16 w-12 rounded-[.1rem]"}),(0,s.jsx)(eR.O,{className:"h-4 lg:w-16 w-12 rounded-[.1rem]"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:Array.from({length:3}).map((e,t)=>(0,s.jsx)(eR.O,{className:"h-4 lg:w-12 w-8 rounded-[.1rem]"},t))})]})]})},t))})}):e.tiktokVideos&&e.tiktokVideos.length>0?(0,s.jsx)("div",{className:"tiktok-video-list overflow-x-hidden",children:e.tiktokVideos.map((e,t)=>(0,s.jsx)(w.Zb,{className:"mb-4 p-3 lg:p-4 bg-primary-foreground border-accent",children:(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row gap-4",children:[(0,s.jsxs)("div",{className:"lg:w-1/3 w-full relative group",children:[(0,s.jsxs)(x.z,{onClick:()=>window.open(e.href,"_blank"),variant:"ghost",className:"absolute bottom-3 w-[90%] lg:left-0 lg:translate-x-0 left-1/2 -translate-x-1/2 lg:bottom-0 lg:w-full bg-background lg:group-hover:h-full lg:group-hover:bg-background/90 transition-all duration-300 py-5 lg:border-none border border-accent",children:[(0,s.jsx)(c(),{src:tt,className:"w-4 h-4 mr-1"}),"  View TikTok",(0,s.jsx)(f.s7Z,{className:"w-4 h-4 absolute right-2 top-2 opacity-0 group-hover:opacity-100 transition-all duration-300 hidden lg:block"})]}),(0,s.jsx)("img",{src:e.thumbnailSrc,className:"rounded-[.1rem]"})]}),(0,s.jsxs)("div",{className:"lg:w-2/3 w-full flex flex-col gap-2",children:[(0,s.jsxs)("a",{href:"https://www.tiktok.com/@".concat(e.username),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 border-b border-accent pb-2 group relative w-full",children:[(0,s.jsx)("img",{src:e.userProfilePic,className:"w-8 h-8 rounded-full object-cover"}),(0,s.jsxs)("div",{className:"flex flex-col items-start justify-start",children:[(0,s.jsxs)("span",{className:"text-sm text-foreground font-chakra-regular",children:["@",e.username]}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground/75 font-chakra-regular underline group-hover:text-foreground transition-all duration-100 ease-in",children:"View Profile"})]})]}),e.caption&&(0,s.jsx)("h2",{className:"text-[.9rem] lg:text-[1rem] font-chakra-medium mb-1",children:e.caption.length>200?"".concat(e.caption.slice(0,200),"..."):e.caption}),(0,s.jsxs)("p",{className:"text-sm font-chakra-regular mb-1.5",children:[(0,s.jsx)("span",{className:"inline text-muted-foreground/75",children:"Uploaded - "}),new Date(e.uploadDate).toLocaleString()]}),(0,s.jsxs)("p",{className:"text-sm font-chakra-regular flex items-center gap-1",children:[(0,s.jsxs)("span",{className:" text-muted-foreground/75 flex items-center gap-1",children:[" ",(0,s.jsx)(e3.Z,{className:"w-3 h-3 inline text-primary"})," Views:  "]})," ",e.views?e.views:"-"]}),(0,s.jsxs)("p",{className:"text-sm font-chakra-regular flex items-center gap-1",children:[(0,s.jsxs)("span",{className:" text-muted-foreground/75 flex items-center gap-1",children:[" ",(0,s.jsx)(e8.Z,{className:"w-3 h-3 inline text-primary"})," Likes:  "]})," ",e.likes?e.likes:"-"]}),(0,s.jsxs)("p",{className:"text-sm font-chakra-regular flex items-center gap-1",children:[(0,s.jsxs)("span",{className:" text-muted-foreground/75 flex items-center gap-1",children:[" ",(0,s.jsx)(e6.Z,{className:"w-3 h-3 inline text-primary"})," Comments:  "]})," ",e.comments?e.comments:"-"]}),(0,s.jsxs)("p",{className:"text-sm font-chakra-regular flex items-center gap-1",children:[(0,s.jsxs)("span",{className:" text-muted-foreground/75 flex items-center gap-1",children:[" ",(0,s.jsx)(e7.Z,{className:"w-3 h-3 inline text-primary"})," Shares:  "]})," ",e.shares?e.shares:"-"]}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:e.hashtags.map((e,t)=>(0,s.jsx)("span",{className:"text-xs text-blue-500 font-chakra-regular",children:e},t))})]})]})},t))}):e.tiktokVideos&&0!==e.tiktokVideos.length?(0,s.jsx)(s.Fragment,{}):(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-full w-full font-chakra-regular mt-20 -translate-y-2",children:[(0,s.jsx)(f.BHL,{className:"lg:w-24 lg:h-24 w-20 h-20 text-muted-foreground/30"}),(0,s.jsx)("h1",{className:"font-chakra-medium text-muted-foreground mt-3",children:"No TikTok videos found"}),(0,s.jsx)("div",{className:"text-muted-foreground/75 text-sm mt-1 text-center",children:"Couldn't find any TikTok videos for this product"})]})},e.id))]})]})]}),(0,s.jsx)("div",{className:"lg:hidden pb-5 opacity-0 h-0 overflow-hidden",children:"This div is to put a padding bottom on the page, is not visible and only appears on mobile."})]})}var tO=a(12854),tZ=a(45139),tM=a(31504);let tU=tO.fC,tR=tO.xz;tO.x8;let tG=tO.h_,tL=i.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(tO.aV,{className:(0,tM.cn)("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...r,ref:t})});tL.displayName=tO.aV.displayName;let tV=(0,tZ.j)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-[90%] lg:w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-[90%] lg:w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),tH=i.forwardRef((e,t)=>{let{side:a="right",className:r,children:n,...i}=e;return(0,s.jsxs)(tG,{children:[(0,s.jsx)(tL,{}),(0,s.jsxs)(tO.VY,{ref:t,className:(0,tM.cn)(tV({side:a}),r),...i,children:[(0,s.jsxs)(tO.x8,{className:"absolute right-4 top-4 rounded-[.1rem] opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,s.jsx)(f.Pxu,{className:"h-4 w-4 text-foreground"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]}),n]})]})});tH.displayName=tO.VY.displayName;let SheetHeader=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,tM.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...a,"data-sentry-component":"SheetHeader","data-sentry-source-file":"sheet.jsx"})};SheetHeader.displayName="SheetHeader";let tq=i.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(tO.Dx,{ref:t,className:(0,tM.cn)("text-lg font-semibold text-foreground",a),...r})});tq.displayName=tO.Dx.displayName;let tW=i.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(tO.dk,{ref:t,className:(0,tM.cn)("text-sm text-muted-foreground",a),...r})});tW.displayName=tO.dk.displayName;var tQ=a(27736);function GlobalChatbot(e){let{currentUser:t,contextChargeDeclined:a}=(0,d.a)(),[r,n]=(0,i.useState)(!1),[o,l]=(0,i.useState)([]),c=(0,i.useRef)(null);async function sendMessage(s){if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){e.setTrialPopup(!0);return}let r={role:"user",content:s};l(e=>[...e,r]);let n={role:"assistant",content:"loading"};l(e=>[...e,n]);try{let e=await fetch("/api/chat?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t.accessToken)},body:JSON.stringify({message:s,convo:[...o]})});if(e.ok){let t=await e.json();console.log("API Response:",t),Array.isArray(t.answer)?l(t.answer):(console.error("Expected data.answer to be an array, but received:",t.answer),l(e=>e.slice(0,-1)))}else console.error("Error:",e.statusText),l(e=>e.slice(0,-1))}catch(e){console.error("Fetch error:",e),l(e=>e.slice(0,-1))}}return(0,i.useEffect)(()=>{c.current&&c.current.scrollIntoView({behavior:"smooth"})},[o]),(0,s.jsxs)(tU,{open:r,onOpenChange:n,children:[(0,s.jsx)(tR,{asChild:!0,children:(0,s.jsxs)(x.z,{variant:"default",size:"lg",className:"fixed lg:bottom-5 lg:right-5 bottom-2 right-2 bg-background/50 backdrop-blur-sm border border-primary text-[1rem] ".concat(r?"z-0":"z-[100]"),children:[(0,s.jsx)(tQ.Z,{className:"w-5 h-5 mr-1.5"})," Ask AI"]})}),(0,s.jsxs)(tH,{side:"right",className:"flex flex-col h-full dark border-accent",children:[(0,s.jsx)(SheetHeader,{className:"flex justify-between",children:(0,s.jsxs)("div",{children:[(0,s.jsxs)(tq,{className:"flex items-center",children:[" ",(0,s.jsx)(tQ.Z,{className:"w-5 h-5 mr-2"})," Ask AI"]}),(0,s.jsx)(tW,{className:"text-left mt-2",children:"Ask any question about Glitching or dropshipping to our AI."})]})}),(0,s.jsxs)("div",{className:"flex flex-col flex-grow",children:[(0,s.jsxs)("div",{className:"chat-content flex flex-col space-y-4 mt-4 overflow-auto flex-grow text-[.85rem] h-[52.5vh] max-h-[52.5vh] lg:h-[65vh] lg:max-h-[65vh]",children:[o.map((e,t)=>(0,s.jsx)("div",{className:"message",children:"assistant"===e.role&&"loading"===e.content?(0,s.jsxs)("div",{className:"inline-block px-4 py-2 rounded-[.1rem] bg-secondary text-secondary-foreground flex items-center",children:[(0,s.jsx)(C.Z,{className:"w-4 h-4 mr-2 animate-spin"})," AI is typing..."]}):"assistant"===e.role?(0,s.jsx)("div",{className:"inline-block px-4 py-2 pb-5 rounded-[.1rem] font-chakra-regular bg-secondary text-secondary-foreground flex flex-col gap-2",children:function(e){if("string"!=typeof e)return console.warn("Content is not a string:",e),(0,s.jsx)("span",{className:"translate-y-2",children:String(e)});let t=e.split("\n").filter(e=>""!==e.trim());return t.map((e,a)=>{let r=null,n=0;/^####\s+/.test(e)?(r="h4",n=4,e=e.replace(/^####\s+/,"")):/^###\s+/.test(e)?(r="h3",n=3,e=e.replace(/^###\s+/,"")):/^##\s+/.test(e)?(r="h2",n=2,e=e.replace(/^##\s+/,"")):/^#\s+/.test(e)&&(r="h1",n=1,e=e.replace(/^#\s+/,""));let i=e.split(/(\*\*.*?\*\*|\[.*?\]\(.*?\))/g),o=i.map((e,t)=>{if(/^\*\*.*\*\*$/.test(e))return(0,s.jsx)("span",{className:"font-bold text-blue-400 mx-[1px]",children:e.slice(2,-2)},t);let a=e.match(/\[([^\]]+)\]\((https?:\/\/[^\)]+)\)/);if(a){let[e,r,n]=a;return(0,s.jsx)("a",{href:n,targ:!0,className:"text-blue-500 underline",target:"_blank",rel:"noopener noreferrer",children:r},t)}return e});if(r){let e="translate-y-2 ".concat(1===n?"text-xl font-chakra-semibold":2===n?"text-lg font-chakra-medium":3===n?"text-base font-chakra-regular":"text-sm font-chakra-regular");return(0,s.jsx)("span",{className:e,children:o},a)}return(0,s.jsxs)("span",{className:"translate-y-2",children:[o,a!==t.length-1&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"mb-2"})})]},a)})}(e.content)}):"user"===e.role?(0,s.jsx)("span",{className:"inline-block px-4 py-2 rounded-[.1rem] font-chakra-regular bg-primary text-white",children:e.content}):null},t)),(0,s.jsx)("div",{ref:c})]}),(0,s.jsxs)("div",{className:"relative mt-4",children:[(0,s.jsx)(x.z,{size:"xs",className:"text-[.8rem] p-1 px-2",variant:"outline",onClick:()=>l([]),children:"Clear Chat"}),(0,s.jsx)(N.I,{type:"text",placeholder:"Type your message...",onKeyDown:e=>{if("Enter"===e.key&&""!==e.target.value.trim()){e.preventDefault();let t=e.target.value.trim();sendMessage(t),e.target.value=""}},className:"w-full text-[1rem] px-4 py-2 pr-10 border mt-3 rounded-[.1rem] font-chakra-regular dark focus:outline-none focus:ring-2 focus:ring-primary"}),(0,s.jsx)("button",{onClick:()=>{let e=document.querySelector('input[type="text"]');if(e&&""!==e.value.trim()){let t=e.value.trim();sendMessage(t),e.value=""}},className:"absolute bottom-2.5 right-0 flex items-center pr-3",children:(0,s.jsx)(j.Z,{className:"w-4 h-4 text-foreground"})})]})]})]})]})}function LogoMaker(e){let{currentUser:t,contextChargeDeclined:a}=(0,d.a)(),r=(0,I.ac)({maxWidth:768}),[n,o]=(0,i.useState)(""),[l,c]=(0,i.useState)(""),[u,m]=(0,i.useState)(!1),[h,p]=(0,i.useState)(null),[g,b]=(0,i.useState)(!1),[w,y]=(0,i.useState)(!1),[v,j]=(0,i.useState)(!0);(0,i.useEffect)(()=>{setTimeout(()=>{y(!0)},100)},[]);let generateLogo=async()=>{if(a){e.setPayDifferentCard(!0);return}if("no"===e.subscribed){e.setTrialPopup(!0);return}if(""===l.trim()){j(!1);return}m(!0),j(!0);try{let e=await fetch("/api/logo-maker/generate?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t.accessToken)},body:JSON.stringify({logoText:n,logoInstructions:l})});if(!e.ok)throw Error("Failed to generate logo");let a=await e.json();console.log(a),p(a.logo);return}catch(t){e.toast({title:(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,s.jsx)(es.Z,{className:"w-4 h-4 text-foreground/80"})," Error "]}),description:"Error generating logo. Refresh and try again.",variant:"destructive"}),o(""),c("")}finally{m(!1)}},removeBackground=async()=>{if(h){b(!0);try{let e=await fetch("/api/creatives-api/remove-background?uid=".concat(t.uid),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t.accessToken)},body:JSON.stringify({image_url:h})});if(!e.ok)throw Error("Failed to remove background");let a=await e.json();p(a.image)}catch(e){console.error("Error removing background:",e)}finally{b(!1)}}};return(0,s.jsxs)("div",{className:"animated-element w-full h-screen flex flex-col items-center lg:justify-center ",children:[(0,s.jsx)(MatrixGrid,{}),e.showBanner&&(0,s.jsx)("div",{className:"hidden lg:block mb-5 w-full lg:w-[60rem] transition-all duration-1000 ".concat(w?"opacity-100 translate-y-0":"opacity-0 translate-y-16 lg:-translate-y-20"),children:(0,s.jsx)(e_.Z,{})}),(0,s.jsxs)("div",{className:"w-full lg:w-[60rem] lg:h-[30rem] flex flex-col lg:flex-row items-center gap-5 lg:p-0 p-5 pb-24",children:[e.showBanner&&(0,s.jsx)("div",{className:"lg:hidden w-full lg:w-[60rem] transition-all duration-1000 ".concat(w?"opacity-100 translate-y-0":"opacity-0 translate-y-16 lg:-translate-y-20"),children:(0,s.jsx)(e_.Z,{})}),(0,s.jsx)("div",{className:"w-full lg:w-[30rem] h-[22.5rem] lg:h-[30rem] bg-background backdrop-blur-[3px] border-[2px] border-dashed border-accent  rounded-[.1rem] z-10 flex flex-col items-center justify-center shadow-lg shadow-slate-950 transition-all duration-1000 ".concat(w?"opacity-100 translate-y-0 lg:translate-x-0":"opacity-0 translate-y-20 lg:translate-y-0 lg:-translate-x-20"),children:h?(0,s.jsx)("img",{src:h,alt:"Generated Logo",className:"w-full h-full object-contain"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.BHL,{className:"lg:w-24 lg:h-24 w-20 h-20 text-muted-foreground/30"}),(0,s.jsx)("h1",{className:"font-chakra-medium text-muted-foreground mt-3",children:"No logo yet"}),(0,s.jsx)("div",{className:"text-muted-foreground/75 text-sm mt-1",children:"Your logo will appear here"})]})}),(0,s.jsx)("div",{className:"lg:w-[30rem] w-full lg:h-[30rem] rounded-[.1rem] flex flex-col bg-background border border-accent p-3 lg:p-5 transition-all duration-1000 shadow-lg shadow-slate-950 ".concat(w?"opacity-100 translate-y-0  lg:translate-x-0":"opacity-0 translate-y-20 lg:translate-y-0 lg:translate-x-20"),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"w-full bg-yellow-300 text-yellow-800 p-3 rounded-[.1rem] flex items-center gap-1.5 font-chakra-regular",children:[(0,s.jsx)(eP.Z,{className:"min-w-4 h-4"}),(0,s.jsx)("p",{className:"text-[.75rem]",children:"If you don't include a brand name, Glitching will generate one for you."})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("label",{htmlFor:"logoText",className:"text-sm text-foreground font-chakra-regular flex items-center",children:["Brand Name ",(0,s.jsx)("span",{className:"ml-1.5 text-[.75rem] border-dashed border-primary border-[1px] text-foreground px-1.5 rounded-[.1rem]",children:"Optional"})]}),(0,s.jsx)(N.I,{id:"logoText",placeholder:"Enter your brand name",className:"w-full text-foreground bg-background",value:n,onChange:e=>o(e.target.value)})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{htmlFor:"logoInstructions",className:"text-sm font-chakra-regular ".concat(v?"text-foreground":"text-red-500"," flex items-center"),children:"Logo Instructions"}),(0,s.jsx)(T.g,{id:"logoInstructions",placeholder:"Enter instructions for your logo design",className:"w-full min-h-[150px] bg-background ".concat(v?"text-foreground":"border-red-500 focus:border-red-500"),value:l,onChange:e=>{c(e.target.value),v||j(!0)}})]}),(0,s.jsx)(x.z,{className:"w-full",size:"lg",onClick:generateLogo,disabled:u,children:u?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"animate-spin mr-1.5 w-4 h-4"}),"Generating"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tu.Z,{className:"mr-1.5 w-4 h-4"}),"Generate Logo"]})}),(0,s.jsxs)("div",{className:"w-full flex flex-row gap-4 items-center justify-center",children:[(0,s.jsx)(x.z,{disabled:!h||g,className:"w-1/2",size:r?"sm":"lg",variant:"outline",onClick:removeBackground,children:g?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Z,{className:"animate-spin mr-1.5 w-4 h-4"}),"Processing"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.hHp,{className:"mr-1.5 min-w-4 h-4"}),"Remove Background"]})}),(0,s.jsxs)(x.z,{disabled:!h,className:"w-1/2",size:r?"sm":"lg",variant:"secondary",onClick:()=>{if(!h)return;let e=document.createElement("a");e.href=h,e.download="logo.png",document.body.appendChild(e),e.click(),document.body.removeChild(e)},children:[(0,s.jsx)(eU.Z,{className:"mr-1.5 w-4 h-4"}),"Download Logo"]})]})]})})]})]})}var tY=a(5152),tJ=a.n(tY);let tK=tJ()(()=>Promise.all([a.e(8151),a.e(2948),a.e(4924)]).then(a.bind(a,34924)),{loadableGenerated:{webpack:()=>[34924]},ssr:!1});function Dashboard(e){let{toast:t}=(0,t_.pm)(),{currentUser:r,getSubscription:n,getTrialStatus:l,getDiscordInfo:c,getShopifyInfo:u}=(0,d.a)(),[m,h]=(0,i.useState)(null),[p,g]=(0,i.useState)(null),[f,x]=(0,i.useState)(null),[b,w]=(0,i.useState)(null),[y,v]=(0,i.useState)(null),[j,k]=(0,i.useState)(null),[N,A]=(0,i.useState)(null),S=(0,i.useRef)(!1),[T,C]=(0,i.useState)(null),[P,D]=(0,i.useState)(null),[z,I]=(0,i.useState)(!1),[E,F]=(0,i.useState)(!1),[B,_]=(0,i.useState)(null),[O,Z]=(0,i.useState)(null),[M,U]=(0,i.useState)(null),[R,G]=(0,i.useState)(null),[L,V]=(0,i.useState)(null),[H,q]=(0,i.useState)(null),[W,Q]=(0,i.useState)(""),[Y,J]=(0,i.useState)(null),[K,X]=(0,i.useState)(""),$=(0,o.useRouter)(),ee=(0,i.useRef)(null),[et,ea]=(0,i.useState)("USD"),[es,er]=(0,i.useState)(19.99),[en,ei]=(0,i.useState)("USD"),[eo,el]=(0,i.useState)(99.99);return(0,i.useEffect)(()=>{let fetchLocation=async()=>{let e=await fetch("/api/misc/location"),{geo:t}=await e.json(),s=a(10449).Z,r=a(28853).Z,n=s.find(e=>e.country_code===t),i=r.find(e=>e.country_code===t);n&&(ea(n.currency_code),er(n.currency_amount)),i&&(ei(i.currency_code),el(i.currency_amount))};fetchLocation()},[]),(0,i.useEffect)(()=>{h($.query.location)},[$.query.location]),(0,i.useEffect)(()=>{if(!0===f){ee.current.style.pointerEvents="none";return}ee.current.style.pointerEvents=""},[f]),(0,i.useEffect)(()=>{r&&(n(r).then(e=>{g(e)}),l(r).then(e=>{if(!e)return}),c(r).then(e=>{e?(J(e),Q(e.userName),C(e.lastPopupDate)):J({userName:void 0,id:void 0,popup1:!1,popup2:!1,popup3:!1,popup4:!1,popup5:!1,lastPopupDate:r.metadata.creationTime})}),u(r).then(e=>{_(e),e?F(!1):F(!0)}))},[r]),(0,i.useEffect)(()=>{let e=localStorage.getItem("userSplitTestLetter");if(X(e),!e){let e=.5>Math.random()?"A":"B";X(e),localStorage.setItem("userSplitTestLetter",e)}},[]),(0,i.useEffect)(()=>{"no"!==p&&(e=>{if(r&&Y&&(void 0===Y.userName||void 0===Y.id)&&!N){let e=new Date(T||r.metadata.creationTime),t=new Date().getTime(),a=null;for(let s of[{days:1,popup:"popup1"},{days:3,popup:"popup2"},{days:7,popup:"popup3"},{days:14,popup:"popup4"},{days:21,popup:"popup5"}]){let r=new Date(e.getTime()+864e5*s.days),n=t>=r.getTime();if(n&&!Y[s.popup]){a=s.popup;break}}if(a&&!S.current){k(a),S.current=!0;let e=setTimeout(()=>{v(!0)},5e3);return()=>clearTimeout(e)}}})(0)},[r,Y,N,T]),(0,i.useEffect)(()=>{if(f){$.push("/choose-plan");return}},[f,$]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(DiscordPopup,{discordPopup:b,setDiscordPopup:w,discordUserName:W}),(0,s.jsx)(join_discord_DiscordPopup,{joinDiscordPopup:y,setJoinDiscordPopup:v,currentPopup:j,setCurrentPopup:k,setDiscordInfo:J,setPopupInteracted:A,setPopupDate:C}),(0,s.jsx)(SavePayment,{toast:t,payDifferentCard:H,setPayDifferentCard:q}),(0,s.jsx)(tb.Z,{toast:t,caseStudyPopup:P,setCaseStudyPopup:D,setAccessGranted:I,fromPay:!1}),(0,s.jsx)(CancelSubPaddle,{toast:t,cancelPopup:O,setCancelPopup:Z,setCancelledFromPopup:U}),(0,s.jsx)(ReactivationPopup,{toast:t,reactivationPopup:R,setReactivationPopup:G,setReactivatedFromPopup:V}),(0,s.jsxs)("div",{ref:ee,className:"dark h-[100%] flex lg:flex-row flex-col w-full lg:max-h-full",children:[(0,s.jsx)(tB.x,{}),!O&&(0,s.jsx)(GlobalChatbot,{subscribed:p,payDifferentCard:H,setTrialPopup:x}),m&&"checkout"!==m&&"checkout-2"!==m&&(0,s.jsx)(DashboardBar,{subscribed:p,discordInfo:Y,showBanner:E,setShowBanner:F}),(0,s.jsx)("div",{className:"lg:hidden w-screen mt-16 pt-2"}),m&&"contact-us"===m?(0,s.jsx)(ContactForm,{showBanner:E,toast:t}):m&&"course"===m?(0,s.jsx)(Course,{toast:t,setPayDifferentCard:q,subscribed:p,setTrialPopup:x,setCaseStudyPopup:D,accessGranted:z,setAccessGranted:I,showBanner:E,setShowBanner:F}):m&&"account-settings"===m?(0,s.jsx)(PaddleAccountSettings,{toast:t,subscribed:p,setCancelPopup:Z,cancelledFromPopup:M,setDiscordPopup:w,setTrialPopup:x,setDiscordUserName:Q,showBanner:E,setReactivationPopup:G,reactivatedFromPopup:L}):m&&"store-builder"===m?(0,s.jsx)(ProductPage,{toast:t,setPayDifferentCard:q,subscribed:p,setTrialPopup:x,showBanner:E,letter:K}):m&&"my-products"===m?(0,s.jsx)(MyProducts,{toast:t,setPayDifferentCard:q,subscribed:p,setTrialPopup:x,showBanner:E,letter:K}):m&&"automatic-mode"===m?(0,s.jsx)(AutomaticMode,{setPayDifferentCard:q,subscribed:p,setTrialPopup:x,showBanner:E,letter:K,toast:t}):m&&"dashboard"===m?(0,s.jsx)(NewDashboard,{setDiscordPopup:w,subscribed:p,setTrialPopup:x,setDiscordUserName:Q,showBanner:E}):m&&"integrations"===m?(0,s.jsx)(Integrations,{subscribed:p,toast:t,setShowBanner:F,showBanner:E}):m&&"product-db"===m?(0,s.jsx)(ProductDb,{subscribed:p,showBanner:E,setPayDifferentCard:q,setTrialPopup:x,toast:t}):m&&"import-products"===m?(0,s.jsx)(ImportProducts,{subscribed:p,showBanner:E,setTrialPopup:x,setPayDifferentCard:q,toast:t}):m&&"report-bug"===m?(0,s.jsx)(ReportBug,{toast:t,subscribed:p,setTrialPopup:x,setPayDifferentCard:q}):m&&"find-competitors"===m?(0,s.jsx)(FindCompetitors,{toast:t,showBanner:E,subscribed:p,setTrialPopup:x,setPayDifferentCard:q}):m&&"find-tiktoks"===m?(0,s.jsx)(FindTikToks,{toast:t,showBanner:E,subscribed:p,setTrialPopup:x,setPayDifferentCard:q}):m&&"ai-image-editor"===m?(0,s.jsx)(tK,{toast:t,showBanner:E,subscribed:p,setTrialPopup:x,setPayDifferentCard:q}):m&&"logo-maker"===m?(0,s.jsx)(LogoMaker,{toast:t,showBanner:E,subscribed:p,setTrialPopup:x,setPayDifferentCard:q}):(0,s.jsx)(s.Fragment,{})]})]})}function MatrixGrid(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"jsx-c80fc5371d1baec4 fixed inset-0 overflow-hidden pointer-events-none -z-10",children:[(0,s.jsx)("div",{className:"jsx-c80fc5371d1baec4 absolute inset-0 bg-gradient-to-b from-background via-blue-900/20 to-background"}),(0,s.jsx)("div",{style:{backgroundImage:"\n                                linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),\n                                linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px)\n                            ",backgroundSize:"60px 60px",maskImage:"linear-gradient(to bottom, transparent, white 40%, white 100%, transparent)",WebkitMaskImage:"linear-gradient(to bottom, transparent, white 40%, white 100%, transparent)"},className:"jsx-c80fc5371d1baec4 absolute inset-0"})]}),(0,s.jsxs)("div",{className:"jsx-c80fc5371d1baec4 fixed inset-0 overflow-hidden pointer-events-none -z-10",children:[(0,s.jsx)("div",{className:"jsx-c80fc5371d1baec4 absolute inset-0 bg-gradient-to-b from-background via-blue-900/5 to-background"}),(0,s.jsx)("div",{style:{backgroundImage:"\n                                linear-gradient(to bottom, rgba(37,99,235,0.07) 1px, transparent 1px)\n                            ",backgroundSize:"1px 5px",animation:"rainEffect 0.5s linear infinite",maskImage:"linear-gradient(to bottom, transparent, white 25%, white 60%, transparent)",WebkitMaskImage:"linear-gradient(to bottom, transparent, white 25%, white 60%, transparent)"},className:"jsx-c80fc5371d1baec4 absolute inset-0"})]}),(0,s.jsx)(n(),{id:"c80fc5371d1baec4",children:"@-webkit-keyframes rainEffect{0%{background-position:0 0}100%{background-position:0 10px}}@-moz-keyframes rainEffect{0%{background-position:0 0}100%{background-position:0 10px}}@-o-keyframes rainEffect{0%{background-position:0 0}100%{background-position:0 10px}}@keyframes rainEffect{0%{background-position:0 0}100%{background-position:0 10px}}"})]})}}}]);