PageSourceSearch

https://divided.style/cdn/shopifycloud/checkout-web/assets/c1/7d9fe557.ghtkxYmB.js

js divided.style collected 2026-10-06 17:32:09 UTC 4,351 bytes, 1 lines download raw bytes

1import{p as e,L as a,o as t,z as o,h as r,u as n,U as i,y as s,I as l,t as c,g as u,V as d,k as p,m as v,w as h}from"./2c1ab0fe.Bywc2Brn.js";import{H as m}from"./f8eac2fc.BayxjBJM.js";import{bw as b,s as f,bx as y,by as g,bz as k,S,a9 as _,aa as C,au as w,i as L,bA as j}from"./164ad2e3.CwFFCQJV.js";import{I as E,bb as B,b2 as V,af as x,c as q,bc as O,Z as z,bd as R,b4 as D,b5 as I}from"./9dba8418.BjFsJfKG.js";import{P}from"./01973ac7.20XE6ZBq.js";import"./d0bb51ec.B6dL-tOK.js";import"./app.CGAYdtrm.js";import"./f67abd2c.BWsb-1Zx.js";import"./60a453ce.CEvWNvTm.js";import"./e12db40c.BZEbMADi.js";import"./58314944.vAG_QFeZ.js";function J(e,a){return"failed"===e?.status&&a===e.id}function U(){const{i18n:e}=q(),{progressing:a}=f(),{hasError:t,error:i}=y(O),s=function(){const[e,a]=b(V.LastSeenCaptchaRequestedErrorReceiptId),t=x(),{checkout:n}=q(),i=n.latestReceipt.value,[s,l]=o(()=>!t.peek()||J(i,e));return r(()=>{const t=J(i,e);l(t),"failed"===i?.status&&e!==i.id&&a(i.id),"failed"!==i?.status&&a(void 0)},[i?.id,i?.status]),s}();return a.value?null:t&&i&&!s?n(P,{identifier:"CaptchaRequiredBanner",tone:"critical",children:e.translate("payment_errors.captcha_required_without_payment_information")}):null}let H=!1;const K=i(e=>{const{appContext:{i18n:t,observability:o},captchaSignal:r,errorSignal:n,lastJourneyProgression:i,negotiate:u,onViolation:d}=e,p=s(a(()=>r.value?.sitekey)),v=s(H),h=s(a(()=>Boolean(r.value?.token))),m=l(()=>Boolean(n.value)),b=Date.now(),f=H,y=t.translate("captcha.errors.not_solved");c(()=>{const e=r.value;e?e.sitekey&&(p.value=e.sitekey):p.value=void 0}),c(()=>{const e=i.value,a="error"===e.type?e.violations.map(e=>e.code):[],t=r.value;t&&t.violationCode&&a.includes(t.violationCode)?(d?.(),n.value=y):t?.token&&(n.value=void 0)});const g=l(()=>Boolean(p.value));return{errorSignal:n,hasError:m,hasSiteKey:g,isLoaded:v,sitekey:p,solvedOnLoad:h,handleVerify(e){const a=r.value;a&&(r.value={...a,token:e,violationCode:void 0},u({legacyFiltering:{include:["captcha"]},silenceViolations:z(["captcha"]),skipStateUpdates:!0}))},handleLoad(){f||o.histogram({name:"captcha_load_time",value:Date.now()-b,attributes:{provider:r.value?.provider,success:!0}}),H=!0,v.value=!0},handleError(e){f||o.histogram({name:"captcha_load_time",value:Date.now()-b,attributes:{provider:r.peek()?.provider,success:!1,error:String(e)}})},validate(e){if(e)return e.token?void 0:y}}});function T(){const o=q(),{client:r,i18n:i}=o,s="fast"!==r.unstable_getSerialization("workerVersion"),l=g(),c=R(),{lastJourneyProgression:b}=o.checkout.negotiator,{captcha:y}=o.checkout.negotiator.parts,{negotiate:V}=f(),x=u(null),{onOpen:O,onClose:z}=function({embed:o},r){const n=E(o?.embedder),i=t(!1);return function({embed:t},o){e(()=>{if(!o.value||!E(t?.embedder))return;const e=a(()=>t?.presentation?.acquire());return()=>a(()=>e?.())})}({embed:o},i),e(()=>{r.value?n&&a(()=>B(o,"captcha")):i.value=!1}),{onOpen:()=>{i.value=n&&Boolean(r.value)},onClose:()=>{i.value=!1}}}(o,y),P=d(()=>new K({appContext:o,captchaSignal:y,errorSignal:c,lastJourneyProgression:b,negotiate:V,onViolation:()=>{z(),x.current?.resetCaptcha()}}));D(y,c,P.validate,I.InvalidCaptcha);const J=u(null),H=k({active:P.hasError.value});e(()=>{y.value&&P.isLoaded.value&&J.current&&(H.current=J.current.querySelector("iframe"))});const T=p(()=>P.isLoaded.value?void 0:"none"),A=p(()=>P.hasError.value?v("MTtRU"):void 0);return n(h,{when:()=>{const e=P.solvedOnLoad.value&&!y.value?.sitekey;return Boolean("hcaptcha"===y.value?.provider&&!e&&Boolean(P.sitekey.value))},children:n(S,{gap:"large-100",children:[n(h,{when:()=>l.value&&P.isLoaded.value&&P.hasSiteKey.value,children:n(_,{tone:"critical",errorType:C.CheckoutError,children:i.translate("payment_errors.captcha_required_without_payment_information")})}),n(h,{when:()=>!P.isLoaded.value,children:n(w,{delay:s,contentDisplay:"block",inlineSize:"302px",blockSize:"83px"})}),n(L,{accessibilityLabel:i.translate("captcha.title"),display:T.value,children:n(S,{gap:"small-400",children:[n(U,{}),n("div",{className:A.value,ref:J,children:n(m,{sitekey:P.sitekey.value,onVerify:e=>{z(),P.handleVerify(e)},languageOverride:i.locale,ref:x,onLoad:P.handleLoad,onError:e=>{z(),P.handleError(e)},onOpen:O,onClose:z,onChalExpired:z})}),n(h,{when:P.errorSignal,children:e=>n(j,{children:e?.message??e})})]})})]})})}export{T 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.