PageSourceSearch

https://www.nubuk-bikes.de/_nuxt/bNG9nWK7.js

js nubuk-bikes.de collected 2026-10-03 20:04:45 UTC 5,922 bytes, 1 lines download raw bytes

1import{_ as oe}from"./DsnDVFMS.js";import{_ as ie}from"./xob0rGV7.js";import{_ as re}from"./BT2_Moxh.js";import{a as me,aa as $,ab as de,ac as ue,ad as c,r as a,af as ce,c as fe,d as pe,b as be,a9 as ge,ag as ve,W as ye,T as U,V as I,O as Fe,D as he}from"./BenrcST_.js";import{t as _e,d as we,U as T,I as xe,l as C,j as i,z as s,u as e,C as l,q as Ve,i as f,L as w,k as x,f as L,B as Se,r as M,e as p,E as q}from"./C9HqmeuD.js";import{B as ke}from"./Dk7lC26s.js";import{u as Ie}from"./B97SkJva.js";import{u as Ce}from"./1XQr3F4m.js";const qe=()=>{const V=me("useCancellationForm",()=>({loading:!1})),{getSetting:u}=$("cloudflareTurnstileApiSiteKey"),r=u()??"",E=de(ue({orderId:c().trim().required(a("error.requiredField")).matches(/^[1-9][0-9]*$/,a("cancellationForm.orderIdInvalid")).default(""),name:c().trim().required(a("error.requiredField")).default(""),reason:c().trim().optional().default(""),email:c().trim().required(a("error.email.required")).test("is-valid-email",a("storefrontError.contactMail.emailInvalid"),b=>ce.isValidEmailAddress(b)).default(""),turnstile:r.length>0?c().required(a("error.turnstileRequired")).default(""):c().optional().default("")}));return{submitCancellation:async b=>{V.value.loading=!0;try{const{data:g}=await fe().plentysystems.doSubmitCancellation(b);return g?.email??null}catch(g){return pe(g),null}finally{V.value.loading=!1}},validationSchema:E,turnstileSiteKey:r,..._e(V.value)}},Ee={class:"t2 mx-auto my-8 w-full max-w-4xl rounded-md border border-neutral-200 bg-white p-8"},Be={class:"mb-6 text-2xl font-semibold text-neutral-900"},Ue={key:0,class:"flex items-start bg-warning-100 shadow-md pr-4 pl-4 ring-1 ring-warning-200 typography-text-sm md:typography-text-base py-1 rounded-md mb-4"},Ae={class:"py-2"},Ne={class:"flex flex-col"},Re={class:"mr-1"},Te={class:"text-sm text-neutral-500 mb-2"},Le={class:"flex flex-col-reverse md:flex-row md:items-start md:justify-between gap-4"},Me={key:1},Oe=we({__name:"cancellation-form",async setup(V){let u,r;const{getLegalTexts:E}=Ie(),{loading:m,submitCancellation:b,validationSchema:g,turnstileSiteKey:S}=qe(),{getSetting:P}=$("cancellationFormRecipient"),j=P()??"",A=M(),N=M(!1),{send:H}=be(),{getRobots:K,setRobotForStaticPage:W}=ge(),{setPageMeta:z}=Ce();z(a("legal.cancellationForm"),"page"),[u,r]=T(()=>E({type:"WithdrawalForm"})),await u,r(),[u,r]=T(()=>K()),await u,r(),W("CancellationForm");const{errors:B,meta:D,defineField:v,handleSubmit:O,resetForm:G}=ve({validationSchema:g}),[J,Q]=v("orderId"),y=J,[X,Y]=v("name"),F=X,[h,Z]=v("email"),[k,ee]=v("reason"),[_,te]=v("turnstile"),ae=async()=>{if(!D.value.valid)return;const t=await b({email:h.value||"",name:F.value||"",orderId:Number(y.value),reason:k.value||"","cf-turnstile-response":_.value||""});t&&(H({type:"positive",message:a("cancellationForm.success",{email:t})}),G()),_.value="",A.value?.reset()},R=O(()=>ae());if(S.length>0){const t=xe([y,F,h],n=>{n.some(d=>d&&d.length>0)&&(N.value=!0,t())})}return(t,n)=>{const d=oe,le=ie,ne=re,se=Fe;return p(),C("div",Ee,[i("h2",Be,s(("t"in t?t.t:e(a))("legal.cancellationForm")),1),e(S).length===0||e(j).length===0?(p(),C("div",Ue,[l(e(ye),{class:"mt-2 mr-2 text-warning-700 shrink-0"}
1),i("div",Ae,s(("t"in t?t.t:e(a))("cancellationForm.misConfigured")),1)])):(p(),C("form",{key:1,"data-testid":"cancellation-form",class:"flex flex-col rounded-md gap-4",novalidate:"",onSubmit:n[5]||(n[5]=Ve((...o)=>e(R)&&e(R)(...o),["prevent"]))},[i("label",null,[l(d,{class:"mb-1"},{default:f(()=>[q(s(("t"in t?t.t:e(a))("cancellationForm.orderId"))+" "+s(("t"in t?t.t:e(a))("form.required")),1)]),_:1}),l(e(U),w(e(Q),{modelValue:e(y),"onUpdate:modelValue":n[0]||(n[0]=o=>x(y)?y.value=o:null),name:"orderId",type:"text",invalid:!!e(B).orderId,disabled:e(m)}),null,16,["modelValue","invalid","disabled"]),l(e(I),{as:"div",name:"orderId",class:"text-negative-700 text-left text-sm pt-[0.2rem]"})]),i("label",null,[l(d,{class:"mb-1"},{default:f(()=>[q(s(("t"in t?t.t:e(a))("cancellationForm.name"))+" "+s(("t"in t?t.t:e(a))("form.required")),1)]),_:1}),l(e(U),w(e(Y),{modelValue:e(F),"onUpdate:modelValue":n[1]||(n[1]=o=>x(F)?F.value=o:null),name:"name",type:"text",invalid:!!e(B).name,disabled:e(m)}),null,16,["modelValue","invalid","disabled"]),l(e(I),{as:"div",name:"name",class:"text-negative-700 text-left text-sm pt-[0.2rem]"})]),i("label",null,[l(d,{class:"mb-1"},{default:f(()=>
1[q(s(("t"in t?t.t:e(a))("cancellationForm.email"))+" "+s(("t"in t?t.t:e(a))("form.required")),1)]),_:1}),l(e(U),w(e(Z),{modelValue:e(h),"onUpdate:modelValue":n[2]||(n[2]=o=>x(h)?h.value=o:null),name:"email",type:"email",invalid:!!e(B).email,disabled:e(m),autocomplete:"email"}),null,16,["modelValue","invalid","disabled"]),l(e(I),{as:"div",name:"email",class:"text-negative-700 text-left text-sm pt-[0.2rem]"})]),i("label",Ne,[l(d,{class:"mb-1 flex"},{default:f(()=>[i("span",Re,s(("t"in t?t.t:e(a))("cancellationForm.reason")),1),l(le,null,{default:f(()=>[q("("+s(("t"in t?t.t:e(a))("form.optional"))+")",1)]),_:1})]),_:1}),l(e(ke),w(e(ee),{modelValue:e(k),"onUpdate:modelValue":n[3]||(n[3]=o=>x(k)?k.value=o:null),name:"reason",disabled:e(m),class:"w-full"}),null,16,["modelValue","disabled"])]),i("p",Te,s(("t"in t?t.t:e(a))("form.required"))+" "+s(("t"in t?t.t:e(a))("cancellationForm.asterixHint")),1),i("div",Le,[i("div",null,[e(S).length>0&&e(N)?(p(),L(ne,w({key:0},e(te),{ref_key:"turnstileElement",ref:A,modelValue:e(_),"onUpdate:modelValue":n[4]||(n[4]=o=>x(_)?_.value=o:null),"site-key":e(S),options:{theme:"light"}}),null,16,["modelValue","site-key"])):Se("",!0),l(e(I),{as:"div",name:"turnstile",class:"text-negative-700 text-left text-sm pt-[0.2rem]"})]),l(se,{type:"submit",class:"min-w-[120px]",disabled:e(m)},{default:f(()=>[e(m)?(p(),L(e(he),{key:0,class:"flex justify-center items-center",size:"sm"}
1)):(p(),C("span",Me,s(("t"in t?t.t:e(a))("cancellationForm.submit")),1))]),_:1},8,["disabled"])])],32))])}}});export{Oe 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.