PageSourceSearch

https://sagebrown.co.uk/cdn/shopifycloud/checkout-web/assets/c1/PayButton-helpers.9yu2zn7p.js

js sagebrown.co.uk collected 2026-09-29 15:28:05 UTC 2,566 bytes, 1 lines download raw bytes

1import{ag as c,mA as d,aQ as f,aR as y}from"./utilities-previous.DaWdZv41.js";import{R as _}from"./graphql-PaymentSessionMutation.B3_YfTkY.js";const A="f_9cacaad2",E="f_34c3590e",g="f_a6c1475a",C="f_1523b7d6";function m(t){const{purchasingCompany:e,billingCountries:n,countryDetails:r,editFormat:a,...o}=t;if(!e)return!1;if(!r||!a)return!0;const u=c(e.location.billingAddress);return d(u,"billing",{...o,countryDetails:r,fallbackCountry:r,editFormat:a,availableCountries:n,isMobilePhoneFieldVisible:!1}).size===0}function S({address:t,isDisabled:e,addressSettings:n,shopUserPhone:r}){return{id:t.id,address:p({address:t.address,addressSettings:n,fallbackPhone:r}),default:t.userPreferred,disabled:e?.(t)??!1}}function p({address:t,addressSettings:e,fallbackPhone:n}){const r=e?.isRequired("phone",{countryCode:t.countryCode,useMerchantSettings:!0})?n:void 0;return{district:void 0,subdistrict:void 0,...t,phone:t.phone||r}}function F(t,e){return!t.countryCode||!e.supportedCountries.includes(t.countryCode)}function R({checkout:t,i18n:e},{nextPageLabel:n,shouldOverrideLabel:r,isRedirectMethod:a}){return t.identity.current.value==="shopPay"&&a?e.translate("payment_ux.continue_to_payment"):r?e.translate("general.pay_now_button_label"):n}function v({identity:t},{paymentRequiredMethod:e,managedByMarketsPro:n,isCryptoPayment:r}){return t.current.value!=="shopPay"?!1:y({managedByMarketsPro:n})&&e==="IDEAL"||e!==void 0&&_.has(e)&&!r}function I({identity:t},{isPartnerSdkEnabled:e,isAppLayout:n}){return t.current.value==="shopPay"&&!e&&n}function P({i18n:t},e){return e?t.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"}):null}function L({i18n:t,mobileCheckoutSdk:e,embed:n},{isAppLayout:r,paymentDue:a,buttonLabel:o}){return e.enabled&&e.variant.isStandard()||n?.isCheckoutKit()?null:r&&a&&o===t.translate("general.pay_now_button_label")?P({i18n:t},a):null}function T({checkout:t,mobileCheckoutSdk:e,shopPay:n,embed:r}){return t.identity.current.value!=="shopPay"?"dynamic":e.enabled||r?.isCheckoutKit()||f(n.app.config)?"static":"dynamic"}function D({identity:t},{showPayWithPayPal:e,showApplePay:n,showPayWithGooglePay:r,isEmbeddedCheckout:a,shouldRenderCheckoutProtocolButton:o,isInstallmentsSupported:u,isInstallmentsSelected:s,isInstallmentsUkHoldoutTreatment:l}){const i=t.current.value==="shopPay";return i&&u&&s&&!l?"installments":i&&o?"checkoutProtocol":e&&!i?"payPal":n?"applePay":r&&!i?"googlePay":!i&&a?"embedded":"default"}export{E as F,g as a,v as b,R as c,L as d,F as e,P as f,T as g,A as h,m as i,C as j,I as k,D as s,S as t,p as w};

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.