PageSourceSearch

https://www.protyze.com/cdn/shopifycloud/checkout-web/assets/c1/2acfb1ce.CvA6-YPb.js

js protyze.com collected 2026-10-07 17:14:31 UTC 8,352 bytes, 1 lines download raw bytes

1import{T as e,q as n,I as a,t as r,u as t,o as i,n as o,S as c,k as s,h as l}from"./2c1ab0fe.DlNazk3M.js";import{aF as u,l as p,j as d,L as v,cj as h,d as g,H as m,S as y,cD as f,cE as k,f as b,cF as P,M as S,B as C,cG as T,cH as _,D as B}from"./164ad2e3.CR6m0m--.js";import{c as A,c2 as E,ca as D,F as x,I as w}from"./4b4bc88f.DJ4vpQqJ.js";import{S as I}from"./54bf0ebb.Cz0a8xih.js";import"./d0bb51ec.CruejZky.js";import"./app.DKKjpp8o.js";import"./f67abd2c.Dckgq3F6.js";import"./60a453ce.CV8OqWZ9.js";import"./e12db40c.C6hBKds9.js";import"./9dba8418.C1GTC4hZ.js";const M="privacy-consent-banner",j="privacy_preferences_modal",q="privacy-policy-modal";var L=(e=>(e.Accept="accept",e.Decline="decline",e.AcceptAll="accept_all",e.DeclineAll="decline_all",e.ManagePreferences="manage_preferences",e.Save="save",e.LeavePreferences="leave_preferences",e.PrivacyPolicyView="privacy_policy_view",e.CloseCheckoutBanner="close_checkout_banner",e))(L||{});function O(){const{client:a,consentManager:r,userEvents:t,router:i,shop:o,source:c}=A(),s=i.currentUrl.value,{domain:l,storefrontDomains:u}=o,p="true"===s.searchParams.get("previewPrivacyBanner"),d=c.checkoutSessionIdentifier,v=e(()=>{const e=document.referrer;return u.some(n=>e.includes(n))},[u]);return{emitPrivacyBannerInteractionEvent:n(e=>{p||t.monorailEvent({schemaId:"privacy_banner_interact/1.3",payload:{shopPermanentDomain:l,sessionToken:a.cookies.get("_shopify_y")||"0",regulation:"CMP",path:s.pathname,visitorRegion:r.getRegion.value,interactionType:e,checkoutSessionIdentifier:d,isStorefrontReferrer:v}})},[p,r,l,a.cookies,s.pathname,d,v,t]),emitPrivacyBannerRenderEvent:n(()=>{p||t.monorailEvent({schemaId:"privacy_banner_render/1.2",payload:{shopPermanentDomain:l,sessionToken:a.cookies.get("_shopify_y")||"0",regulation:"CMP",path:s.pathname,checkoutSessionIdentifier:d,isStorefrontReferrer:v}})},[p,l,a.cookies,s.pathname,d,v,t]),emitPrivacyBannerInitializedEvent:n(()=>{p||t.monorailEvent({schemaId:"privacy_banner_initialized/1.1",payload:{shopPermanentDomain:l,sessionToken:a.cookies.get("_shopify_y")||"0",regulation:"CMP",path:s.pathname,checkoutSessionIdentifier:d,isStorefrontReferrer:v}})},[p,l,a.cookies,s.pathname,d,v,t])}}const N={id:"76113fc688fe950e2e09d64b5b10df17007abf25436339310e6aeb706bdf5e30",type:"query",name:"PrivacyBannerSettings",source:""},R=u(({graphql:{coreGraphql:e}},{privacyBannerSettingsSignal:n})=>{const t=e.query(N,{cache:!1}),i=a(()=>t.data.value?.privacyBannerSettings);return r(()=>{i.value&&(n.value=i.value)}),{error:t.error,loading:t.loading,settings:i}}),z=(e,n)=>{n?console.debug(n):e?console.error("Set consent error: ",e):console.error("Set consent error: unknown")},F=async({givenConsent:e,token:n,consentManager:a})=>{await a.setTrackingConsent({analytics:e,marketing:e,preferences:e,storefrontAccessToken:n},z)};function V(e){function a(){p(M),p(j)}const r=i(!1),s=i(!1),l=i(!1),u=i(!0),{hideOverlay:p}=h(),{emitPrivacyBannerInteractionEvent:d}=O(),{consentManager:v}=A(),T=async({analytics:n,marketing:a,preferences:t})=>{o(()=>{r.value=n,s.value=a,l.value=t}),await v.setTrackingConsent({analytics:n,marketing:a,preferences:t,storefrontAccessToken:e.consentTrackingApiToken},z)},_=n(()=>{d(L.LeavePreferences),u.value=!0},[d,u]),B=n(()=>{if(u.value){const{analytics:e,marketing:n,preferences:a}=v.currentVisitorConsent.value;o(()=>{r.value="yes"===e,s.value="yes"===n,l.value="yes"===a,u.value=!1})}},[r,v,u,s,l]),E=(()=>{const n=[e.bulletPoints?.firstText,e.bulletPoints?.secondText,e.bulletPoints?.thirdText].filter(e=>"string"==typeof e);return e.bulletPoints?.enabled&&n.length>0?t(c,{children:[t(g,{blockSize:"base"}),t(m,{level:3,children:e?.bulletPoints?.title}),t(y,{gap:"base",padding:"small-300 none small-300 none",children:t(f,{children:n.map((e,n)=>t(k,{children:t(b,{children:e})},n))})})]}):null})(),D=t(y,{children:[t(m,{level:3,children:e.introTitle}),t(b,{children:e.introText}),E]}),x=t(y,{gap:"base",children:[t(P,{checked:!0,disabled:!0,label:e.purposes.essentialName,details:e.purposes.essentialDesc}),t(P,{checked:l.value,onChange:e=>{l.value=e},label:e.purposes.preferencesName,details:e.purposes.preferencesDesc}),t(P,{checked:s.value,onChange:e=>{s.value=e},label:e.purposes.marketingName,details:e.purposes.marketingDesc}),t(P,{checked:r.value,onChange:e=>{r.value=e},label:e.purposes.performanceName,details:e.purposes.performanceDesc})]});return t(S,{id:j,heading:e.title||"",primaryAction:t(C,{variant:"primary",onClick:()=>{T({analytics:r.value,marketing:s.value,preferences:l.value}),d(L.Save),a()},children:e.buttonSaveText}),secondaryActions:t(c,{children:[t(C,{onClick:()=>{T({analytics:!0,marketing:!0,preferences:!0}),d(L.AcceptAll),a()},children:e.buttonAcceptText}),t(C,{onClick:()=>{T({analytics:!1,marketing:!1,preferences:!1}),d(L.DeclineAll),a()},children:e.buttonDeclineText})]}),size:"large",onHide:_,onShow:B,children:t(y,{gap:"base",children:[D,x]})})}const U=u(({graphql:{coreGraphql:e},router:n},{isCheckoutEditor:t,privacyBannerSettingsSignal:i,showPrivacySheet:o})=>{const c=a(()=>"true"===n.currentUrl.value.searchParams.get("previewPrivacyBanner")),s=e.query(N,{cache:!1,skip:()=>!o.value&&!c.value||t}),l=a(()=>s.data.value?.privacyBannerSettings);return r(()=>{l.value&&(i.value=l.value)}),{error:s.error,hidden:a(()=>s.loading.value||t||(!o.value||!l.value?.showBannerOnCheckout)&&!c.value),loading:s.loading,settings:l}}),H={PrivacyPreferencesFooterLink:function(){const{i18n:e,checkout:{negotiator:a}}=A(),{emitPrivacyBannerInteractionEvent:r}=O(),{privacyBannerSettingsSignal:i}=a.context,{footer:{content:{typography:o}={}}={}}=p(),c=n(()=>{r(L.ManagePreferences)},[r]),{settings:s,loading:l,error:u}=E(R,{privacyBannerSettingsSignal:i});if(l.value||!s.value?.enabled)return null;if(u.value)return console.error("Error fetching consent banner data",u.value),null;const h=e.translate("shop_policies.cookie_preferences"),g=t(v,{display:"block",onClick:c,commandFor:j,"aria-haspopup":"dialog",children:h});return o?t(d,{size:o.size,color:o.color,type:"bold"===o.weight?"strong":void 0,children:g}):g},PrivacyPreferences:function(){const{checkout:{negotiator:e}}=A(),{privacyBannerSettingsSignal:n}=e.context,a=n.value;return a?.enabled?t(V,{...a.preferences,consentTrackingApiToken:a.consentTrackingApiToken||void 0}):null},PrivacySheet:function(){const{emitPrivacyBannerInteractionEvent:e,emitPrivacyBannerRenderEvent:a,emitPrivacyBannerInitializedEvent:r}=O();r();const{consentManager:i,embed:o,shop:u,checkout:{negotiator:p}}=A(),{localPolicies:d}=x(),g=_(),m=function(){const{consentManager:e}=A(),n=T();return s(()=>!!n.value&&function(e){const n=e.currentVisitorConsent.value;return n.analytics===D.NO_VALUE&&n.marketing===D.NO_VALUE&&n.preferences===D.NO_VALUE}(e))}(),{hideOverlay:y}=h(),{privacyBannerSettingsSignal:f}=p.context,{settings:k,loading:P,error:S,hidden:N}=E(U,{isCheckoutEditor:g,privacyBannerSettingsSignal:f,showPrivacySheet:m}),R=n(()=>{e(L.CloseCheckoutBanner)},[e]),z=n(()=>{e(L.PrivacyPolicyView)},[e]),V=n(()=>{e(L.ManagePreferences)},[e]);if(l(()=>{!P.value&&m.value&&!S.value&&k.value?.showBannerOnCheckout&&a()},[a,P.value,m.value,S.value,k.value]),N.value)return null;if(S.value||!k.value)return console.error("Error fetching consent banner data",S.value),null;const{title:H,text:G,policyLinkUrl:J,policyLinkText:K,buttonAcceptText:Q,buttonDeclineText:W,buttonPrefsOpenText:X}=k.value,Y=k.value.consentTrackingApiToken||void 0,Z=J.includes("/policies/"),$=Z&&w(o?.embedder),ee=J.split("/").pop()||"privacy-policy",ne={...d.find(e=>e.handle===ee)??{shopName:u.name,shopId:u.id,handle:ee,url:J,squareLogo:u.brandSettings?.squareLogo},name:K};return t(c,{children:[t(I,{defaultOpen:!0,id:M,heading:H||"",onHide:R,primaryAction:t(c,{children:[t(C,{onClick:()=>{F({givenConsent:!0,token:Y,consentManager:i}),e(L.Accept),y(M)},children:Q}),t(C,{onClick:()=>{F({givenConsent:!1,token:Y,consentManager:i}),e(L.Decline),y(M)},children:W})]}),secondaryActions:t(v,{textDecoration:"none",onClick:V,commandFor:j,"aria-haspopup":"dialog",children:X}),children:t(b,{tone:"info",type:"small",children:[G,t(v,{href:Z?void 0:J,target:Z?void 0:"_blank",onClick:()=>{z(),$&&o?.client?.windowOpenRequest(J)},...$&&{"aria-haspopup":"dialog"},...Z&&!$&&{commandFor:q},children:K})]})}),Z&&!$&&t(B,{defaultPolicy:ne,id:q},ee)]})}};export{H as deferredPrivacyComponents};

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.