PageSourceSearch

https://www.hajurbuwa.com/_next/static/chunks/pages/order-again-c53f730fe4d3ab75.js

js hajurbuwa.com collected 2026-10-02 01:32:28 UTC 15,912 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3318],{2413:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/order-again",function(){return t(3424)}])},416:function(e,a,t){"use strict";t.d(a,{Z:function(){return i}});var r=t(5893),n=t(9008),l=t.n(n),o=t(348),s=t(5651),c=t(4605);function i(e){let{type:a,name:t,path:n,image:i,titleOverride:u,descriptionOverride:p,keywordsOverride:d,noindex:h}=e,b=null!=u?u:(0,s.T$)(a,t),w=null!=p?p:(0,s.$O)(a,t),m=d?d.join(", "):(0,c.Q9)(a,t),g="".concat(o._O).concat(n),j=null!=i?i:o.R9;return(0,r.jsxs)(l(),{children:[(0,r.jsx)("title",{children:b}),(0,r.jsx)("meta",{name:"description",content:w}),(0,r.jsx)("meta",{name:"keywords",content:m}),h&&(0,r.jsx)("meta",{name:"robots",content:"noindex, follow"}),(0,r.jsx)("link",{rel:"canonical",href:g}),(0,r.jsx)("meta",{property:"og:title",content:b}),(0,r.jsx)("meta",{property:"og:description",content:w}),(0,r.jsx)("meta",{property:"og:url",content:g}),(0,r.jsx)("meta",{property:"og:type",content:"product"===a?"product":"website"}),(0,r.jsx)("meta",{property:"og:image",content:j}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{name:"twitter:title",content:b}),(0,r.jsx)("meta",{name:"twitter:description",content:w}),(0,r.jsx)("meta",{name:"twitter:image",content:j})]})}},3424:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return v}});var r=t(5893),n=t(7294),l=t(1163),o=t(3636),s=t(9558),c=t(416),i=t(7393),u=t(9407),p=t(6883),d=t(1053),h=t(348),b=t(7503),w=t(148),m=t(8681),g=t(2179);function j(e){let{title:a,items:t}=e;return(null==t?void 0:t.length)?(0,r.jsxs)("div",{className:"".concat(h.mr," mb-4"),children:[(0,r.jsx)("h2",{className:"mb-3 text-base font-bold text-black",children:a}),(0,r.jsx)("div",{className:"flex gap-3 overflow-x-auto snap-x pb-2 sm:grid sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 sm:gap-4 sm:overflow-visible sm:pb-0",children:(0,w.s6)(t,e=>e.stock_availability).map(e=>{var a,t,n;return(0,r.jsx)("div",{className:"w-[45%] shrink-0 snap-start sm:w-auto sm:shrink",children:(0,r.jsx)(i.Z,{id:null!==(a=e.id)&&void 0!==a?a:e.product_id,name:null!==(t=e.name)&&void 0!==t?t:e.product_name,image:(0,d.CO)(e.cover_image),unit:e.unit,price:(0,b.mt)(e),stockAvailability:e.stock_availability,...(0,b.q7)(e)})},null!==(n=e.id)&&void 0!==n?n:e.product_id)})})]}):null}function f(e){var a,t,l,o,s,c,i,u,b;let{bundle:w,onAdded:g}=e,{showToast:j}=(0,p.p)(),[f,v]=(0,n.useState)(!1),x=async()=>{var e,a,t,r;v(!0);let n=0;for(let t of null!==(e=w.items)&&void 0!==e?e:[])try{await (0,m.dA)(t.product_id,null!==(a=t.quantity)&&void 0!==a?a:1),n+=1}catch(e){}v(!1),g(),j(n===(null!==(t=w.items)&&void 0!==t?t:[]).length?"Added to cart":"Added ".concat(n," of ").concat((null!==(r=w.items)&&void 0!==r?r:[]).length," items"))};return(0,r.jsxs)("div",{className:"".concat(h.mr," flex min-w-[280px] max-w-sm flex-col"),children:[(0,r.jsx)("h3",{className:"mb-1 text-base font-bold text-black",children:"due"===w.kind?"Due for a top-up":"regulars"===w.kind?"Your regulars":w.category_name?"More ".concat(w.category_name):"Buy again"}),(0,r.jsxs)("p",{className:"mb-3 text-sm text-grey",children:[null!==(s=null!==(o=w.item_count)&&void 0!==o?o:null===(a=w.items)||void 0===a?void 0:a.length)&&void 0!==s?s:0," items",w.total?" \xb7 Rs ".concat(Number(w.total).toLocaleString("en-IN")):""]}),(0,r.jsx)("div",{className:"mb-3 flex -space-x-2",children:(null!==(c=w.items)&&void 0!==c?c:[]).slice(0,5).map(e=>{let a=(0,d.CO)(e.cover_image);return a?(0,r.jsx)("img",{src:a,alt:"",className:"h-10 w-10 rounded-full border-2 border-white object-cover"},e.product_id):(0,r.jsx)("span",{className:"h-10 w-10 rounded-full border-2 border-white bg-box"},e.product_id)})}),(0,r.jsxs)("ul",{className:"mb-3 flex-1 space-y-1 text-sm text-grey",children:[(null!==(i=w.items)&&void 0!==i?i:[]).slice(0,3).map(e=>{var a;return(0,r.jsxs)("li",{className:"truncate",children:[null!==(a=e.quantity)&&void 0!==a?a:1," \xd7 ",e.product_name]},e.product_id)}),(null!==(u=null===(t=w.items)||void 0===t?void 0:t.length)&&void 0!==u?u:0)>3&&(0,r.jsxs)("li",{children:["+",(null!==(b=null===(l=w.items)||void 0===l?void 0:l.length)&&void 0!==b?b:0)-3," more"]})]}),(0,r.jsx)("button",{type:"button",onClick:x,disabled:f,className:"rounded-full bg-primary px-5 py-2 text-sm font-semibold text-white disabled:opacity-50",children:f?"Adding…":"Add all to cart"})]})}var v=(0,s.Z)(function(e){var a,t,s,i,d;let{access:b,initialiseBase:w}=e,m=(0,l.useRouter)(),{refresh:v}=(0,u.j)(),{showToast:x}
1=(0,p.p)(),[y,N]=(0,n.useState)(null),[k,H]=(0,n.useState)(!0),[_,S]=(0,n.useState)(null);(0,n.useEffect)(()=>{m.isReady&&(w(),g.M.get("/buyer/order-again").then(e=>{var a,t;return null!==(t=null===(a=e.data)||void 0===a?void 0:a.data)&&void 0!==t?t:null}).then(N).catch(()=>N(null)).finally(()=>H(!1)))},[m.isReady]);let O=async e=>{S(e);try{let{added:a,skipped:t}=await g.M.post("/buyer/reorder/".concat(e)).then(e=>{var a,t,r,n,l,o;let s=e.data;return{added:null!==(n=null!==(r=null==s?void 0:null===(a=s.data)||void 0===a?void 0:a.added)&&void 0!==r?r:null==s?void 0:s.added)&&void 0!==n?n:[],skipped:null!==(o=null!==(l=null==s?void 0:null===(t=s.data)||void 0===t?void 0:t.skipped)&&void 0!==l?l:null==s?void 0:s.skipped)&&void 0!==o?o:[]}});await v(),x(t.length?"".concat(a.length," added, ").concat(t.length," unavailable"):"".concat(a.length," items added to cart"))}catch(e){x("Could not reorder")}finally{S(null)}},B=null!==(t=null==y?void 0:y.bundles)&&void 0!==t?t:[],P=null!==(s=null==y?void 0:y.previous_orders)&&void 0!==s?s:[],C=!k&&!B.length&&!P.length&&!(null==y?void 0:null===(a=y.bestsellers)||void 0===a?void 0:a.length);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.Z,{type:"page",name:"Order again",path:"/order-again",noindex:!0}),(0,r.jsx)(o.Z,{backTitle:"Order again",wholePageLoader:k,accessGranted:b.accessGranted,children:(0,r.jsxs)("div",{className:"py-4",children:[(0,r.jsx)("h1",{className:"mb-1 text-xl font-bold text-black",children:"Order again"}),(0,r.jsx)("p",{className:"mb-4 text-sm text-grey",children:"Your usual basket, rebuilt at today's prices."}),C?(0,r.jsx)("p",{className:"py-12 text-center text-grey",children:b.accessGranted?"Nothing to reorder yet.":"Sign in to see your usual basket."}):(0,r.jsxs)(r.Fragment,{children:[B.length>0&&(0,r.jsx)("div",{className:"mb-4 flex gap-4 overflow-x-auto pb-2",children:B.map(e=>(0,r.jsx)(f,{bundle:e,onAdded:v},e.id))}),P.length>0&&(0,r.jsxs)("div",{className:"".concat(h.mr," mb-4"),children:[(0,r.jsx)("h2",{className:"mb-3 text-base font-bold text-black",children:"Previous orders"}),(0,r.jsx)("div",{className:"divide-y divide-backgroundColor",children:P.map(e=>{var a,t,n,l;return(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 py-3",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"truncate text-sm font-bold text-black",children:null!==(t=e.order_code)&&void 0!==t?t:"Order #".concat(e.order_id)}),(0,r.jsxs)("div",{className:"text-xs text-grey",children:[e.created_at," \xb7 ",null!==(l=null!==(n=e.total_items)&&void 0!==n?n:null===(a=e.products)||void 0===a?void 0:a.length)&&void 0!==l?l:0," items",e.total_amount?" \xb7 Rs ".concat(Number(e.total_amount).toLocaleString("en-IN")):""]})]}),(0,r.jsx)("button",{type:"button",onClick:()=>O(e.order_id),disabled:_===e.order_id,className:"shrink-0 rounded-full border border-gray-300 px-4 py-1.5 text-sm font-semibold hover:text-primary disabled:opacity-50",children:_===e.order_id?"Adding…":"Reorder"})]},e.order_id)})})]}),(0,r.jsx)(j,{title:"Bestsellers",items:null!==(i=null==y?void 0:y.bestsellers)&&void 0!==i?i:[]}),(0,r.jsx)(j,{title:"People also bought",items:null!==(d=null==y?void 0:y.people_also_bought)&&void 0!==d?d:[]})]})]})})]})})},5651:function(e,a,t){"use strict";t.d(a,{$O:function(){return c},PY:function(){return l},T$:function(){return s}});var r=t(4605);let n={product:"this product",store:"this store",category:"this category",brand:"these products",collection:"these products",search:"these products",home:"Hajurbuwa",page:"this page",ranking:"top rankings",campaign:"this sale",groupOrder:"this group buy"};function l(e,a){let t=a||n[e];switch(e){case"product":return"Buy ".concat(t," at best wholesale price in Nepal with Hajurbuwa app");case"store":return"Shop from ".concat(t," at best wholesale prices in Nepal with Hajurbuwa app");case"category":return"Buy ".concat(t," at the best wholesale prices in Nepal with Hajurbuwa app");case"brand":return"Buy ".concat(t," products at the best wholesale prices in Nepal with Hajurbuwa app");case"collection":return"Explore ".concat(t," at the best wholesale prices in Nepal with Hajurbuwa app");case"search":return"Find ".concat(t," at the best wholesale prices in Nepal with Hajurbuwa app");case"home":return"Shop wholesale prices in Nepal with the Hajurbuwa app";case"page":return"".concat(t," — Hajurbuwa, Nepal's wholesale marketplace for shops and retailers");case"ranking":return a?"Check out the top-ranked ".concat(a," products at wholesale price in Nepal with Hajurbuwa app"):"Check out ".concat(t," at wholesale price in Nepal with Hajurbuwa app");case"campaign":return"Check out ".concat(t," at the best wholesale prices in Nepal with Hajurbuwa app");case"groupOrder":return"Join my group buy for ".concat(t," at the best wholesale price in Nepal with Hajurbuwa app")}}function o(e,a,t){var r;let n="".concat(e).concat(a);if(n.length<=60)return n;let l="".concat(e).concat(t);return l.length<=60?l:"".concat((r=60-t.length,e.length<=r?e:"".concat(e.slice(0,Math.max(0,r-1)).trimEnd(),"…"))).concat(t)}function s(e,a){switch(e){case"product":return a?o(a," | Wholesale Price in Nepal | Hajurbuwa"," | Hajurbuwa"):"Wholesale Products in Nepal | Hajurbuwa";case"brand":return a?o(a," Wholesale Price in Nepal | Hajurbuwa"," | Hajurbuwa"):"Wholesale Brands in Nepal | Hajurbuwa";case"category":return a?o(a," Wholesale in Nepal | Hajurbuwa"," | Hajurbuwa"):"Wholesale Products in Nepal | Hajurbuwa";case"store":return a?o(a," | Wholesale Seller in Nepal | Hajurbuwa"," | Hajurbuwa"):"Wholesale Sellers in Nepal | Hajurbuwa";case"search":return a?o(a," Wholesale in Nepal | Hajurbuwa"," | Hajurbuwa"):"Search Wholesale Products | Hajurbuwa";case"collection":case"page":return a?"".concat(a," | Hajurbuwa"):"Hajurbuwa";case"home":return"Hajurbuwa | Wholesale Platform for Nepal Shops & Retailers";case"ranking":return a?o(a," Top Rankings | Hajurbuwa"," | Hajurbuwa"):"Top Rankings | Hajurbuwa";case"campaign":return a?o(a," | Hajurbuwa"," | Hajurbuwa"):"Seasonal Sale | Hajurbuwa";case"groupOrder":return a?"Group Buy: ".concat(a," | Hajurbuwa"):"Group Buy | Hajurbuwa"}}function c(e,a){let t=a||n[e];switch(e){case"product":return"Buy ".concat(t," at wholesale price in Nepal. Fast wholesale ordering for shops and retailers on Hajurbuwa.");case"brand":return a?"Shop genuine ".concat(t," products at wholesale price in Nepal. Bulk ").concat(t," stock for shops and retailers on Hajurbuwa, Nepal's wholesale marketplace."):"Shop ".concat(t," products at wholesale prices in Nepal. Hajurbuwa is a one-stop wholesale marketplace for shops and retailers.");case"category":{let e=(0,r.PN)(a).slice(0,3);return a?"Buy ".concat(t," at wholesale price in Nepal").concat(e.length?" — ".concat(e.join(", ")," and more in bulk"):" in bulk"," for shops and retailers on Hajurbuwa."):"Browse ".concat(t," at wholesale prices in Nepal. Hajurbuwa connects retailers with trusted wholesale suppliers.")}case"store":return a?"Buy wholesale from ".concat(t," on Hajurbuwa — bulk prices in Nepal for shops and retailers, online or on the Hajurbuwa app."):"Shop wholesale products from ".concat(t," on Hajurbuwa, Nepal's wholesale marketplace for shops and retailers.");case"search":return a?"".concat(t," at wholesale price in Nepal — compare bulk prices from wholesale suppliers on Hajurbuwa."):"Search results for ".concat(t," — wholesale prices for shops and retailers on Hajurbuwa.");case"collection":return"Explore ".concat(t," at wholesale prices on Hajurbuwa, Nepal's one-stop wholesale marketplace for retailers.");case"home":return"Hajurbuwa is Nepal's wholesale marketplace app for shops and retailers — buy mobile, electronics, and general goods in bulk at wholesale prices.";case"page":return a?"".concat(a," — information about Hajurbuwa, Nepal's wholesale marketplace for shops and retailers."):"Information about Hajurbuwa, Nepal's wholesale marketplace for shops and retailers.";case"ranking":return a?"The top-selling ".concat(a," products on Hajurbuwa, ranked — wholesale prices for shops and retailers in Nepal."):"".concat(t," on Hajurbuwa — the best-selling wholesale products in Nepal, by category.");case"campaign":return a?"".concat(a," — seasonal wholesale deals on Hajurbuwa for shops and retailers in Nepal."):"Seasonal wholesale deals on Hajurbuwa, Nepal's marketplace for shops and retailers.";case"groupOrder":return a?"Join the group buy for ".concat(a," at wholesale price on Hajurbuwa."):"Join a group buy at wholesale price on Hajurbuwa, Nepal's marketplace for shops and retailers."}}},4605:function(e,a,t){"use strict";t.d(a,{PN:function(){return l},Q9:function(){return c}});let r={"earphones and neckbands":["earbuds","tws earbuds","bluetooth earphones","neckband earphones"],"headphones and speakers":["headphones","bluetooth speakers","wireless headphones"],"power banks":["power bank","portable charger"],"chargers and cables":["mobile charger","usb cable","data cable","fast charger"],"mobile battery":["phone battery","smartphone battery"]},n=e=>e.toLowerCase().replace(/&/g,"and").replace(/\s+/g," ").trim();function l(e){var a;return e&&null!==(a=r[n(e)])&&void 0!==a?a:[]}let o=["wholesale market in nepal","wholesale suppliers in nepal","b2b wholesale marketplace nepal","bulk price for shops and retailers"],s=e=>Array.from(new Set(e.map(e=>
1e.trim()).filter(Boolean)));function c(e,a){return(function(e,a){let t=null==a?void 0:a.trim(),r=null==t?void 0:t.toLowerCase();switch(e){case"category":{if(!r)return o;let e=["".concat(r," wholesale in nepal"),"".concat(r," price in nepal"),"buy ".concat(r," in bulk in nepal"),"".concat(r," suppliers in nepal")];for(let a of l(t))e.push("".concat(a," wholesale in nepal"),"".concat(a," price in nepal"));return s([...e,...o])}case"brand":if(!r)return s(["wholesale brands in nepal",...o]);return s(["".concat(r," wholesale in nepal"),"".concat(r," price in nepal"),"".concat(r," distributor in nepal"),"genuine ".concat(r," products in nepal"),"".concat(r," bulk supplier nepal"),...o]);case"store":return s([...r?["".concat(r," wholesale supplier nepal"),"buy wholesale from ".concat(r)]:[],"wholesale sellers in nepal",...o]);case"product":if(!r)return o;return s(["".concat(r," price in nepal"),"".concat(r," wholesale price in nepal"),"buy ".concat(r," in nepal"),...o]);case"search":if(!r)return o;return s(["".concat(r," wholesale in nepal"),"".concat(r," price in nepal"),...o]);case"home":return s([...o,"online wholesale shopping nepal","mobile accessories wholesale nepal","cosmetics wholesale in nepal","stationery wholesale in nepal"]);case"collection":return s([...r?["".concat(r," wholesale in nepal")]:[],...o]);case"page":return o;case"ranking":return s([...r?["best selling ".concat(r," in nepal"),"top ".concat(r," wholesale nepal")]:[],"top selling wholesale products nepal",...o]);case"campaign":return s([...r?["".concat(r," wholesale sale nepal")]:[],"seasonal wholesale deals nepal","wholesale discounts nepal",...o]);case"groupOrder":return s([...r?["".concat(r," group buy nepal")]:[],"group buy wholesale nepal","bulk group order nepal",...o])}})(e,a).slice(0,14).join(", ")}},9008:function(e,a,t){e.exports=t(3867)}},function(e){e.O(0,[4838,3365,6660,594,5675,999,8738,3636,9834,2888,9774,179],function(){return e(e.s=2413)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.