PageSourceSearch

https://www.tesa.com/relaunch2020/build/contact-form-switcher.9194bed2.js

js tesa.com collected 2026-10-02 06:20:39 UTC 11,762 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunktesa_2016=globalThis.webpackChunktesa_2016||[]).push([[1404],{9350:(e,t,l)=>{l.d(t,{Z:()=>n});var a=l(5166);const n=Object.assign({name:"CompiledMarkup"},{__name:"CompiledMarkup",props:{html:{type:String,default:""}},setup(e){const t=e,l=(0,a.Fl)(()=>({render:(0,a.MY)(t.html)}));return(e,t)=>((0,a.wg)(),(0,a.j4)((0,a.LL)(l.value)))}})},1442:(e,t,l)=>{l.r(t),l.d(t,{default:()=>W});var a=l(5166),n=l(7105),i=l(9669),o=l.n(i),r=l(1550),s=l(9350),c=l(8752),u=l(3903);const d=function(e){var t;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";const a=null==e||null===(t=e.$slots)||void 0===t?void 0:t[l];return"function"==typeof a?a:null};var v=l(1919);const m={class:"grid-row"},g={class:"col-12 col-md-8"},p={class:"contact-form__intro"},f=["href"],y={class:"navigation-link__text"},k={key:1,class:"contact-form__headline headline headline--1"},h={key:0},b={key:0,class:"contact-form__selection-contact grid-row"},_={key:0,class:"contact-form__form-selection col-12 col-md-6"},w={class:"contact-form__form-wrapper",ref:"formWrapper"},S={key:1},C={ref:"successMessage","data-testid":"contact-form-success"},U={class:"paragraph marg-t--component align-full"},F={class:"paragraph__content"},j={class:"headline headline--3"},T=["innerHTML"],q={class:"button-wrapper marg-t--5"},H={key:2},x={ref:"genericErrorMessage"},D={class:"paragraph marg-t--component align-full"},O={class:"paragraph__content"},R={class:"paragraph__body richtext copy copy--large"},W=Object.assign({name:"ContactFormSwitcher"},{__name:"ContactFormSwitcher",props:{backText:{type:String,default:""},backUrl:{type:String,default:""},backgroundColor:{type:String,validator:e=>["white","gray",null].includes(e)},defaultFormEndpoint:{type:String,required:!0},hasDefaultForm:{type:Boolean,default:!1},headline:{type:String,default:""},hideLightBoxButtonText:{type:String,default:""},initiallySelectedSegment:{type:String,default:""},preloadForms:{type:Boolean,default:!1},resetButtonText:{type:String,default:""},segmentHeadline:{type:String,default:""},segmentPlaceholder:{type:String,default:""},segmentReset:{type:String,default:"Reset"},segments:{type:Object,default:()=>({}),validator:e=>Object.entries(e).every(e=>{let[t,l]=e;return"object"==typeof l&&["string"==typeof t&&t.length>0,"string"==typeof l.label&&l.label.length>0,"string"==typeof l.endpoint&&l.endpoint.length>0,void 0===l.topics||"object"==typeof l.topics].every(Boolean)})}},setup(e){var t;const l=o().create({headers:{"content-type":"application/json"},responseType:"json"}),i=null===(t=(0,a.FN)())||void 0===t?void 0:t.proxy,W=(0,a.Rr)(),$=e,{getHeaderOffsetAtTargetPosY:B}=(0,u.v)(),{labelStore:E}=(0,n.b)({labelsRequired:["global","modules.form"],labelKeyReplaceFn:e=>e.replace("modules.form.","")}),L=(0,a.iH)(-1!==Object.keys($.segments).indexOf($.initiallySelectedSegment)?$.initiallySelectedSegment:""),Y=(0,a.iH)(!1),M=(0,a.iH)(!1),P=(0,a.iH)(!1),z=(0,a.iH)(null),I=(0,a.iH)(null),V=(0,a.iH)(null),Z=(0,a.iH)(null),J=(0,a.iH)(!1),A=(0,a.Fl)(()=>!I.value&&function(e){return null!==d(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default")}(i,"form")||I.value&&!!I.value.form),G=(0,a.Fl)(()=>Y.value||M.value),K=(0,a.Fl)(()=>Object.entries($.segments).map(e=>{let[t,l]=e;return{id:t,...l}})),N=(0,a.Fl)(()=>{var e,t;return null===(e=$.segments[L.value])||void 0===e||null===(t=e.topics)||void 0===t?void 0:t.items}),Q=(0,a.Fl)(()=>{var e;return X.value||(null==W?void 0:W.contact)||(null===(e=I.value)||void 0===e?void 0:e.contact)}),X=(0,a.Fl)(()=>{var e,t,l;return(null===(e=K.value)||void 0===e?void 0:e.length)||(null===(t=ee.value)||void 0===t||null===(l=t[L.value])||void 0===l?void 0:l.length)}),ee=(0,a.Fl)(()=>{const e={};return K.value.forEach(t=>{t.topics&&(e[t.id]=Object.entries(t.topics.items).map(e=>{let[t,l]=e;return{id:t,...l}}))}),e});function te(e){var t;window.history.replaceState&&(e&&(null===(t=new URL(e))||void 0===t?void 0:t.origin)===location.origin?window.history.replaceState(null,"",e):window.history.replaceState(null,"",location.origin+location.pathname))}async function le(e){try{return(await l({method:"GET",url:e})).data}catch(e){console.warn(e)}return null}async function ae(e){var t;if(null===e)return await async function(){Y.value=!0,L.value="",await ue($.defaultFormEndpoint),Y.value=!1}();const l=e.value;l!==L.value?"redirect"===(null===(t=$.segments[l])||void 0===t?void 0:t.type)?location.href=$.segments[l].endpoint:await ie(l):await i.handleSegmentResetClick()}async function ne(e){const t=N.value&&N.value[null==e?void 0:e.value];if(!e&&L.value)return te(),await ie(L.value);await oe(t)}async function ie(e){var t,l,a;Y.value=!0,L.value=e;const n=$.segments[e].endpoint,i=null===(t=$.segments[e])||void 0===t||null===(l=t.topics)||void 0===l?void 0:l.initialValue,o=i?null===(a=$.segments[e].topics.items)||void 0===a?void 0:a[i]:null;n&&!o&&await ue(n),o&&await oe(o),Y.value=!1}async function oe(e){e&&("redirect"===e.type?location.href=e.endpoint:(M.value=!0,await ue(e.endpoint),te(e.deeplink))),M.value=!1}function re(){P.value=!1}function se(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"formWrapper";setTimeout(()=>{var t,l;const a=(null===(t=i.$refs)||void 0===t||null===(l=t[e])||void 0===l?void 0:l.getBoundingClientRect().y)+window.scrollY;window.scrollTo({top:a-B(a)-20,left:0,behavior:"smooth"})},350)}function ce(e,t){I.value||(I.value={}),I.value[e]=t||null}async function ue(e){let t;t=z.value&&z.value[e]?z.value[e]:await le(e);const{form:l,contact:a}=t||{};ce("form",l),ce("contact",a),l&&se()}return(0,a.bv)(async()=>{var e,t;if(!$.hasDefaultForm&&1===K.value.length&&1===(null===(e=ee.value)||void 0===e||null===(t=e[L.value])||void 0===t?void 0:t.length)){var l;const e=null===(l=K.value.find(e=>e.endpoint&&"redirect"!==e.type))||void 0===l?void 0:l.endPoint;e&&await ue(e)}$.preloadForms&&await async function(){if(0===Object.keys($.segments).length&&!$.defaultFormEndpoint)return;const e={},t=async t=>{if(e[t])return;const l=await le(t),{form:a,contact:n}=l||{};e[t]={form:a,contact:n}};for(let e in $.segments){var l;if($.segments[e].endpoint&&"redirect"!==$.segments[e].type&&await t($.segments[e].endpoint),null!==(l=$.segments[e].topics)&&void 0!==l&&l.items)for(let l in $.segments[e].topics.items)$.segments[e].topics.items[l].endpoint&&"redirect"!==$.segments[e].topics.items[l].type&&await t($.segments[e].topics.items[l].endpoint)}$.defaultFormEndpoint&&await t($.defaultFormEndpoint),z.value=e}()}),(0,a.YP)(L,e=>{var t,l;te(null===(t=$.segments)||void 0===t||null===(l=t[e])||void 0===l?void 0:l.deeplink)}),(0,a.YP)(P,()=>{(0,a.Y3)(()=>{se("formContainer")})}),(0,a.YP)(J,()=>{(0,a.Y3)(()=>{se("formContainer")})}),(0,a.JJ)(v.h0,(0,v.ey)({[v.ib]:e=>{V.value=e.resultTitle,Z.value=e.resultText,P.value=!0},[v.je]:()=>{J.value=!0}})),(t,l)=>{const n=(0,a.up)("icon");return(0,a.wg)(),(0,a.iD)("div",{class:(0,a.C_)(["contact-form container marg-t--component",{"contact-form--loading":G.value,[`contact-form--bg-${e.backgroundColor}`]:e.backgroundColor,"contact-form--form-visible":A.value}]),ref:"formContainer","aria-live":"polite"},[(0,a._)("div",m,[l[11]||(l[11]=(0,a._)("div",{class:"col-12 col-md-2"},null,-1)),l[12]||(l[12]=(0,a.Uk)()),(0,a._)("div",g,[(0,a._)("div",p,[e.backUrl?((0,a.wg)(),(0,a.iD)("a",{key:0,href:e.backUrl,class:"contact-form__back-link navigation-link navigation-link--small navigation-link--icon-left navigation-link--small-icon c--brand-blue-dark"},[(0,a._)("span",y,(0,a.zw)(e.backText),1),l[0]||(l[0]=(0,a.Uk)()),(0,a.Wm)(n,{name:"arrow-right",class:"icon--flipped-x navigation-link__icon"})],8,f)):(0,a.kq)("v-if",!0),l[1]||(l[1]=(0,a.Uk)()),e.headline?((0,a.wg)(),(0,a.iD)("h2",k,(0,a.zw)(e.headline),1)):(0,a.kq)("v-if",!0)]),l[10]||(l[10]=(0,a.Uk)()),(0,a.Wm)(a.uT,{name:"fade",mode:"out-in"},{default:(0,a.w5)(()=>[P.value||J.value?P.value?((0,a.wg)(),(0,a.iD)("div",S,[(0,a._)("div",C,[(0,a._)("section",U,[(0,a._)("div",F,[(0,a._)("header",null,[(0,a._)("h3",j,(0,a.zw)(V.value),1)]),l[8]||(l[8]=(0,a.Uk)()),(0,a._)("div",{class:"paragraph__body ric
1htext copy copy--large",innerHTML:Z.value},null,8,T),l[9]||(l[9]=(0,a.Uk)()),(0,a._)("div",q,[(0,a._)("button",{class:"button button--inline button--cta-2",onClick:re},(0,a.zw)(e.resetButtonText),1)])])])],512)])):J.value?((0,a.wg)(),(0,a.iD)("div",H,[(0,a._)("div",x,[(0,a._)("section",D,[(0,a._)("div",O,[(0,a._)("div",R,(0,a.zw)((0,a.SU)(E).generic_error_message),1)])])],512)])):(0,a.kq)("v-if",!0):((0,a.wg)(),(0,a.iD)("div",h,[Q.value?((0,a.wg)(),(0,a.iD)("div",b,[X.value?((0,a.wg)(),(0,a.iD)("div",_,[e.segmentHeadline?((0,a.wg)(),(0,a.j4)((0,a.SU)(c.default),{key:0,tag:"h3"},{default:(0,a.w5)(()=>[(0,a.Uk)((0,a.zw)(e.segmentHeadline),1)]),_:1})):(0,a.kq)("v-if",!0),l[2]||(l[2]=(0,a.Uk)()),K.value.length>1?((0,a.wg)(),(0,a.j4)((0,a.SU)(r.default),{key:"segmentselect","data-testid":"contact-segment-select",class:(0,a.C_)(["contact-form__segment-select","marg-t--2"]),label:e.segmentPlaceholder,"initial-value":e.initiallySelectedSegment,options:K.value.map(e=>{let{id:t,label:l}=e;return{label:l,value:t}}),searchable:!1,"background-color":e.backgroundColor,"include-empty":!!L.value,"label-empty":e.segmentReset,onChange:ae,"use-validation":!1},null,8,["label","initial-value","options","background-color","include-empty","label-empty"])):(0,a.kq)("v-if",!0),l[3]||(l[3]=(0,a.Uk)()),(0,a.Wm)(a.W3,{name:"fade"},{default:(0,a.w5)(()=>[!Y.value&&e.segments[L.value]&&e.segments[L.value].topics&&ee.value[L.value]&&ee.value[L.value].length>1?((0,a.wg)(),(0,a.j4)((0,a.SU)(r.default),{key:"topicselect","data-testid":"contact-topic-select",class:"contact-form__topic-select",label:e.segments[L.value].topics.placeholder,"initial-value":e.segments[L.value].topics.initialValue,options:ee.value[L.value].map(e=>{let{id:t,label:l}=e;return{label:l,value:t}}),clearable:!1,searchable:!1,"background-color":e.backgroundColor,"include-empty":!e.segments[L.value].topics.initialValue,"label-empty":e.segmentReset,onChange:ne,"use-validation":!1,rules:{required:!0}},null,8,["label","initial-value","options","background-color","include-empty","label-empty"])):(0,a.kq)("v-if",!0)]),_:1})])):(0,a.kq)("v-if",!0),l[5]||(l[5]=(0,a.Uk)()),(0,a._)("div",{class:(0,a.C_)(["contact-form__contact-wrapper col-12",{"col-md-6":X.value}])},[I.value&&I.value.contact?(0,a.kq)("v-if",!0):(0,a.WI)(t.$slots,"contact",{key:0}),l[4]||(l[4]=(0,a.Uk)()),I.value&&I.value.contact?((0,a.wg)(),(0,a.j4)((0,a.SU)(s.Z),{key:1,html:I.value.contact},null,8,["html"])):(0,a.kq)("v-if",!0)],2)])):(0,a.kq)("v-if",!0),l[7]||(l[7]=(0,a.Uk)()),(0,a._)("div",w,[I.value?(0,a.kq)("v-if",!0):(0,a.WI)(t.$slots,"form",{key:0}),l[6]||(l[6]=(0,a.Uk)()),I.value&&I.value.form?((0,a.wg)(),(0,a.j4)((0,a.SU)(s.Z),{key:1,html:I.value.form},null,8,["html"])):(0,a.kq)("v-if",!0)],512)]))]),_:3})])])],2)}}})},8752:(e,t,l)=>{l.r(t),l.d(t,{default:()=>i});var a=l(5166);const n={key:1,class:"form-section-title__description"},i=Object.assign({name:"FormSectionTitle"},{__name:"FormSectionTitle",props:{tag:{type:String,default:"h2"},first:{type:Boolean,default:!1},backgroundColor:{type:String,default:"white",validator:e=>["white","gray","red","blue"].includes(e)}},setup:e=>(t,l)=>((0,a.wg)(),(0,a.iD)("div",{class:(0,a.C_)(["form-section-title",{"form-section-title--first":e.first,[`form-section-title--on-${e.backgroundColor}-bg`]:e.backgroundColor}])},[t.$slots.default?((0,a.wg)(),(0,a.j4)((0,a.LL)(e.tag),{key:0,class:"form-section-title__headline headline headline--4"},{default:(0,a.w5)(()=>[(0,a.WI)(t.$slots,"default")]),_:3})):(0,a.kq)("v-if",!0),l[0]||(l[0]=(0,a.Uk)()),t.$slots.description?((0,a.wg)(),(0,a.iD)("p",n,[(0,a.WI)(t.$slots,"description")])):(0,a.kq)("v-if",!0)],2))})}}]);

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.