PageSourceSearch

https://di-volio.com/cz/_nuxt/CfEXXWXF.js

js di-volio.com collected 2026-10-05 05:34:08 UTC 1,915 bytes, 1 lines download raw bytes

1import{l as w,as as f,r as d,c as a,d as t,f as b,N as y,P as x,g as s,O as S,t as k,at as m,o as n}from"./K1b_ijTh.js";import{b as N}from"./XUID70n1.js";const C={class:"max-w-md mx-auto mt-8 p-6 bg-white shadow rounded"},E={class:"mb-4"},I={class:"flex items-center space-x-2"},A=["disabled"],B={key:0,class:"text-yellow-500 text-sm mt-2"},P=["disabled"],U={key:0},V={key:1},D={key:0,class:"mt-4 text-red-500"},F={__name:"terms",async setup(M){let l,p;const{data:_}=([l,p]=w(()=>m("/dashboard/user/terms")),l=await l,p(),l),{user:h}=f(),o=d(_.value?.subscribed_to_newsletter??"Not signed"),r=d(o.value==="Signed"||o.value==="In progress"),i=d(!1),c=d(""),v=async()=>{i.value=!0,c.value="";try{const u=r.value?"/campaign/subscribe":"/campaign/unsubscribe",{error:e}=await m(u,{method:"POST",body:{email:h.value.email,campaign:{type:"Newsletter"}}});if(e.value)throw new Error(e.value.message||"An error occurred while saving your preference.");r.value&&N("newsletter_sign_up_user_account"),window.location.reload()}catch(u){c.value=u.message||"An error occurred while saving your preference."}finally{i.value=!1}};return(u,e)=>(n(),a("div",C,[e[2]||(e[2]=t("h2",{class:"text-2xl font-bold mb-4"},"Newsletter Subscription",-1)),t("div",E,[t("label",I,[y(t("input",{type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=g=>S(r)?r.value=g:null),disabled:s(o)==="In progress",class:"form-checkbox h-5 w-5 text-blue-600"},null,8,A),[[x,s(r)]]),e[1]||(e[1]=t("span",{class:"text-gray-700"}," Subscribe to our newsletter ",-1))]),s(o)==="In progress"?(n(),a("p",B," Please confirm your email to complete your subscription. ")):b("",!0)]),t("button",{onClick:v,disabled:s(i)||s(o)==="In progress",class:"w-full bg-blue-500 hover:bg-blue-600 text-white font-semibold py-2 px-4 rounded"},[s(i)?(n(),a("span",U,"Saving...")):(n(),a("span",V,"Save Changes"))],8,P),s(c)?(n(),a("p",D,k(s(c)),1)):b("",!0)]))}};export{F 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.