PageSourceSearch

https://shuristory.com.tw/_next/static/chunks/ApplePayButton.c144473595993e8f.js

js shuristory.com.tw collected 2026-10-04 22:54:48 UTC 2,467 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9573],{8054:(e,t,n)=>{n.r(t),n.d(t,{ApplePayButton:()=>u});var a=n(54568),o=n(99680),r=n(7620),l=n(13446),p=n(16787);async function i(e){return(0,p.WL)({url:"/payment/apple-pay/validate-merchant",method:"POST",withAuthorization:!0,data:{validation_url:e}}).execute()}var s=n(57614),c=n(34582);let u=e=>{let t,n,p,u=(0,o.c)(8),{isLoading:d,onClick:y,getApplePayPaymentRequestData:h,scrollToErrorSection:b}=e;u[0]!==h||u[1]!==d||u[2]!==y||u[3]!==b?(t={onClick:y,isLoading:d,getApplePayPaymentRequestData:h,scrollToErrorSection:b},u[0]=h,u[1]=d,u[2]=y,u[3]=b,u[4]=t):t=u[4];let{applePayButtonRef:m}=function(e){let{onClick:t,getApplePayPaymentRequestData:n,scrollToErrorSection:a}=e,{modal:o}=(0,l.useModal)(),p=(0,r.useRef)(null);function u(){o({headerContent:c.A.gettext("Apple Pay 付款未完成"),bodyContent:c.A.gettext("請再試一次,或改用其他付款方式結帳。"),showCancelButton:!1,showCloseButton:!1,positiveContent:c.A.gettext("我知道了")})}let d=(0,r.useCallback)(()=>{if(!window.ApplePaySession||!window.ApplePaySession.canMakePayments())return void u();if(a())return;let e=n(),o=new window.ApplePaySession(3,e);o.onvalidatemerchant=async e=>{try{let t=await i(e.validationURL);if(t?.data?.merchant_session){let{merchant_session:e}=t.data;o.completeMerchantValidation(e);return}throw Error()}catch(e){(0,s.e8)(e),u(),o.abort()}},o.onpaymentauthorized=e=>{t({payment_token_data:e.payment.token});let n={status:window.ApplePaySession.STATUS_SUCCESS};o.completePayment(n)},o.oncancel=()=>{},o.begin()},[n,t,a]);return(0,r.useEffect)(()=>(p.current&&p.current.addEventListener("click",d),()=>{p.current&&p.current.removeEventListener("click",d)}),[d]),{applePayButtonRef:p}}(t);return u[5]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsx)("style",{children:"\n                    apple-pay-button {\n                        --apple-pay-button-height: 40px;\n                        --apple-pay-button-border-radius: 6px;\n                        --apple-pay-button-padding: 6px 6px;\n                        --apple-pay-button-box-sizing: border-box;\n                    }\n                "}),u[5]=n):n=u[5],u[6]!==m?(p=(0,a.jsxs)(a.Fragment,{children:[n,(0,a.jsx)("apple-pay-button",{ref:m,buttonstyle:"black",type:"pay",locale:"zh-TW"})]}),u[6]=m,u[7]=p):p=u[7],p}}}]);
2//# sourceMappingURL=https://mypinzap.com/static/chunks/ApplePayButton.c144473595993e8f.js.map

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.