PageSourceSearch

https://www.myposter.de/_nuxt/CwzkeG3P.js

js myposter.de collected 2026-09-24 09:58:55 UTC 3,847 bytes, 1 lines download raw bytes

1import{j as O,u as L,N as V,i as B,b as R,a as S,c as g,d as h,e as y}from"./CYPPpJt8.js";import{y as N,a9 as _,bh as k,d as E,Y as D,aI as U,a as m,k as n,$ as I,o as b,bD as F,bg as A,l as f,bU as P,c as T,g as $,_ as x,w as M,r as H,H as W}from"./Cdma0c0o.js";import{R as q}from"./BRInCMfI.js";import"./CtVc_rni.js";const j=()=>{const{applyFetchError:e,email:r,errorMessage:o,hasValidationError:t,isError:a,isLoading:s,isSuccess:i,validate:c}=O(),{$fetchShop:l}=N();return{email:r,errorMessage:o,hasValidationError:t,isError:a,isLoading:s,isSuccess:i,unsubscribe:async()=>{if(s.value||!c())return!1;s.value=!0,a.value=!1,o.value=null;try{return await l(_.NEWSLETTER_UNSUBSCRIBE,{body:{email:r.value},method:"POST"}),i.value=!0,!0}catch(d){return e(d,k.NEWSLETTER_UNSUBSCRIBE_ERROR),!1}finally{s.value=!1}}}},u=E({__name:"NewsletterSectionForm",props:{isUnsubscribe:{type:Boolean,default:!1}},setup(e){const{t:r}=D(),o=U(),t=e.isUnsubscribe?j():L({source:B.SECTION}),{email:a,errorMessage:s,hasValidationError:i,isError:c,isLoading:l,isSuccess:p}=t,d="unsubscribe"in t?t.unsubscribe:t.signUp;return e.isUnsubscribe&&typeof o.query.email=="string"&&(a.value=o.query.email),(Z,v)=>(b(),m(V,{modelValue:n(a),"onUpdate:modelValue":v[0]||(v[0]=C=>I(a)?a.value=C:null),inline:"","form-name":e.isUnsubscribe?"newsletterPageUnsubscribe":"newsletterPage",placeholder:n(r)("newsletter.popupEmailPlaceholder"),"cta-text":n(r)(e.isUnsubscribe?"newsletter.pageUnsubscribeButton":"newsletter.pageSignupButton"),"success-message":e.isUnsubscribe?n(r)("newsletter.pageUnsubscribeSuccess"):void 0,"is-loading":n(l),"is-error":n(c),"has-validation-error":n(i),"error-message":n(s),"is-success":n(p),onSubmit:n(d)},null,8,["modelValue","form-name","placeholder","cta-text","success-message","is-loading","is-error","has-validation-error","error-message","is-success","onSubmit"]))}});typeof R=="function"&&R(u);typeof S=="function"&&S(u);typeof g=="function"&&g(u);typeof h=="function"&&h(u);typeof y=="function"&&y(u);const w=e=>e.replace(/\s€/g,"€"),Y=()=>{const e=U(),{$currentLocale:r}=N(),o=typeof e.query.code=="string"?e.query.code:void 0,{data:t,error:a}=F(_.NEWSLETTER_CONFIRM,{body:{activationCode:o},immediate:!!o,method:"POST",onResponseError({response:c}){A.error(k.NEWSLETTER_CONFIRM_ERROR,{data:c._data,statusCode:c.status})}},"$IDLdFbS-vg"),s=f(()=>!o||!!a.value||!t.value?.payload),i=f(()=>{const c=t.value?.payload,l=c?.voucherDateTo;return{MIN_ORDER_VALUE:w(c?.minimumOrderValueFormatted??""),VOUCHER_CODE:c?.voucherCode??"",VOUCHER_END_DATE:l==null?"":P(new Date(l),r),VOUCHER_VALUE:w(c?.voucherValueFormatted??"")}});return{isError:s,voucherReplacements:i}},z=/\{\{\s*(\w+)\s*\}\}/g,G=(e,r)=>{const o=a=>a.replace(z,(s,i)=>i in r?r[i]:s),t=a=>{const s={...a};return typeof s.text=="string"&&(s.text=o(s.text)),Array.isArray(s.content)&&(s.content=s.content.map(t)),s};return t(e)},J=["data-testid"],K=E({__name:"NewsletterSectionResponse",props:{blok:{}},setup(e){const{isError:r,voucherReplacements:o}=Y(),t=f(()=>e.blok.successText?G(e.blok.successText,o.value):void 0);return(a,s)=>(b(),T("div",{class:"newsletter-section-response","data-testid":`newsletter-response-${n(r)?"error":"success"}`},[$(q,{doc:n(r)?e.blok.errorText:n(t)},null,8,["doc"])],8,J))}}),Q=x(K,[["__scopeId","data-v-ae2717ea"]]),X=E({__name:"NewsletterSection",props:{blok:{}},setup(e){return(r,o)=>{const t=H("editable");return M((b(),T("div",{class:W(["newsletter-section",{"newsletter-section--form":e.blok.state!=="response"}]),"data-testid":"newsletter-section"},[e.blok.state==="response"?(b(),m(Q,{key:0,blok:e.blok},null,8,["blok"])):(b(),m(u,{key:1,"is-unsubscribe":e.blok.state==="unsubscribe"},null,8,["is-unsubscribe"]))],2)),[[t,e.blok]])}}}),oe=Object.assign(x(X,[["__scopeId","data-v-552ff821"]]),{__name:"NewsletterSection"});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.