File: //opt/netdata/usr/local/share/netdata/web/v3/2041.05e3cf23213821b0187c.chunk.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"d59f3e13055072acb481db3c59603d296982e8b2"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5d0b0590-e570-4617-85c1-d65eb54206cc",e._sentryDebugIdIdentifier="sentry-dbid-5d0b0590-e570-4617-85c1-d65eb54206cc")}catch(e){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[2041],{29022(e,t,n){n.d(t,{A:()=>h});var l=n(38429),i=n(60908),o=n(12897),r=n.n(o),s=n(55042),a=n.n(s),c=new(r())({id:"partialFailureSvg",use:"partialFailureSvg-usage",viewBox:"0 0 348 348",content:'<symbol xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 348 348" id="partialFailureSvg"><path fill="#CCDDE8" d="M174 348c96.098 0 174-77.902 174-174C348 77.903 270.098 0 174 0 77.903 0 0 77.903 0 174c0 96.098 77.903 174 174 174" opacity=".3" /><path fill="#89B0C9" d="M174 290c73.178 0 132.5-1.119 132.5-2.5S247.178 285 174 285s-132.5 1.119-132.5 2.5S100.822 290 174 290" opacity=".3" /><path fill="#485D6B" d="M267 53H81v142h186z" /><path fill="#849FB2" d="M263 57H85v134h178z" /><path fill="#0A2437" d="M267 53h-96v142h96z" opacity=".1" /><path fill="#E6E7E8" d="M307.6 115h-267v67h267z" /><path fill="#485D6B" d="M169.619 173.99v-51h-83v51z" /><path fill="#33424D" d="M167.619 171.99v-47h-79v47z" /><path fill="#0A2437" d="M169.611 173.997v-51h-41.6v51z" opacity=".1" /><path fill="#D3D5D6" d="M307.6 182h-267v13h267z" /><path fill="#697784" d="M288.6 195h-229v48h229z" /><path fill="#0A2437" d="M288.6 195h-229v22h229z" opacity=".15" /><path fill="#E6E7E8" d="M59.6 195h-10v92h10z" /><path fill="#0A2437" d="M59.6 195h-10v10h10z" opacity=".15" /><path fill="#0A2437" d="M59.6 195h-5v92h5z" opacity=".05" /><path fill="#E6E7E8" d="M298.6 195h-10v92h10z" /><path fill="#0A2437" d="M298.6 195h-10v10h10z" opacity=".15" /><path fill="#0A2437" d="M298.6 195h-5v92h5z" opacity=".05" /><path fill="#485D6B" d="M261.619 173.99v-51h-83v51z" /><path fill="#33424D" d="M259.619 171.99v-47h-79v47z" /><path fill="#0A2437" d="M261.611 173.997v-51h-41.6v51z" opacity=".1" /><path fill="#93A6B9" d="M55.6 127v20c0 .5-.4 1-1 1h-5c-.5 0-1-.4-1-1v-20c0-.5.4-1 1-1h5c.6 0 1 .4 1 1" /><path fill="#677F8E" d="M50.6 143.5v-13c0-.8.7-1.5 1.5-1.5s1.5.7 1.5 1.5v13c0 .8-.7 1.5-1.5 1.5s-1.5-.7-1.5-1.5" /><path fill="#00AB44" d="M56.6 132.4v1.2c0 .6-.4 1.2-1 1.3-.1 0-.3.1-.4.1H49c-.1 0-.3 0-.4-.1-.6-.2-1-.7-1-1.3v-1.2c0-.6.4-1.2 1-1.3.1 0 .3-.1.4-.1h6.2c.1 0 .3 0 .4.1.6.1 1 .7 1 1.3" /><path fill="#0A2437" d="M56.6 136.4v1.2c0 .6-.4 1.2-1 1.3-.1 0-.3.1-.4.1H49c-.1 0-.3 0-.4-.1-.6-.2-1-.7-1-1.3v-1.2c0-.6.4-1.2 1-1.3.1 0 .3-.1.4-.1h6.2c.1 0 .3 0 .4.1.6.1 1 .7 1 1.3" opacity=".1" /><path fill="#0A2437" d="M56.6 132.6v1c0 .6-.4 1.2-1 1.3-.1 0-.3.1-.4.1H49c-.1 0-.3 0-.4-.1-.6-.2-1-.7-1-1.3v-1c0 .1 0 .3.1.4.1.5.5.8.9.9.1 0 .3.1.4.1h6.2c.1 0 .3 0 .4-.1.5-.1.8-.5.9-.9.1-.1.1-.3.1-.4" opacity=".05" /><path fill="#24B75E" d="M56.6 132.4v1c0-.1 0-.3-.1-.4-.1-.5-.5-.8-.9-.9-.1 0-.3-.1-.4-.1H49c-.1 0-.3 0-.4.1-.5.1-.8.5-.9.9 0 .1-.1.3-.1.4v-1c0-.6.4-1.2 1-1.3.1 0 .3-.1.4-.1h6.2c.1 0 .3 0 .4.1.6.1 1 .7 1 1.3" /><path fill="#0A2437" d="M56.6 132.4v1.2c0 .6-.4 1.2-1 1.3V147c0 .5-.4 1-1 1h-2v-22h2c.5 0 1 .4 1 1v4.1c.6.1 1 .7 1 1.3" opacity=".1" /><path fill="#93A6B9" d="M66.6 134v13c0 .5-.4 1-1 1h-5c-.5 0-1-.4-1-1v-20c0-.5.4-1 1-1h5.1c.6.1.9 1.2.9 8" /><path fill="#677F8E" d="M61.6 143.5v-13c0-.8.7-1.5 1.5-1.5s1.5.7 1.5 1.5v13c0 .8-.7 1.5-1.5 1.5s-1.5-.7-1.5-1.5" /><path fill="#00AB44" d="M67.6 139.4v1.2c0 .6-.4 1.2-1 1.3-.1 0-.3.1-.4.1H60c-.1 0-.3 0-.4-.1-.6-.2-1-.7-1-1.3v-1.2c0-.6.4-1.2 1-1.3.1 0 .3-.1.4-.1h6.2c.1 0 .3 0 .4.1.6.1 1 .7 1 1.3" /><path fill="#0A2437" d="M67.6 143.4v1.2c0 .6-.4 1.2-1 1.3-.1 0-.3.1-.4.1H60c-.1 0-.3 0-.4-.1-.6-.2-1-.7-1-1.3v-1.2c0-.6.4-1.2 1-1.3.1 0 .3-.1.4-.1h6.2c.1 0 .3 0 .4.1.6.1 1 .7 1 1.3" opacity=".1" /><path fill="#0A2437" d="M67.6 139.6v1c0 .6-.4 1.2-1 1.3-.1 0-.3.1-.4.1H60c-.1 0-.3 0-.4-.1-.6-.2-1-.7-1-1.3v-1c0 .1 0 .3.1.4.1.5.5.8.9.9.1 0 .3.1.4.1h6.2c.1 0 .3 0 .4-.1.5-.1.8-.5.9-.9.1-.1.1-.3.1-.4" opacity=".05" /><path fill="#24B75E" d="M67.6 139.4v1c0-.1 0-.3-.1-.4-.1-.5-.5-.8-.9-.9-.1 0-.3-.1-.4-.1H60c-.1 0-.3 0-.4.1-.5.1-.8.5-.9.9 0 .1-.1.3-.1.4v-1c0-.6.4-1.2 1-1.3.1 0 .3-.1.4-.1h6.2c.1 0 .3 0 .4.1.6.1 1 .7 1 1.3" /><path fill="#0A2437" d="M67.6 139.4v1.2c0 .6-.4 1.2-1 1.3v5.1c0 .5-.4 1-1 1h-2v-22h2.1c.5.1.8.5.8 1v11.1c.7.1 1.1.7 1.1 1.3" opacity=".1" /><path fill="#677F8E" d="M78.6 139.9v7.2c0 .5-.4.9-.9.9h-7.2c-.5 0-.9-.4-.9-.9v-7.2c0-.5.4-.9.9-.9h7.2c.5 0 .9.4.9.9" /><path fill="#485D6B" d="M74.1 147a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7" /><path fill="#FF4136" d="M74.1 146a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5" /><path fill="#0A2437" d="M78.6 139.9v7.2c0 .5-.4.9-.9.9h-3.1v-9h3.1c.5 0 .9.4.9.9" opacity=".1" /><path fill="#677F8E" d="M78.6 126.9v6.1c0 .5-.4.9-.9.9h-7.1c-.5 0-.9-.4-.9-.9v-6.1c0-.5.4-.9.9-.9h7.1c.5 0 .9.4.9.9" /><path fill="#00AB44" d="M71.6 131a1 1 0 1 0 0-2 1 1 0 0 0 0 2" /><path fill="#FF4136" d="M74.1 131a1 1 0 1 0 0-2 1 1 0 0 0 0 2" /><path fill="#00AB44" d="M76.6 131a1 1 0 1 0 0-2 1 1 0 0 0 0 2" /><path fill="#0A2437" d="M78.6 126.9v6.1c0 .5-.4.9-.9.9h-3.1v-8h3.1c.5.1.9.5.9 1" opacity=".1" /><path fill="#485D6B" d="M78.6 156.6v11.8c0 .9-.7 1.6-1.6 1.6H50.2c-.9 0-1.6-.7-1.6-1.6v-11.8c0-.9.7-1.6 1.6-1.6H77c.9 0 1.6.7 1.6 1.6" /><path fill="#80A4BF" d="M54.6 166h-4v2h4zM57.6 166h-2v2h2zM68.6 166h-10v2h10zM71.6 166h-2v2h2zM76.6 166h-4v2h4zM52.6 163h-2v2h2zM55.6 163h-2v2h2zM58.6 163h-2v2h2zM61.6 163h-2v2h2zM64.6 163h-2v2h2zM67.6 163h-2v2h2zM70.6 163h-2v2h2zM73.6 163h-2v2h2zM76.6 163h-2v2h2zM53.6 160h-3v2h3zM56.6 160h-2v2h2zM59.6 160h-2v2h2zM62.6 160h-2v2h2zM65.6 160h-2v2h2zM68.6 160h-2v2h2zM71.6 160h-2v2h2zM76.6 160h-4v2h4zM52.6 157h-2v2h2zM55.6 157h-2v2h2zM58.6 157h-2v2h2zM61.6 157h-2v2h2zM64.6 157h-2v2h2zM67.6 157h-2v2h2zM70.6 157h-2v2h2zM73.6 157h-2v2h2zM76.6 157h-2v2h2z" /><path fill="#0A2437" d="M78.6 156.6v11.8c0 .9-.7 1.6-1.6 1.6H63.6v-15H77c.9 0 1.6.7 1.6 1.6" opacity=".1" /><path fill="#485D6B" d="M269.6 142.1v-16.2c0-1.6 1.3-2.9 2.9-2.9h24.2c1.6 0 2.9 1.3 2.9 2.9v16.2c0 1.6-1.3 2.9-2.9 2.9h-24.2c-1.6 0-2.9-1.3-2.9-2.9" /><path fill="#485D6B" d="M286.6 136h-17v6.1c0 1.6 1.3 2.9 2.9 2.9h14.1z" /><path fill="#93A6B9" d="M277.6 139a5 5 0 1 0-.001-10.001A5 5 0 0 0 277.6 139" /><path fill="#E6E7E8" d="m273.7 138.7-1.1-1.2c-.4-.5-.4-1.2.1-1.6l7.8-6c.4-.3 1.1-.3 1.5.1s.4 1.1 0 1.5l-6.7 7.2c-.4.4-1.1.4-1.6 0" /><path fill="#485D6B" d="M299.6 136h-16v9h13.1c1.6 0 2.9-1.3 2.9-2.9z" /><path fill="#93A6B9" d="M291.6 139a5 5 0 1 0-.001-10.001A5 5 0 0 0 291.6 139" /><path fill="#E6E7E8" d="m287.7 138.7-1.1-1.2c-.4-.5-.4-1.2.1-1.6l7.8-6c.4-.3 1.1-.3 1.5.1s.4 1.1 0 1.5l-6.7 7.2c-.4.4-1.1.4-1.6 0" /><path fill="#5AB948" d="M272.6 127a1 1 0 1 0 0-2 1 1 0 0 0 0 2M287.6 127a1 1 0 1 0 0-2 1 1 0 0 0 0 2" /><path fill="#0A2437" d="M284.6 145v-22h12.1c1.6 0 2.9 1.3 2.9 2.9v16.2c0 1.6-1.3 2.9-2.9 2.9z" opacity=".1" /><path fill="#485D6B" d="M299.619 173.99v-22h-30v22z" /><path fill="#385062" d="M275.6 157h-2v15h2z" /><path fill="#E6E7E8" d="M276.6 163h-4v3h4z" /><path fill="#0A2437" d="M276.6 166h-4v3h4zM276.6 165h-4v1h4z" opacity=".1" /><path fill="#5B788C" d="M278.6 171h-2v1h2zM278.6 169h-2v1h2zM278.6 167h-2v1h2zM278.6 165h-2v1h2zM278.6 163h-2v1h2zM278.6 161h-2v1h2zM278.6 159h-2v1h2zM278.6 157h-2v1h2z" /><path fill="#385062" d="M284.6 157h-2v15h2z" /><path fill="#E6E7E8" d="M285.6 159h-4v3h4z" /><path fill="#0A2437" d="M285.6 162h-4v3h4zM285.6 161h-4v1h4z" opacity=".1" /><path fill="#5B788C" d="M287.6 171h-2v1h2zM287.6 169h-2v1h2zM287.6 167h-2v1h2zM287.6 165h-2v1h2zM287.6 163h-2v1h2zM287.6 161h-2v1h2zM287.6 159h-2v1h2zM287.6 157h-2v1h2z" /><path fill="#385062" d="M293.6 157h-2v15h2z" /><path fill="#E6E7E8" d="M294.6 167h-4v3h4z" /><path fill="#0A2437" d="M294.6 170h-4v3h4zM294.6 169h-4v1h4z" opacity=".1" /><path fill="#5B788C" d="M296.6 171h-2v1h2zM296.6 169h-2v1h2zM296.6 167h-2v1h2zM296.6 165h-2v1h2zM296.6 163h-2v1h2zM296.6 161h-2v1h2zM296.6 159h-2v1h2zM296.6 157h-2v1h2z" /><path fill="#5AB948" d="M274.6 156a1 1 0 1 0 0-2 1 1 0 0 0 0 2M283.6 156a1 1 0 1 0 0-2 1 1 0 0 0 0 2" /><path fill="#FF4136" d="M292.6 156a1 1 0 1 0 0-2 1 1 0 0 0 0 2" /><path fill="#0A2437" d="M299.619 173.99v-22h-16v22z" opacity=".1" /><path fill="#D3D5D6" d="M64.6 73h-2v42h2z" /><path fill="#D3D5D6" d="M74.6 74h-22v2h22z" /><path fill="#0A2437" d="M64.6 79v23.5l-1-.5-1 .5V79z" opacity=".15" /><path fill="#C7C8C9" d="M74.6 75h-22v1h22z" /><path fill="#00AB44" d="M73.6 76v28l-10-5-7.5 3.7-.9.5-1.6.8V76z" /><path fill="#fff" d="M64.6 92h-2l-4-8h6c2.2 0 4 1.8 4 4s-1.8 4-4 4" /><path fill="#D3D5D6" d="M71.6 112h-16v3h16z" /><path fill="#C7C8C9" d="M71.6 114h-16v1h16z" /><path fill="#0A2437" d="M63.6 115V73h1v1h10v2h-1v28l-9-4.5V112h7v3z" opacity=".15" /><path fill="#DADCDD" d="m136.7 206.6-12.6-10.1c-6-4.8-9.4-11.9-9.4-19.6V168h4v8.9c0 6.5 2.9 12.5 7.9 16.5l12.6 10.1z" /><path fill="#0A2437" d="m137.7 202.3-1 1.3-12.6-10.1c-6-4.8-9.4-11.9-9.4-19.6v3c0 7.7 3.4 14.8 9.4 19.6l12.6 10.1 2.5-3.1z" opacity=".05" /><path fill="#00AB44" d="M123.1 171h-13c-1.4 0-2.5-1.1-2.5-2.5v-1c0-1.4 1.1-2.5 2.5-2.5h13c1.4 0 2.5 1.1 2.5 2.5v1c0 1.4-1.1 2.5-2.5 2.5" /><path fill="#0A2437" d="M125.1 169h-17.4c.2 1.2 1.2 2 2.4 2h13c1.2 0 2.2-.9 2.4-2z" opacity=".2" /><path fill="#36BD6B" d="M123.1 165h-13c-1.4 0-2.5 1.1-2.5 2.5v1c0-1.4 1.1-2.5 2.5-2.5h13c1.4 0 2.5 1.1 2.5 2.5v-1c0-1.4-1.1-2.5-2.5-2.5" /><path fill="#DADCDD" d="M226.6 168v8.9c0 7.7-3.4 14.8-9.5 19.6l-9.7 7.7-1 .8-1.9 1.6-2.5-3.1 1.5-1.2 4.1-3.2 7.1-5.6c5-4 7.9-10 7.9-16.5v-9z" /><path fill="#0A2437" d="M226.6 173.9v3c0 7.7-3.4 14.8-9.5 19.6l-9.7 7.7-1 .8-1.9 1.6-2.5-3.1 1.5-1.2 1 1.3 3-2.4 9.5-7.6c6.2-4.9 9.6-12 9.6-19.7" opacity=".05" /><path fill="#00AB44" d="M233.6 167.5v1.5c0 .1-.1.2-.1.4v.1c0 .1-.1.2-.1.3-.1.3-.4.5-.6.7-.1 0-.1.1-.2.1-.4.3-.9.4-1.4.4h-13c-.5 0-1-.2-1.4-.4-.1 0-.1-.1-.2-.1-.2-.2-.4-.4-.6-.7 0-.1-.1-.2-.1-.3v-.1c-.1-.1-.1-.2-.1-.4v-1.5c0-1.4 1.1-2.5 2.5-2.5h13c1.2 0 2.3 1.1 2.3 2.5" /><path fill="#0A2437" d="M233.6 169c0 .2-.1.3-.1.4v.1c0 .1-.1.2-.1.3-.1.3-.4.5-.6.7-.1 0-.1.1-.2.1-.4.3-.9.4-1.4.4h-13c-.5 0-1-.2-1.4-.4-.1 0-.1-.1-.2-.1-.2-.2-.4-.4-.6-.7 0-.1-.1-.2-.1-.3v-.1c-.1-.1-.1-.2-.1-.4h17.8" opacity=".2" /><path fill="#36BD6B" d="M233.6 167.5v1c0-1.4-1.1-2.5-2.5-2.5h-13c-1.4 0-2.5 1.1-2.5 2.5v-1c0-1.4 1.1-2.5 2.5-2.5h13c1.4 0 2.5 1.1 2.5 2.5" /><path fill="#485D6B" d="M174.6 218h-8v15h8zM176.6 235.6V250h-12v-14.4c0-1.4 1.2-2.6 2.6-2.6h6.7c1.5 0 2.7 1.2 2.7 2.6" /><path fill="#506C80" d="M183.6 211v1.6c0 .5 0 .9-.2 1.4 0 .1-.1.3-.1.4s-.1.3-.1.4-.1.2-.1.4c-.1.3-.3.5-.4.8-.1.1-.1.2-.2.4-.2.2-.3.4-.5.6-1.2 1.2-2.8 2-4.6 2H164c-1.8 0-3.5-.8-4.6-2-.2-.2-.4-.4-.5-.6-.1-.1-.2-.2-.2-.4-.2-.2-.3-.5-.4-.8-.1-.1-.1-.2-.1-.4-.1-.1-.1-.3-.1-.4s-.1-.3-.1-.4c-.1-.5-.2-.9-.2-1.4V211z" /><path fill="#0A2437" d="M183.5 214c0 .1-.1.3-.1.4s-.1.3-.1.4-.1.2-.1.4c-.1.3-.3.5-.4.8-.1.1-.1.2-.2.4-.2.2-.3.4-.5.6h-22.5c-.2-.2-.4-.4-.5-.6-.1-.1-.2-.2-.2-.4-.2-.2-.3-.5-.4-.8-.1-.1-.1-.2-.1-.4-.1-.1-.1-.3-.1-.4s-.1-.3-.1-.4z" opacity=".2" /><path fill="#384A57" d="M187.6 204v6c0 .7-.2 1.3-.5 1.9-.7 1.2-2 2.1-3.5 2.1h-26.1c-1.5 0-2.8-.8-3.5-2.1-.3-.6-.5-1.2-.5-1.9v-6z" /><path fill="#00AB44" d="M207.6 199.3v3.6c0 .5 0 .9-.1 1.4 0 .3-.1.5-.2.8-.2.7-.6 1.4-1 2q-1.35 1.8-3.6 2.4c-5.1 1.4-10.3 2.3-15.6 2.5-1 0-2 .1-2.9.1H157c-1 0-2 0-2.9-.1-2.1-.1-4.3-.3-6.4-.6-3.1-.4-6.1-1.1-9.2-1.9-2.2-.6-3.9-2.3-4.6-4.4-.1-.2-.1-.5-.2-.8-.1-.4-.1-.9-.1-1.4V199c.1-1.8 1.5-3.2 3.2-3.4l4.2-.5 2.4-.3 17.7-1.9c.8-.1 1.6-.2 2.3-.2a82 82 0 0 1 14 0c.8.1 1.6.1 2.3.2l16.8 1.8 2.4.3 5.2.6c1.8.2 3.1 1.6 3.2 3.4.3.1.3.2.3.3" /><path fill="#B4BBC4" d="M207.3 205c-.2.7-.6 1.4-1 2q-1.35 1.8-3.6 2.4c-5.1 1.4-10.3 2.3-15.6 2.5-1 0-2 .1-2.9.1H157c-1 0-2 0-2.9-.1-2.1-.1-4.3-.3-6.4-.6-3.1-.4-6.1-1.1-9.2-1.9-2.2-.6-3.9-2.3-4.6-4.4z" /><path fill="#0A2437" d="M199.1 195.1c-1.5 4-4 7.4-7.2 9.9-1.3 1.1-2.8 2-4.4 2.8-3 1.5-6.4 2.2-9.9 2.2h-15.3c-3.1 0-6.1-.6-8.9-1.8-1.9-.8-3.8-1.9-5.4-3.2-3.1-2.5-5.6-5.9-7.1-9.8l2.4-.3L161 193c.8-.1 1.6-.2 2.3-.2a82 82 0 0 1 14 0c.8.1 1.6.1 2.3.2l16.8 1.8z" opacity=".2" /><path fill="#DADCDD" d="m170.6 255.5-3.6-.1h-3.5c-2.3 0-4.6.1-6.9.4q-6.9.75-13.5 3c-2.2.7-4.4 1.6-6.5 2.6s-4.1 2.1-6.3 3.3l-12.6 7.1-2.1-3.4 12.3-7.8c2-1.3 4.2-2.6 6.4-3.8s4.5-2.2 6.9-3.2c4.7-1.9 9.6-3.2 14.6-4 2.5-.4 5-.7 7.6-.8l1.9-.1h1.8l3.6-.1v6.9z" /><path fill="#C6C7C8" d="m170.6 255.5-3.6-.1h-3.5c-2.3 0-4.6.1-6.9.4q-6.9.75-13.5 3c-2.2.7-4.4 1.6-6.5 2.6s-4.1 2.1-6.3 3.3l-12.6 7.1-1-1.7 12.5-7.5c4.1-2.5 8.4-4.8 13-6.4 4.5-1.7 9.3-2.8 14.1-3.5q3.6-.45 7.2-.6c2.4-.1 4.8 0 7.3 0v3.4z" /><path fill="#485D6B" d="M117.6 273v11.5c0 1.4-1.1 2.5-2.5 2.5h-1.9c-1.4 0-2.5-1.1-2.5-2.5V273z" /><path fill="#0A2437" d="M119.6 270.9v6.9c0 1.1-.9 2.1-2 2.2v4.5c0 1.4-1.1 2.5-2.5 2.5h-1.5v-20h2.1c2.2 0 3.9 1.8 3.9 3.9" opacity=".2" /><path fill="#DADCDD" d="M119.6 270.9v6.9c0 1.1-.9 2.1-2 2.2h-7c-1.1-.1-2-1.1-2-2.2v-6.9c0-2.2 1.8-3.9 3.9-3.9h3.1c2.3 0 4 1.8 4 3.9" /><path fill="#0A2437" d="M115.7 267h-2.1v13h4c1.1-.1 2-1.1 2-2.2v-6.9c0-2.1-1.7-3.9-3.9-3.9" opacity=".05" /><path fill="#DADCDD" d="m225.6 268.3-1 1.7-1 1.7-2-1.1-10.7-6c-2.1-1.2-4.1-2.3-6.2-3.3s-4.3-1.9-6.5-2.6c-4.4-1.5-9-2.5-13.5-3q-3.45-.3-6.9-.3h-3.5l-3.6.1v-7.1l3.6.1 1.8.1h2c2.5.1 5.1.4 7.6.8 5 .8 9.9 2.1 14.6 4 2.3.9 4.6 2 6.9 3.2 2.2 1.2 4.4 2.5 6.4 3.8l10.7 6.8z" /><path fill="#C6C7C8" d="m224.6 270-1 1.7-2-1.1-10.7-6c-2.1-1.2-4.1-2.3-6.2-3.3s-4.3-1.9-6.5-2.6c-4.4-1.5-9-2.5-13.5-3q-3.45-.3-6.9-.3h-3.5l-3.6.1V252h7.3q3.6.15 7.2.6c4.8.7 9.5 1.8 14.1 3.5 4.6 1.6 8.9 3.9 13 6.4l10.2 6.1z" /><path fill="#485D6B" d="M230.6 273v11.5c0 1.4-1.1 2.5-2.5 2.5h-1.9c-1.4 0-2.5-1.1-2.5-2.5V273z" /><path fill="#0A2437" d="M232.6 270.9v6.9c0 1.1-.9 2.1-2 2.2v4.5c0 1.4-1.1 2.5-2.5 2.5h-1.5v-20h2.1c2.2 0 3.9 1.8 3.9 3.9" opacity=".2" /><path fill="#DADCDD" d="M232.6 270.9v6.9c0 1.1-.9 2.1-2 2.2h-7c-1.1-.1-2-1.1-2-2.2v-7.2c0-.7.3-1.4.7-2s1-1.1 1.7-1.4q.75-.3 1.5-.3h3.1c2.3.1 4 1.9 4 4" /><path fill="#0A2437" d="M232.6 270.9v6.9c0 1.1-.9 2.1-2 2.2h-4v-13h2.1c2.2 0 3.9 1.8 3.9 3.9" opacity=".05" /><path fill="#E2E3E4" d="M175.3 252v.2l-.5 3.2L173 267l-.3 2h-4l-.3-1.8-1.9-11.8-.5-3.2v-.2c-.1-1.1.8-2 1.9-2h5.5c1.1 0 1.9.9 1.9 2" /><path fill="#C6C7C8" d="M175.3 252v.2l-.5 3.2L173 267l-.3 2h-2v-19h2.8c1 0 1.8.9 1.8 2" /><path fill="#485D6B" d="M174.6 273v11.5c0 1.4-1.1 2.5-2.5 2.5h-1.9c-1.4 0-2.5-1.1-2.5-2.5V273z" /><path fill="#0A2437" d="M176.6 270.9v6.9c0 1.1-.9 2.1-2 2.2v4.5c0 1.4-1.1 2.5-2.5 2.5h-1.5v-20h2.3c2.1.1 3.7 1.9 3.7 3.9" opacity=".2" /><path fill="#DADCDD" d="M176.6 270.9v6.9c0 1.1-.9 2.1-2 2.2h-7c-1.1-.1-2-1.1-2-2.2v-6.9c0-1.8 1.1-3.2 2.7-3.7.4-.1.8-.2 1.2-.2h3.3c2.2.1 3.8 1.9 3.8 3.9" /><path fill="#0A2437" d="M176.6 270.9v6.9c0 1.1-.9 2.1-2 2.2h-4v-13h2.3c2.1.1 3.7 1.9 3.7 3.9" opacity=".05" /><path fill="#435969" d="M210.6 125.7v5.8c-.1 16.1-2.8 32-7.8 47.3l-3.4 10.4c-.6 2-1.6 3.9-2.7 5.6-2.9 4.4-7.3 7.6-12.3 9.2-2.1.6-4.4 1-6.7 1h-15.3c-2.3 0-4.5-.4-6.7-1-5-1.5-9.3-4.7-12.2-9.1-1.2-1.7-2.1-3.6-2.8-5.7l-3.4-10.4c-5-15.3-7.6-31.2-7.8-47.3v-5.8c0-3.3 2.4-6 5.6-6.5l11-1.6c8.1-1.2 16.2-1.8 24.4-1.8q11.7 0 23.4 1.8l11 1.6c3.3.5 5.7 3.2 5.7 6.5" /><path fill="#00AB44" d="M210.6 125.7v5.8c-.1-3.2-2.4-5.9-5.6-6.3l-11-1.6c-7.8-1.2-15.6-1.7-23.4-1.8-8.1 0-16.3.5-24.4 1.8l-11 1.6c-3.2.5-5.5 3.1-5.6 6.3v-5.8c0-3.3 2.4-6 5.6-6.5l11-1.6c8.1-1.2 16.2-1.8 24.4-1.8q11.7 0 23.4 1.8l11 1.6c3.2.5 5.6 3.2 5.6 6.5" /><path fill="#384A57" d="M177.6 167h-14c-1.7 0-3-1.3-3-3s1.3-3 3-3h14c1.7 0 3 1.3 3 3s-1.3 3-3 3" /><path fill="#DADCDD" d="M175.2 164H166c-1.3 0-2.4 1.1-2.4 2.4v47.2c0 1.3 1.1 2.4 2.4 2.4h9.2c1.3 0 2.4-1.1 2.4-2.4v-47.2c0-1.3-1.1-2.4-2.4-2.4" /><path fill="#D0D1D3" d="M175.2 213H166c-1.3 0-2.4-1.1-2.4-2.4v3c0 1.3 1.1 2.4 2.4 2.4h9.2c1.3 0 2.4-1.1 2.4-2.4v-3c0 1.3-1.1 2.4-2.4 2.4" /><path fill="#E6E7E8" d="M175.2 164H166c-1.3 0-2.4 1.1-2.4 2.4v3c0-1.3 1.1-2.4 2.4-2.4h9.2c1.3 0 2.4 1.1 2.4 2.4v-3c0-1.3-1.1-2.4-2.4-2.4" /><path fill="#0A2437" d="M233.6 167.5v1.5c0 .1-.1.2-.1.4v.1c0 .1-.1.2-.1.3-.1.3-.4.5-.6.7-.1 0-.1.1-.2.1-.4.3-.9.4-1.4.4h-4.5v5.9c0 7.7-3.4 14.8-9.5 19.6l-9.7 7.7c0 .3-.1.5-.2.8-.2.7-.6 1.4-1 2q-1.35 1.8-3.6 2.4c-5.1 1.4-10.3 2.3-15.6 2.5-.7 1.2-2 2.1-3.5 2.1h-.2c0 .1-.1.3-.1.4s-.1.3-.1.4-.1.2-.1.4c-.1.3-.3.5-.4.8-.1.1-.1.2-.2.4-.2.2-.3.4-.5.6-1.2 1.2-2.8 2-4.6 2h-2.6v14h-.8c1.4 0 2.6 1.2 2.6 2.6v13h1.4c2.5.1 5.1.4 7.6.8 5 .8 9.9 2.1 14.6 4 2.3.9 4.6 2 6.9 3.2 2.2 1.2 4.4 2.5 6.4 3.8l10.7 6.8q.75-.3 1.5-.3h3.1c2.2 0 3.9 1.8 3.9 3.9v6.9c0 1.1-.9 2.1-2 2.2v4.5c0 1.4-1.1 2.5-2.5 2.5h-1.9c-1.4 0-2.5-1.1-2.5-2.5V280c-1.1-.1-2-1.1-2-2.2v-7.2l-10.7-6c-2.1-1.2-4.1-2.3-6.2-3.3s-4.3-1.9-6.5-2.6c-4.4-1.5-9-2.5-13.5-3q-3.45-.3-6.9-.3h-3l-1.8 11.6c2.1.1 3.7 1.8 3.7 3.9v6.9c0 1.1-.9 2.1-2 2.2v4.5c0 1.4-1.1 2.5-2.5 2.5h-1.5V115.8q11.7 0 23.4 1.8l11 1.6c3.2.5 5.6 3.2 5.6 6.5v5.8c-.1 16.1-2.8 32-7.8 47.3l-3.4 10.4c-.6 2-1.6 3.9-2.7 5.6l2.4.3 5.2.6c1.8.2 3.1 1.6 3.2 3.4l7.1-5.6c5-4 7.9-10 7.9-16.5v-6h-4.5c-.5 0-1-.2-1.4-.4-.1 0-.1-.1-.2-.1-.2-.2-.4-.4-.6-.7 0-.1-.1-.2-.1-.3v-.1c-.1-.1-.1-.2-.1-.4v-1.5c0-1.4 1.1-2.5 2.5-2.5h13c1.1 0 2.2 1.1 2.2 2.5" opacity=".15" /></symbol>'});a().add(c);const d=c;var u=n(74848);const h=e=>{let{testId:t="",title:n,children:o,...r}=e;return(0,u.jsx)(i.DL,{children:(0,u.jsxs)(l.Flex,{"data-testid":`error-base-container-${t}`,alignItems:"center",justifyContent:"center",flex:!0,gap:8,overflow:"hidden",children:[(0,u.jsx)("svg",{id:"partial_failure",width:"288px",height:"234px",children:(0,u.jsx)("use",{xlinkHref:`#${d.id}`})}),(0,u.jsxs)(l.Flex,{column:!0,width:{max:125},gap:2,alignItems:"center",justifyContent:"center",overflow:"hidden",height:"80vh",...r,children:[(0,u.jsx)(l.H3,{children:n}),o]})]})})}},88772(e,t,n){n.d(t,{A:()=>Nt});var l=n(73937),i=n(91421),o=n(96540),r=n(4575),s=(n(33110),n(38429)),a=n(12215),c=n(60908),d=n(74848);const u=function(){let{id:e,error:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n="string"===typeof t?{error_message:t}:"object"===typeof t?t:{};return(0,d.jsx)(c.DL,{feature:"DyncfgForm",id:e,error:JSON.stringify(t),children:(0,d.jsxs)(s.Flex,{column:!0,gap:2,children:[(0,d.jsxs)(s.Flex,{alignItems:"center",gap:2,children:[(0,d.jsx)(s.Icon,{name:"warning_triangle",color:"text"}),(0,d.jsx)(s.H3,{children:"Error"})]}),(0,d.jsx)(s.TextBig,{children:(0,a.x)(n)})]})})};n(74423);var h=n(882),p=n(63950),m=n.n(p),g=n(85660),f=n(21885),x=n(564),b=n(44030);n(98992),n(81454);const v=e=>{let{title:t="Error",children:n,...l}=e;return(0,d.jsxs)(s.Flex,{column:!0,gap:2,...l,children:[(0,d.jsxs)(s.Flex,{alignItems:"center",gap:2,children:[(0,d.jsx)(s.Icon,{name:"warning_triangle",color:"errorText"}),(0,d.jsx)(s.TextBigger,{color:"errorText",children:t})]}),n]})};var y=n(6304);const j=e=>"string"===typeof e?e:e.stack||e.message||JSON.stringify(e),C=function(){let{remainingErrors:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,y.A)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.Collapsible,{open:t,duration:0,children:e.map(e=>{const t=j(e);return(0,d.jsx)(s.Text,{color:"errorText",children:t},t)})}),(0,d.jsx)(s.Flex,{padding:[2,0,0,0],children:(0,d.jsx)(s.Button,{flavour:"hollow",neutral:!0,small:!0,label:t?"Hide":`Show ${e.length} more`,onClick:n})})]})},M=function(){let{id:e,errors:t=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.length?(0,d.jsx)(c.Ay,{feature:"DyncfgForm",id:e,validationErrors:!0,children:(0,d.jsx)(v,{children:(0,d.jsxs)(s.Flex,{"data-testid":"dyncfg-form-errors",alignItems:"start",column:!0,children:[(0,d.jsx)(s.Text,{color:"errorText",children:j(t[0])}),t.length>1?(0,d.jsx)(C,{remainingErrors:t.slice(1)}):null]})})}):null};var A=n(67200),D=n(75684),w=n(46587),E=n(99728),S=n(4797),k=n(87680),I=n(2652),F=n(93598),T=n(87083),z=n(44913),B=n(94404);const _=(0,A.A)((0,B.A)(s.Button)),L=e=>{let{id:t,formRef:n,loading:s,refreshData:a}=e;const[c,,u,h]=(0,y.A)(),{state:p}=(0,i.$h)(),{isAlert:m}=p||{},g=(0,T.a7)({extraKey:f.q4,merge:!1}),{node:x}=(0,l.Z)(),{isNewItem:b,entityProps:v={}}=(0,r.SU)(),{cmds:j=[]}=v,C=b||j.includes("update"),{user_disabled:M}=(0,S.A)(),A=(0,k.A)(),[B]=(0,z.useStaticCoupon)(),L=(0,I.A)(B),P=(0,w.uW)("isAnonymous"),O=(0,E.JT)("billing:Manage"),N=(0,o.useCallback)(e=>A?C?e||null:"You don't have permissions to save your changes":"Please provide a name first",[A,C]),R=(0,o.useMemo)(()=>({submit:{label:"Submit",tooltip:N(`Submit your changes to ${x.label} node`),textTransform:"",feature:"DyncfgSubmitButton",payload:{nodeId:x.id,isDyncfg:!0}},multiple_submit:{type:"button",flavour:"hollow",label:"Multi-Node Submit",tooltip:N("Submit your changes to another node or to multiple nodes"),onClick:u,textTransform:"",feature:"DyncfgSubmitButton",payload:{nodeId:x.id,isDyncfg:!0}},multiple_submit_alert:{type:"button",flavour:"hollow",label:"Submit to nodes",tooltip:N("Verify the selected nodes"),onClick:u,textTransform:"",feature:"DyncfgSubmitButton",payload:{nodeId:x.id,isDyncfg:!0}},nonPaid:{type:"button",label:"Upgrade",tooltip:"Upgrade your plan to use this feature.",disabled:!O||P,onClick:L,textTransform:""}}),[A,u,C,O,P,L,x,N]),$=!C||s||M||!A,{hidden:W,isDisabled:H,tooltipText:U,showUpgradeButton:q}=(0,F.j)({edit:!0,tooltip:R.submit.tooltip,disabled:$}),{isDisabled:V,tooltipText:G}=(0,F.j)({edit:!0,tooltip:R[m?"multiple_submit_alert":"multiple_submit"]?.tooltip,disabled:$});return W?null:q?(0,d.jsx)(_,{small:!0,disabled:$,isLoading:s,...R.nonPaid}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(_,{small:!0,disabled:V,isLoading:s,...R[m?"multiple_submit_alert":"multiple_submit"],tooltip:G}),m?null:(0,d.jsx)(_,{small:!0,disabled:H,isLoading:s,...R.submit,tooltip:U}),c?(0,d.jsx)(D.A,{id:t,formRef:n,onClose:h,refreshData:a,extraKey:f.ld},JSON.stringify({id:t,selectedNodeIds:g,modalOpen:c})):null]})},P=(0,B.A)(F.A),O=e=>{let{loading:t}=e;const{node:n}=(0,l.Z)(),{id:s,formData:c,entityProps:u={}}=(0,r.SU)(),{cmds:h=[]}=u,{user_disabled:p}=(0,S.A)(),m=h.includes("test"),g=(0,i.EZ)({id:s,node:n}),f=(0,k.A)({defaultName:"test"}),x=t||p,[b,v]=(0,a.A)(),y=b({successMessage:"Successfully tested configuration"}),j=v(),C=(0,o.useCallback)(()=>{g({name:f,payload:c}).then(y).catch(j)},[f,g,c]);return m?(0,d.jsx)(P,{edit:!0,feature:"DyncfgItem",payload:{id:s,node:n?.value},label:"Test",small:!0,tooltip:"Test your configuration",flavour:"hollow",onClick:C,disabled:x,type:"button"}):null},N=e=>{let{id:t,formRef:n,loading:l,errors:i=[],refreshData:o}=e;return(0,d.jsxs)(s.Flex,{"data-testid":"dyncfg-form-footer",background:"modalBackground",position:"sticky",bottom:0,gap:2,padding:[4,0,0,0],alignItems:"baseline",justifyContent:"between",zIndex:10,children:[i.length?(0,d.jsx)(M,{id:t,errors:i}):(0,d.jsx)(s.Flex,{}),(0,d.jsxs)(s.Flex,{gap:2,children:[(0,d.jsx)(O,{loading:l}),(0,d.jsx)(L,{id:t,formRef:n,loading:l,refreshData:o})]})]})};var R=n(9050),$=n(40531),W=n(49165),H=n(71219);n(23215),n(37550);const U=(e,t)=>{if(!e||!t)return e;const n=(e=>{const t=[],n=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e&&"object"===typeof e)for(const[i,o]of Object.entries(e))i.startsWith("ui:")||("password"===o?.["ui:widget"]&&t.push([...l,i]),"object"===typeof o&&null!==o&&n(o,[...l,i]))};return n(e),t})(t);if(!n.length)return e;const l=e.split("\n"),i=[],o=[];for(const r of l){const e=r.match(/^(\s*)(-\s*)?(\w+):/);if(e){const[,t,l,s]=e,a=t.length+(l?.length||0);for(;o.length>0&&o[o.length-1].indent>=a;)o.pop();const c=[...o.map(e=>e.name),s];if(n.some(e=>e.length<=c.length&&e.every((t,n)=>c[c.length-e.length+n]===t))){const e=r.replace(/^(\s*(?:-\s*)?\w+:\s*)[^\n]*$/,"$1****");i.push(e)}else i.push(r);o.push({name:s,indent:a})}else i.push(r)}return i.join("\n")},q=e=>{let{error:t}=e;return(0,d.jsx)(s.Flex,{padding:[4],children:(0,d.jsx)(s.Text,{color:"error",children:t})})},V=e=>(0,d.jsxs)(s.Flex,{column:!0,gap:2,...e,children:[(0,d.jsxs)(s.Flex,{gap:2,alignItems:"center",children:[(0,d.jsx)(s.Icon,{color:"warning",name:"warning_triangle"}),(0,d.jsx)(s.Text,{children:"This feature is only available to paid plans"})]}),(0,d.jsx)($.A,{small:!0})]}),G=e=>{let{id:t,node:n,canGetUserConfig:l,formData:r}=e;const{value:a,error:c}=(0,i.MQ)(),{value:u}=(0,i.t8)({id:t,node:n}),h=(0,W.A)({id:t,node:n}),p=(0,o.useMemo)(()=>(e=>{if(!e)return e;const t=e.split(/\r?\n/),n=t[0].match(/^\s*/)[0]?.length;return n?t.map(e=>{const t=e.match(/^\s*/)[0]?.length;return e.slice(Math.min(t,n))}).join("\n"):e})(U(a,u?.uiSchema)),[a]),{hasPermission:m}=(0,F.j)({edit:!0});return(0,o.useEffect)(()=>{l&&r&&m&&h(r)},[r,l,m,h]),l?c?(0,d.jsx)(q,{error:c}):m?(0,d.jsx)(H.A,{configuration:a,renderedConfiguration:p,isExplanationDisabled:!0,width:70}):(0,d.jsx)(V,{}):(0,d.jsx)(s.Flex,{padding:[4],children:(0,d.jsx)(s.Text,{children:"Configuration text export is not supported by this node."})})},K=e=>{let{id:t,node:n,canGetUserConfig:l,formData:i,isOpen:o,toggle:r,...s}=e;return(0,d.jsx)(R.A,{testId:"dyncfg-job-configuration",label:"Configuration",isOpen:o,onToggle:r,padding:[0,4,4,4],headerContainerProps:{background:"modalBackground"},...s,children:(0,d.jsx)(G,{id:t,node:n,padding:[0,3,30],canGetUserConfig:l,formData:i})})};var Z=n(82339),Y=n(81391);const Q=e=>{let{isOpen:t,toggle:n,formData:l}=e;const o=(0,Y.n)("id"),r=(l||{})?.rules?.[0]?.config?.match?.on,{value:s,error:a}=(0,i.MQ)();return r&&s&&!a?(0,d.jsx)(Z.A,{roomId:o,context:r,configuration:s,isOpen:t,onToggle:n,padding:[4,4,0,4],border:{side:"top",color:"border"},headerContainerProps:{background:"modalBackground"}}):null};var J=n(45087),X=n(54852),ee=n(79748),te=n(30005),ne=n(92318);const le=h.default.span.withConfig({displayName:"markdocSchema__Strong",componentId:"sc-1se2vza-0"})(["font-weight:bold;"]),ie=h.default.ol.withConfig({displayName:"markdocSchema__OrderedList",componentId:"sc-1se2vza-1"})(["list-style:roman;padding-left:14px;"]),oe=h.default.ul.withConfig({displayName:"markdocSchema__UnorderedList",componentId:"sc-1se2vza-2"})(['list-style-image:url("','/img/list-style-image.svg");padding-left:14px;'],ne.A.assetsBaseURL),re={heading:{render:e=>{let{level:t=1,...n}=e,l=s.H1;switch(t){case 2:l=s.H2;break;case 3:l=s.H3;break;case 4:l=s.H4;break;case 5:l=s.H5;break;case 6:l=s.H6}return(0,d.jsx)(l,{margin:[2,0],...n})},attributes:{id:{type:String},level:{type:Number}}},paragraph:{render:e=>{let{children:t,...n}=e;return(0,d.jsx)(s.Flex,{...n,children:(0,d.jsx)(s.Text,{children:t})})}},strong:{render:le},link:{render:e=>{let{children:t,href:n,...l}=e;return(0,d.jsx)(ee.A,{href:n,rel:"noopener noreferrer",target:"_blank",...l,children:t})},attributes:{href:{type:String}}},code:{render:e=>{let{content:t,...n}=e;return(0,d.jsx)(te.R0,{...n,children:t})},attributes:{content:{type:String}}},fence:{render:e=>{let{content:t,...n}=e;return(0,d.jsx)(te.Ay,{...n,children:t})},attributes:{content:{type:String}}},list:{render:e=>{let{ordered:t,children:n,...l}=e;const i=t?ie:oe;return(0,d.jsx)(i,{...l,children:n})},attributes:{ordered:{type:Boolean}}}},se=e=>{let{children:t}=e;return(0,d.jsx)(X.A,{transformConfiguration:{nodes:re},children:t})},ae=e=>{let{description:t}=e;return("string"===typeof t&&t?t:"object"===typeof t?t?.props?.description:null)?(0,d.jsx)(J.A,{isBasic:!0,plain:!0,allowHoverOnTooltip:!0,content:(0,d.jsx)(s.Flex,{height:{max:70},width:{max:120},overflow:{vertical:"auto"},children:(0,d.jsx)(se,{children:t})}),contentProps:{width:{max:120}},children:(0,d.jsx)(s.Icon,{name:"information",color:"text",size:"small"})}):null},ce=e=>{let{description:t}=e;if(!t)return null;const n="string"===typeof t?t:t.props?.description;return(0,d.jsx)(se,{children:n})},de=e=>{let{title:t,required:n,description:l,help:i,isCollapsible:o,isExpanded:r,toggleExpanded:a}=e;return t?(0,d.jsxs)(s.Flex,{column:!0,gap:.5,children:[(0,d.jsxs)(s.Flex,{alignItems:"center",gap:1,children:[o?(0,d.jsx)(s.Icon,{name:"chevron_down",color:"text",onClick:a,cursor:"pointer",rotate:r?2:0}):null,(0,d.jsxs)(s.TextBig,{strong:!0,cursor:o?"pointer":"default",onClick:o?a:void 0,children:[t,n?"*":null]}),i?(0,d.jsx)(ae,{description:i}):null]}),(0,d.jsx)(s.Flex,{...o?{padding:[0,0,0,5]}:{},children:(0,d.jsx)(ce,{description:l})})]}):null},ue=(0,h.keyframes)(["from{opacity:0;transform:scale(0.8);}to{opacity:1;transform:scale(1);}"]),he=(0,h.keyframes)(["from{transform:rotate(0deg);}to{transform:rotate(360deg);}"]),pe=(0,h.default)(s.Flex).withConfig({displayName:"validationIcon__IconWrapper",componentId:"sc-5mqx0z-0"})(["animation:"," 0.2s ease-in-out;",""],ue,e=>e.isLoading&&(0,h.css)(["animation:"," 1s linear infinite;"],he)),me=e=>{let{status:t,size:n="small"}=e;if(!t)return null;const l={small:{name:"",color:"text",width:"14px",height:"14px"},medium:{name:"",color:"text",width:"16px",height:"16px"},large:{name:"",color:"text",width:"20px",height:"20px"}}[n]||l.small;switch(t){case"error":return(0,d.jsx)(pe,{alignItems:"center",justifyContent:"center",children:(0,d.jsx)(s.Icon,{...l,name:"x",color:"error"})});case"warning":default:return null;case"loading":return(0,d.jsx)(pe,{alignItems:"center",justifyContent:"center",isLoading:!0,children:(0,d.jsx)(s.Icon,{...l,name:"loading",color:"textLite"})})}},ge=(0,h.default)(s.Flex).withConfig({displayName:"fieldTemplate__ValidationIconWrapper",componentId:"sc-u7gsvl-0"})(["position:absolute;right:8px;top:8px;pointer-events:auto;z-index:2;cursor:help;"]),fe=(0,h.default)(s.Flex).withConfig({displayName:"fieldTemplate__FieldContentWrapper",componentId:"sc-u7gsvl-1"})(['position:relative;input:not([type="checkbox"]):not([type="radio"]),select,textarea{padding-right:32px !important;}']),xe=e=>{let{id:t,displayLabel:n,label:l,description:i,required:o,uiSchema:r={}}=e;const s=r["ui:title"]||l,a=r["ui:help"];return s&&n?(0,d.jsx)("label",{htmlFor:t,children:(0,d.jsx)(de,{title:s,description:i,required:o,help:a})}):null},be=e=>{let{id:t,label:n,required:l,description:i,errors:r,children:a,displayLabel:c,schema:u,classNames:h,hidden:p,uiSchema:m,formData:g,rawErrors:f}=e;const[x,b]=(0,o.useState)(!1),[v,y]=(0,o.useState)(!1),[j,C]=(0,o.useState)(null),[M,A]=(0,o.useState)("");(0,o.useEffect)(()=>{void 0!==g&&null!==g&&""!==g&&b(!0)},[g]);(0,o.useEffect)(()=>{if(r&&r.length>0||f&&f.length>0)return C("error"),void A("");if(x&&void 0!==g&&null!==g&&""!==g){const e=m?.["ui:validation"];if(e?.warning){const t=e.warning.condition;if(t&&((e,t)=>{try{return new Function("value",`return ${e}`)(t)}catch{return!1}})(t,g))return C("warning"),void A(e.warning.message||"This value may not be optimal")}}C(null),A("")},[r,f,x,g,m,t]);const D="object"!==u.type&&"array"!==u.type&&!m?.["ui:widget"]?.includes("hidden"),w="object"===u.type,E="boolean"===u.type,S=l&&"boolean"!==u.type&&"radio"!==m?.["ui:widget"];return p?null:(0,d.jsxs)(s.Flex,{width:"100%",className:`${h} dyncfg-field-container`,column:!0,gap:.5,children:[E?null:(0,d.jsx)(xe,{id:t,displayLabel:c,label:n,required:S,description:w?i:null,uiSchema:m}),(0,d.jsxs)(fe,{className:"dyncfg-field-content",column:!0,gap:.5,onBlur:()=>{y(!0)},onFocus:()=>{y(!1)},children:[E?(0,d.jsxs)(s.Flex,{gap:2,children:[a,(0,d.jsx)(xe,{id:t,displayLabel:c,label:n,required:S,description:w?i:null,uiSchema:m})]}):a,!w&&i?(0,d.jsx)(s.Flex,{children:(0,d.jsx)(ce,{description:i})}):null,D&&j&&(0,d.jsx)(ge,{children:(0,d.jsx)(me,{status:j,size:"small"})}),r?(0,d.jsx)(s.TextMicro,{color:"errorText",children:r}):null,M&&"warning"===j?(0,d.jsx)(s.TextMicro,{color:v?"warning":"textLite",children:M}):null]})]})};n(54520),n(72577);const ve=e=>{let{title:t,children:n,initiallyExpanded:l=!1,help:i=null}=e;const[o,r]=(0,y.A)(l);return(0,d.jsxs)(s.Flex,{className:"dyncfg-collapsible-group dyncfg-grid-col-span-1-6",width:"100%",column:!0,gap:2,children:[(0,d.jsx)(de,{title:t,required:!1,description:null,help:i,isCollapsible:!0,isExpanded:o,toggleExpanded:r}),(0,d.jsx)(s.Collapsible,{className:"dyncfg-group-collapsible",open:o,duration:200,children:(0,d.jsx)(s.Flex,{column:!0,gap:3,padding:[0,0,0,3],border:{side:"left",color:"border"},children:n})})]})},ye=(je=e=>{let{onAddProperty:t,schema:n,registry:l,properties:i,uiSchema:o={},...r}=e;const{WrapIfAdditionalTemplate:a,ButtonTemplates:c}=l.templates,{AddButton:u}=c,h=o?.["ui:groups"],p=h?(e=>{let{properties:t,groups:n,WrapIfAdditionalTemplate:l}=e;return Array.isArray(n)?n.map((e,n)=>{if("string"===typeof e){const n=t.find(t=>t.name===e);return n?(0,d.jsx)(l,{elemKey:n.content.key,...n.content.props,children:n.content},n.content.key):null}if("object"===typeof e){const i=Object.keys(e).find(e=>!e.startsWith("ui:"));if(i){const o=e[i],r=e["ui:collapsible"],s=e["ui:initiallyExpanded"];if(Array.isArray(o)){const e=o.map(e=>t.find(t=>t.name===e)).filter(Boolean).map(e=>(0,d.jsx)(l,{elemKey:e.content.key,...e.content.props,children:e.content},e.content.key));return r?(0,d.jsx)(ve,{title:i,initiallyExpanded:s,children:e},`group-${n}`):(0,d.jsxs)("div",{className:"dyncfg-field-group",children:[i&&(0,d.jsx)("div",{className:"dyncfg-group-title",children:i}),e]},`group-${n}`)}}return null}return null}).filter(Boolean):t.map(e=>(0,d.jsx)(l,{elemKey:e.content.key,...e.content.props,children:e.content},e.content.key))})({properties:i,groups:h,registry:l,WrapIfAdditionalTemplate:a}):i.map(e=>(0,d.jsx)(a,{elemKey:e.content.key,...e.content.props,children:e.content},e.content.key));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.Flex,{className:"dyncfg-object-field-content",column:!0,gap:3,...r,children:p}),n.additionalProperties&&t?(0,d.jsx)(s.Flex,{padding:[2],children:(0,d.jsx)(u,{onClick:t})}):null]})},e=>{let{className:t,...n}=e;return t?.includes("dyncfg-grid")?(0,d.jsx)("div",{className:t,children:(0,d.jsx)(je,{...n})}):(0,d.jsx)(je,{...n})});var je;const Ce=(0,o.createContext)(),Me=e=>{let{children:t}=e;const[n,l]=(0,o.useState)({});return(0,d.jsx)(Ce.Provider,{value:{collapsibleItemsState:n,setCollapsibleItemsState:l},children:t})},Ae=e=>{const{properties:t,uiSchema:n}=e,{tabs:l,rest:i}=n["ui:options"]||{},[r,a]=(0,o.useState)(0),c=(0,o.useMemo)(()=>(e=>{let{properties:t=[],tabs:n=[]}=e;return n.map(e=>({...e,properties:t.filter(t=>e.fields.includes(t.name))}))})({properties:t,tabs:l}),[t,l]);return(0,d.jsxs)(Me,{children:[(i||[]).length?(0,d.jsx)(ye,{...e,properties:t.filter(e=>i.includes(e.name))}):null,(0,d.jsx)(s.Tabs,{selected:r,onChange:a,height:"100%",children:c.map(t=>{let{title:n,...l}=t;return(0,d.jsx)(s.Tab,{label:n,children:(0,d.jsx)(ye,{...e,...l,border:{side:"top",color:"border"},padding:[2,0,0,3]})},n)})})]})},De={tabs:{Component:Ae},default:{Component:ye}},we=e=>{let{title:t,...n}=e;const{description:l,uiSchema:i={},fieldPathId:r,formData:a}=n,c=r?.$id,u=i["ui:flavour"],h=i["ui:help"],{Component:p}=De[u]||De.default,g=!!i?.["ui:collapsible"]||!!i?.["ui:options"]?.collapsible,{inContext:f,isItemDirty:x,isItemExpanded:b,setItemState:v}=(()=>{const e=(0,o.useContext)(Ce),{collapsibleItemsState:t,setCollapsibleItemsState:n}=e||{},l=(0,o.useCallback)(e=>void 0!==t[e],[t]),i=(0,o.useCallback)(e=>t[e],[t]),r=(0,o.useCallback)((e,t)=>{n(n=>({...n,[e]:t}))},[n]);return{inContext:!!e,isItemDirty:e?l:m(),isItemExpanded:e?i:m(),setItemState:e?r:m()}})(),j=i["ui:initiallyExpanded"]||!!a,C=(0,o.useMemo)(()=>x(c)?b(c):j,[x,b]),[M,A]=(0,y.A)(C);return(0,o.useEffect)(()=>{f&&v(c,M)},[f,M,v]),(0,d.jsxs)(s.Flex,{className:"dyncfg-object-field-container",width:"100%",column:!0,gap:2,children:[t?(0,d.jsx)(de,{title:t,description:l,help:h,isCollapsible:g,isExpanded:M,toggleExpanded:A}):null,(0,d.jsx)(s.Collapsible,{className:"dyncfg-object-field-collapsible",open:M||!g,duration:0,children:(0,d.jsx)(p,{...n})})]})},Ee=(0,h.default)(s.IconButton).attrs(e=>({small:!0,padding:[0,1],...e})).withConfig({displayName:"styled__StyledIconButton",componentId:"sc-xc1c2v-0"})(["height:",";"],e=>{let{inTabs:t}=e;return t?"auto":"24px"}),Se=e=>{let{icon:t,iconType:n,...l}=e;return(0,d.jsx)(Ee,{flavour:"default",icon:"plus",tooltip:"Add item",type:"button",neutral:!1,...l})},ke=e=>{let{canAdd:t,onAddClick:n,openEmptyItem:l}=e;return(0,o.useEffect)(()=>{l&&n()},[l,n]),(0,d.jsxs)(s.Flex,{gap:2,alignItems:"center",children:[(0,d.jsx)(s.TextBig,{children:"No items"}),t?(0,d.jsx)(Se,{onClick:n}):null]})};var Ie=n(74891);const Fe=(0,Ie.A)(s.Toggle),Te=(0,o.createContext)({}),ze=e=>{let{items:t,canAdd:n,onAddClick:l,uiSchema:i}=e;const[r,a]=(0,o.useState)(0),c="list"===i?.["ui:listFlavour"],u=!!i?.["ui:openEmptyItem"],[h,p]=(0,y.A)(c);return(0,o.useEffect)(()=>{r>=t.length&&a(0)},[r,t.length,a]),(0,d.jsx)(s.Flex,{"data-testid":"dyncfg-array-field-template",width:"100%",column:!0,gap:2,padding:[1,0,0,0],children:t.length?(0,d.jsxs)(Te,{value:{items:t,isList:h,activeTab:r,setActiveTab:a},children:[(0,d.jsx)(s.Flex,{"data-testid":"dyncfg-array-field-template-list-toggler",children:(0,d.jsx)(Fe,{labelRight:"List",labelLeft:"Tabs",onChange:p,checked:h,tooltip:"Switch between list and tabs layout"})}),t]}):(0,d.jsx)(ke,{canAdd:n,onAddClick:l,openEmptyItem:u})})},Be=(0,h.default)(s.Flex).attrs(e=>({open:!0,...e})).withConfig({displayName:"collapsible__ContentWrapper",componentId:"sc-6ate9-0"})(["display:",";"],e=>{let{open:t}=e;return t?"flex":"none"}),_e=(0,Ie.A)(s.Icon),Le=e=>{let{title:t="",isCollapsible:n,isOpen:l,onChange:i,children:r,...a}=e;const[c,u]=(0,y.A)(l);return(0,o.useEffect)(()=>{i(c)},[c]),n?(0,d.jsxs)(s.Flex,{width:"100%",column:!0,padding:[3,0],children:[(0,d.jsxs)(s.Flex,{gap:2,children:[(0,d.jsx)(_e,{noWrapper:!0,name:"chevron_left",size:"small",color:"textLite",rotate:c?1:3,onClick:u,cursor:"pointer",tooltip:c?"Hide contents":"Show contents"}),t?(0,d.jsx)(s.Text,{strong:!0,children:t}):null]}),(0,d.jsx)(Be,{open:c,...a,children:r})]}):r},Pe=e=>{let{icon:t,iconType:n,...l}=e;return(0,d.jsx)(Ee,{flavour:"hollow",icon:"copy",tooltip:"Copy current item into a new one",type:"button",neutral:!1,...l})},Oe=e=>{let{icon:t,iconType:n,...l}=e;return(0,d.jsx)(Ee,{flavour:"hollow",icon:"sort_descending",tooltip:"Move down",type:"button",...l})},Ne=e=>{let{icon:t,iconType:n,...l}=e;return(0,d.jsx)(Ee,{flavour:"hollow",icon:"sort_ascending",tooltip:"Move up",type:"button",...l})},Re=e=>(0,d.jsx)(Ee,{flavour:"hollow",icon:"checkmark_partial_s",danger:!0,tooltip:"Remove item",type:"button",...e}),$e=e=>{let{index:t,totalItems:n,buttonsProps:l={},uiSchema:i={},children:r}=e;const{canAdd:a,onAddItem:c,onCopyItem:u,onMoveDownItem:h,onMoveUpItem:p,onRemoveItem:m,hasMoveDown:g,hasMoveUp:f,hasRemove:x}=l,[b,v]=(0,o.useState)(!0),y=f||g||x||a,j=!!i?.["ui:collapsible"]||!!i?.["ui:options"]?.collapsible,C=(0,o.useCallback)(e=>{v(e)},[v]);return(0,d.jsxs)(s.Flex,{width:"100%",gap:2,alignItems:b?"start":"center",justifyContent:"between",border:{side:"all",color:"border"},padding:[2,4],children:[(0,d.jsx)(Le,{isCollapsible:j,title:r.props?.title,isOpen:b,onChange:C,children:r}),y?(0,d.jsxs)(s.Flex,{gap:2,padding:[2,0],children:[f?(0,d.jsx)(Ne,{onClick:p}):null,g?(0,d.jsx)(Oe,{onClick:h}):null,x?(0,d.jsx)(Re,{onClick:m}):null,a?(0,d.jsx)(Pe,{onClick:u}):null,a&&t===n-1?(0,d.jsx)(Se,{onClick:c}):null]}):null]})},We=e=>{let{title:t,active:n,index:l,setActiveTab:i,reordering:r,setReordering:a,buttonsProps:c={},ref:u,...h}=e;const{onRemoveItem:p,onReorderClick:m,hasMoveDown:g,hasMoveUp:f,hasRemove:x}=c,b=(0,o.useCallback)(()=>{x&&p()},[x,p]);return(0,o.useEffect)(()=>{if(2===r?.length&&r[0]===l){const e=r[1];m(l,e)(),i(e),a()}},[r]),(0,d.jsx)(s.NavigationTab,{ref:u,...h,index:l,draggable:!(!g&&!f),active:n,icon:x?(0,d.jsx)(s.Icon,{name:"x",size:"small"}):null,onClick:()=>{i(l)},onRemove:b,fixed:!x,children:(0,d.jsx)(s.TextBig,{whiteSpace:"nowrap",children:t})})},He=e=>{let{activeTab:t,setActiveTab:n,buttonsProps:l={},children:i,...r}=e;const[a,{width:c}]=(0,g.A)(),[u,h]=(0,o.useState)(),{items:p=[]}=(0,o.use)(Te),{canAdd:m,onAddItem:f,onCopyItem:x}=l,b=m?`calc(${c}px - 80px)`:`${c}px`;return(0,d.jsxs)(s.Flex,{"data-testid":"dyncfg-array-field-item-template-tabs",ref:a,width:"100%",column:!0,children:[(0,d.jsxs)(s.Flex,{width:`${c}px`,margin:[0,0,2,0],children:[(0,d.jsx)(s.NavigationTabs,{width:b,overflow:{horizontal:"auto"},children:(0,d.jsx)(s.DraggableTabs,{items:p.map((e,i)=>({id:e.key,title:`Rule ${i+1}`,active:t===i,setActiveTab:n,reordering:u,setReordering:h,buttonsProps:l,...r})),Item:We,onDragEnd:(e,t)=>{h([e,t])}})}),m?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Pe,{onClick:x,padding:[1,3],inTabs:!0,groupFirst:!0}),(0,d.jsx)(Se,{onClick:f,padding:[1,3],inTabs:!0,groupLast:!0})]}):null]}),i]})},Ue=(0,o.memo)(He),qe=e=>{let{index:t,...n}=e;const{isList:l,activeTab:i,setActiveTab:r}=(0,o.use)(Te);return l||t===i?(0,d.jsx)(s.Flex,{"data-testid":"dyncfg-array-field-item-template",width:"100%",padding:[1,0,0,0],children:l?(0,d.jsx)($e,{...n}):(0,d.jsx)(Ue,{activeTab:i,setActiveTab:r,...n})}):null};var Ve=n(55780);const Ge=e=>{let{elemKey:t,handleKeyRename:n,handleRemoveProperty:l,schema:i,registry:r,children:a}=e;const[c,u]=(0,o.useState)(t||""),{RemoveButton:h}=r.templates.ButtonTemplates,p=Ve.Rr in i,m=(0,o.useCallback)(e=>u(e.target.value),[u]),g=(0,o.useCallback)(()=>{t!==c&&n(t,c)},[t,c,n]),f=(0,o.useCallback)(()=>{l(t)},[t,l]);return p?(0,d.jsxs)(s.Flex,{width:"100%",gap:2,alignItems:"center",children:[(0,d.jsxs)(s.Flex,{column:!0,gap:1,flex:{grow:1,shrink:1},children:[(0,d.jsx)(s.TextBig,{strong:!0,children:"Key"}),(0,d.jsx)(s.TextInput,{value:c,onInput:m,onBlur:g,border:"inputBorder",size:"small"})]}),(0,d.jsx)(s.Flex,{flex:{grow:2,shrink:1},children:a}),(0,d.jsxs)(s.Flex,{column:!0,gap:.5,children:[(0,d.jsx)(s.TextBig,{opacity:"0",children:"x"}),(0,d.jsx)(h,{onClick:f})]})]}):a},Ke={FieldTemplate:be,ArrayFieldTemplate:ze,ArrayFieldItemTemplate:qe,ObjectFieldTemplate:we,WrapIfAdditionalTemplate:Ge,ErrorListTemplate:()=>null,ButtonTemplates:{SubmitButton:()=>(0,d.jsx)(s.Button,{label:"Save"}),AddButton:Se,RemoveButton:Re,MoveUpButton:Ne,MoveDownButton:Oe}};n(3949),n(8872),n(25509),n(65223),n(60321),n(41927),n(11632),n(64377),n(66771),n(12516),n(68931),n(52514),n(35694),n(52774),n(49536),n(21926),n(94483),n(16215);var Ze=n(3319),Ye=n(63872);const Qe=()=>{const[e,t]=(0,o.useState)([]),n=(0,o.useCallback)(e=>t(e),[t]);return{errors:e,onError:n,resetErrors:(0,o.useCallback)(()=>t([]),[t])}},Je=e=>{let{id:t,node:n,formState:l,submitMethod:s,setIsDirty:c,setError:d,stripUnknownFields:u}=e;const{isNewItem:h,isDirty:p,formData:m,setFormData:g,isLoading:f,startLoading:x,stopLoading:b}=(0,r.SU)(),{refresh:v}=(0,i.$h)(),{sendLog:y}=(0,Ze.A)(),[j,C]=(0,Ye.A)(),{loaded:M,value:A,error:D,refresh:w}=(0,i.t8)({id:t,node:n}),{loaded:E,value:S,hasError:k,refresh:I}=l,F=p||!S?m:Object.keys(S).length?S:m,T=(0,o.useMemo)(()=>{const e=u?((e,t)=>{if(!e||!t?.jsonSchema?.properties)return e;const n=new Set(["name",...Object.keys(t.jsonSchema.properties||{})]),l=Object.fromEntries(Object.entries(e||{}).filter(e=>{let[t]=e;return n.has(t)})),i=Object.keys(e).filter(e=>!n.has(e));return i.length&&(console.warn("[dyncfg] The following fields are not defined in the schema properties"),console.warn(i)),l})(F,A):F;return((e,t)=>{if(!e||!t?.dependencies)return e;const n=Object.entries(t.dependencies).reduce((n,l)=>{let[i,o]=l;return Object.keys(o).includes("oneOf")&&Array.isArray(t.dependencies[i].oneOf)&&t.dependencies[i].oneOf.forEach(t=>{let{properties:l}=t;l[i]?.const!==e[i]&&Object.keys(l).filter(e=>e!==i).forEach(e=>n.push(e))}),n},[]);return n.length?Object.entries(e).reduce((e,t)=>{let[l,i]=t;return{...e,...n.includes(l)?{}:{[l]:i}}},{}):e})(e,A?.jsonSchema)},[F,A,u]),z=M&&E,B=D||k,_=(0,i.Hj)(),L=(0,i.O_)({node:n,id:t}),{errors:P,onError:O,resetErrors:N}=Qe();(0,o.useEffect)(()=>{d(B)},[B,d]);const R=(0,o.useCallback)((e,t)=>{const n={name:S.name,...e.formData};g(n),c(!t)},[S?.name,g,c]),$=(0,o.useCallback)(e=>{R({formData:e})},[R]),W=(0,o.useCallback)(e=>{N(),v(),x(),s(e.formData).then(()=>{c(!1),h?_():(L(),w(),I()),j({header:"Success",text:"Successfully submitted configuration"}),y({feature:"DyncfgForm",description:"Submit success",id:t})}).catch(e=>{const n=(0,a.x)(e);C({header:"Error",text:n}),y({feature:"DyncfgForm",description:"Submit error",id:t,error:JSON.stringify(e.response?.data||{})})}).finally(()=>{b()})},[h,m?.name,s,x,b,c,_,L,w,I,a.x,O,N,v,j,C,y]);return{isLoading:f,loaded:z,defaultFormData:S,formData:T,setFormData:$,refreshData:I,schema:A,resourcesError:B,errors:P,onChange:R,onSubmit:W,onError:O}};var Xe=n(21996);const et=e=>{let{value:t,disabled:n,onChange:l}=e;const i=(0,o.useCallback)(e=>{l(e)},[l]);return(0,d.jsx)(s.Flex,{children:(0,d.jsx)(s.Checkbox,{checked:t,onChange:i,disabled:n})})};var tt=n(24582);const nt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e)return null;if(Array.isArray(e)){return[...t.filter(t=>e.map(e=>"string"===typeof e?e:e.value).includes(t.value)),...e.filter(e=>"object"===typeof e&&e.__isNew__)]}const n=t.find(t=>t.value===e);return n||("string"===typeof e&&""!==e.trim()?{value:e,label:e,__isNew__:!0}:null)},lt=e=>{let{value:t,options:n,disabled:l,multiple:i,isCreatable:r,onChange:a,uiSchema:c}=e;const{enumOptions:u}=n||{},h=c?.["ui:options"]?.enumOptions,p=u||h,m=c?.["ui:creatable"],g=(0,o.useCallback)(e=>{var t;a((t=e)?Array.isArray(t)?t.map(e=>e.value):t.value||"":"")},[]);return p?(0,d.jsx)(s.Select,{value:nt(t,p),isMulti:i,options:p,onChange:g,isDisabled:l,isCreatable:r||m,placeholder:"Select or type to create...",noOptionsMessage:e=>{let{inputValue:t}=e;return t?`Create "${t}"`:"Type to create new option"},formatCreateLabel:e=>`Create "${e}"`,createOptionPosition:"first",allowCreateWhileLoading:!1,isValidNewOption:e=>e&&e.trim().length>0}):null},it=e=>({value:e,label:e}),ot=e=>{const t=(0,Y.n)("id"),n=(0,tt.R7)(t),l=(0,o.useMemo)(()=>Object.keys(n).sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:"accent",ignorePunctuation:!0})).map(it),[n]);return(0,d.jsx)(lt,{...e,isCreatable:!0,options:{enumOptions:l}})},rt=(e,t)=>{const n=parseFloat(e),{multiplier:l}=t||{};return{num:n,multiplier:parseFloat(l)}},st=e=>{let{value:t=0,onChange:n=m(),scale:l=[],defaultScale:i,min:r=0,step:a=1}=e;const c=l.find(e=>{let{value:t}=e;return t===i})||l[0],[u,h]=(0,o.useState)(c),p=((e,t)=>{const{num:n,multiplier:l}=rt(e,t);return l&&!isNaN(n)?Math.round(n/l*100)/100:0})(t,u),g=(0,o.useCallback)(e=>{const t=((e,t)=>{const{num:n,multiplier:l}=rt(e,t);return l&&!isNaN(n)?n*l:0})(e.target.value,u);n(t)},[u,n]);return(0,d.jsxs)(s.Flex,{gap:2,alignItems:"center",children:[(0,d.jsx)(s.TextInput,{value:p,onChange:g,type:"number",min:r,step:a,size:"small"}),(0,d.jsx)(s.Select,{value:u,options:l,onChange:h,styles:{minWidth:"80px"}})]})},at=[{value:"sec",label:"Seconds",multiplier:1},{value:"min",label:"Minutes",multiplier:60},{value:"hour",label:"Hours",multiplier:3600},{value:"day",label:"Days",multiplier:86400},{value:"week",label:"Weeks",multiplier:604800},{value:"month",label:"Months",multiplier:2592e3},{value:"year",label:"Years",multiplier:31536e3}],ct=e=>{const{schema:t={}}=e,{type:n}=t,l="number"==n?.1:1,{scales:i}=e.options||{},o=i?at.filter(e=>{let{value:t}=e;return i.includes(t)}):at;return(0,d.jsx)(st,{scale:o,step:l,...e})},dt=e=>(0,d.jsx)(ct,{...e,defaultScale:e.options?.scale}),ut=(0,h.default)(s.Box).attrs({fontWeight:"bold",width:{min:"40px"}}).withConfig({displayName:"expressionBuilderWidget__Symbol",componentId:"sc-tuh4eq-0"})(["font-family:monospace !important;"]),ht={current:{symbol:"$this",description:"Current value of the chart"},timestamp:{symbol:"$now",description:"Current timestamp"},after:{symbol:"$after",description:"Start time of the evaluation window"},before:{symbol:"$before",description:"End time of the evaluation window"},status:{symbol:"$status",description:"Current alert status"},CLEAR:{symbol:"$CLEAR",description:"Alert status: Clear (0)"},WARNING:{symbol:"$WARNING",description:"Alert status: Warning (1)"},CRITICAL:{symbol:"$CRITICAL",description:"Alert status: Critical (2)"},operators:{comparison:[{symbol:"<",description:"Less than"},{symbol:">",description:"Greater than"},{symbol:"<=",description:"Less than or equal to"},{symbol:">=",description:"Greater than or equal to"},{symbol:"==",description:"Equal to"},{symbol:"!=",description:"Not equal to"}],logical:[{symbol:"&&",description:"Logical AND"},{symbol:"||",description:"Logical OR"},{symbol:"!",description:"Logical NOT"}],arithmetic:[{symbol:"+",description:"Addition"},{symbol:"-",description:"Subtraction"},{symbol:"*",description:"Multiplication"},{symbol:"/",description:"Division"},{symbol:"%",description:"Modulo"}],conditional:[{symbol:"?",description:"Ternary conditional (if)"},{symbol:":",description:"Ternary conditional (else)"}],grouping:[{symbol:"(",description:"Opening parenthesis"},{symbol:")",description:"Closing parenthesis"}]}},pt=["status","CLEAR","WARNING","CRITICAL"],mt={warning:[{symbol:"$this > threshold",description:"Basic threshold comparison",insertText:"$this > "}],critical:[{symbol:"$this > ($status >= $WARNING ? low : high)",description:"Dynamic threshold based on status",insertText:"$this > (($status >= $WARNING) ? () : ())"}]},gt={variables:{title:"Variables",color:"primary"},comparison:{title:"Comparison",color:"warning"},logical:{title:"Logical",color:"accent"},arithmetic:{title:"Math",color:"success"},grouping:{title:"Grouping",color:"text"},templates:{title:"Templates",color:"info"},default:{color:"text"}},ft=e=>{let{value:t="",onChange:n,disabled:l=!1,placeholder:i="Enter an expression",uiSchema:r={},isAlert:a=!1}=e;const[c,u,,h]=(0,y.A)(),[p,m]=(0,o.useState)([]),[g,f]=(0,o.useState)(0),[x,b]=(0,o.useState)(0),v=(0,o.useRef)(null),j=r["ui:alertStatus"]||"critical",C=(0,o.useCallback)(e=>{const t={variables:[],comparison:[],logical:[],arithmetic:[],grouping:[],templates:[]};if(Object.entries(ht).forEach(n=>{let[l,i]=n;"operators"!==l&&(!a&&pt.includes(l)||i.symbol.toLowerCase().includes(e.toLowerCase())&&t.variables.push({symbol:i.symbol,description:i.description,insertText:` ${i.symbol} `}))}),Object.entries(ht.operators).forEach(n=>{let[l,i]=n;i.forEach(n=>{(0===e.length||n.symbol.includes(e))&&(t[l]||(t[l]=[]),t[l].push({symbol:n.symbol,description:n.description,insertText:` ${n.symbol} `}))})}),a&&(0===e.length||"$this".includes(e.toLowerCase()))){(mt[j]||mt.critical).forEach(e=>{t.templates.push({symbol:e.symbol,description:e.description,insertText:` ${e.insertText} `})})}return t},[j,a]);return(0,d.jsxs)(s.Box,{position:"relative",width:"100%",children:[(0,d.jsx)(s.TextInput,{ref:v,value:t,onChange:e=>{const t=e.target?.value||"";n(t);const l=e.target?.selectionStart||0;f(l);const i=t.slice(0,l).split(/\s+/),o=i[i.length-1]||"",r=C(o);m(r);const s=Object.values(r).some(e=>e.length>0);u(s)},onKeyDown:e=>{"Escape"===e.key&&h(!1)},onFocus:()=>{const e=C("");m(e);const t=Object.values(e).some(e=>e.length>0);u(t),b(0)},disabled:l,placeholder:i,autoComplete:"off",spellCheck:!1,sx:{fontFamily:'Monaco, Menlo, "Ubuntu Mono", monospace',fontSize:"14px"},size:"small",border:"inputBorder"}),c&&Object.values(p).some(e=>e.length>0)&&v.current&&(0,d.jsx)(s.Drop,{target:v.current,align:{top:"bottom",left:"left"},background:"mainBackgroundSecondary",border:"borderSecondary",round:1,overflow:"auto",height:{min:50,max:160},onClickOutside:h,onEsc:h,stretch:"width",children:(0,d.jsx)(s.Tabs,{background:"dropdown",selected:x,onChange:b,padding:[2,0],children:Object.entries(p).filter(e=>{let[,t]=e;return t.length>0}).map(e=>{let[l,i]=e;const{title:o=l,color:r="text"}=gt[l]||gt.default;return(0,d.jsx)(s.Tab,{label:o,children:(0,d.jsx)(s.Box,{height:{min:50,max:160},overflow:"auto",padding:[2,0,0],children:(0,d.jsx)(s.Flex,{column:!0,gap:1,children:i.map((e,i)=>(0,d.jsxs)(s.Flex,{alignItems:"center",gap:3,padding:[1,2],cursor:"pointer",onClick:()=>(e=>{const l=t.slice(0,g),i=t.slice(g),o=l.split(/\s+/);o[o.length-1]=e.insertText;const r=o.join(" "),s=(r+i).replace(/\s+/g," ").replace(/^\s+/,"");n(s),h(),setTimeout(()=>{if(v.current){v.current.focus();const e=r.length;v.current.setSelectionRange(e,e),f(v.current.selectionStart||0)}},10)})(e),_hover:{background:"selected"},children:[(0,d.jsx)(ut,{color:r,children:e.symbol}),(0,d.jsx)(s.TextSmall,{as:s.Box,color:"textDescription",children:e.description})]},`${l}-${e.symbol}-${i}`))})})},l)})})})]})};ft.Alert=e=>(0,d.jsx)(ft,{...e,isAlert:!0});const xt=ft,bt=[{value:"B",label:"Bytes",multiplier:1},{value:"KiB",label:"KiB",multiplier:1024},{value:"MiB",label:"MiB",multiplier:Math.pow(1024,2)},{value:"GiB",label:"GiB",multiplier:Math.pow(1024,3)},{value:"TiB",label:"TiB",multiplier:Math.pow(1024,4)}],vt=e=>{const{scales:t}=e.options||{},n=t?bt.filter(e=>{let{value:n}=e;return t.includes(n)}):bt;return(0,d.jsx)(st,{scale:n,...e})},yt=e=>(0,d.jsx)(vt,{...e,defaultScale:e.options?.scale});var jt=n(22337);const Ct=["integer","number"],Mt=e=>{let{value:t,type:n,disabled:l,onChange:i,onBlur:o,placeholder:r,schema:a,rawErrors:c,containerStyles:u}=e;const h=n?{type:n}:(e=>{let t="text";const{minimum:n,maximum:l,multipleOf:i}=e;return(Ct.includes(e.type)||Array.isArray(e.type)&&e.type.some(e=>Ct.includes(e)))&&(t="number"),{type:t,...null===n||isNaN(n)?{}:{min:n},...null===l||isNaN(l)?{}:{max:l},...null===i||isNaN(i)?"number"===e.type?{step:"0.01"}:{}:{step:i}}})(a),p=((e,t)=>"number"===t?e??"":e||"")(t,h.type);return(0,d.jsx)(s.TextInput,{value:p,placeholder:r,onChange:e=>i(e.target?.value),onBlur:o,disabled:l,error:!!c?.length,hideErrorMessage:!0,border:"inputBorder",size:"small",containerStyles:u,...h})};var At=n(66188);const Dt=(0,h.default)(jt.gc).withConfig({displayName:"passwordWidget__StyledIcon",componentId:"sc-6o8r4r-0"})(["position:absolute;right:8px;top:50%;transform:translateY(-50%);cursor:pointer;"]),wt=(0,Ie.A)(Dt),Et=e=>{const[t,n]=(0,y.A)(),l=(0,o.useMemo)(()=>({type:t?"text":"password"}),[t]),i=(0,o.useMemo)(()=>({icon:t?At.k6j:At.pS3,tooltip:t?"Hide password":"Show password"}),[t]);return(0,d.jsxs)(s.Flex,{position:"relative",children:[(0,d.jsx)(Mt,{containerStyles:{width:"100%"},...l,...e}),(0,d.jsx)(wt,{color:"text",onClick:n,...i})]})},St=e=>(0,d.jsx)(Mt,{type:"url",...e}),kt=e=>{let{id:t,value:n,registry:l}=e;const i=(0,Y.n)("id"),r=(0,tt.R7)(i),a=(e=>{if(!e)return 0;const t=e.match(/(?:^|_)rules_(\d+)(?=_|$)/);return t?parseInt(t[1],10):0})(t),c=l.formContext.formData?.rules[a]?.config?.match;c||console.warn("[dyncfg] UnitsPlaceholderWidget could not find context field. Check for schema changes.");const u=c?.on,h=(0,o.useMemo)(()=>u&&r[u]?.units||n,[r,u,n]);return(0,d.jsx)(s.Flex,{height:6,alignItems:"center",padding:[0,2],border:{side:"all",color:"border"},round:.5,children:(0,d.jsx)(s.Text,{"data-id":"dyncfg-punits-placeholder",children:h})})},It={TextWidget:Mt,CheckboxWidget:et,SelectWidget:lt,RadioWidget:e=>{let{value:t,disabled:n,onChange:l,uiSchema:i,options:r}=e;const a=i[Ve.ce],c=a?.enumOptions||r?.enumOptions,u=a?.inline,h=a?.flavour,p="buttonGroup"===h,m=(0,o.useMemo)(()=>({gap:2,...u?{alignItems:"center"}:{column:!0}}),[u]);if(p){const e=c.map(e=>({...e,title:e.schema?.description}));return(0,d.jsx)(s.ButtonGroup,{items:e,value:t,onChange:l,buttonProps:{type:"button",small:!0}})}return c?(0,d.jsx)(s.Flex,{...m,children:c.map(e=>(0,d.jsx)(s.RadioButton,{checked:t===e.value,onChange:()=>l(e.value),disabled:n,children:(0,d.jsx)("label",{title:e?.schema?.description,children:e.label})},e.value))}):null},TextareaWidget:Xe.A,PasswordWidget:Et,URLWidget:St,ContextWidget:ot,alertExpressionWidget:xt.Alert,expressionBuilderWidget:xt,durationWidget:dt,memorySizeWidget:yt,unitsPlaceholder:kt};var Ft=n(62718),Tt=n(9381);const zt=(0,h.default)(s.Box).withConfig({displayName:"formItem__Grid",componentId:"sc-2g4dwa-0"})(["display:grid;grid-template-columns:repeat(2,1fr);"]),Bt=(0,h.default)(x.Ay).withConfig({displayName:"formItem__Form",componentId:"sc-2g4dwa-1"})(["display:flex;flex-direction:column;justify-content:space-between;height:100%;overflow-y:auto;scrollbar-gutter:stable;padding-right:12px;"]),_t=e=>{let{children:t,...n}=e;const l=(()=>{const e=document.getElementById(f.QY);return e?e.getBoundingClientRect().height-75+"px":"100%"})();return(0,d.jsx)(s.Flex,{height:l,column:!0,...n,children:t})},Lt=function(){let{id:e,node:t,isNewItem:n,formState:l=f.bP,submitMethod:i,setIsDirty:s=m(),setError:a=m()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const h=(0,o.useRef)(0),p=(0,o.useRef)(),{entityProps:x={}}=(0,r.SU)(),{cmds:v=[]}=x,y=v.includes("userconfig"),j=(e||"").startsWith(f.Sd),[C,{height:M}]=(0,g.A)(),{terminalSectionOpen:A,evaluationSectionOpen:D,toggleTerminal:w,toggleEvaluation:E}=(()=>{const[e,t]=(0,o.useState)({terminalSectionOpen:!0,evaluationSectionOpen:!0});return{...e,toggleTerminal:(0,o.useCallback)(()=>{t(e=>({...e,terminalSectionOpen:!e.terminalSectionOpen}))},[t]),toggleEvaluation:(0,o.useCallback)(()=>{t(e=>({...e,evaluationSectionOpen:!e.evaluationSectionOpen}))},[t])}})(),S=(0,o.useMemo)(()=>j?{max:D?M/2+"px":M-100+"px"}:"auto",[j,M,D]),{isLoading:k,loaded:I,formData:F,setFormData:T,refreshData:z,schema:B,resourcesError:_,errors:L,onChange:P,onSubmit:O,onError:R}=Je({id:e,node:t,formState:l,submitMethod:i,setIsDirty:s,setError:a,stripUnknownFields:!1});(0,o.useEffect)(()=>(h.current=Date.now(),()=>{h.current=0}),[]);const $=(0,o.useCallback)(e=>{const t=Date.now()-h.current,n=0===h.current||t<500;P(e,n)},[P]);return I?_?(0,d.jsx)(u,{id:e,error:_}):(0,d.jsx)(c.Ay,{feature:"DyncfgForm",id:e,isNewItem:n,children:(0,d.jsx)(Tt.A,{children:(0,d.jsxs)(zt,{children:[(0,d.jsx)(_t,{"data-testid":"dyncfg-form-item-form-section",padding:[4,2,0,4],border:{side:"right",color:"border"},children:(0,d.jsx)(Bt,{ref:p,className:"dyncfg-form",liveValidate:!0,disabled:k,schema:B?.jsonSchema||{},uiSchema:B?.uiSchema||{},formData:F,formContext:{setFormData:T,formData:F},templates:Ke,widgets:It,validator:b.Ay,onError:R,onChange:$,onSubmit:O,children:(0,d.jsx)(N,{id:e,formRef:p,loading:k,errors:L,refreshData:z})})}),(0,d.jsxs)(_t,{ref:C,"data-testid":"dyncfg-form-item-terminal-section",padding:[4,0,0,0],overflow:{vertical:"auto"},children:[(0,d.jsx)(K,{isOpen:A,toggle:w,id:e,node:t,canGetUserConfig:y,formData:F,height:S}),j?(0,d.jsx)(Q,{isOpen:D,toggle:E,formData:F}):null]})]})})}):(0,d.jsx)(Ft.qE,{})},Pt=e=>{let{id:t,node:n,...l}=e;const{setFormData:s}=(0,r.SU)(),a=(0,i.SW)({id:t,node:n}),{loaded:c,value:h,hasError:p,error:m,refresh:g}=a,[f,x]=(0,i.Jb)({id:t,node:n});return(0,o.useEffect)(()=>{f&&(g(),x(!1))},[f,g,x]),(0,o.useEffect)(()=>{c&&!p&&s(h)},[c,p,s,h]),c?p?(0,d.jsx)(u,{id:t,error:m}):(0,d.jsx)(Lt,{...l,id:t,node:n,formState:a}):null},Ot=e=>{let{id:t,formData:n,isNewItem:o,...r}=e;const{node:s}=(0,l.Z)(),a=(0,i.Nj)({id:t,node:s}),c=(0,i.xS)({id:t,node:s});return o?(0,d.jsx)(Lt,{...r,formData:n,id:t,node:s,isNewItem:o,submitMethod:a}):(0,d.jsx)(Pt,{...r,id:t,node:s,submitMethod:c})},Nt=(0,o.memo)(Ot)},73980(e,t,n){n.d(t,{A:()=>ce});n(74423);var l=n(96540),i=n(40961),o=n(73937),r=n(91421),s=n(63872),a=n(23226),c=n(6304),d=n(67012),u=n(63950),h=n.n(u),p=n(4575),m=n(62718),g=n(38429),f=(n(98992),n(54520),n(81454),n(25509),n(65223),n(60321),n(41927),n(11632),n(64377),n(66771),n(12516),n(68931),n(52514),n(35694),n(52774),n(49536),n(21926),n(94483),n(16215),n(45087)),x=n(74891),b=n(49165),v=n(21885),y=n(65637),j=n(98289),C=n(87083),M=n(19148),A=n(74848);const D=(0,x.A)(g.Flex),w=(0,x.A)(g.Checkbox),E=(0,x.A)(M.RK),S=(0,l.memo)(e=>{let{source:t="",sourceType:n}=e;const l=t.split(",");return(0,A.jsxs)(g.Flex,{column:!0,gap:2,children:[(0,A.jsxs)(g.Flex,{alignItems:"center",gap:1,children:[(0,A.jsx)(g.Text,{strong:!0,children:"Source type"}),(0,A.jsx)(g.Pill,{children:n})]}),(0,A.jsx)(g.Flex,{column:!0,gap:1,children:l.length?l.map(e=>(0,A.jsx)(g.TextSmall,{children:e},e)):null})]})}),k=(0,l.memo)(e=>{let{source:t,sourceType:n,...i}=e;const o=(0,l.useMemo)(()=>v.V6[n],[n]);if(!o)return null;const{icon:r}=o;return(0,A.jsx)(f.A,{isBasic:!0,content:(0,A.jsx)(S,{source:t,sourceType:n}),children:(0,A.jsx)(g.Flex,{children:(0,A.jsx)(g.Icon,{name:r,...i})})})}),I=(0,l.memo)(e=>{let{type:t,status:n}=e;const i=(0,l.useMemo)(()=>v.bM[n],[n]);if(!i)return null;const{label:o,color:r,icon:s}=i;return"template"!==t?(0,A.jsx)(D,{width:{min:6},gap:1,padding:[1],round:!0,alignItems:"center",justifyContent:"center",tooltip:o,children:(0,A.jsx)(g.Icon,{name:s,height:"16px",color:r})}):null}),F=(0,l.memo)(()=>(0,A.jsx)(g.Flex,{width:{max:100},children:(0,A.jsxs)(g.Text,{children:["You can submit your changes to another node, or to multiple nodes by selecting"," ",(0,A.jsx)(g.Text,{strong:!0,children:"Submit to multiple nodes"})," button."]})})),T=()=>{const{options:e}=(0,o.Z)(),[t]=(0,C.Oj)({extraKey:v.q4,merge:!1}),n=t.length?e.filter(e=>{let{value:n}=e;return t.includes(n)}):e,l=n.length?n[0].label:"0",i=n.length>1?`and ${n.length-1} more`:"",r=n.length>1?"nodes":"node";return(0,A.jsxs)(g.Flex,{"data-testid":"dyncfg-on-node",gap:1,alignItems:"center",children:[(0,A.jsx)(g.TextBig,{children:"on"}),(0,A.jsxs)(D,{padding:[1],background:"mainBackground",tooltip:1===n.length?(0,A.jsx)(F,{}):null,tooltipProps:{isBasic:!0,plain:!1},children:[(0,A.jsx)(M.l4,{strong:!0,children:l})," "]}),(0,A.jsxs)(g.TextBig,{children:[(0,A.jsx)(g.TextBig,{strong:!0,children:`${i} `}),r]})]})},z=e=>{let{title:t,containerIsOpen:n,type:i,source:s,sourceType:a,status:c,templateChildren:d={},onCollapseExpand:u,userDisabled:h}=e;const m=(0,l.useRef)(),{color:f}=v.g7[i]||v.g7.default,x=(0,l.useMemo)(()=>h||"disabled"===c?"disabled":f,[h,c,f]),{node:C}=(0,o.Z)(),{path:D}=(0,y.A)(C),{open:S,isNewItem:F,formData:z,setFormData:B,entityProps:_={}}=(0,p.SU)(),{cmds:L=[]}=_,P=L.includes("userconfig"),{name:O}=z||{},N=(0,b.A)({id:t,node:C}),{items:R,toggle:$,isSelected:W,setItems:H}=(0,r.H2)({node:C,path:D}),U="template"===i,q=Object.keys(d||{}),V=!!Object.keys(d||{}).length,G=(0,l.useMemo)(()=>q.filter(e=>R.includes(e)),[q,R]),K=(0,l.useMemo)(()=>G.length===q.length,[G.length,q.length]),Z=(0,l.useMemo)(()=>G.length>0&&G.length<q.length,[G.length,q.length]),Y=(0,l.useCallback)(e=>{const t=(e.target.value||"").replace(/ /g,"_");B(e=>({...e,name:t})),P&&N(z,t||"test")},[z,B,P,N]),Q=(0,l.useCallback)(()=>{U?H(e=>K?e.filter(e=>!q.includes(e)):Array.from(new Set([...e,...q]))):$(t)},[t,U,q,$,H]);return(0,l.useEffect)(()=>{m.current&&m.current.focus()},[m.current]),(0,A.jsxs)(g.Flex,{gap:2,alignItems:"center",padding:[0,0,0,U?0:2],children:[!!U&&(0,A.jsx)(E,{noWrapper:!0,name:"chevron_right",color:"textLite",rotate:n?3:1,onClick:u,tooltip:n?"Hide children":"Show children",hasTemplateChildren:V}),S||F?null:(0,A.jsx)(g.Flex,{padding:[0,1,0,0],children:(0,A.jsx)(w,{checked:U?V&&K:W(t),indeterminate:U&&!!Z,onChange:Q,tooltip:U?V?"Select all":null:"Select",disabled:U&&!V})}),(0,A.jsx)(I,{type:i,status:c}),(0,A.jsx)(k,{source:s,sourceType:a,color:x}),F?null:(0,A.jsx)(M.QP,{color:x,children:(0,j.J3)(t)}),F&&S?(0,A.jsx)(g.TextInput,{inputRef:m,"data-testid":"dyncfg-config-item-name",width:65,value:O,onChange:Y,placeholder:"Add configuration name",error:F&&!z?.name,hideErrorMessage:!0}):null,"template"!==i&&S?(0,A.jsx)(T,{}):null]})},B=(0,l.memo)(z);var _=n(76661),L=n(93598),P=n(94404);const O=(0,P.A)(L.A),N=function(){let{title:e,buttonProps:t={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[,n]=(0,r.QH)(),i=(0,_.A)(),{isLoading:o,entityProps:s}=(0,p.SU)(),{cmds:a=[]}=s||{},c=o,d=(0,l.useCallback)(()=>{n(i({template:e,entityProps:s}))},[e,s,i,n]);return a.includes("add")?(0,A.jsx)(O,{edit:!0,feature:"DyncfgTemplate",payload:{id:e,label:"Add job"},tooltip:"Add a new configuration item",icon:"plus",iconWidth:18,iconHeight:18,onClick:d,disabled:c,...t}):null};var R=n(12215),$=n(41395);const W=(0,P.A)(L.A),H=e=>{let{id:t,enable:n,open:l,onDecline:i,onConfirm:o}=e;const r=n?"enable":"disable";return l?(0,A.jsx)(g.ConfirmationDialog,{title:`${(0,$.Zr)(r)} item?`,handleConfirm:o,handleDecline:i,confirmLabel:`Yes ${r}`,declineLabel:"No",isConfirmPositive:!!n,message:(0,A.jsxs)(g.Flex,{column:!0,gap:2,children:[(0,A.jsxs)(g.TextBig,{children:["You are about to ",r," ",(0,A.jsx)(M.QP,{strong:!0,children:t})," module and all its configurations."]}),(0,A.jsx)(g.TextBig,{children:"Are you sure?"})]})}):null},U=e=>{let{id:t,userDisabled:n,buttonProps:i={},cmds:s=[]}=e;const{isLoading:a,startLoading:d,stopLoading:u}=(0,p.SU)(),{node:h}=(0,o.Z)(),m=(0,r.DP)({id:t,node:h}),g=(0,r.O_)({node:h,id:t}),[f,x]=(0,R.A)(),[b,v]=(0,l.useState)(!n),[y,,j,C]=(0,c.A)(),M=(0,l.useCallback)(()=>{C(),d(),m(b).then(e=>{g(),f({successMessage:`Successfully ${b?"enabled":"disabled"} module`})(e)}).catch(e=>{x({header:`Couldn't ${b?"enabled":"disabled"} module`})(e)}).finally(()=>{u()})},[b,C,d,m,g,u]),D=(0,l.useMemo)(()=>n?!s.includes("enable"):!s.includes("disable"),[n,s]),w=(0,l.useCallback)(e=>{a||D||(v(e),j())},[a,D,j]),E=(0,l.useMemo)(()=>({edit:!0,feature:"DyncfgTemplate",payload:{id:t,label:n?"Enable":"Disable"},isLoading:a,disabled:a||D,...i,...n?{tooltip:D?"You cannot enable this module":"Enable this module",icon:"switch_off",iconColor:D?"textLite":"disabled",onClick:()=>w(!0)}:{tooltip:D?"You cannot disable this module":"Disable this module",icon:"switch_off",iconColor:D?"textLite":"success",onClick:()=>w(!1),danger:!0}}),[t,n,a,i,D,w]);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(W,{...E}),(0,A.jsx)(H,{id:t,enable:b,open:y,onDecline:C,onConfirm:M})]})},q="success",V={iconColor:q,flavour:"borderless",color:q},G=e=>{let{title:t,userDisabled:n,cmds:l}=e;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(N,{title:t,buttonProps:V}),(0,A.jsx)(U,{id:t,userDisabled:n,buttonProps:V,cmds:l})]})};var K=n(10094);const Z=e=>{let{title:t,open:n,onEdit:l,onCollapseExpand:i,type:o,userDisabled:r,isOpenEntity:s,isEditFromState:a,cmds:c}=e;return(0,A.jsx)(g.Flex,{gap:2,alignItems:"center",children:"template"===o?(0,A.jsx)(G,{title:t,userDisabled:r,cmds:c}):(0,A.jsx)(K.A,{title:t,open:n,onEdit:l,onCollapseExpand:i,isOpenEntity:s,isEditFromState:a})})};var Y=n(3941);const Q=(0,x.A)(g.Icon),J={vertical:2,horizontal:4},X=e=>{let{path:t,containerIsOpen:n,onClick:l,...i}=e;return(0,A.jsxs)(g.Flex,{gap:2,alignItems:"center",onClick:l,cursor:"pointer",...i,children:[(0,A.jsx)(Q,{noWrapper:!0,name:"chevron_right",color:"textLite",rotate:n?3:1,tooltip:n?"Hide children":"Show children"}),(0,A.jsx)(M.QP,{strong:!0,children:t})]})},ee=e=>{let{frequency:t=20}=e;const[n,i]=(0,l.useState)(t),[o,r]=(0,l.useState)(0),s=(0,l.useCallback)(()=>{100!==o?r(e=>e+5):i(void 0)},[r,i]);return(0,Y.A)(s,n),(0,A.jsxs)(M.gX,{"data-testid":"dyncfg-header-loader-container",children:[(0,A.jsx)(g.Text,{children:"Loading schema..."}),(0,A.jsx)(g.ProgressBar,{background:"border",border:"none",color:["green","netdata"],containerWidth:"100%","data-testid":"dyncfg-schema-loading-progress-bar",height:1,width:`${o}%`})]})},te=e=>{let{flavour:t,title:n,open:i,toggleOpen:o,onEdit:s,level:a,fullPage:c,entityProps:d={},isOpenEntity:u,isEditFromState:h,schemaLoaded:p}=e;const{vertical:m,horizontal:f}=J,x=(0,l.useMemo)(()=>[m,f,m,i&&c?f:f*a],[a,i,c]),b="path"===t,{ids:y,toggle:j}=(0,r.$K)(),C=(0,l.useMemo)(()=>!y.includes(n),[y,n]),M=(0,l.useCallback)(()=>{j(n),"template"!==d?.type&&o()},[n,j,o,d?.type]);return(0,A.jsx)(g.Flex,{height:`${v.FL}px`,position:"relative",alignItems:"center",justifyContent:"between",padding:x,isOpenEntity:u,border:{side:"bottom",color:"border"},children:b?(0,A.jsx)(X,{path:n,containerIsOpen:C,onClick:M}):(0,A.jsx)(A.Fragment,{children:i&&!p?(0,A.jsx)(ee,{}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(B,{title:n,containerIsOpen:C,onCollapseExpand:M,...d}),(0,A.jsx)(Z,{title:n,open:i,onEdit:s,onCollapseExpand:M,isOpenEntity:u,isEditFromState:h,...d})]})})})},ne=e=>{let{collapsibleProps:t,loaderProps:n,level:l,setIsDirty:i,setError:o,showLoader:r,renderChildren:s}=e;const{open:a}=t||{};return(0,A.jsxs)(A.Fragment,{children:[a?s({level:l+1,setIsDirty:i,setError:o}):null,r?(0,A.jsx)(g.Flex,{...n,children:(0,A.jsx)(m.tW,{})}):null]})},le=e=>{let{title:t,isLoading:n,fullPage:i,entityProps:o,setIsDirty:r,flavour:s,handleEditClick:a,open:c,toggleOpen:d,level:u,isEditFromState:p,setError:m,schema:f,schemaLoaded:x,renderChildren:b=h(),...v}=e;const y="path"===s,j=["single","job"].includes(o?.type),C="job"===o?.type,M="path"!==s&&c&&n,{containerProps:D,collapsibleProps:w,loaderProps:E}=(0,l.useMemo)(()=>({containerProps:{...c&&i?{position:"fixed",zIndex:"45",top:"5vh",left:"5vw",width:"90vw",height:"90vh"}:{position:"relative"},...c&&j?{border:{side:"all",color:"border"}}:{},...i?{}:{height:"100%"},background:j&&c?"modalBackground":"mainBackground",round:!0},collapsibleProps:{level:u,open:c,duration:0,flavour:s,fullPage:i,isJob:C},loaderProps:{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:".9",zIndex:"100"}}),[c,i,j,u,s,C]),S={collapsibleProps:w,loaderProps:E,level:u,setIsDirty:r,setError:m,showLoader:M,renderChildren:b};return(0,A.jsxs)(g.Flex,{"data-testid":`dyncfg-config-item-container-${t}`,column:!0,...D,...v,children:[(0,A.jsx)(te,{flavour:s,open:c,toggleOpen:d,title:t,onEdit:a,level:u,fullPage:i,entityProps:o,isOpenEntity:c&&!!j,isEditFromState:p,schemaLoaded:x},c),!y&&x&&f?(0,A.jsx)(ne,{...S}):null]})},ie=e=>{let{open:t,onDecline:n,onConfirm:l}=e;return t?(0,A.jsx)(g.ConfirmationDialog,{title:"Discard changes?",handleConfirm:l,handleDecline:n,confirmLabel:"Yes, discard",declineLabel:"No, keep editing",backdropContainerProps:{zIndex:"120"},message:(0,A.jsxs)(g.Flex,{column:!0,gap:2,children:[(0,A.jsx)(g.TextBig,{children:"If you exit Edit mode before submit, your changes will be lost."}),(0,A.jsx)(g.TextBig,{children:"Are you sure?"})]})}):null},oe=e=>(0,l.useEffect)(()=>{if(!e)return;const t=t=>{"Escape"===t.code&&e(t)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e]),re=e=>{let{title:t,open:n,isLoading:i,isDirty:o,setIsDirty:s,toggle:a,refresh:d,refreshUserConfig:u,entityProps:h,error:p}=e;const m=h?.[v.D9],g=["single","job"].includes(h?.type),[,f]=(0,r.QH)(),[x,,b,y]=(0,c.A)(),j=(0,l.useCallback)(()=>{o&&(s(!1),a(),y()),d(),u(),f(null)},[t,f,o,s,a,d,u,y]),C=(0,l.useCallback)(e=>{i||(o?p||e?j():b():(a(),m&&f(null)))},[i,m,o,p,j,b,a]);return oe(e=>{"Escape"===e.code&&n&&g&&(e.preventDefault(),C())}),{confirmationOpen:x,closeConfirmation:y,onConfirm:j,onClick:C}},se=(e,t)=>{const n=["schema_update"].includes(e.lastAction);switch(t.type){case"expand":return{...e,expanded:!0,lastAction:"expand"};case"minimize":return{...e,expanded:!1,lastAction:"minimize"};case"schema_update":return{...e,expanded:n?t.schemaFullPage:e.expanded,...n?{lastAction:"schema_update"}:{}}}},ae=e=>{let{id:t,node:n}=e;const i=(0,r.K_)({id:t,node:n});return(0,l.useEffect)(()=>{i()},[t,n]),null},ce=(0,l.memo)(e=>{let{flavour:t="path",title:n="",level:u=1,entityProps:m={},isNewItem:g,isOpen:f,isEditFromState:x,renderChildren:b=h(),formData:y,...j}=e;const C=g?j.id:n,[M,D]=(0,c.A)(g||f),{node:w}=(0,o.Z)(),E=(0,r._O)({node:w,id:n})||m,[S,,k,I]=(0,c.A)(),[F,T]=(0,l.useReducer)(se,{expanded:!!g||!!x,lastAction:"schema_update"}),[z,B]=(0,l.useState)(),[_,L]=(0,l.useState)(),{refresh:P}=(0,r.$h)(),{refresh:O}=(0,r.MQ)(),N=["single","job"].includes(E?.type),R=(0,l.useMemo)(()=>F.expanded,[F.expanded]),[,$]=(0,a.A)(),[,W]=(0,s.A)(),{loaded:H,value:U,error:q}=(0,r.t8)({id:C,node:w}),V=(0,l.useCallback)(e=>{T({type:e?"expand":"minimize"})},[T]),G=(0,l.useCallback)(e=>{T({type:"schema_update",schemaFullPage:e})},[T]),{confirmationOpen:K,closeConfirmation:Z,onConfirm:Y,onClick:Q}=re({title:n,open:M,isLoading:S,isDirty:_,setIsDirty:L,refresh:P,refreshUserConfig:O,toggle:D,entityProps:E,error:z}),J=(0,l.useCallback)(e=>{M&&P(),Q(e)},[M,P,Q]);(0,l.useEffect)(()=>{M||O()},[M,O]),(0,l.useEffect)(()=>{H&&U&&!q&&G(!0)},[H,U,q,G]),(0,l.useEffect)(()=>{q&&(M?J(!0):W({header:"Schema error",message:q}))},[M,q,J,W]),(0,d.A)(()=>{$(!!M)},[M]);const X={title:n,isLoading:S,fullPage:R,entityProps:E,setIsDirty:L,flavour:t,handleEditClick:J,open:M,toggleOpen:D,level:u,setError:B,isEditFromState:x,schema:U,schemaLoaded:H,renderChildren:b,...j};return(0,A.jsxs)(p.Ay,{id:n,open:M,isNewItem:g,isLoading:S,startLoading:k,stopLoading:I,fullPage:R,setFullPage:V,entityProps:E,isDirty:_,setIsDirty:L,error:z,formData:y,children:[M&&N&&C&&w?(0,A.jsx)(ae,{id:C,node:w}):null,M&&H&&!q?(0,i.createPortal)((0,A.jsx)(le,{...X,id:v.QY,"data-testid":"in-portal"}),document.body):(0,A.jsx)(le,{...X}),(0,A.jsx)(ie,{open:K,onDecline:Z,onConfirm:Y})]})})},19148(e,t,n){n.d(t,{QP:()=>o,RK:()=>r,gX:()=>a,l4:()=>s});var l=n(882),i=n(38429);const o=(0,l.default)(i.TextBig).withConfig({displayName:"styled__StyledTitle",componentId:"sc-16w9sl7-0"})(["font-family:monospace;"]),r=(0,l.default)(i.Icon).attrs(e=>({opacity:"1",cursor:"pointer",...e})).withConfig({displayName:"styled__StyledTemplateArrow",componentId:"sc-16w9sl7-1"})(["pointer-events:",";opacity:",";cursor:",";"],e=>{let{hasTemplateChildren:t}=e;return t?"auto":"none"},e=>{let{hasTemplateChildren:t}=e;return t?"1":"0"},e=>{let{hasTemplateChildren:t}=e;return t?"pointer":"default"}),s=(0,l.default)(i.TextBig).withConfig({displayName:"styled__StyledNodeName",componentId:"sc-16w9sl7-2"})(["font-family:monospace;"]),a=(0,l.default)(i.Flex).attrs(e=>({position:"absolute",column:!0,gap:1,top:"50%",left:"50%",...e})).withConfig({displayName:"styled__StyledLoaderContainer",componentId:"sc-16w9sl7-3"})(["transform:translate(-50%,-50%);"])},10094(e,t,n){n.d(t,{r:()=>R,A:()=>H});var l=n(882),i=n(63950),o=n.n(i),r=n(38429),s=(n(74423),n(96540)),a=n(4575),c=n(93598),d=n(94404),u=n(74848);const h=(0,d.A)(c.A),p=function(){let{id:e,onClick:t,closeMenu:n=o(),buttonProps:l={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{open:i,isLoading:r,entityProps:c}=(0,a.SU)(),{cmds:d=[]}=c||{},p=r,m=d.includes("update")?"Edit configuration":"You have no permissions to edit the configuration",g=(0,s.useCallback)(()=>{t(),n()},[t,n]);return(0,u.jsx)(h,{view:!0,forceAccess:i,feature:"DyncfgItem",payload:{id:e,label:i?"Close":"Edit"},tooltip:i?"Close":m,icon:i?"x":"pencilOutline",onClick:g,disabled:p,...l})};var m=n(91421),g=n(76661),f=n(67200),x=n(98289);const b=(0,f.A)(r.Button),v=function(){let{title:e,template:t={},onCollapseExpand:n=o(),buttonProps:l={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=(0,x.UE)(e),[,r]=(0,m.QH)(),{cmds:c,user_disabled:d}=t,{isLoading:h,open:p,formData:f,entityProps:v,isNewItem:y}=(0,a.SU)(),j=(0,g.A)(),C=(0,s.useCallback)(()=>{h||(r(j({template:i,formData:f,entityProps:v})),n())},[h,i,f,v,r,j,n]);return p&&!y&&c?.includes("add")?(0,u.jsx)(b,{icon:"copy",onClick:C,disabled:h||d,...d?{}:{tooltip:"Copy this item and create a new one"},...l}):null};var y=n(73937),j=n(19148),C=n(6304),M=n(12215),A=n(3319);const D=(0,d.A)(c.A),w=e=>{let{id:t,open:n,onDecline:l,onConfirm:i}=e;return n?(0,u.jsx)(r.ConfirmationDialog,{title:"Delete item?",handleConfirm:i,handleDecline:l,confirmLabel:"Yes, delete",declineLabel:"No",backdropContainerProps:{zIndex:"120"},message:(0,u.jsxs)(r.Flex,{column:!0,gap:2,children:[(0,u.jsxs)(r.TextBig,{children:["You are going to completely remove ",(0,u.jsx)(j.QP,{strong:!0,children:t})," and this action cannot be reverted."]}),(0,u.jsx)(r.TextBig,{children:"Are you sure that you want to delete this item?"})]})}):null},E=function(){let{id:e,onOpenConfirmation:t=o(),onCloseConfirmation:n=o(),buttonProps:l={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{isLoading:i,entityProps:r,startLoading:c,stopLoading:d}=(0,a.SU)(),{type:h,cmds:p=[]}=r||{},{node:g}=(0,y.Z)(),f=(0,m.OU)({id:e,node:g}),[x,b]=(0,M.A)(),v=(0,m.Hj)(),[j,,E,S]=(0,C.A)(),{sendButtonClickedLog:k}=(0,A.A)(),I=i,F=(0,s.useCallback)(()=>{S(),n(),c(),f().then(t=>{x({successMessage:"Successfully deleted configuration"})(t),k({feature:"DyncfgItem",description:"Confirm deletion",id:e}),v()}).catch(e=>{b({header:"Couldn't delete configuration"})(e)}).finally(()=>{d()})},[f,S,n,c,d,v,k]),T=(0,s.useCallback)(()=>{i||(E(),t())},[i,E,t]),z=(0,s.useCallback)(()=>{S(),n()},[S,n]);return"job"===h&&p.includes("remove")?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(D,{edit:!0,feature:"DyncfgItem",payload:{id:e,label:"Delete"},icon:"trashcan",onClick:T,disabled:I,tooltip:"Delete",...l}),(0,u.jsx)(w,{id:e,open:j,onDecline:z,onConfirm:F})]}):null},S=(0,d.A)(c.A),k=function(){let{id:e,template:t={},closeMenu:n=o(),buttonProps:l={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{node:i}=(0,y.Z)(),r=(0,m.ZN)({id:e,node:i}),[c,d]=(0,M.A)(),{isLoading:h,entityProps:p,startLoading:g,stopLoading:f}=(0,a.SU)(),{user_disabled:x}=t,{cmds:b=[]}=p||{},v=(0,m.O_)({node:i,id:e}),j=h||x,C=(0,s.useCallback)(()=>{n(),h||x||(g(),r().then(e=>{c({successMessage:"Successfully restarted configuration"})(e),v()}).catch(e=>{d({header:"Couldn't restart configuration"})(e)}).finally(()=>{f()}))},[h,x,r,g,v,f,n]);return b.includes("restart")?(0,u.jsx)(S,{edit:!0,feature:"DyncfgItem",payload:{id:e,label:"Restart"},icon:"refresh",onClick:C,disabled:j,tooltip:"Restart",...l}):null},I=(0,d.A)(c.A),F=e=>{let{id:t,template:n={},closeMenu:l=o(),buttonProps:i}=e;const{isLoading:r,entityProps:d,startLoading:h,stopLoading:p}=(0,a.SU)(),{cmds:g=[],userDisabled:f}=d||{},[x,b]=(0,s.useState)(!f),{node:v}=(0,y.Z)(),{user_disabled:j}=n,C=(0,m.DP)({id:t,node:v}),D=(0,m.O_)({node:v,id:t}),[w,E]=(0,M.A)(),{sendButtonClickedLog:S}=(0,A.A)(),{hidden:k,isDisabled:F,tooltipText:T}=(0,c.j)({edit:!0,tooltip:x?"Disable":"Enable",disabled:r||j}),z=(0,s.useMemo)(()=>({...i,label:x?"Disable":"Enable",payload:{id:t,label:x?"Disable":"Enable"}}),[i,x]),B=(0,s.useCallback)(()=>{b(e=>!e),l(),h(),C(!x).then(e=>{S({feature:"DyncfgItem",description:x?"Disable item":"Enable item",id:t}),w({successMessage:`Successfully ${x?"disabled":"enabled"} configuration`})(e),D()}).catch(e=>{S({feature:"DyncfgItem",description:`Failed to ${x?"disable":"enable"} item`,id:t}),b(e=>!e),E({header:`Couldn't ${x?"disable":"enable"} configuration`})(e)}).finally(()=>{p()})},[j,x,C,h,b,D,S,l]),_=(0,s.useMemo)(()=>g.includes("enable"),[g]),L=(0,s.useMemo)(()=>g.includes("disable"),[g]);return!k&&_&&L?(0,u.jsx)(I,{edit:!0,feature:"DyncfgItem",icon:"switch_off",onClick:B,disabled:F,tooltip:T,...z}):null};n(98992),n(37550);const T=(0,n(74891).A)(r.Button),z={small:!0,neutral:!0,tooltip:null,iconHeight:"12px"},B=["restart","remove"],_=["enable","disable"],L=e=>{let{title:t,template:n,isOpenEntity:l,buttonProps:i={}}=e;const o=(0,s.useRef)(),[c,d,,h]=(0,C.A)(!1),[p,,m]=(0,C.A)(!1),{entityProps:g}=(0,a.SU)(),{cmds:f=[]}=g||{},x=(0,s.useMemo)(()=>!!f.some(e=>B.includes(e))||!(l||!_.every(e=>f.includes(e))),[f,l]),b=(0,s.useCallback)(()=>{p||h()},[h,p]);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r.Flex,{ref:o,children:(0,u.jsx)(T,{icon:"nav_dots",onClick:d,tooltip:x?"Item actions":null,disabled:!x,...i})}),c&&x&&o.current?(0,u.jsx)(r.Drop,{width:25,target:o.current,align:{top:"bottom",right:"right"},background:"modalTabsBackground",margin:[2,0,0],round:.5,close:h,onClickOutside:b,onEsc:h,children:(0,u.jsxs)(r.Flex,{column:!0,gap:1,padding:[2],children:[(0,u.jsx)(k,{id:t,template:n,closeMenu:h,buttonProps:{...i,...z,label:"Restart"}}),l?null:(0,u.jsx)(F,{id:t,template:n,closeMenu:h,buttonProps:{...i,...z}}),(0,u.jsx)(E,{id:t,onOpenConfirmation:m,onCloseConfirmation:h,buttonProps:{...i,...z,neutral:!1,danger:!0,iconColor:"error",label:"Delete"}})]})}):null]})};var P=n(4797);const O="text",N={iconColor:O,flavour:"borderless",color:O,type:"button"},R=(0,l.default)(r.Flex).attrs({alignItems:"center",border:{side:"all",color:"border"},round:!0}).withConfig({displayName:"itemActions__StyledContainer",componentId:"sc-1kpuq1a-0"})([""]),$=(W=p,e=>{let{open:t,...n}=e;return t?(0,u.jsx)(R,{gap:1,children:(0,u.jsx)(W,{...n})}):(0,u.jsx)(W,{...n})});var W;const H=function(){let{title:e,open:t,isOpenEntity:n,isEditFromState:l,onEdit:i,onCollapseExpand:r=o()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=(0,P.A)();return(0,u.jsxs)(u.Fragment,{children:[t?l?null:(0,u.jsxs)(R,{gap:1,children:[(0,u.jsx)(v,{title:e,template:s,onCollapseExpand:r,buttonProps:N}),(0,u.jsx)(k,{id:e,template:s,buttonProps:N}),(0,u.jsx)(E,{id:e,buttonProps:N}),n?null:(0,u.jsx)(F,{id:e,template:s})]}):(0,u.jsx)(L,{title:e,template:s,isOpenEntity:n,buttonProps:N}),(0,u.jsx)($,{id:e,onClick:i,open:t,buttonProps:N})]})}},45026(e,t,n){n.d(t,{A:()=>r});var l=n(91421),i=n(21885),o=n(87083);const r=()=>{const{state:e,refresh:t}=(0,l.$h)(),{alertName:n}=e||{},r=(0,o.a7)({extraKey:i.q4}),s=n?`${i.DR}${n}`:null,a=(0,l.hG)({nodeIds:r,id:s}),{nodeId:c,error:d}=a||{};return{alertName:n,nodeIds:r,title:s,nodeId:c,error:d,refresh:t}}},9381(e,t,n){n.d(t,{A:()=>c});var l=n(96540),i=n(41514),o=n(38429),r=n(74848);class s extends l.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){(0,i.H)("configuration-error",{error:e.message,stack:t.componentStack,configId:this.props.configId})}handleRetry=()=>{this.setState({hasError:!1,error:null}),this.props.onRetry&&this.props.onRetry()};render(){return this.state.hasError?this.props.fallback||(0,r.jsx)(a,{onRetry:this.handleRetry,canRetry:!1!==this.props.canRetry,error:this.state.error}):this.props.children}}const a=e=>{let{onRetry:t,canRetry:n=!0,error:l}=e;return(0,r.jsxs)(o.Flex,{column:!0,alignItems:"center",justifyContent:"center",padding:[8],gap:4,children:[(0,r.jsx)(o.Icon,{name:"alert_triangle",size:"large",color:"error"}),(0,r.jsx)(o.Text,{size:"large",strong:!0,children:"Something went wrong"}),(0,r.jsx)(o.Text,{color:"textLite",children:"We're having trouble loading this configuration"}),(0,r.jsxs)(o.Flex,{gap:2,children:[(0,r.jsx)(o.Button,{onClick:t,disabled:!n,children:n?"Try Again":"Max Retries Reached"}),(0,r.jsx)(o.Button,{flavour:"borderless",onClick:()=>window.location.reload(),children:"Reload Page"})]})]})},c=s},87680(e,t,n){n.d(t,{A:()=>r});var l=n(4575),i=n(98289),o=n(96540);const r=function(){let{defaultName:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:t,formData:n,isNewItem:r}=(0,l.SU)();return(0,o.useMemo)(()=>(r?n?.name:(0,i.J3)(t))||e,[r,n?.name,t,e])}},4797(e,t,n){n.d(t,{A:()=>a});var l=n(4575),i=n(73937),o=n(91421),r=n(65637),s=n(15505);const a=()=>{const{id:e,isNewItem:t,entityProps:n}=(0,l.SU)(),{node:a}=(0,i.Z)(),{path:c}=(0,r.A)(a),{template:d}=n,u=(0,o.SD)({node:a,path:c,isNewItem:t})(t?d:e),h=(0,o._O)({node:a,id:d});return h?(0,s.Jz)(h):u||{}}},65637(e,t,n){n.d(t,{A:()=>r});n(98992),n(72577),n(81454),n(8872);var l=n(96540),i=n(91421),o=n(41395);const r=e=>{const t=(0,l.useRef)(),{state:n}=(0,i.$h)(),{isAlert:r}=n||{},{loaded:s,value:a,hasError:c}=(0,i.wd)({node:e}),d=(0,l.useMemo)(()=>!s||c?[]:Object.keys(a?.tree||{}).reduce((e,t)=>{t.startsWith("/")||(t=`/${t}`);const n=t.match(/\/[^/]+/g);if(n.length){const t=n[0],l=(0,o.Zr)(t.replace(/^\/?/,""));e.find(e=>e.value===t)||e.push({value:t,label:l})}return e},[]),[s,a,c]),[u,h]=(0,i.te)();(0,l.useEffect)(()=>{if(!t.current&&r&&d.length&&!u){const e=d.map(e=>{let{value:t}=e;return t}).indexOf("/health");h(e),t.current=!0}},[r,d,h,t.current]);return{loaded:s&&(!!d||c),tabs:d,selectedTab:u,setSelectedTab:h,path:d[u]?.value,tree:a?.tree}}},12215(e,t,n){n.d(t,{A:()=>s,x:()=>r});var l=n(63872),i=n(41395),o=n(21885);const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.Fn,n=e?.response?.data||e||{};try{n=JSON.parse(n)}catch{}const{message:l,errorMessage:r,error_message:s}=n;return(0,i.Zr)(l||r||s||t)},s=()=>{const[e,t,,n]=(0,l.A)();return[function(){let{successMessage:t="Successfully saved"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l=>{let{data:{message:i}}=l;(i?n:e)({header:i?"Warning":"Success",text:i||t})}},function(){let{header:e="Error",text:n=o.Fn}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l=>{const i=r(l,n);t({header:e,text:i})}}]}},49165(e,t,n){n.d(t,{A:()=>s});var l=n(87680),i=n(12215),o=n(91421),r=n(96540);const s=function(){let{id:e,node:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,o.y8)({id:e,node:t}),s=(0,l.A)(),{setValue:a,setError:c}=(0,o.MQ)(),d=(0,r.useRef)();return(0,r.useCallback)((e,t)=>{d.current&&(clearTimeout(d.current),d.current=null);const l=null===t?t:t||s;d.current=setTimeout(()=>{n({name:l,payload:e}).then(e=>a(e.data||"")).catch(e=>{c((0,i.x)(e))})},500)},[n,s,a,c])}}}]);