@k8slens/extensions 5.3.1-git.f6a51d1ae7.0 → 5.3.3

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 (44) hide show
  1. package/dist/src/common/k8s-api/api-manager.d.ts +1 -1
  2. package/dist/src/common/k8s-api/cluster-context.d.ts +1 -0
  3. package/dist/src/common/k8s-api/endpoints/daemon-set.api.d.ts +2 -5
  4. package/dist/src/common/k8s-api/endpoints/deployment.api.d.ts +2 -5
  5. package/dist/src/common/k8s-api/endpoints/job.api.d.ts +2 -5
  6. package/dist/src/common/k8s-api/endpoints/network-policy.api.d.ts +72 -32
  7. package/dist/src/common/k8s-api/endpoints/persistent-volume-claims.api.d.ts +3 -16
  8. package/dist/src/common/k8s-api/endpoints/poddisruptionbudget.api.d.ts +2 -6
  9. package/dist/src/common/k8s-api/endpoints/replica-set.api.d.ts +2 -5
  10. package/dist/src/common/k8s-api/endpoints/stateful-set.api.d.ts +2 -5
  11. package/dist/src/common/k8s-api/kube-api-parse.d.ts +2 -2
  12. package/dist/src/common/k8s-api/kube-api.d.ts +58 -30
  13. package/dist/src/common/k8s-api/kube-object.d.ts +25 -2
  14. package/dist/src/common/k8s-api/kube-object.store.d.ts +11 -7
  15. package/dist/src/common/k8s-api/kube-watch-api.d.ts +7 -30
  16. package/dist/src/extensions/extension-api.js +19 -31
  17. package/dist/src/main/cluster.d.ts +3 -7
  18. package/dist/src/main/context-handler.d.ts +8 -1
  19. package/dist/src/main/kube-auth-proxy.d.ts +5 -7
  20. package/dist/src/main/kubeconfig-manager.d.ts +16 -4
  21. package/dist/src/renderer/bootstrap.d.ts +1 -2
  22. package/dist/src/renderer/components/+events/kube-event-details.d.ts +1 -1
  23. package/dist/src/renderer/components/+namespaces/namespace-details.d.ts +0 -1
  24. package/dist/src/renderer/components/+namespaces/namespace-select.d.ts +0 -1
  25. package/dist/src/renderer/components/+namespaces/namespace.store.d.ts +1 -1
  26. package/dist/src/renderer/components/+network-ingresses/ingress-details.d.ts +1 -1
  27. package/dist/src/renderer/components/{getDi.d.ts → +network-policies/__tests__/network-policy-details.test.d.ts} +1 -2
  28. package/dist/src/renderer/components/+network-policies/network-policy-details.d.ts +5 -4
  29. package/dist/src/renderer/components/+nodes/node-details.d.ts +1 -2
  30. package/dist/src/renderer/components/+storage-classes/storage-class-details.d.ts +1 -1
  31. package/dist/src/renderer/components/+storage-volume-claims/volume-claim-details.d.ts +1 -1
  32. package/dist/src/renderer/components/+workloads-cronjobs/cronjob-details.d.ts +1 -1
  33. package/dist/src/renderer/components/+workloads-daemonsets/daemonset-details.d.ts +0 -1
  34. package/dist/src/renderer/components/+workloads-deployments/deployment-details.d.ts +0 -1
  35. package/dist/src/renderer/components/+workloads-jobs/job-details.d.ts +1 -1
  36. package/dist/src/renderer/components/+workloads-overview/overview.d.ts +2 -0
  37. package/dist/src/renderer/components/+workloads-replicasets/replicaset-details.d.ts +1 -2
  38. package/dist/src/renderer/components/+workloads-statefulsets/statefulset-details.d.ts +0 -1
  39. package/dist/src/renderer/components/context.d.ts +8 -1
  40. package/dist/src/renderer/components/hotbar/hotbar-menu.d.ts +3 -0
  41. package/dist/src/renderer/components/kube-object-list-layout/kube-object-list-layout.d.ts +2 -0
  42. package/dist/src/renderer/components/notifications/notifications.d.ts +3 -3
  43. package/package.json +1 -1
  44. package/dist/src/renderer/components/getDiForUnitTesting.d.ts +0 -22
@@ -15084,7 +15084,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
15084
15084
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
15085
15085
 
15086
15086
  "use strict";
15087
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n.Icon {\\n --size: 21px;\\n --small-size: 18px;\\n --smallest-size: 16px;\\n --big-size: 32px;\\n --color-active: var(--iconActiveColor);\\n --bgc-active: var(--iconActiveBackground);\\n --focus-color: var(--icon-focus-color, var(--blue));\\n display: inline-flex;\\n flex-shrink: 0;\\n font-style: normal;\\n vertical-align: middle;\\n align-items: center;\\n justify-content: center;\\n text-decoration: none;\\n user-select: none;\\n box-sizing: content-box;\\n -webkit-user-select: none;\\n /* safari */\\n -moz-user-select: none;\\n /* firefox */\\n font-size: var(--size);\\n width: var(--size);\\n height: var(--size);\\n}\\n.Icon.smallest {\\n font-size: var(--smallest-size);\\n width: var(--smallest-size);\\n height: var(--smallest-size);\\n}\\n.Icon.small {\\n font-size: var(--small-size);\\n width: var(--small-size);\\n height: var(--small-size);\\n}\\n.Icon.big {\\n font-size: var(--big-size);\\n width: var(--big-size);\\n height: var(--big-size);\\n}\\n.Icon.material > .icon {\\n font-family: \\\"Material Icons\\\";\\n font-size: inherit;\\n font-weight: inherit;\\n font-style: inherit;\\n display: inline-block;\\n line-height: 1;\\n text-transform: none;\\n letter-spacing: normal;\\n word-wrap: normal;\\n white-space: nowrap;\\n direction: ltr;\\n /* Support for all WebKit browsers. */\\n -webkit-font-smoothing: antialiased;\\n /* Support for Safari and Chrome. */\\n text-rendering: optimizeLegibility;\\n /* Support for Firefox. */\\n -moz-osx-font-smoothing: grayscale;\\n /* Support for IE. */\\n font-feature-settings: \\\"liga\\\";\\n}\\n.Icon.svg {\\n box-sizing: content-box;\\n}\\n.Icon.svg > .icon {\\n width: 100%;\\n height: 100%;\\n}\\n.Icon.svg svg {\\n pointer-events: none;\\n width: 100%;\\n height: 100%;\\n}\\n.Icon.svg svg * {\\n fill: currentColor;\\n}\\n.Icon.svg svg line {\\n stroke: currentColor;\\n}\\n.Icon.disabled {\\n opacity: 0.5;\\n color: inherit !important;\\n cursor: not-allowed !important;\\n}\\n.Icon.sticker {\\n background: var(--colorOk);\\n color: var(--textColorAccent);\\n border-radius: 50%;\\n box-sizing: content-box;\\n padding: 4px;\\n}\\n.Icon.active, .Icon.interactive:hover {\\n color: var(--color-active);\\n box-shadow: 0 0 0 2px var(--iconActiveBackground);\\n background-color: var(--iconActiveBackground);\\n}\\n.Icon.interactive {\\n cursor: pointer;\\n transition: 250ms color, 250ms opacity, 150ms background-color, 150ms box-shadow;\\n border-radius: var(--border-radius);\\n}\\n.Icon.interactive.focusable:focus:not(:hover) {\\n box-shadow: 0 0 0 2px var(--focus-color);\\n}\\n[data-whatintent=mouse] .Icon.interactive.focusable:focus:not(:hover) {\\n box-shadow: none;\\n}\\n[data-whatintent=mouse] .Icon.interactive.focusable:focus:not(:hover).active, [data-whatintent=mouse] .Icon.interactive.focusable:focus:not(:hover):hover {\\n box-shadow: 0 0 0 2px var(--iconActiveBackground);\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./src/renderer/components/icon/icon.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--7-2");
15087
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n.Icon {\\n --size: 21px;\\n --small-size: 18px;\\n --smallest-size: 16px;\\n --big-size: 32px;\\n --color-active: var(--iconActiveColor);\\n --bgc-active: var(--iconActiveBackground);\\n --focus-color: var(--icon-focus-color, var(--blue));\\n display: inline-flex;\\n flex-shrink: 0;\\n font-style: normal;\\n vertical-align: middle;\\n align-items: center;\\n justify-content: center;\\n text-decoration: none;\\n user-select: none;\\n box-sizing: content-box;\\n -webkit-user-select: none;\\n /* safari */\\n -moz-user-select: none;\\n /* firefox */\\n font-size: var(--size);\\n width: var(--size);\\n height: var(--size);\\n}\\n.Icon.smallest {\\n font-size: var(--smallest-size);\\n width: var(--smallest-size);\\n height: var(--smallest-size);\\n}\\n.Icon.small {\\n font-size: var(--small-size);\\n width: var(--small-size);\\n height: var(--small-size);\\n}\\n.Icon.big {\\n font-size: var(--big-size);\\n width: var(--big-size);\\n height: var(--big-size);\\n}\\n.Icon.material > .icon {\\n font-family: \\\"Material Icons\\\";\\n font-size: inherit;\\n font-weight: inherit;\\n font-style: inherit;\\n display: inline-block;\\n line-height: 1;\\n text-transform: none;\\n letter-spacing: normal;\\n word-wrap: normal;\\n white-space: nowrap;\\n direction: ltr;\\n /* Support for all WebKit browsers. */\\n -webkit-font-smoothing: antialiased;\\n /* Support for Safari and Chrome. */\\n text-rendering: optimizeLegibility;\\n /* Support for Firefox. */\\n -moz-osx-font-smoothing: grayscale;\\n /* Support for IE. */\\n font-feature-settings: \\\"liga\\\";\\n}\\n.Icon.svg {\\n box-sizing: content-box;\\n}\\n.Icon.svg > .icon {\\n width: 100%;\\n height: 100%;\\n}\\n.Icon.svg svg {\\n pointer-events: none;\\n width: 100%;\\n height: 100%;\\n}\\n.Icon.svg svg * {\\n fill: currentColor;\\n}\\n.Icon.svg svg line {\\n stroke: currentColor;\\n}\\n.Icon.disabled {\\n opacity: 0.5;\\n color: inherit !important;\\n cursor: not-allowed !important;\\n}\\n.Icon.sticker {\\n background: var(--colorOk);\\n color: var(--textColorAccent);\\n border-radius: 50%;\\n box-sizing: content-box;\\n padding: 4px;\\n}\\n.Icon.active, .Icon.interactive:hover {\\n color: var(--textColorAccent);\\n box-shadow: 0 0 0 2px var(--iconActiveBackground);\\n background-color: var(--iconActiveBackground);\\n}\\n.Icon.interactive {\\n cursor: pointer;\\n transition: 250ms color, 250ms opacity, 150ms background-color, 150ms box-shadow;\\n border-radius: var(--border-radius);\\n}\\n.Icon.interactive.focusable:focus-visible {\\n box-shadow: 0 0 0 2px var(--focus-color);\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./src/renderer/components/icon/icon.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--7-2");
15088
15088
 
15089
15089
  /***/ }),
15090
15090
 
@@ -15312,7 +15312,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
15312
15312
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
15313
15313
 
15314
15314
  "use strict";
15315
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n.Notifications {\\n overflow: auto;\\n position: absolute;\\n right: 0;\\n top: 0;\\n padding: 16px;\\n max-height: 100vh;\\n z-index: 100000;\\n height: min-content !important;\\n}\\n.Notifications::-webkit-scrollbar {\\n width: 0;\\n height: 0;\\n background: transparent;\\n}\\n.Notifications:empty {\\n display: none;\\n}\\n.Notifications .notification {\\n flex: 0 0;\\n padding: 12px;\\n border-radius: 3px;\\n min-width: 350px;\\n max-width: 35vw;\\n word-break: break-word;\\n}\\n.Notifications .notification:not(:last-child) {\\n margin-bottom: 16px;\\n}\\n.Notifications .notification > .message {\\n white-space: pre-line;\\n padding-left: 8px;\\n padding-right: 16px;\\n}\\n.Notifications .notification > .message a {\\n color: inherit;\\n}\\n.Notifications .notification.ok {\\n background: var(--colorOk);\\n color: white;\\n box-shadow: 0 0 20px var(--boxShadow);\\n}\\n.Notifications .notification.error {\\n background: var(--colorError);\\n color: white;\\n box-shadow: 0 0 20px var(--boxShadow);\\n}\\n.Notifications .notification.info {\\n background: var(--colorInfo);\\n color: white;\\n box-shadow: 0 0 20px var(--boxShadow);\\n}\\n.Notifications .notification .close {\\n margin-top: -2px;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./src/renderer/components/notifications/notifications.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--7-2");
15315
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n.Notifications {\\n overflow: auto;\\n position: absolute;\\n right: 0;\\n top: 0;\\n padding: 16px;\\n max-height: 100vh;\\n z-index: 100000;\\n height: min-content !important;\\n}\\n.Notifications::-webkit-scrollbar {\\n width: 0;\\n height: 0;\\n background: transparent;\\n}\\n.Notifications:empty {\\n display: none;\\n}\\n.Notifications .notification {\\n flex: 0 0;\\n padding: 12px;\\n border-radius: 3px;\\n min-width: 350px;\\n max-width: 35vw;\\n word-break: break-word;\\n}\\n.Notifications .notification:not(:last-child) {\\n margin-bottom: 16px;\\n}\\n.Notifications .notification > .message {\\n white-space: pre-line;\\n padding-left: 8px;\\n padding-right: 16px;\\n align-self: center;\\n}\\n.Notifications .notification > .message a {\\n color: inherit;\\n}\\n.Notifications .notification.ok {\\n background: var(--colorOk);\\n color: white;\\n box-shadow: 0 0 20px var(--boxShadow);\\n}\\n.Notifications .notification.error {\\n background: var(--colorError);\\n color: white;\\n box-shadow: 0 0 20px var(--boxShadow);\\n}\\n.Notifications .notification.info {\\n background: var(--colorInfo);\\n color: white;\\n box-shadow: 0 0 20px var(--boxShadow);\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./src/renderer/components/notifications/notifications.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--7-2");
15316
15316
 
15317
15317
  /***/ }),
15318
15318
 
