PageSourceSearch

https://user.tikhub.io/assets/RpsSettings-DGUYZfhw.js

js tikhub.io collected 2026-10-03 22:55:19 UTC 9,568 bytes, 1 lines download raw bytes

1import{b as te,r as d,j as x,B as h,p as E,q as $,s as G,v as K,H as u,w as ce,D as O,A as Z,E as q,F as Q,K as V,S as ne,h as re,i as le,k as ie,l as de,J,N as _,y as m}from"./index-CjJlg5IG.js";import{D as oe}from"./DashboardLayout-B2C5xjF3.js";import{B as me}from"./badge-CPZdGc_N.js";import{S as M}from"./switch-D2s_u-Iz.js";import{T as pe,a as fe,b as U,c as v,d as he,e as N}from"./table-BBfZrtaJ.js";import{a as ue}from"./typography-hRCJH4ul.js";import{Z as je}from"./zap-DOBZ7qjT.js";import"./shield-UbXs3cOt.js";import"./trash-2-DlkAJqPA.js";import"./chart-column-Dk74aL2Q.js";import"./key-CEk99L9L.js";import"./activity-BVgIeEr9.js";import"./database-bvWrRdVU.js";import"./credit-card-B4lnB-YB.js";import"./crown-CrKt48F8.js";import"./scroll-text-D6yptcfs.js";function r(e,a){const c=y();return r=function(i,f){return i=i-197,c[i]},r(e,a)}(function(e,a){const c=r,i=e();for(;;)try{if(parseInt(c(279))/1*(parseInt(c(270))/2)+parseInt(c(266))/3*(parseInt(c(216))/4)+-parseInt(c(250))/5*(-parseInt(c(287))/6)+parseInt(c(232))/7*(-parseInt(c(221))/8)+parseInt(c(235))/9+-parseInt(c(225))/10+parseInt(c(206))/11*(-parseInt(c(245))/12)===a)break;i.push(i.shift())}catch{i.push(i.shift())}})(y,716195);const _e=(function(){let e=!0;return function(a,c){const i=e?function(){const f=r;if(c){const b=c[f(227)](a,arguments);return c=null,b}}:function(){};return e=!1,i}})(),S=_e(void 0,function(){const e=r;return S[e(261)]()[e(257)](e(244)).toString()[e(243)](S)[e(257)]("(((.+)+)+)+$")});function y(){const e=["purchaseRps","text-lg font-semibold","35KbktCs","text-center space-y-4","rps.currentPlan","type","rps.pricePerMonth","Failed to load RPS data","activate","search","flex justify-between","space-y-4 py-2","destructive","toString","text-destructive","rate_limit_levels","viewRps","rps.duration","54354phWKWB","text-sm text-muted-foreground","success","common.retry","344544DeQVuE","span","text-lg font-bold text-accent","purchase","rps.deactivateDesc","map","rate_multiplier","rps.subtitle","response","3wAfrpG","rps.confirmPurchase","message","status","level","rps.level","enableAutoRenew","default","250050vHBceF","rps.activateDesc","common.inactive","bg-card rounded-lg p-4 space-y-2","rps.autoRenewOffDesc","rps.months","flex justify-between items-center pt-2 border-t","text-center py-4 text-muted-foreground","common.active","rate_limit","disableAutoRenew","div","sm:max-w-md","rps.activateRps","rps.reviewPurchase","386881mBqskx","auto_renew","common.processing","common.success","common.confirm","rps.rateLimit","deactivate","rps.currentRps","mt-2 text-muted-foreground","font-medium","164iuYsZj","activateRps","rps.disableAutoRenew","common.cancel","text-sm font-medium","6562696uqfKdB","rate_limit_expiry","data","N/A","5439240AQAJdu","rps.enableAutoRenew","apply","rps.title","common.select","w-full mt-1","common.status","7GpELsB","No active RPS subscription","flex items-center justify-center py-8","5078232UQeGkx","common.loading","getLevels","common.error","plan","text-sm","rps.month","space-y-6","constructor","(((.+)+)+)+$","12ZGUPoP","is_rate_limit_active","price"];return y=function(){return e},y()}S();function Fe(){const e=r,{t:a}=te(),[c,i]=d.useState(null),[f,b]=d.useState([]),[W,z]=d.useState([1]),[C,R]=d.useState(!0),[D,k]=d.useState(!0),[I,w]=d.useState(null),[A,P]=d.useState(!1),[T,B]=d.useState(!1),[n,o]=d.useState(null),[g,F]=d.useState(1),j=async()=>{const s=r;try{R(!0),w(null);const t=await _[s(264)]();t[s(282)]==="success"&&(i(t[s(223)]),P(t.data[s(207)]||!1))}catch(t){w(t[s(278)]?.data?.[s(281)]||s(255)),m({title:t[s(278)]?.[s(223)]?.message||a(s(238)),variant:s(260)})}finally{R(!1)}},H=async()=>{const s=r;try{k(!0);const t=await _[s(237)]();t[s(282)]===s(268)&&(b(t.data[s(263)]||[]),z(t[s(223)].months||[1]))}catch(t){w(t.response?.data?.[s(281)]||"Failed to load RPS levels")}finally{k(!1)}};d.useEffect(()=>{j(),H()},[]);const Y=s=>{const t=r;if(!c?.[t(276)]||c[t(276)]<=1){m({title:a(t(238)),description:t(233),variant:t(260)});return}o({type:t(s?285:201)})},L=async s=>{const t=r;try{const l=await _.toggleAutoRenew({auto_renew:s});l[t(282)]===t(268)&&(P(s),m({title:l[t(281)]||a(t(209))}),j())}catch(l){m({title:l[t(278)]?.data?.[t(281)]||a(t(238)),variant:t(260)})}finally{o(null)}},X=s=>{const t=r;o({type:t(s?256:212)})},ee=async()=>{const s=r,t=n?.[s(253)]===s(256);try{const l=await _[s(217)]({is_rate_limit_active:t});l[s(282)]===s(268)&&(m({title:l[s(281)]||a(s(209))}),j())}catch(l){m({title:l.response?.data?.[s(281)]||a(s(238)),variant:s(260)})}finally{o(null)}},xe=s=>{const t=r;F(1),o({type:t(273),plan:s})},se=async s=>{const t=r;try{B(!0);const l=await _[t(248)]({rps:s[t(283)]*10,months:g,price:parseFloat(s[t(247)])*g});l.status===t(268)&&(m({title:l[t(281)]||a(t(209))}),j())}catch(l){m({title:l[t(278)]?.[t(223)]?.[t(281)]||a(t(238)),variant:t(260)})}finally{B(!1),o(null)}},p=n?.[e(239)],ae=p?(parseFloat(p[e(247)])*g).toFixed(2):"0.00";return x.jsx(oe,{children:x.jsxs(e(202),{className:e(242),children:[x.jsxs("div",{children:[x.jsx(ue,{children:a(e(228))}),x.jsx("p",{className:e(214),children:a(e(277))})]}),I&&!C&&!D&&x.jsx(e(202),{className:e(234),children:x.jsxs("div",{className:e(251),children:[x.jsx("p",{className:e(262),children:I}),x.jsx(h,{onClick:()=>{j(),H()},children:a(e(269))})]})}),x.jsxs(E,{children:[x.jsx($,{children:x.jsxs(G,{className:"flex items-center gap-2",children:[x.jsx(je,{className:"h-5 w-5"}),a(e(252))]})}),x.jsx(K,{children:C?x.jsx("div",{className:e(198),children:a(e(236))}
1):x.jsxs(e(202),{className:"grid grid-cols-2 md:grid-cols-5 gap-4",children:[x.jsxs("div",{children:[x.jsx(u,{className:e(267),children:a(e(213))}),x.jsxs("p",{className:"text-lg font-semibold",children:[c?.[e(276)]?c[e(276)]*10:10,"/s"]})]}),x.jsxs("div",{children:[x.jsx(u,{className:e(267),children:a(e(284))}),x.jsxs("p",{className:e(249),children:[a(e(284))," ",c?.[e(276)]||1]})]}),x.jsxs("div",{children:[x.jsx(u,{className:"text-sm text-muted-foreground",children:a("rps.expiry")}),x.jsx("p",{className:e(249),children:c?.[e(222)]?c.rate_limit_expiry.split("T")[0]:e(224)})]}),x.jsxs("div",{children:[x.jsx(u,{className:e(267),children:a(e(231))}),x.jsxs(e(202),{className:"flex items-center gap-2 mt-1",children:[x.jsx(M,{checked:c?.[e(246)]??!0,onCheckedChange:X}),x.jsx(e(271),{className:e(240),children:c?.is_rate_limit_active?a(e(199)):a(e(289))})]})]}),x.jsxs(e(202),{children:[x.jsx(u,{className:e(267),children:a("rps.autoRenew")}),x.jsxs(e(202),{className:"flex items-center gap-2 mt-1",children:[x.jsx(M,{checked:A,onCheckedChange:Y,disabled:!c?.[e(276)]||c[e(276)]<=1}),x.jsx(e(271),{className:"text-sm",children:a(A?"common.enabled":"common.disabled")})]})]})]})})]}),x.jsxs(E,{children:[x.jsxs($,{children:[x.jsx(G,{children:a("rps.availablePlans")}),x.jsx(ce,{children:a("rps.availablePlansDesc")})]}),x.jsx(K,{children:D?x.jsx(e(202),{className:e(198),children:a(e(236))}):x.jsxs(pe,{children:[x.jsx(fe,{children:x.jsxs(U,{children:[x.jsx(v,{children:a(e(284))}),x.jsx(v,{children:a("rps.rateLimit")}),x.jsx(v,{children:a("rps.pricePerMonth")}),x.jsx(v,{})]})}),x.jsx(he,{children:f[e(275)](s=>x.jsxs(U,{children:[x.jsx(N,{children:x.jsxs(me,{children:[a(e(284))," ",s[e(283)]]})}),x.jsxs(N,{children:[s[e(200)],"/s"]}),x.jsxs(N,{children:["$",s[e(247)]]}),x.jsx(N,{children:x.jsx(h,{size:"sm",onClick:()=>xe(s),children:a(e(229))})})]},s.id||s[e(283)]))})]})})]}),x.jsx(O,{open:n?.[e(253)]===e(273),onOpenChange:s=>{s||o(null)},children:x.jsxs(Z,{className:e(203),children:[x.jsxs(q,{children:[x.jsx(Q,{children:a(e(280))}),x.jsx(V,{children:a(e(205))})]}),p&&x.jsxs(e(202),{className:e(259),children:[x.jsxs(e(202),{className:e(290),children:[x.jsxs(e(202),{className:e(258),children:[x.jsx("span",{className:"text-sm text-muted-foreground",children:a("rps.level")}),x.jsxs("span",{className:e(215),children:[a(e(284))," ",p[e(283)]]})]}),x.jsxs("div",{className:e(258),children:[x.jsx("span",{className:e(267),children:a(e(211))}),x.jsxs(e(271),{className:e(215),children:[p[e(200)],"/s"]})]}),x.jsxs(e(202),{className:e(258),children:[x.jsx(e(271),{className:e(267),children:a(e(254))}),x.jsxs(e(271),{className:"font-medium",children:["$",p[e(247)]]})]})]}),x.jsxs(e(202),{children:[x.jsx(u,{className:e(220),children:a(e(265))}),x.jsxs(ne,{value:String(g),onValueChange:s=>F(Number(s)),children:[x.jsx(re,{className:e(230),children:x.jsx(le,{})}),x.jsx(ie,{children:W[e(275)](s=>x.jsxs(de,{value:String(s),children:[s," ",a(e(s===1?241:292))]},s))})]})]}),x.jsxs(e(202),{className:e(197),children:[x.jsx(e(271),{className:e(220),children:a("common.total")}),x.jsxs(e(271),{className:e(272),children:["$",ae]})]})]}),x.jsxs(J,{children:[x.jsx(h,{variant:"outline",onClick:()=>o(null),children:a("common.cancel")}),x.jsx(h,{disabled:T,onClick:()=>se(p),children:a(e(T?208:210))})]})]})}),x.jsx(O,{open:!!n&&n[e(253)]!==e(273),onOpenChange:s=>{s||o(null)},children:x.jsxs(Z,{children:[x.jsxs(q,{children:[x.jsxs(Q,{children:[n?.type===e(285)&&a(e(226)),n?.[e(253)]==="disableAutoRenew"&&a(e(218)),n?.type===e(256)&&a(e(204)),n?.[e(253)]===e(212)&&a("rps.deactivateRps")]}),x.jsxs(V,{children:[n?.[e(253)]===e(285)&&a("rps.autoRenewOnDesc"),n?.[e(253)]===e(201)&&a(e(291)),n?.[e(253)]===e(256)&&a(e(288)),n?.[e(253)]===e(212)&&a(e(274))]})]}),x.jsxs(J,{children:[x.jsx(h,{variant:"outline",onClick:()=>o(null),children:a(e(219))}),x.jsx(h,{variant:n?.[e(253)]===e(201)||n?.[e(253)]===e(212)?e(260):e(286),onClick:()=>{const s=r;n?.type===s(285)?L(!0):n?.[s(253)]===s(201)?L(!1):ee()},children:a("common.confirm")})]})]})})]})})}export{Fe 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.