1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{84095:(e,r,l)=>{l.r(r),l.d(r,{default:()=>a});var n=l(23798),i=l(16542),s=l(40712),o=l(83933),t=l(88488);function a(e){var r,l,a,u;let{service:c}=e,{t:d}=(0,o.Bd)(),{widget:v}=c,{data:p,error:h}=(0,t.A)(v,"spools");if(h)return(0,n.jsx)(s.A,{service:c,error:h});if(!p){let e=null!=(a=null==(l=v.spoolIds)?void 0:l.length)?a:4;return(0,n.jsx)(s.A,{service:c,children:[...Array(e)].map((e,r)=>(0,n.jsx)(i.A,{label:"spoolman.loading"},r))})}return p.error||p.message?(0,n.jsx)(s.A,{service:c,error:null!=(u=null==p?void 0:p.error)?u:p}):0===p.length?(0,n.jsx)(s.A,{service:c,children:(0,n.jsx)(i.A,{label:"spoolman.noSpools"})}):((null==(r=v.spoolIds)?void 0:r.length)&&(p=p.filter(e=>v.spoolIds.includes(e.id))),p.length>4&&(p=p.slice(0,4)),(0,n.jsx)(s.A,{service:c,children:p.map(e=>(0,n.jsx)(i.A,{label:e.filament.name,value:d("common.percent",{value:e.remaining_weight/e.initial_weight*100})},e.id))}))}},88488:(e,r,l)=>{l.d(r,{A:()=>s});var n=l(96638),i=l(96973);function s(e){for(var r,l,s=arguments.length,o=Array(s>1?s-1:0),t=1;t<s;t++)o[t-1]=arguments[t];let a={};o&&(null==(r=o[1])?void 0:r.refreshInterval)&&(a.refreshInterval=o[1].refreshInterval);let u=(0,i.$C)(e,...o);""===o[0]&&(u=null);let{data:c,error:d,mutate:v}=(0,n.Ay)(u,a);return{data:c,error:null!=(l=null==c?void 0:c.error)?l:d,mutate:v}}},96973:(e,r,l)=>{function n(e,r){let l=new URLSearchParams({group:e.service_group,service:e.service_name,index:e.index});return r&&l.append("endpoint",r),l}function i(e,r,l){let i=n(e,r);return l&&i.append("query",JSON.stringify(l)),"/api/services/proxy?".concat(i.toString())}l.d(r,{$C:()=>i,_V:()=>n})}}]);
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.