@camstack/addon-admin-ui 1.1.41 → 1.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddLocationWizard-DDXUy4v4.js → AddLocationWizard-Dt5C5ktF.js} +1 -1
- package/dist/assets/{AddonCollectionPage-CdBRWx4Z.js → AddonCollectionPage-DgGFPQ4Z.js} +1 -1
- package/dist/assets/{Addons-BaRcCf0b.js → Addons-CnwWbWu2.js} +1 -1
- package/dist/assets/{AdminTabs-XUdY_sVi.js → AdminTabs-BAYg3tma.js} +1 -1
- package/dist/assets/{BrokerForm-BBCWAiOX.js → BrokerForm-BUh5_GHY.js} +1 -1
- package/dist/assets/{Capabilities-D1-lSB03.js → Capabilities-6dm5hAf7.js} +1 -1
- package/dist/assets/{CapabilityBadges-CUdgLXLu.js → CapabilityBadges-CoE4NK_X.js} +1 -1
- package/dist/assets/{Cluster-QPC1Iy7P.js → Cluster-bWKrMQmR.js} +1 -1
- package/dist/assets/{Dashboard-CndHN9K0.js → Dashboard-DoI1UWjH.js} +1 -1
- package/dist/assets/{Data-Dl4ZD_ME.js → Data-CU1Sj30O.js} +1 -1
- package/dist/assets/{DetectionIntelligence-B_LB4YpM.js → DetectionIntelligence-B7IBjpSz.js} +1 -1
- package/dist/assets/{DeviceDetail-Bn9A8BHM.js → DeviceDetail-Uhh8yNeg.js} +1 -1
- package/dist/assets/{Devices-Lgcz5N9s.js → Devices-DWg2wZuR.js} +1 -1
- package/dist/assets/Identity-vBnf9yyK.js +1 -0
- package/dist/assets/{IntegrationDetail-B2_LdhjH.js → IntegrationDetail-CaUgQn6h.js} +1 -1
- package/dist/assets/{Integrations-TBXqHoCr.js → Integrations-Bhuu52IV.js} +1 -1
- package/dist/assets/{Integrations-CXA91E8b.js → Integrations-CGAmOKde.js} +1 -1
- package/dist/assets/{MyAccess-ClZm0Jn8.js → MyAccess-BGlWviZY.js} +1 -1
- package/dist/assets/{Network-B4lyyXej.js → Network-0_IN4mF0.js} +1 -1
- package/dist/assets/{NotificationTargets-B_b07Zza.js → NotificationTargets-D_gqjBo6.js} +1 -1
- package/dist/assets/{Pipeline-DRc6MbIp.js → Pipeline-D7_LycCu.js} +1 -1
- package/dist/assets/{ProviderIcon-CBMYbRUJ.js → ProviderIcon-DWUI45__.js} +1 -1
- package/dist/assets/{ScanNetworkModal-CzCR88QH.js → ScanNetworkModal-DLthdMRO.js} +1 -1
- package/dist/assets/{ServerManagement-B-8uw3rK.js → ServerManagement-B0Y4Ht6c.js} +1 -1
- package/dist/assets/{Settings-CEgTSu7X.js → Settings-BHXRXbZ_.js} +1 -1
- package/dist/assets/{Showroom-CHUIx1dh.js → Showroom-BueX_aGI.js} +1 -1
- package/dist/assets/{build-cluster-graph-zywL4kdg.js → build-cluster-graph-BfGnN-3u.js} +1 -1
- package/dist/assets/circle-check-big-CaIgU21S.js +1 -0
- package/dist/assets/{copy-Dg8sRyzo.js → copy-m2pXBbx1.js} +1 -1
- package/dist/assets/{download-BGuuy16v.js → download-BTbybpTM.js} +1 -1
- package/dist/assets/{index-ytlu1zLA.js → index-B1_QSW1-.js} +2 -2
- package/dist/assets/{key-round-vlxJZxKs.js → key-round-wrab22dR.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-6e39c7a6.js → mf-entry-bootstrap-0-299fcc96.js} +1 -1
- package/dist/assets/{pencil-83ecR-RZ.js → pencil-BTZ_ARWZ.js} +1 -1
- package/dist/assets/plus-D8cNOgfB.js +1 -0
- package/dist/assets/{radio-CEO_EgWy.js → radio-Dl0ztaa5.js} +1 -1
- package/dist/assets/{refresh-cw-D3lSiCUr.js → refresh-cw-DSs5vJtk.js} +1 -1
- package/dist/assets/{rotate-ccw-CMfkjGSf.js → rotate-ccw-BxheL-r1.js} +1 -1
- package/dist/assets/rotate-cw-CnulL4mX.js +1 -0
- package/dist/assets/search-Doel3A5h.js +1 -0
- package/dist/assets/{sparkles-BpSwnKd3.js → sparkles-DT3og4D3.js} +1 -1
- package/dist/assets/square-BKk3Mgby.js +1 -0
- package/dist/assets/{square-check-big-CFq6G71p.js → square-check-big-DO1vf2M_.js} +1 -1
- package/dist/assets/{upload-HWVFimmj.js → upload-B1iQ0ZwN.js} +1 -1
- package/dist/assets/{useDevice-C_YOPa-f.js → useDevice-BSgWExnS.js} +1 -1
- package/dist/assets/{wifi-BWY-AmyR.js → wifi-DA7liSWM.js} +1 -1
- package/dist/assets/{zap-C-YHlMV5.js → zap-5n5__h-V.js} +1 -1
- package/dist/favicon.svg +9 -0
- package/dist/icons/apple-touch-icon.png +0 -0
- package/dist/icons/icon-192.png +0 -0
- package/dist/icons/icon-512.png +0 -0
- package/dist/index.html +2 -2
- package/dist/server/addon.js +1 -1
- package/package.json +1 -1
- package/dist/assets/Identity-B1Kzi6PH.js +0 -1
- package/dist/assets/circle-check-big-CZN_jqzZ.js +0 -1
- package/dist/assets/plus-CoSJDKHU.js +0 -1
- package/dist/assets/rotate-cw-DET6SPSh.js +0 -1
- package/dist/assets/search-CP7UByUF.js +0 -1
- package/dist/assets/square-W_PUWTN3.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./index-
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./index-
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./index-
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`radio`,[[`path`,{d:`M4.9 19.1C1 15.2 1 8.8 4.9 4.9`,key:`1vaf9d`}],[`path`,{d:`M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5`,key:`u1ii0m`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5`,key:`1j5fej`}],[`path`,{d:`M19.1 4.9C23 8.8 23 15.1 19.1 19`,key:`10b0cb`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./index-
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./index-
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),n=e(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]);export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./index-
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./index-
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`square-check-big`,[[`path`,{d:`M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5`,key:`1uzm8b`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./index-
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Cn as e,Dn as t,xn as n}from"./src-ojhqTnBF.js";import{K as r,Q as i}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js";import{H as a}from"./index-
|
|
1
|
+
import{Cn as e,Dn as t,xn as n}from"./src-ojhqTnBF.js";import{K as r,Q as i}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js";import{H as a}from"./index-B1_QSW1-.js";var o=a(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]);i();function s(e){return t({addonId:e})}function c(t){return e({deviceId:t},{enabled:Number.isFinite(t)})}var l=3e4,u=2e3;function d(e){let t=r(0);return t.current===0&&(t.current=Date.now()),n({parentDeviceId:e},{enabled:Number.isFinite(e),staleTime:0,refetchOnMount:`always`,refetchInterval:e=>{let n=e.state.data;return n&&n.length>0||Date.now()-t.current>=l?!1:u}})}export{o as i,d as n,s as r,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./index-
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e}from"./index-
|
|
1
|
+
import{H as e}from"./index-B1_QSW1-.js";var t=e(`mic`,[[`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z`,key:`131961`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`,key:`x3vr5v`}]]),n=e(`video`,[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),r=e(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);export{n,t as r,r as t};
|
package/dist/favicon.svg
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">
|
|
2
|
+
<!-- CamStack "Stacked Lens" — IDENTICAL to the original (centered, same size) -->
|
|
2
3
|
<rect x="8" y="28" width="48" height="28" rx="6" fill="#292524"/>
|
|
3
4
|
<rect x="12" y="16" width="40" height="28" rx="6" fill="#44403c"/>
|
|
4
5
|
<rect x="16" y="4" width="32" height="28" rx="6" fill="#f59e42"/>
|
|
5
6
|
<circle cx="32" cy="18" r="8" fill="#0c0a09" opacity="0.3"/>
|
|
6
7
|
<circle cx="32" cy="18" r="5" fill="#0c0a09" opacity="0.2"/>
|
|
7
8
|
<circle cx="32" cy="18" r="2.5" fill="#fafaf9" opacity="0.8"/>
|
|
9
|
+
|
|
10
|
+
<!-- Wrench badge added on top, bottom-right corner (lens untouched) -->
|
|
11
|
+
<circle cx="50" cy="50" r="13.5" fill="#0c0a09"/>
|
|
12
|
+
<circle cx="50" cy="50" r="12.5" fill="none" stroke="#f59e42" stroke-width="2"/>
|
|
13
|
+
<g transform="translate(50 50) rotate(12) translate(-12 -12)"
|
|
14
|
+
stroke="#f59e42" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round" fill="none">
|
|
15
|
+
<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/>
|
|
16
|
+
</g>
|
|
8
17
|
</svg>
|
|
Binary file
|
package/dist/icons/icon-192.png
CHANGED
|
Binary file
|
package/dist/icons/icon-512.png
CHANGED
|
Binary file
|
package/dist/index.html
CHANGED
|
@@ -99,13 +99,13 @@
|
|
|
99
99
|
})
|
|
100
100
|
})()
|
|
101
101
|
</script>
|
|
102
|
-
<script type="module" crossorigin src="/assets/mf-entry-bootstrap-0-
|
|
102
|
+
<script type="module" crossorigin src="/assets/mf-entry-bootstrap-0-299fcc96.js"></script>
|
|
103
103
|
<link rel="modulepreload" crossorigin href="/assets/schemas-CuE8EXQ7.js">
|
|
104
104
|
<link rel="modulepreload" crossorigin href="/assets/src-D5vrhmeM.js">
|
|
105
105
|
<link rel="modulepreload" crossorigin href="/assets/player-overlays-BrMuuVRR.js">
|
|
106
106
|
<link rel="modulepreload" crossorigin href="/assets/src-ojhqTnBF.js">
|
|
107
107
|
<link rel="stylesheet" crossorigin href="/assets/index-BNTiPmxL.css">
|
|
108
|
-
<link rel="modulepreload" crossorigin href="/assets/hostInit-CagYACyE.js"><link rel="modulepreload" crossorigin href="/assets/index-
|
|
108
|
+
<link rel="modulepreload" crossorigin href="/assets/hostInit-CagYACyE.js"><link rel="modulepreload" crossorigin href="/assets/index-B1_QSW1-.js"><link rel="modulepreload" crossorigin href="/assets/remoteEntry-D9u56wxx.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DmurZU5p.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-CSJxMxg6.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-DkcC9IVF.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__konva__loadShare__.js-B7XYY0cV.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.js-D9-wIasd.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DstpX0yz.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.js-BBBrLLEa.js"></head>
|
|
109
109
|
<body>
|
|
110
110
|
<div id="root"></div>
|
|
111
111
|
<!-- Lock the app shell at 1x zoom. iOS Safari ignores `user-scalable=no`
|
package/dist/server/addon.js
CHANGED
|
@@ -23082,7 +23082,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
23082
23082
|
capability: adminUiCapability,
|
|
23083
23083
|
provider: {
|
|
23084
23084
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
23085
|
-
getVersion: async () => ({ version: "1.1.
|
|
23085
|
+
getVersion: async () => ({ version: "1.1.42" })
|
|
23086
23086
|
}
|
|
23087
23087
|
}];
|
|
23088
23088
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Bi as e,Gi as t,Hi as n,Ii as r,Ji as i,Ki as a,Li as o,Na as s,Ri as c,Ui as l,Vi as u,Wi as d,Xi as f,Yi as p,_t as m,c as h,ea as g,ma as _,qi as v,s as y,vt as b,zi as x}from"./src-ojhqTnBF.js";import{Q as S,S as C,W as w,b as T,o as E,q as D,x as O}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js";import{t as k}from"./circle-check-big-CZN_jqzZ.js";import{t as A}from"./copy-Dg8sRyzo.js";import{t as j}from"./key-round-vlxJZxKs.js";import{t as M}from"./AddonCollectionPage-CdBRWx4Z.js";import{t as ee}from"./plus-CoSJDKHU.js";import{H as N,I as P,S as F,T as I,d as L,i as R,l as z,r as B,s as V,w as H}from"./index-ytlu1zLA.js";import{t as U}from"./AdminPage-BwmGKnRf.js";import{t as W}from"./AdminTabs-XUdY_sVi.js";import{t as G}from"./addon-display-names-DvSEQty-.js";var te=N(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),K=N(`key-square`,[[`path`,{d:`M12.4 2.7a2.5 2.5 0 0 1 3.4 0l5.5 5.5a2.5 2.5 0 0 1 0 3.4l-3.7 3.7a2.5 2.5 0 0 1-3.4 0L8.7 9.8a2.5 2.5 0 0 1 0-3.4z`,key:`165ttr`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`m9.4 10.6-6.814 6.814A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814`,key:`1ubxi2`}]]),ne=N(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),q=N(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),J=N(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]);S();function re({userId:t,username:n,onClose:r}){let i=E(),a=g(),o=e({userId:t}),c=o.data,l=()=>i.invalidateQueries({queryKey:[[`userManagement`,`getTotpStatus`]]}),u=x({onSuccess:()=>{l(),r()}}),d=o.isLoading?`loading`:c?.enabled?`enrolled`:`not_enrolled`;return O(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm p-4`,children:C(`div`,{className:`w-full max-w-md rounded-xl border border-border bg-surface shadow-2xl overflow-hidden`,children:[C(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-border`,children:[C(`div`,{className:`flex items-center gap-2`,children:[O(z,{className:`h-4 w-4 text-primary`}),C(`div`,{children:[O(`div`,{className:`text-sm font-medium text-foreground`,children:`Two-factor authentication`}),C(`div`,{className:`text-[11px] text-foreground-subtle`,children:[`User: `,O(`span`,{className:`font-mono`,children:n})]})]})]}),O(`button`,{onClick:r,className:`p-1 rounded hover:bg-foreground-subtle/10 text-foreground-subtle`,children:O(R,{className:`h-4 w-4`})})]}),C(`div`,{className:`p-4 space-y-4`,children:[d===`loading`&&C(`div`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[O(F,{className:`h-3.5 w-3.5 animate-spin`}),`Checking status…`]}),d===`not_enrolled`&&C(`div`,{className:`rounded-md border border-border bg-surface-hover/30 px-3 py-2.5 flex items-start gap-2.5 text-xs text-foreground-subtle`,children:[O(H,{className:`h-4 w-4 mt-0.5 shrink-0`}),C(`div`,{children:[O(`div`,{className:`font-medium text-foreground`,children:`2FA not enrolled`}),O(`p`,{className:`mt-0.5`,children:`Only the user themselves can enable 2FA, from their own profile page.`})]})]}),d===`enrolled`&&c&&C(T,{children:[C(`div`,{className:`rounded-md border border-emerald-500/30 bg-emerald-500/5 px-3 py-2.5 flex items-start gap-2.5`,children:[O(k,{className:`h-4 w-4 mt-0.5 text-emerald-500 shrink-0`}),C(`div`,{className:`text-xs text-foreground space-y-0.5`,children:[O(`div`,{className:`font-medium`,children:`2FA is active`}),C(`div`,{className:`text-foreground-subtle`,children:[`Enrolled on`,` `,c.confirmedAt?new Date(c.confirmedAt).toLocaleString():`—`]})]})]}),O(`div`,{className:`text-[11px] text-foreground-subtle`,children:`Removing here clears the server-side secret. Use this only when the user has lost access — they'll have to re-enroll from their profile page afterwards.`}),C(`div`,{className:`flex justify-end gap-2`,children:[O(s,{onClick:r,variant:`secondary`,children:`Close`}),C(`button`,{onClick:async()=>{await a({title:`Remove 2FA`,message:`Remove two-factor authentication for "${n}"? They'll be able to log in with just their password until they re-enroll from their own profile page.`,confirmLabel:`Remove`,variant:`danger`})&&u.mutate({userId:t})},disabled:u.isPending,className:`rounded bg-danger px-3 py-1.5 text-xs font-medium text-white hover:bg-danger/90 disabled:opacity-50 inline-flex items-center gap-1`,children:[u.isPending?O(F,{className:`h-3 w-3 animate-spin`}):O(R,{className:`h-3 w-3`}),`Remove 2FA`]})]})]})]})]})})}function ie(){let e=E(),{user:n}=B(),[r,i]=D(!1),[a,s]=D(``),[l,u]=D(``),[m,h]=D(!1),[v,y]=D(null),{data:b,isLoading:x,isError:S}=d(),w=g(),T=()=>e.invalidateQueries({queryKey:[[`userManagement`,`listUsers`]]}),k=o({onSuccess:()=>{T(),i(!1),s(``),u(``),h(!1),y(null)},onError:e=>{y(e instanceof Error?e.message:`Failed to create user`)}}),A=c({onSuccess:T}),j=f({onSuccess:T}),M=t({onSuccess:T}),N=p({onSuccess:()=>{T(),I(null)}}),[P,I]=D(null),[H,W]=D(null),G=b??[];async function te(e){await w({title:`Delete user`,message:`Permanently delete user "${e.username}"? This cannot be undone — any active sessions will be revoked on next request.`,confirmLabel:`Delete`,variant:`danger`})&&A.mutate({id:e.id})}async function K(e){let t=window.prompt(`New password for "${e.username}":`);if(t){if(t.length<8){window.alert(`Password must be at least 8 characters.`);return}await w({title:`Reset password`,message:`Reset the password for "${e.username}"? They will need to use the new password on their next login.`,confirmLabel:`Reset`})&&M.mutate({id:e.id,newPassword:t})}}function q(e,t){t!==e.isAdmin&&j.mutate({id:e.id,isAdmin:t})}function J(e){return e?new Date(typeof e==`number`?e:String(e)).toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`,year:`numeric`}):`—`}return C(U,{children:[O(`div`,{className:`flex items-center justify-end`,children:C(`button`,{onClick:()=>i(!0),className:`inline-flex items-center gap-1.5 rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground shadow-sm hover:bg-primary/90`,children:[O(ee,{className:`h-3.5 w-3.5`}),`Create User`]})}),r&&C(`div`,{className:`rounded-lg border border-border bg-surface p-4 space-y-3`,children:[C(`div`,{className:`flex items-center justify-between`,children:[O(`span`,{className:`text-xs font-medium text-foreground`,children:`New User`}),O(`button`,{onClick:()=>i(!1),className:`text-foreground-subtle hover:text-foreground`,children:O(R,{className:`h-4 w-4`})})]}),C(`div`,{className:`grid grid-cols-3 gap-3`,children:[C(`div`,{className:`space-y-1`,children:[O(`label`,{className:`text-[10px] text-foreground-subtle uppercase tracking-wide`,children:`Username`}),O(`input`,{type:`text`,value:a,onChange:e=>s(e.target.value),placeholder:`john`,className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder:text-foreground-subtle focus:outline-none focus:ring-1 focus:ring-primary`})]}),C(`div`,{className:`space-y-1`,children:[O(`label`,{className:`text-[10px] text-foreground-subtle uppercase tracking-wide`,children:`Password`}),O(`input`,{type:`password`,value:l,onChange:e=>u(e.target.value),placeholder:`••••••••`,className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder:text-foreground-subtle focus:outline-none focus:ring-1 focus:ring-primary`})]}),C(`div`,{className:`space-y-1`,children:[O(`label`,{className:`text-[10px] text-foreground-subtle uppercase tracking-wide`,children:`Admin`}),C(`label`,{className:`flex items-center gap-2 rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground cursor-pointer`,children:[O(`input`,{type:`checkbox`,checked:m,onChange:e=>h(e.target.checked),className:`rounded border-border focus:ring-primary`}),O(`span`,{className:`text-foreground-subtle`,children:`Unrestricted access`})]})]})]}),v&&O(`p`,{className:`text-[10px] text-danger`,children:v}),C(`div`,{className:`flex justify-end gap-2`,children:[O(`button`,{onClick:()=>i(!1),className:`rounded px-3 py-1.5 text-xs text-foreground-subtle border border-border hover:text-foreground`,children:`Cancel`}),O(`button`,{onClick:()=>k.mutate({username:a,password:l,isAdmin:m}),disabled:k.isPending||!a||!l,className:`rounded bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50`,children:k.isPending?`Creating...`:`Create`})]})]}),x&&O(`div`,{className:`text-xs text-foreground-subtle animate-pulse`,children:`Loading...`}),S&&O(`div`,{className:`text-xs text-danger`,children:`Failed to load`}),!x&&!S&&G.length===0&&O(`div`,{className:`text-xs text-foreground-subtle`,children:`No data`}),(()=>{let e=e=>A.isPending&&A.variables?.id===e.id||j.isPending&&j.variables?.id===e.id||M.isPending&&M.variables?.id===e.id;return O(_,{columns:[{key:`username`,header:`Username`,render:e=>e.username},{key:`isAdmin`,header:`Admin`,render:t=>C(`label`,{className:`inline-flex items-center gap-1.5 text-xs cursor-pointer`,children:[O(`input`,{type:`checkbox`,checked:t.isAdmin,onChange:e=>q(t,e.target.checked),disabled:e(t),className:`rounded border-border focus:ring-primary disabled:opacity-50`}),O(`span`,{className:t.isAdmin?`text-primary font-medium`:`text-foreground-subtle`,children:t.isAdmin?`Admin`:`Regular`})]})},{key:`scopes`,header:`Scopes`,render:e=>{if(e.isAdmin)return O(`span`,{className:`text-[10px] text-foreground-subtle italic`,children:`unscoped`});let t=e.scopes??[];return C(`button`,{onClick:()=>I(e),className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] text-foreground-subtle hover:bg-foreground-subtle/10 hover:text-foreground`,title:`Edit scope grants`,children:[O(L,{className:`h-3 w-3`}),t.length===0?`no access`:`${t.length} grant${t.length===1?``:`s`}`]})}},{key:`createdAt`,header:`Created`,render:e=>O(`span`,{className:`text-foreground-subtle`,children:J(e.createdAt)})},{key:`actions`,header:`Actions`,align:`right`,render:t=>{let r=e(t);return C(`div`,{className:`flex items-center justify-end gap-1`,children:[t.id!==n?.id&&t.totpEnabled&&C(`button`,{onClick:()=>W(t),disabled:r,className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] text-foreground-subtle hover:bg-foreground-subtle/10 hover:text-foreground disabled:opacity-50`,title:`Remove two-factor authentication`,children:[O(z,{className:`h-3 w-3`}),`Remove 2FA`]}),C(`button`,{onClick:()=>K(t),disabled:r,className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] text-foreground-subtle hover:bg-foreground-subtle/10 hover:text-foreground disabled:opacity-50`,title:`Reset password`,children:[O(ne,{className:`h-3 w-3`}),`Reset password`]}),C(`button`,{onClick:()=>te(t),disabled:r,className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] text-danger hover:bg-danger/10 disabled:opacity-50`,title:`Delete user`,children:[r?O(F,{className:`h-3 w-3 animate-spin`}):O(V,{className:`h-3 w-3`}),`Delete`]})]})}}],rows:G,rowKey:e=>e.id,minWidthPx:560})})(),H&&O(re,{userId:H.id,username:H.username,onClose:()=>W(null)}),P&&O(ae,{user:P,onClose:()=>I(null),onSubmit:e=>N.mutate({userId:P.id,scopes:e}),submitting:N.isPending})]})}function ae(e){let{user:t}=B(),n=t?.isAdmin===!0;return O(oe,{...e,callerScopes:n?null:t?.scopes??[]})}function oe({user:e,onClose:t,onSubmit:n,submitting:r,callerScopes:i}){let[a,o]=D(w(()=>(e.scopes??[]).map(e=>({...e,access:[...e.access]})),[e.scopes])),s=h(a);return O(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4`,children:C(`div`,{className:`w-full max-w-2xl rounded-lg border border-border bg-surface shadow-xl`,children:[C(`div`,{className:`flex items-center justify-between border-b border-border px-4 py-3`,children:[C(`div`,{children:[C(`div`,{className:`text-sm font-semibold text-foreground`,children:[`Edit scopes — `,e.username]}),O(`div`,{className:`text-[10px] text-foreground-subtle`,children:e.isAdmin?`Admin users bypass the scope check; this list is ignored.`:`Pick which capabilities this user can call, and which access flavours within each.`})]}),O(`button`,{onClick:t,className:`text-foreground-subtle hover:text-foreground`,children:O(R,{className:`h-4 w-4`})})]}),C(`div`,{className:`px-4 py-4`,children:[O(y,{value:a,onChange:o,clampToParent:i,emptyHint:C(T,{children:[`No scopes granted.`,` `,O(`span`,{className:`font-medium text-foreground`,children:e.username}),` cannot call any protected endpoint until a scope is added.`]})}),s&&O(`p`,{className:`mt-2 text-[10px] text-danger`,children:s})]}),C(`div`,{className:`flex items-center justify-end gap-2 border-t border-border px-4 py-3`,children:[O(`button`,{onClick:t,className:`rounded px-3 py-1.5 text-xs text-foreground-subtle border border-border hover:text-foreground`,children:`Cancel`}),O(`button`,{onClick:()=>n(a),disabled:r||s!==null,className:`rounded bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50`,children:r?O(F,{className:`h-3 w-3 animate-spin`}):`Save scopes`})]})]})})}S();var se=`bg-primary/10 text-primary`,ce=`bg-foreground-subtle/10 text-foreground-subtle`;function Y(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?`—`:t.toLocaleString()}function le(e){return e?e===`*`?`*`:e.join(`, `):``}function ue(){let e=E(),t=g(),{data:n,isLoading:o}=u(),{data:s}=d(),c=w(()=>n??[],[n]),l=w(()=>s??[],[s]),f=()=>e.invalidateQueries({queryKey:[[`userManagement`,`listApiKeys`]]}),p=()=>e.invalidateQueries({queryKey:[[`userManagement`,`listScopedTokens`]]}),[m,h]=D(!1),[_,v]=D(null),y=a({onSuccess:f}),b=r({onSuccess:({token:e,record:t})=>{p(),h(!1),v({token:e,label:t.name})}}),x=i({onSuccess:p}),S=async(e,n)=>{await t({title:`Revoke "${n}"?`,message:`Any client using this token will lose access immediately. This cannot be undone.`,confirmLabel:`Revoke`,variant:`danger`})&&y.mutate({id:e})},T=async(e,n)=>{await t({title:`Revoke "${n}"?`,message:`The scoped token will be invalid on its next use.`,confirmLabel:`Revoke`,variant:`danger`})&&x.mutate({id:e})};return C(U,{children:[C(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[O(`p`,{className:`text-xs text-foreground-subtle max-w-2xl`,children:`Issue scoped tokens to grant a user a narrow surface — a specific addon, integration, or capability. Every token MUST be scoped: revoking it has predictable blast radius.`}),C(`button`,{onClick:()=>h(!0),className:`inline-flex items-center gap-1.5 rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50`,disabled:l.length===0,title:l.length===0?`Create a user first`:`Issue a scoped token`,children:[O(L,{className:`h-3.5 w-3.5`}),`New token`]})]}),C(X,{title:`Scoped tokens`,subtitle:`Grouped per user`,children:[l.length===0&&O(fe,{text:`No users yet — scoped tokens are issued on behalf of an existing user.`}),l.map(e=>O(pe,{userId:e.id,username:e.username,onRevoke:(e,t)=>{T(e,t)},revokePending:x.isPending,revokeId:x.variables?.id},e.id))]}),c.length>0&&O(X,{title:`Legacy API keys`,subtitle:`${c.length} pre-existing — revoke only`,children:O(Z,{headers:[`Label`,`Admin`,`Prefix`,`Allowed providers`,`Created`,`Last used`,``],rows:c.map(e=>{let t=!!e.isAdmin,n=y.isPending&&y.variables?.id===e.id;return C(`tr`,{className:`hover:bg-primary/5`,children:[O(`td`,{className:`px-3 py-2 text-foreground border-b border-border font-medium`,children:e.label}),O(`td`,{className:`px-3 py-2 text-foreground border-b border-border`,children:O(`span`,{className:`inline-block rounded px-2 py-0.5 text-[10px] uppercase tracking-wide ${t?se:ce}`,children:t?`admin`:`regular`})}),C(`td`,{className:`px-3 py-2 text-foreground border-b border-border font-mono text-[11px]`,children:[e.tokenPrefix,`…`]}),O(`td`,{className:`px-3 py-2 text-foreground border-b border-border text-foreground-subtle`,children:le(e.allowedProviders)||`all`}),O(`td`,{className:`px-3 py-2 text-foreground-subtle border-b border-border`,children:Y(e.createdAt)}),O(`td`,{className:`px-3 py-2 text-foreground-subtle border-b border-border`,children:Y(e.lastUsedAt)}),O(`td`,{className:`px-3 py-2 border-b border-border text-right`,children:C(`button`,{onClick:()=>{S(e.id,e.label)},disabled:n,className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] text-danger hover:bg-danger/10 disabled:opacity-50`,title:`Revoke`,children:[n?O(F,{className:`h-3 w-3 animate-spin`}):O(V,{className:`h-3 w-3`}),`Revoke`]})})]},e.id)})})}),o&&O(de,{}),m&&O(me,{users:l.map(e=>({id:e.id,username:e.username})),onClose:()=>h(!1),onSubmit:e=>b.mutate({userId:e.userId,name:e.name,scopes:e.scopes,...e.expiresAt===void 0?{}:{expiresAt:e.expiresAt}}),submitting:b.isPending}),_&&O(he,{token:_.token,label:_.label,onClose:()=>v(null)})]})}function X({title:e,subtitle:t,children:n}){return C(`div`,{className:`space-y-2`,children:[C(`div`,{className:`flex items-baseline justify-between`,children:[O(`h2`,{className:`text-sm font-semibold text-foreground`,children:e}),t&&O(`span`,{className:`text-[10px] text-foreground-subtle`,children:t})]}),n]})}function de(){return O(`div`,{className:`space-y-2`,children:[1,2].map(e=>O(`div`,{className:`h-10 rounded border border-border bg-surface animate-pulse`},e))})}function fe({text:e}){return O(`div`,{className:`rounded border border-dashed border-border bg-surface px-3 py-4 text-xs text-foreground-subtle text-center`,children:e})}function Z({headers:e,rows:t}){return O(`div`,{className:`rounded-lg border border-border bg-surface overflow-x-auto`,children:C(`table`,{className:`w-full text-xs min-w-[640px]`,children:[O(`thead`,{children:O(`tr`,{children:e.map((t,n)=>O(`th`,{className:`px-3 py-2 text-foreground-subtle font-medium bg-surface border-b border-border whitespace-nowrap ${n===e.length-1?`text-right`:`text-left`}`,children:t},n))})}),O(`tbody`,{children:t})]})})}function pe({userId:e,username:t,onRevoke:n,revokePending:r,revokeId:i}){let{data:a,isLoading:o}=l({userId:e}),s=a??[];return o||s.length===0?null:C(`div`,{className:`space-y-1.5`,children:[O(`div`,{className:`text-[11px] font-medium text-foreground`,children:t}),O(Z,{headers:[`Name`,`Prefix`,`Scopes`,`Expires`,`Last used`,`Created`,``],rows:s.map(e=>{let t=r&&i===e.id;return C(`tr`,{className:`hover:bg-primary/5`,children:[O(`td`,{className:`px-3 py-2 text-foreground border-b border-border font-medium`,children:e.name}),C(`td`,{className:`px-3 py-2 text-foreground border-b border-border font-mono text-[11px]`,children:[e.tokenPrefix,`…`]}),O(`td`,{className:`px-3 py-2 text-foreground border-b border-border`,children:O(`div`,{className:`flex flex-wrap gap-1`,children:e.scopes.map((e,t)=>C(`span`,{className:`inline-block rounded bg-foreground-subtle/10 px-1.5 py-0.5 text-[10px] font-mono`,children:[e.type,`:`,e.type===`device`?`[${e.targets.join(`,`)}]`:e.target]},t))})}),O(`td`,{className:`px-3 py-2 text-foreground-subtle border-b border-border`,children:Y(e.expiresAt)}),O(`td`,{className:`px-3 py-2 text-foreground-subtle border-b border-border`,children:Y(e.lastUsedAt)}),O(`td`,{className:`px-3 py-2 text-foreground-subtle border-b border-border`,children:Y(e.createdAt)}),O(`td`,{className:`px-3 py-2 border-b border-border text-right`,children:C(`button`,{onClick:()=>n(e.id,e.name),disabled:t,className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] text-danger hover:bg-danger/10 disabled:opacity-50`,children:[t?O(F,{className:`h-3 w-3 animate-spin`}):O(V,{className:`h-3 w-3`}),`Revoke`]})})]},e.id)})})]})}function me({users:e,onClose:t,onSubmit:n,submitting:r}){let{user:i}=B(),a=i?.isAdmin===!0?null:i?.scopes??[],[o,s]=D(e[0]?.id??``),[c,l]=D(``),[u,d]=D([{type:`capability`,target:``,access:[`view`,`create`]}]),[f,p]=D(``),m=h(u),g=o!==``&&c.trim().length>0&&u.length>0&&m===null&&!r;return C(ge,{title:`Create scoped token`,onClose:t,children:[C(`div`,{className:`space-y-3`,children:[O(Q,{label:`On behalf of user`,children:O(`select`,{value:o,onChange:e=>s(e.target.value),className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs focus:outline-none focus:ring-1 focus:ring-primary`,children:e.map(e=>O(`option`,{value:e.id,children:e.username},e.id))})}),O(Q,{label:`Name`,children:O(`input`,{value:c,onChange:e=>l(e.target.value),placeholder:`cloudflare-tunnel-route`,className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs focus:outline-none focus:ring-1 focus:ring-primary`})}),C(Q,{label:`Scopes`,hint:`Each scope picks a (cap or addon) target + one or more access flavours. The token can access ONLY what's listed.`,children:[O(y,{value:u,onChange:d,clampToParent:a}),m&&O(`p`,{className:`mt-1 text-[10px] text-danger`,children:m})]}),O(Q,{label:`Expires in (days)`,hint:`Leave blank for non-expiring.`,children:O(`input`,{type:`number`,min:1,value:f,onChange:e=>p(e.target.value),placeholder:`30`,className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs focus:outline-none focus:ring-1 focus:ring-primary`})})]}),C(_e,{children:[O(`button`,{onClick:t,className:`rounded px-3 py-1.5 text-xs text-foreground-subtle border border-border hover:text-foreground`,children:`Cancel`}),C(`button`,{onClick:()=>{let e=parseInt(f,10),t=Number.isFinite(e)&&e>0?Date.now()+e*864e5:void 0;n({userId:o,name:c.trim(),scopes:u,expiresAt:t})},disabled:!g,className:`inline-flex items-center gap-1.5 rounded bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50`,children:[r?O(F,{className:`h-3.5 w-3.5 animate-spin`}):O(L,{className:`h-3.5 w-3.5`}),`Issue token`]})]})]})}function he({token:e,label:t,onClose:n}){let[r,i]=D(!1),a=async()=>{try{await navigator.clipboard.writeText(e),i(!0)}catch{}};return C(ge,{title:`Token: ${t}`,onClose:n,children:[C(`div`,{className:`space-y-3`,children:[O(`div`,{className:`rounded border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning`,children:`Copy this token now. Once you close this dialog the secret cannot be displayed again.`}),O(`div`,{className:`rounded border border-border bg-background p-2 font-mono text-[11px] break-all select-all`,children:e})]}),C(_e,{children:[C(`button`,{onClick:()=>{a()},className:`inline-flex items-center gap-1.5 rounded bg-surface border border-border px-3 py-1.5 text-xs font-medium text-foreground hover:bg-primary/5 hover:border-primary/30`,children:[r?O(P,{className:`h-3.5 w-3.5 text-primary`}):O(A,{className:`h-3.5 w-3.5`}),r?`Copied`:`Copy`]}),O(`button`,{onClick:n,className:`rounded bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90`,children:`Done`})]})]})}function ge({title:e,onClose:t,children:n}){return O(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm`,onClick:t,children:C(`div`,{className:`w-full max-w-md rounded-xl border border-border bg-surface shadow-2xl`,onClick:e=>e.stopPropagation(),children:[C(`div`,{className:`flex items-start justify-between border-b border-border px-4 py-3`,children:[O(`h2`,{className:`text-sm font-semibold text-foreground`,children:e}),O(`button`,{onClick:t,className:`text-foreground-subtle hover:text-foreground`,children:O(R,{className:`h-4 w-4`})})]}),O(`div`,{className:`p-4`,children:n})]})})}function _e({children:e}){return O(`div`,{className:`flex justify-end gap-2 border-t border-border px-4 py-3`,children:e})}function Q({label:e,hint:t,children:n}){return C(`div`,{className:`space-y-1`,children:[O(`label`,{className:`text-[10px] text-foreground-subtle uppercase tracking-wide`,children:e}),n,t&&O(`p`,{className:`text-[10px] text-foreground-subtle`,children:t})]})}S();function $(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?`—`:t.toLocaleString()}function ve(e){if(e.type===`category`){let t=e.target??``;return t===`device`?`all devices`:`all ${t}`}if(e.type===`device`)return`device:[${(e.targets??[]).join(`,`)}]`;let t=e;return`${t.type}:${t.target??``}`}function ye(){return O(`div`,{className:`space-y-2`,children:[1,2].map(e=>O(`div`,{className:`h-10 rounded border border-border bg-surface animate-pulse`},e))})}function be({text:e}){return O(`div`,{className:`rounded border border-dashed border-border bg-surface px-3 py-4 text-xs text-foreground-subtle text-center`,children:e})}function xe({headers:e,rows:t}){return O(`div`,{className:`rounded-lg border border-border bg-surface overflow-x-auto`,children:C(`table`,{className:`w-full text-xs min-w-[640px]`,children:[O(`thead`,{children:O(`tr`,{children:e.map((t,n)=>O(`th`,{className:`px-3 py-2 text-foreground-subtle font-medium bg-surface border-b border-border whitespace-nowrap ${n===e.length-1?`text-right`:`text-left`}`,children:t},n))})}),O(`tbody`,{children:t})]})})}function Se(){let e=E(),t=g(),{data:r,isLoading:i}=n(),a=w(()=>r??[],[r]),o=v({onSuccess:()=>e.invalidateQueries({queryKey:[[`userManagement`,`listOauthSessions`]]})}),s=async(e,n)=>{await t({title:`Revoke "${n}" session?`,message:`This integration will lose access immediately on its next API call. This cannot be undone.`,confirmLabel:`Revoke`,variant:`danger`})&&o.mutate({id:e})};return C(U,{icon:q,title:`Linked Sessions`,subtitle:`External integrations (Alexa, …) linked to this hub via OAuth. Revoke a session to immediately invalidate that integration's access.`,children:[i&&O(ye,{}),!i&&a.length===0&&O(be,{text:`No linked sessions — once an external integration completes the OAuth flow its session will appear here.`}),!i&&a.length>0&&O(xe,{headers:[`Integration`,`User`,`Scopes`,`Created`,`Last used`,`Status`,``],rows:a.map(e=>{let t=e.revokedAt!==null,n=(o.isPending?o.variables?.id:void 0)===e.id;return C(`tr`,{className:`hover:bg-primary/5`,children:[O(`td`,{className:`px-3 py-2 text-foreground border-b border-border font-medium`,children:e.integrationId}),O(`td`,{className:`px-3 py-2 text-foreground border-b border-border`,children:e.username}),O(`td`,{className:`px-3 py-2 text-foreground border-b border-border`,children:O(`div`,{className:`flex flex-wrap gap-1`,children:e.scopes.map((e,t)=>O(`span`,{className:`inline-block rounded bg-foreground-subtle/10 px-1.5 py-0.5 text-[10px] font-mono`,children:ve(e)},t))})}),O(`td`,{className:`px-3 py-2 text-foreground-subtle border-b border-border`,children:$(e.createdAt)}),O(`td`,{className:`px-3 py-2 text-foreground-subtle border-b border-border`,children:$(e.lastUsedAt)}),O(`td`,{className:`px-3 py-2 border-b border-border`,children:t?C(`span`,{className:`inline-block rounded bg-foreground-subtle/10 px-2 py-0.5 text-[10px] text-foreground-subtle`,children:[`Revoked `,$(e.revokedAt)]}):O(`span`,{className:`inline-block rounded bg-emerald-500/15 px-2 py-0.5 text-[10px] text-emerald-700 dark:text-emerald-300`,children:`Active`})}),O(`td`,{className:`px-3 py-2 border-b border-border text-right`,children:!t&&C(`button`,{onClick:()=>{s(e.id,e.integrationId)},disabled:n,className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] text-danger hover:bg-danger/10 disabled:opacity-50`,title:`Revoke`,children:[n?O(F,{className:`h-3 w-3 animate-spin`}):O(V,{className:`h-3 w-3`}),`Revoke`]})})]},e.id)})})]})}S();var Ce=3e4,we=[{capName:`auth-provider`,title:`Login providers`,subtitle:`Identity providers exposed to the admin UI. Multiple providers can run in parallel — operators pick which to enable. Disabling a provider only removes that external login method; local password login is unaffected. Each provider’s settings + live logs are inline below.`,emptyTitle:`No authentication providers registered`,emptyDescription:`Local auth should always be available — if this list is empty the local-auth builtin failed to register. Check the Addons page for load errors.`,installLabel:`Add provider`},{capName:`user-passkeys`,title:`Passkeys (second factor)`,subtitle:`WebAuthn / passkey providers. Configure the relying-party identity (RP ID + origin) baked into every enrolled passkey below — it MUST match the hostname users sign in on. Users enroll their own passkeys from My access → Passkeys.`,emptyTitle:`No passkey providers registered`,emptyDescription:`Install an addon that declares the "user-passkeys" capability to enable passkey second-factor login.`,installLabel:`Add passkey provider`}];function Te(e){return e===`local-auth`?{headline:`Username + password (local).`,icon:K,bullets:[`Users live in the hub’s SQLite database — no IdP roundtrip.`,`TOTP / 2FA is self-enrolled: each user enables it from their own profile page (My access → Two-factor authentication).`,`API keys + scoped tokens are managed from the API Keys page.`],setupSteps:[`Add users from Users → New user (or seed via CAMSTACK_ADMIN_USER / CAMSTACK_ADMIN_PASS).`,`Hand out either passwords or scoped tokens — both validate through this provider.`]}:e.startsWith(`auth-oidc`)?{headline:`OpenID Connect (Google, Microsoft, Okta, Keycloak, …).`,icon:I,bullets:[`Three-leg redirect flow with PKCE S256 + nonce.`,`id_token is signature-verified against the IdP’s JWKS — no implicit trust.`,`First-time sign-ins are auto-provisioned with the configured Default Role.`],setupSteps:[`Register a web app at your IdP and copy the client_id + client_secret.`,"Set the redirect URI to `https://<this-hub>/addon/<addon-id>/callback`.",`Paste issuer + credentials in the Settings panel below — saves on every change.`]}:e.startsWith(`auth-saml`)?{headline:`SAML 2.0 — enterprise SSO (Azure AD, Okta, OneLogin).`,icon:I,bullets:[`Heavier handshake than OIDC — exchange metadata XML with your IdP.`,`Group → role mapping via SAML assertions.`]}:e.startsWith(`auth-webauthn`)||e.startsWith(`auth-passkey`)?{headline:`Passkeys / WebAuthn — passwordless second factor.`,icon:z,bullets:[`Enroll a YubiKey, Touch ID, or platform passkey per user.`,`Resistant to phishing — the browser binds the credential to your hub origin.`]}:e.startsWith(`auth-totp`)||e.startsWith(`auth-magic-link`)?{headline:`TOTP / magic-link — second factor or passwordless sign-in.`,icon:z,bullets:[`Codes / links delivered out-of-band (RFC 6238 for TOTP).`,`Compatible with Google Authenticator, Aegis, 1Password, Bitwarden, etc.`]}:{headline:`Authentication provider.`,icon:L,bullets:[`Generic authentication provider. No additional hints registered.`]}}function Ee(){return O(`div`,{className:`flex flex-col gap-6`,children:we.map(e=>O(De,{cap:e},e.capName))})}function De({cap:e}){let t=b({capName:e.capName},{refetchInterval:Ce}),n=m(void 0,{refetchInterval:Ce}),r=w(()=>G(n.data??[]),[n.data]),i=w(()=>(t.data??[]).map(e=>({addonId:e.addonId,displayName:r.get(e.addonId)??e.addonId,isActive:e.isActive})),[t.data,r]);return e.capName!==`auth-provider`&&!t.isLoading&&i.length===0?null:O(M,{title:e.title,subtitle:e.subtitle,pageIcon:L,itemIcon:L,capability:e.capName,installButtonLabel:e.installLabel,items:i,isLoading:t.isLoading,emptyTitle:e.emptyTitle,emptyDescription:e.emptyDescription,renderExpandedPanel:e=>O(Oe,{addonId:e.addonId})})}function Oe({addonId:e}){let t=Te(e),n=t.icon;return C(`div`,{className:`rounded-lg border border-border bg-surface p-4 space-y-3`,children:[C(`div`,{className:`flex items-start gap-2.5`,children:[O(n,{className:`h-4 w-4 mt-0.5 text-primary shrink-0`}),O(`div`,{className:`text-xs text-foreground font-medium`,children:t.headline})]}),O(`ul`,{className:`text-xs text-foreground-subtle space-y-1.5 pl-6 list-disc`,children:t.bullets.map((e,t)=>O(`li`,{children:e},t))}),t.setupSteps&&t.setupSteps.length>0&&C(`div`,{className:`rounded-md border border-border bg-surface-hover/40 px-3 py-2.5 space-y-1.5`,children:[C(`div`,{className:`flex items-center gap-1.5 text-[10px] font-semibold text-foreground-subtle uppercase tracking-wide`,children:[O(te,{className:`h-3 w-3`}),`Setup steps`]}),O(`ol`,{className:`text-xs text-foreground space-y-0.5 pl-4 list-decimal`,children:t.setupSteps.map((e,t)=>O(`li`,{children:e},t))})]}),e===`local-auth`&&C(`div`,{className:`rounded-md border border-blue-500/30 bg-blue-500/5 px-3 py-2 flex items-start gap-2 text-[11px] text-foreground`,children:[O(H,{className:`h-3.5 w-3.5 mt-0.5 text-blue-500 shrink-0`}),C(`span`,{children:[`TOTP / 2FA is self-service: each user enrols from their own profile page —`,` `,O(`a`,{href:`/system/my-access`,className:`underline text-primary`,children:`My access`}),` `,`→ “Two-factor authentication” → Enable 2FA. Admins can only remove a user’s active enrollment (lost device) from the`,` `,O(`a`,{href:`/system/users`,className:`underline text-primary`,children:`Users`}),` `,`page via Actions → “Remove 2FA”.`]})]})]})}function ke(){return O(`div`,{className:`flex flex-col p-4`,children:O(W,{tabs:[{id:`users`,label:`Users`,icon:J,content:O(ie,{})},{id:`api-keys`,label:`Tokens`,icon:j,content:O(ue,{})},{id:`linked-sessions`,label:`Linked Sessions`,icon:q,content:O(Se,{})},{id:`authentication`,label:`Authentication`,icon:L,content:O(Ee,{})}]})})}export{ke as IdentityPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H as e}from"./index-ytlu1zLA.js";var t=e(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H as e}from"./index-ytlu1zLA.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H as e}from"./index-ytlu1zLA.js";var t=e(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H as e}from"./index-ytlu1zLA.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H as e}from"./index-ytlu1zLA.js";var t=e(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]);export{t};
|