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,OAAO,CAAC+C,KAAK,GAGrEiF,CAAAA,MAAAA,EAAAA,KAAAA,EAAAA,OAAAA,CAAAA,EAAAA,EAAaQ,MAAM,GAAnBR,KAAAA,IAAAA,EAAAA,KAAAA,EAAAA,EAAqBrI,IAAI,IAAK8I,EAAAA,UAAUA,CAACC,IAAI,EAC/CR,CAAAA,EAAWF,MAAAA,EAAAA,KAAAA,EAAAA,OAAAA,CAAAA,EAAAA,EAAaQ,MAAM,GAAnBR,KAAAA,IAAAA,EAAAA,KAAAA,EAAAA,EAAqBvI,KAAK,EAGnCuI,CAAAA,MAAAA,EAAAA,KAAAA,EAAAA,OAAAA,CAAAA,EAAAA,EAAaQ,MAAM,GAAnBR,KAAAA,IAAAA,EAAAA,KAAAA,EAAAA,EAAqBrI,IAAI,IAAK8I,EAAAA,UAAUA,CAACE,UAAU,EACrDT,CAAAA,EAAW,CAACF,MAAAA,EAAAA,KAAAA,EAAAA,EAAaQ,MAAM,CAAC/I,KAAK,EAAG,IAAOwI,CAAAA,EAG1C,CACLA,SAAUA,EAASW,OAAO,CAAC,GAC3BV,SAAUA,EAASU,OAAO,CAAC,GAC3BC,MAAO,CAACZ,EAAWC,CAAAA,EAAUU,OAAO,CAAC,EACvC,CACF","sources":["webpack://_N_E/ignored|/codebuild/output/src2805891505/src/alien-wardrobe/node_modules/next/dist/shared/lib/router|./utils/resolve-rewrites","webpack://_N_E/./components/CallToAction.tsx","webpack://_N_E/./components/product/ProductCard.tsx","webpack://_N_E/./components/ui/button.tsx","webpack://_N_E/./components/ui/card.tsx","webpack://_N_E/./lib/utils.ts"],"sourcesContent":["/* (ignored) */","\"use client\"\n\nimport { useState } from \"react\"\nimport Image from \"next/image\"\nimport axios from \"axios\"\nimport { event } from \"nextjs-google-analytics\"\nimport PhoneInput from \"react-phone-number-input\"\nimport { toast } from \"sonner\"\n\nimport { Card, CardContent, CardHeader } from \"@/components/ui/card\"\n\nimport { Button } from \"./ui/button\"\nimport { Input } from \"./ui/input\"\n\nconst MyIcon = () => (\n
\n \n
\n)\n\nconst CallToAction = () => {\n const [subscriberPhone, setSubscriberPhone] = useState(\"\")\n\n const storeSubscriberPhone = async () => {\n if (subscriberPhone === \"\") toast.error(\"Please enter a valid phone number\")\n\n const res = await axios.post(\"/api/movement\", {\n phone: subscriberPhone,\n })\n\n event(\"join_alien_wardrobe_movement\", {\n category: \"phone\",\n label: subscriberPhone,\n })\n\n if (res.status === 201) toast.success(\"Thanks for subscribing 🎉\")\n else toast.error(\"Something went wrong. Please try later.\")\n\n setSubscriberPhone(\"\")\n }\n\n return (\n
\n \n {/* */}\n \n

\n Join our{\" \"}\n \n Alien Wardrobe Movement\n \n

\n

\n Unlock exclusive perks including early access to new arrivals, and\n subscriber-only discounts.\n

\n
\n \n {/* setSubscriberPhone(e.target.value)}\n value={subscriberPhone}\n />*/}\n \n setSubscriberPhone(value as string)\n }\n value={subscriberPhone}\n />\n \n Subscribe\n \n \n
\n
\n )\n}\n\nexport default CallToAction\n","\"use client\"\n\nimport Image from \"next/image\"\nimport { useRouter } from \"next/navigation\"\nimport axios from \"axios\"\nimport { useSession } from \"next-auth/react\"\nimport { PiHeart, PiHeartFill } from \"react-icons/pi\"\nimport { toast } from \"sonner\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\"\n\ntype ProductCardType = {\n product: any\n className?: string\n isWishlistPage?: boolean,\n refresh : any\n}\n\ninterface ProductImage {\n s3Path: string\n fileName: string\n productSKU: string\n type: string\n order: number\n}\n\nexport default function ProductCard({\n product,\n className,\n isWishlistPage = false,\n refresh\n}: ProductCardType) {\n const { data: session } = useSession()\n const router = useRouter()\n\n const addToWishlist = async (productId: string, isRemove: boolean) => {\n await axios\n .post(`/api/wishlist?isRemove=${isRemove}`, {\n productId,\n })\n .then((response) => {\n if (response.status === 200 && !isRemove) {\n toast.success(\"Added to wishlist\")\n }\n if (response.status === 200 && isRemove) {\n toast.success(\"Removed from wishlist\")\n }\n refresh();\n //if (fetchData) fetchData()\n })\n .catch((e) => {\n toast.error(`Failed to ${isRemove ? \"remove\" : \"add\"} to wishlist`)\n })\n }\n\n if (!product) return null\n return (\n {window.location.href = `/products/${product.id}`; console.log(\"parent calling\")}}\n >\n \n \n image.order === 1\n )?.s3Path || \"/assets/images/apparel_1.jpeg\"\n }`}\n alt={product.name}\n width={500}\n height={300}\n />\n \n \n \n
\n

