PageSourceSearch

https://www.primary.com/cdn/shop/t/42/assets/CCPADoNotSellPage.chunk.dd9c3f445904b2ff02ea.min.js

js primary.com collected 2026-09-24 09:09:52 UTC 6,411 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="09159f23-45a3-466c-a5e6-e8536488f6d6",e._sentryDebugIdIdentifier="sentry-dbid-09159f23-45a3-466c-a5e6-e8536488f6d6")}catch(e){}}(),(self.webpackChunkpk_shopify_theme=self.webpackChunkpk_shopify_theme||[]).push([[31],{83698:(e,s,t)=>{t.r(s),t.d(s,{default:()=>y});var r=t(74848),a=t(29123),n=t(63405),i=t(97483),o=t(96540),l=t(49785),c=t(37985),p=t(46658),m=t(83741),d=t(32485),u=t.n(d);const w=(0,o.createContext)(void 0),h=()=>{const e=(0,o.useContext)(w);if(!e)throw new Error("useCCPACookiesContext must be used within a CCPACookiesProvider");return e},x=({children:e})=>{const[s,t]=(0,o.useState)(!1);(0,o.useEffect)((()=>{const e=window.Shopify.customerPrivacy.currentVisitorConsent(),s="no"===e.analytics&&"no"===e.marketing&&"no"===e.sale_of_data;t(s)}),[]);const a=(0,o.useCallback)((()=>{window.Shopify.customerPrivacy.setTrackingConsent({sale_of_data:!1,analytics:!1,marketing:!1},(()=>console.info("Updated user CCPA opt-out preferences."))),t(!0)}),[t]),n={optIn:(0,o.useCallback)((()=>{window.Shopify.customerPrivacy.setTrackingConsent({sale_of_data:!0,analytics:!0,marketing:!0},(()=>console.info("Updated user CCPA opt-in preferences."))),t(!1)}),[t]),optOut:a,isOptedOut:s};return(0,r.jsx)(w.Provider,{value:n,children:e})};function b({checkIsBot:e}){const{optOut:s}=h(),[t,a]=(0,o.useState)(!1),{register:d,handleSubmit:w,setError:x,formState:b,clearErrors:f}=(0,l.mN)({mode:"onSubmit"}),{errors:j}=b,_=e=>j[e]?(0,r.jsxs)("span",{className:"pw-d-inline-flex pw-m-t-2 pw-text-red",children:[(0,r.jsx)(c.A,{}),(0,r.jsx)("span",{className:"pw-message__text",children:j[e]?.message})]}):null;return t?(0,r.jsxs)("div",{className:"pw-message pw-message--success",children:[(0,r.jsx)(p.A,{}),(0,r.jsx)("p",{className:"pw-message__text",children:n.FP._t.Ez})]}):(0,r.jsxs)("form",{id:"ccpa-do-not-sell-form",onSubmit:w((async(t,r)=>{try{if(r.stopPropagation(),await e())throw new i.A("Do not sell form user suspected to be a bot");const n=await fetch("https://pk-shopify-theme-api.primary.codes/donotsell/list/add-customer",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t?.email,firstName:t?.firstName,lastName:t?.lastName,poplarSubjectDeleteFeature:{isoTimestamp:(new Date).toISOString()}})});if(!n.ok)throw new Error(`Failed to submit opt-out, ${n.status}: ${n.statusText}`);s(),a(!0)}catch(e){console.error(e),m.Cp(e),x("serverError",{})}})),children:[(0,r.jsx)("div",{className:"pw-m-t-4",children:(0,r.jsxs)("p",{className:"pw-body-medium",children:[n.ju.Ti.j_,(0,r.jsx)("span",{className:"pw-label__required",children:"*"})]})}),(j?.serverError||j?.unknownError)&&(0,r.jsxs)("div",{className:"pw-message pw-message--error pw-m-t-3 pw-m-b-2 pw-text-line-height-tight",children:[(0,r.jsx)(c.A,{}),(0,r.jsx)("p",{className:"pw-message__text",children:n.ju._L.K})]}),(0,r.jsxs)("div",{className:"pw-m-t-4",children:[(0,r.jsxs)("label",{htmlFor:"email",className:"pw-d-inline-block pw-header-5 pw-m-b-1",children:[n.FP._t.R8,(0,r.jsx)("span",{className:"pw-label__required",children:"*"})]}),(0,r.jsx)("input",{type:"text",...d("email",{required:n.FP._t.Cq,pattern:{value:/\S+@\S+\.\S+/,message:"Entered value does not match email format"}}),className:u()(j.email&&"pw-input--error","pw-input"),"aria-label":n.FP._t.R8})]}),_("email"),(0,r.jsxs)("div",{className:"pw-m-t-4",children:[(0,r.jsxs)("label",{htmlFor:"firstName",className:"pw-d-inline-block pw-header-5 pw-m-b-1",children:[n.FP._t.bq,(0,r.jsx)("span",{className:"pw-label__required",children:"*"})]}),(0,r.jsx)("input",{type:"text",...d("firstName",{required:n.FP._t.yB,pattern:{value:/(.|\s)*\S(.|\s)*/,message:n.FP._t.ge}}),className:u()(j.firstName&&"pw-input--error","pw-input"),"aria-label":n.FP._t.bq})]}),_("firstName"),(0,r.jsxs)("div",{className:"pw-m-t-4",children:[(0,r.jsxs)("label",{htmlFor:"lastName",className:"pw-d-inline-block pw-header-5 pw-m-b-1",children:[n.FP._t.Vh,(0,r.jsx)("span",{className:"pw-label__required",children:"*"})]}),(0,r.jsx)("input",{type:"text",...d("lastName",{required:n.FP._t.Eo,pattern:{value:/(.|\s)*\S(.|\s)*/,message:n.FP._t.Sp}}),className:u()(j.lastName&&"pw-input--error","pw-input"),"aria-label":n.FP._t.Vh})]}),_("lastName"),(0,r.jsx)("div",{className:"pw-m-t-4",children:(0,r.jsx)("button",{className:"pw-button pw-button--primary pw-button--regular",type:"submit",onFocus:()=>f(["serverError"]),children:n.FP._t.tA})})]})}var f=t(36141);function j(){const{checkIsBot:e}=(0,i.V)(f.M.CCPADoNotSellForm);return(0,r.jsx)(b,{checkIsBot:e})}const _="pw-p-l-0 pw-p-t-0 pw-p-b-3";function N(){const[e,s]=(0,o.useState)(!1),{isOptedOut:t,optOut:a,optIn:i}=h(),{handleSubmit:d,setError:u,formState:w,clearErrors:x}=(0,l.mN)({mode:"onSubmit"}),{errors:b}=w,f=`pw-button pw-button--${t?"secondary":"primary"} pw-button--regular`;return(0,r.jsxs)("form",{id:"ccpa-cookie-form",onSubmit:d((async()=>{try{t?i():a(),s(!0)}catch(e){s(!1),console.error(e),m.Cp(e),u("serverError",{})}})),children:[(b?.serverError||b?.unknownError)&&(0,r.jsxs)("div",{className:`pw-message pw-text-red ${_}`,children:[(0,r.jsx)(c.A,{}),(0,r.jsx)("p",{className:"pw-message__text",children:n.ju._L.K})]}),(e||t)&&(0,r.jsxs)("div",{className:`pw-message pw-text-green ${_}`,children:[(0,r.jsx)(p.A,{}),(0,r.jsx)("p",{className:"pw-message__text",children:t?n.FP.en.E.j:n.FP.en.E.E})]}),(0,r.jsx)("div",{className:"pw-m-b-6",children:(0,r.jsx)("button",{className:f,type:"submit",onFocus:()=>x(["serverError"]),children:t?n.FP.en.t.E:n.FP.en.t.j})})]})}function y(){return window.currentVisitorConsent=()=>window.Shopify.customerPrivacy.currentVisitorConsent(),(0,r.jsx)(a.G3,{reCaptchaKey:"6LcxGaQfAAAAAH2LKQ4iJ5FithhmUwDTKIq_xh3q",scriptProps:{async:!0},children:(0,r.jsx)(x,{children:(0,r.jsxs)("ol",{children:[(0,r.jsxs)("li",{children:[n.FP.I$.U.L.map(((e,s)=>(0,r.jsx)("p",{className:s===n.FP.I$.U.L.length-1?"pw-m-b-4":"pw-m-b-3",dangerouslySetInnerHTML:{__html:e}},e))),(0,r.jsx)(N,{})]}),(0,r.jsxs)("li",{children:[n.FP.I$.d.L.map((e=>(0,r.jsx)("p",{className:"pw-m-b-4",dangerouslySetInnerHTML:{__html:e}},e))),(0,r.jsx)(j,{})]})]})})})}}}]);
2//# sourceMappingURL=CCPADoNotSellPage.chunk.dd9c3f445904b2ff02ea.min.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.