@fntio/infra-client 0.0.0-stage → 0.5.0

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.
Files changed (940) hide show
  1. package/CHANGELOG.md +193 -0
  2. package/LICENSE +93 -0
  3. package/README.md +875 -2
  4. package/assets/acl-reconciler/index.js +1604 -0
  5. package/assets/api/index.js +9857 -0
  6. package/assets/api/package.json +9 -0
  7. package/assets/api/vendor_modules/.package-lock.json +857 -0
  8. package/assets/api/vendor_modules/accepts/HISTORY.md +243 -0
  9. package/assets/api/vendor_modules/accepts/LICENSE +23 -0
  10. package/assets/api/vendor_modules/accepts/README.md +140 -0
  11. package/assets/api/vendor_modules/accepts/index.js +238 -0
  12. package/assets/api/vendor_modules/accepts/package.json +47 -0
  13. package/assets/api/vendor_modules/array-flatten/LICENSE +21 -0
  14. package/assets/api/vendor_modules/array-flatten/README.md +43 -0
  15. package/assets/api/vendor_modules/array-flatten/array-flatten.js +64 -0
  16. package/assets/api/vendor_modules/array-flatten/package.json +39 -0
  17. package/assets/api/vendor_modules/aws-jwt-verify/LICENSE +175 -0
  18. package/assets/api/vendor_modules/aws-jwt-verify/README.md +1033 -0
  19. package/assets/api/vendor_modules/aws-jwt-verify/asn1.d.ts +20 -0
  20. package/assets/api/vendor_modules/aws-jwt-verify/assert.d.ts +41 -0
  21. package/assets/api/vendor_modules/aws-jwt-verify/cognito-verifier.d.ts +183 -0
  22. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/asn1.js +301 -0
  23. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/assert.js +108 -0
  24. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/cognito-verifier.js +158 -0
  25. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/error.js +131 -0
  26. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/https-common.js +29 -0
  27. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/https-node.js +89 -0
  28. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/https.js +52 -0
  29. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/index.js +9 -0
  30. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/jwk.js +221 -0
  31. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/jwt-model.js +10 -0
  32. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/jwt-rsa.js +397 -0
  33. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/jwt.js +161 -0
  34. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/node-web-compat-node.js +48 -0
  35. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/node-web-compat-web.js +78 -0
  36. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/node-web-compat.js +11 -0
  37. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/package.json +1 -0
  38. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/safe-json-parse.js +34 -0
  39. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/typing-util.js +6 -0
  40. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/asn1.js +296 -0
  41. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/assert.js +101 -0
  42. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/cognito-verifier.js +153 -0
  43. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/error.js +101 -0
  44. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/https-common.js +25 -0
  45. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/https-node.js +85 -0
  46. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/https.js +48 -0
  47. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/index.js +4 -0
  48. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/jwk.js +208 -0
  49. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/jwt-model.js +7 -0
  50. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/jwt-rsa.js +389 -0
  51. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/jwt.js +156 -0
  52. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/node-web-compat-node.js +45 -0
  53. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/node-web-compat-web.js +75 -0
  54. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/node-web-compat.js +10 -0
  55. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/package.json +1 -0
  56. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/safe-json-parse.js +29 -0
  57. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/typing-util.js +5 -0
  58. package/assets/api/vendor_modules/aws-jwt-verify/error.d.ts +108 -0
  59. package/assets/api/vendor_modules/aws-jwt-verify/https-common.d.ts +9 -0
  60. package/assets/api/vendor_modules/aws-jwt-verify/https-node.d.ts +20 -0
  61. package/assets/api/vendor_modules/aws-jwt-verify/https.d.ts +35 -0
  62. package/assets/api/vendor_modules/aws-jwt-verify/index.d.ts +2 -0
  63. package/assets/api/vendor_modules/aws-jwt-verify/jwk.d.ts +76 -0
  64. package/assets/api/vendor_modules/aws-jwt-verify/jwt-model.d.ts +78 -0
  65. package/assets/api/vendor_modules/aws-jwt-verify/jwt-rsa.d.ts +348 -0
  66. package/assets/api/vendor_modules/aws-jwt-verify/jwt.d.ts +51 -0
  67. package/assets/api/vendor_modules/aws-jwt-verify/package.json +136 -0
  68. package/assets/api/vendor_modules/aws-jwt-verify/safe-json-parse.d.ts +18 -0
  69. package/assets/api/vendor_modules/aws-jwt-verify/typing-util.d.ts +38 -0
  70. package/assets/api/vendor_modules/body-parser/HISTORY.md +703 -0
  71. package/assets/api/vendor_modules/body-parser/LICENSE +23 -0
  72. package/assets/api/vendor_modules/body-parser/README.md +476 -0
  73. package/assets/api/vendor_modules/body-parser/index.js +156 -0
  74. package/assets/api/vendor_modules/body-parser/lib/read.js +205 -0
  75. package/assets/api/vendor_modules/body-parser/lib/types/json.js +247 -0
  76. package/assets/api/vendor_modules/body-parser/lib/types/raw.js +105 -0
  77. package/assets/api/vendor_modules/body-parser/lib/types/text.js +125 -0
  78. package/assets/api/vendor_modules/body-parser/lib/types/urlencoded.js +303 -0
  79. package/assets/api/vendor_modules/body-parser/node_modules/qs/.editorconfig +46 -0
  80. package/assets/api/vendor_modules/body-parser/node_modules/qs/.github/FUNDING.yml +12 -0
  81. package/assets/api/vendor_modules/body-parser/node_modules/qs/.github/SECURITY.md +11 -0
  82. package/assets/api/vendor_modules/body-parser/node_modules/qs/.github/THREAT_MODEL.md +80 -0
  83. package/assets/api/vendor_modules/body-parser/node_modules/qs/.nycrc +13 -0
  84. package/assets/api/vendor_modules/body-parser/node_modules/qs/CHANGELOG.md +872 -0
  85. package/assets/api/vendor_modules/body-parser/node_modules/qs/LICENSE.md +29 -0
  86. package/assets/api/vendor_modules/body-parser/node_modules/qs/README.md +804 -0
  87. package/assets/api/vendor_modules/body-parser/node_modules/qs/dist/qs.js +141 -0
  88. package/assets/api/vendor_modules/body-parser/node_modules/qs/eslint.config.mjs +57 -0
  89. package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/formats.js +23 -0
  90. package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/index.js +11 -0
  91. package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/parse.js +503 -0
  92. package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/stringify.js +378 -0
  93. package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/utils.js +512 -0
  94. package/assets/api/vendor_modules/body-parser/node_modules/qs/package.json +95 -0
  95. package/assets/api/vendor_modules/body-parser/node_modules/qs/test/empty-keys-cases.js +267 -0
  96. package/assets/api/vendor_modules/body-parser/node_modules/qs/test/parse.js +2296 -0
  97. package/assets/api/vendor_modules/body-parser/node_modules/qs/test/stringify.js +1995 -0
  98. package/assets/api/vendor_modules/body-parser/node_modules/qs/test/utils.js +822 -0
  99. package/assets/api/vendor_modules/body-parser/package.json +55 -0
  100. package/assets/api/vendor_modules/bytes/History.md +97 -0
  101. package/assets/api/vendor_modules/bytes/LICENSE +23 -0
  102. package/assets/api/vendor_modules/bytes/Readme.md +152 -0
  103. package/assets/api/vendor_modules/bytes/index.js +170 -0
  104. package/assets/api/vendor_modules/bytes/package.json +42 -0
  105. package/assets/api/vendor_modules/call-bind-apply-helpers/.eslintrc +17 -0
  106. package/assets/api/vendor_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
  107. package/assets/api/vendor_modules/call-bind-apply-helpers/.nycrc +9 -0
  108. package/assets/api/vendor_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
  109. package/assets/api/vendor_modules/call-bind-apply-helpers/LICENSE +21 -0
  110. package/assets/api/vendor_modules/call-bind-apply-helpers/README.md +62 -0
  111. package/assets/api/vendor_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  112. package/assets/api/vendor_modules/call-bind-apply-helpers/actualApply.js +10 -0
  113. package/assets/api/vendor_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  114. package/assets/api/vendor_modules/call-bind-apply-helpers/applyBind.js +10 -0
  115. package/assets/api/vendor_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  116. package/assets/api/vendor_modules/call-bind-apply-helpers/functionApply.js +4 -0
  117. package/assets/api/vendor_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  118. package/assets/api/vendor_modules/call-bind-apply-helpers/functionCall.js +4 -0
  119. package/assets/api/vendor_modules/call-bind-apply-helpers/index.d.ts +64 -0
  120. package/assets/api/vendor_modules/call-bind-apply-helpers/index.js +15 -0
  121. package/assets/api/vendor_modules/call-bind-apply-helpers/package.json +85 -0
  122. package/assets/api/vendor_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
  123. package/assets/api/vendor_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  124. package/assets/api/vendor_modules/call-bind-apply-helpers/test/index.js +63 -0
  125. package/assets/api/vendor_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  126. package/assets/api/vendor_modules/call-bound/.eslintrc +13 -0
  127. package/assets/api/vendor_modules/call-bound/.github/FUNDING.yml +12 -0
  128. package/assets/api/vendor_modules/call-bound/.nycrc +9 -0
  129. package/assets/api/vendor_modules/call-bound/CHANGELOG.md +42 -0
  130. package/assets/api/vendor_modules/call-bound/LICENSE +21 -0
  131. package/assets/api/vendor_modules/call-bound/README.md +53 -0
  132. package/assets/api/vendor_modules/call-bound/index.d.ts +94 -0
  133. package/assets/api/vendor_modules/call-bound/index.js +19 -0
  134. package/assets/api/vendor_modules/call-bound/package.json +99 -0
  135. package/assets/api/vendor_modules/call-bound/test/index.js +61 -0
  136. package/assets/api/vendor_modules/call-bound/tsconfig.json +10 -0
  137. package/assets/api/vendor_modules/content-disposition/HISTORY.md +60 -0
  138. package/assets/api/vendor_modules/content-disposition/LICENSE +22 -0
  139. package/assets/api/vendor_modules/content-disposition/README.md +142 -0
  140. package/assets/api/vendor_modules/content-disposition/index.js +458 -0
  141. package/assets/api/vendor_modules/content-disposition/package.json +44 -0
  142. package/assets/api/vendor_modules/content-type/HISTORY.md +29 -0
  143. package/assets/api/vendor_modules/content-type/LICENSE +22 -0
  144. package/assets/api/vendor_modules/content-type/README.md +94 -0
  145. package/assets/api/vendor_modules/content-type/index.js +225 -0
  146. package/assets/api/vendor_modules/content-type/package.json +42 -0
  147. package/assets/api/vendor_modules/cookie/LICENSE +24 -0
  148. package/assets/api/vendor_modules/cookie/README.md +317 -0
  149. package/assets/api/vendor_modules/cookie/SECURITY.md +25 -0
  150. package/assets/api/vendor_modules/cookie/index.js +335 -0
  151. package/assets/api/vendor_modules/cookie/package.json +44 -0
  152. package/assets/api/vendor_modules/cookie-signature/History.md +42 -0
  153. package/assets/api/vendor_modules/cookie-signature/Readme.md +42 -0
  154. package/assets/api/vendor_modules/cookie-signature/index.js +51 -0
  155. package/assets/api/vendor_modules/cookie-signature/package.json +18 -0
  156. package/assets/api/vendor_modules/debug/.coveralls.yml +1 -0
  157. package/assets/api/vendor_modules/debug/.eslintrc +11 -0
  158. package/assets/api/vendor_modules/debug/.travis.yml +14 -0
  159. package/assets/api/vendor_modules/debug/CHANGELOG.md +362 -0
  160. package/assets/api/vendor_modules/debug/LICENSE +19 -0
  161. package/assets/api/vendor_modules/debug/Makefile +50 -0
  162. package/assets/api/vendor_modules/debug/README.md +312 -0
  163. package/assets/api/vendor_modules/debug/component.json +19 -0
  164. package/assets/api/vendor_modules/debug/karma.conf.js +70 -0
  165. package/assets/api/vendor_modules/debug/node.js +1 -0
  166. package/assets/api/vendor_modules/debug/package.json +49 -0
  167. package/assets/api/vendor_modules/debug/src/browser.js +185 -0
  168. package/assets/api/vendor_modules/debug/src/debug.js +202 -0
  169. package/assets/api/vendor_modules/debug/src/index.js +10 -0
  170. package/assets/api/vendor_modules/debug/src/inspector-log.js +15 -0
  171. package/assets/api/vendor_modules/debug/src/node.js +248 -0
  172. package/assets/api/vendor_modules/depd/History.md +103 -0
  173. package/assets/api/vendor_modules/depd/LICENSE +22 -0
  174. package/assets/api/vendor_modules/depd/Readme.md +280 -0
  175. package/assets/api/vendor_modules/depd/index.js +538 -0
  176. package/assets/api/vendor_modules/depd/lib/browser/index.js +77 -0
  177. package/assets/api/vendor_modules/depd/package.json +45 -0
  178. package/assets/api/vendor_modules/destroy/LICENSE +23 -0
  179. package/assets/api/vendor_modules/destroy/README.md +63 -0
  180. package/assets/api/vendor_modules/destroy/index.js +209 -0
  181. package/assets/api/vendor_modules/destroy/package.json +48 -0
  182. package/assets/api/vendor_modules/dunder-proto/.eslintrc +5 -0
  183. package/assets/api/vendor_modules/dunder-proto/.github/FUNDING.yml +12 -0
  184. package/assets/api/vendor_modules/dunder-proto/.nycrc +13 -0
  185. package/assets/api/vendor_modules/dunder-proto/CHANGELOG.md +24 -0
  186. package/assets/api/vendor_modules/dunder-proto/LICENSE +21 -0
  187. package/assets/api/vendor_modules/dunder-proto/README.md +54 -0
  188. package/assets/api/vendor_modules/dunder-proto/get.d.ts +5 -0
  189. package/assets/api/vendor_modules/dunder-proto/get.js +30 -0
  190. package/assets/api/vendor_modules/dunder-proto/package.json +76 -0
  191. package/assets/api/vendor_modules/dunder-proto/set.d.ts +5 -0
  192. package/assets/api/vendor_modules/dunder-proto/set.js +35 -0
  193. package/assets/api/vendor_modules/dunder-proto/test/get.js +34 -0
  194. package/assets/api/vendor_modules/dunder-proto/test/index.js +4 -0
  195. package/assets/api/vendor_modules/dunder-proto/test/set.js +50 -0
  196. package/assets/api/vendor_modules/dunder-proto/tsconfig.json +9 -0
  197. package/assets/api/vendor_modules/ee-first/LICENSE +22 -0
  198. package/assets/api/vendor_modules/ee-first/README.md +80 -0
  199. package/assets/api/vendor_modules/ee-first/index.js +95 -0
  200. package/assets/api/vendor_modules/ee-first/package.json +29 -0
  201. package/assets/api/vendor_modules/encodeurl/LICENSE +22 -0
  202. package/assets/api/vendor_modules/encodeurl/README.md +109 -0
  203. package/assets/api/vendor_modules/encodeurl/index.js +60 -0
  204. package/assets/api/vendor_modules/encodeurl/package.json +40 -0
  205. package/assets/api/vendor_modules/es-define-property/.eslintrc +13 -0
  206. package/assets/api/vendor_modules/es-define-property/.github/FUNDING.yml +12 -0
  207. package/assets/api/vendor_modules/es-define-property/.nycrc +9 -0
  208. package/assets/api/vendor_modules/es-define-property/CHANGELOG.md +29 -0
  209. package/assets/api/vendor_modules/es-define-property/LICENSE +21 -0
  210. package/assets/api/vendor_modules/es-define-property/README.md +49 -0
  211. package/assets/api/vendor_modules/es-define-property/index.d.ts +3 -0
  212. package/assets/api/vendor_modules/es-define-property/index.js +14 -0
  213. package/assets/api/vendor_modules/es-define-property/package.json +81 -0
  214. package/assets/api/vendor_modules/es-define-property/test/index.js +56 -0
  215. package/assets/api/vendor_modules/es-define-property/tsconfig.json +10 -0
  216. package/assets/api/vendor_modules/es-errors/.eslintrc +5 -0
  217. package/assets/api/vendor_modules/es-errors/.github/FUNDING.yml +12 -0
  218. package/assets/api/vendor_modules/es-errors/CHANGELOG.md +40 -0
  219. package/assets/api/vendor_modules/es-errors/LICENSE +21 -0
  220. package/assets/api/vendor_modules/es-errors/README.md +55 -0
  221. package/assets/api/vendor_modules/es-errors/eval.d.ts +3 -0
  222. package/assets/api/vendor_modules/es-errors/eval.js +4 -0
  223. package/assets/api/vendor_modules/es-errors/index.d.ts +3 -0
  224. package/assets/api/vendor_modules/es-errors/index.js +4 -0
  225. package/assets/api/vendor_modules/es-errors/package.json +80 -0
  226. package/assets/api/vendor_modules/es-errors/range.d.ts +3 -0
  227. package/assets/api/vendor_modules/es-errors/range.js +4 -0
  228. package/assets/api/vendor_modules/es-errors/ref.d.ts +3 -0
  229. package/assets/api/vendor_modules/es-errors/ref.js +4 -0
  230. package/assets/api/vendor_modules/es-errors/syntax.d.ts +3 -0
  231. package/assets/api/vendor_modules/es-errors/syntax.js +4 -0
  232. package/assets/api/vendor_modules/es-errors/test/index.js +19 -0
  233. package/assets/api/vendor_modules/es-errors/tsconfig.json +49 -0
  234. package/assets/api/vendor_modules/es-errors/type.d.ts +3 -0
  235. package/assets/api/vendor_modules/es-errors/type.js +4 -0
  236. package/assets/api/vendor_modules/es-errors/uri.d.ts +3 -0
  237. package/assets/api/vendor_modules/es-errors/uri.js +4 -0
  238. package/assets/api/vendor_modules/es-object-atoms/.eslintrc +16 -0
  239. package/assets/api/vendor_modules/es-object-atoms/.github/FUNDING.yml +12 -0
  240. package/assets/api/vendor_modules/es-object-atoms/CHANGELOG.md +44 -0
  241. package/assets/api/vendor_modules/es-object-atoms/LICENSE +21 -0
  242. package/assets/api/vendor_modules/es-object-atoms/README.md +63 -0
  243. package/assets/api/vendor_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  244. package/assets/api/vendor_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  245. package/assets/api/vendor_modules/es-object-atoms/ToObject.d.ts +7 -0
  246. package/assets/api/vendor_modules/es-object-atoms/ToObject.js +10 -0
  247. package/assets/api/vendor_modules/es-object-atoms/index.d.ts +3 -0
  248. package/assets/api/vendor_modules/es-object-atoms/index.js +4 -0
  249. package/assets/api/vendor_modules/es-object-atoms/isObject.d.ts +3 -0
  250. package/assets/api/vendor_modules/es-object-atoms/isObject.js +6 -0
  251. package/assets/api/vendor_modules/es-object-atoms/package.json +79 -0
  252. package/assets/api/vendor_modules/es-object-atoms/test/index.js +38 -0
  253. package/assets/api/vendor_modules/es-object-atoms/tsconfig.json +7 -0
  254. package/assets/api/vendor_modules/escape-html/LICENSE +24 -0
  255. package/assets/api/vendor_modules/escape-html/Readme.md +43 -0
  256. package/assets/api/vendor_modules/escape-html/index.js +78 -0
  257. package/assets/api/vendor_modules/escape-html/package.json +24 -0
  258. package/assets/api/vendor_modules/etag/HISTORY.md +83 -0
  259. package/assets/api/vendor_modules/etag/LICENSE +22 -0
  260. package/assets/api/vendor_modules/etag/README.md +159 -0
  261. package/assets/api/vendor_modules/etag/index.js +131 -0
  262. package/assets/api/vendor_modules/etag/package.json +47 -0
  263. package/assets/api/vendor_modules/express/History.md +3676 -0
  264. package/assets/api/vendor_modules/express/LICENSE +24 -0
  265. package/assets/api/vendor_modules/express/Readme.md +260 -0
  266. package/assets/api/vendor_modules/express/index.js +11 -0
  267. package/assets/api/vendor_modules/express/lib/application.js +661 -0
  268. package/assets/api/vendor_modules/express/lib/express.js +116 -0
  269. package/assets/api/vendor_modules/express/lib/middleware/init.js +43 -0
  270. package/assets/api/vendor_modules/express/lib/middleware/query.js +47 -0
  271. package/assets/api/vendor_modules/express/lib/request.js +525 -0
  272. package/assets/api/vendor_modules/express/lib/response.js +1179 -0
  273. package/assets/api/vendor_modules/express/lib/router/index.js +673 -0
  274. package/assets/api/vendor_modules/express/lib/router/layer.js +181 -0
  275. package/assets/api/vendor_modules/express/lib/router/route.js +230 -0
  276. package/assets/api/vendor_modules/express/lib/utils.js +304 -0
  277. package/assets/api/vendor_modules/express/lib/view.js +182 -0
  278. package/assets/api/vendor_modules/express/package.json +102 -0
  279. package/assets/api/vendor_modules/finalhandler/HISTORY.md +216 -0
  280. package/assets/api/vendor_modules/finalhandler/LICENSE +22 -0
  281. package/assets/api/vendor_modules/finalhandler/README.md +147 -0
  282. package/assets/api/vendor_modules/finalhandler/SECURITY.md +25 -0
  283. package/assets/api/vendor_modules/finalhandler/index.js +341 -0
  284. package/assets/api/vendor_modules/finalhandler/package.json +47 -0
  285. package/assets/api/vendor_modules/forwarded/HISTORY.md +21 -0
  286. package/assets/api/vendor_modules/forwarded/LICENSE +22 -0
  287. package/assets/api/vendor_modules/forwarded/README.md +57 -0
  288. package/assets/api/vendor_modules/forwarded/index.js +90 -0
  289. package/assets/api/vendor_modules/forwarded/package.json +45 -0
  290. package/assets/api/vendor_modules/fresh/HISTORY.md +70 -0
  291. package/assets/api/vendor_modules/fresh/LICENSE +23 -0
  292. package/assets/api/vendor_modules/fresh/README.md +119 -0
  293. package/assets/api/vendor_modules/fresh/index.js +137 -0
  294. package/assets/api/vendor_modules/fresh/package.json +46 -0
  295. package/assets/api/vendor_modules/function-bind/.eslintrc +21 -0
  296. package/assets/api/vendor_modules/function-bind/.github/FUNDING.yml +12 -0
  297. package/assets/api/vendor_modules/function-bind/.github/SECURITY.md +3 -0
  298. package/assets/api/vendor_modules/function-bind/.nycrc +13 -0
  299. package/assets/api/vendor_modules/function-bind/CHANGELOG.md +136 -0
  300. package/assets/api/vendor_modules/function-bind/LICENSE +20 -0
  301. package/assets/api/vendor_modules/function-bind/README.md +46 -0
  302. package/assets/api/vendor_modules/function-bind/implementation.js +84 -0
  303. package/assets/api/vendor_modules/function-bind/index.js +5 -0
  304. package/assets/api/vendor_modules/function-bind/package.json +87 -0
  305. package/assets/api/vendor_modules/function-bind/test/.eslintrc +9 -0
  306. package/assets/api/vendor_modules/function-bind/test/index.js +252 -0
  307. package/assets/api/vendor_modules/get-intrinsic/.eslintrc +42 -0
  308. package/assets/api/vendor_modules/get-intrinsic/.github/FUNDING.yml +12 -0
  309. package/assets/api/vendor_modules/get-intrinsic/.nycrc +9 -0
  310. package/assets/api/vendor_modules/get-intrinsic/CHANGELOG.md +186 -0
  311. package/assets/api/vendor_modules/get-intrinsic/LICENSE +21 -0
  312. package/assets/api/vendor_modules/get-intrinsic/README.md +71 -0
  313. package/assets/api/vendor_modules/get-intrinsic/index.js +378 -0
  314. package/assets/api/vendor_modules/get-intrinsic/package.json +97 -0
  315. package/assets/api/vendor_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
  316. package/assets/api/vendor_modules/get-proto/.eslintrc +10 -0
  317. package/assets/api/vendor_modules/get-proto/.github/FUNDING.yml +12 -0
  318. package/assets/api/vendor_modules/get-proto/.nycrc +9 -0
  319. package/assets/api/vendor_modules/get-proto/CHANGELOG.md +21 -0
  320. package/assets/api/vendor_modules/get-proto/LICENSE +21 -0
  321. package/assets/api/vendor_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  322. package/assets/api/vendor_modules/get-proto/Object.getPrototypeOf.js +6 -0
  323. package/assets/api/vendor_modules/get-proto/README.md +50 -0
  324. package/assets/api/vendor_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  325. package/assets/api/vendor_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  326. package/assets/api/vendor_modules/get-proto/index.d.ts +5 -0
  327. package/assets/api/vendor_modules/get-proto/index.js +27 -0
  328. package/assets/api/vendor_modules/get-proto/package.json +81 -0
  329. package/assets/api/vendor_modules/get-proto/test/index.js +68 -0
  330. package/assets/api/vendor_modules/get-proto/tsconfig.json +9 -0
  331. package/assets/api/vendor_modules/gopd/.eslintrc +16 -0
  332. package/assets/api/vendor_modules/gopd/.github/FUNDING.yml +12 -0
  333. package/assets/api/vendor_modules/gopd/CHANGELOG.md +45 -0
  334. package/assets/api/vendor_modules/gopd/LICENSE +21 -0
  335. package/assets/api/vendor_modules/gopd/README.md +40 -0
  336. package/assets/api/vendor_modules/gopd/gOPD.d.ts +1 -0
  337. package/assets/api/vendor_modules/gopd/gOPD.js +4 -0
  338. package/assets/api/vendor_modules/gopd/index.d.ts +5 -0
  339. package/assets/api/vendor_modules/gopd/index.js +15 -0
  340. package/assets/api/vendor_modules/gopd/package.json +77 -0
  341. package/assets/api/vendor_modules/gopd/test/index.js +36 -0
  342. package/assets/api/vendor_modules/gopd/tsconfig.json +9 -0
  343. package/assets/api/vendor_modules/has-symbols/.eslintrc +11 -0
  344. package/assets/api/vendor_modules/has-symbols/.github/FUNDING.yml +12 -0
  345. package/assets/api/vendor_modules/has-symbols/.nycrc +9 -0
  346. package/assets/api/vendor_modules/has-symbols/CHANGELOG.md +91 -0
  347. package/assets/api/vendor_modules/has-symbols/LICENSE +21 -0
  348. package/assets/api/vendor_modules/has-symbols/README.md +46 -0
  349. package/assets/api/vendor_modules/has-symbols/index.d.ts +3 -0
  350. package/assets/api/vendor_modules/has-symbols/index.js +14 -0
  351. package/assets/api/vendor_modules/has-symbols/package.json +111 -0
  352. package/assets/api/vendor_modules/has-symbols/shams.d.ts +3 -0
  353. package/assets/api/vendor_modules/has-symbols/shams.js +45 -0
  354. package/assets/api/vendor_modules/has-symbols/test/index.js +22 -0
  355. package/assets/api/vendor_modules/has-symbols/test/shams/core-js.js +29 -0
  356. package/assets/api/vendor_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
  357. package/assets/api/vendor_modules/has-symbols/test/tests.js +58 -0
  358. package/assets/api/vendor_modules/has-symbols/tsconfig.json +10 -0
  359. package/assets/api/vendor_modules/hasown/.github/FUNDING.yml +12 -0
  360. package/assets/api/vendor_modules/hasown/.nycrc +13 -0
  361. package/assets/api/vendor_modules/hasown/CHANGELOG.md +58 -0
  362. package/assets/api/vendor_modules/hasown/LICENSE +21 -0
  363. package/assets/api/vendor_modules/hasown/README.md +40 -0
  364. package/assets/api/vendor_modules/hasown/eslint.config.mjs +6 -0
  365. package/assets/api/vendor_modules/hasown/index.d.ts +3 -0
  366. package/assets/api/vendor_modules/hasown/index.js +8 -0
  367. package/assets/api/vendor_modules/hasown/package.json +91 -0
  368. package/assets/api/vendor_modules/hasown/tsconfig.json +6 -0
  369. package/assets/api/vendor_modules/http-errors/HISTORY.md +186 -0
  370. package/assets/api/vendor_modules/http-errors/LICENSE +23 -0
  371. package/assets/api/vendor_modules/http-errors/README.md +169 -0
  372. package/assets/api/vendor_modules/http-errors/index.js +290 -0
  373. package/assets/api/vendor_modules/http-errors/package.json +54 -0
  374. package/assets/api/vendor_modules/iconv-lite/Changelog.md +162 -0
  375. package/assets/api/vendor_modules/iconv-lite/LICENSE +21 -0
  376. package/assets/api/vendor_modules/iconv-lite/README.md +156 -0
  377. package/assets/api/vendor_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
  378. package/assets/api/vendor_modules/iconv-lite/encodings/dbcs-data.js +176 -0
  379. package/assets/api/vendor_modules/iconv-lite/encodings/index.js +22 -0
  380. package/assets/api/vendor_modules/iconv-lite/encodings/internal.js +188 -0
  381. package/assets/api/vendor_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
  382. package/assets/api/vendor_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  383. package/assets/api/vendor_modules/iconv-lite/encodings/sbcs-data.js +174 -0
  384. package/assets/api/vendor_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  385. package/assets/api/vendor_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  386. package/assets/api/vendor_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  387. package/assets/api/vendor_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  388. package/assets/api/vendor_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  389. package/assets/api/vendor_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  390. package/assets/api/vendor_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
  391. package/assets/api/vendor_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  392. package/assets/api/vendor_modules/iconv-lite/encodings/utf16.js +177 -0
  393. package/assets/api/vendor_modules/iconv-lite/encodings/utf7.js +290 -0
  394. package/assets/api/vendor_modules/iconv-lite/lib/bom-handling.js +52 -0
  395. package/assets/api/vendor_modules/iconv-lite/lib/extend-node.js +217 -0
  396. package/assets/api/vendor_modules/iconv-lite/lib/index.d.ts +24 -0
  397. package/assets/api/vendor_modules/iconv-lite/lib/index.js +153 -0
  398. package/assets/api/vendor_modules/iconv-lite/lib/streams.js +121 -0
  399. package/assets/api/vendor_modules/iconv-lite/package.json +46 -0
  400. package/assets/api/vendor_modules/inherits/LICENSE +16 -0
  401. package/assets/api/vendor_modules/inherits/README.md +42 -0
  402. package/assets/api/vendor_modules/inherits/inherits.js +9 -0
  403. package/assets/api/vendor_modules/inherits/inherits_browser.js +27 -0
  404. package/assets/api/vendor_modules/inherits/package.json +29 -0
  405. package/assets/api/vendor_modules/ipaddr.js/LICENSE +19 -0
  406. package/assets/api/vendor_modules/ipaddr.js/README.md +233 -0
  407. package/assets/api/vendor_modules/ipaddr.js/ipaddr.min.js +1 -0
  408. package/assets/api/vendor_modules/ipaddr.js/lib/ipaddr.js +673 -0
  409. package/assets/api/vendor_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
  410. package/assets/api/vendor_modules/ipaddr.js/package.json +35 -0
  411. package/assets/api/vendor_modules/math-intrinsics/.eslintrc +16 -0
  412. package/assets/api/vendor_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  413. package/assets/api/vendor_modules/math-intrinsics/CHANGELOG.md +24 -0
  414. package/assets/api/vendor_modules/math-intrinsics/LICENSE +21 -0
  415. package/assets/api/vendor_modules/math-intrinsics/README.md +50 -0
  416. package/assets/api/vendor_modules/math-intrinsics/abs.d.ts +1 -0
  417. package/assets/api/vendor_modules/math-intrinsics/abs.js +4 -0
  418. package/assets/api/vendor_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  419. package/assets/api/vendor_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  420. package/assets/api/vendor_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  421. package/assets/api/vendor_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  422. package/assets/api/vendor_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  423. package/assets/api/vendor_modules/math-intrinsics/constants/maxValue.js +5 -0
  424. package/assets/api/vendor_modules/math-intrinsics/floor.d.ts +1 -0
  425. package/assets/api/vendor_modules/math-intrinsics/floor.js +4 -0
  426. package/assets/api/vendor_modules/math-intrinsics/isFinite.d.ts +3 -0
  427. package/assets/api/vendor_modules/math-intrinsics/isFinite.js +12 -0
  428. package/assets/api/vendor_modules/math-intrinsics/isInteger.d.ts +3 -0
  429. package/assets/api/vendor_modules/math-intrinsics/isInteger.js +16 -0
  430. package/assets/api/vendor_modules/math-intrinsics/isNaN.d.ts +1 -0
  431. package/assets/api/vendor_modules/math-intrinsics/isNaN.js +6 -0
  432. package/assets/api/vendor_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  433. package/assets/api/vendor_modules/math-intrinsics/isNegativeZero.js +6 -0
  434. package/assets/api/vendor_modules/math-intrinsics/max.d.ts +1 -0
  435. package/assets/api/vendor_modules/math-intrinsics/max.js +4 -0
  436. package/assets/api/vendor_modules/math-intrinsics/min.d.ts +1 -0
  437. package/assets/api/vendor_modules/math-intrinsics/min.js +4 -0
  438. package/assets/api/vendor_modules/math-intrinsics/mod.d.ts +3 -0
  439. package/assets/api/vendor_modules/math-intrinsics/mod.js +9 -0
  440. package/assets/api/vendor_modules/math-intrinsics/package.json +86 -0
  441. package/assets/api/vendor_modules/math-intrinsics/pow.d.ts +1 -0
  442. package/assets/api/vendor_modules/math-intrinsics/pow.js +4 -0
  443. package/assets/api/vendor_modules/math-intrinsics/round.d.ts +1 -0
  444. package/assets/api/vendor_modules/math-intrinsics/round.js +4 -0
  445. package/assets/api/vendor_modules/math-intrinsics/sign.d.ts +3 -0
  446. package/assets/api/vendor_modules/math-intrinsics/sign.js +11 -0
  447. package/assets/api/vendor_modules/math-intrinsics/test/index.js +192 -0
  448. package/assets/api/vendor_modules/math-intrinsics/tsconfig.json +3 -0
  449. package/assets/api/vendor_modules/media-typer/HISTORY.md +22 -0
  450. package/assets/api/vendor_modules/media-typer/LICENSE +22 -0
  451. package/assets/api/vendor_modules/media-typer/README.md +81 -0
  452. package/assets/api/vendor_modules/media-typer/index.js +270 -0
  453. package/assets/api/vendor_modules/media-typer/package.json +26 -0
  454. package/assets/api/vendor_modules/merge-descriptors/HISTORY.md +21 -0
  455. package/assets/api/vendor_modules/merge-descriptors/LICENSE +23 -0
  456. package/assets/api/vendor_modules/merge-descriptors/README.md +49 -0
  457. package/assets/api/vendor_modules/merge-descriptors/index.js +60 -0
  458. package/assets/api/vendor_modules/merge-descriptors/package.json +39 -0
  459. package/assets/api/vendor_modules/methods/HISTORY.md +29 -0
  460. package/assets/api/vendor_modules/methods/LICENSE +24 -0
  461. package/assets/api/vendor_modules/methods/README.md +51 -0
  462. package/assets/api/vendor_modules/methods/index.js +69 -0
  463. package/assets/api/vendor_modules/methods/package.json +36 -0
  464. package/assets/api/vendor_modules/mime/CHANGELOG.md +164 -0
  465. package/assets/api/vendor_modules/mime/LICENSE +21 -0
  466. package/assets/api/vendor_modules/mime/README.md +90 -0
  467. package/assets/api/vendor_modules/mime/cli.js +8 -0
  468. package/assets/api/vendor_modules/mime/mime.js +108 -0
  469. package/assets/api/vendor_modules/mime/package.json +44 -0
  470. package/assets/api/vendor_modules/mime/src/build.js +53 -0
  471. package/assets/api/vendor_modules/mime/src/test.js +60 -0
  472. package/assets/api/vendor_modules/mime/types.json +1 -0
  473. package/assets/api/vendor_modules/mime-db/HISTORY.md +507 -0
  474. package/assets/api/vendor_modules/mime-db/LICENSE +23 -0
  475. package/assets/api/vendor_modules/mime-db/README.md +100 -0
  476. package/assets/api/vendor_modules/mime-db/db.json +8519 -0
  477. package/assets/api/vendor_modules/mime-db/index.js +12 -0
  478. package/assets/api/vendor_modules/mime-db/package.json +60 -0
  479. package/assets/api/vendor_modules/mime-types/HISTORY.md +397 -0
  480. package/assets/api/vendor_modules/mime-types/LICENSE +23 -0
  481. package/assets/api/vendor_modules/mime-types/README.md +113 -0
  482. package/assets/api/vendor_modules/mime-types/index.js +188 -0
  483. package/assets/api/vendor_modules/mime-types/package.json +44 -0
  484. package/assets/api/vendor_modules/ms/index.js +152 -0
  485. package/assets/api/vendor_modules/ms/license.md +21 -0
  486. package/assets/api/vendor_modules/ms/package.json +37 -0
  487. package/assets/api/vendor_modules/ms/readme.md +51 -0
  488. package/assets/api/vendor_modules/negotiator/HISTORY.md +108 -0
  489. package/assets/api/vendor_modules/negotiator/LICENSE +24 -0
  490. package/assets/api/vendor_modules/negotiator/README.md +203 -0
  491. package/assets/api/vendor_modules/negotiator/index.js +82 -0
  492. package/assets/api/vendor_modules/negotiator/lib/charset.js +169 -0
  493. package/assets/api/vendor_modules/negotiator/lib/encoding.js +184 -0
  494. package/assets/api/vendor_modules/negotiator/lib/language.js +179 -0
  495. package/assets/api/vendor_modules/negotiator/lib/mediaType.js +294 -0
  496. package/assets/api/vendor_modules/negotiator/package.json +42 -0
  497. package/assets/api/vendor_modules/object-inspect/.eslintrc +53 -0
  498. package/assets/api/vendor_modules/object-inspect/.github/FUNDING.yml +12 -0
  499. package/assets/api/vendor_modules/object-inspect/.nycrc +13 -0
  500. package/assets/api/vendor_modules/object-inspect/CHANGELOG.md +424 -0
  501. package/assets/api/vendor_modules/object-inspect/LICENSE +21 -0
  502. package/assets/api/vendor_modules/object-inspect/example/all.js +23 -0
  503. package/assets/api/vendor_modules/object-inspect/example/circular.js +6 -0
  504. package/assets/api/vendor_modules/object-inspect/example/fn.js +5 -0
  505. package/assets/api/vendor_modules/object-inspect/example/inspect.js +10 -0
  506. package/assets/api/vendor_modules/object-inspect/index.js +544 -0
  507. package/assets/api/vendor_modules/object-inspect/package-support.json +20 -0
  508. package/assets/api/vendor_modules/object-inspect/package.json +105 -0
  509. package/assets/api/vendor_modules/object-inspect/readme.markdown +84 -0
  510. package/assets/api/vendor_modules/object-inspect/test/bigint.js +58 -0
  511. package/assets/api/vendor_modules/object-inspect/test/browser/dom.js +15 -0
  512. package/assets/api/vendor_modules/object-inspect/test/circular.js +16 -0
  513. package/assets/api/vendor_modules/object-inspect/test/deep.js +12 -0
  514. package/assets/api/vendor_modules/object-inspect/test/element.js +53 -0
  515. package/assets/api/vendor_modules/object-inspect/test/err.js +48 -0
  516. package/assets/api/vendor_modules/object-inspect/test/fakes.js +29 -0
  517. package/assets/api/vendor_modules/object-inspect/test/fn.js +76 -0
  518. package/assets/api/vendor_modules/object-inspect/test/global.js +17 -0
  519. package/assets/api/vendor_modules/object-inspect/test/has.js +15 -0
  520. package/assets/api/vendor_modules/object-inspect/test/holes.js +15 -0
  521. package/assets/api/vendor_modules/object-inspect/test/indent-option.js +271 -0
  522. package/assets/api/vendor_modules/object-inspect/test/inspect.js +139 -0
  523. package/assets/api/vendor_modules/object-inspect/test/lowbyte.js +12 -0
  524. package/assets/api/vendor_modules/object-inspect/test/number.js +58 -0
  525. package/assets/api/vendor_modules/object-inspect/test/quoteStyle.js +26 -0
  526. package/assets/api/vendor_modules/object-inspect/test/toStringTag.js +40 -0
  527. package/assets/api/vendor_modules/object-inspect/test/undef.js +12 -0
  528. package/assets/api/vendor_modules/object-inspect/test/values.js +261 -0
  529. package/assets/api/vendor_modules/object-inspect/test-core-js.js +26 -0
  530. package/assets/api/vendor_modules/object-inspect/util.inspect.js +1 -0
  531. package/assets/api/vendor_modules/on-finished/HISTORY.md +98 -0
  532. package/assets/api/vendor_modules/on-finished/LICENSE +23 -0
  533. package/assets/api/vendor_modules/on-finished/README.md +162 -0
  534. package/assets/api/vendor_modules/on-finished/index.js +234 -0
  535. package/assets/api/vendor_modules/on-finished/package.json +39 -0
  536. package/assets/api/vendor_modules/parseurl/HISTORY.md +58 -0
  537. package/assets/api/vendor_modules/parseurl/LICENSE +24 -0
  538. package/assets/api/vendor_modules/parseurl/README.md +133 -0
  539. package/assets/api/vendor_modules/parseurl/index.js +158 -0
  540. package/assets/api/vendor_modules/parseurl/package.json +40 -0
  541. package/assets/api/vendor_modules/path-to-regexp/LICENSE +21 -0
  542. package/assets/api/vendor_modules/path-to-regexp/Readme.md +35 -0
  543. package/assets/api/vendor_modules/path-to-regexp/index.js +158 -0
  544. package/assets/api/vendor_modules/path-to-regexp/package.json +30 -0
  545. package/assets/api/vendor_modules/proxy-addr/HISTORY.md +167 -0
  546. package/assets/api/vendor_modules/proxy-addr/LICENSE +22 -0
  547. package/assets/api/vendor_modules/proxy-addr/README.md +139 -0
  548. package/assets/api/vendor_modules/proxy-addr/index.js +359 -0
  549. package/assets/api/vendor_modules/proxy-addr/package.json +51 -0
  550. package/assets/api/vendor_modules/qs/.editorconfig +46 -0
  551. package/assets/api/vendor_modules/qs/.github/FUNDING.yml +12 -0
  552. package/assets/api/vendor_modules/qs/.github/SECURITY.md +11 -0
  553. package/assets/api/vendor_modules/qs/.github/THREAT_MODEL.md +78 -0
  554. package/assets/api/vendor_modules/qs/.nycrc +13 -0
  555. package/assets/api/vendor_modules/qs/CHANGELOG.md +833 -0
  556. package/assets/api/vendor_modules/qs/LICENSE.md +29 -0
  557. package/assets/api/vendor_modules/qs/README.md +758 -0
  558. package/assets/api/vendor_modules/qs/dist/qs.js +141 -0
  559. package/assets/api/vendor_modules/qs/eslint.config.mjs +57 -0
  560. package/assets/api/vendor_modules/qs/lib/formats.js +23 -0
  561. package/assets/api/vendor_modules/qs/lib/index.js +11 -0
  562. package/assets/api/vendor_modules/qs/lib/parse.js +414 -0
  563. package/assets/api/vendor_modules/qs/lib/stringify.js +363 -0
  564. package/assets/api/vendor_modules/qs/lib/utils.js +381 -0
  565. package/assets/api/vendor_modules/qs/package.json +95 -0
  566. package/assets/api/vendor_modules/qs/test/empty-keys-cases.js +267 -0
  567. package/assets/api/vendor_modules/qs/test/parse.js +1933 -0
  568. package/assets/api/vendor_modules/qs/test/stringify.js +1448 -0
  569. package/assets/api/vendor_modules/qs/test/utils.js +626 -0
  570. package/assets/api/vendor_modules/range-parser/HISTORY.md +56 -0
  571. package/assets/api/vendor_modules/range-parser/LICENSE +23 -0
  572. package/assets/api/vendor_modules/range-parser/README.md +84 -0
  573. package/assets/api/vendor_modules/range-parser/index.js +162 -0
  574. package/assets/api/vendor_modules/range-parser/package.json +44 -0
  575. package/assets/api/vendor_modules/raw-body/LICENSE +22 -0
  576. package/assets/api/vendor_modules/raw-body/README.md +223 -0
  577. package/assets/api/vendor_modules/raw-body/index.d.ts +87 -0
  578. package/assets/api/vendor_modules/raw-body/index.js +336 -0
  579. package/assets/api/vendor_modules/raw-body/package.json +47 -0
  580. package/assets/api/vendor_modules/safe-buffer/LICENSE +21 -0
  581. package/assets/api/vendor_modules/safe-buffer/README.md +584 -0
  582. package/assets/api/vendor_modules/safe-buffer/index.d.ts +187 -0
  583. package/assets/api/vendor_modules/safe-buffer/index.js +65 -0
  584. package/assets/api/vendor_modules/safe-buffer/package.json +51 -0
  585. package/assets/api/vendor_modules/safer-buffer/LICENSE +21 -0
  586. package/assets/api/vendor_modules/safer-buffer/Porting-Buffer.md +268 -0
  587. package/assets/api/vendor_modules/safer-buffer/Readme.md +156 -0
  588. package/assets/api/vendor_modules/safer-buffer/dangerous.js +58 -0
  589. package/assets/api/vendor_modules/safer-buffer/package.json +34 -0
  590. package/assets/api/vendor_modules/safer-buffer/safer.js +77 -0
  591. package/assets/api/vendor_modules/safer-buffer/tests.js +406 -0
  592. package/assets/api/vendor_modules/send/HISTORY.md +538 -0
  593. package/assets/api/vendor_modules/send/LICENSE +23 -0
  594. package/assets/api/vendor_modules/send/README.md +327 -0
  595. package/assets/api/vendor_modules/send/SECURITY.md +24 -0
  596. package/assets/api/vendor_modules/send/index.js +1142 -0
  597. package/assets/api/vendor_modules/send/node_modules/ms/index.js +162 -0
  598. package/assets/api/vendor_modules/send/node_modules/ms/license.md +21 -0
  599. package/assets/api/vendor_modules/send/node_modules/ms/package.json +38 -0
  600. package/assets/api/vendor_modules/send/node_modules/ms/readme.md +59 -0
  601. package/assets/api/vendor_modules/send/package.json +62 -0
  602. package/assets/api/vendor_modules/serve-static/HISTORY.md +493 -0
  603. package/assets/api/vendor_modules/serve-static/LICENSE +25 -0
  604. package/assets/api/vendor_modules/serve-static/README.md +257 -0
  605. package/assets/api/vendor_modules/serve-static/index.js +209 -0
  606. package/assets/api/vendor_modules/serve-static/package.json +42 -0
  607. package/assets/api/vendor_modules/serverless-http/LICENSE.txt +33 -0
  608. package/assets/api/vendor_modules/serverless-http/README.md +117 -0
  609. package/assets/api/vendor_modules/serverless-http/lib/finish.js +42 -0
  610. package/assets/api/vendor_modules/serverless-http/lib/framework/get-framework.js +79 -0
  611. package/assets/api/vendor_modules/serverless-http/lib/provider/aws/clean-up-event.js +98 -0
  612. package/assets/api/vendor_modules/serverless-http/lib/provider/aws/create-request.js +110 -0
  613. package/assets/api/vendor_modules/serverless-http/lib/provider/aws/format-response.js +45 -0
  614. package/assets/api/vendor_modules/serverless-http/lib/provider/aws/index.js +15 -0
  615. package/assets/api/vendor_modules/serverless-http/lib/provider/aws/is-binary.js +42 -0
  616. package/assets/api/vendor_modules/serverless-http/lib/provider/aws/sanitize-headers.js +21 -0
  617. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/clean-up-request.js +41 -0
  618. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/create-request.js +45 -0
  619. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/format-response.js +18 -0
  620. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/index.js +13 -0
  621. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/is-binary.js +42 -0
  622. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/sanitize-headers.js +23 -0
  623. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/set-cookie.json +1 -0
  624. package/assets/api/vendor_modules/serverless-http/lib/provider/get-provider.js +17 -0
  625. package/assets/api/vendor_modules/serverless-http/lib/request.js +38 -0
  626. package/assets/api/vendor_modules/serverless-http/lib/response.js +135 -0
  627. package/assets/api/vendor_modules/serverless-http/package.json +93 -0
  628. package/assets/api/vendor_modules/serverless-http/serverless-http.d.ts +41 -0
  629. package/assets/api/vendor_modules/serverless-http/serverless-http.js +23 -0
  630. package/assets/api/vendor_modules/setprototypeof/LICENSE +13 -0
  631. package/assets/api/vendor_modules/setprototypeof/README.md +31 -0
  632. package/assets/api/vendor_modules/setprototypeof/index.d.ts +2 -0
  633. package/assets/api/vendor_modules/setprototypeof/index.js +17 -0
  634. package/assets/api/vendor_modules/setprototypeof/package.json +38 -0
  635. package/assets/api/vendor_modules/setprototypeof/test/index.js +24 -0
  636. package/assets/api/vendor_modules/side-channel/.editorconfig +9 -0
  637. package/assets/api/vendor_modules/side-channel/.eslintrc +12 -0
  638. package/assets/api/vendor_modules/side-channel/.github/FUNDING.yml +12 -0
  639. package/assets/api/vendor_modules/side-channel/.nycrc +13 -0
  640. package/assets/api/vendor_modules/side-channel/CHANGELOG.md +120 -0
  641. package/assets/api/vendor_modules/side-channel/LICENSE +21 -0
  642. package/assets/api/vendor_modules/side-channel/README.md +61 -0
  643. package/assets/api/vendor_modules/side-channel/index.d.ts +14 -0
  644. package/assets/api/vendor_modules/side-channel/index.js +46 -0
  645. package/assets/api/vendor_modules/side-channel/package.json +85 -0
  646. package/assets/api/vendor_modules/side-channel/test/index.js +120 -0
  647. package/assets/api/vendor_modules/side-channel/tsconfig.json +9 -0
  648. package/assets/api/vendor_modules/side-channel-list/.editorconfig +9 -0
  649. package/assets/api/vendor_modules/side-channel-list/.eslintrc +11 -0
  650. package/assets/api/vendor_modules/side-channel-list/.github/FUNDING.yml +12 -0
  651. package/assets/api/vendor_modules/side-channel-list/.nycrc +13 -0
  652. package/assets/api/vendor_modules/side-channel-list/CHANGELOG.md +36 -0
  653. package/assets/api/vendor_modules/side-channel-list/LICENSE +21 -0
  654. package/assets/api/vendor_modules/side-channel-list/README.md +62 -0
  655. package/assets/api/vendor_modules/side-channel-list/index.d.ts +13 -0
  656. package/assets/api/vendor_modules/side-channel-list/index.js +111 -0
  657. package/assets/api/vendor_modules/side-channel-list/list.d.ts +14 -0
  658. package/assets/api/vendor_modules/side-channel-list/package.json +77 -0
  659. package/assets/api/vendor_modules/side-channel-list/test/index.js +154 -0
  660. package/assets/api/vendor_modules/side-channel-list/tsconfig.json +9 -0
  661. package/assets/api/vendor_modules/side-channel-map/.editorconfig +9 -0
  662. package/assets/api/vendor_modules/side-channel-map/.eslintrc +11 -0
  663. package/assets/api/vendor_modules/side-channel-map/.github/FUNDING.yml +12 -0
  664. package/assets/api/vendor_modules/side-channel-map/.nycrc +13 -0
  665. package/assets/api/vendor_modules/side-channel-map/CHANGELOG.md +22 -0
  666. package/assets/api/vendor_modules/side-channel-map/LICENSE +21 -0
  667. package/assets/api/vendor_modules/side-channel-map/README.md +62 -0
  668. package/assets/api/vendor_modules/side-channel-map/index.d.ts +15 -0
  669. package/assets/api/vendor_modules/side-channel-map/index.js +68 -0
  670. package/assets/api/vendor_modules/side-channel-map/package.json +80 -0
  671. package/assets/api/vendor_modules/side-channel-map/test/index.js +114 -0
  672. package/assets/api/vendor_modules/side-channel-map/tsconfig.json +9 -0
  673. package/assets/api/vendor_modules/side-channel-weakmap/.editorconfig +9 -0
  674. package/assets/api/vendor_modules/side-channel-weakmap/.eslintrc +12 -0
  675. package/assets/api/vendor_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
  676. package/assets/api/vendor_modules/side-channel-weakmap/.nycrc +13 -0
  677. package/assets/api/vendor_modules/side-channel-weakmap/CHANGELOG.md +28 -0
  678. package/assets/api/vendor_modules/side-channel-weakmap/LICENSE +21 -0
  679. package/assets/api/vendor_modules/side-channel-weakmap/README.md +62 -0
  680. package/assets/api/vendor_modules/side-channel-weakmap/index.d.ts +15 -0
  681. package/assets/api/vendor_modules/side-channel-weakmap/index.js +84 -0
  682. package/assets/api/vendor_modules/side-channel-weakmap/package.json +87 -0
  683. package/assets/api/vendor_modules/side-channel-weakmap/test/index.js +114 -0
  684. package/assets/api/vendor_modules/side-channel-weakmap/tsconfig.json +9 -0
  685. package/assets/api/vendor_modules/statuses/HISTORY.md +87 -0
  686. package/assets/api/vendor_modules/statuses/LICENSE +23 -0
  687. package/assets/api/vendor_modules/statuses/README.md +139 -0
  688. package/assets/api/vendor_modules/statuses/codes.json +65 -0
  689. package/assets/api/vendor_modules/statuses/index.js +146 -0
  690. package/assets/api/vendor_modules/statuses/package.json +49 -0
  691. package/assets/api/vendor_modules/toidentifier/HISTORY.md +9 -0
  692. package/assets/api/vendor_modules/toidentifier/LICENSE +21 -0
  693. package/assets/api/vendor_modules/toidentifier/README.md +61 -0
  694. package/assets/api/vendor_modules/toidentifier/index.js +32 -0
  695. package/assets/api/vendor_modules/toidentifier/package.json +38 -0
  696. package/assets/api/vendor_modules/type-is/HISTORY.md +259 -0
  697. package/assets/api/vendor_modules/type-is/LICENSE +23 -0
  698. package/assets/api/vendor_modules/type-is/README.md +170 -0
  699. package/assets/api/vendor_modules/type-is/index.js +266 -0
  700. package/assets/api/vendor_modules/type-is/package.json +45 -0
  701. package/assets/api/vendor_modules/unpipe/HISTORY.md +4 -0
  702. package/assets/api/vendor_modules/unpipe/LICENSE +22 -0
  703. package/assets/api/vendor_modules/unpipe/README.md +43 -0
  704. package/assets/api/vendor_modules/unpipe/index.js +69 -0
  705. package/assets/api/vendor_modules/unpipe/package.json +27 -0
  706. package/assets/api/vendor_modules/utils-merge/LICENSE +20 -0
  707. package/assets/api/vendor_modules/utils-merge/README.md +34 -0
  708. package/assets/api/vendor_modules/utils-merge/index.js +23 -0
  709. package/assets/api/vendor_modules/utils-merge/package.json +40 -0
  710. package/assets/api/vendor_modules/vary/HISTORY.md +39 -0
  711. package/assets/api/vendor_modules/vary/LICENSE +22 -0
  712. package/assets/api/vendor_modules/vary/README.md +101 -0
  713. package/assets/api/vendor_modules/vary/index.js +149 -0
  714. package/assets/api/vendor_modules/vary/package.json +43 -0
  715. package/assets/federation-presignup/index.js +108 -0
  716. package/assets/firstadmin/index.js +361 -0
  717. package/assets/headscale-apikey/index.js +140 -0
  718. package/assets/invoke-relay/index.js +96 -0
  719. package/assets/issuer-canary/index.js +71 -0
  720. package/assets/issuer-publish/index.js +87 -0
  721. package/assets/keyminter/index.js +209 -0
  722. package/assets/plugin-authorizer/index.js +1740 -0
  723. package/assets/plugin-catalog/index.js +881 -0
  724. package/assets/reapproval/index.js +3761 -0
  725. package/assets/sg-manager/index.js +176 -0
  726. package/assets/tailnet-resolver/index.js +55 -0
  727. package/assets/web/chunk-2MOGDYK4.js +1 -0
  728. package/assets/web/chunk-2SO4BVIT.js +1 -0
  729. package/assets/web/chunk-2V6RSAAC.js +1 -0
  730. package/assets/web/chunk-32GNBTAL.js +1 -0
  731. package/assets/web/chunk-33SYY2JB.js +1 -0
  732. package/assets/web/chunk-3VWYT7AX.js +1 -0
  733. package/assets/web/chunk-4FG4DAWU.js +4 -0
  734. package/assets/web/chunk-4N2IUS6T.js +1 -0
  735. package/assets/web/chunk-4SK6XQ6C.js +1 -0
  736. package/assets/web/chunk-65WE5MXA.js +8 -0
  737. package/assets/web/chunk-6D7SSSJF.js +1 -0
  738. package/assets/web/chunk-6KFR7DYY.js +1 -0
  739. package/assets/web/chunk-A4WHI3ZG.js +8 -0
  740. package/assets/web/chunk-BNFKRZTP.js +1 -0
  741. package/assets/web/chunk-CG56PH3M.js +1 -0
  742. package/assets/web/chunk-CGO25AIM.js +1 -0
  743. package/assets/web/chunk-CP4XZPOA.js +1 -0
  744. package/assets/web/chunk-CV7EODPO.js +1 -0
  745. package/assets/web/chunk-D7TR2ORJ.js +1 -0
  746. package/assets/web/chunk-DCOFBAKJ.js +1 -0
  747. package/assets/web/chunk-DOLRLYW7.js +1 -0
  748. package/assets/web/chunk-EEJ3X466.js +1 -0
  749. package/assets/web/chunk-EQ4PF25J.js +1 -0
  750. package/assets/web/chunk-EVP5UVDQ.js +1 -0
  751. package/assets/web/chunk-EW2VMNHE.js +1 -0
  752. package/assets/web/chunk-FIUVIKAN.js +1 -0
  753. package/assets/web/chunk-GHEU25TG.js +1 -0
  754. package/assets/web/chunk-GK2T2SMO.js +1 -0
  755. package/assets/web/chunk-GKI3R2JB.js +1 -0
  756. package/assets/web/chunk-GPKKIOHD.js +2 -0
  757. package/assets/web/chunk-H4AVFUDM.js +1 -0
  758. package/assets/web/chunk-H5H727H6.js +1 -0
  759. package/assets/web/chunk-HGVFH6YM.js +1 -0
  760. package/assets/web/chunk-HHPIANBK.js +1 -0
  761. package/assets/web/chunk-HK56COCB.js +1 -0
  762. package/assets/web/chunk-HZUB7LFV.js +1 -0
  763. package/assets/web/chunk-I7NTNTBA.js +1 -0
  764. package/assets/web/chunk-IKK5DQ3Z.js +1 -0
  765. package/assets/web/chunk-IMH56UBX.js +1 -0
  766. package/assets/web/chunk-J3SSPCFV.js +1 -0
  767. package/assets/web/chunk-J4C7C5KO.js +1 -0
  768. package/assets/web/chunk-J57JB4MU.js +1 -0
  769. package/assets/web/chunk-JMBXRK3I.js +4 -0
  770. package/assets/web/chunk-KCCEQIXX.js +1 -0
  771. package/assets/web/chunk-KEBESIXR.js +1 -0
  772. package/assets/web/chunk-KPNHT4MK.js +1 -0
  773. package/assets/web/chunk-LMLXTVZG.js +1 -0
  774. package/assets/web/chunk-M6OAYNRE.js +1 -0
  775. package/assets/web/chunk-M7MGX5I4.js +1 -0
  776. package/assets/web/chunk-MU2VNTNY.js +1 -0
  777. package/assets/web/chunk-NABAVDRL.js +1 -0
  778. package/assets/web/chunk-NO5D6WDF.js +1 -0
  779. package/assets/web/chunk-O4QSFUXB.js +1 -0
  780. package/assets/web/chunk-OATVFQXO.js +1 -0
  781. package/assets/web/chunk-P5WRM37W.js +5 -0
  782. package/assets/web/chunk-PCP6D2SM.js +1 -0
  783. package/assets/web/chunk-PMMBJK7Q.js +1 -0
  784. package/assets/web/chunk-PSMER3HX.js +1 -0
  785. package/assets/web/chunk-QPBWZLCT.js +1 -0
  786. package/assets/web/chunk-QVABVDO5.js +1 -0
  787. package/assets/web/chunk-RI77LE5V.js +1 -0
  788. package/assets/web/chunk-RKGUEXZ2.js +1 -0
  789. package/assets/web/chunk-RMFH2YTZ.js +1 -0
  790. package/assets/web/chunk-RROPCBUH.js +1 -0
  791. package/assets/web/chunk-SJMLX5AT.js +1 -0
  792. package/assets/web/chunk-TKVALOE4.js +2 -0
  793. package/assets/web/chunk-TM43WUKM.js +1 -0
  794. package/assets/web/chunk-VKWV3ANT.js +1 -0
  795. package/assets/web/chunk-VTMYG6YW.js +1 -0
  796. package/assets/web/chunk-VWW4SA5R.js +1 -0
  797. package/assets/web/chunk-WEDAFMID.js +1 -0
  798. package/assets/web/chunk-WFIHWVQO.js +1 -0
  799. package/assets/web/chunk-XJM3HDJQ.js +1 -0
  800. package/assets/web/chunk-YVJV2RUY.js +1 -0
  801. package/assets/web/chunk-Z3KONI7L.js +1 -0
  802. package/assets/web/chunk-ZDCURXPS.js +1 -0
  803. package/assets/web/favicon.ico +0 -0
  804. package/assets/web/index.html +63 -0
  805. package/assets/web/main-S6E3BC5O.js +2 -0
  806. package/assets/web/polyfills-7RSNIJ6J.js +2 -0
  807. package/assets/web/styles-R6ZUWC6K.css +1 -0
  808. package/dist/index.d.ts +27 -0
  809. package/dist/index.js +66 -0
  810. package/dist/lambdacode/api/services/brandingShapes.d.ts +5 -0
  811. package/dist/lambdacode/api/services/brandingShapes.js +15 -0
  812. package/dist/lambdacode/issuer/objects.d.ts +8 -0
  813. package/dist/lambdacode/issuer/objects.js +11 -0
  814. package/dist/lambdacode/network/naming.d.ts +52 -0
  815. package/dist/lambdacode/network/naming.js +67 -0
  816. package/dist/lib/access-portal-hub.d.ts +53 -0
  817. package/dist/lib/access-portal-hub.js +87 -0
  818. package/dist/lib/access-portal.d.ts +32 -0
  819. package/dist/lib/access-portal.js +174 -0
  820. package/dist/lib/audit-log.d.ts +18 -0
  821. package/dist/lib/audit-log.js +25 -0
  822. package/dist/lib/connector-stack.d.ts +28 -0
  823. package/dist/lib/connector-stack.js +81 -0
  824. package/dist/lib/constructs/app-function.d.ts +14 -0
  825. package/dist/lib/constructs/app-function.js +84 -0
  826. package/dist/lib/constructs/app-table.d.ts +12 -0
  827. package/dist/lib/constructs/app-table.js +58 -0
  828. package/dist/lib/constructs/mirrored-image.d.ts +12 -0
  829. package/dist/lib/constructs/mirrored-image.js +80 -0
  830. package/dist/lib/constructs/monitoring.d.ts +21 -0
  831. package/dist/lib/constructs/monitoring.js +133 -0
  832. package/dist/lib/constructs/oidc-issuer.d.ts +44 -0
  833. package/dist/lib/constructs/oidc-issuer.js +234 -0
  834. package/dist/lib/constructs/scratch-tmpfs.d.ts +5 -0
  835. package/dist/lib/constructs/scratch-tmpfs.js +48 -0
  836. package/dist/lib/constructs/sg-manager.d.ts +27 -0
  837. package/dist/lib/constructs/sg-manager.js +88 -0
  838. package/dist/lib/constructs/tailnet-connector.d.ts +29 -0
  839. package/dist/lib/constructs/tailnet-connector.js +177 -0
  840. package/dist/lib/constructs/tailnet-resolver.d.ts +30 -0
  841. package/dist/lib/constructs/tailnet-resolver.js +71 -0
  842. package/dist/lib/constructs/target-account-trust.d.ts +32 -0
  843. package/dist/lib/constructs/target-account-trust.js +81 -0
  844. package/dist/lib/constructs/vending-api.d.ts +103 -0
  845. package/dist/lib/constructs/vending-api.js +203 -0
  846. package/dist/lib/constructs/web-acl.d.ts +61 -0
  847. package/dist/lib/constructs/web-acl.js +213 -0
  848. package/dist/lib/constructs/web-identity.d.ts +49 -0
  849. package/dist/lib/constructs/web-identity.js +116 -0
  850. package/dist/lib/creds-stack.d.ts +151 -0
  851. package/dist/lib/creds-stack.js +592 -0
  852. package/dist/lib/data-stack.d.ts +53 -0
  853. package/dist/lib/data-stack.js +282 -0
  854. package/dist/lib/dimensions-validation.d.ts +20 -0
  855. package/dist/lib/dimensions-validation.js +51 -0
  856. package/dist/lib/federation.d.ts +113 -0
  857. package/dist/lib/federation.js +254 -0
  858. package/dist/lib/managed-login-branding.json +450 -0
  859. package/dist/lib/network-stack.d.ts +58 -0
  860. package/dist/lib/network-stack.js +776 -0
  861. package/dist/lib/network-validation.d.ts +54 -0
  862. package/dist/lib/network-validation.js +220 -0
  863. package/dist/lib/pkg-paths.d.ts +3 -0
  864. package/dist/lib/pkg-paths.js +51 -0
  865. package/dist/lib/plugins/plugin-api.d.ts +40 -0
  866. package/dist/lib/plugins/plugin-api.js +125 -0
  867. package/dist/lib/plugins/plugin-catalog-activation.d.ts +31 -0
  868. package/dist/lib/plugins/plugin-catalog-activation.js +109 -0
  869. package/dist/lib/plugins/registration.d.ts +41 -0
  870. package/dist/lib/plugins/registration.js +121 -0
  871. package/dist/lib/plugins/runtime.d.ts +10 -0
  872. package/dist/lib/plugins/runtime.js +17 -0
  873. package/dist/lib/project-config.d.ts +164 -0
  874. package/dist/lib/project-config.js +2 -0
  875. package/dist/lib/target-account-stack.d.ts +15 -0
  876. package/dist/lib/target-account-stack.js +59 -0
  877. package/dist/lib/target-account-template.d.ts +13 -0
  878. package/dist/lib/target-account-template.js +64 -0
  879. package/dist/lib/web-cert-stack.d.ts +30 -0
  880. package/dist/lib/web-cert-stack.js +90 -0
  881. package/dist/lib/web-stack.d.ts +103 -0
  882. package/dist/lib/web-stack.js +540 -0
  883. package/node_modules/@fntio/infra-client-plugin-sdk/README.md +303 -0
  884. package/node_modules/@fntio/infra-client-plugin-sdk/dist/backend/context.d.ts +31 -0
  885. package/node_modules/@fntio/infra-client-plugin-sdk/dist/backend/context.js +58 -0
  886. package/node_modules/@fntio/infra-client-plugin-sdk/dist/backend/index.d.ts +9 -0
  887. package/node_modules/@fntio/infra-client-plugin-sdk/dist/backend/index.js +26 -0
  888. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/client.d.ts +59 -0
  889. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/client.js +290 -0
  890. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/errors.d.ts +14 -0
  891. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/errors.js +32 -0
  892. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/http.d.ts +72 -0
  893. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/http.js +170 -0
  894. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/index.d.ts +11 -0
  895. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/index.js +28 -0
  896. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/theme-apply.d.ts +22 -0
  897. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/theme-apply.js +22 -0
  898. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/access.d.ts +14 -0
  899. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/access.js +41 -0
  900. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/authorizer.d.ts +17 -0
  901. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/authorizer.js +44 -0
  902. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/canonical.d.ts +2 -0
  903. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/canonical.js +21 -0
  904. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/catalog.d.ts +39 -0
  905. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/catalog.js +18 -0
  906. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/discovery.d.ts +78 -0
  907. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/discovery.js +48 -0
  908. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/fields.d.ts +7 -0
  909. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/fields.js +2 -0
  910. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/manifest.d.ts +59 -0
  911. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/manifest.js +19 -0
  912. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/messages.d.ts +111 -0
  913. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/messages.js +109 -0
  914. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/paths.d.ts +20 -0
  915. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/paths.js +49 -0
  916. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/theme.d.ts +21 -0
  917. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/theme.js +60 -0
  918. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/transport.d.ts +14 -0
  919. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/transport.js +10 -0
  920. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/validate.d.ts +27 -0
  921. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/validate.js +321 -0
  922. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/devHost.d.ts +61 -0
  923. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/devHost.js +99 -0
  924. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/fakeDocument.d.ts +12 -0
  925. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/fakeDocument.js +22 -0
  926. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/fakeWindows.d.ts +22 -0
  927. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/fakeWindows.js +46 -0
  928. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/index.d.ts +4 -0
  929. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/index.js +20 -0
  930. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/samples.d.ts +37 -0
  931. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/samples.js +228 -0
  932. package/node_modules/@fntio/infra-client-plugin-sdk/dist/host/host.d.ts +47 -0
  933. package/node_modules/@fntio/infra-client-plugin-sdk/dist/host/host.js +121 -0
  934. package/node_modules/@fntio/infra-client-plugin-sdk/dist/host/index.d.ts +5 -0
  935. package/node_modules/@fntio/infra-client-plugin-sdk/dist/host/index.js +22 -0
  936. package/node_modules/@fntio/infra-client-plugin-sdk/dist/index.d.ts +10 -0
  937. package/node_modules/@fntio/infra-client-plugin-sdk/dist/index.js +28 -0
  938. package/node_modules/@fntio/infra-client-plugin-sdk/package.json +99 -0
  939. package/openapi.yaml +4284 -0
  940. package/package.json +124 -4