\n {product.name?.split(\"-\")[0] || \"Unknown Product\"}
\n \n {product.name?.split(\"-\")[1] || \"\"}\n {product.name?.split(\"-\")[2]\n ? \" - \" + product.name.split(\"-\")[2]\n : \"\"}\n \n (\n {product.fit\n ? product.fit.charAt(0).toUpperCase() +\n product.fit.slice(1).toLowerCase()\n : \"Unknown\"}\n )\n \n \n

\n\n {session ? (\n {\n e.stopPropagation()\n console.log(\"heart clicked\")\n if (!session) {\n toast.error(\"Please login to add to wishlist\")\n } else if (\n isWishlistPage ||\n (product.wishlistItems &&\n product.wishlistItems[0] &&\n product.wishlistItems[0].userId === session?.user.id)\n ) {\n addToWishlist(product.id, true)\n } else {\n addToWishlist(product.id, false)\n }\n }}\n >\n {isWishlistPage ||\n (product.wishlistItems &&\n product.wishlistItems[0] &&\n product?.wishlistItems[0].userId === session?.user.id) ? (\n \n ) : (\n \n )}\n \n ) : null}\n
\n\n

\n ₹ {product.price}\n \n * Inclusive of tax\n \n

\n
\n \n )\n}\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes,\n VariantProps {\n asChild?: boolean\n}\n\nconst Button = React.forwardRef(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n \n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCard.displayName = \"Card\"\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCardHeader.displayName = \"CardHeader\"\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCardTitle.displayName = \"CardTitle\"\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCardDescription.displayName = \"CardDescription\"\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n
\n))\nCardContent.displayName = \"CardContent\"\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCardFooter.displayName = \"CardFooter\"\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\n","import { CouponType } from \"@prisma/client\"\nimport axios from \"axios\"\nimport bcrypt from \"bcryptjs\"\nimport { clsx, type ClassValue } from \"clsx\"\nimport { toast } from \"sonner\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\nexport async function verifyPassword(\n inputPassword: string,\n storedPassword: string\n) {\n return await bcrypt.compare(inputPassword, storedPassword)\n}\n\nexport const initiateTransaction = async (\n amount: number,\n type: string,\n walletId: string,\n customerEmail: string\n): Promise => {\n const res = await initializeRazorpay()\n if (!res) {\n alert(\"Razorpay SDK Failed to load\")\n return false\n }\n\n const { data } = await axios.post(\"/api/razorpay\", { amount })\n\n return new Promise((resolve, reject) => {\n var options = {\n key: process.env.NEXT_PUBLIC_RAZORPAY_KEY_ID,\n name: \"Alien Wardrobe\",\n currency: data.currency,\n amount: data.amount,\n order_id: data.id,\n description: \"Thank you for your test donation\",\n image: \"https://picsum.photos/seed/JljD8cVy/640/480\",\n handler: async function (response: {\n razorpay_payment_id: any\n razorpay_order_id: any\n razorpay_signature: any\n }) {\n try {\n const transaction = await axios.post(\"/api/transaction\", {\n type: type,\n amount: amount,\n walletId: walletId,\n })\n\n const payment = await axios.post(\"/api/payment\", {\n rpReferenceId: response.razorpay_payment_id,\n rpPaymentId: response.razorpay_order_id,\n amount: data.amount,\n transactionId: transaction.data.data.id,\n })\n\n if (payment.status === 200 && transaction.status === 200) {\n const updateWallet = await axios.put(`/api/wallet/`, {\n amount: amount,\n })\n\n if (updateWallet.status === 200) {\n toast.success(\"Payment Successful! Thank you for your topup.\")\n resolve(true)\n }\n } else {\n throw new Error(\"Payment process failed\")\n }\n } catch (error) {\n console.error(\"Payment handler error: \", error)\n toast.error(\"Payment processing failed. Please try again.\")\n resolve(false)\n }\n },\n prefill: {\n name: \"Alien Wardrobe Admin\",\n email: customerEmail,\n },\n modal: {\n ondismiss: async function () {\n toast.success(\"Transaction Cancelled\")\n\n resolve(false)\n },\n },\n }\n\n const paymentObject = new (window as any).Razorpay(options)\n paymentObject.open()\n })\n}\n\nconst initiatePayment = async (\n amount: any,\n orderId: string,\n customerEmail: string,\n customerPhone: string\n): Promise => {\n const res = await initializeRazorpay()\n if (!res) {\n alert(\"Razorpay SDK Failed to load\")\n return false\n }\n\n const { data } = await axios.post(\"/api/razorpay\", { amount })\n\n return new Promise((resolve, reject) => {\n var options = {\n key: process.env.NEXT_PUBLIC_RAZORPAY_KEY_ID,\n name: \"Alien Wardrobe\",\n currency: data.currency,\n amount: data.amount,\n order_id: data.id,\n description: \"Thank you for your test donation\",\n image: \"https://picsum.photos/seed/JljD8cVy/640/480\",\n handler: async function (response: {\n razorpay_payment_id: any\n razorpay_order_id: any\n razorpay_signature: any\n }) {\n try {\n const updateOrderStatus = await axios.put(`/api/order/${orderId}`, {\n status: \"PAID\",\n })\n const payment = await axios.post(\"/api/payment\", {\n rpReferenceId: response.razorpay_payment_id,\n rpPaymentId: response.razorpay_order_id,\n amount: data.amount,\n orderId,\n })\n const clearCart = await axios.delete(\"/api/cart?clearAll=true\")\n\n if (\n payment.status === 200 &&\n updateOrderStatus.status === 200 &&\n clearCart.status === 200\n ) {\n //toast.success(\"Payment Successful! Thank you for your order.\")\n resolve(true)\n } else {\n throw new Error(\"Payment process failed\")\n }\n } catch (error) {\n console.error(\"Payment handler error: \", error)\n toast.error(\"Payment processing failed. Please try again.\")\n resolve(false)\n }\n },\n prefill: {\n name: \"Alien Wardrobe Admin\",\n email: customerEmail,\n contact: customerPhone,\n },\n modal: {\n ondismiss: async function () {\n const updateOrderStatus = await axios.put(`/api/order/${orderId}`, {\n status: \"CANCELLED\",\n })\n if (updateOrderStatus.status === 200) {\n toast.success(\"Order Cancelled\")\n }\n resolve(false)\n },\n },\n }\n\n const paymentObject = new (window as any).Razorpay(options)\n paymentObject.open()\n })\n}\n\nconst initializeRazorpay = () => {\n return new Promise((resolve) => {\n const script = document.createElement(\"script\")\n script.src = \"https://checkout.razorpay.com/v1/checkout.js\"\n script.onload = () => {\n resolve(true)\n }\n script.onerror = () => {\n resolve(false)\n }\n document.body.appendChild(script)\n })\n}\n\n/**\n * Util function to validate coupon\n * @param coupon - existing coupon object\n * @param body - incoming request {code: \"ABCD\", value: 100}\n * @param session - user session\n * @returns void\n */\nconst validateCoupon = (coupon: any, value: any, session: any): void => {\n // check order value\n if (value < coupon.miniumOrderValue || value > coupon.maximumOrderValue) {\n throw new Error(\n `Order value must be ${coupon.miniumOrderValue}-${coupon.maximumOrderValue}`\n )\n }\n\n // check token expiry\n const currentDate = new Date()\n if (currentDate < coupon.startDate || currentDate > coupon.endDate) {\n throw new Error(\"Coupon has expired\")\n }\n\n // check maximum usage\n const usageCount = coupon.orders.filter(\n (order: any) => order.userId === session?.user?.id\n ).length\n console.log(\"Usage count :: \", usageCount)\n if (usageCount >= coupon.maximumUsage) {\n console.log(\"Coupon exceeds usage limit\")\n throw new Error(\n \"Sorry, this coupon code has exceeded the maximum allowed usage limit.\"\n )\n }\n\n console.log(\"Coupon is valid\")\n}\n\nconst getPriceDetails = (cartDetails: any) => {\n let subTotal = 0\n let discount = 0\n cartDetails?.cartItems?.map((item: any) => {\n subTotal = subTotal + item.quantity * item.productVariant.product.price\n })\n\n if (cartDetails?.coupon?.type === CouponType.FLAT) {\n discount = cartDetails?.coupon?.value\n }\n\n if (cartDetails?.coupon?.type === CouponType.PERCENTAGE) {\n discount = (cartDetails?.coupon.value / 100) * subTotal\n }\n\n return {\n subTotal: subTotal.toFixed(2),\n discount: discount.toFixed(2),\n total: (subTotal - discount).toFixed(2),\n }\n}\n\nconst encodeSKU = (sku: string): string => {\n return sku.replace(/\\//g, \":\")\n}\n\nconst decodeSKU = (encodedSKU: string): string => {\n return encodedSKU.replace(/:/g, \"/\")\n}\n\nexport {\n initiatePayment,\n validateCoupon,\n getPriceDetails,\n encodeSKU,\n decodeSKU,\n}\n"],"names":["MyIcon","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","div","className","Image","src","alt","__webpack_exports__","Z","subscriberPhone","setSubscriberPhone","useState","storeSubscriberPhone","toast","error","res","axios","post","phone","event","category","label","status","success","section","jsxs","Card","CardHeader","h2","span","p","CardContent","PhoneInput","placeholder","defaultCountry","internationalIcon","onChange","value","Button","type","variant","onClick","ProductCard","param","product","isWishlistPage","refresh","data","session","useSession","useRouter","addToWishlist","productId","isRemove","concat","then","response","catch","cn","window","location","href","id","console","log","CardTitle","img","process","productImages","find","image","order","s3Path","name","width","height","split","br","fit","charAt","toUpperCase","slice","toLowerCase","size","e","stopPropagation","wishlistItems","userId","user","PiHeartFill","PiHeart","price","buttonVariants","cva","variants","default","destructive","outline","secondary","ghost","link","sm","lg","icon","defaultVariants","React","ref","asChild","props","Comp","Slot","displayName","h3","CardDescription","CardFooter","_len","arguments","length","inputs","_key","twMerge","clsx","verifyPassword","inputPassword","storedPassword","bcrypt","initiateTransaction","amount","walletId","customerEmail","initializeRazorpay","alert","Promise","resolve","reject","options","key","currency","order_id","description","handler","transaction","payment","rpReferenceId","razorpay_payment_id","rpPaymentId","razorpay_order_id","transactionId","updateWallet","put","prefill","email","modal","ondismiss","paymentObject","Razorpay","open","initiatePayment","orderId","customerPhone","updateOrderStatus","clearCart","delete","contact","script","document","createElement","onload","onerror","body","appendChild","getPriceDetails","cartDetails","subTotal","discount","cartItems","map","item","quantity","productVariant","coupon","CouponType","FLAT","PERCENTAGE","toFixed","total"],"sourceRoot":""}