PageSourceSearch

https://app.wallstreet.io/chunk-4EMPEHY7.js

js wallstreet.io collected 2026-09-24 13:36:09 UTC 15,132 bytes, 3 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0d02e-bd7d-7121-8335-4588129476c8")}catch(e){}}();import{$ as O,Ad as S,Db as b,Dd as w,L as a,Oa as P,Pa as e,Qa as c,Qd as f,R as _,Ra as x,Rb as v,Sb as k,Ud as T,V as h,W as C,e as u,ic as y,na as m,oa as n,pa as t,tc as E,za as p}from"./chunk-MGWJEQIP.js";import"./chunk-IQNHE7HV.js";import"./chunk-ALKJ4AUH.js";function I(l,M){if(l&1&&(n(0,"div")(1,"span",30),e(2),t(),n(3,"span",31),e(4),t(),n(5,"span",32),e(6),t(),n(7,"span",33),e(8),t()()),l&2){let i=M.$implicit;P("log-entry "+i.cssClass),a(2),c(i.time),a(2),c(i.status),a(2),c(i.level),a(2),c(i.message)}}function F(l,M){l&1&&(n(0,"div",34),e(1," No requests yet. Hit a button above to start testing. "),t())}var D=(()=>{class l{constructor(i,r){this.http=i,this.cd=r,this.apiUrl=`${T.api_base_url}/throttle-test/ping`,this.subs=[],this.aborted=!1,this.log=[],this.running=!1,this.sent=0,this.ok=0,this.warned=0,this.throttled=0,this.locked=0,this.failed=0}sendSingle(){this.resetCounters(),this.fireRequests(1,0,!1)}sendRouteBurst(){this.resetCounters(),this.fireRequests(40,30,!1)}sendGlobalFlood(){this.resetCounters(),this.fireRequests(500,10,!0)}startInfiniteLoop(){this.resetCounters(),this.running=!0,this.aborted=!1,this.loopTimer=setInterval(()=>{if(this.aborted){this.stopInfiniteLoop();return}this.doRequest(this.apiUrl)},50)}stopInfiniteLoop(){this.loopTimer&&(clearInterval(this.loopTimer),this.loopTimer=null),this.running=!1,this.aborted=!0,this.cd.markForCheck()}clearLog(){this.log=[],this.resetCounters(),this.cd.markForCheck()}trackByIndex(i){return i}ngOnDestroy(){this.stopInfiniteLoop(),this.subs.forEach(i=>i.unsubscribe())}resetCounters(){this.sent=0,this.ok=0,this.warned=0,this.throttled=0,this.locked=0,this.failed=0,this.aborted=!1}fireRequests(i,r,o){this.running=!0,this.aborted=!1;let s=0,d=()=>{if(s>=i||this.aborted){this.running=!1,this.cd.markForCheck();return}let g=o?`${this.apiUrl}?noise=${s}`:this.apiUrl;this.doRequest(g),s++,r>0?setTimeout(d,r):Promise.resolve().then(d)};d()}doRequest(i){this.sent++;let r=this.http.get(i).subscribe({next:()=>{this.ok++,this.addLog(200,"ok","Request succeeded")},error:o=>{let s=o.status||0,d=o.error?.level||"unknown",g=o.error?.error||o.message||"Unknown error";switch(d){case"warning":this.warned++;break;case"throttle":this.throttled++;break;case"lockout":this.locked++,this.aborted=!0;break;default:this.failed++}this.addLog(s,d,g)}});this.subs.push(r)}addLog(i,r,o){let s=new Date,d=s.toLocaleTimeString("en-US",{hour12:!1})+"."+String(s.getMilliseconds()).padStart(3,"0"),g="log-ok";r==="warning"?g="log-warning":r==="throttle"?g="log-throttle":r==="lockout"?g="log-lockout":i!==200&&(g="log-error"),this.log.length>200&&(this.log=this.log.slice(-100)),this.log.push({time:d,status:i,level:r,message:o,cssClass:g}),this.cd.markForCheck()}static{this.\u0275fac=function(r){return new(r||l)(_(E),_(b))}}static{this.\u0275cmp=h({type:l,selectors:[["ws-dev-rate-limit-test"]],standalone:!1,decls:100,vars:15,consts:[["logScroll",""],[1,"rate-limit-test"],[1,"header"],[1,"subtitle"],[1,"controls"],[1,"button-group"],["mat-raised-button","","color","primary",3,"click","disabled"],["mat-raised-button","","color","accent",3,"click","disabled"],["mat-raised-button","","color","warn",3,"click","disabled"],["mat-raised-button","",1,"danger-btn",3,"click","disabled"],["mat-raised-button","",3,"click","disabled"],["mat-raised-button","",3,"click"],[1,"stats"],[1,"stat"],[1,"stat-label"],[1,"stat-value"],[1,"stat","stat-ok"],[1,"stat","stat-warning"],[1,"stat","stat-throttle"],[1,"stat","stat-lockout"],[1,"stat","stat-error"],[1,"log-container"],[1,"log-count"],[1,"log-scroll"],[3,"class",4,"ngFor","ngForOf","ngForTrackBy"],["class","log-empty",4,"ngIf"],[1,"info-box"],[1,"badge","badge-warning"],[1,"badge","badge-throttle"],[1,"badge","badge-lockout"],[1,"log-time"],[1,"log-status"],[1,"log-level"],[1,"log-message"],[1,"log-empty"]],template:function(r,o){r&1&&(n(0,"div",1)(1,"div",2)(2,"h1"),e(3,"\u{1F9EA} Rate Limit Tester"),t(),n(4,"p",3),e(5,"Temporary dev tool \u2014 fires requests to test AdaptiveThrottleMiddleware escalation."),t()(),n(6,"div",4)(7,"div",5)(8,"h3"),e(9,"Test Scenarios"),t(),n(10,"button",6),p("click",function(){return o.sendSingle()}),e(11," \u{1F3D3} Single Ping "),t(),n(12,"button",7),p("click",function(){return o.sendRouteBurst()}),e(13," \u26A1 Route Burst (40 rapid hits, same endpoint) "),t(),n(14,"button",8),p("click",function(){return o.sendGlobalFlood()}),e(15," \u{1F30A} Global Flood (500 requests) "),t(),n(16,"button",9),p("click",function(){return o.startInfiniteLoop()}),e(17," \u267E\uFE0F Infinite Loop (50ms interval) "),t()(),n(18,"div",5)(19,"h3"),e(20,"Controls"),t(),n(21,"button",10),p("click",function(){return o.stopInfiniteLoop()}),e(22," \u23F9\uFE0F Stop "),t(),n(23,"button",11),p("click",function(){return o.clearLog()}),e(24," \u{1F5D1}\uFE0F Clear Log "),t()()(),n(25,"div",12)(26,"div",13)(27,"span",14),e(28,"Sent"),t(),n(29,"span",15),e(30),t()(),n(31,"div",16)(32,"span",14),e(33,"OK (200)"),t(),n(34,"span",15),e(35),t()(),n(36,"div",17)(37,"span",14),e(38,"Warning"),t(),n(39,"span",15),e(40),t()(),n(41,"div",18)(42,"span",14),e(43,"Throttled"),t(),n(44,"span",15),e(45),t()(),n(46,"div",19)(47,"span",14),e(48,"Lockout"),t(),n(49,"span",15),e(50),t()(),n(51,"div",20)(52,"span",14),e(53,"Other Errors"),t(),n(54,"span",15),e(55),t()()(),n(56,"div",21)(57,"h3"),e(58,"Response Log "),n(59,"span",22),e(60),t()(),n(61,"div",23,0),O(63,I,9,6,"div",24)(64,F,2,0,"div",25),t()(),n(65,"div",26)(66,"h3"),e(67,"How it works"),t(),n(68,"ul")(69,"li")(70,"strong"),e(71,"Single Ping"),t(),e(72," \u2014 Should always succeed. Baseline sanity check."),t(),n(73,"li")(74,"strong"),e(75,"Route Burst"),t(),e(76," \u2014 40 hits to the same endpoint in ~1.2s. Triggers per-route detection (limit: 25/10s)."),t(),n(77,"li")(78,"strong"),e(79,"Global Flood"),t(),e(80," \u2014 500 requests with varied query strings. Triggers global detection (limit: 450/60s)."),t(),n(81,"li")(82,"strong"),e(83,"Infinite Loop"),t(),e(84," \u2014 Fires every 50ms until stopped or locked out. Simulates a real bug."),t()(),n(85,"h3"),e(86,"Expected escalation"),t(),n(87,"ul")(88,"li")(89,"
1span",27),e(90,"warning"),t(),e(91," Violations 1\u20135 \u2192 429 + Retry-After: 2s (interceptor retries once)"),t(),n(92,"li")(93,"span",28),e(94,"throttle"),t(),e(95," Violations 6\u201315 \u2192 429 + Retry-After: 10\u201330s (user told to wait)"),t(),n(96,"li")(97,"span",29),e(98,"lockout"),t(),e(99," Violations 16+ \u2192 429 + token revoked \u2192 logout"),t()()()()),r&2&&(a(10),m("disabled",o.running),a(2),m("disabled",o.running),a(2),m("disabled",o.running),a(2),m("disabled",o.running),a(5),m("disabled",!o.running),a(9),c(o.sent),a(5),c(o.ok),a(5),c(o.warned),a(5),c(o.throttled),a(5),c(o.locked),a(5),c(o.failed),a(5),x("(",o.log.length,")"),a(3),m("ngForOf",o.log)("ngForTrackBy",o.trackByIndex),a(),m("ngIf",o.log.length===0))},dependencies:[v,k,S],styles:["[_nghost-%COMP%]{display:block;padding:32px;max-width:960px;margin:0 auto;font-family:Roboto,sans-serif;color:#e0e0e0}.rate-limit-test[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{margin-bottom:32px}.rate-limit-test[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:28px;font-weight:500;margin:0 0 8px;color:#fff}.rate-limit-test[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{color:#999;font-size:14px;margin:0}.rate-limit-test[_ngcontent-%COMP%]   .controls[_ngcontent-%COMP%]{display:flex;gap:32px;margin-bottom:24px;flex-wrap:wrap}.rate-limit-test[_ngcontent-%COMP%]   .controls[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:13px;text-transform:uppercase;letter-spacing:.5px;color:#888;margin:0 0 12px}.rate-limit-test[_ngcontent-%COMP%]   .controls[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.rate-limit-test[_ngcontent-%COMP%]   .controls[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{text-align:left;min-width:280px;font-size:13px;padding:8px 16px}.rate-limit-test[_ngcontent-%COMP%]   .danger-btn[_ngcontent-%COMP%]{background-color:#b71c1c!important;color:#fff!important}.rate-limit-test[_ngcontent-%COMP%]   .stats[_ngcontent-%COMP%]{display:flex;gap:16px;margin-bottom:24px;flex-wrap:wrap}.rate-limit-test[_ngcontent-%COMP%]   .stats[_ngcontent-%COMP%]   .stat[_ngcontent-%COMP%]{background:#1e1e2e;border:1px solid #333;border-radius:8px;padding:12px 20px;min-width:100px;text-align:center}.rate-limit-test[_ngcontent-%COMP%]   .stats[_ngcontent-%COMP%]   .stat[_ngcontent-%COMP%]   .stat-label[_ngcontent-%COMP%]{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:#888;margin-bottom:4px}.rate-limit-test[_ngcontent-%COMP%]   .stats[_ngcontent-%COMP%]   .stat[_ngcontent-%COMP%]   .stat-value[_ngcontent-%COMP%]{display:block;font-size:24px;font-weight:600;font-variant-numeric:tabular-nums}.rate-limit-test[_ngcontent-%COMP%]   .stats[_ngcontent-%COMP%]   .stat.stat-ok[_ngcontent-%COMP%]   .stat-value[_ngcontent-%COMP%]{color:#4caf50}.rate-limit-test[_ngcontent-%COMP%]   .stats[_ngcontent-%COMP%]   .stat.stat-warning[_ngcontent-%COMP%]   .stat-value[_ngcontent-%COMP%]{color:#ffb74d}.rate-limit-test[_ngcontent-%COMP%]   .stats[_ngcontent-%COMP%]   .stat.stat-throttle[_ngcontent-%COMP%]   .stat-value[_ngcontent-%COMP%]{color:#ff7043}.rate-limit-test[_ngcontent-%COMP%]   .stats[_ngcontent-%COMP%]   .stat.stat-lockout[_ngcontent-%COMP%]   .stat-value[_ngcontent-%COMP%]{color:#ef5350}.rate-limit-test[_ngcontent-%COMP%]   .stats[_ngcontent-%COMP%]   .stat.stat-error[_ngcontent-%COMP%]   .stat-value[_ngcontent-%COMP%]{color:#e57373}.rate-limit-test[_ngcontent-%COMP%]   .log-container[_ngcontent-%COMP%]{margin-bottom:24px}.rate-limit-test[_ngcontent-%COMP%]   .log-container[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:14px;color:#ccc;margin:0 0 8px}.rate-limit-test[_ngcontent-%COMP%]   .log-container[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]   .log-count[_ngcontent-%COMP%]{color:#666;font-weight:400}.rate-limit-test[_ngcontent-%COMP%]   .log-scroll[_ngcontent-%COMP%]{background:#0d0d14;border:1px solid #222;border-radius:8px;max-height:400px;overflow-y:auto;padding:8px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:12px;line-height:1.6}.rate-limit-test[_ngcontent-%COMP%]   .log-entry[_ngcontent-%COMP%]{display:flex;gap:12px;padding:2px 8px;border-radius:4px}.rate-limit-test[_ngcontent-%COMP%]   .log-entry[_ngcontent-%COMP%]:hover{background:#ffffff08}.rate-limit-test[_ngcontent-%COMP%]   .log-entry[_ngcontent-%COMP%]   .log-time[_ng
1content-%COMP%]{color:#555;flex-shrink:0;width:100px}.rate-limit-test[_ngcontent-%COMP%]   .log-entry[_ngcontent-%COMP%]   .log-status[_ngcontent-%COMP%]{font-weight:600;flex-shrink:0;width:36px}.rate-limit-test[_ngcontent-%COMP%]   .log-entry[_ngcontent-%COMP%]   .log-level[_ngcontent-%COMP%]{flex-shrink:0;width:70px;text-transform:uppercase;font-size:10px;letter-spacing:.5px;padding-top:2px}.rate-limit-test[_ngcontent-%COMP%]   .log-entry[_ngcontent-%COMP%]   .log-message[_ngcontent-%COMP%]{color:#999;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-ok[_ngcontent-%COMP%]   .log-status[_ngcontent-%COMP%], .rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-ok[_ngcontent-%COMP%]   .log-level[_ngcontent-%COMP%]{color:#4caf50}.rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-warning[_ngcontent-%COMP%]   .log-status[_ngcontent-%COMP%], .rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-warning[_ngcontent-%COMP%]   .log-level[_ngcontent-%COMP%], .rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-warning[_ngcontent-%COMP%]   .log-message[_ngcontent-%COMP%]{color:#ffb74d}.rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-throttle[_ngcontent-%COMP%]   .log-status[_ngcontent-%COMP%], .rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-throttle[_ngcontent-%COMP%]   .log-level[_ngcontent-%COMP%], .rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-throttle[_ngcontent-%COMP%]   .log-message[_ngcontent-%COMP%]{color:#ff7043}.rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-lockout[_ngcontent-%COMP%]{background:#e5393514}.rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-lockout[_ngcontent-%COMP%]   .log-status[_ngcontent-%COMP%], .rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-lockout[_ngcontent-%COMP%]   .log-level[_ngcontent-%COMP%], .rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-lockout[_ngcontent-%COMP%]   .log-message[_ngcontent-%COMP%]{color:#ef5350}.rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-error[_ngcontent-%COMP%]   .log-status[_ngcontent-%COMP%], .rate-limit-test[_ngcontent-%COMP%]   .log-entry.log-error[_ngcontent-%COMP%]   .log-level[_ngcontent-%COMP%]{color:#e57373}.rate-limit-test[_ngcontent-%COMP%]   .log-empty[_ngcontent-%COMP%]{color:#555;text-align:center;padding:24px}.rate-limit-test[_ngcontent-%COMP%]   .info-box[_ngcontent-%COMP%]{background:#1a1a2e;border:1px solid #2a2a3e;border-radius:8px;padding:20px 24px}.rate-limit-test[_ngcontent-%COMP%]   .info-box[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:14px;color:#ccc;margin:0 0 8px}.rate-limit-test[_ngcontent-%COMP%]   .info-box[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]:not(:first-child){margin-top:16px}.rate-limit-test[_ngcontent-%COMP%]   .info-box[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:0;padding-left:20px}.rate-limit-test[_ngcontent-%COMP%]   .info-box[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{color:#999;font-size:13px;line-height:1.8}.rate-limit-test[_ngcontent-%COMP%]   .info-box[_ngcontent-%COMP%]   .badge[_ngcontent-%COMP%]{display:inline-block;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;padding:2px 8px;border-radius:4px;font-family:JetBrains Mono,Fira Code,monospace}.rate-limit-test[_ngcontent-%COMP%]   .info-box[_ngcontent-%COMP%]   .badge.badge-warning[_ngcontent-%COMP%]{background:#ffb74d26;color:#ffb74d}.rate-limit-test[_ngcontent-%COMP%]   .info-box[_ngcontent-%COMP%]   .badge.badge-throttle[_ngcontent-%COMP%]{background:#ff704326;color:#ff7043}.rate-limit-test[_ngcontent-%COMP%]   .info-box[_ngcontent-%COMP%]   .badge.badge-lockout[_ngcontent-%COMP%]{background:#ef535026;color:#ef5350}"],changeDetection:0})}}return l})();var q=[{path:"",component:D}],L=(()=>{class l{static{this.\u0275fac=function(r){return new(r||l)}}static{this.\u0275mod=C({type:l})}static{this.\u0275inj=u({imports:[f.forChild(q),f]})}}return l})();var Q=(()=>{class l{static{this.\u0275fac=function(r){return new(r||l)}}static{this.\u0275mod=C({type:l})}static{this.\u0275inj=u({imports:[y,w,L]})}}return l})();export{Q as DevRateLimitTestModule};
2
3//# chunkId=01a0d02e-bd7d-7121-8335-4588129476c8

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.