1import{r as d,j as o,u as D,e as me,K as fe,a0 as pe,a9 as ge,aa as be,ab as he,ad as A,ac as Se,a1 as xe}from"./account-selector.js";import{z as ve,A as we,B as ye,C as P,D as B,E as je,G as X,H as Ce,I as Ee,L as $}from"./accounting-orders-table.js";var W=["PageUp","PageDown"],q=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],J={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[H,Re,Pe]=ye(M),[Q]=we(M,[Pe]),[De,k]=Q(M),Z=d.forwardRef((e,n)=>{const{name:r,min:t=0,max:a=100,step:c=1,orientation:s="horizontal",disabled:i=!1,minStepsBetweenThumbs:m=0,defaultValue:x=[t],value:b,onValueChange:l=()=>{},onValueCommit:u=()=>{},inverted:S=!1,form:y,...h}=e,p=d.useRef(new Set),f=d.useRef(0),v=s==="horizontal"?Me:Ne,[g=[],N]=ve({prop:b,defaultProp:x,onChange:w=>{[...p.current][f.current]?.focus(),l(w)}}),I=d.useRef(g);function K(w){const j=ke(g,w);_(w,j)}function de(w){_(w,f.current)}function ue(){const w=I.current[f.current];g[f.current]!==w&&u(g)}function _(w,j,{commit:T}={commit:!1}){const F=Ve(c),V=He(Math.round((w-t)/c)*c+t,F),z=X(V,[t,a]);N((R=[])=>{const C=Ae(R,z,j);if(Te(C,m*c)){f.current=C.indexOf(z);const G=String(C)!==String(R);return G&&T&&u(C),G?C:R}else return R})}return o.jsx(De,{scope:e.__scopeSlider,name:r,disabled:i,min:t,max:a,valueIndexToChangeRef:f,thumbs:p.current,values:g,orientation:s,form:y,children:o.jsx(H.Provider,{scope:e.__scopeSlider,children:o.jsx(H.Slot,{scope:e.__scopeSlider,children:o.jsx(v,{"aria-disabled":i,"data-disabled":i?"":void 0,...h,ref:n,onPointerDown:P(h.onPointerDown,()=>{i||(I.current=g)}),min:t,max:a,inverted:S,onSlideStart:i?void 0:K,onSlideMove:i?void 0:de,onSlideEnd:i?void 0:ue,onHomeKeyDown:()=>!i&&_(t,0,{commit:!0}),onEndKeyDown:()=>!i&&_(a,g.length-1,{commit:!0}),onStepKeyDown:({event:w,direction:j})=>{if(!i){const V=W.includes(w.key)||w.shiftKey&&q.includes(w.key)?10:1,z=f.current,R=g[z],C=c*V*j;_(R+C,z,{commit:!0})}}})})})})});Z.displayName=M;var[ee,ne]=Q(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Me=d.forwardRef((e,n)=>{const{min:r,max:t,dir:a,inverted:c,onSlideStart:s,onSlideMove:i,onSlideEnd:m,onStepKeyDown:x,...b}=e,[l,u]=d.useState(null),S=D(n,v=>u(v)),y=d.useRef(void 0),h=je(a),p=h==="ltr",f=p&&!c||!p&&c;function E(v){const g=y.current||l.getBoundingClientRect(),N=[0,g.width],K=Y(N,f?[r,t]:[t,r]);return y.current=g,K(v-g.left)}return o.jsx(ee,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:o.jsx(te,{dir:h,"data-orientation":"horizontal",...b,ref:S,style:{...b.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:v=>{const g=E(v.clientX);s?.(g)},onSlideMove:v=>{const g=E(v.clientX);i?.(g)},onSlideEnd:()=>{y.current=void 0,m?.()},onStepKeyDown:v=>{const N=J[f?"from-left":"from-right"].includes(v.key);x?.({event:v,direction:N?-1:1})}})})}),Ne=d.forwardRef((e,n)=>{const{min:r,max:t,inverted:a,onSlideStart:c,onSlideMove:s,onSlideEnd:i,onStepKeyDown:m,...x}=e,b=d.useRef(null),l=D(n,b),u=d.useRef(void 0),S=!a;function y(h){const p=u.current||b.current.getBoundingClientRect(),f=[0,p.height],v=Y(f,S?[t,r]:[r,t]);return u.current=p,v(h-p.top)}return o.jsx(ee,{scope:e.__scopeSlider,startEdge:S?"bottom":"top",endEdge:S?"top":"bottom",size:"height",direction:S?1:-1,children:o.jsx(te,{"data-orientation":"vertical",...x,ref:l,style:{...x.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:h=>{const p=y(h.clientY);c?.(p)},onSlideMove:h=>{const p=y(h.clientY);s?.(p)},onSlideEnd:()=>{u.current=void 0,i?.()},onStepKeyDown:h=>{const f=J[S?"from-bottom":"from-top"].includes(h.key);m?.({event:h,direction:f?-1:1})}})})}),te=d.forwardRef((e,n)=>{const{__scopeSlider:r,onSlideStart:t,onSlideMove:a,onSlideEnd:c,onHomeKeyDown:s,onEndKeyDown:i,onStepKeyDown:m,...x}=e,b=k(M,r);return o.jsx(B.span,{...x,ref:n,onKeyDown:P(e.onKeyDown,l=>{l.key==="Home"?(s(l),l.preventDefault()):l.key==="End"?(i(l),l.preventDefault()):W.concat(q).includes(l.key)&&
1(m(l),l.preventDefault())}),onPointerDown:P(e.onPointerDown,l=>{const u=l.target;u.setPointerCapture(l.pointerId),l.preventDefault(),b.thumbs.has(u)?u.focus():t(l)}),onPointerMove:P(e.onPointerMove,l=>{l.target.hasPointerCapture(l.pointerId)&&a(l)}),onPointerUp:P(e.onPointerUp,l=>{const u=l.target;u.hasPointerCapture(l.pointerId)&&(u.releasePointerCapture(l.pointerId),c(l))})})}),oe="SliderTrack",re=d.forwardRef((e,n)=>{const{__scopeSlider:r,...t}=e,a=k(oe,r);return o.jsx(B.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...t,ref:n})});re.displayName=oe;var O="SliderRange",se=d.forwardRef((e,n)=>{const{__scopeSlider:r,...t}=e,a=k(O,r),c=ne(O,r),s=d.useRef(null),i=D(n,s),m=a.values.length,x=a.values.map(u=>le(u,a.min,a.max)),b=m>1?Math.min(...x):0,l=100-Math.max(...x);return o.jsx(B.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...t,ref:i,style:{...e.style,[c.startEdge]:b+"%",[c.endEdge]:l+"%"}})});se.displayName=O;var L="SliderThumb",ae=d.forwardRef((e,n)=>{const r=Re(e.__scopeSlider),[t,a]=d.useState(null),c=D(n,i=>a(i)),s=d.useMemo(()=>t?r().findIndex(i=>i.ref.current===t):-1,[r,t]);return o.jsx(_e,{...e,ref:c,index:s})}),_e=d.forwardRef((e,n)=>{const{__scopeSlider:r,index:t,name:a,...c}=e,s=k(L,r),i=ne(L,r),[m,x]=d.useState(null),b=D(n,E=>x(E)),l=m?s.form||!!m.closest("form"):!0,u=Ce(m),S=s.values[t],y=S===void 0?0:le(S,s.min,s.max),h=Be(t,s.values.length),p=u?.[i.size],f=p?Ie(p,y,i.direction):0;return d.useEffect(()=>{if(m)return s.thumbs.add(m),()=>{s.thumbs.delete(m)}},[m,s.thumbs]),o.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[i.startEdge]:`calc(${y}% + ${f}px)`},children:[o.jsx(H.ItemSlot,{scope:e.__scopeSlider,children:o.jsx(B.span,{role:"slider","aria-label":e["aria-label"]||h,"aria-valuemin":s.min,"aria-valuenow":S,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...c,ref:b,style:S===void 0?{display:"none"}:e.style,onFocus:P(e.onFocus,()=>{s.valueIndexToChangeRef.current=t})})}),l&&o.jsx(ie,{name:a??(s.name?s.name+(s.values.length>1?"[]":""):void 0),form:s.form,value:S},t)]})});ae.displayName=L;var ze="RadioBubbleInput",ie=d.forwardRef(({__scopeSlider:e,value:n,...r},t)=>{const a=d.useRef(null),c=D(a,t),s=Ee(n);return d.useEffect(()=>{const i=a.current;if(!i)return;const m=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(m,"value").set;if(s!==n&&b){const l=new Event("input",{bubbles:!0});b.call(i,n),i.dispatchEvent(l)}},[s,n]),o.jsx(B.input,{style:{display:"none"},...r,ref:c,defaultValue:n})});ie.displayName=ze;function Ae(e=[],n,r){const t=[...e];return t[r]=n,t.sort((a,c)=>a-c)}function le(e,n,r){const c=100/(r-n)*(e-n);return X(c,[0,100])}function Be(e,n){return n>2?`Value ${e+1} of ${n}`:n===2?["Minimum","Maximum"][e]:void 0}function ke(e,n){if(e.length===1)return 0;const r=e.map(a=>Math.abs(a-n)),t=Math.min(...r);return r.indexOf(t)}function Ie(e,n,r){const t=e/2,c=Y([0,50],[0,t]);return(t-c(n)*r)*r}function Ke(e){return e.slice(0,-1).map((n,r)=>e[r+1]-n)}function Te(e,n){if(n>0){const r=Ke(e);return Math.min(...r)>=n}return!0}function Y(e,n){return r=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const t=(n[1]-n[0])/(e[1]-e[0]);return n[0]+t*(r-e[0])}}function Ve(e){return(String(e).split(".")[1]||"").length}function He(e,n){const r=Math.pow(10,n);return Math.round(e*r)/r}var ce=Z,Oe=re,Le=se,Ue=ae;const U=d.forwardRef(({className:e,value:n,defaultValue:r,...t},a)=>{const c=(n??r??[0]).length;return o.jsxs(ce,{ref:a,value:n,defaultValue:r,className:me("relative flex w-full touch-none select-none items-center",e),...t,children:[o.jsx(Oe,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:o.jsx(Le,{className:"absolute h-full bg-primary"})}),Array.from({length:c}).map((s,i)=>o.jsx(Ue,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},i))]})});U.displayName=ce.displayName;const Ye={"calculate-your-potential-earnings":"Calculate Your Potential Earnings","number-of-referrals":"Number of Referrals","subscription-duration":"Subscription Duration (Months)","your-estimated-earnings":"Your Estimated Earnings","based-on-an-average":"Based on an average subscription value of â¬13.99 and 20% commission rate"},Fe={"calculate-your-potential-earnings":"Calculez vos gains potentiels","number-of-referrals":"Nombre de parrainages","subscription-duration":"Durée de lâabonnement (mois)","your-estimated-earnings":"Vos gains estimés","based-on-an-average":"Basé sur une valeur dâabonnement moyenne de 13,99 ⬠et un taux de commission de 20%"},Ge={"calculate-your-potential-earnings":"Calcula tus ganancias potenciales","number-of-referrals":"Número de referidos","
1subscription-duration":"Duración de la suscripción (meses)","your-estimated-earnings":"Tus ganancias estimadas","based-on-an-average":"Basado en un valor de suscripción promedio de 13,99 ⬠y una tasa de comisión del 20%"},$e={"calculate-your-potential-earnings":"Calcola i tuoi guadagni potenziali","number-of-referrals":"Numero di referenze","subscription-duration":"Durata dellâabbonamento (mesi)","your-estimated-earnings":"I tuoi guadagni stimati","based-on-an-average":"Basato su un valore medio di abbonamento di 13,99 ⬠e una commissione del 20%"},Xe={"calculate-your-potential-earnings":"Calcule seus ganhos potenciais","number-of-referrals":"Número de indicações","subscription-duration":"Duração da assinatura (meses)","your-estimated-earnings":"Seus ganhos estimados","based-on-an-average":"Com base em um valor médio de assinatura de â¬13,99 e uma taxa de comissão de 20%"},We={"calculate-your-potential-earnings":"Bereken uw potentiële inkomsten","number-of-referrals":"Aantal verwijzingen","subscription-duration":"Abonnementsduur (maanden)","your-estimated-earnings":"Uw geschatte inkomsten","based-on-an-average":"Gebaseerd op een gemiddelde abonnementswaarde van â¬13,99 en een commissiepercentage van 20%"},qe={"calculate-your-potential-earnings":"Oblicz swoje potencjalne zarobki","number-of-referrals":"Liczba poleceÅ","subscription-duration":"Czas trwania subskrypcji (miesiÄ
ce)","your-estimated-earnings":"Twoje szacowane zarobki","based-on-an-average":"Na podstawie Åredniej wartoÅci subskrypcji 13,99 ⬠i 20% stawki prowizji"},Je={"calculate-your-potential-earnings":"Berechnen Sie Ihr potenzielles Einkommen","number-of-referrals":"Anzahl der Empfehlungen","subscription-duration":"Abonnementdauer (Monate)","your-estimated-earnings":"Ihr geschätztes Einkommen","based-on-an-average":"Basierend auf einem durchschnittlichen Abonnementwert von 13,99 ⬠und einer 20%igen Provision"},Qe=fe({en:Ye,fr:Fe,es:Ge,it:$e,pt:Xe,nl:We,pl:qe,de:Je}),Ze=({locale:e})=>{const[n,r]=d.useState(10),[t,a]=d.useState(3),c=n*13.99*t*.2,s=Qe(e);return o.jsx(pe,{messages:s,locale:e,children:o.jsxs(ge,{className:"mx-auto w-full max-w-xl mb-12 bg-muted",children:[o.jsx(be,{children:o.jsx(he,{className:"text-3xl text-center",children:o.jsx(A,{id:"calculate-your-potential-earnings",defaultMessage:"Calculate Your Potential Earnings"})})}),o.jsxs(Se,{children:[o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs($,{className:"flex justify-between",children:[o.jsx("span",{children:o.jsx(A,{id:"number-of-referrals",defaultMessage:"Number of Referrals"})}),o.jsx("span",{children:n})]}),o.jsx(U,{value:[n],onValueChange:([i])=>r(i),min:1,max:100,step:1})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs($,{className:"flex justify-between",children:[o.jsx("span",{children:o.jsx(A,{id:"subscription-duration",defaultMessage:"Subscription Duration (Months)"})}),o.jsx("span",{children:t})]}),o.jsx(U,{value:[t],onValueChange:([i])=>a(i),min:1,max:12,step:1})]})]}),o.jsxs("div",{className:"mt-6 text-center",children:[o.jsx("p",{className:"text-lg mb-2",children:o.jsx(A,{id:"your-estimated-earnings",defaultMessage:"Your Estimated Earnings"})}),o.jsx("p",{className:"text-4xl font-bold",children:o.jsx(xe,{value:c,style:"currency",currency:"EUR"})}),o.jsx("p",{className:"text-sm mt-2 text-muted-foreground",children:o.jsx(A,{id:"based-on-an-average",defaultMessage:"Based on an average subscription value of â¬12.99 and 20% commission rate"})})]})]})]})})},tn=Object.freeze(Object.defineProperty({__proto__:null,default:Ze},Symbol.toStringTag,{value:"Module"}));export{ce as R,U as S,Oe as T,Le as a,Ue as b,tn as i};
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.