@@ -39770,7 +39770,7 @@ eval("class Node {\n\t/// value;\n\t/// next;\n\n\tconstructor(value) {\n\t\tthi
39770
39770
  /*! exports provided: name, productName, description, homepage, version, main, copyright, license, author, scripts, config, engines, jest, build, dependencies, devDependencies, default */
39771
39771
  /***/ (function(module) {
39772
39772
 
39773
- eval("module.exports = JSON.parse(\"{\\\"name\\\":\\\"open-lens\\\",\\\"productName\\\":\\\"OpenLens\\\",\\\"description\\\":\\\"OpenLens - Open Source IDE for Kubernetes\\\",\\\"homepage\\\":\\\"https://github.com/lensapp/lens\\\",\\\"version\\\":\\\"5.3.0\\\",\\\"main\\\":\\\"static/build/main.js\\\",\\\"copyright\\\":\\\"© 2021 OpenLens Authors\\\",\\\"license\\\":\\\"MIT\\\",\\\"author\\\":{\\\"name\\\":\\\"OpenLens Authors\\\",\\\"email\\\":\\\"info@k8slens.dev\\\"},\\\"scripts\\\":{\\\"dev\\\":\\\"concurrently -i -k \\\\\\\"yarn run dev-run -C\\\\\\\" yarn:dev:*\\\",\\\"dev-build\\\":\\\"concurrently yarn:compile:*\\\",\\\"debug-build\\\":\\\"concurrently yarn:compile:main yarn:compile:extension-types\\\",\\\"dev-run\\\":\\\"nodemon --watch static/build/main.js --exec \\\\\\\"electron --remote-debugging-port=9223 --inspect .\\\\\\\"\\\",\\\"dev:main\\\":\\\"yarn run compile:main --watch\\\",\\\"dev:renderer\\\":\\\"yarn run webpack-dev-server --config webpack.renderer.ts\\\",\\\"dev:extension-types\\\":\\\"yarn run compile:extension-types --watch\\\",\\\"compile\\\":\\\"env NODE_ENV=production concurrently yarn:compile:*\\\",\\\"compile:main\\\":\\\"yarn run webpack --config webpack.main.ts\\\",\\\"compile:renderer\\\":\\\"yarn run webpack --config webpack.renderer.ts\\\",\\\"compile:extension-types\\\":\\\"yarn run webpack --config webpack.extensions.ts\\\",\\\"npm:fix-build-version\\\":\\\"yarn run ts-node build/set_build_version.ts\\\",\\\"npm:fix-package-version\\\":\\\"yarn run ts-node build/set_npm_version.ts\\\",\\\"build:linux\\\":\\\"yarn run compile && electron-builder --linux --dir\\\",\\\"build:mac\\\":\\\"yarn run compile && electron-builder --mac --dir\\\",\\\"build:win\\\":\\\"yarn run compile && electron-builder --win --dir\\\",\\\"integration\\\":\\\"jest --runInBand --detectOpenHandles --forceExit integration\\\",\\\"dist\\\":\\\"yarn run compile && electron-builder --publish onTag\\\",\\\"dist:dir\\\":\\\"yarn run dist --dir -c.compression=store -c.mac.identity=null\\\",\\\"download-bins\\\":\\\"concurrently yarn:download:*\\\",\\\"download:kubectl\\\":\\\"yarn run ts-node build/download_kubectl.ts\\\",\\\"download:helm\\\":\\\"yarn run ts-node build/download_helm.ts\\\",\\\"build:tray-icons\\\":\\\"yarn run ts-node build/build_tray_icon.ts\\\",\\\"build:theme-vars\\\":\\\"yarn run ts-node build/build_theme_vars.ts\\\",\\\"lint\\\":\\\"PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .\\\",\\\"lint:fix\\\":\\\"yarn run lint --fix\\\",\\\"mkdocs-serve-local\\\":\\\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest\\\",\\\"verify-docs\\\":\\\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict\\\",\\\"typedocs-extensions-api\\\":\\\"yarn run typedoc src/extensions/extension-api.ts\\\",\\\"version-checkout\\\":\\\"cat package.json | jq '.version' -r | xargs printf \\\\\\\"release/v%s\\\\\\\" | xargs git checkout -b\\\",\\\"version-commit\\\":\\\"cat package.json | jq '.version' -r | xargs printf \\\\\\\"release v%s\\\\\\\" | git commit --no-edit -s -F -\\\",\\\"version\\\":\\\"yarn run version-checkout && git add package.json && yarn run version-commit\\\",\\\"postversion\\\":\\\"git push --set-upstream ${GIT_REMOTE:-origin} release/v$npm_package_version\\\"},\\\"config\\\":{\\\"bundledKubectlVersion\\\":\\\"1.21.2\\\",\\\"bundledHelmVersion\\\":\\\"3.6.3\\\",\\\"sentryDsn\\\":\\\"\\\"},\\\"engines\\\":{\\\"node\\\":\\\">=14 <15\\\"},\\\"jest\\\":{\\\"collectCoverage\\\":false,\\\"verbose\\\":true,\\\"transform\\\":{\\\"^.+\\\\\\\\.tsx?$\\\":\\\"ts-jest\\\"},\\\"moduleNameMapper\\\":{\\\"\\\\\\\\.(css|scss)$\\\":\\\"<rootDir>/__mocks__/styleMock.ts\\\",\\\"\\\\\\\\.(svg)$\\\":\\\"<rootDir>/__mocks__/imageMock.ts\\\",\\\"src/(.*)\\\":\\\"<rootDir>/__mocks__/windowMock.ts\\\"},\\\"modulePathIgnorePatterns\\\":[\\\"<rootDir>/dist\\\",\\\"<rootDir>/src/extensions/npm\\\"],\\\"setupFiles\\\":[\\\"<rootDir>/src/jest.setup.ts\\\",\\\"jest-canvas-mock\\\"]},\\\"build\\\":{\\\"generateUpdatesFilesForAllChannels\\\":true,\\\"files\\\":[\\\"static/build/main.js\\\"],\\\"afterSign\\\":\\\"build/notarize.js\\\",\\\"extraResources\\\":[{\\\"from\\\":\\\"locales/\\\",\\\"to\\\":\\\"locales/\\\",\\\"filter\\\":\\\"**/*.js\\\"},{\\\"from\\\":\\\"static/\\\",\\\"to\\\":\\\"static/\\\",\\\"filter\\\":\\\"!**/main.js\\\"},{\\\"from\\\":\\\"build/tray\\\",\\\"to\\\":\\\"static/icons\\\",\\\"filter\\\":\\\"*.png\\\"},{\\\"from\\\":\\\"extensions/\\\",\\\"to\\\":\\\"./extensions/\\\",\\\"filter\\\":[\\\"**/*.tgz\\\",\\\"**/package.json\\\",\\\"!**/node_modules\\\"]},{\\\"from\\\":\\\"templates/\\\",\\\"to\\\":\\\"./templates/\\\",\\\"filter\\\":\\\"**/*.yaml\\\"},\\\"LICENSE\\\"],\\\"linux\\\":{\\\"category\\\":\\\"Network\\\",\\\"artifactName\\\":\\\"${productName}-${version}.${arch}.${ext}\\\",\\\"target\\\":[\\\"deb\\\",\\\"rpm\\\",\\\"AppImage\\\"],\\\"extraResources\\\":[{\\\"from\\\":\\\"binaries/client/linux/${arch}/kubectl\\\",\\\"to\\\":\\\"./${arch}/kubectl\\\"},{\\\"from\\\":\\\"binaries/client/${arch}/helm3/helm3\\\",\\\"to\\\":\\\"./helm3/helm3\\\"}]},\\\"mac\\\":{\\\"hardenedRuntime\\\":true,\\\"gatekeeperAssess\\\":false,\\\"entitlements\\\":\\\"build/entitlements.mac.plist\\\",\\\"entitlementsInherit\\\":\\\"build/entitlements.mac.plist\\\",\\\"extraResources\\\":[{\\\"from\\\":\\\"binaries/client/darwin/${arch}/kubectl\\\",\\\"to\\\":\\\"./${arch}/kubectl\\\"},{\\\"from\\\":\\\"binaries/client/${arch}/helm3/helm3\\\",\\\"to\\\":\\\"./helm3/helm3\\\"}]},\\\"win\\\":{\\\"target\\\":[\\\"nsis\\\"],\\\"extraResources\\\":[{\\\"from\\\":\\\"binaries/client/windows/x64/kubectl.exe\\\",\\\"to\\\":\\\"./x64/kubectl.exe\\\"},{\\\"from\\\":\\\"binaries/client/windows/ia32/kubectl.exe\\\",\\\"to\\\":\\\"./ia32/kubectl.exe\\\"},{\\\"from\\\":\\\"binaries/client/x64/helm3/helm3.exe\\\",\\\"to\\\":\\\"./helm3/helm3.exe\\\"}]},\\\"nsis\\\":{\\\"include\\\":\\\"build/installer.nsh\\\",\\\"oneClick\\\":false,\\\"allowElevation\\\":true,\\\"createStartMenuShortcut\\\":true,\\\"allowToChangeInstallationDirectory\\\":true},\\\"protocols\\\":{\\\"name\\\":\\\"Lens Protocol Handler\\\",\\\"schemes\\\":[\\\"lens\\\"],\\\"role\\\":\\\"Viewer\\\"}},\\\"dependencies\\\":{\\\"@electron/remote\\\":\\\"^1.2.2\\\",\\\"@hapi/call\\\":\\\"^8.0.1\\\",\\\"@hapi/subtext\\\":\\\"^7.0.3\\\",\\\"@kubernetes/client-node\\\":\\\"^0.15.1\\\",\\\"@sentry/electron\\\":\\\"^2.5.4\\\",\\\"@sentry/integrations\\\":\\\"^6.15.0\\\",\\\"@ogre-tools/injectable\\\":\\\"^1.2.1\\\",\\\"@ogre-tools/injectable-react\\\":\\\"^1.2.1\\\",\\\"abort-controller\\\":\\\"^3.0.0\\\",\\\"auto-bind\\\":\\\"^4.0.0\\\",\\\"autobind-decorator\\\":\\\"^2.4.0\\\",\\\"await-lock\\\":\\\"^2.1.0\\\",\\\"byline\\\":\\\"^5.0.0\\\",\\\"chokidar\\\":\\\"^3.4.3\\\",\\\"conf\\\":\\\"^7.1.2\\\",\\\"crypto-js\\\":\\\"^4.1.1\\\",\\\"electron-devtools-installer\\\":\\\"^3.2.0\\\",\\\"electron-updater\\\":\\\"^4.6.1\\\",\\\"electron-window-state\\\":\\\"^5.0.3\\\",\\\"filehound\\\":\\\"^1.17.5\\\",\\\"fs-extra\\\":\\\"^9.0.1\\\",\\\"glob-to-regexp\\\":\\\"^0.4.1\\\",\\\"got\\\":\\\"^11.8.2\\\",\\\"grapheme-splitter\\\":\\\"^1.0.4\\\",\\\"handlebars\\\":\\\"^4.7.7\\\",\\\"http-proxy\\\":\\\"^1.18.1\\\",\\\"immer\\\":\\\"^9.0.6\\\",\\\"joi\\\":\\\"^17.4.2\\\",\\\"js-yaml\\\":\\\"^4.1.0\\\",\\\"jsdom\\\":\\\"^16.7.0\\\",\\\"jsonpath\\\":\\\"^1.1.1\\\",\\\"lodash\\\":\\\"^4.17.15\\\",\\\"mac-ca\\\":\\\"^1.0.6\\\",\\\"marked\\\":\\\"^2.1.3\\\",\\\"md5-file\\\":\\\"^5.0.0\\\",\\\"mobx\\\":\\\"^6.3.7\\\",\\\"mobx-observable-history\\\":\\\"^2.0.3\\\",\\\"mobx-react\\\":\\\"^7.2.1\\\",\\\"mock-fs\\\":\\\"^4.14.0\\\",\\\"moment\\\":\\\"^2.29.1\\\",\\\"moment-timezone\\\":\\\"^0.5.33\\\",\\\"monaco-editor\\\":\\\"^0.29.1\\\",\\\"monaco-editor-webpack-plugin\\\":\\\"^5.0.0\\\",\\\"node-fetch\\\":\\\"lensapp/node-fetch#2.x\\\",\\\"node-pty\\\":\\\"^0.10.1\\\",\\\"npm\\\":\\\"^6.14.15\\\",\\\"p-limit\\\":\\\"^3.1.0\\\",\\\"path-to-regexp\\\":\\\"^6.2.0\\\",\\\"proper-lockfile\\\":\\\"^4.1.2\\\",\\\"react\\\":\\\"^17.0.2\\\",\\\"react-dom\\\":\\\"^17.0.2\\\",\\\"react-material-ui-carousel\\\":\\\"^2.3.5\\\",\\\"react-router\\\":\\\"^5.2.0\\\",\\\"react-virtualized-auto-sizer\\\":\\\"^1.0.6\\\",\\\"readable-stream\\\":\\\"^3.6.0\\\",\\\"request\\\":\\\"^2.88.2\\\",\\\"request-promise-native\\\":\\\"^1.0.9\\\",\\\"rfc6902\\\":\\\"^4.0.2\\\",\\\"semver\\\":\\\"^7.3.2\\\",\\\"shell-env\\\":\\\"^3.0.1\\\",\\\"spdy\\\":\\\"^4.0.2\\\",\\\"tar\\\":\\\"^6.1.11\\\",\\\"tcp-port-used\\\":\\\"^1.0.2\\\",\\\"tempy\\\":\\\"1.0.1\\\",\\\"url-parse\\\":\\\"^1.5.3\\\",\\\"uuid\\\":\\\"^8.3.2\\\",\\\"win-ca\\\":\\\"^3.4.5\\\",\\\"winston\\\":\\\"^3.3.3\\\",\\\"winston-console-format\\\":\\\"^1.0.8\\\",\\\"winston-transport-browserconsole\\\":\\\"^1.0.5\\\",\\\"ws\\\":\\\"^7.5.5\\\"},\\\"devDependencies\\\":{\\\"@material-ui/core\\\":\\\"^4.12.3\\\",\\\"@material-ui/icons\\\":\\\"^4.11.2\\\",\\\"@material-ui/lab\\\":\\\"^4.0.0-alpha.60\\\",\\\"@pmmmwh/react-refresh-webpack-plugin\\\":\\\"^0.4.3\\\",\\\"@sentry/types\\\":\\\"^6.14.1\\\",\\\"@testing-library/jest-dom\\\":\\\"^5.15.0\\\",\\\"@testing-library/react\\\":\\\"^11.2.7\\\",\\\"@testing-library/user-event\\\":\\\"^13.5.0\\\",\\\"@types/byline\\\":\\\"^4.2.33\\\",\\\"@types/chart.js\\\":\\\"^2.9.34\\\",\\\"@types/color\\\":\\\"^3.0.2\\\",\\\"@types/crypto-js\\\":\\\"^3.1.47\\\",\\\"@types/dompurify\\\":\\\"^2.3.1\\\",\\\"@types/electron-devtools-installer\\\":\\\"^2.2.0\\\",\\\"@types/fs-extra\\\":\\\"^9.0.1\\\",\\\"@types/glob-to-regexp\\\":\\\"^0.4.1\\\",\\\"@types/hoist-non-react-statics\\\":\\\"^3.3.1\\\",\\\"@types/html-webpack-plugin\\\":\\\"^3.2.6\\\",\\\"@types/http-proxy\\\":\\\"^1.17.7\\\",\\\"@types/jest\\\":\\\"^26.0.24\\\",\\\"@types/js-yaml\\\":\\\"^4.0.4\\\",\\\"@types/jsdom\\\":\\\"^16.2.13\\\",\\\"@types/jsonpath\\\":\\\"^0.2.0\\\",\\\"@types/lodash\\\":\\\"^4.14.176\\\",\\\"@types/marked\\\":\\\"^2.0.5\\\",\\\"@types/md5-file\\\":\\\"^4.0.2\\\",\\\"@types/mini-css-extract-plugin\\\":\\\"^0.9.1\\\",\\\"@types/mock-fs\\\":\\\"^4.13.1\\\",\\\"@types/node\\\":\\\"14.17.33\\\",\\\"@types/node-fetch\\\":\\\"^2.5.12\\\",\\\"@types/npm\\\":\\\"^2.0.32\\\",\\\"@types/progress-bar-webpack-plugin\\\":\\\"^2.1.2\\\",\\\"@types/proper-lockfile\\\":\\\"^4.1.2\\\",\\\"@types/randomcolor\\\":\\\"^0.5.6\\\",\\\"@types/react\\\":\\\"^17.0.34\\\",\\\"@types/react-beautiful-dnd\\\":\\\"^13.1.2\\\",\\\"@types/react-dom\\\":\\\"^17.0.11\\\",\\\"@types/react-router-dom\\\":\\\"^5.3.2\\\",\\\"@types/react-select\\\":\\\"3.1.2\\\",\\\"@types/react-table\\\":\\\"^7.7.7\\\",\\\"@types/react-virtualized-auto-sizer\\\":\\\"^1.0.1\\\",\\\"@types/react-window\\\":\\\"^1.8.5\\\",\\\"@types/readable-stream\\\":\\\"^2.3.11\\\",\\\"@types/request\\\":\\\"^2.48.7\\\",\\\"@types/request-promise-native\\\":\\\"^1.0.18\\\",\\\"@types/semver\\\":\\\"^7.3.9\\\",\\\"@types/sharp\\\":\\\"^0.29.2\\\",\\\"@types/spdy\\\":\\\"^3.4.5\\\",\\\"@types/tar\\\":\\\"^4.0.5\\\",\\\"@types/tcp-port-used\\\":\\\"^1.0.0\\\",\\\"@types/tempy\\\":\\\"^0.3.0\\\",\\\"@types/triple-beam\\\":\\\"^1.3.2\\\",\\\"@types/url-parse\\\":\\\"^1.4.4\\\",\\\"@types/uuid\\\":\\\"^8.3.1\\\",\\\"@types/webpack\\\":\\\"^4.41.31\\\",\\\"@types/webpack-dev-server\\\":\\\"^3.11.6\\\",\\\"@types/webpack-env\\\":\\\"^1.16.3\\\",\\\"@types/webpack-node-externals\\\":\\\"^1.7.1\\\",\\\"@typescript-eslint/eslint-plugin\\\":\\\"^4.33.0\\\",\\\"@typescript-eslint/parser\\\":\\\"^4.33.0\\\",\\\"ansi_up\\\":\\\"^5.1.0\\\",\\\"chart.js\\\":\\\"^2.9.4\\\",\\\"circular-dependency-plugin\\\":\\\"^5.2.2\\\",\\\"color\\\":\\\"^3.2.1\\\",\\\"concurrently\\\":\\\"^5.3.0\\\",\\\"css-loader\\\":\\\"^5.2.7\\\",\\\"deepdash\\\":\\\"^5.3.9\\\",\\\"dompurify\\\":\\\"^2.3.3\\\",\\\"electron\\\":\\\"^13.6.1\\\",\\\"electron-builder\\\":\\\"^22.11.11\\\",\\\"electron-notarize\\\":\\\"^0.3.0\\\",\\\"esbuild\\\":\\\"^0.13.8\\\",\\\"esbuild-loader\\\":\\\"^2.16.0\\\",\\\"eslint\\\":\\\"^7.32.0\\\",\\\"eslint-plugin-header\\\":\\\"^3.1.1\\\",\\\"eslint-plugin-react\\\":\\\"^7.26.1\\\",\\\"eslint-plugin-react-hooks\\\":\\\"^4.2.0\\\",\\\"eslint-plugin-unused-imports\\\":\\\"^1.1.5\\\",\\\"file-loader\\\":\\\"^6.2.0\\\",\\\"flex.box\\\":\\\"^3.4.4\\\",\\\"fork-ts-checker-webpack-plugin\\\":\\\"^5.2.1\\\",\\\"hoist-non-react-statics\\\":\\\"^3.3.2\\\",\\\"html-webpack-plugin\\\":\\\"^4.5.2\\\",\\\"include-media\\\":\\\"^1.4.9\\\",\\\"jest\\\":\\\"26.6.3\\\",\\\"jest-canvas-mock\\\":\\\"^2.3.1\\\",\\\"jest-fetch-mock\\\":\\\"^3.0.3\\\",\\\"jest-mock-extended\\\":\\\"^1.0.18\\\",\\\"make-plural\\\":\\\"^6.2.2\\\",\\\"mini-css-extract-plugin\\\":\\\"^1.6.2\\\",\\\"node-gyp\\\":\\\"7.1.2\\\",\\\"node-loader\\\":\\\"^1.0.3\\\",\\\"nodemon\\\":\\\"^2.0.14\\\",\\\"playwright\\\":\\\"^1.15.2\\\",\\\"postcss\\\":\\\"^8.3.11\\\",\\\"postcss-loader\\\":\\\"4.3.0\\\",\\\"postinstall-postinstall\\\":\\\"^2.1.0\\\",\\\"progress-bar-webpack-plugin\\\":\\\"^2.1.0\\\",\\\"randomcolor\\\":\\\"^0.6.2\\\",\\\"raw-loader\\\":\\\"^4.0.2\\\",\\\"react-beautiful-dnd\\\":\\\"^13.1.0\\\",\\\"react-refresh\\\":\\\"^0.9.0\\\",\\\"react-router-dom\\\":\\\"^5.3.0\\\",\\\"react-select\\\":\\\"3.2.0\\\",\\\"react-select-event\\\":\\\"^5.1.0\\\",\\\"react-table\\\":\\\"^7.7.0\\\",\\\"react-window\\\":\\\"^1.8.6\\\",\\\"sass\\\":\\\"^1.43.4\\\",\\\"sass-loader\\\":\\\"^8.0.2\\\",\\\"sharp\\\":\\\"^0.29.2\\\",\\\"style-loader\\\":\\\"^2.0.0\\\",\\\"tailwindcss\\\":\\\"^2.2.19\\\",\\\"ts-jest\\\":\\\"26.5.6\\\",\\\"ts-loader\\\":\\\"^7.0.5\\\",\\\"ts-node\\\":\\\"^10.4.0\\\",\\\"type-fest\\\":\\\"^1.0.2\\\",\\\"typed-emitter\\\":\\\"^1.4.0\\\",\\\"typedoc\\\":\\\"0.22.7\\\",\\\"typedoc-plugin-markdown\\\":\\\"^3.11.3\\\",\\\"typeface-roboto\\\":\\\"^1.1.13\\\",\\\"typescript\\\":\\\"^4.5.2\\\",\\\"typescript-plugin-css-modules\\\":\\\"^3.4.0\\\",\\\"url-loader\\\":\\\"^4.1.1\\\",\\\"webpack\\\":\\\"^4.46.0\\\",\\\"webpack-cli\\\":\\\"^3.3.12\\\",\\\"webpack-dev-server\\\":\\\"^3.11.2\\\",\\\"webpack-node-externals\\\":\\\"^1.7.2\\\",\\\"what-input\\\":\\\"^5.2.10\\\",\\\"xterm\\\":\\\"^4.14.1\\\",\\\"xterm-addon-fit\\\":\\\"^0.5.0\\\"}}\");\n\n//# sourceURL=webpack:///./package.json?");
39773
+ eval("module.exports = JSON.parse(\"{\\\"name\\\":\\\"open-lens\\\",\\\"productName\\\":\\\"OpenLens\\\",\\\"description\\\":\\\"OpenLens - Open Source IDE for Kubernetes\\\",\\\"homepage\\\":\\\"https://github.com/lensapp/lens\\\",\\\"version\\\":\\\"5.3.3\\\",\\\"main\\\":\\\"static/build/main.js\\\",\\\"copyright\\\":\\\"© 2021 OpenLens Authors\\\",\\\"license\\\":\\\"MIT\\\",\\\"author\\\":{\\\"name\\\":\\\"OpenLens Authors\\\",\\\"email\\\":\\\"info@k8slens.dev\\\"},\\\"scripts\\\":{\\\"dev\\\":\\\"concurrently -i -k \\\\\\\"yarn run dev-run -C\\\\\\\" yarn:dev:*\\\",\\\"dev-build\\\":\\\"concurrently yarn:compile:*\\\",\\\"debug-build\\\":\\\"concurrently yarn:compile:main yarn:compile:extension-types\\\",\\\"dev-run\\\":\\\"nodemon --watch static/build/main.js --exec \\\\\\\"electron --remote-debugging-port=9223 --inspect .\\\\\\\"\\\",\\\"dev:main\\\":\\\"yarn run compile:main --watch\\\",\\\"dev:renderer\\\":\\\"yarn run webpack-dev-server --config webpack.renderer.ts\\\",\\\"dev:extension-types\\\":\\\"yarn run compile:extension-types --watch\\\",\\\"compile\\\":\\\"env NODE_ENV=production concurrently yarn:compile:*\\\",\\\"compile:main\\\":\\\"yarn run webpack --config webpack.main.ts\\\",\\\"compile:renderer\\\":\\\"yarn run webpack --config webpack.renderer.ts\\\",\\\"compile:extension-types\\\":\\\"yarn run webpack --config webpack.extensions.ts\\\",\\\"npm:fix-build-version\\\":\\\"yarn run ts-node build/set_build_version.ts\\\",\\\"npm:fix-package-version\\\":\\\"yarn run ts-node build/set_npm_version.ts\\\",\\\"build:linux\\\":\\\"yarn run compile && electron-builder --linux --dir\\\",\\\"build:mac\\\":\\\"yarn run compile && electron-builder --mac --dir\\\",\\\"build:win\\\":\\\"yarn run compile && electron-builder --win --dir\\\",\\\"integration\\\":\\\"jest --runInBand --detectOpenHandles --forceExit integration\\\",\\\"dist\\\":\\\"yarn run compile && electron-builder --publish onTag\\\",\\\"dist:dir\\\":\\\"yarn run dist --dir -c.compression=store -c.mac.identity=null\\\",\\\"download-bins\\\":\\\"concurrently yarn:download:*\\\",\\\"download:kubectl\\\":\\\"yarn run ts-node build/download_kubectl.ts\\\",\\\"download:helm\\\":\\\"yarn run ts-node build/download_helm.ts\\\",\\\"build:tray-icons\\\":\\\"yarn run ts-node build/build_tray_icon.ts\\\",\\\"build:theme-vars\\\":\\\"yarn run ts-node build/build_theme_vars.ts\\\",\\\"lint\\\":\\\"PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .\\\",\\\"lint:fix\\\":\\\"yarn run lint --fix\\\",\\\"mkdocs-serve-local\\\":\\\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest\\\",\\\"verify-docs\\\":\\\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict\\\",\\\"typedocs-extensions-api\\\":\\\"yarn run typedoc src/extensions/extension-api.ts\\\",\\\"version-checkout\\\":\\\"cat package.json | jq '.version' -r | xargs printf \\\\\\\"release/v%s\\\\\\\" | xargs git checkout -b\\\",\\\"version-commit\\\":\\\"cat package.json | jq '.version' -r | xargs printf \\\\\\\"release v%s\\\\\\\" | git commit --no-edit -s -F -\\\",\\\"version\\\":\\\"yarn run version-checkout && git add package.json && yarn run version-commit\\\",\\\"postversion\\\":\\\"git push --set-upstream ${GIT_REMOTE:-origin} release/v$npm_package_version\\\"},\\\"config\\\":{\\\"bundledKubectlVersion\\\":\\\"1.21.2\\\",\\\"bundledHelmVersion\\\":\\\"3.6.3\\\",\\\"sentryDsn\\\":\\\"\\\"},\\\"engines\\\":{\\\"node\\\":\\\">=14 <15\\\"},\\\"jest\\\":{\\\"collectCoverage\\\":false,\\\"verbose\\\":true,\\\"transform\\\":{\\\"^.+\\\\\\\\.tsx?$\\\":\\\"ts-jest\\\"},\\\"moduleNameMapper\\\":{\\\"\\\\\\\\.(css|scss)$\\\":\\\"<rootDir>/__mocks__/styleMock.ts\\\",\\\"\\\\\\\\.(svg)$\\\":\\\"<rootDir>/__mocks__/imageMock.ts\\\",\\\"src/(.*)\\\":\\\"<rootDir>/__mocks__/windowMock.ts\\\"},\\\"modulePathIgnorePatterns\\\":[\\\"<rootDir>/dist\\\",\\\"<rootDir>/src/extensions/npm\\\"],\\\"setupFiles\\\":[\\\"<rootDir>/src/jest.setup.ts\\\",\\\"jest-canvas-mock\\\"]},\\\"build\\\":{\\\"generateUpdatesFilesForAllChannels\\\":true,\\\"files\\\":[\\\"static/build/main.js\\\"],\\\"afterSign\\\":\\\"build/notarize.js\\\",\\\"extraResources\\\":[{\\\"from\\\":\\\"locales/\\\",\\\"to\\\":\\\"locales/\\\",\\\"filter\\\":\\\"**/*.js\\\"},{\\\"from\\\":\\\"static/\\\",\\\"to\\\":\\\"static/\\\",\\\"filter\\\":\\\"!**/main.js\\\"},{\\\"from\\\":\\\"build/tray\\\",\\\"to\\\":\\\"static/icons\\\",\\\"filter\\\":\\\"*.png\\\"},{\\\"from\\\":\\\"extensions/\\\",\\\"to\\\":\\\"./extensions/\\\",\\\"filter\\\":[\\\"**/*.tgz\\\",\\\"**/package.json\\\",\\\"!**/node_modules\\\"]},{\\\"from\\\":\\\"templates/\\\",\\\"to\\\":\\\"./templates/\\\",\\\"filter\\\":\\\"**/*.yaml\\\"},\\\"LICENSE\\\"],\\\"linux\\\":{\\\"category\\\":\\\"Network\\\",\\\"artifactName\\\":\\\"${productName}-${version}.${arch}.${ext}\\\",\\\"target\\\":[\\\"deb\\\",\\\"rpm\\\",\\\"AppImage\\\"],\\\"extraResources\\\":[{\\\"from\\\":\\\"binaries/client/linux/${arch}/kubectl\\\",\\\"to\\\":\\\"./${arch}/kubectl\\\"},{\\\"from\\\":\\\"binaries/client/${arch}/helm3/helm3\\\",\\\"to\\\":\\\"./helm3/helm3\\\"}]},\\\"rpm\\\":{\\\"fpm\\\":[\\\"--rpm-rpmbuild-define=%define _build_id_links none\\\"]},\\\"mac\\\":{\\\"hardenedRuntime\\\":true,\\\"gatekeeperAssess\\\":false,\\\"entitlements\\\":\\\"build/entitlements.mac.plist\\\",\\\"entitlementsInherit\\\":\\\"build/entitlements.mac.plist\\\",\\\"extraResources\\\":[{\\\"from\\\":\\\"binaries/client/darwin/${arch}/kubectl\\\",\\\"to\\\":\\\"./${arch}/kubectl\\\"},{\\\"from\\\":\\\"binaries/client/${arch}/helm3/helm3\\\",\\\"to\\\":\\\"./helm3/helm3\\\"}]},\\\"win\\\":{\\\"target\\\":[\\\"nsis\\\"],\\\"extraResources\\\":[{\\\"from\\\":\\\"binaries/client/windows/x64/kubectl.exe\\\",\\\"to\\\":\\\"./x64/kubectl.exe\\\"},{\\\"from\\\":\\\"binaries/client/windows/ia32/kubectl.exe\\\",\\\"to\\\":\\\"./ia32/kubectl.exe\\\"},{\\\"from\\\":\\\"binaries/client/x64/helm3/helm3.exe\\\",\\\"to\\\":\\\"./helm3/helm3.exe\\\"}]},\\\"nsis\\\":{\\\"include\\\":\\\"build/installer.nsh\\\",\\\"oneClick\\\":false,\\\"allowElevation\\\":true,\\\"createStartMenuShortcut\\\":true,\\\"allowToChangeInstallationDirectory\\\":true},\\\"protocols\\\":{\\\"name\\\":\\\"Lens Protocol Handler\\\",\\\"schemes\\\":[\\\"lens\\\"],\\\"role\\\":\\\"Viewer\\\"}},\\\"dependencies\\\":{\\\"@electron/remote\\\":\\\"^1.2.2\\\",\\\"@hapi/call\\\":\\\"^8.0.1\\\",\\\"@hapi/subtext\\\":\\\"^7.0.3\\\",\\\"@kubernetes/client-node\\\":\\\"^0.15.1\\\",\\\"@sentry/electron\\\":\\\"^2.5.4\\\",\\\"@sentry/integrations\\\":\\\"^6.13.3\\\",\\\"abort-controller\\\":\\\"^3.0.0\\\",\\\"auto-bind\\\":\\\"^4.0.0\\\",\\\"autobind-decorator\\\":\\\"^2.4.0\\\",\\\"await-lock\\\":\\\"^2.1.0\\\",\\\"byline\\\":\\\"^5.0.0\\\",\\\"chokidar\\\":\\\"^3.4.3\\\",\\\"conf\\\":\\\"^7.1.2\\\",\\\"crypto-js\\\":\\\"^4.1.1\\\",\\\"electron-devtools-installer\\\":\\\"^3.2.0\\\",\\\"electron-updater\\\":\\\"^4.6.1\\\",\\\"electron-window-state\\\":\\\"^5.0.3\\\",\\\"filehound\\\":\\\"^1.17.5\\\",\\\"fs-extra\\\":\\\"^9.0.1\\\",\\\"glob-to-regexp\\\":\\\"^0.4.1\\\",\\\"got\\\":\\\"^11.8.2\\\",\\\"grapheme-splitter\\\":\\\"^1.0.4\\\",\\\"handlebars\\\":\\\"^4.7.7\\\",\\\"http-proxy\\\":\\\"^1.18.1\\\",\\\"immer\\\":\\\"^9.0.6\\\",\\\"joi\\\":\\\"^17.4.2\\\",\\\"js-yaml\\\":\\\"^4.1.0\\\",\\\"jsdom\\\":\\\"^16.7.0\\\",\\\"jsonpath\\\":\\\"^1.1.1\\\",\\\"lodash\\\":\\\"^4.17.15\\\",\\\"mac-ca\\\":\\\"^1.0.6\\\",\\\"marked\\\":\\\"^2.1.3\\\",\\\"md5-file\\\":\\\"^5.0.0\\\",\\\"mobx\\\":\\\"^6.3.7\\\",\\\"mobx-observable-history\\\":\\\"^2.0.3\\\",\\\"mobx-react\\\":\\\"^7.2.1\\\",\\\"mock-fs\\\":\\\"^4.14.0\\\",\\\"moment\\\":\\\"^2.29.1\\\",\\\"moment-timezone\\\":\\\"^0.5.33\\\",\\\"monaco-editor\\\":\\\"^0.29.1\\\",\\\"monaco-editor-webpack-plugin\\\":\\\"^5.0.0\\\",\\\"node-fetch\\\":\\\"lensapp/node-fetch#2.x\\\",\\\"node-pty\\\":\\\"^0.10.1\\\",\\\"npm\\\":\\\"^6.14.15\\\",\\\"p-limit\\\":\\\"^3.1.0\\\",\\\"path-to-regexp\\\":\\\"^6.2.0\\\",\\\"proper-lockfile\\\":\\\"^4.1.2\\\",\\\"react\\\":\\\"^17.0.2\\\",\\\"react-dom\\\":\\\"^17.0.2\\\",\\\"react-material-ui-carousel\\\":\\\"^2.3.5\\\",\\\"react-router\\\":\\\"^5.2.0\\\",\\\"react-virtualized-auto-sizer\\\":\\\"^1.0.6\\\",\\\"readable-stream\\\":\\\"^3.6.0\\\",\\\"request\\\":\\\"^2.88.2\\\",\\\"request-promise-native\\\":\\\"^1.0.9\\\",\\\"rfc6902\\\":\\\"^4.0.2\\\",\\\"semver\\\":\\\"^7.3.2\\\",\\\"shell-env\\\":\\\"^3.0.1\\\",\\\"spdy\\\":\\\"^4.0.2\\\",\\\"tar\\\":\\\"^6.1.11\\\",\\\"tcp-port-used\\\":\\\"^1.0.2\\\",\\\"tempy\\\":\\\"1.0.1\\\",\\\"url-parse\\\":\\\"^1.5.3\\\",\\\"uuid\\\":\\\"^8.3.2\\\",\\\"win-ca\\\":\\\"^3.4.5\\\",\\\"winston\\\":\\\"^3.3.3\\\",\\\"winston-console-format\\\":\\\"^1.0.8\\\",\\\"winston-transport-browserconsole\\\":\\\"^1.0.5\\\",\\\"ws\\\":\\\"^7.5.5\\\"},\\\"devDependencies\\\":{\\\"@material-ui/core\\\":\\\"^4.12.3\\\",\\\"@material-ui/icons\\\":\\\"^4.11.2\\\",\\\"@material-ui/lab\\\":\\\"^4.0.0-alpha.60\\\",\\\"@pmmmwh/react-refresh-webpack-plugin\\\":\\\"^0.4.3\\\",\\\"@sentry/types\\\":\\\"^6.14.1\\\",\\\"@testing-library/jest-dom\\\":\\\"^5.15.0\\\",\\\"@testing-library/react\\\":\\\"^11.2.7\\\",\\\"@testing-library/user-event\\\":\\\"^13.5.0\\\",\\\"@types/byline\\\":\\\"^4.2.33\\\",\\\"@types/chart.js\\\":\\\"^2.9.34\\\",\\\"@types/color\\\":\\\"^3.0.2\\\",\\\"@types/crypto-js\\\":\\\"^3.1.47\\\",\\\"@types/dompurify\\\":\\\"^2.3.1\\\",\\\"@types/electron-devtools-installer\\\":\\\"^2.2.0\\\",\\\"@types/fs-extra\\\":\\\"^9.0.1\\\",\\\"@types/glob-to-regexp\\\":\\\"^0.4.1\\\",\\\"@types/hoist-non-react-statics\\\":\\\"^3.3.1\\\",\\\"@types/html-webpack-plugin\\\":\\\"^3.2.6\\\",\\\"@types/http-proxy\\\":\\\"^1.17.7\\\",\\\"@types/jest\\\":\\\"^26.0.24\\\",\\\"@types/js-yaml\\\":\\\"^4.0.4\\\",\\\"@types/jsdom\\\":\\\"^16.2.13\\\",\\\"@types/jsonpath\\\":\\\"^0.2.0\\\",\\\"@types/lodash\\\":\\\"^4.14.176\\\",\\\"@types/marked\\\":\\\"^2.0.5\\\",\\\"@types/md5-file\\\":\\\"^4.0.2\\\",\\\"@types/mini-css-extract-plugin\\\":\\\"^0.9.1\\\",\\\"@types/mock-fs\\\":\\\"^4.13.1\\\",\\\"@types/node\\\":\\\"14.17.33\\\",\\\"@types/node-fetch\\\":\\\"^2.5.12\\\",\\\"@types/npm\\\":\\\"^2.0.32\\\",\\\"@types/progress-bar-webpack-plugin\\\":\\\"^2.1.2\\\",\\\"@types/proper-lockfile\\\":\\\"^4.1.2\\\",\\\"@types/randomcolor\\\":\\\"^0.5.6\\\",\\\"@types/react\\\":\\\"^17.0.34\\\",\\\"@types/react-beautiful-dnd\\\":\\\"^13.1.2\\\",\\\"@types/react-dom\\\":\\\"^17.0.9\\\",\\\"@types/react-router-dom\\\":\\\"^5.3.2\\\",\\\"@types/react-select\\\":\\\"3.1.2\\\",\\\"@types/react-table\\\":\\\"^7.7.7\\\",\\\"@types/react-virtualized-auto-sizer\\\":\\\"^1.0.1\\\",\\\"@types/react-window\\\":\\\"^1.8.5\\\",\\\"@types/readable-stream\\\":\\\"^2.3.11\\\",\\\"@types/request\\\":\\\"^2.48.7\\\",\\\"@types/request-promise-native\\\":\\\"^1.0.18\\\",\\\"@types/semver\\\":\\\"^7.3.9\\\",\\\"@types/sharp\\\":\\\"^0.29.2\\\",\\\"@types/spdy\\\":\\\"^3.4.5\\\",\\\"@types/tar\\\":\\\"^4.0.5\\\",\\\"@types/tcp-port-used\\\":\\\"^1.0.0\\\",\\\"@types/tempy\\\":\\\"^0.3.0\\\",\\\"@types/triple-beam\\\":\\\"^1.3.2\\\",\\\"@types/url-parse\\\":\\\"^1.4.4\\\",\\\"@types/uuid\\\":\\\"^8.3.1\\\",\\\"@types/webpack\\\":\\\"^4.41.31\\\",\\\"@types/webpack-dev-server\\\":\\\"^3.11.6\\\",\\\"@types/webpack-env\\\":\\\"^1.16.3\\\",\\\"@types/webpack-node-externals\\\":\\\"^1.7.1\\\",\\\"@typescript-eslint/eslint-plugin\\\":\\\"^4.33.0\\\",\\\"@typescript-eslint/parser\\\":\\\"^4.33.0\\\",\\\"ansi_up\\\":\\\"^5.0.1\\\",\\\"chart.js\\\":\\\"^2.9.4\\\",\\\"circular-dependency-plugin\\\":\\\"^5.2.2\\\",\\\"color\\\":\\\"^3.1.2\\\",\\\"concurrently\\\":\\\"^5.3.0\\\",\\\"css-loader\\\":\\\"^5.2.7\\\",\\\"deepdash\\\":\\\"^5.3.9\\\",\\\"dompurify\\\":\\\"^2.3.3\\\",\\\"electron\\\":\\\"^13.6.1\\\",\\\"electron-builder\\\":\\\"^22.11.11\\\",\\\"electron-notarize\\\":\\\"^0.3.0\\\",\\\"esbuild\\\":\\\"^0.13.8\\\",\\\"esbuild-loader\\\":\\\"^2.16.0\\\",\\\"eslint\\\":\\\"^7.32.0\\\",\\\"eslint-plugin-header\\\":\\\"^3.1.1\\\",\\\"eslint-plugin-react\\\":\\\"^7.26.1\\\",\\\"eslint-plugin-react-hooks\\\":\\\"^4.2.0\\\",\\\"eslint-plugin-unused-imports\\\":\\\"^1.1.5\\\",\\\"file-loader\\\":\\\"^6.2.0\\\",\\\"flex.box\\\":\\\"^3.4.4\\\",\\\"fork-ts-checker-webpack-plugin\\\":\\\"^5.2.1\\\",\\\"hoist-non-react-statics\\\":\\\"^3.3.2\\\",\\\"html-webpack-plugin\\\":\\\"^4.5.2\\\",\\\"include-media\\\":\\\"^1.4.9\\\",\\\"jest\\\":\\\"26.6.3\\\",\\\"jest-canvas-mock\\\":\\\"^2.3.1\\\",\\\"jest-fetch-mock\\\":\\\"^3.0.3\\\",\\\"jest-mock-extended\\\":\\\"^1.0.18\\\",\\\"make-plural\\\":\\\"^6.2.2\\\",\\\"mini-css-extract-plugin\\\":\\\"^1.6.2\\\",\\\"node-gyp\\\":\\\"7.1.2\\\",\\\"node-loader\\\":\\\"^1.0.3\\\",\\\"nodemon\\\":\\\"^2.0.14\\\",\\\"playwright\\\":\\\"^1.15.2\\\",\\\"postcss\\\":\\\"^8.3.11\\\",\\\"postcss-loader\\\":\\\"4.3.0\\\",\\\"postinstall-postinstall\\\":\\\"^2.1.0\\\",\\\"progress-bar-webpack-plugin\\\":\\\"^2.1.0\\\",\\\"randomcolor\\\":\\\"^0.6.2\\\",\\\"raw-loader\\\":\\\"^4.0.2\\\",\\\"react-beautiful-dnd\\\":\\\"^13.1.0\\\",\\\"react-refresh\\\":\\\"^0.9.0\\\",\\\"react-router-dom\\\":\\\"^5.3.0\\\",\\\"react-select\\\":\\\"3.2.0\\\",\\\"react-select-event\\\":\\\"^5.1.0\\\",\\\"react-table\\\":\\\"^7.7.0\\\",\\\"react-window\\\":\\\"^1.8.6\\\",\\\"sass\\\":\\\"^1.43.4\\\",\\\"sass-loader\\\":\\\"^8.0.2\\\",\\\"sharp\\\":\\\"^0.29.2\\\",\\\"style-loader\\\":\\\"^2.0.0\\\",\\\"tailwindcss\\\":\\\"^2.2.19\\\",\\\"ts-jest\\\":\\\"26.5.6\\\",\\\"ts-loader\\\":\\\"^7.0.5\\\",\\\"ts-node\\\":\\\"^10.4.0\\\",\\\"type-fest\\\":\\\"^1.0.2\\\",\\\"typed-emitter\\\":\\\"^1.4.0\\\",\\\"typedoc\\\":\\\"0.22.7\\\",\\\"typedoc-plugin-markdown\\\":\\\"^3.11.3\\\",\\\"typeface-roboto\\\":\\\"^1.1.13\\\",\\\"typescript\\\":\\\"^4.4.4\\\",\\\"typescript-plugin-css-modules\\\":\\\"^3.4.0\\\",\\\"url-loader\\\":\\\"^4.1.1\\\",\\\"webpack\\\":\\\"^4.46.0\\\",\\\"webpack-cli\\\":\\\"^3.3.12\\\",\\\"webpack-dev-server\\\":\\\"^3.11.2\\\",\\\"webpack-node-externals\\\":\\\"^1.7.2\\\",\\\"xterm\\\":\\\"^4.14.1\\\",\\\"xterm-addon-fit\\\":\\\"^0.5.0\\\"}}\");\n\n//# sourceURL=webpack:///./package.json?");
39774
39774
 
39775
39775
  /***/ }),
39776
39776
 
@@ -39782,7 +39782,7 @@ eval("module.exports = JSON.parse(\"{\\\"name\\\":\\\"open-lens\\\",\\\"productN
39782
39782
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
39783
39783
 
39784
39784
  "use strict";
39785
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AppPaths\", function() { return AppPaths; });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ \"./src/common/logger.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _vars__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./vars */ \"./src/common/vars.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\n\nconst pathNames = [\n \"home\",\n \"appData\",\n \"userData\",\n \"cache\",\n \"temp\",\n \"exe\",\n \"module\",\n \"desktop\",\n \"documents\",\n \"downloads\",\n \"music\",\n \"pictures\",\n \"videos\",\n \"logs\",\n \"crashDumps\",\n];\nif (_vars__WEBPACK_IMPORTED_MODULE_5__[\"isWindows\"]) {\n pathNames.push(\"recent\");\n}\nclass AppPaths {\n /**\n * Initializes the local copy of the paths from electron.\n */\n static async init() {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[APP-PATHS]: initializing`);\n if (AppPaths.paths.get()) {\n return void _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(\"[APP-PATHS]: init called more than once\");\n }\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"]) {\n AppPaths.initMain();\n }\n else {\n await AppPaths.initRenderer();\n }\n }\n static initMain() {\n if (process.env.CICD) {\n electron__WEBPACK_IMPORTED_MODULE_0__[\"app\"].setPath(\"appData\", process.env.CICD);\n }\n electron__WEBPACK_IMPORTED_MODULE_0__[\"app\"].setPath(\"userData\", path__WEBPACK_IMPORTED_MODULE_2___default.a.join(electron__WEBPACK_IMPORTED_MODULE_0__[\"app\"].getPath(\"appData\"), electron__WEBPACK_IMPORTED_MODULE_0__[\"app\"].getName()));\n AppPaths.paths.set(Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"fromEntries\"])(pathNames.map(pathName => [pathName, electron__WEBPACK_IMPORTED_MODULE_0__[\"app\"].getPath(pathName)])));\n electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"].handle(AppPaths.ipcChannel, () => Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"toJS\"])(AppPaths.paths.get()));\n }\n static async initRenderer() {\n const paths = await electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcRenderer\"].invoke(AppPaths.ipcChannel);\n if (!paths || typeof paths !== \"object\") {\n throw Object.assign(new Error(\"[APP-PATHS]: ipc handler returned unexpected data\"), { data: paths });\n }\n AppPaths.paths.set(paths);\n }\n /**\n * An alternative to `app.getPath()` for use in renderer and common.\n * This function throws if called before initialization.\n * @param name The name of the path field\n */\n static get(name) {\n if (!AppPaths.paths.get()) {\n throw new Error(\"AppPaths.init() has not been called\");\n }\n return AppPaths.paths.get()[name];\n }\n /**\n * An async version of `AppPaths.get()` which waits for `AppPaths.init()` to\n * be called before returning\n */\n static async getAsync(name) {\n await Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"when\"])(() => Boolean(AppPaths.paths.get()));\n return AppPaths.paths.get()[name];\n }\n}\nObject.defineProperty(AppPaths, \"paths\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"].box()\n});\nObject.defineProperty(AppPaths, \"ipcChannel\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"get-app-paths\"\n});\n\n\n//# sourceURL=webpack:///./src/common/app-paths.ts?");
39785
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AppPaths\", function() { return AppPaths; });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ \"./src/common/logger.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _vars__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./vars */ \"./src/common/vars.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\n\nconst pathNames = [\n \"home\",\n \"appData\",\n \"userData\",\n \"cache\",\n \"temp\",\n \"exe\",\n \"module\",\n \"desktop\",\n \"documents\",\n \"downloads\",\n \"music\",\n \"pictures\",\n \"videos\",\n \"logs\",\n \"crashDumps\",\n];\nif (_vars__WEBPACK_IMPORTED_MODULE_5__[\"isWindows\"]) {\n pathNames.push(\"recent\");\n}\nclass AppPaths {\n /**\n * Initializes the local copy of the paths from electron.\n */\n static async init() {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[APP-PATHS]: initializing`);\n if (AppPaths.paths.get()) {\n return void _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(\"[APP-PATHS]: init called more than once\");\n }\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"]) {\n AppPaths.initMain();\n }\n else {\n await AppPaths.initRenderer();\n }\n }\n static initMain() {\n if (process.env.CICD) {\n electron__WEBPACK_IMPORTED_MODULE_0__[\"app\"].setPath(\"appData\", process.env.CICD);\n }\n electron__WEBPACK_IMPORTED_MODULE_0__[\"app\"].setPath(\"userData\", path__WEBPACK_IMPORTED_MODULE_2___default.a.join(electron__WEBPACK_IMPORTED_MODULE_0__[\"app\"].getPath(\"appData\"), electron__WEBPACK_IMPORTED_MODULE_0__[\"app\"].getName()));\n const getPath = (pathName) => {\n try {\n return electron__WEBPACK_IMPORTED_MODULE_0__[\"app\"].getPath(pathName);\n }\n catch (_a) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`[APP-PATHS] No path found for ${pathName}`);\n return \"\";\n }\n };\n AppPaths.paths.set(Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"fromEntries\"])(pathNames.map(pathName => [pathName, getPath(pathName)]).filter(([, path]) => path)));\n electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"].handle(AppPaths.ipcChannel, () => Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"toJS\"])(AppPaths.paths.get()));\n }\n static async initRenderer() {\n const paths = await electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcRenderer\"].invoke(AppPaths.ipcChannel);\n if (!paths || typeof paths !== \"object\") {\n throw Object.assign(new Error(\"[APP-PATHS]: ipc handler returned unexpected data\"), { data: paths });\n }\n AppPaths.paths.set(paths);\n }\n /**\n * An alternative to `app.getPath()` for use in renderer and common.\n * This function throws if called before initialization.\n * @param name The name of the path field\n */\n static get(name) {\n if (!AppPaths.paths.get()) {\n throw new Error(\"AppPaths.init() has not been called\");\n }\n return AppPaths.paths.get()[name];\n }\n /**\n * An async version of `AppPaths.get()` which waits for `AppPaths.init()` to\n * be called before returning\n */\n static async getAsync(name) {\n await Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"when\"])(() => Boolean(AppPaths.paths.get()));\n return AppPaths.paths.get()[name];\n }\n}\nObject.defineProperty(AppPaths, \"paths\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"].box()\n});\nObject.defineProperty(AppPaths, \"ipcChannel\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"get-app-paths\"\n});\n\n\n//# sourceURL=webpack:///./src/common/app-paths.ts?");
39786
39786
 
