var g=Object.defineProperty;var i=(e,r)=>{for(var t in r)g(e,t,{get:r[t],enumerable:!0})};var u={};i(u,{AttemptViewWithFilter:()=>s,RuleSetView:()=>n,preloadStatusCode:()=>f});import*as o from"./../../../../core/sdk/sdk.js";import*as d from"./../../../../models/logs/logs.js";var n=class{ruleSetId;constructor(r){this.ruleSetId=r}},s=class{ruleSetId;constructor(r){this.ruleSetId=r}};function f(e){switch(e.action){case"Prefetch":return l(e.requestId);case"Prerender":case"PrerenderUntilScript":return S(e.key.loaderId)}}function l(e){let t=d.NetworkLog.NetworkLog.instance().requestsForId(e);if(t.length>0)return t[t.length-1].statusCode}function S(e){let r=o.ResourceTreeModel.ResourceTreeModel.frames(o.TargetManager.TargetManager.instance()).find(c=>c.loaderId===e);if(!r)return;let a=r.resourceTreeModel().target().model(o.NetworkManager.NetworkManager)?.requestForLoaderId(e);return a?.statusCode===0?void 0:a?.statusCode}export{u as PreloadingForward};
//# sourceMappingURL=helper.js.map
