PageSourceSearch

https://www.diva-e.com/_nuxt/FormBlock.f773021a.js

js diva-e.com collected 2026-09-24 09:41:35 UTC 4,433 bytes, 1 lines download raw bytes

1import{_ as S}from"./HeadingType.vue.1146a9d9.js";import{f as C,h as p,u as $,a as I,P as B,b as N}from"./entry.ad64c700.js";import{d as x,r as k,c as j,o as A,R as E,e as r,f as c,u as m,n as b,m as T,x as q,y as D,j as f,z as h,h as d,A as g,s as L,T as H,q as R}from"./swiper-vue.d06afa39.js";function v(e){return new Promise(function(o,l){let i=!1,t=document.querySelector('script[src="'+e+'"]');if(!t)t=document.createElement("script"),t.type="text/javascript",t.async=!0,t.src=e,i=!0;else if(t.hasAttribute("data-loaded")){o(t);return}t.addEventListener("error",l),t.addEventListener("abort",l),t.addEventListener("load",function(){t.setAttribute("data-loaded",!0),o(t)}),i&&document.head.appendChild(t)})}const M=["id"],O=x({__name:"HubspotForm",props:{blok:{type:Object,required:!0},className:{type:String,default:""}},emits:["onFormReady","onFormSubmitted"],setup(e,{emit:o}){const l=e,{locale:i}=C(),t=k(""),n=k(),s=j(()=>({portalId:l.blok.portal_id,formId:l.blok.form_id,locale:i.value,target:`[id="${t.value}"]`,formInstanceId:t.value}));A(async()=>{t.value=`form_${l.blok.form_id}_${Math.random().toString(36).substring(2,7)}`,window.addEventListener("message",a=>{a.data.type==="hsFormCallback"&&a.data.eventName==="onFormReady"&&(o("onFormReady"),_()),a.data.type==="hsFormCallback"&&a.data.eventName==="onFormSubmitted"&&o("onFormSubmitted")});try{if(!window.hbspt)try{await v("//js.hsforms.net/forms/v2.js")}catch{await v("/hubspot/project-v2.js")}E(()=>{window.hbspt.forms.create(s.value)})}catch(a){console.error("❌ error loading hubspot lib:",a)}});function _(){const a=n.value.querySelector("input[name=formular_typ]");if(!a)return;const u=a.value.toLowerCase();if(u==="")return;n.value.querySelector("input[type=submit]").classList.add(`hs-form-type_${u}`)}return(a,u)=>(r(),c("div",{id:m(t),ref_key:"form",ref:n,class:b(["hubspot-form",e.className])},null,10,M))}});const P=p(O,[["__scopeId","data-v-908af231"]]),V=async e=>{const o=$(`form_${e}`,()=>null),l=N(),{$i18n:i}=I(),t=i.locale;if(o.value)return o;const n=B(),{data:s}=await n.get("cdn/stories",{version:l.public.previewMode?"draft":"published",by_uuids:e,language:t.value});return!s||s.stories===void 0?null:(o.value=s.stories[0]?s.stories[0].content:null,o)},z=["id"],G={class:"form-block__wrapper"},J={class:"form-block__container"},K={key:0,class:"form-block__heading"},Q={key:0,class:"form-block__heading"},U={key:0},W={key:0},X={class:"form-block__form-body"},Y=x({__name:"FormBlock",props:{blok:{type:Object,required:!0}},async setup(e){let o,l;const i=e,t=k(!1),n=k(!1),s=([o,l]=T(()=>V(i.blok.form)),o=await o,l(),o),_=()=>{n.value=!0};return(a,u)=>{const y=S,w=P,F=q("editable");return D((r(),c("div",{id:e.blok.anchor_id,class:b(["form-block",[e.blok.layout?`form-block--${e.blok.layout}`:"form-block--regular",`form-block--${e.blok.background_color}`,{"top-margin":!e.blok.remove_top_margin},{"bottom-margin":!e.blok.remove_bottom_margin},{"form-block--collapse":e.blok.collapse_form&&(e.blok.layout==="regular"||e.blok.layout==="regular-text-flex")}]])},[f("div",G,[f("div",J,[e.blok.collapse_form&&(e.blok.layout==="regular"||e.blok.layout==="regular-text-flex")?(r(),c("div",{key:0,class:b(["form-block__form-header header-collapse",{"form-block__form-header--collapsed":m(t)}])},[e.blok.title?(r(),c("div",K,[h(y,{"heading-type":e.blok.heading_type,heading:e.blok.title,class:b(["form-block__heading-title",{"no-heading":e.blok.heading_type==="div"||!e.blok.heading_type}])},null,8,["heading-type","heading","class"])])):d("",!0),e.blok.button_to_collapse?(r(),c("button",{key:1,class:"btn-to-collapse",onClick:u[0]||(u[0]=()=>t.value=!0)},g(e.blok.button_to_collapse),1)):d("",!0)],2)):d("",!0),f("div",{class:b(["form-block__form",{"form-block__form--collapsed":m(t)}])},[e.blok.title?(r(),c("div",Q,[h(H,{name:"fade"},{default:L(()=>[m(n)?d("",!0):(r(),c("div",U,[h(y,{"heading-type":e.blok.heading_type,heading:e.blok.title,class:b(["form-block__heading-title",{"no-heading":e.blok.heading_type==="div"||!e.blok.heading_type}])},null,8,["heading-type","heading","class"]),e.blok.description?(r(),c("p",W,g(e.blok.description),1)):d("",!0)]))]),_:1})])):d("",!0),f("div",X,[m(s)?(r(),R(w,{key:0,blok:m(s),"class-name":`hubspot-form--${e.blok.background_color}`,onOnFormSubmitted:_},null,8,["blok","class-name"])):d("",!0)])],2)])])],10,z)),[[F,e.blok]])}}});const oe=p(Y,[["__scopeId","data-v-bd6b611b"]]);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.