39787
39787
  /***/ }),
39788
39788
 
@@ -40070,7 +40070,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
40070
40070
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
40071
40071
 
40072
40072
  "use strict";
40073
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ApiManager\", function() { return ApiManager; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"apiManager\", function() { return apiManager; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\nclass ApiManager {\n constructor() {\n Object.defineProperty(this, \"apis\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].map()\n });\n Object.defineProperty(this, \"stores\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].map()\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"autoBind\"])(this);\n }\n getApi(pathOrCallback) {\n if (typeof pathOrCallback === \"string\") {\n return this.apis.get(pathOrCallback) || this.apis.get(Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_2__[\"parseKubeApi\"])(pathOrCallback).apiBase);\n }\n return _utils__WEBPACK_IMPORTED_MODULE_1__[\"iter\"].find(this.apis.values(), pathOrCallback !== null && pathOrCallback !== void 0 ? pathOrCallback : (() => true));\n }\n getApiByKind(kind, apiVersion) {\n return _utils__WEBPACK_IMPORTED_MODULE_1__[\"iter\"].find(this.apis.values(), api => api.kind === kind && api.apiVersionWithGroup === apiVersion);\n }\n registerApi(apiBase, api) {\n if (!api.apiBase)\n return;\n if (!this.apis.has(apiBase)) {\n this.stores.forEach((store) => {\n if (store.api === api) {\n this.stores.set(apiBase, store);\n }\n });\n this.apis.set(apiBase, api);\n }\n }\n resolveApi(api) {\n if (!api) {\n return undefined;\n }\n if (typeof api === \"string\") {\n return this.getApi(api);\n }\n return api;\n }\n unregisterApi(api) {\n if (typeof api === \"string\")\n this.apis.delete(api);\n else {\n const apis = Array.from(this.apis.entries());\n const entry = apis.find(entry => entry[1] === api);\n if (entry)\n this.unregisterApi(entry[0]);\n }\n }\n registerStore(store, apis = [store.api]) {\n apis.filter(Boolean).forEach(api => {\n if (api.apiBase)\n this.stores.set(api.apiBase, store);\n });\n }\n getStore(api) {\n var _a;\n return this.stores.get((_a = this.resolveApi(api)) === null || _a === void 0 ? void 0 : _a.apiBase);\n }\n lookupApiLink(ref, parentObject) {\n const { kind, apiVersion, name, namespace = parentObject === null || parentObject === void 0 ? void 0 : parentObject.getNs(), } = ref;\n if (!kind)\n return \"\";\n // search in registered apis by 'kind' & 'apiVersion'\n const api = this.getApi(api => api.kind === kind && api.apiVersionWithGroup == apiVersion);\n if (api) {\n return api.getUrl({ namespace, name });\n }\n // lookup api by generated resource link\n const apiPrefixes = [\"/apis\", \"/api\"];\n const resource = kind.endsWith(\"s\") ? `${kind.toLowerCase()}es` : `${kind.toLowerCase()}s`;\n for (const apiPrefix of apiPrefixes) {\n const apiLink = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_2__[\"createKubeApiURL\"])({ apiPrefix, apiVersion, name, namespace, resource });\n if (this.getApi(apiLink)) {\n return apiLink;\n }\n }\n // resolve by kind only (hpa's might use refs to older versions of resources for example)\n const apiByKind = this.getApi(api => api.kind === kind);\n if (apiByKind) {\n return apiByKind.getUrl({ name, namespace });\n }\n // otherwise generate link with default prefix\n // resource still might exists in k8s, but api is not registered in the app\n return Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_2__[\"createKubeApiURL\"])({ apiVersion, name, namespace, resource });\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Function, Array]),\n __metadata(\"design:returntype\", void 0)\n], ApiManager.prototype, \"registerStore\", null);\nconst apiManager = new ApiManager();\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/api-manager.ts?");
40073
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ApiManager\", function() { return ApiManager; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"apiManager\", function() { return apiManager; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\nclass ApiManager {\n constructor() {\n Object.defineProperty(this, \"apis\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].map()\n });\n Object.defineProperty(this, \"stores\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].map()\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"autoBind\"])(this);\n }\n getApi(pathOrCallback) {\n if (typeof pathOrCallback === \"string\") {\n return this.apis.get(pathOrCallback) || this.apis.get(Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_2__[\"parseKubeApi\"])(pathOrCallback).apiBase);\n }\n return _utils__WEBPACK_IMPORTED_MODULE_1__[\"iter\"].find(this.apis.values(), pathOrCallback !== null && pathOrCallback !== void 0 ? pathOrCallback : (() => true));\n }\n getApiByKind(kind, apiVersion) {\n return _utils__WEBPACK_IMPORTED_MODULE_1__[\"iter\"].find(this.apis.values(), api => api.kind === kind && api.apiVersionWithGroup === apiVersion);\n }\n registerApi(apiBase, api) {\n if (!api.apiBase)\n return;\n if (!this.apis.has(apiBase)) {\n this.stores.forEach((store) => {\n if (store.api === api) {\n this.stores.set(apiBase, store);\n }\n });\n this.apis.set(apiBase, api);\n }\n }\n resolveApi(api) {\n if (!api) {\n return undefined;\n }\n if (typeof api === \"string\") {\n return this.getApi(api);\n }\n return api;\n }\n unregisterApi(api) {\n if (typeof api === \"string\")\n this.apis.delete(api);\n else {\n const apis = Array.from(this.apis.entries());\n const entry = apis.find(entry => entry[1] === api);\n if (entry)\n this.unregisterApi(entry[0]);\n }\n }\n registerStore(store, apis = [store.api]) {\n apis.filter(Boolean).forEach(api => {\n if (api.apiBase)\n this.stores.set(api.apiBase, store);\n });\n }\n getStore(api) {\n var _a;\n return this.stores.get((_a = this.resolveApi(api)) === null || _a === void 0 ? void 0 : _a.apiBase);\n }\n lookupApiLink(ref, parentObject) {\n const { kind, apiVersion, name, namespace = parentObject.getNs(), } = ref;\n if (!kind)\n return \"\";\n // search in registered apis by 'kind' & 'apiVersion'\n const api = this.getApi(api => api.kind === kind && api.apiVersionWithGroup == apiVersion);\n if (api) {\n return api.getUrl({ namespace, name });\n }\n // lookup api by generated resource link\n const apiPrefixes = [\"/apis\", \"/api\"];\n const resource = kind.endsWith(\"s\") ? `${kind.toLowerCase()}es` : `${kind.toLowerCase()}s`;\n for (const apiPrefix of apiPrefixes) {\n const apiLink = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_2__[\"createKubeApiURL\"])({ apiPrefix, apiVersion, name, namespace, resource });\n if (this.getApi(apiLink)) {\n return apiLink;\n }\n }\n // resolve by kind only (hpa's might use refs to older versions of resources for example)\n const apiByKind = this.getApi(api => api.kind === kind);\n if (apiByKind) {\n return apiByKind.getUrl({ name, namespace });\n }\n // otherwise generate link with default prefix\n // resource still might exists in k8s, but api is not registered in the app\n return Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_2__[\"createKubeApiURL\"])({ apiVersion, name, namespace, resource });\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Function, Array]),\n __metadata(\"design:returntype\", void 0)\n], ApiManager.prototype, \"registerStore\", null);\nconst apiManager = new ApiManager();\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/api-manager.ts?");
40074
40074
 
40075
40075
  /***/ }),
40076
40076
 
@@ -40538,7 +40538,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
40538
40538
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
40539
40539
 
40540
40540
  "use strict";
40541
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseKubeApi\", function() { return parseKubeApi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createKubeApiURL\", function() { return createKubeApiURL; });\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _vars__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../vars */ \"./src/common/vars.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! util */ \"util\");\n/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n// Parse kube-api path and get api-version, group, etc.\n\n\n\n\nfunction parseKubeApi(path) {\n if (!_vars__WEBPACK_IMPORTED_MODULE_1__[\"isDebugging\"]) {\n return _parseKubeApi(path);\n }\n try {\n const res = _parseKubeApi(path);\n _main_logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].debug(`parseKubeApi(${Object(util__WEBPACK_IMPORTED_MODULE_3__[\"inspect\"])(path, false, null, false)}) -> ${Object(util__WEBPACK_IMPORTED_MODULE_3__[\"inspect\"])(res, false, null, false)}`);\n return res;\n }\n catch (error) {\n _main_logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].debug(`parseKubeApi(${Object(util__WEBPACK_IMPORTED_MODULE_3__[\"inspect\"])(path, false, null, false)}) threw: ${error}`);\n throw error;\n }\n}\nfunction _parseKubeApi(path) {\n const apiPath = new URL(path, \"http://localhost\").pathname;\n const [, prefix, ...parts] = apiPath.split(\"/\");\n const apiPrefix = `/${prefix}`;\n const [left, right, namespaced] = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"splitArray\"])(parts, \"namespaces\");\n let apiGroup, apiVersion, namespace, resource, name;\n if (namespaced) {\n switch (right.length) {\n case 1:\n name = right[0];\n // fallthrough\n case 0:\n resource = \"namespaces\"; // special case this due to `split` removing namespaces\n break;\n default:\n [namespace, resource, name] = right;\n break;\n }\n apiVersion = left.pop();\n apiGroup = left.join(\"/\");\n }\n else {\n switch (left.length) {\n case 0:\n throw new Error(`invalid apiPath: ${apiPath}`);\n case 4:\n [apiGroup, apiVersion, resource, name] = left;\n break;\n case 2:\n resource = left.pop();\n // fallthrough\n case 1:\n apiVersion = left.pop();\n apiGroup = \"\";\n break;\n default:\n /**\n * Given that\n * - `apiVersion` is `GROUP/VERSION` and\n * - `VERSION` is `DNS_LABEL` which is /^[a-z0-9]((-[a-z0-9])|[a-z0-9])*$/i\n * where length <= 63\n * - `GROUP` is /^D(\\.D)*$/ where D is `DNS_LABEL` and length <= 253\n *\n * There is no well defined selection from an array of items that were\n * separated by '/'\n *\n * Solution is to create a heuristic. Namely:\n * 1. if '.' in left[0] then apiGroup <- left[0]\n * 2. if left[1] matches /^v[0-9]/ then apiGroup, apiVersion <- left[0], left[1]\n * 3. otherwise assume apiVersion <- left[0]\n * 4. always resource, name <- left[(0 or 1)+1..]\n */\n if (left[0].includes(\".\") || left[1].match(/^v[0-9]/)) {\n [apiGroup, apiVersion] = left;\n resource = left.slice(2).join(\"/\");\n }\n else {\n apiGroup = \"\";\n apiVersion = left[0];\n [resource, name] = left.slice(1);\n }\n break;\n }\n }\n const apiVersionWithGroup = [apiGroup, apiVersion].filter(v => v).join(\"/\");\n const apiBase = [apiPrefix, apiGroup, apiVersion, resource].filter(v => v).join(\"/\");\n if (!apiBase) {\n throw new Error(`invalid apiPath: ${apiPath}`);\n }\n return {\n apiBase,\n apiPrefix, apiGroup,\n apiVersion, apiVersionWithGroup,\n namespace, resource, name,\n };\n}\nfunction createKubeApiURL(ref) {\n const { apiPrefix = \"/apis\", resource, apiVersion, name } = ref;\n let { namespace } = ref;\n if (namespace) {\n namespace = `namespaces/${namespace}`;\n }\n return [apiPrefix, apiVersion, namespace, resource, name]\n .filter(v => v)\n .join(\"/\");\n}\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-api-parse.ts?");
40541
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseKubeApi\", function() { return parseKubeApi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createKubeApiURL\", function() { return createKubeApiURL; });\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _vars__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../vars */ \"./src/common/vars.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! util */ \"util\");\n/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n// Parse kube-api path and get api-version, group, etc.\n\n\n\n\nfunction parseKubeApi(path) {\n if (!_vars__WEBPACK_IMPORTED_MODULE_1__[\"isDebugging\"]) {\n return _parseKubeApi(path);\n }\n try {\n const res = _parseKubeApi(path);\n _main_logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].debug(`parseKubeApi(${Object(util__WEBPACK_IMPORTED_MODULE_3__[\"inspect\"])(path, false, null, false)}) -> ${Object(util__WEBPACK_IMPORTED_MODULE_3__[\"inspect\"])(res, false, null, false)}`);\n return res;\n }\n catch (error) {\n _main_logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].debug(`parseKubeApi(${Object(util__WEBPACK_IMPORTED_MODULE_3__[\"inspect\"])(path, false, null, false)}) threw: ${error}`);\n throw error;\n }\n}\nfunction _parseKubeApi(path) {\n const apiPath = new URL(path, \"http://localhost\").pathname;\n const [, prefix, ...parts] = apiPath.split(\"/\");\n const apiPrefix = `/${prefix}`;\n const [left, right, namespaced] = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"splitArray\"])(parts, \"namespaces\");\n let apiGroup, apiVersion, namespace, resource, name;\n if (namespaced) {\n switch (right.length) {\n case 1:\n name = right[0];\n // fallthrough\n case 0:\n resource = \"namespaces\"; // special case this due to `split` removing namespaces\n break;\n default:\n [namespace, resource, name] = right;\n break;\n }\n apiVersion = left.pop();\n apiGroup = left.join(\"/\");\n }\n else {\n switch (left.length) {\n case 0:\n throw new Error(`invalid apiPath: ${apiPath}`);\n case 4:\n [apiGroup, apiVersion, resource, name] = left;\n break;\n case 2:\n resource = left.pop();\n // fallthrough\n case 1:\n apiVersion = left.pop();\n apiGroup = \"\";\n break;\n default:\n /**\n * Given that\n * - `apiVersion` is `GROUP/VERSION` and\n * - `VERSION` is `DNS_LABEL` which is /^[a-z0-9]((-[a-z0-9])|[a-z0-9])*$/i\n * where length <= 63\n * - `GROUP` is /^D(\\.D)*$/ where D is `DNS_LABEL` and length <= 253\n *\n * There is no well defined selection from an array of items that were\n * separated by '/'\n *\n * Solution is to create a heuristic. Namely:\n * 1. if '.' in left[0] then apiGroup <- left[0]\n * 2. if left[1] matches /^v[0-9]/ then apiGroup, apiVersion <- left[0], left[1]\n * 3. otherwise assume apiVersion <- left[0]\n * 4. always resource, name <- left[(0 or 1)+1..]\n */\n if (left[0].includes(\".\") || left[1].match(/^v[0-9]/)) {\n [apiGroup, apiVersion] = left;\n resource = left.slice(2).join(\"/\");\n }\n else {\n apiGroup = \"\";\n apiVersion = left[0];\n [resource, name] = left.slice(1);\n }\n break;\n }\n }\n const apiVersionWithGroup = [apiGroup, apiVersion].filter(v => v).join(\"/\");\n const apiBase = [apiPrefix, apiGroup, apiVersion, resource].filter(v => v).join(\"/\");\n if (!apiBase) {\n throw new Error(`invalid apiPath: ${apiPath}`);\n }\n return {\n apiBase,\n apiPrefix, apiGroup,\n apiVersion, apiVersionWithGroup,\n namespace, resource, name,\n };\n}\nfunction createKubeApiURL({ apiPrefix = \"/apis\", resource, apiVersion, name, namespace }) {\n const parts = [apiPrefix, apiVersion];\n if (namespace) {\n parts.push(\"namespaces\", namespace);\n }\n parts.push(resource);\n if (name) {\n parts.push(name);\n }\n return parts.join(\"/\");\n}\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-api-parse.ts?");
40542
40542
 
40543
40543
  /***/ }),
40544
40544
 
@@ -40550,7 +40550,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
40550
40550
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
40551
40551
 
40552
40552
  "use strict";
