PageSourceSearch

https://antingshop.tw/cdn/shopifycloud/checkout-web/assets/c1/c10167e6.DW7aL1mi.js

js antingshop.tw collected 2026-10-04 07:55:06 UTC 11,688 bytes, 1 lines download raw bytes

1import{z as e,q as n,t,u as a,S as s,w as i,x as l,m as r,s as o,T as d,l as c,C as u,f as m,v as p,D as v}from"./2c1ab0fe.GMbxnz74.js";import{dA as y,dB as b,d1 as h,dC as f,dD as _,c as g,H as S,P as I,aH as P,aJ as w,aK as L,o as A,dE as C,U as M,I as j,B as N,bq as T,i as O,bF as k,b as E}from"./164ad2e3.B4L1MRYB.js";import{j as x,h as F,i as B,k as H}from"./86720dbb.DHZl5FAg.js";import{S as R,T as q,W as Y,da as V,V as D,db as W,dc as z,aZ as U,y as J,dd as Z,ax as G,de as K}from"./4c290a1e.DMQ9xOwP.js";import{j as Q,D as X}from"./f3fe2775.Cg8b5yuM.js";import{b as $}from"./58314944.D85q6ENI.js";import{a as ee,C as ne}from"./31cc568e.CVMsqQ1x.js";import{B as te}from"./b9c0319a.CIGlacbX.js";import{a as ae,b as se,C as ie}from"./efa0389a.ZcaEqvMP.js";import{c as le,d as re}from"./dffdfb34.5SAJ7sQR.js";import{S as oe}from"./0e67bd3b.DUa61rto.js";import{u as de}from"./cc6ff67d.D2x8Yxrg.js";import{C as ce}from"./a422df8c.B9fLTQ4u.js";import{d as ue,e as me}from"./f8706cb6.Dq4SNRnK.js";import{g as pe}from"./app.DGSHpWaV.js";import{g as ve}from"./f1968089.lfvhhPdb.js";import{I as ye}from"./3a819064.DvJdzPv7.js";function be({selectorShowsTiles:l,afterPaymentSelector:r,renderVaultingAgreementInline:o}){const d=$(),c=y(),{checkout:u,i18n:m,shopPay:p,source:v}=R(),P=b(),w=h(),L=f(),{paymentMethods:A}=q(),C=p.user.creditCards,M=e(ee().creditCardDisabled),j=n(null),N=t(()=>!(P.value||_({checkout:u,source:v})?.pickupAddress)&&!w.value&&u.isShippingRequired.value),T=t(()=>function({identity:e},{billingPosition:n,vaultedSections:t,showBillingAddressInContext:a}){switch(e.current.value){case"shopPay":return"inContext"===n.value&&!t.value.payment;case"businessCustomer":return!0;default:return a.value}}({identity:u.identity},{billingPosition:c,vaultedSections:L,showBillingAddressInContext:N})),O=t(()=>Q({paymentMethods:A.value})),k=t(()=>function({identity:e,i18n:n},{paymentMethodMustSupportInterestBearingLoans:t,supportedCountryOptions:a,creditCards:s,creditCardDisabled:i}){if("shopPay"!==e.current.value)return null;if(!t)return null;if(!s.every(e=>i(e)))return null;const l=a.map(e=>e.label).join(", ");return l?n.translate("installments.installments_debit_cards_supported_countries",{countries:l}):n.translate("installments.installments_valid_debit_cards_fallback")}({identity:u.identity,i18n:m},{paymentMethodMustSupportInterestBearingLoans:u.installments.paymentMethodMustSupportInterestBearingLoans.value,supportedCountryOptions:u.installments.supportedCountryOptions.value,creditCards:C.value,creditCardDisabled:M.value})),E=a(X,{blurValidationFieldDenylist:O.value,onSetFieldErrors:d,children:[a(x,{vaultHandle:j}),a(g,{gap:"base",children:[a(he,{}),a(F,{billingAddressInContext:T.value,vaultHandle:j,selectorShowsTiles:l,afterPaymentSelector:r,renderVaultingAgreementInline:o})]})]});return a(i,{when:k,fallback:E,children:e=>a(s,{children:[a(g,{gap:"small-400",children:[a(S,{level:2,children:m.translate("credit_card_form.add_debit_card")}),a(I,{color:"subdued",children:e})]}),E]})})}function he(){return B(),null}const fe="shipping_address",_e="custom_billing_address";function ge({renderFormOnly:e=!1}={}){const{i18n:n}=R(),t=P(),{billingAddressOption:s}=Y(),d=w(),c="shipping"===s.value?fe:_e,[u,m]=l([c]),{isBilling:p}=le().value,v=p?a(re,{}):null;r(()=>{m([c])},[c]);const y=o(e=>{const n=e[0]===fe?"shipping":"custom";s.value=n,m(e),"shipping"===n&&d()},[s,d]);L();const b=o(({billing:e})=>{e.value=!0},[]),h=o(({billing:e})=>{e.value=!1},[]);return a(i,{when:()=>!e&&"form"!==t.value,fallback:a(oe,{onValid:b,onInvalid:h,children:a(H,{children:v})}),children:a(ae,{name:"billing_address_selector",values:u,onChange:y,variant:"block",children:[a(se,{value:fe,accessibilityLabel:n.translate("payment.same_billing_address_label"),children:a(A,{type:"strong",children:n.translate("payment.same_billing_address_label")})}),a(se,{value:_e,selectedContent:a(oe,{onValid:b,onInvalid:h,children:a(H,{children:v})}),accessibilityLabel:n.translate("payment.different_billing_address_label"),children:a(A,{type:"strong",children:n.translate("payment.different_billing_address_label")})})]})})}const Se=()=>{const{i18n:e,checkout:{identity:n}}=R(),t=Pe({identity:n});return a(g,{accessibilityRole:"group",accessibilityLabelledBy:"billingAddress",gap:"base",children:[a(S,{id:"billingAddress",level:2,children:e.translate("payment.billing_address_title")}),a(t,{})]})};function Ie({dynamicPaymentExtensions:e=[],children:n}){C();const t=y(),i=h(),{checkout:l}=R(),r=f(),o=V({checkout:l}),c=r.value.payment&&r.value.billing&&!o,[u]=de(),m=d(()=>Object.values(D).some(e=>u===e),[u]),p=!c&&!i.value&&!m;return a(g,{gap:"base",children:["beforePayment"===t.value&&p&&a(Se,{}),n,"afterPayment"===t.value&&!m&&a(s,{children:[p&&a(Se,{}),a(M,{customizations:e})]})]})}function Pe({identity:e}){return"businessCustomer"===e.current.value?te:ge}function we({onComplete:e}){const n=c(null),t=c(),[s,i]=l(!1),{environment:{services:{shopServer:d}},observability:u}=R(),m=c(performance.now()),p=o(n=>{e(n),i(!0),t.current=n},[e]),v=o(({data:e,origin:t,source:a})=>{if("null"===t&&a===n.current?.contentWindow&&"string"==typeof e.payload&&""!==e.payload)switch(e.action){case"iovation_sandbox_error":u.leaveErrorBreadcrumb("[Iovation] Fingerprint error",{error:e.payload}),p("");break;case"iovation_sandbox_fingerprint":u.histogram({name:"iovation_fingerprint_load_time",value:performance.now()-m.current}),p(e.payload)}},[p,u]),y=o(()=>{n.current?.contentWindow&&n.current.contentWindow.postMessage({action:"iovation_sandbox_initialize"},"*")},[]);return r(()=>(window.addEventListener("message",v),()=>{window.removeEventListener("message",v)}
1),[v]),r(()=>{const e=setTimeout(()=>{void 0===t.current&&(u.histogram({name:"iovation_fingerprint_load_time",value:performance.now()-m.current}),p(""))},1e4);return()=>clearTimeout(e)},[p,u]),s?null:a(ye,{ref:n,id:"iovation_sandbox_iframe",sandbox:"allow-scripts",src:new URL("/pay/iovation",d.url).href,style:{display:"none"},onLoad:y})}const Le="n7rut",Ae="_4PVkL";function Ce(){const{prequalifiedAnimatedBadgeShowCounter:e}=U(),[n,t]=l(!1),{i18n:s}=R(),i=function(){const{userEvents:e,source:n,checkout:t,shop:a,shopPay:s,embed:i}=R(),{prequalifiedAnimatedBadgeShowCounter:l}=U();return o(()=>{l.value>0||e.monorailEvent({schemaId:"shopify_pay_payment_page_installments/1.4",payload:{...ve(n,t,a,{embedPlatform:i?.platform,shopAppSurface:s.app.config.surface}),eventType:W.PrequalifiedBadgeImpression,success:!0}})},[l,e,n,t,a,s,i])}(),d=s.translate("installments.installments_prequalified_status_badge"),u=function(e){const n=c(null),t=c(!1);return r(()=>{if(t.current)return;if(!window.IntersectionObserver)return t.current=!0,void e();const a=new IntersectionObserver(n=>{const i=n.some(({isIntersecting:e})=>e);s&&i&&(t.current=!0,a.unobserve(s),e())},{threshold:1}),s=n.current;return s&&a.observe(s),()=>{s&&a.unobserve(s)}},[e]),n}(o(()=>{t(!0),i(),e.value+=1},[e,i]));return a("div",{className:p("Pdl91",{[Le]:n},{[Ae]:e.value>1}),ref:u,children:a("span",{className:"a3kZU",children:[a("span",{className:"F1g68",children:a(j,{type:"check-circle",size:"fill"})}),a("span",{className:"Wkh24",children:d})]})})}const Me=v(function({title:e,subtitle:n,disabled:t,badge:s},i){const l=a(I,{color:t?"subdued":void 0,children:a(A,{type:"strong",children:e})}),r=a(I,{children:n});return s?a(g,{ref:i,gap:"small-100",children:[a(g,{direction:"inline",gap:"base",children:[l,a(Ce,{})]}),r]}):a(N,{ref:i,children:[l,r]})});function je({ineligibilityReason:i}){const{observability:p,userEvents:v,i18n:y,source:b,checkout:h,shop:f,shopPay:_}=R(),[g,S]=l(!1),I=T(),{recordRetailEvent:P}=ue(),{negotiate:w}=O(),{paymentMethods:L}=q(),A=pe(_),C=function(){const{checkout:{identity:e},shopPay:n}=R(),a=z(),s=q().paymentMethods;return t(()=>{const t=a.value,i=n.user.installments.prequalifiedAmount.value,l=n.user.installments.credential.value,r=s.value?.find(e=>"wallet"===e.type&&"SHOPIFY_INSTALLMENTS"===e.name),o="shopPay"===e.current.value&&null!=t&&null!=r&&t.amount>=Math.max(r.minPrice.amount,50)&&t.currencyCode===r.minPrice.currencyCode,d=null!=i&&null!=t&&(!r?.cbtEnabled||i.currencyCode===t.currencyCode)&&(l?.requiresAdditionalInformation&&t.amount<=i.amount||!l?.requiresAdditionalInformation);return o&&d})}(),M=me(),{payNowLabel:j,payNowSubtitle:x,installmentsLabel:F,installmentsSubtitle:B}=M.value,H=_.user.installments.prequalifiedAmount.value,Y=_.installments.isServiceAvailable.value,V=_.session.paymentMethodOption.value,D=d(()=>V?[V.name]:[],[V]),U=_.user.installments.isRetryable.value,Q=h.installments.isUnavailable.value,X=d(()=>!Y||Q&&!U,[Y,Q,U]),$=function({selectable:t}){const{userEvents:a,source:s,checkout:i,shop:l,shopPay:r,embed:d}=R(),{ineligibilityReasons:p}=i.installments,{isServiceAvailable:v}=r.installments,{isRejected:y}=r.user.installments,{isLoading:b}=r.session,h=n(null),f=c(!1),_=e(t);function g(){const e=_.value,n=e?void 0:JSON.stringify(function({ineligibilityReasons:e,serviceAvailable:n,userRejected:t}){return e.length>0?e:n?t?["user_rejected"]:["unknown"]:["installments_unavailable"]}({ineligibilityReasons:p.value,serviceAvailable:v.value,userRejected:y.value}));a.monorailEvent({schemaId:"shopify_pay_payment_page_installments/1.4",payload:{...ve(s,i,l,{embedPlatform:d?.platform,shopAppSurface:r.app.config.surface}),eventType:W.OptionImpression,success:e,errorMessage:n}})}return u(()=>{const e=h.value;if(!e||b.value||f.current)return;const n=()=>{f.current=!0,m(g)};if(!window.IntersectionObserver)return void n();const t=new IntersectionObserver(e=>{e.some(({isIntersecting:e})=>e)&&(t.disconnect(),n())},{threshold:1});return t.observe(e),()=>t.disconnect()}),o(e=>{h.value=e},[h])}({selectable:!X}),ee=d(()=>{if(C.value&&H&&!X)return"prequalified"},[C.value,X,H]),te=o(async()=>{g||(S(!0),await w({legacyFiltering:{include:["paymentLines"]},force:!1,fieldsToResolve:["taxes","paymentMethods"],silenceViolations:J(["paymentLines"]),customizeNegotiation:e=>(e.payment?.paymentLines.push({amount:{any:!0},paymentMethod:{walletPaymentMethodConfig:{name:"SHOPIFY_INSTALLMENTS"}}}),e)}))},[w,g]);r(()=>{"SHOPIFY_INSTALLMENTS"===A&&te()},[te,A]);const ae=o(([e="SHOPIFY_INSTALLMENTS"])=>{const n=Z(L.value)?.availableLoanTypes,{action:t,method:a}=function({paymentMethodName:e,availableLoanTypes:n}){if("SHOP_PAY"===e)return{action:"payment_method_pay_now",method:{type:"wallet",name:"SHOP_PAY"}};const t={type:"wallet",name:"SHOPIFY_INSTALLMENTS"};return K(n)?{action:"payment_method_interest_bearing_installments",method:t}:{action:"payment_method_installments",method:t}}({paymentMethodName:e,availableLoanTypes:n});_.session.unstable_updatePaymentMethodOption(a),I.value&&P(t),"SHOPIFY_INSTALLMENTS"===e&&p.log("payment_method_selected","[Installments] Payment method selected",{paymentMethodName:e}),v.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...G(b,h,f),action:t}})},[L,_.session,I,p,v,b,h,f,P]);return a(s,{children:[X&&a(N,{children:[a(k,{heading:y.translate("payment_ux.payment.payment_option.installments_unavailable"),tone:"info",children:i||y.translate("payment.payment_option.installments_temporarily_unavailable")}),a(E,{blockSize:"base"})]}),a(ne.Provider,{value:!0,children:a(ie,{presentation:"base",children:a(ce,{name:"payment_method_options",title:y.translate("payment.payment_option.accessibility_label"),titleHidden:!0,onChange:ae,values:D,children:[a(se,{value:"SHOP_PAY",children:a(Me,{title:j,subtitle:x})}),a(se,{value:"SHOPIFY_INSTALLMENTS",disabled:X,children:[!X&&a(we,{onComplete:_.setDeviceFingerprint}),a(Me,{ref:$,title:F,subtitle:B,disabled:X,badge:ee})]})]})})})]})}export{be as P,Ie as W,je as a,Pe as g};

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.