1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CwfC8RTF.js","./4AsGf7ol.js"])))=>i.map(i=>d[i]); 2import{_ as M}from"./DlAUqK2U.js";import{c as x,o as $,a as t,e as I,F as E,r as z,n as A,k as G,t as b,s as H,h as k,l as L,i as V,Q as S,f as U,b as f,g as _,w as j,y as D,d as O,_ as q,R as Z,x as B}from"./4AsGf7ol.js";import{a as K,_ as Q,b as W,I as J,t as X,P as Y}from"./CzBpKoM-.js";import{_ as ee}from"./C0f72M7E.js";import{u as te,_ as ae}from"./DIM3WZyq.js";const ne={},se={xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none"};function oe(c,o){return $(),x("svg",se,[...o[0]||(o[0]=[t("path",{d:"M6.66699 6.66675H33.3337V31.3334C33.3337 32.438 32.4382 33.3334 31.3337 33.3334H8.66699C7.56242 33.3334 6.66699 32.438 6.66699 31.3334V6.66675Z",stroke:"#515562","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),t("path",{d:"M6.66699 13.3333H33.3337",stroke:"#515562","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),t("path",{d:"M26.667 5V8.33333",stroke:"#515562","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),t("path",{d:"M13.333 5V8.33333",stroke:"#515562","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const le=M(ne,[["render",oe]]),ie={class:"tabs"},re={class:"tabs__list"},ue=["onClick"],ce={class:"tabs__label"},de={key:0,class:"tabs__desc"},_e={class:"tabs__content"},me=I({__name:"Tabs",props:{modelValue:{},tabs:{}},emits:["update:modelValue"],setup(c,{emit:o}){const e=c,s=o;function a(n){n!==e.modelValue&&s("update:modelValue",n)}return(n,l)=>($(),x("div",ie,[t("div",re,[($(!0),x(E,null,z(e.tabs,r=>($(),x("button",{key:r.value,class:A(["tabs__item",{"tabs__item--active":r.value===e.modelValue}]),onClick:u=>a(r.value),type:"button"},[t("span",ce,b(r.label),1),r.description?($(),x("span",de,b(r.description),1)):G("",!0)],10,ue))),128))]),t("div",_e,[H(n.$slots,"default",{activeTab:e.modelValue},void 0,!0)])]))}}),pe=M(me,[["__scopeId","data-v-c781f40e"]]),ve=["aria-label"],he=["aria-label","disabled"],be=["min","max","step","disabled","aria-label","value"],fe=["aria-label","disabled"],ge={class:"slider-track"},xe=["min","max","step","value","disabled","aria-valuenow","aria-valuemin","aria-valuemax","aria-label"],$e=I({__name:"Range",props:{modelValue:{type:Number,required:!0},min:{type:Number,default:0},max:{type:[Number,null],default:null},step:{type:Number,default:1},disabled:{type:Boolean,default:!1},ariaLabel:{type:String,default:"Value slider"}},emits:["update:modelValue","change","input","focus","blur"],setup(c,{emit:o}){const e=c,s=o,a=V({get:()=>e.modelValue,set:i=>{i<e.min&&(i=e.min),e.max!==null&&e.max!==void 0&&i>e.max&&(i=e.max),s("update:modelValue",i),s("input",i)}}),n=k(e.modelValue);L(()=>e.modelValue,i=>{n.value=i});function l(i){let h=Number(i.target.value);isNaN(h)&&(h=e.min),h<e.min&&(h=e.min),n.value=h,s("update:modelValue",h),s("change",h)}function r(){let i=Number(n.value);isNaN(i)&&(i=e.min),i<e.min&&(i=e.min),n.value=i,s("update:modelValue",i),s("change",i)}function u(){e.disabled||a.value>e.min&&(a.value=Math.max(e.min,a.value-e.step),s("change",a.value))}function m(){if(!e.disabled&&(e.max===null||e.max===void 0||a.value<e.max)){let i=a.value+e.step;e.max!==null&&e.max!==void 0&&(i=Math.min(e.max,i)),a.value=i,s("change",a.value)}}function v(i){const h=+i.target.value;a.value=h,s("change",h)}function p(i){s("focus",i)}function d(i){s("blur",i)}return(i,h)=>($(),x("div",{class:"custom-slider","aria-label":c.ariaLabel,role:"group"},[t("button",{class:"slider-btn",type:"button",onClick:u,"aria-label":`ÐменÑиÑи знаÑÐµÐ½Ð½Ñ Ð´Ð¾ ${Math.max(e.min,a.value-e.step)}`,disabled:e.disabled||a.value<=e.min,tabindex:"0"},"â ",8,he),t("input",{class:"slider-value",type:"number",min:e.min,max:e.max!==null&&e.max!==void 0?e.max:void 0,step:e.step,disabled:e.disabled,"aria-live":"polite","aria-atomic":"true","aria-label":`ÐоÑоÑне знаÑеннÑ: ${n.value}`,value:n.value,onInput:l,onBlur:r},null,40,be),t("button",{class:"slider-btn",type:"button",onClick:m,"aria-label":e.max!==null&&e.max!==void 0?`ÐбÑлÑÑиÑи знаÑÐµÐ½Ð½Ñ Ð´Ð¾ ${Math.min(e.max,a.value+e.step)}`:`ÐбÑлÑÑиÑи знаÑÐµÐ½Ð½Ñ Ð½Ð° ${e.step}`,disabled:e.disabled||e.max!==null&&e.max!==void 0&&a.value>=e.max,tabindex:"0"},"+ ",8,fe),t("div",ge,[t("input",{class:"slider-range",type:"range",min:e.min,max:e.max!==null&&e.max!==void 0?e.max:void 0,step:e.step,value:a.value,onInput:v,onFocus:p,onBlur:d,disabled:e.disabled,"aria-valuenow":a.value,"aria-valuemin":e.min,"aria-valuemax":e.max!==null&&e.max!==void 0?e.max:void 0,"aria-label":c.ariaLabel,role:"slider"},null,40,xe)])],8,ve))}}),we=M($e,[["__scopeId","data-v-83d23746"]]),Ce={class:"ranges"},ke={class:"ranges__item"},Ve={class:"ranges__head"},ye={class:"ranges__head--icon --viber"},Me={class:"ranges__item"},Pe={class:"ranges__head"},Ne={class:"ranges__head--icon --telegram"},Ie={class:"ranges__item"},Fe={class:"ranges__head"},Be={class:"ranges__head--icon --whatsapp"},Re=I({__name:"NumbersRange",props:{viber:{default:0},viberModifiers:{},telegram:{default:0},telegramModifiers:{},whatsapp:{default:0},whatsappModifiers:{}},emits:["update:viber","update:telegram","update:whatsapp"],setup(c){const o=S(c,"viber"),e=S(c,"telegram"),s=S(c,"whatsapp"),{t:a}=U();return(n,l)=>{const r=K,u=we,m=Q,v=W;return $(),x("div",Ce,[t("div",ke,[t("div",Ve,[t("div",ye,[f(r)]),t("h5",null,b(_(a)("calculator.viber_count")),1)]),f(u,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=p=>o.value=p),max:20},null,8,["modelValue"])]),t("div",Me,[t("div",Pe,[t("div",Ne,[f(m)]),t("h5",null,b(_(a)("calculator.telegram_count")),1)]),f(u,{modelValue:e.value,"onUpdate:modelValue":l[1]||(l[1]=p=>e.value=p),max:20},null,8,["modelValue"])]),t("div",Ie,[t("div",Fe,[t("div",Be,[f(v)]),t("h5",null,b(_(a)("calculator.whatsapp_count")),1)]),f(u,{modelValue:s.value,"onUpdate:modelValue":l[2]||(l[2]=p=>s.value=p),max:20},null,8,["modelValue"])])])}}}),Le=M(Re,[["__scopeId","data-v-86dcd72d"]]),Te={},Se={xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none"};function Ue(c,o){return $(),x("svg",Se,[...o[0]||(o[0]=[t("path",{d:"M8.3335 5H31.6668V35L29.0795 32.7823C28.3305 32.1403 27.2253 32.1403 26.4764 32.7823L23.8891 35L21.3017 32.7823C20.5528 32.1403
219.4476 32.1403 18.6986 32.7823L16.1113 35L13.524 32.7823C12.775 32.1403 11.6698 32.1403 10.9208 32.7823L8.3335 35V5Z",stroke:"#515562","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),t("path",{d:"M25 11.6667L15 11.6667",stroke:"#515562","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),t("path",{d:"M25 18.3333H15",stroke:"#515562","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),t("path",{d:"M25.0002 25L18.3335 25",stroke:"#515562","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const je=M(Te,[["render",Ue]]);function R(c,o=800){const e=k(0);let s=null;const a=(n,l)=>{s&&cancelAnimationFrame(s);const r=performance.now(),u=l-n,m=v=>{const p=v-r,d=Math.min(p/o,1),i=1-Math.pow(1-d,3);e.value=Number((n+u*i).toFixed(2)),d<1?s=requestAnimationFrame(m):s=null};s=requestAnimationFrame(m)};return L(c,(n,l)=>{a(l||0,n)},{immediate:!0}),{current:e,animate:a}}const Ae={class:"result"},Oe={class:"result__head"},Ee={class:"result__list"},ze={class:"result__chart"},Ge={class:"result__sum"},He=I({__name:"Result",props:{result:{}},setup(c){const o=D(()=>q(()=>import("./CwfC8RTF.js"),__vite__mapDeps([0,1]),import.meta.url).then(w=>w.default)),e=c,s=k(null),{t:a,locale:n}=U(),{toProfile:l}=te(),r=V(()=>Number(e.result.summary.standardPrice)||0),u=V(()=>Number(e.result.benefit.discountPrice)||0),m=V(()=>Number(e.result.totalCost)||0),v=V(()=>Number(e.result.benefit.discountPercent)||0),p=R(r,600),d=R(u,600),i=R(m,600),h=R(v,600),P=V(()=>({chart:{toolbar:{show:!1},animations:{enabled:!0},fontFamily:"Geologica, sans-serif"},labels:[a("calculator.result.discount")],colors:["#931FFF"],legend:{show:!1},stroke:{width:10},plotOptions:{radialBar:{track:{background:"#C485FF",margin:0,width:300,opacity:1},dataLabels:{name:{fontFamily:"Geologica, sans-serif"},value:{fontFamily:"Geologica, sans-serif"}}}}}));L(n,()=>{var w;(w=s.value)==null||w.updateOptions({labels:[a("calculator.result.discount")]})});const g=()=>{window.open(l.value,"_blank")};return(w,F)=>{const y=je,T=ee,C=ae;return $(),x("div",Ae,[t("div",Oe,[f(y),t("p",null,b(_(a)("calculator.result.title")),1)]),t("ul",Ee,[t("li",null,[t("p",null,b(_(a)("calculator.result.standard_price")),1),t("span",null," $"+b(_(p).current.value),1)]),t("li",null,[t("p",null,b(_(a)("calculator.result.discount")),1),t("span",null,b(_(h).current.value)+"% ",1)]),t("li",{class:A({highlight:_(d).current.value})},[t("p",null,b(_(a)("calculator.result.discount_price")),1),t("span",null," $"+b(_(d).current.value),1)],2)]),f(T,null,{default:j(()=>[t("div",ze,[f(_(o),{ref_key:"chartRef",ref:s,type:"radialBar",series:[_(h).current.value],options:_(P),height:"300",width:"300"},null,8,["series","options"])])]),_:1}),t("div",Ge,[t("p",null,b(_(a)("calculator.result.total")),1),t("span",null,"$"+b(_(i).current.value),1)]),f(C,{class:"result__button","icon-end":_(J),onClick:g},{default:j(()=>[O(b(_(a)("calculator.result.connect_btn")),1)]),_:1},8,["icon-end"])])}}}),De=M(He,[["__scopeId","data-v-0a7d7290"]]),{tariffs:qe}=X;function Ze(c){const o=Y.filter(e=>e<=c);return o.length?o[o.length-1]:1}function N(c,o,e){const s=Ze(o);return qe[c][`number${s}`][`month${e}`]||0}function Ke(c,o,e,s){const a=N("viber",1,1),n=N("telegram",1,1),l=N("whatsapp",1,1);return(c*a+o*n+e*l)*s}function Qe(c,o,e,s,a){const n={viber:0,telegram:0,whatsapp:0};return Object.entries(c).forEach(([l,r])=>{if(!r)return;const u=N(l,r,a)*r,m=l.split("+"),v=m.map(d=>N(d,1,a)),p=v.reduce((d,i)=>d+i,0);m.forEach((d,i)=>{const h=v[i]/p*u;n[d]+=h})}),{viber:o?(n.viber/o).toFixed(2):"0.00",telegram:e?(n.telegram/e).toFixed(2):"0.00",whatsapp:s?(n.whatsapp/s).toFixed(2):"0.00"}}function We(){function c(e,s,a){let n=e,l=s,r=a;const u={"whatsapp+viber+telegram":0,"viber+telegram":0,"whatsapp+telegram":0,"whatsapp+viber":0,viber:0,telegram:0,whatsapp:0},m=Math.min(n,l,r);u["whatsapp+viber+telegram"]=m,n-=m,l-=m,r-=m;const v=Math.min(n,l);u["viber+telegram"]=v,n-=v,l-=v;const p=Math.min(r,l);u["whatsapp+telegram"]=p,r-=p,l-=p;const d=Math.min(r,n);return u["whatsapp+viber"]=d,r-=d,n-=d,u.viber=n,u.telegram=l,u.whatsapp=r,u}function o(e){const{viberCount:s,telegramCount:a,whatsappCount:n,months:l}=e,r=c(s,a,n),u=Ke(s,a,n,l);let m=0;Object.entries(r).forEach(([F,y])=>{y>0&&(m+=N(F,y,l)*y*l)});const v=u-m,p=Math.round(v/u*100),d=u.toFixed(2),i=m.toFixed(2),h=v.toFixed(2),P=Qe(r,s,a,n,l),g=`${l} ${l}`,w={viber:`${s} ${s}`,telegram:`${a} ${a}`,whatsapp:`${n} ${n}`};return{summary:{standardPrice:d,monthCountLabel:g,numberCountByMsg:w}
2,benefit:{discountPrice:h,discountPercent:p},priceByMonthCount:P,totalCost:i}}return{calculate:o}}const Je={class:"calculator",id:"calculator"},Xe={class:"container"},Ye={class:"calculator__wrapper"},et={class:"calculator__head"},tt={class:"calculator__title"},at={class:"calculator__subtitle"},nt={class:"calculator__main"},st={class:"calculator__func"},ot={class:"calculator__period"},lt={class:"calculator__period--title"},it={class:"calculator__period--tabs"},rt=I({__name:"index",setup(c){const{t:o}=U(),e=V(()=>[{label:o("calculator.periods.1"),value:1,description:o("calculator.discount",{count:26})},{label:o("calculator.periods.3"),value:3,description:o("calculator.discount",{count:30})},{label:o("calculator.periods.6"),value:6,description:o("calculator.discount",{count:34})},{label:o("calculator.periods.12"),value:12,description:o("calculator.discount",{count:40})}]),s=k(1),{calculate:a}=We(),n=k(0),l=k(0),r=k(0),u=k(1),m=P=>{u.value=P},v=k(a({viberCount:0,telegramCount:0,whatsappCount:0,months:1})),p=V(()=>a({viberCount:n.value,telegramCount:l.value,whatsappCount:r.value,months:u.value}));let d=null;const i=()=>{d&&clearTimeout(d),d=setTimeout(()=>{v.value=p.value},500)};L([n,l,r,u],()=>{i()},{immediate:!1});const h=V(()=>v.value);return Z(()=>{d&&clearTimeout(d)}),(P,g)=>{const w=le,F=pe,y=Le,T=De;return $(),x("section",Je,[t("div",Xe,[t("div",Ye,[t("div",et,[t("h2",tt,b(_(o)("calculator.title")),1),t("h3",at,b(_(o)("calculator.subtitle")),1)]),t("div",nt,[t("div",st,[t("div",ot,[t("h4",lt,[f(w),O(" "+b(_(o)("calculator.period")),1)]),t("div",it,[f(F,{modelValue:_(s),"onUpdate:modelValue":[g[0]||(g[0]=C=>B(s)?s.value=C:null),m],tabs:e.value},null,8,["modelValue","tabs"])])]),f(y,{viber:_(n),"onUpdate:viber":g[1]||(g[1]=C=>B(n)?n.value=C:null),telegram:_(l),"onUpdate:telegram":g[2]||(g[2]=C=>B(l)?l.value=C:null),whatsapp:_(r),"onUpdate:whatsapp":g[3]||(g[3]=C=>B(r)?r.value=C:null)},null,8,["viber","telegram","whatsapp"])]),f(T,{result:h.value},null,8,["result"])])])])])}}}),pt=M(rt,[["__scopeId","data-v-b23301cb"]]);export{pt 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.