40553
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forCluster\", function() { return forCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forRemoteCluster\", function() { return forRemoteCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ensureObjectSelfLink\", function() { return ensureObjectSelfLink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeApi\", function() { return KubeApi; });\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! querystring */ \"querystring\");\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(querystring__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _common_vars__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/vars */ \"./src/common/vars.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _api_manager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./index */ \"./src/common/k8s-api/index.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var byline__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! byline */ \"./node_modules/byline/lib/byline.js\");\n/* harmony import */ var byline__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(byline__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _kube_json_api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./kube-json-api */ \"./src/common/k8s-api/kube-json-api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! https */ \"https\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(https__WEBPACK_IMPORTED_MODULE_13__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n// Base class for building all kubernetes apis\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction forCluster(cluster, kubeClass, apiClass = null) {\n const url = new URL(_index__WEBPACK_IMPORTED_MODULE_6__[\"apiBase\"].config.serverAddress);\n const request = new _kube_json_api__WEBPACK_IMPORTED_MODULE_10__[\"KubeJsonApi\"]({\n serverAddress: _index__WEBPACK_IMPORTED_MODULE_6__[\"apiBase\"].config.serverAddress,\n apiBase: _common_vars__WEBPACK_IMPORTED_MODULE_3__[\"apiKubePrefix\"],\n debug: _common_vars__WEBPACK_IMPORTED_MODULE_3__[\"isDevelopment\"],\n }, {\n headers: {\n \"Host\": `${cluster.metadata.uid}.localhost:${url.port}`,\n },\n });\n if (!apiClass) {\n apiClass = KubeApi;\n }\n return new apiClass({\n objectConstructor: kubeClass,\n request,\n });\n}\nfunction forRemoteCluster(config, kubeClass, apiClass = null) {\n const reqInit = {};\n const agentOptions = {};\n if (config.cluster.skipTLSVerify === true) {\n agentOptions.rejectUnauthorized = false;\n }\n if (config.user.clientCertificateData) {\n agentOptions.cert = config.user.clientCertificateData;\n }\n if (config.user.clientKeyData) {\n agentOptions.key = config.user.clientKeyData;\n }\n if (config.cluster.caData) {\n agentOptions.ca = config.cluster.caData;\n }\n if (Object.keys(agentOptions).length > 0) {\n reqInit.agent = new https__WEBPACK_IMPORTED_MODULE_13__[\"Agent\"](agentOptions);\n }\n const token = config.user.token;\n const request = new _kube_json_api__WEBPACK_IMPORTED_MODULE_10__[\"KubeJsonApi\"](Object.assign({ serverAddress: config.cluster.server, apiBase: \"\", debug: _common_vars__WEBPACK_IMPORTED_MODULE_3__[\"isDevelopment\"] }, (token ? {\n getRequestOptions: async () => ({\n headers: {\n \"Authorization\": `Bearer ${Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isFunction\"])(token) ? await token() : token}`,\n },\n }),\n } : {})), reqInit);\n if (!apiClass) {\n apiClass = KubeApi;\n }\n return new apiClass({\n objectConstructor: kubeClass,\n request,\n });\n}\nfunction ensureObjectSelfLink(api, object) {\n if (!object.metadata.selfLink) {\n object.metadata.selfLink = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_7__[\"createKubeApiURL\"])({\n apiPrefix: api.apiPrefix,\n apiVersion: api.apiVersionWithGroup,\n resource: api.apiResource,\n namespace: api.isNamespaced ? object.metadata.namespace : undefined,\n name: object.metadata.name,\n });\n }\n}\nconst patchTypeHeaders = {\n \"merge\": \"application/merge-patch+json\",\n \"json\": \"application/json-patch+json\",\n \"strategic\": \"application/strategic-merge-patch+json\",\n};\nclass KubeApi {\n constructor(options) {\n var _a, _b;\n Object.defineProperty(this, \"options\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: options\n });\n Object.defineProperty(this, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiBase\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiPrefix\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiGroup\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiVersionPreferred\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiResource\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"isNamespaced\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"objectConstructor\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"request\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"resourceVersions\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"watchDisposer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"watchId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 1\n });\n const { objectConstructor, request = _index__WEBPACK_IMPORTED_MODULE_6__[\"apiKube\"], kind = (_a = options.objectConstructor) === null || _a === void 0 ? void 0 : _a.kind, isNamespaced = (_b = options.objectConstructor) === null || _b === void 0 ? void 0 : _b.namespaced, } = options || {};\n const { apiBase, apiPrefix, apiGroup, apiVersion, resource } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_7__[\"parseKubeApi\"])(options.apiBase || objectConstructor.apiBase);\n this.kind = kind;\n this.isNamespaced = isNamespaced;\n this.apiBase = apiBase;\n this.apiPrefix = apiPrefix;\n this.apiGroup = apiGroup;\n this.apiVersion = apiVersion;\n this.apiResource = resource;\n this.request = request;\n this.objectConstructor = objectConstructor;\n this.parseResponse = this.parseResponse.bind(this);\n _api_manager__WEBPACK_IMPORTED_MODULE_5__[\"apiManager\"].registerApi(apiBase, this);\n }\n get apiVersionWithGroup() {\n var _a;\n return [this.apiGroup, (_a = this.apiVersionPreferred) !== null && _a !== void 0 ? _a : this.apiVersion]\n .filter(Boolean)\n .join(\"/\");\n }\n /**\n * Returns the latest API prefix/group that contains the required resource.\n * First tries options.apiBase, then urls in order from options.fallbackApiBases.\n */\n async getLatestApiPrefixGroup() {\n var _a;\n // Note that this.options.apiBase is the \"full\" url, whereas this.apiBase is parsed\n const apiBases = [this.options.apiBase, ...this.options.fallbackApiBases];\n for (const apiUrl of apiBases) {\n // Split e.g. \"/apis/extensions/v1beta1/ingresses\" to parts\n const { apiPrefix, apiGroup, apiVersionWithGroup, resource } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_7__[\"parseKubeApi\"])(apiUrl);\n // Request available resources\n try {\n const response = await this.request.get(`${apiPrefix}/${apiVersionWithGroup}`);\n // If the resource is found in the group, use this apiUrl\n if ((_a = response.resources) === null || _a === void 0 ? void 0 : _a.find(kubeResource => kubeResource.name === resource)) {\n return { apiPrefix, apiGroup };\n }\n }\n catch (error) {\n // Exception is ignored as we can try the next url\n }\n }\n throw new Error(`Can't find working API for the Kubernetes resource ${this.apiResource}`);\n }\n /**\n * Get the apiPrefix and apiGroup to be used for fetching the preferred version.\n */\n async getPreferredVersionPrefixGroup() {\n if (this.options.fallbackApiBases) {\n try {\n return await this.getLatestApiPrefixGroup();\n }\n catch (error) {\n // If valid API wasn't found, log the error and return defaults below\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].error(error);\n }\n }\n return {\n apiPrefix: this.apiPrefix,\n apiGroup: this.apiGroup,\n };\n }\n async checkPreferredVersion() {\n var _a, _b;\n if (this.options.fallbackApiBases && !this.options.checkPreferredVersion) {\n throw new Error(\"checkPreferredVersion must be enabled if fallbackApiBases is set in KubeApi\");\n }\n if (this.options.checkPreferredVersion && this.apiVersionPreferred === undefined) {\n const { apiPrefix, apiGroup } = await this.getPreferredVersionPrefixGroup();\n // The apiPrefix and apiGroup might change due to fallbackApiBases, so we must override them\n Object.defineProperty(this, \"apiPrefix\", {\n value: apiPrefix,\n });\n Object.defineProperty(this, \"apiGroup\", {\n value: apiGroup,\n });\n const res = await this.request.get(`${this.apiPrefix}/${this.apiGroup}`);\n Object.defineProperty(this, \"apiVersionPreferred\", {\n value: (_b = (_a = res === null || res === void 0 ? void 0 : res.preferredVersion) === null || _a === void 0 ? void 0 : _a.version) !== null && _b !== void 0 ? _b : null,\n });\n if (this.apiVersionPreferred) {\n Object.defineProperty(this, \"apiBase\", { value: this.getUrl() });\n _api_manager__WEBPACK_IMPORTED_MODULE_5__[\"apiManager\"].registerApi(this.apiBase, this);\n }\n }\n }\n setResourceVersion(namespace = \"\", newVersion) {\n this.resourceVersions.set(namespace, newVersion);\n }\n getResourceVersion(namespace = \"\") {\n return this.resourceVersions.get(namespace);\n }\n async refreshResourceVersion(params) {\n return this.list(params, { limit: 1 });\n }\n getUrl({ name = \"\", namespace = \"\" } = {}, query) {\n const resourcePath = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_7__[\"createKubeApiURL\"])({\n apiPrefix: this.apiPrefix,\n apiVersion: this.apiVersionWithGroup,\n resource: this.apiResource,\n namespace: this.isNamespaced ? namespace : undefined,\n name,\n });\n return resourcePath + (query ? `?${Object(querystring__WEBPACK_IMPORTED_MODULE_2__[\"stringify\"])(this.normalizeQuery(query))}` : \"\");\n }\n normalizeQuery(query = {}) {\n if (query.labelSelector) {\n query.labelSelector = [query.labelSelector].flat().join(\",\");\n }\n if (query.fieldSelector) {\n query.fieldSelector = [query.fieldSelector].flat().join(\",\");\n }\n return query;\n }\n parseResponse(data, namespace) {\n if (!data)\n return null;\n const KubeObjectConstructor = this.objectConstructor;\n // process items list response, check before single item since there is overlap\n if (_kube_object__WEBPACK_IMPORTED_MODULE_8__[\"KubeObject\"].isJsonApiDataList(data, _kube_object__WEBPACK_IMPORTED_MODULE_8__[\"KubeObject\"].isPartialJsonApiData)) {\n const { apiVersion, items, metadata } = data;\n this.setResourceVersion(namespace, metadata.resourceVersion);\n this.setResourceVersion(\"\", metadata.resourceVersion);\n return items.map((item) => {\n const object = new KubeObjectConstructor(Object.assign({ kind: this.kind, apiVersion }, item));\n ensureObjectSelfLink(this, object);\n return object;\n });\n }\n // process a single item\n if (_kube_object__WEBPACK_IMPORTED_MODULE_8__[\"KubeObject\"].isJsonApiData(data)) {\n const object = new KubeObjectConstructor(data);\n ensureObjectSelfLink(this, object);\n return object;\n }\n // custom apis might return array for list response, e.g. users, groups, etc.\n if (Array.isArray(data)) {\n return data.map(data => new KubeObjectConstructor(data));\n }\n return null;\n }\n async list({ namespace = \"\", reqInit } = {}, query) {\n await this.checkPreferredVersion();\n const url = this.getUrl({ namespace });\n const res = await this.request.get(url, { query }, reqInit);\n const parsed = this.parseResponse(res, namespace);\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (!parsed) {\n return null;\n }\n throw new Error(`GET multiple request to ${url} returned not an array: ${JSON.stringify(parsed)}`);\n }\n async get({ name = \"\", namespace = \"default\" } = {}, query) {\n await this.checkPreferredVersion();\n const url = this.getUrl({ namespace, name });\n const res = await this.request.get(url, { query });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`GET single request to ${url} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async create({ name = \"\", namespace = \"default\" } = {}, data) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace });\n const res = await this.request.post(apiUrl, {\n data: lodash_merge__WEBPACK_IMPORTED_MODULE_0___default()({\n kind: this.kind,\n apiVersion: this.apiVersionWithGroup,\n metadata: {\n name,\n namespace,\n },\n }, data),\n });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`POST request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async update({ name = \"\", namespace = \"default\" } = {}, data) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace, name });\n const res = await this.request.put(apiUrl, { data });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`PUT request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async patch({ name = \"\", namespace = \"default\" } = {}, data, strategy = \"strategic\") {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace, name });\n const res = await this.request.patch(apiUrl, { data }, {\n headers: {\n \"content-type\": patchTypeHeaders[strategy],\n },\n });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`PATCH request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async delete({ name = \"\", namespace = \"default\", propagationPolicy = \"Background\" }) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace, name });\n const reqInit = {\n query: {\n propagationPolicy,\n },\n };\n return this.request.del(apiUrl, reqInit);\n }\n getWatchUrl(namespace = \"\", query = {}) {\n return this.getUrl({ namespace }, Object.assign({ watch: 1, resourceVersion: this.getResourceVersion(namespace) }, query));\n }\n watch(opts = { namespace: \"\", retry: false }) {\n let errorReceived = false;\n let timedRetry;\n const { namespace, callback = _utils__WEBPACK_IMPORTED_MODULE_11__[\"noop\"], retry, timeout } = opts;\n const { watchId = `${this.kind.toLowerCase()}-${this.watchId++}` } = opts;\n // Create AbortController for this request\n const abortController = new abort_controller__WEBPACK_IMPORTED_MODULE_12___default.a();\n // If caller aborts, abort using request's abortController\n if (opts.abortController) {\n opts.abortController.signal.addEventListener(\"abort\", () => {\n abortController.abort();\n });\n }\n abortController.signal.addEventListener(\"abort\", () => {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[KUBE-API] watch (${watchId}) aborted ${watchUrl}`);\n clearTimeout(timedRetry);\n });\n const requestParams = timeout ? { query: { timeoutSeconds: timeout } } : {};\n const watchUrl = this.getWatchUrl(namespace);\n const responsePromise = this.request.getResponse(watchUrl, requestParams, {\n signal: abortController.signal,\n timeout: 600000,\n });\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[KUBE-API] watch (${watchId}) ${retry === true ? \"retried\" : \"started\"} ${watchUrl}`);\n responsePromise\n .then(response => {\n // True if the current watch request was retried\n let requestRetried = false;\n if (!response.ok) {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].warn(`[KUBE-API] watch (${watchId}) error response ${watchUrl}`, { status: response.status });\n return callback(null, response);\n }\n // Add mechanism to retry in case timeoutSeconds is set but the watch wasn't timed out.\n // This can happen if e.g. network is offline and AWS NLB is used.\n if (timeout) {\n setTimeout(() => {\n // We only retry if we haven't retried, haven't aborted and haven't received k8s error\n if (requestRetried || abortController.signal.aborted || errorReceived) {\n return;\n }\n // Close current request\n abortController.abort();\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[KUBE-API] Watch timeout set, but not retried, retrying now`);\n requestRetried = true;\n // Clearing out any possible timeout, although we don't expect this to be set\n clearTimeout(timedRetry);\n this.watch(Object.assign(Object.assign({}, opts), { namespace, callback, watchId, retry: true }));\n // We wait longer than the timeout, as we expect the request to be retried with timeoutSeconds\n }, timeout * 1000 * 1.1);\n }\n [\"end\", \"close\", \"error\"].forEach((eventName) => {\n response.body.on(eventName, () => {\n // We only retry if we haven't retried, haven't aborted and haven't received k8s error\n // kubernetes errors (=errorReceived set) should be handled in a callback\n if (requestRetried || abortController.signal.aborted || errorReceived) {\n return;\n }\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[KUBE-API] watch (${watchId}) ${eventName} ${watchUrl}`);\n requestRetried = true;\n clearTimeout(timedRetry);\n timedRetry = setTimeout(() => {\n this.watch(Object.assign(Object.assign({}, opts), { namespace, callback, watchId, retry: true }));\n }, 1000);\n });\n });\n byline__WEBPACK_IMPORTED_MODULE_9___default()(response.body).on(\"data\", (line) => {\n try {\n const event = JSON.parse(line);\n if (event.type === \"ERROR\" && event.object.kind === \"Status\") {\n errorReceived = true;\n return callback(null, new _kube_object__WEBPACK_IMPORTED_MODULE_8__[\"KubeStatus\"](event.object));\n }\n this.modifyWatchEvent(event);\n callback(event, null);\n }\n catch (ignore) {\n // ignore parse errors\n }\n });\n })\n .catch(error => {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].error(`[KUBE-API] watch (${watchId}) throwed ${watchUrl}`, error);\n callback(null, error);\n });\n return abortController.abort;\n }\n modifyWatchEvent(event) {\n switch (event.type) {\n case \"ADDED\":\n case \"DELETED\":\n case \"MODIFIED\": {\n ensureObjectSelfLink(this, event.object);\n const { namespace, resourceVersion } = event.object.metadata;\n this.setResourceVersion(namespace, resourceVersion);\n this.setResourceVersion(\"\", resourceVersion);\n break;\n }\n }\n }\n}\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-api.ts?");
40553
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forCluster\", function() { return forCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forRemoteCluster\", function() { return forRemoteCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ensureObjectSelfLink\", function() { return ensureObjectSelfLink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeApi\", function() { return KubeApi; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! querystring */ \"querystring\");\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(querystring__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _common_vars__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/vars */ \"./src/common/vars.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _api_manager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./index */ \"./src/common/k8s-api/index.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var byline__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! byline */ \"./node_modules/byline/lib/byline.js\");\n/* harmony import */ var byline__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(byline__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _kube_json_api__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./kube-json-api */ \"./src/common/k8s-api/kube-json-api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! https */ \"https\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(https__WEBPACK_IMPORTED_MODULE_12__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n// Base class for building all kubernetes apis\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction forCluster(cluster, kubeClass, apiClass = null) {\n const url = new URL(_index__WEBPACK_IMPORTED_MODULE_5__[\"apiBase\"].config.serverAddress);\n const request = new _kube_json_api__WEBPACK_IMPORTED_MODULE_9__[\"KubeJsonApi\"]({\n serverAddress: _index__WEBPACK_IMPORTED_MODULE_5__[\"apiBase\"].config.serverAddress,\n apiBase: _common_vars__WEBPACK_IMPORTED_MODULE_2__[\"apiKubePrefix\"],\n debug: _common_vars__WEBPACK_IMPORTED_MODULE_2__[\"isDevelopment\"],\n }, {\n headers: {\n \"Host\": `${cluster.metadata.uid}.localhost:${url.port}`,\n },\n });\n if (!apiClass) {\n apiClass = KubeApi;\n }\n return new apiClass({\n objectConstructor: kubeClass,\n request,\n });\n}\nfunction forRemoteCluster(config, kubeClass, apiClass = null) {\n const reqInit = {};\n const agentOptions = {};\n if (config.cluster.skipTLSVerify === true) {\n agentOptions.rejectUnauthorized = false;\n }\n if (config.user.clientCertificateData) {\n agentOptions.cert = config.user.clientCertificateData;\n }\n if (config.user.clientKeyData) {\n agentOptions.key = config.user.clientKeyData;\n }\n if (config.cluster.caData) {\n agentOptions.ca = config.cluster.caData;\n }\n if (Object.keys(agentOptions).length > 0) {\n reqInit.agent = new https__WEBPACK_IMPORTED_MODULE_12__[\"Agent\"](agentOptions);\n }\n const token = config.user.token;\n const request = new _kube_json_api__WEBPACK_IMPORTED_MODULE_9__[\"KubeJsonApi\"](Object.assign({ serverAddress: config.cluster.server, apiBase: \"\", debug: _common_vars__WEBPACK_IMPORTED_MODULE_2__[\"isDevelopment\"] }, (token ? {\n getRequestOptions: async () => ({\n headers: {\n \"Authorization\": `Bearer ${Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isFunction\"])(token) ? await token() : token}`,\n },\n }),\n } : {})), reqInit);\n if (!apiClass) {\n apiClass = KubeApi;\n }\n return new apiClass({\n objectConstructor: kubeClass,\n request,\n });\n}\nfunction ensureObjectSelfLink(api, object) {\n if (!object.metadata.selfLink) {\n object.metadata.selfLink = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"createKubeApiURL\"])({\n apiPrefix: api.apiPrefix,\n apiVersion: api.apiVersionWithGroup,\n resource: api.apiResource,\n namespace: api.isNamespaced ? object.metadata.namespace : undefined,\n name: object.metadata.name,\n });\n }\n}\nconst patchTypeHeaders = {\n \"merge\": \"application/merge-patch+json\",\n \"json\": \"application/json-patch+json\",\n \"strategic\": \"application/strategic-merge-patch+json\",\n};\nclass KubeApi {\n constructor(options) {\n var _a;\n Object.defineProperty(this, \"options\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: options\n });\n Object.defineProperty(this, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiBase\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiPrefix\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiGroup\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiVersionPreferred\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiResource\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"isNamespaced\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"objectConstructor\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"request\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"resourceVersions\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"watchDisposer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"watchId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 1\n });\n const { objectConstructor, request, kind, isNamespaced } = options;\n const { apiBase, apiPrefix, apiGroup, apiVersion, resource } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"parseKubeApi\"])(options.apiBase || objectConstructor.apiBase);\n this.options = options;\n this.kind = kind !== null && kind !== void 0 ? kind : objectConstructor.kind;\n this.isNamespaced = (_a = isNamespaced !== null && isNamespaced !== void 0 ? isNamespaced : objectConstructor.namespaced) !== null && _a !== void 0 ? _a : false;\n this.apiBase = apiBase;\n this.apiPrefix = apiPrefix;\n this.apiGroup = apiGroup;\n this.apiVersion = apiVersion;\n this.apiResource = resource;\n this.request = request !== null && request !== void 0 ? request : _index__WEBPACK_IMPORTED_MODULE_5__[\"apiKube\"];\n this.objectConstructor = objectConstructor;\n this.parseResponse = this.parseResponse.bind(this);\n _api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].registerApi(apiBase, this);\n }\n get apiVersionWithGroup() {\n var _a;\n return [this.apiGroup, (_a = this.apiVersionPreferred) !== null && _a !== void 0 ? _a : this.apiVersion]\n .filter(Boolean)\n .join(\"/\");\n }\n /**\n * Returns the latest API prefix/group that contains the required resource.\n * First tries options.apiBase, then urls in order from options.fallbackApiBases.\n */\n async getLatestApiPrefixGroup() {\n var _a;\n // Note that this.options.apiBase is the \"full\" url, whereas this.apiBase is parsed\n const apiBases = [this.options.apiBase, this.objectConstructor.apiBase, ...this.options.fallbackApiBases];\n for (const apiUrl of apiBases) {\n if (!apiUrl) {\n continue;\n }\n try {\n // Split e.g. \"/apis/extensions/v1beta1/ingresses\" to parts\n const { apiPrefix, apiGroup, apiVersionWithGroup, resource } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"parseKubeApi\"])(apiUrl);\n // Request available resources\n const response = await this.request.get(`${apiPrefix}/${apiVersionWithGroup}`);\n // If the resource is found in the group, use this apiUrl\n if ((_a = response.resources) === null || _a === void 0 ? void 0 : _a.find(kubeResource => kubeResource.name === resource)) {\n return { apiPrefix, apiGroup };\n }\n }\n catch (error) {\n // Exception is ignored as we can try the next url\n }\n }\n throw new Error(`Can't find working API for the Kubernetes resource ${this.apiResource}`);\n }\n /**\n * Get the apiPrefix and apiGroup to be used for fetching the preferred version.\n */\n async getPreferredVersionPrefixGroup() {\n if (this.options.fallbackApiBases) {\n try {\n return await this.getLatestApiPrefixGroup();\n }\n catch (error) {\n // If valid API wasn't found, log the error and return defaults below\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`[KUBE-API]: ${error}`);\n }\n }\n return {\n apiPrefix: this.apiPrefix,\n apiGroup: this.apiGroup,\n };\n }\n async checkPreferredVersion() {\n var _a, _b;\n if (this.options.fallbackApiBases && !this.options.checkPreferredVersion) {\n throw new Error(\"checkPreferredVersion must be enabled if fallbackApiBases is set in KubeApi\");\n }\n if (this.options.checkPreferredVersion && this.apiVersionPreferred === undefined) {\n const { apiPrefix, apiGroup } = await this.getPreferredVersionPrefixGroup();\n // The apiPrefix and apiGroup might change due to fallbackApiBases, so we must override them\n this.apiPrefix = apiPrefix;\n this.apiGroup = apiGroup;\n const url = [apiPrefix, apiGroup].filter(Boolean).join(\"/\");\n const res = await this.request.get(url);\n this.apiVersionPreferred = (_b = (_a = res === null || res === void 0 ? void 0 : res.preferredVersion) === null || _a === void 0 ? void 0 : _a.version) !== null && _b !== void 0 ? _b : null;\n if (this.apiVersionPreferred) {\n this.apiBase = this.computeApiBase();\n _api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].registerApi(this.apiBase, this);\n }\n }\n }\n setResourceVersion(namespace = \"\", newVersion) {\n this.resourceVersions.set(namespace, newVersion);\n }\n getResourceVersion(namespace = \"\") {\n return this.resourceVersions.get(namespace);\n }\n async refreshResourceVersion(params) {\n return this.list(params, { limit: 1 });\n }\n computeApiBase() {\n return Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"createKubeApiURL\"])({\n apiPrefix: this.apiPrefix,\n apiVersion: this.apiVersionWithGroup,\n resource: this.apiResource,\n });\n }\n getUrl({ name, namespace } = {}, query) {\n const resourcePath = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"createKubeApiURL\"])({\n apiPrefix: this.apiPrefix,\n apiVersion: this.apiVersionWithGroup,\n resource: this.apiResource,\n namespace: this.isNamespaced ? namespace !== null && namespace !== void 0 ? namespace : \"default\" : undefined,\n name,\n });\n return resourcePath + (query ? `?${Object(querystring__WEBPACK_IMPORTED_MODULE_1__[\"stringify\"])(this.normalizeQuery(query))}` : \"\");\n }\n normalizeQuery(query = {}) {\n if (query.labelSelector) {\n query.labelSelector = [query.labelSelector].flat().join(\",\");\n }\n if (query.fieldSelector) {\n query.fieldSelector = [query.fieldSelector].flat().join(\",\");\n }\n return query;\n }\n parseResponse(data, namespace) {\n if (!data)\n return null;\n const KubeObjectConstructor = this.objectConstructor;\n // process items list response, check before single item since there is overlap\n if (_kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeObject\"].isJsonApiDataList(data, _kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeObject\"].isPartialJsonApiData)) {\n const { apiVersion, items, metadata } = data;\n this.setResourceVersion(namespace, metadata.resourceVersion);\n this.setResourceVersion(\"\", metadata.resourceVersion);\n return items.map((item) => {\n const object = new KubeObjectConstructor(Object.assign({ kind: this.kind, apiVersion }, item));\n ensureObjectSelfLink(this, object);\n return object;\n });\n }\n // process a single item\n if (_kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeObject\"].isJsonApiData(data)) {\n const object = new KubeObjectConstructor(data);\n ensureObjectSelfLink(this, object);\n return object;\n }\n // custom apis might return array for list response, e.g. users, groups, etc.\n if (Array.isArray(data)) {\n return data.map(data => new KubeObjectConstructor(data));\n }\n return null;\n }\n async list({ namespace = \"\", reqInit } = {}, query) {\n await this.checkPreferredVersion();\n const url = this.getUrl({ namespace });\n const res = await this.request.get(url, { query }, reqInit);\n const parsed = this.parseResponse(res, namespace);\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (!parsed) {\n return null;\n }\n throw new Error(`GET multiple request to ${url} returned not an array: ${JSON.stringify(parsed)}`);\n }\n async get(desc, query) {\n await this.checkPreferredVersion();\n const url = this.getUrl(desc);\n const res = await this.request.get(url, { query });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`GET single request to ${url} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async create({ name, namespace }, data) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace });\n const res = await this.request.post(apiUrl, {\n data: Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"merge\"])(data, {\n kind: this.kind,\n apiVersion: this.apiVersionWithGroup,\n metadata: {\n name,\n namespace,\n },\n }),\n });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`POST request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async update({ name, namespace }, data) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace, name });\n const res = await this.request.put(apiUrl, {\n data: Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"merge\"])(data, {\n metadata: {\n name,\n namespace,\n },\n }),\n });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`PUT request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async patch(desc, data, strategy = \"strategic\") {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl(desc);\n const res = await this.request.patch(apiUrl, { data }, {\n headers: {\n \"content-type\": patchTypeHeaders[strategy],\n },\n });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`PATCH request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async delete(_a) {\n var { propagationPolicy = \"Background\" } = _a, desc = __rest(_a, [\"propagationPolicy\"]);\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl(desc);\n return this.request.del(apiUrl, {\n query: {\n propagationPolicy,\n },\n });\n }\n getWatchUrl(namespace = \"\", query = {}) {\n return this.getUrl({ namespace }, Object.assign({ watch: 1, resourceVersion: this.getResourceVersion(namespace) }, query));\n }\n watch(opts = { namespace: \"\", retry: false }) {\n let errorReceived = false;\n let timedRetry;\n const { namespace, callback = _utils__WEBPACK_IMPORTED_MODULE_10__[\"noop\"], retry, timeout } = opts;\n const { watchId = `${this.kind.toLowerCase()}-${this.watchId++}` } = opts;\n // Create AbortController for this request\n const abortController = new abort_controller__WEBPACK_IMPORTED_MODULE_11___default.a();\n // If caller aborts, abort using request's abortController\n if (opts.abortController) {\n opts.abortController.signal.addEventListener(\"abort\", () => {\n abortController.abort();\n });\n }\n abortController.signal.addEventListener(\"abort\", () => {\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBE-API] watch (${watchId}) aborted ${watchUrl}`);\n clearTimeout(timedRetry);\n });\n const requestParams = timeout ? { query: { timeoutSeconds: timeout } } : {};\n const watchUrl = this.getWatchUrl(namespace);\n const responsePromise = this.request.getResponse(watchUrl, requestParams, {\n signal: abortController.signal,\n timeout: 600000,\n });\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBE-API] watch (${watchId}) ${retry === true ? \"retried\" : \"started\"} ${watchUrl}`);\n responsePromise\n .then(response => {\n // True if the current watch request was retried\n let requestRetried = false;\n if (!response.ok) {\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].warn(`[KUBE-API] watch (${watchId}) error response ${watchUrl}`, { status: response.status });\n return callback(null, response);\n }\n // Add mechanism to retry in case timeoutSeconds is set but the watch wasn't timed out.\n // This can happen if e.g. network is offline and AWS NLB is used.\n if (timeout) {\n setTimeout(() => {\n // We only retry if we haven't retried, haven't aborted and haven't received k8s error\n if (requestRetried || abortController.signal.aborted || errorReceived) {\n return;\n }\n // Close current request\n abortController.abort();\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBE-API] Watch timeout set, but not retried, retrying now`);\n requestRetried = true;\n // Clearing out any possible timeout, although we don't expect this to be set\n clearTimeout(timedRetry);\n this.watch(Object.assign(Object.assign({}, opts), { namespace, callback, watchId, retry: true }));\n // We wait longer than the timeout, as we expect the request to be retried with timeoutSeconds\n }, timeout * 1000 * 1.1);\n }\n [\"end\", \"close\", \"error\"].forEach((eventName) => {\n response.body.on(eventName, () => {\n // We only retry if we haven't retried, haven't aborted and haven't received k8s error\n // kubernetes errors (=errorReceived set) should be handled in a callback\n if (requestRetried || abortController.signal.aborted || errorReceived) {\n return;\n }\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBE-API] watch (${watchId}) ${eventName} ${watchUrl}`);\n requestRetried = true;\n clearTimeout(timedRetry);\n timedRetry = setTimeout(() => {\n this.watch(Object.assign(Object.assign({}, opts), { namespace, callback, watchId, retry: true }));\n }, 1000);\n });\n });\n byline__WEBPACK_IMPORTED_MODULE_8___default()(response.body).on(\"data\", (line) => {\n try {\n const event = JSON.parse(line);\n if (event.type === \"ERROR\" && event.object.kind === \"Status\") {\n errorReceived = true;\n return callback(null, new _kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeStatus\"](event.object));\n }\n this.modifyWatchEvent(event);\n callback(event, null);\n }\n catch (ignore) {\n // ignore parse errors\n }\n });\n })\n .catch(error => {\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`[KUBE-API] watch (${watchId}) throwed ${watchUrl}`, error);\n callback(null, error);\n });\n return abortController.abort;\n }\n modifyWatchEvent(event) {\n switch (event.type) {\n case \"ADDED\":\n case \"DELETED\":\n case \"MODIFIED\": {\n ensureObjectSelfLink(this, event.object);\n const { namespace, resourceVersion } = event.object.metadata;\n this.setResourceVersion(namespace, resourceVersion);\n this.setResourceVersion(\"\", resourceVersion);\n break;\n }\n }\n }\n}\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-api.ts?");
40554
40554
 
40555
40555
  /***/ }),
40556
40556
 
@@ -40574,7 +40574,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
40574
40574
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
40575
40575
 
40576
40576
  "use strict";
40577
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeObjectStore\", function() { return KubeObjectStore; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _item_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../item.store */ \"./src/common/item.store.ts\");\n/* harmony import */ var _kube_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./kube-api */ \"./src/common/k8s-api/kube-api.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_6__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\nclass KubeObjectStore extends _item_store__WEBPACK_IMPORTED_MODULE_3__[\"ItemStore\"] {\n constructor(api) {\n super();\n Object.defineProperty(this, \"api\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"limit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"bufferSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 50000\n });\n Object.defineProperty(this, \"loadedNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // collect items from watch-api events to avoid UI blowing up with huge streams of data\n Object.defineProperty(this, \"eventsBuffer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].array([], { deep: false })\n });\n if (api)\n this.api = api;\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"autoBind\"])(this);\n this.bindWatchEventsUpdater();\n }\n get contextReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"when\"])(() => Boolean(this.context));\n }\n get namespacesReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"when\"])(() => Boolean(this.loadedNamespaces));\n }\n get context() {\n return KubeObjectStore.defaultContext.get();\n }\n get contextItems() {\n var _a, _b;\n const namespaces = (_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.contextNamespaces) !== null && _b !== void 0 ? _b : [];\n return this.items.filter(item => {\n const itemNamespace = item.getNs();\n return !itemNamespace /* cluster-wide */ || namespaces.includes(itemNamespace);\n });\n }\n getTotalCount() {\n return this.contextItems.length;\n }\n get query() {\n const { limit } = this;\n if (!limit) {\n return {};\n }\n return { limit };\n }\n getAllByNs(namespace, strict = false) {\n const namespaces = [].concat(namespace);\n if (namespaces.length) {\n return this.items.filter(item => namespaces.includes(item.getNs()));\n }\n if (!strict) {\n return this.items;\n }\n return [];\n }\n getById(id) {\n return this.items.find(item => item.getId() === id);\n }\n getByName(name, namespace) {\n return this.items.find(item => {\n return item.getName() === name && (namespace ? item.getNs() === namespace : true);\n });\n }\n getByPath(path) {\n return this.items.find(item => item.selfLink === path);\n }\n getByLabel(labels) {\n if (Array.isArray(labels)) {\n return this.items.filter((item) => {\n const itemLabels = item.getLabels();\n return labels.every(label => itemLabels.includes(label));\n });\n }\n else {\n return this.items.filter((item) => {\n const itemLabels = item.metadata.labels || {};\n return Object.entries(labels)\n .every(([key, value]) => itemLabels[key] === value);\n });\n }\n }\n async loadItems({ namespaces, api, reqInit, onLoadFailure }) {\n var _a, _b;\n if (!((_a = this.context) === null || _a === void 0 ? void 0 : _a.cluster.isAllowedResource(api.kind))) {\n return [];\n }\n const isLoadingAll = ((_b = this.context.allNamespaces) === null || _b === void 0 ? void 0 : _b.length) > 1\n && this.context.cluster.accessibleNamespaces.length === 0\n && this.context.allNamespaces.every(ns => namespaces.includes(ns));\n if (!api.isNamespaced || isLoadingAll) {\n if (api.isNamespaced) {\n this.loadedNamespaces = [];\n }\n const res = api.list({ reqInit }, this.query);\n if (onLoadFailure) {\n try {\n return await res;\n }\n catch (error) {\n onLoadFailure((error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : error.toString()) || \"Unknown error\");\n // reset the store because we are loading all, so that nothing is displayed\n this.items.clear();\n this.selectedItemsIds.clear();\n return [];\n }\n }\n return res;\n }\n this.loadedNamespaces = namespaces;\n const results = await Promise.allSettled(namespaces.map(namespace => api.list({ namespace, reqInit }, this.query)));\n const res = [];\n for (const result of results) {\n switch (result.status) {\n case \"fulfilled\":\n res.push(...result.value);\n break;\n case \"rejected\":\n if (onLoadFailure) {\n onLoadFailure(result.reason.message);\n }\n else {\n // if onLoadFailure is not provided then preserve old behaviour\n throw result.reason;\n }\n }\n }\n return res;\n }\n filterItemsOnLoad(items) {\n return items;\n }\n async loadAll(options = {}) {\n await this.contextReady;\n this.isLoading = true;\n const { namespaces = this.context.allNamespaces, // load all namespaces by default\n merge = true, // merge loaded items or return as result\n reqInit, onLoadFailure, } = options;\n try {\n const items = await this.loadItems({ namespaces, api: this.api, reqInit, onLoadFailure });\n if (merge) {\n this.mergeItems(items, { replace: false });\n }\n else {\n this.mergeItems(items, { replace: true });\n }\n this.isLoaded = true;\n this.failedLoading = false;\n return items;\n }\n catch (error) {\n console.warn(\"[KubeObjectStore] loadAll failed\", this.api.apiBase, error);\n this.resetOnError(error);\n this.failedLoading = true;\n }\n finally {\n this.isLoading = false;\n }\n }\n async reloadAll(opts = {}) {\n const { force = false } = opts, loadingOptions = __rest(opts, [\"force\"]);\n if (this.isLoading || (this.isLoaded && !force)) {\n return;\n }\n return this.loadAll(loadingOptions);\n }\n mergeItems(partialItems, { replace = false, updateStore = true, sort = true, filter = true } = {}) {\n let items = partialItems;\n // update existing items\n if (!replace) {\n const namespaces = partialItems.map(item => item.getNs());\n items = [\n ...this.items.filter(existingItem => !namespaces.includes(existingItem.getNs())),\n ...partialItems,\n ];\n }\n if (filter)\n items = this.filterItemsOnLoad(items);\n if (sort)\n items = this.sortItems(items);\n if (updateStore)\n this.items.replace(items);\n return items;\n }\n resetOnError(error) {\n if (error)\n this.reset();\n }\n async loadItem(params) {\n return this.api.get(params);\n }\n async load(params) {\n const { name, namespace } = params;\n let item = this.getByName(name, namespace);\n if (!item) {\n item = await this.loadItem(params);\n const newItems = this.sortItems([...this.items, item]);\n this.items.replace(newItems);\n }\n return item;\n }\n async loadFromPath(resourcePath) {\n const { namespace, name } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_5__[\"parseKubeApi\"])(resourcePath);\n return this.load({ name, namespace });\n }\n async createItem(params, data) {\n return this.api.create(params, data);\n }\n async create(params, data) {\n const newItem = await this.createItem(params, data);\n const items = this.sortItems([...this.items, newItem]);\n this.items.replace(items);\n return newItem;\n }\n postUpdate(rawItem) {\n const newItem = new this.api.objectConstructor(rawItem);\n const index = this.items.findIndex(item => item.getId() === newItem.getId());\n Object(_kube_api__WEBPACK_IMPORTED_MODULE_4__[\"ensureObjectSelfLink\"])(this.api, newItem);\n if (index < 0) {\n this.items.push(newItem);\n }\n else {\n this.items[index] = newItem;\n }\n return newItem;\n }\n async patch(item, patch) {\n return this.postUpdate(await this.api.patch({\n name: item.getName(), namespace: item.getNs(),\n }, patch, \"json\"));\n }\n async update(item, data) {\n return this.postUpdate(await this.api.update({\n name: item.getName(), namespace: item.getNs(),\n }, data));\n }\n async remove(item) {\n await this.api.delete({ name: item.getName(), namespace: item.getNs() });\n this.selectedItemsIds.delete(item.getId());\n }\n async removeSelectedItems() {\n return Promise.all(this.selectedItems.map(this.remove));\n }\n bindWatchEventsUpdater(delay = 1000) {\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"reaction\"])(() => this.eventsBuffer.length, this.updateFromEventsBuffer, {\n delay,\n });\n }\n subscribe(opts = {}) {\n const abortController = new abort_controller__WEBPACK_IMPORTED_MODULE_6___default.a();\n if (this.api.isNamespaced) {\n Promise.race([Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"rejectPromiseBy\"])(abortController.signal), Promise.all([this.contextReady, this.namespacesReady])])\n .then(() => {\n if (this.context.cluster.isGlobalWatchEnabled && this.loadedNamespaces.length === 0) {\n return this.watchNamespace(\"\", abortController, opts);\n }\n for (const namespace of this.loadedNamespaces) {\n this.watchNamespace(namespace, abortController, opts);\n }\n })\n .catch(_utils__WEBPACK_IMPORTED_MODULE_1__[\"noop\"]); // ignore DOMExceptions\n }\n else {\n this.watchNamespace(\"\", abortController, opts);\n }\n return () => abortController.abort();\n }\n watchNamespace(namespace, abortController, opts) {\n if (!this.api.getResourceVersion(namespace)) {\n return;\n }\n let timedRetry;\n const watch = () => this.api.watch({\n namespace,\n abortController,\n callback,\n });\n const { signal } = abortController;\n const callback = (data, error) => {\n if (!this.isLoaded || (error === null || error === void 0 ? void 0 : error.type) === \"aborted\")\n return;\n if (error instanceof Response) {\n if (error.status === 404 || error.status === 401) {\n // api has gone, or credentials are not permitted, let's not retry\n return;\n }\n // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n else if (error instanceof _kube_object__WEBPACK_IMPORTED_MODULE_2__[\"KubeStatus\"] && error.code === 410) {\n clearTimeout(timedRetry);\n // resourceVersion has gone, let's try to reload\n timedRetry = setTimeout(() => {\n (namespace\n ? this.loadAll(Object.assign({ namespaces: [namespace], reqInit: { signal } }, opts))\n : this.loadAll(Object.assign({ merge: false, reqInit: { signal } }, opts))).then(watch);\n }, 1000);\n }\n else if (error) { // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n if (data) {\n this.eventsBuffer.push(data);\n }\n };\n signal.addEventListener(\"abort\", () => clearTimeout(timedRetry));\n watch();\n }\n updateFromEventsBuffer() {\n const items = this.getItems();\n for (const { type, object } of this.eventsBuffer.clear()) {\n const index = items.findIndex(item => { var _a; return item.getId() === ((_a = object.metadata) === null || _a === void 0 ? void 0 : _a.uid); });\n const item = items[index];\n switch (type) {\n case \"ADDED\":\n case \"MODIFIED\":\n const newItem = new this.api.objectConstructor(object);\n if (!item) {\n items.push(newItem);\n }\n else {\n items[index] = newItem;\n }\n break;\n case \"DELETED\":\n if (item) {\n items.splice(index, 1);\n }\n break;\n }\n }\n // update items\n this.items.replace(this.sortItems(items.slice(-this.bufferSize)));\n }\n}\nObject.defineProperty(KubeObjectStore, \"defaultContext\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].box()\n}); // TODO: support multiple cluster contexts\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"],\n __metadata(\"design:type\", Array)\n], KubeObjectStore.prototype, \"loadedNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], KubeObjectStore.prototype, \"contextItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"reloadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array, Object]),\n __metadata(\"design:returntype\", Array)\n], KubeObjectStore.prototype, \"mergeItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"load\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadFromPath\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], KubeObjectStore.prototype, \"updateFromEventsBuffer\", null);\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-object.store.ts?");
40577
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeObjectStore\", function() { return KubeObjectStore; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _item_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../item.store */ \"./src/common/item.store.ts\");\n/* harmony import */ var _kube_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./kube-api */ \"./src/common/k8s-api/kube-api.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_6__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\nclass KubeObjectStore extends _item_store__WEBPACK_IMPORTED_MODULE_3__[\"ItemStore\"] {\n constructor(api) {\n super();\n Object.defineProperty(this, \"api\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"limit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"bufferSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 50000\n });\n Object.defineProperty(this, \"loadedNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // collect items from watch-api events to avoid UI blowing up with huge streams of data\n Object.defineProperty(this, \"eventsBuffer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].array([], { deep: false })\n });\n if (api)\n this.api = api;\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"autoBind\"])(this);\n this.bindWatchEventsUpdater();\n }\n get contextReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"when\"])(() => Boolean(this.context));\n }\n get namespacesReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"when\"])(() => Boolean(this.loadedNamespaces));\n }\n get context() {\n return KubeObjectStore.defaultContext.get();\n }\n get contextItems() {\n var _a, _b;\n const namespaces = (_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.contextNamespaces) !== null && _b !== void 0 ? _b : [];\n return this.items.filter(item => {\n const itemNamespace = item.getNs();\n return !itemNamespace /* cluster-wide */ || namespaces.includes(itemNamespace);\n });\n }\n getTotalCount() {\n return this.contextItems.length;\n }\n get query() {\n const { limit } = this;\n if (!limit) {\n return {};\n }\n return { limit };\n }\n getAllByNs(namespace, strict = false) {\n const namespaces = [].concat(namespace);\n if (namespaces.length) {\n return this.items.filter(item => namespaces.includes(item.getNs()));\n }\n if (!strict) {\n return this.items;\n }\n return [];\n }\n getById(id) {\n return this.items.find(item => item.getId() === id);\n }\n getByName(name, namespace) {\n return this.items.find(item => {\n return item.getName() === name && (namespace ? item.getNs() === namespace : true);\n });\n }\n getByPath(path) {\n return this.items.find(item => item.selfLink === path);\n }\n getByLabel(labels) {\n if (Array.isArray(labels)) {\n return this.items.filter((item) => {\n const itemLabels = item.getLabels();\n return labels.every(label => itemLabels.includes(label));\n });\n }\n else {\n return this.items.filter((item) => {\n const itemLabels = item.metadata.labels || {};\n return Object.entries(labels)\n .every(([key, value]) => itemLabels[key] === value);\n });\n }\n }\n async loadItems({ namespaces, reqInit, onLoadFailure }) {\n var _a, _b;\n if (!((_a = this.context) === null || _a === void 0 ? void 0 : _a.cluster.isAllowedResource(this.api.kind))) {\n return [];\n }\n const isLoadingAll = ((_b = this.context.allNamespaces) === null || _b === void 0 ? void 0 : _b.length) > 1\n && this.context.cluster.accessibleNamespaces.length === 0\n && this.context.allNamespaces.every(ns => namespaces.includes(ns));\n if (!this.api.isNamespaced || isLoadingAll) {\n if (this.api.isNamespaced) {\n this.loadedNamespaces = [];\n }\n const res = this.api.list({ reqInit }, this.query);\n if (onLoadFailure) {\n try {\n return await res;\n }\n catch (error) {\n onLoadFailure((error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : error.toString()) || \"Unknown error\");\n // reset the store because we are loading all, so that nothing is displayed\n this.items.clear();\n this.selectedItemsIds.clear();\n return [];\n }\n }\n return res;\n }\n this.loadedNamespaces = namespaces;\n const results = await Promise.allSettled(namespaces.map(namespace => this.api.list({ namespace, reqInit }, this.query)));\n const res = [];\n for (const result of results) {\n switch (result.status) {\n case \"fulfilled\":\n res.push(...result.value);\n break;\n case \"rejected\":\n if (onLoadFailure) {\n onLoadFailure(result.reason.message || result.reason);\n }\n else {\n // if onLoadFailure is not provided then preserve old behaviour\n throw result.reason;\n }\n }\n }\n return res;\n }\n filterItemsOnLoad(items) {\n return items;\n }\n async loadAll({ namespaces = this.context.contextNamespaces, merge = true, reqInit, onLoadFailure } = {}) {\n await this.contextReady;\n this.isLoading = true;\n try {\n const items = await this.loadItems({ namespaces, reqInit, onLoadFailure });\n this.mergeItems(items, { merge });\n this.isLoaded = true;\n this.failedLoading = false;\n return items;\n }\n catch (error) {\n console.warn(\"[KubeObjectStore] loadAll failed\", this.api.apiBase, error);\n this.resetOnError(error);\n this.failedLoading = true;\n }\n finally {\n this.isLoading = false;\n }\n }\n async reloadAll(opts = {}) {\n const { force = false } = opts, loadingOptions = __rest(opts, [\"force\"]);\n if (this.isLoading || (this.isLoaded && !force)) {\n return;\n }\n return this.loadAll(loadingOptions);\n }\n mergeItems(partialItems, { merge = true, updateStore = true, sort = true, filter = true } = {}) {\n let items = partialItems;\n // update existing items\n if (merge) {\n const namespaces = partialItems.map(item => item.getNs());\n items = [\n ...this.items.filter(existingItem => !namespaces.includes(existingItem.getNs())),\n ...partialItems,\n ];\n }\n if (filter)\n items = this.filterItemsOnLoad(items);\n if (sort)\n items = this.sortItems(items);\n if (updateStore)\n this.items.replace(items);\n return items;\n }\n resetOnError(error) {\n if (error)\n this.reset();\n }\n async loadItem(params) {\n return this.api.get(params);\n }\n async load(params) {\n const { name, namespace } = params;\n let item = this.getByName(name, namespace);\n if (!item) {\n item = await this.loadItem(params);\n const newItems = this.sortItems([...this.items, item]);\n this.items.replace(newItems);\n }\n return item;\n }\n async loadFromPath(resourcePath) {\n const { namespace, name } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_5__[\"parseKubeApi\"])(resourcePath);\n return this.load({ name, namespace });\n }\n async createItem(params, data) {\n return this.api.create(params, data);\n }\n async create(params, data) {\n const newItem = await this.createItem(params, data);\n const items = this.sortItems([...this.items, newItem]);\n this.items.replace(items);\n return newItem;\n }\n postUpdate(rawItem) {\n const newItem = new this.api.objectConstructor(rawItem);\n const index = this.items.findIndex(item => item.getId() === newItem.getId());\n Object(_kube_api__WEBPACK_IMPORTED_MODULE_4__[\"ensureObjectSelfLink\"])(this.api, newItem);\n if (index < 0) {\n this.items.push(newItem);\n }\n else {\n this.items[index] = newItem;\n }\n return newItem;\n }\n async patch(item, patch) {\n return this.postUpdate(await this.api.patch({\n name: item.getName(), namespace: item.getNs(),\n }, patch, \"json\"));\n }\n async update(item, data) {\n return this.postUpdate(await this.api.update({\n name: item.getName(),\n namespace: item.getNs(),\n }, data));\n }\n async remove(item) {\n await this.api.delete({ name: item.getName(), namespace: item.getNs() });\n this.selectedItemsIds.delete(item.getId());\n }\n async removeSelectedItems() {\n return Promise.all(this.selectedItems.map(this.remove));\n }\n bindWatchEventsUpdater(delay = 1000) {\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"reaction\"])(() => this.eventsBuffer.length, this.updateFromEventsBuffer, {\n delay,\n });\n }\n subscribe({ onLoadFailure, abortController = new abort_controller__WEBPACK_IMPORTED_MODULE_6___default.a() } = {}) {\n if (this.api.isNamespaced) {\n Promise.race([Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"rejectPromiseBy\"])(abortController.signal), Promise.all([this.contextReady, this.namespacesReady])])\n .then(() => {\n if (this.context.cluster.isGlobalWatchEnabled && this.loadedNamespaces.length === 0) {\n return this.watchNamespace(\"\", abortController, { onLoadFailure });\n }\n for (const namespace of this.loadedNamespaces) {\n this.watchNamespace(namespace, abortController, { onLoadFailure });\n }\n })\n .catch(_utils__WEBPACK_IMPORTED_MODULE_1__[\"noop\"]); // ignore DOMExceptions\n }\n else {\n this.watchNamespace(\"\", abortController, { onLoadFailure });\n }\n return () => abortController.abort();\n }\n watchNamespace(namespace, abortController, opts) {\n if (!this.api.getResourceVersion(namespace)) {\n return;\n }\n let timedRetry;\n const watch = () => this.api.watch({\n namespace,\n abortController,\n callback,\n });\n const { signal } = abortController;\n const callback = (data, error) => {\n if (!this.isLoaded || (error === null || error === void 0 ? void 0 : error.type) === \"aborted\")\n return;\n if (error instanceof Response) {\n if (error.status === 404 || error.status === 401) {\n // api has gone, or credentials are not permitted, let's not retry\n return;\n }\n // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n else if (error instanceof _kube_object__WEBPACK_IMPORTED_MODULE_2__[\"KubeStatus\"] && error.code === 410) {\n clearTimeout(timedRetry);\n // resourceVersion has gone, let's try to reload\n timedRetry = setTimeout(() => {\n (namespace\n ? this.loadAll(Object.assign({ namespaces: [namespace], reqInit: { signal } }, opts))\n : this.loadAll(Object.assign({ merge: false, reqInit: { signal } }, opts))).then(watch);\n }, 1000);\n }\n else if (error) { // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n if (data) {\n this.eventsBuffer.push(data);\n }\n };\n signal.addEventListener(\"abort\", () => clearTimeout(timedRetry));\n watch();\n }\n updateFromEventsBuffer() {\n const items = this.getItems();\n for (const { type, object } of this.eventsBuffer.clear()) {\n const index = items.findIndex(item => { var _a; return item.getId() === ((_a = object.metadata) === null || _a === void 0 ? void 0 : _a.uid); });\n const item = items[index];\n switch (type) {\n case \"ADDED\":\n case \"MODIFIED\":\n const newItem = new this.api.objectConstructor(object);\n if (!item) {\n items.push(newItem);\n }\n else {\n items[index] = newItem;\n }\n break;\n case \"DELETED\":\n if (item) {\n items.splice(index, 1);\n }\n break;\n }\n }\n // update items\n this.items.replace(this.sortItems(items.slice(-this.bufferSize)));\n }\n}\nObject.defineProperty(KubeObjectStore, \"defaultContext\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].box()\n}); // TODO: support multiple cluster contexts\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"],\n __metadata(\"design:type\", Array)\n], KubeObjectStore.prototype, \"loadedNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], KubeObjectStore.prototype, \"contextItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"reloadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array, Object]),\n __metadata(\"design:returntype\", Array)\n], KubeObjectStore.prototype, \"mergeItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"load\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadFromPath\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], KubeObjectStore.prototype, \"updateFromEventsBuffer\", null);\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-object.store.ts?");
40578
40578
 
