@techdocs/cli 0.8.15 → 0.8.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/dist/cjs/{PublisherConfig-a09bdfcc.cjs.js → PublisherConfig-162efac5.cjs.js} +1 -1
- package/dist/cjs/{PublisherConfig-a09bdfcc.cjs.js.map → PublisherConfig-162efac5.cjs.js.map} +1 -1
- package/dist/cjs/{generate-86756c8c.cjs.js → generate-143a6de3.cjs.js} +9 -5
- package/dist/cjs/generate-143a6de3.cjs.js.map +1 -0
- package/dist/cjs/{migrate-04a51fb3.cjs.js → migrate-181e95f5.cjs.js} +5 -5
- package/dist/cjs/migrate-181e95f5.cjs.js.map +1 -0
- package/dist/cjs/{mkdocs-f1cf9408.cjs.js → mkdocs-30f530ff.cjs.js} +3 -3
- package/dist/cjs/{mkdocs-f1cf9408.cjs.js.map → mkdocs-30f530ff.cjs.js.map} +1 -1
- package/dist/cjs/{mkdocsServer-7058189d.cjs.js → mkdocsServer-758a3ae9.cjs.js} +1 -1
- package/dist/cjs/{mkdocsServer-7058189d.cjs.js.map → mkdocsServer-758a3ae9.cjs.js.map} +1 -1
- package/dist/cjs/{publish-d1ccb001.cjs.js → publish-7bf1e5f7.cjs.js} +5 -5
- package/dist/cjs/publish-7bf1e5f7.cjs.js.map +1 -0
- package/dist/cjs/{serve-be4ef843.cjs.js → serve-21d1e885.cjs.js} +3 -3
- package/dist/cjs/serve-21d1e885.cjs.js.map +1 -0
- package/dist/cjs/{utility-6042a9ba.cjs.js → utility-51f4a306.cjs.js} +1 -1
- package/dist/cjs/utility-51f4a306.cjs.js.map +1 -0
- package/dist/embedded-app/.config-schema.json +1 -1
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{1553.3f1fcd49.chunk.js → 1553.b7bcb06c.chunk.js} +2 -2
- package/dist/embedded-app/static/{1553.3f1fcd49.chunk.js.map → 1553.b7bcb06c.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1959.657c7008.chunk.js → 1959.6c1762da.chunk.js} +2 -2
- package/dist/embedded-app/static/{1959.657c7008.chunk.js.map → 1959.6c1762da.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{2426.82184352.chunk.js → 2426.92f98d58.chunk.js} +2 -2
- package/dist/embedded-app/static/{2426.82184352.chunk.js.map → 2426.92f98d58.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{390.9bae5f6b.chunk.js → 390.b97bc67e.chunk.js} +2 -2
- package/dist/embedded-app/static/{390.9bae5f6b.chunk.js.map → 390.b97bc67e.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4022.919281f3.chunk.js → 4022.482a5f92.chunk.js} +2 -2
- package/dist/embedded-app/static/{4022.919281f3.chunk.js.map → 4022.482a5f92.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6105.1f3a3239.chunk.js → 6105.6eda23ad.chunk.js} +1 -1
- package/dist/embedded-app/static/{6105.1f3a3239.chunk.js.map → 6105.6eda23ad.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6235.d2d64119.chunk.js → 6235.a1086c98.chunk.js} +2 -2
- package/dist/embedded-app/static/{6235.d2d64119.chunk.js.map → 6235.a1086c98.chunk.js.map} +1 -1
- package/dist/embedded-app/static/6583.035b49a3.chunk.js +3 -0
- package/dist/embedded-app/static/6583.035b49a3.chunk.js.map +1 -0
- package/dist/embedded-app/static/7110.cac06b1c.chunk.js +3 -0
- package/dist/embedded-app/static/7110.cac06b1c.chunk.js.map +1 -0
- package/dist/embedded-app/static/7758.cb484a7b.chunk.js +3 -0
- package/dist/embedded-app/static/{7758.5616a290.chunk.js.map → 7758.cb484a7b.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8061.4cacfdc7.chunk.js → 8061.b8ba1848.chunk.js} +2 -2
- package/dist/embedded-app/static/{8061.4cacfdc7.chunk.js.map → 8061.b8ba1848.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8718.cb2cefe2.chunk.js → 8718.8a863f87.chunk.js} +1 -1
- package/dist/embedded-app/static/{8718.cb2cefe2.chunk.js.map → 8718.8a863f87.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8792.f347f8eb.chunk.js → 8792.e74d00e0.chunk.js} +2 -2
- package/dist/embedded-app/static/{8792.f347f8eb.chunk.js.map → 8792.e74d00e0.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9028.e0a4340b.chunk.js → 9028.0f028f46.chunk.js} +2 -2
- package/dist/embedded-app/static/{9028.e0a4340b.chunk.js.map → 9028.0f028f46.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.cc995f30.js +444 -0
- package/dist/embedded-app/static/main.cc995f30.js.map +1 -0
- package/dist/embedded-app/static/module-hot-loader.7c7a4226.js +25 -0
- package/dist/embedded-app/static/module-hot-loader.7c7a4226.js.map +1 -0
- package/dist/embedded-app/static/{module-material-ui.c0e7547f.js → module-material-ui.3c0e2d92.js} +6 -6
- package/dist/embedded-app/static/{module-material-ui.c0e7547f.js.map → module-material-ui.3c0e2d92.js.map} +1 -1
- package/dist/embedded-app/static/{module-react-beautiful-dnd.bcb66a0c.js → module-react-beautiful-dnd.2ab2ffc2.js} +2 -2
- package/dist/embedded-app/static/{module-react-beautiful-dnd.bcb66a0c.js.map → module-react-beautiful-dnd.2ab2ffc2.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.287af9cc.js → runtime.cc995f30.js} +2 -2
- package/dist/embedded-app/static/runtime.cc995f30.js.map +1 -0
- package/dist/embedded-app/static/vendor.cc995f30.js +140 -0
- package/dist/embedded-app/static/vendor.cc995f30.js.map +1 -0
- package/dist/index.cjs.js +8 -8
- package/dist/index.cjs.js.map +1 -1
- package/package.json +11 -11
- package/dist/cjs/generate-86756c8c.cjs.js.map +0 -1
- package/dist/cjs/migrate-04a51fb3.cjs.js.map +0 -1
- package/dist/cjs/publish-d1ccb001.cjs.js.map +0 -1
- package/dist/cjs/serve-be4ef843.cjs.js.map +0 -1
- package/dist/cjs/utility-6042a9ba.cjs.js.map +0 -1
- package/dist/embedded-app/static/6583.fc990b80.chunk.js +0 -3
- package/dist/embedded-app/static/6583.fc990b80.chunk.js.map +0 -1
- package/dist/embedded-app/static/7758.5616a290.chunk.js +0 -3
- package/dist/embedded-app/static/main.287af9cc.js +0 -415
- package/dist/embedded-app/static/main.287af9cc.js.map +0 -1
- package/dist/embedded-app/static/module-react-dom.40a0584f.js +0 -18
- package/dist/embedded-app/static/module-react-dom.40a0584f.js.map +0 -1
- package/dist/embedded-app/static/runtime.287af9cc.js.map +0 -1
- package/dist/embedded-app/static/vendor.287af9cc.js +0 -147
- package/dist/embedded-app/static/vendor.287af9cc.js.map +0 -1
|
@@ -1,415 +0,0 @@
|
|
|
1
|
-
(()=>{var Vi=Object.defineProperty;var Gi=(_,s,e)=>s in _?Vi(_,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):_[s]=e;var ae=(_,s,e)=>(Gi(_,typeof s!="symbol"?s+"":s,e),e),ho=(_,s,e)=>{if(!s.has(_))throw TypeError("Cannot "+e)};var Je=(_,s,e)=>(ho(_,s,"read from private field"),e?e.call(_):s.get(_)),cn=(_,s,e)=>{if(s.has(_))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(_):s.set(_,e)},En=(_,s,e,a)=>(ho(_,s,"write to private field"),a?a.call(_,e):s.set(_,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{79018:function(_,s,e){"use strict";e.d(s,{M:function(){return i}});var a=e(41564),t=e(10179),c=e(96279),f=e.n(c),y=e(1310);class i{constructor(p){ae(this,"discoveryApi");ae(this,"fetchApi");this.discoveryApi=p.discoveryApi,this.fetchApi=p.fetchApi||{fetch:f()}}async getEntityAncestors(p,m){const{kind:l,namespace:r,name:A}=(0,a.of)(p.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(l)}/${encodeURIComponent(r)}/${encodeURIComponent(A)}/ancestry`,m)}async getLocationById(p,m){return await this.requestOptional("GET",`/locations/${encodeURIComponent(p)}`,m)}async getEntities(p,m){const{filter:l=[],fields:r=[],offset:A,limit:T,after:Z}=p!=null?p:{},O=[];for(const b of[l].flat()){const D=[];for(const[j,ee]of Object.entries(b))for(const ce of[ee].flat())ce===y.n?D.push(encodeURIComponent(j)):typeof ce=="string"&&D.push(`${encodeURIComponent(j)}=${encodeURIComponent(ce)}`);D.length&&O.push(`filter=${D.join(",")}`)}r.length&&O.push(`fields=${r.map(encodeURIComponent).join(",")}`),A!==void 0&&O.push(`offset=${A}`),T!==void 0&&O.push(`limit=${T}`),Z!==void 0&&O.push(`after=${encodeURIComponent(Z)}`);const q=O.length?`?${O.join("&")}`:"",$=await this.requestRequired("GET",`/entities${q}`,m),x=(b,D)=>{var ce,Ee;if(((ce=b.metadata)==null?void 0:ce.name)===void 0||b.kind===void 0||((Ee=D.metadata)==null?void 0:Ee.name)===void 0||D.kind===void 0)return 0;const j=(0,a.eE)(b),ee=(0,a.eE)(D);return j<ee?-1:j>ee?1:0};return{items:$.sort(x)}}async getEntityByName(p,m){const{kind:l,namespace:r="default",name:A}=p;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(l)}/${encodeURIComponent(r)}/${encodeURIComponent(A)}`,m)}async refreshEntity(p,m){const l=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(m==null?void 0:m.token)&&{Authorization:`Bearer ${m==null?void 0:m.token}`}},method:"POST",body:JSON.stringify({entityRef:p})});if(l.status!==200)throw new Error(await l.text())}async getEntityFacets(p,m){const{filter:l=[],facets:r}=p,A=[];for(const Z of[l].flat()){const O=[];for(const[q,$]of Object.entries(Z))for(const x of[$].flat())x===y.n?O.push(encodeURIComponent(q)):typeof x=="string"&&O.push(`${encodeURIComponent(q)}=${encodeURIComponent(x)}`);O.length&&A.push(`filter=${O.join(",")}`)}for(const Z of r)A.push(`facet=${encodeURIComponent(Z)}`);const T=A.length?`?${A.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${T}`,m)}async addLocation({type:p="url",target:m,dryRun:l,presence:r},A){const T=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${l?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(A==null?void 0:A.token)&&{Authorization:`Bearer ${A==null?void 0:A.token}`}},method:"POST",body:JSON.stringify({type:p,target:m,presence:r})});if(T.status!==201)throw new Error(await T.text());const{location:Z,entities:O,exists:q}=await T.json();if(!Z)throw new Error(`Location wasn't added: ${m}`);return{location:Z,entities:O,exists:q}}async getOriginLocationByEntity(p,m){var A;const l=(A=p.metadata.annotations)==null?void 0:A[a.q1];return l?(await this.requestRequired("GET","/locations",m)).map(T=>T.data).find(T=>l===(0,a.NZ)(T)):void 0}async getLocationByEntity(p,m){var A;const l=(A=p.metadata.annotations)==null?void 0:A[a.P1];return l?(await this.requestRequired("GET","/locations",m)).map(T=>T.data).find(T=>l===(0,a.NZ)(T)):void 0}async getLocationByRef(p,m){return(await this.requestRequired("GET","/locations",m)).map(r=>r.data).find(r=>p===(0,a.NZ)(r))}async removeLocationById(p,m){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(p)}`,m)}async removeEntityByUid(p,m){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(p)}`,m)}async requestIgnored(p,m,l){const r=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,A=(l==null?void 0:l.token)?{Authorization:`Bearer ${l.token}`}:{},T=await this.fetchApi.fetch(r,{method:p,headers:A});if(!T.ok)throw await t.VL.fromResponse(T)}async requestRequired(p,m,l){const r=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,A=(l==null?void 0:l.token)?{Authorization:`Bearer ${l.token}`}:{},T=await this.fetchApi.fetch(r,{method:p,headers:A});if(!T.ok)throw await t.VL.fromResponse(T);return await T.json()}async requestOptional(p,m,l){const r=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,A=(l==null?void 0:l.token)?{Authorization:`Bearer ${l.token}`}:{},T=await this.fetchApi.fetch(r,{method:p,headers:A});if(!T.ok){if(T.status===404)return;throw await t.VL.fromResponse(T)}return await T.json()}}},58248:function(_,s,e){"use strict";e.d(s,{CatalogClient:function(){return a.M},CATALOG_FILTER_EXISTS:function(){return t.CATALOG_FILTER_EXISTS}});var a=e(79018),t=e(24040)},1310:function(_,s,e){"use strict";e.d(s,{n:function(){return a}});const a=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},24040:function(_,s,e){"use strict";e.d(s,{CATALOG_FILTER_EXISTS:function(){return a.n}});var a=e(1310)},41564:function(_,s,e){"use strict";e.d(s,{Tf:function(){return v},P1:function(){return te},q1:function(){return be},M6:function(){return he},l2:function(){return i},zG:function(){return t},w$:function(){return Re},nP:function(){return Ne},aS:function(){return le},hr:function(){return ft},S4:function(){return K},cz:function(){return ze},C_:function(){return tt},of:function(){return je},Ou:function(){return De},eE:function(){return Et},NZ:function(){return _e}});const a="default",t="default",c=null,f="backstage.io/view-url",y="backstage.io/edit-url",i="backstage.io/view-url",v="backstage.io/edit-url";var p=e(76635),m=e.n(p);class l{constructor(V=DEFAULT_NAMESPACE){ae(this,"namespace");this.namespace=V}async enforce(V){return V.metadata.namespace?V:lodash.merge({metadata:{namespace:this.namespace}},V)}}class r{static isValidPrefixAndOrSuffix(V,se,Te,$e){if(typeof V!="string")return!1;const Ve=V.split(se);return Ve.length===1?$e(Ve[0]):Ve.length===2?Te(Ve[0])&&$e(Ve[1]):!1}static isJsonSafe(V){try{return m().isEqual(V,JSON.parse(JSON.stringify(V)))}catch{return!1}}static isValidDnsSubdomain(V){return typeof V=="string"&&V.length>=1&&V.length<=253&&V.split(".").every(r.isValidDnsLabel)}static isValidDnsLabel(V){return typeof V=="string"&&V.length>=1&&V.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(V)}static isValidTag(V){return typeof V=="string"&&V.length>=1&&V.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(V)}static isValidUrl(V){if(typeof V!="string")return!1;try{return new URL(V),!0}catch{return!1}}static isValidString(V){var se;return typeof V=="string"&&((se=V==null?void 0:V.trim())==null?void 0:se.length)>=1}}var A=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),T=e(48231),Z=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),O=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","generation":13,"name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"generation":{"type":"integer","description":"A positive nonzero number that indicates the current generation of data for this entity; the value is incremented each time the spec changes. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations.","examples":[1],"minimum":1,"deprecated":true},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}}}}'),q=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const $=new Map,x=[A,Z,O,q];function b(ue){if(!(ue==null?void 0:ue.length))throw new TypeError("Unknown error");const V=ue[0];throw new TypeError(`${V.dataPath||"<root>"} ${V.message}${V.params?` - ${Object.entries(V.params).map(([se,Te])=>`${se}: ${Te}`).join(", ")}`:""}`)}function D(ue,V={}){var mt;const se=(mt=V==null?void 0:V.disableCache)!=null?mt:!1,Te=se?"":JSON.stringify(ue);if(!se){const $t=$.get(Te);if($t)return $t}const $e=j(ue),Ve=new T.ZP({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});$e.length&&Ve.addSchema($e,void 0,void 0,!0);const st=Ve.compile(ue);return se||$.set(Te,st),st}function j(ue){if(typeof ue!="object")return[];const V=new Set;ue.$id&&V.add(ue.$id);const se=new Array,Te=[ue];for(;Te.length;){const $e=Te.pop();for(const Ve of ee($e))if(!V.has(Ve)){V.add(Ve);const st=x.find(mt=>mt.$id===Ve);st&&(se.push(st),Te.push(st))}}return se}function*ee(ue){const V=[ue];for(;V.length;){const se=V.pop();if(typeof se=="object"&&se)for(const[Te,$e]of Object.entries(se))Te==="$ref"&&typeof $e=="string"?yield $e.split("#")[0]:V.push($e)}}function ce(ue){const V=compileAjvSchema(ue||entityEnvelopeSchema);return se=>{if(V(se)===!0)return se;throw throwAjvError(V.errors)}}function Ee(ue){const V=D(ue);return se=>{var Ve;if(V(se)===!0)return se;const $e=(Ve=V.errors)==null?void 0:Ve.filter(st=>["/kind","/apiVersion"].includes(st.dataPath));if(($e==null?void 0:$e.length)&&$e.every(st=>st.keyword==="enum"))return!1;throw b(V.errors)}}function Ae(ue){const V=compileAjvSchema(ue||entitySchema);return se=>{if(V(se)===!0)return se;throw throwAjvError(V.errors)}}class Oe{static isValidApiVersion(V){return r.isValidPrefixAndOrSuffix(V,"/",r.isValidDnsSubdomain,se=>se.length>=1&&se.length<=63&&/^[a-z0-9A-Z]+$/.test(se))}static isValidKind(V){return typeof V=="string"&&V.length>=1&&V.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(V)}static isValidObjectName(V){return typeof V=="string"&&V.length>=1&&V.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(V)}static isValidNamespace(V){return r.isValidDnsLabel(V)}static isValidLabelKey(V){return r.isValidPrefixAndOrSuffix(V,"/",r.isValidDnsSubdomain,Oe.isValidObjectName)}static isValidLabelValue(V){return V===""||Oe.isValidObjectName(V)}static isValidAnnotationKey(V){return r.isValidPrefixAndOrSuffix(V,"/",r.isValidDnsSubdomain,Oe.isValidObjectName)}static isValidAnnotationValue(V){return typeof V=="string"}}const ge={isValidApiVersion:Oe.isValidApiVersion,isValidKind:Oe.isValidKind,isValidEntityName:Oe.isValidObjectName,isValidNamespace:Oe.isValidNamespace,isValidLabelKey:Oe.isValidLabelKey,isValidLabelValue:Oe.isValidLabelValue,isValidAnnotationKey:Oe.isValidAnnotationKey,isValidAnnotationValue:Oe.isValidAnnotationValue,isValidTag:r.isValidTag};function Ge(ue={}){return{...ge,...ue}}class Qe{constructor(V=makeValidator()){ae(this,"validators");this.validators=V}async enforce(V){var st,mt,$t,tn,un,Nt,In;function se(ht,Vt,Sn){if(Vt==null)throw new Error(`${ht} must have a value`);let Ln;try{Ln=Sn(Vt)}catch(wt){throw new Error(`${ht} could not be validated, ${wt}`)}if(!Ln){let wt;switch(Sn.name){case"isValidLabelValue":case"isValidObjectName":wt="a string that is sequences of [a-zA-Z0-9] separated by any of [-_.], at most 63 characters in total";break;case"isValidLabelKey":case"isValidApiVersion":case"isValidAnnotationKey":wt="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":wt="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":wt="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":wt="a string";break;case"isValidKind":wt="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":wt="a string that is a valid url";break;case"isValidString":wt="a non empty string";break;default:wt=void 0;break}const zn=wt?` expected ${wt} but found "${Vt}".`:"";throw new Error(`"${ht}" is not valid;${zn} To learn more about catalog file format, visit: https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md`)}}function Te(ht,Vt,Sn){return Vt===void 0||se(ht,Vt,Sn)}se("apiVersion",V.apiVersion,this.validators.isValidApiVersion),se("kind",V.kind,this.validators.isValidKind),se("metadata.name",V.metadata.name,this.validators.isValidEntityName),Te("metadata.namespace",V.metadata.namespace,this.validators.isValidNamespace);for(const[ht,Vt]of Object.entries((st=V.metadata.labels)!=null?st:[]))se(`labels.${ht}`,ht,this.validators.isValidLabelKey),se(`labels.${ht}`,Vt,this.validators.isValidLabelValue);for(const[ht,Vt]of Object.entries((mt=V.metadata.annotations)!=null?mt:[]))se(`annotations.${ht}`,ht,this.validators.isValidAnnotationKey),se(`annotations.${ht}`,Vt,this.validators.isValidAnnotationValue);const $e=($t=V.metadata.tags)!=null?$t:[];for(let ht=0;ht<$e.length;++ht)se(`tags.${ht}`,$e[ht],this.validators.isValidTag);const Ve=(tn=V.metadata.links)!=null?tn:[];for(let ht=0;ht<Ve.length;++ht)se(`links.${ht}.url`,(un=Ve[ht])==null?void 0:un.url,CommonValidatorFunctions.isValidUrl),Te(`links.${ht}.title`,(Nt=Ve[ht])==null?void 0:Nt.title,CommonValidatorFunctions.isValidString),Te(`links.${ht}.icon`,(In=Ve[ht])==null?void 0:In.icon,KubernetesValidatorFunctions.isValidObjectName);return V}}class Ue{constructor(){ae(this,"validate")}async enforce(V){if(!this.validate){const $e=new Ajv({allowUnionTypes:!0});this.validate=$e.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(V)===!0)return V;const[Te]=this.validate.errors||[];throw Te?new Error(`Malformed envelope, ${Te.dataPath||"<root>"} ${Te.message}`):new Error("Malformed envelope, Unknown error")}}function we(ue){var se,Te;const V=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(ue.trim());if(!V)throw new TypeError(`Entity reference "${ue}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:(se=V[1])==null?void 0:se.slice(0,-1),namespace:(Te=V[2])==null?void 0:Te.slice(0,-1),name:V[3]}}function tt(ue){return{kind:ue.kind,namespace:ue.metadata.namespace||t,name:ue.metadata.name}}function dt(ue,V={}){const{kind:se,namespace:Te,name:$e}=je(ue,{defaultNamespace:DEFAULT_NAMESPACE,...V});if(!se)throw new Error(`Entity reference ${Te}/${$e} did not contain a kind`);return{kind:se,namespace:Te,name:$e}}function je(ue,V){var mt,$t,tn,un;if(!ue)throw new Error("Entity reference must not be empty");const se=V==null?void 0:V.defaultKind,Te=(V==null?void 0:V.defaultNamespace)||t;let $e,Ve,st;if(typeof ue=="string"){const Nt=we(ue);$e=(mt=Nt.kind)!=null?mt:se,Ve=($t=Nt.namespace)!=null?$t:Te,st=Nt.name}else $e=(tn=ue.kind)!=null?tn:se,Ve=(un=ue.namespace)!=null?un:Te,st=ue.name;if($e)if(Ve){if(!st){const Nt=JSON.stringify(ue);throw new Error(`Entity reference ${Nt} had missing or empty name`)}}else{const Nt=JSON.stringify(ue);throw new Error(`Entity reference ${Nt} had missing or empty namespace`)}else{const Nt=JSON.stringify(ue);throw new Error(`Entity reference ${Nt} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:$e,namespace:Ve,name:st}}function Et(ue){var $e,Ve;let V,se,Te;return"metadata"in ue?(V=ue.kind,se=($e=ue.metadata.namespace)!=null?$e:t,Te=ue.metadata.name):(V=ue.kind,se=(Ve=ue.namespace)!=null?Ve:t,Te=ue.name),`${V.toLocaleLowerCase("en-US")}:${se.toLocaleLowerCase("en-US")}/${Te.toLocaleLowerCase("en-US")}`}function Bt(ue,V,se){const Te=ue.kind,$e=ue.metadata.namespace||DEFAULT_NAMESPACE,Ve=ue.metadata.name;let st,mt,$t;if(typeof V=="string"){const tn=we(V);st=tn.kind||(se==null?void 0:se.defaultKind),mt=tn.namespace||(se==null?void 0:se.defaultNamespace)||DEFAULT_NAMESPACE,$t=tn.name}else st=V.kind||(se==null?void 0:se.defaultKind),mt=V.namespace||(se==null?void 0:se.defaultNamespace)||DEFAULT_NAMESPACE,$t=V.name;if(!st||!mt)throw new Error("Entity reference or context did not contain kind and namespace");return Te.toLocaleLowerCase("en-US")===st.toLocaleLowerCase("en-US")&&$e.toLocaleLowerCase("en-US")===mt.toLocaleLowerCase("en-US")&&Ve.toLocaleLowerCase("en-US")===$t.toLocaleLowerCase("en-US")}var Tt=e(48834).Buffer;function gt(){return uuidv4()}function yt(){return Tt.from(uuidv4(),"utf8").toString("base64").replace(/[^\w]/g,"")}function rt(ue,V){const se=lodash.cloneDeep(ue),Te=lodash.cloneDeep(V);return se.metadata.labels||(se.metadata.labels={}),Te.metadata.labels||(Te.metadata.labels={}),se.metadata.annotations||(se.metadata.annotations={}),Te.metadata.annotations||(Te.metadata.annotations={}),se.metadata.tags||(se.metadata.tags=[]),Te.metadata.tags||(Te.metadata.tags=[]),delete se.metadata.uid,delete se.metadata.etag,delete se.metadata.generation,delete Te.metadata.uid,delete Te.metadata.etag,delete Te.metadata.generation,delete se.relations,delete se.status,delete Te.relations,delete Te.status,!lodash.isEqual(se,Te)}function pt(ue,V){const{uid:se,etag:Te,generation:$e}=ue.metadata;if(!se||!Te||!$e)throw new Error("Previous entity must have uid, etag and generation");const Ve=lodash.cloneDeep(V),st=rt(ue,Ve),mt=!lodash.isEqual(ue.spec,Ve.spec);return Ve.metadata.uid=se,Ve.metadata.etag=st?yt():Te,Ve.metadata.generation=mt?$e+1:$e,Ve}class Pt{constructor(V){this.policies=V}async enforce(V){let se=V;for(const Te of this.policies){const $e=await Te.enforce(se);if(!$e)throw new Error(`Policy ${Te.constructor.name} did not return a result`);se=$e}return se}}class xt{constructor(V){this.policies=V}async enforce(V){for(const se of this.policies){const Te=await se.enforce(V);if(Te)return Te}throw new Error("The entity did not match any known policy")}}const Dt={allOf(ue){return new Pt(ue)},oneOf(ue){return new xt(ue)}};var bt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ApiV1alpha1","description":"An API describes an interface that can be exposed by a component. The API can be defined in different formats, like OpenAPI, AsyncAPI, GraphQL, gRPC, or other formats.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"API","metadata":{"name":"artist-api","description":"Retrieve artist details","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"openapi","lifecycle":"production","owner":"artist-relations-team","system":"artist-engagement-portal","definition":"openapi: \\"3.0.0\\"\\ninfo:..."}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["API"]},"spec":{"type":"object","required":["type","lifecycle","owner","definition"],"properties":{"type":{"type":"string","description":"The type of the API definition.","examples":["openapi","asyncapi","graphql","grpc"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the API.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the API.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the API belongs to.","minLength":1},"definition":{"type":"string","description":"The definition of the API, based on the format defined by the type.","minLength":1}}}}}]}');function et(ue){const V=Ee(ue);return{async check(se){return V(se)===se}}}const Ce=et(bt);var ot=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ComponentV1alpha1","description":"A Component describes a software component. It is typically intimately linked to the source code that constitutes the component, and should be what a developer may regard a \\"unit of software\\", usually with a distinct deployable or linkable artifact.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Component"]},"spec":{"type":"object","required":["type","lifecycle","owner"],"properties":{"type":{"type":"string","description":"The type of component.","examples":["service","website","library"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the component.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the component belongs to.","minLength":1},"subcomponentOf":{"type":"string","description":"An entity reference to another component of which the component is a part.","minLength":1},"providesApis":{"type":"array","description":"An array of entity references to the APIs that are provided by the component.","items":{"type":"string","minLength":1}},"consumesApis":{"type":"array","description":"An array of entity references to the APIs that are consumed by the component.","items":{"type":"string","minLength":1}},"dependsOn":{"type":"array","description":"An array of references to other entities that the component depends on to function.","items":{"type":"string","minLength":1}}}}}}]}');const nt=et(ot);var vt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"DomainV1alpha1","description":"A Domain groups a collection of systems that share terminology, domain models, business purpose, or documentation, i.e. form a bounded context.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Domain","metadata":{"name":"artists","description":"Everything about artists"},"spec":{"owner":"artist-relations-team"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Domain"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1}}}}}]}');const it=et(vt);var At=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"GroupV1alpha1","description":"A group describes an organizational entity, such as for example a team, a business unit, or a loose collection of people in an interest group. Members of these groups are modeled in the catalog as kind User.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Group","metadata":{"name":"infrastructure","description":"The infra business unit"},"spec":{"type":"business-unit","profile":{"displayName":"Infrastructure","email":"infrastructure@example.com","picture":"https://example.com/groups/bu-infrastructure.jpeg"},"parent":"ops","children":["backstage","other"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Group"]},"spec":{"type":"object","required":["type","children"],"properties":{"type":{"type":"string","description":"The type of group. There is currently no enforced set of values for this field, so it is left up to the adopting organization to choose a nomenclature that matches their org hierarchy.","examples":["team","business-unit","product-area","root"],"minLength":1},"profile":{"type":"object","description":"Optional profile information about the group, mainly for display purposes. All fields of this structure are also optional. The email would be a group email of some form, that the group may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the group, and that a browser could fetch and render on a group page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Infrastructure"],"minLength":1},"email":{"type":"string","description":"An email where this entity can be reached.","examples":["infrastructure@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this entity.","examples":["https://example.com/groups/bu-infrastructure.jpeg"],"minLength":1}}},"parent":{"type":"string","description":"The immediate parent group in the hierarchy, if any. Not all groups must have a parent; the catalog supports multi-root hierarchies. Groups may however not have more than one parent. This field is an entity reference.","examples":["ops"],"minLength":1},"children":{"type":"array","description":"The immediate child groups of this group in the hierarchy (whose parent field points to this group). The list must be present, but may be empty if there are no child groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["backstage","other"],"minLength":1}},"members":{"type":"array","description":"The users that are members of this group. The entries of this array are entity references.","items":{"type":"string","examples":["jdoe"],"minLength":1}}}}}}]}`);const B=et(At);var R=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"LocationV1alpha1","description":"A location is a marker that references other places to look for catalog data.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Location","metadata":{"name":"org-data"},"spec":{"type":"url","targets":["http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-consultants.yaml"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Location"]},"spec":{"type":"object","required":[],"properties":{"type":{"type":"string","description":"The single location type, that's common to the targets specified in the spec. If it is left out, it is inherited from the location type that originally read the entity data.","examples":["url"],"minLength":1},"target":{"type":"string","description":"A single target as a string. Can be either an absolute path/URL (depending on the type), or a relative path such as ./details/catalog-info.yaml which is resolved relative to the location of this Location entity itself.","examples":["./details/catalog-info.yaml"],"minLength":1},"targets":{"type":"array","description":"A list of targets as strings. They can all be either absolute paths/URLs (depending on the type), or relative paths such as ./details/catalog-info.yaml which are resolved relative to the location of this Location entity itself.","items":{"type":"string","examples":["./details/catalog-info.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml"],"minLength":1}},"presence":{"type":"string","description":"Whether the presence of the location target is required and it should be considered an error if it can not be found","default":"required","examples":["required"],"enum":["required","optional"]}}}}}]}`);const P=et(R),K="ownedBy",W="ownerOf",ne="consumesApi",ye="apiConsumedBy",ve="providesApi",Me="apiProvidedBy",Ne="dependsOn",Re="dependencyOf",pe="parentOf",xe="childOf",ft="memberOf",lt="hasMember",ze="partOf",le="hasPart";var Ze=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ResourceV1alpha1","description":"A resource describes the infrastructure a system needs to operate, like BigTable databases, Pub/Sub topics, S3 buckets or CDNs. Modelling them together with components and systems allows to visualize resource footprint, and create tooling around them.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Resource","metadata":{"name":"artists-db","description":"Stores artist details"},"spec":{"type":"database","owner":"artist-relations-team","system":"artist-engagement-portal"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Resource"]},"spec":{"type":"object","required":["type","owner"],"properties":{"type":{"type":"string","description":"The type of resource.","examples":["database","s3-bucket","cluster"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the resource.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"dependsOn":{"type":"array","description":"An array of references to other entities that the resource depends on to function.","items":{"type":"string","minLength":1}},"system":{"type":"string","description":"An entity reference to the system that the resource belongs to.","minLength":1}}}}}]}');const Ke=et(Ze);var Xe=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"SystemV1alpha1","description":"A system is a collection of resources and components. The system may expose or consume one or several APIs. It is viewed as abstraction level that provides potential consumers insights into exposed features without needing a too detailed view into the details of all components. This also gives the owning team the possibility to decide about published artifacts and APIs.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"System","metadata":{"name":"artist-engagement-portal","description":"Handy tools to keep artists in the loop"},"spec":{"owner":"artist-relations-team","domain":"artists"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["System"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"domain":{"type":"string","description":"An entity reference to the domain that the system belongs to.","examples":["artists"],"minLength":1}}}}}]}');const ke=et(Xe);var We=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"UserV1alpha1","description":"A user describes a person, such as an employee, a contractor, or similar. Users belong to Group entities in the catalog. These catalog user entries are connected to the way that authentication within the Backstage ecosystem works. See the auth section of the docs for a discussion of these concepts.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"User","metadata":{"name":"jdoe"},"spec":{"profile":{"displayName":"Jenny Doe","email":"jenny-doe@example.com","picture":"https://example.com/staff/jenny-with-party-hat.jpeg"},"memberOf":["team-b","employees"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["User"]},"spec":{"type":"object","required":["memberOf"],"properties":{"profile":{"type":"object","description":"Optional profile information about the user, mainly for display purposes. All fields of this structure are also optional. The email would be a primary email of some form, that the user may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the user, and that a browser could fetch and render on a profile page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Jenny Doe"],"minLength":1},"email":{"type":"string","description":"An email where this user can be reached.","examples":["jenny-doe@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this user.","examples":["https://example.com/staff/jenny-with-party-hat.jpeg"],"minLength":1}}},"memberOf":{"type":"array","description":"The list of groups that the user is a direct member of (i.e., no transitive memberships are listed here). The list must be present, but may be empty if the user is not member of any groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["team-b","employees"],"minLength":1}}}}}}]}`);const w=et(We),E="backstage.io/managed-by-location",M="backstage.io/managed-by-origin-location",Y="backstage.io/source-location",te="backstage.io/managed-by-location",be="backstage.io/managed-by-origin-location",he="backstage.io/source-location";function Fe(ue){return De(ue)}function De(ue){if(typeof ue!="string")throw new TypeError(`Unable to parse location ref '${ue}', unexpected argument ${typeof ue}`);const V=ue.indexOf(":");if(V<0)throw new TypeError(`Unable to parse location ref '${ue}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const se=ue.substring(0,V).trim(),Te=ue.substring(V+1).trim();if(!se||!Te)throw new TypeError(`Unable to parse location ref '${ue}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(se==="http"||se==="https")throw new TypeError(`Invalid location ref '${ue}', please prefix it with 'url:', e.g. 'url:${ue}'`);return{type:se,target:Te}}function qe(ue){return _e(ue)}function _e(ue){const{type:V,target:se}=ue;if(V){if(!se)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${V}:${se}`}function Rt(ue){var se,Te,$e,Ve,st;const V=(st=(Te=(se=ue.metadata)==null?void 0:se.annotations)==null?void 0:Te[ANNOTATION_SOURCE_LOCATION])!=null?st:(Ve=($e=ue.metadata)==null?void 0:$e.annotations)==null?void 0:Ve[ANNOTATION_LOCATION];if(!V)throw new Error(`Entity '${stringifyEntityRef(ue)}' is missing location`);return De(V)}},23235:function(_,s,e){"use strict";e.d(s,{C:function(){return t}});var a=e(98005);class t{constructor(){ae(this,"subject",new a.J)}post(f){this.subject.next(f)}alert$(){return this.subject}}},47150:function(_,s,e){"use strict";e.d(s,{g:function(){return a}});class a{captureEvent(c){}}},58652:function(_,s,e){"use strict";e.d(s,{C:function(){return c}});var a=e(98005);const t="theme";class c{constructor(y){ae(this,"activeThemeId");ae(this,"subject",new a.X(void 0));this.themes=y}static createWithStorage(y){var p;const i=new c(y);if(!window.localStorage)return i;const v=(p=window.localStorage.getItem(t))!=null?p:void 0;return i.setActiveThemeId(v),i.activeThemeId$().subscribe(m=>{m?window.localStorage.setItem(t,m):window.localStorage.removeItem(t)}),window.addEventListener("storage",m=>{var l;if(m.key===t){const r=(l=localStorage.getItem(t))!=null?l:void 0;i.setActiveThemeId(r)}}),i}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(y){this.activeThemeId=y,this.subject.next(y)}}},14721:function(_,s,e){"use strict";e.d(s,{m:function(){return m}});var a=e(9850),t=e.n(a),c=e(12782),f=e.n(c);const y=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function i(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)}function v(l){if(l===null)return"null";if(Array.isArray(l))return"array";const r=typeof l;return r==="number"&&isNaN(l)?"nan":r==="string"&&l===""?"empty-string":r}const p={type(l,r,A,T){return`Invalid type in config for key '${l}' in '${r}', got ${A}, wanted ${T}`},missing(l){return`Missing required config value at '${l}'`},convert(l,r,A){return`Unable to convert config value for key '${l}' in '${r}' to a ${A}`}};class m{constructor(r,A="mock-config",T,Z=""){ae(this,"filteredKeys");ae(this,"notifiedFilteredKeys",new Set);this.data=r,this.context=A,this.fallback=T,this.prefix=Z}static fromConfigs(r){return r.length===0?new m(void 0):r.reduce((A,{data:T,context:Z,filteredKeys:O,deprecatedKeys:q})=>{const $=new m(T,Z,A);if($.filteredKeys=O,q)for(const{key:x,description:b}of q)console.warn(`The configuration key '${x}' of ${Z} is deprecated and may be removed soon. ${b||""}`);return $},void 0)}has(r){var T,Z;return this.readValue(r)!==void 0?!0:(Z=(T=this.fallback)==null?void 0:T.has(r))!=null?Z:!1}keys(){var T,Z;const r=this.data?Object.keys(this.data):[],A=(Z=(T=this.fallback)==null?void 0:T.keys())!=null?Z:[];return[...new Set([...r,...A])]}get(r){const A=this.getOptional(r);if(A===void 0)throw new Error(p.missing(this.fullKey(r!=null?r:"")));return A}getOptional(r){var Z;const A=t()(this.readValue(r)),T=(Z=this.fallback)==null?void 0:Z.getOptional(r);return A===void 0?T:T===void 0?A:f()({},{value:T},{value:A},(O,q)=>!i(q)||!i(O)?q:void 0).value}getConfig(r){const A=this.getOptionalConfig(r);if(A===void 0)throw new Error(p.missing(this.fullKey(r)));return A}getOptionalConfig(r){var Z;const A=this.readValue(r),T=(Z=this.fallback)==null?void 0:Z.getOptionalConfig(r);if(i(A))return this.copy(A,r,T);if(A!==void 0)throw new TypeError(p.type(this.fullKey(r),this.context,v(A),"object"));return T}getConfigArray(r){const A=this.getOptionalConfigArray(r);if(A===void 0)throw new Error(p.missing(this.fullKey(r)));return A}getOptionalConfigArray(r){const A=this.readConfigValue(r,T=>{if(!Array.isArray(T))return{expected:"object-array"};for(const[Z,O]of T.entries())if(!i(O))return{expected:"object-array",value:O,key:`${r}[${Z}]`};return!0});if(!!A)return A.map((T,Z)=>this.copy(T,`${r}[${Z}]`))}getNumber(r){const A=this.getOptionalNumber(r);if(A===void 0)throw new Error(p.missing(this.fullKey(r)));return A}getOptionalNumber(r){const A=this.readConfigValue(r,Z=>typeof Z=="number"||typeof Z=="string"||{expected:"number"});if(typeof A=="number"||A===void 0)return A;const T=Number(A);if(!Number.isFinite(T))throw new Error(p.convert(this.fullKey(r),this.context,"number"));return T}getBoolean(r){const A=this.getOptionalBoolean(r);if(A===void 0)throw new Error(p.missing(this.fullKey(r)));return A}getOptionalBoolean(r){return this.readConfigValue(r,A=>typeof A=="boolean"||{expected:"boolean"})}getString(r){const A=this.getOptionalString(r);if(A===void 0)throw new Error(p.missing(this.fullKey(r)));return A}getOptionalString(r){return this.readConfigValue(r,A=>typeof A=="string"&&A!==""||{expected:"string"})}getStringArray(r){const A=this.getOptionalStringArray(r);if(A===void 0)throw new Error(p.missing(this.fullKey(r)));return A}getOptionalStringArray(r){return this.readConfigValue(r,A=>{if(!Array.isArray(A))return{expected:"string-array"};for(const[T,Z]of A.entries())if(typeof Z!="string"||Z==="")return{expected:"string-array",value:Z,key:`${r}[${T}]`};return!0})}fullKey(r){return`${this.prefix}${this.prefix?".":""}${r}`}copy(r,A,T){const Z=new m(r,this.context,T,this.fullKey(A));return Z.filteredKeys=this.filteredKeys,Z}readConfigValue(r,A){var O;const T=this.readValue(r);if(T===void 0)return(O=this.fallback)==null?void 0:O.readConfigValue(r,A);const Z=A(T);if(Z!==!0){const{key:q=r,value:$=T,expected:x}=Z;throw new TypeError(p.type(this.fullKey(q),this.context,v($),x))}return T}readValue(r){const A=r?r.split("."):[];for(const Z of A)if(!y.test(Z))throw new TypeError(`Invalid config key '${r}'`);if(this.data===void 0)return;let T=this.data;for(const[Z,O]of A.entries())if(i(T))T=T[O];else if(T!==void 0){const q=this.fullKey(A.slice(0,Z).join("."));throw new TypeError(p.type(q,this.context,v(T),"object"))}return T}}},4333:function(_,s,e){"use strict";e.d(s,{p:function(){return t}});const a="Invalid discovery URL pattern,";class t{static compile(f){const y=f.split(/\{\{\s*pluginId\s*\}\}/),i=y.join("pluginId");let v;try{v=new URL(i)}catch{throw new Error(`${a} URL '${i}' is invalid`)}if(v.hash)throw new Error(`${a} URL must not have a hash`);if(v.search)throw new Error(`${a} URL must not have a query`);if(i.endsWith("/"))throw new Error(`${a} URL must not end with a slash`);return new t(y)}constructor(f){this.parts=f}async getBaseUrl(f){return this.parts.join(f)}}},89536:function(_,s,e){"use strict";e.d(s,{KN:function(){return a},gr:function(){return c},Jv:function(){return f}});class a{constructor(i,v){this.alertApi=i,this.errorApi=v}post(i,v){return(v==null?void 0:v.hidden)||this.alertApi.post({message:i.message,severity:"error"}),this.errorApi.post(i,v)}error$(){return this.errorApi.error$()}}var t=e(98005);class c{constructor(){ae(this,"subject",new t.J)}post(i,v){this.subject.next({error:i,context:v})}error$(){return this.subject}}class f{static forward(i,v){window.addEventListener("unhandledrejection",p=>{i.post(p.reason,v)})}}},14884:function(_,s,e){"use strict";e.d(s,{b:function(){return c}});var a=e(36964);function t(f){if(f.length<3)throw new Error(`The '${f}' feature flag must have a minimum length of three characters.`);if(f.length>150)throw new Error(`The '${f}' feature flag must not exceed 150 characters.`);if(!f.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${f}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class c{constructor(){ae(this,"registeredFeatureFlags",[]);ae(this,"flags")}registerFlag(y){t(y.name),this.registeredFeatureFlags.push(y)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(y){return this.flags||(this.flags=this.load()),this.flags.get(y)===a.FeatureFlagState.Active}save(y){this.flags||(this.flags=this.load()),y.merge||this.flags.clear();for(const[v,p]of Object.entries(y.states))this.flags.set(v,p);const i=Array.from(this.flags.entries()).filter(([,v])=>v===a.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(i)))}load(){try{const y=window.localStorage.getItem("featureFlags");if(!y)return new Map;const i=JSON.parse(y);if(typeof i!="object"||i===null||Array.isArray(i))return new Map;const v=Object.entries(i).filter(([p,m])=>(t(p),m===a.FeatureFlagState.Active));return new Map(v)}catch{return new Map}}}},50160:function(_,s,e){"use strict";e.d(s,{I:function(){return v},j:function(){return a}});function a(p){var r;let m=p.baseImplementation||e.g.fetch;const l=[(r=p.middleware)!=null?r:[]].flat().reverse();for(const A of l)m=A.apply(m);return{fetch:m}}class t{static create(m){var T,Z;const l=c(m),r=((T=m.header)==null?void 0:T.name)||"authorization",A=((Z=m.header)==null?void 0:Z.value)||(O=>`Bearer ${O}`);return new t(m.identityApi,l,r,A)}constructor(m,l,r,A){this.identityApi=m,this.allowUrl=l,this.headerName=r,this.headerValue=A}apply(m){return async(l,r)=>{const A=new Request(l,r),{token:T}=await this.identityApi.getCredentials();return A.headers.get(this.headerName)||typeof T!="string"||!T||!this.allowUrl(A.url)?m(l,r):(A.headers.set(this.headerName,this.headerValue(T)),m(A))}}}function c(p){return p.allowUrl?p.allowUrl:p.urlPrefixAllowlist?f(p.urlPrefixAllowlist):p.config?f([p.config.getString("backend.baseUrl")]):()=>!1}function f(p){const m=p.map(l=>l.replace(/\/$/,""));return l=>m.some(r=>l===r||l.startsWith(`${r}/`))}function y(p,m){return!m||m==="/"?p:`${p.replace(/\/$/,"")}/${m.replace(/^\//,"")}`}class i{constructor(m){this.discoveryApi=m}apply(m){return async(l,r)=>{const A=new Request(l,r),T="plugin://";if(!A.url.startsWith(T))return m(l,r);const{hostname:Z,pathname:O,search:q,hash:$,username:x,password:b}=new URL(`http://${A.url.substring(T.length)}`);let D=await this.discoveryApi.getBaseUrl(Z);if(x||b){const ee=new URL(D),ce=`${x}${b?`:${b}`:""}@`;D=`${ee.protocol}//${ce}${ee.host}${ee.pathname}`}const j=`${y(D,O)}${q}${$}`;return m(j,A)}}}class v{static resolvePluginProtocol(m){return new i(m.discoveryApi)}static injectIdentityAuth(m){return t.create(m)}constructor(){}}},11358:function(_,s,e){"use strict";e.d(s,{Y:function(){return y}});var a=e(98005);function t(i,v){for(const p of v)if(!i.has(p))return!1;return!0}function c(i,...v){const p=new Set(i);for(const m of v)for(const l of m)p.add(l);return p}class f{constructor(){ae(this,"requests",[]);ae(this,"subject",new a.X(this.getCurrentPending()))}request(v){return new Promise((p,m)=>{this.requests.push({scopes:v,resolve:p,reject:m}),this.subject.next(this.getCurrentPending())})}resolve(v,p){this.requests=this.requests.filter(m=>t(v,m.scopes)?(m.resolve(p),!1):!0),this.subject.next(this.getCurrentPending())}reject(v){this.requests.forEach(p=>p.reject(v)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const v=this.requests.length===0?void 0:this.requests.slice(1).reduce((p,m)=>c(p,m.scopes),this.requests[0].scopes);return{scopes:v,resolve:p=>{v&&this.resolve(v,p)},reject:p=>{v&&this.reject(p)}}}}class y{constructor(){ae(this,"subject",new a.X([]));ae(this,"currentRequests",[]);ae(this,"handlerCount",0)}createAuthRequester(v){v.provider.id||console.warn("DEPRECATION WARNING: Not passing a provider id to createAuthRequester is deprecated, it will be required in the future");const p=new f,m=this.handlerCount;return this.handlerCount++,p.pending().subscribe({next:l=>{const r=this.currentRequests.slice(),A=this.makeAuthRequest(l,v);A?r[m]=A:delete r[m],this.currentRequests=r,this.subject.next(r.filter(Boolean))}}),l=>p.request(l)}makeAuthRequest(v,p){const{scopes:m}=v;if(!!m)return{provider:p.provider,trigger:async()=>{const l=await p.onAuthRequest(m);v.resolve(l)},reject:()=>{const l=new Error("Login failed, rejected by user");l.name="RejectedError",v.reject(l)}}}authRequest$(){return this.subject}}},56054:function(_,s,e){"use strict";e.d(s,{C:function(){return f}});var a=e(82394),t=e.n(a);const c=new Map;class f{constructor(i,v){ae(this,"subscribers",new Set);ae(this,"observable",new(t())(i=>(this.subscribers.add(i),()=>{this.subscribers.delete(i)})));this.namespace=i,this.errorApi=v}static create(i){var v;return new f((v=i.namespace)!=null?v:"",i.errorApi)}get(i){return this.snapshot(i).value}snapshot(i){let v,p="absent";try{const m=localStorage.getItem(this.getKeyName(i));m&&(v=JSON.parse(m,(l,r)=>(typeof r=="object"&&r!==null&&Object.freeze(r),r)),p="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${i}`))}return{key:i,value:v,newValue:v,presence:p}}forBucket(i){const v=`${this.namespace}/${i}`;return c.has(v)||c.set(v,new f(v,this.errorApi)),c.get(v)}async set(i,v){localStorage.setItem(this.getKeyName(i),JSON.stringify(v)),this.notifyChanges(i)}async remove(i){localStorage.removeItem(this.getKeyName(i)),this.notifyChanges(i)}observe$(i){return this.observable.filter(({key:v})=>v===i)}getKeyName(i){return`${this.namespace}/${encodeURIComponent(i)}`}notifyChanges(i){const v=this.snapshot(i);for(const p of this.subscribers)p.next(v)}}},59589:function(_,s,e){"use strict";e.d(s,{u:function(){return c}});var a=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class c{static create(y){const{discoveryApi:i,environment:v="development",provider:p=t,oauthRequestApi:m}=y;return a.OAuth2.create({discoveryApi:i,oauthRequestApi:m,provider:p,environment:v})}}},92293:function(_,s,e){"use strict";e.d(s,{Z:function(){return c}});var a=e(91205);const t={id:"auth0",title:"Auth0",icon:()=>null};class c{static create(y){const{discoveryApi:i,environment:v="development",provider:p=t,oauthRequestApi:m,defaultScopes:l=["openid","email","profile"]}=y;return a.OAuth2.create({discoveryApi:i,oauthRequestApi:m,provider:p,environment:v,defaultScopes:l})}}},6098:function(_,s,e){"use strict";e.d(s,{Z:function(){return c}});var a=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class c{static create(y){const{discoveryApi:i,environment:v="development",provider:p=t,oauthRequestApi:m,defaultScopes:l=["team"]}=y;return a.OAuth2.create({discoveryApi:i,oauthRequestApi:m,provider:p,environment:v,defaultScopes:l})}}},44431:function(_,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return c.Z}});var a=e(19347),t=e.n(a);e.o(a,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return a.AlertApiForwarder}}),e.o(a,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return a.AppThemeSelector}}),e.o(a,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return a.AtlassianAuth}}),e.o(a,"ConfigReader")&&e.d(s,{ConfigReader:function(){return a.ConfigReader}}),e.o(a,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return a.ErrorAlerter}}),e.o(a,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return a.ErrorApiForwarder}}),e.o(a,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return a.FetchMiddlewares}}),e.o(a,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return a.FlatRoutes}}),e.o(a,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return a.LocalStorageFeatureFlags}}),e.o(a,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return a.NoOpAnalyticsApi}}),e.o(a,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return a.OAuthRequestManager}}),e.o(a,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return a.UnhandledErrorForwarder}}),e.o(a,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return a.UrlPatternDiscovery}}),e.o(a,"WebStorage")&&e.d(s,{WebStorage:function(){return a.WebStorage}}),e.o(a,"createFetchApi")&&e.d(s,{createFetchApi:function(){return a.createFetchApi}}),e.o(a,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return a.createSpecializedApp}}),e.o(a,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return a.defaultConfigLoader}});var c=e(6098)},19347:function(){},44474:function(_,s,e){"use strict";e.d(s,{T:function(){return c}});var a=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class c{static create(y){const{discoveryApi:i,environment:v="development",provider:p=t,oauthRequestApi:m,defaultScopes:l=["read:user"]}=y;return a.OAuth2.create({discoveryApi:i,oauthRequestApi:m,provider:p,environment:v,defaultScopes:l})}static normalizeScope(y){if(!y)return new Set;const i=Array.isArray(y)?y:y.split(/[\s|,]/).filter(Boolean);return new Set(i)}}},2922:function(_,s,e){"use strict";e.d(s,{a:function(){return c}});var a=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class c{static create(y){const{discoveryApi:i,environment:v="development",provider:p=t,oauthRequestApi:m,defaultScopes:l=["read_user"]}=y;return a.OAuth2.create({discoveryApi:i,oauthRequestApi:m,provider:p,environment:v,defaultScopes:l})}}},59938:function(_,s,e){"use strict";e.d(s,{e:function(){return f}});var a=e(91205);const t={id:"google",title:"Google",icon:()=>null},c="https://www.googleapis.com/auth/";class f{static create(i){const{discoveryApi:v,oauthRequestApi:p,environment:m="development",provider:l=t,defaultScopes:r=["openid",`${c}userinfo.email`,`${c}userinfo.profile`]}=i;return a.OAuth2.create({discoveryApi:v,oauthRequestApi:p,provider:l,environment:m,defaultScopes:r,scopeTransform(A){return A.map(T=>T==="openid"?T:T==="profile"||T==="email"?`${c}userinfo.${T}`:T.startsWith(c)?T:`${c}${T}`)}})}}},91668:function(_,s,e){"use strict";e.d(s,{GithubAuth:function(){return a.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return c.e},OAuth2:function(){return f.OAuth2},OktaAuth:function(){return y.s},SamlAuth:function(){return i.n},Auth0Auth:function(){return v.Z},MicrosoftAuth:function(){return p._},OneLoginAuth:function(){return m.$},BitbucketAuth:function(){return l.BitbucketAuth},AtlassianAuth:function(){return r.u}});var a=e(44474),t=e(2922),c=e(59938),f=e(91205);e.o(f,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"Auth0Auth")&&e.d(s,{Auth0Auth:function(){return f.Auth0Auth}}),e.o(f,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return f.BitbucketAuth}}),e.o(f,"ConfigReader")&&e.d(s,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return f.MicrosoftAuth}}),e.o(f,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"OktaAuth")&&e.d(s,{OktaAuth:function(){return f.OktaAuth}}),e.o(f,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return f.OneLoginAuth}}),e.o(f,"SamlAuth")&&e.d(s,{SamlAuth:function(){return f.SamlAuth}}),e.o(f,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(s,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(s,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return f.defaultConfigLoader}});var y=e(26079),i=e(67578),v=e(92293),p=e(38482),m=e(58381),l=e(44431);e.o(l,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return l.AlertApiForwarder}}),e.o(l,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return l.AppThemeSelector}}),e.o(l,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return l.AtlassianAuth}}),e.o(l,"ConfigReader")&&e.d(s,{ConfigReader:function(){return l.ConfigReader}}),e.o(l,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return l.ErrorAlerter}}),e.o(l,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return l.ErrorApiForwarder}}),e.o(l,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return l.FetchMiddlewares}}),e.o(l,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return l.FlatRoutes}}),e.o(l,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return l.LocalStorageFeatureFlags}}),e.o(l,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return l.NoOpAnalyticsApi}}),e.o(l,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return l.OAuthRequestManager}}),e.o(l,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return l.UnhandledErrorForwarder}}),e.o(l,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return l.UrlPatternDiscovery}}),e.o(l,"WebStorage")&&e.d(s,{WebStorage:function(){return l.WebStorage}}),e.o(l,"createFetchApi")&&e.d(s,{createFetchApi:function(){return l.createFetchApi}}),e.o(l,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return l.createSpecializedApp}}),e.o(l,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return l.defaultConfigLoader}});var r=e(59589)},38482:function(_,s,e){"use strict";e.d(s,{_:function(){return c}});var a=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class c{static create(y){const{environment:i="development",provider:v=t,oauthRequestApi:p,discoveryApi:m,defaultScopes:l=["openid","offline_access","profile","email","User.Read"]}=y;return a.OAuth2.create({discoveryApi:m,oauthRequestApi:p,provider:v,environment:i,defaultScopes:l})}}},15104:function(_,s,e){"use strict";e.d(s,{Z:function(){return i}});var a=e(17678);function t(v){return[...v].join(" ")}class c{constructor(p){ae(this,"discoveryApi");ae(this,"environment");ae(this,"provider");ae(this,"joinScopesFunc");ae(this,"authRequester");ae(this,"sessionTransform");const{discoveryApi:m,environment:l,provider:r,joinScopes:A=t,oauthRequestApi:T,sessionTransform:Z=O=>O}=p;this.authRequester=T.createAuthRequester({provider:r,onAuthRequest:O=>this.showPopup(O)}),this.discoveryApi=m,this.environment=l,this.provider=r,this.joinScopesFunc=A,this.sessionTransform=Z}async createSession(p){return p.instantPopup?this.showPopup(p.scopes):this.authRequester(p.scopes)}async refreshSession(){const p=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(l=>{throw new Error(`Auth refresh request failed, ${l}`)});if(!p.ok){const l=new Error(`Auth refresh request failed, ${p.statusText}`);throw l.status=p.status,l}const m=await p.json();if(m.error){const l=new Error(m.error.message);throw m.error.name&&(l.name=m.error.name),l}return await this.sessionTransform(m)}async removeSession(){const p=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(m=>{throw new Error(`Logout request failed, ${m}`)});if(!p.ok){const m=new Error(`Logout request failed, ${p.statusText}`);throw m.status=p.status,m}}async showPopup(p){const m=this.joinScopesFunc(p),l=await this.buildUrl("/start",{scope:m,origin:location.origin}),r=await(0,a.d)({url:l,name:`${this.provider.title} Login`,origin:new URL(l).origin,width:450,height:730});return await this.sessionTransform(r)}async buildUrl(p,m){const l=await this.discoveryApi.getBaseUrl("auth"),r=this.buildQueryString({...m,env:this.environment});return`${l}/${this.provider.id}${p}${r}`}buildQueryString(p){if(!p)return"";const m=Object.entries(p).map(([l,r])=>{if(typeof r=="string")return`${encodeURIComponent(l)}=${encodeURIComponent(r)}`;if(r)return encodeURIComponent(l)}).filter(Boolean).join("&");return m?`?${m}`:""}}var f=e(55274);const y={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class i{constructor(p){ae(this,"sessionManager");ae(this,"scopeTransform");this.sessionManager=p.sessionManager,this.scopeTransform=p.scopeTransform}static create(p){const{discoveryApi:m,environment:l="development",provider:r=y,oauthRequestApi:A,defaultScopes:T=[],scopeTransform:Z=$=>$}=p,O=new c({discoveryApi:m,environment:l,provider:r,oauthRequestApi:A,sessionTransform($){return{...$,providerInfo:{idToken:$.providerInfo.idToken,accessToken:$.providerInfo.accessToken,scopes:i.normalizeScopes(Z,$.providerInfo.scope),expiresAt:new Date(Date.now()+$.providerInfo.expiresInSeconds*1e3)}}}}),q=new f.RefreshingAuthSessionManager({connector:O,defaultScopes:new Set(T),sessionScopes:$=>$.providerInfo.scopes,sessionShouldRefresh:$=>($.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new i({sessionManager:q,scopeTransform:Z})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(p,m){var A;const l=i.normalizeScopes(this.scopeTransform,p),r=await this.sessionManager.getSession({...m,scopes:l});return(A=r==null?void 0:r.providerInfo.accessToken)!=null?A:""}async getIdToken(p={}){var l;const m=await this.sessionManager.getSession(p);return(l=m==null?void 0:m.providerInfo.idToken)!=null?l:""}async getBackstageIdentity(p={}){const m=await this.sessionManager.getSession(p);return m==null?void 0:m.backstageIdentity}async getProfile(p={}){const m=await this.sessionManager.getSession(p);return m==null?void 0:m.profile}static normalizeScopes(p,m){if(!m)return new Set;const l=Array.isArray(m)?m:m.split(/[\s|,]/).filter(Boolean);return new Set(p(l))}}},91205:function(_,s,e){"use strict";e.d(s,{OAuth2:function(){return a.Z}});var a=e(15104),t=e(5973),c=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"Auth0Auth")&&e.d(s,{Auth0Auth:function(){return t.Auth0Auth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(s,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"SamlAuth")&&e.d(s,{SamlAuth:function(){return t.SamlAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(s,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(s,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(_,s,e){"use strict";e.d(s,{s:function(){return y}});var a=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="okta.";class y{static create(v){const{discoveryApi:p,environment:m="development",provider:l=t,oauthRequestApi:r,defaultScopes:A=["openid","email","profile","offline_access"]}=v;return a.OAuth2.create({discoveryApi:p,oauthRequestApi:r,provider:l,environment:m,defaultScopes:A,scopeTransform(T){return T.map(Z=>c.has(Z)||Z.startsWith(f)?Z:`${f}${Z}`)}})}}},58381:function(_,s,e){"use strict";e.d(s,{$:function(){return y}});var a=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="onelogin.";class y{static create(v){const{discoveryApi:p,environment:m="development",provider:l=t,oauthRequestApi:r}=v;return a.OAuth2.create({discoveryApi:p,oauthRequestApi:r,provider:l,environment:m,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(A){return A.map(T=>c.has(T)||T.startsWith(f)?T:`${f}${T}`)}})}}},67578:function(_,s,e){"use strict";e.d(s,{n:function(){return v}});var a=e(17678);class t{constructor(m){ae(this,"discoveryApi");ae(this,"environment");ae(this,"provider");const{discoveryApi:l,environment:r,provider:A}=m;this.discoveryApi=l,this.environment=r,this.provider=A}async createSession(){const m=await this.buildUrl("/start"),l=await(0,a.d)({url:m,name:`${this.provider.title} Login`,origin:new URL(m).origin,width:450,height:730});return{...l,id:l.profile.email}}async refreshSession(){}async removeSession(){const m=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(l=>{throw new Error(`Logout request failed, ${l}`)});if(!m.ok){const l=new Error(`Logout request failed, ${m.statusText}`);throw l.status=m.status,l}}async buildUrl(m){return`${await this.discoveryApi.getBaseUrl("auth")}/${this.provider.id}${m}?env=${this.environment}`}}var c=e(55274),f=e(30195);const y=f.z.object({profile:f.z.object({email:f.z.string().optional(),displayName:f.z.string().optional(),picture:f.z.string().optional()}),backstageIdentity:f.z.object({id:f.z.string(),token:f.z.string(),identity:f.z.object({type:f.z.literal("user"),userEntityRef:f.z.string(),ownershipEntityRefs:f.z.array(f.z.string())})})}),i={id:"saml",title:"SAML",icon:()=>null};class v{static create(m){const{discoveryApi:l,environment:r="development",provider:A=i}=m,T=new t({discoveryApi:l,environment:r,provider:A}),Z=new c.StaticAuthSessionManager({connector:T}),O=new c.AuthSessionStore({manager:Z,storageKey:`${A.id}Session`,schema:y});return new v(O)}sessionState$(){return this.sessionManager.sessionState$()}constructor(m){this.sessionManager=m}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(m={}){const l=await this.sessionManager.getSession(m);return l==null?void 0:l.backstageIdentity}async getProfile(m={}){const l=await this.sessionManager.getSession(m);return l==null?void 0:l.profile}}},91631:function(_,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return a.AtlassianAuth},Auth0Auth:function(){return a.Auth0Auth},GithubAuth:function(){return a.GithubAuth},GitlabAuth:function(){return a.GitlabAuth},GoogleAuth:function(){return a.GoogleAuth},MicrosoftAuth:function(){return a.MicrosoftAuth},OktaAuth:function(){return a.OktaAuth},OneLoginAuth:function(){return a.OneLoginAuth},SamlAuth:function(){return a.SamlAuth},AlertApiForwarder:function(){return t.C},NoOpAnalyticsApi:function(){return c.g},AppThemeSelector:function(){return f.C},ConfigReader:function(){return y.m},UrlPatternDiscovery:function(){return i.p},ErrorAlerter:function(){return v.KN},ErrorApiForwarder:function(){return v.gr},UnhandledErrorForwarder:function(){return v.Jv},LocalStorageFeatureFlags:function(){return p.b},FetchMiddlewares:function(){return m.I},createFetchApi:function(){return m.j},OAuthRequestManager:function(){return l.Y},WebStorage:function(){return r.C}});var a=e(91668);e.o(a,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return a.AlertApiForwarder}}),e.o(a,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return a.AppThemeSelector}}),e.o(a,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return a.BitbucketAuth}}),e.o(a,"ConfigReader")&&e.d(s,{ConfigReader:function(){return a.ConfigReader}}),e.o(a,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return a.ErrorAlerter}}),e.o(a,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return a.ErrorApiForwarder}}),e.o(a,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return a.FetchMiddlewares}}),e.o(a,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return a.FlatRoutes}}),e.o(a,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return a.LocalStorageFeatureFlags}}),e.o(a,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return a.NoOpAnalyticsApi}}),e.o(a,"OAuth2")&&e.d(s,{OAuth2:function(){return a.OAuth2}}),e.o(a,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return a.OAuthRequestManager}}),e.o(a,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return a.UnhandledErrorForwarder}}),e.o(a,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return a.UrlPatternDiscovery}}),e.o(a,"WebStorage")&&e.d(s,{WebStorage:function(){return a.WebStorage}}),e.o(a,"createFetchApi")&&e.d(s,{createFetchApi:function(){return a.createFetchApi}}),e.o(a,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return a.createSpecializedApp}}),e.o(a,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return a.defaultConfigLoader}});var t=e(23235),c=e(47150),f=e(58652),y=e(14721),i=e(4333),v=e(89536),p=e(14884),m=e(50160),l=e(11358),r=e(56054)},56494:function(_,s,e){"use strict";e.d(s,{ApiProvider:function(){return a.ApiProvider},AlertApiForwarder:function(){return t.AlertApiForwarder},AppThemeSelector:function(){return t.AppThemeSelector},ConfigReader:function(){return t.ConfigReader},ErrorAlerter:function(){return t.ErrorAlerter},ErrorApiForwarder:function(){return t.ErrorApiForwarder},FetchMiddlewares:function(){return t.FetchMiddlewares},LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags},NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi},OAuthRequestManager:function(){return t.OAuthRequestManager},UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return t.UrlPatternDiscovery},WebStorage:function(){return t.WebStorage},createFetchApi:function(){return t.createFetchApi}});var a=e(76105);e.o(a,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return a.AlertApiForwarder}}),e.o(a,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return a.AppThemeSelector}}),e.o(a,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return a.AtlassianAuth}}),e.o(a,"Auth0Auth")&&e.d(s,{Auth0Auth:function(){return a.Auth0Auth}}),e.o(a,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return a.BitbucketAuth}}),e.o(a,"ConfigReader")&&e.d(s,{ConfigReader:function(){return a.ConfigReader}}),e.o(a,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return a.ErrorAlerter}}),e.o(a,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return a.ErrorApiForwarder}}),e.o(a,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return a.FetchMiddlewares}}),e.o(a,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return a.FlatRoutes}}),e.o(a,"GithubAuth")&&e.d(s,{GithubAuth:function(){return a.GithubAuth}}),e.o(a,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return a.GitlabAuth}}),e.o(a,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return a.GoogleAuth}}),e.o(a,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return a.LocalStorageFeatureFlags}}),e.o(a,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return a.MicrosoftAuth}}),e.o(a,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return a.NoOpAnalyticsApi}}),e.o(a,"OAuth2")&&e.d(s,{OAuth2:function(){return a.OAuth2}}),e.o(a,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return a.OAuthRequestManager}}),e.o(a,"OktaAuth")&&e.d(s,{OktaAuth:function(){return a.OktaAuth}}),e.o(a,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return a.OneLoginAuth}}),e.o(a,"SamlAuth")&&e.d(s,{SamlAuth:function(){return a.SamlAuth}}),e.o(a,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return a.UnhandledErrorForwarder}}),e.o(a,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return a.UrlPatternDiscovery}}),e.o(a,"WebStorage")&&e.d(s,{WebStorage:function(){return a.WebStorage}}),e.o(a,"createFetchApi")&&e.d(s,{createFetchApi:function(){return a.createFetchApi}}),e.o(a,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return a.createSpecializedApp}}),e.o(a,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return a.defaultConfigLoader}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"Auth0Auth")&&e.d(s,{Auth0Auth:function(){return t.Auth0Auth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OAuth2")&&e.d(s,{OAuth2:function(){return t.OAuth2}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"SamlAuth")&&e.d(s,{SamlAuth:function(){return t.SamlAuth}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},80396:function(_,s,e){"use strict";e.d(s,{p:function(){return t}});var a;(function(c){c[c.default=10]="default";const f=50;c[c.app=f]="app",c[c.static=100]="static"})(a||(a={}));class t{constructor(){ae(this,"factories",new Map)}register(f,y){const i=a[f],v=this.factories.get(y.api.id);return v&&v.priority>=i?!1:(this.factories.set(y.api.id,{priority:i,factory:y}),!0)}get(f){const y=this.factories.get(f.id);if(!!y)return y.factory}getAllApis(){const f=new Set;for(const{factory:y}of this.factories.values())f.add(y.api);return f}}},14406:function(_,s,e){"use strict";e.d(s,{g:function(){return v}});var a=e(2784),t=e(13980),c=e.n(t);class f{constructor(...m){ae(this,"holders");this.holders=m}get(m){for(const l of this.holders){const r=l.get(m);if(r)return r}}}var y=e(76241);const i=(0,y.CT)("api-context"),v=p=>{var T;const{apis:m,children:l}=p,r=(T=(0,a.useContext)(i))==null?void 0:T.atVersion(1),A=r?new f(m,r):m;return a.createElement(i.Provider,{value:(0,y.EI)({1:A}),children:l})};v.propTypes={apis:c().shape({get:c().func.isRequired}).isRequired,children:c().node}},12132:function(_,s,e){"use strict";e.d(s,{M:function(){return a}});class a{constructor(c){ae(this,"apis",new Map);this.factories=c}static validateFactories(c,f){for(const y of f){const i=[y],v=new Set;for(;i.length;){const p=i.shift(),m=c.get(p);if(!!m)for(const l of Object.values(m.deps)){if(l.id===y.id)throw new Error(`Circular dependency of api factory for ${y}`);v.has(l)||(v.add(l),i.push(l))}}}}get(c){return this.load(c)}load(c,f=[]){const y=this.apis.get(c.id);if(y)return y;const i=this.factories.get(c);if(!i)return;if(f.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const v=this.loadDeps(c,i.deps,[...f,i.api]),p=i.factory(v);return this.apis.set(c.id,p),p}loadDeps(c,f,y){const i={};for(const v in f)if(f.hasOwnProperty(v)){const p=f[v],m=this.load(p,y);if(!m)throw new Error(`No API factory available for dependency ${p} of dependent ${c}`);i[v]=m}return i}}},76105:function(_,s,e){"use strict";e.d(s,{ApiProvider:function(){return a.g},ApiResolver:function(){return t.M},ApiFactoryRegistry:function(){return c.p}});var a=e(14406),t=e(12132),c=e(80396),f=e(82488),y=e.n(f);e.o(f,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"Auth0Auth")&&e.d(s,{Auth0Auth:function(){return f.Auth0Auth}}),e.o(f,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return f.BitbucketAuth}}),e.o(f,"ConfigReader")&&e.d(s,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"GithubAuth")&&e.d(s,{GithubAuth:function(){return f.GithubAuth}}),e.o(f,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return f.GitlabAuth}}),e.o(f,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return f.GoogleAuth}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return f.MicrosoftAuth}}),e.o(f,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuth2")&&e.d(s,{OAuth2:function(){return f.OAuth2}}),e.o(f,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"OktaAuth")&&e.d(s,{OktaAuth:function(){return f.OktaAuth}}),e.o(f,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return f.OneLoginAuth}}),e.o(f,"SamlAuth")&&e.d(s,{SamlAuth:function(){return f.SamlAuth}}),e.o(f,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(s,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(s,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return f.defaultConfigLoader}})},82488:function(){},82370:function(_,s,e){"use strict";e.d(s,{b:function(){return At}});var a=e(2784),t=e(10289),c=e(64279),f=e(56494),y=e(36964),i=e(76105);function v(B){const R={};for(const K in B.collectors)B.collectors.hasOwnProperty(K)&&(R[K]=B.collectors[K]());const P=[{node:a.Children.toArray(B.root),parent:void 0,contexts:{}}];for(;P.length!==0;){const{node:K,parent:W,contexts:ne}=P.shift();a.Children.forEach(K,ye=>{if(!(0,a.isValidElement)(ye))return;const ve={};for(const Me in R)if(R.hasOwnProperty(Me)){const Ne=R[Me];ve[Me]=Ne.visit(Ne.accumulator,ye,W,ne[Me])}for(const Me of B.discoverers){const Ne=Me(ye);Ne&&P.push({node:Ne,parent:ye,contexts:ve})}})}return Object.fromEntries(Object.entries(R).map(([K,W])=>[K,W.accumulator]))}function p(B,R){return()=>({accumulator:B(),visit:R})}function m(B){var R;return(R=B.props)==null?void 0:R.children}function l(B){var R,P,K;if(((R=B.props)==null?void 0:R.path)&&((P=B.props)==null?void 0:P.element))return(K=B.props)==null?void 0:K.element}const r=p(()=>new Set,(B,R)=>{const P=(0,y.getComponentData)(R,"core.plugin");P&&B.add(P)});var A=e(88934);function T(B){var K;const R=(K=B.props)==null?void 0:K.element;let P=(0,y.getComponentData)(B,"core.mountPoint");return!P&&(0,a.isValidElement)(R)&&(P=(0,y.getComponentData)(R,"core.mountPoint")),P}const Z=p(()=>new Map,(B,R,P,K)=>{var ye,ve;let W=K;if((P==null?void 0:P.props.element)===R)return W;if((0,y.getComponentData)(R,"core.gatherMountPoints")){const Me=(ye=R.props)==null?void 0:ye.path;if(!Me)throw new Error("Mount point gatherer must have a path");W=Me}const ne=T(R);if(ne){let Me=(ve=R.props)==null?void 0:ve.path;if(W&&(Me?W=void 0:Me=W),!Me)throw new Error("Mounted routable extension must have a path");B.set(ne,Me)}return W}),O=p(()=>new Map,(B,R,P,K)=>{var ye;if((P==null?void 0:P.props.element)===R)return K;let W=K;const ne=T(R);return ne&&(K&&"sticky"in K?(B.set(ne,K.sticky),((ye=R.props)==null?void 0:ye.path)?W=ne:W=K):(B.set(ne,K),W=ne)),(0,y.getComponentData)(R,"core.gatherMountPoints")?{sticky:W}:W}),q={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},$=p(()=>Array(),(B,R,P,K)=>{var Ne,Re,pe;const W=(Ne=K==null?void 0:K.children)!=null?Ne:B;if((P==null?void 0:P.props.element)===R)return K;const ne=(Re=R.props)==null?void 0:Re.path,ye=Boolean((pe=R.props)==null?void 0:pe.caseSensitive),ve=T(R);if(ve){if(ne){const xe={caseSensitive:ye,path:ne,element:"mounted",routeRefs:new Set([ve]),children:[q],plugin:(0,y.getComponentData)(R.props.element,"core.plugin")};return W.push(xe),xe}K==null||K.routeRefs.add(ve)}if((0,y.getComponentData)(R,"core.gatherMountPoints")){if(!ne)throw new Error("Mount point gatherer must have a path");const xe={caseSensitive:ye,path:ne,element:"gathered",routeRefs:new Set,children:[q],plugin:K==null?void 0:K.plugin};return W.push(xe),xe}return K}),x=p(()=>new Set,(B,R)=>{if(R.type===A.L){const P=R.props;B.add("with"in P?P.with:P.without)}});var b=e(76241);const D=(0,b.uW)("route-ref-type",()=>Symbol("route-ref-type"));function j(B){return B[D]==="absolute"}function ee(B){return B[D]==="sub"}function ce(B){return B[D]==="external"}function Ee(...B){const R=B.join("/").replace(/\/\/+/g,"/");return R!=="/"&&R.endsWith("/")?R.slice(0,-1):R}function Ae(B,R,P){let K,W="";if(j(B))K=B;else if(ee(B))K=B.parent,W=B.path;else if(ce(B)){const ve=P.get(B);if(!ve)return[void 0,""];if(j(ve))K=ve;else if(ee(ve))K=ve.parent,W=ve.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${ve}`)}else throw B[D]?new Error(`Unknown or invalid route ref type, ${B[D]}`):new Error(`Unknown object passed to useRouteRef, got ${B}`);if(!K)return[void 0,""];const ne=R.get(K);if(!ne)return[void 0,""];const ye=Ee(ne,W);return[K,ye]}function Oe(B,R,P,K,W){var Re;const ne=(Re=(0,t.fp)(W,R))!=null?Re:[],ye=Array();let ve=-1;for(let pe=B;pe&&(ve=ne.findIndex(xe=>xe.route.routeRefs.has(pe)),ve===-1);pe=K.get(pe))ye.unshift(pe);ye.length===0&&(ve-=1);const Me=ve===-1?"":ne[ve].pathname,Ne=Ee(...ye.slice(0,-1).map(pe=>{const xe=P.get(pe);if(!xe)throw new Error(`No path for ${pe}`);if(xe.includes(":"))throw new Error(`Cannot route to ${B} with parent ${pe} as it has parameters`);return xe}));return Me+Ne}class ge{constructor(R,P,K,W,ne){this.routePaths=R,this.routeParents=P,this.routeObjects=K,this.routeBindings=W,this.appBasePath=ne}resolve(R,P){const[K,W]=Ae(R,this.routePaths,this.routeBindings);if(!K)return;let ne;typeof P=="string"?ne=this.trimPath(P):P.pathname?ne={...P,pathname:this.trimPath(P.pathname)}:ne=P;const ye=this.appBasePath+Oe(K,ne,this.routePaths,this.routeParents,this.routeObjects);return(...[Me])=>ye+(0,t.Gn)(W,Me)}trimPath(R){return R&&(R.startsWith(this.appBasePath)?R.slice(this.appBasePath.length):R)}}const Ge=(0,b.CT)("routing-context"),Qe=({routePaths:B,routeParents:R,routeObjects:P,routeBindings:K,basePath:W="",children:ne})=>{const ye=new ge(B,R,P,K,W),ve=(0,b.EI)({1:ye});return a.createElement(Ge.Provider,{value:ve},ne)},Ue=(B,R)=>{var P,K;try{const W=(0,t.fp)(R,{pathname:B}),ne=(P=W==null?void 0:W.filter(ve=>{var Me;return((Me=ve==null?void 0:ve.route.routeRefs)==null?void 0:Me.size)>0}).pop())==null?void 0:P.route;if(!ne)return{};let ye;return ne.routeRefs.size===1&&(ye=ne.routeRefs.values().next().value),{extension:"App",pluginId:((K=ne.plugin)==null?void 0:K.getId())||"root",...ye?{routeRef:ye.id}:{}}}catch{return{}}},we=({pathname:B,search:R,hash:P})=>{const K=(0,y.useAnalytics)();return(0,a.useEffect)(()=>{K.captureEvent("navigate",`${B}${R}${P}`)},[K,B,R,P]),null},tt=({tree:B})=>{const{pathname:R,search:P,hash:K}=(0,t.TH)(),{routeObjects:W}=(0,a.useMemo)(()=>v({root:B,discoverers:[m,l],collectors:{routeObjects:$}}),[B]);return a.createElement(y.AnalyticsContext,{attributes:Ue(R,W)},a.createElement(we,{pathname:R,search:P,hash:K}))};function dt(B,R){const P=new Set(R.values());P.delete(void 0);for(const K of R.keys()){if(P.has(K))continue;let W=K,ne="";for(;W;){const ve=B.get(W);if(!ve)throw new Error(`No path for ${W}`);ne=`${ve}${ne}`,W=R.get(W)}const ye=ne.match(/:(\w+)/g);if(ye){for(let ve=0;ve<ye.length;ve++)for(let Me=ve+1;Me<ye.length;Me++)if(ye[Me]===ye[ve])throw new Error(`Parameter ${ye[Me]} is duplicated in path ${ne}`)}}}function je(B,R){for(const P of R)if(!!P.externalRoutes){for(const[K,W]of Object.entries(P.externalRoutes))if(!W.optional&&!B.has(W))throw new Error(`External route '${K}' of the '${P.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const Et=(0,b.CT)("app-context"),Bt=({appContext:B,children:R})=>{const P=(0,b.EI)({1:B});return a.createElement(Et.Provider,{value:P,children:R})};function Tt(B){return new Error(`Tried to access IdentityApi ${B} before app was loaded`)}function gt(B){console.warn(`WARNING: Call to ${B} is deprecated and will break in the future`)}class yt{constructor(){ae(this,"target");ae(this,"waitForTarget");ae(this,"resolveTarget",()=>{});this.waitForTarget=new Promise(R=>{this.resolveTarget=R})}setTarget(R){this.target=R,this.resolveTarget(R)}getUserId(){if(!this.target)throw Tt("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return gt("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Tt("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return gt("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(R=>R.getProfileInfo())}async getBackstageIdentity(){const R=await this.waitForTarget.then(P=>P.getBackstageIdentity());return R.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${R.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),R}async getCredentials(){return this.waitForTarget.then(R=>R.getCredentials())}async getIdToken(){return this.waitForTarget.then(R=>{if(!R.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return gt("getIdToken"),R.getIdToken()})}async signOut(){await this.waitForTarget.then(R=>R.signOut()),location.reload()}}var rt=e(72164);function pt(B,R,P){if(B!==void 0){const W=P.find(ne=>ne.id===B);if(W)return W}if(R){const W=P.find(ne=>ne.variant==="dark");if(W)return W}const K=P.find(W=>W.variant==="light");return K||P[0]}const Pt=()=>{const B=(0,a.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[R,P]=(0,a.useState)(B.matches);return(0,a.useEffect)(()=>{const K=W=>{P(W.matches)};return B.addListener(K),()=>{B.removeListener(K)}},[B]),R};function xt({children:B}){const R=(0,y.useApi)(y.appThemeApiRef),P=(0,rt.Z)(R.activeThemeId$(),R.getActiveThemeId()),K=Boolean(window.matchMedia)?Pt():!1,W=pt(P,K,R.getInstalledThemes());if(!W)throw new Error("App has no themes");return a.createElement(W.Provider,{children:B})}var Dt=e(46611);class bt{constructor(){ae(this,"apis",[])}add(R,P){return this.apis.push([R.id,P]),P}build(){return new et(new Map(this.apis))}}class et{static builder(){return new bt}static from(R){return new et(new Map(R.map(([P,K])=>[P.id,K])))}static with(R,P){return new et(new Map([[R.id,P]]))}constructor(R){this.apis=R}with(R,P){return new et(new Map([...this.apis,[R.id,P]]))}get(R){return this.apis.get(R.id)}}function Ce(B){const R=new Map;return B&&B({bind:(K,W)=>{for(const[ne,ye]of Object.entries(W)){const ve=K[ne];if(!ve)throw new Error(`Key ${ne} is not an existing external route`);if(!ye&&!ve.optional)throw new Error(`External route ${ne} is required but was undefined`);ye&&R.set(ve,ye)}}}),R}function ot(B){var P;let{pathname:R}=new URL((P=B.getOptionalString("app.baseUrl"))!=null?P:"/","http://dummy.dev");return R=R.replace(/\/*$/,""),R}function nt(B,R,P){var Me;const K=Boolean(B),W=(0,c.default)(B||(()=>Promise.resolve([])));let ne;if(K&&W.loading){const{Progress:Ne}=R;ne=a.createElement(Ne,null)}else if(W.error){const{BootErrorPage:Ne}=R;ne=a.createElement(Ne,{step:"load-config",error:W.error})}const{ThemeProvider:ye=xt}=R;return ne?{node:a.createElement(f.ApiProvider,{apis:et.with(y.appThemeApiRef,P)},a.createElement(ye,null,ne))}:{api:f.ConfigReader.fromConfigs((Me=W.value)!=null?Me:[])}}class vt{constructor(R){this.app=R}getPlugins(){return this.app.getPlugins()}getSystemIcon(R){return this.app.getSystemIcon(R)}getComponents(){return this.app.getComponents()}}class it{constructor(R){ae(this,"apiHolder");ae(this,"configApi");ae(this,"apis");ae(this,"icons");ae(this,"plugins");ae(this,"components");ae(this,"themes");ae(this,"configLoader");ae(this,"defaultApis");ae(this,"bindRoutes");ae(this,"appIdentityProxy",new yt);ae(this,"apiFactoryRegistry");var P,K,W,ne;this.apis=(P=R.apis)!=null?P:[],this.icons=R.icons,this.plugins=new Set((K=R.plugins)!=null?K:[]),this.components=R.components,this.themes=R.themes,this.configLoader=(W=R.configLoader)!=null?W:Dt.t,this.defaultApis=(ne=R.defaultApis)!=null?ne:[],this.bindRoutes=R.bindRoutes,this.apiFactoryRegistry=new i.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(R){return this.icons[R]}getComponents(){return this.components}getProvider(){const R=new vt(this);let P=!1;return({children:W})=>{const ne=(0,a.useMemo)(()=>f.AppThemeSelector.createWithStorage(this.themes),[]),{routePaths:ye,routeParents:ve,routeObjects:Me,featureFlags:Ne,routeBindings:Re}=(0,a.useMemo)(()=>{const lt=v({root:W,discoverers:[m,l],collectors:{routePaths:Z,routeParents:O,routeObjects:$,collectedPlugins:r,featureFlags:x}});return lt.collectedPlugins.forEach(ze=>this.plugins.add(ze)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...lt,routeBindings:Ce(this.bindRoutes)}},[W]);P||(P=!0,dt(ye,ve),je(Re,this.plugins));const pe=nt(this.configLoader,this.components,ne),xe="api"in pe;if(xe){const{api:lt}=pe;this.configApi=lt}if((0,a.useEffect)(()=>{if(xe){const lt=this.getApiHolder().get(y.featureFlagsApiRef);for(const ze of this.plugins.values())if("getFeatureFlags"in ze)for(const le of ze.getFeatureFlags())lt.registerFlag({name:le.name,pluginId:ze.getId()});else for(const le of ze.output())le.type==="feature-flag"&<.registerFlag({name:le.name,pluginId:ze.getId()});for(const ze of Ne)lt.registerFlag({name:ze,pluginId:""})}},[xe,pe,Ne]),"node"in pe)return pe.node;const{ThemeProvider:ft=xt}=this.components;return a.createElement(f.ApiProvider,{apis:this.getApiHolder()},a.createElement(Bt,{appContext:R},a.createElement(ft,null,a.createElement(Qe,{routePaths:ye,routeParents:ve,routeObjects:Me,routeBindings:Re,basePath:ot(pe.api)},W))))}}getRouter(){const{Router:R,SignInPage:P}=this.components,K=({component:ne,children:ye})=>{const[ve,Me]=(0,a.useState)();return ve?(this.appIdentityProxy.setTarget(ve),ye):a.createElement(ne,{onSignInSuccess:Me})};return({children:ne})=>{const ye=(0,y.useApi)(y.configApiRef),ve=`${ot(ye)}/*`;return P?a.createElement(R,null,a.createElement(tt,{tree:ne}),a.createElement(K,{component:P},a.createElement(t.Z5,null,a.createElement(t.AW,{path:ve,element:a.createElement(a.Fragment,null,ne)})))):(this.appIdentityProxy.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}}),a.createElement(R,null,a.createElement(tt,{tree:ne}),a.createElement(t.Z5,null,a.createElement(t.AW,{path:ve,element:a.createElement(a.Fragment,null,ne)}))))}}getApiHolder(){if(this.apiHolder){for(const R of this.plugins)for(const P of R.getApis())this.apiFactoryRegistry.get(P.api)||this.apiFactoryRegistry.register("default",P);return i.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:y.appThemeApiRef,deps:{},factory:()=>f.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:y.configApiRef,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:y.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:y.featureFlagsApiRef,deps:{},factory:()=>new f.LocalStorageFeatureFlags});for(const R of this.defaultApis)this.apiFactoryRegistry.register("default",R);for(const R of this.plugins)for(const P of R.getApis())if(!this.apiFactoryRegistry.register("default",P))throw new Error(`Plugin ${R.getId()} tried to register duplicate or forbidden API factory for ${P.api}`);for(const R of this.apis)if(!this.apiFactoryRegistry.register("app",R))throw new Error(`Duplicate or forbidden API factory for ${R.api} in app`);return i.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new i.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(R){const P=new Set;for(const K of R){const W=K.getId();if(P.has(W))throw new Error(`Duplicate plugin found '${W}'`);P.add(W)}}}function At(B){return new it(B)}},46611:function(_,s,e){"use strict";e.d(s,{t:function(){return a}});const a=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const c=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external",requestUrl:"http://localhost:3000/api"}}}];if(!c)throw new Error("No static configuration provided");if(!Array.isArray(c))throw new Error("Static configuration has invalid format");const f=c.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const i=JSON.parse(t);Array.isArray(i)?f.push(...i):f.push({data:i,context:"env"})}catch(i){throw new Error(`Failed to load runtime configuration, ${i}`)}const y=window.__APP_CONFIG__;return y&&f.push({context:"window",data:y}),f}},44056:function(_,s,e){"use strict";e.d(s,{createSpecializedApp:function(){return a.b},defaultConfigLoader:function(){return t.t}});var a=e(82370),t=e(46611),c=e(73495),f=e.n(c);e.o(c,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return c.AtlassianAuth}}),e.o(c,"Auth0Auth")&&e.d(s,{Auth0Auth:function(){return c.Auth0Auth}}),e.o(c,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return c.BitbucketAuth}}),e.o(c,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return c.FlatRoutes}}),e.o(c,"GithubAuth")&&e.d(s,{GithubAuth:function(){return c.GithubAuth}}),e.o(c,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return c.GitlabAuth}}),e.o(c,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return c.GoogleAuth}}),e.o(c,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return c.MicrosoftAuth}}),e.o(c,"OAuth2")&&e.d(s,{OAuth2:function(){return c.OAuth2}}),e.o(c,"OktaAuth")&&e.d(s,{OktaAuth:function(){return c.OktaAuth}}),e.o(c,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return c.OneLoginAuth}}),e.o(c,"SamlAuth")&&e.d(s,{SamlAuth:function(){return c.SamlAuth}})},73495:function(){},49208:function(_,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return a.AlertApiForwarder},ErrorAlerter:function(){return a.ErrorAlerter},ErrorApiForwarder:function(){return a.ErrorApiForwarder},FetchMiddlewares:function(){return a.FetchMiddlewares},NoOpAnalyticsApi:function(){return a.NoOpAnalyticsApi},OAuthRequestManager:function(){return a.OAuthRequestManager},UnhandledErrorForwarder:function(){return a.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return a.UrlPatternDiscovery},WebStorage:function(){return a.WebStorage},createFetchApi:function(){return a.createFetchApi},createSpecializedApp:function(){return t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader},FlatRoutes:function(){return c.w}});var a=e(56494);e.o(a,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return a.AtlassianAuth}}),e.o(a,"Auth0Auth")&&e.d(s,{Auth0Auth:function(){return a.Auth0Auth}}),e.o(a,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return a.BitbucketAuth}}),e.o(a,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return a.FlatRoutes}}),e.o(a,"GithubAuth")&&e.d(s,{GithubAuth:function(){return a.GithubAuth}}),e.o(a,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return a.GitlabAuth}}),e.o(a,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return a.GoogleAuth}}),e.o(a,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return a.MicrosoftAuth}}),e.o(a,"OAuth2")&&e.d(s,{OAuth2:function(){return a.OAuth2}}),e.o(a,"OktaAuth")&&e.d(s,{OktaAuth:function(){return a.OktaAuth}}),e.o(a,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return a.OneLoginAuth}}),e.o(a,"SamlAuth")&&e.d(s,{SamlAuth:function(){return a.SamlAuth}}),e.o(a,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return a.createSpecializedApp}}),e.o(a,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return a.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"Auth0Auth")&&e.d(s,{Auth0Auth:function(){return t.Auth0Auth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OAuth2")&&e.d(s,{OAuth2:function(){return t.OAuth2}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"SamlAuth")&&e.d(s,{SamlAuth:function(){return t.SamlAuth}});var c=e(63938)},55274:function(_,s,e){"use strict";e.d(s,{AuthSessionStore:function(){return p},RefreshingAuthSessionManager:function(){return i},StaticAuthSessionManager:function(){return v}});function a(m,l){for(const r of l)if(!m.has(r))return!1;return!0}class t{constructor(l){this.options=l}sessionExistsAndHasScope(l,r){if(!l)return!1;if(!r||this.options.sessionScopes===void 0)return!0;const A=this.options.sessionScopes(l);return a(A,r)}getExtendedScope(l,r){const A=new Set(this.options.defaultScopes);if(l&&this.options.sessionScopes!==void 0){const T=this.options.sessionScopes(l);for(const Z of T)A.add(Z)}if(r)for(const T of r)A.add(T);return A}}var c=e(98005),f=e(36964);class y{constructor(){ae(this,"subject",new c.X(f.SessionState.SignedOut));ae(this,"signedIn",!1)}setIsSignedIn(l){this.signedIn!==l&&(this.signedIn=l,this.subject.next(this.signedIn?f.SessionState.SignedIn:f.SessionState.SignedOut))}sessionState$(){return this.subject}}class i{constructor(l){ae(this,"connector");ae(this,"helper");ae(this,"sessionScopesFunc");ae(this,"sessionShouldRefreshFunc");ae(this,"stateTracker",new y);ae(this,"refreshPromise");ae(this,"currentSession");const{connector:r,defaultScopes:A=new Set,sessionScopes:T,sessionShouldRefresh:Z}=l;this.connector=r,this.sessionScopesFunc=T,this.sessionShouldRefreshFunc=Z,this.helper=new t({sessionScopes:T,defaultScopes:A})}async getSession(l){if(this.helper.sessionExistsAndHasScope(this.currentSession,l.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const A=await this.collapsedSessionRefresh(),T=this.sessionScopesFunc(this.currentSession),Z=this.sessionScopesFunc(A);return a(Z,T)&&(this.currentSession=A),A}catch(A){if(l.optional)return;throw A}}if(!this.currentSession&&!l.instantPopup)try{const r=await this.collapsedSessionRefresh();return this.currentSession=r,this.getSession(l)}catch{}if(!l.optional)return this.currentSession=await this.connector.createSession({...l,scopes:this.helper.getExtendedScope(this.currentSession,l.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession();try{const l=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),l}finally{delete this.refreshPromise}}}class v{constructor(l){ae(this,"connector");ae(this,"helper");ae(this,"stateTracker",new y);ae(this,"currentSession");const{connector:r,defaultScopes:A=new Set,sessionScopes:T}=l;this.connector=r,this.helper=new t({sessionScopes:T,defaultScopes:A})}setSession(l){this.currentSession=l,this.stateTracker.setIsSignedIn(Boolean(l))}async getSession(l){if(this.helper.sessionExistsAndHasScope(this.currentSession,l.scopes))return this.currentSession;if(!l.optional)return this.currentSession=await this.connector.createSession({...l,scopes:this.helper.getExtendedScope(this.currentSession,l.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}class p{constructor(l){ae(this,"manager");ae(this,"storageKey");ae(this,"schema");ae(this,"sessionShouldRefreshFunc");ae(this,"helper");const{manager:r,storageKey:A,schema:T,sessionScopes:Z,sessionShouldRefresh:O=()=>!1}=l;this.manager=r,this.storageKey=A,this.schema=T,this.sessionShouldRefreshFunc=O,this.helper=new t({sessionScopes:Z,defaultScopes:new Set})}setSession(l){this.manager.setSession(l),this.saveSession(l)}async getSession(l){const{scopes:r}=l,A=this.loadSession();if(this.helper.sessionExistsAndHasScope(A,r)&&!this.sessionShouldRefreshFunc(A))return this.manager.setSession(A),A;const T=await this.manager.getSession(l);return this.saveSession(T),T}async removeSession(){localStorage.removeItem(this.storageKey),await this.manager.removeSession()}sessionState$(){return this.manager.sessionState$()}loadSession(){try{const l=localStorage.getItem(this.storageKey);if(l){const r=JSON.parse(l,(A,T)=>(T==null?void 0:T.__type)==="Set"?new Set(T.__value):T);try{return this.schema.parse(r)}catch(A){throw console.log(`Failed to load session from local storage because it did not conform to the expected schema, ${A}`),A}}return}catch{localStorage.removeItem(this.storageKey);return}}saveSession(l){if(l===void 0){localStorage.removeItem(this.storageKey);return}try{this.schema.parse(l)}catch(r){console.warn(`Failed to save session to local storage because it did not conform to the expected schema, ${r}`);return}localStorage.setItem(this.storageKey,JSON.stringify(l,(r,A)=>A instanceof Set?{__type:"Set",__value:Array.from(A)}:A))}}},17678:function(_,s,e){"use strict";e.d(s,{d:function(){return a}});function a(t){return new Promise((c,f)=>{const y=t.width||500,i=t.height||700,v=window.screen.width/2-y/2,p=window.screen.height/2-i/2,m=window.open(t.url,t.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${i},top=${p},left=${v}`);let l="";if(!m||typeof m.closed=="undefined"||m.closed){const Z=new Error("Failed to open auth popup.");Z.name="PopupRejectedError",f(Z);return}const r=Z=>{if(Z.source!==m||Z.origin!==t.origin)return;const{data:O}=Z;if(O.type==="config_info"){l=O.targetOrigin;return}if(O.type!=="authorization_response")return;const q=O;if("error"in q){const $=new Error(q.error.message);$.name=q.error.name,f($)}else c(q.response);T()},A=setInterval(()=>{if(m.closed){const Z=`Login failed, ${l&&l!==window.location.origin?`Incorrect app origin, expected ${l}`:"popup was closed"}`,O=new Error(Z);O.name="PopupClosedError",f(O),T()}},100);function T(){window.removeEventListener("message",r),clearInterval(A)}window.addEventListener("message",r)})}},98005:function(_,s,e){"use strict";e.d(s,{J:function(){return c},X:function(){return f}});var a=e(82394),t=e.n(a);class c{constructor(){ae(this,"isClosed",!1);ae(this,"terminatingError");ae(this,"observable",new(t())(i=>this.isClosed?(this.terminatingError?i.error(this.terminatingError):i.complete(),()=>{}):(this.subscribers.add(i),()=>{this.subscribers.delete(i)})));ae(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(i){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(v=>v.next(i))}error(i){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=i,this.subscribers.forEach(v=>v.error(i))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(i=>i.complete())}subscribe(i,v,p){const m=typeof i=="function"?{next:i,error:v,complete:p}:i;return this.observable.subscribe(m)}}class f{constructor(i){ae(this,"isClosed");ae(this,"currentValue");ae(this,"terminatingError");ae(this,"observable");ae(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=i,this.terminatingError=void 0,this.observable=new(t())(v=>this.isClosed?(this.terminatingError?v.error(this.terminatingError):v.complete(),()=>{}):(v.next(this.currentValue),this.subscribers.add(v),()=>{this.subscribers.delete(v)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(i){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=i,this.subscribers.forEach(v=>v.next(i))}error(i){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=i,this.subscribers.forEach(v=>v.error(i))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(i=>i.complete())}subscribe(i,v,p){const m=typeof i=="function"?{next:i,error:v,complete:p}:i;return this.observable.subscribe(m)}}},88934:function(_,s,e){"use strict";e.d(s,{L:function(){return c}});var a=e(36964),t=e(2784);const c=f=>{const{children:y}=f,i=(0,a.useApi)(a.featureFlagsApiRef),v="with"in f?i.isActive(f.with):!i.isActive(f.without);return t.createElement(t.Fragment,null,v?y:null)};(0,a.attachComponentData)(c,"core.featureFlagged",!0)},63938:function(_,s,e){"use strict";e.d(s,{w:function(){return f}});var a=e(2784),t=e(10289),c=e(36964);const f=i=>{const v=(0,c.useApp)(),{NotFoundErrorPage:p}=v.getComponents(),m=(0,c.useElementFilter)(i.children,l=>l.getElements().flatMap(r=>{var T;let A=r.props.path;return A===""?[]:(A=(T=A==null?void 0:A.replace(/\/\*$/,""))!=null?T:"/",[{path:A,element:r,children:r.props.children?[{path:A==="/"?"/":"/*",element:r.props.children}]:void 0}])}).sort((r,A)=>A.path.localeCompare(r.path)).map(r=>(r.path=r.path==="/"?"/":`${r.path}/*`,r)));return m.push({element:a.createElement(p,null),path:"/*"}),(0,t.V$)(m)};var y=e(88934)},9118:function(_,s,e){"use strict";e.d(s,{Button:function(){return $},CodeSnippet:function(){return ge},Content:function(){return Jr},ContentHeader:function(){return ei},CreateButton:function(){return Ue},DependencyGraph:function(){return Re},DependencyGraphTypes:function(){return a},EmptyState:function(){return M},ErrorPage:function(){return oi},ErrorPanel:function(){return ht},Header:function(){return ao},HeaderIconLinkRow:function(){return va},HeaderLabel:function(){return gi},HeaderTabs:function(){return Qr},InfoCard:function(){return Nn},ItemCardGrid:function(){return Si},ItemCardHeader:function(){return vi},Link:function(){return O},LogViewer:function(){return Hn},MissingAnnotationEmptyState:function(){return be},OverflowTooltip:function(){return jn},Page:function(){return oo},PageWithHeader:function(){return Pi},Progress:function(){return Yn},ResponseErrorPanel:function(){return Ln},RoutedTabs:function(){return Xr},Select:function(){return ie},Sidebar:function(){return Qo},SidebarContext:function(){return $a},SidebarDivider:function(){return us},SidebarItem:function(){return Kr},SidebarPage:function(){return Zo},SidebarPinStateContext:function(){return ma},SubvalueCell:function(){return Cs},SupportButton:function(){return Mo},Table:function(){return Gs},WarningPanel:function(){return un},sidebarConfig:function(){return Wt},useContent:function(){return pr},useQueryParamState:function(){return Lo}});var a={};e.r(a),e.d(a,{Nm:function(){return we},ht:function(){return je},LJ:function(){return dt}});var t=e(2784),c=e(36964),f=e(19928);function y(n){const[o,u]=useState([]),d=useApi(alertApiRef);if(useEffect(()=>{const F=d.alert$().subscribe(z=>u(X=>X.concat(z)));return()=>{F.unsubscribe()}},[d]),o.length===0)return null;const[g]=o,S=()=>{u(F=>F.filter(z=>z!==g))};return React.createElement(Snackbar,{open:!0,anchorOrigin:{vertical:"top",horizontal:"center"}},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:S,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:g.severity},React.createElement("span",null,g.message.toString(),o.length>1&&React.createElement("em",null,` (${o.length-1} older ${pluralize("message",o.length-1)})`))))}var i=e(79692),v=e(12420);const p=(0,i.Z)(n=>(0,v.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function m(n){const{displayName:o,picture:u,customStyles:d}=n,g=p();return React.createElement(MaterialAvatar,{alt:o,src:u,className:g.avatar,style:{backgroundColor:stringToColor(o||u||""),...d}},o&&extractInitials(o))}var l=e(77277),r=e(86689),A=e(62833);const T=n=>/^([a-z+.-]+):/.test(n),Z=n=>{var o;return n instanceof Array?n.map(Z).join(" ").trim():typeof n=="object"&&n?Z((o=n==null?void 0:n.props)==null?void 0:o.children):["string","number"].includes(typeof n)?String(n):""},O=t.forwardRef(({onClick:n,noTrack:o,...u},d)=>{const g=(0,c.useAnalytics)(),S=String(u.to),F=Z(u.children)||S,z=T(S),X=z&&!!/^https?:/.exec(S),G=re=>{n==null||n(re),o||g.captureEvent("click",F,{attributes:{to:S}})};return z?t.createElement(r.Z,{ref:d,href:S,onClick:G,...X?{target:"_blank",rel:"noopener"}:{},...u}):t.createElement(r.Z,{ref:d,component:A.rU,onClick:G,...u})}),q=t.forwardRef((n,o)=>t.createElement(O,{ref:o,...n,color:"initial"})),$=t.forwardRef((n,o)=>t.createElement(l.Z,{ref:o,component:q,...n}));var x=e(60364),b=e(61837),D=e(80030),j=e(19353),ee=e(55295);function ce(n){const{text:o,tooltipDelay:u=1e3,tooltipText:d="Text copied to clipboard"}=n,g=(0,c.useApi)(c.errorApiRef),[S,F]=(0,t.useState)(!1),[{error:z},X]=(0,ee.Z)();(0,t.useEffect)(()=>{z&&g.post(z)},[z,g]);const G=re=>{re.stopPropagation(),F(!0),X(o)};return t.createElement(t.Fragment,null,t.createElement(D.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:u,onClose:()=>F(!1),open:S},t.createElement(b.Z,{onClick:G},t.createElement(j.Z,null))))}var Ee=e(70813),Ae=e(26639),Oe=e(39595);function ge(n){const{text:o,language:u,showLineNumbers:d=!1,highlightedNumbers:g,customStyle:S,showCopyCodeButton:F=!1}=n,z=(0,x.Z)(),X=z.palette.type==="dark"?Ae.Z:Oe.Z,G=z.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(Ee.Z,{customStyle:S,language:u,style:X,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:z.palette.textVerySubtle},lineProps:re=>(g==null?void 0:g.includes(re))?{style:{backgroundColor:G}}:{}},o),F&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(ce,{text:o})))}var Ge=e(41156),Qe=e(88188);function Ue(n){const{title:o,to:u}=n,d=(0,Ge.Z)(g=>g.breakpoints.down("xs"));return u?d?t.createElement(b.Z,{component:A.rU,color:"primary",title:o,size:"small",to:u},t.createElement(Qe.Z,null)):t.createElement(l.Z,{component:A.rU,variant:"contained",color:"primary",to:u},o):null}var we;(function(n){const o="TB";n.TOP_BOTTOM=o;const u="BT";n.BOTTOM_TOP=u;const d="LR";n.LEFT_RIGHT=d;const g="RL";n.RIGHT_LEFT=g})(we||(we={}));var tt;(function(n){const o="UL";n.UP_LEFT=o;const u="UR";n.UP_RIGHT=u;const d="DL";n.DOWN_LEFT=d;const g="DR";n.DOWN_RIGHT=g})(tt||(tt={}));var dt;(function(n){const o="network-simplex";n.NETWORK_SIMPLEX=o;const u="tight-tree";n.TIGHT_TREE=u;const d="longest-path";n.LONGEST_PATH=d})(dt||(dt={}));var je;(function(n){const o="l";n.LEFT=o;const u="r";n.RIGHT=u;const d="c";n.CENTER=d})(je||(je={}));var Et=e(13387),Bt=e(11105),Tt=e(97963),gt=e(46506),yt=e.n(gt),rt=e(54073),pt=e.n(rt),Pt=e(10368);const xt=(0,i.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Dt({node:{id:n}}){const o=xt(),[u,d]=t.useState(0),[g,S]=t.useState(0),F=t.useRef(null);t.useLayoutEffect(()=>{if(F.current){let{height:re,width:de}=F.current.getBBox();re=Math.round(re),de=Math.round(de),(re!==g||de!==u)&&(d(de),S(re))}},[u,g]);const z=10,X=u+z*2,G=g+z*2;return t.createElement("g",null,t.createElement("rect",{className:o.node,width:X,height:G,rx:10}),t.createElement("text",{ref:F,className:o.text,y:G/2,x:X/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const bt="arrow-marker",et="node",Ce="edge",ot="label",nt=(0,Pt.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),vt=n=>t.createElement(Dt,{...n});function it({render:n=vt,setNode:o,node:u}){const{width:d,height:g,x:S=0,y:F=0}=u,z=u,X=nt(),G=t.useRef(null);return t.useLayoutEffect(()=>{if(G.current){let{height:re,width:de}=G.current.getBBox();re=Math.round(re),de=Math.round(de),(re!==g||de!==d)&&o(u.id,{...u,height:re,width:de})}},[u,d,g,o]),t.createElement("g",{ref:G,"data-testid":et,className:X.node,transform:`translate(${S-d/2},${F-g/2})`},n({node:z}))}var At=e(40408),B=e(49810),R=e(19574),P=e.n(R);const K=(0,Pt.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function W({edge:{label:n}}){const o=K();return t.createElement("text",{className:o.text,textAnchor:"middle"},n)}const ne=(0,Pt.Z)(n=>({path:{strokeWidth:2,stroke:n.palette.textSubtle,fill:"none",transition:`${n.transitions.duration.shortest}ms`},label:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),ye=n=>t.createElement(W,{...n}),ve=At.Z().x(n=>n.x).y(n=>n.y).curve(B.Z);function Me({render:n=ye,setEdge:o,id:u,edge:d}){const{x:g=0,y:S=0,width:F,height:z,points:X}=d,G=d,re=ne(),de=t.useRef(null);t.useLayoutEffect(()=>{if(de.current){let{height:Pe,width:Le}=de.current.getBBox();Pe=Math.round(Pe),Le=Math.round(Le),(Pe!==z||Le!==F)&&o(u,{...d,height:Pe,width:Le})}},[d,z,F,o,u]);let Se="";if(X){const Pe=X.filter(Le=>P()(Le.x)&&P()(Le.y));Se=ve(Pe)||""}return t.createElement(t.Fragment,null,Se&&t.createElement("path",{"data-testid":Ce,className:re.path,markerEnd:`url(#${bt})`,d:Se}),G.label?t.createElement("g",{ref:de,"data-testid":ot,className:re.label,transform:`translate(${g},${S})`},n({edge:G})):null)}const Ne="workspace";function Re(n){var ga,mo;const{edges:o,nodes:u,renderNode:d,direction:g=we.TOP_BOTTOM,align:S,nodeMargin:F=50,edgeMargin:z=10,rankMargin:X=50,paddingX:G=0,paddingY:re=0,acyclicer:de,ranker:Se=dt.NETWORK_SIMPLEX,labelPosition:Pe=je.RIGHT,labelOffset:Le=10,edgeRanks:ct=1,edgeWeight:Lt=1,renderLabel:Xt,defs:Ht,zoom:at="enabled",...Ct}=n,Ot=(0,Tt.Z)(),[kt,Un]=t.useState(100),[pn,wa]=t.useState(100),St=t.useRef(new(yt()).graphlib.Graph),[wn,Cr]=t.useState(((ga=St.current.graph())==null?void 0:ga.width)||0),[qn,Tr]=t.useState(((mo=St.current.graph())==null?void 0:mo.height)||0),[ir,lr]=t.useState([]),[Pr,_t]=t.useState([]),ln=Math.max(wn,kt),yn=Math.max(qn,pn),_n=t.useMemo(()=>pt()(Ut=>{if(!Ut)return;const en=Bt.Z(Ut),Zt=Bt.Z(Ut.getElementById(Ne));function An(){en.call(Et.sP().scaleExtent([1,10]).on("zoom",Fn=>{Fn.transform.x=Math.min(0,Math.max(Fn.transform.x,ln-ln*Fn.transform.k)),Fn.transform.y=Math.min(0,Math.max(Fn.transform.y,yn-yn*Fn.transform.k)),Zt.attr("transform",Fn.transform)}))}at==="enabled"?An():at==="enable-on-click"&&en.on("click",()=>An());const{width:Rn,height:cr}=Ut.getBoundingClientRect();kt!==Rn&&Un(Rn),pn!==cr&&wa(cr)},100),[pn,kt,ln,yn,at]),jt=t.useCallback(()=>{const Ut=St.current.nodes(),en=St.current.edges();Ut.forEach(Zt=>{u.some(Rn=>Rn.id===Zt)||St.current.removeNode(Zt)}),en.forEach(Zt=>{o.some(Rn=>Rn.from===Zt.v&&Rn.to===Zt.w)||St.current.removeEdge(Zt.v,Zt.w)}),u.forEach(Zt=>{const An=St.current.nodes().find(Rn=>Zt.id===Rn);if(An&&St.current.node(An)){const{width:Rn,height:cr,x:Fn,y:Hi}=St.current.node(An);St.current.setNode(An,{...Zt,width:Rn,height:cr,x:Fn,y:Hi})}else St.current.setNode(Zt.id,{...Zt,width:0,height:0})}),o.forEach(Zt=>{St.current.setEdge(Zt.from,Zt.to,{...Zt,label:Zt.label,width:0,height:0,labelpos:Pe,labeloffset:Le,weight:Lt,minlen:ct})})},[o,u,Pe,Le,Lt,ct]),Kt=t.useMemo(()=>pt()(()=>{yt().layout(St.current);const{height:Ut,width:en}=St.current.graph(),Zt=Math.max(0,Ut||0),An=Math.max(0,en||0);Cr(An),Tr(Zt),lr(St.current.nodes()),_t(St.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(St.current.setGraph({rankdir:g,align:S,nodesep:F,edgesep:z,ranksep:X,marginx:G,marginy:re,acyclicer:de,ranker:Se}),jt(),Kt(),Kt.cancel),[de,S,g,z,G,re,F,X,Se,jt,Kt]);function ha(Ut,en){return St.current.setNode(Ut,en),Kt(),St.current}function ea(Ut,en){return St.current.setEdge(Ut,en),Kt(),St.current}return t.createElement("svg",{ref:_n,...Ct,width:"100%",height:yn,viewBox:`0 0 ${ln} ${yn}`},t.createElement("defs",null,t.createElement("marker",{id:bt,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Ot.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),Ht),t.createElement("g",{id:Ne},t.createElement("svg",{width:wn,height:qn,y:yn/2-qn/2,x:ln/2-wn/2,viewBox:`0 0 ${wn} ${qn}`},Pr.map(Ut=>{const en=St.current.edge(Ut);return en?t.createElement(Me,{key:`${Ut.v}-${Ut.w}`,id:Ut,setEdge:ea,render:Xt,edge:en}):null}),ir.map(Ut=>{const en=St.current.node(Ut);return en?t.createElement(it,{key:Ut,setNode:ha,render:d,node:en}):null}))))}var pe=e(72779),xe=e.n(pe);const ft=(0,i.Z)(n=>{var o;return{root:{padding:n.spacing(0),marginBottom:n.spacing(0),marginTop:n.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:n.spacing(6),marginTop:-n.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:n.palette.banner.text,"& a":{color:n.palette.banner.link}},info:{backgroundColor:n.palette.banner.info},error:{backgroundColor:n.palette.banner.error},warning:{backgroundColor:(o=n.palette.banner.warning)!=null?o:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),lt=n=>{var Pe;const{variant:o,message:u,id:d,fixed:g=!1}=n,S=ft(),z=useApi(storageApiRef).forBucket("notifications"),X=(Pe=z.get("dismissedBanners"))!=null?Pe:[],[G,re]=useState(new Set(X)),de=useObservable(z.observe$("dismissedBanners"));useEffect(()=>{var Le;if(de==null?void 0:de.newValue){const ct=(Le=de==null?void 0:de.newValue)!=null?Le:[];re(new Set(ct))}},[de==null?void 0:de.newValue]);const Se=()=>{z.set("dismissedBanners",[...G,d])};return React.createElement(Snackbar,{anchorOrigin:g?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!G.has(d),classes:{root:classNames(S.root,!g&&S.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(S.content,S[o]),message:S.message},message:u,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Se},React.createElement(Close,{className:S.icon}))]}))};var ze=e(60905),le=e(90436),Ze=e(86284),Ke=e(96465),Xe=e(19133),ke=e(3871);const We=(0,i.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),w=({missing:n})=>{const o=We();switch(n){case"field":return t.createElement("img",{src:Ze,className:o.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:Ke,alt:"no Information",className:o.generalImg});case"content":return t.createElement("img",{src:Xe,alt:"create Component",className:o.generalImg});case"data":return t.createElement("img",{src:ke,alt:"no Build",className:o.generalImg});default:return null}},E=(0,i.Z)(n=>({root:{backgroundColor:n.palette.background.default,padding:n.spacing(2,0,0,0)},action:{marginTop:n.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function M(n){const{title:o,description:u,missing:d,action:g}=n,S=E();return t.createElement(ze.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:S.root,spacing:2},t.createElement(ze.Z,{item:!0,xs:12,md:6},t.createElement(ze.Z,{container:!0,direction:"column"},t.createElement(ze.Z,{item:!0,xs:!0},t.createElement(le.Z,{variant:"h5"},o)),t.createElement(ze.Z,{item:!0,xs:!0},t.createElement(le.Z,{variant:"body1"},u)),t.createElement(ze.Z,{item:!0,xs:!0,className:S.action},g))),t.createElement(ze.Z,{item:!0,xs:12,md:6,className:S.imageContainer},t.createElement(w,{missing:d})))}const Y=`apiVersion: backstage.io/v1alpha1
|
|
2
|
-
kind: Component
|
|
3
|
-
metadata:
|
|
4
|
-
name: example
|
|
5
|
-
description: example.com
|
|
6
|
-
annotations:
|
|
7
|
-
ANNOTATION: value
|
|
8
|
-
spec:
|
|
9
|
-
type: website
|
|
10
|
-
lifecycle: production
|
|
11
|
-
owner: user:guest`,te=(0,i.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function be(n){const{annotation:o}=n,u=te(),d=t.createElement(t.Fragment,null,"The ",t.createElement("code",null,o)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return t.createElement(M,{missing:"field",title:"Missing Annotation",description:d,action:t.createElement(t.Fragment,null,t.createElement(le.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:u.code},t.createElement(ge,{text:Y.replace("ANNOTATION",o),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(l.Z,{color:"primary",component:O,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var he=e(11776),Fe=e(38402),De=e(49378),qe=e(41128),_e=e(27616),Rt=e(8284),ue=e(70660),V=e(91750),se=e(38016);const Te=(n,o)=>(o.palette.type==="light"?qe._j:qe.$n)(o.palette[n].light,.6),$e=(n,o)=>(o.palette.type==="light"?qe.$n:qe._j)(o.palette[n].light,.9),Ve=(0,i.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:o})=>Te(o,n)}})),st=({severity:n})=>{const o=Ve({severity:n});return t.createElement(V.Z,{classes:o})},mt=({severity:n})=>{const o=Ve({severity:n});return t.createElement(se.Z,{classes:o})},$t=(0,i.Z)(n=>({panel:{backgroundColor:({severity:o})=>$e(o,n),color:({severity:o})=>Te(o,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:o})=>Te(o,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:o})=>Te(o,n),backgroundColor:({severity:o})=>$e(o,n)},details:{width:"100%",display:"block",color:n.palette.textContrast,backgroundColor:n.palette.background.default,border:`1px solid ${n.palette.border}`,padding:n.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),tn=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function un(n){const{severity:o="warning",title:u,message:d,children:g,defaultExpanded:S}=n,F=$t({severity:o}),z=tn(o)+(u?`: ${u}`:"");return t.createElement(_e.Z,{defaultExpanded:S!=null?S:!1,className:F.panel,role:"alert"},t.createElement(Rt.Z,{expandIcon:t.createElement(mt,{severity:o}),className:F.summary},t.createElement(st,{severity:o}),t.createElement(le.Z,{className:F.summaryText,variant:"subtitle1"},z)),(d||g)&&t.createElement(ue.Z,null,t.createElement(ze.Z,{container:!0},d&&t.createElement(ze.Z,{item:!0,xs:12},t.createElement(le.Z,{className:F.message,variant:"body1"},d)),g&&t.createElement(ze.Z,{item:!0,xs:12,className:F.details},g))))}const Nt=(0,i.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),In=({error:n,message:o,stack:u,children:d})=>{const g=Nt();return t.createElement(he.Z,{dense:!0},t.createElement(Fe.Z,{alignItems:"flex-start"},t.createElement(De.Z,{classes:{secondary:g.text},primary:"Error",secondary:n}),t.createElement(ce,{text:n})),t.createElement(Fe.Z,{alignItems:"flex-start"},t.createElement(De.Z,{classes:{secondary:g.text},primary:"Message",secondary:o}),t.createElement(ce,{text:o})),u&&t.createElement(Fe.Z,{alignItems:"flex-start"},t.createElement(De.Z,{classes:{secondary:g.text},primary:"Stack Trace",secondary:u}),t.createElement(ce,{text:u})),d)};function ht(n){const{title:o,error:u,defaultExpanded:d,children:g}=n;return t.createElement(un,{severity:"error",title:o!=null?o:u.message,defaultExpanded:d},t.createElement(In,{error:u.name,message:u.message,stack:u.stack,children:g}))}var Vt=e(85256);const Sn=(0,i.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function Ln(n){var Le;const{title:o,error:u,defaultExpanded:d}=n,g=Sn();if(u.name!=="ResponseError")return t.createElement(ht,{title:o!=null?o:u.message,defaultExpanded:d,error:u});const{body:S,cause:F}=u,{request:z,response:X}=S,G=`${X.statusCode}: ${F.name}`,re=z&&`${z.method} ${z.url}`,de=F.message.replace(/\\n/g,`
|
|
12
|
-
`),Se=(Le=F.stack)==null?void 0:Le.replace(/\\n/g,`
|
|
13
|
-
`),Pe=JSON.stringify(S,void 0,2);return t.createElement(ht,{title:o!=null?o:u.message,defaultExpanded:d,error:{name:G,message:de,stack:Se}},re&&t.createElement(Fe.Z,{alignItems:"flex-start"},t.createElement(De.Z,{classes:{secondary:g.text},primary:"Request",secondary:z?`${re}`:void 0}),t.createElement(ce,{text:re})),t.createElement(t.Fragment,null,t.createElement(Vt.Z,{component:"li",className:g.divider}),t.createElement(Fe.Z,{alignItems:"flex-start"},t.createElement(De.Z,{classes:{secondary:g.text},primary:"Full Error as JSON"})),t.createElement(ge,{language:"json",text:Pe,showCopyCodeButton:!0})))}var wt=e(28316);function zn(n){const o=document.createElement("div");return o.setAttribute("id",n),o}function pa(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function ta(n){const o=useRef(null);useEffect(function(){const g=document.querySelector(`#${n}`),S=g||zn(n);return g||pa(S),S.appendChild(o.current),function(){o.current.remove(),S.childNodes.length===-1&&S.remove()}},[n]);function u(){return o.current||(o.current=document.createElement("div")),o.current}return u()}var na=null;const Gt="core.calloutSeen";function za(){const[n,o]=useState(()=>{const d=localStorage.getItem(Gt);return d?JSON.parse(d):{}}),u=useCallback((d,g)=>{const S=localStorage.getItem(Gt),z={...S?JSON.parse(S):{},[d]:g};o(z),localStorage.setItem(Gt,JSON.stringify(z))},[]);return{states:n,setState:u}}function aa(n){const{states:o,setState:u}=za(),d=useCallback(()=>{u(n,!0)},[u,n]);return{seen:o[n]===!0,markSeen:d}}function Wa(n){const{seen:o,markSeen:u}=aa(n);return{show:o===!1,hide:u}}const Ha=(0,i.Z)({"@keyframes pulsateSlightly":{"0%":{transform:"scale(1.0)"},"100%":{transform:"scale(1.1)"}},"@keyframes pulsateAndFade":{"0%":{transform:"scale(1.0)",opacity:.9},"100%":{transform:"scale(1.5)",opacity:0}},featureWrapper:{position:"relative"},backdrop:{zIndex:2e3,position:"fixed",overflow:"hidden",left:0,right:0,top:0,bottom:0},dot:{position:"absolute",backgroundColor:"transparent",borderRadius:"100%",border:"1px solid rgba(103, 146, 180, 0.98)",boxShadow:"0px 0px 0px 20000px rgba(0, 0, 0, 0.5)",zIndex:2001,transformOrigin:"center center",animation:"$pulsateSlightly 1744ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) alternate infinite"},pulseCircle:{width:"100%",height:"100%",backgroundColor:"transparent",borderRadius:"100%",border:"2px solid white",zIndex:2001,transformOrigin:"center center",animation:"$pulsateAndFade 872ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite"},text:{position:"absolute",color:"white",zIndex:2003}},{name:"BackstageFeatureCalloutCircular"});function Va(n){const{featureId:o,title:u,description:d,children:g}=n,{show:S,hide:F}=useShowCallout(o),z=usePortal("core.callout"),X=useRef(null),[G,re]=useState(),de=Ha(),Se=useCallback(()=>{if(X.current){const Pe=X.current.getBoundingClientRect(),Le=Math.max(Pe.width,Pe.height),ct=800,Lt=Pe.x-(Le-Pe.width)/2-ct,Xt=Pe.y-(Le-Pe.height)/2-ct,Ht=Le+2*ct,at=450,Ct=Pe.x+Pe.width/2-at,Ot=Pe.y-(Le-Pe.height)/2+Le+20;re({dotLeft:Lt,dotTop:Xt,dotSize:Ht,borderWidth:ct,textTop:Ot,textLeft:Ct,textWidth:at})}},[]);return useEffect(()=>(window.addEventListener("resize",Se),window.addEventListener("scroll",Se),()=>{window.removeEventListener("resize",Se),window.removeEventListener("scroll",Se)}),[Se]),useLayoutEffect(Se,[X.current,Se]),S?React.createElement(React.Fragment,null,React.createElement("div",{className:de.featureWrapper,ref:X},g),createPortal(React.createElement("div",{className:de.backdrop},React.createElement(ClickAwayListener,{onClickAway:F},React.createElement(React.Fragment,null,React.createElement("div",{className:de.dot,"data-testid":"dot",style:{left:G==null?void 0:G.dotLeft,top:G==null?void 0:G.dotTop,width:G==null?void 0:G.dotSize,height:G==null?void 0:G.dotSize,borderWidth:G==null?void 0:G.borderWidth},onClick:F,onKeyDown:F,role:"button",tabIndex:0},React.createElement("div",{className:de.pulseCircle})),React.createElement("div",{className:de.text,"data-testid":"text",style:{left:G==null?void 0:G.textLeft,top:G==null?void 0:G.textTop,width:G==null?void 0:G.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},u),React.createElement(Typography,null,d))))),z)):React.createElement(React.Fragment,null,g)}var ya=e(35292);const Ea=(0,i.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:"gray",cursor:"default"},primary:{color:n.palette.primary.main},secondary:{color:n.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function Ga({color:n="primary",disabled:o=!1,href:u="#",icon:d=t.createElement(ya.Z,null),label:g,onClick:S,title:F}){const z=Ea();return o?t.createElement(r.Z,{title:F,className:xe()(z.link,z.disabled),underline:"none"},d,t.createElement("span",{className:z.label},g)):t.createElement(r.Z,{title:F,className:xe()(z.link,z[n]),to:u,component:O,onClick:S},d,t.createElement("span",{className:z.label},g))}const Bn=(0,i.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function va(n){const{links:o}=n,u=Bn();return t.createElement("nav",{className:u.links},o.map((d,g)=>t.createElement(Ga,{key:g+1,...d})))}const dn=n=>{const o=n==="dark"?"16%":"97%";return`
|
|
14
|
-
hsl(0, 0%, ${o}) 0%,
|
|
15
|
-
hsla(0, 0%, ${o}, 0.987) 8.1%,
|
|
16
|
-
hsla(0, 0%, ${o}, 0.951) 15.5%,
|
|
17
|
-
hsla(0, 0%, ${o}, 0.896) 22.5%,
|
|
18
|
-
hsla(0, 0%, ${o}, 0.825) 29%,
|
|
19
|
-
hsla(0, 0%, ${o}, 0.741) 35.3%,
|
|
20
|
-
hsla(0, 0%, ${o}, 0.648) 41.2%,
|
|
21
|
-
hsla(0, 0%, ${o}, 0.55) 47.1%,
|
|
22
|
-
hsla(0, 0%, ${o}, 0.45) 52.9%,
|
|
23
|
-
hsla(0, 0%, ${o}, 0.352) 58.8%,
|
|
24
|
-
hsla(0, 0%, ${o}, 0.259) 64.7%,
|
|
25
|
-
hsla(0, 0%, ${o}, 0.175) 71%,
|
|
26
|
-
hsla(0, 0%, ${o}, 0.104) 77.5%,
|
|
27
|
-
hsla(0, 0%, ${o}, 0.049) 84.5%,
|
|
28
|
-
hsla(0, 0%, ${o}, 0.013) 91.9%,
|
|
29
|
-
hsla(0, 0%, ${o}, 0) 100%
|
|
30
|
-
`},Mt=100,Cn=10,Wn=(0,i.Z)(n=>({root:{position:"relative",display:"flex",flexFlow:"row nowrap",alignItems:"center"},container:{overflow:"auto",scrollbarWidth:0,"&::-webkit-scrollbar":{display:"none"}},fade:{position:"absolute",width:Mt,height:`calc(100% + ${Cn}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-Cn,background:`linear-gradient(90deg, ${dn(n.palette.type)})`},fadeRight:{right:-Cn,background:`linear-gradient(270deg, ${dn(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function Aa(n){const[[o,u],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const g=n.current;if(!g){d([0,0]);return}const S=()=>{const F=g.scrollLeft,z=g.scrollWidth-g.offsetWidth-g.scrollLeft;d([F,z])};return S(),g.addEventListener("scroll",S),window.addEventListener("resize",S),()=>{g.removeEventListener("scroll",S),window.removeEventListener("resize",S)}},[n]),[o,u]}function ra(n,o,u){const[d,g]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const S=performance.now(),F=requestAnimationFrame(z=>{if(!n.current)return;const X=z-S,G=Math.abs(d)*X/o,de=Math.max(u,G)*Math.sign(d);n.current.scrollBy({left:de});const Se=d-de;Math.sign(d)!==Math.sign(Se)?g(0):g(Se)});return()=>cancelAnimationFrame(F)},[n,d,o,u]),g}function ur(n){const{scrollStep:o=100,scrollSpeed:u=50,minScrollDistance:d=5,children:g,...S}=n,F=Wn(n),z=React.useRef(),[X,G]=Aa(z),re=ra(z,u,d),de=Se=>{!z.current||re(Se?o:-o)};return React.createElement("div",{...S,className:F.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:F.container,ref:z},g),React.createElement("div",{className:classNames(F.fade,F.fadeLeft,{[F.fadeHidden]:X===0})}),React.createElement("div",{className:classNames(F.fade,F.fadeRight,{[F.fadeHidden]:G===0})}),X>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>de(!1),className:classNames(F.button,F.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),G>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>de(!0),className:classNames(F.button,F.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Ra=(0,i.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function oa(n){const o=Ra(n),{shorthand:u,alpha:d}=n;return u?React.createElement("span",{className:o[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:o[d?"alpha":"beta"]},d?"Alpha":"Beta")}const Sa=(0,t.lazy)(()=>Promise.all([e.e(5011),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function Hn(n){const{Progress:o}=(0,c.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(o,null)},t.createElement(Sa,{...n}))}const Ca=(0,i.Z)(n=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${n.palette.border}`},"& th, & td":{border:`1px solid ${n.palette.border}`,padding:n.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:n.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:n.palette.background.paper},"& tr":{backgroundColor:n.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:n.palette.background.default},"& a":{color:n.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),Vn={code:({inline:n,className:o,children:u,...d})=>{const g=String(u).replace(/\n+$/,""),S=/language-(\w+)/.exec(o||"");return!n&&S?t.createElement(ge,{language:S[1],text:g}):t.createElement("code",{className:o,...d},u)}};function Tn(n){const{content:o,dialect:u="gfm",linkTarget:d}=n,g=Ca();return React.createElement(ReactMarkdown,{remarkPlugins:u==="gfm"?[gfm]:[],className:g.markdown,children:o,components:Vn,linkTarget:d})}var rn=e(10179);const On=(0,i.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),Gn=({request:n,busy:o,setBusy:u})=>{const d=On(),[g,S]=useState(),F=async()=>{u(!0);try{await n.trigger()}catch(X){S(isError(X)?X.message:"An unspecified error occurred")}finally{u(!1)}},z=n.provider.icon;return React.createElement(ListItem,{button:!0,disabled:o,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(z,{fontSize:"large"})),React.createElement(ListItemText,{primary:n.provider.title,secondary:g&&React.createElement(Typography,{color:"error"},g)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:F},"Log in"))};var ja=null;const Ka=(0,i.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function on(n){const o=Ka(),[u,d]=useState(!1),g=useApi(oauthRequestApiRef),S=useObservable(useMemo(()=>g.authRequest$(),[g]),[]),F=()=>{S.forEach(z=>z.reject())};return React.createElement(Dialog,{open:Boolean(S.length),fullWidth:!0,maxWidth:"xs",classes:{paper:o.dialog}},React.createElement(DialogTitle,{classes:{root:o.title}},"Login Required"),React.createElement(DialogContent,{dividers:!0,classes:{root:o.contentList}},React.createElement(List,null,S.map(z=>React.createElement(LoginRequestListItem,{key:z.provider.title,request:z,busy:u,setBusy:d})))),React.createElement(DialogActions,{classes:{root:o.actionButtons}},React.createElement(Button,{onClick:F},"Reject All")))}var fn=e(15277),Ya=e.n(fn),sa=e(29862);const mn=(0,i.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function jn(n){var F;const[o,u]=(0,t.useState)(!1),d=(0,sa.t)(),g=mn(),S=z=>{d()&&u(z)};return t.createElement(D.ZP,{title:(F=n.title)!=null?F:n.text||"",placement:n.placement,disableHoverListener:!o},t.createElement(Ya(),{text:n.text,line:n.line,onToggled:S,containerClassName:g.container}))}var Kn=e(67358);function Yn(n){const[o,u]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>u(!0),250);return()=>clearTimeout(d)},[]),o?t.createElement(Kn.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Jn=e(94339),Mn=e(14503),Ja=e(24579),xn=e(32552),Yt=e(15459),hn=e(95544),ia=e(27597);const Ta=(0,i.Z)(n=>({root:{maxWidth:"fit-content",padding:n.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:n.palette.textSubtle},arrow:{color:n.palette.textSubtle}}),{name:"BackstageBottomLink"});function Pa(n){const{link:o,title:u,onClick:d}=n,g=Ta();return t.createElement("div",null,t.createElement(Vt.Z,null),t.createElement(O,{to:o,onClick:d,underline:"none"},t.createElement(hn.Z,{display:"flex",alignItems:"center",className:g.root},t.createElement(hn.Z,{className:g.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(le.Z,null,t.createElement("strong",null,u))),t.createElement(ia.Z,{className:g.arrow}))))}const Ia=n=>{const{slackChannel:o}=n;if(o){if(typeof o=="string")return t.createElement(t.Fragment,null,"Please contact ",o," for help.");if(!o.href)return t.createElement(t.Fragment,null,"Please contact ",o.name," for help.")}else return null;return t.createElement($,{to:o.href,variant:"contained"},o.name)},Qa=class extends t.Component{constructor(o){super(o);this.state={error:void 0,errorInfo:void 0}}componentDidCatch(o,u){console.error(`ErrorBoundary, error: ${o}, info: ${u}`),this.setState({error:o,errorInfo:u})}render(){const{slackChannel:o,children:u}=this.props,{error:d}=this.state;return d?t.createElement(ht,{title:"Something Went Wrong",error:d},t.createElement(Ia,{slackChannel:o})):u}},La=(0,i.Z)(n=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:n.spacing(2,2,2,2.5)},headerTitle:{fontWeight:700},headerSubheader:{paddingTop:n.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),Oa=(0,Yt.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(Mn.Z),xa={card:{flex:{display:"flex",flexDirection:"column"},fullHeight:{display:"flex",flexDirection:"column",height:"100%"},gridItem:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"}},cardContent:{fullHeight:{flex:1},gridItem:{flex:1}}};function Nn(n){const{title:o,subheader:u,divider:d=!0,deepLink:g,slackChannel:S,errorBoundaryProps:F,variant:z,children:X,headerStyle:G,headerProps:re,icon:de,action:Se,actionsClassName:Pe,actions:Le,cardClassName:ct,actionsTopRight:Lt,className:Xt,noPadding:Ht,titleTypographyProps:at}=n,Ct=La();let Ot={},kt={};z&&z.split(/[\s]+/g).forEach(St=>{Ot={...Ot,...xa.card[St]},kt={...kt,...xa.cardContent[St]}});const Un=()=>t.createElement("div",{className:Ct.headerSubheader},u&&t.createElement("div",{className:Ct.subheader},u),de),pn=F||(S?{slackChannel:S}:{});return t.createElement(Jn.Z,{style:Ot,className:Xt},t.createElement(Qa,{...pn},o&&t.createElement(xn.Z,{classes:{root:Ct.header,title:Ct.headerTitle,subheader:Ct.headerSubheader,avatar:Ct.headerAvatar,action:Ct.headerAction,content:Ct.headerContent},title:o,subheader:Un(),action:Se,style:{...G},titleTypographyProps:at,...re}),Lt&&t.createElement(Oa,null,Lt),d&&t.createElement(Vt.Z,null),t.createElement(Ja.Z,{className:xe()(ct,{[Ct.noPadding]:Ht}),style:kt},X),Le&&t.createElement(Mn.Z,{className:Pe},Le),g&&t.createElement(Pa,{...g})))}var ba=e(39307);const bn=(0,i.Z)(n=>({root:{position:"relative",lineHeight:0},overlay:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -60%)",fontSize:45,fontWeight:"bold",color:n.palette.textContrast},description:{fontSize:"100%",top:"50%",left:"50%",transform:"translate(-50%, -50%)",position:"absolute",wordBreak:"break-all",display:"inline-block"},circle:{width:"80%",transform:"translate(10%, 0)"},colorUnknown:{}}),{name:"BackstageGauge"}),Pn={fractional:!0,inverse:!1,unit:"%",max:100},Da=({palette:n,value:o,inverse:u,max:d})=>{if(isNaN(o))return"#ddd";const g=d||Pn.max,S=u?g-o:o;return S<g/3?n.status.error:S<g*(2/3)?n.status.warning:n.status.ok};function Xa(n){const[o,u]=useState(null),{getColor:d=Da}=n,g=bn(n),{palette:S}=useTheme(),{value:F,fractional:z,inverse:X,unit:G,max:re,description:de}={...Pn,...n},Se=z?Math.round(F*re):F,Pe=re!==100?Math.round(F):Se,[Le,ct]=useState(!1);return useEffect(()=>{const Lt=o,Xt=()=>ct(!0),Ht=()=>ct(!1);return Lt&&de?(Lt.addEventListener("mouseenter",Xt),Lt.addEventListener("mouseleave",Ht),()=>{Lt.removeEventListener("mouseenter",Xt),Lt.removeEventListener("mouseleave",Ht)}):()=>{ct(!1)}},[de,o]),React.createElement("div",{ref:u,className:g.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Se,strokeWidth:12,trailWidth:12,strokeColor:d({palette:S,value:Pe,inverse:X,max:re}),className:g.circle}),de&&Le?React.createElement("div",{className:g.description},de):React.createElement("div",{className:g.overlay},isNaN(F)?"N/A":`${Pe}${G}`))}const Fa=(0,i.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function la(n){const o=Fa(n),{title:u,subheader:d,progress:g,inverse:S,deepLink:F,description:z,icon:X,variant:G,getColor:re}=n,de={inverse:S,description:z,getColor:re,value:g};return React.createElement("div",{className:o.root},React.createElement(InfoCard,{title:u,subheader:d,deepLink:F,variant:G,icon:X},React.createElement(Gauge,{...de})))}function nn(n){const{value:o,getColor:u=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(o))return null;let g=Math.round(o*100*100)/100;g>100&&(g=100);const S=u({palette:d,value:g,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${g}%`},React.createElement("span",null,React.createElement(Line,{percent:g,strokeWidth:4,trailWidth:4,strokeColor:S})))}var ca=e(21324),Ba=e(7089),Ma=e(1292),Qn=e(42494),Na=e(74603),ua=e(12231),Za=e(73698),da=e(72379);const ka=(0,i.Z)(()=>(0,v.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var C=()=>{const n=ka();return t.createElement(da.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const L=(0,i.Z)(()=>(0,v.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var H=()=>{const n=L();return t.createElement(da.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"}))};const J=(0,Yt.Z)(n=>(0,v.Z)({root:{"label + &":{marginTop:n.spacing(3)}},input:{borderRadius:4,position:"relative",backgroundColor:n.palette.background.paper,border:"1px solid #ced4da",fontSize:16,padding:"10px 26px 10px 12px",transition:n.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:n.palette.background.paper,borderRadius:4}}}),{name:"BackstageSelectInputBase"})(Na.Z),k=(0,i.Z)(n=>(0,v.Z)({formControl:{margin:`${n.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function ie(n){const{multiple:o,items:u,label:d,placeholder:g,selected:S,onChange:F,triggerReset:z,native:X=!1,disabled:G=!1}=n,re=k(),[de,Se]=(0,t.useState)(S||(o?[]:"")),[Pe,Le]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Se(o?[]:"")},[z,o]),(0,t.useEffect)(()=>{S!==void 0&&Se(S)},[S]);const ct=at=>{Se(at.target.value),F(at.target.value)},Lt=at=>{if(G){at.preventDefault();return}Le(Ct=>o&&!(at.target instanceof HTMLElement)?!0:!Ct)},Xt=()=>{Le(!1)},Ht=at=>()=>{const Ct=de.filter(Ot=>Ot!==at);Se(Ct),F(Ct)};return t.createElement("div",{className:re.root},t.createElement(le.Z,{variant:"button"},d),t.createElement(Ma.Z,{onClickAway:Xt},t.createElement(Qn.Z,{className:re.formControl},t.createElement(Za.Z,{value:de,native:X,disabled:G,"data-testid":"select",displayEmpty:!0,multiple:o,onChange:ct,onClick:Lt,open:Pe,input:t.createElement(J,null),renderValue:at=>{var Ct;return o&&de.length!==0?t.createElement("div",{className:re.chips},at.map(Ot=>{var kt,Un;return t.createElement(Ba.Z,{key:(kt=u.find(pn=>pn.value===Ot))==null?void 0:kt.value,label:(Un=u.find(pn=>pn.value===Ot))==null?void 0:Un.label,clickable:!0,onDelete:Ht(Ot),className:re.chip})})):t.createElement(le.Z,null,de.length===0?g||"":(Ct=u.find(Ot=>Ot.value===at))==null?void 0:Ct.label)},IconComponent:()=>Pe?t.createElement(H,null):t.createElement(C,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},g&&!o&&t.createElement(ua.Z,{value:[]},g),X?u&&u.map(at=>t.createElement("option",{value:at.value,key:at.value},at.label)):u&&u.map(at=>t.createElement(ua.Z,{key:at.value,value:at.value},o&&t.createElement(ca.Z,{color:"primary",checked:de.includes(at.value)||!1,className:re.checkbox}),at.label))))))}const h=()=>{},I=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:h,stepHistory:[],setStepHistory:h,onStepChange:h});function N(n){const{children:o,elevated:u,onStepChange:d,activeStep:g=0}=n,[S,F]=useState(g),[z,X]=useState([0]);useEffect(()=>{F(g)},[g]);const G=[];let re;return Children.forEach(o,de=>{isValidElement(de)&&(de.props.end?re=de:G.push(de))}),React.createElement(React.Fragment,null,React.createElement(I.Provider,{value:{stepIndex:S,setStepIndex:F,stepHistory:z,setStepHistory:X,onStepChange:d,stepperLength:Children.count(o)}},React.createElement(MuiStepper,{activeStep:S,orientation:"vertical",elevation:u?2:0},G)),S>=Children.count(o)-1&&re)}const Q=(0,i.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),oe=({text:n,handleClick:o})=>React.createElement(Button,{onClick:o},n||"Reset"),fe=({text:n,handleClick:o,disabled:u,last:d,stepIndex:g})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:u,"data-testid":`nextButton-${g}`,onClick:o},n||(d?"Finish":"Next")),Be=({text:n,handleClick:o,disabled:u,stepIndex:d})=>React.createElement(Button,{onClick:o,"data-testid":`backButton-${d}`,disabled:u},n||"Back"),me=({actions:n={},children:o})=>{const u=Q(),{stepperLength:d,stepIndex:g,setStepIndex:S,stepHistory:F,setStepHistory:z,onStepChange:X}=useContext(VerticalStepperContext),G=(Pe,Le)=>{Le&&Le(),X&&X(g,Pe),S(Pe)},re=()=>{const Pe=n.nextStep?n.nextStep(g,d-1):g+1;G(Pe,n.onNext),z([...F,Pe])},de=()=>{F.pop(),G(F[F.length-1],n.onBack),z([...F])},Se=()=>{G(0,n.onRestart),z([0])};return React.createElement("div",{className:u.root},[void 0,!0].includes(n.showBack)&&g!==0&&React.createElement(Be,{text:n.backText,handleClick:de,disabled:g===0,stepIndex:g}),[void 0,!0].includes(n.showNext)&&React.createElement(fe,{text:n.nextText,handleClick:re,disabled:!!d&&g>=d||!!n.canNext&&!n.canNext(),stepIndex:g}),n.showRestart&&g!==0&&React.createElement(oe,{text:n.restartText,handleClick:Se,stepIndex:g}),o)},Ie=(0,i.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function He(n){const{title:o,children:u,end:d,actions:g,...S}=n,F=Ie();return d?React.createElement("div",{className:F.end},React.createElement(Typography,{variant:"h6"},o),u,React.createElement(SimpleStepperFooter,{actions:{...g||{},showNext:!1}})):React.createElement(MuiStep,{...S},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},o)),React.createElement(StepContent,null,u,React.createElement(SimpleStepperFooter,{actions:g})))}const Ye=(0,i.Z)(n=>({status:{fontWeight:500,"&::before":{width:"0.7em",height:"0.7em",display:"inline-block",marginRight:8,borderRadius:"50%",content:'""'}},ok:{"&::before":{backgroundColor:n.palette.status.ok}},warning:{"&::before":{backgroundColor:n.palette.status.warning}},error:{"&::before":{backgroundColor:n.palette.status.error}},pending:{"&::before":{backgroundColor:n.palette.status.pending}},running:{"&::before":{backgroundColor:n.palette.status.running}},aborted:{"&::before":{backgroundColor:n.palette.status.aborted}}}),{name:"BackstageStatus"});function It(n){const o=Ye(n);return React.createElement("span",{className:classNames(o.status,o.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function ut(n){const o=Ye(n);return React.createElement("span",{className:classNames(o.status,o.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Ft(n){const o=Ye(n);return React.createElement("span",{className:classNames(o.status,o.error),"aria-label":"Status error","aria-hidden":"true",...n})}function zt(n){const o=Ye(n);return React.createElement("span",{className:classNames(o.status,o.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function Jt(n){const o=Ye(n);return React.createElement("span",{className:classNames(o.status,o.running),"aria-label":"Status running","aria-hidden":"true",...n})}function Xn(n){const o=Ye(n);return React.createElement("span",{className:classNames(o.status,o.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Zn=e(74600),Qt=e(15584);const qt=n=>(0,v.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),Dn={root:{border:"0",verticalAlign:"top"}},kn=n=>(0,v.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),qa=n=>(0,v.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),fr=(0,Yt.Z)(qt,{name:"BackstageMetadataTableTitleCell"})(Qt.Z),$n=(0,Yt.Z)(Dn,{name:"BackstageMetadataTableCell"})(Qt.Z),ji=({dense:n,children:o})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,o)),Ki=({title:n,children:o,...u})=>React.createElement(TableRow,null,n&&React.createElement(fr,null,n),React.createElement($n,{colSpan:n?1:2,...u},o)),Ir=(0,Yt.Z)(kn,{name:"BackstageMetadataTableList"})(({classes:n,children:o})=>t.createElement("ul",{className:n.root},o)),Yi=(0,Yt.Z)(qa,{name:"BackstageMetadataTableListItem"})(({classes:n,children:o})=>t.createElement("li",{className:n.root},o)),Lr=(0,v.Z)({root:{margin:"0 0",listStyleType:"none"}}),go=n=>(0,v.Z)({root:{...Lr.root,paddingLeft:n.spacing(1)}}),Or=(0,Yt.Z)(Lr,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:o})=>t.createElement(Ir,{classes:n},o)),xr=(0,Yt.Z)(go,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:o})=>t.createElement(Ir,{classes:n},o));function po(n,o){const u=n.map((d,g)=>React.createElement(MetadataListItem,{key:g},mr(d)));return o?React.createElement(xr,null,u):React.createElement(Or,null,u)}function yo(n,o,u){const d=Object.keys(n).map(g=>{const S=mr(n[g],!0),F=u&&u.titleFormat?u.titleFormat(g):startCase(g);return React.createElement(MetadataListItem,{key:g},`${F}: `,S)});return o?React.createElement(xr,null,d):React.createElement(Or,null,d)}function mr(n,o,u){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?yo(n,o,u):Array.isArray(n)?po(n,u):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const Eo=({value:n,options:o})=>React.createElement(Fragment,null,mr(n,o)),vo=({title:n,value:o,options:u})=>React.createElement(MetadataTableItem,{title:u&&u.titleFormat?u.titleFormat(n):startCase(n)},React.createElement(Eo,{value:o,options:u}));function Ao(n,o){return Object.keys(n).map(u=>React.createElement(vo,{key:u,title:u,value:n[u],options:o}))}function Ji(n){const{metadata:o,dense:u=!0,options:d}=n,g=Ao(o,d||{});return React.createElement(MetadataTable,{dense:u},g)}var Ro=e(49429),So=e(86136),br=e(79784),fa=e(76635),Co=e(19126),_a=e.n(Co),To=e(80277);function Po(n){return _a().stringify(n,{strictNullHandling:!0})}function Dr(n){return _a().parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Fr(n,o){return Dr(n)[o]}function Io(n,o,u){const d={...Dr(n),[o]:u};return Po(d)}function Lo(n,o=250){const[u,d]=(0,A.lr)(),g=u.toString(),[S,F]=(0,t.useState)(Fr(g,n));return(0,t.useEffect)(()=>{const z=Fr(g,n);F(X=>(0,fa.isEqual)(z,X)?X:z)},[g,F,n]),(0,To.b)(()=>{const z=Io(g,n,S);g!==z&&d(z,{replace:!0})},[d,S,g,n],o),[S,F]}const Oo={url:"https://github.com/backstage/backstage/issues",items:[{title:"Support Not Configured",icon:"warning",links:[{title:"Add `app.support` config key",url:"https://github.com/andrewthauer/backstage/blob/master/app-config.yaml"}]}]};function Br(){const o=(0,c.useApiHolder)().get(c.configApiRef),u=o==null?void 0:o.getOptionalConfig("app.support");return u?{url:u.getString("url"),items:u.getConfigArray("items").flatMap(d=>{var g;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((g=d.getOptionalConfigArray("links"))!=null?g:[]).flatMap(S=>({url:S.getString("url"),title:S.getString("title")}))}})}:Oo}var xo=e(80079);function vn(n,o){const d=(0,c.useApp)().getSystemIcon(n);return d?t.createElement(d,{...o}):t.createElement(xo.Z,{...o})}function Qi(n){return vn("brokenImage",n)}function Xi(n){return vn("catalog",n)}function ki(n){return vn("chat",n)}function qi(n){return vn("dashboard",n)}function _i(n){return vn("docs",n)}function el(n){return vn("email",n)}function tl(n){return vn("github",n)}function nl(n){return vn("group",n)}function er(n){return vn("help",n)}function al(n){return vn("user",n)}function rl(n){return vn("warning",n)}const bo=(0,i.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Do=({icon:n})=>{var d;const o=(0,c.useApp)(),u=n&&(d=o.getSystemIcon(n))!=null?d:er;return t.createElement(u,null)},Fo=({link:n})=>{var o;return t.createElement(O,{to:n.url},(o=n.title)!=null?o:n.url)},Bo=({item:n})=>{var o;return t.createElement(Fe.Z,null,t.createElement(So.Z,null,t.createElement(Do,{icon:n.icon})),t.createElement(De.Z,{primary:n.title,secondary:(o=n.links)==null?void 0:o.reduce((u,d,g)=>[...u,g>0&&t.createElement("br",{key:g}),t.createElement(Fo,{link:d,key:d.url})],[])}))};function Mo(n){const{title:o,children:u}=n,{items:d}=Br(),[g,S]=(0,t.useState)(!1),[F,z]=(0,t.useState)(null),X=bo(),G=(0,Ge.Z)(Se=>Se.breakpoints.down("sm")),re=Se=>{z(Se.currentTarget),S(!0)},de=()=>{S(!1)};return t.createElement(t.Fragment,null,t.createElement(hn.Z,{display:"flex",ml:1},G?t.createElement(b.Z,{color:"primary",size:"small",onClick:re,"data-testid":"support-button"},t.createElement(er,null)):t.createElement(l.Z,{"data-testid":"support-button",color:"primary",onClick:re,startIcon:t.createElement(er,null)},"Support")),t.createElement(br.ZP,{"data-testid":"support-button-popover",open:g,anchorEl:F,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:de},t.createElement(he.Z,{className:X.popoverList},o&&t.createElement(Fe.Z,{alignItems:"flex-start"},t.createElement(le.Z,{variant:"subtitle1"},o)),t.Children.map(u,(Se,Pe)=>t.createElement(Fe.Z,{alignItems:"flex-start",key:`child-${Pe}`},Se)),d&&d.map((Se,Pe)=>t.createElement(Bo,{item:Se,key:`item-${Pe}`}))),t.createElement(Ro.Z,null,t.createElement(l.Z,{color:"primary",onClick:de},"Close"))))}var hr=e(18671),gn=e(10289);const tr=72,Mr=24,Nr=18,Wt={drawerWidthClosed:tr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:tr,iconSize:tr-Mr*2,iconPadding:Mr,selectedIndicatorWidth:3,userBadgePadding:Nr,userBadgeDiameter:tr-Nr*2,mobileSidebarHeight:56},gr={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:Wt.defaultOpenDelayMs+200},ol="@backstage/core/sidebar-intro-dismissed",$a=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),Zr=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var nr;(function(n){const o="sidebarPinState";n.SIDEBAR_PIN_STATE=o})(nr||(nr={}));const $r={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(nr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(nr.SIDEBAR_PIN_STATE,JSON.stringify(n))}},No=(0,i.Z)(n=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:({isPinned:o})=>o?Wt.drawerWidthOpen:Wt.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:Wt.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),ma=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),Ur=(0,t.createContext)({content:{contentRef:void 0}});function Zo(n){const[o,u]=(0,t.useState)(()=>$r.getSidebarPinState()),d=(0,t.useRef)(null),g=(0,t.useMemo)(()=>({content:{contentRef:d}}),[d]);(0,t.useEffect)(()=>{$r.setSidebarPinState(o)},[o]);const S=(0,Ge.Z)(X=>X.breakpoints.down("xs"),{noSsr:!0}),F=()=>u(!o),z=No({isPinned:o});return t.createElement(ma.Provider,{value:{isPinned:o,toggleSidebarPinState:F,isMobile:S}},t.createElement(Ur.Provider,{value:g},t.createElement("div",{className:z.root},n.children)))}function pr(){const{content:n}=(0,t.useContext)(Ur);return{focusContent:(0,t.useCallback)(()=>{var u,d;(d=(u=n==null?void 0:n.contentRef)==null?void 0:u.current)==null||d.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}var $o=e(50023),Uo=e(4190),wo=e(87685),zo=e(44882),Wo=e(57998);const Ho=(0,i.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:{color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${Wt.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"},label:{display:"none"}})),Vo=n=>{const{to:o,label:u,icon:d,value:g}=n,S=Ho(),F=(0,gn.TH)(),{selectedMenuItemIndex:z,setSelectedMenuItemIndex:X}=(0,t.useContext)(Wr),G=(de,Se)=>{X(Se===z?-1:Se)},re=g===z&&z>=0||g!==z&&!(z>=0)&&o===F.pathname;return t.createElement(Wo.Z,{label:u,icon:d,component:O,to:o||F.pathname,onChange:G,value:g,selected:re,classes:S})},wr=n=>{const{children:o,to:u,label:d,icon:g,value:S}=n,{isMobile:F}=(0,t.useContext)(ma);return F?t.createElement(Vo,{to:u,label:d,icon:g,value:S}):t.createElement(t.Fragment,null,o)},zr=(0,i.Z)(n=>({root:{position:"fixed",backgroundColor:n.palette.navigation.background,color:n.palette.navigation.color,bottom:0,left:0,right:0,zIndex:n.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:{background:n.palette.navigation.background,width:"100%",bottom:`${Wt.mobileSidebarHeight}px`,height:`calc(100% - ${Wt.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"},overlayHeader:{display:"flex",color:n.palette.bursts.fontColor,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.bursts.fontColor},marginMobileSidebar:{marginBottom:`${Wt.mobileSidebarHeight}px`}})),Go=n=>(0,fa.orderBy)(n,({props:{priority:o}})=>Number.isInteger(o)?o:-1,"desc"),jo=t.createElement(wr).type,Ko=({children:n,label:o="Menu",open:u,onClose:d})=>{const g=zr();return t.createElement(Uo.ZP,{anchor:"bottom",open:u,onClose:d,ModalProps:{BackdropProps:{classes:{root:g.marginMobileSidebar}}},classes:{root:g.marginMobileSidebar,paperAnchorBottom:g.overlay}},t.createElement(hn.Z,{className:g.overlayHeader},t.createElement(le.Z,{variant:"h3"},o),t.createElement(b.Z,{onClick:d,classes:{root:g.overlayHeaderClose}},t.createElement(wo.Z,null))),t.createElement(hn.Z,null,n))},Wr=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),Yo=n=>{const{children:o}=n,u=zr(),d=(0,gn.TH)(),[g,S]=(0,t.useState)(-1);(0,t.useEffect)(()=>{S(-1)},[d.pathname]);let F=(0,c.useElementFilter)(o,X=>X.getElements().filter(G=>G.type===jo));if(o)F.length?F=Go(F):F.push(t.createElement(wr,{key:"default_menu",icon:t.createElement(zo.Z,null)},o));else return null;const z=g>=0&&!F[g].props.to;return t.createElement($a.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(Wr.Provider,{value:{selectedMenuItemIndex:g,setSelectedMenuItemIndex:S}},t.createElement(Ko,{label:F[g]&&F[g].props.label,open:z,onClose:()=>S(-1)},F[g]&&F[g].props.children),t.createElement($o.Z,{className:u.root,"data-testid":"mobile-sidebar-root"},F)))},Hr=(0,i.Z)(n=>({drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:n.zIndex.appBar,background:n.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:Wt.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},drawerOpen:{width:Wt.drawerWidthOpen,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shorter})},visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var sn;(function(n){n[n.Closed=0]="Closed";const u=0+1;n[n.Idle=u]="Idle";const d=u+1;n[n.Open=d]="Open"})(sn||(sn={}));const Jo=n=>{const{openDelayMs:o=Wt.defaultOpenDelayMs,closeDelayMs:u=Wt.defaultCloseDelayMs,disableExpandOnHover:d,children:g}=n,S=Hr(),F=(0,Ge.Z)(Lt=>Lt.breakpoints.down("md"),{noSsr:!0}),[z,X]=(0,t.useState)(sn.Closed),G=(0,t.useRef)(),{isPinned:re,toggleSidebarPinState:de}=(0,t.useContext)(ma),Se=()=>{re||d||(G.current&&(clearTimeout(G.current),G.current=void 0),z!==sn.Open&&!F&&(G.current=window.setTimeout(()=>{G.current=void 0,X(sn.Open)},o),X(sn.Idle)))},Pe=()=>{re||d||(G.current&&(clearTimeout(G.current),G.current=void 0),z===sn.Idle?X(sn.Closed):z===sn.Open&&(G.current=window.setTimeout(()=>{G.current=void 0,X(sn.Closed)},u)))},Le=z===sn.Open&&!F||re,ct=Lt=>{Lt?(X(sn.Open),de()):(X(sn.Closed),de())};return t.createElement("div",{style:{}},t.createElement(Xo,null),t.createElement($a.Provider,{value:{isOpen:Le,setOpen:ct}},t.createElement("div",{className:S.root,"data-testid":"sidebar-root",onMouseEnter:d?()=>{}:Se,onFocus:d?()=>{}:Se,onMouseLeave:d?()=>{}:Pe,onBlur:d?()=>{}:Pe},t.createElement("div",{className:xe()(S.drawer,{[S.drawerOpen]:Le})},g))))},Qo=n=>{const{children:o,openDelayMs:u,closeDelayMs:d,disableExpandOnHover:g}=n,{isMobile:S}=(0,t.useContext)(ma);return S?t.createElement(Yo,null,o):t.createElement(Jo,{openDelayMs:u,closeDelayMs:d,disableExpandOnHover:g},o)};function Xo(){const{focusContent:n,contentRef:o}=pr(),u=Hr();return(o==null?void 0:o.current)?t.createElement(l.Z,{onClick:n,variant:"contained",className:xe()(u.visuallyHidden)},"Skip to content"):null}function Vr(n,o){const u=new URLSearchParams(o.search).toString(),d=_a().parse(u),g=new URLSearchParams(n.search).toString(),S=_a().parse(g);return(0,fa.isEqual)(o.pathname,n.pathname)&&(0,fa.isMatch)(S,d)}const ko=(0,i.Z)(n=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:n.palette.navigation.color,padding:20,cursor:"pointer",position:"relative",background:"none",border:"none"},itemContainer:{width:"100%"},selected:{background:"#6f6f6f",color:"#FFF"},label:{margin:14,marginLeft:7,fontSize:14},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0"},textContent:{color:n.palette.navigation.color,display:"flex",justifyContent:"center",[n.breakpoints.down("xs")]:{display:"block",paddingLeft:n.spacing(4)},fontSize:"14px"}})),sl=n=>{const{title:o,to:u,icon:d,dropdownItems:g}=n,S=ko(),{setIsHoveredOn:F}=useContext(SidebarItemWithSubmenuContext),z=()=>{F(!1)},X=useResolvedPath(u),G=useLocation();let re=isLocationMatch(G,X);const[de,Se]=useState(!1),Pe=()=>{Se(!de)};return g!==void 0?(g.some(Le=>{const ct=resolvePath(Le.to);return re=isLocationMatch(G,ct),re}),React.createElement("div",{className:S.itemContainer},React.createElement("button",{onClick:Pe,onTouchStart:Le=>Le.stopPropagation(),className:classnames(S.item,re?S.selected:void 0)},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:S.label},o),de?React.createElement(ArrowDropUpIcon,{className:S.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:S.dropdownArrow})),g&&de&&React.createElement("div",{className:S.dropdown},g.map((Le,ct)=>React.createElement(Link,{component:NavLink,to:Le.to,underline:"none",className:S.dropdownItem,onClick:z,onTouchStart:Lt=>Lt.stopPropagation(),key:ct},React.createElement(Typography,{className:S.textContent},Le.title)))))):React.createElement("div",{className:S.itemContainer},React.createElement(Link,{component:NavLink,to:u,underline:"none",className:classnames(S.item,re?S.selected:void 0),onClick:z,onTouchStart:Le=>Le.stopPropagation()},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:S.label},o)))},qo=n=>(0,i.Z)(o=>{var u,d;return{root:{zIndex:1e3,position:"relative",overflow:"visible",width:o.spacing(7)+1},drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[o.breakpoints.up("sm")]:{marginLeft:n.left,transition:o.transitions.create("margin-left",{easing:o.transitions.easing.sharp,duration:o.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(d=(u=o.palette.navigation.submenu)==null?void 0:u.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:gr.drawerWidthClosed,transitionDelay:`${gr.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},drawerOpen:{width:gr.drawerWidthOpen,[o.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:o.spacing(3),left:0,top:0}},title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[o.breakpoints.down("xs")]:{display:"none"}}}}),_o=n=>{const{isOpen:o}=(0,t.useContext)($a),u=o?Wt.drawerWidthOpen:Wt.drawerWidthClosed,d=qo({left:u})(),{isHoveredOn:g}=(0,t.useContext)(Zr),[S,F]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{F(g)},[g]),t.createElement("div",{className:xe()(d.drawer,{[d.drawerOpen]:S})},t.createElement(le.Z,{variant:"h5",className:d.title},n.title),n.children)};var ar=e(76600),es=e(26739),ts=e(98989),ns=e(59797),as=e(83543);const rs=(0,i.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),il=()=>{const n=rs();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})))};var ll=null;const os=(0,i.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),cl=()=>{const n=os();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})))};var ul=null;const rr=(0,i.Z)(n=>{var S,F,z,X;const{selectedIndicatorWidth:o,drawerWidthClosed:u,drawerWidthOpen:d,iconContainerWidth:g}=Wt;return{root:{color:n.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit"},closed:{width:u,justifyContent:"center"},open:{[n.breakpoints.up("sm")]:{width:d}},highlightable:{"&:hover":{background:(F=(S=n.palette.navigation.navItem)==null?void 0:S.hoverBackground)!=null?F:"#404040"}},highlighted:{background:(X=(z=n.palette.navigation.navItem)==null?void 0:z.hoverBackground)!=null?X:"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:g,marginRight:-n.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:n.typography.fontSize},searchFieldHTMLInput:{padding:n.spacing(2,0,2)},searchContainer:{width:d-g},secondaryAction:{width:n.spacing(6),textAlign:"center",marginRight:n.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:n.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${o}px ${n.palette.navigation.indicator}`,color:n.palette.navigation.selectedColor},"&$closed":{width:u},"& $closedItemIcon":{paddingRight:o},"& $iconContainer":{marginLeft:-o}}}},{name:"BackstageSidebarItem"}),ss=(n,o)=>(0,c.useElementFilter)(n.props.children,u=>{let d=!1;return u.getElements().forEach(({props:{to:g,dropdownItems:S}})=>{if(!d){if(S==null?void 0:S.length){S.forEach(({to:F})=>d=d||Vr(o,(0,gn.i3)(F)));return}g&&(d=Vr(o,(0,gn.i3)(g)))}}),d},[o.pathname]);function Gr(n){return n.to===void 0}const is=t.createElement(_o).type,ls=t.forwardRef(function({to:o,end:u,style:d,className:g,activeStyle:S,caseSensitive:F,activeClassName:z="active","aria-current":X="page",...G},re){let{pathname:de}=(0,gn.TH)(),{pathname:Se}=(0,gn.WU)(o);F||(de=de.toLocaleLowerCase("en-US"),Se=Se.toLocaleLowerCase("en-US"));let Pe=de===Se;!Pe&&!u&&(Pe=de.startsWith(`${Se}/`));const Le=Pe?X:void 0;return t.createElement(A.rU,{...G,to:o,ref:re,"aria-current":Le,style:{...d,...Pe?S:void 0},className:xe()([g,Pe?z:void 0])})}),jr=(0,t.forwardRef)((n,o)=>{const{icon:u,text:d,hasNotifications:g=!1,disableHighlight:S=!1,onClick:F,children:z,className:X,...G}=n,re=rr(),{isOpen:de}=(0,t.useContext)($a),Se=t.createElement(es.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!g,className:xe()({[re.closedItemIcon]:!de})},t.createElement(u,{fontSize:"small"})),Pe=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:re.iconContainer},Se),d&&t.createElement(le.Z,{variant:"subtitle2",className:re.label},d),t.createElement("div",{className:re.secondaryAction},z)),Le=de?Pe:Se,ct={onClick:F,className:xe()(X,re.root,de?re.open:re.closed,Gr(n)&&re.buttonItem,{[re.highlightable]:!S})};return Gr(n)?t.createElement("button",{"aria-label":d,...ct,ref:o},Le):t.createElement(ls,{...ct,activeClassName:re.selected,to:n.to?n.to:"",ref:o,"aria-label":d||n.to,...G},Le)}),cs=({children:n,...o})=>{const u=rr(),[d,g]=(0,t.useState)(!1),S=(0,gn.TH)(),F=ss(n,S),z=(0,Ge.Z)(de=>de.breakpoints.down("sm")),X=()=>{g(!0)},G=()=>{g(!1)},re=()=>z?d?t.createElement(ns.Z,{fontSize:"small",className:u.submenuArrow}):t.createElement(as.Z,{fontSize:"small",className:u.submenuArrow}):!d&&t.createElement(ts.Z,{fontSize:"small",className:u.submenuArrow});return t.createElement(Zr.Provider,{value:{isHoveredOn:d,setIsHoveredOn:g}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:G,onTouchStart:d?G:X,onMouseEnter:X,className:xe()(d&&u.highlighted)},t.createElement(jr,{className:F?u.selected:"",...o},re()),d&&n))},Kr=(0,t.forwardRef)((n,o)=>{const[u]=(0,c.useElementFilter)(n.children,d=>d.getElements().filter(g=>g.type===is));return u?t.createElement(cs,{...n},u):t.createElement(jr,{...n,ref:o})});function dl(n){const[o,u]=useState(""),d=rr(),g=n.icon?n.icon:SearchIcon,S=()=>{n.onSearch(o),u("")},F=re=>{re.key==="Enter"&&(re.preventDefault(),S())},z=re=>{u(re.target.value)},X=re=>{re.preventDefault(),re.stopPropagation()},G=re=>{S(),re.preventDefault()};return React.createElement("div",{className:d.searchRoot},React.createElement(Kr,{icon:g,to:n.to,onClick:G,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:o,onClick:X,onChange:z,onKeyDown:F,className:d.searchContainer,InputProps:{disableUnderline:!0,className:d.searchField},inputProps:{className:d.searchFieldHTMLInput}})))}const fl=(0,ar.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),ml=(0,ar.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),us=(0,ar.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),ds=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),hl=(0,ar.Z)("div")(({theme:n})=>{const o=ds(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":o,"&:hover":o}}),gl=()=>{const n=rr(),{isOpen:o,setOpen:u}=useContext(SidebarContext);if(useMediaQuery(S=>S.breakpoints.down("md"),{noSsr:!0}))return null;const g=()=>{u(!o)};return React.createElement("button",{onClick:g,className:n.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:n.arrows},o?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},fs=(0,i.Z)(n=>({introCard:{color:"#b5b5b5",fontSize:12,width:Wt.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:Wt.iconPadding,paddingRight:Wt.iconPadding},introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:12},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:4,"&:hover":{color:n.palette.linkHover,transition:n.transitions.create("color",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:12}}),{name:"BackstageSidebarIntro"});function ms(n){const o=fs(),{text:u,onClose:d}=n,g=()=>d();return React.createElement("div",{className:o.introCard},React.createElement(Typography,{variant:"subtitle2"},u),React.createElement("div",{className:o.introDismiss},React.createElement(Link,{component:"button",onClick:g,underline:"none",className:o.introDismissLink},React.createElement(CloseIcon,{className:o.introDismissIcon}),React.createElement(Typography,{component:"span",className:o.introDismissText},"Dismiss"))))}const Yr=n=>{const{text:o,onDismiss:u}=n,[d,g]=useState(!1),S=()=>{g(!0)};return React.createElement(Collapse,{in:!d,onExited:u},React.createElement(ms,{text:o,onClose:S}))},hs=null,gs="And your recently viewed plugins will pop up here!";function pl(n){const{isOpen:o}=useContext(SidebarContext),u={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,g]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:S,recentlyViewedItemsDismissed:F}=d!=null?d:{},z=()=>{g(G=>({...u,...G,starredItemsDismissed:!0}))},X=()=>{g(G=>({...u,...G,recentlyViewedItemsDismissed:!0}))};return o?React.createElement(React.Fragment,null,!S&&React.createElement(React.Fragment,null,React.createElement(Yr,{text:hs,onDismiss:z}),React.createElement(SidebarDivider,null)),!F&&React.createElement(Yr,{text:gs,onDismiss:X})):null}const ps=(0,i.Z)(n=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:n.spacing(3),paddingBottom:n.spacing(3),paddingLeft:n.spacing(2),paddingRight:n.spacing(2),[n.breakpoints.up("sm")]:{paddingLeft:n.spacing(3),paddingRight:n.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function Jr(n){const{className:o,stretch:u,noPadding:d,children:g,...S}=n,{contentRef:F}=pr(),z=ps();return t.createElement("article",{ref:F,tabIndex:-1,...S,className:xe()(z.root,o,{[z.stretch]:u,[z.noPadding]:d})},g)}var ys=e(6487),Es=e(99152);const vs=(0,i.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3)},defaultTab:{padding:n.spacing(3,3),...n.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:n.palette.text.secondary},selected:{color:n.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:n.palette.background.default,color:n.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function Qr(n){const{tabs:o,onChange:u,selectedIndex:d}=n,[g,S]=(0,t.useState)(d!=null?d:0),F=vs(),z=(X,G)=>{d===void 0&&S(G),u&&u(G)};return(0,t.useEffect)(()=>{d!==void 0&&S(d)},[d]),t.createElement("div",{className:F.tabsWrapper},t.createElement(Es.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:z,value:g},o.map((X,G)=>t.createElement(ys.Z,{...X.tabProps,"data-testid":`header-tab-${G}`,label:X.label,key:X.id,value:G,className:F.defaultTab,classes:{selected:F.selected,root:F.tabRoot}}))))}function As(n){var z,X,G;const o=(0,gn.UO)(),d=n.map(({path:re,children:de})=>({caseSensitive:!1,path:`${re}/*`,element:de})).sort((re,de)=>de.path.replace(/\/\*$/,"").localeCompare(re.path.replace(/\/\*$/,""))),g=(z=(0,gn.V$)(d))!=null?z:n[0].children,[S]=(X=(0,gn.fp)(d,`/${o["*"]}`))!=null?X:[],F=S?n.findIndex(re=>`${re.path}/*`===S.route.path):0;return{index:F===-1?0:F,element:g,route:(G=n[F])!=null?G:n[0]}}function Xr(n){const{routes:o}=n,u=(0,gn.s0)(),{index:d,route:g,element:S}=As(o),F=(0,t.useMemo)(()=>o.map(X=>({id:X.path,label:X.title,tabProps:X.tabProps})),[o]),z=X=>u(o[X].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Qr,{tabs:F,selectedIndex:d,onChange:z}),t.createElement(Jr,null,t.createElement(hr.q,{title:g.title}),S))}const yr=()=>null;(0,c.attachComponentData)(yr,"core.gatherMountPoints",!0);function kr(n){const o=t.createElement(yr,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(u=>{if(!(0,t.isValidElement)(u))return[];if(u.type===t.Fragment)return kr(u.props.children);if(u.type!==o)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:g,children:S,tabProps:F}=u.props;return[{path:d,title:g,children:S,tabProps:F}]})}function Rs(n){const o=kr(n.children);return t.createElement(Xr,{routes:o})}Rs.Route=yr;const Ss=(0,i.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Cs(n){const{value:o,subvalue:u}=n,d=Ss();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},o),t.createElement("div",{className:d.subvalue},u))}var Ts=e(21070),Ps=e(90324),Is=e(98281),Ls=e(48049),qr=e(51209),_r=e(33375),Os=e(44233),xs=e(27604),Er=e(36444),bs=e(37971),Ds=e(59709),Fs=e(17373),Bs=e(3702),Ms=e(93111),or=e(67222);const Ns=(0,i.Z)(n=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:n.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:"60px",justifyContent:"space-between",borderBottom:`1px solid ${n.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:n.spacing(2)}}}),{name:"BackstageTableFilters"}),Zs=n=>{var X;const o=Ns(),{onChangeFilters:u}=n,[d,g]=(0,t.useState)({...n.selectedFilters}),[S,F]=(0,t.useState)(!1),z=()=>{g({}),F(G=>!G)};return(0,t.useEffect)(()=>{u(d)},[d,u]),t.createElement("div",{className:o.root},t.createElement("div",{className:o.header},t.createElement("div",{className:o.value},"Filters"),t.createElement(l.Z,{color:"primary",onClick:z},"Clear all")),t.createElement("div",{className:o.filters},((X=n.filters)==null?void 0:X.length)&&n.filters.map(G=>t.createElement(ie,{triggerReset:S,key:G.element.label,...G.element,selected:d[G.element.label],onChange:re=>g({...d,[G.element.label]:re})}))))},$s={Add:(0,t.forwardRef)((n,o)=>t.createElement(Ts.Z,{...n,ref:o})),Check:(0,t.forwardRef)((n,o)=>t.createElement(Is.Z,{...n,ref:o})),Clear:(0,t.forwardRef)((n,o)=>t.createElement(_r.Z,{...n,ref:o})),Delete:(0,t.forwardRef)((n,o)=>t.createElement(Os.Z,{...n,ref:o})),DetailPanel:(0,t.forwardRef)((n,o)=>t.createElement(qr.Z,{...n,ref:o})),Edit:(0,t.forwardRef)((n,o)=>t.createElement(xs.Z,{...n,ref:o})),Export:(0,t.forwardRef)((n,o)=>t.createElement(Bs.Z,{...n,ref:o})),Filter:(0,t.forwardRef)((n,o)=>t.createElement(Er.Z,{...n,ref:o})),FirstPage:(0,t.forwardRef)((n,o)=>t.createElement(bs.Z,{...n,ref:o})),LastPage:(0,t.forwardRef)((n,o)=>t.createElement(Ds.Z,{...n,ref:o})),NextPage:(0,t.forwardRef)((n,o)=>t.createElement(qr.Z,{...n,ref:o})),PreviousPage:(0,t.forwardRef)((n,o)=>t.createElement(Ls.Z,{...n,ref:o})),ResetSearch:(0,t.forwardRef)((n,o)=>t.createElement(_r.Z,{...n,ref:o})),Search:(0,t.forwardRef)((n,o)=>t.createElement(Er.Z,{...n,ref:o})),SortArrow:(0,t.forwardRef)((n,o)=>t.createElement(Ps.Z,{...n,ref:o})),ThirdStateCheck:(0,t.forwardRef)((n,o)=>t.createElement(Fs.Z,{...n,ref:o})),ViewColumn:(0,t.forwardRef)((n,o)=>t.createElement(Ms.Z,{...n,ref:o}))};function eo(n,o){const u=o.split(".");let d=n[u[0]];for(let g=1;g<u.length;++g){if(d===void 0)return d;const S=u[g];d=d[S]}return d}const Us=(0,Yt.Z)(n=>({header:{padding:n.spacing(1,2,1,2.5),borderTop:`1px solid ${n.palette.grey.A100}`,borderBottom:`1px solid ${n.palette.grey.A100}`,color:n.palette.textSubtle,fontWeight:n.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(or.W$),to=(0,Yt.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(or.UW),ws=(0,i.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),zs=(0,i.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Ws(n,o){return n.map(u=>{const d={};let g=u.cellStyle||{};if(u.highlight)if(d.color=o.palette.textContrast,typeof g=="object")g.fontWeight=o.typography.fontWeightBold;else{const S=g;g=(F,z,X)=>({...S(F,z,X),fontWeight:o.typography.fontWeightBold})}return{...u,headerStyle:d,cellStyle:g}})}function Hs(n,o){return(0,fa.transform)(n,(u,d,g)=>{(0,fa.isEqual)(d,o[g])||(u[g]=d)})}const no={search:"",filtersOpen:!1,filters:{}};function Vs(n){const{toolbarRef:o,setSearch:u,hasFilters:d,selectedFiltersLength:g,toggleFilters:S}=n,F=ws(),z=(0,t.useCallback)(X=>{n.onSearchChanged(X),u(X)},[n,u]);return d?t.createElement("div",{className:F.root},t.createElement("div",{className:F.root},t.createElement(b.Z,{onClick:S,"aria-label":"filter list"},t.createElement(Er.Z,null)),t.createElement(le.Z,{className:F.title},"Filters (",g,")")),t.createElement(to,{...n,ref:o,onSearchChanged:z})):t.createElement(to,{...n,ref:o,onSearchChanged:z})}function Gs(n){const{data:o,columns:u,options:d,title:g,subtitle:S,filters:F,initialState:z,emptyContent:X,onStateChange:G,...re}=n,de=zs(),Se=(0,x.Z)(),Pe={...no,...z},[Le,ct]=(0,t.useState)(Pe.filtersOpen),Lt=(0,t.useCallback)(()=>ct(_t=>!_t),[ct]),[Xt,Ht]=(0,t.useState)(0),[at,Ct]=(0,t.useState)(o),[Ot,kt]=(0,t.useState)(Pe.filters),Un=Ws(u,Se),[pn,wa]=(0,t.useState)(Pe.search);(0,t.useEffect)(()=>{if(G){const _t=Hs({search:pn,filtersOpen:Le,filters:Ot},no);G(_t)}},[pn,Le,Ot,G]);const St={headerStyle:{textTransform:"uppercase"}},wn=(0,t.useCallback)(_t=>{var ln;return(ln=u.find(yn=>yn.title===_t))==null?void 0:ln.field},[u]);(0,t.useEffect)(()=>{if(typeof o=="function")return;if(!Ot){Ct(o);return}const _t=Object.values(Ot);if(o&&_t.flat().length){const ln=o.filter(yn=>!!Object.entries(Ot).filter(([,_n])=>!!_n.length).every(([_n,jt])=>{const Kt=eo(yn,wn(_n));return Array.isArray(Kt)&&Array.isArray(jt)?Kt.some(ha=>jt.includes(ha)):Array.isArray(Kt)?Kt.includes(jt):Array.isArray(jt)?jt.includes(Kt):Kt===jt}));Ct(ln)}else Ct(o);Ht(_t.flat().length)},[o,Ot,wn]);const Cr=(_t,ln)=>{const yn=jt=>{const Kt=new Set,ha=ea=>{ea!=null&&Kt.add(ea)};return ln&&ln.forEach(ea=>{const ga=eo(ea,wn(jt));Array.isArray(ga)?ga.forEach(ha):ha(ga)}),Kt},_n=jt=>({placeholder:"All results",label:jt.column,multiple:jt.type==="multiple-select",items:[...yn(jt.column)].sort().map(Kt=>({label:Kt,value:Kt}))});return _t.map(jt=>({type:jt.type,element:_n(jt)}))},qn=!!(F==null?void 0:F.length),Tr=(0,t.useCallback)(_t=>t.createElement(Vs,{setSearch:wa,hasFilters:qn,selectedFiltersLength:Xt,toggleFilters:Lt,..._t}),[Lt,qn,Xt,wa]),ir=typeof o!="function"&&o.length===0,lr=u.length,Pr=(0,t.useCallback)(_t=>X&&ir?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:lr},X))):t.createElement(or.os,{..._t}),[ir,X,lr]);return t.createElement("div",{className:de.root},Le&&o&&typeof o!="function"&&(F==null?void 0:F.length)&&t.createElement(Zs,{filters:Cr(F,o),selectedFilters:Ot,onChangeFilters:kt}),t.createElement(or.ZP,{components:{Header:Us,Toolbar:Tr,Body:Pr},options:{...St,...d},columns:Un,icons:$s,title:t.createElement(t.Fragment,null,t.createElement(le.Z,{variant:"h5",component:"h3"},g),S&&t.createElement(le.Z,{color:"textSecondary",variant:"body1"},S)),data:typeof o=="function"?o:at,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...re}))}const yl=n=>{const{children:o,value:u,index:d,...g}=n;return React.createElement("div",{role:"tabpanel",hidden:u!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...g},u===d&&React.createElement(Box,{p:3},o))},js=(0,i.Z)(()=>({root:{color:"#6E6E6E",overflow:"visible",fontSize:"1.5rem",textAlign:"center",borderRadius:"50%",backgroundColor:"#E6E6E6",marginLeft:n=>n.isNext?"auto":"0",marginRight:n=>n.isNext?"0":"10px","&:hover":{backgroundColor:"#E6E6E6",opacity:"1"}}}),{name:"BackstageTabIcon"}),El=n=>{const o=js(n),{ariaLabel:u,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:o.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":u},n.children)},Ks=(n,o)=>o?n?"20px":"0":"40px",Ys=(0,i.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:o=>Ks(o.isFirstNav,o.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}})),vl=n=>{const o=Ys(n),{isFirstNav:u,isFirstIndex:d,...g}=n;return React.createElement(Tab,{className:o.root,disableRipple:!0,...g})},Js=(0,i.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Al=n=>{const o=Js(n);return React.createElement(Tabs,{classes:o,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},Qs=(0,i.Z)(n=>({root:{flexGrow:1,width:"100%"},styledTabs:{backgroundColor:n.palette.background.paper},appbar:{boxShadow:"none",backgroundColor:n.palette.background.paper,paddingLeft:"10px",paddingRight:"10px"}}),{name:"BackstageTabs"});function Rl(n){const{tabs:o}=n,u=Qs(),[d,g]=useState([0,0]),[S,F]=useState(0),[z,X]=useState(0),[G,re]=useState([[]]),de=useRef(),{width:Se}=useWindowSize(),Pe=(Ht,at)=>{g([S,at])},Le=()=>{F(S-1)},ct=()=>{F(S+1)},Lt=()=>S+1<G.length;useEffect(()=>{const at=S===0?1:2,Ct=de.current.offsetWidth-20-at*30,Ot=d[0]*z+d[1],kt=Math.floor(Ct/170);X(kt),re(chunkArray(o,kt)),g([Math.floor(Ot/kt),Ot%kt])},[Se,o]);const Xt=S===d[0]?d[1]:!1;return React.createElement("div",{className:u.root},React.createElement(AppBar,{ref:de,className:u.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Xt,onChange:Pe,selectionFollowsFocus:!0},S!==0&&React.createElement(StyledIcon,{onClick:Le,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),G[S].map((Ht,at)=>React.createElement(StyledTab,{value:at,isFirstIndex:at===0,isFirstNav:S===0,key:at,icon:Ht.icon||void 0,label:Ht.label||void 0})),Lt()&&React.createElement(StyledIcon,{isNext:!0,onClick:ct,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Xt!==!1?G[S].map((Ht,at)=>React.createElement(TabPanel,{key:at,value:at,index:Xt},Ht.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},G[d[0]][d[1]].content))}var Sl=e(44311);function Xs(n,o){const u=n[n.length-1];if(!!u)return u>=.9?o.palette.status.ok:u>=.5?o.palette.status.warning:o.palette.status.error}function Cl(n){var u;const o=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(u=n.color)!=null?u:Xs(n.data,o)})):null}const ks=n=>(0,i.Z)(o=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:o.spacing(2),textAlign:n.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:o.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),_s=({title:n="Unknown page",className:o})=>t.createElement(le.Z,{variant:"h4",component:"h2",className:o,"data-testid":"header-title"},n);function ei(n){const{description:o,title:u,titleComponent:d=void 0,children:g,textAlign:S="left"}=n,F=ks({textAlign:S})(),z=d||t.createElement(_s,{title:u,className:F.title});return t.createElement(t.Fragment,null,t.createElement(hr.q,{title:u}),t.createElement("div",{className:F.container},t.createElement("div",{className:F.leftItemsBox},z,o&&t.createElement(le.Z,{className:F.description,variant:"body2"},o)),t.createElement("div",{className:F.rightItemsBox},g)))}var ti=e(29788);const ni=(0,i.Z)(n=>({micDrop:{maxWidth:"60%",position:"absolute",bottom:n.spacing(2),right:n.spacing(2),[n.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",bottom:"unset",right:"unset",margin:`${n.spacing(10)}px auto ${n.spacing(4)}px`}}}),{name:"BackstageErrorPageMicDrop"}),ai=()=>{const n=ni();return t.createElement("img",{src:ti,className:n.micDrop,alt:"Girl dropping mic from her hands"})},ri=(0,i.Z)(n=>({container:{padding:n.spacing(8),[n.breakpoints.down("xs")]:{padding:n.spacing(2)}},title:{paddingBottom:n.spacing(5),[n.breakpoints.down("xs")]:{paddingBottom:n.spacing(4),fontSize:32}},subtitle:{color:n.palette.textSubtle}}),{name:"BackstageErrorPage"});function oi(n){const{status:o,statusMessage:u,additionalInfo:d,supportUrl:g}=n,S=ri(),F=(0,gn.s0)(),z=Br();return t.createElement(ze.Z,{container:!0,spacing:0,className:S.container},t.createElement(ai,null),t.createElement(ze.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(le.Z,{"data-testid":"error",variant:"body1",className:S.subtitle},"ERROR ",o,": ",u),t.createElement(le.Z,{variant:"body1",className:S.subtitle},d),t.createElement(le.Z,{variant:"h2",className:S.title},"Looks like someone dropped the mic!"),t.createElement(le.Z,{variant:"h6"},t.createElement(O,{to:"#","data-testid":"go-back-link",onClick:()=>F(-1)},"Go back"),"... or please"," ",t.createElement(O,{to:g||z.url},"contact support")," if you think this is a bug.")))}var si=e(16173);const ii=(0,Yt.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(le.Z),vr=(0,Yt.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(hn.Z);function li(n){const{children:o,...u}=n,[d,g]=t.useState(null),S=t.Children.toArray(o),[F,z,...X]=S,G=X.length?X.pop():S[S.length-1],re=S.length>3,de=Le=>{g(Le.currentTarget)},Se=()=>{g(null)},Pe=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(si.Z,{"aria-label":"breadcrumb",...u},S.length>1&&t.createElement(vr,{clone:!0},F),S.length>2&&t.createElement(vr,{clone:!0},z),re&&t.createElement(ii,{onClick:de},"..."),t.createElement(hn.Z,{style:{fontStyle:"italic"}},G)),t.createElement(br.ZP,{open:Pe,anchorEl:d,onClose:Se,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(he.Z,null,X.map((Le,ct)=>t.createElement(Fe.Z,{key:ct,button:!0},t.createElement(vr,{clone:!0},Le))))))}const ci=(0,i.Z)(n=>({header:{gridArea:"pageHeader",padding:n.spacing(3),width:"100%",boxShadow:n.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:n.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[n.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto"},title:{color:n.palette.bursts.fontColor,wordBreak:"break-all",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.palette.bursts.fontColor,opacity:.8,display:"inline-block",marginTop:n.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:n.spacing(1),color:n.palette.bursts.fontColor},breadcrumb:{color:n.palette.bursts.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-n.spacing(.3),marginBottom:n.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-n.spacing(.3),marginBottom:n.spacing(.3)}}),{name:"BackstageHeader"}),ui=({type:n,typeLink:o,classes:u,pageTitle:d})=>n?o?t.createElement(li,{className:u.breadcrumb},t.createElement(O,{to:o},n),t.createElement(le.Z,null,d)):t.createElement(le.Z,{className:u.type},n):null,di=({pageTitle:n,classes:o,tooltip:u})=>{const d=t.createElement(le.Z,{className:o.title,variant:"h1"},n);return u?t.createElement(D.ZP,{title:u,placement:"top-start"},d):d},fi=({classes:n,subtitle:o})=>o?typeof o!="string"?t.createElement(t.Fragment,null,o):t.createElement(le.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},o):null;function ao(n){const{children:o,pageTitleOverride:u,style:d,subtitle:g,title:S,tooltip:F,type:z,typeLink:X}=n,G=ci(),de=(0,c.useApi)(c.configApiRef).getOptionalString("app.title")||"Backstage",Se=u||S,Pe=S||u,Le=`${Se} | %s | ${de}`,ct=`${Se} | ${de}`;return t.createElement(t.Fragment,null,t.createElement(hr.q,{titleTemplate:Le,defaultTitle:ct}),t.createElement("header",{style:d,className:G.header},t.createElement(hn.Z,{className:G.leftItemsBox},t.createElement(ui,{classes:G,type:z,typeLink:X,pageTitle:Pe}),t.createElement(di,{classes:G,pageTitle:Pe,tooltip:F}),t.createElement(fi,{classes:G,subtitle:g})),t.createElement(ze.Z,{container:!0,className:G.rightItemsBox,spacing:4},o)))}const mi=(0,i.Z)(n=>({root:{textAlign:"left"},label:{color:n.palette.common.white,fontWeight:"bold",letterSpacing:0,fontSize:n.typography.fontSize,marginBottom:n.spacing(1)/2,lineHeight:1},value:{color:"rgba(255, 255, 255, 0.8)",fontSize:n.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),hi=({value:n,className:o})=>t.createElement(le.Z,{className:o},n);function gi(n){const{label:o,value:u,url:d}=n,g=mi(),S=t.createElement(hi,{className:g.value,value:u||"<Unknown>"});return t.createElement(ze.Z,{item:!0},t.createElement("span",{className:g.root},t.createElement(le.Z,{className:g.label},o),d?t.createElement(O,{to:d},S):S))}const pi={hour:"2-digit",minute:"2-digit"};function ro(n){const o=new Date,u=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const g=n.getConfigArray("homepage.clocks");for(const S of g)if(S.has("label")&&S.has("timezone")){let F=S.getString("label");const z={timeZone:S.getString("timezone"),...pi};try{new Date().toLocaleString(u,z)}catch{console.warn(`The timezone ${z.timeZone} is invalid. Defaulting to GMT`),z.timeZone="GMT",F="GMT"}const X=o.toLocaleTimeString(u,z);d.push({time:X,label:F})}return d}function Tl(n){const o=useApi(configApiRef),u=[],[d,g]=React.useState(u);return React.useEffect(()=>{g(ro(o));const S=setInterval(()=>{g(ro(o))},1e3);return()=>{clearInterval(S)}},[o]),d.length!==0?React.createElement(React.Fragment,null,d.map(S=>React.createElement(HeaderLabel,{label:S.label,value:S.time,key:S.label}))):null}const yi=n=>(0,v.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),Ei=(0,i.Z)(yi,{name:"BackstageItemCardHeader"});function vi(n){const{title:o,subtitle:u,children:d}=n,g=Ei(n);return t.createElement("div",{className:g.root},u&&t.createElement(le.Z,{variant:"subtitle2",component:"h3"},u),o&&t.createElement(le.Z,{variant:"h6",component:"h4"},o),d)}function Pl(n){const{description:o,tags:u,title:d,type:g,subtitle:S,label:F,onClick:z,href:X}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:S||g})),React.createElement(CardContent,null,(u==null?void 0:u.length)?React.createElement(Box,null,u.map((G,re)=>React.createElement(Chip,{size:"small",label:G,key:re}))):null,o),React.createElement(CardActions,null,!X&&React.createElement(Button,{to:"#",onClick:z,color:"primary"},F),X&&React.createElement(Button,{to:X,color:"primary"},F)))}const Ai=n=>(0,v.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),Ri=(0,i.Z)(Ai,{name:"BackstageItemCardGrid"});function Si(n){const{children:o,...u}=n,d=Ri(u);return t.createElement("div",{className:d.root,...u},o)}var Ci=e(41547);const Ti=(0,i.Z)(()=>({root:({isMobile:n})=>({display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:n?"100%":"100vh",overflowY:"auto"})}),{name:"BackstagePage"});function oo(n){const{themeId:o,children:u}=n,{isMobile:d}=(0,t.useContext)(ma),g=Ti({isMobile:d});return t.createElement(Ci.Z,{theme:S=>({...S,page:S.getPageTheme({themeId:o})})},t.createElement("div",{className:g.root},u))}function Pi(n){const{themeId:o,children:u,...d}=n;return t.createElement(oo,{themeId:o},t.createElement(ao,{...d}),u)}var an=e(30195);const Il=an.z.object({providerInfo:an.z.object({}).catchall(an.z.unknown()).optional(),profile:an.z.object({email:an.z.string().optional(),displayName:an.z.string().optional(),picture:an.z.string().optional()}),backstageIdentity:an.z.object({token:an.z.string(),identity:an.z.object({type:an.z.literal("user"),userEntityRef:an.z.string(),ownershipEntityRefs:an.z.array(an.z.string())})})}),so={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Ii(n){const o=new Date(Date.now()+so.defaultTokenExpiryMillis);if(!n)return o;const[u,d,g]=n.split("."),S=JSON.parse(atob(d));return typeof S.exp!="number"?o:new Date(S.exp*1e3-so.tokenExpiryMarginMillis)}class Ll{constructor(o){ae(this,"options");ae(this,"abortController");ae(this,"state");this.options=o,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:o}=this.getSessionSync(),u=o.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(u);if(!d)throw new TypeError(`Invalid user entity reference "${u}"`);return d[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const o=this.state.type==="active"?this.state.session:void 0,u=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:Ii(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:u,previous:o},u}async fetchSession(){const o=await this.options.discoveryApi.getBaseUrl("auth"),u=await fetch(`${o}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!u.ok)throw await ResponseError.fromResponse(u);return proxiedSessionSchema.parse(await u.json())}}const Ol=n=>{const o=useApi(discoveryApiRef),[{status:u,error:d},{execute:g}]=useAsync(async()=>{const S=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:o});await S.start(),n.onSignInSuccess(S)});return useMountEffect(g),u==="loading"?React.createElement(Progress,null):d?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:d}):null},Li=(0,i.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),Ar=({children:n})=>{const o=Li();return t.createElement(ze.Z,{component:"li",item:!0,classes:o},n)};class Rr{getUserId(){return"guest"}async getIdToken(){}getProfile(){return{email:"guest@example.com",displayName:"Guest"}}async getProfileInfo(){return{email:"guest@example.com",displayName:"Guest"}}async getBackstageIdentity(){const o="user:default/guest";return{type:"user",userEntityRef:o,ownershipEntityRefs:[o]}}async getCredentials(){return{}}async signOut(){}}function Oi(n){const[o,u,d]=n.split(".");return JSON.parse(atob(u))}class Sr{constructor(o){this.result=o}getUserId(){return this.result.userId}static fromResult(o){return new Sr(o)}async getIdToken(){var o,u;return(u=(o=this.result).getIdToken)==null?void 0:u.call(o)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const o=await this.getIdToken();if(!o){const g=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:g,ownershipEntityRefs:[g]}}const{sub:u,ent:d}=Oi(o);return{type:"user",userEntityRef:u,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var u,d;return{token:await((d=(u=this.result).getIdToken)==null?void 0:d.call(u))}}async signOut(){var o,u;return(u=(o=this.result).signOut)==null?void 0:u.call(o)}}class Ua{constructor(o,u,d){ae(this,"profilePromise");this.identity=o,this.authApi=u,this.profile=d}static createGuest(){return new Rr}static fromLegacy(o){return Sr.fromResult(o)}static create(o){return new Ua(o.identity,o.authApi,o.profile)}getUserId(){const o=this.identity.userEntityRef,u=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(o);if(!u)throw new TypeError(`Invalid user entity reference "${o}"`);return u[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(o){throw this.profilePromise=void 0,o}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const xi={Component:({config:n,onSignInSuccess:o})=>{const{apiRef:u,title:d,message:g}=n,S=(0,c.useApi)(u),F=(0,c.useApi)(c.errorApiRef),z=async()=>{try{const X=await S.getBackstageIdentity({instantPopup:!0});if(!X)throw new Error(`The ${d} provider is not configured to support sign-in`);const G=await S.getProfile();o(Ua.create({identity:X.identity,profile:G,authApi:S}))}catch(X){F.post(new rn.SP("Login failed",X))}};return t.createElement(Ar,null,t.createElement(Nn,{variant:"fullHeight",title:d,actions:t.createElement(l.Z,{color:"primary",variant:"outlined",onClick:z},"Sign In")},t.createElement(le.Z,{variant:"body1"},g)))},loader:async(n,o)=>{const u=n.get(o),d=await u.getBackstageIdentity({optional:!0});if(!d)return;const g=await u.getProfile();return Ua.create({identity:d.identity,profile:g,authApi:u})}},bi={Component:({onSignInSuccess:n})=>t.createElement(Ar,null,t.createElement(Nn,{title:"Guest",variant:"fullHeight",actions:t.createElement(l.Z,{color:"primary",variant:"outlined",onClick:()=>n(new Rr)},"Enter")},t.createElement(le.Z,{variant:"body1"},"Enter as a Guest User.",t.createElement("br",null),"You will not have a verified identity,",t.createElement("br",null),"meaning some features might be unavailable."))),loader:async()=>new Rr};var Di=e(94106),io=e(86619),lo=e(74828),Fi=e(45455),Bi=e.n(Fi);const Mi=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Ni=(0,i.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),co=n=>{const{ref:o,...u}=n;return{inputRef:o,...u}},Zi={Component:({onSignInSuccess:n})=>{const o=Ni(),{register:u,handleSubmit:d,formState:g}=(0,Di.cI)({mode:"onChange"}),{errors:S}=g,F=({userId:z})=>{n(Ua.fromLegacy({userId:z,profile:{email:`${z}@example.com`}}))};return t.createElement(Ar,null,t.createElement(Nn,{title:"Custom User",variant:"fullHeight"},t.createElement(le.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:o.form,onSubmit:d(F)},t.createElement(Qn.Z,null,t.createElement(io.Z,{...co(u("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(S.userId)}),S.userId&&t.createElement(lo.Z,{error:!0},S.userId.message)),t.createElement(Qn.Z,null,t.createElement(io.Z,{...co(u("idToken",{required:!1,validate:z=>!z||Mi.test(z)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(S.idToken)}),S.idToken&&t.createElement(lo.Z,{error:!0},S.idToken.message)),t.createElement(l.Z,{type:"submit",color:"primary",variant:"outlined",className:o.button,disabled:!(g==null?void 0:g.isDirty)||!Bi()(S)},"Continue"))))},loader:async()=>{}},sr="@backstage/core:SignInPage:provider",uo={guest:bi,custom:Zi,common:xi};function fo(n,o){if(n in o)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function Nl(n){return n.reduce((u,d)=>{if(typeof d=="string")return fo(d,u),u[d]={components:uo[d],id:d},u;const{id:g}=d;return fo(g,u),u[g]={components:uo.common,id:g,config:d},u},{})}const Zl=(n,o)=>{const u=useApi(errorApiRef),d=useApiHolder(),[g,S]=useState(!0),F=useCallback(X=>{o(IdentityApiSignOutProxy.from({identityApi:X,signOut:async()=>{var G;localStorage.removeItem(sr),await((G=X.signOut)==null?void 0:G.call(X))}}))},[o]);useLayoutEffect(()=>{var de;if(!g)return;const X=localStorage.getItem(sr);if(X===null){S(!1);return}const G=n[X];if(!G){S(!1);return}let re=!1;return G.components.loader(d,(de=G.config)==null?void 0:de.apiRef).then(Se=>{re||(Se?F(Se):S(!1))}).catch(Se=>{re||(localStorage.removeItem(sr),u.post(Se),S(!1))}),()=>{re=!0}},[g,u,o,d,n,F]);const z=useMemo(()=>Object.keys(n).map(X=>{const G=n[X],{Component:re}=G.components,de=Se=>{localStorage.setItem(sr,G.id),F(Se)};return React.createElement(re,{key:G.id,config:G.config,onSignInSuccess:de})}),[n,F]);return[g,z]},$i=({onSignInSuccess:n,providers:o=[],title:u,align:d="left"})=>{const g=useApi(configApiRef),S=useStyles(),F=getSignInProviders(o),[z,X]=useSignInProviders(F,n);return z?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:g.getString("app.title")}),React.createElement(Content,null,u&&React.createElement(ContentHeader,{title:u,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:S},X)))},Ui=({provider:n,auto:o,onSignInSuccess:u})=>{const d=useStyles(),g=useApi(n.apiRef),S=useApi(configApiRef),[F,z]=useState(),[X,G]=useState(!1),re=async({checkExisting:de,showPopup:Se})=>{try{let Pe;if(de&&(Pe=await g.getBackstageIdentity({optional:!0})),!Pe&&(Se||o)&&(G(!0),Pe=await g.getBackstageIdentity({instantPopup:!0}),!Pe))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Pe){G(!0);return}const Le=await g.getProfile();u(UserIdentity.create({identity:Pe.identity,authApi:g,profile:Le}))}catch(Pe){z(Pe),G(!0)}};return useMountEffect(()=>re({checkExisting:!0})),X?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:S.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:d},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{re({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),F&&F.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},F.message)))))):React.createElement(Progress,null)};function $l(n){return"provider"in n?React.createElement(Ui,{...n}):React.createElement($i,{...n})}const wi=(0,i.Z)(n=>({root:{padding:n.spacing(0,2,0,2.5),minHeight:n.spacing(3)},indicator:{backgroundColor:n.palette.info.main,height:n.spacing(.3)}}),{name:"BackstageTabbedCard"}),zi=(0,Yt.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(xn.Z);function Ul(n){const{slackChannel:o,errorBoundaryProps:u,children:d,title:g,deepLink:S,value:F,onChange:z}=n,X=wi(),[G,re]=useState(0),de=z||((Le,ct)=>re(ct));let Se;F?React.Children.map(d,Le=>{React.isValidElement(Le)&&(Le==null?void 0:Le.props.value)===F&&(Se=Le==null?void 0:Le.props.children)}):React.Children.map(d,(Le,ct)=>{React.isValidElement(Le)&&ct===G&&(Se=Le==null?void 0:Le.props.children)});const Pe=u||(o?{slackChannel:o}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Pe},g&&React.createElement(zi,{title:g}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:X,value:F||G,onChange:de},d),React.createElement(Divider,null),React.createElement(CardContent,null,Se),S&&React.createElement(BottomLink,{...S})))}const Wi=(0,i.Z)(n=>({root:{minWidth:n.spacing(6),minHeight:n.spacing(3),margin:n.spacing(0,2,0,0),padding:n.spacing(.5,0,.5,0),textTransform:"none","&:hover":{opacity:1,backgroundColor:"transparent",color:n.palette.text.primary}},selected:{fontWeight:"bold"}}),{name:"BackstageCardTab"});function wl(n){const{children:o,...u}=n,d=Wi();return React.createElement(Tab,{disableRipple:!0,classes:d,...u})}},88609:function(_,s,e){"use strict";e.d(s,{Os:function(){return f},fC:function(){return y}});var a=e(76241),t=e(2784);const c=(0,a.CT)("analytics-context"),f=()=>{const v=(0,t.useContext)(c);if(v===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const p=v.atVersion(1);if(p===void 0)throw new Error("No context found for version 1.");return p},y=v=>{const{attributes:p,children:m}=v,r={...f(),...p},A=(0,a.EI)({1:r});return t.createElement(c.Provider,{value:A},m)};function i(v,p){const m=l=>React.createElement(y,{attributes:p},React.createElement(v,{...l}));return m.displayName=`WithAnalyticsContext(${v.displayName||v.name||"Component"})`,m}},28461:function(_,s,e){"use strict";e.d(s,{f:function(){return a.fC},z:function(){return i}});var a=e(88609),t=e(27399),c=e(2784);class f{constructor(p,m={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=p,this.context=m}setContext(p){this.context=p}captureEvent(p,m,{value:l,attributes:r}={}){try{this.analyticsApi.captureEvent({action:p,subject:m,value:l,attributes:r,context:this.context})}catch(A){console.warn("Error during analytics event capture. %o",A)}}}function y(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function i(){const v=(0,c.useRef)(null),p=(0,a.Os)(),m=y();function l(){return v.current===null&&(v.current=new f(m)),v.current}const r=l();return r.setContext(p),r}},39135:function(_,s,e){"use strict";e.d(s,{CL:function(){return j},sM:function(){return t},$v:function(){return O},v_:function(){return q},hg:function(){return $},uB:function(){return Z},iW:function(){return v},bq:function(){return T},Ds:function(){return x},NW:function(){return b},VE:function(){return D},W0:function(){return ee},gP:function(){return ce},F4:function(){return f},ux:function(){return i},Kp:function(){return c},$4:function(){return Ee},p_:function(){return p},br:function(){return m},ZM:function(){return Ae},eC:function(){return l},D:function(){return y},gW:function(){return A},Yp:function(){return r},E6:function(){return Oe}});var a=e(86833),t;(function(ge){const Ge="SignedIn";ge.SignedIn=Ge;const Qe="SignedOut";ge.SignedOut=Qe})(t||(t={}));const c=(0,a.createApiRef)({id:"core.auth.google"}),f=(0,a.createApiRef)({id:"core.auth.github"}),y=(0,a.createApiRef)({id:"core.auth.okta"}),i=(0,a.createApiRef)({id:"core.auth.gitlab"}),v=(0,a.createApiRef)({id:"core.auth.auth0"}),p=(0,a.createApiRef)({id:"core.auth.microsoft"}),m=(0,a.createApiRef)({id:"core.auth.oauth2"}),l=(0,a.createApiRef)({id:"core.auth.oidc"}),r=(0,a.createApiRef)({id:"core.auth.saml"}),A=(0,a.createApiRef)({id:"core.auth.onelogin"}),T=(0,a.createApiRef)({id:"core.auth.bitbucket"}),Z=(0,a.createApiRef)({id:"core.auth.atlassian"}),O=(0,a.createApiRef)({id:"core.alert"}),q=(0,a.createApiRef)({id:"core.analytics"}),$=(0,a.createApiRef)({id:"core.apptheme"}),x=(0,a.createApiRef)({id:"core.config"}),b=(0,a.createApiRef)({id:"core.discovery"}),D=(0,a.createApiRef)({id:"core.error"});var j;(function(ge){ge[ge.None=0]="None";const Qe=1;ge[ge.Active=Qe]="Active"})(j||(j={}));const ee=(0,a.createApiRef)({id:"core.featureflags"}),ce=(0,a.createApiRef)({id:"core.fetch"}),Ee=(0,a.createApiRef)({id:"core.identity"}),Ae=(0,a.createApiRef)({id:"core.oauthrequest"}),Oe=(0,a.createApiRef)({id:"core.storage"})},27399:function(_,s,e){"use strict";e.d(s,{createApiFactory:function(){return a.createApiFactory},createApiRef:function(){return a.createApiRef},useApi:function(){return a.useApi},useApiHolder:function(){return a.useApiHolder},FeatureFlagState:function(){return t.CL},SessionState:function(){return t.sM},alertApiRef:function(){return t.$v},analyticsApiRef:function(){return t.v_},appThemeApiRef:function(){return t.hg},atlassianAuthApiRef:function(){return t.uB},auth0AuthApiRef:function(){return t.iW},bitbucketAuthApiRef:function(){return t.bq},configApiRef:function(){return t.Ds},discoveryApiRef:function(){return t.NW},errorApiRef:function(){return t.VE},featureFlagsApiRef:function(){return t.W0},fetchApiRef:function(){return t.gP},githubAuthApiRef:function(){return t.F4},gitlabAuthApiRef:function(){return t.ux},googleAuthApiRef:function(){return t.Kp},identityApiRef:function(){return t.$4},microsoftAuthApiRef:function(){return t.p_},oauth2ApiRef:function(){return t.br},oauthRequestApiRef:function(){return t.ZM},oidcAuthApiRef:function(){return t.eC},oktaAuthApiRef:function(){return t.D},oneloginAuthApiRef:function(){return t.gW},samlAuthApiRef:function(){return t.Yp},storageApiRef:function(){return t.E6}});var a=e(86833);e.o(a,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return a.FeatureFlagState}}),e.o(a,"SessionState")&&e.d(s,{SessionState:function(){return a.SessionState}}),e.o(a,"alertApiRef")&&e.d(s,{alertApiRef:function(){return a.alertApiRef}}),e.o(a,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return a.analyticsApiRef}}),e.o(a,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return a.appThemeApiRef}}),e.o(a,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return a.atlassianAuthApiRef}}),e.o(a,"attachComponentData")&&e.d(s,{attachComponentData:function(){return a.attachComponentData}}),e.o(a,"auth0AuthApiRef")&&e.d(s,{auth0AuthApiRef:function(){return a.auth0AuthApiRef}}),e.o(a,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return a.bitbucketAuthApiRef}}),e.o(a,"configApiRef")&&e.d(s,{configApiRef:function(){return a.configApiRef}}),e.o(a,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return a.createComponentExtension}}),e.o(a,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return a.createExternalRouteRef}}),e.o(a,"createPlugin")&&e.d(s,{createPlugin:function(){return a.createPlugin}}),e.o(a,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return a.createRoutableExtension}}),e.o(a,"createRouteRef")&&e.d(s,{createRouteRef:function(){return a.createRouteRef}}),e.o(a,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return a.discoveryApiRef}}),e.o(a,"errorApiRef")&&e.d(s,{errorApiRef:function(){return a.errorApiRef}}),e.o(a,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return a.featureFlagsApiRef}}),e.o(a,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return a.fetchApiRef}}),e.o(a,"getComponentData")&&e.d(s,{getComponentData:function(){return a.getComponentData}}),e.o(a,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return a.githubAuthApiRef}}),e.o(a,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return a.gitlabAuthApiRef}}),e.o(a,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return a.googleAuthApiRef}}),e.o(a,"identityApiRef")&&e.d(s,{identityApiRef:function(){return a.identityApiRef}}),e.o(a,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return a.microsoftAuthApiRef}}),e.o(a,"oauth2ApiRef")&&e.d(s,{oauth2ApiRef:function(){return a.oauth2ApiRef}}),e.o(a,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return a.oauthRequestApiRef}}),e.o(a,"oidcAuthApiRef")&&e.d(s,{oidcAuthApiRef:function(){return a.oidcAuthApiRef}}),e.o(a,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return a.oktaAuthApiRef}}),e.o(a,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return a.oneloginAuthApiRef}}),e.o(a,"samlAuthApiRef")&&e.d(s,{samlAuthApiRef:function(){return a.samlAuthApiRef}}),e.o(a,"storageApiRef")&&e.d(s,{storageApiRef:function(){return a.storageApiRef}}),e.o(a,"useApp")&&e.d(s,{useApp:function(){return a.useApp}}),e.o(a,"useElementFilter")&&e.d(s,{useElementFilter:function(){return a.useElementFilter}}),e.o(a,"useRouteRef")&&e.d(s,{useRouteRef:function(){return a.useRouteRef}}),e.o(a,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return a.useRouteRefParams}});var t=e(39135)},90515:function(_,s,e){"use strict";e.d(s,{T:function(){return t}});class a{constructor(f){if(this.config=f,!f.id.split(".").flatMap(i=>i.split("-")).every(i=>i.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${f.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function t(c){return new a(c)}},25182:function(_,s,e){"use strict";e.d(s,{n:function(){return a}});function a(t,c){return"id"in t?{api:t,deps:{},factory:()=>c}:t}},86833:function(_,s,e){"use strict";e.d(s,{useApi:function(){return a.h_},useApiHolder:function(){return a.I_},createApiRef:function(){return t.T},createApiFactory:function(){return y.n}});var a=e(5761),t=e(90515),c=e(16362),f=e.n(c);e.o(c,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return c.FeatureFlagState}}),e.o(c,"SessionState")&&e.d(s,{SessionState:function(){return c.SessionState}}),e.o(c,"alertApiRef")&&e.d(s,{alertApiRef:function(){return c.alertApiRef}}),e.o(c,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return c.analyticsApiRef}}),e.o(c,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return c.appThemeApiRef}}),e.o(c,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return c.atlassianAuthApiRef}}),e.o(c,"attachComponentData")&&e.d(s,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"auth0AuthApiRef")&&e.d(s,{auth0AuthApiRef:function(){return c.auth0AuthApiRef}}),e.o(c,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return c.bitbucketAuthApiRef}}),e.o(c,"configApiRef")&&e.d(s,{configApiRef:function(){return c.configApiRef}}),e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(s,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return c.discoveryApiRef}}),e.o(c,"errorApiRef")&&e.d(s,{errorApiRef:function(){return c.errorApiRef}}),e.o(c,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return c.featureFlagsApiRef}}),e.o(c,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return c.fetchApiRef}}),e.o(c,"getComponentData")&&e.d(s,{getComponentData:function(){return c.getComponentData}}),e.o(c,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return c.githubAuthApiRef}}),e.o(c,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return c.gitlabAuthApiRef}}),e.o(c,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return c.googleAuthApiRef}}),e.o(c,"identityApiRef")&&e.d(s,{identityApiRef:function(){return c.identityApiRef}}),e.o(c,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return c.microsoftAuthApiRef}}),e.o(c,"oauth2ApiRef")&&e.d(s,{oauth2ApiRef:function(){return c.oauth2ApiRef}}),e.o(c,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return c.oauthRequestApiRef}}),e.o(c,"oidcAuthApiRef")&&e.d(s,{oidcAuthApiRef:function(){return c.oidcAuthApiRef}}),e.o(c,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return c.oktaAuthApiRef}}),e.o(c,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return c.oneloginAuthApiRef}}),e.o(c,"samlAuthApiRef")&&e.d(s,{samlAuthApiRef:function(){return c.samlAuthApiRef}}),e.o(c,"storageApiRef")&&e.d(s,{storageApiRef:function(){return c.storageApiRef}}),e.o(c,"useApp")&&e.d(s,{useApp:function(){return c.useApp}}),e.o(c,"useElementFilter")&&e.d(s,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var y=e(25182)},16362:function(){},5761:function(_,s,e){"use strict";e.d(s,{I_:function(){return c},h_:function(){return f}});var a=e(2784),t=e(76241);function c(){const i=(0,t.Vt)("api-context");if(!i)throw new Error("API context is not available");const v=i.atVersion(1);if(!v)throw new Error("ApiContext v1 not available");return v}function f(i){const p=c().get(i);if(!p)throw new Error(`No implementation available for ${i}`);return p}function y(i){return function(p){const m=r=>{const A=c(),T={};for(const Z in i)if(i.hasOwnProperty(Z)){const O=i[Z],q=A.get(O);if(!q)throw new Error(`No implementation available for ${O}`);T[Z]=q}return React.createElement(p,{...r,...T})},l=p.displayName||p.name||"Component";return m.displayName=`withApis(${l})`,m}}},31311:function(_,s,e){"use strict";e.d(s,{useApp:function(){return a.q}});var a=e(32483),t=e(67229),c=e.n(t);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(_,s,e){"use strict";e.d(s,{q:function(){return t}});var a=e(76241);const t=()=>{const c=(0,a.Vt)("app-context");if(!c)throw new Error("App context is not available");const f=c.atVersion(1);if(!f)throw new Error("AppContext v1 not available");return f}},74181:function(_,s,e){"use strict";e.d(s,{R5:function(){return f},CO:function(){return A},P4:function(){return r},IY:function(){return y},vJ:function(){return $}});var a=e(76241);const t=(0,a.uW)("component-data-store",()=>new WeakMap),c="__backstage_data";function f(x,b,D){var ce;const j=x;let ee=(ce=j[c])!=null?ce:t.get(x);if(ee||(ee={map:new Map},Object.defineProperty(j,c,{enumerable:!1,configurable:!0,writable:!1,value:ee}),t.set(x,ee)),ee.map.has(b)){const Ee=x.displayName||x.name;throw new Error(`Attempted to attach duplicate data "${b}" to component "${Ee}"`)}ee.map.set(b,D)}function y(x,b){var ee;if(!x)return;const D=x.type;if(!D)return;const j=(ee=D[c])!=null?ee:t.get(D);if(!!j)return j.map.get(b)}var i=e(2784),v=e(88609),p=e(31311),m=e(82772);class l extends i.Component{constructor(){super(...arguments);ae(this,"state",{error:void 0});ae(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(b){return{error:b}}render(){const{error:b}=this.state,{app:D,plugin:j}=this.props,{ErrorBoundaryFallback:ee}=D.getComponents();return b?i.createElement(ee,{error:b,resetError:this.handleErrorReset,plugin:j}):this.props.children}}function r(x){const{component:b,mountPoint:D,name:j}=x;return T({component:{lazy:()=>b().then(ee=>{const ce=Ae=>{try{(0,m.tg)(D)}catch(Oe){if(typeof Oe=="object"&&Oe!==null){const{message:ge}=Oe;if(typeof ge=="string"&&ge.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${D} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw Oe}return i.createElement(ee,{...Ae})},Ee=j||ee.displayName||ee.name||"LazyComponent";return ce.displayName=`RoutableExtension(${Ee})`,ce},ee=>Ee=>{const Ae=(0,p.useApp)(),{BootErrorPage:Oe}=Ae.getComponents();return i.createElement(Oe,{step:"load-chunk",error:ee})})},data:{"core.mountPoint":D},name:j})}function A(x){const{component:b,name:D}=x;return T({component:b,name:D})}function T(x){const{data:b={},name:D}=x;D||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let j;if("lazy"in x.component){const ce=x.component.lazy;j=(0,i.lazy)(()=>ce().then(Ee=>({default:Ee})))}else j=x.component.sync;const ee=D||j.displayName||j.name||"Component";return{expose(ce){const Ee=Ae=>{const Oe=(0,p.useApp)(),{Progress:ge}=Oe.getComponents(),Ge=b==null?void 0:b["core.mountPoint"];return i.createElement(i.Suspense,{fallback:i.createElement(ge,null)},i.createElement(l,{app:Oe,plugin:ce},i.createElement(v.fC,{attributes:{pluginId:ce.getId(),...D&&{extension:D},...Ge&&{routeRef:Ge.id}}},i.createElement(j,{...Ae}))))};f(Ee,"core.plugin",ce);for(const[Ae,Oe]of Object.entries(b))f(Ee,Ae,Oe);return Ee.displayName=`Extension(${ee})`,Ee}}}var Z=e(27399);function O(x,b,D,j){return i.Children.toArray(x).flatMap(ee=>{if(!(0,i.isValidElement)(ee))return[];if(ee.type===i.Fragment)return O(ee.props.children,b,D,j);if(y(ee,"core.featureFlagged")){const ce=ee.props;return("with"in ce?b.isActive(ce.with):!b.isActive(ce.without))?O(ee.props.children,b,D,j):[]}if(D===void 0||D(ee))return[ee];if(j)throw new Error(j);return O(ee.props.children,b,D,j)})}class q{constructor(b,D){this.node=b,this.featureFlagsApi=D}selectByComponentData(b){const D=O(this.node,this.featureFlagsApi,j=>y(j,b.key)!==void 0,b.withStrictError);return new q(D,this.featureFlagsApi)}findComponentData(b){return O(this.node,this.featureFlagsApi,j=>y(j,b.key)!==void 0).map(j=>y(j,b.key)).filter(j=>j!==void 0)}getElements(){return O(this.node,this.featureFlagsApi)}}function $(x,b,D=[]){const j=(0,Z.useApi)(Z.featureFlagsApiRef),ee=new q(x,j);return(0,i.useMemo)(()=>b(ee),[x,...D])}},80274:function(){},36964:function(_,s,e){"use strict";e.d(s,{AnalyticsContext:function(){return a.f},useAnalytics:function(){return a.z},FeatureFlagState:function(){return t.FeatureFlagState},SessionState:function(){return t.SessionState},alertApiRef:function(){return t.alertApiRef},analyticsApiRef:function(){return t.analyticsApiRef},appThemeApiRef:function(){return t.appThemeApiRef},atlassianAuthApiRef:function(){return t.atlassianAuthApiRef},auth0AuthApiRef:function(){return t.auth0AuthApiRef},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},githubAuthApiRef:function(){return t.githubAuthApiRef},gitlabAuthApiRef:function(){return t.gitlabAuthApiRef},googleAuthApiRef:function(){return t.googleAuthApiRef},identityApiRef:function(){return t.identityApiRef},microsoftAuthApiRef:function(){return t.microsoftAuthApiRef},oauth2ApiRef:function(){return t.oauth2ApiRef},oauthRequestApiRef:function(){return t.oauthRequestApiRef},oidcAuthApiRef:function(){return t.oidcAuthApiRef},oktaAuthApiRef:function(){return t.oktaAuthApiRef},oneloginAuthApiRef:function(){return t.oneloginAuthApiRef},samlAuthApiRef:function(){return t.samlAuthApiRef},storageApiRef:function(){return t.storageApiRef},useApp:function(){return c.useApp},attachComponentData:function(){return f.R5},createComponentExtension:function(){return f.CO},createRoutableExtension:function(){return f.P4},getComponentData:function(){return f.IY},useElementFilter:function(){return f.vJ},createPlugin:function(){return v.r},createExternalRouteRef:function(){return p.x8},createRouteRef:function(){return p.NT},useRouteRef:function(){return p.tg},useRouteRefParams:function(){return p.Oi}});var a=e(28461),t=e(27399);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(s,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}});var c=e(31311);e.o(c,"attachComponentData")&&e.d(s,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createApiRef")&&e.d(s,{createApiRef:function(){return c.createApiRef}}),e.o(c,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(s,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"getComponentData")&&e.d(s,{getComponentData:function(){return c.getComponentData}}),e.o(c,"useApi")&&e.d(s,{useApi:function(){return c.useApi}}),e.o(c,"useApiHolder")&&e.d(s,{useApiHolder:function(){return c.useApiHolder}}),e.o(c,"useElementFilter")&&e.d(s,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var f=e(74181),y=e(80274),i=e.n(y);e.o(y,"createApiFactory")&&e.d(s,{createApiFactory:function(){return y.createApiFactory}}),e.o(y,"createApiRef")&&e.d(s,{createApiRef:function(){return y.createApiRef}}),e.o(y,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return y.createExternalRouteRef}}),e.o(y,"createPlugin")&&e.d(s,{createPlugin:function(){return y.createPlugin}}),e.o(y,"createRouteRef")&&e.d(s,{createRouteRef:function(){return y.createRouteRef}}),e.o(y,"useApi")&&e.d(s,{useApi:function(){return y.useApi}}),e.o(y,"useApiHolder")&&e.d(s,{useApiHolder:function(){return y.useApiHolder}}),e.o(y,"useRouteRef")&&e.d(s,{useRouteRef:function(){return y.useRouteRef}}),e.o(y,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return y.useRouteRefParams}});var v=e(96896),p=e(82772)},96896:function(_,s,e){"use strict";e.d(s,{r:function(){return t}});class a{constructor(f){this.config=f}getId(){return this.config.id}getApis(){var f;return(f=this.config.apis)!=null?f:[]}getFeatureFlags(){var f,y;return(y=(f=this.config.featureFlags)==null?void 0:f.slice())!=null?y:[]}get routes(){var f;return(f=this.config.routes)!=null?f:{}}get externalRoutes(){var f;return(f=this.config.externalRoutes)!=null?f:{}}provide(f){return f.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(c){return new a(c)}},82772:function(_,s,e){var Z,O,q;"use strict";e.d(s,{x8:function(){return m},NT:function(){return f},tg:function(){return A},Oi:function(){return T}});var a=e(76241);const t=(0,a.uW)("route-ref-type",()=>Symbol("route-ref-type"));class c{constructor(x,b){ae(this,Z,"absolute");this.id=x,this.params=b}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}Z=t;function f($){var x;return new c($.id,(x=$.params)!=null?x:[])}const y=/^\w+$/;class i{constructor(x,b,D,j){ae(this,O,"sub");this.id=x,this.path=b,this.parent=D,this.params=j}toString(){return`routeRef{type=sub,id=${this.id}}`}}O=t;function v($){const{id:x,path:b,parent:D}=$,j=b.split("/").filter(Ee=>Ee.startsWith(":")).map(Ee=>Ee.substring(1)),ee=[...D.params,...j];if(D.params.some(Ee=>j.includes(Ee)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!b.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${b}'`);if(b.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${b}'`);for(const Ee of j)if(!y.test(Ee))throw new Error(`SubRouteRef path has invalid param, got '${Ee}'`);return new i(x,b,D,ee)}class p{constructor(x,b,D){ae(this,q,"external");this.id=x,this.params=b,this.optional=D}toString(){return`routeRef{type=external,id=${this.id}}`}}q=t;function m($){var x;return new p($.id,(x=$.params)!=null?x:[],Boolean($.optional))}var l=e(2784),r=e(10289);function A($){const x=(0,r.TH)(),b=(0,a.Vt)("routing-context");if(!b)throw new Error("Routing context is not available");const D=b.atVersion(1),j=(0,l.useMemo)(()=>D&&D.resolve($,x),[D,$,x]);if(!b)throw new Error("useRouteRef used outside of routing context");if(!D)throw new Error("RoutingContext v1 not available");const ee="optional"in $&&$.optional;if(!j&&!ee)throw new Error(`No path for ${$}`);return j}function T($){return(0,r.UO)()}},10179:function(_,s,e){"use strict";e.d(s,{SP:function(){return Z},dR:function(){return r},VL:function(){return q},BD:function(){return t}});function a($){if(typeof $!="object"||$===null||Array.isArray($))return!1;const x=$;return!(typeof x.name!="string"||x.name===""||typeof x.message!="string")}function t($){if(typeof $!="object"||$===null||Array.isArray($))throw new Error(`Encountered invalid error, not an object, got '${$}'`);const x=$;if(typeof x.name!="string"||x.name==="")throw new Error(`Encountered error object without a name, got '${$}'`);if(typeof x.message!="string")throw new Error(`Encountered error object without a message, got '${$}'`)}var c=e(24852);function f($,x){const b=serializeErrorInternal($),D={name:"Unknown",message:"<no reason given>",...b};return(x==null?void 0:x.includeStack)||delete D.stack,D}function y($){const x=(0,c.deserializeError)($);return $.stack||(x.stack=void 0),x}function i($){if(a($)){const x=String($);return x!=="[object Object]"?x:`${$.name}: ${$.message}`}return`unknown error '${$}'`}class v extends Error{constructor(x,b){var j;let D=x;if(b!==void 0){const ee=i(b);D?D+=`; caused by ${ee}`:D=`caused by ${ee}`}super(D);ae(this,"cause");(j=Error.captureStackTrace)==null||j.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=a(b)?b:void 0}}class p extends null{}class m extends null{}class l extends null{}class r extends v{}class A extends null{}class T extends null{}class Z extends v{constructor(x,b){super(x,b);this.name=a(b)?b.name:"Error"}}async function O($){var x;try{const b=await $.text();if(b){if((x=$.headers.get("content-type"))==null?void 0:x.startsWith("application/json"))try{const D=JSON.parse(b);if(D.error&&D.response)return D}catch{}return{error:{name:"Error",message:`Request failed with status ${$.status} ${$.statusText}, ${b}`},response:{statusCode:$.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${$.status} ${$.statusText}`},response:{statusCode:$.status}}}class q extends Error{constructor(x){super(x.message);ae(this,"response");ae(this,"body");ae(this,"cause");this.name="ResponseError",this.response=x.response,this.body=x.data,this.cause=x.cause}static async fromResponse(x){const b=await O(x),D=b.response.statusCode||x.status,j=b.error.name||x.statusText,ee=`Request failed with ${D} ${j}`,ce=y(b.error);return new q({message:ee,response:x,data:b,cause:ce})}}},36356:function(_,s,e){var r,A,T,Z,O;"use strict";e.d(s,{nW:function(){return l},ae:function(){return i},q3:function(){return v}});var a=e(36964);const t=(0,a.createApiRef)({id:"core.scmauth"});class c{constructor(x){cn(this,r,void 0);En(this,r,x)}async getCredentials(x){const b=new URL(x.url),D=Je(this,r).find(j=>j.isUrlSupported(b));if(!D)throw new Error(`No auth provider available for '${x.url}', see https://backstage.io/link?scm-auth`);return D.getCredentials(x)}}r=new WeakMap;const q=class{constructor(x,b,D,j){cn(this,A,void 0);cn(this,T,void 0);cn(this,Z,void 0);cn(this,O,void 0);En(this,A,b),En(this,T,D),En(this,Z,j),En(this,O,x)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:x,gitlab:b,azure:D,bitbucket:j})=>q.merge(q.forGithub(x),q.forGitlab(b),q.forAzure(D),q.forBitbucket(j))})}static forAuthApi(x,b){return new q("generic",x,b.host,b.scopeMapping)}static forGithub(x,b){var j;const D=(j=b==null?void 0:b.host)!=null?j:"github.com";return new q("github",x,D,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(x,b){var j;const D=(j=b==null?void 0:b.host)!=null?j:"gitlab.com";return new q("gitlab",x,D,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(x,b){var j;const D=(j=b==null?void 0:b.host)!=null?j:"dev.azure.com";return new q("azure",x,D,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(x,b){var j;const D=(j=b==null?void 0:b.host)!=null?j:"bitbucket.org";return new q("bitbucket",x,D,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...x){return new c(x)}isUrlSupported(x){return x.host===Je(this,T)}getAdditionalScopesForProvider(x){var b,D;return!(x==null?void 0:x.customScopes)||Je(this,O)==="generic"?[]:(D=(b=x.customScopes)==null?void 0:b[Je(this,O)])!=null?D:[]}async getCredentials(x){const{url:b,additionalScope:D,...j}=x,ee=Je(this,Z).default.slice();(D==null?void 0:D.repoWrite)&&ee.push(...Je(this,Z).repoWrite);const ce=this.getAdditionalScopesForProvider(D);ce.length&&ee.push(...ce);const Ee=[...new Set(ee)],Ae=await Je(this,A).getAccessToken(Ee,j);return{token:Ae,headers:{Authorization:`Bearer ${Ae}`}}}};let f=q;A=new WeakMap,T=new WeakMap,Z=new WeakMap,O=new WeakMap;var y=e(63925);class i{static fromConfig(x){return y.Lx.fromConfig(x)}}const v=(0,a.createApiRef)({id:"integration.scmintegrations"});var p=e(73250),m=e(2784);const l=$=>{var ee;const{type:x}=$,b=(0,a.useApp)(),D=p.Z,j=x&&(ee=b.getSystemIcon(x))!=null?ee:D;return m.createElement(j,null)}},63925:function(_,s,e){var Ne,Re,pe,xe,ft,lt,ze;"use strict";e.d(s,{Lx:function(){return Me},Pb:function(){return bt}});var a=e(82717),t=e.n(a),c=e(76635);function f(w){const E=new URL("http://example.com");return E.host=w,E.host===w}function y(w){try{return new URL(w),!0}catch{return!1}}function i(w,E){return{list(){return w},byUrl(M){try{const Y=typeof M=="string"?new URL(M):M;return w.find(te=>E(te)===Y.host)}catch{return}},byHost(M){return w.find(Y=>E(Y)===M)}}}function v(w){const{url:E,base:M,lineNumber:Y}=w;try{return new URL(E),E}catch{}let te;if(E.startsWith("/")){const{filepath:be}=t()(M);te=new URL(M);const he=(0,c.trimEnd)(te.pathname.substring(0,te.pathname.length-be.length),"/");te.pathname=`${he}${E}`}else te=new URL(E,M);return te.search=new URL(M).search,Y&&(te.hash=`L${Y}`),te.toString()}const p="GB",le=class{constructor(E,M,Y,te,be,he){cn(this,Ne,void 0);cn(this,Re,void 0);cn(this,pe,void 0);cn(this,xe,void 0);cn(this,ft,void 0);cn(this,lt,void 0);cn(this,ze,(...E)=>{const M=new URL(Je(this,Ne));return M.pathname=E.map(Y=>encodeURIComponent(Y)).join("/"),M});En(this,Ne,E),En(this,Re,M),En(this,pe,Y),En(this,xe,te),En(this,ft,be),En(this,lt,he)}static fromRepoUrl(E){var _e;const M=new URL(E);let Y,te,be;const he=M.pathname.split("/").map(Rt=>decodeURIComponent(Rt));if(he[2]==="_git"?(Y=he[1],te=be=he[3]):he[3]==="_git"&&(Y=he[1],te=he[2],be=he[4]),!Y||!te||!be)throw new Error("Azure URL must point to a git repository");const Fe=(_e=M.searchParams.get("path"))!=null?_e:void 0;let De;const qe=M.searchParams.get("version");if(qe){if(qe.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");De=qe.slice(2)}return new le(M.origin,Y,te,be,Fe,De)}toRepoUrl(){let E;return Je(this,pe)===Je(this,xe)?E=Je(this,ze).call(this,Je(this,Re),"_git",Je(this,xe)):E=Je(this,ze).call(this,Je(this,Re),Je(this,pe),"_git",Je(this,xe)),Je(this,ft)&&E.searchParams.set("path",Je(this,ft)),Je(this,lt)&&E.searchParams.set("version",p+Je(this,lt)),E.toString()}toFileUrl(){if(!Je(this,ft))throw new Error("Azure URL must point to a specific path to be able to download a file");const E=Je(this,ze).call(this,Je(this,Re),Je(this,pe),"_apis","git","repositories",Je(this,xe),"items");return E.searchParams.set("api-version","6.0"),E.searchParams.set("path",Je(this,ft)),Je(this,lt)&&E.searchParams.set("version",Je(this,lt)),E.toString()}toArchiveUrl(){const E=Je(this,ze).call(this,Je(this,Re),Je(this,pe),"_apis","git","repositories",Je(this,xe),"items");return E.searchParams.set("recursionLevel","full"),E.searchParams.set("download","true"),E.searchParams.set("api-version","6.0"),Je(this,ft)&&E.searchParams.set("scopePath",Je(this,ft)),Je(this,lt)&&E.searchParams.set("version",Je(this,lt)),E.toString()}toCommitsUrl(){const E=Je(this,ze).call(this,Je(this,Re),Je(this,pe),"_apis","git","repositories",Je(this,xe),"commits");return E.searchParams.set("api-version","6.0"),Je(this,lt)&&E.searchParams.set("searchCriteria.itemVersion.version",Je(this,lt)),E.toString()}getOwner(){return Je(this,Re)}getProject(){return Je(this,pe)}getRepo(){return Je(this,xe)}getPath(){return Je(this,ft)}getRef(){return Je(this,lt)}};let m=le;Ne=new WeakMap,Re=new WeakMap,pe=new WeakMap,xe=new WeakMap,ft=new WeakMap,lt=new WeakMap,ze=new WeakMap;const l="dev.azure.com";function r(w){var Y;const E=(Y=w.getOptionalString("host"))!=null?Y:l,M=w.getOptionalString("token");if(!f(E))throw new Error(`Invalid Azure integration config, '${E}' is not a valid host`);return{host:E,token:M}}function A(w){const E=w.map(r);return E.some(M=>M.host===l)||E.push({host:l}),E}const Ze=class{constructor(E){this.integrationConfig=E}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(E){var te;const{url:M,base:Y}=E;if(y(M))return M;try{const be=m.fromRepoUrl(Y),he=new URL(Y),Fe=new URL(`https://a.com${(te=be.getPath())!=null?te:""}`),De=new URL(M,Fe).pathname;return he.searchParams.set("path",De),E.lineNumber&&(he.searchParams.set("line",String(E.lineNumber)),he.searchParams.set("lineEnd",String(E.lineNumber+1)),he.searchParams.set("lineStartColumn","1"),he.searchParams.set("lineEndColumn","1")),he.toString()}catch{return new URL(M,Y).toString()}}resolveEditUrl(E){return E}};let T=Ze;ae(T,"factory",({config:E})=>{var Y;const M=A((Y=E.getOptionalConfigArray("integrations.azure"))!=null?Y:[]);return i(M.map(te=>new Ze(te)),te=>te.config.host)});var Z=e(48834).Buffer;function O(w){return AzureUrl.fromRepoUrl(w).toFileUrl()}function q(w){return AzureUrl.fromRepoUrl(w).toArchiveUrl()}function $(w){return AzureUrl.fromRepoUrl(w).toCommitsUrl()}function x(w,E){const M=E?{...E}:{};if(w.token){const Y=Z.from(`:${w.token}`,"utf8");M.Authorization=`Basic ${Y.toString("base64")}`}return{headers:M}}const b="bitbucket.org",D="https://api.bitbucket.org/2.0";function j(w){var he;const E=(he=w.getOptionalString("host"))!=null?he:b;let M=w.getOptionalString("apiBaseUrl");const Y=w.getOptionalString("token"),te=w.getOptionalString("username"),be=w.getOptionalString("appPassword");if(!f(E))throw new Error(`Invalid Bitbucket integration config, '${E}' is not a valid host`);return M?M=(0,c.trimEnd)(M,"/"):E===b&&(M=D),{host:E,apiBaseUrl:M,token:Y,username:te,appPassword:be}}function ee(w){const E=w.map(j);return E.some(M=>M.host===b)||E.push({host:b,apiBaseUrl:D}),E}const Ke=class{constructor(E){this.integrationConfig=E}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(E){const M=v(E);if(E.lineNumber){const Y=new URL(M),te=Y.pathname.split("/").slice(-1)[0];return Y.hash=`${te}-${E.lineNumber}`,Y.toString()}return M}resolveEditUrl(E){const M=t()(E),Y=new URL(E);return Y.searchParams.set("mode","edit"),Y.searchParams.set("spa","0"),Y.searchParams.set("at",M.ref),Y.toString()}};let ce=Ke;ae(ce,"factory",({config:E})=>{var Y;const M=ee((Y=E.getOptionalConfigArray("integrations.bitbucket"))!=null?Y:[]);return i(M.map(te=>new Ke(te)),te=>te.config.host)});var Ee=e(96279),Ae=e(48834).Buffer;async function Oe(w,E){const{name:M,owner:Y,resource:te}=parseGitUrl(w),be=te==="bitbucket.org";let he=be?`${E.apiBaseUrl}/repositories/${Y}/${M}`:`${E.apiBaseUrl}/projects/${Y}/repos/${M}/default-branch`,Fe=await fetch(he,Qe(E));if(Fe.status===404&&!be&&(he=`${E.apiBaseUrl}/projects/${Y}/repos/${M}/branches/default`,Fe=await fetch(he,Qe(E))),!Fe.ok){const qe=`Failed to retrieve default branch from ${he}, ${Fe.status} ${Fe.statusText}`;throw new Error(qe)}let De;if(be)De=(await Fe.json()).mainbranch.name;else{const{displayId:qe}=await Fe.json();De=qe}if(!De)throw new Error(`Failed to read default branch from ${he}. Response ${Fe.status} ${Fe.json()}`);return De}async function ge(w,E){const{name:M,owner:Y,ref:te,protocol:be,resource:he,filepath:Fe}=parseGitUrl(w),De=he==="bitbucket.org";let qe=te;qe||(qe=await Oe(w,E));const _e=Fe?`&path=${encodeURIComponent(Fe)}`:"";return De?`${be}://${he}/${Y}/${M}/get/${qe}.tar.gz`:`${E.apiBaseUrl}/projects/${Y}/repos/${M}/archive?format=tgz&at=${qe}&prefix=${Y}-${M}${_e}`}function Ge(w,E){try{const{owner:M,name:Y,ref:te,filepathtype:be,filepath:he}=parseGitUrl(w);if(!M||!Y||be!=="browse"&&be!=="raw"&&be!=="src")throw new Error("Invalid Bitbucket URL or file path");const Fe=he.replace(/^\//,"");if(E.host==="bitbucket.org"){if(!te)throw new Error("Invalid Bitbucket URL or file path");return`${E.apiBaseUrl}/repositories/${M}/${Y}/src/${te}/${Fe}`}return`${E.apiBaseUrl}/projects/${M}/repos/${Y}/raw/${Fe}?at=${te}`}catch(M){throw new Error(`Incorrect URL: ${w}, ${M}`)}}function Qe(w){const E={};if(w.token)E.Authorization=`Bearer ${w.token}`;else if(w.username&&w.appPassword){const M=Ae.from(`${w.username}:${w.appPassword}`,"utf8");E.Authorization=`Basic ${M.toString("base64")}`}return{headers:E}}const Ue="github.com",we="https://api.github.com",tt="https://raw.githubusercontent.com";function dt(w){var he,Fe;const E=(he=w.getOptionalString("host"))!=null?he:Ue;let M=w.getOptionalString("apiBaseUrl"),Y=w.getOptionalString("rawBaseUrl");const te=w.getOptionalString("token"),be=(Fe=w.getOptionalConfigArray("apps"))==null?void 0:Fe.map(De=>({appId:De.getNumber("appId"),clientId:De.getString("clientId"),clientSecret:De.getString("clientSecret"),webhookSecret:De.getString("webhookSecret"),privateKey:De.getString("privateKey"),allowedInstallationOwners:De.getOptionalStringArray("allowedInstallationOwners")}));if(!f(E))throw new Error(`Invalid GitHub integration config, '${E}' is not a valid host`);return M?M=(0,c.trimEnd)(M,"/"):E===Ue&&(M=we),Y?Y=(0,c.trimEnd)(Y,"/"):E===Ue&&(Y=tt),{host:E,apiBaseUrl:M,rawBaseUrl:Y,token:te,apps:be}}function je(w){const E=w.map(dt);return E.some(M=>M.host===Ue)||E.push({host:Ue,apiBaseUrl:we,rawBaseUrl:tt}),E}function Et(w,E,M){try{const{owner:Y,name:te,ref:be,filepathtype:he,filepath:Fe}=parseGitUrl(w);if(!Y||!te||!be||he!=="blob"&&he!=="raw"&&he!=="tree")throw new Error("Invalid GitHub URL or file path");const De=Fe.replace(/^\//,"");return Tt(E,M)==="api"?`${E.apiBaseUrl}/repos/${Y}/${te}/contents/${De}?ref=${be}`:`${E.rawBaseUrl}/${Y}/${te}/${be}/${De}`}catch(Y){throw new Error(`Incorrect URL: ${w}, ${Y}`)}}function Bt(w,E){const M={};return Tt(w,E)==="api"&&(M.Accept="application/vnd.github.v3.raw"),E.token&&(M.Authorization=`token ${E.token}`),{headers:M}}function Tt(w,E){return w.apiBaseUrl&&(E.token||!w.rawBaseUrl)?"api":"raw"}class gt{constructor(){ae(this,"tokenCache",new Map);ae(this,"isNotExpired",E=>E.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(E,M){const Y=this.tokenCache.get(E);if(Y&&this.isNotExpired(Y.expiresAt))return{accessToken:Y.token};const te=await M();return this.tokenCache.set(E,te),{accessToken:te.token}}}const yt={Accept:"application/vnd.github.machine-man-preview+json"};class rt{constructor(E,M){ae(this,"appClient");ae(this,"baseUrl");ae(this,"baseAuthConfig");ae(this,"cache",new gt);ae(this,"allowedInstallationOwners");this.allowedInstallationOwners=E.allowedInstallationOwners,this.baseUrl=M,this.baseAuthConfig={appId:E.appId,privateKey:E.privateKey.replace(/\\n/gm,`
|
|
31
|
-
`)},this.appClient=new Octokit({baseUrl:M,headers:yt,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(E,M){var he;const{installationId:Y,suspended:te}=await this.getInstallationData(E);if(this.allowedInstallationOwners&&!((he=this.allowedInstallationOwners)==null?void 0:he.includes(E)))return{accessToken:void 0};if(te)throw new Error(`The GitHub application for ${E} is suspended`);const be=M?`${E}/${M}`:E;return this.cache.getOrCreateToken(be,async()=>{const Fe=await this.appClient.apps.createInstallationAccessToken({installation_id:Y,headers:yt});if(M&&Fe.data.repository_selection==="selected"){const De=new Octokit({baseUrl:this.baseUrl,auth:Fe.data.token});if(!(await De.paginate(De.apps.listReposAccessibleToInstallation)).some(Rt=>Rt.name===M))throw new Error(`The Backstage GitHub application used in the ${E} organization does not have access to a repository with the name ${M}`)}return{token:Fe.data.token,expiresAt:DateTime.fromISO(Fe.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(E){const Y=(await this.getInstallations()).find(be=>{var he,Fe;return((Fe=(he=be.account)==null?void 0:he.login)==null?void 0:Fe.toLocaleLowerCase("en-US"))===E.toLocaleLowerCase("en-US")});if(Y)return{installationId:Y.id,suspended:Boolean(Y.suspended_by)};const te=new Error(`No app installation found for ${E} in ${this.baseAuthConfig.appId}`);throw te.name="NotFoundError",te}}class pt{constructor(E){ae(this,"apps");var M,Y;this.apps=(Y=(M=E.apps)==null?void 0:M.map(te=>new rt(te,E.apiBaseUrl)))!=null?Y:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(M=>M.getInstallations()))).flat():[]}async getAppToken(E,M){if(this.apps.length===0)return;const Y=await Promise.all(this.apps.map(Fe=>Fe.getInstallationCredentials(E,M).then(De=>({credentials:De,error:void 0}),De=>({credentials:void 0,error:De})))),te=Y.find(Fe=>Fe.credentials);if(te)return te.credentials.accessToken;const he=Y.map(Fe=>Fe.error).find(Fe=>Fe.name!=="NotFoundError");if(he)throw he}}class Pt{constructor(E,M){this.githubAppCredentialsMux=E,this.token=M}async getCredentials(E){const M=parseGitUrl(E.url),Y=M.owner||M.name,te=M.owner?M.name:void 0;let be="app",he=await this.githubAppCredentialsMux.getAppToken(Y,te);return he||(be="token",he=this.token),{headers:he?{Authorization:`Bearer ${he}`}:void 0,token:he,type:be}}}ae(Pt,"create",null);class xt{static fromIntegrations(E){const M=new Map;return E.github.list().forEach(Y=>{const te=SingleInstanceGithubCredentialsProvider.create(Y.config);M.set(Y.config.host,te)}),new xt(M)}constructor(E){this.providers=E}async getCredentials(E){const M=new URL(E.url),Y=this.providers.get(M.host);if(!Y)throw new Error(`There is no GitHub integration that matches ${E.url}. Please add a configuration for an integration.`);return Y.getCredentials(E)}}const Xe=class{constructor(E){this.integrationConfig=E}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(E){return bt(v(E),"tree")}resolveEditUrl(E){return bt(E,"edit")}};let Dt=Xe;ae(Dt,"factory",({config:E})=>{var Y;const M=je((Y=E.getOptionalConfigArray("integrations.github"))!=null?Y:[]);return i(M.map(te=>new Xe(te)),te=>te.config.host)});function bt(w,E){return w.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(M,Y,te,be)=>`//${Y}/${te}/${be}/${E}/`)}const et="gitlab.com",Ce="https://gitlab.com/api/v4";function ot(w){const E=w.getString("host");let M=w.getOptionalString("apiBaseUrl");const Y=w.getOptionalString("token");let te=w.getOptionalString("baseUrl");if(M?M=(0,c.trimEnd)(M,"/"):E===et&&(M=Ce),te?te=(0,c.trimEnd)(te,"/"):te=`https://${E}`,f(E)){if(!M||!y(M))throw new Error(`Invalid GitLab integration config, '${M}' is not a valid apiBaseUrl`);if(!y(te))throw new Error(`Invalid GitLab integration config, '${te}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${E}' is not a valid host`);return{host:E,token:Y,apiBaseUrl:M,baseUrl:te}}function nt(w){const E=w.map(ot);return E.some(M=>M.host===et)||E.push({host:et,apiBaseUrl:Ce,baseUrl:`https://${et}`}),E}async function vt(w,E){if(w.includes("/-/blob/")){const M=await R(w,E);return B(w,M).toString()}return At(w).toString()}function it(w){const{token:E=""}=w;return{headers:{"PRIVATE-TOKEN":E}}}function At(w){try{const E=new URL(w),[M,Y,te,be,...he]=E.pathname.split("/");if(M!==""||Y===""||te===""||be!=="blob"||!he.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return E.pathname=[M,Y,te,"raw",...he].join("/"),E}catch(E){throw new Error(`Incorrect url: ${w}, ${E}`)}}function B(w,E){try{const M=new URL(w),Y=M.pathname.split("/-/blob/")[1],[te,...be]=Y.split("/");return M.pathname=["/api/v4/projects",E,"repository/files",encodeURIComponent(decodeURIComponent(be.join("/"))),"raw"].join("/"),M.search=`?ref=${te}`,M}catch(M){throw new Error(`Incorrect url: ${w}, ${M}`)}}async function R(w,E){const M=new URL(w);if(!M.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const Y=M.pathname.split("/-/blob/")[0],te=new URL(`${M.origin}/api/v4/projects/${encodeURIComponent(Y.replace(/^\//,""))}`),be=await fetch(te.toString(),it(E)),he=await be.json();if(!be.ok)throw new Error(`GitLab Error '${he.error}', ${he.error_description}`);return Number(he.id)}catch(Y){throw new Error(`Could not get GitLab project ID for: ${w}, ${Y}`)}}const ke=class{constructor(E){this.integrationConfig=E}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(E){return v(E)}resolveEditUrl(E){return K(E,"edit")}};let P=ke;ae(P,"factory",({config:E})=>{var Y;const M=nt((Y=E.getOptionalConfigArray("integrations.gitlab"))!=null?Y:[]);return i(M.map(te=>new ke(te)),te=>te.config.host)});function K(w,E){return w.replace(/\/\-\/(blob|tree|edit)\//,`/-/${E}/`)}const W="amazonaws.com";function ne(w){var De;const E=w.getOptionalString("endpoint"),M=(De=w.getOptionalBoolean("s3ForcePathStyle"))!=null?De:!1;let Y,te;if(E){try{const qe=new URL(E);Y=qe.host,te=qe.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${E}' is not a valid URL`)}if(te!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${E}'`)}else Y=W;const be=w.getOptionalString("accessKeyId"),he=w.getOptionalString("secretAccessKey"),Fe=w.getOptionalString("roleArn");return{host:Y,endpoint:E,s3ForcePathStyle:M,accessKeyId:be,secretAccessKey:he,roleArn:Fe}}function ye(w){const E=w.map(ne);return E.some(M=>M.host===W)||E.push({host:W}),E}const We=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(E){this.integrationConfig=E}resolveUrl(E){return v(E)}resolveEditUrl(E){return E}};let ve=We;ae(ve,"factory",({config:E})=>{var Y;const M=ye((Y=E.getOptionalConfigArray("integrations.awsS3"))!=null?Y:[]);return i(M.map(te=>new We(te)),te=>te.config.host)});class Me{constructor(E){ae(this,"byType");this.byType=E}static fromConfig(E){return new Me({awsS3:ve.factory({config:E}),azure:T.factory({config:E}),bitbucket:ce.factory({config:E}),github:Dt.factory({config:E}),gitlab:P.factory({config:E})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}list(){return Object.values(this.byType).flatMap(E=>E.list())}byUrl(E){return Object.values(this.byType).map(M=>M.byUrl(E)).find(Boolean)}byHost(E){return Object.values(this.byType).map(M=>M.byHost(E)).find(Boolean)}resolveUrl(E){const M=this.byUrl(E.base);return M?M.resolveUrl(E):v(E)}resolveEditUrl(E){const M=this.byUrl(E);return M?M.resolveEditUrl(E):E}}},39971:function(_,s,e){"use strict";var a={};e.r(a),e.d(a,{TechDocsPlugin:function(){return fn}});var t=e(2784),c=e(28316),f=e(10289),y=e(49208),i=e(36964),v=e(20221);const p=[(0,i.createApiFactory)({api:i.discoveryApiRef,deps:{configApi:i.configApiRef},factory:({configApi:h})=>y.UrlPatternDiscovery.compile(`${h.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,i.createApiFactory)({api:i.alertApiRef,deps:{},factory:()=>new y.AlertApiForwarder}),(0,i.createApiFactory)({api:i.analyticsApiRef,deps:{},factory:()=>new y.NoOpAnalyticsApi}),(0,i.createApiFactory)({api:i.errorApiRef,deps:{alertApi:i.alertApiRef},factory:({alertApi:h})=>{const I=new y.ErrorAlerter(h,new y.ErrorApiForwarder);return y.UnhandledErrorForwarder.forward(I,{hidden:!1}),I}}),(0,i.createApiFactory)({api:i.storageApiRef,deps:{errorApi:i.errorApiRef},factory:({errorApi:h})=>y.WebStorage.create({errorApi:h})}),(0,i.createApiFactory)({api:i.fetchApiRef,deps:{configApi:i.configApiRef,identityApi:i.identityApiRef,discoveryApi:i.discoveryApiRef},factory:({configApi:h,identityApi:I,discoveryApi:N})=>(0,y.createFetchApi)({middleware:[y.FetchMiddlewares.resolvePluginProtocol({discoveryApi:N}),y.FetchMiddlewares.injectIdentityAuth({identityApi:I,config:h})]})}),(0,i.createApiFactory)({api:i.oauthRequestApiRef,deps:{},factory:()=>new y.OAuthRequestManager}),(0,i.createApiFactory)({api:i.googleAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:h,oauthRequestApi:I,configApi:N})=>y.GoogleAuth.create({discoveryApi:h,oauthRequestApi:I,environment:N.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.microsoftAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:h,oauthRequestApi:I,configApi:N})=>y.MicrosoftAuth.create({discoveryApi:h,oauthRequestApi:I,environment:N.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.githubAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:h,oauthRequestApi:I,configApi:N})=>y.GithubAuth.create({discoveryApi:h,oauthRequestApi:I,defaultScopes:["read:user"],environment:N.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oktaAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:h,oauthRequestApi:I,configApi:N})=>y.OktaAuth.create({discoveryApi:h,oauthRequestApi:I,environment:N.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.gitlabAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:h,oauthRequestApi:I,configApi:N})=>y.GitlabAuth.create({discoveryApi:h,oauthRequestApi:I,environment:N.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.auth0AuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:h,oauthRequestApi:I,configApi:N})=>y.Auth0Auth.create({discoveryApi:h,oauthRequestApi:I,environment:N.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oauth2ApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:h,oauthRequestApi:I,configApi:N})=>y.OAuth2.create({discoveryApi:h,oauthRequestApi:I,environment:N.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.samlAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,configApi:i.configApiRef},factory:({discoveryApi:h,configApi:I})=>y.SamlAuth.create({discoveryApi:h,environment:I.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oneloginAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:h,oauthRequestApi:I,configApi:N})=>y.OneLoginAuth.create({discoveryApi:h,oauthRequestApi:I,environment:N.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oidcAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:h,oauthRequestApi:I,configApi:N})=>y.OAuth2.create({discoveryApi:h,oauthRequestApi:I,provider:{id:"oidc",title:"Your Identity Provider",icon:()=>null},environment:N.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.bitbucketAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:h,oauthRequestApi:I,configApi:N})=>y.BitbucketAuth.create({discoveryApi:h,oauthRequestApi:I,defaultScopes:["team"],environment:N.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.atlassianAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:h,oauthRequestApi:I,configApi:N})=>y.AtlassianAuth.create({discoveryApi:h,oauthRequestApi:I,environment:N.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:v.RV,deps:{discovery:i.discoveryApiRef,identity:i.identityApiRef,config:i.configApiRef},factory:({config:h,discovery:I,identity:N})=>v.iM.create({config:h,discovery:I,identity:N})})];var m=e(77277),l=e(9118),r=e(62833);function A({children:h}){return(0,f.GV)()?t.createElement(t.Fragment,null,h):t.createElement(f.VA,null,h)}const T=()=>t.createElement(l.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),Z=({step:h,error:I})=>{let N="";return h==="load-config"?N=`The configuration failed to load, someone should have a look at this error: ${I.message}`:h==="load-chunk"&&(N=`Lazy loaded chunk failed to load, try to reload the page: ${I.message}`),t.createElement(A,null,t.createElement(l.ErrorPage,{status:"501",statusMessage:N}))},O=({error:h,resetError:I,plugin:N})=>t.createElement(l.ErrorPanel,{title:`Error in ${N==null?void 0:N.getId()}`,defaultExpanded:!0,error:h},t.createElement(m.Z,{variant:"outlined",onClick:I},"Retry")),q={Progress:l.Progress,Router:r.VK,NotFoundErrorPage:T,BootErrorPage:Z,ErrorBoundaryFallback:O};var $=e(43642),x=e(80079),b=e(90941),D=e(32915),j=e(40562),ee=e(21853),ce=e(60744),Ee=e(66569),Ae=e(30254),Oe=e(13384),ge=e(15933),Ge=e(58838),Qe=e(86737),Ue=e(4989),we=e(44407),tt=e(18628),dt=e(84219),je=e(98685),Et=e(39781);const Bt={brokenImage:x.Z,catalog:tt.Z,scaffolder:D.Z,techdocs:j.Z,search:ee.Z,chat:ce.Z,dashboard:Ee.Z,docs:Ae.Z,email:Oe.Z,github:Ge.Z,group:dt.Z,help:Qe.Z,"kind:api":ge.Z,"kind:component":we.Z,"kind:domain":$.Z,"kind:group":dt.Z,"kind:location":Ue.Z,"kind:system":b.Z,"kind:user":je.Z,user:je.Z,warning:Et.Z};var Tt=e(73689),gt=e(48032);const yt={wave:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,wave2:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,round:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`},rt={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"]};function pt(h,I){const Q=`linear-gradient(90deg, ${(h.length===1?[h[0],h[0]]:h).join(", ")})`,oe=`${I}, ${Q}`;return{colors:h,shape:I,backgroundImage:oe}}const Pt={home:pt(rt.teal,yt.wave),documentation:pt(rt.pinkSea,yt.wave2),tool:pt(rt.purpleSky,yt.round),service:pt(rt.marineBlue,yt.wave),website:pt(rt.veryBlue,yt.wave),library:pt(rt.rubyRed,yt.wave),other:pt(rt.darkGrey,yt.wave),app:pt(rt.toastyOrange,yt.wave),apis:pt(rt.teal,yt.wave2)},xt='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function Dt(h){const{palette:I,fontFamily:N=xt,defaultPageTheme:Q,pageTheme:oe=Pt}=h;if(!oe[Q])throw new Error(`${Q} is not defined in pageTheme.`);return{palette:I,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:N,h5:{fontWeight:700},h4:{fontWeight:700,fontSize:28,marginBottom:6},h3:{fontSize:32,fontWeight:700,marginBottom:6},h2:{fontSize:40,fontWeight:700,marginBottom:8},h1:{fontSize:54,fontWeight:700,marginBottom:10}},page:oe[Q],getPageTheme:({themeId:fe})=>{var Be;return(Be=oe[fe])!=null?Be:oe[Q]}}}function bt(h){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:h.typography.fontFamily},body:{height:"100%",fontFamily:h.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:h.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:h.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:h.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:h.spacing(1.5,2,1.5,2.5)},head:{wordBreak:"break-word",overflow:"hidden",color:"rgb(179, 179, 179)",fontWeight:"normal",lineHeight:"1"}},MuiTabs:{root:{minHeight:24}},MuiTab:{root:{color:h.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,gt.darken)(h.palette.link,.3),background:(0,gt.lighten)(h.palette.link,.95)},[h.breakpoints.up("md")]:{minWidth:120,fontSize:h.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:h.palette.link}},MuiTableSortLabel:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"}},active:{fontWeight:"bold",color:"inherit"}},MuiListItemText:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},MuiButton:{text:{padding:void 0}},MuiChip:{root:{backgroundColor:"#D9D9D9",marginRight:h.spacing(1),marginBottom:h.spacing(1),color:h.palette.grey[900]},outlined:{color:h.palette.text.primary},label:{lineHeight:`${h.spacing(2.5)}px`,fontWeight:h.typography.fontWeightMedium,fontSize:`${h.spacing(1.75)}px`},labelSmall:{fontSize:`${h.spacing(1.5)}px`},deleteIcon:{color:h.palette.grey[500],width:`${h.spacing(3)}px`,height:`${h.spacing(3)}px`,margin:`0 ${h.spacing(.75)}px 0 -${h.spacing(.75)}px`},deleteIconSmall:{width:`${h.spacing(2)}px`,height:`${h.spacing(2)}px`,margin:`0 ${h.spacing(.5)}px 0 -${h.spacing(.5)}px`}},MuiCard:{root:{display:"flex",flexDirection:"column"}},MuiCardHeader:{root:{paddingBottom:0}},MuiCardContent:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}},MuiCardActions:{root:{justifyContent:"flex-end"}}}}function et(h){const I=Dt(h),N=(0,Tt.Z)(I),Q=bt(N);return{...N,overrides:Q}}var Ce=e(34505);const ot=et({palette:{type:"light",background:{default:"#F8F8F8"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#2E77D0",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#2E77D0"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#000000",textVerySubtle:"#DDD",textSubtle:"#6E6E6E",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#2196F3",link:"#0A6EBE",gold:Ce.Z.A700,navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:Pt}),nt=et({palette:{type:"dark",background:{default:"#333333"},status:{ok:"#71CF88",warning:"#FFB84D",error:"#F84C55",running:"#3488E3",pending:"#FEF071",aborted:"#9E9E9E"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#9CC9FF",dark:"#82BAFD"},secondary:{main:"#FF88B2"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#FFFFFF",textVerySubtle:"#727272",textSubtle:"#CCCCCC",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#82BAFD",link:"#9CC9FF",gold:Ce.Z.A700,navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:Pt});var vt=e(98192),it=e(15222),At=e(41547),B=e(87561);const R=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(it.Z,null),Provider:({children:h})=>t.createElement(At.Z,{theme:ot},t.createElement(B.ZP,null,h))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(vt.Z,null),Provider:({children:h})=>t.createElement(At.Z,{theme:nt},t.createElement(B.ZP,null,h))}];function P(h){var I,N,Q;return(0,y.createSpecializedApp)({...h,apis:(I=h==null?void 0:h.apis)!=null?I:[],bindRoutes:h==null?void 0:h.bindRoutes,components:{...q,...h==null?void 0:h.components},configLoader:h==null?void 0:h.configLoader,defaultApis:p,icons:{...Bt,...h==null?void 0:h.icons},plugins:(N=h==null?void 0:h.plugins)!=null?N:[],themes:(Q=h==null?void 0:h.themes)!=null?Q:R})}var K=e(39398),W=e(49782),ne=e(79692);const ye=(0,ne.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function ve(h){const I=h.result,N=ye();return React.createElement(Link,{to:I.location},React.createElement(ListItem,{alignItems:"flex-start",className:N.flexContainer},React.createElement(ListItemText,{className:N.itemText,primaryTypographyProps:{variant:"h6"},primary:I.title,secondary:I.text}),React.createElement(Box,null,I.kind&&React.createElement(Chip,{label:`Kind: ${I.kind}`,size:"small"}),I.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${I.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))}const Me=null;var Ne=e(30097),Re=e(41564),pe=e(31423),xe=e(95544),ft=e(99688),lt=e(12231),ze=e(86136),le=e(49378),Ze=e(85256),Ke=e(61837),Xe=e(79784),ke=e(50758),We=e(49166),w=e(31654),E=e(43054);const M="catalog-entity",Y={name:"catalog.entity.read",attributes:{action:"read"},resourceType:M},te={name:"catalog.entity.create",attributes:{action:"create"},resourceType:M},be={name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:M},he={name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:M},Fe={name:"catalog.location.read",attributes:{action:"read"}},De={name:"catalog.location.create",attributes:{action:"create"}},qe={name:"catalog.location.delete",attributes:{action:"delete"}},_e=(0,ne.Z)({button:{color:"white"}});function Rt(h){var Ft;const{UNSTABLE_extraContextMenuItems:I,UNSTABLE_contextMenuOptions:N,onUnregisterEntity:Q,onInspectEntity:oe}=h,[fe,Be]=(0,t.useState)(),me=_e(),Ie=(0,pe.useEntityPermission)(be),He=zt=>{Be(zt.currentTarget)},Ye=()=>{Be(void 0)},It=I&&[...I.map(zt=>t.createElement(lt.Z,{key:zt.title,onClick:()=>{Ye(),zt.onClick()}},t.createElement(ze.Z,null,t.createElement(zt.Icon,{fontSize:"small"})),t.createElement(le.Z,{primary:zt.title}))),t.createElement(Ze.Z,{key:"the divider is here!"})],ut=(Ft=!Ie.allowed||(N==null?void 0:N.disableUnregister))!=null?Ft:!1;return t.createElement(t.Fragment,null,t.createElement(Ke.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:He,"data-testid":"menu-button",className:me.button},t.createElement(E.Z,null)),t.createElement(Xe.ZP,{open:Boolean(fe),onClose:Ye,anchorEl:fe,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.createElement(ke.Z,null,It,t.createElement(lt.Z,{onClick:()=>{Ye(),Q()},disabled:ut},t.createElement(ze.Z,null,t.createElement(We.Z,{fontSize:"small"})),t.createElement(le.Z,{primary:"Unregister entity"})),t.createElement(lt.Z,{onClick:()=>{Ye(),oe()}},t.createElement(ze.Z,null,t.createElement(w.Z,{fontSize:"small"})),t.createElement(le.Z,{primary:"Inspect entity"})))))}const ue="plugin.catalog.entityLayoutRoute",V=()=>null;(0,i.attachComponentData)(V,ue,!0),(0,i.attachComponentData)(V,"core.gatherMountPoints",!0);function se(h){const{entity:I,title:N}=h;return t.createElement(xe.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(xe.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},N),I&&t.createElement(pe.FavoriteEntity,{entity:I}))}function Te(h,I,N,Q){var me,Ie,He,Ye,It;const oe=(me=h!=null?h:Q==null?void 0:Q.kind)!=null?me:"",fe=(Ie=I!=null?I:Q==null?void 0:Q.metadata.namespace)!=null?Ie:"";return{headerTitle:`${(It=(Ye=(He=Q==null?void 0:Q.metadata.title)!=null?He:N)!=null?Ye:Q==null?void 0:Q.metadata.name)!=null?It:""}${fe&&fe!==Re.zG?` in ${fe}`:""}`,headerType:(()=>{let ut=oe.toLocaleLowerCase("en-US");return Q&&Q.spec&&"type"in Q.spec&&(ut+=" \u2014 ",ut+=Q.spec.type.toLocaleLowerCase("en-US")),ut})()}}function $e(h){var Q;const{entity:I}=h,N=(0,pe.getEntityRelations)(I,Re.S4);return t.createElement(t.Fragment,null,N.length>0&&t.createElement(l.HeaderLabel,{label:"Owner",value:t.createElement(pe.EntityRefLinks,{entityRefs:N,defaultKind:"Group",color:"inherit"})}),((Q=I.spec)==null?void 0:Q.lifecycle)&&t.createElement(l.HeaderLabel,{label:"Lifecycle",value:I.spec.lifecycle}))}const Ve=h=>{var Dn,kn,qa;const{UNSTABLE_extraContextMenuItems:I,UNSTABLE_contextMenuOptions:N,children:Q}=h,{kind:oe,namespace:fe,name:Be}=(0,pe.useEntityCompoundName)(),{entity:me,loading:Ie,error:He}=(0,pe.useEntity)(),Ye=(0,f.TH)(),It=(0,i.useElementFilter)(Q,fr=>fr.selectByComponentData({key:ue,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:$n})=>$n.if&&me&&!$n.if(me)?[]:[{path:$n.path,title:$n.title,children:$n.children,tabProps:$n.tabProps}]),[me]),{headerTitle:ut,headerType:Ft}=Te(oe,fe,Be,me),[zt,Jt]=(0,t.useState)(!1),[Xn,Zn]=(0,t.useState)(!1),Qt=(0,f.s0)(),qt=async()=>{Jt(!1),Zn(!1),Qt("/")};return(0,t.useEffect)(()=>{Jt(!1),Zn(!1)},[Ye.pathname]),t.createElement(l.Page,{themeId:(qa=(kn=(Dn=me==null?void 0:me.spec)==null?void 0:Dn.type)==null?void 0:kn.toString())!=null?qa:"home"},t.createElement(l.Header,{title:t.createElement(se,{title:ut,entity:me}),pageTitleOverride:ut,type:Ft},me&&t.createElement(t.Fragment,null,t.createElement($e,{entity:me}),t.createElement(Rt,{UNSTABLE_extraContextMenuItems:I,UNSTABLE_contextMenuOptions:N,onUnregisterEntity:()=>Jt(!0),onInspectEntity:()=>Zn(!0)}))),Ie&&t.createElement(l.Progress,null),me&&t.createElement(l.RoutedTabs,{routes:It}),He&&t.createElement(l.Content,null,t.createElement(ft.Z,{severity:"error"},He.toString())),!Ie&&!He&&!me&&t.createElement(l.Content,null,t.createElement(l.WarningPanel,{title:"Entity not found"},"There is no ",oe," with the requested"," ",t.createElement(l.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(pe.UnregisterEntityDialog,{open:zt,entity:me,onConfirm:qt,onClose:()=>Jt(!1)}),t.createElement(pe.InspectEntityDialog,{open:Xn,entity:me,onClose:()=>Zn(!1)}))};Ve.Route=V;var st=e(10179);function mt(h){const{open:I,onClose:N,onConfirm:Q,entity:oe}=h,[fe,Be]=useState(!1),me=useApi(catalogApiRef),Ie=useApi(alertApiRef),He=async()=>{Be(!0);try{const Ye=oe.metadata.uid;await me.removeEntityByUid(Ye),Q()}catch(Ye){assertError(Ye),Ie.post({message:Ye.message})}finally{Be(!1)}};return React.createElement(Dialog,{open:I,onClose:N},React.createElement(DialogTitle,{id:"responsive-dialog-title"},"Are you sure you want to delete this entity?"),React.createElement(DialogActions,null,React.createElement(Button,{variant:"contained",color:"secondary",disabled:fe,onClick:He},"Delete"),React.createElement(Button,{onClick:N,color:"primary"},"Cancel")))}function $t(h){var I,N;return((N=(I=h==null?void 0:h.metadata)==null?void 0:I.annotations)==null?void 0:N["backstage.io/orphan"])==="true"}function tn(){const h=useNavigate(),I=useRouteRef(catalogRouteRef),[N,Q]=useState(!1),{entity:oe}=useEntity(),fe=async()=>{Q(!1),h(I())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>Q(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:N,entity:oe,onConfirm:fe,onClose:()=>Q(!1)}))}var un=e(58248);const Nt=h=>h.error&&h.level==="error"&&h.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function In(h,I){return{items:(await I.getEntityAncestors({entityRef:h})).items.map(oe=>{var me,Ie;return{errors:((Ie=(me=oe.entity.status)==null?void 0:me.items)!=null?Ie:[]).filter(Nt).map(He=>He.error).filter(He=>Boolean(He)),entity:oe.entity}}).filter(oe=>oe.errors.length>0)}}async function ht(h,I){const N=I.apis.get(catalogApiRef);if(!N)throw new Error(`No implementation available for ${catalogApiRef}`);return(await In(stringifyEntityRef(h),N)).items.length>0}function Vt(){const{entity:h}=useEntity(),I=stringifyEntityRef(h),N=useApi(catalogApiRef),{loading:Q,error:oe,value:fe}=useAsync(async()=>In(I,N),[I,N]);return oe?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:oe})):Q||!fe?null:React.createElement(React.Fragment,null,fe.items.map((Be,me)=>React.createElement(Box,{key:me,mb:1},stringifyEntityRef(h)!==stringifyEntityRef(Be.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:Be.entity})),Be.errors.map((Ie,He)=>React.createElement(ResponseErrorPanel,{key:He,error:Ie})))))}var Sn=e(64279);const Ln="core.backstage.entitySwitch",wt=h=>null;(0,i.attachComponentData)(wt,Ln,!0);const zn=h=>{var fe,Be;const{entity:I}=(0,pe.useEntity)(),N=(0,i.useApiHolder)(),Q=(0,i.useElementFilter)(h.children,me=>me.selectByComponentData({key:Ln,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(Ie=>{var It;const{if:He,children:Ye}=Ie.props;return[{if:(It=He==null?void 0:He(I,{apis:N}))!=null?It:!0,children:Ye}]}),[N,I]);return Q.some(me=>typeof me.if=="object"&&"then"in me.if)?t.createElement(pa,{results:Q}):(Be=(fe=Q.find(me=>me.if))==null?void 0:fe.children)!=null?Be:null};function pa({results:h}){const{loading:I,value:N}=(0,Sn.default)(async()=>{var oe;const Q=h.map(async({if:fe,children:Be})=>{try{if(await fe)return Be}catch{}return null});return(oe=(await Promise.all(Q)).find(Boolean))!=null?oe:null},[h]);return I||!N?null:N}zn.Case=wt;var ta=e(26997),na=e(47851);const Gt=(0,i.createPlugin)({id:"catalog",apis:[(0,i.createApiFactory)({api:pe.catalogApiRef,deps:{discoveryApi:i.discoveryApiRef,fetchApi:i.fetchApiRef},factory:({discoveryApi:h,fetchApi:I})=>new un.CatalogClient({discoveryApi:h,fetchApi:I})}),(0,i.createApiFactory)({api:pe.starredEntitiesApiRef,deps:{storageApi:i.storageApiRef},factory:({storageApi:h})=>new pe.DefaultStarredEntitiesApi({storageApi:h})})],routes:{catalogIndex:pe.catalogRouteRef,catalogEntity:pe.entityRouteRef},externalRoutes:{createComponent:na.y,viewTechDoc:na.j}}),za=Gt.provide((0,i.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(h=>h.CatalogPage),mountPoint:pe.catalogRouteRef})),aa=Gt.provide((0,i.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(h=>h.CatalogEntityPage),mountPoint:pe.entityRouteRef})),Wa=Gt.provide((0,i.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(h=>h.AboutCard)}})),Ha=Gt.provide((0,i.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(h=>h.EntityLinksCard)}})),Va=Gt.provide((0,i.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(h=>h.HasSystemsCard)}})),ya=Gt.provide((0,i.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(h=>h.HasComponentsCard)}})),Ea=Gt.provide((0,i.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(h=>h.HasSubcomponentsCard)}})),Ga=Gt.provide((0,i.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(h=>h.HasResourcesCard)}})),Bn=Gt.provide((0,i.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(h=>h.DependsOnComponentsCard)}})),va=Gt.provide((0,i.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(h=>h.DependencyOfComponentsCard)}})),dn=Gt.provide((0,i.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(h=>h.DependsOnResourcesCard)}})),Mt=Gt.provide((0,i.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(h=>h.RelatedEntitiesCard)}}));var Cn=e(3337),Wn=e(76372);class Aa{constructor(I){ae(this,"configApi");ae(this,"discoveryApi");ae(this,"fetchApi");this.configApi=I.configApi,this.discoveryApi=I.discoveryApi,this.fetchApi=I.fetchApi}async getApiOrigin(){var I;return(I=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?I:await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(I){const{kind:N,namespace:Q,name:oe}=I,Be=`${await this.getApiOrigin()}/metadata/techdocs/${Q}/${N}/${oe}`,me=await this.fetchApi.fetch(`${Be}`);if(!me.ok)throw await st.VL.fromResponse(me);return await me.json()}async getEntityMetadata(I){const{kind:N,namespace:Q,name:oe}=I,Be=`${await this.getApiOrigin()}/metadata/entity/${Q}/${N}/${oe}`,me=await this.fetchApi.fetch(`${Be}`);if(!me.ok)throw await st.VL.fromResponse(me);return await me.json()}}class ra{constructor(I){ae(this,"configApi");ae(this,"discoveryApi");ae(this,"identityApi");ae(this,"fetchApi");this.configApi=I.configApi,this.discoveryApi=I.discoveryApi,this.identityApi=I.identityApi,this.fetchApi=I.fetchApi}async getApiOrigin(){var I;return(I=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?I:await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var I;return(I=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?I:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(I,N){const{kind:Q,namespace:oe,name:fe}=I,me=`${await this.getStorageUrl()}/${oe}/${Q}/${fe}/${N}`,Ie=await this.fetchApi.fetch(`${me.endsWith("/")?me:`${me}/`}index.html`);let He="";switch(Ie.status){case 404:throw He="Page not found. ",N||(He+="This could be because there is no index.md file in the root of the docs directory of this repository."),new st.dR(He);case 500:throw He="Could not generate documentation or an error in the TechDocs backend. ",new Error(He);default:break}return Ie.text()}async syncEntityDocs(I,N=()=>{}){const{kind:Q,namespace:oe,name:fe}=I,me=`${await this.getApiOrigin()}/sync/${oe}/${Q}/${fe}`,{token:Ie}=await this.identityApi.getCredentials();return new Promise((He,Ye)=>{const It=new Wn.EventSourcePolyfill(me,{withCredentials:!0,headers:Ie?{Authorization:`Bearer ${Ie}`}:{}});It.addEventListener("log",ut=>{ut.data&&N(JSON.parse(ut.data))}),It.addEventListener("finish",ut=>{let Ft=!1;ut.data&&({updated:Ft}=JSON.parse(ut.data)),He(Ft?"updated":"cached")}),It.onerror=ut=>{switch(It.close(),ut.status){case 404:Ye(new st.dR(ut.message));return;default:Ye(new Error(ut.data));return}}})}async getBaseUrl(I,N,Q){const{kind:oe,namespace:fe,name:Be}=N,Ie=`${await this.getApiOrigin()}/static/docs/${fe}/${oe}/${Be}/${Q}`;return new URL(I,Ie.endsWith("/")?Ie:`${Ie}/`).toString()}}var ur=e(71226),Ra=e(95074),oa=e(76635),Sa=e(83201),Hn=e(50294),Ca=e(67430);const Vn=({columns:h,actions:I})=>{var It,ut;const{loading:N,error:Q,entities:oe,filters:fe}=(0,pe.useEntityList)(),{isStarredEntity:Be,toggleStarredEntity:me}=(0,pe.useStarredEntities)(),[,Ie]=(0,Ra.Z)(),He=(0,oa.capitalize)((ut=(It=fe.user)==null?void 0:It.value)!=null?ut:"all"),Ye=[Hn.createCopyDocsUrlAction(Ie),Hn.createStarEntityAction(Be,me)];return Q?t.createElement(l.WarningPanel,{severity:"error",title:"Could not load available documentation."},t.createElement(l.CodeSnippet,{language:"text",text:Q.toString()})):t.createElement(Sa.DocsTable,{title:He,entities:oe,loading:N,actions:I||Ye,columns:h})};Vn.columns=Ca,Vn.actions=Hn;var Tn=e(1114);class rn{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":pe.CATALOG_FILTER_EXISTS}}}const On=()=>{const{updateFilters:h}=(0,pe.useEntityList)();return(0,t.useEffect)(()=>{h({techdocs:new rn})},[h]),null},Gn=({initialFilter:h="all",columns:I,actions:N})=>t.createElement(Tn.j,null,t.createElement(l.Content,null,t.createElement(l.ContentHeader,{title:""},t.createElement(l.SupportButton,null,"Discover documentation in your ecosystem.")),t.createElement(pe.EntityListProvider,null,t.createElement(ta.q7,null,t.createElement(ta.Gh,null,t.createElement(On,null),t.createElement(pe.UserListPicker,{initialFilter:h}),t.createElement(pe.EntityOwnerPicker,null),t.createElement(pe.EntityTagPicker,null)),t.createElement(ta.Nz,null,t.createElement(Vn,{actions:N,columns:I}))))));var ja=e(10187);const Ka=()=>{const{loading:h,error:I,entities:N}=useEntityList();return I?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:I.toString()})):h||!N?React.createElement(Progress,null):(N.sort((Q,oe)=>{var fe,Be;return((fe=Q.metadata.title)!=null?fe:Q.metadata.name).localeCompare((Be=oe.metadata.title)!=null?Be:oe.metadata.name)}),React.createElement(DocsCardGrid,{entities:N}))};var on=e(68725);const fn=(0,i.createPlugin)({id:"techdocs",apis:[(0,i.createApiFactory)({api:Cn.D,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef,fetchApi:i.fetchApiRef},factory:({configApi:h,discoveryApi:I,identityApi:N,fetchApi:Q})=>new ra({configApi:h,discoveryApi:I,identityApi:N,fetchApi:Q})}),(0,i.createApiFactory)({api:Cn.g,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,fetchApi:i.fetchApiRef},factory:({configApi:h,discoveryApi:I,fetchApi:N})=>new Aa({configApi:h,discoveryApi:I,fetchApi:N})})],routes:{root:on._Z,docRoot:on.Fw,entityContent:on.pd}}),Ya=fn.provide((0,i.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(h=>h.Router),mountPoint:on._Z})),sa=fn.provide((0,i.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(h=>h.EmbeddedDocsRouter),mountPoint:on.pd})),mn=fn.provide((0,i.createComponentExtension)({name:"DocsCardGrid",component:{lazy:()=>Promise.resolve().then(e.bind(e,10187)).then(h=>h.DocsCardGrid)}})),jn=fn.provide((0,i.createComponentExtension)({name:"DocsTable",component:{lazy:()=>Promise.resolve().then(e.bind(e,83201)).then(h=>h.DocsTable)}})),Kn=fn.provide((0,i.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>Promise.resolve().then(e.bind(e,57110)).then(h=>h.TechDocsCustomHome),mountPoint:on._Z})),Yn=fn.provide((0,i.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,41481)).then(h=>h.TechDocsIndexPage),mountPoint:on._Z})),Jn=fn.provide((0,i.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,31752)).then(h=>h.TechDocsPage),mountPoint:on.Fw}));var Mn=e(73873),Ja=e(94067),xn=e(36356);class Yt{constructor({configApi:I,discoveryApi:N,identityApi:Q}){ae(this,"configApi");ae(this,"discoveryApi");ae(this,"identityApi");this.configApi=I,this.discoveryApi=N,this.identityApi=Q}async getApiOrigin(){var I;return(I=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?I:await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var I;return(I=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?I:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(I,N){const oe=`${await this.getApiOrigin()}/${N}`,fe=await fetch(`${oe.endsWith("/")?oe:`${oe}/`}index.html`);if(fe.status===404)throw new Error("Page not found");return fe.text()}async syncEntityDocs(I){return"cached"}async getBaseUrl(I,N,Q){const oe=await this.getApiOrigin();return new URL(I,`${oe}/${Q}`).toString()}}class hn{constructor({configApi:I,discoveryApi:N,identityApi:Q}){ae(this,"configApi");ae(this,"discoveryApi");ae(this,"identityApi");this.configApi=I,this.discoveryApi=N,this.identityApi=Q}async getApiOrigin(){var I;return(I=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?I:await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(I){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(I){return{site_name:"Live preview environment",site_description:""}}}const ia=[(0,i.createApiFactory)({api:Cn.D,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:h,discoveryApi:I,identityApi:N})=>new Yt({configApi:h,discoveryApi:I,identityApi:N})}),(0,i.createApiFactory)({api:Cn.g,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:h,discoveryApi:I,identityApi:N})=>new hn({configApi:h,discoveryApi:I,identityApi:N})}),(0,i.createApiFactory)({api:xn.q3,deps:{configApi:i.configApiRef},factory:({configApi:h})=>xn.ae.fromConfig(h)})];var Ta=e(86689),Pa=e(58845);const Ia=(0,ne.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var La=()=>{const h=Ia();return t.createElement("svg",{className:h.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:h.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"}))};const Oa=(0,ne.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Nn=()=>{const h=Oa();return t.createElement("svg",{className:h.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:h.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"}))};const ba=(0,ne.Z)({root:{width:l.sidebarConfig.drawerWidthClosed,height:3*l.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:l.sidebarConfig.drawerWidthClosed,marginLeft:24}}),bn=()=>{const h=ba(),{isOpen:I}=(0,t.useContext)(l.SidebarContext);return t.createElement("div",{className:h.root},t.createElement(Ta.Z,{component:r.OL,to:"/docs/default/component/local/",underline:"none",className:h.link},I?t.createElement(La,null):t.createElement(Nn,null)))},Pn=({children:h})=>t.createElement(l.SidebarPage,null,t.createElement(l.Sidebar,null,t.createElement(bn,null),t.createElement(l.SidebarDivider,null),t.createElement(l.SidebarItem,{icon:Pa.Z,to:"/docs/default/component/local",text:"Docs Preview"})),h);var Da=e(80030),Xa=e(32388),Fa=e(4142);const la=(0,ne.Z)(h=>({headerIcon:{color:h.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:h.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var nn;(function(h){const I="light";h.LIGHT=I;const N="dark";h.DARK=N})(nn||(nn={}));const ca=(0,t.createContext)({theme:nn.LIGHT,toggleTheme:()=>{}}),Ba=({children:h})=>{const[I,N]=(0,t.useState)(nn.LIGHT),Q=(0,t.useCallback)(()=>{N(Be=>Be===nn.LIGHT?nn.DARK:nn.LIGHT)},[N]),oe={theme:I,toggleTheme:Q},fe={[nn.LIGHT]:ot,[nn.DARK]:nt};return t.createElement(ca.Provider,{value:oe},t.createElement(At.Z,{theme:fe[I]},h))},Ma=()=>(0,t.useContext)(ca),Qn=()=>{const h=la(),{theme:I,toggleTheme:N}=Ma(),Q={[nn.LIGHT]:{icon:Fa.Z,title:"Dark theme"},[nn.DARK]:{icon:Xa.Z,title:"Light theme"}},{title:oe,icon:fe}=Q[I];return t.createElement(xe.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(Da.ZP,{title:oe,arrow:!0},t.createElement(Ke.Z,{size:"small",onClick:N},t.createElement(fe,{className:h.headerIcon}))))},Na=({onReady:h,entityRef:I})=>{const N=la();return t.createElement(l.Content,{className:N.content,"data-testid":"techdocs-content"},t.createElement(Mn.Ej,{onReady:h,entityRef:I,withSearch:!1}))},ua=()=>{const h={site_name:"Live preview environment",site_description:""};return t.createElement(Mn.EV,null,({entityRef:I,onReady:N})=>t.createElement(t.Fragment,null,t.createElement(Mn.nN,{entityRef:I,techDocsMetadata:h},t.createElement(Qn,null)),t.createElement(Na,{entityRef:I,onReady:N})))},Za=t.createElement(Ba,null,t.createElement(ua,null)),da={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external",requestUrl:"http://localhost:3000/api"}},ka={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external",requestUrl:"http://localhost:7007/api"}};async function dr(){const h=await fetch("/.detect");return h.ok?(await h.text()).trim()==="techdocs-cli-server":!1}async function C(){const h=await(0,y.defaultConfigLoader)(),I=await dr();return[...h,{context:"detected",data:I?da:ka}]}const L=P({apis:ia,configLoader:C,plugins:Object.values(a)}),U=L.getProvider(),H=L.getRouter(),J=t.createElement(y.FlatRoutes,null,t.createElement(f.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(f.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(aa,null)}),t.createElement(f.AW,{path:"/docs",element:t.createElement(Yn,null)},t.createElement(Gn,null)),t.createElement(f.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(Jn,null)},Za));var ie=()=>t.createElement(U,null,t.createElement(H,null,t.createElement(Pn,null,J)));c.render(t.createElement(ie,null),document.getElementById("root"))},76241:function(_,s,e){"use strict";e.d(s,{CT:function(){return i},EI:function(){return m},uW:function(){return f},Vt:function(){return v}});function a(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=a(),c=l=>`__@backstage/${l}__`;function f(l,r){const A=c(l);let T=t[A];return T||(T=r(),t[A]=T,T)}var y=e(2784);function i(l){return f(l,()=>(0,y.createContext)(void 0))}function v(l){return(0,y.useContext)(i(l))}function p(l){return{set(r){globalThis[`__@backstage/${l}__`]=createContext(createVersionedValueMap(r))},reset(){delete globalThis[`__@backstage/${l}__`]}}}function m(l){return Object.freeze(l),{atVersion(r){return l[r]}}}},31423:function(_,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return D},CATALOG_FILTER_EXISTS:function(){return a.CATALOG_FILTER_EXISTS},DefaultStarredEntitiesApi:function(){return m},EntityKindFilter:function(){return it},EntityLifecyclePicker:function(){return ue},EntityListProvider:function(){return gt},EntityOwnerPicker:function(){return $e},EntityRefLink:function(){return nt},EntityRefLinks:function(){return vt},EntityTable:function(){return Nt},EntityTagPicker:function(){return Sn},EntityTypePicker:function(){return zn},FavoriteEntity:function(){return Ha},InspectEntityDialog:function(){return Da},UnregisterEntityDialog:function(){return Ba},UserListPicker:function(){return da},catalogApiRef:function(){return c},catalogRouteRef:function(){return Z},entityRouteRef:function(){return O},favoriteEntityIcon:function(){return Wa},favoriteEntityTooltip:function(){return aa},formatEntityRefTitle:function(){return et},getEntityMetadataEditUrl:function(){return dt},getEntityMetadataViewUrl:function(){return tt},getEntityRelations:function(){return je},getEntitySourceLocation:function(){return Et},isOwnerOf:function(){return Bt},starredEntitiesApiRef:function(){return l},useEntity:function(){return ce},useEntityCompoundName:function(){return x},useEntityList:function(){return rt},useEntityPermission:function(){return Xe},useRelatedEntities:function(){return Ne},useStarredEntities:function(){return xe}});var a=e(58248),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.catalog.service"});var f=e(82394),y=e.n(f),i=e(41564),v=e(76635);async function p({storageApi:C}){var k;const L=C.forBucket("settings"),U=C.forBucket("starredEntities"),H=L.get("starredEntities");if(!(0,v.isArray)(H))return;const J=new Set((k=U.get("entityRefs"))!=null?k:[]);H.filter(v.isString).map(ie=>ie.split(":")).filter(ie=>ie.length===4&&ie[0]==="entity").map(([ie,h,I,N])=>(0,i.eE)({kind:h,namespace:I,name:N})).forEach(ie=>J.add(ie)),await U.set("entityRefs",Array.from(J)),await L.remove("starredEntities")}class m{constructor(L){ae(this,"settingsStore");ae(this,"starredEntities");ae(this,"subscribers",new Set);ae(this,"observable",new(y())(L=>(L.next(this.starredEntities),this.subscribers.add(L),()=>{this.subscribers.delete(L)})));var U;p(L).then(),this.settingsStore=L.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((U=this.settingsStore.get("entityRefs"))!=null?U:[]),this.settingsStore.observe$("entityRefs").subscribe({next:H=>{var J;this.starredEntities=new Set((J=H.newValue)!=null?J:[]),this.notifyChanges()}})}async toggleStarred(L){this.starredEntities.has(L)?this.starredEntities.delete(L):this.starredEntities.add(L),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}isStarred(L){return this.starredEntities.has(L)}notifyChanges(){for(const L of this.subscribers)L.next(this.starredEntities)}}const l=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var r=e(2784),A=e(76241);const Z=(0,t.createRouteRef)({id:"catalog"}),O=(0,A.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]})),q=null;function $(C){var L,U;return{kind:C.kind.toLocaleLowerCase("en-US"),namespace:(U=(L=C.metadata.namespace)==null?void 0:L.toLocaleLowerCase("en-US"))!=null?U:DEFAULT_NAMESPACE,name:C.metadata.name}}const x=()=>{const{kind:C,namespace:L,name:U}=(0,t.useRouteRefParams)(O);return{kind:C,namespace:L,name:U}},b=(0,A.CT)("entity-context"),D=({children:C,entity:L,loading:U,error:H,refresh:J})=>{const k={entity:L,loading:U,error:H,refresh:J};return r.createElement(b.Provider,{value:(0,A.EI)({1:k})},C)},j=({entity:C,children:L})=>React.createElement(D,{entity:C,loading:!Boolean(C),error:void 0,refresh:void 0,children:L}),ee=()=>{const{kind:C,namespace:L,name:U}=useEntityCompoundName(),H=useNavigate(),J=useApi(errorApiRef),k=useApi(catalogApiRef),{value:ie,error:h,loading:I,retry:N}=useAsyncRetry(()=>k.getEntityByName({kind:C,namespace:L,name:U}),[k,C,L,U]);return useEffect(()=>{U||(J.post(new Error("No name provided!")),H("/"))},[J,H,h,I,ie,U]),{entity:ie,loading:I,error:h,refresh:N}};function ce(){const C=(0,A.Vt)("entity-context");if(!C)return{entity:void 0,loading:!0,error:void 0,refresh:()=>{}};const L=C.atVersion(1);if(!L)throw new Error("EntityContext v1 not available");const{entity:U,loading:H,error:J,refresh:k}=L;return{entity:U,loading:H,error:J,refresh:k}}var Ee=e(19126),Ae=e.n(Ee),Oe=e(10289),ge=e(69294),Ge=e(48760),Qe=e(90736);function Ue(C){return C.reduce((L,U)=>({...L,...U.getCatalogFilters?U.getCatalogFilters():{}}),{})}function we(C){return L=>C.every(U=>!U.filterEntity||U.filterEntity(L))}function tt(C){var L;return(L=C.metadata.annotations)==null?void 0:L[i.l2]}function dt(C){var L;return(L=C.metadata.annotations)==null?void 0:L[i.Tf]}function je(C,L,U){var J;let H=((J=C==null?void 0:C.relations)==null?void 0:J.filter(k=>k.type===L).map(k=>(0,i.of)(k.targetRef)))||[];return(U==null?void 0:U.kind)&&(H=H.filter(k=>k.kind.toLocaleLowerCase("en-US")===U.kind.toLocaleLowerCase("en-US"))),H}function Et(C,L){var H;const U=(H=C.metadata.annotations)==null?void 0:H[i.M6];if(!!U)try{const J=(0,i.Ou)(U),k=L.byUrl(J.target);return{locationTargetUrl:J.target,integrationType:k==null?void 0:k.type}}catch{return}}function Bt(C,L){const U=new Set([...je(C,i.hr,{kind:"group"}),...C?[(0,i.C_)(C)]:[]].map(i.eE)),H=je(L,i.S4).map(i.eE);for(const J of H)if(U.has(J))return!0;return!1}const Tt=(0,r.createContext)(void 0),gt=({children:C})=>{const L=(0,Qe.default)(),U=(0,t.useApi)(c),[H,J]=(0,r.useState)({}),k=(0,Oe.TH)(),ie=(0,r.useMemo)(()=>{var me;return(me=Ae().parse(k.search,{ignoreQueryPrefix:!0}).filters)!=null?me:{}},[k]),[h,I]=(0,r.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:N,error:Q},oe]=(0,ge.default)(async()=>{var ut;const me=(0,v.compact)(Object.values(H)),Ie=we(me),He=Ue(me),Ye=Ue((0,v.compact)(Object.values(h.appliedFilters))),It=Object.keys(H).reduce((Ft,zt)=>{const Jt=H[zt];return(Jt==null?void 0:Jt.toQueryValue)&&(Ft[zt]=Jt.toQueryValue()),Ft},{});if((0,v.isEqual)(Ye,He))I({appliedFilters:H,backendEntities:h.backendEntities,entities:h.backendEntities.filter(Ie)});else{const Ft=await U.getEntities({filter:He});I({appliedFilters:H,backendEntities:Ft.items,entities:Ft.items.filter(Ie)})}if(L()){const Ft=Ae().parse(k.search,{ignoreQueryPrefix:!0}),zt=Ae().stringify({...Ft,filters:It},{addQueryPrefix:!0}),Jt=`${window.location.pathname}${zt}`;(ut=window.history)==null||ut.replaceState(null,document.title,Jt)}},[U,ie,H,h],{loading:!0});(0,Ge.Z)(oe,10,[H]);const fe=(0,r.useCallback)(me=>{J(Ie=>{const He=typeof me=="function"?me(Ie):me;return{...Ie,...He}})},[]),Be=(0,r.useMemo)(()=>({filters:h.appliedFilters,entities:h.entities,backendEntities:h.backendEntities,updateFilters:fe,queryParameters:ie,loading:N,error:Q}),[h,fe,ie,N,Q]);return r.createElement(Tt.Provider,{value:Be},C)};function yt(){const C=useContext(Tt);if(!C)throw new Error("useEntityList must be used within EntityListProvider");return C}function rt(){const C=(0,r.useContext)(Tt);if(!C)throw new Error("useEntityList must be used within EntityListProvider");return C}var pt=e(64279),Pt=e(18149),xt=e.n(Pt),Dt=e(829),bt=e.n(Dt);function et(C,L){const U=L==null?void 0:L.defaultKind;let H,J,k;return"metadata"in C?(H=C.kind,J=C.metadata.namespace,k=C.metadata.name):(H=C.kind,J=C.namespace,k=C.name),J===i.zG&&(J=void 0),H=H.toLocaleLowerCase("en-US"),H=U&&U.toLocaleLowerCase("en-US")===H?void 0:H,`${H?`${H}:`:""}${J?`${J}/`:""}${k}`}var Ce=e(9118),ot=e(80030);const nt=(0,r.forwardRef)((C,L)=>{var me;const{entityRef:U,defaultKind:H,title:J,children:k,...ie}=C,h=(0,t.useRouteRef)(O);let I,N,Q;if(typeof U=="string"){const Ie=(0,i.of)(U);I=Ie.kind,N=Ie.namespace,Q=Ie.name}else"metadata"in U?(I=U.kind,N=U.metadata.namespace,Q=U.metadata.name):(I=U.kind,N=U.namespace,Q=U.name);I=I.toLocaleLowerCase("en-US"),N=(me=N==null?void 0:N.toLocaleLowerCase("en-US"))!=null?me:i.zG;const oe={kind:I,namespace:N,name:Q},fe=et({kind:I,namespace:N,name:Q},{defaultKind:H}),Be=r.createElement(Ce.Link,{...ie,ref:L,to:h(oe)},k,!k&&(J!=null?J:fe));return J?r.createElement(ot.ZP,{title:fe},Be):Be}),vt=({entityRefs:C,defaultKind:L,...U})=>r.createElement(r.Fragment,null,C.map((H,J)=>r.createElement(r.Fragment,{key:J},J>0&&", ",r.createElement(nt,{...U,entityRef:H,defaultKind:L}))));class it{constructor(L){this.value=L}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class At{constructor(L){this.value=L}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class B{constructor(L){this.values=L}filterEntity(L){return this.values.every(U=>{var H;return((H=L.metadata.tags)!=null?H:[]).includes(U)})}toQueryValue(){return this.values}}class R{constructor(L){this.value=L}filterEntity(L){var H;const U=this.value.toLocaleUpperCase("en-US");return L.metadata.name.toLocaleUpperCase("en-US").includes(U)||`${L.metadata.title}`.toLocaleUpperCase("en-US").includes(U)||((H=L.metadata.tags)==null?void 0:H.join("").toLocaleUpperCase("en-US").indexOf(U))!==-1}}class P{constructor(L){this.values=L}filterEntity(L){return this.values.some(U=>je(L,i.S4).some(H=>et(H,{defaultKind:"group"})===U))}toQueryValue(){return this.values}}class K{constructor(L){this.values=L}filterEntity(L){return this.values.some(U=>{var H;return((H=L.spec)==null?void 0:H.lifecycle)===U})}toQueryValue(){return this.values}}class W{constructor(L,U,H){this.value=L,this.isOwnedEntity=U,this.isStarredEntity=H}filterEntity(L){switch(this.value){case"owned":return this.isOwnedEntity(L);case"starred":return this.isStarredEntity(L);default:return!0}}toQueryValue(){return this.value}}function ne(){var Ie;const C=(0,t.useApi)(c),{filters:{kind:L,type:U},queryParameters:H,updateFilters:J}=rt(),k=(0,r.useMemo)(()=>[H.type].flat().filter(Boolean),[H]),[ie,h]=(0,r.useState)(k.length?k:(Ie=U==null?void 0:U.getTypes())!=null?Ie:[]);(0,r.useEffect)(()=>{k.length&&h(k)},[k]);const[I,N]=(0,r.useState)([]),Q=(0,r.useMemo)(()=>L==null?void 0:L.value,[L]),{error:oe,loading:fe,value:Be}=(0,pt.default)(async()=>Q?await C.getEntityFacets({filter:{kind:Q},facets:["spec.type"]}).then(Ye=>Ye.facets["spec.type"]||[]):[],[Q,C]),me=(0,r.useRef)(Be);return(0,r.useEffect)(()=>{const He=me.current;if(me.current=Be,fe||!Q||He===Be||!Be)return;const Ye=bt()(Be,ut=>-ut.count).map(ut=>ut.value);N(Ye);const It=ie.filter(ut=>Ye.includes(ut));xt()(ie,It)||h(It)},[fe,Q,ie,h,Be]),(0,r.useEffect)(()=>{J({type:ie.length?new At(ie):void 0})},[ie,J]),{loading:fe,error:oe,availableTypes:I,selectedTypes:ie,setSelectedTypes:h}}function ye(){const C=useApi(catalogApiRef),{error:L,loading:U,value:H}=useAsync(async()=>await C.getEntityFacets({facets:["kind"]}).then(J=>{var k;return((k=J.facets.kind)==null?void 0:k.map(ie=>ie.value).sort())||[]}));return{error:L,loading:U,kinds:H}}function ve(){const C=useApi(catalogApiRef),L=useApi(identityApiRef);return useAsync(async()=>{const U=await L.getBackstageIdentity();return C.getEntityByName(parseEntityRef(U.userEntityRef,{defaultKind:"User",defaultNamespace:DEFAULT_NAMESPACE}))},[C,L])}const Me=20;function Ne(C,L){var I,N;const U=(I=L==null?void 0:L.type)==null?void 0:I.toLocaleLowerCase("en-US"),H=(N=L==null?void 0:L.kind)==null?void 0:N.toLocaleLowerCase("en-US"),J=(0,t.useApi)(c),{loading:k,value:ie,error:h}=(0,pt.default)(async()=>{var me;const Q=(me=C.relations)==null?void 0:me.map(Ie=>({type:Ie.type,target:(0,i.of)(Ie.targetRef)})).filter(Ie=>(!U||Ie.type.toLocaleLowerCase("en-US")===U)&&(!H||Ie.target.kind===H));if(!Q)return[];const oe=Object.values((0,v.groupBy)(Q,({target:Ie})=>`${Ie.kind}:${Ie.namespace}`.toLocaleLowerCase("en-US"))),fe=[];for(const Ie of oe)fe.push({kind:Ie[0].target.kind,namespace:Ie[0].target.namespace,nameBatches:(0,v.chunk)(Ie.map(He=>He.target.name),Me)});return(await Promise.all(fe.flatMap(Ie=>Ie.nameBatches.map(He=>J.getEntities({filter:{kind:Ie.kind,"metadata.namespace":Ie.namespace,"metadata.name":He}}))))).flatMap(Ie=>Ie.items)},[C,U,H]);return{entities:ie,loading:k,error:h}}var Re=e(72164);function pe(C){return typeof C=="string"?C:(0,i.eE)(C)}function xe(){const C=(0,t.useApi)(l),L=(0,Re.Z)(C.starredEntitie$(),new Set),U=(0,r.useCallback)(J=>L.has(pe(J)),[L]),H=(0,r.useCallback)(J=>C.toggleStarred(pe(J)).then(),[C]);return{starredEntities:L,toggleStarredEntity:H,isStarredEntity:U}}function ft(C){return typeof C=="string"?C:(0,i.eE)(C)}function lt(C){const L=(0,t.useApi)(l),[U,H]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{const k=L.starredEntitie$().subscribe({next(ie){H(ie.has(ft(C)))}});return()=>{k.unsubscribe()}},[C,L]),{toggleStarredEntity:(0,r.useCallback)(()=>L.toggleStarred(ft(C)).then(),[C,L]),isStarredEntity:U}}async function ze(C,L){const U=new Array,H=L.find(J=>J.startsWith("user:"));if(H){const J=await C.getEntityByName((0,i.of)(H));if(J){const k=je(J,i.hr,{kind:"Group"});for(const ie of k)U.push((0,i.eE)(ie))}}return U}function le(){const C=(0,t.useApi)(t.identityApiRef),L=(0,t.useApi)(c),{loading:U,value:H}=(0,pt.default)(async()=>{const{ownershipEntityRefs:k}=await C.getBackstageIdentity(),ie=await ze(L,k);return new Set([...k,...ie])},[]),J=(0,r.useMemo)(()=>{const k=new Set(H!=null?H:[]);return ie=>{const h=("metadata"in ie?je(ie,i.S4):[ie]).map(i.eE);for(const I of h)if(k.has(I))return!0;return!1}},[H]);return(0,r.useMemo)(()=>({loading:U,isOwnedEntity:J}),[U,J])}function Ze(C){const L=useApi(identityApiRef),U=useApi(catalogApiRef),{loading:H,value:J}=useAsync(async()=>{const h=(await L.getBackstageIdentity()).ownershipEntityRefs,I=await loadCatalogOwnerRefs(U,h);return await U.getEntities(C?{filter:{kind:C,[`relations.${RELATION_OWNED_BY}`]:[...h,...I]}}:{filter:{[`relations.${RELATION_OWNED_BY}`]:[...h,...I]}})},[]),k=useMemo(()=>J,[J]);return useMemo(()=>({loading:H,ownedEntities:k}),[H,k])}var Ke=e(20221);function Xe(C){const{entity:L,loading:U,error:H}=ce(),{allowed:J,loading:k,error:ie}=(0,Ke.gI)(C,L?(0,i.eE)(L):void 0);return U||k?{loading:!0,allowed:!1}:H?{loading:!1,allowed:!1,error:H}:{loading:!1,allowed:J,error:ie}}const ke=C=>{var ie;const{initialFilter:L,hidden:U}=C,{updateFilters:H,queryParameters:J}=useEntityList(),[k]=useState((ie=[J.kind].flat()[0])!=null?ie:L);return useEffect(()=>{H({kind:k?new EntityKindFilter(k):void 0})},[k,H]),U?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var We=e(79692),w=e(95544),E=e(90436),M=e(5806),Y=e(21324),te=e(86619),be=e(19996),he=e(25505),Fe=e(38016),De=e(88013);const qe=(0,We.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),_e=r.createElement(he.Z,{fontSize:"small"}),Rt=r.createElement(be.Z,{fontSize:"small"}),ue=()=>{var N,Q;const C=qe(),{updateFilters:L,backendEntities:U,filters:H,queryParameters:J}=rt(),k=(0,r.useMemo)(()=>[J.lifecycles].flat().filter(Boolean),[J]),[ie,h]=(0,r.useState)(k.length?k:(Q=(N=H.lifecycles)==null?void 0:N.values)!=null?Q:[]);(0,r.useEffect)(()=>{k.length&&h(k)},[k]),(0,r.useEffect)(()=>{L({lifecycles:ie.length?new K(ie):void 0})},[ie,L]);const I=(0,r.useMemo)(()=>[...new Set(U.map(oe=>{var fe;return(fe=oe.spec)==null?void 0:fe.lifecycle}).filter(Boolean))].sort(),[U]);return I.length?r.createElement(w.Z,{pb:1,pt:1},r.createElement(E.Z,{variant:"button"},"Lifecycle"),r.createElement(De.ZP,{"aria-label":"Lifecycle",multiple:!0,options:I,value:ie,onChange:(oe,fe)=>h(fe),renderOption:(oe,{selected:fe})=>r.createElement(M.Z,{control:r.createElement(Y.Z,{icon:_e,checkedIcon:Rt,checked:fe}),label:oe}),size:"small",popupIcon:r.createElement(Fe.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:oe=>r.createElement(te.Z,{...oe,className:C.input,variant:"outlined"})})):null},V=(0,We.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),se=r.createElement(he.Z,{fontSize:"small"}),Te=r.createElement(be.Z,{fontSize:"small"}),$e=()=>{var N,Q;const C=V(),{updateFilters:L,backendEntities:U,filters:H,queryParameters:J}=rt(),k=(0,r.useMemo)(()=>[J.owners].flat().filter(Boolean),[J]),[ie,h]=(0,r.useState)(k.length?k:(Q=(N=H.owners)==null?void 0:N.values)!=null?Q:[]);(0,r.useEffect)(()=>{k.length&&h(k)},[k]),(0,r.useEffect)(()=>{L({owners:ie.length?new P(ie):void 0})},[ie,L]);const I=(0,r.useMemo)(()=>[...new Set(U.flatMap(oe=>je(oe,i.S4).map(fe=>et(fe,{defaultKind:"group"}))).filter(Boolean))].sort(),[U]);return I.length?r.createElement(w.Z,{pb:1,pt:1},r.createElement(E.Z,{variant:"button"},"Owner"),r.createElement(De.ZP,{multiple:!0,"aria-label":"Owner",options:I,value:ie,onChange:(oe,fe)=>h(fe),renderOption:(oe,{selected:fe})=>r.createElement(M.Z,{control:r.createElement(Y.Z,{icon:se,checkedIcon:Te,checked:fe}),label:oe}),size:"small",popupIcon:r.createElement(Fe.Z,{"data-testid":"owner-picker-expand"}),renderInput:oe=>r.createElement(te.Z,{...oe,className:C.input,variant:"outlined"})})):null},Ve=(0,We.Z)(C=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),st=()=>{var k,ie;const C=Ve(),{filters:L,updateFilters:U}=useEntityList(),[H,J]=useState((ie=(k=L.text)==null?void 0:k.value)!=null?ie:"");return useDebounce(()=>{U({text:H.length?new EntityTextFilter(H):void 0})},250,[H,U]),React.createElement(Toolbar,{className:C.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{id:"input-with-icon-adornment",className:C.input,placeholder:"Search",autoComplete:"off",onChange:h=>J(h.target.value),value:H,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>J(""),edge:"end",disabled:H.length===0},React.createElement(Clear,null)))})))},mt=Object.freeze({createEntityRefColumn(C){const{defaultKind:L}=C;function U(H){var J;return((J=H.metadata)==null?void 0:J.title)||et(H,{defaultKind:L})}return{title:"Name",highlight:!0,customFilterAndSearch(H,J){return U(J).includes(H)},customSort(H,J){return U(H).localeCompare(U(J))},render:H=>{var J;return r.createElement(nt,{entityRef:H,defaultKind:L,title:(J=H.metadata)==null?void 0:J.title})}}},createEntityRelationColumn({title:C,relation:L,defaultKind:U,filter:H}){function J(ie){return je(ie,L,H)}function k(ie){return J(ie).map(h=>et(h,{defaultKind:U})).join(", ")}return{title:C,customFilterAndSearch(ie,h){return k(h).includes(ie)},customSort(ie,h){return k(ie).localeCompare(k(h))},render:ie=>r.createElement(vt,{entityRefs:J(ie),defaultKind:U})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:i.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:i.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:i.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:C=>r.createElement(Ce.OverflowTooltip,{text:C.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),$t=[mt.createEntityRefColumn({defaultKind:"system"}),mt.createDomainColumn(),mt.createOwnerColumn(),mt.createMetadataDescriptionColumn()],tn=[mt.createEntityRefColumn({defaultKind:"component"}),mt.createSystemColumn(),mt.createOwnerColumn(),mt.createSpecTypeColumn(),mt.createSpecLifecycleColumn(),mt.createMetadataDescriptionColumn()],un=(0,We.Z)(C=>({empty:{padding:C.spacing(2),display:"flex",justifyContent:"center"}})),Nt=C=>{const{entities:L,title:U,emptyContent:H,variant:J="gridItem",columns:k}=C,ie=un(),h={minWidth:"0",width:"100%"};return J==="gridItem"&&(h.height="calc(100% - 10px)"),r.createElement(Ce.Table,{columns:k,title:U,style:h,emptyContent:H&&r.createElement("div",{className:ie.empty},H),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:L})};Nt.columns=mt,Nt.systemEntityColumns=$t,Nt.componentEntityColumns=tn;const In=(0,We.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),ht=r.createElement(he.Z,{fontSize:"small"}),Vt=r.createElement(be.Z,{fontSize:"small"}),Sn=()=>{var N,Q;const C=In(),{updateFilters:L,backendEntities:U,filters:H,queryParameters:J}=rt(),k=(0,r.useMemo)(()=>[J.tags].flat().filter(Boolean),[J]),[ie,h]=(0,r.useState)(k.length?k:(Q=(N=H.tags)==null?void 0:N.values)!=null?Q:[]);(0,r.useEffect)(()=>{k.length&&h(k)},[k]),(0,r.useEffect)(()=>{L({tags:ie.length?new B(ie):void 0})},[ie,L]);const I=(0,r.useMemo)(()=>[...new Set(U.flatMap(oe=>oe.metadata.tags).filter(Boolean))].sort(),[U]);return I.length?r.createElement(w.Z,{pb:1,pt:1},r.createElement(E.Z,{variant:"button"},"Tags"),r.createElement(De.ZP,{multiple:!0,"aria-label":"Tags",options:I,value:ie,onChange:(oe,fe)=>h(fe),renderOption:(oe,{selected:fe})=>r.createElement(M.Z,{control:r.createElement(Y.Z,{icon:ht,checkedIcon:Vt,checked:fe}),label:oe}),size:"small",popupIcon:r.createElement(Fe.Z,{"data-testid":"tag-picker-expand"}),renderInput:oe=>r.createElement(te.Z,{...oe,className:C.input,variant:"outlined"})})):null};var Ln=e(82108),wt=e.n(Ln);const zn=C=>{var N;const{hidden:L,initialFilter:U}=C,H=(0,t.useApi)(t.alertApiRef),{error:J,availableTypes:k,selectedTypes:ie,setSelectedTypes:h}=ne();if((0,r.useEffect)(()=>{J&&H.post({message:"Failed to load entity types",severity:"error"}),U&&h([U])},[J,H,U,h]),k.length===0||J)return null;const I=[{value:"all",label:"All"},...k.map(Q=>({value:Q,label:wt()(Q)}))];return L?null:r.createElement(w.Z,{pb:1,pt:1},r.createElement(Ce.Select,{label:"Type",items:I,selected:(N=I.length>1?ie[0]:void 0)!=null?N:"all",onChange:Q=>h(Q==="all"?[]:[String(Q)])}))};var pa=e(15459),ta=e(61837),na=e(11640),Gt=e(28347);const za=(0,pa.Z)({root:{color:"#f3ba37"}})(na.Z),aa=C=>C?"Remove from favorites":"Add to favorites",Wa=C=>C?r.createElement(za,null):r.createElement(Gt.Z,null),Ha=C=>{const{toggleStarredEntity:L,isStarredEntity:U}=lt(C.entity);return r.createElement(ta.Z,{color:"inherit",...C,onClick:()=>L()},r.createElement(ot.ZP,{title:aa(U)},Wa(U)))};var Va=e(8629),ya=e(79249),Ea=e(38724),Ga=e(99152),Bn=e(6487),va=e(49429),dn=e(77277),Mt=e(55999),Cn=e(72779),Wn=e.n(Cn),Aa=e(39412);const ra=Aa.Z;function ur(C,L){if(C)return C.toLocaleLowerCase("en-US");if(L)try{return(0,i.of)(L).kind.toLocaleLowerCase("en-US")}catch{return}}function Ra(C,L){const U=(0,t.useApp)(),H=ur(C,L);return H&&U.getSystemIcon(`kind:${H}`)||ra}function oa(C){const{kind:L,entityRef:U,...H}=C,J=Ra(L,U);return r.createElement(J,{...H})}const Sa=(0,We.Z)(C=>({node:{fill:C.palette.grey[300],stroke:C.palette.grey[300],"&.primary":{fill:C.palette.primary.light,stroke:C.palette.primary.light},"&.secondary":{fill:C.palette.secondary.light,stroke:C.palette.secondary.light}},text:{fill:C.palette.getContrastText(C.palette.grey[300]),"&.primary":{fill:C.palette.primary.contrastText},"&.secondary":{fill:C.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function Hn(C){const L=(0,t.useApi)(c),U=(0,i.eE)(C),{loading:H,error:J,value:k}=(0,pt.default)(async()=>{const ie=await L.getEntityAncestors({entityRef:U}),h=new Array,I=new Array;for(const N of ie.items){const Q=(0,i.eE)(N.entity),oe=Q===ie.rootEntityRef;h.push({id:Q,root:oe,...N.entity});for(const fe of N.parentEntityRefs)I.push({from:Q,to:fe})}return{nodes:h,edges:I}},[U]);return{loading:H,error:J,nodes:(k==null?void 0:k.nodes)||[],edges:(k==null?void 0:k.edges)||[]}}function Ca({node:C}){const L=Sa(),U=(0,Oe.s0)(),H=(0,t.useRouteRef)(O),[J,k]=(0,r.useState)(0),[ie,h]=(0,r.useState)(0),I=(0,r.useRef)(null);(0,r.useLayoutEffect)(()=>{if(I.current){let{height:He,width:Ye}=I.current.getBBox();He=Math.round(He),Ye=Math.round(Ye),(He!==ie||Ye!==J)&&(k(Ye),h(He))}},[J,ie]);const N=10,Q=ie,oe=Q+N,fe=oe+J+N*2,Be=ie+N*2,me=C.metadata.title||(C.kind&&C.metadata.name&&C.metadata.namespace?et({kind:C.kind,name:C.metadata.name,namespace:C.metadata.namespace||""}):C.id),Ie=()=>{U(H({kind:C.kind,namespace:C.metadata.namespace||i.zG,name:C.metadata.name}))};return r.createElement("g",{onClick:Ie,className:L.clickable},r.createElement("rect",{className:Wn()(L.node,C.root?"secondary":"primary"),width:fe,height:Be,rx:10}),r.createElement(oa,{kind:C.kind,y:N,x:N,width:Q,height:Q,className:Wn()(L.text,C.root?"secondary":"primary")}),r.createElement("text",{ref:I,className:Wn()(L.text,C.root?"secondary":"primary"),y:Be/2,x:oe+(J+N*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},me))}function Vn(C){const{loading:L,error:U,nodes:H,edges:J}=Hn(C.entity);return L?r.createElement(Ce.Progress,null):U?r.createElement(Ce.ResponseErrorPanel,{error:U}):r.createElement(r.Fragment,null,r.createElement(Mt.Z,{variant:"h2"},"Ancestry"),r.createElement(Mt.Z,{gutterBottom:!0},"This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where"," ",r.createElement(Ce.Link,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity"},"processors emitted")," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."),r.createElement(w.Z,{mt:4},r.createElement(Ce.DependencyGraph,{nodes:H,edges:J,renderNode:Ca,direction:Ce.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var Tn=e(11776),rn=e(38402),On=e(86136),Gn=e(99688),ja=e(49378),Ka=e(54506),on=e(94339),fn=e(24579),Ya=e(27685);const sa=(0,We.Z)(C=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:C.spacing(2)},helpIcon:{marginLeft:C.spacing(1),color:C.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function mn(C){const L=sa();return r.createElement(ja.Z,{...C,primaryTypographyProps:{className:L.monospace},secondaryTypographyProps:{className:L.monospace}})}function jn(C){const L=sa();return r.createElement(Ka.Z,{className:L.monospace},C.children)}function Kn(C){return r.createElement(w.Z,{mt:2},r.createElement(on.Z,{variant:"outlined"},r.createElement(fn.Z,null,r.createElement(E.Z,{variant:"h6",gutterBottom:!0},C.title,C.helpLink&&r.createElement(Jn,{to:C.helpLink})),C.children)))}function Yn(C){const[L,U]=C.entry;return r.createElement(rn.Z,null,C.indent&&r.createElement(On.Z,null),r.createElement(mn,{primary:L,secondary:U.match(/^url:https?:\/\//)?r.createElement(r.Fragment,null,U.substring(0,4),r.createElement(Ce.Link,{to:U.substring(4)},U.substring(4))):U}))}function Jn(C){const L=sa();return r.createElement(Ce.Link,{to:C.to,className:L.helpIcon},r.createElement(Ya.Z,{fontSize:"inherit"}))}const Mn=(0,We.Z)({root:{display:"flex",flexDirection:"column"}});function Ja(C){var I,N;const L=(0,t.useApi)(c),U=(0,i.eE)(C),H=(I=C.metadata.annotations)==null?void 0:I[i.P1],J=(N=C.metadata.annotations)==null?void 0:N[i.q1],{loading:k,error:ie,value:h}=(0,pt.default)(async()=>!H&&!J?[]:(await L.getEntities({filter:[...H?[{[`metadata.annotations.${i.P1}`]:H}]:[],...J?[{[`metadata.annotations.${i.q1}`]:J}]:[]]})).items,[H,J]);return{loading:k,error:ie,location:H,originLocation:J,colocatedEntities:h==null?void 0:h.filter(Q=>(0,i.eE)(Q)!==U)}}function xn(C){return r.createElement(Tn.Z,{dense:!0},C.header&&r.createElement(Yn,{key:"header",entry:C.header}),C.entities.map(L=>r.createElement(rn.Z,{key:(0,i.eE)(L)},r.createElement(On.Z,null,r.createElement(oa,{kind:L.kind})),r.createElement(mn,{primary:r.createElement(nt,{entityRef:L})}))))}function Yt(C){const{entity:L}=C,{loading:U,error:H,location:J,originLocation:k,colocatedEntities:ie}=Ja(L);if(U)return r.createElement(Ce.Progress,null);if(H)return r.createElement(Ce.ResponseErrorPanel,{error:H});if(!J&&!k)return r.createElement(Gn.Z,{severity:"warning"},"Entity had no location information.");if(!(ie==null?void 0:ie.length))return r.createElement(Gn.Z,{severity:"info"},"There were no other entities on this location.");if(J===k)return r.createElement(xn,{entities:ie});const h=ie.filter(N=>{var Q;return((Q=N.metadata.annotations)==null?void 0:Q[i.P1])===J}),I=ie.filter(N=>{var Q;return((Q=N.metadata.annotations)==null?void 0:Q[i.q1])===k});return r.createElement(r.Fragment,null,h.length>0&&r.createElement(xn,{entities:h,header:["At the same location",J]}),I.length>0&&r.createElement(xn,{entities:I,header:["At the same origin",k]}))}function hn(C){const L=Mn();return r.createElement(r.Fragment,null,r.createElement(Mt.Z,{variant:"h2"},"Colocated"),r.createElement(Mt.Z,null,"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL)."),r.createElement("div",{className:L.root},r.createElement(Yt,{entity:C.entity})))}function ia(C){return Object.fromEntries([...Object.entries(C)].sort((L,U)=>L[0]<U[0]?-1:1))}function Ta(C){return r.createElement(r.Fragment,null,r.createElement(Mt.Z,{variant:"h2"},"Entity as JSON"),r.createElement(Mt.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),r.createElement(Mt.Z,null,r.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},r.createElement(Ce.CodeSnippet,{text:JSON.stringify(ia(C.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var Pa=e(3440),Ia=e.n(Pa);const Qa=(0,We.Z)({root:{display:"flex",flexDirection:"column"}});function La(C){var N,Q;const L=Qa(),{apiVersion:U,kind:H,metadata:J,spec:k,relations:ie=[],status:h={}}=C.entity,I=Ia()(bt()(ie,oe=>oe.targetRef),"type");return r.createElement(r.Fragment,null,r.createElement(Mt.Z,{variant:"h2"},"Overview"),r.createElement("div",{className:L.root},r.createElement(Kn,{title:"Identity"},r.createElement(Tn.Z,{dense:!0},r.createElement(rn.Z,null,r.createElement(mn,{primary:"apiVersion",secondary:U})),r.createElement(rn.Z,null,r.createElement(mn,{primary:"kind",secondary:H})),(k==null?void 0:k.type)&&r.createElement(rn.Z,null,r.createElement(mn,{primary:"spec.type",secondary:k.type})),J.uid&&r.createElement(rn.Z,null,r.createElement(mn,{primary:"uid",secondary:J.uid})),J.etag&&r.createElement(rn.Z,null,r.createElement(mn,{primary:"etag",secondary:J.etag})))),r.createElement(Kn,{title:"Metadata"},!!Object.keys(J.annotations||{}).length&&r.createElement(Tn.Z,{dense:!0,subheader:r.createElement(jn,null,"Annotations",r.createElement(Jn,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(J.annotations).map(oe=>r.createElement(Yn,{key:oe[0],indent:!0,entry:oe}))),!!Object.keys(J.labels||{}).length&&r.createElement(Tn.Z,{dense:!0,subheader:r.createElement(jn,null,"Labels",r.createElement(Jn,{to:"https://backstage.io/docs/features/software-catalog/well-known-labels"}))},Object.entries(J.labels).map(oe=>r.createElement(Yn,{key:oe[0],indent:!0,entry:oe}))),!!((N=J.tags)==null?void 0:N.length)&&r.createElement(Tn.Z,{dense:!0,subheader:r.createElement(jn,null,"Tags")},J.tags.map((oe,fe)=>r.createElement(rn.Z,{key:`${oe}-${fe}`},r.createElement(On.Z,null),r.createElement(mn,{primary:oe}))))),!!ie.length&&r.createElement(Kn,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(I).map(([oe,fe],Be)=>r.createElement("div",{key:Be},r.createElement(Tn.Z,{dense:!0,subheader:r.createElement(jn,null,oe)},fe.map(me=>r.createElement(rn.Z,{key:me.targetRef},r.createElement(On.Z,null,r.createElement(oa,{entityRef:me.targetRef})),r.createElement(mn,{primary:r.createElement(nt,{entityRef:me.targetRef})}))))))),!!((Q=h.items)==null?void 0:Q.length)&&r.createElement(Kn,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},h.items.map((oe,fe)=>r.createElement("div",{key:fe},r.createElement(E.Z,null,oe.level,": ",oe.type),r.createElement(w.Z,{ml:2},oe.message))))))}var Oa=e(60155),xa=e.n(Oa);function Nn(C){return r.createElement(r.Fragment,null,r.createElement(Mt.Z,{variant:"h2"},"Entity as YAML"),r.createElement(Mt.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),r.createElement(Mt.Z,null,r.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},r.createElement(Ce.CodeSnippet,{text:xa().stringify(ia(C.entity)),language:"yaml",showCopyCodeButton:!0}))))}const ba=(0,We.Z)(C=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:C.palette.background.paper},tabs:{borderRight:`1px solid ${C.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function bn(C){const{children:L,value:U,index:H,...J}=C,k=ba();return r.createElement("div",{role:"tabpanel",hidden:U!==H,id:`vertical-tabpanel-${H}`,"aria-labelledby":`vertical-tab-${H}`,className:k.tabContents,...J},U===H&&r.createElement(w.Z,{pl:3,pr:3},L))}function Pn(C){return{id:`vertical-tab-${C}`,"aria-controls":`vertical-tabpanel-${C}`}}function Da(C){const L=ba(),[U,H]=r.useState(0);return(0,r.useEffect)(()=>{H(0)},[C.open]),C.entity?r.createElement(Va.Z,{fullWidth:!0,maxWidth:"xl",open:C.open,onClose:C.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:L.fullHeightDialog}},r.createElement(ya.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),r.createElement(Ea.Z,{dividers:!0},r.createElement("div",{className:L.root},r.createElement(Ga.Z,{orientation:"vertical",variant:"scrollable",value:U,onChange:(J,k)=>H(k),"aria-label":"Inspector options",className:L.tabs},r.createElement(Bn.Z,{label:"Overview",...Pn(0)}),r.createElement(Bn.Z,{label:"Ancestry",...Pn(1)}),r.createElement(Bn.Z,{label:"Colocated",...Pn(2)}),r.createElement(Bn.Z,{label:"Raw JSON",...Pn(3)}),r.createElement(Bn.Z,{label:"Raw YAML",...Pn(4)})),r.createElement(bn,{value:U,index:0},r.createElement(La,{entity:C.entity})),r.createElement(bn,{value:U,index:1},r.createElement(Vn,{entity:C.entity})),r.createElement(bn,{value:U,index:2},r.createElement(hn,{entity:C.entity})),r.createElement(bn,{value:U,index:3},r.createElement(Ta,{entity:C.entity})),r.createElement(bn,{value:U,index:4},r.createElement(Nn,{entity:C.entity})))),r.createElement(va.Z,null,r.createElement(dn.Z,{onClick:C.onClose,color:"primary"},"Close"))):null}var Xa=e(85256);function Fa(C){var Be;const L=(0,t.useApi)(c),U=(Be=C.metadata.annotations)==null?void 0:Be[i.q1],H=C.metadata.uid,J=U==="bootstrap:bootstrap",k=(0,pt.default)(async()=>{const me=L.getLocationByRef(U);let Ie;if(!U)Ie=Promise.resolve([]);else{const He=`metadata.annotations.${i.q1}`;Ie=L.getEntities({filter:{[He]:U},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Ye=>Ye.items)}return Promise.all([me,Ie]).then(([He,Ye])=>({location:He,colocatedEntities:Ye}))},[L,C]),ie=(0,r.useCallback)(async function(){const{location:Ie,colocatedEntities:He}=k.value;await L.removeLocationById(Ie.id),await Promise.allSettled(He.map(Ye=>L.removeEntityByUid(Ye.metadata.uid)))},[L,k]),h=(0,r.useCallback)(async function(){await L.removeEntityByUid(H)},[L,H]);if(J)return{type:"bootstrap",location:U,deleteEntity:h};const{loading:I,error:N,value:Q}=k;if(I)return{type:"loading"};if(N)return{type:"error",error:N};const{location:oe,colocatedEntities:fe}=Q;return oe?{type:"unregister",location:U,colocatedEntities:fe.map(i.C_),unregisterLocation:ie,deleteEntity:h}:{type:"only-delete",deleteEntity:h}}var la=e(10179);const nn=(0,We.Z)({advancedButton:{fontSize:"0.7em"}}),ca=({entity:C,onConfirm:L})=>{var Be;const U=(0,t.useApi)(t.alertApiRef),H=(0,t.useApi)(t.configApiRef),J=nn(),k=Fa(C),[ie,h]=(0,r.useState)(!1),[I,N]=(0,r.useState)(!1),Q=(Be=H.getOptionalString("app.title"))!=null?Be:"Backstage",oe=(0,r.useCallback)(async function(){if("unregisterLocation"in k){N(!0);try{await k.unregisterLocation(),L()}catch(Ie){(0,la.BD)(Ie),U.post({message:Ie.message})}finally{N(!1)}}},[U,L,k]),fe=(0,r.useCallback)(async function(){if("deleteEntity"in k){N(!0);try{await k.deleteEntity(),L()}catch(Ie){(0,la.BD)(Ie),U.post({message:Ie.message})}finally{N(!1)}}},[U,L,k]);return k.type==="loading"?r.createElement(Ce.Progress,null):k.type==="error"?r.createElement(Ce.ResponseErrorPanel,{error:k.error}):k.type==="bootstrap"?r.createElement(r.Fragment,null,r.createElement(Gn.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',k.location,'"). If you believe this is in error, please contact the ',Q," ","integrator."),r.createElement(w.Z,{marginTop:2},!ie&&r.createElement(dn.Z,{variant:"text",size:"small",color:"primary",className:J.advancedButton,onClick:()=>h(!0)},"Advanced Options"),ie&&r.createElement(r.Fragment,null,r.createElement(Mt.Z,null,"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),r.createElement(dn.Z,{variant:"contained",color:"secondary",disabled:I,onClick:fe},"Delete Entity")))):k.type==="only-delete"?r.createElement(r.Fragment,null,r.createElement(Mt.Z,null,"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog."),r.createElement(dn.Z,{variant:"contained",color:"secondary",disabled:I,onClick:fe},"Delete Entity")):k.type==="unregister"?r.createElement(r.Fragment,null,r.createElement(Mt.Z,null,"This action will unregister the following entities:"),r.createElement(Mt.Z,{component:"ul"},k.colocatedEntities.map(me=>r.createElement("li",{key:`${me.kind}:${me.namespace}/${me.name}`},r.createElement(nt,{entityRef:me})))),r.createElement(Mt.Z,null,"Located at the following location:"),r.createElement(Mt.Z,{component:"ul"},r.createElement("li",null,k.location)),r.createElement(Mt.Z,null,"To undo, just re-register the entity in ",Q,"."),r.createElement(w.Z,{marginTop:2},r.createElement(dn.Z,{variant:"contained",color:"secondary",disabled:I,onClick:oe},"Unregister Location"),!ie&&r.createElement(w.Z,{component:"span",marginLeft:2},r.createElement(dn.Z,{variant:"text",size:"small",color:"primary",className:J.advancedButton,onClick:()=>h(!0)},"Advanced Options"))),ie&&r.createElement(r.Fragment,null,r.createElement(w.Z,{paddingTop:4,paddingBottom:4},r.createElement(Xa.Z,null)),r.createElement(Mt.Z,null,"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),r.createElement(dn.Z,{variant:"contained",color:"secondary",disabled:I,onClick:fe},"Delete Entity"))):r.createElement(Gn.Z,{severity:"error"},"Internal error: Unknown state")},Ba=C=>{const{open:L,onConfirm:U,onClose:H,entity:J}=C;return r.createElement(Va.Z,{open:L,onClose:H},r.createElement(ya.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),r.createElement(Ea.Z,null,r.createElement(ca,{entity:J,onConfirm:U})),r.createElement(va.Z,null,r.createElement(dn.Z,{onClick:H,color:"primary"},"Cancel")))};var Ma=e(12231),Qn=e(9520),Na=e(47603);const ua=(0,We.Z)(C=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:C.spacing(1,0,1,0)},title:{margin:C.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:C.palette.text.primary},menuItem:{minHeight:C.spacing(6)},groupWrapper:{margin:C.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Za(C){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:Na.Z},{id:"starred",label:"Starred",icon:na.Z}]},{name:C!=null?C:"Company",items:[{id:"all",label:"All"}]}]}const da=C=>{var Zn;const{initialFilter:L,availableFilters:U}=C,H=ua(),k=(Zn=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Zn:"Company",{filters:ie,updateFilters:h,backendEntities:I,queryParameters:N,loading:Q}=rt(),oe=["starred","all"],fe=Za(k).map(Qt=>({...Qt,items:Qt.items.filter(({id:qt})=>["group","user"].some(Dn=>Dn===N.kind)?oe.includes(qt):!U||U.includes(qt))})).filter(({items:Qt})=>!!Qt.length),{isStarredEntity:Be}=xe(),{isOwnedEntity:me,loading:Ie}=le(),He=Q||Ie,Ye=(0,r.useMemo)(()=>new W("owned",me,Be),[me,Be]),It=(0,r.useMemo)(()=>new W("starred",me,Be),[me,Be]),ut=(0,r.useMemo)(()=>[N.user].flat()[0],[N]),[Ft,zt]=(0,r.useState)(ut!=null?ut:L),Jt=(0,r.useMemo)(()=>I.filter(we((0,v.compact)(Object.values({...ie,user:void 0})))),[ie,I]),Xn=(0,r.useMemo)(()=>({all:Jt.length,starred:Jt.filter(Qt=>It.filterEntity(Qt)).length,owned:Jt.filter(Qt=>Ye.filterEntity(Qt)).length}),[Jt,It,Ye]);return(0,r.useEffect)(()=>{ut&&zt(ut)},[ut]),(0,r.useEffect)(()=>{!He&&!!Ft&&Ft!=="all"&&Xn[Ft]===0&&zt("all")},[He,Xn,Ft,zt]),(0,r.useEffect)(()=>{h({user:Ft?new W(Ft,me,Be):void 0})},[Ft,me,Be,h]),r.createElement(on.Z,{className:H.root},fe.map(Qt=>r.createElement(r.Fragment,{key:Qt.name},r.createElement(E.Z,{variant:"subtitle2",className:H.title},Qt.name),r.createElement(on.Z,{className:H.groupWrapper},r.createElement(Tn.Z,{disablePadding:!0,dense:!0},Qt.items.map(qt=>{var Dn,kn;return r.createElement(Ma.Z,{key:qt.id,button:!0,divider:!0,onClick:()=>zt(qt.id),selected:qt.id===((Dn=ie.user)==null?void 0:Dn.value),className:H.menuItem,disabled:Xn[qt.id]===0,"data-testid":`user-picker-${qt.id}`},qt.icon&&r.createElement(On.Z,{className:H.listIcon},r.createElement(qt.icon,{fontSize:"small"})),r.createElement(ja.Z,null,r.createElement(E.Z,{variant:"body1"},qt.label)),r.createElement(Qn.Z,null,(kn=Xn[qt.id])!=null?kn:"-"))}))))))},ka=({children:C,value:L})=>{var h;const[U,H]=useState((h=L==null?void 0:L.filters)!=null?h:{}),J=useCallback(I=>{H(N=>{const Q=typeof I=="function"?I(N):I;return{...N,...Q}})},[]),k=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),ie=useMemo(()=>{var I,N,Q,oe,fe;return{entities:(I=L==null?void 0:L.entities)!=null?I:k.entities,backendEntities:(N=L==null?void 0:L.backendEntities)!=null?N:k.backendEntities,updateFilters:(Q=L==null?void 0:L.updateFilters)!=null?Q:J,filters:U,loading:(oe=L==null?void 0:L.loading)!=null?oe:!1,queryParameters:(fe=L==null?void 0:L.queryParameters)!=null?fe:k.queryParameters,error:L==null?void 0:L.error}},[L,k,U,J]);return React.createElement(EntityListContext.Provider,{value:ie},C)};var dr=e(92787)},92787:function(){},39398:function(_,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return Ae},AboutContent:function(){return ce},AboutField:function(){return j}});var a=e(41564),t=e(9118),c=e(36964),f=e(36356),y=e(31423),i=e(79692),v=e(94339),p=e(32552),m=e(61837),l=e(85256),r=e(24579),A=e(52866),T=e(30254),Z=e(27604),O=e(2784),q=e(47851),$=e(60905),x=e(90436),b=e(7089);const D=(0,i.Z)(Oe=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:Oe.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function j(Oe){const{label:ge,value:Ge,gridSizes:Qe,children:Ue}=Oe,we=D(),tt=(0,c.useElementFilter)(Ue,je=>je.getElements()),dt=tt.length>0?tt:O.createElement(x.Z,{variant:"body2",className:we.value},Ge||"unknown");return O.createElement($.Z,{item:!0,...Qe},O.createElement(x.Z,{variant:"subtitle2",className:we.label},ge),dt)}const ee=(0,i.Z)({description:{wordBreak:"break-word"}});function ce(Oe){var rt,pt,Pt,xt,Dt,bt;const{entity:ge}=Oe,Ge=ee(),Qe=ge.kind.toLocaleLowerCase("en-US")==="system",Ue=ge.kind.toLocaleLowerCase("en-US")==="resource",we=ge.kind.toLocaleLowerCase("en-US")==="component",tt=ge.kind.toLocaleLowerCase("en-US")==="api",dt=ge.kind.toLocaleLowerCase("en-US")==="template",je=ge.kind.toLocaleLowerCase("en-US")==="location",Et=ge.kind.toLocaleLowerCase("en-US")==="group",Bt=(0,y.getEntityRelations)(ge,a.cz,{kind:"system"}),Tt=(0,y.getEntityRelations)(ge,a.cz,{kind:"component"}),gt=(0,y.getEntityRelations)(ge,a.cz,{kind:"domain"}),yt=(0,y.getEntityRelations)(ge,a.S4);return O.createElement($.Z,{container:!0},O.createElement(j,{label:"Description",gridSizes:{xs:12}},O.createElement(x.Z,{variant:"body2",paragraph:!0,className:Ge.description},((rt=ge==null?void 0:ge.metadata)==null?void 0:rt.description)||"No description")),O.createElement(j,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},yt.length>0&&O.createElement(y.EntityRefLinks,{entityRefs:yt,defaultKind:"group"})),(Qe||gt.length>0)&&O.createElement(j,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},gt.length>0&&O.createElement(y.EntityRefLinks,{entityRefs:gt,defaultKind:"domain"})),(tt||we||Ue||Bt.length>0)&&O.createElement(j,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},Bt.length>0&&O.createElement(y.EntityRefLinks,{entityRefs:Bt,defaultKind:"system"})),we&&Tt.length>0&&O.createElement(j,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},O.createElement(y.EntityRefLinks,{entityRefs:Tt,defaultKind:"component"})),(tt||we||Ue||dt||Et||je||typeof((pt=ge==null?void 0:ge.spec)==null?void 0:pt.type)=="string")&&O.createElement(j,{label:"Type",value:(Pt=ge==null?void 0:ge.spec)==null?void 0:Pt.type,gridSizes:{xs:12,sm:6,lg:4}}),(tt||we||typeof((xt=ge==null?void 0:ge.spec)==null?void 0:xt.lifecycle)=="string")&&O.createElement(j,{label:"Lifecycle",value:(Dt=ge==null?void 0:ge.spec)==null?void 0:Dt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),O.createElement(j,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((bt=ge==null?void 0:ge.metadata)==null?void 0:bt.tags)||[]).map(et=>O.createElement(b.Z,{key:et,size:"small",label:et}))))}const Ee=(0,i.Z)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function Ae(Oe){var xt,Dt;const{variant:ge}=Oe,Ge=Ee(),{entity:Qe}=(0,y.useEntity)(),Ue=(0,c.useApi)(f.q3),we=(0,c.useApi)(y.catalogApiRef),tt=(0,c.useApi)(c.alertApiRef),dt=(0,c.useRouteRef)(q.j),je=(0,y.getEntitySourceLocation)(Qe,Ue),Et=(0,y.getEntityMetadataEditUrl)(Qe),Bt={label:"View Source",disabled:!je,icon:O.createElement(f.nW,{type:je==null?void 0:je.integrationType}),href:je==null?void 0:je.locationTargetUrl},Tt={label:"View TechDocs",disabled:!((xt=Qe.metadata.annotations)==null?void 0:xt["backstage.io/techdocs-ref"])||!dt,icon:O.createElement(T.Z,null),href:dt&&dt({namespace:Qe.metadata.namespace||a.zG,kind:Qe.kind,name:Qe.metadata.name})};let gt="";ge==="gridItem"?gt=Ge.gridItemCard:ge==="fullHeight"&&(gt=Ge.fullHeightCard);let yt="";ge==="gridItem"?yt=Ge.gridItemCardContent:ge==="fullHeight"&&(yt=Ge.fullHeightCardContent);const rt=(Dt=Qe.metadata.annotations)==null?void 0:Dt[a.P1],pt=(rt==null?void 0:rt.startsWith("url:"))||(rt==null?void 0:rt.startsWith("file:")),Pt=(0,O.useCallback)(async()=>{await we.refreshEntity((0,a.eE)(Qe)),tt.post({message:"Refresh scheduled",severity:"info"})},[we,tt,Qe]);return O.createElement(v.Z,{className:gt},O.createElement(p.Z,{title:"About",action:O.createElement(O.Fragment,null,pt&&O.createElement(m.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Pt},O.createElement(A.Z,null)),O.createElement(m.Z,{component:t.Link,"aria-label":"Edit",disabled:!Et,title:"Edit Metadata",to:Et!=null?Et:"#"},O.createElement(Z.Z,null))),subheader:O.createElement(t.HeaderIconLinkRow,{links:[Bt,Tt]})}),O.createElement(l.Z,null),O.createElement(r.Z,{className:yt},O.createElement(ce,{entity:Qe})))}},49782:function(_,s,e){"use strict";e.d(s,{K:function(){return A}});var a=e(2784),t=e(79692),c=e(12420),f=e(97580),y=e(73698),i=e(74603),v=e(12231),p=e(31423),m=e(64279),l=e(36964);const r=(0,t.Z)(T=>(0,c.Z)({root:{...T.typography.h4}}));function A(T){var ce;const{initialFilter:Z="component"}=T,O=r(),q=(0,l.useApi)(p.catalogApiRef),{value:$}=(0,m.default)(async()=>await q.getEntityFacets({facets:["kind"]}).then(Ee=>{var Ae;return((Ae=Ee.facets.kind)==null?void 0:Ae.map(Oe=>Oe.value).sort())||[]})),{updateFilters:x,queryParameters:b}=(0,p.useEntityList)(),[D,j]=(0,a.useState)(((ce=[b.kind].flat()[0])!=null?ce:Z).toLocaleLowerCase("en-US"));(0,a.useEffect)(()=>{x({kind:D?new p.EntityKindFilter(D):void 0})},[D,x]);const ee=[(0,f.Z)(D)].concat($!=null?$:[]).sort().reduce((Ee,Ae)=>(Ee[Ae.toLocaleLowerCase("en-US")]=Ae,Ee),{});return a.createElement(y.Z,{input:a.createElement(i.Z,{value:D}),value:D,onChange:Ee=>j(Ee.target.value),classes:O},Object.keys(ee).map(Ee=>a.createElement(v.Z,{value:Ee,key:Ee},`${ee[Ee]}s`)))}},30097:function(_,s,e){"use strict";e.d(s,{E:function(){return l}});var a=e(41564),t=e(31423),c=e(27604),f=e(2997),y=e(76635),i=e(2784),v=e(7089),p=e(9118);const m=Object.freeze({createNameColumn(r){function A(T){var Z;return((Z=T.metadata)==null?void 0:Z.title)||(0,t.formatEntityRefTitle)(T,{defaultKind:r==null?void 0:r.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:T},{entity:Z}){return A(T).localeCompare(A(Z))},render:({entity:T})=>{var Z;return i.createElement(t.EntityRefLink,{entityRef:T,defaultKind:(r==null?void 0:r.defaultKind)||"Component",title:(Z=T.metadata)==null?void 0:Z.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:r})=>i.createElement(t.EntityRefLinks,{entityRefs:r.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:r})=>i.createElement(t.EntityRefLinks,{entityRefs:r.ownedByRelations,defaultKind:"group"})}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:r})=>i.createElement(p.OverflowTooltip,{text:r.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:r})=>i.createElement(i.Fragment,null,r.metadata.tags&&r.metadata.tags.map(A=>i.createElement(v.Z,{key:A,label:A,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}}),l=r=>{var ge,Ge,Qe;const{columns:A,actions:T}=r,{isStarredEntity:Z,toggleStarredEntity:O}=(0,t.useStarredEntities)(),{loading:q,error:$,entities:x,filters:b}=(0,t.useEntityList)(),D=(0,i.useMemo)(()=>{var Ue;return[m.createNameColumn({defaultKind:(Ue=b.kind)==null?void 0:Ue.value}),m.createSystemColumn(),m.createOwnerColumn(),m.createSpecTypeColumn(),m.createSpecLifecycleColumn(),m.createMetadataDescriptionColumn(),m.createTagsColumn()]},[(ge=b.kind)==null?void 0:ge.value]),j=b.type===void 0,ee=(0,y.capitalize)((Qe=(Ge=b.user)==null?void 0:Ge.value)!=null?Qe:"all");if($)return i.createElement("div",null,i.createElement(p.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},i.createElement(p.CodeSnippet,{language:"text",text:$.toString()})));const ce=[({entity:Ue})=>{const we=(0,t.getEntityMetadataViewUrl)(Ue);return{icon:()=>i.createElement(f.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!we,onClick:()=>{!we||window.open(we,"_blank")}}},({entity:Ue})=>{const we=(0,t.getEntityMetadataEditUrl)(Ue);return{icon:()=>i.createElement(c.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!we,onClick:()=>{!we||window.open(we,"_blank")}}},({entity:Ue})=>{const we=Z(Ue);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,t.favoriteEntityIcon)(we),tooltip:(0,t.favoriteEntityTooltip)(we),onClick:()=>O(Ue)}}],Ee=x.map(Ue=>{const we=(0,t.getEntityRelations)(Ue,a.cz,{kind:"system"}),tt=(0,t.getEntityRelations)(Ue,a.S4);return{entity:Ue,resolved:{name:(0,t.formatEntityRefTitle)(Ue,{defaultKind:"Component"}),ownedByRelationsTitle:tt.map(dt=>(0,t.formatEntityRefTitle)(dt,{defaultKind:"group"})).join(", "),ownedByRelations:tt,partOfSystemRelationTitle:we.map(dt=>(0,t.formatEntityRefTitle)(dt,{defaultKind:"system"})).join(", "),partOfSystemRelations:we}}}),Ae=(A||D).find(Ue=>Ue.title==="Type");Ae&&(Ae.hidden=!j);const Oe=Ee.length>20;return i.createElement(p.Table,{isLoading:q,columns:A||D,options:{paging:Oe,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!q,padding:"dense",pageSizeOptions:[20,50,100]},title:`${ee} (${x.length})`,data:Ee,actions:T||ce})};l.columns=m},26997:function(_,s,e){"use strict";e.d(s,{Nz:function(){return A},Gh:function(){return r},q7:function(){return c}});var a=e(60905),t=e(2784);function c(T){return t.createElement(a.Z,{container:!0,style:{position:"relative"}},T.children)}var f=e(41156),y=e(60364),i=e(77277),v=e(4190),p=e(95544),m=e(90436),l=e(36444);function r(T){const Z=(0,f.Z)(x=>x.breakpoints.down("md")),O=(0,y.Z)(),[q,$]=(0,t.useState)(!1);return Z?t.createElement(t.Fragment,null,t.createElement(i.Z,{style:{marginTop:O.spacing(1),marginLeft:O.spacing(1)},onClick:()=>$(!0),startIcon:t.createElement(l.Z,null)},"Filters"),t.createElement(v.ZP,{open:q,onClose:()=>$(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},t.createElement(p.Z,{m:2},t.createElement(m.Z,{variant:"h6",component:"h2",style:{marginBottom:O.spacing(1)}},"Filters"),T.children))):t.createElement(a.Z,{item:!0,lg:2},T.children)}function A(T){return t.createElement(a.Z,{item:!0,xs:12,lg:10},T.children)}},47851:function(_,s,e){"use strict";e.d(s,{y:function(){return t},j:function(){return c}});var a=e(36964);const t=(0,a.createExternalRouteRef)({id:"create-component",optional:!0}),c=(0,a.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]})},20221:function(_,s,e){"use strict";e.d(s,{iM:function(){return T},RV:function(){return c},gI:function(){return O}});var a=e(2784),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.permission.api"});var f;(function($){const x="DENY";$.DENY=x;const b="ALLOW";$.ALLOW=b;const D="CONDITIONAL";$.CONDITIONAL=D})(f||(f={}));var y=e(10179),i=e(96279),v=e.n(i),p=e(9571),m=e(30195);const l=m.z.lazy(()=>m.z.object({rule:m.z.string(),params:m.z.array(m.z.unknown())}).strict().or(m.z.object({anyOf:m.z.array(l).nonempty()}).strict()).or(m.z.object({allOf:m.z.array(l).nonempty()}).strict()).or(m.z.object({not:l}).strict())),r=m.z.object({items:m.z.array(m.z.object({id:m.z.string(),result:m.z.literal(f.ALLOW).or(m.z.literal(f.DENY))}).or(m.z.object({id:m.z.string(),result:m.z.literal(f.CONDITIONAL),conditions:l})))});class A{constructor(x){ae(this,"enabled");ae(this,"discovery");var b;this.discovery=x.discovery,this.enabled=(b=x.config.getOptionalBoolean("permission.enabled"))!=null?b:!1}async authorize(x,b){if(!this.enabled)return x.map(Ae=>({result:f.ALLOW}));const D={items:x.map(Ae=>({id:p.Z(),...Ae}))},j=await this.discovery.getBaseUrl("permission"),ee=await v()(`${j}/authorize`,{method:"POST",body:JSON.stringify(D),headers:{...this.getAuthorizationHeader(b==null?void 0:b.token),"content-type":"application/json"}});if(!ee.ok)throw await y.VL.fromResponse(ee);const ce=await ee.json();this.assertValidResponse(D,ce);const Ee=ce.items.reduce((Ae,Oe)=>(Ae[Oe.id]=Oe,Ae),{});return D.items.map(Ae=>Ee[Ae.id])}getAuthorizationHeader(x){return x?{Authorization:`Bearer ${x}`}:{}}assertValidResponse(x,b){const j=r.parse(b).items.map(ce=>ce.id);if(!x.items.every(ce=>j.includes(ce.id)))throw new Error("Unexpected authorization response from permission-backend")}}class T{constructor(x,b){this.permissionClient=x,this.identityApi=b}static create(x){const{config:b,discovery:D,identity:j}=x,ee=new A({discovery:D,config:b});return new T(ee,j)}async authorize(x){return(await this.permissionClient.authorize([x],await this.identityApi.getCredentials()))[0]}}var Z=e(49857);const O=($,x)=>{const b=(0,t.useApi)(c),{data:D,error:j}=(0,Z.ZP)({permission:$,resourceRef:x},async ee=>{const{result:ce}=await b.authorize(ee);return ce});return j?{error:j,loading:!1,allowed:!1}:D===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:D===f.ALLOW}},q=$=>{const{permission:x,resourceRef:b,errorComponent:D,...j}=$,ee=usePermission(x,b),ce=useApp(),{NotFoundErrorPage:Ee}=ce.getComponents();let Ae=D===void 0?React.createElement(Ee,null):D;return ee.loading?Ae=null:ee.allowed&&(Ae=$.element),React.createElement(Route,{...j,element:Ae})}},91512:function(_,s,e){"use strict";e.d(s,{g:function(){return y},w:function(){return i}});var a=e(36964),t=e(10179),c=e(19126),f=e.n(c);const y=(0,a.createApiRef)({id:"plugin.search.queryservice"});class i{constructor(p){ae(this,"discoveryApi");ae(this,"identityApi");this.discoveryApi=p.discoveryApi,this.identityApi=p.identityApi}async query(p){const{token:m}=await this.identityApi.getCredentials(),l=f().stringify(p),r=`${await this.discoveryApi.getBaseUrl("search/query")}?${l}`,A=await fetch(r,{headers:m?{Authorization:`Bearer ${m}`}:{}});if(!A.ok)throw await t.VL.fromResponse(A);return A.json()}}},19941:function(_,s,e){"use strict";e.r(s),e.d(s,{DefaultResultListItem:function(){return l}});var a=e(2784),t=e(38402),c=e(86136),f=e(49378),y=e(95544),i=e(85256),v=e(9118),p=e(15277),m=e.n(p);const l=({result:r,icon:A,secondaryAction:T,lineClamp:Z=5})=>a.createElement(v.Link,{to:r.location},a.createElement(t.Z,{alignItems:"center"},A&&a.createElement(c.Z,null,A),a.createElement(f.Z,{primaryTypographyProps:{variant:"h6"},primary:r.title,secondary:a.createElement(m(),{line:Z,truncateText:"\u2026",text:r.text,element:"span"})}),T&&a.createElement(y.Z,{alignItems:"flex-end"},T)),a.createElement(i.Z,null))},1795:function(_,s,e){"use strict";e.r(s),e.d(s,{SearchBar:function(){return T},SearchBarBase:function(){return A}});var a=e(2784),t=e(48760),c=e(36964),f=e(50581),y=e(61837),i=e(74603),v=e(21853),p=e(33375),m=e(22313);const l=({children:Z})=>{const O=(0,c.useAnalytics)(),{term:q}=(0,m.Rx)();return(0,a.useEffect)(()=>{q&&O.captureEvent("search",q)},[O,q]),a.createElement(a.Fragment,null,Z)},r=()=>(0,a.useContext)(m.ci)!==void 0,A=({onChange:Z,onKeyDown:O,onSubmit:q,debounceTime:$=200,clearButton:x=!0,fullWidth:b=!0,value:D,inputProps:j={},endAdornment:ee,...ce})=>{const Ee=(0,c.useApi)(c.configApiRef),[Ae,Oe]=(0,a.useState)(D),ge=r();(0,a.useEffect)(()=>{Oe(Et=>Et!==D?D:Et)},[D]),(0,t.Z)(()=>Z(Ae),$,[Ae]);const Ge=(0,a.useCallback)(Et=>{Oe(Et.target.value)},[Oe]),Qe=(0,a.useCallback)(Et=>{O&&O(Et),q&&Et.key==="Enter"&&q()},[O,q]),Ue=(0,a.useCallback)(()=>{Z("")},[Z]),we=`Search in ${Ee.getOptionalString("app.title")||"Backstage"}`,tt=a.createElement(f.Z,{position:"start"},a.createElement(y.Z,{"aria-label":"Query",disabled:!0},a.createElement(v.Z,null))),dt=a.createElement(f.Z,{position:"end"},a.createElement(y.Z,{"aria-label":"Clear",onClick:Ue},a.createElement(p.Z,null))),je=a.createElement(l,null,a.createElement(i.Z,{"data-testid":"search-bar-next",value:Ae,placeholder:we,startAdornment:tt,endAdornment:x?dt:ee,inputProps:{"aria-label":"Search",...j},fullWidth:b,onChange:Ge,onKeyDown:Qe,...ce}));return ge?je:a.createElement(m.Nd,null,je)},T=({onChange:Z,...O})=>{const{term:q,setTerm:$}=(0,m.Rx)(),x=(0,a.useCallback)(b=>{Z?Z(b):$(b)},[Z,$]);return a.createElement(A,{value:q,onChange:x,...O})}},22313:function(_,s,e){"use strict";e.d(s,{ci:function(){return i},Nd:function(){return p},Rx:function(){return m}});var a=e(36964),t=e(2784),c=e(64279),f=e(1849),y=e(91512);const i=(0,t.createContext)(void 0),v={term:"",pageCursor:void 0,filters:{},types:[]},p=({initialState:l=v,children:r})=>{var Ge,Qe,Ue,we;const A=(0,a.useApi)(y.g),[T,Z]=(0,t.useState)(l.pageCursor),[O,q]=(0,t.useState)(l.filters),[$,x]=(0,t.useState)(l.term),[b,D]=(0,t.useState)(l.types),j=(0,f.Z)($),ee=(0,c.default)(()=>A.query({term:$,filters:O,pageCursor:T,types:b}),[$,O,b,T]),ce=!ee.loading&&!ee.error&&((Ge=ee.value)==null?void 0:Ge.nextPageCursor),Ee=!ee.loading&&!ee.error&&((Qe=ee.value)==null?void 0:Qe.previousPageCursor),Ae=(0,t.useCallback)(()=>{var tt;Z((tt=ee.value)==null?void 0:tt.nextPageCursor)},[(Ue=ee.value)==null?void 0:Ue.nextPageCursor]),Oe=(0,t.useCallback)(()=>{var tt;Z((tt=ee.value)==null?void 0:tt.previousPageCursor)},[(we=ee.value)==null?void 0:we.previousPageCursor]);(0,t.useEffect)(()=>{$&&j&&$!==j&&Z(void 0)},[$,j,l.pageCursor]);const ge={result:ee,filters:O,setFilters:q,term:$,setTerm:x,types:b,setTypes:D,pageCursor:T,setPageCursor:Z,fetchNextPage:ce?Ae:void 0,fetchPreviousPage:Ee?Oe:void 0};return t.createElement(a.AnalyticsContext,{attributes:{searchTypes:b.sort().join(",")}},t.createElement(i.Provider,{value:ge,children:r}))},m=()=>{const l=(0,t.useContext)(i);if(l===void 0)throw new Error("useSearch must be used within a SearchContextProvider");return l}},73032:function(_,s,e){"use strict";e.d(s,{s:function(){return ce},O:function(){return Ee}});var a=e(2784),t=e(60364),c=e(79249),f=e(27556),y=e(38724),i=e(60905),v=e(85256),p=e(11776),m=e(49429),l=e(8629),r=e(69001),A=e(79692),T=e(1795),Z=e(19941),O=e(39332),q=e(22313),$=e(8542),x=e(36964),b=e(9118),D=e(20863);const j=(0,A.Z)(Ae=>({container:{borderRadius:30,display:"flex",height:"2.4em"},input:{flex:1},paperFullWidth:{height:"calc(100% - 128px)"},dialogActionsContainer:{padding:Ae.spacing(1,3)},viewResultsLink:{verticalAlign:"0.5em"}})),ee=({toggleModal:Ae})=>{const Oe=(0,x.useRouteRef)(D._Z),ge=j(),{term:Ge}=(0,q.Rx)(),{focusContent:Qe}=(0,b.useContent)(),{transitions:Ue}=(0,t.Z)(),we=()=>{Ae(),setTimeout(Qe,Ue.duration.leavingScreen)},tt=()=>{we()};return a.createElement(a.Fragment,null,a.createElement(c.Z,null,a.createElement(f.Z,{className:ge.container},a.createElement(T.SearchBar,{className:ge.input}))),a.createElement(y.Z,null,a.createElement(i.Z,{container:!0,direction:"row-reverse",justifyContent:"flex-start",alignItems:"center"},a.createElement(i.Z,{item:!0},a.createElement(b.Link,{onClick:()=>{Ae(),setTimeout(Qe,Ue.duration.leavingScreen)},to:`${Oe()}?query=${Ge}`},a.createElement("span",{className:ge.viewResultsLink},"View Full Results"),a.createElement(r.Z,{color:"primary"})))),a.createElement(v.Z,null),a.createElement(O.SearchResult,null,({results:dt})=>a.createElement(p.Z,null,dt.map(({document:je})=>a.createElement("div",{role:"button",tabIndex:0,key:`${je.location}-btn`,onClick:we,onKeyPress:tt},a.createElement(Z.DefaultResultListItem,{key:je.location,result:je})))))),a.createElement(m.Z,{className:ge.dialogActionsContainer},a.createElement(i.Z,{container:!0,direction:"row"},a.createElement(i.Z,{item:!0,xs:12},a.createElement($.G,null)))))},ce=({open:Ae=!0,hidden:Oe,toggleModal:ge})=>{const Ge=j();return a.createElement(l.Z,{classes:{paperFullWidth:Ge.paperFullWidth},onClose:ge,"aria-labelledby":"search-modal-title",fullWidth:!0,maxWidth:"lg",open:Ae,hidden:Oe},Ae&&a.createElement(q.Nd,null,a.createElement(ee,{toggleModal:ge})))};function Ee(Ae=!1){const[Oe,ge]=(0,a.useState)({hidden:!Ae,open:Ae}),Ge=(0,a.useCallback)(()=>ge(Ue=>({open:!0,hidden:!Ue.hidden})),[]),Qe=(0,a.useCallback)(Ue=>ge(we=>({open:we.open||Ue,hidden:!Ue})),[]);return{state:Oe,toggleModal:Ge,setOpen:Qe}}},3992:function(_,s,e){"use strict";e.r(s),e.d(s,{SearchPage:function(){return et}});var a=e(2784),t=e(1849),c=e(19126),f=e.n(c),y=e(10289),i=e(22313),v=e(60905),p=e(48760),m=e(79692),l=e(27556),r=e(74603),A=e(61837),T=e(21853),Z=e(33375);const O=(0,m.Z)(()=>({root:{display:"flex",alignItems:"center"},input:{flex:1}})),q=({searchQuery:Ce,handleSearch:ot,handleClearSearchBar:nt})=>{const vt=O();return a.createElement(l.Z,{component:"form",onSubmit:it=>ot(it),className:vt.root},a.createElement(A.Z,{disabled:!0,type:"submit","aria-label":"search"},a.createElement(T.Z,null)),a.createElement(r.Z,{className:vt.input,placeholder:"Search in Backstage",value:Ce,onChange:it=>ot(it),inputProps:{"aria-label":"search backstage"}}),a.createElement(A.Z,{"aria-label":"search",onClick:()=>nt()},a.createElement(Z.Z,null)))};var $=e(85256),x=e(90436),b=e(99688),D=e(64279),j=e(31423),ee=e(36444);const ce=(0,m.Z)(Ce=>({filters:{width:"250px",display:"flex"},icon:{margin:Ce.spacing(-1,0,0,0)}})),Ee=({numberOfSelectedFilters:Ce,handleToggleFilters:ot})=>{const nt=ce();return a.createElement("div",{className:nt.filters},a.createElement(A.Z,{className:nt.icon,"aria-label":"settings",onClick:ot},a.createElement(ee.Z,null)),a.createElement(x.Z,{variant:"h6"},"Filters (",Ce||0,")"))};var Ae=e(94339),Oe=e(32552),ge=e(77277),Ge=e(24579),Qe=e(73698),Ue=e(12231),we=e(11776),tt=e(38402),dt=e(21324),je=e(49378);const Et=(0,m.Z)(Ce=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:Ce.spacing(0,1,0,1)},dropdown:{width:"100%"}})),Bt=({filters:Ce,filterOptions:ot,resetFilters:nt,updateSelected:vt,updateChecked:it})=>{const At=Et();return a.createElement(Ae.Z,{className:At.filters},a.createElement(Oe.Z,{title:a.createElement(x.Z,{variant:"h6"},"Filters"),action:a.createElement(ge.Z,{color:"primary",onClick:()=>nt()},"CLEAR ALL")}),a.createElement($.Z,null),ot.kind.length===0&&ot.lifecycle.length===0&&a.createElement(Ge.Z,null,a.createElement(x.Z,{variant:"subtitle2"},"Filters cannot be applied to available results")),ot.kind.length>0&&a.createElement(Ge.Z,null,a.createElement(x.Z,{variant:"subtitle2"},"Kind"),a.createElement(Qe.Z,{id:"outlined-select",onChange:B=>{var R;return vt((R=B==null?void 0:B.target)==null?void 0:R.value)},variant:"outlined",className:At.dropdown,value:Ce.selected},ot.kind.map(B=>a.createElement(Ue.Z,{selected:B==="",dense:!0,key:B,value:B},B)))),ot.lifecycle.length>0&&a.createElement(Ge.Z,null,a.createElement(x.Z,{variant:"subtitle2"},"Lifecycle"),a.createElement(we.Z,{disablePadding:!0,dense:!0},ot.lifecycle.map(B=>a.createElement(tt.Z,{key:B,dense:!0,button:!0,onClick:()=>it(B)},a.createElement(dt.Z,{edge:"start",disableRipple:!0,className:At.checkbox,color:"primary",checked:Ce.checked.includes(B),tabIndex:-1,value:B,name:B}),a.createElement(je.Z,{id:B,primary:B}))))))};var Tt=e(41564),gt=e(9118),yt=e(36964);const rt=(0,m.Z)(Ce=>({searchQuery:{color:Ce.palette.text.primary,background:Ce.palette.background.default,borderRadius:"10%"},tableHeader:{margin:Ce.spacing(1,0,0,0),display:"flex"},divider:{width:"1px",margin:Ce.spacing(0,2),padding:Ce.spacing(2,0)}})),pt=[{title:"Name",field:"name",highlight:!0,render:Ce=>a.createElement(gt.Link,{to:Ce.url||""},Ce.name)},{title:"Description",field:"description"},{title:"Owner",field:"owner"},{title:"Kind",field:"kind"},{title:"LifeCycle",field:"lifecycle"}],Pt=({searchQuery:Ce,numberOfSelectedFilters:ot,numberOfResults:nt,handleToggleFilters:vt})=>{const it=rt();return a.createElement("div",{className:it.tableHeader},a.createElement(Ee,{numberOfSelectedFilters:ot,handleToggleFilters:vt}),a.createElement($.Z,{className:it.divider,orientation:"vertical"}),a.createElement(v.Z,{item:!0,xs:12},Ce?a.createElement(x.Z,{variant:"h6"},`${nt} `,nt>1?"results for ":"result for ",a.createElement("span",{className:it.searchQuery},'"',Ce,'"')," "):a.createElement(x.Z,{variant:"h6"},`${nt} results`)))},xt=({searchQuery:Ce})=>{const ot=(0,yt.useApi)(j.catalogApiRef),[nt,vt]=(0,a.useState)(!1),[it,At]=(0,a.useState)({selected:"",checked:[]}),[B,R]=(0,a.useState)([]),{loading:P,error:K,value:W}=(0,D.default)(async()=>(await ot.getEntities()).items.map(Re=>{var pe,xe,ft,lt,ze;return{name:Re.metadata.name,description:Re.metadata.description,owner:typeof((pe=Re.spec)==null?void 0:pe.owner)=="string"?(xe=Re.spec)==null?void 0:xe.owner:void 0,kind:Re.kind,lifecycle:typeof((ft=Re.spec)==null?void 0:ft.lifecycle)=="string"?(lt=Re.spec)==null?void 0:lt.lifecycle:void 0,url:`/catalog/${((ze=Re.metadata.namespace)==null?void 0:ze.toLocaleLowerCase("en-US"))||Tt.zG}/${Re.kind.toLocaleLowerCase("en-US")}/${Re.metadata.name}`}}),[]);if((0,a.useEffect)(()=>{if(W){let Ne=W;it.selected!==""&&(Ne=W.filter(Re=>it.selected.includes(Re.kind))),it.checked.length>0&&(Ne=Ne.filter(Re=>Re.lifecycle&&it.checked.includes(Re.lifecycle))),Ce&&(Ne=Ne.filter(Re=>{var pe,xe,ft;return((pe=Re.name)==null?void 0:pe.toLocaleLowerCase("en-US").includes(Ce))||((xe=Re.name)==null?void 0:xe.toLocaleLowerCase("en-US").includes(Ce.split(" ").join("-")))||((ft=Re.description)==null?void 0:ft.toLocaleLowerCase("en-US").includes(Ce))})),R(Ne)}},[it,Ce,W]),P)return a.createElement(gt.Progress,null);if(K)return a.createElement(b.Z,{severity:"error"},"Error encountered while fetching search results. ",K.toString());if(!W||W.length===0)return a.createElement(gt.EmptyState,{missing:"data",title:"Sorry, no results were found"});const ne=()=>{At({selected:"",checked:[]})},ye=Ne=>{At(Re=>({...Re,selected:Ne}))},ve=Ne=>{if(it.checked.includes(Ne)){At(Re=>({...Re,checked:Re.checked.filter(pe=>pe!==Ne)}));return}At(Re=>({...Re,checked:[...Re.checked,Ne]}))},Me=W.reduce((Ne,Re)=>(Re.kind&&Ne.kind.indexOf(Re.kind)<0&&Ne.kind.push(Re.kind),Re.lifecycle&&Ne.lifecycle.indexOf(Re.lifecycle)<0&&Ne.lifecycle.push(Re.lifecycle),Ne),{kind:[],lifecycle:[]});return a.createElement(a.Fragment,null,a.createElement(v.Z,{container:!0},nt&&a.createElement(v.Z,{item:!0,xs:3},a.createElement(Bt,{filters:it,filterOptions:Me,resetFilters:ne,updateSelected:ye,updateChecked:ve})),a.createElement(v.Z,{item:!0,xs:nt?9:12},a.createElement(gt.Table,{options:{paging:!0,pageSize:20,search:!1},data:B,columns:pt,title:a.createElement(Pt,{searchQuery:Ce,numberOfResults:B.length,numberOfSelectedFilters:(it.selected!==""?1:0)+it.checked.length,handleToggleFilters:()=>vt(!nt)})}))))},Dt=()=>{const[Ce,ot]=(0,gt.useQueryParamState)("query"),[nt,vt]=(0,a.useState)(Ce!=null?Ce:""),it=B=>{B.preventDefault(),vt(B.target.value)};(0,a.useEffect)(()=>vt(Ce!=null?Ce:""),[Ce]),(0,p.Z)(()=>{ot(nt)},200,[nt]);const At=()=>{vt("")};return a.createElement(gt.Page,{themeId:"home"},a.createElement(gt.Header,{title:"Search"}),a.createElement(gt.Content,null,a.createElement(v.Z,{container:!0,direction:"row"},a.createElement(v.Z,{item:!0,xs:12},a.createElement(q,{handleSearch:it,handleClearSearchBar:At,searchQuery:nt})),a.createElement(v.Z,{item:!0,xs:12},a.createElement(xt,{searchQuery:(Ce!=null?Ce:"").toLocaleLowerCase("en-US")})))))},bt=()=>{const Ce=(0,y.TH)(),{term:ot,setTerm:nt,types:vt,setTypes:it,pageCursor:At,setPageCursor:B,filters:R,setFilters:P}=(0,i.Rx)(),K=(0,t.Z)(Ce.search);return(0,a.useEffect)(()=>{if(Ce.search===K)return;const W=f().parse(Ce.search.substring(1),{arrayLimit:0})||{};W.filters&&P(W.filters),W.query&&nt(W.query),W.pageCursor&&B(W.pageCursor),W.types&&it(W.types)},[K,Ce,nt,it,B,P]),(0,a.useEffect)(()=>{const W=f().stringify({query:ot,types:vt,pageCursor:At,filters:R},{arrayFormat:"brackets"}),ne=`${window.location.pathname}?${W}`;window.history.replaceState(null,document.title,ne)},[ot,vt,At,R]),null},et=()=>{const Ce=(0,y.pC)();return a.createElement(i.Nd,null,a.createElement(bt,null),Ce||a.createElement(Dt,null))}},39332:function(_,s,e){"use strict";e.r(s),e.d(s,{SearchResult:function(){return f}});var a=e(9118),t=e(2784),c=e(22313);const f=({children:y})=>{const{result:{loading:i,error:v,value:p}}=(0,c.Rx)();return i?t.createElement(a.Progress,null):v?t.createElement(a.ResponseErrorPanel,{title:"Error encountered while fetching search results",error:v}):(p==null?void 0:p.results.length)?t.createElement(t.Fragment,null,y({results:p.results})):t.createElement(a.EmptyState,{missing:"data",title:"Sorry, no results were found"})}},8542:function(_,s,e){"use strict";e.d(s,{G:function(){return p}});var a=e(79692),t=e(77277),c=e(35352),f=e(27742),y=e(2784),i=e(22313);const v=(0,a.Z)(m=>({root:{display:"flex",justifyContent:"space-between",gap:m.spacing(2),margin:m.spacing(2,0)}})),p=()=>{const{fetchNextPage:m,fetchPreviousPage:l}=(0,i.Rx)(),r=v();return!m&&!l?y.createElement(y.Fragment,null):y.createElement("nav",{"arial-label":"pagination navigation",className:r.root},y.createElement(t.Z,{"aria-label":"previous page",disabled:!l,onClick:l,startIcon:y.createElement(c.Z,null)},"Previous"),y.createElement(t.Z,{"aria-label":"next page",disabled:!m,onClick:m,endIcon:y.createElement(f.Z,null)},"Next"))}},20863:function(_,s,e){"use strict";e.d(s,{_Z:function(){return c}});var a=e(91512),t=e(36964);const c=(0,t.createRouteRef)({id:"search"}),f=(0,t.createRouteRef)({id:"search:next"}),y=(0,t.createPlugin)({id:"search",apis:[(0,t.createApiFactory)({api:a.g,deps:{discoveryApi:t.discoveryApiRef,identityApi:t.identityApiRef},factory:({discoveryApi:O,identityApi:q})=>new a.w({discoveryApi:O,identityApi:q})})],routes:{root:c,nextRoot:f}}),i=y.provide((0,t.createRoutableExtension)({name:"SearchPage",component:()=>Promise.resolve().then(e.bind(e,3992)).then(O=>O.SearchPage),mountPoint:c})),v=y.provide((0,t.createRoutableExtension)({name:"SearchPageNext",component:()=>Promise.resolve().then(e.bind(e,3992)).then(O=>O.SearchPage),mountPoint:f})),p=y.provide((0,t.createComponentExtension)({name:"SearchBar",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(O=>O.SearchBar)}})),m=y.provide((0,t.createComponentExtension)({name:"SearchBarNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(O=>O.SearchBar)}})),l=y.provide((0,t.createComponentExtension)({name:"SearchResult",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(O=>O.SearchResult)}})),r=y.provide((0,t.createComponentExtension)({name:"SearchResultNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(O=>O.SearchResult)}})),A=y.provide((0,t.createComponentExtension)({name:"SidebarSearchModal",component:{lazy:()=>e.e(3825).then(e.bind(e,43825)).then(O=>O.SidebarSearchModal)}})),T=y.provide((0,t.createComponentExtension)({name:"DefaultResultListItem",component:{lazy:()=>Promise.resolve().then(e.bind(e,19941)).then(O=>O.DefaultResultListItem)}})),Z=y.provide((0,t.createComponentExtension)({name:"HomePageSearchBar",component:{lazy:()=>e.e(6105).then(e.bind(e,46105)).then(O=>O.HomePageSearchBar)}}))},94067:function(_,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return Z},Router:function(){return T},isTechDocsAvailable:function(){return A}});var a=e(2784),t=e(31423),c=e(10289),f=e(41481),y=e(31752),i=e(73873),v=e(97589),p=e(36964);const m=({entity:O})=>{var $;const q=(0,p.useApi)(p.configApiRef);return a.createElement(i.Ej,{withSearch:!1,entityRef:{namespace:(0,v.D)(($=O.metadata.namespace)!=null?$:"default",q),kind:(0,v.D)(O.kind,q),name:(0,v.D)(O.metadata.name,q)}})};var l=e(9118);const r="backstage.io/techdocs-ref",A=O=>{var q,$;return Boolean(($=(q=O==null?void 0:O.metadata)==null?void 0:q.annotations)==null?void 0:$[r])},T=()=>a.createElement(c.Z5,null,a.createElement(c.AW,{path:"/",element:a.createElement(f.TechDocsIndexPage,null)}),a.createElement(c.AW,{path:"/:namespace/:kind/:name/*",element:a.createElement(y.TechDocsPage,null)})),Z=O=>{var x;const{entity:q}=(0,t.useEntity)();return((x=q.metadata.annotations)==null?void 0:x[r])?a.createElement(c.Z5,null,a.createElement(c.AW,{path:"/*",element:a.createElement(m,{entity:q})})):a.createElement(l.MissingAnnotationEmptyState,{annotation:r})}},3337:function(_,s,e){"use strict";e.d(s,{D:function(){return t},g:function(){return c}});var a=e(36964);const t=(0,a.createApiRef)({id:"plugin.techdocs.storageservice"}),c=(0,a.createApiRef)({id:"plugin.techdocs.service"})},71226:function(_,s,e){"use strict";e.d(s,{O:function(){return l}});var a=e(2784),t=e(79692),c=e(49378),f=e(38402),y=e(85256),i=e(9118),v=e(15277),p=e.n(v);const m=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),l=({result:r,lineClamp:A=5,asListItem:T=!0,asLink:Z=!0,title:O})=>{const q=m(),$=()=>{var D;return a.createElement(c.Z,{className:q.itemText,primaryTypographyProps:{variant:"h6"},primary:O||`${r.title} | ${(D=r.entityTitle)!=null?D:r.name} docs`,secondary:a.createElement(p(),{line:A,truncateText:"\u2026",text:r.text,element:"span"})})},x=({children:D})=>Z?a.createElement(i.Link,{to:r.location},D):a.createElement(a.Fragment,null,D),b=({children:D})=>T?a.createElement(a.Fragment,null,a.createElement(f.Z,{alignItems:"flex-start",className:q.flexContainer},D),a.createElement(y.Z,{component:"li"})):a.createElement(a.Fragment,null,D);return a.createElement(x,null,a.createElement(b,null,a.createElement($,null)))}},97589:function(_,s,e){"use strict";e.d(s,{D:function(){return a}});function a(t,c){return c.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},10187:function(_,s,e){"use strict";e.r(s),e.d(s,{DocsCardGrid:function(){return l}});var a=e(2784),t=e(36964),c=e(94339),f=e(16111),y=e(24579),i=e(14503),v=e(68725),p=e(9118),m=e(97589);const l=({entities:r})=>{const A=(0,t.useRouteRef)(v.Fw),T=(0,t.useApi)(t.configApiRef);return r?a.createElement(p.ItemCardGrid,{"data-testid":"docs-explore"},(r==null?void 0:r.length)?r.map((Z,O)=>{var q,$;return a.createElement(c.Z,{key:O},a.createElement(f.Z,null,a.createElement(p.ItemCardHeader,{title:(q=Z.metadata.title)!=null?q:Z.metadata.name})),a.createElement(y.Z,null,Z.metadata.description),a.createElement(i.Z,null,a.createElement(p.Button,{to:A({namespace:(0,m.D)(($=Z.metadata.namespace)!=null?$:"default",T),kind:(0,m.D)(Z.kind,T),name:(0,m.D)(Z.metadata.name,T)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null}},83201:function(_,s,e){"use strict";e.r(s),e.d(s,{DocsTable:function(){return r}});var a=e(2784),t=e(95074),c=e(36964),f=e(41564),y=e(31423),i=e(68725),v=e(9118),p=e(50294),m=e(67430),l=e(97589);const r=({entities:A,title:T,loading:Z,columns:O,actions:q})=>{const[,$]=(0,t.Z)(),x=(0,c.useRouteRef)(i.Fw),b=(0,c.useApi)(c.configApiRef);if(!A)return null;const D=A.map(ce=>{var Ae;const Ee=(0,y.getEntityRelations)(ce,f.S4);return{entity:ce,resolved:{docsUrl:x({namespace:(0,l.D)((Ae=ce.metadata.namespace)!=null?Ae:"default",b),kind:(0,l.D)(ce.kind,b),name:(0,l.D)(ce.metadata.name,b)}),ownedByRelations:Ee,ownedByRelationsTitle:Ee.map(Oe=>(0,y.formatEntityRefTitle)(Oe,{defaultKind:"group"})).join(", ")}}}),j=[m.createNameColumn(),m.createOwnerColumn(),m.createTypeColumn()],ee=[p.createCopyDocsUrlAction($)];return a.createElement(a.Fragment,null,Z||D&&D.length>0?a.createElement(v.Table,{isLoading:Z,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:D,columns:O||j,actions:q||ee,title:T?`${T} (${D.length})`:`All (${D.length})`}):a.createElement(v.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:a.createElement(v.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))}},57110:function(_,s,e){"use strict";e.r(s),e.d(s,{TechDocsCustomHome:function(){return T}});var a=e(2784),t=e(64279),c=e(79692),f=e(31423),y=e(41564),i=e(83201),v=e(10187),p=e(1114),m=e(9118),l=e(36964);const r={DocsTable:i.DocsTable,DocsCardGrid:v.DocsCardGrid},A=({config:O,entities:q,index:$})=>{const b=(0,c.Z)({panelContainer:{marginBottom:"2rem",...O.panelCSS?O.panelCSS:{}}})(),{value:D}=Z(),j=r[O.panelType],ee=q.filter(ce=>O.filterPredicate==="ownedByUser"?D?(0,f.isOwnerOf)(D,ce):!1:typeof O.filterPredicate=="function"&&O.filterPredicate(ce));return a.createElement(a.Fragment,null,a.createElement(m.ContentHeader,{title:O.title,description:O.description},$===0?a.createElement(m.SupportButton,null,"Discover documentation in your ecosystem."):null),a.createElement("div",{className:b.panelContainer},a.createElement(j,{"data-testid":"techdocs-custom-panel",entities:ee})))},T=({tabsConfig:O})=>{const[q,$]=(0,a.useState)(0),x=(0,l.useApi)(f.catalogApiRef),{value:b,loading:D,error:j}=(0,t.default)(async()=>(await x.getEntities({filter:{"metadata.annotations.backstage.io/techdocs-ref":f.CATALOG_FILTER_EXISTS},fields:["apiVersion","kind","metadata","relations","spec.owner","spec.type"]})).items.filter(Ee=>{var Ae;return!!((Ae=Ee.metadata.annotations)==null?void 0:Ae["backstage.io/techdocs-ref"])})),ee=O[q];return D?a.createElement(p.j,null,a.createElement(m.Content,null,a.createElement(m.Progress,null))):j?a.createElement(p.j,null,a.createElement(m.Content,null,a.createElement(m.WarningPanel,{severity:"error",title:"Could not load available documentation."},a.createElement(m.CodeSnippet,{language:"text",text:j.toString()})))):a.createElement(p.j,null,a.createElement(m.HeaderTabs,{selectedIndex:q,onChange:ce=>$(ce),tabs:O.map(({label:ce},Ee)=>({id:Ee.toString(),label:ce}))}),a.createElement(m.Content,{"data-testid":"techdocs-content"},ee.panels.map((ce,Ee)=>a.createElement(A,{key:Ee,config:ce,entities:b||[],index:Ee}))))};function Z(){const O=(0,l.useApi)(f.catalogApiRef),q=(0,l.useApi)(l.identityApiRef);return(0,t.default)(async()=>{const $=await q.getBackstageIdentity();return O.getEntityByName((0,y.of)($.userEntityRef,{defaultKind:"User",defaultNamespace:y.zG}))},[O,q])}},41481:function(_,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return y}});var a=e(2784),t=e(10289),c=e(57110);const f=()=>{const i=[{label:"Overview",panels:[{title:"Overview",description:"Explore your internal technical ecosystem through documentation.",panelType:"DocsCardGrid",filterPredicate:()=>!0}]},{label:"Owned Documents",panels:[{title:"Owned documents",description:"Access your documentation.",panelType:"DocsTable",filterPredicate:"ownedByUser"}]}];return a.createElement(c.TechDocsCustomHome,{tabsConfig:i})},y=()=>(0,t.pC)()||a.createElement(f,null)},1114:function(_,s,e){"use strict";e.d(s,{j:function(){return f}});var a=e(2784),t=e(9118),c=e(36964);const f=({children:y})=>{var p;const v=`Documentation available in ${(p=(0,c.useApi)(c.configApiRef).getOptionalString("organization.name"))!=null?p:"Backstage"}`;return a.createElement(t.PageWithHeader,{title:"Documentation",subtitle:v,themeId:"documentation"},y)}},50294:function(_,s,e){"use strict";e.r(s),e.d(s,{createCopyDocsUrlAction:function(){return f},createStarEntityAction:function(){return y}});var a=e(2784),t=e(39981),c=e(31423);function f(i){return v=>({icon:()=>a.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>i(`${window.location.origin}${v.resolved.docsUrl}`)})}function y(i,v){return({entity:p})=>{const m=i(p);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,c.favoriteEntityIcon)(m),tooltip:(0,c.favoriteEntityTooltip)(m),onClick:()=>v(p)}}}},67430:function(_,s,e){"use strict";e.r(s),e.d(s,{createNameColumn:function(){return y},createOwnerColumn:function(){return i},createTypeColumn:function(){return v}});var a=e(2784),t=e(9118),c=e(31423);function f(p){return p.metadata.title||p.metadata.name}function y(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:p=>a.createElement(t.SubvalueCell,{value:a.createElement(t.Link,{to:p.resolved.docsUrl},f(p.entity)),subvalue:p.entity.metadata.description})}}function i(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:p})=>a.createElement(c.EntityRefLinks,{entityRefs:p.ownedByRelations,defaultKind:"group"})}}function v(){return{title:"Type",field:"entity.spec.type"}}},80547:function(_,s,e){"use strict";e.d(s,{Ej:function(){return At},DK:function(){return ot}});var a=e(2784),t=e(10289),c=e(79692),f=e(60364),y=e(41128),i=e(60905),v=e(36964),p=e(36356),m=e(9118),l=e(3337);const r=(B,R,P)=>{const K=B==="src"&&R.endsWith(".svg"),W=!R.match(/^([a-z]*:)?\/\//i),ne=R.startsWith(P);return K&&(W||ne)},A=({techdocsStorageApi:B,entityId:R,path:P})=>async K=>{const W=await B.getApiOrigin(),ne=async(ye,ve)=>{for(const Me of ye)if(Me.hasAttribute(ve)){const Ne=Me.getAttribute(ve);if(!Ne)return;const Re=await B.getBaseUrl(Ne,R,P);if(r(ve,Ne,W))try{const xe=await(await fetch(Re,{credentials:"include"})).text();Me.setAttribute(ve,`data:image/svg+xml;base64,${btoa(xe)}`)}catch{Me.setAttribute("alt",`Error: ${Ne}`)}else Me.setAttribute(ve,Re)}};return await Promise.all([ne(K.querySelectorAll("img"),"src"),ne(K.querySelectorAll("script"),"src"),ne(K.querySelectorAll("source"),"src"),ne(K.querySelectorAll("link"),"href"),ne(K.querySelectorAll("a[download]"),"href")]),K};var T=e(63925),Z=e(67097),O=e(28316),q=e(82717),$=e.n(q);const x=B=>R=>{const P=R.querySelector('[title="Edit this page"]');if(!P||!P.href)return R;const K=new URL(P.href),W=B.byUrl(K);if((W==null?void 0:W.type)!=="github"&&(W==null?void 0:W.type)!=="gitlab")return R;const ne=R.querySelector("article>h1").childNodes[0].textContent,ye=encodeURIComponent(`Documentation Feedback: ${ne}`),ve=encodeURIComponent(`Page source:
|
|
32
|
-
${P.href}
|
|
33
|
-
|
|
34
|
-
Feedback:`),Me=(W==null?void 0:W.type)==="github"?(0,T.Pb)(K.href,"blob"):K.href,Ne=$()(Me),Re=`/${Ne.organization}/${Ne.name}`,pe=P.cloneNode();switch(W==null?void 0:W.type){case"gitlab":pe.href=`${K.origin}${Re}/issues/new?issue[title]=${ye}&issue[description]=${ve}`;break;case"github":pe.href=`${K.origin}${Re}/issues/new?title=${ye}&body=${ve}`;break;default:return R}return O.render(a.createElement(Z.Z),pe),pe.style.paddingLeft="5px",pe.title="Leave feedback for this page",pe.id="git-feedback-link",P==null||P.insertAdjacentElement("beforebegin",pe),R},b=()=>B=>(((P,K)=>{Array.from(P).filter(W=>W.hasAttribute(K)).forEach(W=>{const ne=W.getAttribute(K);if(ne){ne.match(/^https?:\/\//i)&&W.setAttribute("target","_blank");try{const ye=D(window.location.href);W.setAttribute(K,new URL(ne,ye).toString())}catch{W.replaceWith(W.textContent||ne)}}})})(Array.from(B.getElementsByTagName("a")),"href"),B);function D(B){const R=new URL(B);return!R.pathname.endsWith("/")&&!R.pathname.endsWith(".html")&&(R.pathname+="/"),R.toString()}const j=({baseUrl:B,onClick:R})=>P=>(Array.from(P.getElementsByTagName("a")).forEach(K=>{K.addEventListener("click",W=>{const ye=K.getAttribute("href");!ye||ye.startsWith(B)&&!K.hasAttribute("download")&&(W.preventDefault(),R(W,ye))})}),P),ee=()=>B=>(Array.from(B.querySelectorAll("pre > code")).forEach(R=>{var W;const P=document.createElement("button"),K=R.textContent||"";P.className="md-clipboard md-icon",P.title="Copy to clipboard",P.innerHTML='<svg viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg>',P.addEventListener("click",()=>navigator.clipboard.writeText(K)),(W=R==null?void 0:R.parentElement)==null||W.prepend(P)}),B),ce=()=>B=>{var R;return(R=B.querySelector(".md-header"))==null||R.remove(),B},Ee=()=>B=>{var R;return(R=B.querySelector(".md-footer .md-copyright"))==null||R.remove(),B},Ae=({docStorageUrl:B,onLoading:R,onLoaded:P})=>K=>{const W=Array.from(K.querySelectorAll('head > link[rel="stylesheet"]')).filter(ye=>{var ve;return(ve=ye.getAttribute("href"))==null?void 0:ve.startsWith(B)});let ne=W.length;return ne>0&&R(K),W.forEach(ye=>ye.addEventListener("load",()=>{ne-=1,ne===0&&P(K)})),K};var Oe=e(35368),ge=e.n(Oe);const Ge=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Qe=/^https:\/\/fonts\.googleapis\.com/,Ue=/^https:\/\/fonts\.gstatic\.com/,we=B=>{if(B.nodeName&&B.nodeName==="LINK"){const R=B.getAttribute("href")||"";R.match(Ge)&&B.setAttribute("rel","stylesheet"),R.match(Qe)&&B.setAttribute("rel","stylesheet"),R.match(Ue)&&B.setAttribute("rel","preconnect")}return B},tt=B=>R=>{if(R.nodeName==="IFRAME"){const P=R.getAttribute("src");if(!P)return R.remove(),R;try{const K=new URL(P);B.some(ne=>K.host===ne)||R.remove()}catch(K){console.warn(`Invalid iframe src, ${K}`),R.remove()}}return R},dt=B=>{const R=(B==null?void 0:B.getOptionalStringArray("allowedIframeHosts"))||[];return P=>{ge().addHook("afterSanitizeAttributes",we);const K=["link"];return R.length>0&&(ge().addHook("beforeSanitizeElements",tt(R)),K.push("iframe")),ge().sanitize(P.innerHTML,{ADD_TAGS:K,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},je=({css:B})=>R=>(R.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${B}</style>`),R),Et=()=>B=>(setTimeout(()=>{var R;if(window.location.hash){const P=window.location.hash.slice(1);(R=B==null?void 0:B.querySelector(`#${P}`))==null||R.scrollIntoView()}},200),B),Bt=async(B,R)=>{let P;if(typeof B=="string")P=new DOMParser().parseFromString(B,"text/html").documentElement;else if(B instanceof Element)P=B;else throw new Error("dom is not a recognized type");for(const K of R)P=await K(P);return P};var Tt=e(82957),gt=e(25921),yt=e(64279),rt=e(77446);function pt({contentLoading:B,content:R,activeSyncState:P}){return B||P==="BUILD_READY_RELOAD"||!R&&P==="CHECKING"?"CHECKING":!R&&P==="BUILDING"?"INITIAL_BUILD":R?P==="BUILDING"?"CONTENT_STALE_REFRESHING":P==="BUILD_READY"?"CONTENT_STALE_READY":P==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function Pt(B,R){const P={...B};switch(R.type){case"sync":R.state==="CHECKING"&&(P.buildLog=[]),P.activeSyncState=R.state,P.syncError=R.syncError;break;case"contentLoading":P.contentLoading=!0,P.contentError=void 0;break;case"content":typeof R.path=="string"&&(P.path=R.path),P.contentLoading=!1,P.content=R.content,P.contentError=R.contentError;break;case"buildLog":P.buildLog=P.buildLog.concat(R.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(P.activeSyncState)&&["contentLoading","content"].includes(R.type)&&(P.activeSyncState="UP_TO_DATE",P.buildLog=[]),P}function xt(B,R,P,K){var Re,pe;const[W,ne]=(0,a.useReducer)(Pt,{activeSyncState:"CHECKING",path:K,contentLoading:!0,buildLog:[]}),ye=(0,v.useApi)(l.D),{retry:ve}=(0,rt.Z)(async()=>{ne({type:"contentLoading"});try{const xe=await ye.getEntityDocs({kind:B,namespace:R,name:P},K);return ne({type:"content",content:xe,path:K}),xe}catch(xe){ne({type:"content",contentError:xe,path:K})}},[ye,B,R,P,K]),Me=(0,a.useRef)({content:void 0,reload:()=>{}});return Me.current={content:W.content,reload:ve},(0,yt.default)(async()=>{ne({type:"sync",state:"CHECKING"});const xe=setTimeout(()=>{ne({type:"sync",state:"BUILDING"})},1e3);try{switch(await ye.syncEntityDocs({kind:B,namespace:R,name:P},lt=>{ne({type:"buildLog",log:lt})})){case"updated":Me.current.content?ne({type:"sync",state:"BUILD_READY"}):(Me.current.reload(),ne({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":ne({type:"sync",state:"UP_TO_DATE"});break;default:ne({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ft){ne({type:"sync",state:"ERROR",syncError:ft})}finally{clearTimeout(xe)}},[B,P,R,ye,ne,Me]),{state:(0,a.useMemo)(()=>pt({activeSyncState:W.activeSyncState,contentLoading:W.contentLoading,content:W.content}),[W.activeSyncState,W.content,W.contentLoading]),contentReload:ve,path:W.path,content:W.content,contentErrorMessage:(Re=W.contentError)==null?void 0:Re.toString(),syncErrorMessage:(pe=W.syncError)==null?void 0:pe.toString(),buildLog:W.buildLog}}const Dt=(0,c.Z)(B=>({searchBar:{maxWidth:"calc(100% - 16rem * 2 - 2.4rem)",marginTop:0,marginBottom:B.spacing(1),marginLeft:"calc(16rem + 1.2rem)","@media screen and (max-width: 76.1875em)":{marginLeft:"calc(10rem + 0.8rem)",maxWidth:"calc(100% - 10rem - 1.6rem)"}}})),bt=(0,a.createContext)({}),et=({children:B,entityRef:R})=>{const{"*":P}=(0,t.UO)(),{kind:K,namespace:W,name:ne}=R,ye=xt(K,W,ne,P);return a.createElement(bt.Provider,{value:ye},B)},Ce=(B,R)=>P=>React.createElement(et,{entityRef:R},React.createElement(B,{...P})),ot=()=>(0,a.useContext)(bt),nt=["h1","h2","h3","h4","h5","h6"],vt=B=>{const R=(0,t.s0)(),P=(0,f.Z)(),K=(0,v.useApi)(l.D),W=(0,v.useApi)(p.q3),ne=(0,v.useApi)(v.configApiRef),{namespace:ye="",kind:ve="",name:Me=""}=B,{state:Ne,path:Re,content:pe}=ot(),xe=P.palette.type==="dark",[ft,lt]=(0,a.useState)(),[ze,le]=(0,a.useState)(null),{isPinned:Ze}=(0,a.useContext)(m.SidebarPinStateContext),Ke=(0,a.useCallback)(()=>{if(!ze||!ft)return;const w=ze.querySelector(".md-container > .md-tabs");ft.forEach(E=>{const M=Math.max(ze.getBoundingClientRect().top,0);E.style.top=w?`${M+w.getBoundingClientRect().height}px`:`${M}px`})},[ze,ft]);(0,a.useEffect)(()=>(Ke(),window.addEventListener("scroll",Ke,!0),window.addEventListener("resize",Ke),()=>{window.removeEventListener("scroll",Ke,!0),window.removeEventListener("resize",Ke)}),[Ke,Ne]);const Xe=(0,a.useCallback)(()=>{if(!ze)return;const w=ze.querySelector(".md-footer");w&&(w.style.width=`${ze.getBoundingClientRect().width}px`)},[ze]);(0,a.useEffect)(()=>(Xe(),window.addEventListener("resize",Xe),()=>{window.removeEventListener("resize",Xe)}));const ke=(0,a.useCallback)((w,E)=>Bt(w,[dt(ne.getOptionalConfig("techdocs.sanitizer")),A({techdocsStorageApi:K,entityId:{kind:ve,name:Me,namespace:ye},path:E}),b(),ce(),Ee(),x(W),je({css:`
|
|
35
|
-
/*
|
|
36
|
-
As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
|
|
37
|
-
As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
|
|
38
|
-
*/
|
|
39
|
-
:host {
|
|
40
|
-
/* FONT */
|
|
41
|
-
--md-default-fg-color: ${P.palette.text.primary};
|
|
42
|
-
--md-default-fg-color--light: ${P.palette.text.secondary};
|
|
43
|
-
--md-default-fg-color--lighter: ${(0,y.$n)(P.palette.text.secondary,.7)};
|
|
44
|
-
--md-default-fg-color--lightest: ${(0,y.$n)(P.palette.text.secondary,.3)};
|
|
45
|
-
|
|
46
|
-
/* BACKGROUND */
|
|
47
|
-
--md-default-bg-color:${P.palette.background.default};
|
|
48
|
-
--md-default-bg-color--light: ${P.palette.background.paper};
|
|
49
|
-
--md-default-bg-color--lighter: ${(0,y.$n)(P.palette.background.paper,.7)};
|
|
50
|
-
--md-default-bg-color--lightest: ${(0,y.$n)(P.palette.background.paper,.3)};
|
|
51
|
-
|
|
52
|
-
/* PRIMARY */
|
|
53
|
-
--md-primary-fg-color: ${P.palette.primary.main};
|
|
54
|
-
--md-primary-fg-color--light: ${P.palette.primary.light};
|
|
55
|
-
--md-primary-fg-color--dark: ${P.palette.primary.dark};
|
|
56
|
-
--md-primary-bg-color: ${P.palette.primary.contrastText};
|
|
57
|
-
--md-primary-bg-color--light: ${(0,y.$n)(P.palette.primary.contrastText,.7)};
|
|
58
|
-
|
|
59
|
-
/* ACCENT */
|
|
60
|
-
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
61
|
-
|
|
62
|
-
/* SHADOW */
|
|
63
|
-
--md-shadow-z1: ${P.shadows[1]};
|
|
64
|
-
--md-shadow-z2: ${P.shadows[2]};
|
|
65
|
-
--md-shadow-z3: ${P.shadows[3]};
|
|
66
|
-
|
|
67
|
-
/* EXTENSIONS */
|
|
68
|
-
--md-admonition-fg-color: var(--md-default-fg-color);
|
|
69
|
-
--md-admonition-bg-color: var(--md-default-bg-color);
|
|
70
|
-
/* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
|
|
71
|
-
--md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>');
|
|
72
|
-
--md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z"/></svg>');
|
|
73
|
-
--md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z"/></svg>');
|
|
74
|
-
--md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z"/></svg>');
|
|
75
|
-
--md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
76
|
-
--md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z"/></svg>');
|
|
77
|
-
--md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"/></svg>');
|
|
78
|
-
--md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z"/></svg>');
|
|
79
|
-
--md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z"/></svg>');
|
|
80
|
-
--md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z"/></svg>');
|
|
81
|
-
--md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z"/></svg>');
|
|
82
|
-
--md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z"/></svg>');
|
|
83
|
-
--md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z"/></svg>');
|
|
84
|
-
--md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
85
|
-
--md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>');
|
|
86
|
-
--md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
87
|
-
--md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>');
|
|
88
|
-
--md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
89
|
-
--md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>');
|
|
90
|
-
--md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z"/></svg>');
|
|
91
|
-
--md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z"/></svg>');
|
|
92
|
-
--md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z"/></svg>');
|
|
93
|
-
--md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z"/></svg>');
|
|
94
|
-
--md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z"/></svg>');
|
|
95
|
-
--md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>');
|
|
96
|
-
--md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z"/></svg>');
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
:host > * {
|
|
100
|
-
/* CODE */
|
|
101
|
-
--md-code-fg-color: ${P.palette.text.primary};
|
|
102
|
-
--md-code-bg-color: ${P.palette.background.paper};
|
|
103
|
-
--md-code-hl-color: ${(0,y.Fq)(P.palette.warning.main,.5)};
|
|
104
|
-
--md-code-hl-keyword-color: ${xe?P.palette.primary.light:P.palette.primary.dark};
|
|
105
|
-
--md-code-hl-function-color: ${xe?P.palette.secondary.light:P.palette.secondary.dark};
|
|
106
|
-
--md-code-hl-string-color: ${xe?P.palette.success.light:P.palette.success.dark};
|
|
107
|
-
--md-code-hl-number-color: ${xe?P.palette.error.light:P.palette.error.dark};
|
|
108
|
-
--md-code-hl-constant-color: var(--md-code-hl-function-color);
|
|
109
|
-
--md-code-hl-special-color: var(--md-code-hl-function-color);
|
|
110
|
-
--md-code-hl-name-color: var(--md-code-fg-color);
|
|
111
|
-
--md-code-hl-comment-color: var(--md-default-fg-color--light);
|
|
112
|
-
--md-code-hl-generic-color: var(--md-default-fg-color--light);
|
|
113
|
-
--md-code-hl-variable-color: var(--md-default-fg-color--light);
|
|
114
|
-
--md-code-hl-operator-color: var(--md-default-fg-color--light);
|
|
115
|
-
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
|
|
116
|
-
|
|
117
|
-
/* TYPESET */
|
|
118
|
-
--md-typeset-font-size: 1rem;
|
|
119
|
-
--md-typeset-color: var(--md-default-fg-color);
|
|
120
|
-
--md-typeset-a-color: var(--md-accent-fg-color);
|
|
121
|
-
--md-typeset-table-color: ${P.palette.text.primary};
|
|
122
|
-
--md-typeset-del-color: ${xe?(0,y.Fq)(P.palette.error.dark,.5):(0,y.Fq)(P.palette.error.light,.5)};
|
|
123
|
-
--md-typeset-ins-color: ${xe?(0,y.Fq)(P.palette.success.dark,.5):(0,y.Fq)(P.palette.success.light,.5)};
|
|
124
|
-
--md-typeset-mark-color: ${xe?(0,y.Fq)(P.palette.warning.dark,.5):(0,y.Fq)(P.palette.warning.light,.5)};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@media screen and (max-width: 76.1875em) {
|
|
128
|
-
:host > * {
|
|
129
|
-
/* TYPESET */
|
|
130
|
-
--md-typeset-font-size: .9rem;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
@media screen and (max-width: 600px) {
|
|
135
|
-
:host > * {
|
|
136
|
-
/* TYPESET */
|
|
137
|
-
--md-typeset-font-size: .7rem;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
`}),je({css:`
|
|
141
|
-
body {
|
|
142
|
-
--md-text-color: var(--md-default-fg-color);
|
|
143
|
-
--md-text-link-color: var(--md-accent-fg-color);
|
|
144
|
-
--md-text-font-family: ${P.typography.fontFamily};
|
|
145
|
-
font-family: var(--md-text-font-family);
|
|
146
|
-
background-color: unset;
|
|
147
|
-
}
|
|
148
|
-
`}),je({css:`
|
|
149
|
-
.md-grid {
|
|
150
|
-
max-width: 100%;
|
|
151
|
-
margin: 0;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.md-nav {
|
|
155
|
-
font-size: calc(var(--md-typeset-font-size) * 0.9);
|
|
156
|
-
}
|
|
157
|
-
.md-nav__icon {
|
|
158
|
-
width: auto !important;
|
|
159
|
-
height: auto !important;
|
|
160
|
-
}
|
|
161
|
-
.md-nav__icon:after {
|
|
162
|
-
width: 20px !important;
|
|
163
|
-
height: 20px !important;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.md-main__inner {
|
|
167
|
-
margin-top: 0;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.md-sidebar {
|
|
171
|
-
position: fixed;
|
|
172
|
-
bottom: 100px;
|
|
173
|
-
width: 16rem;
|
|
174
|
-
}
|
|
175
|
-
.md-sidebar--secondary {
|
|
176
|
-
right: ${P.spacing(3)}px;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.md-content {
|
|
180
|
-
max-width: calc(100% - 16rem * 2);
|
|
181
|
-
margin-left: 16rem;
|
|
182
|
-
margin-bottom: 50px;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.md-footer {
|
|
186
|
-
position: fixed;
|
|
187
|
-
bottom: 0px;
|
|
188
|
-
}
|
|
189
|
-
.md-footer__title {
|
|
190
|
-
background-color: unset;
|
|
191
|
-
}
|
|
192
|
-
.md-footer-nav__link {
|
|
193
|
-
width: 16rem;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.md-dialog {
|
|
197
|
-
background-color: unset;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
@media screen and (max-width: 76.1875em) {
|
|
201
|
-
.md-nav {
|
|
202
|
-
transition: none !important;
|
|
203
|
-
background-color: var(--md-default-bg-color)
|
|
204
|
-
}
|
|
205
|
-
.md-nav--primary .md-nav__title {
|
|
206
|
-
cursor: auto;
|
|
207
|
-
color: var(--md-default-fg-color);
|
|
208
|
-
font-weight: 700;
|
|
209
|
-
white-space: normal;
|
|
210
|
-
line-height: 1rem;
|
|
211
|
-
height: auto;
|
|
212
|
-
display: flex;
|
|
213
|
-
flex-flow: column;
|
|
214
|
-
row-gap: 1.6rem;
|
|
215
|
-
padding: 1.2rem .8rem .8rem;
|
|
216
|
-
background-color: var(--md-default-bg-color);
|
|
217
|
-
}
|
|
218
|
-
.md-nav--primary .md-nav__title~.md-nav__list {
|
|
219
|
-
box-shadow: none;
|
|
220
|
-
}
|
|
221
|
-
.md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
|
|
222
|
-
border-top: none;
|
|
223
|
-
}
|
|
224
|
-
.md-nav--primary .md-nav__title .md-nav__button {
|
|
225
|
-
display: none;
|
|
226
|
-
}
|
|
227
|
-
.md-nav--primary .md-nav__title .md-nav__icon {
|
|
228
|
-
color: var(--md-default-fg-color);
|
|
229
|
-
position: static;
|
|
230
|
-
height: auto;
|
|
231
|
-
margin: 0 0 0 -0.2rem;
|
|
232
|
-
}
|
|
233
|
-
.md-nav--primary > .md-nav__title [for="none"] {
|
|
234
|
-
padding-top: 0;
|
|
235
|
-
}
|
|
236
|
-
.md-nav--primary .md-nav__item {
|
|
237
|
-
border-top: none;
|
|
238
|
-
}
|
|
239
|
-
.md-nav--primary :is(.md-nav__title,.md-nav__item) {
|
|
240
|
-
font-size : var(--md-typeset-font-size);
|
|
241
|
-
}
|
|
242
|
-
.md-nav .md-source {
|
|
243
|
-
display: none;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.md-sidebar--primary {
|
|
247
|
-
width: 10rem !important;
|
|
248
|
-
left: ${Ze?"242px":"72px"} !important;
|
|
249
|
-
}
|
|
250
|
-
.md-sidebar--secondary:not([hidden]) {
|
|
251
|
-
display: none;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.md-content {
|
|
255
|
-
max-width: calc(100% - 10rem);
|
|
256
|
-
margin-left: 10rem;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.md-footer {
|
|
260
|
-
position: static;
|
|
261
|
-
padding-left: 10rem;
|
|
262
|
-
}
|
|
263
|
-
.md-footer-nav__link {
|
|
264
|
-
/* footer links begin to overlap at small sizes without setting width */
|
|
265
|
-
width: 50%;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
@media screen and (max-width: 600px) {
|
|
270
|
-
.md-sidebar--primary {
|
|
271
|
-
left: 1rem !important;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
`}),je({css:`
|
|
275
|
-
.md-typeset {
|
|
276
|
-
font-size: var(--md-typeset-font-size);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
${nt.reduce((M,Y)=>{const te=P.typography[Y],{lineHeight:be,fontFamily:he,fontWeight:Fe,fontSize:De}=te,qe=_e=>{let Rt=1;return typeof _e=="number"&&(Rt=_e/16*.6),typeof _e=="string"&&(Rt=_e.replace("rem","")),`calc(${Rt} * var(--md-typeset-font-size))`};return M.concat(`
|
|
280
|
-
.md-typeset ${Y} {
|
|
281
|
-
color: var(--md-default-fg-color);
|
|
282
|
-
line-height: ${be};
|
|
283
|
-
font-family: ${he};
|
|
284
|
-
font-weight: ${Fe};
|
|
285
|
-
font-size: ${qe(De)};
|
|
286
|
-
}
|
|
287
|
-
`)},"")}
|
|
288
|
-
|
|
289
|
-
.md-typeset .md-content__button {
|
|
290
|
-
color: var(--md-default-fg-color);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.md-typeset hr {
|
|
294
|
-
border-bottom: 0.05rem dotted ${P.palette.divider};
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.md-typeset details {
|
|
298
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
299
|
-
}
|
|
300
|
-
.md-typeset details summary {
|
|
301
|
-
padding-left: 2.5rem !important;
|
|
302
|
-
}
|
|
303
|
-
.md-typeset details summary:before,
|
|
304
|
-
.md-typeset details summary:after {
|
|
305
|
-
top: 50% !important;
|
|
306
|
-
width: 20px !important;
|
|
307
|
-
height: 20px !important;
|
|
308
|
-
transform: rotate(0deg) translateY(-50%) !important;
|
|
309
|
-
}
|
|
310
|
-
.md-typeset details[open] > summary:after {
|
|
311
|
-
transform: rotate(90deg) translateX(-50%) !important;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.md-typeset blockquote {
|
|
315
|
-
color: var(--md-default-fg-color--light);
|
|
316
|
-
border-left: 0.2rem solid var(--md-default-fg-color--light);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
.md-typeset table:not([class]) {
|
|
320
|
-
font-size: var(--md-typeset-font-size);
|
|
321
|
-
border: 1px solid var(--md-default-fg-color);
|
|
322
|
-
border-bottom: none;
|
|
323
|
-
border-collapse: collapse;
|
|
324
|
-
}
|
|
325
|
-
.md-typeset table:not([class]) th {
|
|
326
|
-
font-weight: bold;
|
|
327
|
-
}
|
|
328
|
-
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
329
|
-
border-bottom: 1px solid var(--md-default-fg-color);
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
333
|
-
background-color: hsla(0, 0%, 0%, 0.32);
|
|
334
|
-
}
|
|
335
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
336
|
-
background-color: hsla(0, 0%, 0%, 0.87);
|
|
337
|
-
}
|
|
338
|
-
`}),je({css:`
|
|
339
|
-
/*
|
|
340
|
-
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
341
|
-
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
342
|
-
*/
|
|
343
|
-
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
344
|
-
transition: none;
|
|
345
|
-
}
|
|
346
|
-
`}),je({css:`
|
|
347
|
-
/* HIGHLIGHT */
|
|
348
|
-
.highlight .md-clipboard:after {
|
|
349
|
-
content: unset;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
.highlight .nx {
|
|
353
|
-
color: ${xe?"#ff53a3":"#ec407a"};
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
/* CODE HILITE */
|
|
357
|
-
.codehilite .gd {
|
|
358
|
-
background-color: ${xe?"rgba(248,81,73,0.65)":"#fdd"};
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.codehilite .gi {
|
|
362
|
-
background-color: ${xe?"rgba(46,160,67,0.65)":"#dfd"};
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/* TABBED */
|
|
366
|
-
.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
|
|
367
|
-
.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
|
|
368
|
-
.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
|
|
369
|
-
.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
|
|
370
|
-
.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
|
|
371
|
-
.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
|
|
372
|
-
.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
|
|
373
|
-
.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
|
|
374
|
-
.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
|
|
375
|
-
.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
|
|
376
|
-
.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
|
|
377
|
-
.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
|
|
378
|
-
.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
|
|
379
|
-
.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
|
|
380
|
-
.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
|
|
381
|
-
.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
|
|
382
|
-
.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
|
|
383
|
-
.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
|
|
384
|
-
.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
|
|
385
|
-
.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
|
|
386
|
-
color: var(--md-accent-fg-color);
|
|
387
|
-
border-color: var(--md-accent-fg-color);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
/* TASK-LIST */
|
|
391
|
-
.task-list-control .task-list-indicator::before {
|
|
392
|
-
background-color: ${P.palette.action.disabledBackground};
|
|
393
|
-
}
|
|
394
|
-
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
395
|
-
background-color: ${P.palette.success.main};
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
/* ADMONITION */
|
|
399
|
-
.admonition {
|
|
400
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
401
|
-
}
|
|
402
|
-
.admonition .admonition-title {
|
|
403
|
-
padding-left: 2.5rem !important;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
.admonition .admonition-title:before {
|
|
407
|
-
top: 50% !important;
|
|
408
|
-
width: 20px !important;
|
|
409
|
-
height: 20px !important;
|
|
410
|
-
transform: translateY(-50%) !important;
|
|
411
|
-
}
|
|
412
|
-
`})]),[ve,Me,ye,W,ne,K,P,xe,Ze]),We=(0,a.useCallback)(async w=>Bt(w,[Et(),ee(),j({baseUrl:window.location.origin,onClick:(E,M)=>{var be,he;const Y=E.ctrlKey||E.metaKey,te=new URL(M);te.hash?Y?window.open(`${te.pathname}${te.hash}`,"_blank"):(R(`${te.pathname}${te.hash}`),(be=w==null?void 0:w.querySelector(`#${te.hash.slice(1)}`))==null||be.scrollIntoView()):Y?window.open(te.pathname,"_blank"):(R(te.pathname),(he=w==null?void 0:w.querySelector(".md-content__inner"))==null||he.scrollIntoView())}}),Ae({docStorageUrl:await K.getApiOrigin(),onLoading:E=>{E.style.setProperty("opacity","0")},onLoaded:E=>{var M;E.style.removeProperty("opacity"),(M=E.querySelector(".md-nav__title"))==null||M.removeAttribute("for"),lt(Array.from(E.querySelectorAll(".md-sidebar")))}})]),[R,K]);return(0,a.useEffect)(()=>{if(!pe)return()=>{};let w=!0;return ke(pe,Re).then(async E=>{if(!(E==null?void 0:E.innerHTML)||!w)return;window.scroll({top:0});const M=await We(E);le(M)}),()=>{w=!1}},[pe,Re,ke,We]),ze},it=({entityRef:B,onReady:R=()=>{},withSearch:P=!0})=>{var ve,Me;const K=Dt(),W=vt(B),ne=(0,a.useRef)(null),ye=(0,a.useRef)(R);return(0,a.useEffect)(()=>{ye.current=R},[R]),(0,a.useEffect)(()=>{if(!W||!ne.current)return;const Ne=ne.current,Re=Ne.shadowRoot||Ne.attachShadow({mode:"open"});Array.from(Re.children).forEach(pe=>Re.removeChild(pe)),Re.appendChild(W),ye.current()},[W]),a.createElement(a.Fragment,null,a.createElement(gt.N,null),P&&((Me=(ve=ne==null?void 0:ne.current)==null?void 0:ve.shadowRoot)==null?void 0:Me.innerHTML)&&a.createElement(i.Z,{container:!0,className:K.searchBar},a.createElement(Tt.S,{entityId:B})),a.createElement("div",{"data-testid":"techdocs-content-shadowroot",ref:ne}))},At=({entityRef:B,onReady:R=()=>{},withSearch:P=!0})=>a.createElement(et,{entityRef:B},a.createElement(it,{entityRef:B,onReady:R,withSearch:P}))},94252:function(_,s,e){"use strict";e.d(s,{T:function(){return f}});var a=e(2784),t=e(36964),c=e(9118);const f=({errorMessage:y})=>{const i=(0,t.useApi)(t.configApiRef).getOptionalString("techdocs.builder");let v="";return i!=="local"&&(v="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),a.createElement(c.ErrorPage,{status:"404",statusMessage:y||"Documentation not found",additionalInfo:v})}},31752:function(_,s,e){"use strict";e.r(s),e.d(s,{TechDocsPage:function(){return r}});var a=e(2784),t=e(10289),c=e(64279),f=e(3337),y=e(94252),i=e(36964),v=e(9118),p=e(80547),m=e(46025);const l=()=>{const[A,T]=(0,a.useState)(!1),{namespace:Z,kind:O,name:q}=(0,t.UO)(),$=(0,i.useApi)(f.g),{value:x}=(0,c.default)(()=>A?$.getTechDocsMetadata({kind:O,namespace:Z,name:q}):Promise.resolve(void 0),[O,Z,q,$,A]),{value:b,error:D}=(0,c.default)(()=>$.getEntityMetadata({kind:O,namespace:Z,name:q}),[O,Z,q,$]),j=(0,a.useCallback)(()=>{T(!0)},[T]);return D?a.createElement(y.T,{errorMessage:D.message}):a.createElement(v.Page,{themeId:"documentation"},a.createElement(m.n,{techDocsMetadata:x,entityMetadata:b,entityRef:{kind:O,namespace:Z,name:q}}),a.createElement(v.Content,{"data-testid":"techdocs-content"},a.createElement(p.Ej,{onReady:j,entityRef:{kind:O,namespace:Z,name:q}})))},r=({children:A})=>{const{NotFoundErrorPage:T}=(0,i.useApp)().getComponents(),Z=(0,t.pC)(),[O,q]=(0,a.useState)(!1),{namespace:$,kind:x,name:b}=(0,t.UO)(),D=(0,i.useApi)(f.g),{value:j}=(0,c.default)(()=>O?D.getTechDocsMetadata({kind:x,namespace:$,name:b}):Promise.resolve(void 0),[x,$,b,D,O]),{value:ee,error:ce}=(0,c.default)(()=>D.getEntityMetadata({kind:x,namespace:$,name:b}),[x,$,b,D]),Ee=(0,a.useCallback)(()=>{q(!0)},[q]);return ce?a.createElement(T,null):A?a.createElement(v.Page,{themeId:"documentation"},A instanceof Function?A({techdocsMetadataValue:j,entityMetadataValue:ee,entityRef:{kind:x,namespace:$,name:b},onReady:Ee}):A):Z||a.createElement(l,null)}},46025:function(_,s,e){"use strict";e.d(s,{n:function(){return p}});var a=e(2784),t=e(73250),c=e(36964),f=e(9118),y=e(41564),i=e(31423),v=e(68725);const p=({entityRef:m,entityMetadata:l,techDocsMetadata:r,children:A})=>{const{name:T}=m,{site_name:Z,site_description:O}=r||{},{locationMetadata:q,spec:$}=l||{},x=$==null?void 0:$.lifecycle,b=l?(0,i.getEntityRelations)(l,y.S4):[],D=(0,c.useRouteRef)(v._Z)(),j=a.createElement(a.Fragment,null,a.createElement(f.HeaderLabel,{label:"Component",value:a.createElement(i.EntityRefLink,{color:"inherit",entityRef:m,defaultKind:"Component"})}),b.length>0&&a.createElement(f.HeaderLabel,{label:"Owner",value:a.createElement(i.EntityRefLinks,{color:"inherit",entityRefs:b,defaultKind:"group"})}),x?a.createElement(f.HeaderLabel,{label:"Lifecycle",value:x}):null,q&&q.type!=="dir"&&q.type!=="file"?a.createElement(f.HeaderLabel,{label:"",value:a.createElement("a",{href:q.target,target:"_blank",rel:"noopener noreferrer"},a.createElement(t.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return a.createElement(f.Header,{title:Z||".",pageTitleOverride:Z||T,subtitle:O&&O!=="None"?O:"",type:"Docs",typeLink:D},j,A)}},82957:function(_,s,e){"use strict";e.d(s,{S:function(){return ze}});var a=e(91512),t=e(2784),c=e(79692);const f=(0,c.Z)(le=>({filters:{width:"250px",display:"flex"},icon:{margin:le.spacing(-1,0,0,0)}})),y=({numberOfSelectedFilters:le,handleToggleFilters:Ze})=>{const Ke=f();return React.createElement("div",{className:Ke.filters},React.createElement(IconButton,{className:Ke.icon,"aria-label":"settings",onClick:Ze},React.createElement(FilterListIcon,null)),React.createElement(Typography,{variant:"h6"},"Filters (",le||0,")"))},i=(0,c.Z)(le=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:le.spacing(0,1,0,1)},dropdown:{width:"100%"}})),v=({filters:le,filterOptions:Ze,resetFilters:Ke,updateSelected:Xe,updateChecked:ke})=>{const We=i();return React.createElement(Card,{className:We.filters},React.createElement(CardHeader,{title:React.createElement(Typography,{variant:"h6"},"Filters"),action:React.createElement(Button,{color:"primary",onClick:()=>Ke()},"CLEAR ALL")}),React.createElement(Divider,null),Ze.kind.length===0&&Ze.lifecycle.length===0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Filters cannot be applied to available results")),Ze.kind.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Kind"),React.createElement(Select,{id:"outlined-select",onChange:w=>{var E;return Xe((E=w==null?void 0:w.target)==null?void 0:E.value)},variant:"outlined",className:We.dropdown,value:le.selected},Ze.kind.map(w=>React.createElement(MenuItem,{selected:w==="",dense:!0,key:w,value:w},w)))),Ze.lifecycle.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Lifecycle"),React.createElement(List,{disablePadding:!0,dense:!0},Ze.lifecycle.map(w=>React.createElement(ListItem,{key:w,dense:!0,button:!0,onClick:()=>ke(w)},React.createElement(Checkbox,{edge:"start",disableRipple:!0,className:We.checkbox,color:"primary",checked:le.checked.includes(w),tabIndex:-1,value:w,name:w}),React.createElement(ListItemText,{id:w,primary:w}))))))};var p=e(1795),m=e(22313),l=e(42494),r=e(84899),A=e(5806),T=e(21324),Z=e(56939),O=e(73698),q=e(12231),$=e(86619),x=e(7089),b=e(88013),D=e(69294),j=e(48760);const ee=(le,Ze,Ke=[],Xe=250)=>{const ke=(0,t.useRef)({}),We=le||(()=>Promise.resolve([])),[w,E]=(0,D.default)(We,[Ze],{loading:!0});if((0,j.Z)(()=>{ke.current[Ze]===void 0&&(ke.current[Ze]=E(Ze).then(Y=>(ke.current[Ze]=Y,Y)))},Xe,[E,Ze]),Ke.length)return{loading:!1,value:Ke};const M=ke.current[Ze];return Array.isArray(M)?{loading:!1,value:M}:w},ce=(le,Ze)=>{const{setFilters:Ke}=(0,m.Rx)();(0,t.useEffect)(()=>{Ze&&[Ze].flat().length>0&&Ke(Xe=>({...Xe,[le]:Ze}))},[])},Ee=le=>{const{className:Ze,defaultValue:Ke,name:Xe,values:ke,valuesDebounceMs:We,label:w,filterSelectedOptions:E,limitTags:M,multiple:Y}=le,[te,be]=(0,t.useState)("");ce(Xe,Ke);const he=typeof ke=="function"?ke:void 0,Fe=typeof ke=="function"?void 0:ke,{value:De,loading:qe}=ee(he,te,Fe,We),{filters:_e,setFilters:Rt}=(0,m.Rx)(),ue=_e[Xe]||(Y?[]:null),V=($e,Ve)=>{Rt(st=>{const{[Xe]:mt,...$t}=st;return Ve?{...$t,[Xe]:Ve}:{...$t}})},se=$e=>t.createElement($.Z,{...$e,name:"search",variant:"outlined",label:w,fullWidth:!0}),Te=($e,Ve)=>$e.map((st,mt)=>t.createElement(x.Z,{label:st,color:"primary",...Ve({index:mt})}));return t.createElement(b.ZP,{filterSelectedOptions:E,limitTags:M,multiple:Y,className:Ze,id:`${Y?"multi-":""}select-filter-${Xe}--select`,options:De||[],loading:qe,value:ue,onChange:V,onInputChange:($e,Ve)=>be(Ve),renderInput:se,renderTags:Te})},Ae=(0,c.Z)({label:{textTransform:"capitalize"}}),Oe=le=>{const{className:Ze,defaultValue:Ke,label:Xe,name:ke,values:We=[],valuesDebounceMs:w}=le,E=Ae(),{filters:M,setFilters:Y}=(0,m.Rx)();ce(ke,Ke);const te=typeof We=="function"?We:void 0,be=typeof We=="function"?void 0:We,{value:he=[],loading:Fe}=ee(te,"",be,w),De=qe=>{const{target:{value:_e,checked:Rt}}=qe;Y(ue=>{const{[ke]:V,...se}=ue,Te=(V||[]).filter(Ve=>Ve!==_e),$e=Rt?[...Te,_e]:Te;return $e.length?{...se,[ke]:$e}:se})};return t.createElement(l.Z,{className:Ze,disabled:Fe,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},Xe?t.createElement(r.Z,{className:E.label},Xe):null,he.map(qe=>{var _e;return t.createElement(A.Z,{key:qe,control:t.createElement(T.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":qe},value:qe,name:qe,onChange:De,checked:((_e=M[ke])!=null?_e:[]).includes(qe)}),label:qe})}))},ge=le=>{const{className:Ze,defaultValue:Ke,label:Xe,name:ke,values:We,valuesDebounceMs:w}=le,E=Ae();ce(ke,Ke);const M=typeof We=="function"?We:void 0,Y=typeof We=="function"?void 0:We,{value:te=[],loading:be}=ee(M,"",Y,w),{filters:he,setFilters:Fe}=(0,m.Rx)(),De=qe=>{const{target:{value:_e}}=qe;Fe(Rt=>{const{[ke]:ue,...V}=Rt;return _e?{...V,[ke]:_e}:V})};return t.createElement(l.Z,{disabled:be,className:Ze,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},Xe?t.createElement(Z.Z,{className:E.label,margin:"dense"},Xe):null,t.createElement(O.Z,{variant:"outlined",value:he[ke]||"",onChange:De},t.createElement(q.Z,{value:""},t.createElement("em",null,"All")),te.map(qe=>t.createElement(q.Z,{key:qe,value:qe},qe))))},Ge=({component:le,...Ze})=>t.createElement(le,{...Ze});Ge.Checkbox=le=>t.createElement(Ge,{...le,component:Oe}),Ge.Select=le=>t.createElement(Ge,{...le,component:ge}),Ge.Autocomplete=le=>t.createElement(Ge,{...le,component:Ee});const Qe=null;var Ue=e(73032),we=e(3992),tt=e(8542),dt=e(49378),je=e(62155),Et=e(94339),Bt=e(32552),Tt=e(24579),gt=e(27616),yt=e(8284),rt=e(70660),pt=e(11776),Pt=e(85256),xt=e(38402),Dt=e(86136),bt=e(38016),et=e(56881);const Ce=(0,c.Z)(le=>({card:{backgroundColor:"rgba(0, 0, 0, .11)"},cardContent:{paddingTop:le.spacing(1)},icon:{color:le.palette.common.black},list:{width:"100%"},listItemIcon:{width:"24px",height:"24px"},accordion:{backgroundColor:le.palette.background.paper},accordionSummary:{minHeight:"auto","&.Mui-expanded":{minHeight:"auto"}},accordionSummaryContent:{margin:le.spacing(2,0),"&.Mui-expanded":{margin:le.spacing(2,0)}},accordionDetails:{padding:le.spacing(0,0,1)}})),ot=le=>{const Ze=Ce(),{setPageCursor:Ke,setTypes:Xe,types:ke}=(0,m.Rx)(),[We,w]=(0,t.useState)(!0),{defaultValue:E,name:M,types:Y}=le,te=()=>w(De=>!De),be=De=>()=>{Xe(De!==""?[De]:[]),Ke(void 0),w(!1)};(0,t.useEffect)(()=>{E&&Xe([E])},[]);const he=[{value:"",name:"All",icon:t.createElement(et.Z,null)},...Y],Fe=ke[0]||"";return t.createElement(Et.Z,{className:Ze.card},t.createElement(Bt.Z,{title:M,titleTypographyProps:{variant:"overline"}}),t.createElement(Tt.Z,{className:Ze.cardContent},t.createElement(gt.Z,{className:Ze.accordion,expanded:We,onChange:te},t.createElement(yt.Z,{classes:{root:Ze.accordionSummary,content:Ze.accordionSummaryContent},expandIcon:t.createElement(bt.Z,{className:Ze.icon}),IconButtonProps:{size:"small"}},We?"Collapse":he.filter(De=>De.value===Fe)[0].name),t.createElement(rt.Z,{classes:{root:Ze.accordionDetails}},t.createElement(pt.Z,{className:Ze.list,component:"nav","aria-label":"filter by type",disablePadding:!0,dense:!0},he.map(De=>t.createElement(t.Fragment,{key:De.value},t.createElement(Pt.Z,null),t.createElement(xt.Z,{selected:ke[0]===De.value||ke.length===0&&De.value==="",onClick:be(De.value),button:!0},t.createElement(Dt.Z,null,(0,t.cloneElement)(De.icon,{className:Ze.listItemIcon})),t.createElement(dt.Z,{primary:De.name})))))))))};var nt=e(99152),vt=e(6487);const it=(0,c.Z)(le=>({tabs:{borderBottom:`1px solid ${le.palette.textVerySubtle}`,padding:le.spacing(0,4)},tab:{height:"50px",fontWeight:le.typography.fontWeightBold,fontSize:le.typography.pxToRem(13),color:le.palette.textSubtle,minWidth:"130px"}})),At=le=>{const Ze=it(),{setPageCursor:Ke,setTypes:Xe,types:ke}=(0,m.Rx)(),{defaultValue:We,types:w}=le,E=(Y,te)=>{Xe(te!==""?[te]:[]),Ke(void 0)};(0,t.useEffect)(()=>{We&&Xe([We])},[]);const M=[{value:"",name:"All"},...w];return t.createElement(nt.Z,{className:Ze.tabs,indicatorColor:"primary",value:ke.length===0?"":ke[0],onChange:E},M.map(Y=>t.createElement(vt.Z,{className:Ze.tab,disableRipple:!0,label:Y.name,value:Y.value})))},B=(0,c.Z)(le=>({label:{textTransform:"capitalize"},chips:{display:"flex",flexWrap:"wrap",marginTop:le.spacing(1)},chip:{margin:2}})),R=le=>{const{className:Ze,defaultValue:Ke,name:Xe,values:ke=[]}=le,We=B(),{types:w,setTypes:E}=(0,m.Rx)();(0,je.Z)(()=>{w.length||(Ke&&Array.isArray(Ke)?E(Ke):Ke&&E([Ke]))});const M=Y=>{const te=Y.target.value;E(te)};return t.createElement(l.Z,{className:Ze,variant:"filled",fullWidth:!0,"data-testid":"search-typefilter-next"},t.createElement(Z.Z,{className:We.label,margin:"dense"},Xe),t.createElement(O.Z,{multiple:!0,variant:"outlined",value:w,onChange:M,placeholder:"All Results",renderValue:Y=>t.createElement("div",{className:We.chips},Y.map(te=>t.createElement(x.Z,{key:te,label:te,className:We.chip,size:"small"})))},ke.map(Y=>t.createElement(q.Z,{key:Y,value:Y},t.createElement(T.Z,{checked:w.indexOf(Y)>-1}),t.createElement(dt.Z,{primary:Y})))))};R.Accordion=le=>t.createElement(ot,{...le}),R.Tabs=le=>t.createElement(At,{...le});var P=e(19126),K=e(20863),W=e(36964),ne=e(9118);const ye=le=>{const Ze=useRouteRef(rootRouteRef),{focusContent:Ke}=useContent(),Xe=useNavigate(),ke=useCallback(We=>{const w=qs.stringify({query:We},{addQueryPrefix:!0});Ke(),Xe(`${Ze()}${w}`)},[Ke,Xe,Ze]);return React.createElement(SidebarSearchField,{icon:le.icon,onSearch:ke,to:"/search"})};var ve=e(50581),Me=e(61837),Ne=e(4614),Re=e(21853),pe=e(10289),xe=e(71226);const ft=(0,c.Z)({root:{width:"100%"}}),lt=({entityId:le,debounceTime:Ze=150})=>{const[Ke,Xe]=(0,t.useState)(!1),ke=(0,pe.s0)(),{term:We,setTerm:w,result:{loading:E,value:M}}=(0,m.Rx)(),Y=ft(),[te,be]=(0,t.useState)([]);(0,t.useEffect)(()=>{let _e=!0;if(_e&&M){const Rt=M.results.slice(0,10);be(Rt)}return()=>{_e=!1}},[E,M]);const[he,Fe]=(0,t.useState)(We);(0,j.Z)(()=>w(he),Ze,[he]);const De=_e=>{Ke||Xe(!0),Fe(_e.target.value)},qe=(_e,Rt)=>{if(Rt==null?void 0:Rt.document){const{location:ue}=Rt.document;ke(ue)}};return t.createElement(b.ZP,{classes:{root:Y.root},"data-testid":"techdocs-search-bar",size:"small",open:Ke,getOptionLabel:()=>"",filterOptions:_e=>_e,onClose:()=>{Xe(!1)},onFocus:()=>{Xe(!0)},onChange:qe,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:te,renderOption:({document:_e})=>t.createElement(xe.O,{result:_e,lineClamp:3,asListItem:!1,asLink:!1,title:_e.title}),loading:E,renderInput:_e=>t.createElement($.Z,{..._e,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${le.name} docs`,value:he,onChange:De,InputProps:{..._e.InputProps,startAdornment:t.createElement(ve.Z,{position:"start"},t.createElement(Me.Z,{"aria-label":"Query",disabled:!0},t.createElement(Re.Z,null))),endAdornment:t.createElement(t.Fragment,null,E?t.createElement(Ne.Z,{color:"inherit",size:20}):null,_e.InputProps.endAdornment)}})})},ze=le=>{const Ze={term:"",types:["techdocs"],pageCursor:"",filters:le.entityId};return t.createElement(m.Nd,{initialState:Ze},t.createElement(lt,{...le}))}},25921:function(_,s,e){"use strict";e.d(s,{N:function(){return b}});var a=e(2784),t=e(9118),c=e(79692),f=e(4614),y=e(77277),i=e(99688),v=e(12420),p=e(60905),m=e(90436),l=e(61837),r=e(4190),A=e(87685);const T=(0,c.Z)(D=>(0,v.Z)({paper:{width:"100%",[D.breakpoints.up("sm")]:{width:"75%"},[D.breakpoints.up("md")]:{width:"50%"},padding:D.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:D.palette.background.default}})),Z=({buildLog:D,onClose:j})=>{const ee=T(),ce=D.length===0?"Waiting for logs...":D.join(`
|
|
413
|
-
`);return a.createElement(p.Z,{container:!0,direction:"column",className:ee.root,spacing:0,wrap:"nowrap"},a.createElement(p.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},a.createElement(m.Z,{variant:"h5"},"Build Details"),a.createElement(l.Z,{key:"dismiss",title:"Close the drawer",onClick:j,color:"inherit"},a.createElement(A.Z,null))),a.createElement(t.LogViewer,{text:ce,classes:{root:ee.logs}}))},O=({buildLog:D})=>{const j=T(),[ee,ce]=(0,a.useState)(!1);return a.createElement(a.Fragment,null,a.createElement(y.Z,{color:"inherit",onClick:()=>ce(!0)},"Show Build Logs"),a.createElement(r.ZP,{classes:{paper:j.paper},anchor:"right",open:ee,onClose:()=>ce(!1)},a.createElement(Z,{buildLog:D,onClose:()=>ce(!1)})))};var q=e(94252),$=e(80547);const x=(0,c.Z)(D=>({root:{marginBottom:D.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),b=()=>{let D=null;const j=x(),{state:ee,contentReload:ce,contentErrorMessage:Ee,syncErrorMessage:Ae,buildLog:Oe}=(0,$.DK)(),ge=ee==="CHECKING"?a.createElement(t.Progress,null):null;return ee==="INITIAL_BUILD"&&(D=a.createElement(i.Z,{classes:{root:j.root},variant:"outlined",severity:"info",icon:a.createElement(f.Z,{size:"24px"}),action:a.createElement(O,{buildLog:Oe})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),ee==="CONTENT_STALE_REFRESHING"&&(D=a.createElement(i.Z,{variant:"outlined",severity:"info",icon:a.createElement(f.Z,{size:"24px"}),action:a.createElement(O,{buildLog:Oe}),classes:{root:j.root}},"A newer version of this documentation is being prepared and will be available shortly.")),ee==="CONTENT_STALE_READY"&&(D=a.createElement(i.Z,{variant:"outlined",severity:"success",action:a.createElement(y.Z,{color:"inherit",onClick:()=>ce()},"Refresh"),classes:{root:j.root}},"A newer version of this documentation is now available, please refresh to view.")),ee==="CONTENT_STALE_ERROR"&&(D=a.createElement(i.Z,{variant:"outlined",severity:"error",action:a.createElement(O,{buildLog:Oe}),classes:{root:j.root,message:j.message}},"Building a newer version of this documentation failed."," ",Ae)),ee==="CONTENT_NOT_FOUND"&&(D=a.createElement(a.Fragment,null,Ae&&a.createElement(i.Z,{variant:"outlined",severity:"error",action:a.createElement(O,{buildLog:Oe}),classes:{root:j.root,message:j.message}},"Building a newer version of this documentation failed."," ",Ae),a.createElement(q.T,{errorMessage:Ee}))),a.createElement(a.Fragment,null,ge,D)}},73873:function(_,s,e){"use strict";e.d(s,{Ej:function(){return a.Ej},EV:function(){return t.TechDocsPage},nN:function(){return c.n}});var a=e(80547),t=e(31752),c=e(46025),f=e(25921),y=e(82957)},68725:function(_,s,e){"use strict";e.d(s,{_Z:function(){return t},Fw:function(){return c},pd:function(){return f}});var a=e(36964);const t=(0,a.createRouteRef)({id:"techdocs:index-page"}),c=(0,a.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),f=(0,a.createRouteRef)({id:"techdocs:catalog-reader-view"})},19133:function(_,s,e){"use strict";_.exports=e.p+"static/createComponent.975d1e1e..svg"},86284:function(_,s,e){"use strict";_.exports=e.p+"static/missingAnnotation.67f79e98..svg"},3871:function(_,s,e){"use strict";_.exports=e.p+"static/noBuild.1715fa71..svg"},96465:function(_,s,e){"use strict";_.exports=e.p+"static/noInformation.4b426325..svg"},29788:function(_,s,e){"use strict";_.exports=e.p+"static/mic-drop.fe3ef4d0..svg"},53260:function(){}},function(_){var s=function(a){return _(_.s=a)};_.O(0,[2370,6202,9284,2126,7012,9035,5218,427,4736],function(){return s(88649),s(39971)});var e=_.O()}]);})();
|
|
414
|
-
|
|
415
|
-
//# sourceMappingURL=main.287af9cc.js.map
|