PageSourceSearch

https://bet2invest.com/_nuxt/By8dtn9g.js

js bet2invest.com collected 2026-10-07 16:18:50 UTC 3,479 bytes, 1 lines download raw bytes

1import{d as I,g as B,ap as T,w as A,o as x,c as f,a as s,k as n,u as o,R as v,l as _,F as D,r as E,t as i,B as R,b as z,A as q,z as M,x as l}from"./Cn-bPh2x.js";import{_ as j}from"./5WKPJ2xj.js";import{u as G,a as H}from"./DDKD9Aib.js";import{_ as J}from"./B1-mRhEm.js";import{u as g}from"./BSsL4GZz.js";import{_ as K}from"./C80CfPba.js";import{u as O}from"./CbgRYj3y.js";import"./C31aIosS.js";import"./BXigfGEt.js";import"./Bc0tFPX1.js";import"./CSox_Sb7.js";import"./DHcOGyuv.js";import"./DVl5AoRS.js";import"./Cnei6b2J.js";import"./DuAV58dt.js";const Q={class:"mt-base card p-base"},X={class:"flex items-center gap-2"},xe=I({__name:"index",async setup(Y){let m,h;const c=G(),P=B(),N=T(),{data:k,refresh:w}=([m,h]=A(()=>O("admin-private-plans",()=>c.$adminList())),m=await m,h(),m),r=l(null),y=l([]),d=l(!1),$=async a=>{try{y.value=await c.$searchUsers(a)}catch{}finally{d.value=!1}},u=l({tipsters:[],pricingMode:"percent",discountPercent:20,fixedPriceInEur:null,discountScope:"total",expiresAt:""}),p=l(!1),W=async()=>{if(r.value){p.value=!0;try{await c.$create({ownerId:r.value.id,...H(u.value)}),g({type:"success",message:"Private plan created."}),await w()}catch(a){g({type:"error",message:"Failed to create the private plan",body:a.data?.message?.[0]})}finally{p.value=!1}}},F=async a=>{await navigator.clipboard.writeText(`${N.origin}/private-offer/${a.slug}`),g({type:"success",message:"Link copied."})},U=a=>a.pricingMode==="percent"?`-${a.discountPercent}%`:`${((a.fixedPriceInEur??0)/100).toFixed(2)} EUR (fixed)`,L=[{longName:"User",shortName:"U",key:"user",minWidthPx:100,maxWidthFr:1},{longName:"Tipsters",shortName:"T",key:"tipsters",minWidthPx:150,maxWidthFr:2},{longName:"Pricing",shortName:"P",key:"pricing",minWidthPx:100,maxWidthFr:1},{longName:"Discount on",shortName:"D",key:"scope",minWidthPx:100,maxWidthFr:1},{longName:"Expires",shortName:"E",key:"expires",minWidthPx:100,maxWidthFr:1},{longName:"Subscription",shortName:"S",key:"subscription",minWidthPx:100,maxWidthFr:1},{longName:"",shortName:"",key:"actions",minWidthPx:120,maxWidthFr:1}];return(a,t)=>{const S=M,V=q,C=j;return x(),f("div",null,[t[4]||(t[4]=s("h2",null,"Private plans",-1)),s("div",Q,[n(o(K),{modelValue:o(r),"onUpdate:modelValue":t[0]||(t[0]=e=>v(r)?r.value=e:null),class:"mb-base",label:"User (the only one who can subscribe)","label-position":"top",placeholder:"Username, email or ID","text-size":"sm",options:o(y),"option-label":e=>`${e.username} (${e.email})`,"option-value":"id",loading:o(d),onInput:t[1]||(t[1]=e=>d.value=!0),onSearch:$},null,8,["modelValue","options","option-label","loading"]),n(J,{modelValue:o(u),"onUpdate:modelValue":t[2]||(t[2]=e=>v(u)?u.value=e:null),"submit-label":"Create",loading:o(p),onSubmit:W},null,8,["modelValue","loading"])]),n(C,{class:"mt-base","head-columns":L},{body:_(()=>[(x(!0),f(D,null,E(o(k),e=>(x(),f("tr",{key:e.id},[s("td",null,i(e.owner.username),1),s("td",null,i(e.tipsters.map(b=>b.username).join(", ")),1),s("td",null,i(U(e)),1),s("td",null,i(e.discountScope==="margin"?"B2I margin":"Total"),1),s("td",null,i(new Date(e.expiresAt).toLocaleString()),1),s("td",null,i(e.subscriptionStatus??"-"),1),s("td",X,[n(o(R),{"button-type":"button",size:"sm",onClick:b=>F(e)},{default:_(()=>[...t[3]||(t[3]=[z(" Copy link ",-1)])]),_:1},8,["onClick"]),n(V,{to:o(P)(`/admin/private-plans/${e.id}`)},{default:_(()=>[n(S,{name:"b2i:arrow_top",class:"rotate-90 size-[15px]"})]),_:1},8,["to"])])]))),128))]),_:1})])}}});export{xe 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.