40579
40579
  /***/ }),
40580
40580
 
@@ -40598,7 +40598,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
40598
40598
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
40599
40599
 
40600
40600
  "use strict";
40601
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeWatchApi\", function() { return KubeWatchApi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"kubeWatchApi\", function() { return kubeWatchApi; });\n/* harmony import */ var p_limit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! p-limit */ \"./node_modules/p-limit/index.js\");\n/* harmony import */ var p_limit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(p_limit__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _vars__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../vars */ \"./src/common/vars.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\nclass KubeWatchApi {\n constructor() {\n Object.defineProperty(this, \"context\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: null\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"makeObservable\"])(this);\n Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"autoBind\"])(this);\n }\n isAllowedApi(api) {\n var _a;\n return Boolean((_a = this.context) === null || _a === void 0 ? void 0 : _a.cluster.isAllowedResource(api.kind));\n }\n preloadStores(stores, { loadOnce, namespaces, onLoadFailure } = {}) {\n const limitRequests = p_limit__WEBPACK_IMPORTED_MODULE_0___default()(1); // load stores one by one to allow quick skipping when fast clicking btw pages\n const preloading = [];\n for (const store of stores) {\n preloading.push(limitRequests(async () => {\n if (store.isLoaded && loadOnce)\n return; // skip\n return store.loadAll({ namespaces, onLoadFailure });\n }));\n }\n return {\n loading: Promise.allSettled(preloading),\n cancelLoading: () => limitRequests.clearQueue(),\n };\n }\n subscribeStores(stores, opts = {}) {\n var _a, _b, _c;\n const { preload = true, waitUntilLoaded = true, loadOnce = false, onLoadFailure } = opts;\n const subscribingNamespaces = (_c = (_a = opts.namespaces) !== null && _a !== void 0 ? _a : (_b = this.context) === null || _b === void 0 ? void 0 : _b.allNamespaces) !== null && _c !== void 0 ? _c : [];\n const unsubscribeStores = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"disposer\"])();\n let isUnsubscribed = false;\n const load = (namespaces = subscribingNamespaces) => this.preloadStores(stores, { namespaces, loadOnce, onLoadFailure });\n let preloading = preload && load();\n let cancelReloading = _utils__WEBPACK_IMPORTED_MODULE_2__[\"noop\"];\n const subscribe = () => {\n if (isUnsubscribed) {\n return;\n }\n unsubscribeStores.push(...stores.map(store => store.subscribe({ onLoadFailure })));\n };\n if (preloading) {\n if (waitUntilLoaded) {\n preloading.loading.then(subscribe, error => {\n this.log({\n message: new Error(\"Loading stores has failed\"),\n meta: { stores, error, options: opts },\n });\n });\n }\n else {\n subscribe();\n }\n // reload stores only for context namespaces change\n cancelReloading = Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => { var _a; return (_a = this.context) === null || _a === void 0 ? void 0 : _a.contextNamespaces; }, namespaces => {\n preloading === null || preloading === void 0 ? void 0 : preloading.cancelLoading();\n unsubscribeStores();\n preloading = load(namespaces);\n preloading.loading.then(subscribe);\n }, {\n equals: mobx__WEBPACK_IMPORTED_MODULE_1__[\"comparer\"].shallow,\n });\n }\n // unsubscribe\n return () => {\n if (isUnsubscribed)\n return;\n isUnsubscribed = true;\n cancelReloading();\n preloading === null || preloading === void 0 ? void 0 : preloading.cancelLoading();\n unsubscribeStores();\n };\n }\n log({ message, cssStyle = \"\", meta = {} }) {\n if (_vars__WEBPACK_IMPORTED_MODULE_3__[\"isProduction\"] && !_vars__WEBPACK_IMPORTED_MODULE_3__[\"isDebugging\"]) {\n return;\n }\n const logInfo = [`%c[KUBE-WATCH-API]:`, `font-weight: bold; ${cssStyle}`, message].flat().map(String);\n const logMeta = Object.assign({ time: new Date().toLocaleString() }, meta);\n if (message instanceof Error) {\n console.error(...logInfo, logMeta);\n }\n else {\n console.info(...logInfo, logMeta);\n }\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], KubeWatchApi.prototype, \"context\", void 0);\nconst kubeWatchApi = new KubeWatchApi();\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-watch-api.ts?");
40601
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeWatchApi\", function() { return KubeWatchApi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"kubeWatchApi\", function() { return kubeWatchApi; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../logger */ \"./src/common/logger.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _WatchCount_data, _KubeWatchApi_watch;\n\n\n\n\n\nclass WrappedAbortController extends abort_controller__WEBPACK_IMPORTED_MODULE_2___default.a {\n constructor(parent) {\n super();\n Object.defineProperty(this, \"parent\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: parent\n });\n parent.signal.addEventListener(\"abort\", () => {\n this.abort();\n });\n }\n}\nclass WatchCount {\n constructor() {\n _WatchCount_data.set(this, new Map());\n }\n inc(store) {\n if (!__classPrivateFieldGet(this, _WatchCount_data, \"f\").has(store)) {\n __classPrivateFieldGet(this, _WatchCount_data, \"f\").set(store, 0);\n }\n const newCount = __classPrivateFieldGet(this, _WatchCount_data, \"f\").get(store) + 1;\n _logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[KUBE-WATCH-API]: inc() count for ${store.api.objectConstructor.apiBase} is now ${newCount}`);\n __classPrivateFieldGet(this, _WatchCount_data, \"f\").set(store, newCount);\n return newCount;\n }\n dec(store) {\n if (!__classPrivateFieldGet(this, _WatchCount_data, \"f\").has(store)) {\n throw new Error(`Cannot dec count for store that has never been inc: ${store.api.objectConstructor.kind}`);\n }\n const newCount = __classPrivateFieldGet(this, _WatchCount_data, \"f\").get(store) - 1;\n if (newCount < 0) {\n throw new Error(`Cannot dec count more times than it has been inc: ${store.api.objectConstructor.kind}`);\n }\n _logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].debug(`[KUBE-WATCH-API]: dec() count for ${store.api.objectConstructor.apiBase} is now ${newCount}`);\n __classPrivateFieldGet(this, _WatchCount_data, \"f\").set(store, newCount);\n return newCount;\n }\n}\n_WatchCount_data = new WeakMap();\nclass KubeWatchApi {\n constructor() {\n _KubeWatchApi_watch.set(this, new WatchCount());\n }\n subscribeStore({ store, parent, watchChanges, namespaces, onLoadFailure }) {\n if (__classPrivateFieldGet(this, _KubeWatchApi_watch, \"f\").inc(store) > 1) {\n // don't load or subscribe to a store more than once\n return () => __classPrivateFieldGet(this, _KubeWatchApi_watch, \"f\").dec(store);\n }\n let childController = new WrappedAbortController(parent);\n const unsubscribe = Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"disposer\"])();\n const loadThenSubscribe = async (namespaces) => {\n try {\n await store.loadAll({ namespaces, reqInit: { signal: childController.signal }, onLoadFailure });\n unsubscribe.push(store.subscribe({ onLoadFailure, abortController: childController }));\n }\n catch (error) {\n if (!(error instanceof DOMException)) {\n this.log(Object.assign(new Error(\"Loading stores has failed\"), { cause: error }), {\n meta: { store, namespaces },\n });\n }\n }\n };\n /**\n * We don't want to wait because we want to start reacting to namespace\n * selection changes ASAP\n */\n loadThenSubscribe(namespaces).catch(_utils__WEBPACK_IMPORTED_MODULE_1__[\"noop\"]);\n const cancelReloading = watchChanges\n ? Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"reaction\"])(\n // Note: must slice because reaction won't fire if it isn't there\n () => [KubeWatchApi.context.contextNamespaces.slice(), KubeWatchApi.context.hasSelectedAll], ([namespaces, curSelectedAll], [prevNamespaces, prevSelectedAll]) => {\n if (curSelectedAll && prevSelectedAll) {\n const action = namespaces.length > prevNamespaces.length ? \"created\" : \"deleted\";\n return console.debug(`[KUBE-WATCH-API]: Not changing watch for ${store.api.apiBase} because a new namespace was ${action} but all namespaces are selected`);\n }\n console.log(`[KUBE-WATCH-API]: changing watch ${store.api.apiBase}`, namespaces);\n childController.abort();\n unsubscribe();\n childController = new WrappedAbortController(parent);\n loadThenSubscribe(namespaces).catch(_utils__WEBPACK_IMPORTED_MODULE_1__[\"noop\"]);\n }, {\n equals: mobx__WEBPACK_IMPORTED_MODULE_0__[\"comparer\"].shallow,\n })\n : _utils__WEBPACK_IMPORTED_MODULE_1__[\"noop\"]; // don't watch namespaces if namespaces were provided\n return () => {\n if (__classPrivateFieldGet(this, _KubeWatchApi_watch, \"f\").dec(store) === 0) {\n // only stop the subcribe if this is the last one\n cancelReloading();\n childController.abort();\n unsubscribe();\n }\n };\n }\n subscribeStores(stores, { namespaces, onLoadFailure } = {}) {\n const parent = new abort_controller__WEBPACK_IMPORTED_MODULE_2___default.a();\n const unsubscribe = Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"disposer\"])(...stores.map(store => {\n var _a, _b;\n return this.subscribeStore({\n store,\n parent,\n watchChanges: !namespaces && store.api.isNamespaced,\n namespaces: (_b = namespaces !== null && namespaces !== void 0 ? namespaces : (_a = KubeWatchApi.context) === null || _a === void 0 ? void 0 : _a.contextNamespaces) !== null && _b !== void 0 ? _b : [],\n onLoadFailure,\n });\n }));\n // unsubscribe\n return Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"once\"])(() => {\n parent.abort();\n unsubscribe();\n });\n }\n log(message, meta) {\n const log = message instanceof Error\n ? console.error\n : console.debug;\n log(\"[KUBE-WATCH-API]:\", message, Object.assign({ time: new Date().toLocaleString() }, meta));\n }\n}\n_KubeWatchApi_watch = new WeakMap();\nObject.defineProperty(KubeWatchApi, \"context\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: null\n});\nconst kubeWatchApi = new KubeWatchApi();\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-watch-api.ts?");
40602
40602
 
40603
40603
  /***/ }),
40604
40604
 
@@ -42254,7 +42254,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
42254
42254
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
42255
42255
 
42256
42256
  "use strict";
