PageSourceSearch

https://strategies.bet2invest.com/_nuxt/CpMkSHGq.js

js bet2invest.com collected 2026-10-07 16:17:29 UTC 6,585 bytes, 1 lines download raw bytes

1import{d as W,aV as Y,u as G,bY as Q,bm as X,bD as Z,T as L,L as _,o as n,c as r,a as u,n as p,t as g,k as c,l as V,_ as ee,a0 as R,h as j,bi as te,O as ae,b as N,j as A,F as le,r as ne,aW as I,q as v,bn as oe,m,bp as se,bq as re,br as ie,bt as ue}from"./Bp6_klXb.js";const ce=300,de={class:"relative flex flex-col gap-3 tracking-tight leading-none min-w-0"},fe={class:"flex flex-col gap-2 min-w-0"},pe={class:"flex flex-col gap-1.5 flex-1 min-w-0"},ge={key:0,class:"flex items-start justify-between gap-2 leading-none"},ve=["value","placeholder","disabled"],he={class:"flex items-center gap-2 pointer-events-none text-grasshopper-900/60 dark:text-content-secondary"},be={key:0,class:"flex flex-col gap-2 text-left"},xe={class:"text-[#D02525]"},me={class:"overflow-y-auto flex-1"},ye={key:0,class:"p-3 flex items-center gap-2 justify-center text-grasshopper-900/40"},ke=["onClick"],we={key:2,class:"p-3 text-left text-grasshopper-900/60 dark:text-content-primary font-medium"},ze=W({__name:"BaseSearchBar",props:I({label:{},labelPosition:{default:"inside"},placeholder:{},hint:{},error:{},disabled:{type:Boolean},tooltip:{},icon:{},autofocus:{type:Boolean},options:{default:()=>[]},debounce:{default:ce},loading:{type:Boolean,default:!1},optionLabel:{},optionValue:{},emptyText:{},clearOnType:{type:Boolean,default:!0},clearOnSelect:{type:Boolean},textSize:{}},{modelValue:{},modelModifiers:{}}),emits:I(["search","select","input"],["update:modelValue"]),setup(t,{emit:M}){const a=t,i=Y(t,"modelValue"),y=M,{t:D}=G(),s=v(!1),d=v(""),o=v(-1),O=v([]),b=v(null),k=v(null),x=v(null),F=Q(e=>{y("search",e)},a.debounce),{floatingStyles:$}=X(k,x,{placement:"bottom-start",middleware:[se(8),re(),ie(),ue({apply({rects:e,elements:l}){Object.assign(l.floating.style,{width:`${e.reference.width}px`})}})],whileElementsMounted:oe,open:s});Z(k,e=>{const l=e.target;x.value&&x.value.contains(l)||(s.value=!1)});const C=e=>{const l=O.value[e];l&&l.scrollIntoView({block:"nearest"})},P=e=>{if(!s.value&&e.key==="ArrowDown"){e.preventDefault(),s.value=!0;return}if(!(!s.value||!a.options?.length))switch(e.key){case"ArrowDown":e.preventDefault(),o.value=(o.value+1)%a.options.length,C(o.value);break;case"ArrowUp":e.preventDefault(),o.value=(o.value-1+a.options.length)%a.options.length,C(o.value);break;case"Enter":e.preventDefault(),o.value>=0&&a.options[o.value]&&T(a.options[o.value]);break;case"Escape":s.value=!1,b.value?.blur();break}},w=e=>e?typeof a.optionLabel=="function"?a.optionLabel(e):a.optionLabel&&typeof e=="object"?String(e[a.optionLabel]):String(e):"",S=e=>{if(!i.value)return!1;if(a.optionValue&&typeof e=="object"){const l=e[a.optionValue],h=i.value[a.optionValue];return l===h}return JSON.stringify(e)===JSON.stringify(i.value)};L(i,e=>{e&&(d.value=w(e))},{immediate:!0}),L(()=>a.options,()=>{o.value=-1});const U=e=>{const l=e.target.value;y("input",l),d.value=l,s.value=!0,o.value=-1,a.clearOnType&&i.value&&(i.value=null),F(l)},T=e=>{a.clearOnSelect||(d.value=w(e)),i.value=e,s.value=!1,o.value=-1,a.clearOnSelect&&(i.value=null,d.value=""),y("select",e)},q=()=>{s.value=!0},J=m(()=>{const e=["bg-neutral-960","dark:bg-neutral-800","items-center"];return a.disabled?e.push("cursor-not-allowed"):e.push("hover:bg-neutral-920 cursor-text"),s.value&&e.push("!outline-grasshopper-900 dark:!outline-stroke-primary bg-neutral-960"),a.error&&e.push("!outline-[#D02525]"),a.textSize==="sm"&&e.push("py-3.5 laptop:p-4"),e}),E=m(()=>a.disabled?"text-grasshopper-900/40 dark:text-content-secondary/40":"text-grasshopper-900/60 dark:text-content-secondary"),H=m(()=>a.disabled?"text-grasshopper-900/40":"text-grasshopper-900/50"),K=m(()=>a.emptyText||D("dropdown_empty"));return _(()=>{a.autofocus&&b.value&&setTimeout(()=>b.value?.focus(),50)}),(e,l)=>{const h=ee;return n(),r("div",de,[u("div",fe,[t.label&&t.labelPosition==="top"?(n(),r("label",{key:0,class:p(["font-medium pointer-events-none",E.value])},g(t.label),3)):c("",!0),u("div",{ref_key:"referenceRef",ref:k,class:p(["rounded-lg leading-none py-2.5 px-3 laptop:p-4 flex gap-5 transition-colors duration-200 ease-linear outline outline-2 outline-transparent",J.value]),onClick:l[0]||(l[0]=f=>b.value?.focus())},[u("div",pe,[t.labelPosition!=="top"&&t.label||t.hint?(n(),r("div",ge,[t.labelPosition!=="top"&&t.label?(n(),r("label",{key:0,class:p(["font-medium pointer-events-none",E.value])},g(t.label),3)):c("",!0),t.hint?(n(),r("p",{key:1,class:p(["text-[14px] ml-auto",H.value])},g(t.hint),3)):c("",!0)])):c("",!0),u("div",{class:p(["flex items-center gap-2 flex-1 text-grasshopper-900 dark:text-content-primary",{"laptop:text-[20px]":t.textSize==="md","laptop:text-[16
1px]":t.textSize==="sm"}])},[u("input",{ref_key:"inputRef",ref:b,type:"text",value:d.value,onInput:U,onFocus:q,onKeydown:P,placeholder:t.placeholder,disabled:t.disabled,class:p(["bg-transparent outline-none w-full placeholder:text-grasshopper-900/60 placeholder:dark:text-content-secondary/60 disabled:cursor-not-allowed leading-none",{"h-[16px]":t.textSize==="sm"}])},null,42,ve)],2)]),u("div",he,[t.loading?(n(),V(h,{key:0,name:"lucide:loader-2",size:t.textSize==="sm"?16:20,class:"animate-spin text-grasshopper-900 dark:text-content-secondary"},null,8,["size"])):R(e.$slots,"icon",{key:1},()=>[j(h,{name:t.icon||"lucide:search",size:t.textSize==="sm"?16:20},null,8,["name","size"])])])],2)]),t.error?(n(),r("div",be,[u("p",xe,g(t.error),1)])):c("",!0),(n(),V(te,{to:"body"},[s.value&&(t.options?.length||d.value.length>0||t.loading)?(n(),r("div",{key:0,ref_key:"floatingRef",ref:x,style:ae(N($)),class:"z-[9999] min-w-[300px] bg-neutral-960 dark:bg-background-additional rounded-lg border border-grasshopper-900/10 dark:border-stroke-tertiary overflow-hidden flex flex-col max-h-[350px]"},[u("ul",me,[t.loading&&!t.options?.length?(n(),r("li",ye,[A(g(N(D)("Loading"))+" ",1),j(h,{name:"lucide:loader-2",size:"16",class:"animate-spin"})])):(n(!0),r(le,{key:1},ne(t.options,(f,z)=>(n(),r("li",{key:z,ref_for:!0,ref:B=>{B&&(O.value[z]=B)},onClick:B=>T(f),class:p(["p-3 hover:bg-neutral-920 hover:dark:bg-background-hover cursor-pointer transition-colors text-grasshopper-900 dark:text-content-primary flex items-center justify-between group",{"bg-neutral-920 dark:bg-background-hover font-medium":S(f)||z===o.value}])},[R(e.$slots,"item",{item:f,selected:S(f)},()=>[A(g(w(f)),1)]),S(f)?(n(),V(h,{key:0,name:"lucide:check",class:"text-grasshopper-900 dark:text-content-primary size-4 flex-shrink-0"})):c("",!0)],10,ke))),128)),!t.loading&&!t.options?.length&&d.value.length>0?(n(),r("li",we,g(K.value),1)):c("",!0)])],4)):c("",!0)]))])}}});export{ze as _};

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.