@@ -0,0 +1 @@
1
+ import{a as ne}from"./chunk-EVP5UVDQ.js";import{a as ee,b as te}from"./chunk-OATVFQXO.js";import{a as Z}from"./chunk-GKI3R2JB.js";import{Aa as d,E as B,H as y,Ia as D,J as b,K as h,Ka as v,Ma as u,P as z,Q as r,T as U,Ua as J,Wa as g,Xa as V,Ya as W,Z as l,Za as q,fa as Y,pb as $,qb as x,ra as L,rb as j,sa as m,sb as X,ta as f,tb as _,wa as H,xa as G,ya as k,za as c}from"./chunk-P5WRM37W.js";import{a as Q}from"./chunk-WFIHWVQO.js";var ae=["tenant","project","stage"],ie="unclassified",S=class i{config=y(Z);get block(){try{return this.config.config.dimensions}catch{return}}get enabled(){return!!this.block}get stages(){return this.block?.stages}label(t){return this.block?.labels[t]??{tenant:"Tenant",project:"Project",stage:"Stage"}[t]}sections(t){return this.enabled?ae.map(e=>({key:e,label:this.label(e),options:Object.entries(t?.[e]??{}).sort((n,o)=>n[0]===ie?1:o[0]===ie?-1:n[0].localeCompare(o[0])).map(([n,o])=>({value:n,count:o}))})).filter(e=>e.options.length>0):[]}summary(t){return!this.enabled||!t?"":[t.tenant,t.project,t.stage].filter(Boolean).join(" \xB7 ")}static \u0275fac=function(e){return new(e||i)};static \u0275prov=B({token:i,factory:i.\u0275fac,providedIn:"root"})};function oe(i,t={}){let e=t.limit??50,n=t.debounceMs??250,o=r([]),a=r(0),O=r({}),C=r(!1),w=r(!0),T=r(null),F=r(void 0),A=r(""),I=r({}),M=r(t.sort??""),R=0,E,P=s=>{let K=++R;C.set(!0),T.set(null);let se={q:A().trim(),filters:I(),sort:M()||void 0,limit:e,cursor:s};i(se).subscribe({next:p=>{K===R&&(o.set(s?[...o(),...p.items]:p.items),a.set(p.total),O.set(p.facets),F.set(p.nextCursor),C.set(!1),w.set(!1))},error:p=>{K===R&&(C.set(!1),w.set(!1),T.set(p instanceof Error?p.message:"Could not load the list"))}})},N=s=>{if(E&&clearTimeout(E),s||n===0){P(void 0);return}E=setTimeout(()=>P(void 0),n)};return P(void 0),{items:o,total:a,facets:O,loading:C,initial:w,error:T,hasMore:x(()=>F()!==void 0),query:A,filters:I,sort:M,setQuery:s=>{s!==A()&&(A.set(s),N(!1))},setFilters:s=>{I.set(Q({},s)),N(!0)},setSort:s=>{s!==M()&&(M.set(s),N(!0))},loadMore:()=>{let s=F();s===void 0||C()||P(s)},reload:()=>N(!0)}}var ce=(i,t)=>t.accountNumber;function de(i,t){if(i&1){let e=D();c(0,"app-filter-popup",4),v("filtersChange",function(o){b(e);let a=u();return h(a.setFilters(o))}),d()}if(i&2){let e=u();k("sections",e.sections())("filters",e.filters())("align",e.filterAlign())}}function ue(i,t){if(i&1&&(c(0,"span",12),g(1),d()),i&2){let e=u().$implicit;l(),V(e.accountNumber)}}function pe(i,t){if(i&1){let e=D();c(0,"li",10),v("mouseenter",function(){let o=b(e).$index,a=u(2);return h(a.active.set(o))})("click",function(){let o=b(e).$implicit,a=u(2);return h(a.pick(o))}),c(1,"span",11),g(2),d(),m(3,ue,2,1,"span",12),c(4,"span",13),g(5),d()()}if(i&2){let e=t.$implicit,n=t.$index,o=u(2);J("bg-state-hover",n===o.active()),k("id",o.listId+"-"+n),L("aria-selected",n===o.active()),l(2),V(e.name||e.accountNumber),l(),f(e.name?3:-1),l(2),q("",e.roles.length," role",e.roles.length===1?"":"s")}}function me(i,t){if(i&1&&(c(0,"li",8),g(1),d()),i&2){let e,n=u(2);l(),W(" ",(e=n.list())!=null&&e.initial()?"Loading\u2026":(e=n.list())!=null&&e.error()?n.list().error():n.text()||n.filters().length?"No account matches"+(n.text()?' "'+n.text()+'"':"")+(n.filters().length?" with these filters":"")+".":n.emptyText()," ")}}function fe(i,t){if(i&1){let e=D();c(0,"app-load-more",14),v("reached",function(){b(e);let o=u(2);return h(o.list().loadMore())}),g(1,"More\u2026"),d()}}function ge(i,t){if(i&1&&(c(0,"p",15),g(1),d()),i&2){let e=u();l(),q("",e.items().length," of ",e.total()," \u2014 keep typing to narrow")}}function _e(i,t){if(i&1&&m(0,ge,2,2,"p",15),i&2){let e=t;f(e.total()>e.items().length?0:-1)}}function ye(i,t){if(i&1){let e=D();c(0,"div",5),v("mousedown",function(o){return b(e),h(o.preventDefault())}),c(1,"ul",6),H(2,pe,6,8,"li",7,ce,!1,me,2,1,"li",8),d(),m(5,fe,2,0,"app-load-more",9),m(6,_e,1,1),d()}if(i&2){let e,n,o=u();l(),k("id",o.listId),l(),G(o.items()),l(3),f((e=o.list())!=null&&e.hasMore()?5:-1),l(),f((n=o.list())?6:-1,n)}}var re=class i{static seq=0;listId=`account-picker-${++i.seq}`;host=y(U);destroyRef=y(z);dimensions=y(S);source=_.required();placeholder=_("Search by account name or number");emptyText=_("No accounts to choose from.");selected=_(null);dimensionFilters=_(!1);filterAlign=_("start");picked=X();open=r(!1);typed=r(null);active=r(0);list=r(null);items=x(()=>this.list()?.items()??[]);filters=r([]);sections=x(()=>this.dimensions.sections(this.list()?.facets()));text=x(()=>{let t=this.typed();if(t!==null)return t;let e=this.selected();return e?e.name?`${e.name} \xB7 ${e.accountNumber}`:e.accountNumber:""});constructor(){j(()=>{this.selected(),$(()=>this.typed.set(null))}),j(()=>{this.dimensionFilters()&&this.dimensions.enabled&&$(()=>this.ensureList())}),this.destroyRef.onDestroy(()=>this.list.set(null))}setFilters(t){this.filters.set(t);let e={};for(let n of t)(e[n.key]??=[]).push(n.value);this.active.set(0),this.ensureList().setFilters(e)}ensureList(){let t=this.list();return t||(t=oe(e=>this.source()(e),{limit:20}),this.list.set(t)),t}onFocus(){this.ensureList(),this.open.set(!0)}onInput(t){this.typed.set(t),this.active.set(0),this.ensureList().setQuery(t),this.open.set(!0)}onBlur(){this.open.set(!1),this.typed.set(null)}onKeydown(t){if(t.key==="ArrowDown")t.preventDefault(),this.open.set(!0),this.active.update(e=>Math.min(e+1,Math.max(this.items().length-1,0)));else if(t.key==="ArrowUp")t.preventDefault(),this.active.update(e=>Math.max(e-1,0));else if(t.key==="Enter"){let e=this.items()[this.active()];this.open()&&e&&(t.preventDefault(),this.pick(e))}else t.key==="Escape"&&(this.open.set(!1),this.typed.set(null))}pick(t){this.picked.emit(t),this.open.set(!1),this.typed.set(null),this.host.nativeElement.querySelector("input")?.blur()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Y({type:i,selectors:[["app-account-picker"]],hostAttrs:[1,"relative","block"],inputs:{source:[1,"source"],placeholder:[1,"placeholder"],emptyText:[1,"emptyText"],selected:[1,"selected"],dimensionFilters:[1,"dimensionFilters"],filterAlign:[1,"filterAlign"]},outputs:{picked:"picked"},decls:4,vars:7,consts:[[1,"flex","items-center","gap-2"],["type","text","role","combobox","autocomplete","off",1,"ui-input","min-w-0","flex-1",3,"input","focus","keydown","blur","placeholder","value"],[1,"shrink-0",3,"sections","filters","align"],[1,"absolute","left-0","right-0","z-20","mt-1","max-h-72","overflow-y-auto","rounded-lg","border","border-border-strong","bg-surface","shadow-lg"],[1,"shrink-0",3,"filtersChange","sections","filters","align"],[1,"absolute","left-0","right-0","z-20","mt-1","max-h-72","overflow-y-auto","rounded-lg","border","border-border-strong","bg-surface","shadow-lg",3,"mousedown"],["role","listbox",1,"py-1",3,"id"],["role","option",1,"flex","cursor-pointer","items-baseline","gap-2","px-3","py-2","text-sm",3,"id","bg-state-hover"],[1,"px-3","py-2","text-sm","text-muted-foreground"],["appInfiniteScroll",""],["role","option",1,"flex","cursor-pointer","items-baseline","gap-2","px-3","py-2","text-sm",3,"mouseenter","click","id"],[1,"min-w-0","flex-1","truncate","text-surface-foreground"],[1,"shrink-0","font-mono","text-[11px]","text-muted-foreground"],[1,"shrink-0","text-[11px]","text-text-secondary"],["appInfiniteScroll","",3,"reached"],[1,"border-t","border-border","px-3","py-1.5","text-[11px]","text-text-secondary"]],template:function(e,n){e&1&&(c(0,"div",0)(1,"input",1),v("input",function(a){return n.onInput(a.target.value)})("focus",function(){return n.onFocus()})("keydown",function(a){return n.onKeydown(a)})("blur",function(){return n.onBlur()}),d(),m(2,de,1,3,"app-filter-popup",2),d(),m(3,ye,7,4,"div",3)),e&2&&(l(),k("placeholder",n.placeholder())("value",n.text()),L("aria-expanded",n.open())("aria-controls",n.listId)("aria-activedescendant",n.open()&&n.items().length?n.listId+"-"+n.active():null),l(),f(n.dimensionFilters()&&n.dimensions.enabled?2:-1),l(),f(n.open()?3:-1))},dependencies:[ee,te,ne],encapsulation:2})};export{ae as a,ie as b,S as c,oe as d,re as e};
@@ -0,0 +1 @@
1
+ import{a as f}from"./chunk-BNFKRZTP.js";import{t as p,v as m}from"./chunk-JMBXRK3I.js";import{a as g}from"./chunk-GKI3R2JB.js";import{E as u,H as o,P as y,Q as s,qb as t,rb as c}from"./chunk-P5WRM37W.js";import{a as l,b as d}from"./chunk-WFIHWVQO.js";var E=["user","admin"];var N=/^\d{12}$/;var h=60;var v=1e3,P=class a{api=o(m);auth=o(p);config=o(g);destroyRef=o(y);response=s(null);loadingSig=s(!1);staleSig=s(!1);loadedOnce=s(!1);inFlight=!1;reloadWanted=!1;generation=0;timer;lastVisibilityRefresh=0;plugins=t(()=>this.response()?.plugins??[]);loading=this.loadingSig.asReadonly();stale=this.staleSig.asReadonly();ready=this.loadedOnce.asReadonly();enabled=t(()=>!!this.pluginsConfig()?.enabled);navEntries=t(()=>{let e=[];for(let n of this.plugins())for(let i of["user","admin"]){let r=n.ui[i];r&&e.push(d(l(l({pluginId:n.id,section:i,label:r.label},r.icon===void 0?{}:{icon:r.icon}),r.order===void 0?{}:{order:r.order}),{route:`/plugins/${n.id}/${i}`}))}return e.sort((n,i)=>(n.order??Number.MAX_SAFE_INTEGER)-(i.order??Number.MAX_SAFE_INTEGER)||n.label.localeCompare(i.label)||n.pluginId.localeCompare(i.pluginId))});userEntries=t(()=>this.navEntries().filter(e=>e.section==="user"));adminEntries=t(()=>this.navEntries().filter(e=>e.section==="admin"));pluginsConfig(){try{return this.config.config.plugins}catch{return}}constructor(){if(c(()=>{this.auth.isAuthenticated()&&this.enabled()?this.start():this.reset()}),this.destroyRef.onDestroy(()=>this.stop()),typeof document<"u"){let e=()=>{document.visibilityState==="visible"&&this.refreshOnVisible()};document.addEventListener("visibilitychange",e),window.addEventListener("focus",e),this.destroyRef.onDestroy(()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("focus",e)})}}entry(e,n){let i=this.plugins().find(r=>r.id===e);return i?.ui[n]?i:void 0}refresh(){this.load()}start(){this.loadedOnce()||this.load(),this.schedule()}schedule(){this.stop();let e=this.response()?.refreshAfterSeconds??this.pluginsConfig()?.discoveryRefreshSeconds??h;this.timer=setTimeout(()=>{typeof document>"u"||document.visibilityState==="visible"?this.load():this.schedule()},e*1e3)}stop(){this.timer!==void 0&&clearTimeout(this.timer),this.timer=void 0}refreshOnVisible(){let e=Date.now();e-this.lastVisibilityRefresh<v||(this.lastVisibilityRefresh=e,this.load())}load(){if(!this.auth.isAuthenticated()||!this.enabled())return;if(this.inFlight){this.reloadWanted=!0;return}this.inFlight=!0,this.loadingSig.set(!0);let e=this.generation;this.api.discover().pipe(f(this.destroyRef)).subscribe({next:n=>{e===this.generation&&(this.response.set(n),this.staleSig.set(!1),this.loadedOnce.set(!0),this.settle())},error:()=>{e===this.generation&&(this.staleSig.set(!0),this.settle())}})}settle(){this.inFlight=!1,this.loadingSig.set(!1),this.reloadWanted?(this.reloadWanted=!1,this.load()):this.schedule()}reset(){this.generation++,this.inFlight=!1,this.reloadWanted=!1,this.stop(),this.response.set(null),this.staleSig.set(!1),this.loadedOnce.set(!1),this.loadingSig.set(!1)}static \u0275fac=function(n){return new(n||a)};static \u0275prov=u({token:a,factory:a.\u0275fac,providedIn:"root"})};export{E as a,N as b,P as c};
@@ -0,0 +1 @@
1
+ var n=["#1d4ed8","#047857","#be185d","#92400e","#5b21b6","#0e7490","#c2410c","#4d7c0f"];function l(h){let t=0;for(let e=0;e<h.length;e++)t=Math.imul(t,31)+h.charCodeAt(e)|0;return t^=t>>>16,t=Math.imul(t,73244475),t^=t>>>16,n[Math.abs(t)%n.length]}export{l as a};
@@ -0,0 +1 @@
1
+ import{B as l,E as o,Ib as p,Q as r,f as d,w as g}from"./chunk-P5WRM37W.js";import{a,b as s}from"./chunk-WFIHWVQO.js";var c=class n{loaded;overlayState="unknown";overlayWrittenSig=r(!1);overlayWritten=this.overlayWrittenSig.asReadonly();themeSavedSig=r(!1);themeSaved=this.themeSavedSig.asReadonly();deployBrandingBase={};brandingSig=r({});branding=this.brandingSig.asReadonly();config$=d(Promise.all([fetch("/config.json").then(t=>{if(!t.ok)throw new Error(`config.json failed: ${t.status}`);return t.json()}),fetch("/branding.json",{cache:"no-store"}).then(t=>t.ok?t.json():t.status===403||t.status===404?"absent":"unknown").catch(()=>"unknown")]).then(([t,e])=>{this.overlayState=e,this.overlayWrittenSig.set(typeof e=="object"),this.themeSavedSig.set(typeof e=="object"&&!!e.branding),this.deployBrandingBase=t.branding??{};let i=typeof e=="object"?e:void 0;return i?.branding?s(a({},t),{branding:this.mergeBranding(i.branding)}):t})).pipe(l(t=>{this.loaded=t,this.brandingSig.set(t.branding??{})}),g(1));get deployBranding(){return this.deployBrandingBase}get config(){if(!this.loaded)throw new Error("AppConfig not loaded yet");return this.loaded}get brandingOverlayAbsent(){return this.overlayState==="absent"}applyOverlay(t){if(this.overlayState=t,this.overlayWrittenSig.set(!0),t.branding&&this.themeSavedSig.set(!0),this.loaded&&t.branding){let e=this.mergeBranding(t.branding);this.loaded=s(a({},this.loaded),{branding:e}),this.brandingSig.set(e)}}mergeBranding(t){let e=a(a({},this.deployBrandingBase),t);return t.primaryColor&&!t.primaryHoverColor&&delete e.primaryHoverColor,e}static \u0275fac=function(e){return new(e||n)};static \u0275prov=o({token:n,factory:n.\u0275fac,providedIn:"root"})};var f=class n{nextId=1;toasts=r([]);success(t){this.push("success",t)}error(t,e){this.push("error",t,e)}dismiss(t){this.toasts.update(e=>e.filter(i=>i.id!==t))}push(t,e,i){let h={id:this.nextId++,kind:t,message:e,action:i};this.toasts.update(m=>[...m,h])}static \u0275fac=function(e){return new(e||n)};static \u0275prov=o({token:n,factory:n.\u0275fac,providedIn:"root"})};function C(n){let t=new p().set("limit",String(n.limit));n.q&&(t=t.set("q",n.q)),n.sort&&(t=t.set("sort",n.sort)),n.cursor&&(t=t.set("cursor",n.cursor));for(let[e,i]of Object.entries(n.filters??{}))i.length&&(t=t.set(`filter[${e}]`,i.join(",")));return t}export{c as a,C as b,f as c};
@@ -0,0 +1,2 @@
1
+ import{b as me}from"./chunk-TM43WUKM.js";import{a as pe}from"./chunk-CP4XZPOA.js";import{e as de}from"./chunk-FIUVIKAN.js";import{e as ce}from"./chunk-ZDCURXPS.js";import{a as ee}from"./chunk-PSMER3HX.js";import{a as se}from"./chunk-RROPCBUH.js";import{a as ae,b as le}from"./chunk-2SO4BVIT.js";import{a as ne,b as L,e as G,i as ie,j as oe,k as re,o as R}from"./chunk-NO5D6WDF.js";import{b as Y}from"./chunk-GKI3R2JB.js";import{a as te}from"./chunk-M6OAYNRE.js";import{b as Z}from"./chunk-2MOGDYK4.js";import{a as V}from"./chunk-D7TR2ORJ.js";import{Aa as s,Ba as N,E as F,H as q,Ia as C,J as u,K as g,Ka as x,Kb as X,Ma as l,Na as W,Oa as z,Q as w,Ta as I,Ua as U,Va as M,Wa as d,Xa as b,Ya as D,Z as r,Za as j,_a as H,ab as Q,bb as J,cb as K,fa as k,k as v,qb as h,ra as B,sa as _,sb as y,ta as f,tb as c,va as O,wa as S,xa as T,ya as p,za as a,zb as E}from"./chunk-P5WRM37W.js";var ue=class n{http=q(X);list(){return this.http.get("/api/admin/groups").pipe(v(t=>t.groups))}create(t,e,i,o){return this.http.post("/api/admin/groups",{name:t,roles:e,description:i,resources:o}).pipe(v(m=>m.group))}update(t,e){return this.http.patch(`/api/admin/groups/${encodeURIComponent(t)}`,e).pipe(v(i=>i.group))}delete(t){return this.http.delete(`/api/admin/groups/${encodeURIComponent(t)}`).pipe(v(()=>{}))}addMembers(t,e){return this.http.post(`/api/admin/groups/${encodeURIComponent(t)}/members`,{userIds:e}).pipe(v(i=>i.added))}removeMembers(t,e){return this.http.post(`/api/admin/groups/${encodeURIComponent(t)}/members/remove`,{userIds:e}).pipe(v(i=>i.removed))}get(t){return this.http.get(`/api/admin/groups/${encodeURIComponent(t)}`).pipe(v(e=>e.group))}listRolesPage(t,e){return this.http.get(`/api/admin/groups/${encodeURIComponent(t)}/roles`,{params:Y(e)})}addRole(t,e){return this.http.post(`/api/admin/groups/${encodeURIComponent(t)}/roles`,e).pipe(v(()=>{}))}addRolesByDimension(t,e){return this.http.post(`/api/admin/groups/${encodeURIComponent(t)}/roles/bulk`,e)}suggest(t,e){return this.http.get("/api/admin/groups/suggest",{params:{accountNumber:t,roleName:e}}).pipe(v(i=>i.suggestions))}removeRole(t,e){return this.http.delete(`/api/admin/groups/${encodeURIComponent(t)}/roles/${e.accountNumber}/${encodeURIComponent(e.roleName)}`).pipe(v(()=>{}))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=F({token:n,factory:n.\u0275fac,providedIn:"root"})};var be=(n,t)=>t.id,Ce=(n,t)=>t.text;function he(n,t){if(n&1&&(a(0,"p",0),d(1),s()),n&2){let e=l();r(),b(e.empty())}}function ve(n,t){if(n&1){let e=C();a(0,"app-search-input",6),K("valueChange",function(o){u(e);let m=l(2);return J(m.fold.query,o)||(m.fold.query=o),g(o)}),s()}if(n&2){let e=l(2);p("placeholder",e.searchPlaceholder()),Q("value",e.fold.query)}}function ye(n,t){if(n&1&&(a(0,"span",15)(1,"span",16),d(2),s()()),n&2){let e=l().$implicit;M(e.pillClass),r(),p("title",e.title),r(),b(e.title)}}function we(n,t){if(n&1&&(a(0,"span",11),d(1),s()),n&2){let e=l().$implicit;p("title",e.title),r(),b(e.title)}}function ke(n,t){if(n&1&&(a(0,"span",12),N(1,"span",17),a(2,"span",18),d(3),s()()),n&2){let e=l().$implicit;r(2),p("title",e.subtitle),r(),b(e.subtitle)}}function De(n,t){if(n&1&&(a(0,"app-badge",19),d(1),s()),n&2){let e=t.$implicit;p("tone",e.tone)("title",e.title??""),r(),b(e.text)}}function Me(n,t){if(n&1&&(a(0,"app-badge",20),d(1),s()),n&2){let e=l(2).$implicit,i=l(2);p("title",i.moreTitle(e)),r(),D("+",e.badges.length-2," more")}}function Se(n,t){if(n&1&&(a(0,"span",13),S(1,De,2,3,"app-badge",19,Ce),_(3,Me,2,2,"app-badge",20),s()),n&2){let e=l().$implicit;r(),T(e.badges.slice(0,2)),r(2),f(e.badges.length>2?3:-1)}}function Te(n,t){if(n&1){let e=C();a(0,"app-button",21),x("click",function(o){u(e);let m=l().$implicit,xe=l(2);return o.stopPropagation(),g(xe.action.emit(m.id))}),d(1),s()}if(n&2){let e=t;p("disabled",e.disabled??!1),r(),D(" ",e.label," ")}}function Ne(n,t){if(n&1){let e=C();a(0,"div",7),x("click",function(){let o=u(e).$implicit,m=l(2);return g(o.clickable&&m.open.emit(o.id))}),a(1,"span",8)(2,"span",9),_(3,ye,3,4,"span",10)(4,we,2,2,"span",11),_(5,ke,4,2,"span",12),s(),_(6,Se,4,1,"span",13),s(),_(7,Te,2,2,"app-button",14),s()}if(n&2){let e,i=t.$implicit;U("cursor-pointer",i.clickable)("hover:bg-state-hover",i.clickable),r(2),I("--role-c",i.chipColor||null),r(),f(i.pillClass?3:4),r(2),f(i.subtitle?5:-1),r(),f(i.badges.length?6:-1),r(),f((e=i.action)?7:-1,e)}}function Ee(n,t){if(n&1&&(a(0,"p",4),d(1),s()),n&2){let e=l(2);r(),D('Nothing matches "',e.fold.query(),'".')}}function Ie(n,t){if(n&1){let e=C();a(0,"button",23),x("click",function(){u(e);let o=l(3);return g(o.fold.showMore())}),d(1),s()}if(n&2){let e=l(3);r(),D(" Show ",e.fold.more()," more ")}}function Ve(n,t){if(n&1){let e=C();a(0,"button",23),x("click",function(){u(e);let o=l(3);return g(o.fold.showLess())}),d(1,"Show less"),s()}}function Le(n,t){if(n&1&&(a(0,"p",5),_(1,Ie,2,1,"button",22),_(2,Ve,2,0,"button",22),a(3,"span"),d(4),s()()),n&2){let e=l(2);r(),f(e.fold.more()?1:-1),r(),f(e.fold.expanded()?2:-1),r(2),H("",e.fold.visible().length," of ",e.fold.matching().length,"",e.fold.searchable()?" \u2014 or search":"")}}function Ge(n,t){if(n&1&&(_(0,ve,1,2,"app-search-input",1),a(1,"div",2),S(2,Ne,8,10,"div",3,be,!1,Ee,2,1,"p",4),s(),_(5,Le,5,5,"p",5)),n&2){let e=l();f(e.fold.searchable()?0:-1),r(2),T(e.fold.visible()),r(3),f(e.fold.more()||e.fold.expanded()?5:-1)}}var ge=class n{rows=c.required();searchPlaceholder=c("Search this list");fold=me(this.rows,t=>`${t.title} ${t.subtitle??""} ${t.badges.map(e=>e.text).join(" ")}`);moreTitle(t){return t.badges.slice(2).map(e=>e.text).join(`
2
+ `)}empty=c("Nobody yet.");action=y();open=y();static \u0275fac=function(e){return new(e||n)};static \u0275cmp=k({type:n,selectors:[["app-access-list"]],inputs:{rows:[1,"rows"],searchPlaceholder:[1,"searchPlaceholder"],empty:[1,"empty"]},outputs:{action:"action",open:"open"},decls:2,vars:1,consts:[[1,"pb-1","text-xs","text-placeholder"],["compact","",1,"mb-2","block",3,"placeholder","value"],[1,"divide-y","divide-border","overflow-hidden","rounded-lg","border","border-border","bg-card-bg"],[1,"flex","items-center","gap-x-3","px-3","py-2","text-sm",3,"cursor-pointer","hover:bg-state-hover"],[1,"px-3","py-2","text-xs","text-muted-foreground"],[1,"mt-1.5","flex","items-center","gap-2","text-[11px]","text-text-secondary"],["compact","",1,"mb-2","block",3,"valueChange","placeholder","value"],[1,"flex","items-center","gap-x-3","px-3","py-2","text-sm",3,"click"],[1,"flex","min-w-0","flex-1","flex-col","gap-1"],[1,"flex","min-w-0","items-center","gap-1.5"],[1,"inline-flex","max-w-full","items-center","overflow-hidden","whitespace-nowrap","rounded-full","px-2","py-0.5","text-xs","font-medium",3,"class"],[1,"min-w-0","shrink","truncate","text-surface-foreground",3,"title"],[1,"flex","min-w-0","shrink-[60]","items-center","gap-2"],[1,"flex","flex-wrap","items-center","gap-1"],["size","sm","variant","danger",1,"shrink-0",3,"disabled"],[1,"inline-flex","max-w-full","items-center","overflow-hidden","whitespace-nowrap","rounded-full","px-2","py-0.5","text-xs","font-medium"],[1,"min-w-0","truncate",3,"title"],[1,"h-[3px]","w-[3px]","shrink-0","rounded-full","bg-muted-foreground/40"],[1,"min-w-0","truncate","text-xs","text-muted-foreground",3,"title"],[3,"tone","title"],["tone","gray",3,"title"],["size","sm","variant","danger",1,"shrink-0",3,"click","disabled"],["type","button",1,"text-xs","text-muted-foreground","underline","hover:text-surface-foreground"],["type","button",1,"text-xs","text-muted-foreground","underline","hover:text-surface-foreground",3,"click"]],template:function(e,i){e&1&&_(0,he,2,1,"p",0)(1,Ge,6,3),e&2&&f(i.rows().length===0?0:1)},dependencies:[ee,V,pe],encapsulation:2})};var Ae=[[["","picker-trailing",""]]],Pe=["[picker-trailing]"];function $e(n,t){if(n&1){let e=C();a(0,"app-chip",4),x("removed",function(){u(e);let o=l();return g(o.cleared.emit())}),d(1),s()}if(n&2){let e=l();r(),b(e.summary())}}var P=class n{summary=c("");query=c("");placeholder=c("Filter\u2026");queryChange=y();cleared=y();static \u0275fac=function(e){return new(e||n)};static \u0275cmp=k({type:n,selectors:[["app-picker-box"]],hostAttrs:[1,"flex","min-w-0"],inputs:{summary:[1,"summary"],query:[1,"query"],placeholder:[1,"placeholder"]},outputs:{queryChange:"queryChange",cleared:"cleared"},ngContentSelectors:Pe,decls:5,vars:3,consts:[[1,"ui-input","flex","h-9","min-w-0","flex-nowrap","items-center","gap-1.5","pr-1","[&:focus-within:not(:has([picker-trailing]:focus))]:border-transparent","[&:focus-within:not(:has([picker-trailing]:focus))]:outline-2","[&:focus-within:not(:has([picker-trailing]:focus))]:-outline-offset-1","[&:focus-within:not(:has([picker-trailing]:focus))]:outline-[var(--ring)]"],["tone","brand","removable",""],[1,"min-w-0","flex-1","border-0","bg-transparent","px-1","text-sm","text-surface-foreground","outline-none","placeholder:text-placeholder",3,"ngModelChange","placeholder","ngModel"],[1,"ml-auto","flex","shrink-0","items-center"],["tone","brand","removable","",3,"removed"]],template:function(e,i){e&1&&(W(Ae),a(0,"div",0),_(1,$e,2,1,"app-chip",1),a(2,"input",2),x("ngModelChange",function(m){return i.queryChange.emit(m)}),s(),a(3,"span",3),z(4),s()()),e&2&&(r(),f(i.summary()?1:-1),r(),p("placeholder",i.summary()?"":i.placeholder())("ngModel",i.query()))},dependencies:[R,ne,L,G,ce],encapsulation:2})};var Fe=(n,t)=>t.id;function qe(n,t){if(n&1&&(a(0,"p",1),d(1),s()),n&2){let e=l();r(),b(e.intro())}}function Be(n,t){if(n&1){let e=C();a(0,"div",2)(1,"app-account-picker",11),x("picked",function(o){u(e);let m=l();return g(m.account.set(o))}),s()()}if(n&2){let e=l();r(),p("source",t)("selected",e.account())("dimensionFilters",!0)}}function Oe(n,t){if(n&1&&(a(0,"option",13),d(1),s()),n&2){let e=t.$implicit,i=l(2);p("ngValue",e),r(),b(i.label(e))}}function We(n,t){if(n&1){let e=C();a(0,"select",12),x("ngModelChange",function(o){u(e);let m=l();return g(m.duration.set(o))}),S(1,Oe,2,2,"option",13,O),a(3,"option",13),d(4,"long-term"),s()()}if(n&2){let e=l();p("ngModel",e.duration()),r(),T(e.PRESETS),r(2),p("ngValue","long")}}function ze(n,t){if(n&1&&(a(0,"div",14),d(1),s()),n&2){let e=l().$implicit;r(),b(e.group)}}function Ue(n,t){if(n&1&&(a(0,"span",18),d(1),s()),n&2){let e=l().$implicit;r(),b(e.sublabel)}}function je(n,t){if(n&1){let e=C();_(0,ze,2,1,"div",14),a(1,"label",15)(2,"input",16),x("change",function(){let o=u(e).$implicit,m=l();return g(m.toggle(o.id))}),s(),a(3,"span",17),d(4),s(),_(5,Ue,2,1,"span",18),s()}if(n&2){let e=t.$implicit,i=t.$index,o=l();f(e.group&&(i===0||o.filtered()[i-1].group!==e.group)?0:-1),r(2),p("checked",o.pickedSet().has(e.id)),r(2),b(e.label),r(),f(e.sublabel?5:-1)}}function He(n,t){if(n&1&&(a(0,"p",6),d(1),s()),n&2){let e=l();r(),D(" ",e.query()?'Nothing matches "'+e.query()+'".':e.accountSource()&&!e.account()?"Pick an account above to see its roles.":e.emptyText()," ")}}function Qe(n,t){if(n&1&&(a(0,"p",7),d(1),s()),n&2){let e=l();r(),D("Picked: ",e.pickedLabels().join(", "))}}var _e=class n{title=c.required();intro=c("");options=c([]);accountSource=c(null);optionsFor=c(null);placeholder=c("Filter\u2026");emptyText=c("Nothing left to grant.");verb=c("Grant");withDuration=c(!1,{transform:E});busy=c(!1);granted=y();closed=y();PRESETS=ae;label(t){return t==="long"?"long-term":le(t)}query=w("");picked=w([]);duration=w("long");pickedSet=h(()=>new Set(this.picked()));account=w(null);labels=w(new Map);current=h(()=>{let t=this.optionsFor(),e=this.account();return this.accountSource()?e&&t?t(e):[]:this.options()});filtered=h(()=>{let t=this.query().trim().toLowerCase();return this.current().filter(e=>!t||`${e.label} ${e.sublabel??""} ${e.group??""}`.toLowerCase().includes(t))});pickedLabels=h(()=>this.picked().map(t=>this.labels().get(t)??t));summaryLabel=h(()=>{let t=this.picked();if(!t.length)return"";let e=this.labels().get(t[0])??this.current().find(i=>i.id===t[0])?.label??t[0];return t.length>1?`${e} +${t.length-1} more`:e});toggle(t){let e=this.current().find(o=>o.id===t),i=this.account();if(e){let o=i&&this.accountSource()?`${e.label} \xB7 ${i.name||i.accountNumber}`:e.label;this.labels.update(m=>new Map(m).set(t,o))}this.picked.update(o=>o.includes(t)?o.filter(m=>m!==t):[...o,t])}submit(){let t=this.duration();this.granted.emit({ids:[...this.picked()],durationHours:this.withDuration()&&t!=="long"?t:void 0})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=k({type:n,selectors:[["app-grant-dialog"]],inputs:{title:[1,"title"],intro:[1,"intro"],options:[1,"options"],accountSource:[1,"accountSource"],optionsFor:[1,"optionsFor"],placeholder:[1,"placeholder"],emptyText:[1,"emptyText"],verb:[1,"verb"],withDuration:[1,"withDuration"],busy:[1,"busy"]},outputs:{granted:"granted",closed:"closed"},decls:16,vars:14,consts:[["width","max-w-2xl",3,"closed","title","scrollBody"],[1,"text-xs","text-muted-foreground"],[1,"mt-3"],[3,"queryChange","cleared","summary","query","placeholder"],["picker-trailing","","aria-label","Duration",1,"ui-input","h-7","w-28","shrink-0","cursor-pointer","rounded-md","border-border","bg-surface","pl-2.5","pr-7","text-xs","font-medium","text-muted-foreground",3,"ngModel"],[1,"mt-2","max-h-[50vh]","min-h-24","overflow-y-auto","rounded-lg","border","border-border-strong"],[1,"px-3","py-3","text-sm","text-muted-foreground"],[1,"mt-2","text-xs","text-muted-foreground"],[1,"mt-4","flex","justify-end","gap-2"],["variant","outline",3,"click"],[3,"click","loading","disabled"],["placeholder","Search accounts by name or number","filterAlign","end",3,"picked","source","selected","dimensionFilters"],["picker-trailing","","aria-label","Duration",1,"ui-input","h-7","w-28","shrink-0","cursor-pointer","rounded-md","border-border","bg-surface","pl-2.5","pr-7","text-xs","font-medium","text-muted-foreground",3,"ngModelChange","ngModel"],[3,"ngValue"],[1,"bg-card-bg","px-3","py-1","text-[10.5px]","font-medium","text-text-secondary"],[1,"flex","w-full","cursor-pointer","items-center","gap-2.5","border-b","border-border","px-3","py-2","text-sm","last:border-b-0","hover:bg-state-hover"],["type","checkbox",1,"ui-checkbox",3,"change","checked"],[1,"min-w-0","flex-1","truncate","text-surface-foreground"],[1,"min-w-0","shrink-[4]","truncate","text-xs","text-muted-foreground"]],template:function(e,i){if(e&1&&(a(0,"app-dialog",0),x("closed",function(){return i.closed.emit()}),_(1,qe,2,1,"p",1),_(2,Be,2,3,"div",2),a(3,"div",2)(4,"app-picker-box",3),x("queryChange",function(m){return i.query.set(m)})("cleared",function(){return i.picked.set([])}),_(5,We,5,2,"select",4),s()(),a(6,"div",5),S(7,je,6,4,null,null,Fe,!1,He,2,1,"p",6),s(),_(10,Qe,2,1,"p",7),a(11,"div",8)(12,"app-button",9),x("click",function(){return i.closed.emit()}),d(13,"Cancel"),s(),a(14,"app-button",10),x("click",function(){return i.submit()}),d(15),s()()()),e&2){let o;p("title",i.title())("scrollBody",!1),r(),f(i.intro()?1:-1),r(),f((o=i.accountSource())?2:-1,o),r(2),p("summary",i.summaryLabel())("query",i.query())("placeholder",i.placeholder()),r(),f(i.withDuration()?5:-1),r(2),T(i.filtered()),r(3),f(i.accountSource()&&i.pickedLabels().length?10:-1),r(4),p("loading",i.busy())("disabled",i.picked().length===0),r(),j(" ",i.verb()," ",i.picked().length||""," ")}},dependencies:[R,oe,re,ie,L,G,V,te,P,de],encapsulation:2})};function Je(n,t){if(n&1){let e=C();a(0,"span",0)(1,"input",2),x("input",function(o){u(e);let m=l();return g(m.draft.set(o.target.value))})("keydown.enter",function(){u(e);let o=l();return g(o.commit())})("keydown.escape",function(){u(e);let o=l();return g(o.cancel())})("blur",function(){u(e);let o=l();return g(o.onBlur())}),s(),a(2,"span",3)(3,"button",4),x("mousedown",function(o){return u(e),g(o.preventDefault())})("click",function(){u(e);let o=l();return g(o.commit())}),N(4,"app-icon",5),s(),a(5,"button",6),x("mousedown",function(o){return u(e),g(o.preventDefault())})("click",function(){u(e);let o=l();return g(o.cancel())}),N(6,"app-icon",7),s()()()}if(n&2){let e=l();r(),M(e.inputClass()),I("width",e.width(),"ch"),p("value",e.draft())("placeholder",e.placeholder()),B("aria-label",e.ariaLabel()||null),r(3),p("strokeWidth",2.5),r(2),p("strokeWidth",2)}}function Ke(n,t){if(n&1){let e=C();a(0,"button",8),x("click",function(){u(e);let o=l();return g(o.start())}),a(1,"span"),d(2),s(),N(3,"app-icon",9),s()}if(n&2){let e=l();M(e.viewClass()),p("title","Edit "+(e.ariaLabel()||"value")),r(),M("min-w-0 "+(e.wrap()?"whitespace-normal break-words":"truncate")+(e.value()?"":" text-placeholder")),r(),b(e.value()||e.placeholder()),r(),p("strokeWidth",2)}}var fe=class n{value=c("");placeholder=c("\u2014");ariaLabel=c("");mono=c(!1,{transform:E});size=c("md");wrap=c(!1,{transform:E});align=c("end");hostClass=h(()=>"flex min-w-0 flex-1 "+(this.align()==="end"?"justify-end":"justify-start"));save=y();editing=w(!1);draft=w("");width=h(()=>Math.min(Math.max(this.draft().length+3,12),60));textSizeClass=h(()=>this.size()==="lg"?"text-xl font-semibold":this.mono()?"text-[13px]":"text-sm");inputClass=h(()=>"-my-px min-w-0 flex-1 rounded-md border border-brand bg-surface py-0 text-surface-foreground focus:outline-none "+(this.mono()?"font-mono ":"")+(this.align()==="end"?"text-right ":"")+{sm:"-mx-1 px-1 ",md:"-mx-1.5 px-1.5 ",lg:"-mx-1.5 px-1.5 "}[this.size()]+this.textSizeClass());viewClass=h(()=>"group flex min-w-0 max-w-full items-center gap-1.5 rounded-md text-left transition-colors hover:bg-muted "+(this.mono()?"font-mono ":"")+{sm:"-mx-1 px-1 ",md:"-mx-1.5 px-1.5 ",lg:"-mx-1.5 px-1.5 "}[this.size()]+this.textSizeClass());start(){this.draft.set(this.value()),this.editing.set(!0)}commit(){let t=this.draft().trim();this.editing.set(!1),t!==(this.value()??"")&&this.save.emit(t)}cancel(){this.editing.set(!1)}onBlur(){this.editing()&&this.commit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=k({type:n,selectors:[["app-inline-edit"]],hostVars:2,hostBindings:function(e,i){e&2&&M(i.hostClass())},inputs:{value:[1,"value"],placeholder:[1,"placeholder"],ariaLabel:[1,"ariaLabel"],mono:[1,"mono"],size:[1,"size"],wrap:[1,"wrap"],align:[1,"align"]},outputs:{save:"save"},decls:2,vars:1,consts:[[1,"relative","flex","min-w-0","max-w-full","items-center"],["type","button",3,"class","title"],["appAutofocusSelect","",3,"input","keydown.enter","keydown.escape","blur","value","placeholder"],[1,"absolute","left-full","top-1/2","z-10","ml-1.5","flex","-translate-y-1/2","gap-1","rounded-lg","border","border-border","bg-surface","p-0.5","shadow-md"],["type","button","title","Save (Enter)","aria-label","Save",1,"grid","h-6","w-6","shrink-0","place-items-center","rounded-md","bg-brand","text-brand-foreground",3,"mousedown","click"],["name","check",1,"h-3.5","w-3.5",3,"strokeWidth"],["type","button","title","Cancel (Esc)","aria-label","Cancel",1,"grid","h-6","w-6","shrink-0","place-items-center","rounded-md","text-muted-foreground","hover:bg-muted",3,"mousedown","click"],["name","x",1,"h-3.5","w-3.5",3,"strokeWidth"],["type","button",3,"click","title"],["name","pencil",1,"h-3","w-3","shrink-0","text-muted-foreground","opacity-50","transition-opacity","group-hover:opacity-100",3,"strokeWidth"]],template:function(e,i){e&1&&_(0,Je,7,9,"span",0)(1,Ke,4,7,"button",1),e&2&&f(i.editing()?0:1)},dependencies:[se,Z],encapsulation:2})};export{ue as a,ge as b,_e as c,fe as d};
@@ -0,0 +1 @@
1
+ var l=["view","admin","operate","deploy","data","billing","analytics","access"],c={view:"Read-only",admin:"Admin",operate:"Operate",deploy:"Deploy",data:"Data",billing:"Billing",analytics:"Analytics",access:"Access"},o={view:"role-view",admin:"role-admin",operate:"role-operate",deploy:"bolt",data:"resource-database",billing:"role-billing",analytics:"role-analytics",access:"key"},i=[[/read|view|audit/,"view"],[/admin/,"admin"],[/deploy|release|(^|[^a-z])ci([^a-z]|$)/,"deploy"],[/ops|operat|power/,"operate"],[/data|db|sql/,"data"],[/bill|cost|financ/,"billing"]];function s(e){return o[e]}function d(e,n){if(e&&l.includes(e))return o[e];let a=n.toLowerCase();for(let[t,r]of i)if(t.test(a))return o[r];return o.access}export{l as a,c as b,s as c,d};
@@ -0,0 +1 @@
1
+ function o(n,i){let t=new Date(n),e=t.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"});return i?.sameDayTimeOnly&&t.toDateString()===new Date().toDateString()?e:`${t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}, ${e}`}export{o as a};
@@ -0,0 +1 @@
1
+ import{a as y}from"./chunk-CG56PH3M.js";import"./chunk-QPBWZLCT.js";import{a as _}from"./chunk-EQ4PF25J.js";import"./chunk-J3SSPCFV.js";import"./chunk-2MOGDYK4.js";import"./chunk-4N2IUS6T.js";import{Aa as l,Ba as C,Db as b,H as m,Ha as w,N as d,Q as p,Wa as P,Z as c,fa as g,ja as u,rb as h,sa as f,ta as v,tb as i,ya as s,za as r}from"./chunk-P5WRM37W.js";import"./chunk-WFIHWVQO.js";function T(n,t){n&1&&w(0)}function D(n,t){if(n&1&&u(0,T,1,0,"ng-container",3),n&2){let o=t;s("ngComponentOutlet",o.component)("ngComponentOutletInjector",o.injector)}}function M(n,t){n&1&&(r(0,"p",1),P(1,"This preview couldn't load. Close the wizard and open it again."),l())}function x(n,t){n&1&&(r(0,"div",2),C(1,"app-skeleton",4)(2,"app-skeleton",5)(3,"app-skeleton",6)(4,"app-skeleton",7)(5,"app-skeleton",7),l())}var N=class n{def=i.required();audience=i("admin");brandName=i("Acme Cloud");logoUrl=i("");logoText=i("A");injector=m(d);page=p(null);failed=p(!1);current={};load=h(()=>{let t=this.def(),o=this.current={};this.page.set(null),this.failed.set(!1),t.load().then(e=>{if(this.current!==o)return;let a=d.create({providers:e.providers,parent:this.injector});this.page.set({component:e.component,injector:a})}).catch(e=>{this.current===o&&(this.failed.set(!0),console.warn("theme wizard: preview page failed to load",t.id,e))})});static \u0275fac=function(o){return new(o||n)};static \u0275cmp=g({type:n,selectors:[["app-preview-page"]],inputs:{def:[1,"def"],audience:[1,"audience"],brandName:[1,"brandName"],logoUrl:[1,"logoUrl"],logoText:[1,"logoText"]},decls:4,vars:6,consts:[["inert","",3,"audience","active","brandName","logoUrl","logoText"],[1,"failed"],["aria-label","Loading preview",1,"loading"],[4,"ngComponentOutlet","ngComponentOutletInjector"],["sizeClass","h-7 w-56"],["sizeClass","h-4 w-80"],["sizeClass","mt-4 h-10 w-full"],["sizeClass","h-10 w-full"]],template:function(o,e){if(o&1&&(r(0,"app-preview-shell",0),f(1,D,1,2,"ng-container")(2,M,2,0,"p",1)(3,x,6,0,"div",2),l()),o&2){let a;s("audience",e.audience())("active",e.def().nav)("brandName",e.brandName())("logoUrl",e.logoUrl())("logoText",e.logoText()),c(),v((a=e.page())?1:e.failed()?2:3,a)}},dependencies:[b,y,_],styles:["[_nghost-%COMP%]{display:block;pointer-events:none;-webkit-user-select:none;user-select:none}.loading[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:28px}.failed[_ngcontent-%COMP%]{margin:28px;font-size:13px;color:var(--muted-foreground)}"]})};export{N as PreviewPageComponent};
@@ -0,0 +1 @@
1
+ import{a as re,k as de}from"./chunk-RI77LE5V.js";import{a as N}from"./chunk-IKK5DQ3Z.js";import"./chunk-H5H727H6.js";import{a as se}from"./chunk-2V6RSAAC.js";import"./chunk-JMBXRK3I.js";import"./chunk-DOLRLYW7.js";import"./chunk-O4QSFUXB.js";import{a as fe}from"./chunk-KEBESIXR.js";import{a as ve}from"./chunk-6KFR7DYY.js";import{a as he}from"./chunk-CP4XZPOA.js";import{a as ce,b as pe}from"./chunk-OATVFQXO.js";import{a as _e}from"./chunk-EQ4PF25J.js";import{a as ge,d as xe,e as Ce}from"./chunk-ZDCURXPS.js";import{a as Z}from"./chunk-PSMER3HX.js";import{a as me}from"./chunk-QVABVDO5.js";import"./chunk-PMMBJK7Q.js";import"./chunk-4SK6XQ6C.js";import{a as ae}from"./chunk-SJMLX5AT.js";import{a as le,b}from"./chunk-2SO4BVIT.js";import"./chunk-KPNHT4MK.js";import{a as Q,b as X,e as Y,i as ee,j as te,k as ie,n as ne,o as oe,p as ue}from"./chunk-NO5D6WDF.js";import{c as z}from"./chunk-GKI3R2JB.js";import{a as J}from"./chunk-M6OAYNRE.js";import{a as P}from"./chunk-XJM3HDJQ.js";import"./chunk-2MOGDYK4.js";import"./chunk-4N2IUS6T.js";import{a as T}from"./chunk-D7TR2ORJ.js";import{Aa as r,Ba as U,E as F,H as R,Ia as q,J as h,K as v,Ka as C,Ma as l,Na as H,Oa as W,Q as f,Va as E,Wa as n,Xa as c,Ya as g,Z as a,Za as S,_a as I,ab as j,bb as B,cb as K,fa as D,qb as x,sa as p,sb as V,ta as m,tb as L,va as $,wa as y,xa as w,ya as u,za as s}from"./chunk-P5WRM37W.js";import{a as O}from"./chunk-WFIHWVQO.js";var A=class t{api=R(re);toast=R(z);notifications=R(de);requests=f(null);error=f("");deciding=f(new Set);pending=x(()=>(this.requests()??[]).filter(i=>i.status==="PENDING"));decided=x(()=>(this.requests()??[]).filter(i=>i.status!=="PENDING"));load(){this.error.set(""),this.api.listAll(void 0,{usage:!0}).subscribe({next:i=>this.requests.set(i),error:()=>{this.requests.set([]),this.error.set("Could not load requests. Try reloading the page.")}})}approve(i,e,o){let{what:d,who:_}=Re(i);this.decide(i,this.api.approve(i.requestId,e,o),()=>this.toast.success(i.type!=="REAPPROVAL"?`Granted ${d} to ${_}`:i.kind==="GROUP"?`Kept group ${_}`:`Re-approved ${d} for ${_}`))}deny(i,e){let{what:o,who:d}=Re(i),_=i.type!=="REAPPROVAL"?`Denied ${o} for ${d}`:i.kind==="ADMIN"?`Removed admin status from ${d}`:i.kind==="SERVICE_USER"?`Deleted service user ${d}`:i.kind==="GROUP"?`Deleted group ${d}`:`Revoked ${o} for ${d}`;this.decide(i,this.api.deny(i.requestId,e),()=>this.toast.success(_))}decide(i,e,o){this.setDeciding(i.requestId,!0),e.subscribe({next:()=>{this.setDeciding(i.requestId,!1),o(),this.load(),this.notifications.load()},error:d=>{this.setDeciding(i.requestId,!1),this.toast.error(ue(d,"Could not record that decision.")),this.load(),this.notifications.load()}})}setDeciding(i,e){this.deciding.update(o=>{let d=new Set(o);return e?d.add(i):d.delete(i),d})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=F({token:t,factory:t.\u0275fac,providedIn:"root"})};function Re(t){let i=t.group||t.serviceUser||t.email||"the user";return{what:t.kind==="ADMIN"?"admin status":t.kind==="SERVICE_USER"?"service-user access":t.kind==="GROUP"?"the whole bundle":t.kind==="RESOURCE"?t.resourceName||"the resource":t.kind==="PLUGIN"?`${t.pluginId} (${t.permission})`:t.roleName||"access",who:i}}var Ee=["*"],k=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=D({type:t,selectors:[["app-card"]],hostAttrs:[1,"block","rounded-2xl","border","border-border/70","bg-card-bg"],ngContentSelectors:Ee,decls:1,vars:0,template:function(e,o){e&1&&(H(),W(0))},encapsulation:2})};function ye(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," stays an admin \u2014 the next review is in 12 months. ")),t&2){let e=l(2);a(),c(e.who())}}function we(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," loses admin access to this app. Their roles and group memberships are unchanged. (Refused if they are the last admin.) ")),t&2){let e=l(2);a(),c(e.who())}}function Se(t,i){if(t&1&&p(0,ye,3,1)(1,we,3,1),t&2){let e=l();m(e.approving()?0:1)}}function Ie(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," stays registered \u2014 the next review is in 12 months. ")),t&2){let e=l(2);a(),c(e.who())}}function Te(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," will be "),s(3,"strong"),n(4,"deleted"),r(),n(5,": its secret stops working on its next call and all its role grants are removed. Automation still using it will start failing. ")),t&2){let e=l(2);a(),c(e.who())}}function Ne(t,i){if(t&1&&p(0,Ie,3,1)(1,Te,6,1),t&2){let e=l();m(e.approving()?0:1)}}function Pe(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," keeps its whole bundle \u2014 the next review is in 12 months. ")),t&2){let e=l(2);a(),c(e.request().group||"This group")}}function Ae(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," will be "),s(3,"strong"),n(4,"deleted"),r(),n(5,": every member loses the roles and resources it bundled (unless held another way) and is notified. ")),t&2){let e=l(2);a(),c(e.request().group||"This group")}}function ke(t,i){if(t&1&&p(0,Pe,3,1)(1,Ae,6,1),t&2){let e=l();m(e.approving()?0:1)}}function Me(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," keeps reaching "),s(3,"strong"),n(4),r(),n(5," over the VPN for another 12 months, then it comes up for review again. ")),t&2){let e=l(2);a(),c(e.who()),a(3),c(e.resourceLabel())}}function Ue(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," loses network access to "),s(3,"strong"),n(4),r(),n(5," \u2014 this standing access is revoked now (the network closes within about 5 minutes). ")),t&2){let e=l(2);a(),c(e.who()),a(3),c(e.resourceLabel())}}function Ve(t,i){if(t&1&&p(0,Me,6,2)(1,Ue,6,2),t&2){let e=l();m(e.approving()?0:1)}}function Le(t,i){t&1&&n(0," until you revoke the grant. The change reaches the network within about 5 minutes. ")}function Ge(t,i){if(t&1&&(n(0," for "),s(1,"strong"),n(2),r(),n(3," \u2014 after that the network closes on its own. Changes reach the network within about 5 minutes. ")),t&2){let e=l(3);a(2),c(e.label(e.duration()))}}function Oe(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," will be able to reach "),s(3,"strong"),n(4),r(),n(5," over the VPN, "),p(6,Le,1,0)(7,Ge,4,1)),t&2){let e=l(2);a(),c(e.who()),a(3),c(e.resourceLabel()),a(2),m(e.duration()==="long"?6:7)}}function Fe(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," will not be able to reach "),s(3,"strong"),n(4),r(),n(5,". Their existing access is unchanged, and they can ask again later. ")),t&2){let e=l(2);a(),c(e.who()),a(3),c(e.resourceLabel())}}function $e(t,i){if(t&1&&p(0,Oe,8,3)(1,Fe,6,2),t&2){let e=l();m(e.approving()?0:1)}}function He(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," keeps "),s(3,"strong"),n(4),r(),n(5," in account "),s(6,"strong"),n(7),r(),n(8," for another 12 months, then it comes up for review again. ")),t&2){let e=l(2);a(),c(e.who()),a(3),c(e.subject()),a(3),c(e.request().accountNumber)}}function We(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," will lose "),s(3,"strong"),n(4),r(),n(5," in "),s(6,"strong"),n(7),r(),n(8," \u2014 this standing access is revoked now. ")),t&2){let e=l(2);a(),c(e.who()),a(3),c(e.subject()),a(3),c(e.request().accountNumber)}}function je(t,i){if(t&1&&p(0,He,9,3)(1,We,9,3),t&2){let e=l();m(e.approving()?0:1)}}function Be(t,i){t&1&&n(0," and can vend credentials for it until you revoke the role. ")}function Ke(t,i){if(t&1&&(n(0," for "),s(1,"strong"),n(2),r(),n(3," \u2014 after that, vending denies on its own. ")),t&2){let e=l(2);a(2),c(e.label(e.duration()))}}function ze(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," will be able to assume "),s(3,"strong"),n(4),r(),n(5," in account "),s(6,"strong"),n(7),r(),n(8," straight away, "),p(9,Be,1,0)(10,Ke,4,1)),t&2){let e=l();a(),c(e.who()),a(3),c(e.request().roleName),a(3),c(e.request().accountNumber),a(2),m(e.duration()==="long"?9:10)}}function Ze(t,i){if(t&1&&(s(0,"strong"),n(1),r(),n(2," will not get "),s(3,"strong"),n(4),r(),n(5," in "),s(6,"strong"),n(7),r(),n(8,". Their existing access is unchanged, and they can ask again later. ")),t&2){let e=l();a(),c(e.who()),a(3),c(e.request().roleName),a(3),c(e.request().accountNumber)}}function Je(t,i){t&1&&n(0," If it is the group's last role or resource, the group itself is removed. ")}function Qe(t,i){if(t&1&&(n(0," This applies to "),s(1,"strong"),n(2,"every member"),r(),n(3," of the group. "),p(4,Je,1,0)),t&2){let e=l();a(4),m(e.approving()?-1:4)}}function Xe(t,i){t&1&&n(0," Never used in the last 12 months. ")}function Ye(t,i){if(t&1&&n(0),t&2){let e=l(),o=l();I(" Used ",e.count," ",e.count===1?"time":"times"," in the last 12 months",e.lastAt?" \u2014 last "+o.ago(e.lastAt):"",". ")}}function et(t,i){if(t&1&&(s(0,"p",10),p(1,Xe,1,0)(2,Ye,1,3),r()),t&2){let e=i;E(e.count===0?"font-medium text-amber-700 dark:text-amber-400":"text-muted-foreground"),a(),m(e.count===0?1:2)}}function tt(t,i){if(t&1&&(s(0,"div")(1,"p",11),n(2,"Their reason"),r(),s(3,"p",12),n(4),r()()),t&2){let e=l();a(4),g(' "',e.request().reason,'" ')}}function it(t,i){if(t&1&&(s(0,"option",14),n(1),r()),t&2){let e=i.$implicit,o=l(2);u("ngValue",e),a(),c(o.label(e))}}function nt(t,i){if(t&1){let e=q();s(0,"app-field",4)(1,"select",13),C("ngModelChange",function(d){h(e);let _=l();return v(_.duration.set(d))}),y(2,it,2,2,"option",14,$),s(4,"option",14),n(5,"Long-term (indefinite)"),r()()()}if(t&2){let e=l();u("hint",e.askedHint()),a(),u("ngModel",e.duration()),a(),w(e.PRESETS),a(2),u("ngValue","long")}}var M=class t{request=L.required();decision=L.required();confirmed=V();closed=V();PRESETS=le;label(i){return i==="long"?"long-term":b(i)}who(){let i=this.request();return i.group||i.serviceUser||i.email||"This user"}ago=N;note=f("");duration=f("long");approving=x(()=>this.decision()==="APPROVED");reapproval=x(()=>this.request().type==="REAPPROVAL");resource=x(()=>this.request().kind==="RESOURCE");subject=x(()=>this.request().kind==="PLUGIN"?`${this.request().pluginId} (${this.request().permission})`:this.request().roleName);resourceLabel=x(()=>this.request().resourceName||"(deleted resource)");title=x(()=>this.request().kind==="ADMIN"?this.approving()?"Keep this admin?":"Remove admin?":this.request().kind==="SERVICE_USER"?this.approving()?"Keep this service user?":"Delete this service user?":this.request().kind==="GROUP"?this.approving()?"Keep this group?":"Delete this group?":this.titleForAccess());titleForAccess=()=>this.resource()?this.reapproval()?this.approving()?"Reapprove this access?":"Revoke this access?":this.approving()?"Grant this resource?":"Deny this request?":this.reapproval()?this.approving()?"Reapprove this access?":"Revoke this access?":this.approving()?"Grant this role?":"Deny this request?";confirmLabel=x(()=>this.request().kind==="ADMIN"?this.approving()?"Keep admin":"Remove admin":this.request().kind==="SERVICE_USER"?this.approving()?"Keep service user":"Delete service user":this.request().kind==="GROUP"?this.approving()?"Keep group":"Delete group":this.confirmLabelForAccess());confirmLabelForAccess=()=>this.resource()?this.reapproval()?this.approving()?"Reapprove access":"Revoke access":this.approving()?"Grant access":"Deny request":this.reapproval()?this.approving()?"Reapprove access":"Revoke access":this.approving()?"Grant role":"Deny request";askedHint=x(()=>{let i=this.request().requestedDurationHours;return i?`\u2014 they asked for ${b(i)}`:"\u2014 they asked for long-term"});ngOnInit(){this.duration.set(this.request().requestedDurationHours??"long")}confirm(){let i=this.duration();this.confirmed.emit(O({note:this.note().trim()},this.approving()&&i!=="long"?{durationHours:i}:{}))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=D({type:t,selectors:[["app-request-decision-dialog"]],inputs:{request:[1,"request"],decision:[1,"decision"]},outputs:{confirmed:"confirmed",closed:"closed"},decls:22,vars:11,consts:[[3,"closed","title"],[1,"space-y-4"],[3,"tone"],[1,"text-sm",3,"class"],["label","Access duration",3,"hint"],["label","Note","hint","optional; shown to them with your decision"],["rows","2","maxlength","500",1,"ui-input",3,"ngModelChange","placeholder","ngModel"],[1,"mt-5","flex","justify-end","gap-2"],["variant","outline",3,"click"],[3,"click","variant"],[1,"text-sm"],[1,"mb-1","text-sm","font-medium","text-surface-foreground"],[1,"rounded-lg","bg-muted","p-3","text-sm","italic","text-surface-foreground","ring-1","ring-border"],[1,"ui-input",3,"ngModelChange","ngModel"],[3,"ngValue"]],template:function(e,o){if(e&1&&(s(0,"app-dialog",0),C("closed",function(){return o.closed.emit()}),s(1,"div",1)(2,"app-banner",2),p(3,Se,2,1)(4,Ne,2,1)(5,ke,2,1)(6,Ve,2,1)(7,$e,2,1)(8,je,2,1)(9,ze,11,4)(10,Ze,9,3),p(11,Qe,5,1),r(),p(12,et,3,3,"p",3),p(13,tt,5,1,"div"),p(14,nt,6,3,"app-field",4),s(15,"app-field",5)(16,"textarea",6),C("ngModelChange",function(_){return o.note.set(_)}),r()()(),s(17,"div",7)(18,"app-button",8),C("click",function(){return o.closed.emit()}),n(19,"Cancel"),r(),s(20,"app-button",9),C("click",function(){return o.confirm()}),n(21),r()()()),e&2){let d;u("title",o.title()),a(2),u("tone",o.approving()?"success":"warning"),a(),m(o.request().kind==="ADMIN"?3:o.request().kind==="SERVICE_USER"?4:o.request().kind==="GROUP"?5:o.resource()&&o.reapproval()?6:o.resource()?7:o.reapproval()?8:o.approving()?9:10),a(8),m(o.request().groupId?11:-1),a(),m((d=o.request().usage)?12:-1,d),a(),m(o.request().reason?13:-1),a(),m(o.approving()&&!o.reapproval()?14:-1),a(2),u("placeholder",o.approving()?"e.g. Approved for the migration \u2014 will review in a month.":"e.g. Use the read-only role instead; ping me if that blocks you.")("ngModel",o.note()),a(4),u("variant",o.approving()?"primary":"danger"),a(),g(" ",o.confirmLabel()," ")}},dependencies:[oe,te,ie,Q,ee,X,ne,Y,P,J,T,ae],encapsulation:2})};var ot=(t,i)=>i.requestId;function at(t,i){if(t&1&&(s(0,"span",4),n(1),r()),t&2){let e=l();a(),g(" ",e.store.pending().length," ")}}function rt(t,i){if(t&1&&(s(0,"app-banner",5),n(1),r()),t&2){let e=l();a(),c(e.store.error())}}function st(t,i){t&1&&(s(0,"div",6),U(1,"app-skeleton",8)(2,"app-skeleton",8)(3,"app-skeleton",8),r())}function lt(t,i){t&1&&(s(0,"app-empty-state",9),n(1," Every request has been decided. New ones appear here and in the activity bell. "),r())}function dt(t,i){t&1&&(s(0,"app-empty-state",10),n(1," Requests you've granted or denied will be listed here. "),r())}function ct(t,i){if(t&1&&p(0,lt,2,0,"app-empty-state",9)(1,dt,2,0,"app-empty-state",10),t&2){let e=l();m(e.tab()==="PENDING"?0:1)}}function pt(t,i){if(t&1&&(s(0,"app-empty-state",13),n(1),r()),t&2){let e=l(2);a(),g(' Nothing matches "',e.query(),'". Try a different email, role, or account. ')}}function mt(t,i){t&1&&(s(0,"app-badge",25),n(1,"group"),r())}function ut(t,i){t&1&&(s(0,"app-badge",25),n(1,"service"),r())}function _t(t,i){t&1&&(s(0,"app-chip")(1,"span",36),n(2,"admin status"),r()())}function gt(t,i){t&1&&(s(0,"app-chip")(1,"span",36),n(2,"service user \xB7 still needed?"),r()())}function xt(t,i){if(t&1&&(s(0,"app-chip")(1,"span",36),n(2),r()()),t&2){let e=l().$implicit;a(2),g("",e.group||"(deleted group)"," \xB7 whole group \xB7 still needed?")}}function Ct(t,i){if(t&1&&(s(0,"app-chip")(1,"span",36),n(2),r()()),t&2){let e=l().$implicit;a(2),g(" ",e.resourceName||"(deleted resource)"," \xB7 resource ")}}function ft(t,i){if(t&1&&(s(0,"app-chip")(1,"span",36),n(2),r()()),t&2){let e=l().$implicit,o=l(3);a(2),I(" ",e.pluginId," (",e.permission,") \xB7 ",o.names.label(e.accountNumber??"")," ")}}function ht(t,i){if(t&1&&(s(0,"app-chip")(1,"span",36),n(2),r()()),t&2){let e=l().$implicit,o=l(3);a(2),S(" ",e.roleName," \xB7 ",o.names.label(e.accountNumber??"")," ")}}function vt(t,i){t&1&&(s(0,"app-chip",28),n(1,"never used this year"),r())}function Rt(t,i){if(t&1&&(s(0,"app-chip"),n(1),r()),t&2){let e=l();a(),g("used ",e.count,"\xD7 this year")}}function qt(t,i){t&1&&p(0,vt,2,0,"app-chip",28)(1,Rt,2,1,"app-chip"),t&2&&m(i.count===0?0:1)}function Dt(t,i){if(t&1&&(s(0,"app-chip",37),n(1),r(),p(2,qt,2,1)),t&2){let e,o=l().$implicit;a(),c(o.kind==="ADMIN"||o.kind==="SERVICE_USER"||o.kind==="GROUP"?"12-month review":"12-month reapproval"),a(),m((e=o.usage)?2:-1,e)}}function bt(t,i){if(t&1&&(s(0,"app-chip",28),n(1),r()),t&2){let e=l().$implicit,o=l(3);a(),g("for ",o.dur(e.requestedDurationHours))}}function Et(t,i){t&1&&(s(0,"app-chip"),n(1,"long-term"),r())}function yt(t,i){if(t&1&&(s(0,"p",29),n(1),r()),t&2){let e=l().$implicit;u("title",e.reason),a(),g(' "',e.reason,'" ')}}function wt(t,i){if(t&1){let e=q();s(0,"app-button",38),C("click",function(){h(e);let d=l().$implicit,_=l(3);return v(_.ask(d,"DENIED"))}),n(1),r(),s(2,"app-button",39),C("click",function(){h(e);let d=l().$implicit,_=l(3);return v(_.ask(d,"APPROVED"))}),n(3),r()}if(t&2){let e=l().$implicit,o=l(3);u("disabled",o.isDeciding(e)),a(),g(" ",e.type==="REAPPROVAL"?"Revoke":"Deny"," "),a(),u("loading",o.isDeciding(e)),a(),g(" ",e.type==="REAPPROVAL"?"Reapprove":"Grant"," ")}}function St(t,i){if(t&1&&(s(0,"div",35)(1,"app-badge",40),n(2),r(),s(3,"p",41),n(4),r(),s(5,"p",42),n(6),r()()),t&2){let e=l().$implicit,o=l(3);u("title",o.exact(e.decidedAt)),a(),u("tone",e.status==="APPROVED"?"green":"red"),a(),g(" ",e.status==="APPROVED"?o.grantedLabel(e):"Denied"," "),a(2),S(" ",o.stampDate(e.decidedAt),", ",o.stampTime(e.decidedAt)," "),a(2),c(o.ago(e.decidedAt))}}function It(t,i){if(t&1&&(s(0,"app-card",20)(1,"div",23)(2,"p",24),n(3),p(4,mt,2,0,"app-badge",25)(5,ut,2,0,"app-badge",25),r()(),s(6,"div",26)(7,"div",27),p(8,_t,3,0,"app-chip")(9,gt,3,0,"app-chip")(10,xt,3,1,"app-chip")(11,Ct,3,1,"app-chip")(12,ft,3,3,"app-chip")(13,ht,3,2,"app-chip"),p(14,Dt,3,2)(15,bt,2,1,"app-chip",28)(16,Et,2,0,"app-chip"),r(),p(17,yt,2,2,"p",29),r(),s(18,"div",30)(19,"p",31)(20,"span",32),n(21,"Requested: "),r(),n(22),r(),s(23,"p",33),n(24),r()(),s(25,"div",34),p(26,wt,4,4)(27,St,7,6,"div",35),r()()),t&2){let e=i.$implicit,o=l(3);a(3),g(" ",e.group||e.serviceUser||e.email||"(deleted user)"," "),a(),m(e.group?4:e.serviceUser?5:-1),a(4),m(e.kind==="ADMIN"?8:e.kind==="SERVICE_USER"?9:e.kind==="GROUP"?10:e.kind==="RESOURCE"?11:e.kind==="PLUGIN"?12:13),a(6),m(e.type==="REAPPROVAL"?14:e.requestedDurationHours?15:16),a(3),m(e.reason?17:-1),a(),u("title",o.exact(e.createdAt)),a(4),g("",o.stampDate(e.createdAt)," "),a(2),S(" ",o.stampTime(e.createdAt)," \xB7 ",o.ago(e.createdAt)," "),a(2),m(e.status==="PENDING"?26:27)}}function Tt(t,i){if(t&1){let e=q();s(0,"app-load-more",43),C("reached",function(){h(e);let d=l(3);return v(d.window.loadMore())}),r()}}function Nt(t,i){if(t&1&&(s(0,"div",14)(1,"div",15)(2,"span",16),n(3,"User"),r(),s(4,"span",16),n(5,"Requesting"),r(),s(6,"span",17),n(7,"Requested"),r(),s(8,"span",18),n(9),r()(),s(10,"div",19)(11,"div",6),y(12,It,28,10,"app-card",20,ot),r(),p(14,Tt,1,0,"app-load-more",21),U(15,"app-result-count",22),r()()),t&2){let e=l(2);a(9),g(" ",e.tab()==="PENDING"?"Decision":"Outcome"," "),a(3),w(e.window.items()),a(2),m(e.window.hasMore()?14:-1),a(),u("shown",e.window.shown())("total",e.filtered().length)("noun",e.tab()==="PENDING"?"pending request":"decided request")}}function Pt(t,i){if(t&1){let e=q();s(0,"div",11)(1,"app-search-input",12),K("valueChange",function(d){h(e);let _=l();return B(_.query,d)||(_.query=d),v(d)}),r()(),p(2,pt,2,1,"app-empty-state",13)(3,Nt,16,5,"div",14)}if(t&2){let e=l();a(),j("value",e.query),a(),m(e.filtered().length===0?2:3)}}function At(t,i){if(t&1){let e=q();s(0,"app-request-decision-dialog",44),C("confirmed",function(d){let _=h(e),be=l();return v(be.decide(_.request,_.decision,d))})("closed",function(){h(e);let d=l();return v(d.confirming.set(null))}),r()}if(t&2){let e=i;u("request",e.request)("decision",e.decision)}}var De=class t{store=R(A);names=R(se);query=f("");tab=f("PENDING");confirming=f(null);activeTab="bg-brand text-brand-foreground";inactiveTab="text-muted-foreground hover:bg-muted";tabRows=x(()=>this.tab()==="PENDING"?this.store.pending():this.store.decided());filtered=x(()=>{let i=this.tabRows(),e=this.query().trim().toLowerCase();return e?i.filter(o=>o.email.toLowerCase().includes(e)||(o.serviceUser??"").toLowerCase().includes(e)||(o.group??"").toLowerCase().includes(e)||(o.roleName??"").toLowerCase().includes(e)||(o.accountNumber??"").toLowerCase().includes(e)||(o.resourceName??"").toLowerCase().includes(e)):i});window=ve(this.filtered,20);isDeciding(i){return this.store.deciding().has(i.requestId)}ask(i,e){this.confirming.set({request:i,decision:e})}decide(i,e,o){this.confirming.set(null);let d=o.note||void 0;e==="APPROVED"?this.store.approve(i,d,o.durationHours):this.store.deny(i,d)}dur(i){return b(i)}grantedLabel(i){return i.grantedDurationHours?`Granted ${b(i.grantedDurationHours)}`:"Granted"}ago=N;stampDate(i){let e=this.parse(i);return e?e.toLocaleDateString(void 0,{day:"2-digit",month:"short",year:"numeric"}):"\u2014"}stampTime(i){let e=this.parse(i);return e?e.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):""}exact(i){let e=this.parse(i);return e?e.toLocaleString(void 0,{timeZoneName:"short"}):""}parse(i){if(!i)return null;let e=new Date(i);return Number.isNaN(e.getTime())?null:e}constructor(){this.store.load(),this.names.ensure()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=D({type:t,selectors:[["app-admin-requests-page"]],hostAttrs:[1,"flex","min-h-0","flex-1","flex-col"],decls:13,vars:9,consts:[[3,"fill"],["pageHeader","","title","Requests","subtitle","Roles people are asking for \u2014 decide each one.","subtitleInfo","Granting one gives them the role straight away; denying leaves their access untouched.",3,"showHeaderSearch"],["headerActions","",1,"inline-flex","rounded-lg","border","border-border-strong","bg-surface","p-0.5"],[1,"rounded-md","px-3","py-1.5","text-sm","font-medium","transition-colors",3,"click"],[1,"ml-1.5","inline-flex","h-5","min-w-5","items-center","justify-center","rounded-full","bg-warning-muted","px-1.5","text-[11px]","font-semibold","text-warning"],["tone","danger"],[1,"space-y-2"],[3,"request","decision"],["sizeClass","h-16 w-full"],["title","No pending requests"],["title","No decisions yet"],[1,"mb-3","flex","shrink-0","justify-end"],["compact","","placeholder","Search by email or account",1,"w-[260px]",3,"valueChange","value"],["title","No matches"],[1,"flex","min-h-0","flex-1","flex-col"],[1,"hidden","shrink-0","gap-4","px-4","py-2.5","md:flex"],[1,"flex-1","ui-microlabel","text-text-secondary"],[1,"w-44","ui-microlabel","text-text-secondary"],[1,"w-56","text-right","ui-microlabel","text-text-secondary"],[1,"min-h-0","flex-1","overflow-y-auto"],[1,"p-4","transition-shadow","duration-[180ms]","hover:shadow-card-hover","md:flex","md:items-center","md:gap-4"],["appInfiniteScroll",""],[3,"shown","total","noun"],[1,"min-w-0","flex-1","overflow-hidden"],[1,"ui-card-title","truncate"],["tone","gray",1,"ml-1.5","align-middle"],[1,"mt-3","min-w-0","flex-1","overflow-hidden","md:mt-0"],[1,"flex","flex-wrap","items-center","gap-1.5"],["tone","warning"],[1,"mt-1.5","line-clamp-2","text-xs","italic","text-muted-foreground",3,"title"],[1,"mt-3","w-full","shrink-0","md:mt-0","md:w-44",3,"title"],[1,"text-xs","font-medium","text-surface-foreground","tabular-nums"],[1,"md:hidden"],[1,"mt-0.5","text-xs","text-muted-foreground","tabular-nums"],[1,"mt-3","flex","w-full","shrink-0","items-center","justify-end","gap-2","md:mt-0","md:w-56"],[1,"text-right",3,"title"],[1,"min-w-0","truncate"],["tone","brand"],["variant","outline","size","sm",3,"click","disabled"],["size","sm",3,"click","loading"],[3,"tone"],[1,"mt-1","text-xs","text-surface-foreground","tabular-nums"],[1,"text-xs","text-muted-foreground"],["appInfiniteScroll","",3,"reached"],[3,"confirmed","closed","request","decision"]],template:function(e,o){if(e&1&&(s(0,"app-page",0)(1,"app-page-header",1)(2,"div",2)(3,"button",3),C("click",function(){return o.tab.set("PENDING")}),n(4," Pending "),p(5,at,2,1,"span",4),r(),s(6,"button",3),C("click",function(){return o.tab.set("DECIDED")}),n(7," Decided "),r()()(),p(8,rt,2,1,"app-banner",5)(9,st,4,0,"div",6)(10,ct,2,1)(11,Pt,4,2),r(),p(12,At,1,2,"app-request-decision-dialog",7)),e&2){let d;u("fill",!0),a(),u("showHeaderSearch",!1),a(2),E(o.tab()==="PENDING"?o.activeTab:o.inactiveTab),a(2),m(o.store.pending().length?5:-1),a(),E(o.tab()==="DECIDED"?o.activeTab:o.inactiveTab),a(2),m(o.store.error()?8:o.store.requests()===null?9:o.tabRows().length===0?10:11),a(4),m((d=o.confirming())?12:-1,d)}},dependencies:[Z,P,T,k,Ce,me,ce,he,_e,M,pe,ge,xe,fe],encapsulation:2})};export{De as AdminRequestsPageComponent};
@@ -0,0 +1 @@
1
+ import{a as A}from"./chunk-RI77LE5V.js";import{a as v}from"./chunk-Z3KONI7L.js";import{c as g}from"./chunk-O4QSFUXB.js";import{a as x}from"./chunk-4SK6XQ6C.js";import{p as m}from"./chunk-NO5D6WDF.js";import{a as M}from"./chunk-GKI3R2JB.js";import{E as p,H as a,Kb as D,Q as c,i as S,k as N,m as R,qb as w,rb as f}from"./chunk-P5WRM37W.js";import{a as y,e as u}from"./chunk-WFIHWVQO.js";var I=class i{bridge=a(g);network=a(v);byAccount=c(new Map);lastRun=0;inFlight=!1;lastSite=null;constructor(){f(()=>{let e=this.network.state(),t=this.network.activeSiteId();(e!=="connected"||t!==this.lastSite)&&(this.byAccount.set(new Map),this.lastRun=0),this.lastSite=t})}refresh(e){return u(this,null,function*(){if(!this.bridge.isDesktop||!this.bridge.probeSupported||this.network.state()!=="connected")return;let t=e.filter(n=>n.vpc.probeTargets.length>0&&this.network.isAccountOnActiveSite(n.accountNumber));if(t.length===0)return;let r=Date.now();if(!(this.inFlight||r-this.lastRun<3e4)){this.inFlight=!0,this.lastRun=r,this.byAccount.update(n=>{let o=new Map(n);for(let s of t)o.set(s.accountNumber,"checking");return o});try{for(let n of t){if(this.network.state()!=="connected")return;let o=yield this.probeOnce(n);if(o==="vpn-down"){this.network.refresh();return}this.byAccount.update(s=>{let l=new Map(s);return o===null?l.delete(n.accountNumber):l.set(n.accountNumber,o),l})}}finally{this.inFlight=!1}}})}probeOnce(e){return u(this,null,function*(){let t=!1;for(let r of e.vpc.probeTargets.slice(0,3))for(let n=0;;n++){let o=yield this.bridge.networkProbe(r.host,r.port).catch(()=>({ok:!1}));if(o.ok||o.reason==="refused")return"reachable";if(o.reason==="vpn-down")return"vpn-down";if(o.reason==="busy"){if(n>=1){t=!0;break}yield new Promise(s=>setTimeout(s,500));continue}break}return t?null:"no-response"})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"})};var F=class i{resourcesApi=a(x);requestsApi=a(A);reachable=c(null);requestable=c(null);error=c("");inFlight=!1;load(){this.inFlight||(this.inFlight=!0,this.error.set(""),R({reachable:this.resourcesApi.listReachable(),requestable:this.requestsApi.listResourceCatalog()}).subscribe({next:({reachable:e,requestable:t})=>{this.inFlight=!1,this.reachable.set(e),this.requestable.set(t)},error:e=>{this.inFlight=!1,this.reachable.set([]),this.requestable.set([]),this.error.set(m(e,"Could not load your resources."))}}))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"})};var b=class i{http=a(D);list(){return this.http.get("/api/network/shares")}directory(){return this.http.get("/api/network/shares/directory")}create(e){return this.http.post("/api/network/shares",e).pipe(N(t=>t.share))}remove(e){return this.http.delete(`/api/network/shares/${encodeURIComponent(e)}`)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"})};var q="This version of the desktop app can\u2019t run the relay.",T=i=>/^\d{1,3}(\.\d{1,3}){3}$/.test(i),O=class i{api=a(b);bridge=a(g);network=a(v);config=a(M);limits=this.config.config.devShares??{enabled:!1,maxDurationHours:8,allowGroupTargets:!0};enabled=this.limits.enabled&&this.bridge.isDesktop;mine=c(null);sharedWithMe=c(null);error=c("");serving=c(new Map);serveErrors=c(new Map);panelOpen=c(!1);shareSiteId=w(()=>this.network.activeSiteId()??this.network.sites()[0]?.id??"");shareSiteName=w(()=>this.network.siteName(this.shareSiteId())||"private network");inFlight=!1;pollers=0;timer=null;lastSyncSig=null;constructor(){this.enabled&&(this.bridge.onShareOpen(()=>this.panelOpen.set(!0)),this.bridge.onSharesChanged(()=>{this.syncServes(!0)}),f(()=>{let e=this.network.state();this.network.activeSiteId(),e==="connected"?this.syncServes(!0):(this.serving.set(new Map),this.lastSyncSig=null)}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&this.pollers>0&&this.load()}))}load(){!this.enabled||this.inFlight||(this.inFlight=!0,this.error.set(""),this.api.list().subscribe({next:e=>{this.inFlight=!1,this.mine.set(e.mine),this.sharedWithMe.set(e.sharedWithMe),this.syncServes()},error:e=>{this.inFlight=!1,this.mine()===null&&this.mine.set([]),this.sharedWithMe()===null&&this.sharedWithMe.set([]),this.error.set(m(e,"Could not load dev shares."))}}))}startPolling(e){this.enabled&&(this.load(),this.pollers++===0&&(this.timer=setInterval(()=>{document.visibilityState!=="hidden"&&this.load()},6e4)),e.onDestroy(()=>{--this.pollers===0&&this.timer&&(clearInterval(this.timer),this.timer=null)}))}create(e){return u(this,null,function*(){let t=yield S(this.api.create(e));return this.mine.update(r=>[...r??[],t].sort((n,o)=>n.expiresAt.localeCompare(o.expiresAt))),yield this.serve(t),t})}remove(e){return u(this,null,function*(){yield S(this.api.remove(e)),this.mine.update(t=>(t??[]).filter(r=>r.shareId!==e)),yield this.bridge.shareStop(e).catch(()=>{}),this.forget(e)})}syncServes(e=!1){return u(this,null,function*(){if(this.network.state()!=="connected")return;let t=this.network.activeSiteId(),r=(this.mine()??[]).filter(s=>t===null||s.siteId===t);if(!this.bridge.sharesSupported){for(let s of this.serving().keys())r.some(l=>l.shareId===s)||this.forget(s);for(let s of r)this.setServe(s.shareId,"failed",q);return}let n=r.map(s=>`${s.shareId}:${s.port}`).sort().join(",");if(!e&&n===this.lastSyncSig)return;this.lastSyncSig=n;let o=yield this.bridge.shareList().catch(()=>[]);for(let s of o)r.some(l=>l.shareId===s.shareId)||(yield this.bridge.shareStop(s.shareId).catch(()=>{}),this.forget(s.shareId));for(let s of r)yield this.serve(s)})}selfAddress(){return u(this,null,function*(){let e=yield this.bridge.networkStatus().catch(()=>null),t=e?.self?.dnsName||void 0,r=e?.self?.ips?.find(T);return y(y({},t?{hostname:t}:{}),r?{ip:r}:{})})}serve(e){return u(this,null,function*(){if(this.network.state()!=="connected")return;if(!this.bridge.sharesSupported){this.setServe(e.shareId,"failed",q);return}this.serving().has(e.shareId)||this.setServe(e.shareId,"starting");let t=yield this.bridge.shareStart({shareId:e.shareId,port:e.port,label:e.label,url:e.url??void 0,expiresAt:e.expiresAt}).catch(r=>({ok:!1,error:String(r)}));this.setServe(e.shareId,t.ok?"serving":"failed",t.ok?"":t.detail||t.error||"unknown")})}setServe(e,t,r=""){this.serving().get(e)===t&&(this.serveErrors().get(e)??"")===r||(this.serving.update(n=>new Map(n).set(e,t)),this.serveErrors.update(n=>{let o=new Map(n);return r?o.set(e,r):o.delete(e),o}))}forget(e){this.serving.update(t=>{let r=new Map(t);return r.delete(e),r}),this.serveErrors.update(t=>{let r=new Map(t);return r.delete(e),r})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"})};function j(i){let e=i.split(".").filter(Boolean);return e.length>2?e.slice(1).join("."):e.join(".")}function P(i){return/\.(amazonaws\.com|awsglobalaccelerator\.com|cloudfront\.net)$/i.test(i)}function C(i){let e=i.ports[0];return e===void 0?null:i.dnsName?{host:i.dnsName,port:e}:i.cidr.endsWith("/32")?{host:i.cidr.slice(0,-3),port:e}:null}function ge(i){let e=new Map;for(let r of i){let n=e.get(r.accountNumber);n?n.push(r):e.set(r.accountNumber,[r])}let t=[];for(let[r,n]of e){let o=new Map;for(let h of n){if(!h.dnsName)continue;let d=j(h.dnsName);P(d)||o.set(d,(o.get(d)??0)+1)}let s=null,l=0;for(let[h,d]of o)d>l&&(s=h,l=d);t.push({accountNumber:r,accountName:n.find(h=>h.accountName)?.accountName,vpc:{domain:s,resources:n,probeTargets:n.map(C).filter(h=>h!==null)}})}return t}function me(i,e){let t=new Map,r=[];for(let n of i){let o=e(n);if(o===void 0){r.push(n);continue}let s=t.get(o);s||t.set(o,s=[]),s.push(n)}return{bySite:t,unmapped:r}}function ve(i){let e=new Map;for(let t of i){let r=t.accountNumber??t.accountName??"unknown",n=e.get(r);n||(n={key:r,accountNumber:t.accountNumber,accountName:t.accountName,resources:[]},e.set(r,n)),n.accountName??=t.accountName,n.resources.push(t)}return[...e.values()]}function ye(i,e,t,r){switch(i){case"connected":return r===null||e===null||e===r?"connected":"off-site";case"connecting":return r===null||t===null||t===r?"connecting":"none";case"disconnecting":return"disconnecting";case"off":case"setup":return"off";default:return"none"}}export{I as a,F as b,b as c,O as d,ge as e,me as f,ve as g,ye as h};
@@ -0,0 +1 @@
1
+ import{a as Lt}from"./chunk-IMH56UBX.js";import{a as $t}from"./chunk-KEBESIXR.js";import{a as Le,b as Gt,c as Ft,d as Ot}from"./chunk-GPKKIOHD.js";import{a as Pt}from"./chunk-6KFR7DYY.js";import{a as Vt}from"./chunk-CP4XZPOA.js";import{a as Mt}from"./chunk-33SYY2JB.js";import{a as yt,b as wt}from"./chunk-OATVFQXO.js";import{a as At}from"./chunk-EQ4PF25J.js";import{a as Et,d as Dt}from"./chunk-ZDCURXPS.js";import{a as Ve}from"./chunk-PSMER3HX.js";import{b as St,c as Rt,d as Tt}from"./chunk-KCCEQIXX.js";import{a as Nt}from"./chunk-QVABVDO5.js";import{a as It}from"./chunk-J3SSPCFV.js";import{a as de}from"./chunk-4SK6XQ6C.js";import{a as bt}from"./chunk-SJMLX5AT.js";import{d as Ct}from"./chunk-2SO4BVIT.js";import{a as ge}from"./chunk-KPNHT4MK.js";import{a as Pe,b as be,e as Ce,i as Ge,j as Fe,k as Oe,n as vt,o as ye,p as oe}from"./chunk-NO5D6WDF.js";import{c as me}from"./chunk-GKI3R2JB.js";import{a as xt}from"./chunk-M6OAYNRE.js";import{a as kt}from"./chunk-XJM3HDJQ.js";import{b as $e}from"./chunk-2MOGDYK4.js";import{a as fe}from"./chunk-D7TR2ORJ.js";import{Aa as a,Ba as F,E as lt,Eb as _t,Fa as Ae,Ga as Ee,H as V,Ha as ut,Ia as I,J as v,K as b,Ka as x,Ma as p,Na as pt,Oa as Ze,P as dt,Pa as mt,Q as w,Qa as Re,Ra as ve,Sb as ht,Ta as ne,Ua as Te,Va as J,Wa as c,Xa as N,Ya as T,Z as r,Za as he,ab as et,bb as tt,cb as nt,fa as se,ib as De,ja as Ye,m as Se,nb as ot,pb as gt,qb as R,ra as ct,rb as ce,sa as _,sb as le,ta as h,tb as Z,ub as Me,va as Je,vb as ft,wa as U,xa as W,ya as m,za as s}from"./chunk-P5WRM37W.js";import{a as ie,b as re}from"./chunk-WFIHWVQO.js";var Ut=(o,t)=>t?`connector-${o}-${t}`:`connector-${o}`,_e=["site","connector","route","resource","group","user"],Wt={site:"Sites",connector:"Connectors",route:"Routes",resource:"Resources",group:"Groups",user:"Users"},Bt="site:none",tn={DATABASE:"Database",WEB:"Web",HOST:"Host"};function jt(o){return re(ie({},o),{x:0,y:0,w:0,h:0})}function zt(o){let t=[],e=[],n=u=>{t.push(jt(u))},i=(u,y,M="live")=>{e.push({from:u,to:y,kind:M})},l=u=>o.accounts.find(y=>y.accountNumber===u)?.name,d=u=>l(u)??u,g=o.status,C=o.network?.sites??[],S=new Map;for(let u of C)for(let y of u.accounts)S.set(y,u.id);for(let u of C){let y=g?.sites?.[u.id],M=(g?.connectors??[]).filter(K=>K.siteId===u.id&&K.trusted),z=M.some(K=>K.online),te=y?.staleConnectors.length??0;n({id:`site:${u.id}`,kind:"site",title:u.displayName||u.id,subtitle:nn(u.controlUrl),state:M.length?te?"warn":z?"ok":"off":"off",meta:[Object.keys(u.splitDns??{}).length?`Split DNS ${Object.entries(u.splitDns).map(([K,E])=>`${K} \u2192 ${E.join(", ")}`).join("; ")}`:"No split DNS",y?.at?`synced ${y.at}`:"no sync yet"].join(" \xB7 "),ref:{siteId:u.id}})}let A=new Set(o.resources.map(u=>u.accountNumber).filter(u=>!S.has(u)));A.size&&n({id:Bt,kind:"site",title:"Not on the network",subtitle:"accounts in no site",state:"none",ghost:!0,meta:"Add the account to a site in network.sites (config/project.ts) to connect it."});let D=new Map,j=new Map,B=(u,y)=>{let M=j.get(u)??[];return(M.find(z=>z.routes.some(te=>we(y,te)))??M[0])?.connId},ee=new Set,q=g?.connectors??[],L=new Set([...C.flatMap(u=>u.accounts),...A]);for(let u of L){if(ee.has(u))continue;ee.add(u);let y=S.get(u),M=C.find(k=>k.id===y),z=y?`site:${y}`:Bt,te=q.filter(k=>k.account===u&&k.trusted),K=q.filter(k=>k.account===u&&!k.trusted),E=(k,G)=>(k??"")===(G??""),f=(M?.connectorVpcs?.[u]??[]).map(k=>({declared:k,name:k.name,nodes:te.filter(G=>E(G.vpcName,k.name))}));for(let k of te.filter(G=>!f.some($=>E($.name,G.vpcName)))){let G=f.find($=>!$.declared&&E($.name,k.vpcName));G?G.nodes.push(k):f.push({name:k.vpcName,nodes:[k]})}f.length||f.push({nodes:[]});let O=[],P,Q=(k,G,$)=>{let Y=`route:${u}:${G}`,xe=t.find(pe=>pe.id===Y);if(xe){xe.ghost&&!$.ghost&&Object.assign(xe,{subtitle:$.subtitle,state:$.state,ghost:void 0}),i(k,Y,$.edge);return}n(re(ie({id:Y,kind:"route",title:G,subtitle:$.subtitle,state:$.state},$.ghost?{ghost:!0}:{}),{ref:{account:u}})),i(k,Y,$.edge)},ue=[];for(let{declared:k,name:G,nodes:$}of f){let Y=`conn:${u}${G?`:${G}`:""}`,xe=G?`${d(u)} \xB7 ${G}`:d(u);if(ue.push({connId:Y,routes:[...new Set([...k?.routes??[],...$.flatMap(pe=>pe.approvedRoutes)])]}),$.length){let pe=$.some(ae=>ae.online),Qe=$.find(ae=>ae.online)??$[0],Xe=[...new Set($.flatMap(ae=>ae.approvedRoutes))],Zt=[...new Set($.flatMap(ae=>ae.advertisedRoutes))];P??=Y,O.push(...Xe),n({id:Y,kind:"connector",title:xe,subtitle:`${Qe.name} \xB7 ${k?.vpcId??"vpc \u2014"}`,state:pe?"ok":"off",meta:pe?`online${$.length>1?` \xB7 ${$.length} nodes`:""}`:`offline${Qe.lastSeen?` \xB7 last seen ${Qe.lastSeen}`:""}`,ref:{account:u,siteId:y}}),i(z,Y,"live");for(let ae of Xe)Q(Y,ae,{subtitle:"approved route",state:"ok",edge:"live"});for(let ae of Zt.filter(en=>!Xe.includes(en)))Q(Y,ae,{subtitle:"advertised, not approved",state:"warn",ghost:!0,edge:"declared"})}else{n({id:Y,kind:"connector",title:xe,subtitle:y?`${Ut(u,G)} \xB7 ${k?.vpcId??"no VPC declared"}`:`${u} \xB7 no site`,state:y?"off":"none",ghost:!0,meta:y?k?"Declared in config, nothing enrolled \u2014 deploy ConnectorStack.":"No connector enrolled for this account.":"Account is in no site \u2014 resources here can never be reached.",ref:{account:u,siteId:y}}),i(z,Y,"declared");for(let pe of k?.routes??[])Q(Y,pe,{subtitle:"declared, not advertised",state:"off",ghost:!0,edge:"declared"})}}j.set(u,ue),P&&D.set(u,{connId:P,routes:[...new Set(O)]});for(let k of K){let G=`conn:${u}:${k.nodeId??k.name}`;n({id:G,kind:"connector",title:k.name,subtitle:"untrusted \u2014 user-owned device",state:"warn",meta:"A user device named like a connector. Its routes are never honored.",ref:{account:u,siteId:y}}),i(z,G,"declared")}}for(let u of o.resources){let y=g?.resources?.[u.resourceId],M=`res:${u.resourceId}`,z=y?.users??0,te=`${rn(y?.status,z,u)} \xB7 ${tn[u.type]??u.type}`;n({id:M,kind:"resource",title:u.name,subtitle:`${u.cidr} : ${u.ports.join(", ")}`,state:on(y?.status),meta:te,ref:{resourceId:u.resourceId,account:u.accountNumber}});let K=D.get(u.accountNumber),E=B(u.accountNumber,u.cidr),f=K?.routes.find(O=>we(u.cidr,O));if(K&&(f||y?.status==="live"))i(`route:${u.accountNumber}:${f??K.routes[0]}`,M,"live");else if(K){let O=`route:${u.accountNumber}:!${u.cidr}`;t.some(P=>P.id===O)||n({id:O,kind:"route",title:u.cidr,subtitle:"no approved route covers this",state:"warn",ghost:!0,ref:{account:u.accountNumber}}),i(O,M,"blocked")}else if(E){let O=t.find(P=>P.kind==="route"&&P.id.startsWith(`route:${u.accountNumber}:`)&&!P.id.includes(":!")&&we(u.cidr,P.title));i(O?.id??E,M,O?"declared":"blocked")}}let H=new Set;for(let u of o.groups){let y=`group:${u.groupId}`;n({id:y,kind:"group",title:u.name,subtitle:`${u.members.length} member${u.members.length===1?"":"s"}`,ref:{groupId:u.groupId}});for(let M of u.resources??[])o.resources.some(z=>z.resourceId===M.resourceId)&&(i(`res:${M.resourceId}`,y,"live"),H.add(u.groupId))}let X=g?.devices??{};for(let u of o.users){let y=`user:${u.userId}`,M=X[u.userId],z=M?M.online?"online":"offline":"none",te=u.resources??[],K=o.groups.some(E=>H.has(E.groupId)&&E.members.some(f=>f.userId===u.userId));n({id:y,kind:"user",title:u.email.split("@")[0],meta:u.email,subtitle:z==="online"?`online \xB7 ${M.count} device${M.count===1?"":"s"}`:z==="offline"?`enrolled \xB7 offline${M.lastSeen?` since ${M.lastSeen.slice(0,10)}`:""}`:"never connected",device:z,relevant:te.length>0||!!M||K,ref:{userId:u.userId}});for(let E of te)E.direct&&o.resources.some(f=>f.resourceId===E.resourceId)&&i(`res:${E.resourceId}`,y,"live")}for(let u of o.groups)for(let y of u.members)o.users.some(M=>M.userId===y.userId)&&i(`group:${u.groupId}`,`user:${y.userId}`,"live");return{nodes:t,edges:e,byId:new Map(t.map(u=>[u.id,u]))}}function nn(o){try{return new URL(o).host}catch{return o}}function on(o){switch(o){case"live":return"ok";case"no-grants":return"idle";case"no-connector":case"no-site":return"off";case"outside-approved-routes":case"no-valid-ports":case"dns-unresolved":return"warn";default:return}}function rn(o,t,e){let n=e.securityGroupId?" \xB7 firewall auto":"";switch(o){case"live":return`Reachable \xB7 ${t} user${t===1?"":"s"}${n}`;case"no-grants":return`No one granted${n}`;case"no-connector":return"No connector";case"no-site":return"Account in no site";case"outside-approved-routes":return"Outside approved routes";case"no-valid-ports":return"No valid ports";case"dns-unresolved":return"DNS name unresolved";default:return"Syncing\u2026"}}function we(o,t){let e=Kt(o),n=Kt(t);if(!e||!n||e.bits<n.bits)return!1;let i=n.bits===0?0:-1<<32-n.bits>>>0;return(e.ip&i)>>>0===(n.ip&i)>>>0}function Kt(o){let t=/^(\d+)\.(\d+)\.(\d+)\.(\d+)(?:\/(\d+))?$/.exec(o.trim());if(!t)return null;let e=t.slice(1,5).map(Number);if(e.some(l=>l>255))return null;let n=t[5]===void 0?32:Number(t[5]);return n>32?null:{ip:(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0,bits:n}}function Ht(){return{visible:{site:!0,connector:!0,route:!0,resource:!0,group:!0,user:!0},filter:{site:"",connector:"",route:"",resource:"",group:"",user:""},everyone:!1,focus:!1,selected:null}}var it=9;function sn(o,t,e){let n=new Set([t]),i=new Set,l=g=>_e.indexOf(o.byId.get(g).kind),d=(g,C)=>{let S=[g];for(;S.length;){let A=S.shift();o.edges.forEach((D,j)=>{let B=null;D.from===A&&Math.sign(l(D.to)-l(A))===C?B=D.to:D.to===A&&Math.sign(l(D.from)-l(A))===C&&(B=D.from),!(!B||!e[o.byId.get(B).kind]||i.has(j))&&(i.add(j),n.has(B)||(n.add(B),S.push(B)))})}};return d(t,-1),d(t,1),{nodes:n,edges:i}}function rt(o,t){let e=t.selected&&o.byId.has(t.selected)?sn(o,t.selected,t.visible):null,n=new Map,i=new Map,l=new Set;for(let d of _e){if(!t.visible[d])continue;let g=t.filter[d].trim().toLowerCase(),C=o.nodes.filter(S=>S.kind===d&&(d!=="user"||t.everyone||S.relevant||(e?.nodes.has(S.id)??!1))&&(!g||`${S.title} ${S.subtitle} ${S.meta??""}`.toLowerCase().includes(g)));if(t.focus&&e&&(C=C.filter(S=>e.nodes.has(S.id))),C.length>it){let S=C.filter(L=>e?.nodes.has(L.id)),A=C.filter(L=>!S.includes(L)),D=[...S,...A],j=D.slice(0,it-1),B=D.slice(it-1),ee=B.filter(L=>S.includes(L)).length,q=jt({id:`bucket:${d}`,kind:d,title:`+${B.length} more${ee?` \xB7 ${ee} in trace`:""}`,subtitle:"click to filter this column",ghost:!0,bucket:B.map(L=>L.id)});for(let L of B)i.set(L.id,q);C=[...j,q]}n.set(d,C);for(let S of C)l.add(S.id)}return{columns:n,bucketOf:i,drawn:l,trace:e}}var an={site:54,connector:46,route:40,resource:40,group:40,user:34};function qt(o,t,e,n){let i=[...t.columns.keys()],l=28,d=(e-l*2)/Math.max(i.length,1),g=new Map;i.forEach((C,S)=>{let A=t.columns.get(C);if(S>0){let q=H=>{if(H.bucket)return Number.POSITIVE_INFINITY;let X=[];for(let u of o.edges){let y=u.to===H.id?u.from:u.from===H.id?u.to:null;if(!y)continue;let M=g.get(y)??g.get(t.bucketOf.get(y)?.id??"");M!==void 0&&_e.indexOf(o.byId.get(y).kind)<_e.indexOf(C)&&X.push(M)}return X.length?X.reduce((u,y)=>u+y,0)/X.length:Number.POSITIVE_INFINITY-1},L=A.map((H,X)=>({n:H,b:q(H),idx:X}));L.sort((H,X)=>H.b-X.b||H.idx-X.idx),A.splice(0,A.length,...L.map(H=>H.n))}let D=an[C],j=Math.min(24,(n-40-A.length*D)/Math.max(A.length,1)),B=A.length*D+(A.length-1)*j,ee=(n-B)/2+D/2;for(let q of A)q.x=l+d*S+d/2,q.y=ee,q.w=Math.min(d-14,210),q.h=D,g.set(q.id,ee),ee+=D+j})}function st(o,t,e){for(let n of o.columns.values())for(let i of n)if(Math.abs(t-i.x)<=i.w/2&&Math.abs(e-i.y)<=i.h/2)return i;return null}var Qt=(o,t)=>(o??"")===(t??""),Ke=o=>o.name?`${o.vpcId} (${o.name})`:o.vpcId,Be=class{constructor(t){this.network=t;this.sites=t?.sites??[];for(let e of this.sites)for(let n of e.accounts)this.siteByAccount.set(n,e);for(let e of t?.status.connectors??[]){if(!e.trusted)continue;let n=this.connectorsByAccount.get(e.account)??[];n.push(e),this.connectorsByAccount.set(e.account,n)}}network;sites;siteByAccount=new Map;connectorsByAccount=new Map;get loaded(){return this.network!==null}siteOf(t){return this.siteByAccount.get(t)}siteName(t){return t?t.displayName||t.id:""}connectorOf(t,e){let n=this.siteOf(t);if(!n)return;let i=this.connectorsByAccount.get(t)??[],l=n.connectorVpcs?.[t]??[];if(e&&l.length>1){let d=C=>C.some(S=>we(e,S)),g=l.find(C=>d(C.routes))??l.find(C=>i.some(S=>Qt(S.vpcName,C.name)&&d(S.approvedRoutes)));g&&(l=[g],i=i.filter(C=>Qt(C.vpcName,g.name)))}return{node:i.find(d=>d.online)??i[0],online:i.some(d=>d.online),approvedRoutes:[...new Set(i.flatMap(d=>d.approvedRoutes))],vpcs:l,declaredRoutes:[...new Set(l.flatMap(d=>d.routes))]}}connectorState(t,e){if(!this.loaded)return{label:"\u2014",tone:"gray",dot:"none"};let n=this.connectorOf(t,e);return n?n.node?n.online?n.approvedRoutes.length?{label:"Connector online",tone:"green",dot:"ok"}:{label:"No approved routes",tone:"amber",dot:"off"}:{label:"Connector offline",tone:"red",dot:"off"}:{label:n.vpcs.length?"No connector enrolled":"No connector",tone:"red",dot:"none"}:{label:"Not on the network",tone:"red",dot:"none"}}cidrCheck(t,e){let n=e.trim(),i=this.connectorOf(t,n||void 0);if(!this.loaded||!n)return{ok:null,text:""};if(!i)return{ok:!1,text:"This account is in no site \u2014 nothing can route to it."};if(!i.approvedRoutes.length)return i.declaredRoutes.length?{ok:null,text:`No connector live yet; config declares ${i.declaredRoutes.join(", ")}.`}:{ok:null,text:"No connector routes known yet \u2014 the check runs after the next sync."};let l=i.approvedRoutes.find(d=>we(n,d));if(l){let d=Number(n.split("/")[1]??32),g=d<24?` Everyone granted this resource reaches all ${(2**(32-d)).toLocaleString("en-US")} addresses in it.`:"";return{ok:!0,text:`Inside ${l}, an approved route of ${i.node?.name??"the connector"}.${g}`}}return/^\d+\.\d+\.\d+\.\d+(\/\d+)?$/.test(n)?{ok:!1,text:`Outside every approved route (${i.approvedRoutes.join(", ")}) \u2014 it will show as "Outside approved routes" after sync.`}:{ok:null,text:""}}dnsCheck(t,e){let n=e.trim().toLowerCase();if(!this.loaded||!n)return{ok:null,text:""};if(/\.(amazonaws\.com|awsglobalaccelerator\.com|cloudfront\.net)$/.test(n))return{ok:!0,text:"Provider name \u2014 resolves publicly to its private IP, no split DNS needed."};let i=this.siteOf(t),l=Object.keys(i?.splitDns??{}).map(g=>g.toLowerCase()),d=l.find(g=>n===g||n.endsWith(`.${g}`));return d?{ok:!0,text:`${d} is split-DNS'd on ${this.siteName(i)} \u2014 resolves over the VPN.`}:i?{ok:!1,text:l.length?`Not under this site's split-DNS zone${l.length===1?"":"s"} (${l.join(", ")}) \u2014 users get NXDOMAIN unless the name resolves publicly. Register the IP or add the zone to the site's splitDns.`:`${this.siteName(i)} has no split DNS \u2014 private names won't resolve for users; register the IP or add a splitDns entry.`}:{ok:!1,text:"Account is in no site \u2014 no VPN resolver will answer for it."}}};var ke=class o{api=V(de);adminApi=V(ge);resources=w(null);network=w(null);status=R(()=>this.network()?.status??null);index=R(()=>new Be(this.network()));error=w("");load(){this.error.set(""),this.api.listAll().subscribe({next:t=>this.resources.set(t),error:t=>{this.resources.set([]),this.error.set(oe(t,"Could not load the resource catalog."))}}),this.loadNetwork()}loadNetwork(){this.adminApi.getNetwork().subscribe({next:t=>this.network.set(t),error:()=>this.network.set(null)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=lt({token:o,factory:o.\u0275fac,providedIn:"root"})};var ln=["rowTpl"],dn=[[["","header",""]],[["","after-groups",""]]],cn=["[header]","[after-groups]"],un=o=>({$implicit:o}),pn=(o,t)=>t.key;function mn(o,t){return this.trackBy()(t)}function gn(o,t){if(o&1&&(F(0,"span",12),s(1,"span",13),c(2),a()),o&2){let e=p().$implicit;r(2),N(e.stateLabel)}}function fn(o,t){if(o&1&&ut(0,11),o&2){let e=t.$implicit,n=p(2);m("ngTemplateOutlet",n.rowTpl())("ngTemplateOutletContext",De(2,un,e))}}function _n(o,t){if(o&1){let e=I();s(0,"div")(1,"div",4)(2,"div",5),x("click",function(){let i=v(e).$implicit,l=p();return b(l.toggle.emit(i.key))}),s(3,"span",6),F(4,"app-icon",7),c(5),_(6,gn,3,1),a()()(),s(7,"div",8)(8,"div",9)(9,"div",10),U(10,fn,1,4,"ng-container",11,mn,!0),a()()()()}if(o&2){let e=t.$implicit,n=p();r(2),Te("rounded-b-lg",n.isCollapsed(e.key)),r(2),Te("rotate-90",!n.isCollapsed(e.key)),m("strokeWidth",2.2),r(),T(" ",e.label," "),r(),h(e.stateLabel?6:-1),r(),ne("grid-template-rows",n.isCollapsed(e.key)?"0fr":"1fr"),r(3),W(e.rows)}}var Ue=class o{groups=Z.required();gridCols=Z.required();minWidth=Z(860);collapsedKeys=Z(new Set);toggle=le();trackBy=Z(t=>t);rowTpl=ft.required("rowTpl");contentWidth=V(Rt);reportWidth=ce(()=>this.contentWidth.report(this.minWidth()));ngOnDestroy(){this.contentWidth.reset()}isCollapsed(t){return this.collapsedKeys().has(t)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=se({type:o,selectors:[["app-sticky-grouped-table"]],contentQueries:function(e,n,i){e&1&&mt(i,n.rowTpl,ln,5),e&2&&ve()},hostAttrs:[1,"flex","min-h-0","flex-1","flex-col"],inputs:{groups:[1,"groups"],gridCols:[1,"gridCols"],minWidth:[1,"minWidth"],collapsedKeys:[1,"collapsedKeys"],trackBy:[1,"trackBy"]},outputs:{toggle:"toggle"},ngContentSelectors:cn,decls:8,vars:6,consts:[[1,"flex","min-h-0","flex-1","flex-col","overflow-x-auto"],[1,"h-9","shrink-0","items-center"],[1,"min-h-0","flex-1","overflow-y-auto"],[1,"flex","flex-col","gap-3","pb-1"],[1,"group-lid-wrap","sticky","top-0","z-[5]"],[1,"group-lid","cursor-pointer","select-none","rounded-t-lg","border","border-border","px-4","py-2",3,"click"],[1,"flex","items-center","gap-2","text-[13px]","font-semibold","text-surface-foreground"],["name","chevron-right",1,"h-2.5","w-2.5","shrink-0","text-muted-foreground","transition-transform","duration-200",3,"strokeWidth"],[1,"grid","transition-[grid-template-rows]","duration-200","ease-out","motion-reduce:transition-none"],[1,"overflow-hidden"],[1,"overflow-clip","rounded-b-lg","border-x","border-b","border-border"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"h-[3px]","w-[3px]","shrink-0","rounded-full","bg-muted-foreground/40"],[1,"text-[11px]","font-medium","text-text-secondary"]],template:function(e,n){e&1&&(pt(dn),s(0,"div",0)(1,"div",1),Ze(2),a(),s(3,"div",2)(4,"div",3),U(5,_n,12,9,"div",null,pn),a(),Ze(7,1),a()()),e&2&&(r(),J(n.gridCols()),ne("min-width",n.minWidth(),"px"),r(3),ne("min-width",n.minWidth(),"px"),r(),W(n.groups()))},dependencies:[$e,_t],encapsulation:2})};var hn=["canvas"],je=(o,t)=>t.id,xn=(o,t)=>t.title;function vn(o,t){if(o&1){let e=I();s(0,"button",21),x("click",function(){let i=v(e).$implicit,l=p();return b(l.toggleKind(i))}),F(1,"span",22),c(2),a()}if(o&2){let e=t.$implicit,n=p();J(n.view().visible[e]?"border-transparent bg-brand/10 font-medium text-brand-text":"border-border-strong bg-surface text-muted-foreground"),r(),ne("background",n.kindColor[e]),r(),T(" ",n.kindLabel[e]," ")}}function bn(o,t){if(o&1){let e=I();s(0,"div",11)(1,"div",23)(2,"span"),c(3),a(),s(4,"span",24),c(5),a()(),s(6,"input",25),x("ngModelChange",function(i){let l=v(e).$implicit,d=p();return b(d.setFilter(l,i))}),a()()}if(o&2){let e=t.$implicit,n=p();r(3),N(n.kindLabel[e]),r(2),N(n.countOf(e)),r(),Te("!border-brand",n.view().filter[e]),m("placeholder","Filter "+n.kindLabel[e].toLowerCase()+"\u2026")("ngModel",n.view().filter[e]),ct("data-col",e)}}function Cn(o,t){if(o&1&&(s(0,"div",28),c(1),a()),o&2){let e=p();r(),N(e.node.meta)}}function yn(o,t){if(o&1&&(s(0,"div",26)(1,"div",27),c(2),a(),s(3,"div",28),c(4),a(),_(5,Cn,2,1,"div",28),a()),o&2){let e=t;ne("left",e.x,"px")("top",e.y,"px"),r(2),N(e.node.title),r(2),N(e.node.subtitle),r(),h(e.node.meta?5:-1)}}function wn(o,t){o&1&&(s(0,"div",15),c(1,"Loading network\u2026"),a())}function kn(o,t){if(o&1&&(s(0,"app-badge",32),c(1),a()),o&2){let e=p(),n=p();m("tone",n.toneOf(e)),r(),N(e.meta.split(" \xB7 ")[0])}}function Nn(o,t){if(o&1&&(F(0,"br"),c(1)),o&2){let e=p();r(),N(e.meta)}}function Sn(o,t){if(o&1&&c(0),o&2){let e=p().$implicit;T(" \xB7 ",e.meta)}}function Rn(o,t){if(o&1&&(s(0,"div",36),F(1,"span",37),s(2,"div"),c(3),s(4,"div",38),c(5),_(6,Sn,1,1),a()()()),o&2){let e=t.$implicit,n=p(3);r(),ne("background",n.dotColor(e)),r(2),T(" ",e.title," "),r(2),N(e.subtitle),r(),h(e.meta?6:-1)}}function Tn(o,t){if(o&1&&(s(0,"div",29),c(1,"Reachable through"),a(),s(2,"div",35),U(3,Rn,7,5,"div",36,je),a()),o&2){let e=p(2);r(3),W(e.upstream())}}function Mn(o,t){if(o&1&&(s(0,"div",29),c(1,"Reachable through"),a(),s(2,"div",39),c(3),a()),o&2){let e=p();r(3),T("No live path \u2014 ",e.meta)}}function In(o,t){if(o&1&&(s(0,"div",36),F(1,"span",37),s(2,"div"),c(3),s(4,"div",40),c(5),a()()()),o&2){let e=t.$implicit,n=p(3);r(),ne("background",n.dotColor(e)),r(2),N(e.title),r(2),N(e.meta??e.subtitle)}}function An(o,t){if(o&1&&(s(0,"div",40),c(1),a()),o&2){let e=p(3);r(),T("+",e.downstreamResources().length-12," more")}}function En(o,t){if(o&1&&(s(0,"div",29),c(1),a(),s(2,"div",35),U(3,In,6,4,"div",36,je),_(5,An,2,1,"div",40),a()),o&2){let e=p(),n=p();r(),he(" ",e.kind==="user"||e.kind==="group"?"Resources they can reach":"Resources behind it"," \xB7 ",n.downstreamResources().length," "),r(2),W(n.downstreamResources().slice(0,12)),r(2),h(n.downstreamResources().length>12?5:-1)}}function Dn(o,t){if(o&1&&(s(0,"span",42),c(1),a()),o&2){let e=t.$implicit;r(),N(e.title)}}function $n(o,t){if(o&1&&(s(0,"div",29),c(1,"Via groups"),a(),s(2,"div",41),U(3,Dn,2,1,"span",42,je),a()),o&2){let e=p(2);r(3),W(e.viaGroups())}}function Vn(o,t){if(o&1&&(s(0,"span",43),c(1),a()),o&2){let e=t.$implicit;m("title",e.subtitle),r(),he(" ",e.device==="online"?"\u25CF":e.device==="offline"?"\u25CB":"\u25CC"," ",e.title," ")}}function Pn(o,t){if(o&1&&(s(0,"span",44),c(1),a()),o&2){let e=p(3);r(),T("+",e.traceUsers().length-12," more")}}function Gn(o,t){if(o&1&&(s(0,"div",29),c(1),a(),s(2,"div",41),U(3,Vn,2,3,"span",43,je),_(5,Pn,2,1,"span",44),a()),o&2){let e=p(2);r(),T("Who can reach it \xB7 ",e.traceUsers().length),r(2),W(e.traceUsers().slice(0,12)),r(2),h(e.traceUsers().length>12?5:-1)}}function Fn(o,t){if(o&1){let e=I();s(0,"div",34)(1,"app-button",45),x("click",function(){let i=v(e),l=p(2);return b(l.open.emit(i))}),c(2,"Open resource"),a()()}}function On(o,t){if(o&1&&(s(0,"div",29),c(1),a(),s(2,"h3",30)(3,"span",31),c(4),a(),_(5,kn,2,2,"app-badge",32),a(),s(6,"div",33),c(7),_(8,Nn,2,1),a(),_(9,Tn,5,0)(10,Mn,4,1),_(11,En,6,3),_(12,$n,5,0),_(13,Gn,6,2),_(14,Fn,3,0,"div",34)),o&2){let e,n=t,i=p();r(),N(n.kind),r(3),N(n.title),r(),h(n.meta&&n.kind!=="site"?5:-1),r(2),T(" ",n.subtitle," "),r(),h(n.meta?8:-1),r(),h(i.upstream().length?9:n.kind==="resource"?10:-1),r(2),h(i.downstreamResources().length?11:-1),r(),h(i.viaGroups().length&&n.kind!=="group"?12:-1),r(),h(i.traceUsers().length?13:-1),r(),h((e=n.kind==="resource"&&i.resourceOf(n))?14:-1,e)}}function Ln(o,t){if(o&1&&(s(0,"div",36),F(1,"span",37),s(2,"div"),c(3),s(4,"div",40),c(5),a()()()),o&2){let e=t.$implicit,n=p(3);r(),ne("background",n.dotColor(e)),r(2),N(e.title),r(2),N(e.subtitle)}}function Bn(o,t){o&1&&(s(0,"div",29),c(1,"Right now"),a(),s(2,"div",35),U(3,Ln,6,4,"div",36,xn),a()),o&2&&(r(3),W(t))}function Kn(o,t){if(o&1&&(s(0,"div",29),c(1,"Trace"),a(),s(2,"h3",46),c(3,"Nothing selected"),a(),s(4,"p",33),c(5," Click a resource to see which connector and site it is reachable through and who can reach it. Click a user to see everything they can reach. Click a connector or site to see everything behind it. "),a(),_(6,Bn,5,0)),o&2){let e,n=p();r(6),h((e=n.summary())?6:-1,e)}}var at={site:"#6366f1",connector:"#0ea5a4",route:"#64748b",resource:"#d97706",group:"#7c3aed",user:"#2563eb"},We=class o{data=Z(null);open=le();kinds=_e;kindLabel=Wt;kindColor=at;canvasRef=Me.required("canvas");destroyRef=V(dt);view=w(Ht());loading=R(()=>this.data()===null);graph=R(()=>zt(this.data()??{network:null,resources:[],status:null,users:[],groups:[],accounts:[]}));shown=R(()=>rt(this.graph(),this.view()));shownKinds=R(()=>[...this.shown().columns.keys()]);hover=w(null);tip=w(null);selectedNode=R(()=>{let t=this.view().selected;return t?this.graph().byId.get(t)??null:null});traceNodes=R(()=>{let t=this.shown().trace,e=this.view().selected;return t?[...t.nodes].filter(n=>n!==e).map(n=>this.graph().byId.get(n)):[]});upstream=R(()=>this.traceNodes().filter(t=>["site","connector","route"].includes(t.kind)).sort((t,e)=>_e.indexOf(t.kind)-_e.indexOf(e.kind)));downstreamResources=R(()=>this.traceNodes().filter(t=>t.kind==="resource"));viaGroups=R(()=>this.traceNodes().filter(t=>t.kind==="group"));traceUsers=R(()=>this.traceNodes().filter(t=>t.kind==="user"));summary=R(()=>{let t=this.graph();if(!this.data())return null;let e=[];for(let g of t.nodes.filter(C=>C.kind==="site"&&!C.ghost)){let C=t.nodes.filter(A=>A.kind==="connector"&&A.ref?.siteId===g.ref?.siteId),S=C.filter(A=>A.state==="ok").length;e.push({title:g.title,subtitle:`${S}/${C.length} connector${C.length===1?"":"s"} online`,state:g.state})}let n=t.nodes.filter(g=>g.kind==="resource"&&(g.state==="warn"||g.state==="off"));n.length&&e.push({title:`${n.length} blocked resource${n.length===1?"":"s"}`,subtitle:n.map(g=>`${g.title} (${(g.meta??"").toLowerCase()})`).join(" \xB7 "),state:"warn"});let i=t.nodes.filter(g=>g.kind==="user"),l=i.filter(g=>g.device==="online").length,d=i.filter(g=>g.device!=="none").length;return e.push({title:`${d} user${d===1?"":"s"} enrolled \xB7 ${l} online`,subtitle:`${i.length-d} never connected`,state:"idle"}),e});width=0;height=0;raf=0;t0=0;reduceMotion=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;constructor(){ce(()=>{this.shown(),this.relayout()}),ce(()=>{this.hover(),this.paint()})}ngAfterViewInit(){let t=new ResizeObserver(()=>this.relayout());t.observe(this.canvasRef().nativeElement),this.destroyRef.onDestroy(()=>{t.disconnect(),cancelAnimationFrame(this.raf)}),this.relayout()}toggleKind(t){this.view.update(e=>re(ie({},e),{visible:re(ie({},e.visible),{[t]:!e.visible[t]})}))}setFocus(t){this.view.update(e=>re(ie({},e),{focus:t}))}setEveryone(t){this.view.update(e=>re(ie({},e),{everyone:t}))}setFilter(t,e){this.view.update(n=>re(ie({},n),{filter:re(ie({},n.filter),{[t]:e})}))}countOf(t){return this.graph().nodes.filter(e=>e.kind===t).length}resourceOf(t){return this.data()?.resources.find(e=>e.resourceId===t.ref?.resourceId)??null}toneOf(t){switch(t.state){case"ok":return"green";case"warn":return"amber";case"off":return"red";default:return"gray"}}dotColor(t){return`var(${this.stateVar(t.state)})`}stateVar(t){switch(t){case"ok":return"--dot-active";case"warn":return"--dot-expiring";case"off":return"--danger";default:return"--placeholder"}}canvasPoint(t){let e=this.canvasRef().nativeElement.getBoundingClientRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}onMove(t){let e=this.canvasPoint(t),n=st(this.shown(),e.x,e.y);this.canvasRef().nativeElement.style.cursor=n?"pointer":"default",n!==this.hover()&&this.hover.set(n);let i=this.canvasRef().nativeElement.offsetTop;this.tip.set(n&&!n.bucket?{node:n,x:Math.min(e.x+14,this.width-270),y:e.y+i+14}:null)}onLeave(){this.hover.set(null),this.tip.set(null)}onClick(t){let e=this.canvasPoint(t),n=st(this.shown(),e.x,e.y);if(n?.bucket){this.canvasRef().nativeElement.parentElement?.querySelector(`input[data-col="${n.kind}"]`)?.focus();return}this.t0=performance.now(),this.view.update(i=>re(ie({},i),{selected:n?.id??null}))}relayout(){let t=this.canvasRef?.().nativeElement;if(!t)return;let e=t.getBoundingClientRect();this.width=e.width,this.height=e.height;let n=window.devicePixelRatio||1;t.width=Math.max(1,Math.round(this.width*n)),t.height=Math.max(1,Math.round(this.height*n)),qt(this.graph(),this.shown(),this.width,this.height),this.paint()}css(t){return getComputedStyle(document.documentElement).getPropertyValue(t).trim()}paint=()=>{cancelAnimationFrame(this.raf);let t=this.canvasRef?.().nativeElement;if(!t||!this.width)return;let e=t.getContext("2d");if(!e)return;let n=performance.now(),i=window.devicePixelRatio||1;e.setTransform(i,0,0,i,0,0),e.clearRect(0,0,this.width,this.height);let l=this.graph(),d=this.shown(),g=[...d.columns.keys()],C=(this.width-56)/Math.max(g.length,1),S=this.css("--brand");g.forEach((E,f)=>{f%2&&(e.fillStyle=S,e.globalAlpha=.045,e.fillRect(28+C*f,0,C,this.height),e.globalAlpha=1)});let A=this.view().selected,D=this.hover(),j=d.trace??(D&&!D.bucket?rt(l,re(ie({},this.view()),{selected:D.id})).trace:null),B=this.css("--border-strong")||"#c4c9d0",ee=this.css("--brand"),q=this.css("--danger"),L=this.css("--font-sans")||"sans-serif",H=this.css("--font-mono")||"monospace",X=E=>d.drawn.has(E)?l.byId.get(E):d.bucketOf.get(E),u=new Set;l.edges.forEach((E,f)=>{let O=X(E.from),P=X(E.to);if(!O||!P)return;let Q=!!j?.edges.has(f);if(O.bucket||P.bucket){let $=`${O.id}>${P.id}${Q?"!":""}`;if(u.has($))return;u.add($)}e.globalAlpha=j?Q?1:.12:1,e.lineWidth=Q?2.2:1.2,e.strokeStyle=E.kind==="blocked"?q:Q?ee:B,e.setLineDash(E.kind==="declared"?[5,4]:Q&&!this.reduceMotion?[10,6]:[]),e.lineDashOffset=Q&&!this.reduceMotion&&E.kind!=="declared"?-((n-this.t0)/40)%16:0;let ue=O.x+O.w/2,k=P.x-P.w/2,G=(ue+k)/2;e.beginPath(),e.moveTo(ue,O.y),e.bezierCurveTo(G,O.y,G,P.y,k,P.y),e.stroke()}),e.setLineDash([]);let y=this.css("--popover-bg")||"#fff",M=this.css("--muted"),z=this.css("--border-strong"),te=this.css("--surface-foreground"),K=this.css("--muted-foreground");for(let E of d.columns.values())for(let f of E){let O=!j||j.nodes.has(f.id)||!!f.bucket?.some(G=>j.nodes.has(G));e.globalAlpha=O?1:.18;let P=f.x-f.w/2,Q=f.y-f.h/2,ue=f.kind==="user"?17:8;if(e.fillStyle=y,e.beginPath(),e.roundRect(P,Q,f.w,f.h,ue),e.fill(),f.ghost&&(e.fillStyle=M,e.fill()),e.strokeStyle=A===f.id?ee:f.ghost?z:at[f.kind],e.lineWidth=A===f.id?2.5:D?.id===f.id?2:1.3,e.setLineDash(f.ghost?[4,3]:[]),e.stroke(),e.setLineDash([]),A===f.id&&(e.save(),e.globalAlpha=.25,e.strokeStyle=ee,e.lineWidth=6,e.beginPath(),e.roundRect(P-3,Q-3,f.w+6,f.h+6,ue+3),e.stroke(),e.restore()),f.bucket){e.textAlign="center",e.textBaseline="alphabetic",e.fillStyle=K,e.font=`600 12px ${L}`,e.fillText(f.title,f.x,f.y-1),e.font=`11px ${L}`,e.fillText(f.subtitle,f.x,f.y+13);continue}!f.ghost&&f.kind!=="user"&&(e.fillStyle=at[f.kind],e.beginPath(),e.roundRect(P,Q+8,3,f.h-16,2),e.fill());let k=f.kind==="user"?f.device:f.state;k&&(e.beginPath(),e.arc(P+f.w-11,Q+11,3.5,0,Math.PI*2),k==="none"?(e.strokeStyle=this.css("--placeholder"),e.lineWidth=1.2,e.setLineDash([2,2]),e.stroke(),e.setLineDash([])):k==="offline"?(e.strokeStyle=this.css("--placeholder"),e.lineWidth=1.4,e.stroke()):(e.fillStyle=this.css(k==="online"?"--dot-active":this.stateVar(k)),e.fill())),e.textAlign="left",e.textBaseline="alphabetic",e.fillStyle=te,e.font=f.kind==="route"?`500 11.5px ${H}`:`600 12.5px ${L}`,e.fillText(Xt(e,f.title,f.w-30),P+12,f.y+(f.subtitle?-1:4)),f.subtitle&&(e.fillStyle=K,e.font=`11px ${L}`,e.fillText(Xt(e,f.subtitle,f.w-24),P+12,f.y+13))}e.globalAlpha=1,j&&!this.reduceMotion&&(this.raf=requestAnimationFrame(this.paint))};static \u0275fac=function(e){return new(e||o)};static \u0275cmp=se({type:o,selectors:[["app-network-map"]],viewQuery:function(e,n){e&1&&Re(n.canvasRef,hn,5),e&2&&ve()},hostAttrs:[1,"flex","min-h-0","flex-1","flex-col","gap-3"],inputs:{data:[1,"data"]},outputs:{open:"open"},decls:38,vars:7,consts:[["canvas",""],[1,"flex","flex-wrap","items-center","gap-2","text-xs"],[1,"text-text-secondary"],["type","button",1,"inline-flex","h-6","items-center","gap-1.5","rounded-full","border","px-2.5","text-xs","transition-colors",3,"class"],[1,"mx-1","h-4","w-px","bg-border"],[1,"inline-flex","items-center","gap-1.5","text-muted-foreground"],["ariaLabel","Focus on selection",3,"checkedChange","checked"],["ariaLabel","Show all users",3,"checkedChange","checked"],[1,"grid","min-h-0","flex-1","gap-3",2,"grid-template-columns","minmax(0, 1fr) 320px"],[1,"relative","flex","min-h-[360px]","flex-col","overflow-hidden","rounded-xl","border","border-border","bg-surface"],[1,"grid","gap-2","px-7","pt-2.5"],[1,"flex","min-w-0","flex-col","gap-1"],["role","img","aria-label","Network trace map",1,"block","h-0","min-h-0","w-full","flex-1",3,"mousemove","mouseleave","click"],[1,"pointer-events-none","absolute","z-10","max-w-[260px]","rounded-lg","border","border-border-strong","bg-popover","px-2.5","py-1.5","text-xs","shadow-lg",3,"left","top"],[1,"pointer-events-none","absolute","bottom-2","left-3","text-[11px]","text-text-secondary"],[1,"absolute","inset-0","flex","items-center","justify-center","bg-surface/60","text-sm","text-muted-foreground"],[1,"flex","min-h-0","flex-col","gap-3","overflow-y-auto","rounded-xl","border","border-border","bg-surface","p-4"],[1,"flex","flex-wrap","gap-x-4","gap-y-1","text-xs","text-muted-foreground"],[1,"mr-1","inline-block","w-4","border-t-2","border-border-strong","align-middle"],[1,"mr-1","inline-block","w-4","border-t-2","border-dashed","border-border-strong","align-middle"],[1,"mr-1","inline-block","w-4","border-t-2","border-danger","align-middle"],["type","button",1,"inline-flex","h-6","items-center","gap-1.5","rounded-full","border","px-2.5","text-xs","transition-colors",3,"click"],[1,"inline-block","h-2","w-2","rounded-full"],[1,"flex","justify-between","text-[10.5px]","font-medium","text-text-secondary"],[1,"font-medium","text-muted-foreground"],[1,"ui-input","h-7","!rounded-md","!py-0","text-xs",3,"ngModelChange","placeholder","ngModel"],[1,"pointer-events-none","absolute","z-10","max-w-[260px]","rounded-lg","border","border-border-strong","bg-popover","px-2.5","py-1.5","text-xs","shadow-lg"],[1,"font-semibold","text-surface-foreground"],[1,"text-muted-foreground"],[1,"ui-microlabel","text-brand-text"],[1,"flex","flex-wrap","items-center","gap-2","text-[15px]","font-semibold","text-surface-foreground"],[1,"break-all"],[3,"tone"],[1,"text-[13px]","text-muted-foreground"],[1,"mt-auto","flex","gap-2","pt-2"],[1,"ml-1","grid","gap-2","border-l-2","border-brand/20","pl-3"],[1,"grid","grid-cols-[auto_1fr]","items-start","gap-2","text-[13px]"],[1,"mt-1.5","h-2.5","w-2.5","rounded-full"],[1,"break-all","text-xs","text-muted-foreground"],[1,"ml-1","border-l-2","border-brand/20","pl-3","text-[13px]","text-danger"],[1,"text-xs","text-muted-foreground"],[1,"flex","flex-wrap","gap-1.5"],[1,"rounded-md","border","border-border-strong","px-2","py-0.5","text-xs"],[1,"rounded-md","border","border-border-strong","px-2","py-0.5","text-xs",3,"title"],[1,"rounded-md","border","border-dashed","border-border-strong","px-2","py-0.5","text-xs"],["size","md",3,"click"],[1,"text-[15px]","font-semibold","text-surface-foreground"]],template:function(e,n){if(e&1){let i=I();s(0,"div",1)(1,"span",2),c(2,"Show"),a(),U(3,vn,3,5,"button",3,Je),F(5,"span",4),s(6,"label",5)(7,"app-toggle",6),x("checkedChange",function(d){return v(i),b(n.setFocus(d))}),a(),c(8," Focus on selection "),a(),s(9,"label",5)(10,"app-toggle",7),x("checkedChange",function(d){return v(i),b(n.setEveryone(d))}),a(),c(11," All users "),a()(),s(12,"div",8)(13,"div",9)(14,"div",10),U(15,bn,7,7,"div",11,Je),a(),s(17,"canvas",12,0),x("mousemove",function(d){return v(i),b(n.onMove(d))})("mouseleave",function(){return v(i),b(n.onLeave())})("click",function(d){return v(i),b(n.onClick(d))}),a(),_(19,yn,6,7,"div",13),s(20,"div",14),c(21," Click a node to trace \xB7 click empty space to clear \xB7 hover for details "),a(),_(22,wn,2,0,"div",15),a(),s(23,"aside",16),_(24,On,15,10)(25,Kn,7,1),a()(),s(26,"div",17)(27,"span"),F(28,"i",18),c(29,"relationship"),a(),s(30,"span"),F(31,"i",19),c(32,"declared in config, not live"),a(),s(33,"span"),F(34,"i",20),c(35,"blocked"),a(),s(36,"span"),c(37,"\u25CF online \xA0 \u25CB enrolled, offline \xA0 \u25CC never connected"),a()()}if(e&2){let i,l;r(3),W(n.kinds),r(4),m("checked",n.view().focus),r(3),m("checked",n.view().everyone),r(4),ne("grid-template-columns","repeat("+n.shownKinds().length+", minmax(0, 1fr))"),r(),W(n.shownKinds()),r(4),h((i=n.tip())?19:-1,i),r(3),h(n.loading()?22:-1),r(2),h((l=n.selectedNode())?24:25,l)}},dependencies:[ye,Pe,be,Ce,Ve,fe,It],encapsulation:2})};function Xt(o,t,e){if(o.measureText(t).width<=e)return t;for(;t.length&&o.measureText(t+"\u2026").width>e;)t=t.slice(0,-1);return t+"\u2026"}var Un=(o,t)=>t.label,Wn=(o,t)=>t.accountNumber;function jn(o,t){if(o&1&&(s(0,"app-field",3),F(1,"input",20),a()),o&2){let e=p();r(),m("ngModel",e.accountNumber())}}function zn(o,t){if(o&1&&(s(0,"option",25),c(1),a()),o&2){let e=t.$implicit;m("value",e.accountNumber)("disabled",e.disabled),r(),T(" ",e.label," ")}}function Hn(o,t){if(o&1&&(s(0,"optgroup",23),U(1,zn,2,3,"option",25,Wn),a()),o&2){let e=t.$implicit;m("label",e.label),r(),W(e.accounts)}}function qn(o,t){if(o&1&&(s(0,"p",26),F(1,"span",27),s(2,"span"),c(3),a()()),o&2){let e=t;J(e.tone),r(3),N(e.text)}}function Qn(o,t){if(o&1){let e=I();s(0,"app-field",21)(1,"select",2),x("ngModelChange",function(i){v(e);let l=p();return b(l.accountNumber.set(i))}),s(2,"option",22),c(3,"Select an account\u2026"),a(),U(4,Hn,3,1,"optgroup",23,Un),a()(),_(6,qn,4,3,"p",24)}if(o&2){let e,n=p();r(),m("ngModel",n.accountNumber()),r(3),W(n.accountGroups()),r(2),h((e=n.accountNote())?6:-1,e)}}function Xn(o,t){if(o&1&&(s(0,"p",28),c(1),a()),o&2){let e=t;J(e.tone),r(),N(e.text)}}function Yn(o,t){if(o&1){let e=I();s(0,"app-field",13)(1,"input",29),x("ngModelChange",function(i){v(e);let l=p();return b(l.sshUser.set(i))}),a()()}if(o&2){let e=p();r(),m("ngModel",e.sshUser())}}function Jn(o,t){if(o&1&&(s(0,"p",28),c(1),a()),o&2){let e=t;J(e.tone),r(),N(e.text)}}var ze=class o{api=V(de);adminApi=V(ge);toast=V(me);store=V(ke);resource=Z(null);saved=le();accounts=w(null);name=w("");accountNumber=w("");type=w("DATABASE");cidr=w("");ports=w("");dnsName=w("");sshUser=w("");securityGroupId=w("");description=w("");busy=w(!1);error=w("");portsHint=R(()=>this.type()==="WEB"?'\u2014 comma-separated, up to 10. Include 80/443 or "Open in browser" will be blocked.':"\u2014 comma-separated, up to 10, e.g. 5432");accountGroups=R(()=>{let t=this.store.index(),e=this.accounts()??[],n=[],i=(d,g=!1)=>{let C=t.loaded?t.connectorState(d.accountNumber).label.toLowerCase():"",S=t.connectorOf(d.accountNumber),A=S?.approvedRoutes.length?` \xB7 ${S.approvedRoutes.join(", ")}`:"",D=d.name?`${d.name} \xB7 ${d.accountNumber}`:d.accountNumber;return{accountNumber:d.accountNumber,label:C?`${D} \u2014 ${C}${A}`:D,disabled:g}};for(let d of t.sites){let g=e.filter(C=>d.accounts.includes(C.accountNumber));g.length&&n.push({label:`${t.siteName(d)} (${d.id})`,accounts:g.map(C=>i(C))})}let l=e.filter(d=>!t.siteOf(d.accountNumber));return l.length&&(!t.loaded||l.length<=50)&&n.push({label:t.loaded?"Not on the network":"Accounts",accounts:l.map(d=>i(d,t.loaded))}),n});accountNote=R(()=>{let t=this.store.index(),e=this.accountNumber();if(!e||!t.loaded||this.resource())return null;let n=t.connectorOf(e),i=t.connectorState(e),l=i.tone==="green"?"text-success":i.tone==="red"?"text-danger":"text-warning";if(!n)return{tone:l,text:"This account is in no site \u2014 add it to network.sites in config/project.ts before registering resources here."};let d=t.siteOf(e),g=Object.keys(d?.splitDns??{}),C=[n.node?`${n.node.name} ${n.online?"online":"offline"}`:n.vpcs.length?"no connector enrolled yet (declared in config \u2014 deploy ConnectorStack)":"no connector enrolled",n.approvedRoutes.length?`routes ${n.approvedRoutes.join(", ")}`:"",n.vpcs.map(Ke).join(", "),g.length?`split DNS ${g.join(", ")}`:"no split DNS"].filter(Boolean);return{tone:l,text:`${t.siteName(d)}: ${C.join(" \xB7 ")}`}});cidrNote=R(()=>this.noteOf(this.store.index().cidrCheck(this.accountNumber(),this.cidr())));dnsNote=R(()=>this.noteOf(this.store.index().dnsCheck(this.accountNumber(),this.dnsName())));noteOf(t){return t.text?{tone:t.ok===!0?"text-success":t.ok===!1?"text-warning":"text-muted-foreground",text:`${t.ok===!0?"\u2713":t.ok===!1?"\u26A0":"\u2139"} ${t.text}`}:null}canSave=R(()=>!!this.name().trim()&&!!this.accountNumber()&&!!this.cidr().trim()&&!!this.ports().trim());ngOnInit(){let t=this.resource();t?(this.name.set(t.name),this.accountNumber.set(t.accountNumber),this.type.set(t.type),this.cidr.set(t.cidr),this.ports.set(t.ports.join(", ")),this.dnsName.set(t.dnsName??""),this.sshUser.set(t.sshUser??""),this.securityGroupId.set(t.securityGroupId??""),this.description.set(t.description??"")):this.adminApi.listAccounts().subscribe({next:e=>this.accounts.set(e),error:()=>this.accounts.set([])})}save(){let t=this.ports().split(",").map(l=>l.trim()).filter(Boolean).map(Number);if(t.some(l=>!Number.isInteger(l)||l<1||l>65535)){this.error.set("Ports must be whole numbers between 1 and 65535.");return}this.error.set(""),this.busy.set(!0);let e={name:this.name().trim(),type:this.type(),cidr:this.cidr().trim(),ports:t,dnsName:this.dnsName().trim()||void 0,sshUser:this.type()==="HOST"&&this.sshUser().trim()||void 0,securityGroupId:this.resource()?this.securityGroupId().trim():this.securityGroupId().trim()||void 0,description:this.description().trim()||void 0},n=this.resource();(n?this.api.update(n.resourceId,e):this.api.create(this.accountNumber(),e)).subscribe({next:()=>{this.busy.set(!1),this.toast.success(n?"Resource updated":`Registered ${e.name}`),this.saved.emit()},error:l=>{this.busy.set(!1),this.error.set(oe(l,"Could not save the resource."))}})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=se({type:o,selectors:[["app-resource-form"]],inputs:{resource:[1,"resource"]},outputs:{saved:"saved"},decls:26,vars:13,consts:[[1,"space-y-5"],["label","Name","hint","what users see, e.g. staging-db"],[1,"ui-input",3,"ngModelChange","ngModel"],["label","Account","hint","fixed; move a resource by re-registering it"],["label","Type"],["value","DATABASE"],["value","WEB"],["value","HOST"],["label","Private IP or range","hint","e.g. 10.0.1.25, or a subnet like 10.0.1.0/24 so a database that moves IPs (Aurora failover) stays reachable. Ranges up to /16 are accepted."],["placeholder","10.0.1.0/24",1,"ui-input",3,"ngModelChange","ngModel"],[1,"-mt-2","text-xs",3,"class"],["label","Ports",3,"hint"],["placeholder","5432",1,"ui-input",3,"ngModelChange","ngModel"],["label","SSH user","hint","optional, e.g. ec2-user; the card then offers 'ssh user@host'"],["label","DNS name","hint","optional; shown to users as the address to connect to. Internal names need the VPN's split DNS; public names that resolve to private IPs (e.g. RDS endpoints) work as-is \u2014 the network sync follows their current IP."],["placeholder","db.testbed.internal",1,"ui-input",3,"ngModelChange","ngModel"],["label","Security group ID","hint","the resource's security group; the network sync keeps the VPN connector allowed in it"],["placeholder","sg-0123456789abcdef0",1,"ui-input",3,"ngModelChange","ngModel"],["label","Connection instructions","hint","optional; shown to granted users",3,"error"],["rows","3","maxlength","1000","placeholder","e.g. psql -h db.testbed.internal -p 5432 -U readonly",1,"ui-input",3,"ngModelChange","ngModel"],["disabled","",1,"ui-input",3,"ngModel"],["label","Account","hint","which account/VPC it lives in (its connector)"],["value","","disabled",""],[3,"label"],[1,"-mt-2","flex","items-start","gap-1.5","text-xs",3,"class"],[3,"value","disabled"],[1,"-mt-2","flex","items-start","gap-1.5","text-xs"],[1,"mt-[5px]","h-1.5","w-1.5","shrink-0","rounded-full","bg-current"],[1,"-mt-2","text-xs"],["placeholder","ec2-user",1,"ui-input",3,"ngModelChange","ngModel"]],template:function(e,n){if(e&1&&(s(0,"div",0)(1,"app-field",1)(2,"input",2),x("ngModelChange",function(l){return n.name.set(l)}),a()(),_(3,jn,2,1,"app-field",3)(4,Qn,7,2),s(5,"app-field",4)(6,"select",2),x("ngModelChange",function(l){return n.type.set(l)}),s(7,"option",5),c(8,"Database"),a(),s(9,"option",6),c(10,"Web server"),a(),s(11,"option",7),c(12,"Host (EC2 / other)"),a()()(),s(13,"app-field",8)(14,"input",9),x("ngModelChange",function(l){return n.cidr.set(l)}),a()(),_(15,Xn,2,3,"p",10),s(16,"app-field",11)(17,"input",12),x("ngModelChange",function(l){return n.ports.set(l)}),a()(),_(18,Yn,2,1,"app-field",13),s(19,"app-field",14)(20,"input",15),x("ngModelChange",function(l){return n.dnsName.set(l)}),a()(),_(21,Jn,2,3,"p",10),s(22,"app-field",16)(23,"input",17),x("ngModelChange",function(l){return n.securityGroupId.set(l)}),a()(),s(24,"app-field",18)(25,"textarea",19),x("ngModelChange",function(l){return n.description.set(l)}),a()()()),e&2){let i,l;r(2),m("ngModel",n.name()),r(),h(n.resource()?3:4),r(3),m("ngModel",n.type()),r(8),m("ngModel",n.cidr()),r(),h((i=n.cidrNote())?15:-1,i),r(),m("hint",n.portsHint()),r(),m("ngModel",n.ports()),r(),h(n.type()==="HOST"?18:-1),r(2),m("ngModel",n.dnsName()),r(),h((l=n.dnsNote())?21:-1,l),r(2),m("ngModel",n.securityGroupId()),r(),m("error",n.error()),r(),m("ngModel",n.description())}},dependencies:[ye,Fe,Oe,Pe,Ge,be,vt,Ce,bt],encapsulation:2})};var Zn=(o,t)=>t.resourceId;function eo(o,t){if(o&1&&(s(0,"strong"),c(1),a(),c(2)),o&2){let e=t.$implicit,n=t.$index,i=t.$count;r(),N(e.name),r(),T("",n===i-1?"":", "," ")}}function to(o,t){if(o&1&&c(0),o&2){let e=p();T(" and every grant on ",e.resources().length===1?"it":"them"," is revoked. ")}}function no(o,t){o&1&&c(0," \u2014 nobody currently has access. ")}function oo(o,t){if(o&1&&(c(0," and "),s(1,"strong"),c(2),a(),c(3)),o&2){let e=p();r(2),N(e.granteeCount()),r(),T(" ",e.granteeCount()===1?"grant is":"grants are"," revoked (network access closes within about 5 minutes). ")}}function io(o,t){if(o&1&&(s(0,"p",2),c(1),a()),o&2){let e=p();r(),T(" ",e.error()," ")}}var He=class o{api=V(de);toast=V(me);resources=Z.required();deleted=le();closed=le();granteeCount=w(null);busy=w(!1);error=w("");ngOnInit(){Se(this.resources().map(t=>this.api.listGrantees(t.resourceId))).subscribe({next:t=>this.granteeCount.set(t.reduce((e,n)=>e+n.length,0)),error:()=>this.granteeCount.set(null)})}confirm(){this.error.set(""),this.busy.set(!0),Se(this.resources().map(t=>this.api.delete(t.resourceId))).subscribe({next:()=>{this.busy.set(!1),this.toast.success(this.resources().length===1?`Deleted ${this.resources()[0].name}`:`Deleted ${this.resources().length} resources`),this.deleted.emit()},error:t=>{this.busy.set(!1),this.error.set(oe(t,"Could not delete every resource \u2014 reopen to see the current state."))}})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=se({type:o,selectors:[["app-resources-delete-dialog"]],inputs:{resources:[1,"resources"]},outputs:{deleted:"deleted",closed:"closed"},decls:14,vars:6,consts:[[3,"closed","title"],[1,"rounded-lg","bg-danger-muted","p-3","text-sm","text-danger","ring-1","ring-danger/20"],[1,"mt-3","rounded-lg","bg-danger-muted","p-3","text-sm","text-danger","ring-1","ring-danger/20"],[1,"mt-5","flex","justify-end","gap-2"],["variant","outline",3,"click"],["variant","danger",3,"click","loading"]],template:function(e,n){e&1&&(s(0,"app-dialog",0),x("closed",function(){return n.closed.emit()}),s(1,"div",1),U(2,eo,3,2,null,null,Zn),c(4),_(5,to,1,1)(6,no,1,0)(7,oo,4,2),a(),_(8,io,2,1,"p",2),s(9,"div",3)(10,"app-button",4),x("click",function(){return n.closed.emit()}),c(11,"Cancel"),a(),s(12,"app-button",5),x("click",function(){return n.confirm()}),c(13),a()()()),e&2&&(m("title",n.resources().length===1?"Delete this resource?":"Delete "+n.resources().length+" resources?"),r(2),W(n.resources()),r(2),T(" ",n.resources().length===1?"is":"are"," removed from the catalog "),r(),h(n.granteeCount()===null?5:n.granteeCount()===0?6:7),r(3),h(n.error()?8:-1),r(4),m("loading",n.busy()),r(),T(" Delete ",n.resources().length===1?"resource":"resources"," "))},dependencies:[xt,fe],encapsulation:2})};var ro=o=>({target:o});function so(o,t){if(o&1&&(s(0,"p",0),c(1),a()),o&2){let e=p();r(),N(e.error())}}function ao(o,t){o&1&&(s(0,"p",7),c(1,"Loading\u2026"),a())}function lo(o,t){if(o&1){let e=I();s(0,"app-access-list",15),x("action",function(i){v(e);let l=p();return b(l.removeFromGroup(i))}),a()}if(o&2){let e=p();m("rows",e.groupRows())}}function co(o,t){o&1&&(s(0,"p",7),c(1,"Loading\u2026"),a())}function uo(o,t){if(o&1){let e=I();s(0,"app-access-list",16),x("action",function(i){v(e);let l=p();return b(l.revoke(i))}),a()}if(o&2){let e=p();m("rows",e.userRows())}}function po(o,t){if(o&1){let e=I();s(0,"app-grant-dialog",17),x("granted",function(i){v(e);let l=p();return b(l.grantUsers(i.ids,i.durationHours))})("closed",function(){v(e);let i=p();return b(i.grantingUsers.set(!1))}),a()}if(o&2){let e=p();m("intro",e.resource().name+" \u2014 changes reach the network within about 5 minutes.")("options",e.userOptions())("busy",e.busy())}}function mo(o,t){if(o&1){let e=I();s(0,"app-grant-dialog",18),x("granted",function(i){v(e);let l=p();return b(l.grantGroups(i.ids))})("closed",function(){v(e);let i=p();return b(i.grantingGroups.set(!1))}),a()}if(o&2){let e=p();m("options",e.groupOptions())("busy",e.busy())}}var qe=class o{api=V(de);adminApi=V(ge);groupsApi=V(Le);toast=V(me);resource=Z.required();changed=le();grantees=w(null);users=w([]);groups=w(null);busy=w(!1);error=w("");grantingUsers=w(!1);grantingGroups=w(!1);groupName(t){return this.groups()?.find(e=>e.groupId===t)?.name??"a group"}bundles(t){return(t.resources??[]).some(e=>e.resourceId===this.resource().resourceId)}groupRows=R(()=>(this.groups()??[]).filter(t=>this.bundles(t)).map(t=>({id:t.groupId,title:t.name,subtitle:`${t.members.length} member${t.members.length===1?"":"s"}`,pillClass:"bg-muted text-muted-foreground",badges:[],action:{label:"Remove",disabled:this.busy()}})));userRows=R(()=>(this.grantees()??[]).map(t=>{let e=t.viaGroups??(t.viaGroup?[t.viaGroup]:[]),n=t.direct??!t.viaGroup,i=e.map(l=>({text:`via ${this.groupName(l)}`,tone:"gray",title:`Granted through the group ${this.groupName(l)} \u2014 remove them from the group, or the resource from the group, to end that`}));return n&&i.unshift(t.expiresAt?{text:`direct \xB7 expires ${Ct(t.expiresAt)}`,tone:"amber",title:"Direct grant, temporary"}:{text:"direct \xB7 long-term",tone:"gray",title:"Direct grant, long-term"}),{id:t.userId,title:t.email||t.userId,badges:i,action:n?{label:"Revoke",disabled:this.busy()}:void 0}}));userOptions=R(()=>{let t=new Set((this.grantees()??[]).filter(e=>e.direct??!e.viaGroup).map(e=>e.userId));return this.users().filter(e=>!t.has(e.userId)).map(e=>({id:e.userId,label:e.email||e.userId}))});groupOptions=R(()=>(this.groups()??[]).filter(t=>!this.bundles(t)).map(t=>({id:t.groupId,label:t.name,sublabel:`${t.members.length} member${t.members.length===1?"":"s"}`})));constructor(){ce(()=>{let t=this.resource().resourceId;gt(()=>{t!==this.loadedKey&&(this.loadedKey=t,this.grantees.set(null),this.error.set(""),this.reload())})})}loadedKey=null;ngOnInit(){this.reloadGroups(),this.adminApi.listUsers().subscribe({next:t=>this.users.set(t),error:()=>this.users.set([])})}reload(){this.api.listGrantees(this.resource().resourceId).subscribe({next:t=>this.grantees.set(t),error:t=>{this.grantees.set([]),this.error.set(oe(t,"Could not load who has access."))}})}reloadGroups(){this.groupsApi.list().subscribe({next:t=>this.groups.set(t),error:()=>this.groups.set([])})}done(t){this.busy.set(!1),this.toast.success(t),this.reload(),this.reloadGroups(),this.changed.emit()}fail(t,e){this.busy.set(!1),this.error.set(oe(t,e))}grantUsers(t,e){if(!t.length)return;this.error.set(""),this.busy.set(!0);let n=t.length,i=0,l=()=>{this.grantingUsers.set(!1),i?(this.fail(null,`${i} of ${t.length} grants failed \u2014 see who has access below.`),this.reload(),this.changed.emit()):this.done(`Granted ${t.length} ${t.length===1?"user":"users"}`)};for(let d of t)this.api.grant(this.resource().resourceId,d,e).subscribe({next:()=>{--n===0&&l()},error:()=>{i++,--n===0&&l()}})}revoke(t){this.error.set(""),this.busy.set(!0);let e=this.grantees()?.find(n=>n.userId===t)?.email;this.api.revoke(this.resource().resourceId,t).subscribe({next:()=>this.done(`Revoked ${e||t}`),error:n=>this.fail(n,"Could not revoke access.")})}grantGroups(t){let e=(this.groups()??[]).filter(i=>t.includes(i.groupId));if(!e.length)return;this.grantingGroups.set(!1);let n=i=>{if(i>=e.length)return this.done(`Granted to ${e.length} group${e.length===1?"":"s"}`);this.busy.set(!0);let l=e[i];this.groupsApi.update(l.groupId,{resources:[...(l.resources??[]).map(d=>d.resourceId),this.resource().resourceId]}).subscribe({next:()=>n(i+1),error:d=>this.fail(d,`Could not update ${l.name}.`)})};n(0)}removeFromGroup(t){let e=this.groups()?.find(n=>n.groupId===t);e&&(this.error.set(""),this.busy.set(!0),this.groupsApi.update(e.groupId,{resources:(e.resources??[]).map(n=>n.resourceId).filter(n=>n!==this.resource().resourceId)}).subscribe({next:()=>this.done(`Removed from ${e.name}`),error:n=>this.fail(n,"Could not update the group.")}))}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=se({type:o,selectors:[["app-resource-users"]],inputs:{resource:[1,"resource"]},outputs:{changed:"changed"},decls:28,vars:9,consts:[[1,"mb-3","rounded-lg","bg-danger-muted","p-3","text-xs","text-danger","ring-1","ring-danger/20"],[1,"-mt-1","mb-2","flex","justify-end"],["routerLink","/admin/activity",1,"inline-flex","shrink-0","items-center","gap-1","text-xs","font-medium","text-brand-text","hover:underline",3,"queryParams"],[1,"flex","items-center","justify-between","gap-3"],[1,"min-w-0","text-sm","font-semibold","text-surface-foreground"],["size","sm","variant","secondary",3,"click","disabled"],[1,"mt-3"],[1,"py-2","text-xs","text-muted-foreground"],["empty","No group bundles this resource yet.",3,"rows"],[1,"mt-2","text-xs","text-muted-foreground"],[1,"mt-5","border-t","border-border","pt-4"],["size","sm","variant","secondary",3,"click"],["empty","Nobody has access yet.",3,"rows"],["title","Grant users","placeholder","Filter by email","emptyText","Everyone already has access.","withDuration","",3,"intro","options","busy"],["title","Grant to groups","intro","Every member of a picked group can reach it, long-term, for as long as they are a member.","placeholder","Filter groups","emptyText","Every group already bundles this resource.",3,"options","busy"],["empty","No group bundles this resource yet.",3,"action","rows"],["empty","Nobody has access yet.",3,"action","rows"],["title","Grant users","placeholder","Filter by email","emptyText","Everyone already has access.","withDuration","",3,"granted","closed","intro","options","busy"],["title","Grant to groups","intro","Every member of a picked group can reach it, long-term, for as long as they are a member.","placeholder","Filter groups","emptyText","Every group already bundles this resource.",3,"granted","closed","options","busy"]],template:function(e,n){e&1&&(_(0,so,2,1,"p",0),s(1,"div",1)(2,"a",2),c(3,"History \u2192"),a()(),s(4,"section")(5,"div",3)(6,"h3",4),c(7,"Groups"),a(),s(8,"app-button",5),x("click",function(){return n.grantingGroups.set(!0)}),c(9,"\uFF0B Grant group"),a()(),s(10,"div",6),_(11,ao,2,0,"p",7)(12,lo,1,1,"app-access-list",8),a(),s(13,"p",9),c(14,"A bundle grants every member and follows membership."),a()(),s(15,"section",10)(16,"div",3)(17,"h3",4),c(18,"Users with access"),a(),s(19,"app-button",11),x("click",function(){return n.grantingUsers.set(!0)}),c(20,"\uFF0B Grant users"),a()(),s(21,"div",6),_(22,co,2,0,"p",7)(23,uo,1,1,"app-access-list",12),a(),s(24,"p",9),c(25,"Changes reach the network within about 5 minutes."),a()(),_(26,po,1,3,"app-grant-dialog",13),_(27,mo,1,2,"app-grant-dialog",14)),e&2&&(h(n.error()?0:-1),r(2),m("queryParams",De(7,ro,"resource#"+n.resource().resourceId)),r(6),m("disabled",n.groups()===null),r(3),h(n.groups()===null?11:12),r(11),h(n.grantees()===null?22:23),r(4),h(n.grantingUsers()?26:-1),r(),h(n.grantingGroups()?27:-1))},dependencies:[ht,Gt,fe,Ft],encapsulation:2})};var go=["panelTpl"],fo=["form"],_o=(o,t)=>t.key;function ho(o,t){if(o&1&&(s(0,"span"),c(1,"\xB7 "),s(2,"span",19),c(3),a()()),o&2){let e=p(2);r(3),he("",e.staleConnectors.length," connector",e.staleConnectors.length===1?"":"s"," silent (zombie?)")}}function xo(o,t){if(o&1){let e=I();s(0,"div",12)(1,"app-banner",13)(2,"span",14)(3,"span",15),c(4,"Network sync:"),a(),s(5,"span"),c(6),a(),s(7,"button",16),x("click",function(){v(e);let i=p(3);return i.tab.set("Resources"),b(i.statusFilter.set("blocked"))}),c(8),a(),_(9,ho,4,2,"span"),F(10,"span",17),s(11,"button",18),x("click",function(){v(e);let i=p(3);return b(i.syncNow())}),c(12),a()()()()}if(o&2){let e=p(),n=p(2);r(),m("dot",e.staleConnectors.length?"expiring":"active"),r(5),he("ran ",n.ago(e.at)," \xB7 ",e.resourcesLive," live \xB7"),r(2),T(" ",n.blockedCount()," blocked "),r(),h(e.staleConnectors.length?9:-1),r(2),m("disabled",n.syncing()),r(),T(" ",n.syncing()?"Syncing\u2026":"Sync now"," ")}}function vo(o,t){o&1&&_(0,xo,13,7,"div",12),o&2&&h(t.at?0:-1)}function bo(o,t){if(o&1&&_(0,vo,1,1),o&2){let e,n=p();h((e=n.store.status())?0:-1,e)}}function Co(o,t){if(o&1&&(s(0,"app-banner",8),c(1),a()),o&2){let e=p(2);r(),N(e.mapError())}}function yo(o,t){if(o&1){let e=I();s(0,"app-network-map",21),x("open",function(i){v(e);let l=p(2);return b(l.openDetail(i))}),a()}if(o&2){let e=p(2);m("data",e.mapData())}}function wo(o,t){if(o&1&&_(0,Co,2,1,"app-banner",8)(1,yo,1,1,"app-network-map",20),o&2){let e=p();h(e.mapError()?0:1)}}function ko(o,t){if(o&1&&(s(0,"app-banner",8),c(1),a()),o&2){let e=p();r(),N(e.store.error())}}function No(o,t){o&1&&(s(0,"div",9),F(1,"app-skeleton",22)(2,"app-skeleton",22)(3,"app-skeleton",22),a())}function So(o,t){o&1&&(s(0,"app-empty-state",10),c(1," Register the first database, site, or host users should reach over the VPN. "),a())}function Ro(o,t){if(o&1){let e=I();s(0,"button",27),x("click",function(){let i=v(e).$implicit,l=p(2);return b(l.statusFilter.set(i.key))}),c(1),a()}if(o&2){let e=t.$implicit,n=p(2);J(n.statusFilter()===e.key?"border-transparent bg-brand/10 font-medium text-brand-text":"border-border-strong bg-surface text-muted-foreground hover:text-surface-foreground"),r(),he(" ",e.label," \xB7 ",n.countFor(e.key)," ")}}function To(o,t){if(o&1&&(s(0,"app-empty-state",28),c(1),a()),o&2){let e=p(3);r(),T(' Nothing matches "',e.query(),'". Try a different name, account, address, or DNS name. ')}}function Mo(o,t){o&1&&(s(0,"app-empty-state",29),c(1," The last network sync found no blocked resources. "),a())}function Io(o,t){o&1&&(s(0,"app-empty-state",30),c(1," Every resource has at least one user or group granted. "),a())}function Ao(o,t){if(o&1&&_(0,To,2,1,"app-empty-state",28)(1,Mo,2,0,"app-empty-state",29)(2,Io,2,0,"app-empty-state",30),o&2){let e=p(2);h(e.query()?0:e.statusFilter()==="blocked"?1:2)}}function Eo(o,t){if(o&1&&(s(0,"app-badge",42),c(1),a()),o&2){let e=p().$implicit,n=p(3);m("tone",n.sgTone(e)),r(),T(" ",n.sgLabel(e)," ")}}function Do(o,t){if(o&1&&(s(0,"app-badge",43),c(1),a()),o&2){let e=t;m("tone",e.tone)("title",e.title),r(),T(" ",e.label," ")}}function $o(o,t){if(o&1&&(s(0,"code",49),c(1),a()),o&2){let e=p().$implicit;r(),N(e.dnsName)}}function Vo(o,t){o&1&&(s(0,"span",51),c(1,"\u2014"),a())}function Po(o,t){if(o&1){let e=I();s(0,"div",36),x("click",function(){let i=v(e).$implicit,l=p(3);return b(l.openDetail(i))}),s(1,"div",37),c(2),a(),s(3,"div",38)(4,"app-badge",39),c(5),a()(),s(6,"div",40)(7,"span",41)(8,"app-badge",42),c(9),a(),_(10,Eo,2,2,"app-badge",42),_(11,Do,2,3,"app-badge",43),a()(),s(12,"div",40)(13,"span",44),F(14,"span",45),s(15,"span",46),c(16),a(),s(17,"span",47),c(18),a()()(),s(19,"div",48)(20,"code",49),c(21),a(),s(22,"span",50),c(23),a()(),s(24,"div",48),_(25,$o,2,1,"code",49)(26,Vo,2,0,"span",51),a()()}if(o&2){let e,n=t.$implicit,i=p(3);J(i.rowClass(n)),r(2),N(n.name),r(3),N(i.typeLabel(n.type)),r(),m("title",i.statusTitle(n.resourceId)),r(2),m("tone",i.statusTone(n.resourceId)),r(),T(" ",i.statusLabel(n.resourceId)," "),r(),h(n.securityGroupId?10:-1),r(),h((e=i.addrBadge(n))?11:-1,e),r(),m("title",i.connectorTitle(n.accountNumber,n.cidr)),r(2),J(i.dotClass(n.accountNumber)),ne("background",i.dotColor(n.accountNumber)),r(2),N(i.siteLabel(n.accountNumber)),r(2),T("\xB7 ",n.accountNumber),r(),m("title",n.cidr+" : "+n.ports.join(", ")),r(2),N(n.cidr),r(2),T(" : ",n.ports.join(", ")),r(),m("title",n.dnsName||null),r(),h(n.dnsName?25:26)}}function Go(o,t){if(o&1){let e=I();Ae(0,34),s(1,"app-load-more",52),x("reached",function(){v(e);let i=p(3);return b(i.window.loadMore())}),a(),Ee()}}function Fo(o,t){if(o&1){let e=I();s(0,"app-sticky-grouped-table",31),x("toggle",function(i){v(e);let l=p(2);return b(l.toggleGroup(i))}),Ae(1,32),s(2,"div",33),c(3,"Name"),a(),s(4,"div",33),c(5,"Type"),a(),s(6,"div",33),c(7,"Status"),a(),s(8,"div",33),c(9,"Site \xB7 Connector"),a(),s(10,"div",33),c(11,"Address \xB7 ports"),a(),s(12,"div",33),c(13,"DNS name"),a(),Ee(),Ye(14,Po,27,21,"ng-template",null,1,ot),_(16,Go,2,0,"ng-container",34),a(),F(17,"app-result-count",35)}if(o&2){let e=p(2);m("groups",e.groupedRows())("gridCols",e.gridCols)("collapsedKeys",e.collapsedGroupKeys())("trackBy",e.trackByResourceId),r(16),h(e.window.hasMore()?16:-1),r(),m("shown",e.window.shown())("total",e.filtered().length)}}function Oo(o,t){if(o&1){let e=I();s(0,"div",23)(1,"div",24),U(2,Ro,2,4,"button",25,_o),a(),s(4,"app-search-input",26),nt("valueChange",function(i){v(e);let l=p();return tt(l.query,i)||(l.query=i),b(i)}),a()(),_(5,Ao,3,1)(6,Fo,18,7)}if(o&2){let e=p();r(2),W(e.statusFilters),r(2),et("value",e.query),r(),h(e.filtered().length===0?5:6)}}function Lo(o,t){if(o&1){let e=I();s(0,"app-resource-form",55,2),x("saved",function(){v(e);let i=p(2);return b(i.afterCreate())}),a()}}function Bo(o,t){if(o&1&&(s(0,"app-badge",42),c(1),a()),o&2){let e=p(),n=p(3);m("tone",n.sgTone(e)),r(),T(" ",n.sgLabel(e)," ")}}function Ko(o,t){if(o&1&&(s(0,"app-badge",43),c(1),a()),o&2){let e=t;m("tone",e.tone)("title",e.title),r(),T(" ",e.label," ")}}function Uo(o,t){if(o&1&&(s(0,"p",85),c(1),a()),o&2){let e=t;J(e.tone),r(),N(e.text)}}function Wo(o,t){if(o&1&&(s(0,"p",85),c(1),a()),o&2){let e=t;J(e.tone),r(),N(e.text)}}function jo(o,t){if(o&1){let e=I();s(0,"app-detail-row",78)(1,"app-inline-edit",86),x("save",function(i){v(e);let l=p(),d=p(3);return b(d.patchResource(l,{sshUser:i}))}),a()()}if(o&2){let e=p();r(),m("value",e.sshUser??"")}}function zo(o,t){if(o&1){let e=I();s(0,"div")(1,"app-inline-edit",56),x("save",function(i){let l=v(e),d=p(3);return b(d.patchResource(l,{name:i}))}),a(),s(2,"fieldset",57)(3,"legend",58),c(4,"Resource"),a(),s(5,"div",59)(6,"app-detail-row",60)(7,"select",61),x("ngModelChange",function(i){let l=v(e),d=p(3);return b(d.patchResource(l,{type:i}))}),s(8,"option",62),c(9,"Database"),a(),s(10,"option",63),c(11,"Web server"),a(),s(12,"option",64),c(13,"Host (EC2 / other)"),a()()(),s(14,"app-detail-row",65)(15,"app-badge",42),c(16),a(),_(17,Bo,2,2,"app-badge",42),_(18,Ko,2,3,"app-badge",43),a(),s(19,"app-detail-row",66)(20,"span",67),c(21),a()(),s(22,"app-detail-row",68)(23,"span",69),c(24),a()(),s(25,"app-detail-row",70)(26,"app-badge",42),c(27),a()(),s(28,"div")(29,"app-detail-row",71)(30,"app-inline-edit",72),x("save",function(i){let l=v(e),d=p(3);return b(d.patchResource(l,{cidr:i}))}),a()(),_(31,Uo,2,3,"p",73),a(),s(32,"app-detail-row",74)(33,"app-inline-edit",75),x("save",function(i){let l=v(e),d=p(3);return b(d.savePorts(l,i))}),a()(),s(34,"div")(35,"app-detail-row",76)(36,"app-inline-edit",77),x("save",function(i){let l=v(e),d=p(3);return b(d.patchResource(l,{dnsName:i}))}),a()(),_(37,Wo,2,3,"p",73),a(),_(38,jo,2,1,"app-detail-row",78),s(39,"app-detail-row",79)(40,"app-inline-edit",80),x("save",function(i){let l=v(e),d=p(3);return b(d.patchResource(l,{securityGroupId:i}))}),a()()()(),s(41,"fieldset",57)(42,"legend",58),c(43,"Connection instructions"),a(),s(44,"div",81)(45,"app-inline-edit",82),x("save",function(i){let l=v(e),d=p(3);return b(d.patchResource(l,{description:i}))}),a()()(),s(46,"fieldset",83)(47,"legend",58),c(48,"Who can reach it"),a(),s(49,"app-resource-users",84),x("changed",function(){v(e);let i=p(3);return b(i.onAccessChanged())}),a()()()}if(o&2){let e,n,i,l=t,d=p(3);r(),m("value",l.name),r(6),m("ngModel",l.type),r(7),m("title",d.statusTitle(l.resourceId)),r(),m("tone",d.statusTone(l.resourceId)),r(),T(" ",d.statusLabel(l.resourceId)," "),r(),h(l.securityGroupId?17:-1),r(),h((e=d.addrBadge(l))?18:-1,e),r(3),N(l.accountNumber),r(3),N(d.siteLabel(l.accountNumber)),r(),m("title",d.connectorTitle(l.accountNumber,l.cidr)),r(),m("tone",d.store.index().connectorState(l.accountNumber,l.cidr).tone),r(),T(" ",d.store.index().connectorState(l.accountNumber,l.cidr).label," "),r(3),m("value",l.cidr),r(),h((n=d.cidrNote(l))?31:-1,n),r(2),m("value",l.ports.join(", ")),r(3),m("value",l.dnsName??""),r(),h((i=d.dnsNote(l))?37:-1,i),r(),h(l.type==="HOST"?38:-1),r(2),m("value",l.securityGroupId??""),r(5),m("value",l.description??""),r(4),m("resource",l)}}function Ho(o,t){if(o&1&&_(0,zo,50,21,"div"),o&2){let e,n=p(2);h((e=n.panelResource())?0:-1,e)}}function qo(o,t){if(o&1){let e=I();s(0,"app-button",88),x("click",function(){let i=v(e),l=p(3);return b(l.deleting.set([i]))}),c(1,"Delete resource"),a()}}function Qo(o,t){if(o&1&&_(0,qo,2,0,"app-button",87),o&2){let e,n=p(2);h((e=n.panelResource())?0:-1,e)}}function Xo(o,t){if(o&1){let e=I();s(0,"app-button",89),x("click",function(){v(e);let i=p(2);return b(i.closePanel())}),c(1,"Cancel"),a(),s(2,"app-button",90),x("click",function(){let i;v(e);let l=p(2);return b((i=l.resourceFormRef())==null?null:i.save())}),c(3," Register resource "),a()}if(o&2){let e,n,i=p(2);r(2),m("loading",((e=i.resourceFormRef())==null?null:e.busy())??!1)("disabled",!(((n=i.resourceFormRef())==null?null:n.canSave())??!1))}}function Yo(o,t){if(o&1){let e=I();s(0,"app-panel",53),x("closed",function(){v(e);let i=p();return b(i.closePanel())}),_(1,Lo,2,0,"app-resource-form")(2,Ho,1,1),Ae(3,54),_(4,Qo,1,1)(5,Xo,4,2),Ee(),a()}if(o&2){let e,n=p();m("title",n.panelTitle())("contentKey",n.panelKind()+":"+n.panelResourceId()),r(),h((e=n.panelKind())==="create"?1:e==="detail"?2:-1),r(3),h(n.panelKind()==="detail"?4:n.panelKind()==="create"?5:-1)}}function Jo(o,t){if(o&1){let e=I();s(0,"app-resources-delete-dialog",91),x("deleted",function(){v(e);let i=p();return b(i.afterDeleted())})("closed",function(){v(e);let i=p();return b(i.deleting.set(null))}),a()}o&2&&m("resources",t)}var Jt=class o{store=V(ke);adminApi=V(ge);groupsApi=V(Le);resourcesApi=V(de);toast=V(me);query=w("");tabs=["Resources","Map"];tab=w("Resources");mapExtras=w(null);mapError=w("");mapData=R(()=>{let t=this.mapExtras(),e=this.store.resources(),n=this.store.network();return!t||e===null||!n?null:{network:n,resources:e,status:n.status,users:t.users,groups:t.groups,accounts:t.accounts}});panelKind=w(null);panelResourceId=w(null);panelTpl=Me("panelTpl");resourceFormRef=Me("form");deleting=w(null);statusFilters=[{key:"all",label:"All"},{key:"blocked",label:"Blocked"},{key:"no-grants",label:"No one granted"}];statusFilter=w("all");syncing=w(!1);filtered=R(()=>{let t=this.store.resources()??[],e=this.query().trim().toLowerCase(),n=this.store.index(),i=this.statusFilter(),l=d=>{let g=n.siteOf(d.accountNumber);return g?n.sites.indexOf(g):Number.MAX_SAFE_INTEGER};return t.filter(d=>i==="all"||this.matchesFilter(d.resourceId,i)).filter(d=>!e||d.name.toLowerCase().includes(e)||d.accountNumber.includes(e)||d.cidr.includes(e)||(d.dnsName??"").toLowerCase().includes(e)||this.siteLabel(d.accountNumber).toLowerCase().includes(e)).sort((d,g)=>l(d)-l(g)||d.accountNumber.localeCompare(g.accountNumber)||d.name.localeCompare(g.name))});window=Pt(this.filtered,30);panelResource=R(()=>(this.store.resources()??[]).find(t=>t.resourceId===this.panelResourceId())??null);panelTitle=R(()=>{switch(this.panelKind()){case"create":return"Register resource";case"detail":return"Resource info";default:return""}});loadMap(){Se({users:this.adminApi.listUsers(),groups:this.groupsApi.list(),accounts:this.adminApi.listAccounts()}).subscribe({next:t=>this.mapExtras.set(t),error:t=>this.mapError.set(oe(t,"Could not load the network map."))})}reloadMap(){this.mapExtras()&&(this.mapExtras.set(null),this.loadMap())}openCreate(){this.panelResourceId.set(null),this.panelKind.set("create")}openDetail(t){this.panelResourceId.set(t.resourceId),this.show("detail")}show(t){this.panelKind.set(t)}patchResource(t,e){this.resourcesApi.update(t.resourceId,e).subscribe({next:()=>{this.toast.success("Saved"),this.store.load(),this.reloadMap()},error:n=>this.toast.error(oe(n,"Could not save the resource."))})}savePorts(t,e){let n=e.split(",").map(i=>i.trim()).filter(Boolean).map(Number);if(!n.length||n.some(i=>!Number.isInteger(i)||i<1||i>65535)){this.toast.error("Ports must be whole numbers between 1 and 65535, comma-separated.");return}this.patchResource(t,{ports:n})}cidrNote(t){return this.noteOf(this.store.index().cidrCheck(t.accountNumber,t.cidr))}dnsNote(t){return t.dnsName?this.noteOf(this.store.index().dnsCheck(t.accountNumber,t.dnsName)):null}noteOf(t){return!t.text||t.ok===null?null:{tone:t.ok?"text-success":"text-warning",text:`${t.ok?"\u2713":"\u26A0"} ${t.text}`}}onAccessChanged(){this.store.load(),this.reloadMap()}closePanel(){this.panelKind.set(null),this.panelResourceId.set(null)}afterCreate(){this.closePanel(),this.store.load(),this.reloadMap()}afterDeleted(){this.deleting.set(null),this.closePanel(),this.store.load(),this.reloadMap()}statusOf(t){return this.store.status()?.resources?.[t]}matchesFilter(t,e){let n=this.statusOf(t)?.status;return e==="no-grants"?n==="no-grants":n!==void 0&&n!=="live"&&n!=="no-grants"}countFor(t){let e=this.store.resources()??[];return t==="all"?e.length:e.filter(n=>this.matchesFilter(n.resourceId,t)).length}blockedCount=R(()=>this.countFor("blocked"));gridCols="grid grid-cols-[minmax(0,19fr)_minmax(0,13fr)_minmax(0,21fr)_minmax(0,21fr)_minmax(0,19fr)_minmax(0,24fr)]";groupedRows=R(()=>{let t=this.window.items(),e=this.store.index(),n=[];for(let i of t){let l=this.siteLabel(i.accountNumber),d=n[n.length-1];if(d&&d.key===l){d.rows.push(i);continue}let g=e.loaded?e.connectorState(i.accountNumber,i.cidr).label:"\u2014";n.push({key:l,label:l,stateLabel:g,rows:[i]})}return n});trackByResourceId=t=>t.resourceId;rowClass(t){let e=this.panelResourceId()===t.resourceId?" bg-brand/5":"";return`${this.gridCols} cursor-pointer items-center border-t border-border text-sm first:border-t-0 hover:bg-state-hover${e}`}collapsedGroupKeys=w(new Set);toggleGroup(t){let e=new Set(this.collapsedGroupKeys());e.has(t)?e.delete(t):e.add(t),this.collapsedGroupKeys.set(e)}siteLabel(t){let e=this.store.index();return e.loaded?e.siteName(e.siteOf(t))||"Not on the network":"\u2014"}connectorTitle(t,e){let n=this.store.index().connectorOf(t,e);return n?[n.node?`${n.node.name} \xB7 ${n.online?"online":"offline"}`:"no connector enrolled",n.vpcs.length?`VPC ${n.vpcs.map(Ke).join(", ")}`:"VPC not declared in config",n.approvedRoutes.length?`routes ${n.approvedRoutes.join(", ")}`:""].filter(Boolean).join(" \xB7 "):"This account is in no site \u2014 add it to network.sites to connect it."}dotClass(t){return this.store.index().connectorState(t).dot==="none"?"border border-dashed border-placeholder":""}dotColor(t){switch(this.store.index().connectorState(t).dot){case"ok":return"var(--dot-active)";case"off":return"var(--danger)";default:return"transparent"}}syncNow(){this.syncing.set(!0),this.adminApi.syncNetwork().subscribe({next:()=>{this.toast.success("Sync requested \u2014 status refreshes in about a minute"),setTimeout(()=>{this.store.loadNetwork(),this.syncing.set(!1)},45e3)},error:t=>{this.syncing.set(!1),this.toast.error(oe(t,"Could not request a sync."))}})}statusLabel(t){let e=this.statusOf(t);switch(e?.status){case"live":return`Reachable \xB7 ${e.users??0} user${(e.users??0)===1?"":"s"}`;case"no-connector":{let n=this.store.resources()?.find(l=>l.resourceId===t);return(n&&this.store.index().connectorOf(n.accountNumber,n.cidr))?.node?"Connector offline":"No connector"}case"no-site":return"Account in no site";case"outside-approved-routes":return"Outside approved routes";case"no-valid-ports":return"No valid ports";case"dns-unresolved":return"DNS name unresolved";case"no-grants":return"No one granted";default:return this.store.status()?"Syncing\u2026":"\u2014"}}statusTone(t){switch(this.statusOf(t)?.status){case"live":return"green";case"no-connector":case"no-site":return"red";case"outside-approved-routes":case"no-valid-ports":case"dns-unresolved":return"amber";default:return"gray"}}sgOf(t){let e=this.statusOf(t.resourceId);if(!(e?.sgId&&e.sgId!==t.securityGroupId))return e?.sg}sgLabel(t){switch(this.sgOf(t)){case"ok":return"Firewall auto";case"not-found":return"SG not found";case"invalid":return"SG invalid";case"sg-sync-failed":return"Firewall sync failed";case"other-vpc":return"SG outside connector VPCs";case"error":return"Firewall error";default:return"Firewall syncing\u2026"}}addrBadge(t){if(!t.dnsName)return null;let e=this.statusOf(t.resourceId);return!e?.addr||e.addrName&&e.addrName!==t.dnsName?null:e.addr==="dns"?{label:"Follows DNS",tone:"gray",title:e.status==="live"?`Access rules follow the DNS name \u2014 currently ${e.addrIp??"the resolved IP"} \u2014 so the registered range can't go stale when the workload moves.`:`The DNS name resolves (currently ${e.addrIp??"a live IP"}), but no rules are active \u2014 see the status badge.`}:{label:"DNS unresolved",tone:"amber",title:"The DNS name did not resolve on the last pass. Access rules keep the addresses it last resolved to; if it has never resolved, nothing is open. Possible causes: no tailnet resolver in this account yet, its invoke trust broken (redeploy the ConnectorStack after a reconciler-role recreation), or the name is genuinely gone."}}sgTone(t){switch(this.sgOf(t)){case"ok":return"gray";case void 0:return"gray";case"invalid":return"amber";default:return"red"}}resourceAccount(t){return this.store.resources()?.find(e=>e.resourceId===t)?.accountNumber??""}statusTitle(t){let e=this.store.status(),n=this.statusOf(t);if(!e?.at)return"No sync data yet \u2014 the network reconciler has not reported";if(!n)return`New resource \u2014 first network sync within 5 minutes (last sweep ${this.ago(e.at)})`;let i=n.sg?` \xB7 firewall: ${n.sg}`:"";return`Reconciler reason: ${n.status}${i} \xB7 checked ${this.ago(e.at)}`}ago(t){let e=Date.parse(t);if(Number.isNaN(e))return"";let n=Math.floor((Date.now()-e)/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;let i=Math.floor(n/60);return i<24?`${i}h ago`:new Date(t).toLocaleString()}typeLabel(t){return t==="DATABASE"?"Database":t==="WEB"?"Web":"Host"}constructor(){this.store.load(),St(this.panelKind,this.panelTpl,()=>this.closePanel()),ce(()=>{this.tab()==="Map"&&!this.mapExtras()&&!this.mapError()&&this.loadMap()})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=se({type:o,selectors:[["app-admin-resources-page"]],viewQuery:function(e,n){e&1&&(Re(n.panelTpl,go,5),Re(n.resourceFormRef,fo,5)),e&2&&ve(2)},hostAttrs:[1,"flex","min-h-0","flex-1","flex-col"],decls:15,vars:9,consts:[["panelTpl",""],["rowTpl",""],["form",""],[3,"fill","tabbed"],["pageHeader","","title","Network","subtitle","Databases, internal sites, and hosts reachable over the VPN.","subtitleInfo","Registering one gives nobody access \u2014 grant users with Manage users or by approving their requests. A resource is only reachable while its account's connector is up and its address sits inside the approved routes.",3,"showHeaderSearch"],["headerActions","","size","lg",3,"click"],["name","plus",1,"h-4","w-4",3,"strokeWidth"],[1,"mt-4","block",3,"selectedChange","tabs","selected"],["tone","danger"],[1,"space-y-2"],["title","No resources yet"],[3,"resources"],[1,"mt-3"],["tone","neutral",3,"dot"],[1,"flex","flex-wrap","items-center","gap-x-1.5"],[1,"font-medium"],["type","button","title","Show only blocked resources",1,"underline","decoration-dotted","underline-offset-2","hover:text-brand-text",3,"click"],[1,"ml-auto"],["type","button",1,"underline","decoration-dotted","underline-offset-2","hover:text-brand-text","disabled:no-underline","disabled:opacity-60",3,"click","disabled"],[1,"font-semibold"],[3,"data"],[3,"open","data"],["sizeClass","h-12 w-full"],[1,"mb-3","flex","flex-wrap","items-center","gap-2"],[1,"flex","flex-wrap","items-center","gap-1.5","text-xs"],["type","button",1,"inline-flex","h-7","items-center","gap-1","rounded-full","border","px-2.5","transition-colors",3,"class"],["compact","","placeholder","Search by name or account",1,"ml-auto","w-[260px]",3,"valueChange","value"],["type","button",1,"inline-flex","h-7","items-center","gap-1","rounded-full","border","px-2.5","transition-colors",3,"click"],["title","No matches"],["title","Nothing blocked"],["title","Nothing ungranted"],[3,"toggle","groups","gridCols","collapsedKeys","trackBy"],["header",""],[1,"px-4","text-left","ui-microlabel","text-text-secondary"],["after-groups",""],["noun","resource",1,"shrink-0",3,"shown","total"],["data-testid","row",3,"click"],[1,"min-w-0","break-words","px-4","py-2.5","font-medium","tracking-[0.015em]","text-surface-foreground"],[1,"px-4","py-2.5"],["tone","gray"],[1,"px-4","py-2.5",3,"title"],[1,"flex","min-w-0","flex-wrap","items-center","gap-1"],[3,"tone"],[3,"tone","title"],[1,"flex","min-w-0","items-center","gap-2","whitespace-nowrap"],[1,"h-1.5","w-1.5","shrink-0","rounded-full"],[1,"max-w-[70%]","shrink-0","truncate","text-surface-foreground"],[1,"min-w-0","truncate","font-mono","text-xs","text-muted-foreground"],[1,"truncate","px-4","py-2.5","text-surface-foreground",3,"title"],[1,"text-xs"],[1,"text-xs","text-muted-foreground"],[1,"text-xs","text-placeholder"],["appInfiniteScroll","",3,"reached"],["size","lg",3,"closed","title","contentKey"],["ngProjectAs","[panel-footer]",5,["","panel-footer",""]],[3,"saved"],["size","lg","align","start","ariaLabel","resource name",3,"save","value"],[1,"mt-5","rounded-lg","border","border-border","px-5","pb-3.5","pt-2.5"],[1,"-ml-1.5","px-1.5","text-xs","font-medium","text-muted-foreground"],[1,"space-y-4","text-sm"],["label","Type"],["aria-label","Resource type",1,"ui-input","h-7","w-auto","!py-0","pr-7","text-sm",3,"ngModelChange","ngModel"],["value","DATABASE"],["value","WEB"],["value","HOST"],["label","Status",3,"title"],["label","Account"],[1,"font-mono","text-[13px]","text-surface-foreground"],["label","Site"],[1,"text-sm","text-surface-foreground"],["label","Connector",3,"title"],["label","Address"],["mono","","size","sm","align","start","ariaLabel","private IP or range",3,"save","value"],[1,"mt-1","pl-[120px]","text-xs",3,"class"],["label","Ports"],["mono","","size","sm","align","start","ariaLabel","ports",3,"save","value"],["label","DNS name"],["mono","","size","sm","align","start","placeholder","none","ariaLabel","DNS name",3,"save","value"],["label","SSH user"],["label","Security group"],["mono","","size","sm","align","start","placeholder","none \u2014 firewall managed by hand","ariaLabel","security group id",3,"save","value"],[1,"flex","text-sm"],["wrap","","mono","","size","sm","align","start","placeholder","none \u2014 shown to granted users","ariaLabel","connection instructions",3,"save","value"],[1,"mt-5","rounded-lg","border","border-border","px-5","pb-4","pt-2.5"],[3,"changed","resource"],[1,"mt-1","pl-[120px]","text-xs"],["mono","","size","sm","align","start","placeholder","none","ariaLabel","SSH user",3,"save","value"],["size","lg","variant","danger"],["size","lg","variant","danger",3,"click"],["size","lg","variant","outline",3,"click"],["size","lg",3,"click","loading","disabled"],[3,"deleted","closed","resources"]],template:function(e,n){if(e&1){let i=I();s(0,"app-page",3)(1,"app-page-header",4)(2,"app-button",5),x("click",function(){return v(i),b(n.openCreate())}),F(3,"app-icon",6),c(4," Register resource "),a(),_(5,bo,1,1),s(6,"app-tabs",7),nt("selectedChange",function(d){return v(i),tt(n.tab,d)||(n.tab=d),b(d)}),a()(),_(7,wo,2,1)(8,ko,2,1,"app-banner",8)(9,No,4,0,"div",9)(10,So,2,0,"app-empty-state",10)(11,Oo,7,2),a(),Ye(12,Yo,6,4,"ng-template",null,0,ot),_(14,Jo,1,1,"app-resources-delete-dialog",11)}if(e&2){let i;m("fill",!0)("tabbed",!0),r(),m("showHeaderSearch",!1),r(2),m("strokeWidth",2),r(2),h(n.store.resources()!==null&&!n.store.error()?5:-1),r(),m("tabs",n.tabs),et("selected",n.tab),r(),h(n.tab()==="Map"?7:n.store.error()?8:n.store.resources()===null?9:n.countFor("all")===0?10:11),r(7),h((i=n.deleting())?14:-1,i)}},dependencies:[Ve,kt,fe,Nt,$e,yt,$t,Vt,At,Ue,Et,Dt,wt,Tt,Mt,We,ze,He,qe,Ot,Lt,ye,Fe,Oe,Ge,be,Ce],encapsulation:2})};export{Be as a,ke as b,Jt as c};
@@ -0,0 +1 @@
1
+ import{a as R,b as P}from"./chunk-65WE5MXA.js";import{a as b}from"./chunk-EW2VMNHE.js";import{a as v}from"./chunk-WEDAFMID.js";import"./chunk-GK2T2SMO.js";import"./chunk-CV7EODPO.js";import"./chunk-GHEU25TG.js";import"./chunk-BNFKRZTP.js";import"./chunk-DCOFBAKJ.js";import"./chunk-IKK5DQ3Z.js";import"./chunk-H5H727H6.js";import{a as n}from"./chunk-2V6RSAAC.js";import"./chunk-JMBXRK3I.js";import"./chunk-DOLRLYW7.js";import"./chunk-O4QSFUXB.js";import{a as d,b as p,c as l,d as f,e as g,f as S}from"./chunk-J57JB4MU.js";import"./chunk-KEBESIXR.js";import{a as A}from"./chunk-GPKKIOHD.js";import"./chunk-TM43WUKM.js";import"./chunk-6KFR7DYY.js";import"./chunk-CP4XZPOA.js";import"./chunk-33SYY2JB.js";import"./chunk-FIUVIKAN.js";import"./chunk-EVP5UVDQ.js";import"./chunk-OATVFQXO.js";import"./chunk-EQ4PF25J.js";import"./chunk-ZDCURXPS.js";import"./chunk-PSMER3HX.js";import"./chunk-KCCEQIXX.js";import"./chunk-QVABVDO5.js";import"./chunk-RROPCBUH.js";import"./chunk-PMMBJK7Q.js";import"./chunk-J3SSPCFV.js";import"./chunk-4SK6XQ6C.js";import"./chunk-SJMLX5AT.js";import"./chunk-2SO4BVIT.js";import{a as u}from"./chunk-KPNHT4MK.js";import"./chunk-NO5D6WDF.js";import{c as i}from"./chunk-GKI3R2JB.js";import"./chunk-M6OAYNRE.js";import"./chunk-XJM3HDJQ.js";import"./chunk-2MOGDYK4.js";import"./chunk-4N2IUS6T.js";import"./chunk-D7TR2ORJ.js";import{g as t}from"./chunk-P5WRM37W.js";import"./chunk-WFIHWVQO.js";var s="448210007710",e="990144552201",y={[s]:"Acme Production",[e]:"Acme Staging"},N={[`${s}#AdminAccess`]:"#3e63dd",[`${e}#DeployRole`]:"#e5484d",[`${e}#ReadOnly`]:"#30a46c"},I=[{userId:"u-ada",email:"ada@acme.com",admin:!0,pendingInvite:!1,lastSeenAt:"2026-08-26T09:12:00Z",roles:[{accountNumber:s,roleName:"AdminAccess",direct:!0,groups:[]},{accountNumber:e,roleName:"DeployRole",direct:!0,groups:["Platform team"]},{accountNumber:e,roleName:"ReadOnly",direct:!1,groups:["Platform team"]}],resources:[]},{userId:"u-grace",email:"grace@acme.com",admin:!1,pendingInvite:!0,roles:[{accountNumber:e,roleName:"DeployRole",direct:!1,groups:["Platform team"]}],resources:[{resourceId:"r-payments",name:"payments-db",accountNumber:e,direct:!0,groups:[]}]},{userId:"u-tom",email:"tom@acme.com",admin:!1,pendingInvite:!1,lastSeenAt:"2026-08-20T15:40:00Z",roles:[],resources:[]}],E=[{groupId:"g-platform",name:"Platform team",description:"Deploy + read access to staging.",roles:[{accountNumber:e,roleName:"DeployRole"},{accountNumber:e,roleName:"ReadOnly"}],resources:[{resourceId:"r-payments",name:"payments-db"}],members:[{userId:"u-ada",email:"ada@acme.com"},{userId:"u-grace",email:"grace@acme.com"}],createdAt:"2026-07-01T10:00:00Z",createdBy:"ada@acme.com"}];function U(a){let r=new Map;for(let o of a)for(let m of o.members){let c=r.get(m.userId)??[];c.push(o),r.set(m.userId,c)}return r}var O=[{clientId:"7f2ab1c9d4e5f60718293a4b5c6d7e8f",name:"github-actions-deploy",createdAt:"2026-07-15T08:00:00Z",createdBy:"ada@acme.com",lastUsedAt:"2026-08-27T06:30:00Z",roles:[{accountNumber:e,roleName:"DeployRole",grantedBy:"ada@acme.com"}]},{clientId:"11aa22bb33cc44dd55ee66ff77889900",name:"nightly-report",createdAt:"2026-08-01T08:00:00Z",createdBy:"ada@acme.com",roles:[],previous:{clientId:"00998877ffee66dd55cc44bb33aa2211",rotatedAt:"2026-08-25T12:00:00Z"}}];function L(a,r,o={}){return[{provide:R,useValue:S({users:a,groups:r,error:o.error??""},{groupsOf:()=>U(r)})},{provide:u,useValue:{listServiceUsers:()=>t(O)}},{provide:b,useValue:{accessReport:()=>t(new Blob)}},{provide:A,useValue:{list:()=>t(r)}},{provide:n,useValue:d(y)},{provide:v,useValue:p(N)},{provide:i,useValue:l()},f(o.queryParams)]}function j(){return{component:P,providers:[...L(I,E),g()]}}export{j as load};
@@ -0,0 +1 @@
1
+ function a(r){if(!r)return"";let e=new Date(r).getTime();if(Number.isNaN(e))return"";let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let n=Math.floor(t/60);if(n<24)return`${n}h ago`;let o=Math.floor(n/24);return o<=7?`${o}d ago`:new Date(r).toLocaleDateString()}export{a};
@@ -0,0 +1 @@
1
+ import{Ca as o,Da as a,Ja as s,Na as p,Oa as c,Ua as d,Wa as m,Xa as g,Z as n,fa as r,tb as i}from"./chunk-P5WRM37W.js";var w=["*"],f=class l{label=i.required();align=i("center");static \u0275fac=function(e){return new(e||l)};static \u0275cmp=r({type:l,selectors:[["app-detail-row"]],hostAttrs:[1,"block"],inputs:{label:[1,"label"],align:[1,"align"]},ngContentSelectors:w,decls:5,vars:4,consts:[[1,"row"],[1,"label",3,"title"],[1,"content"]],template:function(e,t){e&1&&(p(),o(0,"div",0)(1,"span",1),m(2),a(),o(3,"div",2),c(4),a()()),e&2&&(d("align-start",t.align()==="start"),n(),s("title",t.label()),n(),g(t.label()))},styles:[".row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.row.align-start[_ngcontent-%COMP%]{align-items:flex-start}.label[_ngcontent-%COMP%]{flex:0 0 108px;width:108px;font-size:13px;color:var(--muted-foreground)}.content[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px}.row.align-start[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{align-items:flex-start}"]})};export{f as a};
@@ -0,0 +1 @@
1
+ import{Ca as s,Da as c,Ea as b,Ja as p,La as m,Va as a,Z as l,fa as d,ra as r,tb as n,wb as g,zb as u}from"./chunk-P5WRM37W.js";var h=class i{checked=g(!1);disabled=n(!1,{transform:u});ariaLabel=n("");toggle(t){t.stopPropagation(),this.checked.set(!this.checked())}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=d({type:i,selectors:[["app-toggle"]],inputs:{checked:[1,"checked"],disabled:[1,"disabled"],ariaLabel:[1,"ariaLabel"]},outputs:{checked:"checkedChange"},decls:2,vars:7,consts:[["type","button","role","switch",1,"relative","block","h-5","w-9","shrink-0","rounded-full","transition-colors","disabled:opacity-50","motion-reduce:transition-none",3,"click","disabled"],[1,"absolute","top-0.5","h-4","w-4","rounded-full","bg-white","shadow-[0_1px_2px_rgba(0,0,0,0.3)]","transition-all","motion-reduce:transition-none"]],template:function(o,e){o&1&&(s(0,"button",0),m("click",function(f){return e.toggle(f)}),b(1,"span",1),c()),o&2&&(a(e.checked()?"bg-brand":"bg-border-strong"),p("disabled",e.disabled()),r("aria-checked",e.checked())("aria-label",e.ariaLabel()||null),l(),a(e.checked()?"left-[1.125rem]":"left-0.5"))},encapsulation:2})};export{h as a};