PageSourceSearch

https://www.karachicamera.com/_webx/DBHF3KVk.js

js karachicamera.com collected 2026-09-27 09:36:58 UTC 1,755 bytes, 1 lines download raw bytes

1import{h as P,o as D,f,ak as g,a3 as v,am as u,an as h,L as C,G as q}from"./BdEtjDPP.js";import{r as _}from"./BIaCPJ4S.js";function Q(){const t=_({product:{},quantity:1,loading:!0}),{SecureOFetch:d}=P();D();const r=f(),{state:s,addToCart:n,createCartCodes:i,extractCustomFields:p}=g();return{state:t,cart_state:s,fetchProductDetail:async a=>{const e=await v(`product-details-${a}`,()=>d("/Product/GetProductDetail",{query:{ProductID:a}}),{immediate:!0,server:!0,watch:[()=>a],getCachedData:q,transform(o){return o.data}});if(!e.data.value)throw u({statusCode:404,statusMessage:"Product Not Found"});if(t.product=e.data.value,!t.product||!t.product.productID)throw u({statusCode:404,statusMessage:"Product Not Found"});return r.setSiteDataByKey("product_price",t.product.productPrice.price),r.setSiteDataByKey("is_outofstock",t.product.productStock.stockStatusID=="2"),e.data},addProductToCart:()=>{let a=r.data.variant||null,e=r.data.addons||null,o=r.data.variant_image||null;t.product.productPrice.price=r.data.product_price||t.product.productPrice.price,n({quantity:t.quantity,product:t.product,variant:a,variant_image:o,addons:e})},handleQuantity:a=>{const e=Number(a.target.value);t.quantity=e<1||isNaN(e)?1:e},manageQuantity:a=>{a=="ADD"?t.quantity=t.quantity+1:t.quantity>1&&(t.quantity=t.quantity-1)},buyNowProduct:()=>{const{stop:a,data:e}=p();if(a)return;let o=r.data.variant||null,l=r.data.addons||null,y=r.data.variant_image||null;t.product.productPrice.price=r.data.product_price||t.product.productPrice.price;let c=i({quantity:t.quantity,product:t.product,variant:o,variant_image:y,addons:l});if(c.cart_code){const m=encodeURIComponent(h(c.cart_code));C(m,t.product.productID),sessionStorage.setItem(`bn:${c.cart_code}`,e)}}}}export{Q as u};

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.