1import{a1 as g,a2 as N,r as v,a3 as A,D as L,a4 as D,M,N as U,a5 as V,a6 as C,a7 as F,a8 as m}from"./CqWH0BZP.js";function P(e,n){for(var t=-1,o=e==null?0:e.length,i=Array(o);++t<o;)i[t]=n(e[t],t,e);return i}var b=m?m.prototype:void 0,y=b?b.toString:void 0;function E(e){if(typeof e=="string")return e;if(C(e))return P(e,E)+"";if(F(e))return y?y.call(e):"";var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function R(e){return e==null?"":E(e)}var Y=0;function $(e){var n=++Y;return R(e)+n}const j="https://challenges.cloudflare.com/turnstile/v0/api.js";let d=null;const K=()=>typeof window>"u"||window.turnstile?Promise.resolve():d||(d=new Promise((e,n)=>{const t=document.createElement("script");t.src=j,t.async=!0,t.defer=!0,t.setAttribute("data-turnstile","true"),t.onload=()=>e(),t.onerror=()=>{d=null,t.remove(),n(new Error("turnstile script load error"))},document.head.appendChild(t)}),d),W=g({__name:"TurnstileWidget",props:{mode:{},action:{}},emits:["success","error","beforeInteractive"],setup(e,{expose:n,emit:t}){const o=e,i=N(),p=t,u=v(""),s=v(""),l=()=>typeof performance<"u"?performance.now():Date.now();let w=l(),a=0,f=0;const I=()=>{const r=l(),c=a?r-a:0;return Math.round(r-w-f-c)},k=r=>p("success",r,I()),h=r=>{p("error",r)},T=()=>{a=l(),p("beforeInteractive")},_=()=>{a&&(f+=l()-a,a=0)},x={visible:{pass:"1x00000000000000000000AA",block:"2x00000000000000000000AB",interactive:"3x00000000000000000000FF"},invisible:{pass:"1x00000000000000000000BB",block:"2x00000000000000000000BB"}},B=()=>{const r=o.mode==="invisible"?i.public.TURNSTILE_INVISIBLE_SITE_KEY:i.public.TURNSTILE_VISIBLE_SITE_KEY;if(i.public.NODE_ENV==="production"||typeof window>"u")return r;const c=new URLSearchParams(window.location.search).get("ts");return c?x[o.mode][c]??r:r};A(async()=>{u.value=$(`cf-turnstile-${o.mode}-`),await L();try{await K();const r=B();w=l(),s.value=window.turnstile.render(`#${u.value}`,{sitekey:r,...o.action?{action:o.action}:{},callback:k,"error-callback":h,"before-interactive-callback":T,"after-interactive-callback":_})}catch{}});const S=()=>{typeof window>"u"||!s.value||(window.turnstile&&window.turnstile.reset(s.value),w=l(),a=0,f=0)};return D(()=>{typeof window>"u"||!s.value||window.turnstile&&window.turnstile.remove(s.value)}),n({reset:S}),(r,c)=>u.value?(M(),U("div",{key:0,id:u.value},null,8,["id"])):V("",!0)}});export{W 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.