PageSourceSearch

https://finediapercakes.com/cdn/shopifycloud/checkout-web/assets/c1/a535174a.BPvHEO74.js

js finediapercakes.com collected 2026-10-01 14:08:00 UTC 4,357 bytes, 1 lines download raw bytes

1import{_ as O}from"./app.Bvc4uxd4.js";import{d as V,r as B,o as b,G as y,e as U,k as x,h as F,u as i,b3 as J,y as _,E as P,j as L,A as w,b4 as M,f as I,g as j,i as g}from"./2c1ab0fe.DYQSH7bT.js";import{H as z}from"./5fd968f2.YnDAFSZP.js";import{iO as N,h as A,bD as K,c7 as $,dI as Q,c as T,W,A as G,ac as Y,_ as X,bY as Z}from"./164ad2e3.BcELPLd1.js";import{bx as D,by as ee,be as ae,ae as te,O as R,cL as re,co as oe,a7 as ne,Q as se,bh as ie,bi as le}from"./4c290a1e.CvCmFIo_.js";import{c as ce}from"./01973ac7.DlFbhkwy.js";const Re=V({displayName:"Captcha",load:()=>B(()=>O(()=>Promise.resolve().then(()=>me),void 0))});function ue({embed:e},o){b(()=>{if(!o.value||!D(e?.embedder))return;const n=y(()=>e?.presentation?.acquire());return()=>y(()=>n?.())})}function de({embed:e},o){const n=D(e?.embedder),a=U(!1);return ue({embed:e},a),b(()=>{o.value?n&&y(()=>ee(e,"captcha")):a.value=!1}),{onOpen:()=>{a.value=n&&!!o.value},onClose:()=>{a.value=!1}}}function q(e,o){return e?.status==="failed"&&o===e.id}function pe(){const[e,o]=N(ae.LastSeenCaptchaRequestedErrorReceiptId),n=te(),{checkout:a}=R(),r=a.latestReceipt.value,[d,v]=x(()=>n.peek()?q(r,e):!0);return F(()=>{const c=q(r,e);v(c),r?.status==="failed"&&e!==r.id&&o(r.id),r?.status!=="failed"&&o(void 0)},[r?.id,r?.status]),d}function he(){const{i18n:e}=R(),{progressing:o}=A(),{hasError:n,error:a}=K(re),r=pe();return o.value||!n||!a||r?null:i(ce,{identifier:"CaptchaRequiredBanner",tone:"critical",children:e.translate("payment_errors.captcha_required_without_payment_information")})}let k=!1;const ve=J(e=>{const{appContext:{i18n:o,observability:n},captchaSignal:a,errorSignal:r,lastJourneyProgression:d,negotiate:v,onViolation:c}=e,p=_(y(()=>a.value?.sitekey)),f=_(k),S=_(y(()=>!!a.value?.token)),u=P(()=>!!r.value),t=Date.now(),h=k,m=o.translate("captcha.errors.not_solved");L(()=>{const s=a.value;s?s.sitekey&&(p.value=s.sitekey):p.value=void 0}),L(()=>{const s=d.value,l=s.type==="error"?s.violations.map(H=>H.code):[],C=a.value;C&&C.violationCode&&l.includes(C.violationCode)?(c?.(),r.value=m):C?.token&&(r.value=void 0)});const E=P(()=>!!p.value);return{errorSignal:r,hasError:u,hasSiteKey:E,isLoaded:f,sitekey:p,solvedOnLoad:S,handleVerify(s){const l=a.value;l&&(a.value={...l,token:s,violationCode:void 0},v({include:["captcha"],skipStateUpdates:!0}))},handleLoad(){h||n.histogram({name:"captcha_load_time",value:Date.now()-t,attributes:{provider:a.value?.provider,success:!0}}),k=!0,f.value=!0},handleError(s){h||n.histogram({name:"captcha_load_time",value:Date.now()-t,attributes:{provider:a.peek()?.provider,success:!1,error:String(s)}})},validate(s){if(s&&!s.token)return m}}}),fe={Error:"MTtRU"};function ye(){const e=R(),{client:o,i18n:n}=e,a=o.unstable_getSerialization("workerVersion")!=="fast",r=$(),d=oe(),{lastJourneyProgression:v}=ne(),{captcha:c}=se(),{negotiate:p}=A(),f=w(null),{onOpen:S,onClose:u}=de(e,c),t=M(()=>new ve({appContext:e,captchaSignal:c,errorSignal:d,lastJourneyProgression:v,negotiate:p,onViolation:()=>{u(),f.current?.resetCaptcha()}}));ie(c,d,t.validate,le.InvalidCaptcha);const h=w(null),m=Q({active:t.hasError.value});b(()=>{c.value&&t.isLoaded.value&&h.current&&(m.current=h.current.querySelector("iframe"))});const E=I(()=>t.isLoaded.value?void 0:"none"),s=I(()=>t.hasError.value?j(fe.Error):void 0);return i(g,{when:()=>{const l=t.solvedOnLoad.value&&!c.value?.sitekey;return!!(c.value?.provider==="hcaptcha"&&!l&&t.sitekey.value)},children:i(T,{gap:"large-100",children:[i(g,{when:()=>r.value&&t.isLoaded.value&&t.hasSiteKey.value,children:i(W,{tone:"critical",errorType:G.CheckoutError,children:n.translate("payment_errors.captcha_required_without_payment_information")})}),i(g,{when:()=>!t.isLoaded.value,children:i(Y,{delay:a,contentDisplay:"block",inlineSize:"302px",blockSize:"83px"})}),i(X,{accessibilityLabel:n.translate("captcha.title"),display:E.value,children:i(T,{gap:"small-400",children:[i(he,{}),i("div",{className:s.value,ref:h,children:i(z,{sitekey:t.sitekey.value,onVerify:l=>{u(),t.handleVerify(l)},languageOverride:n.locale,ref:f,onLoad:t.handleLoad,onError:l=>{u(),t.handleError(l)}
1,onOpen:S,onClose:u,onChalExpired:u})}),i(g,{when:t.errorSignal,children:l=>i(Z,{children:l?.message??l})})]})})]})})}const me=Object.freeze(Object.defineProperty({__proto__:null,default:ye},Symbol.toStringTag,{value:"Module"}));export{Re as C};

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.