1"use strict";(self.webpackChunkwebpack=self.webpackChunkwebpack||[]).push([[7352],{57352:function(e,t,n){n.r(t),n.d(t,{CheckboxElement:function(){return r},default:function(){return i}});var o=n(47277),a=n.n(o);class r{constructor(){this.Purposes=[]}}class i{constructor(e){this.element=e,"undefined"!=typeof $$epiforms&&$$epiforms(".EPiServerForms").on("formsStartSubmitting",((e,t,n)=>{this.handleEpiFormSubmit($$epiforms(this).get(0).element)}))}handleEpiFormSubmit(e){let t=e.querySelector(".FormSubmitButton");if(!0===a()(t).data("consentHandled"))return;let n="",o=[];if(a()(e).find("input[data-CollectionPoint]:checked").each(((e,t)=>{var i=a()(t),l=i.attr("data-CollectionPoint").toString();""===n&&(n=i.attr("data-ConsentCheckBoxOneTrustEndpoint").toString());var s=i.val().toString();if(s&&l)if(o.filter((e=>e.CollectionPoint===l)).length>0){o.filter((e=>e.CollectionPoint===l))[0].Purposes.push({Id:s})}else{var u=new r;u.CollectionPoint=l,u.Purposes.push({Id:s}),o.push(u)}})),0===o.length)return;let l="";if(a()(e).find("input:text").length>0){l+="{";var s=a()(e).find("input[data-Subjects]")[0].attributes.getNamedItem("data-Subjects").value,u=JSON.parse(s);if(1===u.length){l=(d=e.querySelector(`[name="${u[0]}"]`)).value}else{for(var c=0;c<u.length;c++){var d,f=(d=e.querySelector(`[name="${u[c]}"]`)).labels[0]?d.labels[0].innerHTML:null;l+='"'+(f=f||(d.attributes.getNamedItem("placeholder").value?d.attributes.getNamedItem("placeholder").value:d.name))+'":"'+d.value+'"',l+=c<u.length-1?",":""}l+="}"}}
1if(""!==l)if(a()(t).data("consentHandled",!0),1===o.length){let e={CollectionPoint:o[0].CollectionPoint,DataSubject:l,EndPoint:n,Language:"en",Purposes:o[0].Purposes,TestMode:!0};i.handleFormSubmit(e).always((()=>{setTimeout((()=>a()(t).click()),0)}))}else for(var p=o.length,m=0;m<o.length;m++){var h={CollectionPoint:o[m].CollectionPoint,DataSubject:l,EndPoint:n,Language:"en",Purposes:o[m].Purposes,TestMode:!0};i.handleFormSubmit(h).always((()=>{0===(p-=1)&&setTimeout((()=>a()(t).click()),0)}))}}static handleFormSubmit(e){let t=a().Deferred(),n={identifier:e.DataSubject,requestInformation:e.CollectionPoint,purposes:e.Purposes,test:e.TestMode},o={async:!0,crossDomain:!0,url:e.EndPoint,method:"POST",headers:{"content-type":"application/json","cache-control":"no-cache"},processData:!1,data:JSON.stringify(n)};return a().ajax(o).done((e=>{if("undefined"!=typeof console&&"function"==typeof console.log){var n=a()(".Form__Status__Message");n.length>0&&n.attr("data-one-trust","success")}t.resolve()})).fail((function(e,n,o){"undefined"!=typeof console&&console.error,t.reject()})),t.promise()}}}}]);
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.