1import{p as $e}from"./lead-service.min.BGX2jylc.js";import{O as Xe}from"./consultation.min.Ver0qtdc.js";import{M as j}from"./micro-modal.min.CpX5ugTJ.js";function Ge(e,t){return t?{...e,otto_solution_key:t,verify_captcha:!(t==="DEV_BYPASS_TOKEN_CAPTCHA_SOLUTION")}:e}function Je(e){var i,r,o;const t=((i=e==null?void 0:e.contact_details)==null?void 0:i.otto_solution_key)||((r=e==null?void 0:e.contact_details)==null?void 0:r["frc-captcha-response"]);if(((o=e==null?void 0:e.contact_details)==null?void 0:o.employment)===Xe.Undefined&&delete e.contact_details.employment,!t)return e;const n={...e,contact_details:{...e.contact_details}};return delete n.contact_details.otto_solution_key,delete n.contact_details["frc-captcha-response"],n}async function rn(e,t,{captcha:n,requireCaptcha:i=!0}={}){const r=n==null?void 0:n.getToken();if(i&&!r)return new Error("error: captcha missing");r&&(n==null||n.markTokenUsed());const o=Je(t),s=Ge(o,r),u=await $e(e,s);return u instanceof Error&&/captcha|solution|frc/i.test(u.message)&&(n==null||n.reset()),u}function q(e){let t,n;return{promise:new Promise((r,o)=>{t=r,n=o}),resolve:t,reject:n}}function B(e,t){return e.lastIndexOf(t,0)===0}var Ze=/^((?:\w+:)?\/\/([^\/]+))/;function Pe(e){let t=[];const n=Object.keys(e),i=encodeURIComponent;for(let r=0;r<n.length;r++)t.push("".concat(i(n[r]),"=").concat(i(e[n[r]])));return t.join("&")}function P(e){const t=document.location;if(B(e,"/")||B(e,"."))return t.origin?t.origin:t.protocol+"//"+t.host;const n=e.match(Ze);if(!n)throw new Error("Invalid URL: "+e);return n[1]}var Qe=class{constructor(e){this.ready=!1,this.buffer=[],this.id=e.id,this.type=e.type,this.element=e.element,this.onReady=e.onReady,this.origin=P(e.element.src)}send(e){this.ready?this.element.contentWindow.postMessage(e,this.origin):this.buffer.push(e)}setReady(e){this.onReady(),this.ready=e,this.ready&&this.flush()}flush(){for(let e=0;e<this.buffer.length;e++)this.element.contentWindow.postMessage(this.buffer[e],this.origin);this.buffer=[]}};function et(e,t){return e==="*"||t.has(e)}var tt=class{constructor(){this.origins=new Set,this.targets={},this.answered=new Set,this.onReceiveRootMessage=()=>{},window.addEventListener("message",e=>{this.onReceive(e)})}listen(e){let t=this.onReceiveRootMessage;this.onReceiveRootMessage=n=>{t(n),e(n)}}addOrigins(e){e.forEach(t=>this.origins.add(t))}send(e){if(e.from_id){const i=this.targets[e.from_id];if(!i){console.error("[bus] Unexpected message from unknown sender ".concat(e.from_id),e);return}(e.type==="widget_announce"||e.type==="agent_announce")&&i.setReady(!0)}const t=e.rid;if(t){if(this.answered.has(t+e.to_id))return;this.answered.add(t+e.to_id)}if(e.to_id===""){this.onReceiveRootMessage(e);return}const n=this.targets[e.to_id];if(!n){console.error("[bus] Unexpected message to unknown target ".concat(e.to_id),e);return}n.send(e)}onReceive(e){if(!et(e.origin,this.origins))return;const t=e.data;!t||!t._frc||this.send(t)}registerTarget(e){this.targets[e.id]=e}registerTargetIFrame(e,t,n,i){const r=q();let o,s=new Promise(a=>{o=setTimeout(()=>a("timeout"),i)});const u=new Qe({id:t,element:n,type:e,onReady:()=>{clearTimeout(o),r.resolve("registered")}});return this.registerTarget(u),Promise.race([r.promise,s])}removeTarget(e){delete this.targets[e]}};function N(e,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){let n="";for(let i=0;i<e;i++)n+=t.charAt(Math.floor(Math.random()*t.length));return n}function nt(e){const t=e.slice();for(let n=t.length-1;n>0;n--){const i=Math.floor(Math.random()*(n+1)),r=t[n];t[n]=t[i],t[i]=r}return t}var Se="frc_sc",xe="frc_sid",_e="__",ie="0",it="__"+N(10);function me(e){{let t=0;try{t=parseInt(sessionStorage.getItem(Se)||"",10)}catch(n){}isNaN(t)&&(t=0),e&&t++,ie=t.toString();try{sessionStorage.setItem(Se,ie)}catch(n){}}return ie}function Ee(){let e;try{e=sessionStorage.getItem(xe)}catch(t){return it}return e||(e=N(12),sessionStorage.setItem(xe,e)),e}var rt=class{constructor(e){this.mem=new Map,this.storePrefix=e}get(e){const t=this.storePrefix+_e+e;try{const n=sessionStorage.getItem(t);return n===null?void 0:n}catch(n){}return this.mem.get(e)}set(e,t){const n=this.storePrefix+_e+e;try{t===void 0?(this.mem.delete(e),sessionStorage.removeItem(n)):(this.mem.set(e,t),sessionStorage.setItem(n,t))}catch(i){}}},ot=typeof navigator<"u"&&navigator.userAgentData!==void 0;function st(){const e=document.querySelectorAll(".frc-captcha"),t=document.querySelectorAll(".frc-risk-intelligence");return[e,t]}function We(e){let t=e;for(;t;){if(t.tagName==="FORM")return t;if(t.parentElement){t=t.parentElement;continue}const n=t.parentNode;if(n&&n.host){t=n.host;continue}t=null}return null}function ze(e,t){e.addEventListener("focusin",t,{once:!0,passive:!0})}function qe(e,t){const n=document.createElement("input");return n.type="hidden",n.style.display="none",n.name=t,e.appendChild(n),n}function ut(e,t,n){e.style[t]===""&&(e.style[t]=n)}function at(e){const t=ut;t(e,"position","relative"),t(e,"height","70px"),t(e,"padding","0"),t(e,"width","316px"),t(e,"maxWidth","100%"),t(e,"maxHeight","100%"),t(e,"overflow","hidden"),t(e,"borderRadius","4px")}function ct(e){e.removeAttribute("style")}function ae(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}function J(e,t){let n;typeof window.CustomEvent=="function"?n=new CustomEvent(t.name,{bubbles:!0,detail:t}):(n=document.createEvent("CustomEvent"),n.initCustomEvent(t.name,!0,!1,t)),e.dispatchEvent(n)}function lt(e){for(;!e.lang||typeof e.lang!="string";)if(e=e.parentElement,!e)return null;return e.lang}var Q={ar:{title:"Ø§ÙØªØÙÙ Ù
Ù Ù
ÙØ§ÙØØ© Ø§ÙØ±ÙØ¨ÙØªØ§Øª",connecting:"Ø§ÙØªØÙÙ Ù
Ù Ù
ÙØ§ÙØØ© Ø§ÙØ±ÙØ¨ÙØªØ§Øª ÙÙØ¯ Ø§ÙØ§ØªØµØ§Ùâ¦",retrying:"Ø§Ø³ØªØºØ±Ù Ø§ÙØ§ØªØµØ§Ù Ø¨Ø§ÙØªØÙÙ Ù
Ù Ù
ÙØ§ÙØØ© Ø§ÙØ±ÙØ¨ÙØªØ§Øª ÙÙØªÙا Ø·ÙÙÙØ§Ù.\n\nإعادة اÙÙ
ØØ§ÙÙØ©â¦",failed:"ÙØ´Ù Ø§ÙØ§ØªØµØ§Ù Ø¨Ø§ÙØªØÙÙ Ù
Ù Ù
ÙØ§ÙØØ© Ø§ÙØ±ÙØ¨ÙØªØ§Øª.",newTab:"ÙÙØªØ Ù٠تبÙÙØ¨ Ø¬Ø¯ÙØ¯"},bg:{title:"ÐÑовеÑка ÑÑеÑÑ ÑобоÑи",connecting:"ÐаÑежда Ñе задаÑаÑаâ¦",retrying:"ÐеÑÑпеÑно ÑвÑÑзване.\n\nÐÐ¿Ð¸Ñ Ð·Ð° повÑоÑно ÑвÑÑзванеâ¦",failed:"ÐеÑÑпеÑно ÑвÑÑзване.",newTab:"оÑваÑÑ Ñе в нов Ñаздел"},ca:{title:"Verificació anti-robot",connecting:"Carregant el desafiamentâ¦",retrying:"Errada de conexió.\n\nReintentantâ¦",failed:"Errada de conexió.",newTab:"s'obre en una pestanya nova"},cs:{title:"OvÄÅenà proti robotům",connecting:"PÅipojovánà kontroly proti robotůmâ¦",retrying:"PÅipojenà kontroly proti robotům trvalo pÅÃliÅ¡ dlouho.\n\nOpakuji pokusâ¦",failed:"Kontrola proti robotům se nepodaÅilo pÅipojit.",newTab:"otevÅe se na nové kartÄ"},da:{title:"Anti-robot-verifikation",connecting:"Anti-robot-kontrol forbinderâ¦",retrying:"Anti-robot-kontrol tog for lang tid at oprette forbindelse.\n\nPrøver igenâ¦",failed:"Anti-robot-kontrol kunne ikke oprette forbindelse.",newTab:"Ã¥bner i ny fane"},nl:{title:"Anti-robotcheck",connecting:"Verbinden met Anti-robotcheckâ¦",retrying:"Verbinden met Anti-robotcheck mislukt.\n\nOpnieuw aan het proberenâ¦",failed:"Verbinden met Anti-robotcheck mislukt.",newTab:"opent in nieuw tabblad"},en:{title:"Anti-Robot verification",connecting:"Anti-Robot check connectingâ¦",retrying:"Anti-Robot check took too long to connect.\n\nRetryingâ¦",failed:"Anti-Robot check failed to connect.",newTab:"opens in new tab"},fi:{title:"Robottien torjunnan vahvistus",connecting:"Robottien torjunnan tarkistus käynnissäâ¦",retrying:"Robottien torjunnan tarkistus kesti liian kauan.\n\nYritetään uudelleenâ¦",failed:"Robottien torjunnan tarkistus epäonnistui.",newTab:"avautuu uuteen välilehteen"},fr:{title:"Vérification anti-robot",connecting:"Connexion à la vérification anti-robotâ¦",retrying:"La connexion à la vérification anti-robot a pris trop de temps.\n\nNouvelle tentativeâ¦",failed:"Ãchec de la connexion à la vérification anti-robot.",newTab:"s'ouvre dans un nouvel onglet"},de:{title:"Anti-Roboter-Verifizierung",connecting:"Verbindung zur Anti-Roboter-Verifizierung wird hergestelltâ¦",retrying:"Verbindung zur Anti-Roboter-Verifizierung hat zu lange gedauert.\n\nErneuter Versuchâ¦",failed:"Verbindung zur Anti-Roboter-Verifizierung ist fehlgeschlagen.",newTab:"öffnet in neuem Tab"},hi:{title:"à¤à¤à¤à¥-रà¥à¤¬à¥à¤ सतà¥à¤¯à¤¾à¤ªà¤¨",connecting:"à¤à¥à¤¨à¥à¤¤à¥ लà¥à¤¡ हॠरहॠहà¥â¦",retrying:"à¤à¤¨à¥à¤à¥à¤¶à¤¨ विफल.\n\nपà¥à¤¨à¤ पà¥à¤°à¤¯à¤¾à¤¸ à¤à¤° रहॠहà¥à¤â¦",failed:"à¤à¤¨à¥à¤à¥à¤¶à¤¨ विफल.",newTab:"नठà¤à¥à¤¬ मà¥à¤ à¤à¥à¤²à¤¤à¤¾ हà¥"},hu:{title:"RobotellenÅrzés",connecting:"RobotellenÅrzés csatlakozásâ¦",retrying:"A robotellenÅrzés túl sokáig tartott a csatlakozáshoz.\n\nÃjrapróbálomâ¦",failed:"A robotellenÅrzés nem tudott csatlakozni.",newTab:"új lapon nyÃlik meg"},id:{title:"Verifikasi Anti-Robot",connecting:"Pemeriksaan Anti-Robot sedang terhubungâ¦",retrying:"Pemeriksaan Anti-Robot memakan waktu terlalu lama untuk terhubung.\n\nMencoba lagiâ¦",failed:"Pemeriksaan Anti-Robot gagal terhubung.",newTab:"terbuka di tab baru"},ja:{title:"ãããã鲿¢èªè¨¼",connecting:"ãã£ã¬ã³ã¸ãèªã¿è¾¼ãã§ãã¾ãâ¦",retrying:"æ¥ç¶å¤±æ.\n\nå試è¡ä¸â¦",failed:"æ¥ç¶å¤±æ.",newTab:"æ°ããã¿ãã§éãã¾ã"},it:{title:"Verifica anti-robot",connecting:"Connessione verifica anti-robot in corsoâ¦",retrying:"La connessione alla verifica anti-robot ha richiesto troppo tempo.\n\nRiprovandoâ¦",failed:"Impossibile connettersi alla verifica anti-robot.",newTab:"si apre in una nuova scheda"},nb:{title:"Anti-robot-verifisering",connecting:"Laster inn utfordringâ¦",retrying:"Klarte ikke Ã¥ koble til.\n\nPrøver igjenâ¦",failed:"Klarte ikke Ã¥ koble til.",newTab:"Ã¥pnes i ny fane"},pl:{title:"Weryfikacja antyrobotowa",connecting:"ÅÄ
czenie siÄ z kontrolÄ
antyrobotowÄ
â¦",retrying:"ÅÄ
czenie siÄ z kontrolÄ
antyrobotowÄ
trwaÅo zbyt dÅugo. \n\nPonowna próbaâ¦",failed:"Nie udaÅo siÄ poÅÄ
czyÄ z kontrolÄ
antyrobotowÄ
.",newTab:"otwiera siÄ w nowej karcie"},ro:{title:"Verificare anti-robot",connecting:"Se incarca testulâ¦",retrying:"Conexiunea a esuat.\n\nReincercareâ¦",failed:"Conexiunea a esuat.",newTab:"se deschide Ã
1®ntr-o filÄ nouÄ"},pt:{title:"Verificação anti-robô",connecting:"Verificação anti-robô a ligarâ¦",retrying:"A verificação anti-robô demorou demasiado tempo a ligar-se.\n\nA tentar novamenteâ¦",failed:"A verificação anti-robô não conseguiu ligar-se.",newTab:"abre num novo separador"},ru:{title:"ÐÑовеÑка анÑиÑобоÑа",connecting:"ÐодклÑÑение к пÑовеÑке анÑиÑобоÑаâ¦",retrying:"ÐодклÑÑение к пÑовеÑке анÑиÑобоÑа занÑло ÑлиÑком много вÑемени.\n\nÐовÑоÑÑем попÑÑкÑâ¦",failed:"Ðе ÑдалоÑÑ Ð¿Ð¾Ð´ÐºÐ»ÑÑиÑÑÑÑ Ðº пÑовеÑке анÑиÑобоÑа.",newTab:"оÑкÑоеÑÑÑ Ð² новой вкладке"},sk:{title:"Overovanie proti robotom",connecting:"Pripojenie kontroly proti robotomâ¦",retrying:"Pripojenie kontroly proti robotom trvalo prÃliÅ¡ dlho.\n\nOpakujem pokusâ¦",failed:"Pripojenie kontroly proti robotom sa nepodarilo.",newTab:"otvorà sa na novej karte"},sl:{title:"Preverjanje proti robotom",connecting:"Nalaganje izzivaâ¦",retrying:"Povezava ni uspela.\n\nPonovni poskusâ¦",failed:"Povezava ni uspela.",newTab:"odpre se v novem zavihku"},es:{title:"Verificación antirrobot",connecting:"Conectando verificación antirrobotâ¦",retrying:"La verificación antirrobot tardó demasiado en conectarse.\n\nReintentandoâ¦",failed:"Error al conectar la verificación antirrobot.",newTab:"se abre en una pestaña nueva"},sv:{title:"Anti-robotverifiering",connecting:"Anti-robotverifiering ansluterâ¦",retrying:"Anti-robotverifiering tog för lÃ¥ng tid att ansluta.\n\nFörsöker igenâ¦",failed:"Anti-robotverifiering kunde inte ansluta.",newTab:"öppnas i ny flik"},th:{title:"à¸à¸²à¸£à¸à¸£à¸§à¸à¸ªà¸à¸à¸à¹à¸à¸à¸à¸±à¸à¸à¸à¸",connecting:"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸à¸à¸²à¸£à¸à¹à¸²à¸à¸²à¸¢â¦",retrying:"à¹à¸à¸·à¹à¸à¸¡à¸à¹à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸.\n\nà¸à¸³à¸¥à¸±à¸à¸¥à¸à¸à¹à¸«à¸¡à¹â¦",failed:"à¹à¸à¸·à¹à¸à¸¡à¸à¹à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸.",newTab:"à¹à¸à¸´à¸à¹à¸à¹à¸à¹à¸à¹à¸«à¸¡à¹"},tr:{title:"Robot önleme doÄrulaması",connecting:"Robot önleme kontrolü baÄlanıyorâ¦",retrying:"Robot önleme kontrolü baÄlanmak için çok uzun sürdü.\n\nYeniden deniyorâ¦",failed:"Robot önleme kontrolü baÄlanamadı.",newTab:"yeni sekmede açılır"},vi:{title:"Xác minh chá»ng robot",connecting:"Kiá»m tra robot Äang kết ná»iâ¦",retrying:"Kiá»m tra chá»ng robot mất quá nhiá»u thá»i gian Äá» kết ná»i.\n\nÄang thá» lạiâ¦",failed:"Kiá»m tra chá»ng robot không thá» kết ná»i.",newTab:"má» trong tab má»i"},zh:{title:"åæºå¨äººéªè¯",connecting:"åæºå¨äººéªè¯æ£å¨è¿æ¥â¦",retrying:"åæºå¨äººéªè¯è¿æ¥èæ¶è¿é¿ã\n\næ£å¨éè¯â¦",failed:"åæºå¨äººéªè¯è¿æ¥å¤±è´¥ã",newTab:"卿°æ ç¾é¡µä¸æå¼"}},dt=["ar","he","fa","ur","ps","sd","yi"];function pe(e){return e.toLowerCase().split("-")[0].split("_")[0]}function ce(e){return e=pe(e),dt.indexOf(e)!==-1}function Ue(e){return e=pe(e),(Q[e]||Q.en).title+" - Widget"}function ee(e,t){return e=pe(e),(Q[e]||Q.en)[t]}var je="FrcFrameId",He="frc-i-agent",ht="frc-i-widget",ft="frc-widget-placeholder";function gt(e,t,n,i){const r={origin:document.location.origin,sess_id:Ee(),sess_c:me(!0),comm_id:t,sdk_v:"1.1.1",v:"1",agent_id:t,ts:Date.now().toString()};i&&(r.guard_c=i);const o=document.createElement("iframe");o.className=He,o.dataset[je]=t,o.src=n+"?"+Pe(r),o.frcSDK=e;const s=o.style;return s.width=s.height=s.border=s.visibility="0",s.display="none",o}function mt(e,t,n,i,r){const o=document.createElement("iframe"),s=ye(i),u={origin:document.location.origin,sess_id:Ee(),sess_c:me(!0),comm_id:t,sdk_v:"1.1.1",v:"1",agent_id:e,lang:s,sitekey:i.sitekey||"",ts:Date.now().toString()};i.theme&&(u.theme=i.theme),r&&(u.guard_c=r),ot&&(o.allow="clipboard-write"),o.frameBorder="0",o.src=n+"?"+Pe(u),o.className=ht,o.title=Ue(s),o.dataset[je]=t;const a=o.style;return a.border=a.visibility="0",a.position="absolute",a.height=a.width="100%",a.userSelect="none",a["-webkit-tap-highlight-color"]="transparent",a.display="none",i.element.appendChild(o),o}function Et(e){const t=document.createElement("div");t.classList.add(ft);const n=t.style,i=e.theme==="dark"||e.theme==="auto"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return n.color=i?"#fff":"#222",n.backgroundColor=i?"#171717":"#fafafa",n.borderRadius="4px",n.border="1px solid",n.borderColor="#ddd",n.padding="8px",n.height=n.width="100%",n.fontSize="14px",n.boxSizing="border-box",ve(n),e.element.appendChild(t),t}function ve(e){e.textDecoration=e.fontStyle="none",e.fontWeight="500",e.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',e.lineHeight="1",e.letterSpacing="-0.0125rem"}function pt(e){const t=document.createElement("div");t.classList.add("frc-banner");const n=ye(e),i=e.theme==="dark"||e.theme==="auto"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;let r="#565656",o="#a2a2a2";i&&(r="#a2a2a2",o="#565656");const s=t.style;s.position="absolute",s.bottom="6px",ce(n)?s.left="6px":s.right="6px",s.lineHeight="1";const u=document.createElement("a");u.href="https://friendlycaptcha.com",u.rel="noopener";const a=u.style;ve(a),a.color=r,a.fontSize="10px",a.userSelect="none",a.textDecorationLine="underline",a.textDecorationThickness="1px",a.textDecorationColor=o,a.letterSpacing="-0.0125rem",u.target="_blank",u.textContent="Friendly Captcha",u.ariaLabel="Friendly Captcha ("+ee(n,"newTab")+")",u.onmouseenter=()=>a.textDecorationColor=r,u.onmouseleave=()=>a.textDecorationColor=o,t.appendChild(u),e.element.appendChild(t)}function ye(e){let t=e.language;return(!t||t==="html")&&(t=lt(e.element)||""),t}function vt(e,t,n){const i=(s,u)=>{const a=document.createElement("a");a.href=s,a.target="_blank",a.rel="noopener",a.textContent=u;const l=a.style;return ve(l),l.textDecoration="underline",l.color="#565656",a.onmouseenter=()=>l.textDecoration="none",a.onmouseleave=()=>l.textDecoration="underline",a},r=ee(n,"failed"),o=[i("".concat(t,"/connectionTest"),r)];e.textContent="",o.forEach(s=>e.appendChild(s))}function we(){const e=window.performance;return e?e.now():0}function yt(e,t,n,i){const r=we(),o=n.getBoundingClientRect(),s={v:1,tt:e,pnow:r,sm:t,el:{bcr:[o.left,o.top,o.width,o.height],con:document.body.contains(n)},stack:new Error().stack||"",we:!!window.event,weit:!!window.event&&!!window.event.isTrusted};return i&&(s.ev={ts:i.timeStamp,rt:!!i.relatedTarget,eot:!!i.explicitOriginalTarget,it:i.isTrusted}),s}function be(e,...t){for(let i=0;i<t.length;i++){const r=t[i];for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}return e}var wt="frc-captcha-response",bt=class{constructor(e){this.state="init",this.response=".UNINITIALIZED",this.focusEventPending=!1,this.isDestroyed=!1,this.id=e.id;const t=e.createOpts;if(this.e=t.element,this.ready=e.registered,!this.e)throw new Error("No element provided to mount widget under.");this.e.frcWidget=this,this.formFieldName=t.formFieldName===void 0?wt:t.formFieldName,this.sitekey=t.sitekey,this._reset=e.callbacks.onReset,this._destroy=e.callbacks.onDestroy,this._trigger=e.callbacks.onTrigger,this.startMode=e.createOpts.startMode||"focus",this.formFieldName!==null&&(this.hiddenFormEl=qe(this.e,this.formFieldName)),this.setState({response:".UNCONNECTED",state:"init"}),this.ready.then(()=>{this.handleStartMode()})}handleStartMode(){if(this.startMode==="focus"&&!this.focusEventPending&&!this.isDestroyed){const e=We(this.e);e&&(this.focusEventPending=!0,ze(e,t=>{this.trigger("focus",{ev:t}),this.focusEventPending=!1}))}else this.startMode==="auto"&&this.trigger("auto")}reset(e={trigger:"root"}){if(this.isDestroyed)throw new Error("Can not reset destroyed widget.");this.setState({response:".RESET",state:"reset",resetTrigger:e.trigger}),this._reset(e),this.handleStartMode()}destroy(){this.isDestroyed=!0,this.hiddenFormEl&&this.hiddenFormEl.remove(),this.hiddenFormEl=void 0,this.setState({response:".DESTROYED",state:"destroyed"}),this._destroy()}trigger(e,t={}){if(this.isDestroyed)throw new Error("Can not start destroyed widget.");const n=yt(e,this.startMode,this.e,t.ev);this._trigger({trigger:n})}start(){this.trigger("programmatic")}setState(e){const t=this.state!==e.state;this.response=e.response,this.state=e.state,this.hiddenFormEl&&this.e.isConnected!==!1&&(this.hiddenFormEl.value=e.response),t&&this.dispatchWidgetEvent({name:"frc:widget.statechange",error:e.error,mode:e.mode}),this.state==="expired"?this.dispatchWidgetEvent({name:"frc:widget.expire"}):this.state==="completed"?this.dispatchWidgetEvent({name:"frc:widget.complete"}):this.state==="error"?this.dispatchWidgetEvent({name:"frc:widget.error",error:e.error}):this.state==="reset"&&this.dispatchWidgetEvent({name:"frc:widget.reset",trigger:e.resetTrigger})}dispatchWidgetEvent(e){const t={response:this.response,state:this.state,id:this.id};be(t,e),J(this.e,t)}addEventListener(e,t,n){this.e.addEventListener(e,t,n)}removeEventListener(e,t,n){this.e.removeEventListener(e,t,n)}getState(){return this.state}getResponse(){return this.response}getElement(){return this.e}},kt=function(e){return typeof e=="function"},At=function(e){const t=[],n=new Map,i=function(){return t.splice(0,t.length)},r=window,o=(function(){try{const g=document.createElement("iframe");g.style.display="none",(document.body||document.head).appendChild(g);const E=g?g.contentWindow:0;return g.remove(),E||r}catch(g){return r}})(),s=Function.prototype.toString,u=function(...g){const E=kt(this)?n.get(this):!1,m=this===u?s:E||this;return s.apply(m,g)};Function.prototype.toString=u;
1const a=function(){return(o.Error||r.Error)("FriendlyCaptcha_DummyTrace").stack||""},l="prototype",p=r.EventTarget?r.EventTarget[l].dispatchEvent:{},v=[["Document."+l+".documentElement",r.Document[l],"documentElement"],["Element."+l+".shadowRoot",r.Element[l],"shadowRoot"],["Node."+l+".nodeType",r.Node[l],"nodeType"],["Object.is",r.Object,"is"],["Array."+l+".slice",r.Array[l],"slice"],["Document."+l+".querySelectorAll",r.Document[l],"querySelectorAll"],["Document."+l+".createElement",r.Document[l],"createElement"],["EventTarget."+l+".dispatchEvent",p,"dispatchEvent"]];return e.disableEvalPatching||v.push(["eval",r,"eval"]),v.forEach(function([d,g,E]){const m=Object.getOwnPropertyDescriptor(g,E),y=m&&(m.get||m.set);if(m){if(y){if(!m.get)return}else if(typeof m.value!="object"&&typeof m.value!="function")return}else return;let _=0,C=0;const F=function(...S){const k=Date.now();if(k-_>=1e3&&(C=0,_=k),C<50){const c={d:k,pnow:we(),n:d,st:a()};t.length>2e4&&t.splice(0,1e3),t.push(c),C++}return(y?m.get:m.value).apply(this,S)};try{const b=y?m.get?m.get():void 0:m.value();b&&(F.length=b.length,F.name=b.name)}catch(b){}try{const b=be({},m);y?b.get=F:b.value=F,Object.defineProperty(g,E,b),n.set(F,y?m.get:m.value)}catch(b){}}),i};function M(){const e=[0,0,0,0,0,0,0];return{s:e,add(t){const n=++e[0],i=t-e[1],r=i/n,o=r*r,s=i*r*(n-1);e[1]+=r,e[4]+=s*o*(n*n-3*n+3)+6*o*e[2]-4*r*e[3],e[3]+=s*r*(n-2)-3*r*e[2],e[2]+=s,n==1?e[5]=e[6]=t:(t<e[5]&&(e[5]=t),t>e[6]&&(e[6]=t))}}}var D="addEventListener",O=Math,Ce;function Fe(){return/Android/i.test(navigator.userAgent)}function x(e,t,n=!1,i){const r=M();let o=!1,s;return ae(()=>{i=i||document.body,i[D](e,u=>{(!o||n)&&(s=u.timeStamp,o=!0)}),i[D](t,u=>{o&&(r.add(u.timeStamp-s),o=!1)})}),r.s}function St(e){const t=[];for(let n=0;n<e.length;n++)t.push(0),document[D](e[n],i=>t[n]++);return t}function xt(){const e=[0,0,0,0,0,0,0,0],t={8:1,46:1,9:2,45:3,17:4,13:5,37:6,38:6,39:6,40:6,33:7,34:7};return document[D]("keydown",n=>{const i=n.keyCode;t[i]?e[t[i]]++:i>=112&&i<=123&&e[0]++}),e}function De(e,t,n,i){return O.sqrt(O.pow(e-t,2)+O.pow(n-i,2))}function Te(e,t,n){return O.sqrt(O.pow(e,2)+O.pow(t,2)+O.pow(n,2))}function Ie(e,t){let n=t-e;return n+=n>180?-360:n<-180?360:0,n}var _t=class{constructor(e){this.rn=0,this.i=0,this.smel={n:0,ts:0,d:0};const t="mouse",n=this.smel,i=o=>{n.n||(n.fts=o.timeStamp,n.fxy=[o.clientX,o.clientY,o.screenX,o.screenY]),n.n++,o.type===t+"leave"&&(n.d+=o.timeStamp-n.ts),n.ts=o.timeStamp,n.xy=[o.clientX,o.clientY]},r=document;ae(()=>{const o=r.body;o[D](t+"enter",i),o[D](t+"leave",i)}),this.bh={onoff:{kdu:x("keydown","keyup"),cse:x("compositionstart","compositionend"),mdu:x(t+"down",t+"up"),mle:x(t+"leave",t+"enter"),med:x(t+"enter",t+"down",!0),semd:x("scrollend",t+"down",!0,r),se:x("scroll","scrollend",!1,r),pdc:x("pointerdown","pointercancel",!0),mmc:x(t+"move","click",!0),tse:x("touchstart","touchend"),fikd:x("focusin","keydown",!0)},nev:St([t+"out","pointercancel","focus","focusin","blur","visibilitychange","copy","paste","cut","contextmenu","click","auxclick","wheel","resize"]),nk:xt(),mov:this.setupMovementMetrics(),dm:this.setupMotionMetrics(),do:this.setupOrientationMetrics()},this.dep=e.disableEvalPatching||!1,this.takeTraceRecords=At(e)}setupMovementMetrics(){let e,t=[];const i=M(),r=M(),o=M(),s={t:i.s,v:o.s,d:r.s,ns:0},u=()=>{const l=t[t.length-1];if(t.length>=1e4/50||l&&(l[0]&&this.tm.timeStamp===l[1]||!l[0]&&this.mm.timeStamp===l[1])){if(clearInterval(e),e=void 0,t.length===1){s.ns++,t=[];return}const v=t[0];i.add(l[1]-v[1]),r.add(De(l[2],v[2],l[3],v[3]));for(let d=1;d<t.length;d++){const g=t[d],E=t[d-1],m=De(g[2],E[2],g[3],E[3])*1e3,y=g[1]-E[1];o.add(m/y)}t=[];return}let p=0;if(l?p=l[0]:this.mm&&this.tm?p=this.mm.timeStamp>this.tm.timeStamp?0:1:this.mm||(p=1),p){const v=this.tm.touches[0];v&&t.push([1,this.tm.timeStamp,v.screenX,v.screenY])}else t.push([0,this.mm.timeStamp,this.mm.screenX,this.mm.screenY])};let a=-1;return ae(()=>{const l=document.body;l[D]("mousemove",p=>{this.mm=p,e===void 0&&(u(),e=setInterval(u,50))}),l[D]("touchmove",p=>{this.tm=p;const v=p.touches[0];if(v){const d=v.radiusX+v.radiusY*1.234;d!==a&&(a=d,this.rn++)}e===void 0&&(u(),e=setInterval(u,50))})}),s}setupMotionMetrics(){const e=M(),t=M(),n={n:0,ts:0,ac:e.s,rr:t.s,i:0,g:!1};return Fe()&&window[D]("devicemotion",i=>{n.ts=i.timeStamp,n.i=i.interval,n.g=!i.acceleration;const r=i.acceleration||i.accelerationIncludingGravity;r&&e.add(Te(r.x,r.y,r.z));const o=i.rotationRate;o&&t.add(Te(o.alpha,o.beta,o.gamma))}),n}setupOrientationMetrics(){const e=M(),t=M(),n={fts:0,ts:0,gd:e.s,bd:t.s};if(!Fe())return n;let i;return window[D]("deviceorientation",r=>{r.gamma==null||r.beta==null||r.alpha==null||(n.ts=r.timeStamp,n.a=r.alpha,n.b=r.beta,n.g=r.gamma,i?(e.add(Ie(r.gamma,n.g)),t.add(Ie(n.b,r.beta))):(n.fts=n.ts,i=!0))}),n}gmm(){const e=this.mm;return e&&{xy:[e.clientX,e.clientY,e.screenX,e.screenY,e.offsetX,e.offsetY,e.pageX,e.pageY,e.movementX,e.movementY],ts:e.timeStamp}}gtm(){const e=this.tm,t=e&&e.touches,n=t&&t[0];return e&&n&&{id:n.identifier,xy:[n.clientX,n.clientY,n.screenX,n.screenY,n.pageX,n.pageY],r:[n.radiusX,n.radiusX,n.rotationAngle,n.force],n:t.length,ts:e.timeStamp,rn:this.rn}}get(e){const t=document.body,n=window,i=n.performance;return{v:1,i:++this.i,hl:history.length,fe:!!window.frameElement,dep:this.dep,wid:e,sc:parseInt(me(!1)),sid:Ee(),c
1onv:0,t:{pnow:we(),pto:i&&i.timeOrigin||0,ts:Date.now()},dims:{d:[n.innerWidth,n.innerHeight,n.outerWidth,n.outerHeight,n.screenX,n.screenY,n.pageXOffset,n.pageYOffset,t.clientWidth,t.clientHeight],dpr:n.devicePixelRatio},mel:this.smel,mm:this.gmm(),tm:this.gtm(),bh:this.bh,stack:new Error().stack||"",trc:this.takeTraceRecords()}}};function Ct(e){return Ce||(Ce=new _t(e))}var Re=e=>e.map(t=>"https://".concat(t,".frcapi.com")).join(","),le={eu:Re(["eu","eu0","eu1"]),global:Re(["global","global0","global1"])},de=e=>e.split(",").map(t=>t.trim()).filter(t=>!!t),Ft=e=>de(le[e]||e);function H(e){const t=e||le.global,n=de(t).reduce((i,r)=>i.concat(Ft(r)),[]).map(P);return n.length>0?n:de(le.global).map(P)}function ke(e){const t=document.querySelector('meta[name="frc-'.concat(e,'"]'));return t?t.content:void 0}function Dt(){return!!ke("disable-eval-patching")}function Tt(){return ke("guard-context")}function V(){const e=ke("api-endpoint");if(e)return e;const t=document.currentScript;if(t){const i=t.dataset.frcApiEndpoint;if(i)return i}
1const n=document.querySelector(".frc-captcha[data-api-endpoint]");if(n){const i=n.dataset.apiEndpoint;if(i)return i}}function It(){const e=window.Intl;if(!e||!e.DateTimeFormat)return;const t=new e.DateTimeFormat;if(!(!t||!t.resolvedOptions))return t.resolvedOptions().timeZone}var Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function Rt(e){return window.TextEncoder?Mt(new TextEncoder().encode(e)):""}function Mt(e){const t=e.length;let n="";for(let i=0;i<t;i+=3){const r=e[i+0],o=e[i+1],s=e[i+2];let u="";u+=Y.charAt(r>>>2),u+=Y.charAt((r&3)<<4|o>>>4),u+=Y.charAt((o&15)<<2|s>>>6),u+=Y.charAt(s&63),n+=u}return t%3===2?n=n.substring(0,n.length-1)+"=":t%3===1&&(n=n.substring(0,n.length-2)+"=="),n}var Lt="frc-risk-intelligence-token",Ot=class{constructor(e){if(this.timeout=null,this.data=null,this.e=e.element,!this.e)throw new Error("No element provided for mounting Risk Intelligence handle.");this.e.frcRiskIntelligence=this,this.formFieldName=e.formFieldName===void 0?Lt:e.formFieldName,this.formFieldName!==null&&(this.hiddenFormEl=qe(this.e,this.formFieldName)),this.startMode=e.startMode||"focus",this.requestRiskIntelligence=e.riskIntelligence,this.handleStartMode()}handleStartMode(){if(this.startMode==="none")console.warn('Risk Intelligence <div> found with data-start="none" (no-op), skipping...',this.e);else if(this.startMode==="auto")this.request();else{const e=We(this.e);e?ze(e,()=>{this.request()}):console.warn('Risk Intelligence <div> with startMode of "focus" found without a parent <form> element, skipping...',this.e)}}request(){this.requestRiskIntelligence().then(e=>{this.timeout!==null&&clearTimeout(this.timeout),this.timeout=setTimeout(()=>{J(this.e,{name:"frc:riskintelligence.expire"})},e.expiresAt-Date.now()),this.data={token:e.token,expiresAt:e.expiresAt},this.hiddenFormEl&&(this.hiddenFormEl.value=e.token),J(this.e,{name:"frc:riskintelligence.complete",token:e.token,expiresAt:e.expiresAt})}).catch(e=>{J(this.e,{name:"frc:riskintelligence.error",error:{code:e.code,detail:e.detail}})})}getData(){return this.data}getElement(){return this.e}addEventListener(e,t,n){this.e.addEventListener(e,t,n)}removeEventListener(e,t,n){this.e.removeEventListener(e,t,n)}};function Nt(e){return e.length===0?[]:[e[0]].concat(nt(e.slice(1)))}function K(e,t){const n=t.length;if(n===0)return-1;if(e<=2||n===1)return 0;const i=n-1,r=e-2;return r<=i?r:1+Math.floor(Math.random()*i)}function Me(e,t,n){const i=P(e),r=P(t);let o=B(e,i)?e.slice(i.length):e;o.length===0?o="/":B(o,"/")||(o="/"+o);const s=o.indexOf("?")===-1?"?":"&";return r+o+s+"retry="+n}var Bt="/api/v2/captcha/agent",Pt="/api/v2/captcha/widget",$="FrcFrameId",Le="FrcAgentOriginKey",Wt=1e3*60*60*36,Ve=[3e3,5e3,8e3,18e3,38e3],re=Ve.length,X,W=0,zt=class{constructor(e={}){if(this.agents=new Map,this.agentState=new Map,this.widgets=new Map,this._attached=q(),this.attached=this._attached.promise,this.riskIntelligencePromises=new Map,this.clearRiskIntelligencePromises=new Map,this.riskIntelligenceHandles=[],this.apiEndpoint=e.apiEndpoint,this.guardContext=e.guardContext||Tt(),X=X||new tt,X.listen(t=>this.onReceiveMessage(t)),this.bus=X,W++,W>1&&console.warn("Multiple Friendly Captcha SDKs created, this is not recommended. Please use a single SDK instance."),this.signals=Ct({disableEvalPatching:e.disableEvalPatching||Dt()}),e.startAgent){const t=H(this.apiEndpoint||V()),n=this.getRetryOrigins(t);this.ensureAgentIFrame(n)}this.setupPeriodicRefresh()}getRetryOrigins(e){return Nt(e)}onReceiveMessage(e){if(e.type==="root_set_response"){const t=this.widgets.get(e.widget_id);if(!t){W===1&&console.warn("Received set response message for widget ".concat(e.widget_id," that doesn't exist"));return}t.setState(e)}else if(B(e.type,"root_store"))this.handleStoreMessage(e);else if(e.type==="root_signals_get")this.handleSignalsGetMessage(e);else if(e.type==="widget_language_change")this.handleWidgetLanguageChange(e);else if(e.type==="widget_reset"){const t=this.widgets.get(e.from_id);if(!t){W===1&&console.warn("Received reset message for widget ".concat(e.from_id," that doesn't exist"));return}t.reset({trigger:"widget"})}else B(e.type,"root_risk_intelligence")&&this.handleRiskIntelligenceMessage(e)}handleRiskIntelligenceMessage(e){if(e.type==="root_risk_intelligence_generate_reply"){const t=this.riskIntelligencePromises.get(e.uid);t?(e.data?t.resolve(e.data):e.error?t.reject(e.error):console.warn("Received risk intelligence generate reply message with no data"),this.riskIntelligencePromises.delete(e.uid)):console.warn("Received risk intelligence generate reply message with no promise to resolve")}else if(e.type==="root_risk_intelligence_clear_reply"){const t=this.clearRiskIntelligencePromises.get(e.uid);t?e.error?t.reject(e.error):t.resolve():console.warn("Received risk intelligence clear reply message with no promise to resolve"),this.clearRiskIntelligencePromises.delete(e.uid)}}
1handleWidgetLanguageChange(e){const t=this.widgets.get(e.from_id);if(!t){W===1&&console.warn("Received language change message for widget ".concat(e.from_id," that doesn't exist"));return}const n=t.getElement(),i=n.querySelector("iframe");i&&(i.title=Ue(e.language));const r=n.querySelector(".frc-banner");if(r){const o=r.style;ce(e.language)?(o.left="6px",o.right="auto"):(o.left="auto",o.right="6px")}}handleSignalsGetMessage(e){const t=this.signals.get(e.widget_id);this.bus.send({type:"root_signals_get_reply",from_id:"",to_id:e.from_id,_frc:1,rid:e.rid,value:t})}handleStoreMessage(e){const t=e.from_id,n=this.agentState.get(t);if(!n){console.error("Store not found ".concat(t));return}e.type==="root_store_get"?this.bus.send({type:"root_store_get_reply",from_id:"",to_id:t,_frc:1,rid:e.rid,value:n.store.get(e.key),sa:!0}):e.type==="root_store_set"&&(n.store.set(e.key,e.value),this.bus.send({type:"root_store_set_reply",from_id:"",to_id:t,_frc:1,rid:e.rid,sa:!0}))}ensureAgentIFrame(e){let t=1;const n=K(t,e),i=e[n],r=i+Bt,o=re,s=this.agents.get(i);if(s&&s.dataset[$])return s.dataset[$];let u=document.getElementsByClassName(He);for(let g=0;g<u.length;g++){const E=u[g];if(E.dataset[Le]===i&&E.dataset[$])return this.agents.set(i,E),E.dataset[$]}const a="a_"+N(12),l=gt(this,a,r,this.guardContext);l.dataset[Le]=i;const p=l.src;let v=i;this.agents.set(i,l),this.agentState.set(a,{store:new rt(i),origin:i}),document.body.appendChild(l);const d=()=>{this.bus.registerTargetIFrame("agent",a,l,this.getRetryTimeout(t)).then(g=>{if(this.agents.get(i)===l&&g==="timeout"){if(t>=o){console.error("[Friendly Captcha] Failed to load agent iframe after ".concat(t-1," retries.")),l.remove(),this.agents.delete(i);return}const E=t+1,m=K(E,e);v=e[m]||v,console.warn("[Friendly Captcha] Retrying agent iframe load."),l.src=Me(p,v,E-1),t=E,d()}})};return d(),a}setupPeriodicRefresh(){let e=1;setInterval(()=>{const t="&expire="+e++;this.agents.forEach((n,i)=>{n.src+=t}),this.widgets.forEach((n,i)=>{const r=n.getElement().querySelector("iframe");r.src+=t})},Wt)}getRetryTimeout(e){return Ve[Math.min(Math.max(e,1),re)-1]}attach(e){const[t,n]=st();for(let o=0;o<n.length;o++){const s=n[o];if(s&&!s.frcRiskIntelligence){const u=s.dataset,a=u.sitekey;if(!a){console.warn("Risk Intelligence <div> found with no sitekey, skipping...",s);continue}this.riskIntelligenceHandles.push(new Ot({element:s,formFieldName:u.formFieldName,startMode:u.start,riskIntelligence:()=>this.riskIntelligence({sitekey:a,apiEndpoint:u.apiEndpoint})}))}}e===void 0&&(e=t),Array.isArray(e)||e instanceof NodeList||(e=[e]);const i=[];for(let o=0;o<e.length;o++){const s=e[o];if(s&&!s.frcWidget){const u=s.dataset,a={element:s,sitekey:u.sitekey,formFieldName:u.formFieldName,apiEndpoint:u.apiEndpoint,language:u.lang,theme:u.theme,startMode:u.start};i.push(this.createWidget(a))}}const r=this.getAllWidgets();return this._attached.resolve(r),this.attached=Promise.resolve(r),i}createWidget(e){const t=H(e.apiEndpoint||this.apiEndpoint||V()),n=this.getRetryOrigins(t);let i=1;this.bus.addOrigins(t);const r=n[K(i,n)]||t[0],o=this.ensureAgentIFrame(n),s="w_"+N(12),u=S=>{const k={from_id:s,to_id:o,_frc:1};this.bus.send(be(k,S))},a={onDestroy:()=>{u({type:"root_destroy_widget"}),this.bus.removeTarget(s),this.widgets.delete(s),e.element.innerHTML="",ct(e.element)},onReset:()=>{u({type:"root_reset_widget"})},onTrigger:S=>{u({type:"root_trigger_widget",trigger:S.trigger})}},l=q(),p=new bt({id:s,createOpts:e,callbacks:a,registered:l.promise});this.widgets.set(s,p);const v=r+Pt,d=mt(o,s,v,e,this.guardContext),g=re,E=d.src;let m=r;const y=Et(e);at(e.element),pt(e);let _=ye(e);ce(_)&&(e.element.dir="rtl");const C=y.style;y.textContent=ee(_,"connecting");function F(S){const k=Rt(JSON.stringify({sdk_v:"1.1.1",sitekey:e.sitekey||"",retry:i+"",endpoint:m,ua:navigator.userAgent,tz:It()||""}));let c=".ERROR.UNREACHABLE";k&&(c+="~"+k),p.setState({state:"error",response:c,error:{code:"network_error",detail:S}})}const b=()=>{this.bus.registerTargetIFrame("widget",s,d,this.getRetryTimeout(i)).then(S=>{if(!p.isDestroyed)if(S==="timeout"){if(i>=g){console.error("[Friendly Captcha] Failed to load widget iframe after ".concat(i-1," retries.")),F("Widget load timeout, stopped retrying"),C.borderColor="#f00",C.fontSize="12px",vt(y,P(d.src),_);return}const k=i+1,c=K(k,n);m=n[c]||m,C.backgroundColor="#fee",C.color="#222",y.textContent=ee(_,"retrying")+" (".concat(i,")"),console.warn("[Friendly Captcha] Retrying widget ".concat(s," iframe load.")),F("Widget load timeout, will retry"),d.src=Me(E,m,k-1),i=k,b()}else S==="registered"&&(e.element.removeChild(y),d.style.display="")})};return b(),l.resolve(),p}riskIntelligence(e){const t=H(e.apiEndpoint||this.apiEndpoint||V()),n=this.getRetryOrigins(t);this.bus.addOrigins(t);const i=this.ensureAgentIFrame(n),r=N(8);this.bus.send({type:"root_risk_intelligence_generate",to_id:i,from_id:"",_frc:1,sitekey:e.sitekey,bypassCache:e.bypassCache||!1,uid:r});const o=q();return this.riskIntelligencePromises.set(r,o),o.promise}clearRiskIntelligence(e){const t=H((e==null?void 0:e.apiEndpoint)||this.apiEndpoint||V()),n=this.getRetryOrigins(t);this.bus.addOrigins(t);const i=this.ensureAgentIFrame(n),r=N(8);this.bus.send({type:"root_risk_intelligence_clear",to_id:i,from_id:"",_frc:1,sitekey:e==null?void 0:e.sitekey,uid:r});const o=q();return this.clearRiskIntelligencePromises.set(r,o),o.promise}getAllWidgets(){const e=[];
1return this.widgets.forEach(t=>{e.push(t)}),e}getWidgetById(e){return this.widgets.get(e)}getAllRiskIntelligenceHandles(){const e=[];return this.riskIntelligenceHandles.forEach(t=>{e.push(t)}),e}clear(){this.widgets.forEach(e=>{e.destroy()}),this.agents.forEach(e=>{e.remove()}),this.agents.clear()}};const qt="captainCaps.session.store",Ut=600*1e3,he="captaincaps:statechange";let oe;function jt(){return oe||(oe=new zt),oe}function G(e){try{const t=sessionStorage.getItem(e);if(!t)return{used:!1};const n=JSON.parse(t),i=!!n.used,r=typeof n.createdAt=="number"?n.createdAt:n.token?Date.now():void 0;return n.token&&typeof n.createdAt!="number"&&T(e,{token:n.token,used:i,createdAt:r}),{token:n.token,used:i,createdAt:r}}catch(t){return{used:!1}}}function T(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(n){}}function se(e){try{sessionStorage.removeItem(e)}catch(t){}}function Ht(e){return e.createdAt?Date.now()-e.createdAt>Ut:!0}function R(e){return!!(e.token&&!e.used&&!Ht(e))}function L(e){window.dispatchEvent(new CustomEvent(he,{detail:e}))}function Vt(){return window.location.host.includes("ottonova.de")||!!window.mycaptain}function Yt(){return new URLSearchParams(window.location.search).get("captcha")}function Kt(e){const t=e.storageKey||qt,n=Yt();if(n){const c={token:n,used:!1,createdAt:Date.now()};return T(t,c),L({storageKey:t,state:c}),e.mountElement.classList.add("is-hidden"),queueMicrotask(()=>{var h;(h=e.onHideWidget)==null||h.call(e)}),{attach(){},startIfNeeded(){},getToken(){return n},hasUsableToken(){return!0},markTokenUsed(){const h=G(t);if(h.token){const f={...h,used:!0};T(t,f),L({storageKey:t,state:f})}},reset(){const h={token:n,used:!1,createdAt:Date.now()};T(t,h),L({storageKey:t,state:h})},destroy(){}}}if(!e.enabled){const c="DEV_BYPASS_TOKEN_CAPTCHA_SOLUTION",h=G(t);if(!R(h)){const f={token:c,used:!1,createdAt:Date.now()};T(t,f),L({storageKey:t,state:f})}return e.mountElement.classList.add("is-hidden"),queueMicrotask(()=>{var f;(f=e.onHideWidget)==null||f.call(e)}),{attach(){},startIfNeeded(){},getToken(){return c},hasUsableToken(){return!0},markTokenUsed(){const f=G(t);if(f.token){const w={...f,used:!0};T(t,w),L({storageKey:t,state:w})}},reset(){const f={token:c,used:!1,createdAt:Date.now()};T(t,f),L({storageKey:t,state:f})},destroy(){}}}let i,r=!1,o=!1,s=!1,u,a=()=>{},l=()=>{},p=!1,v=!1;const d=()=>G(t),g=c=>L({storageKey:t,state:c!=null?c:d()});let E;const m=()=>{if(i||o)return;a(),a=()=>{};const c=e.form.closest(".modal"),h=()=>{a(),a=()=>{},k()};if(!c){k();return}if(c.classList.contains("is-open")){h();return}c.addEventListener("modalShow",h,{once:!0}),a=()=>{c.removeEventListener("modalShow",h)}},y=c=>{var f,w,A;const h=R(c);if(E!==h){if(E=h,h){r=!0,F(),(f=e.onHideWidget)==null||f.call(e);return}if(r=!1,b(),!(c.used&&v)){if((w=e.onShowWidget)==null||w.call(e),i){(A=i.reset)==null||A.call(i);return}s&&m()}}},_=c=>{const h=c;!h.detail||h.detail.storageKey!==t||y(h.detail.state)};window.addEventListener(he,_),y(d());const C=c=>{const h={token:c,used:!1,createdAt:Date.now()};T(t,h),y(h),g(h)};function F(){if(u)return;const c=document.createElement("div");c.className="frc-captcha-cached",c.setAttribute("aria-hidden","true"),c.setAttribute("data-label",e.locale==="en"?"Verified":"Verifiziert"),c.innerHTML='<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><polyline points="3 9 7 13 13 4"/></svg>',e.mountElement.appendChild(c),u=c}function b(){u==null||u.remove(),u=void 0}const S=()=>{var c;if(!(r||o)){if(R(d())){r=!0;return}i&&(r=!0,p=!0,(c=i.start)==null||c.call(i))}};function k(){if(i||o)return;const c=d();if(R(c)){y(c),queueMicrotask(()=>{var f;(f=e.onComplete)==null||f.call(e)});return}const h=()=>{p=!0};e.mountElement.addEventListener("pointerdown",h,{passive:!0}),e.mountElement.addEventListener("keydown",h),l=()=>{e.mountElement.removeEventListener("pointerdown",h),e.mountElement.removeEventListener("keydown",h),p=!1},i=jt().createWidget({element:e.mountElement,sitekey:e.sitekey,language:e.locale,startMode:"none"}),i.addEventListener("frc:widget.statechange",f=>{var A,I;const w=(A=f==null?void 0:f.detail)==null?void 0:A.state;if(w==="activating"&&!p){(I=i.reset)==null||I.call(i,{trigger:"root"});return}(w==="activating"||w==="activated"||w==="requesting")&&(p=!1)}),i.addEventListener("frc:widget.complete",f=>{var A,I;const w=(A=f==null?void 0:f.detail)==null?void 0:A.response;w&&(C(w),(I=e.onComplete)==null||I.call(e))}),i.addEventListener("frc:widget.expire",()=>{var A;const f=d();if(R(f)){r=!1;return}se(t),r=!1;const w=d();y(w),g(w),(A=e.onExpire)==null||A.call(e)}),i.addEventListener("frc:widget.error",f=>{var I,Ae;const w=d();if(R(w)){r=!1;return}se(t),r=!1;const A=d();y(A),g(A),(Ae=e.onError)==null||Ae.call(e,(I=f==null?void 0:f.detail)==null?void 0:I.error)})}return{attach(){i||o||s||(s=!0,m())},startIfNeeded(){S()},getToken(){const c=d();if(R(c))return c.token},hasUsableToken(){return R(d())},markTokenUsed(){const c=d();if(!c.token)return;v=!0;const h={...c,used:!0};T(t,h),y(h),g(h)},reset(){se(t),r=!1;const c=d();y(c),g(c)},destroy(){var c;o||(o=!0,window.removeEventListener(he,_),a(),l(),b(),(c=i==null?void 0:i.destroy)==null||c.call(i),i=void 0)}}}function on(e){var s;const{form:t,mountElement:n,emailInput:i}=e;if(!t||!n)return{requireCaptchaOnSubmit:!1};const r=(s=e.enabled)!=null?s:Vt(),o=Kt({form:t,mountElement:n,emailInput:i,sitekey:e.sitekey||window.captain,locale:e.locale,onComplete:e.onComplete,onExpire:e.onExpire,onError:e.onError,onShowWidget:e.onShowWidget,onHideW
1idget:e.onHideWidget,enabled:r});return o.attach(),{controller:o,requireCaptchaOnSubmit:r}}const fe="BJz7qNsdj-7";j.init({onShow:e=>{e.dispatchEvent(new CustomEvent("modalShow"))},onClose:e=>{e.dispatchEvent(new CustomEvent("modalClose"))},disableScroll:!0,openTrigger:"data-modal",closeTrigger:"data-close"});async function te(){return await Ye([fe]).then(e=>e[fe])}async function Ye(e){if(typeof __ucCmp>"u")return e.reduce((n,i)=>(n[i]=!1,n),{});const t=await __ucCmp.getConsentDetails();return e.reduce((n,i)=>{var r,o;return n[i]=!!((o=(r=t.services[i])==null?void 0:r.consent)!=null&&o.given),n},{})}function Oe(){const e=document.createElement("iframe");return e.src="https://www.youtube-nocookie.com/embed/8VBv_1qQuD4",e.id="yt-player",e.width="1280",e.height="720",e.setAttribute("allowfullscreen",""),e.allow="autoplay",e.title="Youtube Video",e.name="videocontent",e}const Z=document.getElementById("youtube-modal"),z=Z==null?void 0:Z.querySelector(".videoWrapper");Z&&z&&window.addEventListener("UC_UI_INITIALIZED",async()=>{if(await te()){const e=Oe();z.appendChild(e)}else window.addEventListener("UC_CONSENT",async()=>{if(await te()){const e=Oe();z.appendChild(e)}else{const e=z.querySelector("iframe");e&&z.removeChild(e)}})});const ue=document.getElementById("youtube-consent-modal");var Ne,Be;ue&&((Ne=ue.querySelector("button.primary"))==null||Ne.addEventListener("click",e=>{__ucCmp.updateServicesConsents([{id:"BJz7qNsdj-7",consent:!0}]).then(()=>{__ucCmp.saveConsents(),j.close("youtube-consent-modal")})}),(Be=ue.querySelector("button.outline"))==null||Be.addEventListener("click",e=>{__ucCmp.showServiceDetails("BJz7qNsdj-7")}));document.querySelectorAll("[data-youtube]").forEach(e=>{e.addEventListener("click",async t=>{if(t.preventDefault(),!await te()){j.show("youtube-consent-modal",{disableScroll:!0,closeTrigger:"data-close"});return}localStorage.setItem("ytVideo",e.dataset.youtube),j.show("youtube-modal",{onShow:n=>{const i=n.querySelector("iframe");
1i&&(i.src="https://www.youtube-nocookie.com/embed/"+localStorage.getItem("ytVideo")+"?autoplay=1")},onClose:n=>{const i=n.querySelector("iframe");i&&(i.src="https://www.youtube-nocookie.com/embed/8VBv_1qQuD4")},closeTrigger:"data-close"})})});function $t(e="JhuKGXebQJU"){const t=document.createElement("iframe");return t.src="https://www.youtube.com/embed/"+e+"?rel=0&controls=1&showinfo=0",t.allow="autoplay; encrypted-media",t.setAttribute("allowfullscreen",""),t.title="Youtube Video",t.name="videocontent",t}function Xt(e="JhuKGXebQJU"){const t=document.createElement("img");return t.src="https://privacy-proxy-server.usercentrics.eu/video/youtube/"+e+"-poster-image",t}function Gt(e,t){const n=document.createElement("div");n.classList.add("consent-overlay");const i=document.createElement("div");i.innerHTML='\n <span class="h4">'.concat(en?"We need your consent to show this ".concat(e):"Wir benötigen deine Zustimmung, um ".concat(e," zeigen zu können"),"</span>\n <p>").concat(en?"This content is not permitted to load due to trackers that are not disclosed to the visitor. The website owner needs to setup the site with their CMP to add this content to the list of technologies used.":"Dieser Inhalt darf aufgrund von Trackern, die dem Besucher nicht offengelegt werden, nicht geladen werden. Der Website-Betreiber muss die Website mit seinem CMP einrichten, um diesen Inhalt zur Liste der verwendeten Technologien hinzuzufügen.",'</p>\n <div class="buttons">\n <button class="btn primary">').concat(en?"Accept":"Annehmen",'</button>\n <button class="btn outline">').concat(en?"More information":"Mehr Informationen","</button>\n </div>\n "),i.classList.add("consent-element"),n.appendChild(i);const r=i.querySelector(".btn.primary"),o=i.querySelector(".btn.outline");return r==null||r.addEventListener("click",()=>{__ucCmp.updateServicesConsents([{id:t,consent:!0}]).then(()=>{__ucCmp.saveConsents()})}),o==null||o.addEventListener("click",()=>__ucCmp.showServiceDetails(t)),n}function Jt(){const e=document.createElement("a");return e.href="",e.classList.add("btn-play"),e.setAttribute("aria-label",en?"Play video":"Video abspielen"),e.innerHTML='<svg><use xlink:href="/assets/dist/sprite.svg#btn-play" /></svg>',e}document.querySelectorAll(".mag-image-block .magvid").forEach(e=>{const t=e,n=t.dataset.videoUrl,i=Xt(n),r=Jt();t.appendChild(i),t.appendChild(r),r.addEventListener("click",async o=>{if(o.preventDefault(),!await te()){j.show("youtube-consent-modal",{disableScroll:!0,closeTrigger:"data-close"});return}const s=$t(n);t.appendChild(s),t.removeChild(i),t.removeChild(r)})});let U={};const ne=[{serviceId:"8Nxb4ZtSa",srcIdentifier:["datawrapper."],consentTitle:en?"element":"dieses Element",iframes:[]},{serviceId:fe,srcIdentifier:[".youtube."],consentTitle:en?"Youtube video":"dieses Youtube Video",iframes:[]},{serviceId:"S1pcEj_jZX",srcIdentifier:["google","maps/embed"],consentTitle:en?"map":"diese Karte",iframes:[]},{serviceId:"aVQhDPlnHpdqu5",srcIdentifier:[".appinio."],consentTitle:en?"element":"dieses Element",iframes:[]}],Zt=Array.from(document.querySelectorAll("iframe")),ge=[];function Ke(e,t){const n=e.parentElement;n&&(n.style.position="relative",n.style.width=n.offsetWidth+"px",n.style.height=n.offsetHeight+"px",n.style.padding="0",e.style.position="absolute",n.appendChild(t))}Zt.forEach(e=>{let t=!1;ne.forEach(n=>{n.srcIdentifier.every(i=>{var r;return(r=e.dataset.src)==null?void 0:r.includes(i)})&&(n.iframes.push(e),t=!0)}),t||ge.push(e)});if(window.location.href.indexOf("localhost")>0){let e=function(t){const n=document.createElement("div");n.classList.add("consent-overlay");const i=document.createElement("div");i.innerHTML='\n <span class="h4">'.concat(en?"This iframe is unknow yet":"Dieses IFrame ist noch unbekannt","</span>\n <p>").concat(en?"It seems this iframe is not connected to a service yet. Please get in touch with team LOKI and clarify if using it without user consent is fine.":"Es scheint, dass dieser iFrame noch nicht mit einem Dienst verbunden ist. Bitte setze dich sich mit Team LOKI in Verbindung und kläre, ob die Verwendung ohne Zustimmung des Benutzers in Ordnung ist.",'</p>\n <div class="buttons">\n <button class="btn primary">').concat(en?"Show iframe":"iFrame anzeigen","</button>\n </div>\n "),i.classList.add("consent-element"),n.appendChild(i);const r=t.parentElement;r!=null&&r.querySelector(".consent-overlay")||Ke(t,n);const o=i.querySelector(".btn.primary");o==null||o.addEventListener("click",()=>{var s;t.src=t.dataset.src,r!=null&&r.querySelector(".consent-overlay")&&((s=r==null?void 0:r.querySelector(".consent-overlay"))==null||s.remove()),r==null||r.removeAttribute("style"),t.style.removeProperty("position")})};ge.length>0&&ge.forEach(t=>{t.dataset.src&&e(t)})}window.location.href.indexOf("ottonova.de")<0&&window.location.href.indexOf("loaduc=1")<0&&sessionStorage.getItem("loaduc")!=="true"&&(ne.forEach(e
1=>{U[e.serviceId]=!0}),window.dispatchEvent(new CustomEvent("UC_CONSENT")));window.addEventListener("UC_CONSENT",async()=>{(window.location.href.indexOf("ottonova.de")>0||window.location.href.indexOf("loaduc=1")!==-1||sessionStorage.getItem("loaduc")==="true")&&(U=await Ye(Object.values(ne).map(e=>e.serviceId))),ne.forEach(e=>{var t;e.consentGiven!==U[e.serviceId]&&e.iframes&&(e.consentGiven=U[e.serviceId],(t=e.iframes)==null||t.forEach(n=>{const i=n.dataset.src;if(!i)return;const r=n.parentElement,o=Gt(e.consentTitle,e.serviceId);if(U[e.serviceId]){n.src=i;const s=r==null?void 0:r.querySelector(".consent-overlay");s&&(r==null||r.removeChild(s)),r==null||r.removeAttribute("style"),n.style.removeProperty("position")}else n.src="",o&&!(r!=null&&r.querySelector(".consent-overlay"))&&Ke(n,o)}))})});export{Ye as g,on as i,rn as p}; 2//# sourceMappingURL=custom-consent.min._crxfR2H.js.map
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.