42257
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cluster\", function() { return Cluster; });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _common_ipc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _context_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./context-handler */ \"./src/main/context-handler.ts\");\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @kubernetes/client-node */ \"./node_modules/@kubernetes/client-node/dist/index.js\");\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _kubectl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./kubectl */ \"./src/main/kubectl.ts\");\n/* harmony import */ var _kubeconfig_manager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./kubeconfig-manager */ \"./src/main/kubeconfig-manager.ts\");\n/* harmony import */ var _common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/kube-helpers */ \"./src/common/kube-helpers.ts\");\n/* harmony import */ var _common_rbac__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/rbac */ \"./src/common/rbac.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _cluster_detectors_version_detector__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./cluster-detectors/version-detector */ \"./src/main/cluster-detectors/version-detector.ts\");\n/* harmony import */ var _cluster_detectors_detector_registry__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./cluster-detectors/detector-registry */ \"./src/main/cluster-detectors/detector-registry.ts\");\n/* harmony import */ var p_limit__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! p-limit */ \"./node_modules/p-limit/index.js\");\n/* harmony import */ var p_limit__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(p_limit__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/cluster-types */ \"./src/common/cluster-types.ts\");\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../common/utils */ \"./src/common/utils/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Cluster\n *\n * @beta\n */\nclass Cluster {\n constructor(model) {\n /** Unique id for a cluster */\n Object.defineProperty(this, \"id\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kubeCtl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Context handler\n *\n * @internal\n */\n Object.defineProperty(this, \"contextHandler\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kubeconfigManager\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"eventDisposers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"activated\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"resourceAccessStatuses\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n /**\n * Kubeconfig context name\n *\n * @observable\n */\n Object.defineProperty(this, \"contextName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Path to kubeconfig\n *\n * @observable\n */\n Object.defineProperty(this, \"kubeConfigPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * @deprecated\n */\n Object.defineProperty(this, \"workspace\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * @deprecated\n */\n Object.defineProperty(this, \"workspaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Kubernetes API server URL\n *\n * @observable\n */\n Object.defineProperty(this, \"apiUrl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n }); // cluster server url\n /**\n * Is cluster online\n *\n * @observable\n */\n Object.defineProperty(this, \"online\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // describes if we can detect that cluster is online\n /**\n * Can user access cluster resources\n *\n * @observable\n */\n Object.defineProperty(this, \"accessible\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // if user is able to access cluster resources\n /**\n * Is cluster instance in usable state\n *\n * @observable\n */\n Object.defineProperty(this, \"ready\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // cluster is in usable state\n /**\n * Is cluster currently reconnecting\n *\n * @observable\n */\n Object.defineProperty(this, \"reconnecting\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n /**\n * Is cluster disconnected. False if user has selected to connect.\n *\n * @observable\n */\n Object.defineProperty(this, \"disconnected\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n });\n /**\n * Does user have admin like access\n *\n * @observable\n */\n Object.defineProperty(this, \"isAdmin\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n /**\n * Global watch-api accessibility , e.g. \"/api/v1/services?watch=1\"\n *\n * @observable\n */\n Object.defineProperty(this, \"isGlobalWatchEnabled\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n /**\n * Preferences\n *\n * @observable\n */\n Object.defineProperty(this, \"preferences\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {}\n });\n /**\n * Metadata\n *\n * @observable\n */\n Object.defineProperty(this, \"metadata\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {}\n });\n /**\n * List of allowed namespaces verified via K8S::SelfSubjectAccessReview api\n *\n * @observable\n */\n Object.defineProperty(this, \"allowedNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n /**\n * List of allowed resources\n *\n * @observable\n * @internal\n */\n Object.defineProperty(this, \"allowedResources\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n /**\n * List of accessible namespaces provided by user in the Cluster Settings\n *\n * @observable\n */\n Object.defineProperty(this, \"accessibleNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n /**\n * Labels for the catalog entity\n */\n Object.defineProperty(this, \"labels\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {}\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"makeObservable\"])(this);\n this.id = model.id;\n this.updateModel(model);\n const { config } = Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"loadConfigFromFileSync\"])(this.kubeConfigPath);\n const validationError = Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"validateKubeConfig\"])(config, this.contextName);\n if (validationError) {\n throw validationError;\n }\n this.apiUrl = config.getCluster(config.getContextObject(this.contextName).cluster).server;\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"]) {\n // for the time being, until renderer gets its own cluster type\n this.contextHandler = new _context_handler__WEBPACK_IMPORTED_MODULE_3__[\"ContextHandler\"](this);\n this.kubeconfigManager = new _kubeconfig_manager__WEBPACK_IMPORTED_MODULE_6__[\"KubeconfigManager\"](this, this.contextHandler);\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].debug(`[CLUSTER]: Cluster init success`, {\n id: this.id,\n context: this.contextName,\n apiUrl: this.apiUrl,\n });\n }\n }\n get whenReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"when\"])(() => this.ready);\n }\n /**\n * Is cluster available\n *\n * @computed\n */\n get available() {\n return this.accessible && !this.disconnected;\n }\n /**\n * Cluster name\n *\n * @computed\n */\n get name() {\n return this.preferences.clusterName || this.contextName;\n }\n /**\n * The detected kubernetes distribution\n */\n get distribution() {\n var _a;\n return ((_a = this.metadata[_common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterMetadataKey\"].DISTRIBUTION]) === null || _a === void 0 ? void 0 : _a.toString()) || \"unknown\";\n }\n /**\n * The detected kubernetes version\n */\n get version() {\n var _a;\n return ((_a = this.metadata[_common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterMetadataKey\"].VERSION]) === null || _a === void 0 ? void 0 : _a.toString()) || \"unknown\";\n }\n /**\n * Prometheus preferences\n *\n * @computed\n * @internal\n */\n get prometheusPreferences() {\n const { prometheus, prometheusProvider } = this.preferences;\n return Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"toJS\"])({ prometheus, prometheusProvider });\n }\n /**\n * defaultNamespace preference\n *\n * @computed\n * @internal\n */\n get defaultNamespace() {\n const { defaultNamespace } = this.preferences;\n return defaultNamespace;\n }\n /**\n * Update cluster data model\n *\n * @param model\n */\n updateModel(model) {\n // Note: do not assign ID as that should never be updated\n this.kubeConfigPath = model.kubeConfigPath;\n if (model.workspace) {\n this.workspace = model.workspace;\n }\n if (model.workspaces) {\n this.workspaces = model.workspaces;\n }\n if (model.contextName) {\n this.contextName = model.contextName;\n }\n if (model.preferences) {\n this.preferences = model.preferences;\n }\n if (model.metadata) {\n this.metadata = model.metadata;\n }\n if (model.accessibleNamespaces) {\n this.accessibleNamespaces = model.accessibleNamespaces;\n }\n if (model.labels) {\n this.labels = model.labels;\n }\n }\n /**\n * @internal\n */\n bindEvents() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: bind events`, this.getMeta());\n const refreshTimer = setInterval(() => !this.disconnected && this.refresh(), 30000); // every 30s\n const refreshMetadataTimer = setInterval(() => !this.disconnected && this.refreshMetadata(), 900000); // every 15 minutes\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"]) {\n this.eventDisposers.push(Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.getState(), () => this.pushState()), Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.prometheusPreferences, (prefs) => this.contextHandler.setupPrometheus(prefs), { equals: mobx__WEBPACK_IMPORTED_MODULE_1__[\"comparer\"].structural }), () => {\n clearInterval(refreshTimer);\n clearInterval(refreshMetadataTimer);\n }, Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.defaultNamespace, () => this.recreateProxyKubeconfig()));\n }\n }\n /**\n * @internal\n */\n async recreateProxyKubeconfig() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(\"Recreate proxy kubeconfig\");\n try {\n this.kubeconfigManager.clear();\n }\n catch (_a) {\n // do nothing\n }\n this.getProxyKubeconfig();\n }\n /**\n * internal\n */\n unbindEvents() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: unbind events`, this.getMeta());\n this.eventDisposers.forEach(dispose => dispose());\n this.eventDisposers.length = 0;\n }\n /**\n * @param force force activation\n * @internal\n */\n async activate(force = false) {\n if (this.activated && !force) {\n return this.pushState();\n }\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: activate`, this.getMeta());\n if (!this.eventDisposers.length) {\n this.bindEvents();\n }\n if (this.disconnected || !this.accessible) {\n await this.reconnect();\n }\n this.broadcastConnectUpdate(\"Refreshing connection status ...\");\n await this.refreshConnectionStatus();\n if (this.accessible) {\n this.broadcastConnectUpdate(\"Refreshing cluster accessibility ...\");\n await this.refreshAccessibility();\n // download kubectl in background, so it's not blocking dashboard\n this.ensureKubectl()\n .catch(error => _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].warn(`[CLUSTER]: failed to download kubectl for clusterId=${this.id}`, error));\n this.broadcastConnectUpdate(\"Connected, waiting for view to load ...\");\n }\n this.activated = true;\n this.pushState();\n }\n /**\n * @internal\n */\n async ensureKubectl() {\n var _a;\n (_a = this.kubeCtl) !== null && _a !== void 0 ? _a : (this.kubeCtl = new _kubectl__WEBPACK_IMPORTED_MODULE_5__[\"Kubectl\"](this.version));\n await this.kubeCtl.ensureKubectl();\n return this.kubeCtl;\n }\n /**\n * @internal\n */\n async reconnect() {\n var _a, _b;\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: reconnect`, this.getMeta());\n (_a = this.contextHandler) === null || _a === void 0 ? void 0 : _a.stopServer();\n await ((_b = this.contextHandler) === null || _b === void 0 ? void 0 : _b.ensureServer());\n this.disconnected = false;\n }\n /**\n * @internal\n */\n disconnect() {\n var _a;\n this.unbindEvents();\n (_a = this.contextHandler) === null || _a === void 0 ? void 0 : _a.stopServer();\n this.disconnected = true;\n this.online = false;\n this.accessible = false;\n this.ready = false;\n this.activated = false;\n this.allowedNamespaces = [];\n this.resourceAccessStatuses.clear();\n this.pushState();\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: disconnect`, this.getMeta());\n }\n /**\n * @internal\n * @param opts refresh options\n */\n async refresh(opts = {}) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: refresh`, this.getMeta());\n await this.refreshConnectionStatus();\n if (this.accessible) {\n await this.refreshAccessibility();\n if (opts.refreshMetadata) {\n this.refreshMetadata();\n }\n }\n this.pushState();\n }\n /**\n * @internal\n */\n async refreshMetadata() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: refreshMetadata`, this.getMeta());\n const metadata = await _cluster_detectors_detector_registry__WEBPACK_IMPORTED_MODULE_11__[\"DetectorRegistry\"].getInstance().detectForCluster(this);\n const existingMetadata = this.metadata;\n this.metadata = Object.assign(existingMetadata, metadata);\n }\n /**\n * @internal\n */\n async refreshAccessibility() {\n this.isAdmin = await this.isClusterAdmin();\n this.isGlobalWatchEnabled = await this.canUseWatchApi({ resource: \"*\" });\n this.allowedNamespaces = await this.getAllowedNamespaces();\n this.allowedResources = await this.getAllowedResources();\n this.ready = true;\n }\n /**\n * @internal\n */\n async refreshConnectionStatus() {\n const connectionStatus = await this.getConnectionStatus();\n this.online = connectionStatus > _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n this.accessible = connectionStatus == _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessGranted;\n }\n async getKubeconfig() {\n const { config } = await Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"loadConfigFromFile\"])(this.kubeConfigPath);\n return config;\n }\n /**\n * @internal\n */\n async getProxyKubeconfig() {\n const proxyKCPath = await this.getProxyKubeconfigPath();\n const { config } = await Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"loadConfigFromFile\"])(proxyKCPath);\n return config;\n }\n /**\n * @internal\n */\n async getProxyKubeconfigPath() {\n return this.kubeconfigManager.getPath();\n }\n async getConnectionStatus() {\n try {\n const versionDetector = new _cluster_detectors_version_detector__WEBPACK_IMPORTED_MODULE_10__[\"VersionDetector\"](this);\n const versionData = await versionDetector.detect();\n this.metadata.version = versionData.value;\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessGranted;\n }\n catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].error(`[CLUSTER]: Failed to connect to \"${this.contextName}\": ${error}`);\n if (error.statusCode) {\n if (error.statusCode >= 400 && error.statusCode < 500) {\n this.broadcastConnectUpdate(\"Invalid credentials\", true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessDenied;\n }\n this.broadcastConnectUpdate(error.error || error.message, true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n }\n if (error.failed === true) {\n if (error.timedOut === true) {\n this.broadcastConnectUpdate(\"Connection timed out\", true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n }\n this.broadcastConnectUpdate(\"Failed to fetch credentials\", true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessDenied;\n }\n this.broadcastConnectUpdate(error.message, true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n }\n }\n /**\n * @internal\n * @param resourceAttributes resource attributes\n */\n async canI(resourceAttributes) {\n const authApi = (await this.getProxyKubeconfig()).makeApiClient(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__[\"AuthorizationV1Api\"]);\n try {\n const accessReview = await authApi.createSelfSubjectAccessReview({\n apiVersion: \"authorization.k8s.io/v1\",\n kind: \"SelfSubjectAccessReview\",\n spec: { resourceAttributes },\n });\n return accessReview.body.status.allowed;\n }\n catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].error(`failed to request selfSubjectAccessReview: ${error}`);\n return false;\n }\n }\n /**\n * @internal\n */\n async isClusterAdmin() {\n return this.canI({\n namespace: \"kube-system\",\n resource: \"*\",\n verb: \"create\",\n });\n }\n /**\n * @internal\n */\n async canUseWatchApi(customizeResource = {}) {\n return this.canI(Object.assign({ verb: \"watch\", resource: \"*\" }, customizeResource));\n }\n toJSON() {\n return Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"toJS\"])({\n id: this.id,\n contextName: this.contextName,\n kubeConfigPath: this.kubeConfigPath,\n workspace: this.workspace,\n workspaces: this.workspaces,\n preferences: this.preferences,\n metadata: this.metadata,\n accessibleNamespaces: this.accessibleNamespaces,\n labels: this.labels,\n });\n }\n /**\n * Serializable cluster-state used for sync btw main <-> renderer\n */\n getState() {\n return Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"toJS\"])({\n apiUrl: this.apiUrl,\n online: this.online,\n ready: this.ready,\n disconnected: this.disconnected,\n accessible: this.accessible,\n isAdmin: this.isAdmin,\n allowedNamespaces: this.allowedNamespaces,\n allowedResources: this.allowedResources,\n isGlobalWatchEnabled: this.isGlobalWatchEnabled,\n });\n }\n /**\n * @internal\n * @param state cluster state\n */\n setState(state) {\n Object.assign(this, state);\n }\n /**\n * @internal\n * @param state cluster state\n */\n pushState(state = this.getState()) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].silly(`[CLUSTER]: push-state`, state);\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"broadcastMessage\"])(\"cluster:state\", this.id, state);\n }\n // get cluster system meta, e.g. use in \"logger\"\n getMeta() {\n return {\n id: this.id,\n name: this.contextName,\n ready: this.ready,\n online: this.online,\n accessible: this.accessible,\n disconnected: this.disconnected,\n };\n }\n /**\n * broadcast an authentication update concerning this cluster\n * @internal\n */\n broadcastConnectUpdate(message, isError = false) {\n const update = { message, isError };\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].debug(`[CLUSTER]: broadcasting connection update`, Object.assign(Object.assign({}, update), { meta: this.getMeta() }));\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"broadcastMessage\"])(`cluster:${this.id}:connection-update`, update);\n }\n async getAllowedNamespaces() {\n if (this.accessibleNamespaces.length) {\n return this.accessibleNamespaces;\n }\n const api = (await this.getProxyKubeconfig()).makeApiClient(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__[\"CoreV1Api\"]);\n try {\n const { body: { items } } = await api.listNamespace();\n const namespaces = items.map(ns => ns.metadata.name);\n return namespaces;\n }\n catch (error) {\n const ctx = (await this.getProxyKubeconfig()).getContextObject(this.contextName);\n const namespaceList = [ctx.namespace].filter(Boolean);\n if (namespaceList.length === 0 && error instanceof _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__[\"HttpError\"] && error.statusCode === 403) {\n const { response } = error;\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(\"[CLUSTER]: listing namespaces is forbidden, broadcasting\", { clusterId: this.id, error: response.body });\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"broadcastMessage\"])(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"ClusterListNamespaceForbiddenChannel\"], this.id);\n }\n return namespaceList;\n }\n }\n async getAllowedResources() {\n try {\n if (!this.allowedNamespaces.length) {\n return [];\n }\n const resources = _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResources\"].filter((resource) => this.resourceAccessStatuses.get(resource) === undefined);\n const apiLimit = p_limit__WEBPACK_IMPORTED_MODULE_12___default()(5); // 5 concurrent api requests\n const requests = [];\n for (const apiResource of resources) {\n requests.push(apiLimit(async () => {\n for (const namespace of this.allowedNamespaces.slice(0, 10)) {\n if (!this.resourceAccessStatuses.get(apiResource)) {\n const result = await this.canI({\n resource: apiResource.apiName,\n group: apiResource.group,\n verb: \"list\",\n namespace,\n });\n this.resourceAccessStatuses.set(apiResource, result);\n }\n }\n }));\n }\n await Promise.all(requests);\n return _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResources\"]\n .filter((resource) => this.resourceAccessStatuses.get(resource))\n .map(apiResource => apiResource.apiName);\n }\n catch (error) {\n return [];\n }\n }\n isAllowedResource(kind) {\n if (kind in _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResourceRecord\"]) {\n return this.allowedResources.includes(kind);\n }\n const apiResource = _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResources\"].find(resource => resource.kind === kind);\n if (apiResource) {\n return this.allowedResources.includes(apiResource.apiName);\n }\n return true; // allowed by default for other resources\n }\n isMetricHidden(resource) {\n var _a;\n return Boolean((_a = this.preferences.hiddenMetrics) === null || _a === void 0 ? void 0 : _a.includes(resource));\n }\n get nodeShellImage() {\n var _a;\n return ((_a = this.preferences) === null || _a === void 0 ? void 0 : _a.nodeShellImage) || _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"initialNodeShellImage\"];\n }\n get imagePullSecret() {\n var _a;\n return (_a = this.preferences) === null || _a === void 0 ? void 0 : _a.imagePullSecret;\n }\n isInLocalKubeconfig() {\n return this.kubeConfigPath.startsWith(Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"storedKubeConfigFolder\"])());\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"contextName\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"kubeConfigPath\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"workspace\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"workspaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"apiUrl\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"online\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"accessible\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"ready\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"reconnecting\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"disconnected\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"isAdmin\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"isGlobalWatchEnabled\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"preferences\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"metadata\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"allowedNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"allowedResources\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"accessibleNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"labels\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"available\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"name\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"distribution\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"version\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"prometheusPreferences\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"defaultNamespace\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Cluster.prototype, \"updateModel\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"activate\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"reconnect\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], Cluster.prototype, \"disconnect\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"refresh\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"refreshMetadata\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"refreshConnectionStatus\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Cluster.prototype, \"setState\", null);\n\n\n//# sourceURL=webpack:///./src/main/cluster.ts?");
42257
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cluster\", function() { return Cluster; });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _common_ipc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _context_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./context-handler */ \"./src/main/context-handler.ts\");\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @kubernetes/client-node */ \"./node_modules/@kubernetes/client-node/dist/index.js\");\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _kubectl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./kubectl */ \"./src/main/kubectl.ts\");\n/* harmony import */ var _kubeconfig_manager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./kubeconfig-manager */ \"./src/main/kubeconfig-manager.ts\");\n/* harmony import */ var _common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/kube-helpers */ \"./src/common/kube-helpers.ts\");\n/* harmony import */ var _common_rbac__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/rbac */ \"./src/common/rbac.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _cluster_detectors_version_detector__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./cluster-detectors/version-detector */ \"./src/main/cluster-detectors/version-detector.ts\");\n/* harmony import */ var _cluster_detectors_detector_registry__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./cluster-detectors/detector-registry */ \"./src/main/cluster-detectors/detector-registry.ts\");\n/* harmony import */ var p_limit__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! p-limit */ \"./node_modules/p-limit/index.js\");\n/* harmony import */ var p_limit__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(p_limit__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/cluster-types */ \"./src/common/cluster-types.ts\");\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../common/utils */ \"./src/common/utils/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Cluster\n *\n * @beta\n */\nclass Cluster {\n constructor(model) {\n /** Unique id for a cluster */\n Object.defineProperty(this, \"id\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kubeCtl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Context handler\n *\n * @internal\n */\n Object.defineProperty(this, \"contextHandler\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"proxyKubeconfigManager\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"eventsDisposer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"disposer\"])()\n });\n Object.defineProperty(this, \"activated\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"resourceAccessStatuses\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n /**\n * Kubeconfig context name\n *\n * @observable\n */\n Object.defineProperty(this, \"contextName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Path to kubeconfig\n *\n * @observable\n */\n Object.defineProperty(this, \"kubeConfigPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * @deprecated\n */\n Object.defineProperty(this, \"workspace\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * @deprecated\n */\n Object.defineProperty(this, \"workspaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Kubernetes API server URL\n *\n * @observable\n */\n Object.defineProperty(this, \"apiUrl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n }); // cluster server url\n /**\n * Is cluster online\n *\n * @observable\n */\n Object.defineProperty(this, \"online\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // describes if we can detect that cluster is online\n /**\n * Can user access cluster resources\n *\n * @observable\n */\n Object.defineProperty(this, \"accessible\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // if user is able to access cluster resources\n /**\n * Is cluster instance in usable state\n *\n * @observable\n */\n Object.defineProperty(this, \"ready\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // cluster is in usable state\n /**\n * Is cluster currently reconnecting\n *\n * @observable\n */\n Object.defineProperty(this, \"reconnecting\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n /**\n * Is cluster disconnected. False if user has selected to connect.\n *\n * @observable\n */\n Object.defineProperty(this, \"disconnected\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n });\n /**\n * Does user have admin like access\n *\n * @observable\n */\n Object.defineProperty(this, \"isAdmin\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n /**\n * Global watch-api accessibility , e.g. \"/api/v1/services?watch=1\"\n *\n * @observable\n */\n Object.defineProperty(this, \"isGlobalWatchEnabled\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n /**\n * Preferences\n *\n * @observable\n */\n Object.defineProperty(this, \"preferences\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {}\n });\n /**\n * Metadata\n *\n * @observable\n */\n Object.defineProperty(this, \"metadata\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {}\n });\n /**\n * List of allowed namespaces verified via K8S::SelfSubjectAccessReview api\n *\n * @observable\n */\n Object.defineProperty(this, \"allowedNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n /**\n * List of allowed resources\n *\n * @observable\n * @internal\n */\n Object.defineProperty(this, \"allowedResources\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n /**\n * List of accessible namespaces provided by user in the Cluster Settings\n *\n * @observable\n */\n Object.defineProperty(this, \"accessibleNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n /**\n * Labels for the catalog entity\n */\n Object.defineProperty(this, \"labels\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {}\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"makeObservable\"])(this);\n this.id = model.id;\n this.updateModel(model);\n const { config } = Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"loadConfigFromFileSync\"])(this.kubeConfigPath);\n const validationError = Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"validateKubeConfig\"])(config, this.contextName);\n if (validationError) {\n throw validationError;\n }\n this.apiUrl = config.getCluster(config.getContextObject(this.contextName).cluster).server;\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"]) {\n // for the time being, until renderer gets its own cluster type\n this.contextHandler = new _context_handler__WEBPACK_IMPORTED_MODULE_3__[\"ContextHandler\"](this);\n this.proxyKubeconfigManager = new _kubeconfig_manager__WEBPACK_IMPORTED_MODULE_6__[\"KubeconfigManager\"](this, this.contextHandler);\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].debug(`[CLUSTER]: Cluster init success`, {\n id: this.id,\n context: this.contextName,\n apiUrl: this.apiUrl,\n });\n }\n }\n get whenReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"when\"])(() => this.ready);\n }\n /**\n * Is cluster available\n *\n * @computed\n */\n get available() {\n return this.accessible && !this.disconnected;\n }\n /**\n * Cluster name\n *\n * @computed\n */\n get name() {\n return this.preferences.clusterName || this.contextName;\n }\n /**\n * The detected kubernetes distribution\n */\n get distribution() {\n var _a;\n return ((_a = this.metadata[_common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterMetadataKey\"].DISTRIBUTION]) === null || _a === void 0 ? void 0 : _a.toString()) || \"unknown\";\n }\n /**\n * The detected kubernetes version\n */\n get version() {\n var _a;\n return ((_a = this.metadata[_common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterMetadataKey\"].VERSION]) === null || _a === void 0 ? void 0 : _a.toString()) || \"unknown\";\n }\n /**\n * Prometheus preferences\n *\n * @computed\n * @internal\n */\n get prometheusPreferences() {\n const { prometheus, prometheusProvider } = this.preferences;\n return Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"toJS\"])({ prometheus, prometheusProvider });\n }\n /**\n * defaultNamespace preference\n *\n * @computed\n * @internal\n */\n get defaultNamespace() {\n return this.preferences.defaultNamespace;\n }\n /**\n * Update cluster data model\n *\n * @param model\n */\n updateModel(model) {\n // Note: do not assign ID as that should never be updated\n this.kubeConfigPath = model.kubeConfigPath;\n if (model.workspace) {\n this.workspace = model.workspace;\n }\n if (model.workspaces) {\n this.workspaces = model.workspaces;\n }\n if (model.contextName) {\n this.contextName = model.contextName;\n }\n if (model.preferences) {\n this.preferences = model.preferences;\n }\n if (model.metadata) {\n this.metadata = model.metadata;\n }\n if (model.accessibleNamespaces) {\n this.accessibleNamespaces = model.accessibleNamespaces;\n }\n if (model.labels) {\n this.labels = model.labels;\n }\n }\n /**\n * @internal\n */\n bindEvents() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: bind events`, this.getMeta());\n const refreshTimer = setInterval(() => !this.disconnected && this.refresh(), 30000); // every 30s\n const refreshMetadataTimer = setInterval(() => !this.disconnected && this.refreshMetadata(), 900000); // every 15 minutes\n this.eventsDisposer.push(Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.getState(), state => this.pushState(state)), Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.prometheusPreferences, prefs => this.contextHandler.setupPrometheus(prefs), { equals: mobx__WEBPACK_IMPORTED_MODULE_1__[\"comparer\"].structural }), () => clearInterval(refreshTimer), () => clearInterval(refreshMetadataTimer), Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.defaultNamespace, () => this.recreateProxyKubeconfig()));\n }\n /**\n * @internal\n */\n async recreateProxyKubeconfig() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(\"[CLUSTER]: Recreating proxy kubeconfig\");\n try {\n await this.proxyKubeconfigManager.clear();\n await this.getProxyKubeconfig();\n }\n catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].error(`[CLUSTER]: failed to recreate proxy kubeconfig`, error);\n }\n }\n /**\n * @param force force activation\n * @internal\n */\n async activate(force = false) {\n if (this.activated && !force) {\n return this.pushState();\n }\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: activate`, this.getMeta());\n if (!this.eventsDisposer.length) {\n this.bindEvents();\n }\n if (this.disconnected || !this.accessible) {\n await this.reconnect();\n }\n this.broadcastConnectUpdate(\"Refreshing connection status ...\");\n await this.refreshConnectionStatus();\n if (this.accessible) {\n this.broadcastConnectUpdate(\"Refreshing cluster accessibility ...\");\n await this.refreshAccessibility();\n // download kubectl in background, so it's not blocking dashboard\n this.ensureKubectl()\n .catch(error => _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].warn(`[CLUSTER]: failed to download kubectl for clusterId=${this.id}`, error));\n this.broadcastConnectUpdate(\"Connected, waiting for view to load ...\");\n }\n this.activated = true;\n this.pushState();\n }\n /**\n * @internal\n */\n async ensureKubectl() {\n var _a;\n (_a = this.kubeCtl) !== null && _a !== void 0 ? _a : (this.kubeCtl = new _kubectl__WEBPACK_IMPORTED_MODULE_5__[\"Kubectl\"](this.version));\n await this.kubeCtl.ensureKubectl();\n return this.kubeCtl;\n }\n /**\n * @internal\n */\n async reconnect() {\n var _a, _b;\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: reconnect`, this.getMeta());\n (_a = this.contextHandler) === null || _a === void 0 ? void 0 : _a.stopServer();\n await ((_b = this.contextHandler) === null || _b === void 0 ? void 0 : _b.ensureServer());\n this.disconnected = false;\n }\n /**\n * @internal\n */\n disconnect() {\n var _a;\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: disconnecting`, { id: this.id });\n this.eventsDisposer();\n (_a = this.contextHandler) === null || _a === void 0 ? void 0 : _a.stopServer();\n this.disconnected = true;\n this.online = false;\n this.accessible = false;\n this.ready = false;\n this.activated = false;\n this.allowedNamespaces = [];\n this.resourceAccessStatuses.clear();\n this.pushState();\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: disconnected`, { id: this.id });\n }\n /**\n * @internal\n * @param opts refresh options\n */\n async refresh(opts = {}) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: refresh`, this.getMeta());\n await this.refreshConnectionStatus();\n if (this.accessible) {\n await this.refreshAccessibility();\n if (opts.refreshMetadata) {\n this.refreshMetadata();\n }\n }\n this.pushState();\n }\n /**\n * @internal\n */\n async refreshMetadata() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: refreshMetadata`, this.getMeta());\n const metadata = await _cluster_detectors_detector_registry__WEBPACK_IMPORTED_MODULE_11__[\"DetectorRegistry\"].getInstance().detectForCluster(this);\n const existingMetadata = this.metadata;\n this.metadata = Object.assign(existingMetadata, metadata);\n }\n /**\n * @internal\n */\n async refreshAccessibility() {\n this.isAdmin = await this.isClusterAdmin();\n this.isGlobalWatchEnabled = await this.canUseWatchApi({ resource: \"*\" });\n this.allowedNamespaces = await this.getAllowedNamespaces();\n this.allowedResources = await this.getAllowedResources();\n this.ready = true;\n }\n /**\n * @internal\n */\n async refreshConnectionStatus() {\n const connectionStatus = await this.getConnectionStatus();\n this.online = connectionStatus > _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n this.accessible = connectionStatus == _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessGranted;\n }\n async getKubeconfig() {\n const { config } = await Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"loadConfigFromFile\"])(this.kubeConfigPath);\n return config;\n }\n /**\n * @internal\n */\n async getProxyKubeconfig() {\n const proxyKCPath = await this.getProxyKubeconfigPath();\n const { config } = await Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"loadConfigFromFile\"])(proxyKCPath);\n return config;\n }\n /**\n * @internal\n */\n async getProxyKubeconfigPath() {\n return this.proxyKubeconfigManager.getPath();\n }\n async getConnectionStatus() {\n try {\n const versionDetector = new _cluster_detectors_version_detector__WEBPACK_IMPORTED_MODULE_10__[\"VersionDetector\"](this);\n const versionData = await versionDetector.detect();\n this.metadata.version = versionData.value;\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessGranted;\n }\n catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].error(`[CLUSTER]: Failed to connect to \"${this.contextName}\": ${error}`);\n if (error.statusCode) {\n if (error.statusCode >= 400 && error.statusCode < 500) {\n this.broadcastConnectUpdate(\"Invalid credentials\", true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessDenied;\n }\n this.broadcastConnectUpdate(error.error || error.message, true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n }\n if (error.failed === true) {\n if (error.timedOut === true) {\n this.broadcastConnectUpdate(\"Connection timed out\", true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n }\n this.broadcastConnectUpdate(\"Failed to fetch credentials\", true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessDenied;\n }\n this.broadcastConnectUpdate(error.message, true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n }\n }\n /**\n * @internal\n * @param resourceAttributes resource attributes\n */\n async canI(resourceAttributes) {\n const authApi = (await this.getProxyKubeconfig()).makeApiClient(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__[\"AuthorizationV1Api\"]);\n try {\n const accessReview = await authApi.createSelfSubjectAccessReview({\n apiVersion: \"authorization.k8s.io/v1\",\n kind: \"SelfSubjectAccessReview\",\n spec: { resourceAttributes },\n });\n return accessReview.body.status.allowed;\n }\n catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].error(`failed to request selfSubjectAccessReview: ${error}`);\n return false;\n }\n }\n /**\n * @internal\n */\n async isClusterAdmin() {\n return this.canI({\n namespace: \"kube-system\",\n resource: \"*\",\n verb: \"create\",\n });\n }\n /**\n * @internal\n */\n async canUseWatchApi(customizeResource = {}) {\n return this.canI(Object.assign({ verb: \"watch\", resource: \"*\" }, customizeResource));\n }\n toJSON() {\n return Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"toJS\"])({\n id: this.id,\n contextName: this.contextName,\n kubeConfigPath: this.kubeConfigPath,\n workspace: this.workspace,\n workspaces: this.workspaces,\n preferences: this.preferences,\n metadata: this.metadata,\n accessibleNamespaces: this.accessibleNamespaces,\n labels: this.labels,\n });\n }\n /**\n * Serializable cluster-state used for sync btw main <-> renderer\n */\n getState() {\n return Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"toJS\"])({\n apiUrl: this.apiUrl,\n online: this.online,\n ready: this.ready,\n disconnected: this.disconnected,\n accessible: this.accessible,\n isAdmin: this.isAdmin,\n allowedNamespaces: this.allowedNamespaces,\n allowedResources: this.allowedResources,\n isGlobalWatchEnabled: this.isGlobalWatchEnabled,\n });\n }\n /**\n * @internal\n * @param state cluster state\n */\n setState(state) {\n Object.assign(this, state);\n }\n /**\n * @internal\n * @param state cluster state\n */\n pushState(state = this.getState()) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].silly(`[CLUSTER]: push-state`, state);\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"broadcastMessage\"])(\"cluster:state\", this.id, state);\n }\n // get cluster system meta, e.g. use in \"logger\"\n getMeta() {\n return {\n id: this.id,\n name: this.contextName,\n ready: this.ready,\n online: this.online,\n accessible: this.accessible,\n disconnected: this.disconnected,\n };\n }\n /**\n * broadcast an authentication update concerning this cluster\n * @internal\n */\n broadcastConnectUpdate(message, isError = false) {\n const update = { message, isError };\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].debug(`[CLUSTER]: broadcasting connection update`, Object.assign(Object.assign({}, update), { meta: this.getMeta() }));\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"broadcastMessage\"])(`cluster:${this.id}:connection-update`, update);\n }\n async getAllowedNamespaces() {\n if (this.accessibleNamespaces.length) {\n return this.accessibleNamespaces;\n }\n const api = (await this.getProxyKubeconfig()).makeApiClient(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__[\"CoreV1Api\"]);\n try {\n const { body: { items } } = await api.listNamespace();\n const namespaces = items.map(ns => ns.metadata.name);\n return namespaces;\n }\n catch (error) {\n const ctx = (await this.getProxyKubeconfig()).getContextObject(this.contextName);\n const namespaceList = [ctx.namespace].filter(Boolean);\n if (namespaceList.length === 0 && error instanceof _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__[\"HttpError\"] && error.statusCode === 403) {\n const { response } = error;\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(\"[CLUSTER]: listing namespaces is forbidden, broadcasting\", { clusterId: this.id, error: response.body });\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"broadcastMessage\"])(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"ClusterListNamespaceForbiddenChannel\"], this.id);\n }\n return namespaceList;\n }\n }\n async getAllowedResources() {\n try {\n if (!this.allowedNamespaces.length) {\n return [];\n }\n const resources = _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResources\"].filter((resource) => this.resourceAccessStatuses.get(resource) === undefined);\n const apiLimit = p_limit__WEBPACK_IMPORTED_MODULE_12___default()(5); // 5 concurrent api requests\n const requests = [];\n for (const apiResource of resources) {\n requests.push(apiLimit(async () => {\n for (const namespace of this.allowedNamespaces.slice(0, 10)) {\n if (!this.resourceAccessStatuses.get(apiResource)) {\n const result = await this.canI({\n resource: apiResource.apiName,\n group: apiResource.group,\n verb: \"list\",\n namespace,\n });\n this.resourceAccessStatuses.set(apiResource, result);\n }\n }\n }));\n }\n await Promise.all(requests);\n return _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResources\"]\n .filter((resource) => this.resourceAccessStatuses.get(resource))\n .map(apiResource => apiResource.apiName);\n }\n catch (error) {\n return [];\n }\n }\n isAllowedResource(kind) {\n if (kind in _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResourceRecord\"]) {\n return this.allowedResources.includes(kind);\n }\n const apiResource = _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResources\"].find(resource => resource.kind === kind);\n if (apiResource) {\n return this.allowedResources.includes(apiResource.apiName);\n }\n return true; // allowed by default for other resources\n }\n isMetricHidden(resource) {\n var _a;\n return Boolean((_a = this.preferences.hiddenMetrics) === null || _a === void 0 ? void 0 : _a.includes(resource));\n }\n get nodeShellImage() {\n var _a;\n return ((_a = this.preferences) === null || _a === void 0 ? void 0 : _a.nodeShellImage) || _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"initialNodeShellImage\"];\n }\n get imagePullSecret() {\n var _a;\n return (_a = this.preferences) === null || _a === void 0 ? void 0 : _a.imagePullSecret;\n }\n isInLocalKubeconfig() {\n return this.kubeConfigPath.startsWith(Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"storedKubeConfigFolder\"])());\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"contextName\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"kubeConfigPath\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"workspace\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"workspaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"apiUrl\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"online\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"accessible\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"ready\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"reconnecting\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"disconnected\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"isAdmin\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"isGlobalWatchEnabled\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"preferences\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"metadata\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"allowedNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"allowedResources\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"accessibleNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"labels\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"available\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"name\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"distribution\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"version\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"prometheusPreferences\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"defaultNamespace\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Cluster.prototype, \"updateModel\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"activate\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"reconnect\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], Cluster.prototype, \"disconnect\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"refresh\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"refreshMetadata\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"refreshConnectionStatus\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Cluster.prototype, \"setState\", null);\n\n\n//# sourceURL=webpack:///./src/main/cluster.ts?");
42258
42258
 
42259
42259
  /***/ }),
42260
42260
 
@@ -42266,7 +42266,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
42266
42266
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
42267
42267
 
42268
42268
  "use strict";
42269
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ContextHandler\", function() { return ContextHandler; });\n/* harmony import */ var _prometheus_provider_registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./prometheus/provider-registry */ \"./src/main/prometheus/provider-registry.ts\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! url */ \"url\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @kubernetes/client-node */ \"./node_modules/@kubernetes/client-node/dist/index.js\");\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _kube_auth_proxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./kube-auth-proxy */ \"./src/main/kube-auth-proxy.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\nclass ContextHandler {\n constructor(cluster) {\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n Object.defineProperty(this, \"clusterUrl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kubeAuthProxy\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiTarget\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"prometheusProvider\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"prometheusPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.clusterUrl = url__WEBPACK_IMPORTED_MODULE_1___default.a.parse(cluster.apiUrl);\n this.setupPrometheus(cluster.preferences);\n }\n setupPrometheus(preferences = {}) {\n var _a;\n this.prometheusProvider = (_a = preferences.prometheusProvider) === null || _a === void 0 ? void 0 : _a.type;\n this.prometheusPath = null;\n if (preferences.prometheus) {\n const { namespace, service, port } = preferences.prometheus;\n this.prometheusPath = `${namespace}/services/${service}:${port}`;\n }\n }\n async getPrometheusDetails() {\n const service = await this.getPrometheusService();\n const prometheusPath = this.ensurePrometheusPath(service);\n const provider = this.ensurePrometheusProvider(service);\n return { prometheusPath, provider };\n }\n ensurePrometheusPath({ service, namespace, port }) {\n return this.prometheusPath || (this.prometheusPath = `${namespace}/services/${service}:${port}`);\n }\n ensurePrometheusProvider(service) {\n if (!this.prometheusProvider) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[CONTEXT-HANDLER]: using ${service.id} as prometheus provider for clusterId=${this.cluster.id}`);\n this.prometheusProvider = service.id;\n }\n return _prometheus_provider_registry__WEBPACK_IMPORTED_MODULE_0__[\"PrometheusProviderRegistry\"].getInstance().getByKind(this.prometheusProvider);\n }\n listPotentialProviders() {\n const registry = _prometheus_provider_registry__WEBPACK_IMPORTED_MODULE_0__[\"PrometheusProviderRegistry\"].getInstance();\n const provider = this.prometheusProvider && registry.getByKind(this.prometheusProvider);\n if (provider) {\n return [provider];\n }\n return Array.from(registry.providers.values());\n }\n async getPrometheusService() {\n const providers = this.listPotentialProviders();\n const proxyConfig = await this.cluster.getProxyKubeconfig();\n const apiClient = proxyConfig.makeApiClient(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2__[\"CoreV1Api\"]);\n const potentialServices = await Promise.allSettled(providers.map(provider => provider.getPrometheusService(apiClient)));\n const errors = [];\n for (const res of potentialServices) {\n switch (res.status) {\n case \"rejected\":\n if (res.reason) {\n errors.push(String(res.reason));\n }\n break;\n case \"fulfilled\":\n if (res.value) {\n return res.value;\n }\n }\n }\n throw Object.assign(new Error(\"No Prometheus service found\"), { cause: errors });\n }\n async resolveAuthProxyUrl() {\n await this.ensureServer();\n const path = this.clusterUrl.path !== \"/\" ? this.clusterUrl.path : \"\";\n return `http://127.0.0.1:${this.kubeAuthProxy.port}${this.kubeAuthProxy.apiPrefix}${path}`;\n }\n async getApiTarget(isLongRunningRequest = false) {\n var _a;\n const timeout = isLongRunningRequest ? 4 * 60 * 60000 : 30000; // 4 hours for long running request, 30 seconds for the rest\n if (isLongRunningRequest) {\n return this.newApiTarget(timeout);\n }\n return (_a = this.apiTarget) !== null && _a !== void 0 ? _a : (this.apiTarget = await this.newApiTarget(timeout));\n }\n async newApiTarget(timeout) {\n return {\n target: await this.resolveAuthProxyUrl(),\n changeOrigin: true,\n timeout,\n headers: {\n \"Host\": this.clusterUrl.hostname,\n },\n };\n }\n async ensureServer() {\n if (!this.kubeAuthProxy) {\n const proxyEnv = Object.assign({}, process.env);\n if (this.cluster.preferences.httpsProxy) {\n proxyEnv.HTTPS_PROXY = this.cluster.preferences.httpsProxy;\n }\n this.kubeAuthProxy = new _kube_auth_proxy__WEBPACK_IMPORTED_MODULE_4__[\"KubeAuthProxy\"](this.cluster, proxyEnv);\n await this.kubeAuthProxy.run();\n }\n await this.kubeAuthProxy.whenReady;\n }\n stopServer() {\n var _a;\n (_a = this.kubeAuthProxy) === null || _a === void 0 ? void 0 : _a.exit();\n this.kubeAuthProxy = undefined;\n this.apiTarget = undefined;\n }\n}\n\n\n//# sourceURL=webpack:///./src/main/context-handler.ts?");
42269
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ContextHandler\", function() { return ContextHandler; });\n/* harmony import */ var _prometheus_provider_registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./prometheus/provider-registry */ \"./src/main/prometheus/provider-registry.ts\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! url */ \"url\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @kubernetes/client-node */ \"./node_modules/@kubernetes/client-node/dist/index.js\");\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _kube_auth_proxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./kube-auth-proxy */ \"./src/main/kube-auth-proxy.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\nclass ContextHandler {\n constructor(cluster) {\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n Object.defineProperty(this, \"clusterUrl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kubeAuthProxy\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiTarget\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"prometheusProvider\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"prometheus\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.clusterUrl = url__WEBPACK_IMPORTED_MODULE_1___default.a.parse(cluster.apiUrl);\n this.setupPrometheus(cluster.preferences);\n }\n setupPrometheus(preferences = {}) {\n var _a;\n this.prometheusProvider = (_a = preferences.prometheusProvider) === null || _a === void 0 ? void 0 : _a.type;\n this.prometheus = preferences.prometheus || null;\n }\n async getPrometheusDetails() {\n const service = await this.getPrometheusService();\n const prometheusPath = this.ensurePrometheusPath(service);\n const provider = this.ensurePrometheusProvider(service);\n return { prometheusPath, provider };\n }\n ensurePrometheusPath({ service, namespace, port }) {\n return `${namespace}/services/${service}:${port}`;\n }\n ensurePrometheusProvider(service) {\n if (!this.prometheusProvider) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[CONTEXT-HANDLER]: using ${service.id} as prometheus provider for clusterId=${this.cluster.id}`);\n this.prometheusProvider = service.id;\n }\n return _prometheus_provider_registry__WEBPACK_IMPORTED_MODULE_0__[\"PrometheusProviderRegistry\"].getInstance().getByKind(this.prometheusProvider);\n }\n listPotentialProviders() {\n const registry = _prometheus_provider_registry__WEBPACK_IMPORTED_MODULE_0__[\"PrometheusProviderRegistry\"].getInstance();\n const provider = this.prometheusProvider && registry.getByKind(this.prometheusProvider);\n if (provider) {\n return [provider];\n }\n return Array.from(registry.providers.values());\n }\n async getPrometheusService() {\n if (this.prometheus !== null && this.prometheusProvider !== null) {\n return {\n id: this.prometheusProvider,\n namespace: this.prometheus.namespace,\n service: this.prometheus.service,\n port: this.prometheus.port,\n };\n }\n const providers = this.listPotentialProviders();\n const proxyConfig = await this.cluster.getProxyKubeconfig();\n const apiClient = proxyConfig.makeApiClient(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2__[\"CoreV1Api\"]);\n const potentialServices = await Promise.allSettled(providers.map(provider => provider.getPrometheusService(apiClient)));\n const errors = [];\n for (const res of potentialServices) {\n switch (res.status) {\n case \"rejected\":\n if (res.reason) {\n errors.push(String(res.reason));\n }\n break;\n case \"fulfilled\":\n if (res.value) {\n return res.value;\n }\n }\n }\n throw Object.assign(new Error(\"No Prometheus service found\"), { cause: errors });\n }\n async resolveAuthProxyUrl() {\n await this.ensureServer();\n const path = this.clusterUrl.path !== \"/\" ? this.clusterUrl.path : \"\";\n return `http://127.0.0.1:${this.kubeAuthProxy.port}${this.kubeAuthProxy.apiPrefix}${path}`;\n }\n async getApiTarget(isLongRunningRequest = false) {\n var _a;\n const timeout = isLongRunningRequest ? 4 * 60 * 60000 : 30000; // 4 hours for long running request, 30 seconds for the rest\n if (isLongRunningRequest) {\n return this.newApiTarget(timeout);\n }\n return (_a = this.apiTarget) !== null && _a !== void 0 ? _a : (this.apiTarget = await this.newApiTarget(timeout));\n }\n async newApiTarget(timeout) {\n return {\n target: await this.resolveAuthProxyUrl(),\n changeOrigin: true,\n timeout,\n headers: {\n \"Host\": this.clusterUrl.hostname,\n },\n };\n }\n async ensureServer() {\n if (!this.kubeAuthProxy) {\n const proxyEnv = Object.assign({}, process.env);\n if (this.cluster.preferences.httpsProxy) {\n proxyEnv.HTTPS_PROXY = this.cluster.preferences.httpsProxy;\n }\n this.kubeAuthProxy = new _kube_auth_proxy__WEBPACK_IMPORTED_MODULE_4__[\"KubeAuthProxy\"](this.cluster, proxyEnv);\n await this.kubeAuthProxy.run();\n }\n await this.kubeAuthProxy.whenReady;\n }\n stopServer() {\n var _a;\n (_a = this.kubeAuthProxy) === null || _a === void 0 ? void 0 : _a.exit();\n this.kubeAuthProxy = undefined;\n this.apiTarget = undefined;\n }\n}\n\n\n//# sourceURL=webpack:///./src/main/context-handler.ts?");
42270
42270
 
