PageSourceSearch

https://cofoglobal.com/cdn/shopifycloud/checkout-web/assets/c1/f65334f8.Da8xUREa.js

js cofoglobal.com collected 2026-10-05 20:12:58 UTC 16,280 bytes, 1 lines download raw bytes

1import{u as e,S as n,o as i,T as t,w as a,s,k as r,q as o,g as l,p as d}from"./2c1ab0fe.RaLGJvq2.js";import{i as c,bu as p,S as u,bD as m,f as h,q as g,L as v,M as b,ai as y,aa as f,H as _,d as T,j as C,a1 as x,aB as S,b as M,l as P,B as L,bt as w,r as j,ap as k,aJ as D,a0 as I,at as E,U as O}from"./164ad2e3.bPUx3Fg0.js";import{C as R,a as A,b as B}from"./efa0389a.4jo1XZ5U.js";import{C as H,u as q}from"./4b1c22b7.DKftNOPJ.js";import{a as z,aJ as F,e0 as G,N}from"./f67abd2c.BTHhdhoM.js";import{I as Q}from"./55098bf1.lh4L-ucv.js";import{m as V}from"./21cc90a2.DHzOO82q.js";import{E as U,M as $,d as J,u as W}from"./64de7b49.QaUyq4Wz.js";import{u as Y,a as Z,i as K,c as X,m as ee}from"./181d38d3.Ztafxyj4.js";import{B as ne,u as ie,S as te,E as ae,a as se,p as re}from"./347b440c.Ct28yEbl.js";import{B as oe,D as le}from"./8d3a12c3.oGZyrb47.js";import{g as de,a as ce}from"./0e4087ec.D2JbXdFh.js";import{u as pe}from"./app.CPIYcwpp.js";import{S as ue}from"./8e79be58.Csw1br6J.js";import{g as me}from"./792bb671.B3OvVnSg.js";import"./d0bb51ec.BIqtCEEY.js";import"./60a453ce.BHWO3gHr.js";import"./e12db40c.CeuzD2R-.js";import"./9dba8418.DCzpk36x.js";import"./22345fd4.BOPeNj8v.js";import"./9ce08e25.CMzOvpmI.js";import"./9f3d9f8c.CX7kaFl1.js";import"./4aab4b34.LTg1AGR3.js";import"./3ca8ef7e.mdJTe1BI.js";import"./a422df8c.FHHIb5NR.js";import"./47b970b2.D1oAm8Vb.js";import"./a9fa9fda.D5UMnVmk.js";import"./ca3e798e.BWruLT5k.js";function he({summary:n}){const{transitText:i,brandedPromise:t,shipmentCountText:a}=n;return i||a?e(u,{direction:"inline",gap:"small-300",alignItems:"center",children:[i?e(c,{color:"subdued",children:i}):null,t?e(ne,{brandedPromise:t}):null,i&&a?e(c,{color:"subdued",accessibilityVisibility:"hidden",children:p}):null,a?e(c,{color:"subdued",children:a}):null]}):null}function ge({selectedShippingMethod:i}){const{i18n:t}=z(),{deliveryExpectationLines:a}=ie(),{cost:s,costAfterDiscounts:r,hideDiscountedTotalOnShippingSelector:o}=i,l=m({deliveryMethod:i,localDelivery:"LOCAL"===i.methodType?t.translate("shipping.local_delivery"):void 0}),d=a?.find(e=>e.deliveryStrategyHandle===i.handle),c=s&&r?e(n,{children:[p,e(se,{cost:s,costAfterDiscounts:r,inlineDiscount:!0,preDiscountCost:o})]}):null;return e(n,{children:[e(u,{direction:"inline",gap:"small-400",children:[e(te,{methodTitle:l}),c]}),e(ae,{deliveryMethod:i,deliveryExpectationLine:d,paragraphColor:"subdued"})]})}function ve({selectedShippingMethod:n,rollupOpen:i}){const{i18n:t}=z();return i?e(h,{color:"subdued",children:t.translate("shipping.shipping_method_title")}):e(u,{children:e(ge,{selectedShippingMethod:n})})}function be({shippingMethods:n,type:i,id:t,displayOnly:a=!1}){const[s]=g({type:i,id:t}),{includedMethods:r}=Y().value,o=r.size?n.map(e=>r.has(e)?Z(e):e):n,l=a?o[0]:o.find(({handle:e})=>e===s);return l?e(H.Provider,{value:!0,children:e(R,{presentation:"base",children:a?e(ve,{selectedShippingMethod:l}):e(u,{gap:"small-400",paddingBlockStart:"small-400",children:[e(ve,{selectedShippingMethod:l,rollupOpen:!0}),e(ue,{type:i,methods:o,id:t,isInSplitCartModal:!0})]})})}):null}function ye({merchandise:s,oneTimePurchaseIndex:r,oneTimePurchaseTotalCount:o}){const l=i(!1),d=i(!1),{i18n:c}=z(),p=s.length,{totalQuantity:m,firstFiveQuantity:g}=t(()=>s.reduce((e,n,i)=>{const t=n.quantity??0;return e.totalQuantity+=t,i<2&&(e.firstFiveQuantity+=t),e},{totalQuantity:0,firstFiveQuantity:0}),[s]),C=c.translate("shipping.split_shipping_merchandise_quantity_label_standard",{quantity:m});return e(f,{gridAutoFlow:"column",gridAutoColumns:"minmax(auto, max-content)",gridTemplateColumns:"minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-100",alignItems:"center",alignContent:"center",children:[e(a,{when:d,fallback:e(n,{children:[e(u,{direction:"inline",gap:"small-300",children:s.slice(0,2).map(n=>e($,{merchandiseItem:n},n.stableId))}),e(v,{onClick:()=>{p>2?l.value=!0:d.value=!0},children:p>2?c.translate("shipping.split_shipping_merchandise_quantity_label_additional",{quantity:m-g}):c.translate("shipping.split_shipping_merchandise_quantity_label_standard",{quantity:m})})]}),children:e(U,{merchandise:s})}),e(b,{heading:e(n,{children:[e(_,{level:1,children:C}),e(T,{blockSize:"small-500"}),e(h,{color:"subdued",children:r&&o?c.translate("shipping.split_shipping_merchandise_shipment_number",{number:r,total:o}):c.translate("order_summary.subscriptions")})]}),open:l.value,onHide:()=>l.value=!1,accessibilityLabel:C,children:[e(y,{}),e(f,{gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gridAutoRows:"minmax(0, 1fr)",gap:"small-100",padding:"base none none none",children:e(U,{merchandise:s})})]})]})}function fe({merchandise:n,oneTimePurchaseIndex:i,oneTimePurchaseTotalCount:t}){const o=C(),l=s(n.length>1),d=r(()=>x(o.value.currentDetour)),c=r(()=>l.value&&d.value);return e(a,{when:c,fallback:e(U,{merchandise:n,thumbnailSize:d.value?"small":"base",merchandiseItemGap:d.value?"small-200":"base",thumbnailContentGap:d.value?"small-200":"base"}),children:e(ye,{merchandise:n,oneTimePurchaseIndex:i,oneTimePurchaseTotalCount:t})})}function _e({line:i,oneTimePurchaseIndex:t,oneTimePurchaseTotalCount:a,disableBorders:s=!1,heading:r}){const{id:o,type:l,methods:d,targetMerchandiseLines:c}=i,p=S(c??[]),{currentDetour:u}=C().value,m=x(u);return e(M,{"data-delivery-line-id":o,background:"base",colorLayer:"control",border:s?"none":"base",borderRadius:s?"none":"base",children:[r&&e(n,{children:[e(M,{padding:"base",children:e(_,{level:3,children:r})}),e(y,{accessibilityRole:"presentation"})]}),e(M,{padding:"base",children:e(f,{gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(auto, max-content) minmax(0, 1fr)",gridAutoRows:"1fr",gap:"small-100",children:[e(fe,{merchandise:p,oneTimePurchaseIndex:t,oneTimePurchaseTotalCount:a}),e(be,{shippingMethods:d,type:l,id:o,displayOnly:m})]})})]})}function Te({lines:i,heading:t,customNode:a,isSingleCard:s=!1,get
1Sequence:r,showExtendedHeading:o=!1,oneTimePurchaseTotalCount:l}){const{i18n:d}=z(),c=i.length,m=C(),h=J(),{presentsConsolidatedShipping:g}=Y().value;if(!c)return null;const v=i.map((c,u)=>{const v=Boolean(a),b=u+1!==i.length,f=s&&(v||b),_=r(c);return e(n,{children:[e(_e,{line:c,disableBorders:s,heading:(()=>{if(x(m.value.currentDetour)||h.value)return;const e=o?t:void 0;if(g)return e;const n=d.translate("shipping.split_shipping_shipment_number",{number:_});return e?`${n} ${p} ${e}`:n})(),oneTimePurchaseIndex:u+1,oneTimePurchaseTotalCount:l},c.id??pe()),f&&e(y,{})]},c.id)});return a&&v.push(a),e(M,{colorLayer:"control",children:e(f,{gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",gap:"small-200",children:e(u,s?{gap:"base",children:e(M,{overflow:"hidden",border:"base",borderRadius:"base",children:v})}:{gap:"large-200",children:v})})})}function Ce({shippingGroupLines:n,oneTimePurchaseTotalCount:i}){const{i18n:s,shop:{name:l}}=z(),{buyWithPrimeLines:d,shipsNowLines:c,shipsLaterLines:p}=t(()=>de(n),[n]),m=t(()=>ce(n),[n]),h=t(()=>{let e=[...d,...c,...p];return m&&(e=[...e,...m.reduce((e,[,n])=>[...e,...n],[])]),e},[d,c,p,m]),g=o(e=>h.indexOf(e)+1,[h]),v=t(()=>d.length>0?s.translate("shipping.split_shipping_shipped_by_shop",{shop_name:l}):s.translate("shipping.pre_order_ships_now"),[d.length,s,l]),b=C(),y=r(()=>x(b.value.currentDetour)),f=p.length>0||!!m&&m?.length>0;return e(u,{gap:"large-200",children:[d.length>0&&e(Te,{lines:d,getSequence:g,heading:s.translate("split_shipping.shipped_by_amazon_prime"),oneTimePurchaseTotalCount:i,customNode:e(a,{when:y,children:e(M,{padding:"small-100 base",children:e(oe,{})})}),isSingleCard:!0,showExtendedHeading:f}),c.length>0&&e(Te,{lines:c,getSequence:g,heading:v,oneTimePurchaseTotalCount:i,showExtendedHeading:f}),p.length>0&&e(Te,{lines:p,getSequence:g,heading:s.translate("shipping.pre_order_ships_later"),oneTimePurchaseTotalCount:i,showExtendedHeading:f}),m?.map(([n,t])=>t.length>0&&e(Te,{lines:t,getSequence:g,heading:s.translate("shipping.pre_order_ships_date",{date:s.formatDate(new Date(n),{timeZone:"UTC",month:"long",day:"numeric",year:"numeric"})}),oneTimePurchaseTotalCount:i,showExtendedHeading:f},n))]})}const xe="more-shipping-options-modal";function Se({deliveryLines:n,openAtDeliveryLineId:t,onOpen:a,onClose:s}){const{i18n:p}=z(),m=p.translate("shipping.shipping_method_title"),h=P(),g=l(),v=Y(),{total:_,presentsConsolidatedShipping:T}=v.value,C=i(!1),x=i(""),S=r(()=>{const{total:e,presentsConsolidatedShipping:n}=v.value;return n&&e?p.translate("order_summary.shipping_total_updated_label_with_price",{totalPrice:p.formatCurrency(e.amount,{currency:e.currencyCode,form:"name"})}):null}),w=l(null);d(()=>{if(!C.value)return w.current=null,void(x.value="");const e=S.value;if(!e)return void(x.value="");const n=w.current;w.current=e,n&&e!==n&&(x.value=e)});const j=xe,k=o(()=>{if(!t)return;const e=Array.from(document.getElementById(j)?.querySelectorAll("[data-delivery-line-id]")??[]).find(e=>e.dataset.deliveryLineId===t);e?.scrollIntoView({block:"start",behavior:"instant"})},[t,j]),D=e(L,{variant:"primary",inlineSize:"fill",command:"--hide",commandFor:j,onClick:async()=>{await g.current,h("moreShippingOptions",{timestamp:new Date,subEvent:"modalSave"})},children:p.translate("payment.saved_credit_cards_modal.done")});return e(b,{heading:m,onShow:()=>{w.current=S.peek(),x.value="",C.value=!0,h("moreShippingOptions",{timestamp:new Date,subEvent:"modalOpen"}),a?.()},onAfterShow:k,onHide:async()=>{C.value=!1,g.current=s(),await g.current,h("moreShippingOptions",{timestamp:new Date,subEvent:"modalClose"})},id:j,footer:T?e(M,{background:"base",children:[e(y,{}),e(M,{paddingBlock:"base",paddingInline:"large-200",children:e(u,{gap:"base",children:[_&&e(f,{gridTemplateColumns:"1fr auto",gap:"base",children:[e(c,{type:"strong",children:p.translate("order_summary.multiple_shipping_lines_label")}),e(c,{type:"strong",translate:!1,children:p.formatCurrency(_.amount,{currency:_.currencyCode})})]}),e(M,{accessibilityVisibility:"exclusive",accessibilityRole:"status",children:x.value}),D]})})]}):void 0,padding:T?"none":"base",children:T?e(M,{paddingBlockStart:"base",paddingBlockEnd:"large-200",paddingInline:"large-200",children:e(Ce,{shippingGroupLine
1s:n})}):e(u,{gap:"large-200",padding:"none none large-200 none",children:[e(Ce,{shippingGroupLines:n}),D]})})}function Me({shopPromiseSummary:e,isPreOrder:n,formattedTimeInTransit:i,fallbackText:t}){return e?e.deliveryPromiseText:n?void 0:i??t}const Pe={border:"none",background:"transparent",backgroundSelected:"base"};function Le({deliveryLines:s,deliveryMacrosOmitted:l=!1}){const{checkout:d,i18n:p}=z(),{negotiate:m}=j(),{deliveryMacros:h,deliveryLines:g}=d.negotiator.parts,v=i(!1),b=h.value,T=i(),C=i(),{selectedMacro:x,setSelectedMacro:S}=k(),L=x?.id,H=P(),U=q(),$=r(()=>F({checkout:d})),Z=s.every(e=>1===e.methods.length),ne=v.value&&!x,te=J(),ae=Y(),oe=function(e,n,i){const{shop:t,i18n:a,checkout:{negotiator:s}}=z(),{deliveryMacros:r}=s.parts,o=w(),{deliveryExpectationLines:l}=ie(),d=new Map,c=r.value;if(!t.marketDrivenShippingEnabled||!c?.length)return d;const{shipsLaterLines:p}=de(e),u=ce(e),m=Boolean(p.length||u?.length),h=c.map(n=>{const i=new Set(Object.values(n.deliveryMethodHandles)),t=e.map(e=>({line:e,method:e.methods.find(({handle:e})=>i.has(e))})).filter(K);return{macro:n,resolvedMethods:t.map(({method:e})=>e).filter(e=>Boolean(e)),count:X(t).length}}),g=i>0?1===i:1===(h.find(({macro:e})=>e.id===n)??h[0]).count;for(const{macro:v,resolvedMethods:b,count:y}of h){if(y>1&&v.id===n)continue;const e=me({selectedMethods:b,deliveryExpectationLines:l??[],deliveryPromiseText:v.deliveryPromisePresentmentTitle?.short}),i=ee(b),t=Me({shopPromiseSummary:e,isPreOrder:m,formattedTimeInTransit:i?o(i)??void 0:void 0,fallbackText:v.deliveryPromisePresentmentTitle?.long}),s=g&&y>1?a.translate("shipping.split_shipping_multiple_shipment_quantity_label",{quantity:y}):void 0;d.set(v.id,{...t&&{transitText:t},...e?.brandedPromise&&{brandedPromise:e.brandedPromise},...s&&{shipmentCountText:s}})}return d}(s,L,ae.value.groups.length),pe=ae.value.groups.length,ue=pe>0?pe:s.length,ge=$.value||te.value,ve=s.length>=G&&!U&&(ge||ue>1),be=l?ve:C.value??ve,ye=o(()=>{void 0===C.value&&(C.value=ve)},[C,ve]),{customizationsBefore:fe,customizationsAfter:_e}=W({targeted:!0,hasMultipleDeliveryGroups:!0}).value,Te=t(()=>L?[L]:[],[L]),Ce=o(async([e])=>{e&&(ye(),await S(e),H("deliveryMacroInteraction",{timestamp:new Date,subEvent:"delivery_macros_input_change"}))},[H,ye,S]),Le=e=>{ye(),T.value=e?s.find(n=>n.methods.includes(e))?.id:void 0},we=t(()=>({groupType:V("ONE_TIME_PURCHASE"),includeDeliverySelectionGroups:!Z}),[Z]);if(!b?.length&&!l)return null;const je=e(f,{gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",children:e(D,{padding:U?"base none small-300 base":"base",borderRadius:"none none base base",onClick:Le,commandFor:xe,children:e(f,{justifyItems:U?"start":"center",justifyContent:U?"start":"center",alignItems:"center",alignContent:"center",children:e(u,{direction:"inline",gap:"small-100",children:[U&&e(I,{type:"plus",tone:"accent"}),e(c,{type:U?"generic":"strong",tone:"accent",children:p.translate("shipping.split_shipping_more_shipping_options")})]})})})});let ke;if(l){const i=re(g.value);ke=e(n,{children:[e(le,{selectedDeliveryMethodHandles:s.map(e=>e.id?i.get(e.id):void 0),deliveryLines:s,choiceListContext:!1,bare:U,shipmentGroups:ae.value.groups,includedMethods:ae.value.includedMethods,shipmentCommandFor:xe,onShipmentClick:Le}),!Z&&e(n,{children:[!U&&e(y,{}),je]})]}),U||(ke=e(M,{background:"base",colorLayer:"control",border:"base",borderRadius:"base",padding:"none",children:ke}))}else if(Z){const[n]=b,i=oe.get(n.id),t=i&&(i.transitText||i.shipmentCountText)?e(he,{summary:i}):void 0;ke=1===pe?e(R,{...U?Pe:{},children:e(A,{variant:"block",name:"delivery-macros",values:[n.id],hideRadioControl:!0,children:e(B,{value:n.id,secondaryContent:0!==n.cost.amount&&e(se,{cost:n.cost,costAfterDiscounts:n.costAfterDiscounts,styleOverrides:{freeTextLetterCase:"uppercase",costSpacing:"none"}}),details:t,children:n.title})})}):e(M,{background:"base",colorLayer:"control",border:"base",borderRadius:"base",padding:"none",children:e(le,{selectedDeliveryMethodHandles:Object.values(n.deliveryMethodHandles),deliveryLines:s,choiceListContext:!1,isS
1haredRate:n.isSharedRate,shipmentGroups:ae.value.groups,includedMethods:ae.value.includedMethods,shipmentCommandFor:xe,onShipmentClick:Le})})}else ke=e(R,{...U?Pe:{},children:e(A,{variant:"block",name:"delivery-macros",values:Te,onChange:Ce,blockFooter:je,children:b.map(n=>{const{id:i,title:t,cost:a,costAfterDiscounts:r}=n,o=ne?void 0:oe.get(i),l=o?[t,o.transitText,o.shipmentCountText].filter(Boolean).join(", "):t;return e(B,{value:i,selectedContent:e(le,{selectedDeliveryMethodHandles:Object.values(n.deliveryMethodHandles),deliveryLines:s,isSharedRate:n.isSharedRate,macroTitle:n.title,shipmentGroups:ae.value.groups,shipmentCommandFor:xe,onShipmentClick:Le,includedMethods:ae.value.includedMethods}),selectedContentPadding:"none",secondaryContent:ne?e(E,{inlineSize:"5ch"}):0!==a.amount&&e(se,{cost:a,costAfterDiscounts:r,styleOverrides:{freeTextLetterCase:"uppercase",costSpacing:"none"}}),accessibilityLabel:l,children:ne?e(E,{inlineSize:"12ch",children:t}):e(u,{children:[e(c,{children:t}),o?e(he,{summary:o}):null]})},i)})})});return e(Q,{impressionType:"delivery_macros",impressionFeatures:b.map(({id:e})=>e),children:e(u,{gap:"base",paddingBlockStart:U||be?"none":"small-100",children:[be&&e(u,{direction:"inline",alignItems:"center",gap:"small-400",children:[e(I,{type:"truck"}),e(c,{color:"subdued",children:ge?p.translate("shipping.split_shipping_multiple_shipment_notice"):p.translate("shipping.split_shipping_shipment_count_notice_one_time_purchase",{count:ue})})]}),e(a,{when:$,children:e(_,{level:3,children:p.translate("shipping.shipping_method_first_shipment_group_title.other")})}),e(O,{customizations:fe,options:we}),ke,e(Se,{deliveryLines:s,openAtDeliveryLineId:T.value,onClose:()=>(v.value=!0,m({legacyFiltering:{include:["deliveryNext"]},silenceViolations:N(["deliveryNext"]),onComplete:()=>{v.value=!1}}))}),e(O,{customizations:_e,options:we})]})})}export{Pe as DELIVERY_MACRO_VAULTED_STYLE_OVERRIDES,Le 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.