PageSourceSearch

https://gingerandpickles.co.uk/cdn/shopifycloud/checkout-web/assets/c1/d6447d9e.so38cQCJ.js

js gingerandpickles.co.uk collected 2026-10-02 14:16:30 UTC 8,671 bytes, 1 lines download raw bytes

1import{s as e,T as i,u as n,l as t,m as s,S as r,x as o,t as a,w as l}from"./2c1ab0fe.GMbxnz74.js";import{b as c,a as d}from"./efa0389a.BaeWUwuC.js";import{i as u,o as p,c1 as h,P as g,w as m,U as y,c as f,cp as _,H as v,cW as b,F as C,W as D,ad as S,cX as R}from"./164ad2e3.BmqNdq2P.js";import{C as M}from"./a422df8c.Dcy8n41E.js";import{S as L,W as w,y as x,T as E,bh as T,bx as P,Q as B,cs as A,bG as j,cF as k}from"./4c290a1e.2OXqqQwu.js";import{D as N}from"./f49d4216.BpQn4XLS.js";import{a as O}from"./f51e663e.0jgrFL1L.js";import{u as U,b as F}from"./64de7b49.3gNLw9g0.js";import{m as H}from"./21cc90a2.BYvnDDaS.js";import{S as I}from"./8e79be58.DxsDx_ZB.js";import{S as $}from"./0727407f.C7yJLDwL.js";import{S as z,u as G,E as q}from"./347b440c.BOPV79c3.js";import{S as V}from"./90e26f5f.BU9IB2gY.js";import{c as W}from"./31cc568e.udVq2alB.js";const Q="pay_now",X="pay_on_delivery",Y=()=>{const{i18n:t}=L(),{negotiate:s}=u(),{optionalDuties:r}=w(),o=e(()=>{r.value={buyerRefusesDuties:!r.value?.buyerRefusesDuties,refuseDutiesPermitted:Boolean(r.value?.refuseDutiesPermitted)},s({legacyFiltering:{include:["deliveryNext","paymentLines"]},silenceViolations:x(["deliveryNext","paymentLines"])})},[r,s]),{buyerRefusesDuties:a}=r.value||{},l=i(()=>[a?X:Q],[a]);return n(M,{name:"duty_options",values:l,onChange:o,children:[n(c,{value:Q,details:n(p,{color:"subdued",children:t.translate("shipping.duties_and_taxes_options.ddp_caption")}),children:n(p,{children:t.translate("shipping.duties_and_taxes_options.ddp_title")})}),n(c,{value:X,details:n(p,{color:"subdued",children:t.translate("shipping.duties_and_taxes_options.ddu_caption")}),children:n(p,{children:t.translate("shipping.duties_and_taxes_options.ddu_title")})})]})},J={id:"4469203c73c7b5540585d432935fd7580de7198a6cb0754b76a9ecc56da9f00b",type:"query",name:"ShippingRatesStatus",source:""},K=e=>{const i=t(!1),n=t(!1),r=t(0),{graphql:{coreGraphql:o}}=L(),{value:a}=E().deliveryNext,l=T("deliveryNext").value,{negotiate:c}=u();return s(()=>{n.current=l},[l]),s(()=>{let t;a&&"filled"===a.status&&a.intermediateRates&&a.shippingRatesStatusToken&&a.progressiveRatesEstimatedTimeUntilCompletion?(i.current=!0,r.current=a.progressiveRatesEstimatedTimeUntilCompletion):(i.current=!1,r.current=0);const s=async()=>{if(!n.current){const n=await o.staticQuery(J,{variables:{token:a.shippingRatesStatusToken},cache:!1});"COMPLETED"===n?.data?.shippingRatesStatus?c({legacyFiltering:{include:[],silenceViolations:["non-stock"]},silenceViolations:["non-stock",...P],customizeNegotiation:e=>(e.delivery.useProgressiveRates=!1,e)}).finally(()=>{"function"==typeof e&&e()}).catch(e=>{throw e}):i.current&&(t=setTimeout(s,r.current))}};return i.current&&(t=setTimeout(s,r.current)),()=>t&&clearTimeout(t)},[e,o,c,a]),"filled"===a?.status&&a.intermediateRates},Z=({deliveryMethod:e})=>{const{i18n:i}=L(),{cost:t,costAfterDiscounts:s,priceBreakdown:r}=e;if(!r?.length||r.length>1)return null;const o=i.formatCurrency(s.amount,{currency:s.currencyCode}),[a]=r,l=a.excludeFromDeliveryOptionPrice,c=!a.targetMerchandiseLines[0]?.sellingPlan?.prepaid,{amount:d}=t,{amount:u}=s,h=c&&l?i.translate("shipping.subscription_delivery_description.shipping_price_included"):o;return d>u?n(z,{cost:t,costAfterDiscounts:s}):n(p,{children:h})},ee=({priceBreakdown:e,discountedShippingPrice:i,sellingPlan:t,subscriptionDetails:s})=>{const{i18n:r}=L(),o=h(),{deliveryInterval:a,billingIntervalCount:l,billingMaxCycles:c}=s,d=o(a,l),{amount:u,discountRecurringCycleLimit:p,excludeFromDeliveryOptionPrice:m}=e,y=r.formatCurrency(u.amount,{currency:u.currencyCode}),f=t.prepaid?!c||c>1?function(){const e=`${y} ${d}`;return b()?v(p,e):m?D(e):`${C(t.deliveriesPerBillingCycle)} ${d}`}():_():function(){const e=`${y} ${d}`;return 1===t.subscriptionDetails.billingMaxCycles?_():b()||0!==i.amount&&i.amount<u.amount?v(p,e):m?D(e):d}();function _(){const e=m&&!b()?t.deliveriesPerBillingCycle-1:t.deliveriesPerBillingCycle;return e>0?W(C(e)):""}function v(e=0,i){return[r.translate("shipping.subscription_delivery_description.free_for_first_n_order",{count:e}),D(i)].filter(e=>""!==e.trim()).join(", ")}function b(){return 0===i.amount&&void 0!==p}function C(e){return r.translate("shipping.subscription_delivery_description.prepaid_delivery_frequency",{count:e})}function D(e){return r.translate("shipping.subscription_delivery_description.recurring_order_shipping_price",{recurring_order_shipping_price:e})}return n(g,{color:"subdued",type:"small",children:W(f)})},ie=({deliveryMethod:e})=>{const{i18n:t}
1=L(),{deliveryExpectationLines:s}=G(),o=m("Checkout::ShippingMethodDetails::RenderAfter"),a=m("Checkout::ShippingMethodDetails::RenderExpanded"),l=e?.handle??"",u=i(()=>[l],[l]),p=i(()=>({handle:l,isInModal:!1}),[l]);if(null==e)return null;const{title:h,priceBreakdown:g,costAfterDiscounts:_}=e;if(!g)return null;const v=g.every(e=>0===e.discountRecurringCycleLimit),b=!v&&1===g.length,C="LOCAL"===e.methodType?t.translate("shipping.local_delivery"):h,D=o.length>0,S=s?.find(i=>i.deliveryStrategyHandle===e.handle);return n("fieldset",{children:[n("legend",{className:B({screenReaders:"only"}),children:t.translate("general.choose_shipping_method")}),n(d,{name:"subscription_shipping_method",variant:"block",values:u,onChange:()=>{},hideRadioControl:!0,children:n(c,{value:l,details:n(r,{children:[n($,{methodTitle:C}),n(q,{deliveryMethod:e,deliveryExpectationLine:S,paragraphColor:"subdued"})]}),secondaryContent:n("div",{className:"LkR2o",children:[n(Z,{deliveryMethod:e}),b&&function(e){const i=e.targetMerchandiseLines[0]?.sellingPlan;return i?.subscriptionDetails?n(ee,{priceBreakdown:e,discountedShippingPrice:_,sellingPlan:i,subscriptionDetails:i.subscriptionDetails}):null}(g[0])]}),tertiaryContent:D&&n(y,{customizations:o,options:p}),renderSelectedContentWhenCollapsed:!0,selectedContent:((i,t,s)=>{const r=!i&&t.length>1,o=s.length>0;return r||o?n(f,{gap:"large-200",children:[r&&n(V,{deliveryMethod:e}),o&&n(y,{customizations:s,options:p})]}):null})(v,g,a),children:C})})]})},ne=({line:e,showHeader:t,loadingAdditionalShippingRates:s,hasMultipleShippingLines:r})=>{const{i18n:o}=L(),{customizationsBefore:a,customizationsAfter:l}=U({targeted:!0,hasMultipleDeliveryGroups:Boolean(r)}).value,c=A(),[d]=_({type:e.type}),{methods:u,type:p}=e,h=i(()=>({groupType:H(p),includeDeliverySelectionGroups:!1}),[p]),g=i(()=>u.find(e=>e.handle===d)||(u.length>0?u[0]:void 0),[u,d]),m=t?n(v,{level:3,children:"ONE_TIME_PURCHASE"===p?o.translate("shipping.shipping_method_first_shipment_group_title",{count:1}):o.translate("shipping.shipping_method_recurring_shipments_group_title.other")}):null,b="ONE_TIME_PURCHASE"!==p&&c.value?n(ie,{deliveryMethod:g}):n(I,{type:p,methods:u,loadingAdditionalShippingRates:s});return n(f,{gap:"small-200",children:[m,n(y,{customizations:a,options:h}),b,n(y,{customizations:l,options:h})]})};function te({lines:t,loading:r,showErrorBanner:c=!1,deliveryChangedBannerOwnedBySection:d=!1}){const{showBanner:u,onDismiss:p}=function(n){const t=b(),[r,a]=o(!1),l=i(()=>n.flatMap(e=>e.hasDeliveryLineChange&&e.id?e.id:[]).sort().join(","),[n]);s(()=>{l&&a(!0)},[l]);const c=e(()=>{a(!1)},[]);return i(()=>{if(!r)return{showBanner:!1,onDismiss:c};const e=t.some(({code:e})=>"MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY"===e||"TaxExemption"===e);return e?{showBanner:!1,onDismiss:c}:{showBanner:r&&!e&&(n.length>1||n.some(e=>e.methods?.length>1)),onDismiss:c}},[n,t,r,c])}(t),{shop:h,i18n:g}=L(),m=E().deliveryNext,y=a(()=>j(m.value,!0)),{deliveryMacros:_}=w(),v=a(()=>_.value?.length>0),M=h.hasFlagEnabled(k),{showShipmentBreakdown:x}=F().value,T=M&&t.some(e=>e.targetMerchandiseLines?.some(e=>e.properties.some(e=>"_shopify_non_subscription_item"===e.name))),P=n(D,{tone:"info",errorType:C.DeliveryError,dismissible:!0,onDismiss:p,children:g.translate("shipping_errors.shipping_method")}),B=!x&&(t.length>1||function(e){const i=e[0];return!(1!==e.length||!i)&&"SUBSCRIPTION"===i.type&&i.methods.some(e=>e.displayCheckoutRedesign)}(t)),{subscriptionLines:A,oneTimePurchaseLines:U}=S(t);return n(R,{target:"cart.deliveryGroups[0].deliveryAddress",children:[(u&&!d||c)&&P,n(l,{when:y,fallback:(()=>{if(A.length>0&&1===U.length){const[e]=U;return n(f,{gap:"large",children:[n(ne,{line:e,showHeader:B&&!T,loadingAdditionalShippingRates:r,hasMultipleShippingLines:!0}),!T&&n(O,{subscriptionLines:A})]})}return t.map(e=>n(ne,{line:e,showHeader:B,loadingAdditionalShippingRates:r,hasMultipleShippingLines:t.length>1},e.id??`${e.type}-${t.indexOf(e)}`))})(),children:n("fieldset",{children:n(f,{gap:"large",children:[n(l,{when:v,children:n(N,{deliveryLines:U})}
1),n(O,{subscriptionLines:A})]})})})]})}export{Y as D,te as S,K 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.