openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
486 lines • 62.6 kB
JavaScript
import{n as e}from"./rolldown-runtime-DkW27tQK.js";import{Bi as t,Ct as n,En as r,Et as i,Ki as a,Kn as o,R as s,Yn as c,ft as l,jn as u,ta as d,v as f,wr as p,wt as m,z as ee}from"./control-ui-foundation-Cydpkyqa.js";import{$a as h,Bn as te,Ka as ne,S as g,Sc as re,T as ie,Xa as ae,Ya as oe,Za as se,ao as ce,b as le,bc as ue,bs as de,cn as fe,co as pe,cr as me,eo as he,io as ge,k as _,lo as _e,lr as ve,oa as ye,oo as be,p as v,po as xe,qa as Se,ro as Ce,sa as we,so as Te,to as Ee,uo as De,w as y,ys as Oe,zn as ke}from"./control-ui-core-Rwzhj6nO.js";import{$ as Ae,J as je,K as b,Q as x,X as S,at as C,q as w,st as Me}from"./lit-runtime-CV_MH99K.js";import{$t as Ne,An as Pe,F as T,S as Fe,Zt as Ie,_ as Le,_n as Re,b as ze,g as Be,jn as Ve,nn as He}from"./control-ui-core-YphAl4aM.js";import{Gt as E,Kt as Ue,Rt as We,Wt as D,Yt as O,Z as Ge,an as Ke,en as k,in as qe,qt as A}from"./control-ui-core-vvcQQV2m.js";import{B as j,U as Je,V as Ye,z as Xe}from"./control-ui-boot-shared-BYq7Cchl.js";import{a as Ze,r as Qe}from"./gateway-runtime-Bqqcp9-I.js";import{er as $e,nr as et}from"./control-ui-boot-shared-DfZ39Yj9.js";import{b as tt,h as nt,l as rt,m as M}from"./config-runtime-D-5ybyEi.js";import{$ as it,J as N,K as at,L as P,Q as F,V as ot,W as st,X as I,in as ct,rn as lt,tt as ut,z as dt}from"./control-ui-boot-chat-_QSl8fbH.js";import{Is as ft,Ls as pt,hs as mt,ms as ht}from"./control-ui-boot-shared-CXVvK2AW.js";import{D as gt,c as _t,l as vt,m as yt,p as bt,s as xt,u as St}from"./control-ui-boot-new-Bj2SAUyl.js";import{n as Ct,t as wt}from"./desktop-focus-window-CY5JuBq7.js";import{n as Tt,t as Et}from"./settings-workspace-Bseic8Tf.js";function Dt(e){let t=document.createElement(`div`);return document.body.append(t),new Promise(n=>{let r=!1,i=()=>{je(w,t),t.remove(),n()},a=t=>{if(!e.secret){i();return}t.preventDefault(),!r&&(r=!0,s())},o=e.secret?`btn primary`:`btn secret-reveal__dismiss`,s=()=>{je(S`
<openclaw-modal-dialog
label=${e.title}
description=${e.message}
@modal-cancel=${a}
>
<div class="exec-approval-card">
<div class="secret-reveal__header">
${e.status===`success`?S`<span class="secret-reveal__status" aria-hidden="true"
>${D.check}</span
>`:w}
<div class="exec-approval-title">${e.title}</div>
</div>
<div class="secret-reveal__body"><p>${e.message}</p></div>
${e.callout?S`<div class="callout info secret-reveal__callout">${e.callout}</div>`:w}
${e.secret?S`
<div class="secret-reveal__value">
<code class="secret-reveal__code">${e.secret}</code>
${et(e.secret,k(`common.copy`))}
</div>
`:w}
${r?S`<p class="secret-reveal__hint" role="status">${e.dismissHint}</p>`:w}
${e.note?S`<p class="secret-reveal__note">${e.note}</p>`:w}
<div class="exec-approval-actions">
<button type="button" class=${o} autofocus @click=${i}>
${e.acknowledgeLabel}
</button>
</div>
</div>
</openclaw-modal-dialog>
`,t)};s()})}function Ot(){return(Ot=e((()=>{b(),O(),$e(),E(),We()})))()}function L(e){return Array.isArray(e)?e.map(e=>d(e)).filter(e=>e!==void 0):[]}function kt(e){if(!o(e))return;let t=Object.keys(e),n=e.total,r=e.available;return t.length===2&&t.includes(`total`)&&t.includes(`available`)&&typeof n==`number`&&typeof r==`number`&&Number.isSafeInteger(n)&&Number.isSafeInteger(r)&&n>=1&&n<=1024&&r>=0&&r<=n?{total:n,available:r}:void 0}function At(e){if(!o(e))return;let t=e;if(t.status===`missing`&&Object.keys(t).length===1)return{status:`missing`};let n=d(t.version);return t.status===`installed`&&n&&Object.keys(t).length===2?{status:`installed`,version:n}:void 0}function jt(e){let t=d(e.nodeId);if(!t)return null;let n=d(e.approvalState);return{nodeId:t,displayName:d(e.displayName),platform:d(e.platform),version:d(e.version),coreVersion:d(e.coreVersion),uiVersion:d(e.uiVersion),modelIdentifier:d(e.modelIdentifier),clientId:d(e.clientId),clientMode:d(e.clientMode),remoteIp:d(e.remoteIp),caps:L(e.caps),commands:L(e.commands),approvalState:n&&Kt.has(n)?n:void 0,pendingRequestId:d(e.pendingRequestId),workerSlots:kt(e.workerSlots),workerBundle:At(e.workerBundle),hostStats:Gt.safeParse(e.hostStats).data,connected:e.connected===!0,paired:e.paired===!0,connectedAtMs:r(e.connectedAtMs),lastSeenAtMs:r(e.lastSeenAtMs),approvedAtMs:r(e.approvedAtMs)}}function Mt(e){let t=new Set;for(let n of[...e.roles??[],e.role]){let e=d(n);e&&t.add(e)}return[...t]}function Nt(...e){let t;for(let n of e)n!==void 0&&(t===void 0||n>t)&&(t=n);return t}function Pt(e,t,n,i){let a=t?Mt(t):[];n?.paired&&!a.includes(`node`)&&a.push(`node`);let o=d(t?.operatorLabel),s=d(t?.displayName)??d(n?.displayName),c=d(t?.clientId)??n?.clientId;return{id:e,name:o??s??c??e,displayName:s,clientId:c,clientMode:d(t?.clientMode)??n?.clientMode,platform:d(i?.platform)??d(t?.platform)??n?.platform,version:d(i?.version)??n?.version,modelIdentifier:d(i?.modelIdentifier)??n?.modelIdentifier,remoteIp:d(t?.remoteIp)??n?.remoteIp,roles:a,scopes:L(t?.scopes),connected:n?.connected===!0||t?.connected===!0,autoApproved:t?.approvedVia===`silent`||t?.approvedVia===`trusted-cidr`||t?.approvedVia===`ssh-verified`,lastSeenAtMs:Nt(t?.lastSeenAtMs,n?.lastSeenAtMs,n?.connectedAtMs,r(i?.ts)),approvedAtMs:Nt(t?.approvedAtMs,n?.approvedAtMs),presence:i,device:t,node:n}}function Ft(e){let t=e.displayName?.trim().toLowerCase();if(t)return`name:${t}`;let n=e.clientId?.trim().toLowerCase(),r=e.clientMode?.trim().toLowerCase();return n||r?`client:${n??``}:${r??``}`:`id:${e.id}`}function It(e){return e.lastSeenAtMs??e.approvedAtMs??0}function Lt(e,t){if(e.connected!==t.connected)return e.connected?-1:1;let n=It(t)-It(e);return n===0?e.id.localeCompare(t.id):n}function Rt(e,t){let n=Lt(e.primary,t.primary);return n===0?e.name.localeCompare(t.name):n}function zt(e){let t=new Map;for(let n of e.nodes){let e=jt(n);e&&t.set(e.nodeId,e)}let n=new Map;for(let t of e.presence??[])for(let e of[t.deviceId,t.instanceId]){let r=d(e)?.toLowerCase();r&&n.set(r,t)}let r=[],i=new Set;for(let a of e.paired){let e=d(a.deviceId);!e||i.has(e)||(i.add(e),r.push(Pt(e,a,t.get(e),n.get(e.toLowerCase()))))}for(let[e,a]of t)i.has(e)||r.push(Pt(e,void 0,a,n.get(e.toLowerCase())));let a=new Map;for(let e of r){let t=Ft(e),n=a.get(t);n?n.push(e):a.set(t,[e])}let o=[];for(let[e,t]of a){let n=t.toSorted(Lt),r=n[0];r&&o.push({key:e,name:r.name,primary:r,duplicates:n.slice(1)})}return o.toSorted(Rt)}function Bt(e){return e.flatMap(e=>e.duplicates.filter(e=>!e.connected&&(e.autoApproved||e.device!==void 0&&e.device.approvedVia===void 0)))}function Vt(e){return e.find(e=>d(e.mode)?.toLowerCase()===`gateway`)}function Ht(e,t){let n=new Set;for(let e of t)for(let t of[e.primary,...e.duplicates])n.add(t.id.toLowerCase());return e.filter(e=>{if(d(e.mode)?.toLowerCase()===`gateway`||d(e.reason)?.toLowerCase()===`disconnect`)return!1;let t=[e.deviceId,e.instanceId].map(e=>d(e)?.toLowerCase()).filter(e=>e!==void 0);return t.length===0&&!d(e.host)&&!d(e.mode)?!1:!t.some(e=>n.has(e))})}function Ut(e){let t=e.roles.includes(`node`),n=e.roles.filter(e=>e!==`node`);return{removeNode:t||e.node?.paired===!0,removeDevice:!!e.device&&(n.length>0||e.roles.length===0)}}function Wt(e){let t=new Map;for(let n of e){let e=(n.deviceId??n.instanceId)?.trim().toLowerCase();if(!e||n.mode?.trim().toLowerCase()===`gateway`)continue;let r=n.roles?.includes(`node`)?`${e}:node`:e;t.set(r,n.reason?.trim().toLowerCase()===`disconnect`?`offline`:`connected`)}return JSON.stringify([...t].toSorted(([e],[t])=>e.localeCompare(t)))}var Gt,Kt;function R(){return(R=e((()=>{u(),rt(),Gt=nt({cpuCount:M().int().positive(),loadAverage:tt([M().nonnegative(),M().nonnegative(),M().nonnegative()]).optional(),memoryTotalBytes:M().positive(),memoryFreeBytes:M().nonnegative(),diskTotalBytes:M().positive().optional(),diskAvailableBytes:M().nonnegative().optional(),updatedAtMs:M().nonnegative()}).refine(e=>e.memoryFreeBytes<=e.memoryTotalBytes&&(e.diskAvailableBytes===void 0||e.diskTotalBytes===void 0||e.diskAvailableBytes<=e.diskTotalBytes)),Kt=new Set([`approved`,`pending-approval`,`pending-reapproval`,`unapproved`])})))()}var z;function qt(){return(qt=e((()=>{b(),Ue(),E(),z={laptop:A(x`<path
d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"
/>
<path d="M20.054 15.987H3.946" />`),pcCase:A(x`<rect width="14" height="20" x="5" y="2" rx="2" />
<path d="M15 14h.01M9 6h6M9 10h6" />`),macMini:A(x`<path
d="M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"
/>
<path d="M21.946 12.013H2.054M6 16h.01M10 16h.01" />`),allInOne:D.monitor,tablet:A(x`<rect width="16" height="20" x="4" y="2" rx="2" ry="2" />
<path d="M12 18h.01" />`),watch:A(x`<circle cx="12" cy="12" r="6" />
<polyline points="12 10 12 12 13 13" />
<path d="m16.13 7.66-.81-4.05a2 2 0 0 0-2-1.61h-2.68a2 2 0 0 0-2 1.61l-.78 4.05" />
<path d="m7.88 16.36.8 4a2 2 0 0 0 2 1.61h2.72a2 2 0 0 0 2-1.61l.81-4.05" />`),smartphone:D.smartphone,browser:D.globe,terminal:D.terminal,server:D.server}})))()}function Jt(e){let t=e?.trim();if(t)return t.startsWith(`MacBook`)?`laptop`:t.startsWith(`Macmini`)?`mini`:t.startsWith(`MacPro`)?`pro`:t.startsWith(`iMac`)?`imac`:Xt[t]}function Yt(e){let t=e?.trim();if(t)switch(Jt(t)){case`laptop`:return t.startsWith(`MacBookAir`)||Zt.has(t)?`MacBook Air`:/^MacBook\d/.test(t)?`MacBook`:`MacBook Pro`;case`mini`:return`Mac mini`;case`studio`:return`Mac Studio`;case`pro`:return`Mac Pro`;case`imac`:return`iMac`;default:return}}var Xt,Zt;function Qt(){return(Qt=e((()=>{Xt={"Mac13,1":`studio`,"Mac13,2":`studio`,"Mac14,2":`laptop`,"Mac14,3":`mini`,"Mac14,5":`laptop`,"Mac14,6":`laptop`,"Mac14,7":`laptop`,"Mac14,8":`pro`,"Mac14,9":`laptop`,"Mac14,10":`laptop`,"Mac14,12":`mini`,"Mac14,13":`studio`,"Mac14,14":`studio`,"Mac14,15":`laptop`,"Mac15,3":`laptop`,"Mac15,4":`imac`,"Mac15,5":`imac`,"Mac15,6":`laptop`,"Mac15,7":`laptop`,"Mac15,8":`laptop`,"Mac15,9":`laptop`,"Mac15,10":`laptop`,"Mac15,11":`laptop`,"Mac15,12":`laptop`,"Mac15,13":`laptop`,"Mac15,14":`studio`,"Mac16,1":`laptop`,"Mac16,2":`imac`,"Mac16,3":`imac`,"Mac16,5":`laptop`,"Mac16,6":`laptop`,"Mac16,7":`laptop`,"Mac16,8":`laptop`,"Mac16,9":`studio`,"Mac16,10":`mini`,"Mac16,11":`mini`,"Mac16,12":`laptop`,"Mac16,13":`laptop`,"Mac17,2":`laptop`},Zt=new Set([`Mac14,2`,`Mac14,15`,`Mac15,12`,`Mac15,13`,`Mac16,12`,`Mac16,13`])})))()}function $t(e){let t=o(e?.agents)?e.agents:null,n=o(t?.entries)?t.entries:{},r=[];for(let[e,t]of Object.entries(n)){if(!o(t))continue;let n=d(t.name),i=t.default===!0;r.push({id:e,name:n,isDefault:i,record:t})}return r}function en(e,t){let n=[];for(let r of e){let e=Array.isArray(r.commands)?r.commands:[],i=new Set(e.map(String));if(!t.every(e=>i.has(e)))continue;let a=d(r.nodeId)??``;if(!a)continue;let o=d(r.displayName)??a;n.push({id:a,label:o===a?a:`${o} · ${a}`})}return n.sort((e,t)=>e.label.localeCompare(t.label)),n}function tn(e){let t=e.platform?.trim().toLowerCase()??``,r=e.modelIdentifier?.trim()??``,i=e.clientId?.trim().toLowerCase()??``,a=e.clientMode?.trim().toLowerCase()??``;if(r.startsWith(`Watch`)||nn.test(t)||i===n.WATCHOS_APP)return z.watch;if(r.startsWith(`iPad`)||rn.test(t))return z.tablet;if(r.startsWith(`iPhone`)||an.test(t)||on.has(i))return z.smartphone;if(sn.has(i)||a===m.WEBCHAT)return z.browser;if(cn.has(a)||ln.has(i))return z.terminal;if(a===`gateway`)return z.server;switch(Jt(r)){case`laptop`:return z.laptop;case`mini`:return z.macMini;case`studio`:case`pro`:return z.pcCase;case`imac`:return z.allInOne;default:return D.monitor}}function B(e){return S`
<div class="device-entry__tile" aria-hidden="true">
<span class="device-entry__tile-icon">${e}</span>
</div>
`}var nn,rn,an,on,sn,cn,ln;function V(){return(V=e((()=>{b(),i(),qt(),E(),Qt(),nn=/\bwatchos\b/,rn=/\b(ipados|ipad)\b/,an=/\b(ios|android|iphone)\b/,on=new Set([n.IOS_APP,n.ANDROID_APP]),sn=new Set([n.CONTROL_UI,n.WEBCHAT_UI,n.WEBCHAT]),cn=new Set([m.CLI,m.BACKEND,m.PROBE,m.TEST]),ln=new Set([n.CLI,n.TUI])})))()}function un(e){return e===`allowlist`||e===`full`||e===`deny`?e:`deny`}function dn(e){return e===`always`||e===`off`||e===`on-miss`?e:`on-miss`}function fn(e,t,n){let r=e?.defaults??{},i=n?e?.agents?.[`*`]??{}:{};return{security:un(i.security??r.security??t?.security),ask:dn(i.ask??r.ask??t?.ask),askFallback:un(i.askFallback??r.askFallback??t?.askFallback??`deny`),autoAllowSkills:i.autoAllowSkills??r.autoAllowSkills??t?.autoAllowSkills??!1}}function pn(e){return $t(e).map(e=>({id:e.id,name:e.name,isDefault:e.isDefault}))}function mn(e,t){let n=pn(e),r=Object.keys(t?.agents??{}),i=new Map;n.forEach(e=>i.set(e.id,e)),r.forEach(e=>{i.has(e)||i.set(e,{id:e})});let a=Array.from(i.values());return a.length===0&&a.push({id:`main`,isDefault:!0}),a.sort((e,t)=>{if(e.isDefault&&!t.isDefault)return-1;if(!e.isDefault&&t.isDefault)return 1;let n=e.name?.trim()?e.name:e.id,r=t.name?.trim()?t.name:t.id;return n.localeCompare(r)}),a}function hn(e,t){return e===U?U:e&&t.some(t=>t.id===e)?e:U}function gn(e){let t=e.execApprovalsSnapshot,n=se(t)?t:null,r=t&&!se(t)?t:null,i=n?null:e.execApprovalsForm??r?.file??null,a=!!(i||n),o=mn(e.configForm,i),s=wn(e.nodes),c=e.execApprovalsTarget,l=c===`node`&&e.execApprovalsTargetNodeId?e.execApprovalsTargetNodeId:null;c===`node`&&l&&!s.some(e=>e.id===l)&&(l=null);let u=hn(e.execApprovalsSelectedAgent,o),d=fn(i,r?.resolvedDefaults,u!==U),f=u===U?null:(i?.agents??{})[u]??null,p=Array.isArray(f?.allowlist)?f.allowlist??[]:[];return{ready:a,disabled:!e.canAdmin||e.execApprovalsSaving||e.execApprovalsLoading,dirty:e.execApprovalsDirty,loading:e.execApprovalsLoading,saving:e.execApprovalsSaving,form:i,nativePolicy:n,defaults:d,selectedScope:u,selectedAgent:f,agents:o,allowlist:p,target:c,targetNodeId:l,targetNodes:s,onSelectScope:e.onExecApprovalsSelectAgent,onSelectTarget:e.onExecApprovalsTargetChange,onPatch:e.onExecApprovalsPatch,onRemove:e.onExecApprovalsRemove,onLoad:e.onLoadExecApprovals,onSave:e.onSaveExecApprovals,canAdmin:e.canAdmin}}function _n(e){let t=e.ready,n=e.target!==`node`||!!e.targetNodeId,r=S`
<button
class="btn"
?disabled=${e.disabled||!e.dirty||!n||!!e.nativePolicy}
@click=${e.onSave}
>
${e.saving?k(`common.saving`):k(`common.save`)}
</button>
`,i=S`
${e.canAdmin?S`
${yn(e)}
${t?e.nativePolicy?vn(e.nativePolicy):S`${bn(e)} ${xn(e)}`:N({title:k(`devices.execApprovals.loadHint`),control:S`
<button
class="btn"
?disabled=${e.loading||!n}
@click=${e.onLoad}
>
${e.loading?k(`common.loading`):k(`common.loadApprovals`)}
</button>
`})}
`:N({title:k(`devices.readOnly.adminRequired`)})}
`;return S`
${I({title:k(`devices.execApprovals.title`),description:S`
${k(`devices.execApprovals.subtitlePrefix`)}
<span class="mono">exec host=gateway/node</span>.
`,actions:r},i)}
${e.canAdmin&&t&&!e.nativePolicy&&e.selectedScope!==U?Sn(e):w}
`}function vn(e){let t=e.enabled&&Array.isArray(e.rules)?e.rules:[],n=e.enabled?e.defaultAction:e.message??`unavailable`;return S`
${N({title:k(`devices.execApprovals.hostNativePolicy`),description:k(`devices.execApprovals.hostNativeHint`),control:ut(k(`devices.execApprovals.native`))})}
${N({title:k(`devices.execApprovals.defaultAction`),description:n,control:ut(k(t.length===1?`devices.execApprovals.rule`:`devices.execApprovals.rules`,{count:String(t.length)}))})}
${t.map(e=>N({title:e.pattern,description:S`
${e.action} · ${e.shells?.join(`, `)||k(`devices.execApprovals.allShells`)} ·
${e.enabled===!1?k(`devices.execApprovals.off`):k(`devices.execApprovals.on`)}
${e.description?S`<br />${v(e.description,120)}`:w}
`}))}
`}function yn(e){let t=e.targetNodes.length>0,n=e.targetNodeId??``;return S`
${N({title:k(`devices.execApprovals.target`),description:k(`devices.execApprovals.targetHint`),control:S`
<select
class="settings-select"
aria-label=${k(`devices.execApprovals.host`)}
?disabled=${e.disabled}
@change=${t=>{if(t.target.value===`node`){let t=e.targetNodes[0]?.id??null;e.onSelectTarget(`node`,n||t)}else e.onSelectTarget(`gateway`,null)}}
>
<option value="gateway" ?selected=${e.target===`gateway`}>
${k(`devices.execApprovals.gateway`)}
</option>
<option value="node" ?selected=${e.target===`node`}>
${k(`devices.execApprovals.node`)}
</option>
</select>
`})}
${e.target===`node`?N({title:k(`devices.execApprovals.node`),description:t?void 0:k(`devices.execApprovals.noNodes`),control:S`
<select
class="settings-select"
aria-label=${k(`devices.execApprovals.node`)}
?disabled=${e.disabled||!t}
@change=${t=>{let n=t.target.value.trim();e.onSelectTarget(`node`,n||null)}}
>
<option value="" ?selected=${n===``}>
${k(`devices.execApprovals.selectNode`)}
</option>
${e.targetNodes.map(e=>S`<option value=${e.id} ?selected=${n===e.id}>
${e.label}
</option>`)}
</select>
`}):w}
`}function bn(e){let t=[{value:U,label:k(`devices.execApprovals.defaults`),icon:D.settings},...e.agents.map(e=>({value:e.id,label:e.name?.trim()?`${e.name} (${e.id})`:e.id,agent:{id:e.id,...e.name?{name:e.name}:{}},badge:e.isDefault?k(`agents.default`):void 0}))];return N({title:k(`devices.execApprovals.scope`),stacked:!0,control:S`
<openclaw-agent-select
class="agent-select--settings"
.options=${t}
.value=${e.selectedScope}
.accessibleLabel=${k(`devices.execApprovals.scope`)}
.disabled=${e.disabled}
.onSelect=${e.onSelectScope}
></openclaw-agent-select>
`})}function H(e,t){return S`
<select
class="settings-select"
aria-label=${t.ariaLabel}
?disabled=${e.disabled}
@change=${n=>{let r=n.target.value;!t.isDefaults&&r===`__default__`?e.onRemove([...t.basePath,t.key]):e.onPatch([...t.basePath,t.key],r)}}
>
${t.isDefaults?w:S`<option value="__default__" ?selected=${t.currentValue===`__default__`}>
${k(`devices.execApprovals.useDefaultValue`,{value:t.defaultValue})}
</option>`}
${t.values.map(e=>S`<option value=${e.value} ?selected=${t.currentValue===e.value}>
${k(e.labelKey)}
</option>`)}
</select>
`}function xn(e){let t=e.selectedScope===U,n=e.defaults,r=e.selectedAgent??{},i=t?[`defaults`]:[`agents`,e.selectedScope],a=typeof r.security==`string`?r.security:void 0,o=typeof r.ask==`string`?r.ask:void 0,s=typeof r.askFallback==`string`?r.askFallback:void 0,c=t?n.security:a??`__default__`,l=t?n.ask:o??`__default__`,u=t?n.askFallback:s??`__default__`,d=typeof r.autoAllowSkills==`boolean`?r.autoAllowSkills:void 0,f=d??n.autoAllowSkills,p=d==null;return S`
${N({title:k(`devices.execApprovals.security`),description:t?k(`devices.execApprovals.defaultSecurity`):k(`devices.execApprovals.defaultValue`,{value:n.security}),control:H(e,{key:`security`,ariaLabel:k(`devices.execApprovals.mode`),values:W,currentValue:c,defaultValue:n.security,isDefaults:t,basePath:i})})}
${N({title:k(`devices.execApprovals.ask`),description:t?k(`devices.execApprovals.defaultPrompt`):k(`devices.execApprovals.defaultValue`,{value:n.ask}),control:H(e,{key:`ask`,ariaLabel:k(`devices.execApprovals.mode`),values:Tn,currentValue:l,defaultValue:n.ask,isDefaults:t,basePath:i})})}
${N({title:k(`devices.execApprovals.askFallback`),description:t?k(`devices.execApprovals.promptUnavailable`):k(`devices.execApprovals.defaultValue`,{value:n.askFallback}),control:H(e,{key:`askFallback`,ariaLabel:k(`devices.execApprovals.fallback`),values:W,currentValue:u,defaultValue:n.askFallback,isDefaults:t,basePath:i})})}
${N({title:k(`devices.execApprovals.autoAllowSkills`),description:t?k(`devices.execApprovals.autoAllowSkillsHint`):p?k(`devices.execApprovals.usingDefault`,{value:n.autoAllowSkills?k(`devices.execApprovals.on`):k(`devices.execApprovals.off`)}):k(`devices.execApprovals.override`,{value:k(f?`devices.execApprovals.on`:`devices.execApprovals.off`)}),control:S`
${!t&&!p?S`<button
class="btn btn--sm"
?disabled=${e.disabled}
@click=${()=>e.onRemove([...i,`autoAllowSkills`])}
>
${k(`devices.execApprovals.useDefault`)}
</button>`:w}
${it({checked:f,disabled:e.disabled,ariaLabel:k(`devices.execApprovals.autoAllowSkills`),onChange:t=>e.onPatch([...i,`autoAllowSkills`],t)})}
`})}
`}function Sn(e){let t=[`agents`,e.selectedScope,`allowlist`],n=e.allowlist;return I({title:k(`devices.execApprovals.allowlist`),description:k(`devices.execApprovals.allowlistHint`),actions:S`
<button
class="btn btn--sm"
?disabled=${e.disabled}
@click=${()=>{let r=[...n,{pattern:``}];e.onPatch(t,r)}}
>
${k(`devices.execApprovals.addPattern`)}
</button>
`},n.length===0?ot(k(`devices.execApprovals.emptyAllowlist`)):n.map((t,n)=>Cn(e,t,n)))}function Cn(e,t,n){let r=t.lastUsedAt?y(t.lastUsedAt):k(`common.never`),i=t.lastUsedCommand?v(t.lastUsedCommand,120):null,a=t.lastResolvedPath?v(t.lastResolvedPath,120):null;return N({title:t.pattern?.trim()?t.pattern:k(`devices.execApprovals.newPattern`),description:S`
${k(`devices.execApprovals.lastUsed`,{time:r})}
${i?S`<br /><span class="mono">${i}</span>`:w}
${a?S`<br /><span class="mono">${a}</span>`:w}
`,control:S`
<input
class="settings-input"
type="text"
aria-label=${k(`devices.execApprovals.pattern`)}
.value=${t.pattern??``}
?disabled=${e.disabled}
@input=${t=>{let r=t.target;e.onPatch([`agents`,e.selectedScope,`allowlist`,n,`pattern`],r.value)}}
/>
<button
class="btn btn--sm danger"
?disabled=${e.disabled}
@click=${()=>{if(e.allowlist.length<=1){e.onRemove([`agents`,e.selectedScope,`allowlist`]);return}e.onRemove([`agents`,e.selectedScope,`allowlist`,n])}}
>
${k(`devices.execApprovals.remove`)}
</button>
`})}function wn(e){return en(e,[`system.execApprovals.get`,`system.execApprovals.set`])}var U,W,Tn;function En(){return(En=e((()=>{b(),gt(),E(),P(),O(),_(),ae(),V(),U=`__defaults__`,W=[{value:`deny`,labelKey:`devices.execApprovals.options.deny`},{value:`allowlist`,labelKey:`devices.execApprovals.options.allowlist`},{value:`full`,labelKey:`devices.execApprovals.options.full`}],Tn=[{value:`off`,labelKey:`devices.execApprovals.options.off`},{value:`on-miss`,labelKey:`devices.execApprovals.options.onMiss`},{value:`always`,labelKey:`devices.execApprovals.options.always`}]})))()}var G,Dn;function On(){return(On=e((()=>{Ke(),G={devices:{capabilities:{browser:{label:`Browser`,description:`Browse and interact with web pages.`},canvas:{label:`Canvas`,description:`Present and interact with visual content.`},screen:{label:`Screen`,description:`Capture or record the screen.`},computer:{label:`Computer`,description:`Control desktop applications with the mouse and keyboard.`},file:{label:`Files`,description:`Read and manage files on this device.`},system:{label:`System`,description:`Run commands and inspect this device.`},mcp:{label:`MCP`,description:`Use tools provided by MCP servers on this device.`},localInference:{label:`Local inference`,description:`Run models locally on this device.`},camera:{label:`Camera`,description:`Capture photos and video with the device camera.`},talk:{label:`Talk`,description:`Have voice conversations through this device.`},location:{label:`Location`,description:`Read the device location.`},notifications:{label:`Notifications`,description:`Read and manage device notifications.`},contacts:{label:`Contacts`,description:`Find and manage contacts.`},calendar:{label:`Calendar`,description:`Read and manage calendar events.`},reminders:{label:`Reminders`,description:`Read and manage reminders.`},device:{label:`Device`,description:`Read device information and status.`},photos:{label:`Photos`,description:`Browse the device photo library.`},sms:{label:`SMS`,description:`Read and send text messages.`},health:{label:`Health`,description:`Read health and fitness data.`},motion:{label:`Motion`,description:`Read movement and activity data.`},runtime:`1 runtime`,runtimes:`{count} runtimes`,overflow:`{count} more capabilities`}}},Dn=Object.assign(()=>{qe.devices.capabilities=G.devices.capabilities},{catalog:G})})))()}function kn(e,t,n){return S`
<span class="device-capability" role="listitem" title=${n}>
<span class="device-capability__icon" aria-hidden="true">${e}</span>
<span>${t}</span>
</span>
`}function An(e){if(e.length===0)return w;let t=[...new Set(e)],n=t.filter(e=>K.has(e)),r=t.filter(e=>!K.has(e)),i=r.slice(0,Mn-+(n.length>0)),a=r.length-i.length,o=k(n.length===1?`devices.capabilities.runtime`:`devices.capabilities.runtimes`,{count:String(n.length)}),s=n.join(`, `);return S`
<div class="device-capabilities" role="list" aria-label=${k(`devices.inventory.capabilities`)}>
${n.length>0?kn(D.squareTerminal,o,s):w}
${i.map(e=>{let t=jn.get(e);return kn(t?.icon??D.puzzle,t?k(`devices.capabilities.${t.key}.label`):e,t?k(`devices.capabilities.${t.key}.description`):e)})}
${a>0?S`<span
class="device-capability device-capability--overflow"
role="listitem"
title=${k(`devices.capabilities.overflow`,{count:String(a)})}
>+${a}</span
>`:w}
</div>
`}var jn,K,Mn;function Nn(){return(Nn=e((()=>{b(),E(),O(),On(),Dn(),jn=new Map(Object.entries({browser:{icon:D.globe,key:`browser`},canvas:{icon:D.panelsTopLeft,key:`canvas`},screen:{icon:D.monitor,key:`screen`},computer:{icon:D.monitorSmartphone,key:`computer`},file:{icon:D.folder,key:`file`},system:{icon:D.terminal,key:`system`},mcp:{icon:D.plug,key:`mcp`},"local-inference":{icon:D.cpu,key:`localInference`},camera:{icon:D.camera,key:`camera`},talk:{icon:D.mic,key:`talk`},location:{icon:D.target,key:`location`},notifications:{icon:D.bell,key:`notifications`},contacts:{icon:D.users,key:`contacts`},calendar:{icon:D.calendarClock,key:`calendar`},reminders:{icon:D.listChecks,key:`reminders`},device:{icon:D.smartphone,key:`device`},photos:{icon:D.image,key:`photos`},sms:{icon:D.messageSquare,key:`sms`},health:{icon:D.activity,key:`health`},motion:{icon:D.radio,key:`motion`}})),K=new Set([`claude-sessions`,`codex-cli-sessions`,`codex-app-server-threads`,`opencode-sessions`,`pi-sessions`]),Mn=16})))()}function Pn(e,t){return e.desktopEnvironments?.find(e=>e.id===t&&e.desktop===!0)?.id}async function Fn(e){let t=await fe(e);we({message:k(t?`devices.inventory.deviceIdCopied`:`common.copyFailed`)})}function q(e,t){if(!t.deviceId&&!t.desktopEnvironment)return w;let n=e.canManagePairing?w:k(`devices.readOnly.pairingRequired`);return S`
<wa-dropdown
placement="bottom-end"
@wa-select=${n=>{switch(n.detail.item.value){case`desktop`:t.desktopEnvironment&&Ct(e.basePath,t.desktopEnvironment);break;case`copy`:t.deviceId&&Fn(t.deviceId);break;case`approve`:e.canManagePairing&&t.pendingRequestId&&e.onNodeApprove(t.pendingRequestId);break;case`reject`:e.canManagePairing&&t.pendingRequestId&&e.onNodeReject(t.pendingRequestId);break;case`remove`:e.canManagePairing&&t.onRemove?.()}}}
>
<button
slot="trigger"
type="button"
class="btn btn--sm btn--ghost device-entry__menu-trigger"
aria-label=${k(`devices.inventory.actionsName`,{name:t.name})}
title=${k(`devices.inventory.actions`)}
>
${D.moreHorizontal}
</button>
${t.desktopEnvironment?S`<wa-dropdown-item value="desktop"
>${k(`devices.inventory.openDesktop`)}</wa-dropdown-item
>`:w}
${t.pendingRequestId?S`
<wa-dropdown-item
value="approve"
?disabled=${!e.canManagePairing}
title=${n}
>${k(`devices.inventory.approve`)}</wa-dropdown-item
>
<wa-dropdown-item
value="reject"
?disabled=${!e.canManagePairing}
title=${n}
>${k(`devices.inventory.reject`)}</wa-dropdown-item
>
`:w}
${t.deviceId?S`<wa-dropdown-item value="copy"
>${k(`devices.inventory.copyDeviceId`)}</wa-dropdown-item
>`:w}
${t.onRemove?S`<wa-dropdown-item
value="remove"
variant="danger"
?disabled=${!e.canManagePairing}
title=${n}
>${k(`devices.inventory.removeAction`)}</wa-dropdown-item
>`:w}
</wa-dropdown>
`}function J(){return(J=e((()=>{b(),wt(),E(),Ge(),O(),ye()})))()}function Y(e){return c(e,{style:`legacy-binary`,maxUnit:`tera`,separator:` `,fractionDigits:(e,t)=>+(t===`tera`||e<10)})}function X(e,t,n,r,i,a=80,o=90){let s=i===void 0?t<a?`ok`:t<o?`warn`:`danger`:`stale`,c=i===void 0?n:`${n} · ${i}`,l=i===void 0?r:`${r} · ${k(`devices.inventory.lastKnown`,{time:i})}`;return S`<span class="device-resource device-resource--${e}" title=${l}>
<span class="device-resource__label">${c}</span>
${St({mode:`continuous`,percent:Math.min(100,Math.max(0,t)),tone:s,label:l})}
</span>`}function In(e,t){if(!e)return w;let n=t===void 0?void 0:ie(Math.max(0,Date.now()-t)),r=[];if(e.loadAverage&&e.cpuCount>0){let t=k(`devices.inventory.loadTitle`,{averages:e.loadAverage.map(e=>e.toFixed(2)).join(` / `),cores:String(e.cpuCount)});r.push(X(`load`,e.loadAverage[0]/e.cpuCount*100,k(`devices.inventory.loadLabel`,{load:e.loadAverage[0].toFixed(1)}),t,n,70,100))}if(e.memoryTotalBytes>0&&e.memoryFreeBytes>=0){let t=e.memoryTotalBytes-e.memoryFreeBytes,i=Y(t),a=Y(e.memoryTotalBytes),o=a.slice(a.lastIndexOf(` `)),s=i.endsWith(o)?i.slice(0,-o.length):i;r.push(X(`memory`,t/e.memoryTotalBytes*100,`${s} / ${a}`,k(`devices.inventory.memoryTitle`,{used:i,total:a}),n))}if(e.diskTotalBytes!=null&&e.diskTotalBytes>0&&e.diskAvailableBytes!=null){let t=Y(e.diskAvailableBytes),i=Y(e.diskTotalBytes);r.push(X(`disk`,(1-e.diskAvailableBytes/e.diskTotalBytes)*100,k(`devices.inventory.diskLabel`,{available:t}),k(`devices.inventory.diskTitle`,{available:t,total:i}),n))}return r.length?S`<div class="device-resources">${r}</div>`:w}function Ln(){return(Ln=e((()=>{b(),vt(),O(),_()})))()}function Z(...e){let t=new Set;for(let n of e)for(let e of a(n))t.add(e);return[...t].toSorted()}function Rn(e,t){let n=new Set(e);return t.every(e=>n.has(e))}function zn(e){return{roles:Z(e.roles,e.role),scopes:l(e.scopes)}}function Bn(e){let t=Z(e.roles,e.role),n=Array.isArray(e.tokens)?e.tokens:e.tokens?Object.values(e.tokens):void 0;return{roles:n===void 0?t:Z(n.filter(e=>!e.revokedAtMs).flatMap(e=>e.role??[])).filter(e=>t.includes(e)),scopes:l(e.scopes)}}function Vn(e,t){let n=zn(e),r=t?Bn(t):null;return r?Rn(r.roles,n.roles)?Rn(r.scopes,n.scopes)?{kind:`re-approval`,requested:n,approved:r}:{kind:`scope-upgrade`,requested:n,approved:r}:{kind:`role-upgrade`,requested:n,approved:r}:{kind:`new-pairing`,requested:n,approved:null}}function Hn(){return(Hn=e((()=>{t()})))()}function Un(e,t,n){let r=new Map(t.map(e=>[d(e.deviceId),e]).filter(e=>!!e[0]));return e.map(e=>qn(e,n,Wn(r,e)))}function Wn(e,t){let n=d(t.deviceId);if(!n)return;let r=e.get(n);if(!r)return;let i=d(t.publicKey),a=d(r.publicKey);if(!(i&&a&&i!==a))return r}function Gn(e){return e?k(`devices.inventory.rolesAndScopes`,{roles:g(e.roles),scopes:g(e.scopes)}):k(`devices.inventory.none`)}function Kn(e){switch(e){case`scope-upgrade`:return k(`devices.inventory.scopeUpgrade`);case`role-upgrade`:return k(`devices.inventory.roleUpgrade`);case`re-approval`:return k(`devices.inventory.reapproval`);case`new-pairing`:return k(`devices.inventory.newPairing`)}throw Error(`unsupported pending approval kind`)}function qn(e,t,n){let r=d(e.displayName)||e.deviceId,i=typeof e.ts==`number`?y(e.ts):k(`common.na`),a=Vn(e,n),o=e.isRepair?` · ${k(`devices.inventory.repair`)}`:``;return S`
<div class="settings-row device-entry">
${B(D.monitorSmartphone)}
<div class="device-entry__body">
<div class="device-entry__heading">
<span class="settings-row__title">${r}</span>
<span class="device-entry__status"
>${F({kind:`warn`,label:k(`devices.inventory.pendingApproval`)})}</span
>
</div>
<span class="settings-row__desc">
${k(`devices.inventory.requestedAt`,{note:Kn(a.kind),time:i})}${o}
</span>
</div>
<div class="settings-row__control">
<button
class="btn btn--sm"
?disabled=${!t.canManagePairing}
@click=${()=>t.onDeviceApprove(e.requestId)}
>
${k(`devices.inventory.approve`)}
</button>
<button
class="btn btn--sm"
?disabled=${!t.canManagePairing}
@click=${()=>t.onDeviceReject(e.requestId)}
>
${k(`devices.inventory.reject`)}
</button>
${q(t,{name:r,deviceId:e.deviceId})}
</div>
<details class="device-entry__details">
<summary>${k(`devices.inventory.details`)}</summary>
<dl class="device-entry__facts">
<dt class="settings-row__desc">${k(`devices.inventory.deviceIdLabel`)}</dt>
<dd class="settings-row__value settings-row__value--mono" title=${e.deviceId}>
${e.deviceId}
</dd>
${e.remoteIp?S`<dt class="settings-row__desc">${k(`devices.inventory.remoteIpLabel`)}</dt>
<dd class="settings-row__value settings-row__value--mono">${e.remoteIp}</dd>`:w}
<dt class="settings-row__desc">${k(`devices.inventory.requestedAccessLabel`)}</dt>
<dd class="settings-row__value">${Gn(a.requested)}</dd>
${a.approved?S`<dt class="settings-row__desc">
${k(`devices.inventory.approvedAccessLabel`)}
</dt>
<dd class="settings-row__value">${Gn(a.approved)}</dd>`:w}
</dl>
</details>
</div>
`}function Jn(){return(Jn=e((()=>{b(),Hn(),E(),P(),O(),_(),J(),V()})))()}function Yn(e){let t=Ut(e);return{id:e.id,name:e.name,...t}}function Xn(e,t,n){if(n&&e.length===0)return``;let r=e.filter(e=>e.primary.connected).length,i=[k(`devices.inventory.summaryConnected`,{connected:String(r),total:String(e.length)})];return t>0&&i.push(k(`devices.inventory.summaryPending`,{count:String(t)})),i.join(` · `)}function Zn(e){let t=e.devicesList??{pending:[],paired:[]},n=Array.isArray(t.pending)?t.pending:[],r=Array.isArray(t.paired)?t.paired:[],i=zt({paired:r,nodes:e.nodes,presence:e.presence}),a=Vt(e.presence),o=Ht(e.presence,i),s=Bt(i),c=e.loading||e.devicesLoading,l=S`
${s.length>0?S`
<button
class="btn btn--sm danger"
title=${e.canManagePairing?``:k(`devices.readOnly.pairingRequired`)}
?disabled=${!e.canManagePairing}
@click=${()=>e.onInventoryCleanup(s.map(Yn))}
>
${D.trash} ${k(`devices.inventory.cleanupStale`,{count:String(s.length)})}
</button>
`:w}
<button
class="btn"
title=${e.canPairDevice?``:k(`devices.pairing.adminRequired`)}
?disabled=${!e.canPairDevice}
@click=${e.onDevicePairSetupOpen}
>
${D.plus} ${k(`devices.pairing.button`)}
</button>
`,u=i.length===0&&!a,d=S`
${a?cr({kind:`gateway`,entry:a},e):w}
${c&&i.length===0?st():u?ot(k(`devices.inventory.empty`)):i.map(t=>Qn(t,e))}
`;return S`
${e.devicesError?S`<div class="callout danger">${e.devicesError}</div>`:w}
${e.lastError?S`<div class="callout danger">${e.lastError}</div>`:w}
${n.length>0?I({title:k(`devices.inventory.pendingApproval`),count:n.length},Un(n,r,e)):w}
${I({title:k(`devices.inventory.title`),description:Xn(i,n.length,c),actions:l},d)}
${o.length>0?I({title:k(`devices.inventory.connectedWithoutPairing`)},o.map(t=>cr({kind:`unpaired`,entry:t},e))):w}
`}function Qn(e,t){return e.duplicates.length===0?Q(e.primary,t):S`
${Q(e.primary,t)}
<details class="device-group__dups">
<summary>
${k(e.duplicates.length===1?`devices.inventory.olderPairing`:`devices.inventory.olderPairings`,{count:String(e.duplicates.length),name:e.name})}
</summary>
${e.duplicates.map(e=>Q(e,t))}
</details>
`}function $n(e){let t=d(e)?.toLowerCase();return t===`win32`||t===`windows`||t?.startsWith(`windows `)===!0}function er(e){let t=e.node;return t?.paired?t.approvalState===void 0||t.approvalState===`approved`:!1}function tr(e){let t=d(e.node?.coreVersion);if(t)return t;if(d(e.node?.uiVersion))return;let n=d(e.node?.platform)?.toLowerCase();return n===`darwin`||n===`linux`||n===`win32`||n===`windows`?d(e.node?.version):void 0}function nr(e,t){let n=[],r=er(e),i=tr(e),a=d(t);if(r&&i&&a&&i!==a){let e=k(`devices.inventory.versionDriftTitle`,{nodeVersion:i,gatewayVersion:a});n.push(S`<span title=${e}>
${F({kind:`warn`,label:k(`devices.inventory.versionDrift`)})}
</span>`)}e.node?.workerBundle?.status===`missing`&&n.push(S`<span title=${k(`devices.inventory.workerMissingTitle`)}>
${F({kind:`warn`,label:k(`devices.inventory.workerMissing`)})}
</span>`),r&&e.node?.connected===!1&&$n(e.platform)&&n.push(S`<span title=${k(`devices.inventory.manualWakeTitle`)}>
${F({kind:`warn`,label:k(`devices.inventory.manualWake`)})}
</span>`);let o=e.node?.approvalState;return(o===`pending-approval`||o===`pending-reapproval`)&&n.push(F({kind:`warn`,label:k(`devices.inventory.approvalNeeded`)})),n}function rr(e){return k(`devices.inventory.inputAgo`,{time:ie(e*1e3,{suffix:!1})})}function ir(e){let t=[];if(e.platform&&t.push(yt(e.platform)),e.modelIdentifier){let n=Yt(e.modelIdentifier);n&&t.push(n),t.push(e.modelIdentifier)}e.version&&t.push(e.version),e.node?.workerBundle?.status===`installed`&&t.push(k(`devices.inventory.workerVersion`,{version:e.node.workerBundle.version})),e.connected&&e.presence?.lastInputSeconds!=null?t.push(rr(e.presence.lastInputSeconds)):!e.connected&&e.lastSeenAtMs?t.push(k(`devices.inventory.seen`,{time:y(e.lastSeenAtMs)})):!e.connected&&e.approvedAtMs&&t.push(k(`devices.inventory.approved`,{time:y(e.approvedAtMs)}));for(let n of e.roles)t.push(n);return e.autoApproved&&t.push(k(`devices.inventory.autoPaired`)),t.join(` · `)}function ar(e){if(e.length===0)return w;let t=e.slice(0,dr),n=e.length-t.length,r=n>0?` +${n}`:``;return S`<dt class="settings-row__desc">${k(`devices.inventory.commands`)}</dt>
<dd class="settings-row__value settings-row__value--mono">${g(t)}${r}</dd>`}function or(e,t){let n=e.device?.tokens??[],r=e.node?.commands??[],i=e.scopes;return S`
<details class="device-entry__details">
<summary>${k(`devices.inventory.details`)}</summary>
<dl class="device-entry__facts">
<dt class="settings-row__desc">${k(`devices.inventory.deviceIdLabel`)}</dt>
<dd class="settings-row__value settings-row__value--mono" title=${e.id}>${e.id}</dd>
${e.remoteIp?S`<dt class="settings-row__desc">${k(`devices.inventory.remoteIpLabel`)}</dt>
<dd class="settings-row__value settings-row__value--mono">${e.remoteIp}</dd>`:w}
${i.length>0?S`<dt class="settings-row__desc">${k(`devices.inventory.scopesLabel`)}</dt>
<dd class="device-entry__scopes">
${i.map(e=>S`<span class="device-capability device-capability--scope"
>${e}</span
>`)}
</dd>`:w}
${n.length>0?S`<dt class="settings-row__desc">${k(`devices.inventory.tokens`)}</dt>
<dd class="device-entry__tokens">
<table class="device-token-table" aria-label=${k(`devices.inventory.tokens`)}>
<thead>
<tr>
<th scope="col">${k(`devices.inventory.tokenRole`)}</th>
<th scope="col">${k(`devices.inventory.tokenStatus`)}</th>
<th scope="col">${k(`devices.inventory.scopesLabel`)}</th>
<th scope="col">${k(`devices.inventory.tokenAge`)}</th>
<th scope="col">${k(`devices.inventory.actions`)}</th>
</tr>
</thead>
<tbody>
${n.map(n=>ur({id:e.id,name:e.name},n,t))}
</tbody>
</table>
</dd>`:w}
${ar(r)}
</dl>
</details>
`}function Q(e,t){let n=_t({workerSlots:e.node?.workerSlots,capabilities:e.node?.caps,commands:e.node?.commands,unavailable:e.node?.connected!==!0||!er(e)}),r=e.node?.approvalState===`pending-approval`||e.node?.approvalState===`pending-reapproval`?e.node.pendingRequestId:void 0,i=Pn(t,`node:${e.id}`),a=e.node?.connected??e.connected,o=F(a?{kind:`ok`,label:k(`devices.inventory.connected`)}:{kind:`muted`,label:k(`devices.inventory.offline`)});return S`
<div class="settings-row device-entry" title=${n?.title??w}>
${B(tn(e))}
<div class="device-entry__body">
<div class="device-entry__heading">
<span class="settings-row__title">${e.name}</span>
<span class="device-entry__status">${o}</span>
</div>
<span class="settings-row__desc">${ir(e)}</span>
${In(e.node?.hostStats,a?void 0:e.node?.hostStats?.updatedAtMs)}
${An(e.node?.caps??[])}
</div>
<div class="settings-row__control">
${n?.meter??w} ${nr(e,t.gatewayVersion)}
${lr(t,i,e.node?.commands)}
${q(t,{name:e.name,deviceId:e.id,desktopEnvironment:i,pendingRequestId:r,onRemove:()=>t.onInventoryRemove(Yn(e))})}
</div>
${or(e,t)}
</div>
`}function sr(e){let t=[];if(e.platform&&t.push(yt(e.platform)),e.modelIdentifier){let n=Yt(e.modelIdentifier);n&&t.push(n),t.push(e.modelIdentifier)}return e.version&&t.push(e.version),e.lastInputSeconds!=null&&t.push(rr(e.lastInputSeconds)),t}function cr(e,t){let{entry:n}=e,r=e.kind===`gateway`,i=sr(n);r&&t.gatewaySystemInfo&&i.push(k(`devices.inventory.uptime`,{time:le(t.gatewaySystemInfo.uptimeMs)??``})),!r&&Array.isArray(n.roles)&&i.push(...n.roles.filter(Boolean));let a=r?D.server:tn({clientMode:n.mode??void 0,platform:n.platform??void 0,modelIdentifier:n.modelIdentifier??void 0}),o=r?n.host??k(`devices.execApprovals.gateway`):n.host??n.mode??k(`devices.inventory.unknownClient`),s=r?Pn(t,`gateway`):void 0;return S`
<div class="settings-row device-entry">
${B(a)}
<div class="device-entry__body">
<div class="device-entry__heading">
<span class="settings-row__title">${o}</span>
<span class="device-entry__status">
${F(r?{kind:`accent`,label:k(`devices.inventory.gateway`)}:{kind:`muted`,label:k(`devices.inventory.unpaired`)})}
</span>
</div>
${i.length>0?S`<span class="settings-row__desc">${i.join(` · `)}</span>`:w}
${r?In(t.gatewaySystemInfo):w}
</div>
<div class="settings-row__control">
${lr(t,s)}
${q(t,{name:o,deviceId:n.deviceId,desktopEnvironment:s})}
</div>
</div>
`}function lr(e,t,n){return t?S`<button
class="btn btn--sm device-entry__desktop"
title=${k(`devices.inventory.desktopOpenWindow`)}
@click=${()=>Ct(e.basePath,t)}
>
${D.monitor} ${k(`devices.inventory.desktop`)}
</button>`:n?.includes(`desktop.stream`)?S`<span
class="device-capability device-capability--disabled"
aria-disabled="true"
title=${k(`devices.inventory.desktopEnableHint`)}
>${D.monitor} ${k(`devices.inventory.desktop`)}</span
>`:w}function ur(e,t,n){let r=t.revokedAtMs?k(`devices.inventory.revoked`):k(`devices.inventory.active`),i=g(t.scopes),a=y(t.rotatedAtMs??t.createdAtMs??t.lastUsedAtMs??null);return S`
<tr>
<td>${t.role}</td>
<td>${r}</td>
<td>${i}</td>
<td>${a}</td>
<td>
<div class="device-entry__token-actions">
<button
class="btn btn--sm"
?disabled=${!n.canManagePairing}
@click=${()=>n.onDeviceRotate(e,t.role,t.scopes)}
>
${k(`devices.inventory.rotate`)}
</button>
${t.revokedAtMs?w:S`
<button
class="btn btn--sm danger"
?disabled=${!n.canManagePairing}
@click=${()=>n.onDeviceRevoke(e.id,t.role)}
>
${k(`devices.inventory.revoke`)}
</button>
`}
</div>
</td>
</tr>
`}var dr;function fr(){return(fr=e((()=>{b(),wt(),E(),P(),xt(),O(),_(),Qt(),R(),bt(),Nn(),J(),Ln(),Jn(),V(),dr=16})))()}function pr(e){let t=mr(e),n=gn(e);return at(S`
${!e.canManagePairing||!e.canAdmin?S`<div class="callout info" role="note">
${k(!e.canManagePairing&&!e.canAdmin?`devices.readOnly.pairingAndAdminRequired`:e.canManagePairing?`devices.readOnly.adminRequired`:`devices.readOnly.pairingRequired`)}
</div>`:w}
${Zn(e)} ${_n(n)}
${hr(t)}
`,{wide:!0})}function mr(e){let t=e.configForm,n=vr(e.nodes),{defaultBinding:r,agents:i}=yr(t);return{ready:!!t,disabled:!e.canAdmin||e.configSaving||e.configFormMode===`raw`,configDirty:e.configDirty,configLoading:e.configLoading,configSaving:e.configSaving,defaultBinding:r,agents:i,nodes:n,onBindDefault:e.onBindDefault,onBindAgent:e.onBindAgent,onSave:e.onSaveBindings,onLoadConfig:e.onLoadConfig,formMode:e.configFormMode,canAdmin:e.canAdmin}}function hr(e){let t=e.nodes.length>0,n=S`
<button class="btn" ?disabled=${e.disabled||!e.configDirty} @click=${e.onSave}>
${e.configSaving?k(`common.saving`):k(`common.save`)}
</button>
`,r=S`
${e.canAdmin?w:N({title:k(`devices.readOnly.adminRequired`)})}
${e.formMode===`raw`?N({title:k(`devices.binding.formModeHint`)}):w}
${e.ready?S`
${N({title:k(`devices.binding.defaultBinding`),description:t?k(`devices.binding.defaultBindingHint`):S`${k(`devices.binding.defaultBindingHint`)} ${k(`devices.binding.noNodes`)}`,control:_r(null,e)})}
${e.agents.length===0?N({title:k(`devices.binding.noAgents`)}):e.agents.map(t=>gr(t,e))}
`:N({title:k(`devices.binding.loadConfigHint`),control:S`
<button class="btn" ?disabled=${e.configLoading} @click=${e.onLoadConfig}>
${e.configLoading?k(`common.loading`):k(`common.loadConfig`)}
</button>
`})}
`;return I({title:k(`devices.binding.execNodeBinding`),description:k(`devices.binding.execNodeBindingSubtitle`),actions:n},r)}function gr(e,t){let n=e.binding??`__default__`,r=e.name?.trim()?`${e.name} (${e.id})`:e.id;return N({title:r,description:S`
${e.isDefault?k(`devices.binding.defaultAgent`):k(`devices.binding.agent`)} ·
${n===`__default__`?k(`devices.binding.usesDefault`,{node:t.defaultBinding??k(`devices.binding.any`)}):k(`devices.binding.override`,{node:e.binding??``})}
`,control:_r(e,t)})}function _r(e,t){let n=e===null,r=n?``:`__default__`,i=n?t.defaultBinding??``:e.binding??`__default__`;return S`
<select
class="settings-select"
aria-label=${k(n?`devices.binding.node`:`devices.binding.binding`)}
?disabled=${t.disabled||t.nodes.length===0}
@change=${n=>{let r=n.target.value.trim();e===null?t.onBindDefault(r||null):t.onBindAgent(e.id,r===`__default__`?null:r)}}
>
<option value=${r} ?selected=${i===r}>
${k(n?`devices.binding.anyNode`:`devices.binding.useDefault`)}
</option>
${t.nodes.map(e=>S`<option value=${e.id} ?selected=${i===e.id}>${e.label}</option>`)}
</select>
`}function vr(e){return en(e,[`system.run`])}function yr(e){let t={id:`main`,name:void 0,isDefault:!0,binding:null};if(!e||typeof e!=`object`)return{defaultBinding:null,agents:[t]};let n=(e.tools??{}).exec??{},r=typeof n.node==`string`&&n.node.trim()?n.node.trim():null,i=$t(e).map(e=>{let t=(e.record.tools??{}).exec??{},n=typeof t.node==`string`&&t.node.trim()?t.node.trim():null;return{id:e.id,name:e.name,isDefault:e.isDefault,binding:n}});return i.length===0?{defaultBinding:r,agents:[t]}:{defaultBinding:r,agents:i}}function br(){return(br=e((()=>{b(),P(),O(),En(),fr(),V()})))()}var xr,Sr,Cr,$;function wr(){return(wr=e((()=>{ee(),Xe(),b(),Ae(),f(),Re(),Le(),He(),ze(),lt(),Ot(),P(),Et(),O(),de(),me(),Qe(),ae(),R(),pt(),re(),mt(),te(),br(),xr=`https://docs.openclaw.ai/nodes`,Sr=3e4,Cr=6e4,$=class extends ue{constructor(...e){super(...e),this.presence=[],this.gatewaySystemInfo=null,this.desktopEnvironments=[],this.systemInfoUnavailable=!1,this.pageState=oe(),this.canPairDevice=!1,this.canManagePairing=!1,this.canAdmin=!1,this.execApprovalsTarget=`gateway`,this.execApprovalsTargetNodeId=null,this.pendingConfirmation=null,this.routeDataInitialized=!1,this.gateway=new ft(this,{getGateway:()=>this.context?.gateway,onIdentityChange:e=>this.resetServerState(e.snapshot),invalidateRequests:e=>{this.pageState.requestGeneration=this.gateway.epoch,!e.identityChanged&&e.snapshot.phase!==`connected`&&this.resetServerState(e.snapshot),this.presenceTask.run([null,null])},onSnapshot:e=>this.handleGatewaySnapshot(e),ensureInitialData:()=>this.ensureInitialData()}),this.presenceTask=new j(this,{autoRun:!1,args:()=>[this.gateway.connected?this.gateway.gateway:null,this.gateway.connected?this.gateway.client:null],task:([e,t],{signal:n})=>e&&t?t.request(`system-presence`,{},{signal:n}):Ye,onComplete:e=>{Array.isArray(e)&&(this.presence=e)},onError:e=>{ve(e)&&(this.presence=[])}}),this.systemInfoTask=new j(this,{args:()=>[this.gateway.gateway,this.canLoadSystemInfo?this.gateway.client:null],task:([e,t],{signal:n})=>e&&t?t.request(`system.info`,{},{signal:n}):Ye,onComplete:e=>{this.gatewaySystemInfo=e,this.systemInfoPolling.stop(),this.systemInfoPolling.start()},onError:e=>{ve(e)&&(this.gatewaySystemInfo=null,this.systemInfoUnavailable=!0,this.systemInfoPolling.stop())}}),this.environmentsTask=new j(this,{args:()=>[this.gateway.gateway,this.canLoadDesktopEnvironments?this.gateway.client:null],task:([e,t],{signal:n})=>e&&t?t.request(`environments.list`,{},{signal:n}):Ye,onComplete:e=>{this.desktopEnvironments=e.environments},onError:()=>{this.desktopEnvironments=[]}}),this.systemInfoPolling=new ht(this,Cr,()=>this.refreshSystemInfo(),!1),this.polling=new ht(this,Sr,()=>{this.refreshNodeInventory(!0),this.canManagePairing&&this.runPageTask(e=>h(e,{quiet:!0}))},!1),this.subscriptions=new ke(this).watch(()=>this.context?.runtimeConfig,(e,t)=>e.subscribe(t)).effect(()=>this.context?.gateway,e=>e.subscribeEvents(t=>{if(this.gateway.gateway!==e||this.context.gateway!==e)return;let n=t.event===`presence`?T(t.payload):null;if(n){let e=Wt(n)!==Wt(this.presence);this.presenceTask.run([null,null]),this.presence=n,e&&(this.canManagePairing&&this.runPageTask(e=>h(e,{quiet:!0})),this.refreshNodeInventory(!0))}(t.event===`device.pair.changed`||t.event===`device.pair.requested`||t.event===`device.pair.resolved`)&&this.canManagePairing&&this.runPageTask(e=>h(e,{quiet:!0})),(t.event===`node.pair.requested`||t.event===`node.pair.resolved`||t.event===`node.runnerInventory.changed`||t.event===`node.hostStats`)&&this.refreshNodeInventory(!0)}))}willUpdate(e){e.has(`routeData`)&&this.applyRouteData()}updated(e){e.has(`routeData`)&&this.ensureInitialData()}disconnectedCallback(){this.cancelPendingConfirmation(),this.subscriptions.clear(),this.presenceTask.run([null,null]),this.resetInventoryDetails(),this.presence=[],this.canPairDevice=!1,this.canManagePairing=!1,this.canAdmin=!1,super.disconnectedCallback()}get requestGeneration(){return this.pageState.requestGeneration}handleGatewaySnapshot(e){let t=e.snapshot;if(this.pageState.client=t.client,this.pageState.connected=t.phase===`connected`,this.pageState.requestGeneration=this.gateway.epoch,this.syncGatewayState(t),this.canLoadSystemInfo||(this.systemInfoTask.run([null,null]),this.gatewaySystemInfo=null),this.canLoadDesktopEnvironments||(this.environmentsTask.run([null,null]),this.desktopEnvironments=[]),this.routeDataInitialized&&t.phase===`connected`&&t.client&&(e.identityChanged||e.connectionChanged)){let e=T(t.hello?.snapshot);this.presence=e??[],this.loadPresence()}this.syncPolling()}syncGatewayState(e){let t=e.phase===`connected`,n=e.hello?.auth??null;this.canAdmin=t&&Ie(n),this.canManagePairing=t&&(!n||Ne(n)),this.canPairDevice=this.canAdmin}applyRouteData(){let e=this.routeData;if(!e)return;this.routeDataInitialized=!0;let t=this.context.gateway.snapshot;if(!this.gateway.isRouteDataCurrent(e)){this.resetServerState(t),this.presence=T(t.hello?.snapshot)??[],this.loadPresence(),this.ensureInitialData();return}this.pageState={...e.devices,client:t.client,connected:t.phase===`connected`,requestGeneration:this.gateway.epoch};let n=T(t.hello?.snapshot);n&&(this.presence=n),this.loadPresence()}resetServerState(e){this.cancelPendingConfirmation(),this.pageState.requestGeneration+=1;let t=oe({client:e.client,connected:e.phase===`connected`});t.requestGeneration=this.gateway.epoch,this.pageState=t,this.presenceTask.run([null,null]),this.presence=[],this.resetInventoryDetails()}async runPageTask(e){let t=this.pageState;try{let n=e(t);return this.pageState===t&&this.requestUpdate(),await n}finally{this.pageState===t&&this.requestUpdate()}}ensureInitialData(){let e=this.pageState;if(!e.connected||!e.client||!this.routeDataInitialized)return;!e.nodes.length&&!e.nodesLoading&&this.refreshNodeInventory(),this.canManagePairing&&!e.devicesList&&!e.devicesLoading&&this.runPageTask(e=>h(e));let t=this.context.runtimeConfig.state;!t.configSnapshot&&!t.configLoading&&this.context.runtimeConfig.refresh(),this.canAdmin&&!e.execApprovalsSnapshot&&!e.execApprovalsLoading&&this.runPageTask(e=>he(e,this.resolveExecApprovalsTarget()))}syncPolling(){if(this.canLoadSystemInfo?this.systemInfoPolling.start():this.systemInfoPolling.stop(),this.gateway.connected&&this.gateway.client){this.polling.start();return}this.polling.stop()}get canLoadSystemInfo(){let e=this.gateway.snapshot;return this.isConnected&&e?.phase===`connected`&&!this.systemInfoUnavailable&&Ze(e,`system.info`)===!0}get canLoadDesktopEnvironments(){let e=this.gateway.snapshot;return this.isConnected&&!!(e&&Fe(e))}refreshSystemInfo(){this.canLoadSystemInfo&&this.systemInfoTask.status!==Je.PENDING&&this.systemInfoTask.run()}refreshNodeInventory(e=!1){this.refreshSystemInfo(),this.canLoadDesktopEnvironments&&this.environmentsTask.status!==Je.PENDING&&this.environmentsTask.run(),this.runPageTask(t=>Ee(t,{quiet:e}))}resetInventoryDetails(){this.systemInfoTask.run([null,null]),this.environmentsTask.run([null,null]),this.systemInfoPolling.stop(),this.gatewaySystemInfo=null,this.desktopEnvironments=[],this.systemInfoUnavailable=!1}loadPresence(){let e=this.gateway.gateway,t=this.gateway.client;return!e||!this.gateway.connected||!t?Promise.resolve():this.presenceTask.run([e,t])}cancelPendingConfirmation(){this.pendingConfirmation?.abort(),this.pendingConfirmation=null}async confirmDestructiveAction(e,t){if(this.pendingConfirmation)return;let n=new AbortController;this.pendingConfirmation=n;let r=this.requestGeneration,i=this.gateway.client,a=await ct({...e,danger:!0,signal:n.signal});this.pendingConfirmation===n&&(this.pendingConfirmation=null),!(!a||n.signal.aborted||r!==this.requestGeneration||i!==this.gateway.client||!this.gateway.connected||!this.canManagePairing)&&await this.runPageTask(t)}confirmInventoryRemoval(e){if(!this.canManagePairing)return Promise.resolve();if(e.kind===`entry`){let t=e.entry;return this.confirmDestructiveAction({title:k(`devices.inventory.removePromptTitle`,{name:t.name}),message:k(`devices.inventory.removePromptBody`),details:k(`devices.inventory.deviceId`,{id:t.id}),confirmLabel:k(`devices.inventory.remove`)},e=>be(e,t))}let t=e.entries;return this.confirmDestructiveAction({title:k(t.length===1?`devices.inventory.removeStalePromptTitleOne`:`devices.inventory.removeStalePromptTitle`,{count:String(t.length)}),message:k(`devices.inventory.removeStalePromptBody`),confirmLabel:k(`devices.inventory.remove`)},e=>Te(e,t))}confirmPairingReject(e,t){return this.canManagePairing?this.confirmDestructiveAction({title:k(e===`device`?`devices.inventory.rejectDevicePromptTitle`:`devices.inventory.rejectNodePromptTitle`),message:k(`devices.inventory.rejectPromptBody`),confirmLabel:k(`devices.inventory.reject`)},n=>e===`device`?Ce(n,t):ge(n,t)):Promise.resolve()}confirmTokenRevoke(e,t){return this.canManagePairing?this.confirmDestructiveAction({title:k(`devices.inventory.revokePromptTitle`,{role:t}),message:k(`devices.inventory.revokePromptBody`),details:k(`devices.inventory.deviceId`,{id:e}),confirmLabel:k(`devices.inventory.revoke`)},n=>pe(n,{deviceId:e,gatewayUrl:this.context.gateway.connection.gatewayUrl,role:t})):Promise.resolve()}async reportRotationOutcome(e,t,n){if(!this.canManagePairing)return;let r=await this.runPageTask(r=>_e(r,{deviceId:e.id,gatewayUrl:this.context.gateway.connection.gatewayUrl,role:t,scopes:n}));r&&await(r.delivery===`in-band`?Dt({title:k(`devices.inventory.rotatePromptTitle`,{role:t}),message:k(`devices.inventory.rotatePromptBody`),secret:r.token,acknowledgeLabel:k(`devices.inventory.rotateAcknowledge`),dismissHint:k(`devices.inventory.rotateDismissHint`)}):Dt({title:k(`devices.inventory.rotateWithheldTitle`,{device:e.name}),status:`success`,message:k(`devices.inventory.rotateWithheldNext`),callout:k(`devices.inventory.rotateWithheldException`),acknowledgeLabel:k(`common.close`),note:k(`devices.inventory.rotateWithheldNote`)}))}resolveExecApprovalsTarget(){return this.execApprovalsTarget===`node`&&this.execApprovalsTargetNodeId?{kind:`node`,nodeId:this.execApprovalsTargetNodeId}:{kind:`gateway`}}render(){let e=this.pageState,t=this.context.runtimeConfig.state,n=this.context.gateway.snapshot,r=n.phase===`connected`&&n.hello?.server?.version?.trim()||null;return S`
<section class="content-header">
<div>
<div class="page-title">${Ve(`devices`)}</div>
<div class="page-subtitle">
${Pe(`devices`)} ${dt(xr)}
</div>
</div>
</section>
${Tt(pr({loading:e.nodesLoading,nodes:e.nodes,presence:this.presence,gatewayVersion:r,basePath:this.context.basePath,gatewaySystemInfo:this.gatewaySystemInfo,desktopEnvironments:this.desktopEnvironments,lastError:e.lastError,devicesLoading:e.devicesLoading,devicesError:e.devicesError,devicesList:e.devicesList,canPairDevice:this.canPairDevice,canManagePairing:this.canManagePairing,canAdmin:this.canAdmin,configForm:Oe(t),configLoading:t.configLoading,configSaving:t.configSaving,configDirty:t.configFormDirty,configFormMode:t.configFormMode,execApprovalsLoading:e.execApprovalsLoading,execApprovalsSaving:e.execApprovalsSaving,execApprovalsDirty:e.execApprovalsDirty,execApprovalsSnapshot:e.execApprovalsSnapshot,execApprovalsForm:e.execApprovalsForm,execApprovalsSelectedAgent:e.execApprovalsSelectedAgent,execApprovalsTarget:this.execApprovalsTarget,execApprovalsTargetNodeId:this.execApprovalsTargetNodeId,onDevicePairSetupOpen:()=>{this.canAdmin&&this.context.overlays.openDevicePairSetup()},onDeviceApprove:e=>{this.canManagePairing&&this.runPageTask(t=>ne(t,e))},onDeviceReject:e=>void this.confirmPairingReject(`device`,e),onNodeApprove:e=>{this.canManagePairing&&this.runPageTask(t=>Se(t,e))},onNodeReject:e=>void this.confirmPairingReject(`node`,e),onInventoryRemove:e=>void this.confirmInventoryRemoval({kind:`entry`,entry:e}),onInventoryCleanup:e=>{e.length>0&&this.confirmInventoryRemoval({kind:`stale`,entries:e})},onDeviceRotate:(e,t,n)=>void this.reportRotationOutcome(e,t,n),onDeviceRevoke:(e,t)=>void this.confirmTokenRevoke(e,t),onLoadConfig:()=>void this.context.runtimeConfig.refresh({discardPendingChanges:!0}),onLoadExecApprovals:()=>this.canAdmin?void this.runPageTask(e=>he(e,this.resolveExecApprovalsTarget())):void 0,onBindDefault:e=>{this.canAdmin&&(e?this.context.runtimeConfig.patchForm([`tools`,`exec`,`node`],e):this.context.runtimeConfig.removeFormValue([`tools`,`exec`,`node`]))},onBindAgent:(e,t)=>{if(!this.canAdmin)return;let n=this.context.runtimeConfig.agentEntry(e,{ensure:!!t});if(!n)return;let r=[...n.path,`tools`,`exec`,`node`];t?this.context.runtimeConfig.patchForm(r,t):this.context.runtimeConfig.removeFormValue(r)},onSaveBindings:()=>{this.canAdmin&&this.context.runtimeConfig.save()},onExecApprovalsTargetChange:(t,n)=>{this.execApprovalsTarget=t,this.execApprovalsTargetNodeId=n,e.execApprovalsSnapshot=null,e.execApprovalsForm=null,e.execApprovalsDirty=!1,e.execApprovalsSelectedAgent=null,this.requestUpdate()},onExecApprovalsSelectAgent:t=>{e.execApprovalsSelectedAgent=t,this.requestUpdate()},onExecApprovalsPatch:(e,t)=>this.canAdmin?void this.runPageTask(n=>xe(n,e,t)):void 0,onExecApprovalsRemove:e=>this.canAdmin?void this.runPageTask(t=>ce(t,e)):void 0,onSaveExecApprovals:()=>this.canAdmin?void this.runPageTask(e=>De(e,this.resolveExecApprovalsTarget())):void 0}))}
`}},p([s({context:Be,subscribe:!0})],$.prototype,`context`,void 0),p([Me({attribute:!1})],$.prototype,`routeData`,void 0),p([C()],$.prototype,`presence`,void 0),p([C()],$.prototype,`gatewaySystemInfo`,void 0),p([C()],$.prototype,`desktopEnvironments`,void 0),p([C()],$.prototype,`pageState`,void 0),p([C()],$.prototype,`canPairDevice`,void 0),p([C()],$.prototype,`canManagePairing`,void 0),p([C()],$.prototype,`canAdmin`,void 0),p([C()],$.prototype,`execApprovalsTarget`,void 0),p([C()],$.prototype,`execApprovalsTargetNodeId`,void 0),customElements.get(`openclaw-devices-page`)||customElements.define(`openclaw-devices-page`,$)})))()}wr();
//# sourceMappingURL=devices-page-BrUbWmhw.js.map