42271
42271
  /***/ }),
42272
42272
 
@@ -42314,7 +42314,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
42314
42314
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
42315
42315
 
42316
42316
  "use strict";
42317
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeAuthProxy\", function() { return KubeAuthProxy; });\n/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! child_process */ \"child_process\");\n/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var tcp_port_used__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tcp-port-used */ \"./node_modules/tcp-port-used/index.js\");\n/* harmony import */ var tcp_port_used__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(tcp_port_used__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! crypto */ \"crypto\");\n/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _kubectl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./kubectl */ \"./src/main/kubectl.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! url */ \"url\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_get_port__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/get-port */ \"./src/main/utils/get-port.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\nconst startingServeRegex = /^starting to serve on (?<address>.+)/i;\nclass KubeAuthProxy {\n constructor(cluster, env) {\n Object.defineProperty(this, \"apiPrefix\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_port\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"env\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: null\n });\n Object.defineProperty(this, \"proxyProcess\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kubectl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"ready\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_7__[\"makeObservable\"])(this);\n this.ready = false;\n this.env = env;\n this.cluster = cluster;\n this.kubectl = _kubectl__WEBPACK_IMPORTED_MODULE_3__[\"Kubectl\"].bundled();\n this.apiPrefix = `/${Object(crypto__WEBPACK_IMPORTED_MODULE_2__[\"randomBytes\"])(8).toString(\"hex\")}`;\n }\n get port() {\n return this._port;\n }\n get acceptHosts() {\n return url__WEBPACK_IMPORTED_MODULE_5__[\"parse\"](this.cluster.apiUrl).hostname;\n }\n get whenReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_7__[\"when\"])(() => this.ready);\n }\n async run() {\n if (this.proxyProcess) {\n return this.whenReady;\n }\n const proxyBin = await this.kubectl.getPath();\n const args = [\n \"proxy\",\n \"-p\", \"0\",\n \"--kubeconfig\", `${this.cluster.kubeConfigPath}`,\n \"--context\", `${this.cluster.contextName}`,\n \"--accept-hosts\", this.acceptHosts,\n \"--reject-paths\", \"^[^/]\",\n \"--api-prefix\", this.apiPrefix,\n ];\n if (process.env.DEBUG_PROXY === \"true\") {\n args.push(\"-v\", \"9\");\n }\n _logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].debug(`spawning kubectl proxy with args: ${args}`);\n this.proxyProcess = Object(child_process__WEBPACK_IMPORTED_MODULE_0__[\"spawn\"])(proxyBin, args, { env: this.env });\n this.proxyProcess.on(\"error\", (error) => {\n this.cluster.broadcastConnectUpdate(error.message, true);\n this.exit();\n });\n this.proxyProcess.on(\"exit\", (code) => {\n this.cluster.broadcastConnectUpdate(`proxy exited with code: ${code}`, code > 0);\n this.exit();\n });\n this.proxyProcess.on(\"disconnect\", () => {\n this.cluster.broadcastConnectUpdate(\"Proxy disconnected communications\", true);\n this.exit();\n });\n this.proxyProcess.stderr.on(\"data\", (data) => {\n this.cluster.broadcastConnectUpdate(data.toString(), true);\n });\n this.proxyProcess.stdout.on(\"data\", (data) => {\n if (typeof this._port === \"number\") {\n this.cluster.broadcastConnectUpdate(data.toString());\n }\n });\n this._port = await Object(_utils_get_port__WEBPACK_IMPORTED_MODULE_6__[\"getPortFrom\"])(this.proxyProcess.stdout, {\n lineRegex: startingServeRegex,\n onFind: () => this.cluster.broadcastConnectUpdate(\"Authentication proxy started\"),\n });\n try {\n await Object(tcp_port_used__WEBPACK_IMPORTED_MODULE_1__[\"waitUntilUsed\"])(this.port, 500, 10000);\n this.ready = true;\n }\n catch (error) {\n this.cluster.broadcastConnectUpdate(\"Proxy port failed to be used within timelimit, restarting...\", true);\n this.exit();\n return this.run();\n }\n }\n exit() {\n this.ready = false;\n if (this.proxyProcess) {\n _logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].debug(\"[KUBE-AUTH]: stopping local proxy\", this.cluster.getMeta());\n this.proxyProcess.removeAllListeners();\n this.proxyProcess.stderr.removeAllListeners();\n this.proxyProcess.stdout.removeAllListeners();\n this.proxyProcess.kill();\n this.proxyProcess = null;\n }\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_7__[\"observable\"],\n __metadata(\"design:type\", Boolean)\n], KubeAuthProxy.prototype, \"ready\", void 0);\n\n\n//# sourceURL=webpack:///./src/main/kube-auth-proxy.ts?");
42317
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeAuthProxy\", function() { return KubeAuthProxy; });\n/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! child_process */ \"child_process\");\n/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var tcp_port_used__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tcp-port-used */ \"./node_modules/tcp-port-used/index.js\");\n/* harmony import */ var tcp_port_used__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(tcp_port_used__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! crypto */ \"crypto\");\n/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _kubectl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./kubectl */ \"./src/main/kubectl.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! url */ \"url\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_get_port__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/get-port */ \"./src/main/utils/get-port.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\nconst startingServeRegex = /^starting to serve on (?<address>.+)/i;\nclass KubeAuthProxy {\n constructor(cluster, env) {\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n Object.defineProperty(this, \"env\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: env\n });\n Object.defineProperty(this, \"apiPrefix\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: `/${Object(crypto__WEBPACK_IMPORTED_MODULE_2__[\"randomBytes\"])(8).toString(\"hex\")}`\n });\n Object.defineProperty(this, \"_port\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"proxyProcess\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"acceptHosts\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"ready\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_7__[\"makeObservable\"])(this);\n this.acceptHosts = url__WEBPACK_IMPORTED_MODULE_5__[\"parse\"](this.cluster.apiUrl).hostname;\n }\n get port() {\n return this._port;\n }\n get whenReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_7__[\"when\"])(() => this.ready);\n }\n async run() {\n if (this.proxyProcess) {\n return this.whenReady;\n }\n const proxyBin = await _kubectl__WEBPACK_IMPORTED_MODULE_3__[\"Kubectl\"].bundled().getPath();\n const args = [\n \"proxy\",\n \"-p\", \"0\",\n \"--kubeconfig\", `${this.cluster.kubeConfigPath}`,\n \"--context\", `${this.cluster.contextName}`,\n \"--accept-hosts\", this.acceptHosts,\n \"--reject-paths\", \"^[^/]\",\n \"--api-prefix\", this.apiPrefix,\n ];\n if (process.env.DEBUG_PROXY === \"true\") {\n args.push(\"-v\", \"9\");\n }\n _logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].debug(`spawning kubectl proxy with args: ${args}`);\n this.proxyProcess = Object(child_process__WEBPACK_IMPORTED_MODULE_0__[\"spawn\"])(proxyBin, args, { env: this.env });\n this.proxyProcess.on(\"error\", (error) => {\n this.cluster.broadcastConnectUpdate(error.message, true);\n this.exit();\n });\n this.proxyProcess.on(\"exit\", (code) => {\n this.cluster.broadcastConnectUpdate(`proxy exited with code: ${code}`, code > 0);\n this.exit();\n });\n this.proxyProcess.on(\"disconnect\", () => {\n this.cluster.broadcastConnectUpdate(\"Proxy disconnected communications\", true);\n this.exit();\n });\n this.proxyProcess.stderr.on(\"data\", (data) => {\n this.cluster.broadcastConnectUpdate(data.toString(), true);\n });\n this.proxyProcess.stdout.on(\"data\", (data) => {\n if (typeof this._port === \"number\") {\n this.cluster.broadcastConnectUpdate(data.toString());\n }\n });\n this._port = await Object(_utils_get_port__WEBPACK_IMPORTED_MODULE_6__[\"getPortFrom\"])(this.proxyProcess.stdout, {\n lineRegex: startingServeRegex,\n onFind: () => this.cluster.broadcastConnectUpdate(\"Authentication proxy started\"),\n });\n try {\n await Object(tcp_port_used__WEBPACK_IMPORTED_MODULE_1__[\"waitUntilUsed\"])(this.port, 500, 10000);\n this.ready = true;\n }\n catch (error) {\n this.cluster.broadcastConnectUpdate(\"Proxy port failed to be used within timelimit, restarting...\", true);\n this.exit();\n return this.run();\n }\n }\n exit() {\n this.ready = false;\n if (this.proxyProcess) {\n _logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].debug(\"[KUBE-AUTH]: stopping local proxy\", this.cluster.getMeta());\n this.proxyProcess.removeAllListeners();\n this.proxyProcess.stderr.removeAllListeners();\n this.proxyProcess.stdout.removeAllListeners();\n this.proxyProcess.kill();\n this.proxyProcess = null;\n }\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_7__[\"observable\"],\n __metadata(\"design:type\", Object)\n], KubeAuthProxy.prototype, \"ready\", void 0);\n\n\n//# sourceURL=webpack:///./src/main/kube-auth-proxy.ts?");
42318
42318
 
42319
42319
  /***/ }),
42320
42320
 
@@ -42326,7 +42326,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
42326
42326
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
42327
42327
 
42328
42328
  "use strict";
42329
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeconfigManager\", function() { return KubeconfigManager; });\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs-extra */ \"./node_modules/fs-extra/lib/index.js\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _common_kube_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/kube-helpers */ \"./src/common/kube-helpers.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _lens_proxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lens-proxy */ \"./src/main/lens-proxy.ts\");\n/* harmony import */ var _common_app_paths__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/app-paths */ \"./src/common/app-paths.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\n\nclass KubeconfigManager {\n constructor(cluster, contextHandler) {\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n Object.defineProperty(this, \"contextHandler\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: contextHandler\n });\n Object.defineProperty(this, \"configDir\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _common_app_paths__WEBPACK_IMPORTED_MODULE_5__[\"AppPaths\"].get(\"temp\")\n });\n Object.defineProperty(this, \"tempFile\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: null\n });\n }\n async getPath() {\n if (this.tempFile === undefined) {\n throw new Error(\"kubeconfig is already unlinked\");\n }\n if (!this.tempFile) {\n await this.init();\n }\n // create proxy kubeconfig if it is removed without unlink called\n if (!(await fs_extra__WEBPACK_IMPORTED_MODULE_1___default.a.pathExists(this.tempFile))) {\n try {\n this.tempFile = await this.createProxyKubeconfig();\n }\n catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`[KUBECONFIG-MANAGER]: Failed to created temp config for auth-proxy`, { err });\n }\n }\n return this.tempFile;\n }\n async clear() {\n if (!this.tempFile) {\n return;\n }\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBECONFIG-MANAGER]: Deleting temporary kubeconfig: ${this.tempFile}`);\n await fs_extra__WEBPACK_IMPORTED_MODULE_1___default.a.unlink(this.tempFile);\n }\n async unlink() {\n if (!this.tempFile) {\n return;\n }\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBECONFIG-MANAGER]: Deleting temporary kubeconfig: ${this.tempFile}`);\n await fs_extra__WEBPACK_IMPORTED_MODULE_1___default.a.unlink(this.tempFile);\n this.tempFile = undefined;\n }\n async init() {\n try {\n await this.contextHandler.ensureServer();\n this.tempFile = await this.createProxyKubeconfig();\n }\n catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`[KUBECONFIG-MANAGER]: Failed to created temp config for auth-proxy`, err);\n }\n }\n get resolveProxyUrl() {\n return `http://127.0.0.1:${_lens_proxy__WEBPACK_IMPORTED_MODULE_4__[\"LensProxy\"].getInstance().port}/${this.cluster.id}`;\n }\n /**\n * Creates new \"temporary\" kubeconfig that point to the kubectl-proxy.\n * This way any user of the config does not need to know anything about the auth etc. details.\n */\n async createProxyKubeconfig() {\n const { configDir, cluster } = this;\n const { contextName, id } = cluster;\n const tempFile = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(configDir, `kubeconfig-${id}`);\n const kubeConfig = await cluster.getKubeconfig();\n const proxyConfig = {\n currentContext: contextName,\n clusters: [\n {\n name: contextName,\n server: this.resolveProxyUrl,\n skipTLSVerify: undefined,\n },\n ],\n users: [\n { name: \"proxy\" },\n ],\n contexts: [\n {\n user: \"proxy\",\n name: contextName,\n cluster: contextName,\n namespace: cluster.defaultNamespace || kubeConfig.getContextObject(contextName).namespace,\n },\n ],\n };\n // write\n const configYaml = Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_2__[\"dumpConfigYaml\"])(proxyConfig);\n await fs_extra__WEBPACK_IMPORTED_MODULE_1___default.a.ensureDir(path__WEBPACK_IMPORTED_MODULE_0___default.a.dirname(tempFile));\n await fs_extra__WEBPACK_IMPORTED_MODULE_1___default.a.writeFile(tempFile, configYaml, { mode: 0o600 });\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`[KUBECONFIG-MANAGER]: Created temp kubeconfig \"${contextName}\" at \"${tempFile}\": \\n${configYaml}`);\n return tempFile;\n }\n}\n\n\n//# sourceURL=webpack:///./src/main/kubeconfig-manager.ts?");
42329
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeconfigManager\", function() { return KubeconfigManager; });\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs-extra */ \"./node_modules/fs-extra/lib/index.js\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _common_kube_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/kube-helpers */ \"./src/common/kube-helpers.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _lens_proxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lens-proxy */ \"./src/main/lens-proxy.ts\");\n/* harmony import */ var _common_app_paths__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/app-paths */ \"./src/common/app-paths.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\n\nclass KubeconfigManager {\n constructor(cluster, contextHandler) {\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n Object.defineProperty(this, \"contextHandler\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: contextHandler\n });\n /**\n * The path to the temp config file\n *\n * - if `string` then path\n * - if `null` then not yet created\n * - if `undefined` then unlinked by calling `clear()`\n */\n Object.defineProperty(this, \"tempFilePath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: null\n });\n }\n /**\n *\n * @returns The path to the temporary kubeconfig\n */\n async getPath() {\n if (this.tempFilePath === undefined) {\n throw new Error(\"kubeconfig is already unlinked\");\n }\n if (this.tempFilePath === null || !(await fs_extra__WEBPACK_IMPORTED_MODULE_1___default.a.pathExists(this.tempFilePath))) {\n await this.ensureFile();\n }\n return this.tempFilePath;\n }\n /**\n * Deletes the temporary kubeconfig file\n */\n async clear() {\n if (!this.tempFilePath) {\n return;\n }\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBECONFIG-MANAGER]: Deleting temporary kubeconfig: ${this.tempFilePath}`);\n try {\n await fs_extra__WEBPACK_IMPORTED_MODULE_1___default.a.unlink(this.tempFilePath);\n }\n catch (error) {\n if (error.code !== \"ENOENT\") {\n throw error;\n }\n }\n finally {\n this.tempFilePath = undefined;\n }\n }\n async ensureFile() {\n try {\n await this.contextHandler.ensureServer();\n this.tempFilePath = await this.createProxyKubeconfig();\n }\n catch (error) {\n throw Object.assign(new Error(\"Failed to creat temp config for auth-proxy\"), { cause: error });\n }\n }\n get resolveProxyUrl() {\n return `http://127.0.0.1:${_lens_proxy__WEBPACK_IMPORTED_MODULE_4__[\"LensProxy\"].getInstance().port}/${this.cluster.id}`;\n }\n /**\n * Creates new \"temporary\" kubeconfig that point to the kubectl-proxy.\n * This way any user of the config does not need to know anything about the auth etc. details.\n */\n async createProxyKubeconfig() {\n const { cluster } = this;\n const { contextName, id } = cluster;\n const tempFile = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(_common_app_paths__WEBPACK_IMPORTED_MODULE_5__[\"AppPaths\"].get(\"temp\"), `kubeconfig-${id}`);\n const kubeConfig = await cluster.getKubeconfig();\n const proxyConfig = {\n currentContext: contextName,\n clusters: [\n {\n name: contextName,\n server: this.resolveProxyUrl,\n skipTLSVerify: undefined,\n },\n ],\n users: [\n { name: \"proxy\" },\n ],\n contexts: [\n {\n user: \"proxy\",\n name: contextName,\n cluster: contextName,\n namespace: cluster.defaultNamespace || kubeConfig.getContextObject(contextName).namespace,\n },\n ],\n };\n // write\n const configYaml = Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_2__[\"dumpConfigYaml\"])(proxyConfig);\n await fs_extra__WEBPACK_IMPORTED_MODULE_1___default.a.ensureDir(path__WEBPACK_IMPORTED_MODULE_0___default.a.dirname(tempFile));\n await fs_extra__WEBPACK_IMPORTED_MODULE_1___default.a.writeFile(tempFile, configYaml, { mode: 0o600 });\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`[KUBECONFIG-MANAGER]: Created temp kubeconfig \"${contextName}\" at \"${tempFile}\": \\n${configYaml}`);\n return tempFile;\n }\n}\n\n\n//# sourceURL=webpack:///./src/main/kubeconfig-manager.ts?");
42330
42330
 
42331
42331
  /***/ }),
42332
42332
 
@@ -42854,7 +42854,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
42854
42854
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
42855
42855
 
42856
42856
  "use strict";
42857
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CrdResources\", function() { return CrdResources; });\n/* harmony import */ var _crd_resources_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./crd-resources.scss */ \"./src/renderer/components/+custom-resources/crd-resources.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var jsonpath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jsonpath */ \"./node_modules/jsonpath/jsonpath.js\");\n/* harmony import */ var jsonpath__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jsonpath__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _kube_object_list_layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../kube-object-list-layout */ \"./src/renderer/components/kube-object-list-layout/index.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _crd_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./crd.store */ \"./src/renderer/components/+custom-resources/crd.store.ts\");\n/* harmony import */ var _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/k8s-api/api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _utils_jsonPath__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/jsonPath */ \"./src/renderer/utils/jsonPath.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\n\nvar columnId;\n(function (columnId) {\n columnId[\"name\"] = \"name\";\n columnId[\"namespace\"] = \"namespace\";\n columnId[\"age\"] = \"age\";\n})(columnId || (columnId = {}));\nlet CrdResources = class CrdResources extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor(props) {\n super(props);\n Object(mobx__WEBPACK_IMPORTED_MODULE_5__[\"makeObservable\"])(this);\n }\n get crd() {\n const { group, name } = this.props.match.params;\n return _crd_store__WEBPACK_IMPORTED_MODULE_6__[\"crdStore\"].getByGroup(group, name);\n }\n get store() {\n if (!this.crd)\n return null;\n return _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_7__[\"apiManager\"].getStore(this.crd.getResourceApiBase());\n }\n render() {\n const { crd, store } = this;\n if (!crd)\n return null;\n const isNamespaced = crd.isNamespaced();\n const extraColumns = crd.getPrinterColumns(false); // Cols with priority bigger than 0 are shown in details\n const sortingCallbacks = {\n [columnId.name]: item => item.getName(),\n [columnId.namespace]: item => item.getNs(),\n [columnId.age]: item => item.getTimeDiffFromNow(),\n };\n extraColumns.forEach(column => {\n sortingCallbacks[column.name] = item => jsonpath__WEBPACK_IMPORTED_MODULE_2___default.a.value(item, Object(_utils_jsonPath__WEBPACK_IMPORTED_MODULE_8__[\"parseJsonPath\"])(column.jsonPath.slice(1)));\n });\n const version = crd.getPreferedVersion();\n const loadFailedPrefix = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"p\", null,\n \"Failed to load \",\n crd.getPluralName());\n const failedToLoadMessage = version.served\n ? loadFailedPrefix\n : (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null,\n loadFailedPrefix,\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"p\", null,\n \"Prefered version (\",\n crd.getGroup(),\n \"/\",\n version.name,\n \") is not served\")));\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_kube_object_list_layout__WEBPACK_IMPORTED_MODULE_4__[\"KubeObjectListLayout\"], { isConfigurable: true, key: `crd_resources_${crd.getResourceApiBase()}`, tableId: \"crd_resources\", className: \"CrdResources\", store: store, sortingCallbacks: sortingCallbacks, searchFilters: [\n item => item.getSearchFields(),\n ], renderHeaderTitle: crd.getResourceKind(), customizeHeader: (_a) => {\n var { searchProps } = _a, headerPlaceholders = __rest(_a, [\"searchProps\"]);\n return (Object.assign({ searchProps: Object.assign(Object.assign({}, searchProps), { placeholder: `${crd.getResourceKind()} search ...` }) }, headerPlaceholders));\n }, renderTableHeader: [\n { title: \"Name\", className: \"name\", sortBy: columnId.name, id: columnId.name },\n isNamespaced && { title: \"Namespace\", className: \"namespace\", sortBy: columnId.namespace, id: columnId.namespace },\n ...extraColumns.map(column => {\n const { name } = column;\n return {\n title: name,\n className: name.toLowerCase(),\n sortBy: name,\n id: name,\n };\n }),\n { title: \"Age\", className: \"age\", sortBy: columnId.age, id: columnId.age },\n ], renderTableContents: crdInstance => [\n crdInstance.getName(),\n isNamespaced && crdInstance.getNs(),\n ...extraColumns.map((column) => {\n let value = jsonpath__WEBPACK_IMPORTED_MODULE_2___default.a.value(crdInstance, Object(_utils_jsonPath__WEBPACK_IMPORTED_MODULE_8__[\"parseJsonPath\"])(column.jsonPath.slice(1)));\n if (Array.isArray(value) || typeof value === \"object\") {\n value = JSON.stringify(value);\n }\n return {\n renderBoolean: true,\n children: value,\n };\n }),\n crdInstance.getAge(),\n ], failedToLoadMessage: failedToLoadMessage }));\n }\n};\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_5__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CrdResources.prototype, \"crd\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_5__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CrdResources.prototype, \"store\", null);\nCrdResources = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"observer\"],\n __metadata(\"design:paramtypes\", [Object])\n], CrdResources);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/+custom-resources/crd-resources.tsx?");
42857
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CrdResources\", function() { return CrdResources; });\n/* harmony import */ var _crd_resources_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./crd-resources.scss */ \"./src/renderer/components/+custom-resources/crd-resources.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var jsonpath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jsonpath */ \"./node_modules/jsonpath/jsonpath.js\");\n/* harmony import */ var jsonpath__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jsonpath__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _kube_object_list_layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../kube-object-list-layout */ \"./src/renderer/components/kube-object-list-layout/index.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _crd_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./crd.store */ \"./src/renderer/components/+custom-resources/crd.store.ts\");\n/* harmony import */ var _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/k8s-api/api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _utils_jsonPath__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/jsonPath */ \"./src/renderer/utils/jsonPath.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\n\nvar columnId;\n(function (columnId) {\n columnId[\"name\"] = \"name\";\n columnId[\"namespace\"] = \"namespace\";\n columnId[\"age\"] = \"age\";\n})(columnId || (columnId = {}));\nlet CrdResources = class CrdResources extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor(props) {\n super(props);\n Object(mobx__WEBPACK_IMPORTED_MODULE_5__[\"makeObservable\"])(this);\n }\n get crd() {\n const { group, name } = this.props.match.params;\n return _crd_store__WEBPACK_IMPORTED_MODULE_6__[\"crdStore\"].getByGroup(group, name);\n }\n get store() {\n var _a;\n return _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_7__[\"apiManager\"].getStore((_a = this.crd) === null || _a === void 0 ? void 0 : _a.getResourceApiBase());\n }\n render() {\n const { crd, store } = this;\n if (!crd)\n return null;\n const isNamespaced = crd.isNamespaced();\n const extraColumns = crd.getPrinterColumns(false); // Cols with priority bigger than 0 are shown in details\n const sortingCallbacks = {\n [columnId.name]: item => item.getName(),\n [columnId.namespace]: item => item.getNs(),\n [columnId.age]: item => item.getTimeDiffFromNow(),\n };\n extraColumns.forEach(column => {\n sortingCallbacks[column.name] = item => jsonpath__WEBPACK_IMPORTED_MODULE_2___default.a.value(item, Object(_utils_jsonPath__WEBPACK_IMPORTED_MODULE_8__[\"parseJsonPath\"])(column.jsonPath.slice(1)));\n });\n const version = crd.getPreferedVersion();\n const loadFailedPrefix = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"p\", null,\n \"Failed to load \",\n crd.getPluralName());\n const failedToLoadMessage = version.served\n ? loadFailedPrefix\n : (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null,\n loadFailedPrefix,\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"p\", null,\n \"Prefered version (\",\n crd.getGroup(),\n \"/\",\n version.name,\n \") is not served\")));\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_kube_object_list_layout__WEBPACK_IMPORTED_MODULE_4__[\"KubeObjectListLayout\"], { isConfigurable: true, key: `crd_resources_${crd.getResourceApiBase()}`, tableId: \"crd_resources\", className: \"CrdResources\", store: store, sortingCallbacks: sortingCallbacks, searchFilters: [\n item => item.getSearchFields(),\n ], renderHeaderTitle: crd.getResourceKind(), customizeHeader: (_a) => {\n var { searchProps } = _a, headerPlaceholders = __rest(_a, [\"searchProps\"]);\n return (Object.assign({ searchProps: Object.assign(Object.assign({}, searchProps), { placeholder: `${crd.getResourceKind()} search ...` }) }, headerPlaceholders));\n }, renderTableHeader: [\n { title: \"Name\", className: \"name\", sortBy: columnId.name, id: columnId.name },\n isNamespaced && { title: \"Namespace\", className: \"namespace\", sortBy: columnId.namespace, id: columnId.namespace },\n ...extraColumns.map(column => {\n const { name } = column;\n return {\n title: name,\n className: name.toLowerCase(),\n sortBy: name,\n id: name,\n };\n }),\n { title: \"Age\", className: \"age\", sortBy: columnId.age, id: columnId.age },\n ], renderTableContents: crdInstance => [\n crdInstance.getName(),\n isNamespaced && crdInstance.getNs(),\n ...extraColumns.map((column) => {\n let value = jsonpath__WEBPACK_IMPORTED_MODULE_2___default.a.value(crdInstance, Object(_utils_jsonPath__WEBPACK_IMPORTED_MODULE_8__[\"parseJsonPath\"])(column.jsonPath.slice(1)));\n if (Array.isArray(value) || typeof value === \"object\") {\n value = JSON.stringify(value);\n }\n return {\n renderBoolean: true,\n children: value,\n };\n }),\n crdInstance.getAge(),\n ], failedToLoadMessage: failedToLoadMessage }));\n }\n};\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_5__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CrdResources.prototype, \"crd\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_5__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CrdResources.prototype, \"store\", null);\nCrdResources = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"observer\"],\n __metadata(\"design:paramtypes\", [Object])\n], CrdResources);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/+custom-resources/crd-resources.tsx?");
42858
42858
 
42859
42859
  /***/ }),
42860
42860
 
@@ -42866,7 +42866,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
42866
42866
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
42867
42867
 
42868
42868
  "use strict";
42869
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CRDStore\", function() { return CRDStore; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"crdStore\", function() { return crdStore; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _common_k8s_api_kube_object_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/k8s-api/kube-object.store */ \"./src/common/k8s-api/kube-object.store.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _common_k8s_api_endpoints_crd_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/k8s-api/endpoints/crd.api */ \"./src/common/k8s-api/endpoints/crd.api.ts\");\n/* harmony import */ var _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/k8s-api/api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _common_k8s_api_kube_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/k8s-api/kube-api */ \"./src/common/k8s-api/kube-api.ts\");\n/* harmony import */ var _crd_resource_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./crd-resource.store */ \"./src/renderer/components/+custom-resources/crd-resource.store.ts\");\n/* harmony import */ var _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/k8s-api/kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\nfunction initStore(crd) {\n var _a;\n const apiBase = crd.getResourceApiBase();\n const kind = crd.getResourceKind();\n const isNamespaced = crd.isNamespaced();\n const api = (_a = _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].getApi(apiBase)) !== null && _a !== void 0 ? _a : new _common_k8s_api_kube_api__WEBPACK_IMPORTED_MODULE_5__[\"KubeApi\"]({\n objectConstructor: _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeObject\"],\n apiBase,\n kind,\n isNamespaced,\n });\n if (!_common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].getStore(api)) {\n _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].registerStore(new _crd_resource_store__WEBPACK_IMPORTED_MODULE_6__[\"CRDResourceStore\"](api));\n }\n}\nclass CRDStore extends _common_k8s_api_kube_object_store__WEBPACK_IMPORTED_MODULE_1__[\"KubeObjectStore\"] {\n constructor() {\n super();\n Object.defineProperty(this, \"api\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _common_k8s_api_endpoints_crd_api__WEBPACK_IMPORTED_MODULE_3__[\"crdApi\"]\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"autoBind\"])(this);\n // auto-init stores for crd-s\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"reaction\"])(() => this.getItems(), items => items.forEach(initStore));\n }\n sortItems(items) {\n return super.sortItems(items, [\n crd => crd.getGroup(),\n crd => crd.getName(),\n ]);\n }\n get groups() {\n const groups = {};\n return this.items.reduce((groups, crd) => {\n const group = crd.getGroup();\n if (!groups[group])\n groups[group] = [];\n groups[group].push(crd);\n return groups;\n }, groups);\n }\n getByGroup(group, pluralName) {\n const crdInGroup = this.groups[group];\n if (!crdInGroup)\n return null;\n return crdInGroup.find(crd => crd.getPluralName() === pluralName);\n }\n getByObject(obj) {\n if (!obj)\n return null;\n const { kind, apiVersion } = obj;\n return this.items.find(crd => (kind === crd.getResourceKind() && apiVersion === `${crd.getGroup()}/${crd.getVersion()}`));\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CRDStore.prototype, \"groups\", null);\nconst crdStore = new CRDStore();\n_common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].registerStore(crdStore);\n\n\n//# sourceURL=webpack:///./src/renderer/components/+custom-resources/crd.store.ts?");
42869
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CRDStore\", function() { return CRDStore; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"crdStore\", function() { return crdStore; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _common_k8s_api_kube_object_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/k8s-api/kube-object.store */ \"./src/common/k8s-api/kube-object.store.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _common_k8s_api_endpoints_crd_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/k8s-api/endpoints/crd.api */ \"./src/common/k8s-api/endpoints/crd.api.ts\");\n/* harmony import */ var _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/k8s-api/api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _common_k8s_api_kube_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/k8s-api/kube-api */ \"./src/common/k8s-api/kube-api.ts\");\n/* harmony import */ var _crd_resource_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./crd-resource.store */ \"./src/renderer/components/+custom-resources/crd-resource.store.ts\");\n/* harmony import */ var _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/k8s-api/kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\nfunction initStore(crd) {\n var _a;\n var _b;\n const objectConstructor = (_b = class extends _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeObject\"] {\n },\n Object.defineProperty(_b, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: crd.getResourceKind()\n }),\n Object.defineProperty(_b, \"namespaced\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: crd.isNamespaced()\n }),\n Object.defineProperty(_b, \"apiBase\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: crd.getResourceApiBase()\n }),\n _b);\n const api = (_a = _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].getApi(objectConstructor.apiBase)) !== null && _a !== void 0 ? _a : new _common_k8s_api_kube_api__WEBPACK_IMPORTED_MODULE_5__[\"KubeApi\"]({ objectConstructor });\n if (!_common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].getStore(api)) {\n _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].registerStore(new _crd_resource_store__WEBPACK_IMPORTED_MODULE_6__[\"CRDResourceStore\"](api));\n }\n}\nclass CRDStore extends _common_k8s_api_kube_object_store__WEBPACK_IMPORTED_MODULE_1__[\"KubeObjectStore\"] {\n constructor() {\n super();\n Object.defineProperty(this, \"api\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _common_k8s_api_endpoints_crd_api__WEBPACK_IMPORTED_MODULE_3__[\"crdApi\"]\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"autoBind\"])(this);\n // auto-init stores for crd-s\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"reaction\"])(() => this.getItems(), items => items.forEach(initStore));\n }\n sortItems(items) {\n return super.sortItems(items, [\n crd => crd.getGroup(),\n crd => crd.getName(),\n ]);\n }\n get groups() {\n const groups = {};\n return this.items.reduce((groups, crd) => {\n const group = crd.getGroup();\n if (!groups[group])\n groups[group] = [];\n groups[group].push(crd);\n return groups;\n }, groups);\n }\n getByGroup(group, pluralName) {\n const crdInGroup = this.groups[group];\n if (!crdInGroup)\n return null;\n return crdInGroup.find(crd => crd.getPluralName() === pluralName);\n }\n getByObject(obj) {\n if (!obj)\n return null;\n const { kind, apiVersion } = obj;\n return this.items.find(crd => (kind === crd.getResourceKind() && apiVersion === `${crd.getGroup()}/${crd.getVersion()}`));\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CRDStore.prototype, \"groups\", null);\nconst crdStore = new CRDStore();\n_common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].registerStore(crdStore);\n\n\n//# sourceURL=webpack:///./src/renderer/components/+custom-resources/crd.store.ts?");
42870
42870
 
