PageSourceSearch

https://nairodept.com/cdn/shopifycloud/checkout-web/assets/c1/0cd5b134.DUKVBPZq.js

js nairodept.com collected 2026-10-06 09:04:58 UTC 7,763 bytes, 1 lines download raw bytes

1import{T as e,z as a,q as t,h as r,u as n}from"./2c1ab0fe.COzViSn5.js";import{s as l,x as s,bL as i,cm as c,bK as o,bN as u,B as d,S as p,a1 as h,j as b,bO as m,aa as f,H as _,f as g,i as y,aB as k,ay as v,az as U,as as I,aA as j,av as w,at as x,aw as q,ax as P,L as B,af as C,cn as L,aI as T,bA as S,ab as z}from"./164ad2e3.DRHwqsEp.js";import{C as A}from"./d6972375.kQ0LTax5.js";import{P as O,a as Q,b as $,d as H,c as M}from"./0a30a815.B8W4pvqs.js";import{T as E}from"./7e8cd205.U69Z_XSd.js";import{c as N,b8 as D,aH as F,I as K,ba as R}from"./9dba8418.DdxnJWTz.js";import{U as V}from"./5c5c2e96.mWM_B0i2.js";import{u as W}from"./9f047e05.CBZRlYLa.js";import{u as X,S as G}from"./71ae3d5c.C5AbiVkk.js";import{u as J,N as Y}from"./f5a7bb50.DHOQn-ke.js";import"./d0bb51ec.DSHSd1cE.js";import"./app.CUUZnfxG.js";import"./f67abd2c.CznwUo_e.js";import"./60a453ce.C2ZAmDRq.js";import"./e12db40c.DthL52O0.js";import"./f36e5f3f.D8FfwFPw.js";import"./5fda1420.B3FsjiIc.js";function Z(){const{i18n:S,observability:z,shop:Z,url:te,source:re,router:ne,embed:le,checkout:{negotiator:se}}=N(),{value:ie}=se.current.fields.allViolations,{value:ce}=se.current.fields.merchandiseLines,oe=D("merchandiseLines").value,{progress:ue}=l(),{previousPage:de}=s(),pe=se.parts.merchandiseLines,he=i(),be=J(),me=be.type,{value:fe}=F();W("stock_problems");const _e=e(()=>ce?.lines??[],[ce]),[ge]=a(pe.peek()),ye=e(()=>L(ge,ie),[ge,ie]),ke=c(ge,_e,ie),ve="draftOrder"===re.type,Ue=K(le?.embedder),{hasStorefront:Ie}=Z,{isAppLayout:je}=o(),we=be.cartEmpty,xe=we||!ge?0:ge.length,qe=Ie||xe>1,Pe=e(()=>_e.reduce((e,a)=>({...e,[a.stableId]:a}),{}),[_e]),Be=t(({removeUnavailableMerchandise:e=!1}={})=>{const a=pe.value,t=a.flatMap(a=>{const t=Pe[a.stableId];return!e||t&&0!==t.quantity&&!ye.has(a.stableId)?!t||0===t.quantity||ye.has(a.stableId)||a.quantity===t.quantity&&a.totalPrice===t.totalPrice?[a]:[{...a,quantity:t.quantity,totalPrice:t.totalPrice}]:[]});t.length===a.length&&t.every((e,t)=>e===a[t])||(pe.value=t)},[Pe,pe,ye]),Ce=t(()=>{R(le,V)},[le]),Le=t(()=>{Be({removeUnavailableMerchandise:!0}),ue("stock-problems-submit")},[ue,Be]),Te=u(),Se=t(async()=>{await Te(be.lineItems),window.location.replace(te.cart())},[Te,be.lineItems,te]);r(()=>{he.notify({checkout_in_progress:!1})},[he]),X({stage:oe?G.Loading:G.Complete,id:"StockProblems"}),r(()=>{let e=ne.currentUrl.value;return ne.currentUrl.subscribe(a=>{e!==a&&(e=a,Be())})},[ne,Be]);const ze=e(()=>me===I.Unfulfillable?T([...ye],fe):null,[fe,me,ye]),Ae=()=>{if(!be.showLineItems)return be.title;switch(me){case I.Unavailable:return S.translate("contextual_availability.title",{count:ke.length});case I.UnpurchasableB2B:return S.translate("stock.unpurchasable_product.title");case I.Unpurchasable:return S.translate("stock.unpurchasable_product_generic.title");case I.QuantityChange:return S.translate("stock.quantity_update.title");case I.Unshippable:return S.translate("stock.unshippable_product.title");case I.Unfulfillable:return S.translate("stock.unfulfillable_product.title");default:return S.translate("stock.title")}},Oe=Ie&&(!je||!we)||Ue?n(O,{children:n(d,{variant:"primary",size:"large",inlineSize:"fill",onClick:we&&Ue?Ce:Le,loading:oe,children:ve||we&&!Ue?S.translate("stock.return_to_store_label"):S.translate("general.continue_button_label")})}):null,Qe=!Ie||!de.route||je||we||Ue?null:n(Q,{children:n(d,{onClick:async()=>{await Se()},variant:"plain",inlineSize:"fill",textDecoration:"none",children:n(p,{direction:"inline",gap:"small-200",alignItems:"center",children:[n(h,{type:"chevron-left",size:"small"}),n(b,{children:S.translate("general.back_to_cart")})]})})}),$e=()=>{if(!be.showLineItems)return be.subtitle;switch(me){case I.Unavailable:return we?S.translate("contextual_availability.all_products_in_cart_unavailable",{count:ke.length}):S.translate("contextual_availability.products_not_available",{count:ke.length});case I.UnpurchasableB2B:return S.translate("stock.unpurchasable_product.message");case I.Unpurchasable:return S.translate("stock.unpurchasable_product_generic.message");case I.QuantityChange:return S.translate("stock.quantity_update.description");case I.Unshippable:return S.translate("stock.unshippable_product.message",{count:ke.length});case I.Unfulfillable:return ze?S.translate("stock.unfulfillable_product.message",{delivery_method:ze,count:ke.length}):(z.error(new Y),S.translate("stock.unfulfillable_product.default_message",{count:ke.length}));default:return S.translate("stock.items_unavailable_notice")}};return n(C,{section:"stock-problems",children:[n(E,{children:Ae()}),n(m,{message:$e(),errorType:f.InventoryError,children:n(p,{gap:"large-500",children:[n(A,{status:"warning",children:[n(_,{children:(()=>
1{if(!be.showLineItems)return be.title;switch(me){case I.UnpurchasableB2B:return S.translate("stock.unpurchasable_product.header");case I.Unpurchasable:return S.translate("stock.unpurchasable_product_generic.header");case I.Unshippable:return S.translate("stock.unshippable_product.header",{count:ke.length});case I.Unfulfillable:return S.translate("stock.unfulfillable_product.title");default:return Ae()}})()}),n(g,{color:"subdued",children:$e()})]}),n($,{children:[ke.length>0&&be.showLineItems?n(H,{children:n(y,{children:n(k,{titleHidden:!0,border:"outer",spacing:"none",title:me===I.QuantityChange?S.translate("stock.quantity_update.page_title"):Ae(),children:[n(v,{blockPadding:"base",children:[n(U,{hidden:!0,children:S.translate("order_summary.product_image_label")}),n(U,{primary:!0,children:n(b,{type:"strong",children:S.translate("order_summary.description_label")})}),n(U,{hidden:me!==I.OutOfStock,children:n(b,{type:"strong",children:me===I.OutOfStock?S.translate("order_summary.quantity_label"):S.translate("order_summary.description_label")})})]}),n(j,{children:ke.map(({proposed:e,negotiated:a})=>{const t=a??e,r=e?.quantity,l=a?.quantity,{stableId:s,image:i,title:c}=t;return n(w,{spacing:"base",blockPadding:"base",children:[n(x,{children:n(q,{src:i?.one,srcSet:i?`${i.one} 1x, ${i.two} 2x, ${i.four} 4x`:void 0,alt:i?.altText})}),n(x,{primary:!0,children:n(P,{id:null,deferredAmount:t.deferredAmount,options:t.options,properties:t.properties,recurringTotal:t.recurringTotal,sellingPlan:t.sellingPlan,subtitle:t.subtitle,title:c,totalPrice:t.totalPrice})}),n(x,{noWrap:!0,children:null!=l&&l>0&&!ye.has(s)?n(p,{alignItems:"end",gap:"small-400",children:[n(ae,{quantity:l,previousQuantity:r??0}),qe?n(B,{id:`remove-${s}`,onClick:()=>(e=>{const a=pe.peek();pe.value=a.filter(({stableId:a,quantity:t})=>a!==e&&t>0),ue("stock-problems-remove-item")})(s),children:S.translate("stock.remove")}):null]}):n(ee,{merchandiseIssueType:me})})]},s)})})]})})}):null,Oe||Qe?n(M,{children:[Oe,Qe]}):null]})]})})]})}function ee({merchandiseIssueType:e}){const{i18n:a}=N();return n(z,{gridAutoFlow:"column",gridAutoColumns:"minmax(auto, max-content)",gridTemplateColumns:"minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[n(h,{type:"disabled",tone:"critical",size:"small"}),n(S,{children:(()=>{switch(e){case I.Unfulfillable:case I.Unavailable:return a.translate("contextual_availability.unavailable_label");case I.UnpurchasableB2B:return a.translate("stock.unpurchasable_product.status_column_header");case I.Unpurchasable:return a.translate("stock.unpurchasable_product_generic.status_column_header");case I.Unshippable:return a.translate("stock.unshippable_product.status_column_header");default:return a.translate("stock.sold_out_label")}})()})]})}function ae({quantity:e,previousQuantity:a}){return n(p,{direction:"inline",gap:"small-200",children:[n(b,{color:"subdued",children:a}),n(b,{color:"subdued",children:"→"}),n(b,{type:"strong",children:e})]})}export{Z as default};

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