1import{d as q,a2 as F,a3 as B,c as w,a as c,x as H,E as R,G as U,f as m,e as C,w as x,t as A,F as D,j as O,o as b,q as y,aa as G,s as I,U as z}from"./DSpXs5o6.js";const J={class:"mt-4 flex gap-2"},K={class:"flex h-5 items-center"},Q={for:"checkbox",class:"flex space-x-2 text-sm"},W={class:"text-gray-700"},X={key:0,class:"text-red-500 text-sm"},Z=q({__name:"ConsentCheckbox",props:F({error:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(r){const a=r,n=B(r,"modelValue");return(e,t)=>{const i=O;return b(),w(D,null,[c("div",J,[c("div",K,[R(c("input",{"onUpdate:modelValue":t[0]||(t[0]=f=>n.value=f),id:"checkbox",type:"checkbox",name:"checkbox",value:"true","unchecked-value":"false",required:"",class:"h-4 w-4 rounded text-primary-600 shadow-sm focus:border-primary-300 focus:ring focus:ring-primary-200 focus:ring-opacity-50 focus:ring-offset-0 disabled:cursor-not-allowed disabled:text-gray-400"},null,512),[[U,n.value]])]),c("label",Q,[c("div",W,[t[3]||(t[3]=m(" ÐÐ°Ñ ")),C(i,{class:"text-main-500",to:"/consent-policy",target:"_blank"},{default:x(()=>t[1]||(t[1]=[m("ÑоглаÑие")])),_:1,__:[1]}),t[4]||(t[4]=m(" на обÑабоÑÐºÑ Ð¿ÐµÑÑоналÑнÑÑ
даннÑÑ
в ÑооÑвеÑÑÑвии Ñ ")),C(i,{class:"text-main-500",to:"/privacy-policy",target:"_blank"},{default:x(()=>t[2]||(t[2]=[m("полиÑикой конÑиденÑиалÑноÑÑи")])),_:1,__:[2]})])])]),a.error?(b(),w("p",X,A(a.error),1)):H("",!0)],64)}}});let p=null;function g(){return typeof window>"u"?Promise.reject(new Error("SmartCaptcha cannot run on server")):window.smartCaptcha?Promise.resolve():p||(p=new Promise((r,a)=>{const n=document.querySelector("script[data-smartcaptcha]");if(n){n.addEventListener("load",()=>r()),n.addEventListener("error",()=>a(new Error("Failed to load SmartCaptcha script")));return}const e=document.createElement("script");e.src="https://smartcaptcha.yandexcloud.net/captcha.js",e.async=!0,e.dataset.smartcaptcha="true",e.onload=()=>r(),e.onerror=()=>a(new Error("Failed to load SmartCaptcha script")),document.head.appendChild(e)}),p)}function $(r,a){const n=y(),e=y();let t=null;const i=G().public.captchaEnabled!==!1;I(()=>{i&&g().catch(()=>{})}),z(()=>h());async function f(){if(!i)return"";if(t)return t;if(await g(),!window.smartCaptcha||!r.value)throw new Error("SmartCaptcha not ready");e.value&&h();const o=window.smartCaptcha,S=r.value;return t=new Promise((V,l)=>{let s=!1;const M=a.timeout??18e4,u=o.render(S,{sitekey:a.sitekey,invisible:a.invisible??!0,hideShield:a.hideShield??!0,test:a.test??!1,hl:a.hl??"ru"});e.value=u;const N=o.subscribe(u,"success",v=>{if(!s){if(s=!0,d(),!v)return l(new Error("Captcha returned empty token"));n.value=v,V(v)}}),L=o.subscribe(u,"challenge-hidden",()=>{s||(s=!0,d(),l(new Error("Captcha cancelled")))}),P=o.subscribe(u,"network-error",()=>{s||(s=!0,d(),l(new Error("Captcha network error")))}),T=setTimeout(()=>{s||(s=!0,d(),l(new Error("Captcha timeout")))},M);function d(){clearTimeout(T),N(),L(),P(),t=null}a.invisible!==!1&&o.execute(u)}),t}function _(){!window.smartCaptcha||!e.value||(window.smartCaptcha.reset(e.value),n.value=void 0)}function h(){if(E(),!(!window.smartCaptcha||!e.value)){try{window.smartCaptcha.destroy(e.value)}catch{}e.value=void 0,n.value=void 0,t=null,r.value&&(r.value.innerHTML="")}}function k(){return!window.smartCaptcha||!e.value?"":window.smartCaptcha.getResponse(e.value)||""}function E(){document.querySelectorAll(".SmartCaptcha-Overlay, .SmartCaptcha-Challenge").forEach(o=>o.remove()),r.value&&(r.value.innerHTML="",r.value.removeAttribute("style"))}return{token:n,widgetId:e,execute:f,reset:_,destroy:h,getResponse:k}}export{Z as _,$ as u};
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.