42871
42871
  /***/ }),
42872
42872
 
@@ -42914,7 +42914,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
42914
42914
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
42915
42915
 
42916
42916
  "use strict";
42917
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeEventDetails\", function() { return KubeEventDetails; });\n/* harmony import */ var _kube_event_details_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./kube-event-details.scss */ \"./src/renderer/components/+events/kube-event-details.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/k8s-api/kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _drawer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../drawer */ \"./src/renderer/components/drawer/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _locale_date__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../locale-date */ \"./src/renderer/components/locale-date/index.ts\");\n/* harmony import */ var _event_store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./event.store */ \"./src/renderer/components/+events/event.store.ts\");\n/* harmony import */ var _common_logger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/logger */ \"./src/common/logger.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n\n\n\n\n\n\n\n\n\nlet KubeEventDetails = class KubeEventDetails extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n async componentDidMount() {\n _event_store__WEBPACK_IMPORTED_MODULE_7__[\"eventStore\"].reloadAll();\n }\n render() {\n const { object } = this.props;\n if (!object) {\n return null;\n }\n if (!(object instanceof _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_3__[\"KubeObject\"])) {\n _common_logger__WEBPACK_IMPORTED_MODULE_8__[\"default\"].error(\"[KubeEventDetails]: passed object that is not an instanceof KubeObject\", object);\n return null;\n }\n const events = _event_store__WEBPACK_IMPORTED_MODULE_7__[\"eventStore\"].getEventsByObject(object);\n if (!events.length) {\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_4__[\"DrawerTitle\"], { className: \"flex gaps align-center\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"span\", null, \"Events\")));\n }\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", null,\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_4__[\"DrawerTitle\"], { className: \"flex gaps align-center\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"span\", null, \"Events\")),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"KubeEventDetails\" }, events.map(evt => {\n const { message, count, lastTimestamp, involvedObject } = evt;\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"event\", key: evt.getId() },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"cssNames\"])(\"title\", { warning: evt.isWarning() }) }, message),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_4__[\"DrawerItem\"], { name: \"Source\" }, evt.getSource()),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_4__[\"DrawerItem\"], { name: \"Count\" }, count),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_4__[\"DrawerItem\"], { name: \"Sub-object\" }, involvedObject.fieldPath),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_4__[\"DrawerItem\"], { name: \"Last seen\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_locale_date__WEBPACK_IMPORTED_MODULE_6__[\"LocaleDate\"], { date: lastTimestamp }))));\n }))));\n }\n};\nKubeEventDetails = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_2__[\"observer\"]\n], KubeEventDetails);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/+events/kube-event-details.tsx?");
42917
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeEventDetails\", function() { return KubeEventDetails; });\n/* harmony import */ var _kube_event_details_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./kube-event-details.scss */ \"./src/renderer/components/+events/kube-event-details.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/k8s-api/kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _drawer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../drawer */ \"./src/renderer/components/drawer/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _locale_date__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../locale-date */ \"./src/renderer/components/locale-date/index.ts\");\n/* harmony import */ var _event_store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./event.store */ \"./src/renderer/components/+events/event.store.ts\");\n/* harmony import */ var _common_logger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/logger */ \"./src/common/logger.ts\");\n/* harmony import */ var _common_k8s_api_kube_watch_api__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/k8s-api/kube-watch-api */ \"./src/common/k8s-api/kube-watch-api.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n\n\n\n\n\n\n\n\n\n\nlet KubeEventDetails = class KubeEventDetails extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n componentDidMount() {\n Object(mobx_react__WEBPACK_IMPORTED_MODULE_2__[\"disposeOnUnmount\"])(this, [\n _common_k8s_api_kube_watch_api__WEBPACK_IMPORTED_MODULE_9__[\"kubeWatchApi\"].subscribeStores([\n _event_store__WEBPACK_IMPORTED_MODULE_7__[\"eventStore\"],\n ]),\n ]);\n }\n render() {\n const { object } = this.props;\n if (!object) {\n return null;\n }\n if (!(object instanceof _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_3__[\"KubeObject\"])) {\n _common_logger__WEBPACK_IMPORTED_MODULE_8__[\"default\"].error(\"[KubeEventDetails]: passed object that is not an instanceof KubeObject\", object);\n return null;\n }\n const events = _event_store__WEBPACK_IMPORTED_MODULE_7__[\"eventStore\"].getEventsByObject(object);\n if (!events.length) {\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_4__[\"DrawerTitle\"], { className: \"flex gaps align-center\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"span\", null, \"Events\")));\n }\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", null,\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_4__[\"DrawerTitle\"], { className: \"flex gaps align-center\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"span\", null, \"Events\")),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"KubeEventDetails\" }, events.map(evt => {\n const { message, count, lastTimestamp, involvedObject } = evt;\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"event\", key: evt.getId() },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"cssNames\"])(\"title\", { warning: evt.isWarning() }) }, message),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_4__[\"DrawerItem\"], { name: \"Source\" }, evt.getSource()),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_4__[\"DrawerItem\"], { name: \"Count\" }, count),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_4__[\"DrawerItem\"], { name: \"Sub-object\" }, involvedObject.fieldPath),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_4__[\"DrawerItem\"], { name: \"Last seen\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_locale_date__WEBPACK_IMPORTED_MODULE_6__[\"LocaleDate\"], { date: lastTimestamp }))));\n }))));\n }\n};\nKubeEventDetails = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_2__[\"observer\"]\n], KubeEventDetails);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/+events/kube-event-details.tsx?");
42918
42918
 
42919
42919
  /***/ }),
42920
42920
 
@@ -42962,7 +42962,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
42962
42962
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
42963
42963
 
42964
42964
  "use strict";
42965
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NamespaceSelect\", function() { return NamespaceSelect; });\n/* harmony import */ var _namespace_select_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespace-select.scss */ \"./src/renderer/components/+namespaces/namespace-select.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../select */ \"./src/renderer/components/select/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/* harmony import */ var _namespace_store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./namespace.store */ \"./src/renderer/components/+namespaces/namespace.store.ts\");\n/* harmony import */ var _common_k8s_api_kube_watch_api__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/k8s-api/kube-watch-api */ \"./src/common/k8s-api/kube-watch-api.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\n\nconst defaultProps = {\n showIcons: true,\n};\nlet NamespaceSelect = class NamespaceSelect extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor(props) {\n super(props);\n Object.defineProperty(this, \"formatOptionLabel\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (option) => {\n const { showIcons } = this.props;\n const { value, label } = option;\n return label || (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null,\n showIcons && react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_6__[\"Icon\"], { small: true, material: \"layers\" }),\n value));\n }\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_2__[\"makeObservable\"])(this);\n }\n componentDidMount() {\n Object(mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"disposeOnUnmount\"])(this, [\n _common_k8s_api_kube_watch_api__WEBPACK_IMPORTED_MODULE_8__[\"kubeWatchApi\"].subscribeStores([_namespace_store__WEBPACK_IMPORTED_MODULE_7__[\"namespaceStore\"]], {\n preload: true,\n loadOnce: true, // skip reloading namespaces on every render / page visit\n }),\n ]);\n }\n get options() {\n const { customizeOptions, showAllNamespacesOption, sort } = this.props;\n let options = _namespace_store__WEBPACK_IMPORTED_MODULE_7__[\"namespaceStore\"].items.map(ns => ({ value: ns.getName() }));\n if (sort) {\n options.sort(sort);\n }\n if (showAllNamespacesOption) {\n options.unshift({ label: \"All Namespaces\", value: \"\" });\n }\n if (customizeOptions) {\n options = customizeOptions(options);\n }\n return options;\n }\n render() {\n const _a = this.props, { className, showIcons, customizeOptions, components = {} } = _a, selectProps = __rest(_a, [\"className\", \"showIcons\", \"customizeOptions\", \"components\"]);\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_select__WEBPACK_IMPORTED_MODULE_4__[\"Select\"], Object.assign({ className: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"cssNames\"])(\"NamespaceSelect\", className), menuClass: \"NamespaceSelectMenu\", formatOptionLabel: this.formatOptionLabel, options: this.options, components: components }, selectProps)));\n }\n};\nObject.defineProperty(NamespaceSelect, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: defaultProps\n});\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"computed\"].struct,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], NamespaceSelect.prototype, \"options\", null);\nNamespaceSelect = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"observer\"],\n __metadata(\"design:paramtypes\", [Object])\n], NamespaceSelect);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/+namespaces/namespace-select.tsx?");
42965
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NamespaceSelect\", function() { return NamespaceSelect; });\n/* harmony import */ var _namespace_select_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespace-select.scss */ \"./src/renderer/components/+namespaces/namespace-select.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../select */ \"./src/renderer/components/select/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/* harmony import */ var _namespace_store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./namespace.store */ \"./src/renderer/components/+namespaces/namespace.store.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\nconst defaultProps = {\n showIcons: true,\n};\nlet NamespaceSelect = class NamespaceSelect extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor(props) {\n super(props);\n Object.defineProperty(this, \"formatOptionLabel\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (option) => {\n const { showIcons } = this.props;\n const { value, label } = option;\n return label || (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null,\n showIcons && react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_6__[\"Icon\"], { small: true, material: \"layers\" }),\n value));\n }\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_2__[\"makeObservable\"])(this);\n }\n // No subscribe here because the subscribe is in <App /> (the cluster frame root component)\n get options() {\n const { customizeOptions, showAllNamespacesOption, sort } = this.props;\n let options = _namespace_store__WEBPACK_IMPORTED_MODULE_7__[\"namespaceStore\"].items.map(ns => ({ value: ns.getName() }));\n if (sort) {\n options.sort(sort);\n }\n if (showAllNamespacesOption) {\n options.unshift({ label: \"All Namespaces\", value: \"\" });\n }\n if (customizeOptions) {\n options = customizeOptions(options);\n }\n return options;\n }\n render() {\n const _a = this.props, { className, showIcons, customizeOptions, components = {} } = _a, selectProps = __rest(_a, [\"className\", \"showIcons\", \"customizeOptions\", \"components\"]);\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_select__WEBPACK_IMPORTED_MODULE_4__[\"Select\"], Object.assign({ className: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"cssNames\"])(\"NamespaceSelect\", className), menuClass: \"NamespaceSelectMenu\", formatOptionLabel: this.formatOptionLabel, options: this.options, components: components }, selectProps)));\n }\n};\nObject.defineProperty(NamespaceSelect, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: defaultProps\n});\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"computed\"].struct,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], NamespaceSelect.prototype, \"options\", null);\nNamespaceSelect = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"observer\"],\n __metadata(\"design:paramtypes\", [Object])\n], NamespaceSelect);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/+namespaces/namespace-select.tsx?");
42966
42966
 
42967
42967
  /***/ }),
42968
42968
 
@@ -43362,18 +43362,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _con
43362
43362
 
43363
43363
  /***/ }),
43364
43364
 
43365
- /***/ "./src/renderer/components/context.ts":
43366
- /*!********************************************!*\
43367
- !*** ./src/renderer/components/context.ts ***!
43368
- \********************************************/
43369
- /*! exports provided: clusterContext */
43370
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
43371
-
43372
- "use strict";
43373
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clusterContext\", function() { return clusterContext; });\n/* harmony import */ var _common_cluster_store__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/cluster-store */ \"./src/common/cluster-store.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _namespaces_namespace_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./+namespaces/namespace.store */ \"./src/renderer/components/+namespaces/namespace.store.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\nconst clusterContext = {\n get cluster() {\n return _common_cluster_store__WEBPACK_IMPORTED_MODULE_0__[\"ClusterStore\"].getInstance().getById(Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"getHostedClusterId\"])());\n },\n get allNamespaces() {\n var _a;\n if (!this.cluster) {\n return [];\n }\n // user given list of namespaces\n if ((_a = this.cluster) === null || _a === void 0 ? void 0 : _a.accessibleNamespaces.length) {\n return this.cluster.accessibleNamespaces;\n }\n if (_namespaces_namespace_store__WEBPACK_IMPORTED_MODULE_2__[\"namespaceStore\"].items.length > 0) {\n // namespaces from kubernetes api\n return _namespaces_namespace_store__WEBPACK_IMPORTED_MODULE_2__[\"namespaceStore\"].items.map((namespace) => namespace.getName());\n }\n else {\n // fallback to cluster resolved namespaces because we could not load list\n return this.cluster.allowedNamespaces || [];\n }\n },\n get contextNamespaces() {\n var _a;\n return (_a = _namespaces_namespace_store__WEBPACK_IMPORTED_MODULE_2__[\"namespaceStore\"].contextNamespaces) !== null && _a !== void 0 ? _a : [];\n },\n};\n\n\n//# sourceURL=webpack:///./src/renderer/components/context.ts?");
43374
-
43375
- /***/ }),
43376
-
43377
43365
  /***/ "./src/renderer/components/dialog/dialog.scss":
43378
43366
  /*!****************************************************!*\
43379
43367
  !*** ./src/renderer/components/dialog/dialog.scss ***!
@@ -43981,7 +43969,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
43981
43969
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
43982
43970
 
43983
43971
  "use strict";
43984
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeObjectListLayout\", function() { return KubeObjectListLayout; });\n/* harmony import */ var _kube_object_list_layout_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./kube-object-list-layout.scss */ \"./src/renderer/components/kube-object-list-layout/kube-object-list-layout.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _item_object_list_item_list_layout__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../item-object-list/item-list-layout */ \"./src/renderer/components/item-object-list/item-list-layout.tsx\");\n/* harmony import */ var _kube_object_menu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../kube-object-menu */ \"./src/renderer/components/kube-object-menu/index.ts\");\n/* harmony import */ var _common_k8s_api_kube_watch_api__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/k8s-api/kube-watch-api */ \"./src/common/k8s-api/kube-watch-api.ts\");\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../context */ \"./src/renderer/components/context.ts\");\n/* harmony import */ var _namespaces_namespace_select_filter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../+namespaces/namespace-select-filter */ \"./src/renderer/components/+namespaces/namespace-select-filter.tsx\");\n/* harmony import */ var _utils_rbac__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/rbac */ \"./src/renderer/utils/rbac.ts\");\n/* harmony import */ var _kube_detail_params__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../kube-detail-params */ \"./src/renderer/components/kube-detail-params/index.ts\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../tooltip */ \"./src/renderer/components/tooltip/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst defaultProps = {\n onDetails: (item) => Object(_kube_detail_params__WEBPACK_IMPORTED_MODULE_11__[\"toggleDetails\"])(item.selfLink),\n subscribeStores: true,\n};\nlet KubeObjectListLayout = class KubeObjectListLayout extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor(props) {\n super(props);\n Object.defineProperty(this, \"loadErrors\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_2__[\"makeObservable\"])(this);\n }\n get selectedItem() {\n return this.props.store.getByPath(_kube_detail_params__WEBPACK_IMPORTED_MODULE_11__[\"kubeSelectedUrlParam\"].get());\n }\n componentDidMount() {\n const { store, dependentStores = [], subscribeStores } = this.props;\n const stores = Array.from(new Set([store, ...dependentStores]));\n const reactions = [\n Object(mobx__WEBPACK_IMPORTED_MODULE_2__[\"reaction\"])(() => _context__WEBPACK_IMPORTED_MODULE_8__[\"clusterContext\"].contextNamespaces.slice(), () => {\n // clear load errors\n this.loadErrors.length = 0;\n }),\n ];\n if (subscribeStores) {\n reactions.push(_common_k8s_api_kube_watch_api__WEBPACK_IMPORTED_MODULE_7__[\"kubeWatchApi\"].subscribeStores(stores, {\n preload: true,\n namespaces: _context__WEBPACK_IMPORTED_MODULE_8__[\"clusterContext\"].contextNamespaces,\n onLoadFailure: error => this.loadErrors.push(String(error)),\n }));\n }\n Object(mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"disposeOnUnmount\"])(this, reactions);\n }\n renderLoadErrors() {\n if (this.loadErrors.length === 0) {\n return null;\n }\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_12__[\"Icon\"], { material: \"warning\", className: \"load-error\", tooltip: {\n children: (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, this.loadErrors.map((error, index) => react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"p\", { key: index }, error)))),\n preferredPositions: _tooltip__WEBPACK_IMPORTED_MODULE_13__[\"TooltipPosition\"].BOTTOM,\n } }));\n }\n render() {\n const _a = this.props, { className, customizeHeader, store, items = store.contextItems } = _a, layoutProps = __rest(_a, [\"className\", \"customizeHeader\", \"store\", \"items\"]);\n const placeholderString = _utils_rbac__WEBPACK_IMPORTED_MODULE_10__[\"ResourceNames\"][_utils_rbac__WEBPACK_IMPORTED_MODULE_10__[\"ResourceKindMap\"][store.api.kind]] || store.api.kind;\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_item_object_list_item_list_layout__WEBPACK_IMPORTED_MODULE_5__[\"ItemListLayout\"], Object.assign({}, layoutProps, { className: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"cssNames\"])(\"KubeObjectListLayout\", className), store: store, items: items, preloadStores: false, detailsItem: this.selectedItem, customizeHeader: [\n (_a) => {\n var { filters, searchProps, info } = _a, headerPlaceHolders = __rest(_a, [\"filters\", \"searchProps\", \"info\"]);\n return (Object.assign({ filters: (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null,\n filters,\n store.api.isNamespaced && react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_namespaces_namespace_select_filter__WEBPACK_IMPORTED_MODULE_9__[\"NamespaceSelectFilter\"], null))), searchProps: Object.assign(Object.assign({}, searchProps), { placeholder: `Search ${placeholderString}...` }), info: (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null,\n info,\n this.renderLoadErrors())) }, headerPlaceHolders));\n },\n ...[customizeHeader].flat(),\n ], renderItemMenu: item => react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_kube_object_menu__WEBPACK_IMPORTED_MODULE_6__[\"KubeObjectMenu\"], { object: item }) })));\n }\n};\nObject.defineProperty(KubeObjectListLayout, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: defaultProps\n});\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"observable\"],\n __metadata(\"design:type\", Array)\n], KubeObjectListLayout.prototype, \"loadErrors\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], KubeObjectListLayout.prototype, \"selectedItem\", null);\nKubeObjectListLayout = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"observer\"],\n __metadata(\"design:paramtypes\", [Object])\n], KubeObjectListLayout);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/kube-object-list-layout/kube-object-list-layout.tsx?");
43972
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeObjectListLayout\", function() { return KubeObjectListLayout; });\n/* harmony import */ var _kube_object_list_layout_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./kube-object-list-layout.scss */ \"./src/renderer/components/kube-object-list-layout/kube-object-list-layout.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _item_object_list_item_list_layout__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../item-object-list/item-list-layout */ \"./src/renderer/components/item-object-list/item-list-layout.tsx\");\n/* harmony import */ var _kube_object_menu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../kube-object-menu */ \"./src/renderer/components/kube-object-menu/index.ts\");\n/* harmony import */ var _common_k8s_api_kube_watch_api__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/k8s-api/kube-watch-api */ \"./src/common/k8s-api/kube-watch-api.ts\");\n/* harmony import */ var _namespaces_namespace_select_filter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../+namespaces/namespace-select-filter */ \"./src/renderer/components/+namespaces/namespace-select-filter.tsx\");\n/* harmony import */ var _utils_rbac__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/rbac */ \"./src/renderer/utils/rbac.ts\");\n/* harmony import */ var _kube_detail_params__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../kube-detail-params */ \"./src/renderer/components/kube-detail-params/index.ts\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../tooltip */ \"./src/renderer/components/tooltip/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar KubeObjectListLayout_1;\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst defaultProps = {\n onDetails: (item) => Object(_kube_detail_params__WEBPACK_IMPORTED_MODULE_10__[\"toggleDetails\"])(item.selfLink),\n subscribeStores: true,\n};\nlet KubeObjectListLayout = KubeObjectListLayout_1 = class KubeObjectListLayout extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor(props) {\n super(props);\n Object.defineProperty(this, \"loadErrors\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_2__[\"makeObservable\"])(this);\n }\n get selectedItem() {\n return this.props.store.getByPath(_kube_detail_params__WEBPACK_IMPORTED_MODULE_10__[\"kubeSelectedUrlParam\"].get());\n }\n componentDidMount() {\n const { store, dependentStores = [], subscribeStores } = this.props;\n const stores = Array.from(new Set([store, ...dependentStores]));\n const reactions = [\n Object(mobx__WEBPACK_IMPORTED_MODULE_2__[\"reaction\"])(() => KubeObjectListLayout_1.clusterContext.contextNamespaces.slice(), () => {\n // clear load errors\n this.loadErrors.length = 0;\n }),\n ];\n if (subscribeStores) {\n reactions.push(_common_k8s_api_kube_watch_api__WEBPACK_IMPORTED_MODULE_7__[\"kubeWatchApi\"].subscribeStores(stores, {\n onLoadFailure: error => this.loadErrors.push(String(error)),\n }));\n }\n Object(mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"disposeOnUnmount\"])(this, reactions);\n }\n renderLoadErrors() {\n if (this.loadErrors.length === 0) {\n return null;\n }\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_11__[\"Icon\"], { material: \"warning\", className: \"load-error\", tooltip: {\n children: (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, this.loadErrors.map((error, index) => react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"p\", { key: index }, error)))),\n preferredPositions: _tooltip__WEBPACK_IMPORTED_MODULE_12__[\"TooltipPosition\"].BOTTOM,\n } }));\n }\n render() {\n const _a = this.props, { className, customizeHeader, store, items = store.contextItems } = _a, layoutProps = __rest(_a, [\"className\", \"customizeHeader\", \"store\", \"items\"]);\n const placeholderString = _utils_rbac__WEBPACK_IMPORTED_MODULE_9__[\"ResourceNames\"][_utils_rbac__WEBPACK_IMPORTED_MODULE_9__[\"ResourceKindMap\"][store.api.kind]] || store.api.kind;\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_item_object_list_item_list_layout__WEBPACK_IMPORTED_MODULE_5__[\"ItemListLayout\"], Object.assign({}, layoutProps, { className: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"cssNames\"])(\"KubeObjectListLayout\", className), store: store, items: items, preloadStores: false, detailsItem: this.selectedItem, customizeHeader: [\n (_a) => {\n var { filters, searchProps, info } = _a, headerPlaceHolders = __rest(_a, [\"filters\", \"searchProps\", \"info\"]);\n return (Object.assign({ filters: (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null,\n filters,\n store.api.isNamespaced && react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_namespaces_namespace_select_filter__WEBPACK_IMPORTED_MODULE_8__[\"NamespaceSelectFilter\"], null))), searchProps: Object.assign(Object.assign({}, searchProps), { placeholder: `Search ${placeholderString}...` }), info: (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null,\n info,\n this.renderLoadErrors())) }, headerPlaceHolders));\n },\n ...[customizeHeader].flat(),\n ], renderItemMenu: item => react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_kube_object_menu__WEBPACK_IMPORTED_MODULE_6__[\"KubeObjectMenu\"], { object: item }) })));\n }\n};\nObject.defineProperty(KubeObjectListLayout, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: defaultProps\n});\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"observable\"],\n __metadata(\"design:type\", Array)\n], KubeObjectListLayout.prototype, \"loadErrors\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], KubeObjectListLayout.prototype, \"selectedItem\", null);\nKubeObjectListLayout = KubeObjectListLayout_1 = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"observer\"],\n __metadata(\"design:paramtypes\", [Object])\n], KubeObjectListLayout);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/kube-object-list-layout/kube-object-list-layout.tsx?");
43985
43973
 
43986
43974
  /***/ }),
43987
43975
 
@@ -44495,7 +44483,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
44495
44483
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
44496
44484
 
44497
44485
  "use strict";
44498
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Notifications\", function() { return Notifications; });\n/* harmony import */ var _notifications_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./notifications.scss */ \"./src/renderer/components/notifications/notifications.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _common_k8s_api_json_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/k8s-api/json-api */ \"./src/common/k8s-api/json-api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _notifications_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./notifications.store */ \"./src/renderer/components/notifications/notifications.store.tsx\");\n/* harmony import */ var _animate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../animate */ \"./src/renderer/components/animate/index.ts\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n\n\n\n\n\n\n\n\n\nlet Notifications = class Notifications extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"elem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n }\n static ok(message) {\n return _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"notificationsStore\"].add({\n message,\n timeout: 2500,\n status: _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"NotificationStatus\"].OK,\n });\n }\n static error(message, customOpts = {}) {\n return _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"notificationsStore\"].add(Object.assign({ message, timeout: 10000, status: _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"NotificationStatus\"].ERROR }, customOpts));\n }\n static shortInfo(message, customOpts = {}) {\n return this.info(message, Object.assign({ timeout: 5000 }, customOpts));\n }\n static info(message, customOpts = {}) {\n return _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"notificationsStore\"].add(Object.assign({ status: _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"NotificationStatus\"].INFO, timeout: 0, message }, customOpts));\n }\n componentDidMount() {\n Object(mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"disposeOnUnmount\"])(this, [\n Object(mobx__WEBPACK_IMPORTED_MODULE_2__[\"reaction\"])(() => _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"notificationsStore\"].notifications.length, () => {\n this.scrollToLastNotification();\n }, { delay: 250 }),\n ]);\n }\n scrollToLastNotification() {\n if (!this.elem) {\n return;\n }\n this.elem.scrollTo({\n top: this.elem.scrollHeight,\n behavior: \"smooth\",\n });\n }\n getMessage(notification) {\n let { message } = notification;\n if (message instanceof _common_k8s_api_json_api__WEBPACK_IMPORTED_MODULE_4__[\"JsonApiErrorParsed\"] || message instanceof Error) {\n message = message.toString();\n }\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.toArray(message);\n }\n render() {\n const { notifications, remove, addAutoHideTimer, removeAutoHideTimer } = _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"notificationsStore\"];\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"Notifications flex column align-flex-end\", ref: e => this.elem = e }, notifications.map(notification => {\n const { id, status, onClose } = notification;\n const msgText = this.getMessage(notification);\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_animate__WEBPACK_IMPORTED_MODULE_7__[\"Animate\"], { key: id },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"cssNames\"])(\"notification flex\", status), onMouseLeave: () => addAutoHideTimer(id), onMouseEnter: () => removeAutoHideTimer(id) },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"box\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_8__[\"Icon\"], { material: \"info_outline\" })),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"message box grow\" }, msgText),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"box\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_8__[\"Icon\"], { material: \"close\", className: \"close\", onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"prevDefault\"])(() => {\n remove(id);\n onClose === null || onClose === void 0 ? void 0 : onClose();\n }) })))));\n })));\n }\n};\nNotifications = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"observer\"]\n], Notifications);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/notifications/notifications.tsx?");
44486
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Notifications\", function() { return Notifications; });\n/* harmony import */ var _notifications_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./notifications.scss */ \"./src/renderer/components/notifications/notifications.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _common_k8s_api_json_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/k8s-api/json-api */ \"./src/common/k8s-api/json-api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _notifications_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./notifications.store */ \"./src/renderer/components/notifications/notifications.store.tsx\");\n/* harmony import */ var _animate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../animate */ \"./src/renderer/components/animate/index.ts\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n\n\n\n\n\n\n\n\n\nlet Notifications = class Notifications extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"elem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n }\n static ok(message) {\n _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"notificationsStore\"].add({\n message,\n timeout: 2500,\n status: _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"NotificationStatus\"].OK,\n });\n }\n static error(message, customOpts = {}) {\n _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"notificationsStore\"].add(Object.assign({ message, timeout: 10000, status: _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"NotificationStatus\"].ERROR }, customOpts));\n }\n static shortInfo(message, customOpts = {}) {\n this.info(message, Object.assign({ timeout: 5000 }, customOpts));\n }\n static info(message, customOpts = {}) {\n return _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"notificationsStore\"].add(Object.assign({ status: _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"NotificationStatus\"].INFO, timeout: 0, message }, customOpts));\n }\n componentDidMount() {\n Object(mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"disposeOnUnmount\"])(this, [\n Object(mobx__WEBPACK_IMPORTED_MODULE_2__[\"reaction\"])(() => _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"notificationsStore\"].notifications.length, () => {\n this.scrollToLastNotification();\n }, { delay: 250 }),\n ]);\n }\n scrollToLastNotification() {\n if (!this.elem) {\n return;\n }\n this.elem.scrollTo({\n top: this.elem.scrollHeight,\n behavior: \"smooth\",\n });\n }\n getMessage(notification) {\n let { message } = notification;\n if (message instanceof _common_k8s_api_json_api__WEBPACK_IMPORTED_MODULE_4__[\"JsonApiErrorParsed\"] || message instanceof Error) {\n message = message.toString();\n }\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.toArray(message);\n }\n render() {\n const { notifications, remove, addAutoHideTimer, removeAutoHideTimer } = _notifications_store__WEBPACK_IMPORTED_MODULE_6__[\"notificationsStore\"];\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"Notifications flex column align-flex-end\", ref: e => this.elem = e }, notifications.map(notification => {\n const { id, status, onClose } = notification;\n const msgText = this.getMessage(notification);\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_animate__WEBPACK_IMPORTED_MODULE_7__[\"Animate\"], { key: id },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"cssNames\"])(\"notification flex\", status), onMouseLeave: () => addAutoHideTimer(id), onMouseEnter: () => removeAutoHideTimer(id) },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"box\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_8__[\"Icon\"], { material: \"info_outline\" })),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"message box grow\" }, msgText),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"box\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_8__[\"Icon\"], { material: \"close\", className: \"close\", onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"prevDefault\"])(() => {\n remove(id);\n onClose === null || onClose === void 0 ? void 0 : onClose();\n }) })))));\n })));\n }\n};\nNotifications = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"observer\"]\n], Notifications);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/notifications/notifications.tsx?");
44499
44487
 
44500
44488
  /***/ }),
44501
44489